@workos-inc/node 7.36.1 → 7.36.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/actions/actions.spec.js +2 -0
- package/lib/actions/fixtures/authentication-action-context.json +1 -0
- package/lib/actions/fixtures/user-registration-action-context.json +1 -0
- package/lib/actions/interfaces/action.interface.d.ts +4 -0
- package/lib/actions/serializers/action.serializer.js +2 -0
- package/lib/workos.js +1 -1
- package/package.json +1 -1
|
@@ -106,6 +106,7 @@ describe('Actions', () => {
|
|
|
106
106
|
},
|
|
107
107
|
ipAddress: '50.141.123.10',
|
|
108
108
|
userAgent: 'Mozilla/5.0',
|
|
109
|
+
deviceFingerprint: 'notafingerprint',
|
|
109
110
|
issuer: 'test',
|
|
110
111
|
object: 'authentication_action_context',
|
|
111
112
|
organization: {
|
|
@@ -150,6 +151,7 @@ describe('Actions', () => {
|
|
|
150
151
|
},
|
|
151
152
|
ipAddress: '50.141.123.10',
|
|
152
153
|
userAgent: 'Mozilla/5.0',
|
|
154
|
+
deviceFingerprint: 'notafingerprint',
|
|
153
155
|
invitation: expect.objectContaining({
|
|
154
156
|
object: 'invitation',
|
|
155
157
|
id: '01JBVZWH8HJ855YZ5BWHG1WNZN',
|
|
@@ -8,6 +8,7 @@ interface AuthenticationActionContext {
|
|
|
8
8
|
organizationMembership?: OrganizationMembership;
|
|
9
9
|
ipAddress?: string;
|
|
10
10
|
userAgent?: string;
|
|
11
|
+
deviceFingerprint?: string;
|
|
11
12
|
issuer?: string;
|
|
12
13
|
}
|
|
13
14
|
export interface UserData {
|
|
@@ -23,6 +24,7 @@ interface UserRegistrationActionContext {
|
|
|
23
24
|
invitation?: Invitation;
|
|
24
25
|
ipAddress?: string;
|
|
25
26
|
userAgent?: string;
|
|
27
|
+
deviceFingerprint?: string;
|
|
26
28
|
}
|
|
27
29
|
export type ActionContext = AuthenticationActionContext | UserRegistrationActionContext;
|
|
28
30
|
interface AuthenticationActionPayload {
|
|
@@ -33,6 +35,7 @@ interface AuthenticationActionPayload {
|
|
|
33
35
|
organization_membership?: OrganizationMembershipResponse;
|
|
34
36
|
ip_address?: string;
|
|
35
37
|
user_agent?: string;
|
|
38
|
+
device_fingerprint?: string;
|
|
36
39
|
issuer?: string;
|
|
37
40
|
}
|
|
38
41
|
export interface UserDataPayload {
|
|
@@ -48,6 +51,7 @@ export interface UserRegistrationActionPayload {
|
|
|
48
51
|
invitation?: InvitationResponse;
|
|
49
52
|
ip_address?: string;
|
|
50
53
|
user_agent?: string;
|
|
54
|
+
device_fingerprint?: string;
|
|
51
55
|
}
|
|
52
56
|
export type ActionPayload = AuthenticationActionPayload | UserRegistrationActionPayload;
|
|
53
57
|
export {};
|
|
@@ -24,6 +24,7 @@ const deserializeAction = (actionPayload) => {
|
|
|
24
24
|
: undefined,
|
|
25
25
|
ipAddress: actionPayload.ip_address,
|
|
26
26
|
userAgent: actionPayload.user_agent,
|
|
27
|
+
deviceFingerprint: actionPayload.device_fingerprint,
|
|
27
28
|
};
|
|
28
29
|
case 'authentication_action_context':
|
|
29
30
|
return {
|
|
@@ -38,6 +39,7 @@ const deserializeAction = (actionPayload) => {
|
|
|
38
39
|
: undefined,
|
|
39
40
|
ipAddress: actionPayload.ip_address,
|
|
40
41
|
userAgent: actionPayload.user_agent,
|
|
42
|
+
deviceFingerprint: actionPayload.device_fingerprint,
|
|
41
43
|
issuer: actionPayload.issuer,
|
|
42
44
|
};
|
|
43
45
|
}
|
package/lib/workos.js
CHANGED
|
@@ -29,7 +29,7 @@ const subtle_crypto_provider_1 = require("./common/crypto/subtle-crypto-provider
|
|
|
29
29
|
const fetch_client_1 = require("./common/net/fetch-client");
|
|
30
30
|
const widgets_1 = require("./widgets/widgets");
|
|
31
31
|
const actions_1 = require("./actions/actions");
|
|
32
|
-
const VERSION = '7.36.
|
|
32
|
+
const VERSION = '7.36.3';
|
|
33
33
|
const DEFAULT_HOSTNAME = 'api.workos.com';
|
|
34
34
|
const HEADER_AUTHORIZATION = 'Authorization';
|
|
35
35
|
const HEADER_IDEMPOTENCY_KEY = 'Idempotency-Key';
|
package/package.json
CHANGED