@workos-inc/node 3.7.0 → 3.8.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.
Files changed (30) hide show
  1. package/README.md +1 -0
  2. package/lib/common/utils/pagination.js +2 -0
  3. package/lib/events/events.js +2 -1
  4. package/lib/events/interfaces/list-events-options.interface.d.ts +7 -0
  5. package/lib/events/serializers/index.d.ts +1 -0
  6. package/lib/events/serializers/index.js +17 -0
  7. package/lib/events/serializers/list-event-options.serializer.d.ts +2 -0
  8. package/lib/events/serializers/list-event-options.serializer.js +11 -0
  9. package/lib/organization-domains/fixtures/get-organization-domain-pending.json +7 -0
  10. package/lib/organization-domains/fixtures/get-organization-domain-unverified.json +6 -0
  11. package/lib/organization-domains/interfaces/create-organization-domain-options.interface.d.ts +8 -0
  12. package/lib/organization-domains/interfaces/create-organization-domain-options.interface.js +2 -0
  13. package/lib/organization-domains/interfaces/index.d.ts +2 -0
  14. package/lib/organization-domains/interfaces/index.js +18 -0
  15. package/lib/organization-domains/interfaces/organization-domain.interface.d.ts +29 -0
  16. package/lib/organization-domains/interfaces/organization-domain.interface.js +18 -0
  17. package/lib/organization-domains/organization-domains.d.ts +9 -0
  18. package/lib/organization-domains/organization-domains.js +38 -0
  19. package/lib/organization-domains/organization-domains.spec.d.ts +1 -0
  20. package/lib/organization-domains/organization-domains.spec.js +85 -0
  21. package/lib/organization-domains/serializers/create-organization-domain-options.serializer.d.ts +2 -0
  22. package/lib/organization-domains/serializers/create-organization-domain-options.serializer.js +8 -0
  23. package/lib/organization-domains/serializers/organization-domain.serializer.d.ts +2 -0
  24. package/lib/organization-domains/serializers/organization-domain.serializer.js +12 -0
  25. package/lib/portal/interfaces/generate-portal-link-intent.interface.d.ts +1 -0
  26. package/lib/portal/interfaces/generate-portal-link-intent.interface.js +1 -0
  27. package/lib/portal/portal.spec.js +17 -0
  28. package/lib/workos.d.ts +2 -0
  29. package/lib/workos.js +3 -1
  30. package/package.json +1 -1
