@workos-inc/node 7.43.0 → 7.44.0

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.
@@ -74,6 +74,7 @@ describe('DirectorySync', () => {
74
74
  },
75
75
  directoryId: 'dir_123',
76
76
  organizationId: 'org_123',
77
+ email: 'jonsnow@workos.com',
77
78
  emails: [
78
79
  {
79
80
  primary: true,
@@ -100,6 +101,7 @@ describe('DirectorySync', () => {
100
101
  },
101
102
  directory_id: 'dir_123',
102
103
  organization_id: 'org_123',
104
+ email: 'jonsnow@workos.com',
103
105
  emails: [
104
106
  {
105
107
  primary: true,
@@ -126,6 +128,7 @@ describe('DirectorySync', () => {
126
128
  },
127
129
  directoryId: 'dir_123',
128
130
  organizationId: 'org_123',
131
+ email: 'jonsnow@workos.com',
129
132
  emails: [
130
133
  {
131
134
  primary: true,
@@ -153,6 +156,7 @@ describe('DirectorySync', () => {
153
156
  },
154
157
  directory_id: 'dir_123',
155
158
  organization_id: 'org_123',
159
+ email: 'jonsnow@workos.com',
156
160
  emails: [
157
161
  {
158
162
  primary: true,
@@ -10,13 +10,26 @@ export interface DirectoryUser<TCustomAttributes extends object = DefaultCustomA
10
10
  customAttributes: TCustomAttributes;
11
11
  idpId: string;
12
12
  firstName: string | null;
13
+ email: string | null;
14
+ /** @deprecated Will be removed in a future major version.
15
+ * Enable the `emails` custom attribute in dashboard and pull from customAttributes instead.
16
+ * See https://workos.com/docs/directory-sync/attributes/custom-attributes/auto-mapped-attributes for details.
17
+ */
13
18
  emails: {
14
19
  type?: string;
15
20
  value?: string;
16
21
  primary?: boolean;
17
22
  }[];
23
+ /** @deprecated Will be removed in a future major version.
24
+ * Enable the `username` custom attribute in dashboard and pull from customAttributes instead.
25
+ * See https://workos.com/docs/directory-sync/attributes/custom-attributes/auto-mapped-attributes for details.
26
+ */
18
27
  username: string | null;
19
28
  lastName: string | null;
29
+ /** @deprecated Will be removed in a future major version.
30
+ * Enable the `job_title` custom attribute in dashboard and pull from customAttributes instead.
31
+ * See https://workos.com/docs/directory-sync/attributes/custom-attributes/auto-mapped-attributes for details.
32
+ */
20
33
  jobTitle: string | null;
21
34
  state: 'active' | 'inactive';
22
35
  role?: RoleResponse;
@@ -32,13 +45,26 @@ export interface DirectoryUserResponse<TCustomAttributes extends object = Defaul
32
45
  custom_attributes: TCustomAttributes;
33
46
  idp_id: string;
34
47
  first_name: string | null;
48
+ email: string | null;
49
+ /** @deprecated Will be removed in a future major version.
50
+ * Enable the `emails` custom attribute in dashboard and pull from customAttributes instead.
51
+ * See https://workos.com/docs/directory-sync/attributes/custom-attributes/auto-mapped-attributes for details.
52
+ */
35
53
  emails: {
36
54
  type?: string;
37
55
  value?: string;
38
56
  primary?: boolean;
39
57
  }[];
58
+ /** @deprecated Will be removed in a future major version.
59
+ * Enable the `username` custom attribute in dashboard and pull from customAttributes instead.
60
+ * See https://workos.com/docs/directory-sync/attributes/custom-attributes/auto-mapped-attributes for details.
61
+ */
40
62
  username: string | null;
41
63
  last_name: string | null;
64
+ /** @deprecated Will be removed in a future major version.
65
+ * Enable the `job_title` custom attribute in dashboard and pull from customAttributes instead.
66
+ * See https://workos.com/docs/directory-sync/attributes/custom-attributes/auto-mapped-attributes for details.
67
+ */
42
68
  job_title: string | null;
43
69
  state: 'active' | 'inactive';
44
70
  role?: RoleResponse;
@@ -11,6 +11,7 @@ const deserializeDirectoryUser = (directoryUser) => ({
11
11
  customAttributes: directoryUser.custom_attributes,
12
12
  idpId: directoryUser.idp_id,
13
13
  firstName: directoryUser.first_name,
14
+ email: directoryUser.email,
14
15
  emails: directoryUser.emails,
15
16
  username: directoryUser.username,
16
17
  lastName: directoryUser.last_name,
@@ -32,6 +33,7 @@ const deserializeUpdatedEventDirectoryUser = (directoryUser) => ({
32
33
  customAttributes: directoryUser.custom_attributes,
33
34
  idpId: directoryUser.idp_id,
34
35
  firstName: directoryUser.first_name,
36
+ email: directoryUser.email,
35
37
  emails: directoryUser.emails,
36
38
  username: directoryUser.username,
37
39
  lastName: directoryUser.last_name,
@@ -10,6 +10,7 @@ describe('getPrimaryEmail', () => {
10
10
  },
11
11
  directoryId: 'dir_123',
12
12
  organizationId: 'org_123',
13
+ email: 'jonsnow@workos.com',
13
14
  emails: [
14
15
  {
15
16
  primary: true,
@@ -120,6 +120,7 @@ describe('Event', () => {
120
120
  },
121
121
  directoryId: 'dir_123',
122
122
  organizationId: 'org_123',
123
+ email: 'jonsnow@workos.com',
123
124
  emails: [
124
125
  {
125
126
  primary: true,
@@ -154,6 +155,7 @@ describe('Event', () => {
154
155
  },
155
156
  directory_id: 'dir_123',
156
157
  organization_id: 'org_123',
158
+ email: 'jonsnow@workos.com',
157
159
  emails: [
158
160
  {
159
161
  primary: true,
@@ -2,12 +2,12 @@ export type WidgetScope = 'widgets:users-table:manage';
2
2
  export interface GetTokenOptions {
3
3
  organizationId: string;
4
4
  userId: string;
5
- scopes: [WidgetScope];
5
+ scopes?: [WidgetScope];
6
6
  }
7
7
  export interface SerializedGetTokenOptions {
8
8
  organization_id: string;
9
9
  user_id: string;
10
- scopes: [WidgetScope];
10
+ scopes?: [WidgetScope];
11
11
  }
12
12
  export declare const serializeGetTokenOptions: (options: GetTokenOptions) => SerializedGetTokenOptions;
13
13
  export interface GetTokenResponse {
package/lib/workos.js CHANGED
@@ -31,7 +31,7 @@ const widgets_1 = require("./widgets/widgets");
31
31
  const actions_1 = require("./actions/actions");
32
32
  const vault_1 = require("./vault/vault");
33
33
  const conflict_exception_1 = require("./common/exceptions/conflict.exception");
34
- const VERSION = '7.43.0';
34
+ const VERSION = '7.44.0';
35
35
  const DEFAULT_HOSTNAME = 'api.workos.com';
36
36
  const HEADER_AUTHORIZATION = 'Authorization';
37
37
  const HEADER_IDEMPOTENCY_KEY = 'Idempotency-Key';
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "7.43.0",
2
+ "version": "7.44.0",
3
3
  "name": "@workos-inc/node",
4
4
  "author": "WorkOS",
5
5
  "description": "A Node wrapper for the WorkOS API",
@@ -73,4 +73,4 @@
73
73
  "default": "./lib/index.js"
74
74
  }
75
75
  }
76
- }
76
+ }