@workos-inc/node 2.15.1 → 2.16.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.
@@ -1,5 +1,6 @@
1
1
  export declare enum GeneratePortalLinkIntent {
2
2
  AuditLogs = "audit_logs",
3
3
  DSync = "dsync",
4
+ LogStreams = "log_streams",
4
5
  SSO = "sso"
5
6
  }
@@ -5,5 +5,6 @@ var GeneratePortalLinkIntent;
5
5
  (function (GeneratePortalLinkIntent) {
6
6
  GeneratePortalLinkIntent["AuditLogs"] = "audit_logs";
7
7
  GeneratePortalLinkIntent["DSync"] = "dsync";
8
+ GeneratePortalLinkIntent["LogStreams"] = "log_streams";
8
9
  GeneratePortalLinkIntent["SSO"] = "sso";
9
10
  })(GeneratePortalLinkIntent = exports.GeneratePortalLinkIntent || (exports.GeneratePortalLinkIntent = {}));
@@ -75,6 +75,23 @@ describe('Portal', () => {
75
75
  expect(link).toEqual('https://id.workos.com/portal/launch?secret=secret');
76
76
  }));
77
77
  });
78
+ describe('with the `log_streams` intent', () => {
79
+ it('returns an Admin Portal link', () => __awaiter(void 0, void 0, void 0, function* () {
80
+ mock
81
+ .onPost('/portal/generate_link', {
82
+ intent: generate_portal_link_intent_interface_1.GeneratePortalLinkIntent.LogStreams,
83
+ organization: 'org_01EHQMYV6MBK39QC5PZXHY59C3',
84
+ return_url: 'https://www.example.com',
85
+ })
86
+ .reply(201, generate_link_json_1.default);
87
+ const { link } = yield workos.portal.generateLink({
88
+ intent: generate_portal_link_intent_interface_1.GeneratePortalLinkIntent.LogStreams,
89
+ organization: 'org_01EHQMYV6MBK39QC5PZXHY59C3',
90
+ returnUrl: 'https://www.example.com',
91
+ });
92
+ expect(link).toEqual('https://id.workos.com/portal/launch?secret=secret');
93
+ }));
94
+ });
78
95
  });
79
96
  describe('with an invalid organization', () => {
80
97
  it('throws an error', () => __awaiter(void 0, void 0, void 0, function* () {
package/lib/workos.js CHANGED
@@ -25,7 +25,7 @@ const webhooks_1 = require("./webhooks/webhooks");
25
25
  const mfa_1 = require("./mfa/mfa");
26
26
  const audit_logs_1 = require("./audit-logs/audit-logs");
27
27
  const bad_request_exception_1 = require("./common/exceptions/bad-request.exception");
28
- const VERSION = '2.15.1';
28
+ const VERSION = '2.16.0';
29
29
  const DEFAULT_HOSTNAME = 'api.workos.com';
30
30
  class WorkOS {
31
31
  constructor(key, options = {}) {
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "2.15.1",
2
+ "version": "2.16.0",
3
3
  "name": "@workos-inc/node",
4
4
  "author": "WorkOS",
5
5
  "description": "A Node wrapper for the WorkOS API",
@@ -36,18 +36,18 @@
36
36
  "dependencies": {
37
37
  "axios": "0.21.4",
38
38
  "pluralize": "8.0.0",
39
- "query-string": "7.1.1"
39
+ "query-string": "7.1.3"
40
40
  },
41
41
  "devDependencies": {
42
42
  "@types/jest": "27.5.2",
43
- "@types/node": "14.18.33",
43
+ "@types/node": "14.18.34",
44
44
  "@types/pluralize": "0.0.29",
45
45
  "axios-mock-adapter": "1.21.2",
46
46
  "jest": "27.5.1",
47
- "prettier": "2.8.0",
47
+ "prettier": "2.8.1",
48
48
  "supertest": "6.2.3",
49
49
  "ts-jest": "27.1.5",
50
50
  "tslint": "6.1.3",
51
- "typescript": "4.9.3"
51
+ "typescript": "4.9.4"
52
52
  }
53
53
  }