@workos-inc/node 7.27.4 → 7.28.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/index.d.ts
CHANGED
package/lib/index.js
CHANGED
|
@@ -64,5 +64,9 @@ class WorkOSNode extends workos_1.WorkOS {
|
|
|
64
64
|
createIronSessionProvider() {
|
|
65
65
|
return new web_iron_session_provider_1.WebIronSessionProvider();
|
|
66
66
|
}
|
|
67
|
+
/** @override */
|
|
68
|
+
emitWarning(warning) {
|
|
69
|
+
return process.emitWarning(warning, 'WorkOS');
|
|
70
|
+
}
|
|
67
71
|
}
|
|
68
72
|
exports.WorkOS = WorkOSNode;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { RoleResponse } from '../../roles/interfaces';
|
|
1
2
|
import { ConnectionType } from './connection-type.enum';
|
|
2
3
|
export interface Profile {
|
|
3
4
|
id: string;
|
|
@@ -8,6 +9,7 @@ export interface Profile {
|
|
|
8
9
|
email: string;
|
|
9
10
|
firstName?: string;
|
|
10
11
|
lastName?: string;
|
|
12
|
+
role?: RoleResponse;
|
|
11
13
|
groups?: string[];
|
|
12
14
|
rawAttributes?: {
|
|
13
15
|
[key: string]: any;
|
|
@@ -22,6 +24,7 @@ export interface ProfileResponse {
|
|
|
22
24
|
email: string;
|
|
23
25
|
first_name?: string;
|
|
24
26
|
last_name?: string;
|
|
27
|
+
role?: RoleResponse;
|
|
25
28
|
groups?: string[];
|
|
26
29
|
raw_attributes?: {
|
|
27
30
|
[key: string]: any;
|
package/lib/sso/sso.spec.js
CHANGED
|
@@ -176,6 +176,9 @@ describe('SSO', () => {
|
|
|
176
176
|
email: 'foo@test.com',
|
|
177
177
|
first_name: 'foo',
|
|
178
178
|
last_name: 'bar',
|
|
179
|
+
role: {
|
|
180
|
+
slug: 'admin',
|
|
181
|
+
},
|
|
179
182
|
groups: ['Admins', 'Developers'],
|
|
180
183
|
raw_attributes: {
|
|
181
184
|
email: 'foo@test.com',
|
|
@@ -210,6 +213,9 @@ describe('SSO', () => {
|
|
|
210
213
|
email: 'foo@test.com',
|
|
211
214
|
first_name: 'foo',
|
|
212
215
|
last_name: 'bar',
|
|
216
|
+
role: {
|
|
217
|
+
slug: 'admin',
|
|
218
|
+
},
|
|
213
219
|
raw_attributes: {
|
|
214
220
|
email: 'foo@test.com',
|
|
215
221
|
first_name: 'foo',
|
|
@@ -241,6 +247,9 @@ describe('SSO', () => {
|
|
|
241
247
|
email: 'foo@test.com',
|
|
242
248
|
first_name: 'foo',
|
|
243
249
|
last_name: 'bar',
|
|
250
|
+
role: {
|
|
251
|
+
slug: 'admin',
|
|
252
|
+
},
|
|
244
253
|
groups: ['Admins', 'Developers'],
|
|
245
254
|
raw_attributes: {
|
|
246
255
|
email: 'foo@test.com',
|
package/lib/workos.js
CHANGED
|
@@ -27,7 +27,7 @@ const bad_request_exception_1 = require("./common/exceptions/bad-request.excepti
|
|
|
27
27
|
const http_client_1 = require("./common/net/http-client");
|
|
28
28
|
const subtle_crypto_provider_1 = require("./common/crypto/subtle-crypto-provider");
|
|
29
29
|
const fetch_client_1 = require("./common/net/fetch-client");
|
|
30
|
-
const VERSION = '7.
|
|
30
|
+
const VERSION = '7.28.0';
|
|
31
31
|
const DEFAULT_HOSTNAME = 'api.workos.com';
|
|
32
32
|
const HEADER_AUTHORIZATION = 'Authorization';
|
|
33
33
|
const HEADER_IDEMPOTENCY_KEY = 'Idempotency-Key';
|
|
@@ -170,7 +170,8 @@ class WorkOS {
|
|
|
170
170
|
});
|
|
171
171
|
}
|
|
172
172
|
emitWarning(warning) {
|
|
173
|
-
|
|
173
|
+
// tslint:disable-next-line:no-console
|
|
174
|
+
console.warn(`WorkOS: ${warning}`);
|
|
174
175
|
}
|
|
175
176
|
handleHttpError({ path, error }) {
|
|
176
177
|
var _a;
|
package/package.json
CHANGED