Skip to content

Commit

Permalink
feat: add missing fields to registerFeedback (#83)
Browse files Browse the repository at this point in the history
Adds sessionToken, requestToken and expiresAt.
  • Loading branch information
figueredo authored Jul 24, 2024
1 parent 788eb42 commit 38e803e
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@incognia/api",
"author": "Incognia (https://incognia.com)",
"repository": "https://github.com/inloco/incognia-node",
"version": "5.0.0",
"version": "5.1.0",
"license": "MIT",
"type": "module",
"main": "dist/index.cjs",
Expand Down
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
2 changes: 1 addition & 1 deletion src/version.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
// Generated by genversion.
export const version = '5.0.0'
export const version = '5.1.0'
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 38e803e

Please sign in to comment.