package/README.md CHANGED
@@ -43,3 +43,4 @@ For our SDKs WorkOS follows a Semantic Versioning ([SemVer](https://semver.org/)
43
43
  - [Directory Sync Guide](https://workos.com/docs/directory-sync/guide)
44
44
  - [Admin Portal Guide](https://workos.com/docs/admin-portal/guide)
45
45
  - [Magic Link Guide](https://workos.com/docs/magic-link/guide)
46
+ - [Domain Verification Guide](https://workos.com/docs/domain-verification/guide)
@@ -52,6 +52,8 @@ class AutoPaginatable {
52
52
  const result = yield __await(this.apiCall(Object.assign(Object.assign({}, this.options), { after: params.after })));
53
53
  yield yield __await(result.data);
54
54
  if (result.listMetadata.after) {
55
+ // Delay of 4rps to respect list users rate limits
56
+ yield __await(new Promise((resolve) => setTimeout(resolve, 250)));
55
57
  yield __await(yield* __asyncDelegator(__asyncValues(this.generatePages({ after: result.listMetadata.after }))));
56
58
  }
57
59
  });
@@ -11,6 +11,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.Events = void 0;
13
13
  const serializers_1 = require("../common/serializers");
14
+ const serializers_2 = require("./serializers");
14
15
  class Events {
15
16
  constructor(workos) {
16
17
  this.workos = workos;
@@ -18,7 +19,7 @@ class Events {
18
19
  listEvents(options) {
19
20
  return __awaiter(this, void 0, void 0, function* () {
20
21
  const { data } = yield this.workos.get(`/events`, {
21
- query: options,
22
+ query: options ? (0, serializers_2.serializeListEventOptions)(options) : undefined,
22
23
  });
23
24
  return (0, serializers_1.deserializeList)(data, serializers_1.deserializeEvent);
24
25
  });
@@ -6,3 +6,10 @@ export interface ListEventOptions {
6
6
  limit?: number;
7
7
  after?: string;
8
8
  }
9
+ export interface SerializedListEventOptions {
10
+ events?: EventName[];
11
+ range_start?: string;
12
+ range_end?: string;
13
+ limit?: number;
14
+ after?: string;
15
+ }
@@ -0,0 +1 @@
1
+ export * from './list-event-options.serializer';
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./list-event-options.serializer"), exports);
@@ -0,0 +1,2 @@
1
+ import { ListEventOptions, SerializedListEventOptions } from '../interfaces';
2
+ export declare const serializeListEventOptions: (options: ListEventOptions) => SerializedListEventOptions;
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.serializeListEventOptions = void 0;
4
+ const serializeListEventOptions = (options) => ({
5
+ events: options.events,
6
+ range_start: options.rangeStart,
7
+ range_end: options.rangeEnd,
8
+ limit: options.limit,
9
+ after: options.after,
10
+ });
11
+ exports.serializeListEventOptions = serializeListEventOptions;
@@ -0,0 +1,7 @@
1
+ {
2
+ "object": "organization_domain",
3
+ "id": "org_domain_01HD50K7EPWCMNPGMKXKKE14XT",
4
+ "domain": "workos.com",
5
+ "state": "pending",
6
+ "verification_token": "F06PGMsZIO0shrveGWuGxgCj7"
7
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "object": "organization_domain",
3
+ "id": "org_domain_01HCZRAP3TPQ0X0DKJHR32TATG",
4
+ "domain": "workos.com",
5
+ "state": "pending"
6
+ }
@@ -0,0 +1,8 @@
1
+ export interface CreateOrganizationDomainOptions {
2
+ domain: string;
3
+ organizationId: string;
4
+ }
5
+ export interface SerializedCreateOrganizationDomainOptions {
6
+ domain: string;
7
+ organization_id: string;
8
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ export * from './create-organization-domain-options.interface';
2
+ export * from './organization-domain.interface';
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./create-organization-domain-options.interface"), exports);
18
+ __exportStar(require("./organization-domain.interface"), exports);
@@ -0,0 +1,29 @@
1
+ export declare enum OrganizationDomainState {
2
+ /**
3
+ * @deprecated
4
+ */
5
+ LegacyVerified = "legacy_verified",
6
+ Verified = "verified",
7
+ Pending = "pending",
8
+ Failed = "failed"
9
+ }
10
+ export declare enum OrganizationDomainVerificationStrategy {
11
+ Dns = "dns",
12
+ Developer = "developer"
13
+ }
14
+ export interface OrganizationDomain {
15
+ object: 'organization_domain';
16
+ id: string;
17
+ domain: string;
18
+ state: OrganizationDomainState;
19
+ verificationToken: string;
20
+ verificationStrategy: OrganizationDomainVerificationStrategy;
21
+ }
22
+ export interface OrganizationDomainResponse {
23
+ object: 'organization_domain';
24
+ id: string;
25
+ domain: string;
26
+ state: OrganizationDomainState;
27
+ verification_token: string;
28
+ verification_strategy: OrganizationDomainVerificationStrategy;
29
+ }
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.OrganizationDomainVerificationStrategy = exports.OrganizationDomainState = void 0;
4
+ var OrganizationDomainState;
5
+ (function (OrganizationDomainState) {
6
+ /**
7
+ * @deprecated
8
+ */
9
+ OrganizationDomainState["LegacyVerified"] = "legacy_verified";
10
+ OrganizationDomainState["Verified"] = "verified";
11
+ OrganizationDomainState["Pending"] = "pending";
12
+ OrganizationDomainState["Failed"] = "failed";
13
+ })(OrganizationDomainState || (exports.OrganizationDomainState = OrganizationDomainState = {}));
14
+ var OrganizationDomainVerificationStrategy;
15
+ (function (OrganizationDomainVerificationStrategy) {
16
+ OrganizationDomainVerificationStrategy["Dns"] = "dns";
17
+ OrganizationDomainVerificationStrategy["Developer"] = "developer";
18
+ })(OrganizationDomainVerificationStrategy || (exports.OrganizationDomainVerificationStrategy = OrganizationDomainVerificationStrategy = {}));
@@ -0,0 +1,9 @@
1
+ import { WorkOS } from '../workos';
2
+ import { CreateOrganizationDomainOptions, OrganizationDomain } from './interfaces';
3
+ export declare class OrganizationDomains {
4
+ private readonly workos;
5
+ constructor(workos: WorkOS);
6
+ get(id: string): Promise<OrganizationDomain>;
7
+ verify(id: string): Promise<OrganizationDomain>;
8
+ create(payload: CreateOrganizationDomainOptions): Promise<OrganizationDomain>;
9
+ }
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.OrganizationDomains = void 0;
13
+ const create_organization_domain_options_serializer_1 = require("./serializers/create-organization-domain-options.serializer");
14
+ const organization_domain_serializer_1 = require("./serializers/organization-domain.serializer");
15
+ class OrganizationDomains {
16
+ constructor(workos) {
17
+ this.workos = workos;
18
+ }
19
+ get(id) {
20
+ return __awaiter(this, void 0, void 0, function* () {
21
+ const { data } = yield this.workos.get(`/organization_domains/${id}`);
22
+ return (0, organization_domain_serializer_1.deserializeOrganizationDomain)(data);
23
+ });
24
+ }
25
+ verify(id) {
26
+ return __awaiter(this, void 0, void 0, function* () {
27
+ const { data } = yield this.workos.post(`/organization_domains/${id}/verify`, {});
28
+ return (0, organization_domain_serializer_1.deserializeOrganizationDomain)(data);
29
+ });
30
+ }
31
+ create(payload) {
32
+ return __awaiter(this, void 0, void 0, function* () {
33
+ const { data } = yield this.workos.post(`/organization_domains`, (0, create_organization_domain_options_serializer_1.serializeCreateOrganizationDomainOptions)(payload));
34
+ return (0, organization_domain_serializer_1.deserializeOrganizationDomain)(data);
35
+ });
36
+ }
37
+ }
38
+ exports.OrganizationDomains = OrganizationDomains;
@@ -0,0 +1,85 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __importDefault = (this && this.__importDefault) || function (mod) {
12
+ return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ };
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ const axios_1 = __importDefault(require("axios"));
16
+ const axios_mock_adapter_1 = __importDefault(require("axios-mock-adapter"));
17
+ const workos_1 = require("../workos");
18
+ const get_organization_domain_pending_json_1 = __importDefault(require("./fixtures/get-organization-domain-pending.json"));
19
+ const get_organization_domain_unverified_json_1 = __importDefault(require("./fixtures/get-organization-domain-unverified.json"));
20
+ const interfaces_1 = require("./interfaces");
21
+ const mock = new axios_mock_adapter_1.default(axios_1.default);
22
+ const workos = new workos_1.WorkOS('sk_test_Sz3IQjepeSWaI4cMS4ms4sMuU');
23
+ describe('OrganizationDomains', () => {
24
+ afterEach(() => mock.resetHistory());
25
+ describe('get', () => {
26
+ it('requests an Organization Domain', () => __awaiter(void 0, void 0, void 0, function* () {
27
+ mock
28
+ .onGet('/organization_domains/org_domain_01HCZRAP3TPQ0X0DKJHR32TATG')
29
+ .replyOnce(200, get_organization_domain_unverified_json_1.default);
30
+ const subject = yield workos.organizationDomains.get('org_domain_01HCZRAP3TPQ0X0DKJHR32TATG');
31
+ expect(mock.history.get[0].url).toEqual('/organization_domains/org_domain_01HCZRAP3TPQ0X0DKJHR32TATG');
32
+ expect(subject.id).toEqual('org_domain_01HCZRAP3TPQ0X0DKJHR32TATG');
33
+ expect(subject.domain).toEqual('workos.com');
34
+ expect(subject.state).toEqual(interfaces_1.OrganizationDomainState.Pending);
35
+ expect(subject.verificationToken).toBeUndefined();
36
+ }));
37
+ it('requests an Organization Domain', () => __awaiter(void 0, void 0, void 0, function* () {
38
+ mock
39
+ .onGet('/organization_domains/org_domain_01HD50K7EPWCMNPGMKXKKE14XT')
40
+ .replyOnce(200, get_organization_domain_pending_json_1.default);
41
+ const subject = yield workos.organizationDomains.get('org_domain_01HD50K7EPWCMNPGMKXKKE14XT');
42
+ expect(mock.history.get[0].url).toEqual('/organization_domains/org_domain_01HD50K7EPWCMNPGMKXKKE14XT');
43
+ expect(subject.id).toEqual('org_domain_01HD50K7EPWCMNPGMKXKKE14XT');
44
+ expect(subject.domain).toEqual('workos.com');
45
+ expect(subject.state).toEqual(interfaces_1.OrganizationDomainState.Pending);
46
+ expect(subject.verificationToken).toEqual('F06PGMsZIO0shrveGWuGxgCj7');
47
+ }));
48
+ });
49
+ describe('verify', () => {
50
+ it('start Organization Domain verification flow', () => __awaiter(void 0, void 0, void 0, function* () {
51
+ mock
52
+ .onPost('/organization_domains/org_domain_01HD50K7EPWCMNPGMKXKKE14XT/verify')
53
+ .replyOnce(200, get_organization_domain_pending_json_1.default);
54
+ const subject = yield workos.organizationDomains.verify('org_domain_01HD50K7EPWCMNPGMKXKKE14XT');
55
+ expect(mock.history.post[0].url).toEqual('/organization_domains/org_domain_01HD50K7EPWCMNPGMKXKKE14XT/verify');
56
+ expect(subject.id).toEqual('org_domain_01HD50K7EPWCMNPGMKXKKE14XT');
57
+ expect(subject.domain).toEqual('workos.com');
58
+ expect(subject.state).toEqual(interfaces_1.OrganizationDomainState.Pending);
59
+ expect(subject.verificationToken).toEqual('F06PGMsZIO0shrveGWuGxgCj7');
60
+ }));
61
+ });
62
+ describe('create', () => {
63
+ it('creates an Organization Domain', () => __awaiter(void 0, void 0, void 0, function* () {
64
+ mock
65
+ .onPost('/organization_domains', {
66
+ domain: 'workos.com',
67
+ organization_id: 'org_01EHT88Z8J8795GZNQ4ZP1J81T',
68
+ })
69
+ .replyOnce(200, get_organization_domain_pending_json_1.default);
70
+ const subject = yield workos.organizationDomains.create({
71
+ organizationId: 'org_01EHT88Z8J8795GZNQ4ZP1J81T',
72
+ domain: 'workos.com',
73
+ });
74
+ expect(mock.history.post[0].url).toEqual('/organization_domains');
75
+ expect(JSON.parse(mock.history.post[0].data)).toMatchObject({
76
+ domain: 'workos.com',
77
+ organization_id: 'org_01EHT88Z8J8795GZNQ4ZP1J81T',
78
+ });
79
+ expect(subject.id).toEqual('org_domain_01HD50K7EPWCMNPGMKXKKE14XT');
80
+ expect(subject.domain).toEqual('workos.com');
81
+ expect(subject.state).toEqual(interfaces_1.OrganizationDomainState.Pending);
82
+ expect(subject.verificationToken).toEqual('F06PGMsZIO0shrveGWuGxgCj7');
83
+ }));
84
+ });
85
+ });
@@ -0,0 +1,2 @@
1
+ import { CreateOrganizationDomainOptions, SerializedCreateOrganizationDomainOptions } from '../interfaces';
2
+ export declare const serializeCreateOrganizationDomainOptions: (options: CreateOrganizationDomainOptions) => SerializedCreateOrganizationDomainOptions;
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.serializeCreateOrganizationDomainOptions = void 0;
4
+ const serializeCreateOrganizationDomainOptions = (options) => ({
5
+ domain: options.domain,
6
+ organization_id: options.organizationId,
7
+ });
8
+ exports.serializeCreateOrganizationDomainOptions = serializeCreateOrganizationDomainOptions;
@@ -0,0 +1,2 @@
1
+ import { OrganizationDomain, OrganizationDomainResponse } from '../interfaces';
2
+ export declare const deserializeOrganizationDomain: (organizationDomain: OrganizationDomainResponse) => OrganizationDomain;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.deserializeOrganizationDomain = void 0;
4
+ const deserializeOrganizationDomain = (organizationDomain) => ({
5
+ object: organizationDomain.object,
6
+ id: organizationDomain.id,
7
+ domain: organizationDomain.domain,
8
+ state: organizationDomain.state,
9
+ verificationToken: organizationDomain.verification_token,
10
+ verificationStrategy: organizationDomain.verification_strategy,
11
+ });
12
+ exports.deserializeOrganizationDomain = deserializeOrganizationDomain;
@@ -1,5 +1,6 @@
1
1
  export declare enum GeneratePortalLinkIntent {
2
2
  AuditLogs = "audit_logs",
3
+ DomainVerification = "domain_verification",
3
4
  DSync = "dsync",
4
5
  LogStreams = "log_streams",
5
6
  SSO = "sso"
@@ -4,6 +4,7 @@ exports.GeneratePortalLinkIntent = void 0;
4
4
  var GeneratePortalLinkIntent;
5
5
  (function (GeneratePortalLinkIntent) {
6
6
  GeneratePortalLinkIntent["AuditLogs"] = "audit_logs";
7
+ GeneratePortalLinkIntent["DomainVerification"] = "domain_verification";
7
8
  GeneratePortalLinkIntent["DSync"] = "dsync";
8
9
  GeneratePortalLinkIntent["LogStreams"] = "log_streams";
9
10
  GeneratePortalLinkIntent["SSO"] = "sso";
@@ -41,6 +41,23 @@ describe('Portal', () => {
41
41
  expect(link).toEqual('https://id.workos.com/portal/launch?secret=secret');
42
42
  }));
43
43
  });
44
+ describe('with the domain_verification intent', () => {
45
+ it('returns an Admin Portal link', () => __awaiter(void 0, void 0, void 0, function* () {
46
+ mock
47
+ .onPost('/portal/generate_link', {
48
+ intent: generate_portal_link_intent_interface_1.GeneratePortalLinkIntent.DomainVerification,
49
+ organization: 'org_01EHQMYV6MBK39QC5PZXHY59C3',
50
+ return_url: 'https://www.example.com',
51
+ })
52
+ .replyOnce(201, generate_link_json_1.default);
53
+ const { link } = yield workos.portal.generateLink({
54
+ intent: generate_portal_link_intent_interface_1.GeneratePortalLinkIntent.DomainVerification,
55
+ organization: 'org_01EHQMYV6MBK39QC5PZXHY59C3',
56
+ returnUrl: 'https://www.example.com',
57
+ });
58
+ expect(link).toEqual('https://id.workos.com/portal/launch?secret=secret');
59
+ }));
60
+ });
44
61
  describe('with the dsync intent', () => {
45
62
  it('returns an Admin Portal link', () => __awaiter(void 0, void 0, void 0, function* () {
46
63
  mock
package/lib/workos.d.ts CHANGED
@@ -4,6 +4,7 @@ import { GetOptions, PostOptions, PutOptions, WorkOSOptions } from './common/int
4
4
  import { DirectorySync } from './directory-sync/directory-sync';
5
5
  import { Events } from './events/events';
6
6
  import { Organizations } from './organizations/organizations';
7
+ import { OrganizationDomains } from './organization-domains/organization-domains';
7
8
  import { Passwordless } from './passwordless/passwordless';
8
9
  import { Portal } from './portal/portal';
9
10
  import { SSO } from './sso/sso';
@@ -20,6 +21,7 @@ export declare class WorkOS {
20
21
  readonly auditTrail: AuditTrail;
21
22
  readonly directorySync: DirectorySync;
22
23
  readonly organizations: Organizations;
24
+ readonly organizationDomains: OrganizationDomains;
23
25
  readonly passwordless: Passwordless;
24
26
  readonly portal: Portal;
25
27
  readonly sso: SSO;
package/lib/workos.js CHANGED
@@ -19,6 +19,7 @@ const exceptions_1 = require("./common/exceptions");
19
19
  const directory_sync_1 = require("./directory-sync/directory-sync");
20
20
  const events_1 = require("./events/events");
21
21
  const organizations_1 = require("./organizations/organizations");
22
+ const organization_domains_1 = require("./organization-domains/organization-domains");
22
23
  const passwordless_1 = require("./passwordless/passwordless");
23
24
  const portal_1 = require("./portal/portal");
24
25
  const sso_1 = require("./sso/sso");
@@ -27,7 +28,7 @@ const mfa_1 = require("./mfa/mfa");
27
28
  const audit_logs_1 = require("./audit-logs/audit-logs");
28
29
  const users_1 = require("./users/users");
29
30
  const bad_request_exception_1 = require("./common/exceptions/bad-request.exception");
30
- const VERSION = '3.7.0';
31
+ const VERSION = '3.8.0';
31
32
  const DEFAULT_HOSTNAME = 'api.workos.com';
32
33
  class WorkOS {
33
34
  constructor(key, options = {}) {
@@ -38,6 +39,7 @@ class WorkOS {
38
39
  this.auditTrail = new audit_trail_1.AuditTrail(this);
39
40
  this.directorySync = new directory_sync_1.DirectorySync(this);
40
41
  this.organizations = new organizations_1.Organizations(this);
42
+ this.organizationDomains = new organization_domains_1.OrganizationDomains(this);
41
43
  this.passwordless = new passwordless_1.Passwordless(this);
42
44
  this.portal = new portal_1.Portal(this);
43
45
  this.sso = new sso_1.SSO(this);
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "3.7.0",
2
+ "version": "3.8.0",
3
3
  "name": "@workos-inc/node",
4
4
  "author": "WorkOS",
5
5
  "description": "A Node wrapper for the WorkOS API",