Skip to content

Commit

Permalink
feat: add missing fields to registerFeedback
Browse files Browse the repository at this point in the history
Adds sessionToken, requestToken and expiresAt.
  • Loading branch information
figueredo committed Jul 19, 2024
1 parent b65739e commit 23343f8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,12 +103,15 @@ export type RegisterFeedbackBodyProps = {
event: string
accountId?: string
installationId?: string
sessionToken?: string
requestToken?: string
loginId?: string
paymentId?: string
signupId?: string
/** @deprecated use occurredAt instead */
timestamp?: number
occurredAt?: Date
expiresAt?: Date
[x: string]: any
}

Expand Down
8 changes: 7 additions & 1 deletion test/incogniaApi.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -259,11 +259,14 @@ describe('API', () => {
event: FeedbackEvent.AccountTakeover,
accountId: 'account_id',
installationId: 'installation_id',
sessionToken: 'session_token',
requestToken: 'request_token',
loginId: 'login_id',
paymentId: 'payment_id',
signupId: 'signup_id',
timestamp: 123,
occurredAt: new Date("Jul 19 2024 01:02:03 UTC"),
expiresAt: new Date("Jul 30 2024 01:02:03 UTC"),
},
{
dryRun: true
Expand All @@ -274,11 +277,14 @@ describe('API', () => {
event: FeedbackEvent.AccountTakeover,
account_id: 'account_id',
installation_id: 'installation_id',
session_token: 'session_token',
request_token: 'request_token',
login_id: 'login_id',
payment_id: 'payment_id',
signup_id: 'signup_id',
timestamp: 123,
occurred_at: '2024-07-19T01:02:03.000Z'
occurred_at: '2024-07-19T01:02:03.000Z',
expires_at: '2024-07-30T01:02:03.000Z'
}

const expectedParams = {
Expand Down

0 comments on commit 23343f8

Please sign in to comment.