@workos-inc/node 7.43.1 → 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.
- package/lib/directory-sync/directory-sync.spec.js +4 -0
- package/lib/directory-sync/interfaces/directory-user.interface.d.ts +26 -0
- package/lib/directory-sync/serializers/directory-user.serializer.js +2 -0
- package/lib/directory-sync/utils/get-primary-email.spec.js +1 -0
- package/lib/events/events.spec.js +2 -0
- package/lib/workos.js +1 -1
- package/package.json +2 -2
|
@@ -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,
|
|
@@ -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,
|
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.
|
|
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';
|