From 38e803eb199244e9a156b0e3914499b4528fc9a1 Mon Sep 17 00:00:00 2001 From: Thiago Figueredo Cardoso Date: Wed, 24 Jul 2024 10:37:50 -0300 Subject: [PATCH] feat: add missing fields to registerFeedback (#83) Adds sessionToken, requestToken and expiresAt. --- package.json | 2 +- src/types.ts | 3 +++ src/version.ts | 2 +- test/incogniaApi.test.ts | 8 +++++++- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index b25778f..0109348 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/types.ts b/src/types.ts index 47033df..207e106 100644 --- a/src/types.ts +++ b/src/types.ts @@ -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 } diff --git a/src/version.ts b/src/version.ts index aa8cf9b..adac1e9 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1,2 +1,2 @@ // Generated by genversion. -export const version = '5.0.0' +export const version = '5.1.0' diff --git a/test/incogniaApi.test.ts b/test/incogniaApi.test.ts index e8c31e3..968b85a 100644 --- a/test/incogniaApi.test.ts +++ b/test/incogniaApi.test.ts @@ -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 @@ -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 = {