diff --git a/src/types.ts b/src/types.ts index c466ab4..4ea6f6b 100644 --- a/src/types.ts +++ b/src/types.ts @@ -103,10 +103,14 @@ export type RegisterFeedbackBodyProps = { event: string accountId?: string installationId?: string + sessionToken?: string loginId?: string paymentId?: string signupId?: string + /** @deprecated use occurredAt instead */ timestamp?: number + occurredAt?: Date + expiresAt?: Date [x: string]: any } @@ -130,7 +134,9 @@ export type RegisterTransactionProps = ( type TransactionLocation = { latitude: number longitude: number + /** @deprecated use collectedAt instead */ timestamp?: number + collectedAt?: Date } type AddressCoordinates = { diff --git a/test/formatting.test.ts b/test/formatting.test.ts index 06eacce..387e6b6 100644 --- a/test/formatting.test.ts +++ b/test/formatting.test.ts @@ -10,12 +10,14 @@ describe('convertObjectToSnakeCase', () => { convertObjectToSnakeCase({ keyName: { nestedKey: 2 }, a: [{ nestedInArray: 'black_rice' }], - keyNameWithNumber60d: 3 + keyNameWithNumber60d: 3, + keyValueIsDate: new Date('2024-07-17T01:02:03Z') }) ).toEqual({ key_name: { nested_key: 2 }, a: [{ nested_in_array: 'black_rice' }], - key_name_with_number_60d: 3 + key_name_with_number_60d: 3, + key_value_is_date: '2024-07-17T01:02:03.000Z' }) }) })