@workos-inc/node 12.4.1 → 12.4.2
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/{factory-rQgzNO-3.d.mts → factory-B-sW9gHr.d.mts} +4 -2
- package/lib/{factory-D5AfaGZn.d.cts → factory-BQE11lBh.d.cts} +4 -2
- package/lib/{factory-D4TQZOWl.mjs → factory-DBq6auF0.mjs} +9 -21
- package/lib/factory-DBq6auF0.mjs.map +1 -0
- package/lib/{factory-Eg0FV6MT.cjs → factory-SLaWXuFo.cjs} +9 -21
- package/lib/factory-SLaWXuFo.cjs.map +1 -0
- package/lib/index.cjs +1 -1
- package/lib/index.d.cts +1 -1
- package/lib/index.d.mts +1 -1
- package/lib/index.mjs +1 -1
- package/lib/index.worker.cjs +1 -1
- package/lib/index.worker.d.cts +1 -1
- package/lib/index.worker.d.mts +1 -1
- package/lib/index.worker.mjs +1 -1
- package/package.json +1 -1
- package/lib/factory-D4TQZOWl.mjs.map +0 -1
- package/lib/factory-Eg0FV6MT.cjs.map +0 -1
|
@@ -1567,6 +1567,7 @@ declare enum ConnectionType {
|
|
|
1567
1567
|
GenericSAML = "GenericSAML",
|
|
1568
1568
|
GitHubOAuth = "GitHubOAuth",
|
|
1569
1569
|
GoogleOAuth = "GoogleOAuth",
|
|
1570
|
+
GoogleOIDC = "GoogleOIDC",
|
|
1570
1571
|
GoogleSAML = "GoogleSAML",
|
|
1571
1572
|
JumpCloudSAML = "JumpCloudSAML",
|
|
1572
1573
|
KeycloakSAML = "KeycloakSAML",
|
|
@@ -9367,9 +9368,10 @@ declare class AuditLogs {
|
|
|
9367
9368
|
*
|
|
9368
9369
|
* This API supports idempotency which guarantees that performing the same operation multiple times will have the same result as if the operation were performed only once. This is handy in situations where you may need to retry a request due to a failure or prevent accidental duplicate requests from creating more than one resource.
|
|
9369
9370
|
*
|
|
9370
|
-
* To achieve idempotency, you can add `Idempotency-Key` request header to a Create Event request with a unique string as the value.
|
|
9371
|
+
* To achieve idempotency, you can add `Idempotency-Key` request header to a Create Event request with a unique string as the value. We suggest using [v4 UUIDs](https://en.wikipedia.org/wiki/Universally_unique_identifier) for idempotency keys to avoid collisions.
|
|
9371
9372
|
*
|
|
9372
|
-
*
|
|
9373
|
+
* WorkOS uses the idempotency key and event data together to detect duplicates.
|
|
9374
|
+
* When retrying an event, reuse its original key and send the same event data.
|
|
9373
9375
|
* @param payload - Object containing organizationId, event.
|
|
9374
9376
|
* @returns {Promise<void>}
|
|
9375
9377
|
* @throws {BadRequestException} 400
|
|
@@ -1567,6 +1567,7 @@ declare enum ConnectionType {
|
|
|
1567
1567
|
GenericSAML = "GenericSAML",
|
|
1568
1568
|
GitHubOAuth = "GitHubOAuth",
|
|
1569
1569
|
GoogleOAuth = "GoogleOAuth",
|
|
1570
|
+
GoogleOIDC = "GoogleOIDC",
|
|
1570
1571
|
GoogleSAML = "GoogleSAML",
|
|
1571
1572
|
JumpCloudSAML = "JumpCloudSAML",
|
|
1572
1573
|
KeycloakSAML = "KeycloakSAML",
|
|
@@ -9724,9 +9725,10 @@ declare class AuditLogs {
|
|
|
9724
9725
|
*
|
|
9725
9726
|
* This API supports idempotency which guarantees that performing the same operation multiple times will have the same result as if the operation were performed only once. This is handy in situations where you may need to retry a request due to a failure or prevent accidental duplicate requests from creating more than one resource.
|
|
9726
9727
|
*
|
|
9727
|
-
* To achieve idempotency, you can add `Idempotency-Key` request header to a Create Event request with a unique string as the value.
|
|
9728
|
+
* To achieve idempotency, you can add `Idempotency-Key` request header to a Create Event request with a unique string as the value. We suggest using [v4 UUIDs](https://en.wikipedia.org/wiki/Universally_unique_identifier) for idempotency keys to avoid collisions.
|
|
9728
9729
|
*
|
|
9729
|
-
*
|
|
9730
|
+
* WorkOS uses the idempotency key and event data together to detect duplicates.
|
|
9731
|
+
* When retrying an event, reuse its original key and send the same event data.
|
|
9730
9732
|
* @param payload - Object containing organizationId, event.
|
|
9731
9733
|
* @returns {Promise<void>}
|
|
9732
9734
|
* @throws {BadRequestException} 400
|
|
@@ -2782,14 +2782,6 @@ let _josePromise;
|
|
|
2782
2782
|
function getJose() {
|
|
2783
2783
|
return _josePromise ??= import("./webapi-CFOFAgDt.mjs");
|
|
2784
2784
|
}
|
|
2785
|
-
const ALLOWED_JWT_ALGORITHMS = [
|
|
2786
|
-
"RS256",
|
|
2787
|
-
"ES256",
|
|
2788
|
-
"ES384",
|
|
2789
|
-
"ES512",
|
|
2790
|
-
"EdDSA",
|
|
2791
|
-
"Ed25519"
|
|
2792
|
-
];
|
|
2793
2785
|
/**
|
|
2794
2786
|
* Whether a jose error means the presented token is invalid, as opposed to
|
|
2795
2787
|
* a failure to verify it at all. Network errors, JWKS timeouts and crypto
|
|
@@ -2797,7 +2789,7 @@ const ALLOWED_JWT_ALGORITHMS = [
|
|
|
2797
2789
|
*/
|
|
2798
2790
|
function isJwtValidationError(e) {
|
|
2799
2791
|
if (!(e instanceof Error) || !("code" in e) || typeof e.code !== "string") return false;
|
|
2800
|
-
return e.code.startsWith("ERR_JWT_") || e.code.startsWith("ERR_JWS_") || e.code === "ERR_JWKS_NO_MATCHING_KEY" || e.code === "ERR_JWKS_MULTIPLE_MATCHING_KEYS" || e.code === "ERR_JOSE_NOT_SUPPORTED"
|
|
2792
|
+
return e.code.startsWith("ERR_JWT_") || e.code.startsWith("ERR_JWS_") || e.code === "ERR_JWKS_NO_MATCHING_KEY" || e.code === "ERR_JWKS_MULTIPLE_MATCHING_KEYS" || e.code === "ERR_JOSE_NOT_SUPPORTED";
|
|
2801
2793
|
}
|
|
2802
2794
|
// src/agents/serializers/agent-instance-session.serializer.ts
|
|
2803
2795
|
function deserializeAgentInstanceSession(session) {
|
|
@@ -3240,10 +3232,7 @@ var Agents = class {
|
|
|
3240
3232
|
const { jwtVerify } = await getJose();
|
|
3241
3233
|
const jwks = await this.getJWKS();
|
|
3242
3234
|
try {
|
|
3243
|
-
const { payload } = await jwtVerify(credential, jwks, {
|
|
3244
|
-
algorithms: ALLOWED_JWT_ALGORITHMS,
|
|
3245
|
-
audience: audience ?? this.workos.clientId
|
|
3246
|
-
});
|
|
3235
|
+
const { payload } = await jwtVerify(credential, jwks, { audience: audience ?? this.workos.clientId });
|
|
3247
3236
|
if (!hasRequiredAgentClaims(payload)) return null;
|
|
3248
3237
|
if (payload.exp * 1e3 <= Date.now()) return null;
|
|
3249
3238
|
return deserializeAgentAccessTokenClaims(payload);
|
|
@@ -6068,9 +6057,10 @@ var AuditLogs = class {
|
|
|
6068
6057
|
*
|
|
6069
6058
|
* This API supports idempotency which guarantees that performing the same operation multiple times will have the same result as if the operation were performed only once. This is handy in situations where you may need to retry a request due to a failure or prevent accidental duplicate requests from creating more than one resource.
|
|
6070
6059
|
*
|
|
6071
|
-
* To achieve idempotency, you can add `Idempotency-Key` request header to a Create Event request with a unique string as the value.
|
|
6060
|
+
* To achieve idempotency, you can add `Idempotency-Key` request header to a Create Event request with a unique string as the value. We suggest using [v4 UUIDs](https://en.wikipedia.org/wiki/Universally_unique_identifier) for idempotency keys to avoid collisions.
|
|
6072
6061
|
*
|
|
6073
|
-
*
|
|
6062
|
+
* WorkOS uses the idempotency key and event data together to detect duplicates.
|
|
6063
|
+
* When retrying an event, reuse its original key and send the same event data.
|
|
6074
6064
|
* @param payload - Object containing organizationId, event.
|
|
6075
6065
|
* @returns {Promise<void>}
|
|
6076
6066
|
* @throws {BadRequestException} 400
|
|
@@ -7147,10 +7137,7 @@ var UserManagement = class UserManagement {
|
|
|
7147
7137
|
const { jwtVerify } = await getJose();
|
|
7148
7138
|
if (!jwks) throw new Error("Must provide clientId to initialize JWKS");
|
|
7149
7139
|
try {
|
|
7150
|
-
const { payload } = await jwtVerify(accessToken, jwks, {
|
|
7151
|
-
algorithms: ALLOWED_JWT_ALGORITHMS,
|
|
7152
|
-
...this.issuer ? { issuer: this.issuer } : {}
|
|
7153
|
-
});
|
|
7140
|
+
const { payload } = await jwtVerify(accessToken, jwks, this.issuer ? { issuer: this.issuer } : void 0);
|
|
7154
7141
|
return payload;
|
|
7155
7142
|
} catch (e) {
|
|
7156
7143
|
if (isJwtValidationError(e)) return null;
|
|
@@ -10172,7 +10159,7 @@ var Vault = class {
|
|
|
10172
10159
|
}
|
|
10173
10160
|
};
|
|
10174
10161
|
// package.json
|
|
10175
|
-
var version = "12.4.
|
|
10162
|
+
var version = "12.4.2";
|
|
10176
10163
|
// src/workos.ts
|
|
10177
10164
|
const DEFAULT_HOSTNAME = "api.workos.com";
|
|
10178
10165
|
const HEADER_AUTHORIZATION = "Authorization";
|
|
@@ -10549,6 +10536,7 @@ let ConnectionType = /* @__PURE__ */ function(ConnectionType) {
|
|
|
10549
10536
|
ConnectionType["GenericSAML"] = "GenericSAML";
|
|
10550
10537
|
ConnectionType["GitHubOAuth"] = "GitHubOAuth";
|
|
10551
10538
|
ConnectionType["GoogleOAuth"] = "GoogleOAuth";
|
|
10539
|
+
ConnectionType["GoogleOIDC"] = "GoogleOIDC";
|
|
10552
10540
|
ConnectionType["GoogleSAML"] = "GoogleSAML";
|
|
10553
10541
|
ConnectionType["JumpCloudSAML"] = "JumpCloudSAML";
|
|
10554
10542
|
ConnectionType["KeycloakSAML"] = "KeycloakSAML";
|
|
@@ -10579,4 +10567,4 @@ function createWorkOS(options) {
|
|
|
10579
10567
|
}
|
|
10580
10568
|
export { AuthenticationException as A, SignatureVerificationException as C, NoApiKeyProvidedException as D, NotFoundException as E, SubtleCryptoProvider as F, GenericServerException as M, ApiKeyRequiredException as N, ConflictException as O, FetchHttpClient as P, UnauthorizedException as S, OauthException as T, PKCE as _, ItContactIntent as a, Actions as b, GenerateLinkIntent as c, FeatureFlagsRuntimeClient as d, CreateRuleWithTargetsError as f, AuthenticateWithSessionCookieFailureReason as g, serializeRevokeSessionOptions as h, OrganizationDomainVerificationStrategy as i, isAuthenticationErrorData as j, BadRequestException as k, UpdateAuditLogsRetentionRetentionPeriod as l, RefreshSessionFailureReason as m, ConnectionType as n, DomainDataState as o, CookieSession as p, OrganizationDomainState as r, DirectoryUserWithGroupsState as s, createWorkOS as t, WorkOS as u, Webhooks as v, RateLimitExceededException as w, UnprocessableEntityException as x, AutoPaginatable as y };
|
|
10581
10569
|
|
|
10582
|
-
//# sourceMappingURL=factory-
|
|
10570
|
+
//# sourceMappingURL=factory-DBq6auF0.mjs.map
|