@workos-inc/node 5.1.3 → 5.2.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.
@@ -6,5 +6,6 @@
6
6
  "last_name": "User",
7
7
  "created_at": "2023-07-18T02:07:19.911Z",
8
8
  "updated_at": "2023-07-18T02:07:19.911Z",
9
- "email_verified": true
9
+ "email_verified": true,
10
+ "profile_picture_url": "https://example.com/profile_picture.jpg"
10
11
  }
@@ -3,6 +3,7 @@ export interface User {
3
3
  id: string;
4
4
  email: string;
5
5
  emailVerified: boolean;
6
+ profilePictureUrl: string | null;
6
7
  firstName: string | null;
7
8
  lastName: string | null;
8
9
  createdAt: string;
@@ -13,6 +14,7 @@ export interface UserResponse {
13
14
  id: string;
14
15
  email: string;
15
16
  email_verified: boolean;
17
+ profile_picture_url: string | null;
16
18
  first_name: string | null;
17
19
  last_name: string | null;
18
20
  created_at: string;
@@ -7,6 +7,7 @@ const deserializeUser = (user) => ({
7
7
  email: user.email,
8
8
  emailVerified: user.email_verified,
9
9
  firstName: user.first_name,
10
+ profilePictureUrl: user.profile_picture_url,
10
11
  lastName: user.last_name,
11
12
  createdAt: user.created_at,
12
13
  updatedAt: user.updated_at,
@@ -47,7 +47,7 @@ class UserManagement {
47
47
  }
48
48
  listUsers(options) {
49
49
  return __awaiter(this, void 0, void 0, function* () {
50
- return new pagination_1.AutoPaginatable(yield (0, fetch_and_deserialize_1.fetchAndDeserialize)(this.workos, '/user_management/users', serializers_1.deserializeUser, options ? (0, list_users_options_serializer_1.serializeListUsersOptions)(options) : undefined), (params) => (0, fetch_and_deserialize_1.fetchAndDeserialize)(this.workos, '/user_management/users', serializers_1.deserializeUser, params), options);
50
+ return new pagination_1.AutoPaginatable(yield (0, fetch_and_deserialize_1.fetchAndDeserialize)(this.workos, '/user_management/users', serializers_1.deserializeUser, options ? (0, list_users_options_serializer_1.serializeListUsersOptions)(options) : undefined), (params) => (0, fetch_and_deserialize_1.fetchAndDeserialize)(this.workos, '/user_management/users', serializers_1.deserializeUser, params), options ? (0, list_users_options_serializer_1.serializeListUsersOptions)(options) : undefined);
51
51
  });
52
52
  }
53
53
  createUser(payload) {
@@ -157,7 +157,9 @@ class UserManagement {
157
157
  return __awaiter(this, void 0, void 0, function* () {
158
158
  return new pagination_1.AutoPaginatable(yield (0, fetch_and_deserialize_1.fetchAndDeserialize)(this.workos, '/user_management/organization_memberships', organization_membership_serializer_1.deserializeOrganizationMembership, options
159
159
  ? (0, list_organization_memberships_options_serializer_1.serializeListOrganizationMembershipsOptions)(options)
160
- : undefined), (params) => (0, fetch_and_deserialize_1.fetchAndDeserialize)(this.workos, '/user_management/organization_memberships', organization_membership_serializer_1.deserializeOrganizationMembership, params), options);
160
+ : undefined), (params) => (0, fetch_and_deserialize_1.fetchAndDeserialize)(this.workos, '/user_management/organization_memberships', organization_membership_serializer_1.deserializeOrganizationMembership, params), options
161
+ ? (0, list_organization_memberships_options_serializer_1.serializeListOrganizationMembershipsOptions)(options)
162
+ : undefined);
161
163
  });
162
164
  }
163
165
  createOrganizationMembership(options) {
@@ -179,7 +181,7 @@ class UserManagement {
179
181
  }
180
182
  listInvitations(options) {
181
183
  return __awaiter(this, void 0, void 0, function* () {
182
- return new pagination_1.AutoPaginatable(yield (0, fetch_and_deserialize_1.fetchAndDeserialize)(this.workos, '/user_management/invitations', invitation_serializer_1.deserializeInvitation, options ? (0, list_invitations_options_serializer_1.serializeListInvitationsOptions)(options) : undefined), (params) => (0, fetch_and_deserialize_1.fetchAndDeserialize)(this.workos, '/user_management/invitations', invitation_serializer_1.deserializeInvitation, params), options);
184
+ return new pagination_1.AutoPaginatable(yield (0, fetch_and_deserialize_1.fetchAndDeserialize)(this.workos, '/user_management/invitations', invitation_serializer_1.deserializeInvitation, options ? (0, list_invitations_options_serializer_1.serializeListInvitationsOptions)(options) : undefined), (params) => (0, fetch_and_deserialize_1.fetchAndDeserialize)(this.workos, '/user_management/invitations', invitation_serializer_1.deserializeInvitation, params), options ? (0, list_invitations_options_serializer_1.serializeListInvitationsOptions)(options) : undefined);
183
185
  });
184
186
  }
185
187
  sendInvitation(payload) {
@@ -38,6 +38,7 @@ describe('UserManagement', () => {
38
38
  object: 'user',
39
39
  id: 'user_01H5JQDV7R7ATEYZDEG0W5PRYS',
40
40
  email: 'test01@example.com',
41
+ profilePictureUrl: 'https://example.com/profile_picture.jpg',
41
42
  firstName: 'Test 01',
42
43
  lastName: 'User',
43
44
  emailVerified: true,
@@ -97,6 +98,7 @@ describe('UserManagement', () => {
97
98
  firstName: 'Test 01',
98
99
  lastName: 'User',
99
100
  emailVerified: true,
101
+ profilePictureUrl: 'https://example.com/profile_picture.jpg',
100
102
  createdAt: '2023-07-18T02:07:19.911Z',
101
103
  updatedAt: '2023-07-18T02:07:19.911Z',
102
104
  });
@@ -331,6 +333,7 @@ describe('UserManagement', () => {
331
333
  });
332
334
  expect(resp).toMatchObject({
333
335
  email: 'test01@example.com',
336
+ profilePictureUrl: 'https://example.com/profile_picture.jpg',
334
337
  });
335
338
  }));
336
339
  describe('when only one property is provided', () => {
@@ -346,6 +349,7 @@ describe('UserManagement', () => {
346
349
  });
347
350
  expect(resp).toMatchObject({
348
351
  email: 'test01@example.com',
352
+ profilePictureUrl: 'https://example.com/profile_picture.jpg',
349
353
  });
350
354
  }));
351
355
  });
package/lib/workos.js CHANGED
@@ -27,7 +27,7 @@ const mfa_1 = require("./mfa/mfa");
27
27
  const audit_logs_1 = require("./audit-logs/audit-logs");
28
28
  const user_management_1 = require("./user-management/user-management");
29
29
  const bad_request_exception_1 = require("./common/exceptions/bad-request.exception");
30
- const VERSION = '5.1.3';
30
+ const VERSION = '5.2.0';
31
31
  const DEFAULT_HOSTNAME = 'api.workos.com';
32
32
  class WorkOS {
33
33
  constructor(key, options = {}) {
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "5.1.3",
2
+ "version": "5.2.0",
3
3
  "name": "@workos-inc/node",
4
4
  "author": "WorkOS",
5
5
  "description": "A Node wrapper for the WorkOS API",