@workos-inc/node 8.7.0 → 8.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.
- package/lib/{action.interface-TVBOqlx0.d.cts → action.interface-BNRvZ9Od.d.cts} +2 -2
- package/lib/actions/actions.d.cts +1 -1
- package/lib/actions/interfaces/action.interface.d.cts +1 -1
- package/lib/actions/interfaces/index.d.cts +1 -1
- package/lib/actions/serializers/action.serializer.d.cts +1 -1
- package/lib/{actions-BjKImREg.d.cts → actions-C0f6paNq.d.cts} +2 -2
- package/lib/api-keys/api-keys.d.cts +1 -1
- package/lib/api-keys/interfaces/create-organization-api-key-options.interface.d.cts +1 -1
- package/lib/api-keys/interfaces/index.d.cts +1 -1
- package/lib/api-keys/serializers/create-organization-api-key-options.serializer.d.cts +1 -1
- package/lib/api-keys/serializers/index.d.cts +1 -1
- package/lib/{api-keys-FoD7rQEa.d.cts → api-keys-Dm4rmZx0.d.cts} +10 -10
- package/lib/audit-logs/audit-logs.d.cts +1 -1
- package/lib/{authenticate-with-session-cookie.interface--Ugw1Meh.d.cts → authenticate-with-session-cookie.interface-B7cOhTzF.d.cts} +2 -2
- package/lib/{authentication-response.interface-B5XOTdYu.d.cts → authentication-response.interface-m3ftdeH0.d.cts} +2 -2
- package/lib/{authentication-response.serializer-DbD9-wIb.d.cts → authentication-response.serializer-QesVvEKA.d.cts} +2 -2
- package/lib/authorization/authorization.d.cts +1 -1
- package/lib/authorization/index.d.cts +2 -2
- package/lib/authorization/interfaces/index.d.cts +1 -1
- package/lib/authorization/interfaces/list-permissions-options.interface.d.cts +1 -1
- package/lib/authorization/serializers/index.d.cts +1 -1
- package/lib/authorization/serializers/organization-role.serializer.d.cts +1 -1
- package/lib/common/interfaces/event.interface.d.cts +1 -1
- package/lib/common/interfaces/index.d.cts +1 -1
- package/lib/common/serializers/event.serializer.d.cts +1 -1
- package/lib/common/serializers/index.d.cts +1 -1
- package/lib/common/utils/fetch-and-deserialize.d.cts +1 -1
- package/lib/{create-organization-api-key-options.serializer-DHP7Y1L-.d.cts → create-organization-api-key-options.serializer-CQtSExUA.d.cts} +2 -2
- package/lib/{create-organization-options.serializer-CvtIYKO8.d.cts → create-organization-options.serializer-CMwM3Ein.d.cts} +2 -2
- package/lib/directory-sync/directory-sync.d.cts +1 -1
- package/lib/directory-sync/interfaces/directory-user.interface.d.cts +1 -1
- package/lib/directory-sync/interfaces/index.d.cts +1 -1
- package/lib/directory-sync/serializers/directory-user.serializer.d.cts +1 -1
- package/lib/directory-sync/serializers/index.d.cts +1 -1
- package/lib/{directory-user.serializer-DdiSNHu_.d.cts → directory-user.serializer-C7zA6zc6.d.cts} +2 -2
- package/lib/{event.serializer-DxvBsrGU.d.cts → event.serializer-DxSHOkfb.d.cts} +2 -2
- package/lib/events/events.d.cts +1 -1
- package/lib/events/interfaces/index.d.cts +1 -1
- package/lib/events/interfaces/list-events-options.interface.d.cts +1 -1
- package/lib/events/serializers/index.d.cts +1 -1
- package/lib/events/serializers/list-event-options.serializer.d.cts +1 -1
- package/lib/{factory-UI_uCpNc.cjs → factory-BrmcomOW.cjs} +2 -2
- package/lib/{factory-UI_uCpNc.cjs.map → factory-BrmcomOW.cjs.map} +1 -1
- package/lib/factory.cjs +2 -2
- package/lib/factory.d.cts +1 -1
- package/lib/feature-flags/feature-flags.d.cts +1 -1
- package/lib/feature-flags/interfaces/index.d.cts +1 -1
- package/lib/feature-flags/interfaces/list-feature-flags-options.interface.d.cts +1 -1
- package/lib/fga/fga.d.cts +1 -1
- package/lib/fga/utils/fetch-and-deserialize-list.d.cts +1 -1
- package/lib/get-token-CVW25jmW.cjs.map +1 -1
- package/lib/{get-token-YoisQSFe.d.cts → get-token-CZxt-NOl.d.cts} +2 -2
- package/lib/{index-zd2lGEmr.d.cts → index-DMn9159G.d.cts} +2 -2
- package/lib/index.cjs +4 -3
- package/lib/index.cjs.map +1 -1
- package/lib/index.d.cts +11 -11
- package/lib/index.d.ts +2 -1
- package/lib/index.js +2 -1
- package/lib/index.js.map +1 -1
- package/lib/index.worker.cjs +2 -2
- package/lib/index.worker.d.cts +8 -8
- package/lib/{list-event-options.serializer-URqDPrTi.d.cts → list-event-options.serializer-PQ-fI1Yt.d.cts} +2 -2
- package/lib/{list-events-options.interface-CT1WzVzZ.d.cts → list-events-options.interface-Dyxyr76K.d.cts} +2 -2
- package/lib/mfa/mfa.d.cts +1 -1
- package/lib/organization-domains/organization-domains.d.cts +1 -1
- package/lib/{organization-role.serializer-hZNZRrOm.d.cts → organization-role.serializer-TtMCd2mh.d.cts} +2 -2
- package/lib/organizations/interfaces/create-organization-options.interface.d.cts +1 -1
- package/lib/organizations/interfaces/index.d.cts +1 -1
- package/lib/organizations/organizations.d.cts +1 -1
- package/lib/organizations/serializers/create-organization-options.serializer.d.cts +1 -1
- package/lib/organizations/serializers/index.d.cts +1 -1
- package/lib/package.js +1 -1
- package/lib/package.js.map +1 -1
- package/lib/passwordless/passwordless.d.cts +1 -1
- package/lib/pipes/pipes.d.cts +1 -1
- package/lib/portal/portal.d.cts +1 -1
- package/lib/{profile-and-token.serializer-Zr1vKJjC.d.cts → profile-and-token.serializer-JsmgThjS.d.cts} +2 -2
- package/lib/{profile.serializer-BjxW-2CT.d.cts → profile.serializer-CsrFiJX7.d.cts} +2 -2
- package/lib/{refresh-and-seal-session-data.interface-CfKqrf2N.d.cts → refresh-and-seal-session-data.interface-B_CoeTQF.d.cts} +3 -3
- package/lib/roles/interfaces/index.d.cts +1 -1
- package/lib/roles/interfaces/role.interface.d.cts +1 -1
- package/lib/roles/serializers/role.serializer.d.cts +1 -1
- package/lib/{session.interface-DEkXnpLu.d.cts → session.interface-gNED15L3.d.cts} +2 -2
- package/lib/{session.serializer-Cw08JZKf.d.cts → session.serializer-CdQMlueA.d.cts} +2 -2
- package/lib/sso/interfaces/index.d.cts +1 -1
- package/lib/sso/interfaces/profile-and-token.interface.d.cts +1 -1
- package/lib/sso/interfaces/profile.interface.d.cts +1 -1
- package/lib/sso/serializers/index.d.cts +2 -2
- package/lib/sso/serializers/profile-and-token.serializer.d.cts +1 -1
- package/lib/sso/serializers/profile.serializer.d.cts +1 -1
- package/lib/sso/sso.d.cts +1 -1
- package/lib/user-management/interfaces/authenticate-with-session-cookie.interface.d.cts +1 -1
- package/lib/user-management/interfaces/authentication-response.interface.d.cts +1 -1
- package/lib/user-management/interfaces/authentication-response.interface.d.ts +1 -1
- package/lib/user-management/interfaces/index.d.cts +5 -5
- package/lib/user-management/interfaces/list-auth-factors-options.interface.d.cts +1 -1
- package/lib/user-management/interfaces/list-invitations-options.interface.d.cts +1 -1
- package/lib/user-management/interfaces/list-organization-memberships-options.interface.d.cts +1 -1
- package/lib/user-management/interfaces/list-user-feature-flags-options.interface.d.cts +1 -1
- package/lib/user-management/interfaces/organization-membership.interface.d.cts +1 -1
- package/lib/user-management/interfaces/refresh-and-seal-session-data.interface.d.cts +1 -1
- package/lib/user-management/interfaces/session.interface.d.cts +1 -1
- package/lib/user-management/interfaces/session.interface.d.ts +1 -1
- package/lib/user-management/serializers/authentication-response.serializer.d.cts +1 -1
- package/lib/user-management/serializers/index.d.cts +2 -2
- package/lib/user-management/serializers/list-invitations-options.serializer.d.cts +1 -1
- package/lib/user-management/serializers/list-organization-memberships-options.serializer.d.cts +1 -1
- package/lib/user-management/serializers/organization-membership.serializer.d.cts +1 -1
- package/lib/user-management/serializers/role.serializer.d.cts +1 -1
- package/lib/user-management/serializers/session.serializer.d.cts +1 -1
- package/lib/user-management/session.d.cts +1 -1
- package/lib/user-management/user-management.d.cts +1 -1
- package/lib/vault/vault.d.cts +1 -1
- package/lib/webhooks/webhooks.d.cts +1 -1
- package/lib/{webhooks-D2t2W-Z_.d.cts → webhooks-mSGRW8EE.d.cts} +2 -2
- package/lib/widgets/interfaces/get-token.d.cts +1 -1
- package/lib/widgets/interfaces/get-token.d.ts +1 -1
- package/lib/widgets/interfaces/get-token.js.map +1 -1
- package/lib/widgets/widgets.d.cts +1 -1
- package/lib/{workos-2uUDl0FZ.cjs → workos-DXlhXDRn.cjs} +2 -2
- package/lib/{workos-2uUDl0FZ.cjs.map → workos-DXlhXDRn.cjs.map} +1 -1
- package/lib/workos.cjs +1 -1
- package/lib/workos.d.cts +1 -1
- package/package.json +1 -1
package/lib/package.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"package.js","names":[],"sources":["../package.json"],"sourcesContent":["{\n \"version\": \"8.
|
|
1
|
+
{"version":3,"file":"package.js","names":[],"sources":["../package.json"],"sourcesContent":["{\n \"version\": \"8.8.0\",\n \"name\": \"@workos-inc/node\",\n \"author\": \"WorkOS\",\n \"description\": \"A Node wrapper for the WorkOS API\",\n \"homepage\": \"https://github.com/workos/workos-node\",\n \"license\": \"MIT\",\n \"keywords\": [\n \"workos\"\n ],\n \"engines\": {\n \"node\": \">=20.15.0\"\n },\n \"type\": \"module\",\n \"main\": \"./lib/index.cjs\",\n \"module\": \"./lib/index.js\",\n \"types\": \"./lib/index.d.ts\",\n \"files\": [\n \"lib/\",\n \"package.json\"\n ],\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"git+https://github.com/workos/workos-node.git\"\n },\n \"bugs\": {\n \"url\": \"https://github.com/workos/workos-node/issues\"\n },\n \"scripts\": {\n \"clean\": \"rm -rf lib\",\n \"build\": \"tsdown\",\n \"build:watch\": \"tsdown --watch\",\n \"lint\": \"eslint\",\n \"test\": \"jest\",\n \"test:watch\": \"jest --watch\",\n \"check:runtimes\": \"tsx scripts/ecosystem-check.ts\",\n \"check:types\": \"attw --pack . --ignore-rules no-resolution\",\n \"prettier\": \"prettier \\\"src/**/*.{js,ts,tsx}\\\" --check\",\n \"format\": \"prettier \\\"src/**/*.{js,ts,tsx}\\\" --write\",\n \"prepublishOnly\": \"npm run build\",\n \"typecheck\": \"tsc --noEmit\"\n },\n \"dependencies\": {\n \"iron-webcrypto\": \"^2.0.0\",\n \"jose\": \"~6.1.0\"\n },\n \"devDependencies\": {\n \"@arethetypeswrong/cli\": \"^0.18.2\",\n \"@babel/plugin-transform-modules-commonjs\": \"^7.26.3\",\n \"@babel/preset-env\": \"^7.26.9\",\n \"@babel/preset-typescript\": \"^7.27.0\",\n \"@eslint/js\": \"^9.37.0\",\n \"@types/jest\": \"^30.0.0\",\n \"@types/node\": \"~20\",\n \"@typescript-eslint/parser\": \"^8.46.0\",\n \"babel-jest\": \"^30.2.0\",\n \"eslint\": \"^9.37.0\",\n \"eslint-plugin-jest\": \"^29.0.1\",\n \"eslint-plugin-n\": \"^17.23.1\",\n \"jest\": \"30.2.0\",\n \"jest-environment-miniflare\": \"^2.14.2\",\n \"jest-fetch-mock\": \"^3.0.3\",\n \"miniflare\": \"^4.20251004.0\",\n \"prettier\": \"^3.5.3\",\n \"tsdown\": \"^0.17.0\",\n \"tsx\": \"^4.20.6\",\n \"typescript\": \"5.9.3\",\n \"typescript-eslint\": \"^8.46.0\"\n },\n \"exports\": {\n \".\": {\n \"workerd\": {\n \"types\": \"./lib/index.worker.d.ts\",\n \"import\": \"./lib/index.worker.js\",\n \"require\": \"./lib/index.worker.cjs\"\n },\n \"edge-light\": {\n \"types\": \"./lib/index.worker.d.ts\",\n \"import\": \"./lib/index.worker.js\",\n \"require\": \"./lib/index.worker.cjs\"\n },\n \"deno\": {\n \"types\": \"./lib/index.d.ts\",\n \"default\": \"./lib/index.js\"\n },\n \"bun\": {\n \"types\": \"./lib/index.d.ts\",\n \"import\": \"./lib/index.js\",\n \"require\": \"./lib/index.cjs\"\n },\n \"convex\": {\n \"types\": \"./lib/index.worker.d.ts\",\n \"import\": \"./lib/index.worker.js\",\n \"default\": \"./lib/index.worker.cjs\"\n },\n \"import\": {\n \"types\": \"./lib/index.d.ts\",\n \"default\": \"./lib/index.js\"\n },\n \"require\": {\n \"types\": \"./lib/index.d.cts\",\n \"default\": \"./lib/index.cjs\"\n },\n \"default\": \"./lib/index.js\"\n },\n \"./worker\": {\n \"import\": {\n \"types\": \"./lib/index.worker.d.ts\",\n \"default\": \"./lib/index.worker.js\"\n },\n \"require\": {\n \"types\": \"./lib/index.worker.d.cts\",\n \"default\": \"./lib/index.worker.cjs\"\n },\n \"default\": \"./lib/index.worker.js\"\n },\n \"./package.json\": \"./package.json\"\n }\n}\n"],"mappings":";cACa"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { S as Passwordless } from "../api-keys-
|
|
1
|
+
import { S as Passwordless } from "../api-keys-Dm4rmZx0.cjs";
|
|
2
2
|
export { Passwordless };
|
package/lib/pipes/pipes.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { x as Pipes } from "../api-keys-
|
|
1
|
+
import { x as Pipes } from "../api-keys-Dm4rmZx0.cjs";
|
|
2
2
|
export { Pipes };
|
package/lib/portal/portal.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { b as Portal } from "../api-keys-
|
|
1
|
+
import { b as Portal } from "../api-keys-Dm4rmZx0.cjs";
|
|
2
2
|
export { Portal };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Xn as ProfileAndTokenResponse, Yn as ProfileAndToken } from "./index-
|
|
1
|
+
import { Xn as ProfileAndTokenResponse, Yn as ProfileAndToken } from "./index-DMn9159G.cjs";
|
|
2
2
|
import { t as UnknownRecord } from "./unknown-record.interface-KDwjwNHM.cjs";
|
|
3
3
|
|
|
4
4
|
//#region src/sso/serializers/profile-and-token.serializer.d.ts
|
|
5
5
|
declare const deserializeProfileAndToken: <CustomAttributesType extends UnknownRecord>(profileAndToken: ProfileAndTokenResponse<CustomAttributesType>) => ProfileAndToken<CustomAttributesType>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { deserializeProfileAndToken as t };
|
|
8
|
-
//# sourceMappingURL=profile-and-token.serializer-
|
|
8
|
+
//# sourceMappingURL=profile-and-token.serializer-JsmgThjS.d.cts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Qn as ProfileResponse, Zn as Profile } from "./index-
|
|
1
|
+
import { Qn as ProfileResponse, Zn as Profile } from "./index-DMn9159G.cjs";
|
|
2
2
|
import { t as UnknownRecord } from "./unknown-record.interface-KDwjwNHM.cjs";
|
|
3
3
|
|
|
4
4
|
//#region src/sso/serializers/profile.serializer.d.ts
|
|
5
5
|
declare const deserializeProfile: <CustomAttributesType extends UnknownRecord>(profile: ProfileResponse<CustomAttributesType>) => Profile<CustomAttributesType>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { deserializeProfile as t };
|
|
8
|
-
//# sourceMappingURL=profile.serializer-
|
|
8
|
+
//# sourceMappingURL=profile.serializer-CsrFiJX7.d.cts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as AuthenticationResponse } from "./authentication-response.interface-
|
|
2
|
-
import { a as AuthenticateWithSessionCookieSuccessResponse } from "./authenticate-with-session-cookie.interface
|
|
1
|
+
import { t as AuthenticationResponse } from "./authentication-response.interface-m3ftdeH0.cjs";
|
|
2
|
+
import { a as AuthenticateWithSessionCookieSuccessResponse } from "./authenticate-with-session-cookie.interface-B7cOhTzF.cjs";
|
|
3
3
|
|
|
4
4
|
//#region src/user-management/interfaces/refresh-and-seal-session-data.interface.d.ts
|
|
5
5
|
declare enum RefreshSessionFailureReason {
|
|
@@ -21,4 +21,4 @@ type RefreshSessionSuccessResponse = Omit<AuthenticateWithSessionCookieSuccessRe
|
|
|
21
21
|
type RefreshSessionResponse = RefreshSessionFailedResponse | RefreshSessionSuccessResponse;
|
|
22
22
|
//#endregion
|
|
23
23
|
export { RefreshSessionResponse as n, RefreshSessionFailureReason as t };
|
|
24
|
-
//# sourceMappingURL=refresh-and-seal-session-data.interface-
|
|
24
|
+
//# sourceMappingURL=refresh-and-seal-session-data.interface-B_CoeTQF.d.cts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ar as OrganizationRoleEvent, cr as Role, dr as RoleList, fr as RoleResponse, ir as ListOrganizationRolesResponse, lr as RoleEvent, or as OrganizationRoleEventResponse, sr as OrganizationRoleResponse, ur as RoleEventResponse } from "../../index-
|
|
1
|
+
import { ar as OrganizationRoleEvent, cr as Role, dr as RoleList, fr as RoleResponse, ir as ListOrganizationRolesResponse, lr as RoleEvent, or as OrganizationRoleEventResponse, sr as OrganizationRoleResponse, ur as RoleEventResponse } from "../../index-DMn9159G.cjs";
|
|
2
2
|
export { ListOrganizationRolesResponse, OrganizationRoleEvent, OrganizationRoleEventResponse, OrganizationRoleResponse, Role, RoleEvent, RoleEventResponse, RoleList, RoleResponse };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ar as OrganizationRoleEvent, cr as Role, dr as RoleList, fr as RoleResponse, ir as ListOrganizationRolesResponse, lr as RoleEvent, or as OrganizationRoleEventResponse, sr as OrganizationRoleResponse, ur as RoleEventResponse } from "../../index-
|
|
1
|
+
import { ar as OrganizationRoleEvent, cr as Role, dr as RoleList, fr as RoleResponse, ir as ListOrganizationRolesResponse, lr as RoleEvent, or as OrganizationRoleEventResponse, sr as OrganizationRoleResponse, ur as RoleEventResponse } from "../../index-DMn9159G.cjs";
|
|
2
2
|
export { ListOrganizationRolesResponse, OrganizationRoleEvent, OrganizationRoleEventResponse, OrganizationRoleResponse, Role, RoleEvent, RoleEventResponse, RoleList, RoleResponse };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { cr as Role, sr as OrganizationRoleResponse } from "../../index-
|
|
1
|
+
import { cr as Role, sr as OrganizationRoleResponse } from "../../index-DMn9159G.cjs";
|
|
2
2
|
|
|
3
3
|
//#region src/roles/serializers/role.serializer.d.ts
|
|
4
4
|
declare const deserializeRole: (role: OrganizationRoleResponse) => Role;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as Impersonator } from "./impersonator.interface-CGlMZ9vr.cjs";
|
|
2
2
|
|
|
3
3
|
//#region src/user-management/interfaces/session.interface.d.ts
|
|
4
|
-
type AuthMethod = 'external_auth' | 'impersonation' | 'magic_code' | 'migrated_session' | 'oauth' | 'passkey' | 'password' | 'sso' | 'unknown';
|
|
4
|
+
type AuthMethod = 'cross_app_auth' | 'external_auth' | 'impersonation' | 'magic_code' | 'migrated_session' | 'oauth' | 'passkey' | 'password' | 'sso' | 'unknown';
|
|
5
5
|
type SessionStatus = 'active' | 'expired' | 'revoked';
|
|
6
6
|
interface Session {
|
|
7
7
|
object: 'session';
|
|
@@ -35,4 +35,4 @@ interface SessionResponse {
|
|
|
35
35
|
}
|
|
36
36
|
//#endregion
|
|
37
37
|
export { SessionStatus as i, Session as n, SessionResponse as r, AuthMethod as t };
|
|
38
|
-
//# sourceMappingURL=session.interface-
|
|
38
|
+
//# sourceMappingURL=session.interface-gNED15L3.d.cts.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { n as Session, r as SessionResponse } from "./session.interface-
|
|
1
|
+
import { n as Session, r as SessionResponse } from "./session.interface-gNED15L3.cjs";
|
|
2
2
|
|
|
3
3
|
//#region src/user-management/serializers/session.serializer.d.ts
|
|
4
4
|
declare const deserializeSession: (session: SessionResponse) => Session;
|
|
5
5
|
//#endregion
|
|
6
6
|
export { deserializeSession as t };
|
|
7
|
-
//# sourceMappingURL=session.serializer-
|
|
7
|
+
//# sourceMappingURL=session.serializer-CdQMlueA.d.cts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Qn as ProfileResponse, Xn as ProfileAndTokenResponse, Yn as ProfileAndToken, Zn as Profile } from "../../index-
|
|
1
|
+
import { Qn as ProfileResponse, Xn as ProfileAndTokenResponse, Yn as ProfileAndToken, Zn as Profile } from "../../index-DMn9159G.cjs";
|
|
2
2
|
import { n as SSOPKCEAuthorizationURLResult, t as SSOAuthorizationURLOptions } from "../../authorization-url-options.interface-jpmqnJeg.cjs";
|
|
3
3
|
import { t as ConnectionType } from "../../connection-type.enum-5NICh5Uu.cjs";
|
|
4
4
|
import { n as ConnectionDomain, r as ConnectionResponse, t as Connection } from "../../connection.interface-CYEbF9mD.cjs";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Xn as ProfileAndTokenResponse, Yn as ProfileAndToken } from "../../index-
|
|
1
|
+
import { Xn as ProfileAndTokenResponse, Yn as ProfileAndToken } from "../../index-DMn9159G.cjs";
|
|
2
2
|
export { ProfileAndToken, ProfileAndTokenResponse };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Qn as ProfileResponse, Zn as Profile } from "../../index-
|
|
1
|
+
import { Qn as ProfileResponse, Zn as Profile } from "../../index-DMn9159G.cjs";
|
|
2
2
|
export { Profile, ProfileResponse };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as deserializeConnection } from "../../connection.serializer-CGJCBj9L.cjs";
|
|
2
2
|
import { t as serializeListConnectionsOptions } from "../../list-connections-options.serializer-C2ETSFny.cjs";
|
|
3
|
-
import { t as deserializeProfileAndToken } from "../../profile-and-token.serializer-
|
|
4
|
-
import { t as deserializeProfile } from "../../profile.serializer-
|
|
3
|
+
import { t as deserializeProfileAndToken } from "../../profile-and-token.serializer-JsmgThjS.cjs";
|
|
4
|
+
import { t as deserializeProfile } from "../../profile.serializer-CsrFiJX7.cjs";
|
|
5
5
|
export { deserializeConnection, deserializeProfile, deserializeProfileAndToken, serializeListConnectionsOptions };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as deserializeProfileAndToken } from "../../profile-and-token.serializer-
|
|
1
|
+
import { t as deserializeProfileAndToken } from "../../profile-and-token.serializer-JsmgThjS.cjs";
|
|
2
2
|
export { deserializeProfileAndToken };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as deserializeProfile } from "../../profile.serializer-
|
|
1
|
+
import { t as deserializeProfile } from "../../profile.serializer-CsrFiJX7.cjs";
|
|
2
2
|
export { deserializeProfile };
|
package/lib/sso/sso.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { y as SSO } from "../api-keys-
|
|
1
|
+
import { y as SSO } from "../api-keys-Dm4rmZx0.cjs";
|
|
2
2
|
export { SSO };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as AuthenticateWithSessionCookieSuccessResponse, i as AuthenticateWithSessionCookieOptions, n as AuthenticateWithSessionCookieFailedResponse, o as SessionCookieData, r as AuthenticateWithSessionCookieFailureReason, t as AccessToken } from "../../authenticate-with-session-cookie.interface
|
|
1
|
+
import { a as AuthenticateWithSessionCookieSuccessResponse, i as AuthenticateWithSessionCookieOptions, n as AuthenticateWithSessionCookieFailedResponse, o as SessionCookieData, r as AuthenticateWithSessionCookieFailureReason, t as AccessToken } from "../../authenticate-with-session-cookie.interface-B7cOhTzF.cjs";
|
|
2
2
|
export { AccessToken, AuthenticateWithSessionCookieFailedResponse, AuthenticateWithSessionCookieFailureReason, AuthenticateWithSessionCookieOptions, AuthenticateWithSessionCookieSuccessResponse, SessionCookieData };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as AuthenticationResponseResponse, t as AuthenticationResponse } from "../../authentication-response.interface-
|
|
1
|
+
import { n as AuthenticationResponseResponse, t as AuthenticationResponse } from "../../authentication-response.interface-m3ftdeH0.cjs";
|
|
2
2
|
export { AuthenticationResponse, AuthenticationResponseResponse };
|
|
@@ -3,7 +3,7 @@ import { Impersonator, ImpersonatorResponse } from "./impersonator.interface.js"
|
|
|
3
3
|
import { User, UserResponse } from "./user.interface.js";
|
|
4
4
|
|
|
5
5
|
//#region src/user-management/interfaces/authentication-response.interface.d.ts
|
|
6
|
-
type AuthenticationMethod = 'SSO' | 'Password' | 'Passkey' | 'AppleOAuth' | 'BitbucketOAuth' | 'GitHubOAuth' | 'GitLabOAuth' | 'GoogleOAuth' | 'LinkedInOAuth' | 'MicrosoftOAuth' | 'SalesforceOAuth' | 'VercelOAuth' | 'MagicAuth' | 'CrossAppAuth' | 'Impersonation';
|
|
6
|
+
type AuthenticationMethod = 'SSO' | 'Password' | 'Passkey' | 'AppleOAuth' | 'BitbucketOAuth' | 'DiscordOAuth' | 'GitHubOAuth' | 'GitLabOAuth' | 'GoogleOAuth' | 'IntuitOAuth' | 'LinkedInOAuth' | 'MicrosoftOAuth' | 'SalesforceOAuth' | 'SlackOAuth' | 'VercelMarketplaceOAuth' | 'VercelOAuth' | 'XeroOAuth' | 'MagicAuth' | 'CrossAppAuth' | 'ExternalAuth' | 'MigratedSession' | 'Impersonation';
|
|
7
7
|
interface AuthenticationResponse {
|
|
8
8
|
user: User;
|
|
9
9
|
organizationId?: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Bn as AuthorizationOrganizationMembershipResponse, Fn as ListOrganizationMembershipsOptions, Gn as OrganizationMembershipStatus, Hn as BaseOrganizationMembershipResponse, In as SerializedListOrganizationMembershipsOptions, Jn as ListAuthFactorsOptions, Kn as ListInvitationsOptions, Ln as AuthorizationOrganizationMembership, Pn as ListUserFeatureFlagsOptions, Rn as AuthorizationOrganizationMembershipList, Un as OrganizationMembership, Vn as BaseOrganizationMembership, Wn as OrganizationMembershipResponse, qn as SerializedListInvitationsOptions, zn as AuthorizationOrganizationMembershipListResponse } from "../../index-
|
|
1
|
+
import { Bn as AuthorizationOrganizationMembershipResponse, Fn as ListOrganizationMembershipsOptions, Gn as OrganizationMembershipStatus, Hn as BaseOrganizationMembershipResponse, In as SerializedListOrganizationMembershipsOptions, Jn as ListAuthFactorsOptions, Kn as ListInvitationsOptions, Ln as AuthorizationOrganizationMembership, Pn as ListUserFeatureFlagsOptions, Rn as AuthorizationOrganizationMembershipList, Un as OrganizationMembership, Vn as BaseOrganizationMembership, Wn as OrganizationMembershipResponse, qn as SerializedListInvitationsOptions, zn as AuthorizationOrganizationMembershipListResponse } from "../../index-DMn9159G.cjs";
|
|
2
2
|
import { n as OauthTokensResponse, t as OauthTokens } from "../../oauth-tokens.interface--rFwkKXb.cjs";
|
|
3
3
|
import { a as WithResolvedClientId, i as SerializedAuthenticateWithOptionsBase, n as AuthenticateWithSessionOptions, r as SerializedAuthenticatePublicClientBase, t as AuthenticateWithOptionsBase } from "../../authenticate-with-options-base.interface-C3xH9pmi.cjs";
|
|
4
4
|
import { n as AuthenticateWithCodeOptions, r as SerializedAuthenticateWithCodeOptions, t as AuthenticateUserWithCodeCredentials } from "../../authenticate-with-code-options.interface-H0yfsHxj.cjs";
|
|
@@ -11,8 +11,8 @@ import { n as AuthenticateWithRefreshTokenOptions, r as SerializedAuthenticateWi
|
|
|
11
11
|
import { n as SerializedAuthenticateWithRefreshTokenPublicClientOptions, t as AuthenticateWithRefreshTokenPublicClientOptions } from "../../authenticate-with-refresh-token-public-client-options.interface-BUR1ShKn.cjs";
|
|
12
12
|
import { n as ImpersonatorResponse, t as Impersonator } from "../../impersonator.interface-CGlMZ9vr.cjs";
|
|
13
13
|
import { n as UserResponse, t as User } from "../../user.interface-CSksrToF.cjs";
|
|
14
|
-
import { n as AuthenticationResponseResponse, t as AuthenticationResponse } from "../../authentication-response.interface-
|
|
15
|
-
import { a as AuthenticateWithSessionCookieSuccessResponse, i as AuthenticateWithSessionCookieOptions, n as AuthenticateWithSessionCookieFailedResponse, o as SessionCookieData, r as AuthenticateWithSessionCookieFailureReason, t as AccessToken } from "../../authenticate-with-session-cookie.interface
|
|
14
|
+
import { n as AuthenticationResponseResponse, t as AuthenticationResponse } from "../../authentication-response.interface-m3ftdeH0.cjs";
|
|
15
|
+
import { a as AuthenticateWithSessionCookieSuccessResponse, i as AuthenticateWithSessionCookieOptions, n as AuthenticateWithSessionCookieFailedResponse, o as SessionCookieData, r as AuthenticateWithSessionCookieFailureReason, t as AccessToken } from "../../authenticate-with-session-cookie.interface-B7cOhTzF.cjs";
|
|
16
16
|
import { n as AuthenticateWithTotpOptions, r as SerializedAuthenticateWithTotpOptions, t as AuthenticateUserWithTotpCredentials } from "../../authenticate-with-totp-options.interface-CBZmKTjf.cjs";
|
|
17
17
|
import { n as AuthenticationEventResponse, t as AuthenticationEvent } from "../../authentication-event.interface-Bf03cz-8.cjs";
|
|
18
18
|
import { n as AuthenticationRadarRiskDetectedEventResponseData, t as AuthenticationRadarRiskDetectedEventData } from "../../authentication-radar-risk-detected-event.interface-B4L-0H-B.cjs";
|
|
@@ -32,13 +32,13 @@ import { t as Locale } from "../../locale.interface-BDuI7VXX.cjs";
|
|
|
32
32
|
import { t as LogoutURLOptions } from "../../logout-url-options.interface-BOLd7ZRi.cjs";
|
|
33
33
|
import { i as MagicAuthResponse, n as MagicAuthEvent, r as MagicAuthEventResponse, t as MagicAuth } from "../../magic-auth.interface-DGn4_Ctk.cjs";
|
|
34
34
|
import { i as PasswordResetResponse, n as PasswordResetEvent, r as PasswordResetEventResponse, t as PasswordReset } from "../../password-reset.interface-5Hk5_t85.cjs";
|
|
35
|
-
import { n as RefreshSessionResponse, t as RefreshSessionFailureReason } from "../../refresh-and-seal-session-data.interface-
|
|
35
|
+
import { n as RefreshSessionResponse, t as RefreshSessionFailureReason } from "../../refresh-and-seal-session-data.interface-B_CoeTQF.cjs";
|
|
36
36
|
import { n as SerializedResendInvitationOptions, t as ResendInvitationOptions } from "../../resend-invitation-options.interface-5-DjRWwi.cjs";
|
|
37
37
|
import { n as SerializedResetPasswordOptions, t as ResetPasswordOptions } from "../../reset-password-options.interface-DR1PHcVr.cjs";
|
|
38
38
|
import { n as SerializedRevokeSessionOptions, r as serializeRevokeSessionOptions, t as RevokeSessionOptions } from "../../revoke-session-options.interface-BW7f0pb7.cjs";
|
|
39
39
|
import { n as SerializedSendInvitationOptions, t as SendInvitationOptions } from "../../send-invitation-options.interface-DtIC4uoS.cjs";
|
|
40
40
|
import { t as SendVerificationEmailOptions } from "../../send-verification-email-options.interface-IMaY7OHw.cjs";
|
|
41
|
-
import { i as SessionStatus, n as Session, r as SessionResponse, t as AuthMethod } from "../../session.interface-
|
|
41
|
+
import { i as SessionStatus, n as Session, r as SessionResponse, t as AuthMethod } from "../../session.interface-gNED15L3.cjs";
|
|
42
42
|
import { n as UpdateOrganizationMembershipOptions, t as SerializedUpdateOrganizationMembershipOptions } from "../../update-organization-membership-options.interface-CBFTtRh2.cjs";
|
|
43
43
|
import { n as UpdateUserOptions, t as SerializedUpdateUserOptions } from "../../update-user-options.interface-CzrbRCX7.cjs";
|
|
44
44
|
import { n as UpdateUserPasswordOptions, t as SerializedUpdateUserPasswordOptions } from "../../update-user-password-options.interface-CN6_YJse.cjs";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Jn as ListAuthFactorsOptions } from "../../index-
|
|
1
|
+
import { Jn as ListAuthFactorsOptions } from "../../index-DMn9159G.cjs";
|
|
2
2
|
export { ListAuthFactorsOptions };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Kn as ListInvitationsOptions, qn as SerializedListInvitationsOptions } from "../../index-
|
|
1
|
+
import { Kn as ListInvitationsOptions, qn as SerializedListInvitationsOptions } from "../../index-DMn9159G.cjs";
|
|
2
2
|
export { ListInvitationsOptions, SerializedListInvitationsOptions };
|
package/lib/user-management/interfaces/list-organization-memberships-options.interface.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Fn as ListOrganizationMembershipsOptions, In as SerializedListOrganizationMembershipsOptions } from "../../index-
|
|
1
|
+
import { Fn as ListOrganizationMembershipsOptions, In as SerializedListOrganizationMembershipsOptions } from "../../index-DMn9159G.cjs";
|
|
2
2
|
export { ListOrganizationMembershipsOptions, SerializedListOrganizationMembershipsOptions };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Pn as ListUserFeatureFlagsOptions } from "../../index-
|
|
1
|
+
import { Pn as ListUserFeatureFlagsOptions } from "../../index-DMn9159G.cjs";
|
|
2
2
|
export { ListUserFeatureFlagsOptions };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Bn as AuthorizationOrganizationMembershipResponse, Gn as OrganizationMembershipStatus, Hn as BaseOrganizationMembershipResponse, Ln as AuthorizationOrganizationMembership, Rn as AuthorizationOrganizationMembershipList, Un as OrganizationMembership, Vn as BaseOrganizationMembership, Wn as OrganizationMembershipResponse, zn as AuthorizationOrganizationMembershipListResponse } from "../../index-
|
|
1
|
+
import { Bn as AuthorizationOrganizationMembershipResponse, Gn as OrganizationMembershipStatus, Hn as BaseOrganizationMembershipResponse, Ln as AuthorizationOrganizationMembership, Rn as AuthorizationOrganizationMembershipList, Un as OrganizationMembership, Vn as BaseOrganizationMembership, Wn as OrganizationMembershipResponse, zn as AuthorizationOrganizationMembershipListResponse } from "../../index-DMn9159G.cjs";
|
|
2
2
|
export { AuthorizationOrganizationMembership, AuthorizationOrganizationMembershipList, AuthorizationOrganizationMembershipListResponse, AuthorizationOrganizationMembershipResponse, BaseOrganizationMembership, BaseOrganizationMembershipResponse, OrganizationMembership, OrganizationMembershipResponse, OrganizationMembershipStatus };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as RefreshSessionResponse, t as RefreshSessionFailureReason } from "../../refresh-and-seal-session-data.interface-
|
|
1
|
+
import { n as RefreshSessionResponse, t as RefreshSessionFailureReason } from "../../refresh-and-seal-session-data.interface-B_CoeTQF.cjs";
|
|
2
2
|
export { RefreshSessionFailureReason, RefreshSessionResponse };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as SessionStatus, n as Session, r as SessionResponse, t as AuthMethod } from "../../session.interface-
|
|
1
|
+
import { i as SessionStatus, n as Session, r as SessionResponse, t as AuthMethod } from "../../session.interface-gNED15L3.cjs";
|
|
2
2
|
export { AuthMethod, Session, SessionResponse, SessionStatus };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Impersonator } from "./impersonator.interface.js";
|
|
2
2
|
|
|
3
3
|
//#region src/user-management/interfaces/session.interface.d.ts
|
|
4
|
-
type AuthMethod = 'external_auth' | 'impersonation' | 'magic_code' | 'migrated_session' | 'oauth' | 'passkey' | 'password' | 'sso' | 'unknown';
|
|
4
|
+
type AuthMethod = 'cross_app_auth' | 'external_auth' | 'impersonation' | 'magic_code' | 'migrated_session' | 'oauth' | 'passkey' | 'password' | 'sso' | 'unknown';
|
|
5
5
|
type SessionStatus = 'active' | 'expired' | 'revoked';
|
|
6
6
|
interface Session {
|
|
7
7
|
object: 'session';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as deserializeAuthenticationResponse } from "../../authentication-response.serializer-
|
|
1
|
+
import { t as deserializeAuthenticationResponse } from "../../authentication-response.serializer-QesVvEKA.cjs";
|
|
2
2
|
export { deserializeAuthenticationResponse };
|
|
@@ -6,7 +6,7 @@ import { t as serializeAuthenticateWithRefreshTokenPublicClientOptions } from ".
|
|
|
6
6
|
import { t as serializeAuthenticateWithRefreshTokenOptions } from "../../authenticate-with-refresh-token.options.serializer-CXsmQ8PX.cjs";
|
|
7
7
|
import { t as serializeAuthenticateWithTotpOptions } from "../../authenticate-with-totp-options.serializer-D9zV4n4M.cjs";
|
|
8
8
|
import { t as deserializeAuthenticationEvent } from "../../authentication-event.serializer-CNGLraV3.cjs";
|
|
9
|
-
import { t as deserializeAuthenticationResponse } from "../../authentication-response.serializer-
|
|
9
|
+
import { t as deserializeAuthenticationResponse } from "../../authentication-response.serializer-QesVvEKA.cjs";
|
|
10
10
|
import { t as serializeCreateMagicAuthOptions } from "../../create-magic-auth-options.serializer-AED3cEHj.cjs";
|
|
11
11
|
import { t as serializeCreatePasswordResetOptions } from "../../create-password-reset-options.serializer-uVAM5C0R.cjs";
|
|
12
12
|
import { t as serializeCreateUserOptions } from "../../create-user-options.serializer-emvIoxXk.cjs";
|
|
@@ -18,7 +18,7 @@ import { t as serializeListSessionsOptions } from "../../list-sessions-options.s
|
|
|
18
18
|
import { n as deserializeMagicAuthEvent, t as deserializeMagicAuth } from "../../magic-auth.serializer-Cmv0WqFM.cjs";
|
|
19
19
|
import { n as deserializePasswordResetEvent, t as deserializePasswordReset } from "../../password-reset.serializer-C_NzVwDv.cjs";
|
|
20
20
|
import { t as serializeResetPasswordOptions } from "../../reset-password-options.serializer-B-yKukZL.cjs";
|
|
21
|
-
import { t as deserializeSession } from "../../session.serializer-
|
|
21
|
+
import { t as deserializeSession } from "../../session.serializer-CdQMlueA.cjs";
|
|
22
22
|
import { t as serializeUpdateUserOptions } from "../../update-user-options.serializer-C7da_R08.cjs";
|
|
23
23
|
import { t as serializeUpdateUserPasswordOptions } from "../../update-user-password-options.serializer-D67Lr4m1.cjs";
|
|
24
24
|
import { t as deserializeUser } from "../../user.serializer-BFpDaajW.cjs";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Kn as ListInvitationsOptions, qn as SerializedListInvitationsOptions } from "../../index-
|
|
1
|
+
import { Kn as ListInvitationsOptions, qn as SerializedListInvitationsOptions } from "../../index-DMn9159G.cjs";
|
|
2
2
|
|
|
3
3
|
//#region src/user-management/serializers/list-invitations-options.serializer.d.ts
|
|
4
4
|
declare const serializeListInvitationsOptions: (options: ListInvitationsOptions) => SerializedListInvitationsOptions;
|
package/lib/user-management/serializers/list-organization-memberships-options.serializer.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Fn as ListOrganizationMembershipsOptions, In as SerializedListOrganizationMembershipsOptions } from "../../index-
|
|
1
|
+
import { Fn as ListOrganizationMembershipsOptions, In as SerializedListOrganizationMembershipsOptions } from "../../index-DMn9159G.cjs";
|
|
2
2
|
|
|
3
3
|
//#region src/user-management/serializers/list-organization-memberships-options.serializer.d.ts
|
|
4
4
|
declare const serializeListOrganizationMembershipsOptions: (options: ListOrganizationMembershipsOptions) => SerializedListOrganizationMembershipsOptions;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Bn as AuthorizationOrganizationMembershipResponse, Ln as AuthorizationOrganizationMembership, Un as OrganizationMembership, Wn as OrganizationMembershipResponse } from "../../index-
|
|
1
|
+
import { Bn as AuthorizationOrganizationMembershipResponse, Ln as AuthorizationOrganizationMembership, Un as OrganizationMembership, Wn as OrganizationMembershipResponse } from "../../index-DMn9159G.cjs";
|
|
2
2
|
|
|
3
3
|
//#region src/user-management/serializers/organization-membership.serializer.d.ts
|
|
4
4
|
declare const deserializeOrganizationMembership: (organizationMembership: OrganizationMembershipResponse) => OrganizationMembership;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { lr as RoleEvent, ur as RoleEventResponse } from "../../index-
|
|
1
|
+
import { lr as RoleEvent, ur as RoleEventResponse } from "../../index-DMn9159G.cjs";
|
|
2
2
|
|
|
3
3
|
//#region src/user-management/serializers/role.serializer.d.ts
|
|
4
4
|
declare const deserializeRoleEvent: (role: RoleEventResponse) => RoleEvent;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as deserializeSession } from "../../session.serializer-
|
|
1
|
+
import { t as deserializeSession } from "../../session.serializer-CdQMlueA.cjs";
|
|
2
2
|
export { deserializeSession };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { g as CookieSession } from "../api-keys-
|
|
1
|
+
import { g as CookieSession } from "../api-keys-Dm4rmZx0.cjs";
|
|
2
2
|
export { CookieSession };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { h as UserManagement } from "../api-keys-
|
|
1
|
+
import { h as UserManagement } from "../api-keys-Dm4rmZx0.cjs";
|
|
2
2
|
export { UserManagement };
|
package/lib/vault/vault.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { r as Vault } from "../api-keys-
|
|
1
|
+
import { r as Vault } from "../api-keys-Dm4rmZx0.cjs";
|
|
2
2
|
export { Vault };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as Webhooks } from "../webhooks-
|
|
1
|
+
import { t as Webhooks } from "../webhooks-mSGRW8EE.cjs";
|
|
2
2
|
export { Webhooks };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as CryptoProvider } from "./crypto-provider-EnxiazDt.cjs";
|
|
2
|
-
import { ct as Event } from "./index-
|
|
2
|
+
import { ct as Event } from "./index-DMn9159G.cjs";
|
|
3
3
|
|
|
4
4
|
//#region src/webhooks/webhooks.d.ts
|
|
5
5
|
declare class Webhooks {
|
|
@@ -32,4 +32,4 @@ declare class Webhooks {
|
|
|
32
32
|
}
|
|
33
33
|
//#endregion
|
|
34
34
|
export { Webhooks as t };
|
|
35
|
-
//# sourceMappingURL=webhooks-
|
|
35
|
+
//# sourceMappingURL=webhooks-mSGRW8EE.d.cts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as WidgetScope, i as SerializedGetTokenOptions, n as GetTokenResponse, o as deserializeGetTokenResponse, r as GetTokenResponseResponse, s as serializeGetTokenOptions, t as GetTokenOptions } from "../../get-token-
|
|
1
|
+
import { a as WidgetScope, i as SerializedGetTokenOptions, n as GetTokenResponse, o as deserializeGetTokenResponse, r as GetTokenResponseResponse, s as serializeGetTokenOptions, t as GetTokenOptions } from "../../get-token-CZxt-NOl.cjs";
|
|
2
2
|
export { GetTokenOptions, GetTokenResponse, GetTokenResponseResponse, SerializedGetTokenOptions, WidgetScope, deserializeGetTokenResponse, serializeGetTokenOptions };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
//#region src/widgets/interfaces/get-token.d.ts
|
|
2
|
-
type WidgetScope = 'widgets:users-table:manage' | 'widgets:sso:manage' | 'widgets:domain-verification:manage' | 'widgets:api-keys:manage';
|
|
2
|
+
type WidgetScope = 'widgets:users-table:manage' | 'widgets:sso:manage' | 'widgets:domain-verification:manage' | 'widgets:dsync:manage' | 'widgets:api-keys:manage' | 'widgets:audit-log-streaming:manage';
|
|
3
3
|
interface GetTokenOptions {
|
|
4
4
|
organizationId: string;
|
|
5
5
|
userId?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-token.js","names":[],"sources":["../../../src/widgets/interfaces/get-token.ts"],"sourcesContent":["export type WidgetScope =\n | 'widgets:users-table:manage'\n | 'widgets:sso:manage'\n | 'widgets:domain-verification:manage'\n | 'widgets:api-keys:manage';\nexport interface GetTokenOptions {\n organizationId: string;\n userId?: string;\n scopes?: WidgetScope[];\n}\n\nexport interface SerializedGetTokenOptions {\n organization_id: string;\n user_id?: string;\n scopes?: WidgetScope[];\n}\n\nexport const serializeGetTokenOptions = (\n options: GetTokenOptions,\n): SerializedGetTokenOptions => ({\n organization_id: options.organizationId,\n user_id: options.userId,\n scopes: options.scopes,\n});\n\nexport interface GetTokenResponse {\n token: string;\n}\n\nexport interface GetTokenResponseResponse {\n token: string;\n}\n\nexport const deserializeGetTokenResponse = (\n data: GetTokenResponseResponse,\n): GetTokenResponse => ({\n token: data.token,\n});\n"],"mappings":";
|
|
1
|
+
{"version":3,"file":"get-token.js","names":[],"sources":["../../../src/widgets/interfaces/get-token.ts"],"sourcesContent":["export type WidgetScope =\n | 'widgets:users-table:manage'\n | 'widgets:sso:manage'\n | 'widgets:domain-verification:manage'\n | 'widgets:dsync:manage'\n | 'widgets:api-keys:manage'\n | 'widgets:audit-log-streaming:manage';\nexport interface GetTokenOptions {\n organizationId: string;\n userId?: string;\n scopes?: WidgetScope[];\n}\n\nexport interface SerializedGetTokenOptions {\n organization_id: string;\n user_id?: string;\n scopes?: WidgetScope[];\n}\n\nexport const serializeGetTokenOptions = (\n options: GetTokenOptions,\n): SerializedGetTokenOptions => ({\n organization_id: options.organizationId,\n user_id: options.userId,\n scopes: options.scopes,\n});\n\nexport interface GetTokenResponse {\n token: string;\n}\n\nexport interface GetTokenResponseResponse {\n token: string;\n}\n\nexport const deserializeGetTokenResponse = (\n data: GetTokenResponseResponse,\n): GetTokenResponse => ({\n token: data.token,\n});\n"],"mappings":";AAmBA,MAAa,4BACX,aAC+B;CAC/B,iBAAiB,QAAQ;CACzB,SAAS,QAAQ;CACjB,QAAQ,QAAQ;CACjB;AAUD,MAAa,+BACX,UACsB,EACtB,OAAO,KAAK,OACb"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { f as Widgets } from "../api-keys-
|
|
1
|
+
import { f as Widgets } from "../api-keys-Dm4rmZx0.cjs";
|
|
2
2
|
export { Widgets };
|
|
@@ -35,7 +35,7 @@ const require_conflict_exception = require('./conflict.exception-DNThkhe4.cjs');
|
|
|
35
35
|
const require_runtime_info = require('./runtime-info-D11Gtx8I.cjs');
|
|
36
36
|
|
|
37
37
|
//#region package.json
|
|
38
|
-
var version = "8.
|
|
38
|
+
var version = "8.8.0";
|
|
39
39
|
|
|
40
40
|
//#endregion
|
|
41
41
|
//#region src/workos.ts
|
|
@@ -344,4 +344,4 @@ Object.defineProperty(exports, 'WorkOS', {
|
|
|
344
344
|
return WorkOS;
|
|
345
345
|
}
|
|
346
346
|
});
|
|
347
|
-
//# sourceMappingURL=workos-
|
|
347
|
+
//# sourceMappingURL=workos-DXlhXDRn.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workos-2uUDl0FZ.cjs","names":["ApiKeys","AuditLogs","Authorization","DirectorySync","Events","FeatureFlags","FGA","Mfa","Organizations","OrganizationDomains","Passwordless","Pipes","Portal","SSO","Vault","Widgets","getEnv","protocol: string","apiHostname: string","port: number | undefined","PKCE","UserManagement","userAgent: string","VERSION","getRuntimeInfo","version","Webhooks","Actions","SubtleCryptoProvider","headers: Record<string, string>","FetchHttpClient","ApiKeyRequiredException","requestHeaders: Record<string, string>","res: HttpClientResponseInterface","ParseError","HttpClientError","UnauthorizedException","ConflictException","UnprocessableEntityException","NotFoundException","RateLimitExceededException","error","OauthException","BadRequestException","GenericServerException"],"sources":["../package.json","../src/workos.ts"],"sourcesContent":["{\n \"version\": \"8.7.0\",\n \"name\": \"@workos-inc/node\",\n \"author\": \"WorkOS\",\n \"description\": \"A Node wrapper for the WorkOS API\",\n \"homepage\": \"https://github.com/workos/workos-node\",\n \"license\": \"MIT\",\n \"keywords\": [\n \"workos\"\n ],\n \"engines\": {\n \"node\": \">=20.15.0\"\n },\n \"type\": \"module\",\n \"main\": \"./lib/index.cjs\",\n \"module\": \"./lib/index.js\",\n \"types\": \"./lib/index.d.ts\",\n \"files\": [\n \"lib/\",\n \"package.json\"\n ],\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"git+https://github.com/workos/workos-node.git\"\n },\n \"bugs\": {\n \"url\": \"https://github.com/workos/workos-node/issues\"\n },\n \"scripts\": {\n \"clean\": \"rm -rf lib\",\n \"build\": \"tsdown\",\n \"build:watch\": \"tsdown --watch\",\n \"lint\": \"eslint\",\n \"test\": \"jest\",\n \"test:watch\": \"jest --watch\",\n \"check:runtimes\": \"tsx scripts/ecosystem-check.ts\",\n \"check:types\": \"attw --pack . --ignore-rules no-resolution\",\n \"prettier\": \"prettier \\\"src/**/*.{js,ts,tsx}\\\" --check\",\n \"format\": \"prettier \\\"src/**/*.{js,ts,tsx}\\\" --write\",\n \"prepublishOnly\": \"npm run build\",\n \"typecheck\": \"tsc --noEmit\"\n },\n \"dependencies\": {\n \"iron-webcrypto\": \"^2.0.0\",\n \"jose\": \"~6.1.0\"\n },\n \"devDependencies\": {\n \"@arethetypeswrong/cli\": \"^0.18.2\",\n \"@babel/plugin-transform-modules-commonjs\": \"^7.26.3\",\n \"@babel/preset-env\": \"^7.26.9\",\n \"@babel/preset-typescript\": \"^7.27.0\",\n \"@eslint/js\": \"^9.37.0\",\n \"@types/jest\": \"^30.0.0\",\n \"@types/node\": \"~20\",\n \"@typescript-eslint/parser\": \"^8.46.0\",\n \"babel-jest\": \"^30.2.0\",\n \"eslint\": \"^9.37.0\",\n \"eslint-plugin-jest\": \"^29.0.1\",\n \"eslint-plugin-n\": \"^17.23.1\",\n \"jest\": \"30.2.0\",\n \"jest-environment-miniflare\": \"^2.14.2\",\n \"jest-fetch-mock\": \"^3.0.3\",\n \"miniflare\": \"^4.20251004.0\",\n \"prettier\": \"^3.5.3\",\n \"tsdown\": \"^0.17.0\",\n \"tsx\": \"^4.20.6\",\n \"typescript\": \"5.9.3\",\n \"typescript-eslint\": \"^8.46.0\"\n },\n \"exports\": {\n \".\": {\n \"workerd\": {\n \"types\": \"./lib/index.worker.d.ts\",\n \"import\": \"./lib/index.worker.js\",\n \"require\": \"./lib/index.worker.cjs\"\n },\n \"edge-light\": {\n \"types\": \"./lib/index.worker.d.ts\",\n \"import\": \"./lib/index.worker.js\",\n \"require\": \"./lib/index.worker.cjs\"\n },\n \"deno\": {\n \"types\": \"./lib/index.d.ts\",\n \"default\": \"./lib/index.js\"\n },\n \"bun\": {\n \"types\": \"./lib/index.d.ts\",\n \"import\": \"./lib/index.js\",\n \"require\": \"./lib/index.cjs\"\n },\n \"convex\": {\n \"types\": \"./lib/index.worker.d.ts\",\n \"import\": \"./lib/index.worker.js\",\n \"default\": \"./lib/index.worker.cjs\"\n },\n \"import\": {\n \"types\": \"./lib/index.d.ts\",\n \"default\": \"./lib/index.js\"\n },\n \"require\": {\n \"types\": \"./lib/index.d.cts\",\n \"default\": \"./lib/index.cjs\"\n },\n \"default\": \"./lib/index.js\"\n },\n \"./worker\": {\n \"import\": {\n \"types\": \"./lib/index.worker.d.ts\",\n \"default\": \"./lib/index.worker.js\"\n },\n \"require\": {\n \"types\": \"./lib/index.worker.d.cts\",\n \"default\": \"./lib/index.worker.cjs\"\n },\n \"default\": \"./lib/index.worker.js\"\n },\n \"./package.json\": \"./package.json\"\n }\n}\n","import {\n ApiKeyRequiredException,\n GenericServerException,\n NotFoundException,\n UnauthorizedException,\n UnprocessableEntityException,\n OauthException,\n RateLimitExceededException,\n} from './common/exceptions';\nimport { PKCE } from './pkce/pkce';\nimport {\n GetOptions,\n HttpClientResponseInterface,\n PatchOptions,\n PostOptions,\n PutOptions,\n WorkOSOptions,\n WorkOSResponseError,\n} from './common/interfaces';\nimport { ApiKeys } from './api-keys/api-keys';\nimport { DirectorySync } from './directory-sync/directory-sync';\nimport { Events } from './events/events';\nimport { Organizations } from './organizations/organizations';\nimport { OrganizationDomains } from './organization-domains/organization-domains';\nimport { Passwordless } from './passwordless/passwordless';\nimport { Pipes } from './pipes/pipes';\nimport { Portal } from './portal/portal';\nimport { SSO } from './sso/sso';\nimport { Webhooks } from './webhooks/webhooks';\nimport { Mfa } from './mfa/mfa';\nimport { AuditLogs } from './audit-logs/audit-logs';\nimport { UserManagement } from './user-management/user-management';\nimport { FGA } from './fga/fga';\nimport { BadRequestException } from './common/exceptions/bad-request.exception';\nimport { FeatureFlags } from './feature-flags/feature-flags';\n\nimport { HttpClient, HttpClientError } from './common/net/http-client';\nimport { SubtleCryptoProvider } from './common/crypto/subtle-crypto-provider';\nimport { FetchHttpClient } from './common/net/fetch-client';\nimport { Widgets } from './widgets/widgets';\nimport { Actions } from './actions/actions';\nimport { Authorization } from './authorization/authorization';\nimport { Vault } from './vault/vault';\nimport { ConflictException } from './common/exceptions/conflict.exception';\nimport { CryptoProvider } from './common/crypto/crypto-provider';\nimport { ParseError } from './common/exceptions/parse-error';\nimport { getEnv } from './common/utils/env';\nimport { getRuntimeInfo } from './common/utils/runtime-info';\nimport { version as VERSION } from '../package.json' with { type: 'json' };\n\nconst DEFAULT_HOSTNAME = 'api.workos.com';\n\nconst HEADER_AUTHORIZATION = 'Authorization';\nconst HEADER_IDEMPOTENCY_KEY = 'Idempotency-Key';\nconst HEADER_WARRANT_TOKEN = 'Warrant-Token';\n\nexport class WorkOS {\n readonly baseURL: string;\n readonly client: HttpClient;\n readonly clientId?: string;\n readonly key?: string;\n readonly options: WorkOSOptions;\n readonly pkce: PKCE;\n\n private readonly hasApiKey: boolean;\n\n readonly actions: Actions;\n readonly apiKeys = new ApiKeys(this);\n readonly auditLogs = new AuditLogs(this);\n readonly authorization = new Authorization(this);\n readonly directorySync = new DirectorySync(this);\n readonly events = new Events(this);\n readonly featureFlags = new FeatureFlags(this);\n readonly fga = new FGA(this);\n readonly mfa = new Mfa(this);\n readonly organizations = new Organizations(this);\n readonly organizationDomains = new OrganizationDomains(this);\n readonly passwordless = new Passwordless(this);\n readonly pipes = new Pipes(this);\n readonly portal = new Portal(this);\n readonly sso = new SSO(this);\n readonly userManagement: UserManagement;\n readonly vault = new Vault(this);\n readonly webhooks: Webhooks;\n readonly widgets = new Widgets(this);\n\n /**\n * Create a new WorkOS client.\n *\n * @param keyOrOptions - API key string, or options object\n * @param maybeOptions - Options when first argument is API key\n *\n * @example\n * // Server-side with API key (string)\n * const workos = new WorkOS('sk_...');\n *\n * @example\n * // Server-side with API key (object)\n * const workos = new WorkOS({ apiKey: 'sk_...', clientId: 'client_...' });\n *\n * @example\n * // PKCE/public client (no API key)\n * const workos = new WorkOS({ clientId: 'client_...' });\n */\n constructor(\n keyOrOptions?: string | WorkOSOptions,\n maybeOptions?: WorkOSOptions,\n ) {\n if (typeof keyOrOptions === 'object') {\n this.key = keyOrOptions.apiKey;\n this.options = keyOrOptions;\n } else {\n this.key = keyOrOptions;\n this.options = maybeOptions ?? {};\n }\n\n if (!this.key) {\n this.key = getEnv('WORKOS_API_KEY');\n }\n\n this.hasApiKey = !!this.key;\n\n if (this.options.https === undefined) {\n this.options.https = true;\n }\n\n this.clientId = this.options.clientId;\n if (!this.clientId) {\n this.clientId = getEnv('WORKOS_CLIENT_ID');\n }\n\n if (!this.hasApiKey && !this.clientId) {\n throw new Error(\n 'WorkOS requires either an API key or a clientId. ' +\n 'For server-side: new WorkOS(\"sk_...\") or new WorkOS({ apiKey: \"sk_...\" }). ' +\n 'For PKCE/public clients: new WorkOS({ clientId: \"client_...\" })',\n );\n }\n\n const protocol: string = this.options.https ? 'https' : 'http';\n const apiHostname: string = this.options.apiHostname || DEFAULT_HOSTNAME;\n const port: number | undefined = this.options.port;\n this.baseURL = `${protocol}://${apiHostname}`;\n\n if (port) {\n this.baseURL = this.baseURL + `:${port}`;\n }\n\n this.pkce = new PKCE();\n\n this.webhooks = this.createWebhookClient();\n this.actions = this.createActionsClient();\n\n // Must initialize UserManagement after baseURL is configured\n this.userManagement = new UserManagement(this);\n\n const userAgent = this.createUserAgent(this.options);\n\n this.client = this.createHttpClient(this.options, userAgent);\n }\n\n private createUserAgent(options: WorkOSOptions): string {\n let userAgent: string = `workos-node/${VERSION}`;\n\n const { name: runtimeName, version: runtimeVersion } = getRuntimeInfo();\n userAgent += ` (${runtimeName}${runtimeVersion ? `/${runtimeVersion}` : ''})`;\n\n if (options.appInfo) {\n const { name, version } = options.appInfo;\n userAgent += ` ${name}: ${version}`;\n }\n\n return userAgent;\n }\n\n createWebhookClient() {\n return new Webhooks(this.getCryptoProvider());\n }\n\n createActionsClient() {\n return new Actions(this.getCryptoProvider());\n }\n\n getCryptoProvider(): CryptoProvider {\n return new SubtleCryptoProvider();\n }\n\n createHttpClient(options: WorkOSOptions, userAgent: string) {\n const headers: Record<string, string> = {\n 'User-Agent': userAgent,\n };\n\n const configHeaders = options.config?.headers;\n if (\n configHeaders &&\n typeof configHeaders === 'object' &&\n !Array.isArray(configHeaders) &&\n !(configHeaders instanceof Headers)\n ) {\n Object.assign(headers, configHeaders);\n }\n\n if (this.key) {\n headers['Authorization'] = `Bearer ${this.key}`;\n }\n\n return new FetchHttpClient(this.baseURL, {\n ...options.config,\n timeout: options.timeout,\n headers,\n }) as HttpClient;\n }\n\n get version() {\n return VERSION;\n }\n\n /**\n * Require API key for methods that need it.\n * @param methodName - Name of the method requiring API key (for error message)\n * @throws ApiKeyRequiredException if no API key was provided\n */\n requireApiKey(methodName: string): void {\n if (!this.hasApiKey) {\n throw new ApiKeyRequiredException(methodName);\n }\n }\n\n async post<Result = any, Entity = any>(\n path: string,\n entity: Entity,\n options: PostOptions = {},\n ): Promise<{ data: Result }> {\n if (!options.skipApiKeyCheck) {\n this.requireApiKey(path);\n }\n\n const requestHeaders: Record<string, string> = {};\n\n if (options.idempotencyKey) {\n requestHeaders[HEADER_IDEMPOTENCY_KEY] = options.idempotencyKey;\n }\n\n if (options.warrantToken) {\n requestHeaders[HEADER_WARRANT_TOKEN] = options.warrantToken;\n }\n\n let res: HttpClientResponseInterface;\n\n try {\n res = await this.client.post<Entity>(path, entity, {\n params: options.query,\n headers: requestHeaders,\n });\n } catch (error) {\n this.handleHttpError({ path, error });\n throw error;\n }\n\n try {\n return { data: await res.toJSON() };\n } catch (error) {\n await this.handleParseError(error, res);\n throw error;\n }\n }\n\n async get<Result = any>(\n path: string,\n options: GetOptions = {},\n ): Promise<{ data: Result }> {\n if (!options.skipApiKeyCheck) {\n this.requireApiKey(path);\n }\n\n const requestHeaders: Record<string, string> = {};\n\n if (options.accessToken) {\n requestHeaders[HEADER_AUTHORIZATION] = `Bearer ${options.accessToken}`;\n }\n\n if (options.warrantToken) {\n requestHeaders[HEADER_WARRANT_TOKEN] = options.warrantToken;\n }\n\n let res: HttpClientResponseInterface;\n try {\n res = await this.client.get(path, {\n params: options.query,\n headers: requestHeaders,\n });\n } catch (error) {\n this.handleHttpError({ path, error });\n\n throw error;\n }\n\n try {\n return { data: await res.toJSON() };\n } catch (error) {\n await this.handleParseError(error, res);\n throw error;\n }\n }\n\n async put<Result = any, Entity = any>(\n path: string,\n entity: Entity,\n options: PutOptions = {},\n ): Promise<{ data: Result }> {\n if (!options.skipApiKeyCheck) {\n this.requireApiKey(path);\n }\n\n const requestHeaders: Record<string, string> = {};\n\n if (options.idempotencyKey) {\n requestHeaders[HEADER_IDEMPOTENCY_KEY] = options.idempotencyKey;\n }\n\n let res: HttpClientResponseInterface;\n\n try {\n res = await this.client.put<Entity>(path, entity, {\n params: options.query,\n headers: requestHeaders,\n });\n } catch (error) {\n this.handleHttpError({ path, error });\n\n throw error;\n }\n\n try {\n return { data: await res.toJSON() };\n } catch (error) {\n await this.handleParseError(error, res);\n throw error;\n }\n }\n\n async patch<Result = any, Entity = any>(\n path: string,\n entity: Entity,\n options: PatchOptions = {},\n ): Promise<{ data: Result }> {\n if (!options.skipApiKeyCheck) {\n this.requireApiKey(path);\n }\n\n const requestHeaders: Record<string, string> = {};\n\n if (options.idempotencyKey) {\n requestHeaders[HEADER_IDEMPOTENCY_KEY] = options.idempotencyKey;\n }\n\n let res: HttpClientResponseInterface;\n\n try {\n res = await this.client.patch<Entity>(path, entity, {\n params: options.query,\n headers: requestHeaders,\n });\n } catch (error) {\n this.handleHttpError({ path, error });\n\n throw error;\n }\n\n try {\n return { data: await res.toJSON() };\n } catch (error) {\n await this.handleParseError(error, res);\n throw error;\n }\n }\n\n async delete(path: string, query?: any): Promise<void> {\n this.requireApiKey(path);\n\n try {\n await this.client.delete(path, {\n params: query,\n });\n } catch (error) {\n this.handleHttpError({ path, error });\n\n throw error;\n }\n }\n\n async deleteWithBody<Entity = any>(\n path: string,\n entity: Entity,\n ): Promise<void> {\n this.requireApiKey(path);\n\n try {\n await this.client.deleteWithBody(path, entity, {});\n } catch (error) {\n this.handleHttpError({ path, error });\n\n throw error;\n }\n }\n\n emitWarning(warning: string) {\n // tslint:disable-next-line:no-console\n console.warn(`WorkOS: ${warning}`);\n }\n\n private async handleParseError(\n error: unknown,\n res: HttpClientResponseInterface,\n ) {\n if (error instanceof SyntaxError) {\n const rawResponse = res.getRawResponse() as Response;\n const requestID = rawResponse.headers.get('X-Request-ID') ?? '';\n const rawStatus = rawResponse.status;\n const rawBody = await rawResponse.text();\n throw new ParseError({\n message: error.message,\n rawBody,\n rawStatus,\n requestID,\n });\n }\n }\n\n private handleHttpError({ path, error }: { path: string; error: unknown }) {\n if (!(error instanceof HttpClientError)) {\n throw new Error(`Unexpected error: ${error}`, { cause: error });\n }\n\n const { response } = error as HttpClientError<WorkOSResponseError>;\n\n if (response) {\n const { status, data, headers } = response;\n\n const requestID = headers['X-Request-ID'] ?? '';\n const {\n code,\n error_description: errorDescription,\n error,\n errors,\n message,\n } = data;\n\n switch (status) {\n case 401: {\n throw new UnauthorizedException(requestID);\n }\n case 409: {\n throw new ConflictException({ requestID, message, error });\n }\n case 422: {\n throw new UnprocessableEntityException({\n code,\n errors,\n message,\n requestID,\n });\n }\n case 404: {\n throw new NotFoundException({\n code,\n message,\n path,\n requestID,\n });\n }\n case 429: {\n const retryAfter = headers.get('Retry-After');\n\n throw new RateLimitExceededException(\n data.message,\n requestID,\n retryAfter ? Number(retryAfter) : null,\n );\n }\n default: {\n if (error || errorDescription) {\n throw new OauthException(\n status,\n requestID,\n error,\n errorDescription,\n data,\n );\n } else if (code && errors) {\n // Note: ideally this should be mapped directly with a `400` status code.\n // However, this would break existing logic for the `OauthException` exception.\n throw new BadRequestException({\n code,\n errors,\n message,\n requestID,\n });\n } else {\n throw new GenericServerException(\n status,\n data.message,\n data,\n requestID,\n );\n }\n }\n }\n }\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cACa;;;;ACiDb,MAAM,mBAAmB;AAEzB,MAAM,uBAAuB;AAC7B,MAAM,yBAAyB;AAC/B,MAAM,uBAAuB;AAE7B,IAAa,SAAb,MAAoB;CAClB,AAAS;CACT,AAAS;CACT,AAAS;CACT,AAAS;CACT,AAAS;CACT,AAAS;CAET,AAAiB;CAEjB,AAAS;CACT,AAAS,UAAU,IAAIA,yBAAQ,KAAK;CACpC,AAAS,YAAY,IAAIC,6BAAU,KAAK;CACxC,AAAS,gBAAgB,IAAIC,oCAAc,KAAK;CAChD,AAAS,gBAAgB,IAAIC,qCAAc,KAAK;CAChD,AAAS,SAAS,IAAIC,sBAAO,KAAK;CAClC,AAAS,eAAe,IAAIC,mCAAa,KAAK;CAC9C,AAAS,MAAM,IAAIC,gBAAI,KAAK;CAC5B,AAAS,MAAM,IAAIC,gBAAI,KAAK;CAC5B,AAAS,gBAAgB,IAAIC,oCAAc,KAAK;CAChD,AAAS,sBAAsB,IAAIC,iDAAoB,KAAK;CAC5D,AAAS,eAAe,IAAIC,kCAAa,KAAK;CAC9C,AAAS,QAAQ,IAAIC,oBAAM,KAAK;CAChC,AAAS,SAAS,IAAIC,sBAAO,KAAK;CAClC,AAAS,MAAM,IAAIC,gBAAI,KAAK;CAC5B,AAAS;CACT,AAAS,QAAQ,IAAIC,oBAAM,KAAK;CAChC,AAAS;CACT,AAAS,UAAU,IAAIC,wBAAQ,KAAK;;;;;;;;;;;;;;;;;;;CAoBpC,YACE,cACA,cACA;AACA,MAAI,OAAO,iBAAiB,UAAU;AACpC,QAAK,MAAM,aAAa;AACxB,QAAK,UAAU;SACV;AACL,QAAK,MAAM;AACX,QAAK,UAAU,gBAAgB,EAAE;;AAGnC,MAAI,CAAC,KAAK,IACR,MAAK,MAAMC,mBAA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IC,8CAAkB;KAC1B;KACA;KACA;KACA;KACD,CAAC;IAEJ,KAAK,KAAK;KACR,MAAM,aAAa,QAAQ,IAAI,cAAc;AAE7C,WAAM,IAAIC,iEACR,KAAK,SACL,WACA,aAAa,OAAO,WAAW,GAAG,KACnC;;IAEH,QACE,KAAIC,WAAS,iBACX,OAAM,IAAIC,uCACR,QACA,WACAD,SACA,kBACA,KACD;aACQ,QAAQ,OAGjB,OAAM,IAAIE,kDAAoB;KAC5B;KACA;KACA;KACA;KACD,CAAC;QAEF,OAAM,IAAIC,wDACR,QACA,KAAK,SACL,MACA,UACD"}
|
|
1
|
+
{"version":3,"file":"workos-DXlhXDRn.cjs","names":["ApiKeys","AuditLogs","Authorization","DirectorySync","Events","FeatureFlags","FGA","Mfa","Organizations","OrganizationDomains","Passwordless","Pipes","Portal","SSO","Vault","Widgets","getEnv","protocol: string","apiHostname: string","port: number | undefined","PKCE","UserManagement","userAgent: string","VERSION","getRuntimeInfo","version","Webhooks","Actions","SubtleCryptoProvider","headers: Record<string, string>","FetchHttpClient","ApiKeyRequiredException","requestHeaders: Record<string, string>","res: HttpClientResponseInterface","ParseError","HttpClientError","UnauthorizedException","ConflictException","UnprocessableEntityException","NotFoundException","RateLimitExceededException","error","OauthException","BadRequestException","GenericServerException"],"sources":["../package.json","../src/workos.ts"],"sourcesContent":["{\n \"version\": \"8.8.0\",\n \"name\": \"@workos-inc/node\",\n \"author\": \"WorkOS\",\n \"description\": \"A Node wrapper for the WorkOS API\",\n \"homepage\": \"https://github.com/workos/workos-node\",\n \"license\": \"MIT\",\n \"keywords\": [\n \"workos\"\n ],\n \"engines\": {\n \"node\": \">=20.15.0\"\n },\n \"type\": \"module\",\n \"main\": \"./lib/index.cjs\",\n \"module\": \"./lib/index.js\",\n \"types\": \"./lib/index.d.ts\",\n \"files\": [\n \"lib/\",\n \"package.json\"\n ],\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"git+https://github.com/workos/workos-node.git\"\n },\n \"bugs\": {\n \"url\": \"https://github.com/workos/workos-node/issues\"\n },\n \"scripts\": {\n \"clean\": \"rm -rf lib\",\n \"build\": \"tsdown\",\n \"build:watch\": \"tsdown --watch\",\n \"lint\": \"eslint\",\n \"test\": \"jest\",\n \"test:watch\": \"jest --watch\",\n \"check:runtimes\": \"tsx scripts/ecosystem-check.ts\",\n \"check:types\": \"attw --pack . --ignore-rules no-resolution\",\n \"prettier\": \"prettier \\\"src/**/*.{js,ts,tsx}\\\" --check\",\n \"format\": \"prettier \\\"src/**/*.{js,ts,tsx}\\\" --write\",\n \"prepublishOnly\": \"npm run build\",\n \"typecheck\": \"tsc --noEmit\"\n },\n \"dependencies\": {\n \"iron-webcrypto\": \"^2.0.0\",\n \"jose\": \"~6.1.0\"\n },\n \"devDependencies\": {\n \"@arethetypeswrong/cli\": \"^0.18.2\",\n \"@babel/plugin-transform-modules-commonjs\": \"^7.26.3\",\n \"@babel/preset-env\": \"^7.26.9\",\n \"@babel/preset-typescript\": \"^7.27.0\",\n \"@eslint/js\": \"^9.37.0\",\n \"@types/jest\": \"^30.0.0\",\n \"@types/node\": \"~20\",\n \"@typescript-eslint/parser\": \"^8.46.0\",\n \"babel-jest\": \"^30.2.0\",\n \"eslint\": \"^9.37.0\",\n \"eslint-plugin-jest\": \"^29.0.1\",\n \"eslint-plugin-n\": \"^17.23.1\",\n \"jest\": \"30.2.0\",\n \"jest-environment-miniflare\": \"^2.14.2\",\n \"jest-fetch-mock\": \"^3.0.3\",\n \"miniflare\": \"^4.20251004.0\",\n \"prettier\": \"^3.5.3\",\n \"tsdown\": \"^0.17.0\",\n \"tsx\": \"^4.20.6\",\n \"typescript\": \"5.9.3\",\n \"typescript-eslint\": \"^8.46.0\"\n },\n \"exports\": {\n \".\": {\n \"workerd\": {\n \"types\": \"./lib/index.worker.d.ts\",\n \"import\": \"./lib/index.worker.js\",\n \"require\": \"./lib/index.worker.cjs\"\n },\n \"edge-light\": {\n \"types\": \"./lib/index.worker.d.ts\",\n \"import\": \"./lib/index.worker.js\",\n \"require\": \"./lib/index.worker.cjs\"\n },\n \"deno\": {\n \"types\": \"./lib/index.d.ts\",\n \"default\": \"./lib/index.js\"\n },\n \"bun\": {\n \"types\": \"./lib/index.d.ts\",\n \"import\": \"./lib/index.js\",\n \"require\": \"./lib/index.cjs\"\n },\n \"convex\": {\n \"types\": \"./lib/index.worker.d.ts\",\n \"import\": \"./lib/index.worker.js\",\n \"default\": \"./lib/index.worker.cjs\"\n },\n \"import\": {\n \"types\": \"./lib/index.d.ts\",\n \"default\": \"./lib/index.js\"\n },\n \"require\": {\n \"types\": \"./lib/index.d.cts\",\n \"default\": \"./lib/index.cjs\"\n },\n \"default\": \"./lib/index.js\"\n },\n \"./worker\": {\n \"import\": {\n \"types\": \"./lib/index.worker.d.ts\",\n \"default\": \"./lib/index.worker.js\"\n },\n \"require\": {\n \"types\": \"./lib/index.worker.d.cts\",\n \"default\": \"./lib/index.worker.cjs\"\n },\n \"default\": \"./lib/index.worker.js\"\n },\n \"./package.json\": \"./package.json\"\n }\n}\n","import {\n ApiKeyRequiredException,\n GenericServerException,\n NotFoundException,\n UnauthorizedException,\n UnprocessableEntityException,\n OauthException,\n RateLimitExceededException,\n} from './common/exceptions';\nimport { PKCE } from './pkce/pkce';\nimport {\n GetOptions,\n HttpClientResponseInterface,\n PatchOptions,\n PostOptions,\n PutOptions,\n WorkOSOptions,\n WorkOSResponseError,\n} from './common/interfaces';\nimport { ApiKeys } from './api-keys/api-keys';\nimport { DirectorySync } from './directory-sync/directory-sync';\nimport { Events } from './events/events';\nimport { Organizations } from './organizations/organizations';\nimport { OrganizationDomains } from './organization-domains/organization-domains';\nimport { Passwordless } from './passwordless/passwordless';\nimport { Pipes } from './pipes/pipes';\nimport { Portal } from './portal/portal';\nimport { SSO } from './sso/sso';\nimport { Webhooks } from './webhooks/webhooks';\nimport { Mfa } from './mfa/mfa';\nimport { AuditLogs } from './audit-logs/audit-logs';\nimport { UserManagement } from './user-management/user-management';\nimport { FGA } from './fga/fga';\nimport { BadRequestException } from './common/exceptions/bad-request.exception';\nimport { FeatureFlags } from './feature-flags/feature-flags';\n\nimport { HttpClient, HttpClientError } from './common/net/http-client';\nimport { SubtleCryptoProvider } from './common/crypto/subtle-crypto-provider';\nimport { FetchHttpClient } from './common/net/fetch-client';\nimport { Widgets } from './widgets/widgets';\nimport { Actions } from './actions/actions';\nimport { Authorization } from './authorization/authorization';\nimport { Vault } from './vault/vault';\nimport { ConflictException } from './common/exceptions/conflict.exception';\nimport { CryptoProvider } from './common/crypto/crypto-provider';\nimport { ParseError } from './common/exceptions/parse-error';\nimport { getEnv } from './common/utils/env';\nimport { getRuntimeInfo } from './common/utils/runtime-info';\nimport { version as VERSION } from '../package.json' with { type: 'json' };\n\nconst DEFAULT_HOSTNAME = 'api.workos.com';\n\nconst HEADER_AUTHORIZATION = 'Authorization';\nconst HEADER_IDEMPOTENCY_KEY = 'Idempotency-Key';\nconst HEADER_WARRANT_TOKEN = 'Warrant-Token';\n\nexport class WorkOS {\n readonly baseURL: string;\n readonly client: HttpClient;\n readonly clientId?: string;\n readonly key?: string;\n readonly options: WorkOSOptions;\n readonly pkce: PKCE;\n\n private readonly hasApiKey: boolean;\n\n readonly actions: Actions;\n readonly apiKeys = new ApiKeys(this);\n readonly auditLogs = new AuditLogs(this);\n readonly authorization = new Authorization(this);\n readonly directorySync = new DirectorySync(this);\n readonly events = new Events(this);\n readonly featureFlags = new FeatureFlags(this);\n readonly fga = new FGA(this);\n readonly mfa = new Mfa(this);\n readonly organizations = new Organizations(this);\n readonly organizationDomains = new OrganizationDomains(this);\n readonly passwordless = new Passwordless(this);\n readonly pipes = new Pipes(this);\n readonly portal = new Portal(this);\n readonly sso = new SSO(this);\n readonly userManagement: UserManagement;\n readonly vault = new Vault(this);\n readonly webhooks: Webhooks;\n readonly widgets = new Widgets(this);\n\n /**\n * Create a new WorkOS client.\n *\n * @param keyOrOptions - API key string, or options object\n * @param maybeOptions - Options when first argument is API key\n *\n * @example\n * // Server-side with API key (string)\n * const workos = new WorkOS('sk_...');\n *\n * @example\n * // Server-side with API key (object)\n * const workos = new WorkOS({ apiKey: 'sk_...', clientId: 'client_...' });\n *\n * @example\n * // PKCE/public client (no API key)\n * const workos = new WorkOS({ clientId: 'client_...' });\n */\n constructor(\n keyOrOptions?: string | WorkOSOptions,\n maybeOptions?: WorkOSOptions,\n ) {\n if (typeof keyOrOptions === 'object') {\n this.key = keyOrOptions.apiKey;\n this.options = keyOrOptions;\n } else {\n this.key = keyOrOptions;\n this.options = maybeOptions ?? {};\n }\n\n if (!this.key) {\n this.key = getEnv('WORKOS_API_KEY');\n }\n\n this.hasApiKey = !!this.key;\n\n if (this.options.https === undefined) {\n this.options.https = true;\n }\n\n this.clientId = this.options.clientId;\n if (!this.clientId) {\n this.clientId = getEnv('WORKOS_CLIENT_ID');\n }\n\n if (!this.hasApiKey && !this.clientId) {\n throw new Error(\n 'WorkOS requires either an API key or a clientId. ' +\n 'For server-side: new WorkOS(\"sk_...\") or new WorkOS({ apiKey: \"sk_...\" }). ' +\n 'For PKCE/public clients: new WorkOS({ clientId: \"client_...\" })',\n );\n }\n\n const protocol: string = this.options.https ? 'https' : 'http';\n const apiHostname: string = this.options.apiHostname || DEFAULT_HOSTNAME;\n const port: number | undefined = this.options.port;\n this.baseURL = `${protocol}://${apiHostname}`;\n\n if (port) {\n this.baseURL = this.baseURL + `:${port}`;\n }\n\n this.pkce = new PKCE();\n\n this.webhooks = this.createWebhookClient();\n this.actions = this.createActionsClient();\n\n // Must initialize UserManagement after baseURL is configured\n this.userManagement = new UserManagement(this);\n\n const userAgent = this.createUserAgent(this.options);\n\n this.client = this.createHttpClient(this.options, userAgent);\n }\n\n private createUserAgent(options: WorkOSOptions): string {\n let userAgent: string = `workos-node/${VERSION}`;\n\n const { name: runtimeName, version: runtimeVersion } = getRuntimeInfo();\n userAgent += ` (${runtimeName}${runtimeVersion ? `/${runtimeVersion}` : ''})`;\n\n if (options.appInfo) {\n const { name, version } = options.appInfo;\n userAgent += ` ${name}: ${version}`;\n }\n\n return userAgent;\n }\n\n createWebhookClient() {\n return new Webhooks(this.getCryptoProvider());\n }\n\n createActionsClient() {\n return new Actions(this.getCryptoProvider());\n }\n\n getCryptoProvider(): CryptoProvider {\n return new SubtleCryptoProvider();\n }\n\n createHttpClient(options: WorkOSOptions, userAgent: string) {\n const headers: Record<string, string> = {\n 'User-Agent': userAgent,\n };\n\n const configHeaders = options.config?.headers;\n if (\n configHeaders &&\n typeof configHeaders === 'object' &&\n !Array.isArray(configHeaders) &&\n !(configHeaders instanceof Headers)\n ) {\n Object.assign(headers, configHeaders);\n }\n\n if (this.key) {\n headers['Authorization'] = `Bearer ${this.key}`;\n }\n\n return new FetchHttpClient(this.baseURL, {\n ...options.config,\n timeout: options.timeout,\n headers,\n }) as HttpClient;\n }\n\n get version() {\n return VERSION;\n }\n\n /**\n * Require API key for methods that need it.\n * @param methodName - Name of the method requiring API key (for error message)\n * @throws ApiKeyRequiredException if no API key was provided\n */\n requireApiKey(methodName: string): void {\n if (!this.hasApiKey) {\n throw new ApiKeyRequiredException(methodName);\n }\n }\n\n async post<Result = any, Entity = any>(\n path: string,\n entity: Entity,\n options: PostOptions = {},\n ): Promise<{ data: Result }> {\n if (!options.skipApiKeyCheck) {\n this.requireApiKey(path);\n }\n\n const requestHeaders: Record<string, string> = {};\n\n if (options.idempotencyKey) {\n requestHeaders[HEADER_IDEMPOTENCY_KEY] = options.idempotencyKey;\n }\n\n if (options.warrantToken) {\n requestHeaders[HEADER_WARRANT_TOKEN] = options.warrantToken;\n }\n\n let res: HttpClientResponseInterface;\n\n try {\n res = await this.client.post<Entity>(path, entity, {\n params: options.query,\n headers: requestHeaders,\n });\n } catch (error) {\n this.handleHttpError({ path, error });\n throw error;\n }\n\n try {\n return { data: await res.toJSON() };\n } catch (error) {\n await this.handleParseError(error, res);\n throw error;\n }\n }\n\n async get<Result = any>(\n path: string,\n options: GetOptions = {},\n ): Promise<{ data: Result }> {\n if (!options.skipApiKeyCheck) {\n this.requireApiKey(path);\n }\n\n const requestHeaders: Record<string, string> = {};\n\n if (options.accessToken) {\n requestHeaders[HEADER_AUTHORIZATION] = `Bearer ${options.accessToken}`;\n }\n\n if (options.warrantToken) {\n requestHeaders[HEADER_WARRANT_TOKEN] = options.warrantToken;\n }\n\n let res: HttpClientResponseInterface;\n try {\n res = await this.client.get(path, {\n params: options.query,\n headers: requestHeaders,\n });\n } catch (error) {\n this.handleHttpError({ path, error });\n\n throw error;\n }\n\n try {\n return { data: await res.toJSON() };\n } catch (error) {\n await this.handleParseError(error, res);\n throw error;\n }\n }\n\n async put<Result = any, Entity = any>(\n path: string,\n entity: Entity,\n options: PutOptions = {},\n ): Promise<{ data: Result }> {\n if (!options.skipApiKeyCheck) {\n this.requireApiKey(path);\n }\n\n const requestHeaders: Record<string, string> = {};\n\n if (options.idempotencyKey) {\n requestHeaders[HEADER_IDEMPOTENCY_KEY] = options.idempotencyKey;\n }\n\n let res: HttpClientResponseInterface;\n\n try {\n res = await this.client.put<Entity>(path, entity, {\n params: options.query,\n headers: requestHeaders,\n });\n } catch (error) {\n this.handleHttpError({ path, error });\n\n throw error;\n }\n\n try {\n return { data: await res.toJSON() };\n } catch (error) {\n await this.handleParseError(error, res);\n throw error;\n }\n }\n\n async patch<Result = any, Entity = any>(\n path: string,\n entity: Entity,\n options: PatchOptions = {},\n ): Promise<{ data: Result }> {\n if (!options.skipApiKeyCheck) {\n this.requireApiKey(path);\n }\n\n const requestHeaders: Record<string, string> = {};\n\n if (options.idempotencyKey) {\n requestHeaders[HEADER_IDEMPOTENCY_KEY] = options.idempotencyKey;\n }\n\n let res: HttpClientResponseInterface;\n\n try {\n res = await this.client.patch<Entity>(path, entity, {\n params: options.query,\n headers: requestHeaders,\n });\n } catch (error) {\n this.handleHttpError({ path, error });\n\n throw error;\n }\n\n try {\n return { data: await res.toJSON() };\n } catch (error) {\n await this.handleParseError(error, res);\n throw error;\n }\n }\n\n async delete(path: string, query?: any): Promise<void> {\n this.requireApiKey(path);\n\n try {\n await this.client.delete(path, {\n params: query,\n });\n } catch (error) {\n this.handleHttpError({ path, error });\n\n throw error;\n }\n }\n\n async deleteWithBody<Entity = any>(\n path: string,\n entity: Entity,\n ): Promise<void> {\n this.requireApiKey(path);\n\n try {\n await this.client.deleteWithBody(path, entity, {});\n } catch (error) {\n this.handleHttpError({ path, error });\n\n throw error;\n }\n }\n\n emitWarning(warning: string) {\n // tslint:disable-next-line:no-console\n console.warn(`WorkOS: ${warning}`);\n }\n\n private async handleParseError(\n error: unknown,\n res: HttpClientResponseInterface,\n ) {\n if (error instanceof SyntaxError) {\n const rawResponse = res.getRawResponse() as Response;\n const requestID = rawResponse.headers.get('X-Request-ID') ?? '';\n const rawStatus = rawResponse.status;\n const rawBody = await rawResponse.text();\n throw new ParseError({\n message: error.message,\n rawBody,\n rawStatus,\n requestID,\n });\n }\n }\n\n private handleHttpError({ path, error }: { path: string; error: unknown }) {\n if (!(error instanceof HttpClientError)) {\n throw new Error(`Unexpected error: ${error}`, { cause: error });\n }\n\n const { response } = error as HttpClientError<WorkOSResponseError>;\n\n if (response) {\n const { status, data, headers } = response;\n\n const requestID = headers['X-Request-ID'] ?? '';\n const {\n code,\n error_description: errorDescription,\n error,\n errors,\n message,\n } = data;\n\n switch (status) {\n case 401: {\n throw new UnauthorizedException(requestID);\n }\n case 409: {\n throw new ConflictException({ requestID, message, error });\n }\n case 422: {\n throw new UnprocessableEntityException({\n code,\n errors,\n message,\n requestID,\n });\n }\n case 404: {\n throw new NotFoundException({\n code,\n message,\n path,\n requestID,\n });\n }\n case 429: {\n const retryAfter = headers.get('Retry-After');\n\n throw new RateLimitExceededException(\n data.message,\n requestID,\n retryAfter ? Number(retryAfter) : null,\n );\n }\n default: {\n if (error || errorDescription) {\n throw new OauthException(\n status,\n requestID,\n error,\n errorDescription,\n data,\n );\n } else if (code && errors) {\n // Note: ideally this should be mapped directly with a `400` status code.\n // However, this would break existing logic for the `OauthException` exception.\n throw new BadRequestException({\n code,\n errors,\n message,\n requestID,\n });\n } else {\n throw new GenericServerException(\n status,\n data.message,\n data,\n requestID,\n );\n }\n }\n }\n }\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cACa;;;;ACiDb,MAAM,mBAAmB;AAEzB,MAAM,uBAAuB;AAC7B,MAAM,yBAAyB;AAC/B,MAAM,uBAAuB;AAE7B,IAAa,SAAb,MAAoB;CAClB,AAAS;CACT,AAAS;CACT,AAAS;CACT,AAAS;CACT,AAAS;CACT,AAAS;CAET,AAAiB;CAEjB,AAAS;CACT,AAAS,UAAU,IAAIA,yBAAQ,KAAK;CACpC,AAAS,YAAY,IAAIC,6BAAU,KAAK;CACxC,AAAS,gBAAgB,IAAIC,oCAAc,KAAK;CAChD,AAAS,gBAAgB,IAAIC,qCAAc,KAAK;CAChD,AAAS,SAAS,IAAIC,sBAAO,KAAK;CAClC,AAAS,eAAe,IAAIC,mCAAa,KAAK;CAC9C,AAAS,MAAM,IAAIC,gBAAI,KAAK;CAC5B,AAAS,MAAM,IAAIC,gBAAI,KAAK;CAC5B,AAAS,gBAAgB,IAAIC,oCAAc,KAAK;CAChD,AAAS,sBAAsB,IAAIC,iDAAoB,KAAK;CAC5D,AAAS,eAAe,IAAIC,kCAAa,KAAK;CAC9C,AAAS,QAAQ,IAAIC,oBAAM,KAAK;CAChC,AAAS,SAAS,IAAIC,sBAAO,KAAK;CAClC,AAAS,MAAM,IAAIC,gBAAI,KAAK;CAC5B,AAAS;CACT,AAAS,QAAQ,IAAIC,oBAAM,KAAK;CAChC,AAAS;CACT,AAAS,UAAU,IAAIC,wBAAQ,KAAK;;;;;;;;;;;;;;;;;;;CAoBpC,YACE,cACA,cACA;AACA,MAAI,OAAO,iBAAiB,UAAU;AACpC,QAAK,MAAM,aAAa;AACxB,QAAK,UAAU;SACV;AACL,QAAK,MAAM;AACX,QAAK,UAAU,gBAAgB,EAAE;;AAGnC,MAAI,CAAC,KAAK,IACR,MAAK,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H,OAAM,IAAIC,8CAAkB;KAC1B;KACA;KACA;KACA;KACD,CAAC;IAEJ,KAAK,KAAK;KACR,MAAM,aAAa,QAAQ,IAAI,cAAc;AAE7C,WAAM,IAAIC,iEACR,KAAK,SACL,WACA,aAAa,OAAO,WAAW,GAAG,KACnC;;IAEH,QACE,KAAIC,WAAS,iBACX,OAAM,IAAIC,uCACR,QACA,WACAD,SACA,kBACA,KACD;aACQ,QAAQ,OAGjB,OAAM,IAAIE,kDAAoB;KAC5B;KACA;KACA;KACA;KACD,CAAC;QAEF,OAAM,IAAIC,wDACR,QACA,KAAK,SACL,MACA,UACD"}
|
package/lib/workos.cjs
CHANGED
|
@@ -2,6 +2,6 @@ require('./jose-BhyqkBqW.cjs');
|
|
|
2
2
|
require('./session-Beigw6Nc.cjs');
|
|
3
3
|
require('./user-management-CJj1rMco.cjs');
|
|
4
4
|
require('./subtle-crypto-provider-RQC7QPlf.cjs');
|
|
5
|
-
const require_workos = require('./workos-
|
|
5
|
+
const require_workos = require('./workos-DXlhXDRn.cjs');
|
|
6
6
|
|
|
7
7
|
exports.WorkOS = require_workos.WorkOS;
|
package/lib/workos.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as WorkOS } from "./api-keys-
|
|
1
|
+
import { n as WorkOS } from "./api-keys-Dm4rmZx0.cjs";
|
|
2
2
|
export { WorkOS };
|