@workos-inc/node 8.0.0-rc.7 → 8.0.0-rc.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (250) hide show
  1. package/README.md +54 -0
  2. package/lib/api-keys/api-keys.cjs +3 -0
  3. package/lib/api-keys/api-keys.cjs.map +1 -1
  4. package/lib/api-keys/api-keys.d.cts +2 -1
  5. package/lib/api-keys/api-keys.d.ts +2 -1
  6. package/lib/api-keys/api-keys.js +3 -0
  7. package/lib/api-keys/api-keys.js.map +1 -1
  8. package/lib/api-keys/interfaces/create-organization-api-key-options.interface.cjs +0 -0
  9. package/lib/api-keys/interfaces/create-organization-api-key-options.interface.d.cts +16 -0
  10. package/lib/api-keys/interfaces/create-organization-api-key-options.interface.d.ts +16 -0
  11. package/lib/api-keys/interfaces/create-organization-api-key-options.interface.js +1 -0
  12. package/lib/api-keys/interfaces/created-api-key.interface.cjs +0 -0
  13. package/lib/api-keys/interfaces/created-api-key.interface.d.cts +34 -0
  14. package/lib/api-keys/interfaces/created-api-key.interface.d.ts +34 -0
  15. package/lib/api-keys/interfaces/created-api-key.interface.js +1 -0
  16. package/lib/api-keys/interfaces/index.cjs +0 -0
  17. package/lib/api-keys/interfaces/index.d.cts +6 -0
  18. package/lib/api-keys/interfaces/index.d.ts +6 -0
  19. package/lib/api-keys/interfaces/index.js +1 -0
  20. package/lib/api-keys/interfaces/list-organization-api-keys-options.interface.cjs +0 -0
  21. package/lib/api-keys/interfaces/list-organization-api-keys-options.interface.d.cts +9 -0
  22. package/lib/api-keys/interfaces/list-organization-api-keys-options.interface.d.ts +9 -0
  23. package/lib/api-keys/interfaces/list-organization-api-keys-options.interface.js +1 -0
  24. package/lib/api-keys/serializers/create-organization-api-key-options.serializer.cjs +12 -0
  25. package/lib/api-keys/serializers/create-organization-api-key-options.serializer.cjs.map +1 -0
  26. package/lib/api-keys/serializers/create-organization-api-key-options.serializer.d.cts +7 -0
  27. package/lib/api-keys/serializers/create-organization-api-key-options.serializer.d.ts +7 -0
  28. package/lib/api-keys/serializers/create-organization-api-key-options.serializer.js +11 -0
  29. package/lib/api-keys/serializers/create-organization-api-key-options.serializer.js.map +1 -0
  30. package/lib/api-keys/serializers/created-api-key.serializer.cjs +20 -0
  31. package/lib/api-keys/serializers/created-api-key.serializer.cjs.map +1 -0
  32. package/lib/api-keys/serializers/created-api-key.serializer.d.cts +7 -0
  33. package/lib/api-keys/serializers/created-api-key.serializer.d.ts +7 -0
  34. package/lib/api-keys/serializers/created-api-key.serializer.js +19 -0
  35. package/lib/api-keys/serializers/created-api-key.serializer.js.map +1 -0
  36. package/lib/api-keys/serializers/index.cjs +9 -0
  37. package/lib/api-keys/serializers/index.d.cts +5 -0
  38. package/lib/api-keys/serializers/index.d.ts +5 -0
  39. package/lib/api-keys/serializers/index.js +6 -0
  40. package/lib/common/exceptions/api-key-required.exception.cjs +15 -0
  41. package/lib/common/exceptions/api-key-required.exception.cjs.map +1 -0
  42. package/lib/common/exceptions/api-key-required.exception.d.cts +10 -0
  43. package/lib/common/exceptions/api-key-required.exception.d.ts +10 -0
  44. package/lib/common/exceptions/api-key-required.exception.js +14 -0
  45. package/lib/common/exceptions/api-key-required.exception.js.map +1 -0
  46. package/lib/common/exceptions/index.cjs +2 -0
  47. package/lib/common/exceptions/index.d.cts +2 -1
  48. package/lib/common/exceptions/index.d.ts +2 -1
  49. package/lib/common/exceptions/index.js +2 -1
  50. package/lib/common/interfaces/event.interface.d.cts +28 -3
  51. package/lib/common/interfaces/event.interface.d.ts +28 -3
  52. package/lib/common/interfaces/get-options.interface.d.cts +2 -0
  53. package/lib/common/interfaces/get-options.interface.d.ts +2 -0
  54. package/lib/common/interfaces/index.d.cts +2 -2
  55. package/lib/common/interfaces/index.d.ts +2 -2
  56. package/lib/common/interfaces/post-options.interface.d.cts +2 -0
  57. package/lib/common/interfaces/post-options.interface.d.ts +2 -0
  58. package/lib/common/interfaces/put-options.interface.d.cts +2 -0
  59. package/lib/common/interfaces/put-options.interface.d.ts +2 -0
  60. package/lib/common/interfaces/workos-options.interface.d.cts +1 -0
  61. package/lib/common/interfaces/workos-options.interface.d.ts +1 -0
  62. package/lib/common/net/http-client.cjs.map +1 -1
  63. package/lib/common/net/http-client.js.map +1 -1
  64. package/lib/common/serializers/event.serializer.cjs +13 -5
  65. package/lib/common/serializers/event.serializer.cjs.map +1 -1
  66. package/lib/common/serializers/event.serializer.js +13 -5
  67. package/lib/common/serializers/event.serializer.js.map +1 -1
  68. package/lib/directory-sync/directory-sync.cjs +1 -1
  69. package/lib/directory-sync/directory-sync.js +1 -1
  70. package/lib/factory.cjs +10 -0
  71. package/lib/factory.cjs.map +1 -0
  72. package/lib/factory.d.cts +83 -0
  73. package/lib/factory.d.ts +83 -0
  74. package/lib/factory.js +10 -0
  75. package/lib/factory.js.map +1 -0
  76. package/lib/feature-flags/feature-flags.cjs +37 -0
  77. package/lib/feature-flags/feature-flags.cjs.map +1 -0
  78. package/lib/feature-flags/feature-flags.d.cts +21 -0
  79. package/lib/feature-flags/feature-flags.d.ts +21 -0
  80. package/lib/feature-flags/feature-flags.js +37 -0
  81. package/lib/feature-flags/feature-flags.js.map +1 -0
  82. package/lib/feature-flags/interfaces/add-flag-target-options.interface.cjs +0 -0
  83. package/lib/feature-flags/interfaces/add-flag-target-options.interface.d.cts +8 -0
  84. package/lib/feature-flags/interfaces/add-flag-target-options.interface.d.ts +8 -0
  85. package/lib/feature-flags/interfaces/add-flag-target-options.interface.js +1 -0
  86. package/lib/feature-flags/interfaces/feature-flag.interface.d.cts +8 -2
  87. package/lib/feature-flags/interfaces/feature-flag.interface.d.ts +8 -2
  88. package/lib/feature-flags/interfaces/index.d.cts +4 -1
  89. package/lib/feature-flags/interfaces/index.d.ts +4 -1
  90. package/lib/feature-flags/interfaces/list-feature-flags-options.interface.cjs +0 -0
  91. package/lib/feature-flags/interfaces/list-feature-flags-options.interface.d.cts +7 -0
  92. package/lib/feature-flags/interfaces/list-feature-flags-options.interface.d.ts +7 -0
  93. package/lib/feature-flags/interfaces/list-feature-flags-options.interface.js +1 -0
  94. package/lib/feature-flags/interfaces/remove-flag-target-options.interface.cjs +0 -0
  95. package/lib/feature-flags/interfaces/remove-flag-target-options.interface.d.cts +8 -0
  96. package/lib/feature-flags/interfaces/remove-flag-target-options.interface.d.ts +8 -0
  97. package/lib/feature-flags/interfaces/remove-flag-target-options.interface.js +1 -0
  98. package/lib/feature-flags/serializers/feature-flag.serializer.cjs +3 -0
  99. package/lib/feature-flags/serializers/feature-flag.serializer.cjs.map +1 -1
  100. package/lib/feature-flags/serializers/feature-flag.serializer.js +3 -0
  101. package/lib/feature-flags/serializers/feature-flag.serializer.js.map +1 -1
  102. package/lib/feature-flags/serializers/index.cjs +3 -0
  103. package/lib/feature-flags/serializers/index.d.cts +2 -0
  104. package/lib/feature-flags/serializers/index.d.ts +2 -0
  105. package/lib/feature-flags/serializers/index.js +3 -0
  106. package/lib/fga/serializers/query-result.serializer.cjs.map +1 -1
  107. package/lib/fga/serializers/query-result.serializer.js.map +1 -1
  108. package/lib/index.cjs +18 -9
  109. package/lib/index.cjs.map +1 -1
  110. package/lib/index.d.cts +18 -5
  111. package/lib/index.d.ts +18 -5
  112. package/lib/index.js +16 -10
  113. package/lib/index.js.map +1 -1
  114. package/lib/index.worker.cjs +15 -9
  115. package/lib/index.worker.cjs.map +1 -1
  116. package/lib/index.worker.d.cts +10 -5
  117. package/lib/index.worker.d.ts +10 -5
  118. package/lib/index.worker.js +13 -10
  119. package/lib/index.worker.js.map +1 -1
  120. package/lib/organizations/organizations.cjs +14 -2
  121. package/lib/organizations/organizations.cjs.map +1 -1
  122. package/lib/organizations/organizations.d.cts +6 -0
  123. package/lib/organizations/organizations.d.ts +6 -0
  124. package/lib/organizations/organizations.js +14 -2
  125. package/lib/organizations/organizations.js.map +1 -1
  126. package/lib/organizations/serializers/index.cjs +1 -1
  127. package/lib/organizations/serializers/index.js +1 -1
  128. package/lib/pkce/pkce.cjs +54 -0
  129. package/lib/pkce/pkce.cjs.map +1 -0
  130. package/lib/pkce/pkce.d.cts +38 -0
  131. package/lib/pkce/pkce.d.ts +38 -0
  132. package/lib/pkce/pkce.js +53 -0
  133. package/lib/pkce/pkce.js.map +1 -0
  134. package/lib/sso/interfaces/authorization-url-options.interface.d.cts +34 -8
  135. package/lib/sso/interfaces/authorization-url-options.interface.d.ts +34 -8
  136. package/lib/sso/interfaces/get-profile-and-token-options.interface.d.cts +6 -0
  137. package/lib/sso/interfaces/get-profile-and-token-options.interface.d.ts +6 -0
  138. package/lib/sso/interfaces/index.d.cts +2 -2
  139. package/lib/sso/interfaces/index.d.ts +2 -2
  140. package/lib/sso/sso.cjs +90 -8
  141. package/lib/sso/sso.cjs.map +1 -1
  142. package/lib/sso/sso.d.cts +41 -2
  143. package/lib/sso/sso.d.ts +41 -2
  144. package/lib/sso/sso.js +90 -8
  145. package/lib/sso/sso.js.map +1 -1
  146. package/lib/user-management/interfaces/authenticate-with-code-and-verifier-options.interface.d.cts +2 -2
  147. package/lib/user-management/interfaces/authenticate-with-code-and-verifier-options.interface.d.ts +2 -2
  148. package/lib/user-management/interfaces/authenticate-with-options-base.interface.d.cts +19 -3
  149. package/lib/user-management/interfaces/authenticate-with-options-base.interface.d.ts +19 -3
  150. package/lib/user-management/interfaces/authenticate-with-refresh-token-public-client-options.interface.cjs +0 -0
  151. package/lib/user-management/interfaces/authenticate-with-refresh-token-public-client-options.interface.d.cts +16 -0
  152. package/lib/user-management/interfaces/authenticate-with-refresh-token-public-client-options.interface.d.ts +16 -0
  153. package/lib/user-management/interfaces/authenticate-with-refresh-token-public-client-options.interface.js +1 -0
  154. package/lib/user-management/interfaces/authorization-url-options.interface.d.cts +30 -5
  155. package/lib/user-management/interfaces/authorization-url-options.interface.d.ts +30 -5
  156. package/lib/user-management/interfaces/index.d.cts +5 -3
  157. package/lib/user-management/interfaces/index.d.ts +5 -3
  158. package/lib/user-management/interfaces/logout-url-options.interface.cjs +0 -0
  159. package/lib/user-management/interfaces/logout-url-options.interface.d.cts +8 -0
  160. package/lib/user-management/interfaces/logout-url-options.interface.d.ts +8 -0
  161. package/lib/user-management/interfaces/logout-url-options.interface.js +1 -0
  162. package/lib/user-management/serializers/authenticate-with-code-and-verifier-options.serializer.cjs.map +1 -1
  163. package/lib/user-management/serializers/authenticate-with-code-and-verifier-options.serializer.d.cts +2 -1
  164. package/lib/user-management/serializers/authenticate-with-code-and-verifier-options.serializer.d.ts +2 -1
  165. package/lib/user-management/serializers/authenticate-with-code-and-verifier-options.serializer.js.map +1 -1
  166. package/lib/user-management/serializers/authenticate-with-code-options.serializer.cjs.map +1 -1
  167. package/lib/user-management/serializers/authenticate-with-code-options.serializer.d.cts +2 -1
  168. package/lib/user-management/serializers/authenticate-with-code-options.serializer.d.ts +2 -1
  169. package/lib/user-management/serializers/authenticate-with-code-options.serializer.js.map +1 -1
  170. package/lib/user-management/serializers/authenticate-with-email-verification.serializer.cjs.map +1 -1
  171. package/lib/user-management/serializers/authenticate-with-email-verification.serializer.d.cts +2 -1
  172. package/lib/user-management/serializers/authenticate-with-email-verification.serializer.d.ts +2 -1
  173. package/lib/user-management/serializers/authenticate-with-email-verification.serializer.js.map +1 -1
  174. package/lib/user-management/serializers/authenticate-with-magic-auth-options.serializer.cjs.map +1 -1
  175. package/lib/user-management/serializers/authenticate-with-magic-auth-options.serializer.d.cts +2 -1
  176. package/lib/user-management/serializers/authenticate-with-magic-auth-options.serializer.d.ts +2 -1
  177. package/lib/user-management/serializers/authenticate-with-magic-auth-options.serializer.js.map +1 -1
  178. package/lib/user-management/serializers/authenticate-with-organization-selection-options.serializer.cjs.map +1 -1
  179. package/lib/user-management/serializers/authenticate-with-organization-selection-options.serializer.d.cts +2 -1
  180. package/lib/user-management/serializers/authenticate-with-organization-selection-options.serializer.d.ts +2 -1
  181. package/lib/user-management/serializers/authenticate-with-organization-selection-options.serializer.js.map +1 -1
  182. package/lib/user-management/serializers/authenticate-with-password-options.serializer.cjs.map +1 -1
  183. package/lib/user-management/serializers/authenticate-with-password-options.serializer.d.cts +2 -1
  184. package/lib/user-management/serializers/authenticate-with-password-options.serializer.d.ts +2 -1
  185. package/lib/user-management/serializers/authenticate-with-password-options.serializer.js.map +1 -1
  186. package/lib/user-management/serializers/authenticate-with-refresh-token-public-client-options.serializer.cjs +14 -0
  187. package/lib/user-management/serializers/authenticate-with-refresh-token-public-client-options.serializer.cjs.map +1 -0
  188. package/lib/user-management/serializers/authenticate-with-refresh-token-public-client-options.serializer.d.cts +8 -0
  189. package/lib/user-management/serializers/authenticate-with-refresh-token-public-client-options.serializer.d.ts +8 -0
  190. package/lib/user-management/serializers/authenticate-with-refresh-token-public-client-options.serializer.js +13 -0
  191. package/lib/user-management/serializers/authenticate-with-refresh-token-public-client-options.serializer.js.map +1 -0
  192. package/lib/user-management/serializers/authenticate-with-refresh-token.options.serializer.cjs.map +1 -1
  193. package/lib/user-management/serializers/authenticate-with-refresh-token.options.serializer.d.cts +2 -1
  194. package/lib/user-management/serializers/authenticate-with-refresh-token.options.serializer.d.ts +2 -1
  195. package/lib/user-management/serializers/authenticate-with-refresh-token.options.serializer.js.map +1 -1
  196. package/lib/user-management/serializers/authenticate-with-totp-options.serializer.cjs.map +1 -1
  197. package/lib/user-management/serializers/authenticate-with-totp-options.serializer.d.cts +2 -1
  198. package/lib/user-management/serializers/authenticate-with-totp-options.serializer.d.ts +2 -1
  199. package/lib/user-management/serializers/authenticate-with-totp-options.serializer.js.map +1 -1
  200. package/lib/user-management/serializers/index.cjs +2 -0
  201. package/lib/user-management/serializers/index.d.cts +2 -1
  202. package/lib/user-management/serializers/index.d.ts +2 -1
  203. package/lib/user-management/serializers/index.js +2 -1
  204. package/lib/user-management/session.cjs +3 -10
  205. package/lib/user-management/session.cjs.map +1 -1
  206. package/lib/user-management/session.js +3 -10
  207. package/lib/user-management/session.js.map +1 -1
  208. package/lib/user-management/user-management.cjs +186 -31
  209. package/lib/user-management/user-management.cjs.map +1 -1
  210. package/lib/user-management/user-management.d.cts +71 -2
  211. package/lib/user-management/user-management.d.ts +71 -2
  212. package/lib/user-management/user-management.js +186 -31
  213. package/lib/user-management/user-management.js.map +1 -1
  214. package/lib/vault/vault.cjs +4 -0
  215. package/lib/vault/vault.cjs.map +1 -1
  216. package/lib/vault/vault.d.cts +1 -0
  217. package/lib/vault/vault.d.ts +1 -0
  218. package/lib/vault/vault.js +4 -0
  219. package/lib/vault/vault.js.map +1 -1
  220. package/lib/webhooks/webhooks.cjs +1 -1
  221. package/lib/webhooks/webhooks.js +1 -1
  222. package/lib/workos.cjs +68 -26
  223. package/lib/workos.cjs.map +1 -1
  224. package/lib/workos.d.cts +37 -8
  225. package/lib/workos.d.ts +37 -8
  226. package/lib/workos.js +68 -26
  227. package/lib/workos.js.map +1 -1
  228. package/package.json +4 -21
  229. package/lib/_virtual/rolldown_runtime.cjs +0 -19
  230. package/lib/_virtual/rolldown_runtime.js +0 -18
  231. package/lib/client/index.cjs +0 -15
  232. package/lib/client/index.d.cts +0 -3
  233. package/lib/client/index.d.ts +0 -3
  234. package/lib/client/index.js +0 -4
  235. package/lib/client/sso.cjs +0 -40
  236. package/lib/client/sso.cjs.map +0 -1
  237. package/lib/client/sso.d.cts +0 -21
  238. package/lib/client/sso.d.ts +0 -21
  239. package/lib/client/sso.js +0 -34
  240. package/lib/client/sso.js.map +0 -1
  241. package/lib/client/user-management.cjs +0 -80
  242. package/lib/client/user-management.cjs.map +0 -1
  243. package/lib/client/user-management.d.cts +0 -58
  244. package/lib/client/user-management.d.ts +0 -58
  245. package/lib/client/user-management.js +0 -72
  246. package/lib/client/user-management.js.map +0 -1
  247. package/lib/index.client.cjs +0 -15
  248. package/lib/index.client.d.cts +0 -3
  249. package/lib/index.client.d.ts +0 -3
  250. package/lib/index.client.js +0 -4
package/lib/index.cjs CHANGED
@@ -1,5 +1,4 @@
1
- const require_common_crypto_subtle_crypto_provider = require('./common/crypto/subtle-crypto-provider.cjs');
2
- const require_common_net_fetch_client = require('./common/net/fetch-client.cjs');
1
+ const require_common_exceptions_api_key_required_exception = require('./common/exceptions/api-key-required.exception.cjs');
3
2
  const require_common_exceptions_generic_server_exception = require('./common/exceptions/generic-server.exception.cjs');
4
3
  const require_common_exceptions_bad_request_exception = require('./common/exceptions/bad-request.exception.cjs');
5
4
  const require_common_exceptions_no_api_key_provided_exception = require('./common/exceptions/no-api-key-provided.exception.cjs');
@@ -9,9 +8,9 @@ const require_common_exceptions_rate_limit_exceeded_exception = require('./commo
9
8
  const require_common_exceptions_signature_verification_exception = require('./common/exceptions/signature-verification.exception.cjs');
10
9
  const require_common_exceptions_unauthorized_exception = require('./common/exceptions/unauthorized.exception.cjs');
11
10
  const require_common_exceptions_unprocessable_entity_exception = require('./common/exceptions/unprocessable-entity.exception.cjs');
12
- const require_actions_actions = require('./actions/actions.cjs');
13
- const require_webhooks_webhooks = require('./webhooks/webhooks.cjs');
11
+ const require_pkce_pkce = require('./pkce/pkce.cjs');
14
12
  const require_common_utils_pagination = require('./common/utils/pagination.cjs');
13
+ const require_webhooks_webhooks = require('./webhooks/webhooks.cjs');
15
14
  const require_user_management_interfaces_authenticate_with_session_cookie_interface = require('./user-management/interfaces/authenticate-with-session-cookie.interface.cjs');
16
15
  const require_user_management_interfaces_revoke_session_options_interface = require('./user-management/interfaces/revoke-session-options.interface.cjs');
17
16
  const require_user_management_interfaces_refresh_and_seal_session_data_interface = require('./user-management/interfaces/refresh-and-seal-session-data.interface.cjs');
@@ -19,7 +18,11 @@ const require_fga_interfaces_check_op_enum = require('./fga/interfaces/check-op.
19
18
  const require_fga_interfaces_check_interface = require('./fga/interfaces/check.interface.cjs');
20
19
  const require_fga_interfaces_resource_op_enum = require('./fga/interfaces/resource-op.enum.cjs');
21
20
  const require_fga_interfaces_warrant_op_enum = require('./fga/interfaces/warrant-op.enum.cjs');
21
+ const require_common_crypto_subtle_crypto_provider = require('./common/crypto/subtle-crypto-provider.cjs');
22
+ const require_common_net_fetch_client = require('./common/net/fetch-client.cjs');
23
+ const require_actions_actions = require('./actions/actions.cjs');
22
24
  const require_workos = require('./workos.cjs');
25
+ const require_factory = require('./factory.cjs');
23
26
  const require_organizations_interfaces_domain_data_interface = require('./organizations/interfaces/domain-data.interface.cjs');
24
27
  const require_organization_domains_interfaces_organization_domain_interface = require('./organization-domains/interfaces/organization-domain.interface.cjs');
25
28
  const require_portal_interfaces_generate_portal_link_intent_interface = require('./portal/interfaces/generate-portal-link-intent.interface.cjs');
@@ -29,14 +32,17 @@ const require_sso_interfaces_connection_type_enum = require('./sso/interfaces/co
29
32
  var WorkOSNode = class extends require_workos.WorkOS {
30
33
  /** @override */
31
34
  createHttpClient(options, userAgent) {
35
+ const headers = {};
36
+ const configHeaders = options.config?.headers;
37
+ if (configHeaders) if (configHeaders instanceof Headers) configHeaders.forEach((v, k) => headers[k] = v);
38
+ else if (Array.isArray(configHeaders)) configHeaders.forEach(([k, v]) => headers[k] = v);
39
+ else Object.assign(headers, configHeaders);
40
+ headers["User-Agent"] = userAgent;
41
+ if (this.key) headers["Authorization"] = `Bearer ${this.key}`;
32
42
  const opts = {
33
43
  ...options.config,
34
44
  timeout: options.timeout,
35
- headers: {
36
- ...options.config?.headers,
37
- Authorization: `Bearer ${this.key}`,
38
- "User-Agent": userAgent
39
- }
45
+ headers
40
46
  };
41
47
  return new require_common_net_fetch_client.FetchHttpClient(this.baseURL, opts, options.fetchFn);
42
48
  }
@@ -58,6 +64,7 @@ var WorkOSNode = class extends require_workos.WorkOS {
58
64
  };
59
65
 
60
66
  //#endregion
67
+ exports.ApiKeyRequiredException = require_common_exceptions_api_key_required_exception.ApiKeyRequiredException;
61
68
  exports.AuthenticateWithSessionCookieFailureReason = require_user_management_interfaces_authenticate_with_session_cookie_interface.AuthenticateWithSessionCookieFailureReason;
62
69
  exports.AutoPaginatable = require_common_utils_pagination.AutoPaginatable;
63
70
  exports.BadRequestException = require_common_exceptions_bad_request_exception.BadRequestException;
@@ -72,6 +79,7 @@ exports.NotFoundException = require_common_exceptions_not_found_exception.NotFou
72
79
  exports.OauthException = require_common_exceptions_oauth_exception.OauthException;
73
80
  exports.OrganizationDomainState = require_organization_domains_interfaces_organization_domain_interface.OrganizationDomainState;
74
81
  exports.OrganizationDomainVerificationStrategy = require_organization_domains_interfaces_organization_domain_interface.OrganizationDomainVerificationStrategy;
82
+ exports.PKCE = require_pkce_pkce.PKCE;
75
83
  exports.RateLimitExceededException = require_common_exceptions_rate_limit_exceeded_exception.RateLimitExceededException;
76
84
  exports.RefreshSessionFailureReason = require_user_management_interfaces_refresh_and_seal_session_data_interface.RefreshSessionFailureReason;
77
85
  exports.ResourceOp = require_fga_interfaces_resource_op_enum.ResourceOp;
@@ -80,5 +88,6 @@ exports.UnauthorizedException = require_common_exceptions_unauthorized_exception
80
88
  exports.UnprocessableEntityException = require_common_exceptions_unprocessable_entity_exception.UnprocessableEntityException;
81
89
  exports.WarrantOp = require_fga_interfaces_warrant_op_enum.WarrantOp;
82
90
  exports.WorkOS = WorkOSNode;
91
+ exports.createWorkOS = require_factory.createWorkOS;
83
92
  exports.serializeRevokeSessionOptions = require_user_management_interfaces_revoke_session_options_interface.serializeRevokeSessionOptions;
84
93
  //# sourceMappingURL=index.cjs.map
package/lib/index.cjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","names":["WorkOS","FetchHttpClient","Webhooks","SubtleCryptoProvider","Actions"],"sources":["../src/index.ts"],"sourcesContent":["import { SubtleCryptoProvider } from './common/crypto/subtle-crypto-provider';\nimport { CryptoProvider } from './common/crypto/crypto-provider';\n\nimport { HttpClient } from './common/net/http-client';\nimport { FetchHttpClient } from './common/net/fetch-client';\n\nimport { Actions } from './actions/actions';\nimport { Webhooks } from './webhooks/webhooks';\nimport { WorkOS } from './workos';\nimport { WorkOSOptions } from './common/interfaces';\n\nexport * from './actions/interfaces';\nexport * from './audit-logs/interfaces';\nexport * from './common/exceptions';\nexport * from './common/interfaces';\nexport * from './common/utils/pagination';\nexport * from './directory-sync/interfaces';\nexport * from './events/interfaces';\nexport * from './feature-flags/interfaces';\nexport * from './fga/interfaces';\nexport * from './organizations/interfaces';\nexport * from './organization-domains/interfaces';\nexport * from './passwordless/interfaces';\nexport * from './portal/interfaces';\nexport * from './roles/interfaces';\nexport * from './sso/interfaces';\nexport * from './user-management/interfaces';\nexport * from './vault/interfaces';\n\nclass WorkOSNode extends WorkOS {\n /** @override */\n createHttpClient(options: WorkOSOptions, userAgent: string): HttpClient {\n const opts = {\n ...options.config,\n timeout: options.timeout, // Pass through the timeout option\n headers: {\n ...options.config?.headers,\n Authorization: `Bearer ${this.key}`,\n 'User-Agent': userAgent,\n },\n };\n\n return new FetchHttpClient(this.baseURL, opts, options.fetchFn);\n }\n\n /** @override */\n createWebhookClient(): Webhooks {\n return new Webhooks(this.getCryptoProvider());\n }\n\n override getCryptoProvider(): CryptoProvider {\n return new SubtleCryptoProvider();\n }\n\n /** @override */\n createActionsClient(): Actions {\n return new Actions(this.getCryptoProvider());\n }\n\n /** @override */\n emitWarning(warning: string): void {\n return process.emitWarning(warning, 'WorkOS');\n }\n}\n\nexport { WorkOSNode as WorkOS };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BA,IAAM,aAAN,cAAyBA,sBAAO;;CAE9B,iBAAiB,SAAwB,WAA+B;EACtE,MAAM,OAAO;GACX,GAAG,QAAQ;GACX,SAAS,QAAQ;GACjB,SAAS;IACP,GAAG,QAAQ,QAAQ;IACnB,eAAe,UAAU,KAAK;IAC9B,cAAc;IACf;GACF;AAED,SAAO,IAAIC,gDAAgB,KAAK,SAAS,MAAM,QAAQ,QAAQ;;;CAIjE,sBAAgC;AAC9B,SAAO,IAAIC,mCAAS,KAAK,mBAAmB,CAAC;;CAG/C,AAAS,oBAAoC;AAC3C,SAAO,IAAIC,mEAAsB;;;CAInC,sBAA+B;AAC7B,SAAO,IAAIC,gCAAQ,KAAK,mBAAmB,CAAC;;;CAI9C,YAAY,SAAuB;AACjC,SAAO,QAAQ,YAAY,SAAS,SAAS"}
1
+ {"version":3,"file":"index.cjs","names":["WorkOS","headers: Record<string, string>","FetchHttpClient","Webhooks","SubtleCryptoProvider","Actions"],"sources":["../src/index.ts"],"sourcesContent":["import { SubtleCryptoProvider } from './common/crypto/subtle-crypto-provider';\nimport { CryptoProvider } from './common/crypto/crypto-provider';\n\nimport { HttpClient } from './common/net/http-client';\nimport { FetchHttpClient } from './common/net/fetch-client';\n\nimport { Actions } from './actions/actions';\nimport { Webhooks } from './webhooks/webhooks';\nimport { WorkOS } from './workos';\nimport { WorkOSOptions } from './common/interfaces';\n\nexport * from './actions/interfaces';\nexport * from './api-keys/interfaces';\nexport * from './audit-logs/interfaces';\nexport * from './common/exceptions';\nexport * from './common/interfaces';\nexport * from './common/utils/pagination';\nexport * from './directory-sync/interfaces';\nexport * from './events/interfaces';\nexport * from './feature-flags/interfaces';\nexport * from './fga/interfaces';\nexport * from './organizations/interfaces';\nexport * from './organization-domains/interfaces';\nexport * from './passwordless/interfaces';\nexport * from './portal/interfaces';\nexport * from './roles/interfaces';\nexport * from './sso/interfaces';\nexport * from './user-management/interfaces';\nexport * from './vault/interfaces';\nexport * from './pkce/pkce';\nexport {\n createWorkOS,\n type PublicWorkOS,\n type PublicUserManagement,\n type PublicSSO,\n type PublicClientOptions,\n type ConfidentialClientOptions,\n} from './factory';\n\nclass WorkOSNode extends WorkOS {\n /** @override */\n createHttpClient(options: WorkOSOptions, userAgent: string): HttpClient {\n const headers: Record<string, string> = {};\n\n const configHeaders = options.config?.headers;\n if (configHeaders) {\n if (configHeaders instanceof Headers) {\n configHeaders.forEach((v, k) => (headers[k] = v));\n } else if (Array.isArray(configHeaders)) {\n configHeaders.forEach(([k, v]) => (headers[k] = v));\n } else {\n Object.assign(headers, configHeaders);\n }\n }\n\n headers['User-Agent'] = userAgent;\n\n if (this.key) {\n headers['Authorization'] = `Bearer ${this.key}`;\n }\n\n const opts = {\n ...options.config,\n timeout: options.timeout,\n headers,\n };\n\n return new FetchHttpClient(this.baseURL, opts, options.fetchFn);\n }\n\n /** @override */\n createWebhookClient(): Webhooks {\n return new Webhooks(this.getCryptoProvider());\n }\n\n override getCryptoProvider(): CryptoProvider {\n return new SubtleCryptoProvider();\n }\n\n /** @override */\n createActionsClient(): Actions {\n return new Actions(this.getCryptoProvider());\n }\n\n /** @override */\n emitWarning(warning: string): void {\n return process.emitWarning(warning, 'WorkOS');\n }\n}\n\nexport { WorkOSNode as WorkOS };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuCA,IAAM,aAAN,cAAyBA,sBAAO;;CAE9B,iBAAiB,SAAwB,WAA+B;EACtE,MAAMC,UAAkC,EAAE;EAE1C,MAAM,gBAAgB,QAAQ,QAAQ;AACtC,MAAI,cACF,KAAI,yBAAyB,QAC3B,eAAc,SAAS,GAAG,MAAO,QAAQ,KAAK,EAAG;WACxC,MAAM,QAAQ,cAAc,CACrC,eAAc,SAAS,CAAC,GAAG,OAAQ,QAAQ,KAAK,EAAG;MAEnD,QAAO,OAAO,SAAS,cAAc;AAIzC,UAAQ,gBAAgB;AAExB,MAAI,KAAK,IACP,SAAQ,mBAAmB,UAAU,KAAK;EAG5C,MAAM,OAAO;GACX,GAAG,QAAQ;GACX,SAAS,QAAQ;GACjB;GACD;AAED,SAAO,IAAIC,gDAAgB,KAAK,SAAS,MAAM,QAAQ,QAAQ;;;CAIjE,sBAAgC;AAC9B,SAAO,IAAIC,mCAAS,KAAK,mBAAmB,CAAC;;CAG/C,AAAS,oBAAoC;AAC3C,SAAO,IAAIC,mEAAsB;;;CAInC,sBAA+B;AAC7B,SAAO,IAAIC,gCAAQ,KAAK,mBAAmB,CAAC;;;CAI9C,YAAY,SAAuB;AACjC,SAAO,QAAQ,YAAY,SAAS,SAAS"}
package/lib/index.d.cts CHANGED
@@ -7,7 +7,7 @@ import { ListDirectoryGroupsOptions } from "./directory-sync/interfaces/list-gro
7
7
  import { ListDirectoryUsersOptions } from "./directory-sync/interfaces/list-directory-users-options.interface.cjs";
8
8
  import { ListOrganizationRolesResponse, OrganizationRoleResponse, Role, RoleEvent, RoleEventResponse, RoleList, RoleResponse } from "./roles/interfaces/role.interface.cjs";
9
9
  import { DefaultCustomAttributes, DirectoryUser, DirectoryUserResponse, DirectoryUserWithGroups, DirectoryUserWithGroupsResponse } from "./directory-sync/interfaces/directory-user.interface.cjs";
10
- import { SSOAuthorizationURLOptions } from "./sso/interfaces/authorization-url-options.interface.cjs";
10
+ import { SSOAuthorizationURLOptions, SSOPKCEAuthorizationURLResult } from "./sso/interfaces/authorization-url-options.interface.cjs";
11
11
  import { ConnectionType } from "./sso/interfaces/connection-type.enum.cjs";
12
12
  import { Connection, ConnectionDomain, ConnectionResponse } from "./sso/interfaces/connection.interface.cjs";
13
13
  import { GetProfileOptions } from "./sso/interfaces/get-profile-options.interface.cjs";
@@ -16,7 +16,7 @@ import { ListConnectionsOptions, SerializedListConnectionsOptions } from "./sso/
16
16
  import { OauthTokens, OauthTokensResponse } from "./user-management/interfaces/oauth-tokens.interface.cjs";
17
17
  import { Profile, ProfileResponse } from "./sso/interfaces/profile.interface.cjs";
18
18
  import { ProfileAndToken, ProfileAndTokenResponse } from "./sso/interfaces/profile-and-token.interface.cjs";
19
- import { AuthenticateWithOptionsBase, AuthenticateWithSessionOptions, SerializedAuthenticateWithOptionsBase, SerializedAuthenticateWithPKCEBase } from "./user-management/interfaces/authenticate-with-options-base.interface.cjs";
19
+ import { AuthenticateWithOptionsBase, AuthenticateWithSessionOptions, SerializedAuthenticatePublicClientBase, SerializedAuthenticateWithOptionsBase, WithResolvedClientId } from "./user-management/interfaces/authenticate-with-options-base.interface.cjs";
20
20
  import { AuthenticateUserWithCodeCredentials, AuthenticateWithCodeOptions, SerializedAuthenticateWithCodeOptions } from "./user-management/interfaces/authenticate-with-code-options.interface.cjs";
21
21
  import { AuthenticateWithCodeAndVerifierOptions, SerializedAuthenticateWithCodeAndVerifierOptions } from "./user-management/interfaces/authenticate-with-code-and-verifier-options.interface.cjs";
22
22
  import { AuthenticateUserWithEmailVerificationCredentials, AuthenticateWithEmailVerificationOptions, SerializedAuthenticateWithEmailVerificationOptions } from "./user-management/interfaces/authenticate-with-email-verification-options.interface.cjs";
@@ -24,6 +24,7 @@ import { AuthenticateUserWithMagicAuthCredentials, AuthenticateWithMagicAuthOpti
24
24
  import { AuthenticateUserWithOrganizationSelectionCredentials, AuthenticateWithOrganizationSelectionOptions, SerializedAuthenticateWithOrganizationSelectionOptions } from "./user-management/interfaces/authenticate-with-organization-selection.interface.cjs";
25
25
  import { AuthenticateUserWithPasswordCredentials, AuthenticateWithPasswordOptions, SerializedAuthenticateWithPasswordOptions } from "./user-management/interfaces/authenticate-with-password-options.interface.cjs";
26
26
  import { AuthenticateUserWithRefreshTokenCredentials, AuthenticateWithRefreshTokenOptions, SerializedAuthenticateWithRefreshTokenOptions } from "./user-management/interfaces/authenticate-with-refresh-token-options.interface.cjs";
27
+ import { AuthenticateWithRefreshTokenPublicClientOptions, SerializedAuthenticateWithRefreshTokenPublicClientOptions } from "./user-management/interfaces/authenticate-with-refresh-token-public-client-options.interface.cjs";
27
28
  import { Impersonator, ImpersonatorResponse } from "./user-management/interfaces/impersonator.interface.cjs";
28
29
  import { User, UserResponse } from "./user-management/interfaces/user.interface.cjs";
29
30
  import { AuthenticationResponse, AuthenticationResponseResponse } from "./user-management/interfaces/authentication-response.interface.cjs";
@@ -31,7 +32,7 @@ import { AccessToken, AuthenticateWithSessionCookieFailedResponse, AuthenticateW
31
32
  import { AuthenticateUserWithTotpCredentials, AuthenticateWithTotpOptions, SerializedAuthenticateWithTotpOptions } from "./user-management/interfaces/authenticate-with-totp-options.interface.cjs";
32
33
  import { AuthenticationEvent, AuthenticationEventResponse } from "./user-management/interfaces/authentication-event.interface.cjs";
33
34
  import { AuthenticationRadarRiskDetectedEventData, AuthenticationRadarRiskDetectedEventResponseData } from "./user-management/interfaces/authentication-radar-risk-detected-event.interface.cjs";
34
- import { UserManagementAuthorizationURLOptions } from "./user-management/interfaces/authorization-url-options.interface.cjs";
35
+ import { PKCEAuthorizationURLResult, UserManagementAuthorizationURLOptions } from "./user-management/interfaces/authorization-url-options.interface.cjs";
35
36
  import { CreateMagicAuthOptions, SerializedCreateMagicAuthOptions } from "./user-management/interfaces/create-magic-auth-options.interface.cjs";
36
37
  import { CreateOrganizationMembershipOptions, SerializedCreateOrganizationMembershipOptions } from "./user-management/interfaces/create-organization-membership-options.interface.cjs";
37
38
  import { CreatePasswordResetOptions, SerializedCreatePasswordResetOptions } from "./user-management/interfaces/create-password-reset-options.interface.cjs";
@@ -48,6 +49,7 @@ import { ListOrganizationMembershipsOptions, SerializedListOrganizationMembershi
48
49
  import { ListSessionsOptions, SerializedListSessionsOptions } from "./user-management/interfaces/list-sessions-options.interface.cjs";
49
50
  import { ListUserFeatureFlagsOptions } from "./user-management/interfaces/list-user-feature-flags-options.interface.cjs";
50
51
  import { ListUsersOptions, SerializedListUsersOptions } from "./user-management/interfaces/list-users-options.interface.cjs";
52
+ import { LogoutURLOptions } from "./user-management/interfaces/logout-url-options.interface.cjs";
51
53
  import { MagicAuth, MagicAuthEvent, MagicAuthEventResponse, MagicAuthResponse } from "./user-management/interfaces/magic-auth.interface.cjs";
52
54
  import { PasswordReset, PasswordResetEvent, PasswordResetEventResponse, PasswordResetResponse } from "./user-management/interfaces/password-reset.interface.cjs";
53
55
  import { RefreshSessionFailureReason, RefreshSessionResponse } from "./user-management/interfaces/refresh-and-seal-session-data.interface.cjs";
@@ -62,7 +64,12 @@ import { SerializedUpdateUserPasswordOptions, UpdateUserPasswordOptions } from "
62
64
  import { SerializedVerifyEmailOptions, VerifyEmailOptions } from "./user-management/interfaces/verify-email-options.interface.cjs";
63
65
  import { CreateOrganizationDomainOptions, SerializedCreateOrganizationDomainOptions } from "./organization-domains/interfaces/create-organization-domain-options.interface.cjs";
64
66
  import { OrganizationDomain, OrganizationDomainResponse, OrganizationDomainState, OrganizationDomainVerificationStrategy } from "./organization-domains/interfaces/organization-domain.interface.cjs";
65
- import { AuthenticationEmailVerificationSucceededEvent, AuthenticationEmailVerificationSucceededEventResponse, AuthenticationMagicAuthFailedEvent, AuthenticationMagicAuthFailedEventResponse, AuthenticationMagicAuthSucceededEvent, AuthenticationMagicAuthSucceededEventResponse, AuthenticationMfaSucceededEvent, AuthenticationMfaSucceededEventResponse, AuthenticationOAuthFailedEvent, AuthenticationOAuthFailedEventResponse, AuthenticationOAuthSucceededEvent, AuthenticationOAuthSucceededEventResponse, AuthenticationPasskeyFailedEvent, AuthenticationPasskeyFailedEventResponse, AuthenticationPasskeySucceededEvent, AuthenticationPasskeySucceededEventResponse, AuthenticationPasswordFailedEvent, AuthenticationPasswordFailedEventResponse, AuthenticationPasswordSucceededEvent, AuthenticationPasswordSucceededEventResponse, AuthenticationRadarRiskDetectedEvent, AuthenticationRadarRiskDetectedEventResponse, AuthenticationSSOFailedEvent, AuthenticationSSOFailedEventResponse, AuthenticationSSOSucceededEvent, AuthenticationSSOSucceededEventResponse, ConnectionActivatedEvent, ConnectionActivatedEventResponse, ConnectionDeactivatedEvent, ConnectionDeactivatedEventResponse, ConnectionDeletedEvent, ConnectionDeletedEventResponse, DsyncActivatedEvent, DsyncActivatedEventResponse, DsyncDeletedEvent, DsyncDeletedEventResponse, DsyncGroupCreatedEvent, DsyncGroupCreatedEventResponse, DsyncGroupDeletedEvent, DsyncGroupDeletedEventResponse, DsyncGroupUpdatedEvent, DsyncGroupUpdatedEventResponse, DsyncGroupUserAddedEvent, DsyncGroupUserAddedEventResponse, DsyncGroupUserRemovedEvent, DsyncGroupUserRemovedEventResponse, DsyncUserCreatedEvent, DsyncUserCreatedEventResponse, DsyncUserDeletedEvent, DsyncUserDeletedEventResponse, DsyncUserUpdatedEvent, DsyncUserUpdatedEventResponse, EmailVerificationCreatedEvent, EmailVerificationCreatedEventResponse, Event, EventBase, EventName, EventResponse, InvitationAcceptedEvent, InvitationAcceptedEventResponse, InvitationCreatedEvent, InvitationCreatedEventResponse, InvitationRevokedEvent, InvitationRevokedEventResponse, MagicAuthCreatedEvent, MagicAuthCreatedEventResponse, OrganizationCreatedEvent, OrganizationCreatedResponse, OrganizationDeletedEvent, OrganizationDeletedResponse, OrganizationDomainCreatedEvent, OrganizationDomainCreatedEventResponse, OrganizationDomainDeletedEvent, OrganizationDomainDeletedEventResponse, OrganizationDomainUpdatedEvent, OrganizationDomainUpdatedEventResponse, OrganizationDomainVerificationFailedEvent, OrganizationDomainVerificationFailedEventResponse, OrganizationDomainVerifiedEvent, OrganizationDomainVerifiedEventResponse, OrganizationMembershipCreated, OrganizationMembershipCreatedResponse, OrganizationMembershipDeleted, OrganizationMembershipDeletedResponse, OrganizationMembershipUpdated, OrganizationMembershipUpdatedResponse, OrganizationUpdatedEvent, OrganizationUpdatedResponse, PasswordResetCreatedEvent, PasswordResetCreatedEventResponse, PasswordResetSucceededEvent, PasswordResetSucceededEventResponse, RoleCreatedEvent, RoleCreatedEventResponse, RoleDeletedEvent, RoleDeletedEventResponse, RoleUpdatedEvent, RoleUpdatedEventResponse, SessionCreatedEvent, SessionCreatedEventResponse, SessionRevokedEvent, SessionRevokedEventResponse, UserCreatedEvent, UserCreatedEventResponse, UserDeletedEvent, UserDeletedEventResponse, UserUpdatedEvent, UserUpdatedEventResponse } from "./common/interfaces/event.interface.cjs";
67
+ import { ApiKey, SerializedApiKey } from "./api-keys/interfaces/api-key.interface.cjs";
68
+ import { CreateOrganizationApiKeyOptions, CreateOrganizationApiKeyRequestOptions, SerializedCreateOrganizationApiKeyOptions } from "./api-keys/interfaces/create-organization-api-key-options.interface.cjs";
69
+ import { CreatedApiKey, SerializedCreatedApiKey } from "./api-keys/interfaces/created-api-key.interface.cjs";
70
+ import { ListOrganizationApiKeysOptions } from "./api-keys/interfaces/list-organization-api-keys-options.interface.cjs";
71
+ import { SerializedValidateApiKeyResponse, ValidateApiKeyOptions, ValidateApiKeyResponse } from "./api-keys/interfaces/validate-api-key.interface.cjs";
72
+ import { ApiKeyCreatedEvent, ApiKeyCreatedEventResponse, ApiKeyDeletedEvent, ApiKeyDeletedEventResponse, AuthenticationEmailVerificationSucceededEvent, AuthenticationEmailVerificationSucceededEventResponse, AuthenticationMagicAuthFailedEvent, AuthenticationMagicAuthFailedEventResponse, AuthenticationMagicAuthSucceededEvent, AuthenticationMagicAuthSucceededEventResponse, AuthenticationMfaSucceededEvent, AuthenticationMfaSucceededEventResponse, AuthenticationOAuthFailedEvent, AuthenticationOAuthFailedEventResponse, AuthenticationOAuthSucceededEvent, AuthenticationOAuthSucceededEventResponse, AuthenticationPasskeyFailedEvent, AuthenticationPasskeyFailedEventResponse, AuthenticationPasskeySucceededEvent, AuthenticationPasskeySucceededEventResponse, AuthenticationPasswordFailedEvent, AuthenticationPasswordFailedEventResponse, AuthenticationPasswordSucceededEvent, AuthenticationPasswordSucceededEventResponse, AuthenticationRadarRiskDetectedEvent, AuthenticationRadarRiskDetectedEventResponse, AuthenticationSSOFailedEvent, AuthenticationSSOFailedEventResponse, AuthenticationSSOSucceededEvent, AuthenticationSSOSucceededEventResponse, ConnectionActivatedEvent, ConnectionActivatedEventResponse, ConnectionDeactivatedEvent, ConnectionDeactivatedEventResponse, ConnectionDeletedEvent, ConnectionDeletedEventResponse, DsyncActivatedEvent, DsyncActivatedEventResponse, DsyncDeletedEvent, DsyncDeletedEventResponse, DsyncGroupCreatedEvent, DsyncGroupCreatedEventResponse, DsyncGroupDeletedEvent, DsyncGroupDeletedEventResponse, DsyncGroupUpdatedEvent, DsyncGroupUpdatedEventResponse, DsyncGroupUserAddedEvent, DsyncGroupUserAddedEventResponse, DsyncGroupUserRemovedEvent, DsyncGroupUserRemovedEventResponse, DsyncUserCreatedEvent, DsyncUserCreatedEventResponse, DsyncUserDeletedEvent, DsyncUserDeletedEventResponse, DsyncUserUpdatedEvent, DsyncUserUpdatedEventResponse, EmailVerificationCreatedEvent, EmailVerificationCreatedEventResponse, Event, EventBase, EventName, EventResponse, InvitationAcceptedEvent, InvitationAcceptedEventResponse, InvitationCreatedEvent, InvitationCreatedEventResponse, InvitationResentEvent, InvitationResentEventResponse, InvitationRevokedEvent, InvitationRevokedEventResponse, MagicAuthCreatedEvent, MagicAuthCreatedEventResponse, OrganizationCreatedEvent, OrganizationCreatedResponse, OrganizationDeletedEvent, OrganizationDeletedResponse, OrganizationDomainCreatedEvent, OrganizationDomainCreatedEventResponse, OrganizationDomainDeletedEvent, OrganizationDomainDeletedEventResponse, OrganizationDomainUpdatedEvent, OrganizationDomainUpdatedEventResponse, OrganizationDomainVerificationFailedEvent, OrganizationDomainVerificationFailedEventResponse, OrganizationDomainVerifiedEvent, OrganizationDomainVerifiedEventResponse, OrganizationMembershipCreated, OrganizationMembershipCreatedResponse, OrganizationMembershipDeleted, OrganizationMembershipDeletedResponse, OrganizationMembershipUpdated, OrganizationMembershipUpdatedResponse, OrganizationUpdatedEvent, OrganizationUpdatedResponse, PasswordResetCreatedEvent, PasswordResetCreatedEventResponse, PasswordResetSucceededEvent, PasswordResetSucceededEventResponse, RoleCreatedEvent, RoleCreatedEventResponse, RoleDeletedEvent, RoleDeletedEventResponse, RoleUpdatedEvent, RoleUpdatedEventResponse, SessionCreatedEvent, SessionCreatedEventResponse, SessionRevokedEvent, SessionRevokedEventResponse, UserCreatedEvent, UserCreatedEventResponse, UserDeletedEvent, UserDeletedEventResponse, UserUpdatedEvent, UserUpdatedEventResponse } from "./common/interfaces/event.interface.cjs";
66
73
  import { GetOptions } from "./common/interfaces/get-options.interface.cjs";
67
74
  import { List, ListResponse } from "./common/interfaces/list.interface.cjs";
68
75
  import { PostOptions } from "./common/interfaces/post-options.interface.cjs";
@@ -80,6 +87,7 @@ import { SerializedUpdateOrganizationOptions, UpdateOrganizationOptions } from "
80
87
  import { ActionContext, ActionPayload, UserData, UserDataPayload, UserRegistrationActionPayload } from "./actions/interfaces/action.interface.cjs";
81
88
  import { AuthenticationActionResponseData, ResponsePayload, UserRegistrationActionResponseData } from "./actions/interfaces/response-payload.interface.cjs";
82
89
  import { Actions } from "./actions/actions.cjs";
90
+ import { PKCE, PKCEPair } from "./pkce/pkce.cjs";
83
91
  import { AutoPaginatable } from "./common/utils/pagination.cjs";
84
92
  import { ListEventOptions, SerializedListEventOptions } from "./events/interfaces/list-events-options.interface.cjs";
85
93
  import { FeatureFlag, FeatureFlagResponse } from "./feature-flags/interfaces/feature-flag.interface.cjs";
@@ -100,7 +108,11 @@ import { ListWarrantsOptions, ListWarrantsRequestOptions, PolicyContext, Seriali
100
108
  import { CheckBatchOptions, CheckOptions, CheckRequestOptions, CheckResult, CheckResultInterface, CheckResultResponse, CheckWarrantOptions, DebugInfo, DebugInfoResponse, DecisionTreeNode, DecisionTreeNodeResponse, SerializedCheckBatchOptions, SerializedCheckOptions, SerializedCheckWarrantOptions } from "./fga/interfaces/check.interface.cjs";
101
109
  import { QueryOptions, QueryRequestOptions, QueryResult, QueryResultResponse, SerializedQueryOptions } from "./fga/interfaces/query.interface.cjs";
102
110
  import { WarrantToken, WarrantTokenResponse } from "./fga/interfaces/warrant-token.interface.cjs";
111
+ import { AddFlagTargetOptions } from "./feature-flags/interfaces/add-flag-target-options.interface.cjs";
112
+ import { ListFeatureFlagsOptions } from "./feature-flags/interfaces/list-feature-flags-options.interface.cjs";
113
+ import { RemoveFlagTargetOptions } from "./feature-flags/interfaces/remove-flag-target-options.interface.cjs";
103
114
  import { HttpClient } from "./common/net/http-client.cjs";
115
+ import { ApiKeyRequiredException } from "./common/exceptions/api-key-required.exception.cjs";
104
116
  import { GenericServerException } from "./common/exceptions/generic-server.exception.cjs";
105
117
  import { BadRequestException } from "./common/exceptions/bad-request.exception.cjs";
106
118
  import { NoApiKeyProvidedException } from "./common/exceptions/no-api-key-provided.exception.cjs";
@@ -110,6 +122,7 @@ import { RateLimitExceededException } from "./common/exceptions/rate-limit-excee
110
122
  import { SignatureVerificationException } from "./common/exceptions/signature-verification.exception.cjs";
111
123
  import { UnauthorizedException } from "./common/exceptions/unauthorized.exception.cjs";
112
124
  import { UnprocessableEntityException } from "./common/exceptions/unprocessable-entity.exception.cjs";
125
+ import { ConfidentialClientOptions, PublicClientOptions, PublicSSO, PublicUserManagement, PublicWorkOS, createWorkOS } from "./factory.cjs";
113
126
  import { DataKey, DataKeyPair, KeyContext } from "./vault/interfaces/key.interface.cjs";
114
127
  import { CreateDataKeyOptions, CreateDataKeyResponse } from "./vault/interfaces/key/create-data-key.interface.cjs";
115
128
  import { DecryptDataKeyOptions, DecryptDataKeyResponse } from "./vault/interfaces/key/decrypt-data-key.interface.cjs";
@@ -135,5 +148,5 @@ declare class WorkOSNode extends WorkOS {
135
148
  emitWarning(warning: string): void;
136
149
  }
137
150
  //#endregion
138
- export { AccessToken, ActionContext, ActionPayload, AuditLogActor, AuditLogActorSchema, AuditLogExport, AuditLogExportOptions, AuditLogExportResponse, AuditLogSchema, AuditLogSchemaMetadata, AuditLogTarget, AuditLogTargetSchema, AuthMethod, AuthenticateUserWithCodeCredentials, AuthenticateUserWithEmailVerificationCredentials, AuthenticateUserWithMagicAuthCredentials, AuthenticateUserWithOrganizationSelectionCredentials, AuthenticateUserWithPasswordCredentials, AuthenticateUserWithRefreshTokenCredentials, AuthenticateUserWithTotpCredentials, AuthenticateWithCodeAndVerifierOptions, AuthenticateWithCodeOptions, AuthenticateWithEmailVerificationOptions, AuthenticateWithMagicAuthOptions, AuthenticateWithOptionsBase, AuthenticateWithOrganizationSelectionOptions, AuthenticateWithPasswordOptions, AuthenticateWithRefreshTokenOptions, AuthenticateWithSessionCookieFailedResponse, AuthenticateWithSessionCookieFailureReason, AuthenticateWithSessionCookieOptions, AuthenticateWithSessionCookieSuccessResponse, AuthenticateWithSessionOptions, AuthenticateWithTotpOptions, AuthenticationActionResponseData, AuthenticationEmailVerificationSucceededEvent, AuthenticationEmailVerificationSucceededEventResponse, AuthenticationEvent, AuthenticationEventResponse, AuthenticationMagicAuthFailedEvent, AuthenticationMagicAuthFailedEventResponse, AuthenticationMagicAuthSucceededEvent, AuthenticationMagicAuthSucceededEventResponse, AuthenticationMfaSucceededEvent, AuthenticationMfaSucceededEventResponse, AuthenticationOAuthFailedEvent, AuthenticationOAuthFailedEventResponse, AuthenticationOAuthSucceededEvent, AuthenticationOAuthSucceededEventResponse, AuthenticationPasskeyFailedEvent, AuthenticationPasskeyFailedEventResponse, AuthenticationPasskeySucceededEvent, AuthenticationPasskeySucceededEventResponse, AuthenticationPasswordFailedEvent, AuthenticationPasswordFailedEventResponse, AuthenticationPasswordSucceededEvent, AuthenticationPasswordSucceededEventResponse, AuthenticationRadarRiskDetectedEvent, AuthenticationRadarRiskDetectedEventData, AuthenticationRadarRiskDetectedEventResponse, AuthenticationRadarRiskDetectedEventResponseData, AuthenticationResponse, AuthenticationResponseResponse, AuthenticationSSOFailedEvent, AuthenticationSSOFailedEventResponse, AuthenticationSSOSucceededEvent, AuthenticationSSOSucceededEventResponse, AutoPaginatable, BadRequestException, BatchWriteResourcesOptions, BatchWriteResourcesResponse, CheckBatchOptions, CheckOp, CheckOptions, CheckRequestOptions, CheckResult, CheckResultInterface, CheckResultResponse, CheckWarrantOptions, Connection, ConnectionActivatedEvent, ConnectionActivatedEventResponse, ConnectionDeactivatedEvent, ConnectionDeactivatedEventResponse, ConnectionDeletedEvent, ConnectionDeletedEventResponse, ConnectionDomain, ConnectionResponse, ConnectionType, CreateAuditLogEventOptions, CreateAuditLogEventRequestOptions, CreateAuditLogSchemaOptions, CreateAuditLogSchemaRequestOptions, CreateAuditLogSchemaResponse, CreateDataKeyOptions, CreateDataKeyResponse, CreateMagicAuthOptions, CreateObjectEntity, CreateObjectOptions, CreateOrganizationDomainOptions, CreateOrganizationMembershipOptions, CreateOrganizationOptions, CreateOrganizationRequestOptions, CreatePasswordResetOptions, CreatePasswordlessSessionOptions, CreateResourceOptions, CreateUserOptions, DataKey, DataKeyPair, DebugInfo, DebugInfoResponse, DecisionTreeNode, DecisionTreeNodeResponse, DecryptDataKeyOptions, DecryptDataKeyResponse, DefaultCustomAttributes, DeleteObjectOptions, DeleteResourceOptions, Directory, DirectoryGroup, DirectoryGroupResponse, DirectoryResponse, DirectoryState, DirectoryStateResponse, DirectoryType, DirectoryUser, DirectoryUserResponse, DirectoryUserWithGroups, DirectoryUserWithGroupsResponse, DomainData, DomainDataState, DsyncActivatedEvent, DsyncActivatedEventResponse, DsyncDeletedEvent, DsyncDeletedEventResponse, DsyncGroupCreatedEvent, DsyncGroupCreatedEventResponse, DsyncGroupDeletedEvent, DsyncGroupDeletedEventResponse, DsyncGroupUpdatedEvent, DsyncGroupUpdatedEventResponse, DsyncGroupUserAddedEvent, DsyncGroupUserAddedEventResponse, DsyncGroupUserRemovedEvent, DsyncGroupUserRemovedEventResponse, DsyncUserCreatedEvent, DsyncUserCreatedEventResponse, DsyncUserDeletedEvent, DsyncUserDeletedEventResponse, DsyncUserUpdatedEvent, DsyncUserUpdatedEventResponse, EmailVerification, EmailVerificationCreatedEvent, EmailVerificationCreatedEventResponse, EmailVerificationEvent, EmailVerificationEventResponse, EmailVerificationResponse, EnrollAuthFactorOptions, Event, EventBase, EventDirectory, EventDirectoryResponse, EventName, EventResponse, Factor, FactorResponse, FactorWithSecrets, FactorWithSecretsResponse, FeatureFlag, FeatureFlagResponse, GeneratePortalLinkIntent, GenericServerException, GetOptions, GetProfileAndTokenOptions, GetProfileOptions, GetResourceOptions, HttpClientInterface, HttpClientResponseInterface, Identity, IdentityResponse, Impersonator, ImpersonatorResponse, Invitation, InvitationAcceptedEvent, InvitationAcceptedEventResponse, InvitationCreatedEvent, InvitationCreatedEventResponse, InvitationEvent, InvitationEventResponse, InvitationResponse, InvitationRevokedEvent, InvitationRevokedEventResponse, KeyContext, List, ListAuthFactorsOptions, ListConnectionsOptions, ListDirectoriesOptions, ListDirectoryGroupsOptions, ListDirectoryUsersOptions, ListEventOptions, ListInvitationsOptions, ListObjectVersionsResponse, ListOrganizationFeatureFlagsOptions, ListOrganizationMembershipsOptions, ListOrganizationRolesResponse, ListOrganizationsOptions, ListResourcesOptions, ListResponse, ListSessionsOptions, ListUserFeatureFlagsOptions, ListUsersOptions, ListWarrantsOptions, ListWarrantsRequestOptions, MagicAuth, MagicAuthCreatedEvent, MagicAuthCreatedEventResponse, MagicAuthEvent, MagicAuthEventResponse, MagicAuthResponse, NoApiKeyProvidedException, NotFoundException, OauthException, OauthTokens, OauthTokensResponse, ObjectDigest, ObjectDigestResponse, ObjectMetadata, ObjectUpdateBy, ObjectVersion, ObjectVersionResponse, Organization, OrganizationCreatedEvent, OrganizationCreatedResponse, OrganizationDeletedEvent, OrganizationDeletedResponse, OrganizationDomain, OrganizationDomainCreatedEvent, OrganizationDomainCreatedEventResponse, OrganizationDomainDeletedEvent, OrganizationDomainDeletedEventResponse, OrganizationDomainResponse, OrganizationDomainState, OrganizationDomainUpdatedEvent, OrganizationDomainUpdatedEventResponse, OrganizationDomainVerificationFailedEvent, OrganizationDomainVerificationFailedEventResponse, OrganizationDomainVerificationStrategy, OrganizationDomainVerifiedEvent, OrganizationDomainVerifiedEventResponse, OrganizationMembership, OrganizationMembershipCreated, OrganizationMembershipCreatedResponse, OrganizationMembershipDeleted, OrganizationMembershipDeletedResponse, OrganizationMembershipResponse, OrganizationMembershipStatus, OrganizationMembershipUpdated, OrganizationMembershipUpdatedResponse, OrganizationResponse, OrganizationRoleResponse, OrganizationUpdatedEvent, OrganizationUpdatedResponse, PaginationOptions, PasswordReset, PasswordResetCreatedEvent, PasswordResetCreatedEventResponse, PasswordResetEvent, PasswordResetEventResponse, PasswordResetResponse, PasswordResetSucceededEvent, PasswordResetSucceededEventResponse, PasswordlessSession, PasswordlessSessionResponse, PolicyContext, PostOptions, Profile, ProfileAndToken, ProfileAndTokenResponse, ProfileResponse, PutOptions, QueryOptions, QueryRequestOptions, QueryResult, QueryResultResponse, RateLimitExceededException, ReadObjectMetadataResponse, ReadObjectOptions, ReadObjectResponse, RefreshSessionFailureReason, RefreshSessionResponse, RequestHeaders, RequestOptions, ResetPasswordOptions, Resource, ResourceInterface, ResourceOp, ResourceOptions, ResourceResponse, ResponseHeaderValue, ResponseHeaders, ResponsePayload, RevokeSessionOptions, Role, RoleCreatedEvent, RoleCreatedEventResponse, RoleDeletedEvent, RoleDeletedEventResponse, RoleEvent, RoleEventResponse, RoleList, RoleResponse, RoleUpdatedEvent, RoleUpdatedEventResponse, SSOAuthorizationURLOptions, SendInvitationOptions, SendSessionResponse, SendVerificationEmailOptions, SerializedAuditLogExportOptions, SerializedAuthenticateWithCodeAndVerifierOptions, SerializedAuthenticateWithCodeOptions, SerializedAuthenticateWithEmailVerificationOptions, SerializedAuthenticateWithMagicAuthOptions, SerializedAuthenticateWithOptionsBase, SerializedAuthenticateWithOrganizationSelectionOptions, SerializedAuthenticateWithPKCEBase, SerializedAuthenticateWithPasswordOptions, SerializedAuthenticateWithRefreshTokenOptions, SerializedAuthenticateWithTotpOptions, SerializedBatchWriteResourcesOptions, SerializedCheckBatchOptions, SerializedCheckOptions, SerializedCheckWarrantOptions, SerializedCreateAuditLogEventOptions, SerializedCreateAuditLogSchemaOptions, SerializedCreateMagicAuthOptions, SerializedCreateOrganizationDomainOptions, SerializedCreateOrganizationMembershipOptions, SerializedCreateOrganizationOptions, SerializedCreatePasswordResetOptions, SerializedCreatePasswordlessSessionOptions, SerializedCreateResourceOptions, SerializedCreateUserOptions, SerializedDeleteResourceOptions, SerializedEnrollUserInMfaFactorOptions, SerializedListConnectionsOptions, SerializedListDirectoriesOptions, SerializedListEventOptions, SerializedListInvitationsOptions, SerializedListOrganizationMembershipsOptions, SerializedListResourcesOptions, SerializedListSessionsOptions, SerializedListUsersOptions, SerializedListWarrantsOptions, SerializedQueryOptions, SerializedResetPasswordOptions, SerializedResourceOptions, SerializedRevokeSessionOptions, SerializedSendInvitationOptions, SerializedSubject, SerializedUpdateOrganizationMembershipOptions, SerializedUpdateOrganizationOptions, SerializedUpdateUserOptions, SerializedUpdateUserPasswordOptions, SerializedVerifyEmailOptions, SerializedWriteWarrantOptions, Session, SessionCookieData, SessionCreatedEvent, SessionCreatedEventResponse, SessionResponse, SessionRevokedEvent, SessionRevokedEventResponse, SessionStatus, SignatureVerificationException, Subject, UnauthorizedException, UnprocessableEntityError, UnprocessableEntityException, UpdateObjectEntity, UpdateObjectOptions, UpdateOrganizationMembershipOptions, UpdateOrganizationOptions, UpdateResourceOptions, UpdateUserOptions, UpdateUserPasswordOptions, User, UserCreatedEvent, UserCreatedEventResponse, UserData, UserDataPayload, UserDeletedEvent, UserDeletedEventResponse, UserManagementAuthorizationURLOptions, UserRegistrationActionPayload, UserRegistrationActionResponseData, UserResponse, UserUpdatedEvent, UserUpdatedEventResponse, VaultObject, VerifyEmailOptions, Warrant, WarrantOp, WarrantResponse, WarrantToken, WarrantTokenResponse, WorkOSNode as WorkOS, WorkOSOptions, WorkOSResponseError, WriteWarrantOptions, serializeRevokeSessionOptions };
151
+ export { AccessToken, ActionContext, ActionPayload, AddFlagTargetOptions, ApiKey, ApiKeyCreatedEvent, ApiKeyCreatedEventResponse, ApiKeyDeletedEvent, ApiKeyDeletedEventResponse, ApiKeyRequiredException, AuditLogActor, AuditLogActorSchema, AuditLogExport, AuditLogExportOptions, AuditLogExportResponse, AuditLogSchema, AuditLogSchemaMetadata, AuditLogTarget, AuditLogTargetSchema, AuthMethod, AuthenticateUserWithCodeCredentials, AuthenticateUserWithEmailVerificationCredentials, AuthenticateUserWithMagicAuthCredentials, AuthenticateUserWithOrganizationSelectionCredentials, AuthenticateUserWithPasswordCredentials, AuthenticateUserWithRefreshTokenCredentials, AuthenticateUserWithTotpCredentials, AuthenticateWithCodeAndVerifierOptions, AuthenticateWithCodeOptions, AuthenticateWithEmailVerificationOptions, AuthenticateWithMagicAuthOptions, AuthenticateWithOptionsBase, AuthenticateWithOrganizationSelectionOptions, AuthenticateWithPasswordOptions, AuthenticateWithRefreshTokenOptions, AuthenticateWithRefreshTokenPublicClientOptions, AuthenticateWithSessionCookieFailedResponse, AuthenticateWithSessionCookieFailureReason, AuthenticateWithSessionCookieOptions, AuthenticateWithSessionCookieSuccessResponse, AuthenticateWithSessionOptions, AuthenticateWithTotpOptions, AuthenticationActionResponseData, AuthenticationEmailVerificationSucceededEvent, AuthenticationEmailVerificationSucceededEventResponse, AuthenticationEvent, AuthenticationEventResponse, AuthenticationMagicAuthFailedEvent, AuthenticationMagicAuthFailedEventResponse, AuthenticationMagicAuthSucceededEvent, AuthenticationMagicAuthSucceededEventResponse, AuthenticationMfaSucceededEvent, AuthenticationMfaSucceededEventResponse, AuthenticationOAuthFailedEvent, AuthenticationOAuthFailedEventResponse, AuthenticationOAuthSucceededEvent, AuthenticationOAuthSucceededEventResponse, AuthenticationPasskeyFailedEvent, AuthenticationPasskeyFailedEventResponse, AuthenticationPasskeySucceededEvent, AuthenticationPasskeySucceededEventResponse, AuthenticationPasswordFailedEvent, AuthenticationPasswordFailedEventResponse, AuthenticationPasswordSucceededEvent, AuthenticationPasswordSucceededEventResponse, AuthenticationRadarRiskDetectedEvent, AuthenticationRadarRiskDetectedEventData, AuthenticationRadarRiskDetectedEventResponse, AuthenticationRadarRiskDetectedEventResponseData, AuthenticationResponse, AuthenticationResponseResponse, AuthenticationSSOFailedEvent, AuthenticationSSOFailedEventResponse, AuthenticationSSOSucceededEvent, AuthenticationSSOSucceededEventResponse, AutoPaginatable, BadRequestException, BatchWriteResourcesOptions, BatchWriteResourcesResponse, CheckBatchOptions, CheckOp, CheckOptions, CheckRequestOptions, CheckResult, CheckResultInterface, CheckResultResponse, CheckWarrantOptions, type ConfidentialClientOptions, Connection, ConnectionActivatedEvent, ConnectionActivatedEventResponse, ConnectionDeactivatedEvent, ConnectionDeactivatedEventResponse, ConnectionDeletedEvent, ConnectionDeletedEventResponse, ConnectionDomain, ConnectionResponse, ConnectionType, CreateAuditLogEventOptions, CreateAuditLogEventRequestOptions, CreateAuditLogSchemaOptions, CreateAuditLogSchemaRequestOptions, CreateAuditLogSchemaResponse, CreateDataKeyOptions, CreateDataKeyResponse, CreateMagicAuthOptions, CreateObjectEntity, CreateObjectOptions, CreateOrganizationApiKeyOptions, CreateOrganizationApiKeyRequestOptions, CreateOrganizationDomainOptions, CreateOrganizationMembershipOptions, CreateOrganizationOptions, CreateOrganizationRequestOptions, CreatePasswordResetOptions, CreatePasswordlessSessionOptions, CreateResourceOptions, CreateUserOptions, CreatedApiKey, DataKey, DataKeyPair, DebugInfo, DebugInfoResponse, DecisionTreeNode, DecisionTreeNodeResponse, DecryptDataKeyOptions, DecryptDataKeyResponse, DefaultCustomAttributes, DeleteObjectOptions, DeleteResourceOptions, Directory, DirectoryGroup, DirectoryGroupResponse, DirectoryResponse, DirectoryState, DirectoryStateResponse, DirectoryType, DirectoryUser, DirectoryUserResponse, DirectoryUserWithGroups, DirectoryUserWithGroupsResponse, DomainData, DomainDataState, DsyncActivatedEvent, DsyncActivatedEventResponse, DsyncDeletedEvent, DsyncDeletedEventResponse, DsyncGroupCreatedEvent, DsyncGroupCreatedEventResponse, DsyncGroupDeletedEvent, DsyncGroupDeletedEventResponse, DsyncGroupUpdatedEvent, DsyncGroupUpdatedEventResponse, DsyncGroupUserAddedEvent, DsyncGroupUserAddedEventResponse, DsyncGroupUserRemovedEvent, DsyncGroupUserRemovedEventResponse, DsyncUserCreatedEvent, DsyncUserCreatedEventResponse, DsyncUserDeletedEvent, DsyncUserDeletedEventResponse, DsyncUserUpdatedEvent, DsyncUserUpdatedEventResponse, EmailVerification, EmailVerificationCreatedEvent, EmailVerificationCreatedEventResponse, EmailVerificationEvent, EmailVerificationEventResponse, EmailVerificationResponse, EnrollAuthFactorOptions, Event, EventBase, EventDirectory, EventDirectoryResponse, EventName, EventResponse, Factor, FactorResponse, FactorWithSecrets, FactorWithSecretsResponse, FeatureFlag, FeatureFlagResponse, GeneratePortalLinkIntent, GenericServerException, GetOptions, GetProfileAndTokenOptions, GetProfileOptions, GetResourceOptions, HttpClientInterface, HttpClientResponseInterface, Identity, IdentityResponse, Impersonator, ImpersonatorResponse, Invitation, InvitationAcceptedEvent, InvitationAcceptedEventResponse, InvitationCreatedEvent, InvitationCreatedEventResponse, InvitationEvent, InvitationEventResponse, InvitationResentEvent, InvitationResentEventResponse, InvitationResponse, InvitationRevokedEvent, InvitationRevokedEventResponse, KeyContext, List, ListAuthFactorsOptions, ListConnectionsOptions, ListDirectoriesOptions, ListDirectoryGroupsOptions, ListDirectoryUsersOptions, ListEventOptions, ListFeatureFlagsOptions, ListInvitationsOptions, ListObjectVersionsResponse, ListOrganizationApiKeysOptions, ListOrganizationFeatureFlagsOptions, ListOrganizationMembershipsOptions, ListOrganizationRolesResponse, ListOrganizationsOptions, ListResourcesOptions, ListResponse, ListSessionsOptions, ListUserFeatureFlagsOptions, ListUsersOptions, ListWarrantsOptions, ListWarrantsRequestOptions, LogoutURLOptions, MagicAuth, MagicAuthCreatedEvent, MagicAuthCreatedEventResponse, MagicAuthEvent, MagicAuthEventResponse, MagicAuthResponse, NoApiKeyProvidedException, NotFoundException, OauthException, OauthTokens, OauthTokensResponse, ObjectDigest, ObjectDigestResponse, ObjectMetadata, ObjectUpdateBy, ObjectVersion, ObjectVersionResponse, Organization, OrganizationCreatedEvent, OrganizationCreatedResponse, OrganizationDeletedEvent, OrganizationDeletedResponse, OrganizationDomain, OrganizationDomainCreatedEvent, OrganizationDomainCreatedEventResponse, OrganizationDomainDeletedEvent, OrganizationDomainDeletedEventResponse, OrganizationDomainResponse, OrganizationDomainState, OrganizationDomainUpdatedEvent, OrganizationDomainUpdatedEventResponse, OrganizationDomainVerificationFailedEvent, OrganizationDomainVerificationFailedEventResponse, OrganizationDomainVerificationStrategy, OrganizationDomainVerifiedEvent, OrganizationDomainVerifiedEventResponse, OrganizationMembership, OrganizationMembershipCreated, OrganizationMembershipCreatedResponse, OrganizationMembershipDeleted, OrganizationMembershipDeletedResponse, OrganizationMembershipResponse, OrganizationMembershipStatus, OrganizationMembershipUpdated, OrganizationMembershipUpdatedResponse, OrganizationResponse, OrganizationRoleResponse, OrganizationUpdatedEvent, OrganizationUpdatedResponse, PKCE, PKCEAuthorizationURLResult, PKCEPair, PaginationOptions, PasswordReset, PasswordResetCreatedEvent, PasswordResetCreatedEventResponse, PasswordResetEvent, PasswordResetEventResponse, PasswordResetResponse, PasswordResetSucceededEvent, PasswordResetSucceededEventResponse, PasswordlessSession, PasswordlessSessionResponse, PolicyContext, PostOptions, Profile, ProfileAndToken, ProfileAndTokenResponse, ProfileResponse, type PublicClientOptions, type PublicSSO, type PublicUserManagement, type PublicWorkOS, PutOptions, QueryOptions, QueryRequestOptions, QueryResult, QueryResultResponse, RateLimitExceededException, ReadObjectMetadataResponse, ReadObjectOptions, ReadObjectResponse, RefreshSessionFailureReason, RefreshSessionResponse, RemoveFlagTargetOptions, RequestHeaders, RequestOptions, ResetPasswordOptions, Resource, ResourceInterface, ResourceOp, ResourceOptions, ResourceResponse, ResponseHeaderValue, ResponseHeaders, ResponsePayload, RevokeSessionOptions, Role, RoleCreatedEvent, RoleCreatedEventResponse, RoleDeletedEvent, RoleDeletedEventResponse, RoleEvent, RoleEventResponse, RoleList, RoleResponse, RoleUpdatedEvent, RoleUpdatedEventResponse, SSOAuthorizationURLOptions, SSOPKCEAuthorizationURLResult, SendInvitationOptions, SendSessionResponse, SendVerificationEmailOptions, SerializedApiKey, SerializedAuditLogExportOptions, SerializedAuthenticatePublicClientBase, SerializedAuthenticateWithCodeAndVerifierOptions, SerializedAuthenticateWithCodeOptions, SerializedAuthenticateWithEmailVerificationOptions, SerializedAuthenticateWithMagicAuthOptions, SerializedAuthenticateWithOptionsBase, SerializedAuthenticateWithOrganizationSelectionOptions, SerializedAuthenticateWithPasswordOptions, SerializedAuthenticateWithRefreshTokenOptions, SerializedAuthenticateWithRefreshTokenPublicClientOptions, SerializedAuthenticateWithTotpOptions, SerializedBatchWriteResourcesOptions, SerializedCheckBatchOptions, SerializedCheckOptions, SerializedCheckWarrantOptions, SerializedCreateAuditLogEventOptions, SerializedCreateAuditLogSchemaOptions, SerializedCreateMagicAuthOptions, SerializedCreateOrganizationApiKeyOptions, SerializedCreateOrganizationDomainOptions, SerializedCreateOrganizationMembershipOptions, SerializedCreateOrganizationOptions, SerializedCreatePasswordResetOptions, SerializedCreatePasswordlessSessionOptions, SerializedCreateResourceOptions, SerializedCreateUserOptions, SerializedCreatedApiKey, SerializedDeleteResourceOptions, SerializedEnrollUserInMfaFactorOptions, SerializedListConnectionsOptions, SerializedListDirectoriesOptions, SerializedListEventOptions, SerializedListInvitationsOptions, SerializedListOrganizationMembershipsOptions, SerializedListResourcesOptions, SerializedListSessionsOptions, SerializedListUsersOptions, SerializedListWarrantsOptions, SerializedQueryOptions, SerializedResetPasswordOptions, SerializedResourceOptions, SerializedRevokeSessionOptions, SerializedSendInvitationOptions, SerializedSubject, SerializedUpdateOrganizationMembershipOptions, SerializedUpdateOrganizationOptions, SerializedUpdateUserOptions, SerializedUpdateUserPasswordOptions, SerializedValidateApiKeyResponse, SerializedVerifyEmailOptions, SerializedWriteWarrantOptions, Session, SessionCookieData, SessionCreatedEvent, SessionCreatedEventResponse, SessionResponse, SessionRevokedEvent, SessionRevokedEventResponse, SessionStatus, SignatureVerificationException, Subject, UnauthorizedException, UnprocessableEntityError, UnprocessableEntityException, UpdateObjectEntity, UpdateObjectOptions, UpdateOrganizationMembershipOptions, UpdateOrganizationOptions, UpdateResourceOptions, UpdateUserOptions, UpdateUserPasswordOptions, User, UserCreatedEvent, UserCreatedEventResponse, UserData, UserDataPayload, UserDeletedEvent, UserDeletedEventResponse, UserManagementAuthorizationURLOptions, UserRegistrationActionPayload, UserRegistrationActionResponseData, UserResponse, UserUpdatedEvent, UserUpdatedEventResponse, ValidateApiKeyOptions, ValidateApiKeyResponse, VaultObject, VerifyEmailOptions, Warrant, WarrantOp, WarrantResponse, WarrantToken, WarrantTokenResponse, WithResolvedClientId, WorkOSNode as WorkOS, WorkOSOptions, WorkOSResponseError, WriteWarrantOptions, createWorkOS, serializeRevokeSessionOptions };
139
152
  //# sourceMappingURL=index.d.cts.map
package/lib/index.d.ts CHANGED
@@ -7,7 +7,7 @@ import { ListDirectoryGroupsOptions } from "./directory-sync/interfaces/list-gro
7
7
  import { ListDirectoryUsersOptions } from "./directory-sync/interfaces/list-directory-users-options.interface.js";
8
8
  import { ListOrganizationRolesResponse, OrganizationRoleResponse, Role, RoleEvent, RoleEventResponse, RoleList, RoleResponse } from "./roles/interfaces/role.interface.js";
9
9
  import { DefaultCustomAttributes, DirectoryUser, DirectoryUserResponse, DirectoryUserWithGroups, DirectoryUserWithGroupsResponse } from "./directory-sync/interfaces/directory-user.interface.js";
10
- import { SSOAuthorizationURLOptions } from "./sso/interfaces/authorization-url-options.interface.js";
10
+ import { SSOAuthorizationURLOptions, SSOPKCEAuthorizationURLResult } from "./sso/interfaces/authorization-url-options.interface.js";
11
11
  import { ConnectionType } from "./sso/interfaces/connection-type.enum.js";
12
12
  import { Connection, ConnectionDomain, ConnectionResponse } from "./sso/interfaces/connection.interface.js";
13
13
  import { GetProfileOptions } from "./sso/interfaces/get-profile-options.interface.js";
@@ -16,7 +16,7 @@ import { ListConnectionsOptions, SerializedListConnectionsOptions } from "./sso/
16
16
  import { OauthTokens, OauthTokensResponse } from "./user-management/interfaces/oauth-tokens.interface.js";
17
17
  import { Profile, ProfileResponse } from "./sso/interfaces/profile.interface.js";
18
18
  import { ProfileAndToken, ProfileAndTokenResponse } from "./sso/interfaces/profile-and-token.interface.js";
19
- import { AuthenticateWithOptionsBase, AuthenticateWithSessionOptions, SerializedAuthenticateWithOptionsBase, SerializedAuthenticateWithPKCEBase } from "./user-management/interfaces/authenticate-with-options-base.interface.js";
19
+ import { AuthenticateWithOptionsBase, AuthenticateWithSessionOptions, SerializedAuthenticatePublicClientBase, SerializedAuthenticateWithOptionsBase, WithResolvedClientId } from "./user-management/interfaces/authenticate-with-options-base.interface.js";
20
20
  import { AuthenticateUserWithCodeCredentials, AuthenticateWithCodeOptions, SerializedAuthenticateWithCodeOptions } from "./user-management/interfaces/authenticate-with-code-options.interface.js";
21
21
  import { AuthenticateWithCodeAndVerifierOptions, SerializedAuthenticateWithCodeAndVerifierOptions } from "./user-management/interfaces/authenticate-with-code-and-verifier-options.interface.js";
22
22
  import { AuthenticateUserWithEmailVerificationCredentials, AuthenticateWithEmailVerificationOptions, SerializedAuthenticateWithEmailVerificationOptions } from "./user-management/interfaces/authenticate-with-email-verification-options.interface.js";
@@ -24,6 +24,7 @@ import { AuthenticateUserWithMagicAuthCredentials, AuthenticateWithMagicAuthOpti
24
24
  import { AuthenticateUserWithOrganizationSelectionCredentials, AuthenticateWithOrganizationSelectionOptions, SerializedAuthenticateWithOrganizationSelectionOptions } from "./user-management/interfaces/authenticate-with-organization-selection.interface.js";
25
25
  import { AuthenticateUserWithPasswordCredentials, AuthenticateWithPasswordOptions, SerializedAuthenticateWithPasswordOptions } from "./user-management/interfaces/authenticate-with-password-options.interface.js";
26
26
  import { AuthenticateUserWithRefreshTokenCredentials, AuthenticateWithRefreshTokenOptions, SerializedAuthenticateWithRefreshTokenOptions } from "./user-management/interfaces/authenticate-with-refresh-token-options.interface.js";
27
+ import { AuthenticateWithRefreshTokenPublicClientOptions, SerializedAuthenticateWithRefreshTokenPublicClientOptions } from "./user-management/interfaces/authenticate-with-refresh-token-public-client-options.interface.js";
27
28
  import { Impersonator, ImpersonatorResponse } from "./user-management/interfaces/impersonator.interface.js";
28
29
  import { User, UserResponse } from "./user-management/interfaces/user.interface.js";
29
30
  import { AuthenticationResponse, AuthenticationResponseResponse } from "./user-management/interfaces/authentication-response.interface.js";
@@ -31,7 +32,7 @@ import { AccessToken, AuthenticateWithSessionCookieFailedResponse, AuthenticateW
31
32
  import { AuthenticateUserWithTotpCredentials, AuthenticateWithTotpOptions, SerializedAuthenticateWithTotpOptions } from "./user-management/interfaces/authenticate-with-totp-options.interface.js";
32
33
  import { AuthenticationEvent, AuthenticationEventResponse } from "./user-management/interfaces/authentication-event.interface.js";
33
34
  import { AuthenticationRadarRiskDetectedEventData, AuthenticationRadarRiskDetectedEventResponseData } from "./user-management/interfaces/authentication-radar-risk-detected-event.interface.js";
34
- import { UserManagementAuthorizationURLOptions } from "./user-management/interfaces/authorization-url-options.interface.js";
35
+ import { PKCEAuthorizationURLResult, UserManagementAuthorizationURLOptions } from "./user-management/interfaces/authorization-url-options.interface.js";
35
36
  import { CreateMagicAuthOptions, SerializedCreateMagicAuthOptions } from "./user-management/interfaces/create-magic-auth-options.interface.js";
36
37
  import { CreateOrganizationMembershipOptions, SerializedCreateOrganizationMembershipOptions } from "./user-management/interfaces/create-organization-membership-options.interface.js";
37
38
  import { CreatePasswordResetOptions, SerializedCreatePasswordResetOptions } from "./user-management/interfaces/create-password-reset-options.interface.js";
@@ -48,6 +49,7 @@ import { ListOrganizationMembershipsOptions, SerializedListOrganizationMembershi
48
49
  import { ListSessionsOptions, SerializedListSessionsOptions } from "./user-management/interfaces/list-sessions-options.interface.js";
49
50
  import { ListUserFeatureFlagsOptions } from "./user-management/interfaces/list-user-feature-flags-options.interface.js";
50
51
  import { ListUsersOptions, SerializedListUsersOptions } from "./user-management/interfaces/list-users-options.interface.js";
52
+ import { LogoutURLOptions } from "./user-management/interfaces/logout-url-options.interface.js";
51
53
  import { MagicAuth, MagicAuthEvent, MagicAuthEventResponse, MagicAuthResponse } from "./user-management/interfaces/magic-auth.interface.js";
52
54
  import { PasswordReset, PasswordResetEvent, PasswordResetEventResponse, PasswordResetResponse } from "./user-management/interfaces/password-reset.interface.js";
53
55
  import { RefreshSessionFailureReason, RefreshSessionResponse } from "./user-management/interfaces/refresh-and-seal-session-data.interface.js";
@@ -62,7 +64,12 @@ import { SerializedUpdateUserPasswordOptions, UpdateUserPasswordOptions } from "
62
64
  import { SerializedVerifyEmailOptions, VerifyEmailOptions } from "./user-management/interfaces/verify-email-options.interface.js";
63
65
  import { CreateOrganizationDomainOptions, SerializedCreateOrganizationDomainOptions } from "./organization-domains/interfaces/create-organization-domain-options.interface.js";
64
66
  import { OrganizationDomain, OrganizationDomainResponse, OrganizationDomainState, OrganizationDomainVerificationStrategy } from "./organization-domains/interfaces/organization-domain.interface.js";
65
- import { AuthenticationEmailVerificationSucceededEvent, AuthenticationEmailVerificationSucceededEventResponse, AuthenticationMagicAuthFailedEvent, AuthenticationMagicAuthFailedEventResponse, AuthenticationMagicAuthSucceededEvent, AuthenticationMagicAuthSucceededEventResponse, AuthenticationMfaSucceededEvent, AuthenticationMfaSucceededEventResponse, AuthenticationOAuthFailedEvent, AuthenticationOAuthFailedEventResponse, AuthenticationOAuthSucceededEvent, AuthenticationOAuthSucceededEventResponse, AuthenticationPasskeyFailedEvent, AuthenticationPasskeyFailedEventResponse, AuthenticationPasskeySucceededEvent, AuthenticationPasskeySucceededEventResponse, AuthenticationPasswordFailedEvent, AuthenticationPasswordFailedEventResponse, AuthenticationPasswordSucceededEvent, AuthenticationPasswordSucceededEventResponse, AuthenticationRadarRiskDetectedEvent, AuthenticationRadarRiskDetectedEventResponse, AuthenticationSSOFailedEvent, AuthenticationSSOFailedEventResponse, AuthenticationSSOSucceededEvent, AuthenticationSSOSucceededEventResponse, ConnectionActivatedEvent, ConnectionActivatedEventResponse, ConnectionDeactivatedEvent, ConnectionDeactivatedEventResponse, ConnectionDeletedEvent, ConnectionDeletedEventResponse, DsyncActivatedEvent, DsyncActivatedEventResponse, DsyncDeletedEvent, DsyncDeletedEventResponse, DsyncGroupCreatedEvent, DsyncGroupCreatedEventResponse, DsyncGroupDeletedEvent, DsyncGroupDeletedEventResponse, DsyncGroupUpdatedEvent, DsyncGroupUpdatedEventResponse, DsyncGroupUserAddedEvent, DsyncGroupUserAddedEventResponse, DsyncGroupUserRemovedEvent, DsyncGroupUserRemovedEventResponse, DsyncUserCreatedEvent, DsyncUserCreatedEventResponse, DsyncUserDeletedEvent, DsyncUserDeletedEventResponse, DsyncUserUpdatedEvent, DsyncUserUpdatedEventResponse, EmailVerificationCreatedEvent, EmailVerificationCreatedEventResponse, Event, EventBase, EventName, EventResponse, InvitationAcceptedEvent, InvitationAcceptedEventResponse, InvitationCreatedEvent, InvitationCreatedEventResponse, InvitationRevokedEvent, InvitationRevokedEventResponse, MagicAuthCreatedEvent, MagicAuthCreatedEventResponse, OrganizationCreatedEvent, OrganizationCreatedResponse, OrganizationDeletedEvent, OrganizationDeletedResponse, OrganizationDomainCreatedEvent, OrganizationDomainCreatedEventResponse, OrganizationDomainDeletedEvent, OrganizationDomainDeletedEventResponse, OrganizationDomainUpdatedEvent, OrganizationDomainUpdatedEventResponse, OrganizationDomainVerificationFailedEvent, OrganizationDomainVerificationFailedEventResponse, OrganizationDomainVerifiedEvent, OrganizationDomainVerifiedEventResponse, OrganizationMembershipCreated, OrganizationMembershipCreatedResponse, OrganizationMembershipDeleted, OrganizationMembershipDeletedResponse, OrganizationMembershipUpdated, OrganizationMembershipUpdatedResponse, OrganizationUpdatedEvent, OrganizationUpdatedResponse, PasswordResetCreatedEvent, PasswordResetCreatedEventResponse, PasswordResetSucceededEvent, PasswordResetSucceededEventResponse, RoleCreatedEvent, RoleCreatedEventResponse, RoleDeletedEvent, RoleDeletedEventResponse, RoleUpdatedEvent, RoleUpdatedEventResponse, SessionCreatedEvent, SessionCreatedEventResponse, SessionRevokedEvent, SessionRevokedEventResponse, UserCreatedEvent, UserCreatedEventResponse, UserDeletedEvent, UserDeletedEventResponse, UserUpdatedEvent, UserUpdatedEventResponse } from "./common/interfaces/event.interface.js";
67
+ import { ApiKey, SerializedApiKey } from "./api-keys/interfaces/api-key.interface.js";
68
+ import { CreateOrganizationApiKeyOptions, CreateOrganizationApiKeyRequestOptions, SerializedCreateOrganizationApiKeyOptions } from "./api-keys/interfaces/create-organization-api-key-options.interface.js";
69
+ import { CreatedApiKey, SerializedCreatedApiKey } from "./api-keys/interfaces/created-api-key.interface.js";
70
+ import { ListOrganizationApiKeysOptions } from "./api-keys/interfaces/list-organization-api-keys-options.interface.js";
71
+ import { SerializedValidateApiKeyResponse, ValidateApiKeyOptions, ValidateApiKeyResponse } from "./api-keys/interfaces/validate-api-key.interface.js";
72
+ import { ApiKeyCreatedEvent, ApiKeyCreatedEventResponse, ApiKeyDeletedEvent, ApiKeyDeletedEventResponse, AuthenticationEmailVerificationSucceededEvent, AuthenticationEmailVerificationSucceededEventResponse, AuthenticationMagicAuthFailedEvent, AuthenticationMagicAuthFailedEventResponse, AuthenticationMagicAuthSucceededEvent, AuthenticationMagicAuthSucceededEventResponse, AuthenticationMfaSucceededEvent, AuthenticationMfaSucceededEventResponse, AuthenticationOAuthFailedEvent, AuthenticationOAuthFailedEventResponse, AuthenticationOAuthSucceededEvent, AuthenticationOAuthSucceededEventResponse, AuthenticationPasskeyFailedEvent, AuthenticationPasskeyFailedEventResponse, AuthenticationPasskeySucceededEvent, AuthenticationPasskeySucceededEventResponse, AuthenticationPasswordFailedEvent, AuthenticationPasswordFailedEventResponse, AuthenticationPasswordSucceededEvent, AuthenticationPasswordSucceededEventResponse, AuthenticationRadarRiskDetectedEvent, AuthenticationRadarRiskDetectedEventResponse, AuthenticationSSOFailedEvent, AuthenticationSSOFailedEventResponse, AuthenticationSSOSucceededEvent, AuthenticationSSOSucceededEventResponse, ConnectionActivatedEvent, ConnectionActivatedEventResponse, ConnectionDeactivatedEvent, ConnectionDeactivatedEventResponse, ConnectionDeletedEvent, ConnectionDeletedEventResponse, DsyncActivatedEvent, DsyncActivatedEventResponse, DsyncDeletedEvent, DsyncDeletedEventResponse, DsyncGroupCreatedEvent, DsyncGroupCreatedEventResponse, DsyncGroupDeletedEvent, DsyncGroupDeletedEventResponse, DsyncGroupUpdatedEvent, DsyncGroupUpdatedEventResponse, DsyncGroupUserAddedEvent, DsyncGroupUserAddedEventResponse, DsyncGroupUserRemovedEvent, DsyncGroupUserRemovedEventResponse, DsyncUserCreatedEvent, DsyncUserCreatedEventResponse, DsyncUserDeletedEvent, DsyncUserDeletedEventResponse, DsyncUserUpdatedEvent, DsyncUserUpdatedEventResponse, EmailVerificationCreatedEvent, EmailVerificationCreatedEventResponse, Event, EventBase, EventName, EventResponse, InvitationAcceptedEvent, InvitationAcceptedEventResponse, InvitationCreatedEvent, InvitationCreatedEventResponse, InvitationResentEvent, InvitationResentEventResponse, InvitationRevokedEvent, InvitationRevokedEventResponse, MagicAuthCreatedEvent, MagicAuthCreatedEventResponse, OrganizationCreatedEvent, OrganizationCreatedResponse, OrganizationDeletedEvent, OrganizationDeletedResponse, OrganizationDomainCreatedEvent, OrganizationDomainCreatedEventResponse, OrganizationDomainDeletedEvent, OrganizationDomainDeletedEventResponse, OrganizationDomainUpdatedEvent, OrganizationDomainUpdatedEventResponse, OrganizationDomainVerificationFailedEvent, OrganizationDomainVerificationFailedEventResponse, OrganizationDomainVerifiedEvent, OrganizationDomainVerifiedEventResponse, OrganizationMembershipCreated, OrganizationMembershipCreatedResponse, OrganizationMembershipDeleted, OrganizationMembershipDeletedResponse, OrganizationMembershipUpdated, OrganizationMembershipUpdatedResponse, OrganizationUpdatedEvent, OrganizationUpdatedResponse, PasswordResetCreatedEvent, PasswordResetCreatedEventResponse, PasswordResetSucceededEvent, PasswordResetSucceededEventResponse, RoleCreatedEvent, RoleCreatedEventResponse, RoleDeletedEvent, RoleDeletedEventResponse, RoleUpdatedEvent, RoleUpdatedEventResponse, SessionCreatedEvent, SessionCreatedEventResponse, SessionRevokedEvent, SessionRevokedEventResponse, UserCreatedEvent, UserCreatedEventResponse, UserDeletedEvent, UserDeletedEventResponse, UserUpdatedEvent, UserUpdatedEventResponse } from "./common/interfaces/event.interface.js";
66
73
  import { GetOptions } from "./common/interfaces/get-options.interface.js";
67
74
  import { List, ListResponse } from "./common/interfaces/list.interface.js";
68
75
  import { PostOptions } from "./common/interfaces/post-options.interface.js";
@@ -80,6 +87,7 @@ import { SerializedUpdateOrganizationOptions, UpdateOrganizationOptions } from "
80
87
  import { ActionContext, ActionPayload, UserData, UserDataPayload, UserRegistrationActionPayload } from "./actions/interfaces/action.interface.js";
81
88
  import { AuthenticationActionResponseData, ResponsePayload, UserRegistrationActionResponseData } from "./actions/interfaces/response-payload.interface.js";
82
89
  import { Actions } from "./actions/actions.js";
90
+ import { PKCE, PKCEPair } from "./pkce/pkce.js";
83
91
  import { AutoPaginatable } from "./common/utils/pagination.js";
84
92
  import { ListEventOptions, SerializedListEventOptions } from "./events/interfaces/list-events-options.interface.js";
85
93
  import { FeatureFlag, FeatureFlagResponse } from "./feature-flags/interfaces/feature-flag.interface.js";
@@ -100,7 +108,11 @@ import { ListWarrantsOptions, ListWarrantsRequestOptions, PolicyContext, Seriali
100
108
  import { CheckBatchOptions, CheckOptions, CheckRequestOptions, CheckResult, CheckResultInterface, CheckResultResponse, CheckWarrantOptions, DebugInfo, DebugInfoResponse, DecisionTreeNode, DecisionTreeNodeResponse, SerializedCheckBatchOptions, SerializedCheckOptions, SerializedCheckWarrantOptions } from "./fga/interfaces/check.interface.js";
101
109
  import { QueryOptions, QueryRequestOptions, QueryResult, QueryResultResponse, SerializedQueryOptions } from "./fga/interfaces/query.interface.js";
102
110
  import { WarrantToken, WarrantTokenResponse } from "./fga/interfaces/warrant-token.interface.js";
111
+ import { AddFlagTargetOptions } from "./feature-flags/interfaces/add-flag-target-options.interface.js";
112
+ import { ListFeatureFlagsOptions } from "./feature-flags/interfaces/list-feature-flags-options.interface.js";
113
+ import { RemoveFlagTargetOptions } from "./feature-flags/interfaces/remove-flag-target-options.interface.js";
103
114
  import { HttpClient } from "./common/net/http-client.js";
115
+ import { ApiKeyRequiredException } from "./common/exceptions/api-key-required.exception.js";
104
116
  import { GenericServerException } from "./common/exceptions/generic-server.exception.js";
105
117
  import { BadRequestException } from "./common/exceptions/bad-request.exception.js";
106
118
  import { NoApiKeyProvidedException } from "./common/exceptions/no-api-key-provided.exception.js";
@@ -110,6 +122,7 @@ import { RateLimitExceededException } from "./common/exceptions/rate-limit-excee
110
122
  import { SignatureVerificationException } from "./common/exceptions/signature-verification.exception.js";
111
123
  import { UnauthorizedException } from "./common/exceptions/unauthorized.exception.js";
112
124
  import { UnprocessableEntityException } from "./common/exceptions/unprocessable-entity.exception.js";
125
+ import { ConfidentialClientOptions, PublicClientOptions, PublicSSO, PublicUserManagement, PublicWorkOS, createWorkOS } from "./factory.js";
113
126
  import { DataKey, DataKeyPair, KeyContext } from "./vault/interfaces/key.interface.js";
114
127
  import { CreateDataKeyOptions, CreateDataKeyResponse } from "./vault/interfaces/key/create-data-key.interface.js";
115
128
  import { DecryptDataKeyOptions, DecryptDataKeyResponse } from "./vault/interfaces/key/decrypt-data-key.interface.js";
@@ -135,5 +148,5 @@ declare class WorkOSNode extends WorkOS {
135
148
  emitWarning(warning: string): void;
136
149
  }
137
150
  //#endregion
138
- export { AccessToken, ActionContext, ActionPayload, AuditLogActor, AuditLogActorSchema, AuditLogExport, AuditLogExportOptions, AuditLogExportResponse, AuditLogSchema, AuditLogSchemaMetadata, AuditLogTarget, AuditLogTargetSchema, AuthMethod, AuthenticateUserWithCodeCredentials, AuthenticateUserWithEmailVerificationCredentials, AuthenticateUserWithMagicAuthCredentials, AuthenticateUserWithOrganizationSelectionCredentials, AuthenticateUserWithPasswordCredentials, AuthenticateUserWithRefreshTokenCredentials, AuthenticateUserWithTotpCredentials, AuthenticateWithCodeAndVerifierOptions, AuthenticateWithCodeOptions, AuthenticateWithEmailVerificationOptions, AuthenticateWithMagicAuthOptions, AuthenticateWithOptionsBase, AuthenticateWithOrganizationSelectionOptions, AuthenticateWithPasswordOptions, AuthenticateWithRefreshTokenOptions, AuthenticateWithSessionCookieFailedResponse, AuthenticateWithSessionCookieFailureReason, AuthenticateWithSessionCookieOptions, AuthenticateWithSessionCookieSuccessResponse, AuthenticateWithSessionOptions, AuthenticateWithTotpOptions, AuthenticationActionResponseData, AuthenticationEmailVerificationSucceededEvent, AuthenticationEmailVerificationSucceededEventResponse, AuthenticationEvent, AuthenticationEventResponse, AuthenticationMagicAuthFailedEvent, AuthenticationMagicAuthFailedEventResponse, AuthenticationMagicAuthSucceededEvent, AuthenticationMagicAuthSucceededEventResponse, AuthenticationMfaSucceededEvent, AuthenticationMfaSucceededEventResponse, AuthenticationOAuthFailedEvent, AuthenticationOAuthFailedEventResponse, AuthenticationOAuthSucceededEvent, AuthenticationOAuthSucceededEventResponse, AuthenticationPasskeyFailedEvent, AuthenticationPasskeyFailedEventResponse, AuthenticationPasskeySucceededEvent, AuthenticationPasskeySucceededEventResponse, AuthenticationPasswordFailedEvent, AuthenticationPasswordFailedEventResponse, AuthenticationPasswordSucceededEvent, AuthenticationPasswordSucceededEventResponse, AuthenticationRadarRiskDetectedEvent, AuthenticationRadarRiskDetectedEventData, AuthenticationRadarRiskDetectedEventResponse, AuthenticationRadarRiskDetectedEventResponseData, AuthenticationResponse, AuthenticationResponseResponse, AuthenticationSSOFailedEvent, AuthenticationSSOFailedEventResponse, AuthenticationSSOSucceededEvent, AuthenticationSSOSucceededEventResponse, AutoPaginatable, BadRequestException, BatchWriteResourcesOptions, BatchWriteResourcesResponse, CheckBatchOptions, CheckOp, CheckOptions, CheckRequestOptions, CheckResult, CheckResultInterface, CheckResultResponse, CheckWarrantOptions, Connection, ConnectionActivatedEvent, ConnectionActivatedEventResponse, ConnectionDeactivatedEvent, ConnectionDeactivatedEventResponse, ConnectionDeletedEvent, ConnectionDeletedEventResponse, ConnectionDomain, ConnectionResponse, ConnectionType, CreateAuditLogEventOptions, CreateAuditLogEventRequestOptions, CreateAuditLogSchemaOptions, CreateAuditLogSchemaRequestOptions, CreateAuditLogSchemaResponse, CreateDataKeyOptions, CreateDataKeyResponse, CreateMagicAuthOptions, CreateObjectEntity, CreateObjectOptions, CreateOrganizationDomainOptions, CreateOrganizationMembershipOptions, CreateOrganizationOptions, CreateOrganizationRequestOptions, CreatePasswordResetOptions, CreatePasswordlessSessionOptions, CreateResourceOptions, CreateUserOptions, DataKey, DataKeyPair, DebugInfo, DebugInfoResponse, DecisionTreeNode, DecisionTreeNodeResponse, DecryptDataKeyOptions, DecryptDataKeyResponse, DefaultCustomAttributes, DeleteObjectOptions, DeleteResourceOptions, Directory, DirectoryGroup, DirectoryGroupResponse, DirectoryResponse, DirectoryState, DirectoryStateResponse, DirectoryType, DirectoryUser, DirectoryUserResponse, DirectoryUserWithGroups, DirectoryUserWithGroupsResponse, DomainData, DomainDataState, DsyncActivatedEvent, DsyncActivatedEventResponse, DsyncDeletedEvent, DsyncDeletedEventResponse, DsyncGroupCreatedEvent, DsyncGroupCreatedEventResponse, DsyncGroupDeletedEvent, DsyncGroupDeletedEventResponse, DsyncGroupUpdatedEvent, DsyncGroupUpdatedEventResponse, DsyncGroupUserAddedEvent, DsyncGroupUserAddedEventResponse, DsyncGroupUserRemovedEvent, DsyncGroupUserRemovedEventResponse, DsyncUserCreatedEvent, DsyncUserCreatedEventResponse, DsyncUserDeletedEvent, DsyncUserDeletedEventResponse, DsyncUserUpdatedEvent, DsyncUserUpdatedEventResponse, EmailVerification, EmailVerificationCreatedEvent, EmailVerificationCreatedEventResponse, EmailVerificationEvent, EmailVerificationEventResponse, EmailVerificationResponse, EnrollAuthFactorOptions, Event, EventBase, EventDirectory, EventDirectoryResponse, EventName, EventResponse, Factor, FactorResponse, FactorWithSecrets, FactorWithSecretsResponse, FeatureFlag, FeatureFlagResponse, GeneratePortalLinkIntent, GenericServerException, GetOptions, GetProfileAndTokenOptions, GetProfileOptions, GetResourceOptions, HttpClientInterface, HttpClientResponseInterface, Identity, IdentityResponse, Impersonator, ImpersonatorResponse, Invitation, InvitationAcceptedEvent, InvitationAcceptedEventResponse, InvitationCreatedEvent, InvitationCreatedEventResponse, InvitationEvent, InvitationEventResponse, InvitationResponse, InvitationRevokedEvent, InvitationRevokedEventResponse, KeyContext, List, ListAuthFactorsOptions, ListConnectionsOptions, ListDirectoriesOptions, ListDirectoryGroupsOptions, ListDirectoryUsersOptions, ListEventOptions, ListInvitationsOptions, ListObjectVersionsResponse, ListOrganizationFeatureFlagsOptions, ListOrganizationMembershipsOptions, ListOrganizationRolesResponse, ListOrganizationsOptions, ListResourcesOptions, ListResponse, ListSessionsOptions, ListUserFeatureFlagsOptions, ListUsersOptions, ListWarrantsOptions, ListWarrantsRequestOptions, MagicAuth, MagicAuthCreatedEvent, MagicAuthCreatedEventResponse, MagicAuthEvent, MagicAuthEventResponse, MagicAuthResponse, NoApiKeyProvidedException, NotFoundException, OauthException, OauthTokens, OauthTokensResponse, ObjectDigest, ObjectDigestResponse, ObjectMetadata, ObjectUpdateBy, ObjectVersion, ObjectVersionResponse, Organization, OrganizationCreatedEvent, OrganizationCreatedResponse, OrganizationDeletedEvent, OrganizationDeletedResponse, OrganizationDomain, OrganizationDomainCreatedEvent, OrganizationDomainCreatedEventResponse, OrganizationDomainDeletedEvent, OrganizationDomainDeletedEventResponse, OrganizationDomainResponse, OrganizationDomainState, OrganizationDomainUpdatedEvent, OrganizationDomainUpdatedEventResponse, OrganizationDomainVerificationFailedEvent, OrganizationDomainVerificationFailedEventResponse, OrganizationDomainVerificationStrategy, OrganizationDomainVerifiedEvent, OrganizationDomainVerifiedEventResponse, OrganizationMembership, OrganizationMembershipCreated, OrganizationMembershipCreatedResponse, OrganizationMembershipDeleted, OrganizationMembershipDeletedResponse, OrganizationMembershipResponse, OrganizationMembershipStatus, OrganizationMembershipUpdated, OrganizationMembershipUpdatedResponse, OrganizationResponse, OrganizationRoleResponse, OrganizationUpdatedEvent, OrganizationUpdatedResponse, PaginationOptions, PasswordReset, PasswordResetCreatedEvent, PasswordResetCreatedEventResponse, PasswordResetEvent, PasswordResetEventResponse, PasswordResetResponse, PasswordResetSucceededEvent, PasswordResetSucceededEventResponse, PasswordlessSession, PasswordlessSessionResponse, PolicyContext, PostOptions, Profile, ProfileAndToken, ProfileAndTokenResponse, ProfileResponse, PutOptions, QueryOptions, QueryRequestOptions, QueryResult, QueryResultResponse, RateLimitExceededException, ReadObjectMetadataResponse, ReadObjectOptions, ReadObjectResponse, RefreshSessionFailureReason, RefreshSessionResponse, RequestHeaders, RequestOptions, ResetPasswordOptions, Resource, ResourceInterface, ResourceOp, ResourceOptions, ResourceResponse, ResponseHeaderValue, ResponseHeaders, ResponsePayload, RevokeSessionOptions, Role, RoleCreatedEvent, RoleCreatedEventResponse, RoleDeletedEvent, RoleDeletedEventResponse, RoleEvent, RoleEventResponse, RoleList, RoleResponse, RoleUpdatedEvent, RoleUpdatedEventResponse, SSOAuthorizationURLOptions, SendInvitationOptions, SendSessionResponse, SendVerificationEmailOptions, SerializedAuditLogExportOptions, SerializedAuthenticateWithCodeAndVerifierOptions, SerializedAuthenticateWithCodeOptions, SerializedAuthenticateWithEmailVerificationOptions, SerializedAuthenticateWithMagicAuthOptions, SerializedAuthenticateWithOptionsBase, SerializedAuthenticateWithOrganizationSelectionOptions, SerializedAuthenticateWithPKCEBase, SerializedAuthenticateWithPasswordOptions, SerializedAuthenticateWithRefreshTokenOptions, SerializedAuthenticateWithTotpOptions, SerializedBatchWriteResourcesOptions, SerializedCheckBatchOptions, SerializedCheckOptions, SerializedCheckWarrantOptions, SerializedCreateAuditLogEventOptions, SerializedCreateAuditLogSchemaOptions, SerializedCreateMagicAuthOptions, SerializedCreateOrganizationDomainOptions, SerializedCreateOrganizationMembershipOptions, SerializedCreateOrganizationOptions, SerializedCreatePasswordResetOptions, SerializedCreatePasswordlessSessionOptions, SerializedCreateResourceOptions, SerializedCreateUserOptions, SerializedDeleteResourceOptions, SerializedEnrollUserInMfaFactorOptions, SerializedListConnectionsOptions, SerializedListDirectoriesOptions, SerializedListEventOptions, SerializedListInvitationsOptions, SerializedListOrganizationMembershipsOptions, SerializedListResourcesOptions, SerializedListSessionsOptions, SerializedListUsersOptions, SerializedListWarrantsOptions, SerializedQueryOptions, SerializedResetPasswordOptions, SerializedResourceOptions, SerializedRevokeSessionOptions, SerializedSendInvitationOptions, SerializedSubject, SerializedUpdateOrganizationMembershipOptions, SerializedUpdateOrganizationOptions, SerializedUpdateUserOptions, SerializedUpdateUserPasswordOptions, SerializedVerifyEmailOptions, SerializedWriteWarrantOptions, Session, SessionCookieData, SessionCreatedEvent, SessionCreatedEventResponse, SessionResponse, SessionRevokedEvent, SessionRevokedEventResponse, SessionStatus, SignatureVerificationException, Subject, UnauthorizedException, UnprocessableEntityError, UnprocessableEntityException, UpdateObjectEntity, UpdateObjectOptions, UpdateOrganizationMembershipOptions, UpdateOrganizationOptions, UpdateResourceOptions, UpdateUserOptions, UpdateUserPasswordOptions, User, UserCreatedEvent, UserCreatedEventResponse, UserData, UserDataPayload, UserDeletedEvent, UserDeletedEventResponse, UserManagementAuthorizationURLOptions, UserRegistrationActionPayload, UserRegistrationActionResponseData, UserResponse, UserUpdatedEvent, UserUpdatedEventResponse, VaultObject, VerifyEmailOptions, Warrant, WarrantOp, WarrantResponse, WarrantToken, WarrantTokenResponse, WorkOSNode as WorkOS, WorkOSOptions, WorkOSResponseError, WriteWarrantOptions, serializeRevokeSessionOptions };
151
+ export { AccessToken, ActionContext, ActionPayload, AddFlagTargetOptions, ApiKey, ApiKeyCreatedEvent, ApiKeyCreatedEventResponse, ApiKeyDeletedEvent, ApiKeyDeletedEventResponse, ApiKeyRequiredException, AuditLogActor, AuditLogActorSchema, AuditLogExport, AuditLogExportOptions, AuditLogExportResponse, AuditLogSchema, AuditLogSchemaMetadata, AuditLogTarget, AuditLogTargetSchema, AuthMethod, AuthenticateUserWithCodeCredentials, AuthenticateUserWithEmailVerificationCredentials, AuthenticateUserWithMagicAuthCredentials, AuthenticateUserWithOrganizationSelectionCredentials, AuthenticateUserWithPasswordCredentials, AuthenticateUserWithRefreshTokenCredentials, AuthenticateUserWithTotpCredentials, AuthenticateWithCodeAndVerifierOptions, AuthenticateWithCodeOptions, AuthenticateWithEmailVerificationOptions, AuthenticateWithMagicAuthOptions, AuthenticateWithOptionsBase, AuthenticateWithOrganizationSelectionOptions, AuthenticateWithPasswordOptions, AuthenticateWithRefreshTokenOptions, AuthenticateWithRefreshTokenPublicClientOptions, AuthenticateWithSessionCookieFailedResponse, AuthenticateWithSessionCookieFailureReason, AuthenticateWithSessionCookieOptions, AuthenticateWithSessionCookieSuccessResponse, AuthenticateWithSessionOptions, AuthenticateWithTotpOptions, AuthenticationActionResponseData, AuthenticationEmailVerificationSucceededEvent, AuthenticationEmailVerificationSucceededEventResponse, AuthenticationEvent, AuthenticationEventResponse, AuthenticationMagicAuthFailedEvent, AuthenticationMagicAuthFailedEventResponse, AuthenticationMagicAuthSucceededEvent, AuthenticationMagicAuthSucceededEventResponse, AuthenticationMfaSucceededEvent, AuthenticationMfaSucceededEventResponse, AuthenticationOAuthFailedEvent, AuthenticationOAuthFailedEventResponse, AuthenticationOAuthSucceededEvent, AuthenticationOAuthSucceededEventResponse, AuthenticationPasskeyFailedEvent, AuthenticationPasskeyFailedEventResponse, AuthenticationPasskeySucceededEvent, AuthenticationPasskeySucceededEventResponse, AuthenticationPasswordFailedEvent, AuthenticationPasswordFailedEventResponse, AuthenticationPasswordSucceededEvent, AuthenticationPasswordSucceededEventResponse, AuthenticationRadarRiskDetectedEvent, AuthenticationRadarRiskDetectedEventData, AuthenticationRadarRiskDetectedEventResponse, AuthenticationRadarRiskDetectedEventResponseData, AuthenticationResponse, AuthenticationResponseResponse, AuthenticationSSOFailedEvent, AuthenticationSSOFailedEventResponse, AuthenticationSSOSucceededEvent, AuthenticationSSOSucceededEventResponse, AutoPaginatable, BadRequestException, BatchWriteResourcesOptions, BatchWriteResourcesResponse, CheckBatchOptions, CheckOp, CheckOptions, CheckRequestOptions, CheckResult, CheckResultInterface, CheckResultResponse, CheckWarrantOptions, type ConfidentialClientOptions, Connection, ConnectionActivatedEvent, ConnectionActivatedEventResponse, ConnectionDeactivatedEvent, ConnectionDeactivatedEventResponse, ConnectionDeletedEvent, ConnectionDeletedEventResponse, ConnectionDomain, ConnectionResponse, ConnectionType, CreateAuditLogEventOptions, CreateAuditLogEventRequestOptions, CreateAuditLogSchemaOptions, CreateAuditLogSchemaRequestOptions, CreateAuditLogSchemaResponse, CreateDataKeyOptions, CreateDataKeyResponse, CreateMagicAuthOptions, CreateObjectEntity, CreateObjectOptions, CreateOrganizationApiKeyOptions, CreateOrganizationApiKeyRequestOptions, CreateOrganizationDomainOptions, CreateOrganizationMembershipOptions, CreateOrganizationOptions, CreateOrganizationRequestOptions, CreatePasswordResetOptions, CreatePasswordlessSessionOptions, CreateResourceOptions, CreateUserOptions, CreatedApiKey, DataKey, DataKeyPair, DebugInfo, DebugInfoResponse, DecisionTreeNode, DecisionTreeNodeResponse, DecryptDataKeyOptions, DecryptDataKeyResponse, DefaultCustomAttributes, DeleteObjectOptions, DeleteResourceOptions, Directory, DirectoryGroup, DirectoryGroupResponse, DirectoryResponse, DirectoryState, DirectoryStateResponse, DirectoryType, DirectoryUser, DirectoryUserResponse, DirectoryUserWithGroups, DirectoryUserWithGroupsResponse, DomainData, DomainDataState, DsyncActivatedEvent, DsyncActivatedEventResponse, DsyncDeletedEvent, DsyncDeletedEventResponse, DsyncGroupCreatedEvent, DsyncGroupCreatedEventResponse, DsyncGroupDeletedEvent, DsyncGroupDeletedEventResponse, DsyncGroupUpdatedEvent, DsyncGroupUpdatedEventResponse, DsyncGroupUserAddedEvent, DsyncGroupUserAddedEventResponse, DsyncGroupUserRemovedEvent, DsyncGroupUserRemovedEventResponse, DsyncUserCreatedEvent, DsyncUserCreatedEventResponse, DsyncUserDeletedEvent, DsyncUserDeletedEventResponse, DsyncUserUpdatedEvent, DsyncUserUpdatedEventResponse, EmailVerification, EmailVerificationCreatedEvent, EmailVerificationCreatedEventResponse, EmailVerificationEvent, EmailVerificationEventResponse, EmailVerificationResponse, EnrollAuthFactorOptions, Event, EventBase, EventDirectory, EventDirectoryResponse, EventName, EventResponse, Factor, FactorResponse, FactorWithSecrets, FactorWithSecretsResponse, FeatureFlag, FeatureFlagResponse, GeneratePortalLinkIntent, GenericServerException, GetOptions, GetProfileAndTokenOptions, GetProfileOptions, GetResourceOptions, HttpClientInterface, HttpClientResponseInterface, Identity, IdentityResponse, Impersonator, ImpersonatorResponse, Invitation, InvitationAcceptedEvent, InvitationAcceptedEventResponse, InvitationCreatedEvent, InvitationCreatedEventResponse, InvitationEvent, InvitationEventResponse, InvitationResentEvent, InvitationResentEventResponse, InvitationResponse, InvitationRevokedEvent, InvitationRevokedEventResponse, KeyContext, List, ListAuthFactorsOptions, ListConnectionsOptions, ListDirectoriesOptions, ListDirectoryGroupsOptions, ListDirectoryUsersOptions, ListEventOptions, ListFeatureFlagsOptions, ListInvitationsOptions, ListObjectVersionsResponse, ListOrganizationApiKeysOptions, ListOrganizationFeatureFlagsOptions, ListOrganizationMembershipsOptions, ListOrganizationRolesResponse, ListOrganizationsOptions, ListResourcesOptions, ListResponse, ListSessionsOptions, ListUserFeatureFlagsOptions, ListUsersOptions, ListWarrantsOptions, ListWarrantsRequestOptions, LogoutURLOptions, MagicAuth, MagicAuthCreatedEvent, MagicAuthCreatedEventResponse, MagicAuthEvent, MagicAuthEventResponse, MagicAuthResponse, NoApiKeyProvidedException, NotFoundException, OauthException, OauthTokens, OauthTokensResponse, ObjectDigest, ObjectDigestResponse, ObjectMetadata, ObjectUpdateBy, ObjectVersion, ObjectVersionResponse, Organization, OrganizationCreatedEvent, OrganizationCreatedResponse, OrganizationDeletedEvent, OrganizationDeletedResponse, OrganizationDomain, OrganizationDomainCreatedEvent, OrganizationDomainCreatedEventResponse, OrganizationDomainDeletedEvent, OrganizationDomainDeletedEventResponse, OrganizationDomainResponse, OrganizationDomainState, OrganizationDomainUpdatedEvent, OrganizationDomainUpdatedEventResponse, OrganizationDomainVerificationFailedEvent, OrganizationDomainVerificationFailedEventResponse, OrganizationDomainVerificationStrategy, OrganizationDomainVerifiedEvent, OrganizationDomainVerifiedEventResponse, OrganizationMembership, OrganizationMembershipCreated, OrganizationMembershipCreatedResponse, OrganizationMembershipDeleted, OrganizationMembershipDeletedResponse, OrganizationMembershipResponse, OrganizationMembershipStatus, OrganizationMembershipUpdated, OrganizationMembershipUpdatedResponse, OrganizationResponse, OrganizationRoleResponse, OrganizationUpdatedEvent, OrganizationUpdatedResponse, PKCE, PKCEAuthorizationURLResult, PKCEPair, PaginationOptions, PasswordReset, PasswordResetCreatedEvent, PasswordResetCreatedEventResponse, PasswordResetEvent, PasswordResetEventResponse, PasswordResetResponse, PasswordResetSucceededEvent, PasswordResetSucceededEventResponse, PasswordlessSession, PasswordlessSessionResponse, PolicyContext, PostOptions, Profile, ProfileAndToken, ProfileAndTokenResponse, ProfileResponse, type PublicClientOptions, type PublicSSO, type PublicUserManagement, type PublicWorkOS, PutOptions, QueryOptions, QueryRequestOptions, QueryResult, QueryResultResponse, RateLimitExceededException, ReadObjectMetadataResponse, ReadObjectOptions, ReadObjectResponse, RefreshSessionFailureReason, RefreshSessionResponse, RemoveFlagTargetOptions, RequestHeaders, RequestOptions, ResetPasswordOptions, Resource, ResourceInterface, ResourceOp, ResourceOptions, ResourceResponse, ResponseHeaderValue, ResponseHeaders, ResponsePayload, RevokeSessionOptions, Role, RoleCreatedEvent, RoleCreatedEventResponse, RoleDeletedEvent, RoleDeletedEventResponse, RoleEvent, RoleEventResponse, RoleList, RoleResponse, RoleUpdatedEvent, RoleUpdatedEventResponse, SSOAuthorizationURLOptions, SSOPKCEAuthorizationURLResult, SendInvitationOptions, SendSessionResponse, SendVerificationEmailOptions, SerializedApiKey, SerializedAuditLogExportOptions, SerializedAuthenticatePublicClientBase, SerializedAuthenticateWithCodeAndVerifierOptions, SerializedAuthenticateWithCodeOptions, SerializedAuthenticateWithEmailVerificationOptions, SerializedAuthenticateWithMagicAuthOptions, SerializedAuthenticateWithOptionsBase, SerializedAuthenticateWithOrganizationSelectionOptions, SerializedAuthenticateWithPasswordOptions, SerializedAuthenticateWithRefreshTokenOptions, SerializedAuthenticateWithRefreshTokenPublicClientOptions, SerializedAuthenticateWithTotpOptions, SerializedBatchWriteResourcesOptions, SerializedCheckBatchOptions, SerializedCheckOptions, SerializedCheckWarrantOptions, SerializedCreateAuditLogEventOptions, SerializedCreateAuditLogSchemaOptions, SerializedCreateMagicAuthOptions, SerializedCreateOrganizationApiKeyOptions, SerializedCreateOrganizationDomainOptions, SerializedCreateOrganizationMembershipOptions, SerializedCreateOrganizationOptions, SerializedCreatePasswordResetOptions, SerializedCreatePasswordlessSessionOptions, SerializedCreateResourceOptions, SerializedCreateUserOptions, SerializedCreatedApiKey, SerializedDeleteResourceOptions, SerializedEnrollUserInMfaFactorOptions, SerializedListConnectionsOptions, SerializedListDirectoriesOptions, SerializedListEventOptions, SerializedListInvitationsOptions, SerializedListOrganizationMembershipsOptions, SerializedListResourcesOptions, SerializedListSessionsOptions, SerializedListUsersOptions, SerializedListWarrantsOptions, SerializedQueryOptions, SerializedResetPasswordOptions, SerializedResourceOptions, SerializedRevokeSessionOptions, SerializedSendInvitationOptions, SerializedSubject, SerializedUpdateOrganizationMembershipOptions, SerializedUpdateOrganizationOptions, SerializedUpdateUserOptions, SerializedUpdateUserPasswordOptions, SerializedValidateApiKeyResponse, SerializedVerifyEmailOptions, SerializedWriteWarrantOptions, Session, SessionCookieData, SessionCreatedEvent, SessionCreatedEventResponse, SessionResponse, SessionRevokedEvent, SessionRevokedEventResponse, SessionStatus, SignatureVerificationException, Subject, UnauthorizedException, UnprocessableEntityError, UnprocessableEntityException, UpdateObjectEntity, UpdateObjectOptions, UpdateOrganizationMembershipOptions, UpdateOrganizationOptions, UpdateResourceOptions, UpdateUserOptions, UpdateUserPasswordOptions, User, UserCreatedEvent, UserCreatedEventResponse, UserData, UserDataPayload, UserDeletedEvent, UserDeletedEventResponse, UserManagementAuthorizationURLOptions, UserRegistrationActionPayload, UserRegistrationActionResponseData, UserResponse, UserUpdatedEvent, UserUpdatedEventResponse, ValidateApiKeyOptions, ValidateApiKeyResponse, VaultObject, VerifyEmailOptions, Warrant, WarrantOp, WarrantResponse, WarrantToken, WarrantTokenResponse, WithResolvedClientId, WorkOSNode as WorkOS, WorkOSOptions, WorkOSResponseError, WriteWarrantOptions, createWorkOS, serializeRevokeSessionOptions };
139
152
  //# sourceMappingURL=index.d.ts.map
package/lib/index.js CHANGED
@@ -1,5 +1,4 @@
1
- import { SubtleCryptoProvider } from "./common/crypto/subtle-crypto-provider.js";
2
- import { FetchHttpClient } from "./common/net/fetch-client.js";
1
+ import { ApiKeyRequiredException } from "./common/exceptions/api-key-required.exception.js";
3
2
  import { GenericServerException } from "./common/exceptions/generic-server.exception.js";
4
3
  import { BadRequestException } from "./common/exceptions/bad-request.exception.js";
5
4
  import { NoApiKeyProvidedException } from "./common/exceptions/no-api-key-provided.exception.js";
@@ -9,9 +8,9 @@ import { RateLimitExceededException } from "./common/exceptions/rate-limit-excee
9
8
  import { SignatureVerificationException } from "./common/exceptions/signature-verification.exception.js";
10
9
  import { UnauthorizedException } from "./common/exceptions/unauthorized.exception.js";
11
10
  import { UnprocessableEntityException } from "./common/exceptions/unprocessable-entity.exception.js";
12
- import { Actions } from "./actions/actions.js";
13
- import { Webhooks } from "./webhooks/webhooks.js";
11
+ import { PKCE } from "./pkce/pkce.js";
14
12
  import { AutoPaginatable } from "./common/utils/pagination.js";
13
+ import { Webhooks } from "./webhooks/webhooks.js";
15
14
  import { AuthenticateWithSessionCookieFailureReason } from "./user-management/interfaces/authenticate-with-session-cookie.interface.js";
16
15
  import { serializeRevokeSessionOptions } from "./user-management/interfaces/revoke-session-options.interface.js";
17
16
  import { RefreshSessionFailureReason } from "./user-management/interfaces/refresh-and-seal-session-data.interface.js";
@@ -19,7 +18,11 @@ import { CheckOp } from "./fga/interfaces/check-op.enum.js";
19
18
  import { CheckResult } from "./fga/interfaces/check.interface.js";
20
19
  import { ResourceOp } from "./fga/interfaces/resource-op.enum.js";
21
20
  import { WarrantOp } from "./fga/interfaces/warrant-op.enum.js";
21
+ import { SubtleCryptoProvider } from "./common/crypto/subtle-crypto-provider.js";
22
+ import { FetchHttpClient } from "./common/net/fetch-client.js";
23
+ import { Actions } from "./actions/actions.js";
22
24
  import { WorkOS } from "./workos.js";
25
+ import { createWorkOS } from "./factory.js";
23
26
  import { DomainDataState } from "./organizations/interfaces/domain-data.interface.js";
24
27
  import { OrganizationDomainState, OrganizationDomainVerificationStrategy } from "./organization-domains/interfaces/organization-domain.interface.js";
25
28
  import { GeneratePortalLinkIntent } from "./portal/interfaces/generate-portal-link-intent.interface.js";
@@ -29,14 +32,17 @@ import { ConnectionType } from "./sso/interfaces/connection-type.enum.js";
29
32
  var WorkOSNode = class extends WorkOS {
30
33
  /** @override */
31
34
  createHttpClient(options, userAgent) {
35
+ const headers = {};
36
+ const configHeaders = options.config?.headers;
37
+ if (configHeaders) if (configHeaders instanceof Headers) configHeaders.forEach((v, k) => headers[k] = v);
38
+ else if (Array.isArray(configHeaders)) configHeaders.forEach(([k, v]) => headers[k] = v);
39
+ else Object.assign(headers, configHeaders);
40
+ headers["User-Agent"] = userAgent;
41
+ if (this.key) headers["Authorization"] = `Bearer ${this.key}`;
32
42
  const opts = {
33
43
  ...options.config,
34
44
  timeout: options.timeout,
35
- headers: {
36
- ...options.config?.headers,
37
- Authorization: `Bearer ${this.key}`,
38
- "User-Agent": userAgent
39
- }
45
+ headers
40
46
  };
41
47
  return new FetchHttpClient(this.baseURL, opts, options.fetchFn);
42
48
  }
@@ -58,5 +64,5 @@ var WorkOSNode = class extends WorkOS {
58
64
  };
59
65
 
60
66
  //#endregion
61
- export { AuthenticateWithSessionCookieFailureReason, AutoPaginatable, BadRequestException, CheckOp, CheckResult, ConnectionType, DomainDataState, GeneratePortalLinkIntent, GenericServerException, NoApiKeyProvidedException, NotFoundException, OauthException, OrganizationDomainState, OrganizationDomainVerificationStrategy, RateLimitExceededException, RefreshSessionFailureReason, ResourceOp, SignatureVerificationException, UnauthorizedException, UnprocessableEntityException, WarrantOp, WorkOSNode as WorkOS, serializeRevokeSessionOptions };
67
+ export { ApiKeyRequiredException, AuthenticateWithSessionCookieFailureReason, AutoPaginatable, BadRequestException, CheckOp, CheckResult, ConnectionType, DomainDataState, GeneratePortalLinkIntent, GenericServerException, NoApiKeyProvidedException, NotFoundException, OauthException, OrganizationDomainState, OrganizationDomainVerificationStrategy, PKCE, RateLimitExceededException, RefreshSessionFailureReason, ResourceOp, SignatureVerificationException, UnauthorizedException, UnprocessableEntityException, WarrantOp, WorkOSNode as WorkOS, createWorkOS, serializeRevokeSessionOptions };
62
68
  //# sourceMappingURL=index.js.map
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../src/index.ts"],"sourcesContent":["import { SubtleCryptoProvider } from './common/crypto/subtle-crypto-provider';\nimport { CryptoProvider } from './common/crypto/crypto-provider';\n\nimport { HttpClient } from './common/net/http-client';\nimport { FetchHttpClient } from './common/net/fetch-client';\n\nimport { Actions } from './actions/actions';\nimport { Webhooks } from './webhooks/webhooks';\nimport { WorkOS } from './workos';\nimport { WorkOSOptions } from './common/interfaces';\n\nexport * from './actions/interfaces';\nexport * from './audit-logs/interfaces';\nexport * from './common/exceptions';\nexport * from './common/interfaces';\nexport * from './common/utils/pagination';\nexport * from './directory-sync/interfaces';\nexport * from './events/interfaces';\nexport * from './feature-flags/interfaces';\nexport * from './fga/interfaces';\nexport * from './organizations/interfaces';\nexport * from './organization-domains/interfaces';\nexport * from './passwordless/interfaces';\nexport * from './portal/interfaces';\nexport * from './roles/interfaces';\nexport * from './sso/interfaces';\nexport * from './user-management/interfaces';\nexport * from './vault/interfaces';\n\nclass WorkOSNode extends WorkOS {\n /** @override */\n createHttpClient(options: WorkOSOptions, userAgent: string): HttpClient {\n const opts = {\n ...options.config,\n timeout: options.timeout, // Pass through the timeout option\n headers: {\n ...options.config?.headers,\n Authorization: `Bearer ${this.key}`,\n 'User-Agent': userAgent,\n },\n };\n\n return new FetchHttpClient(this.baseURL, opts, options.fetchFn);\n }\n\n /** @override */\n createWebhookClient(): Webhooks {\n return new Webhooks(this.getCryptoProvider());\n }\n\n override getCryptoProvider(): CryptoProvider {\n return new SubtleCryptoProvider();\n }\n\n /** @override */\n createActionsClient(): Actions {\n return new Actions(this.getCryptoProvider());\n }\n\n /** @override */\n emitWarning(warning: string): void {\n return process.emitWarning(warning, 'WorkOS');\n }\n}\n\nexport { WorkOSNode as WorkOS };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BA,IAAM,aAAN,cAAyB,OAAO;;CAE9B,iBAAiB,SAAwB,WAA+B;EACtE,MAAM,OAAO;GACX,GAAG,QAAQ;GACX,SAAS,QAAQ;GACjB,SAAS;IACP,GAAG,QAAQ,QAAQ;IACnB,eAAe,UAAU,KAAK;IAC9B,cAAc;IACf;GACF;AAED,SAAO,IAAI,gBAAgB,KAAK,SAAS,MAAM,QAAQ,QAAQ;;;CAIjE,sBAAgC;AAC9B,SAAO,IAAI,SAAS,KAAK,mBAAmB,CAAC;;CAG/C,AAAS,oBAAoC;AAC3C,SAAO,IAAI,sBAAsB;;;CAInC,sBAA+B;AAC7B,SAAO,IAAI,QAAQ,KAAK,mBAAmB,CAAC;;;CAI9C,YAAY,SAAuB;AACjC,SAAO,QAAQ,YAAY,SAAS,SAAS"}
1
+ {"version":3,"file":"index.js","names":["headers: Record<string, string>"],"sources":["../src/index.ts"],"sourcesContent":["import { SubtleCryptoProvider } from './common/crypto/subtle-crypto-provider';\nimport { CryptoProvider } from './common/crypto/crypto-provider';\n\nimport { HttpClient } from './common/net/http-client';\nimport { FetchHttpClient } from './common/net/fetch-client';\n\nimport { Actions } from './actions/actions';\nimport { Webhooks } from './webhooks/webhooks';\nimport { WorkOS } from './workos';\nimport { WorkOSOptions } from './common/interfaces';\n\nexport * from './actions/interfaces';\nexport * from './api-keys/interfaces';\nexport * from './audit-logs/interfaces';\nexport * from './common/exceptions';\nexport * from './common/interfaces';\nexport * from './common/utils/pagination';\nexport * from './directory-sync/interfaces';\nexport * from './events/interfaces';\nexport * from './feature-flags/interfaces';\nexport * from './fga/interfaces';\nexport * from './organizations/interfaces';\nexport * from './organization-domains/interfaces';\nexport * from './passwordless/interfaces';\nexport * from './portal/interfaces';\nexport * from './roles/interfaces';\nexport * from './sso/interfaces';\nexport * from './user-management/interfaces';\nexport * from './vault/interfaces';\nexport * from './pkce/pkce';\nexport {\n createWorkOS,\n type PublicWorkOS,\n type PublicUserManagement,\n type PublicSSO,\n type PublicClientOptions,\n type ConfidentialClientOptions,\n} from './factory';\n\nclass WorkOSNode extends WorkOS {\n /** @override */\n createHttpClient(options: WorkOSOptions, userAgent: string): HttpClient {\n const headers: Record<string, string> = {};\n\n const configHeaders = options.config?.headers;\n if (configHeaders) {\n if (configHeaders instanceof Headers) {\n configHeaders.forEach((v, k) => (headers[k] = v));\n } else if (Array.isArray(configHeaders)) {\n configHeaders.forEach(([k, v]) => (headers[k] = v));\n } else {\n Object.assign(headers, configHeaders);\n }\n }\n\n headers['User-Agent'] = userAgent;\n\n if (this.key) {\n headers['Authorization'] = `Bearer ${this.key}`;\n }\n\n const opts = {\n ...options.config,\n timeout: options.timeout,\n headers,\n };\n\n return new FetchHttpClient(this.baseURL, opts, options.fetchFn);\n }\n\n /** @override */\n createWebhookClient(): Webhooks {\n return new Webhooks(this.getCryptoProvider());\n }\n\n override getCryptoProvider(): CryptoProvider {\n return new SubtleCryptoProvider();\n }\n\n /** @override */\n createActionsClient(): Actions {\n return new Actions(this.getCryptoProvider());\n }\n\n /** @override */\n emitWarning(warning: string): void {\n return process.emitWarning(warning, 'WorkOS');\n }\n}\n\nexport { WorkOSNode as WorkOS };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuCA,IAAM,aAAN,cAAyB,OAAO;;CAE9B,iBAAiB,SAAwB,WAA+B;EACtE,MAAMA,UAAkC,EAAE;EAE1C,MAAM,gBAAgB,QAAQ,QAAQ;AACtC,MAAI,cACF,KAAI,yBAAyB,QAC3B,eAAc,SAAS,GAAG,MAAO,QAAQ,KAAK,EAAG;WACxC,MAAM,QAAQ,cAAc,CACrC,eAAc,SAAS,CAAC,GAAG,OAAQ,QAAQ,KAAK,EAAG;MAEnD,QAAO,OAAO,SAAS,cAAc;AAIzC,UAAQ,gBAAgB;AAExB,MAAI,KAAK,IACP,SAAQ,mBAAmB,UAAU,KAAK;EAG5C,MAAM,OAAO;GACX,GAAG,QAAQ;GACX,SAAS,QAAQ;GACjB;GACD;AAED,SAAO,IAAI,gBAAgB,KAAK,SAAS,MAAM,QAAQ,QAAQ;;;CAIjE,sBAAgC;AAC9B,SAAO,IAAI,SAAS,KAAK,mBAAmB,CAAC;;CAG/C,AAAS,oBAAoC;AAC3C,SAAO,IAAI,sBAAsB;;;CAInC,sBAA+B;AAC7B,SAAO,IAAI,QAAQ,KAAK,mBAAmB,CAAC;;;CAI9C,YAAY,SAAuB;AACjC,SAAO,QAAQ,YAAY,SAAS,SAAS"}
@@ -1,5 +1,4 @@
1
- const require_common_crypto_subtle_crypto_provider = require('./common/crypto/subtle-crypto-provider.cjs');
2
- const require_common_net_fetch_client = require('./common/net/fetch-client.cjs');
1
+ const require_common_exceptions_api_key_required_exception = require('./common/exceptions/api-key-required.exception.cjs');
3
2
  const require_common_exceptions_generic_server_exception = require('./common/exceptions/generic-server.exception.cjs');
4
3
  const require_common_exceptions_bad_request_exception = require('./common/exceptions/bad-request.exception.cjs');
5
4
  const require_common_exceptions_no_api_key_provided_exception = require('./common/exceptions/no-api-key-provided.exception.cjs');
@@ -9,9 +8,9 @@ const require_common_exceptions_rate_limit_exceeded_exception = require('./commo
9
8
  const require_common_exceptions_signature_verification_exception = require('./common/exceptions/signature-verification.exception.cjs');
10
9
  const require_common_exceptions_unauthorized_exception = require('./common/exceptions/unauthorized.exception.cjs');
11
10
  const require_common_exceptions_unprocessable_entity_exception = require('./common/exceptions/unprocessable-entity.exception.cjs');
12
- const require_actions_actions = require('./actions/actions.cjs');
13
- const require_webhooks_webhooks = require('./webhooks/webhooks.cjs');
11
+ const require_pkce_pkce = require('./pkce/pkce.cjs');
14
12
  const require_common_utils_pagination = require('./common/utils/pagination.cjs');
13
+ const require_webhooks_webhooks = require('./webhooks/webhooks.cjs');
15
14
  const require_user_management_interfaces_authenticate_with_session_cookie_interface = require('./user-management/interfaces/authenticate-with-session-cookie.interface.cjs');
16
15
  const require_user_management_interfaces_revoke_session_options_interface = require('./user-management/interfaces/revoke-session-options.interface.cjs');
17
16
  const require_user_management_interfaces_refresh_and_seal_session_data_interface = require('./user-management/interfaces/refresh-and-seal-session-data.interface.cjs');
@@ -19,7 +18,11 @@ const require_fga_interfaces_check_op_enum = require('./fga/interfaces/check-op.
19
18
  const require_fga_interfaces_check_interface = require('./fga/interfaces/check.interface.cjs');
20
19
  const require_fga_interfaces_resource_op_enum = require('./fga/interfaces/resource-op.enum.cjs');
21
20
  const require_fga_interfaces_warrant_op_enum = require('./fga/interfaces/warrant-op.enum.cjs');
21
+ const require_common_crypto_subtle_crypto_provider = require('./common/crypto/subtle-crypto-provider.cjs');
22
+ const require_common_net_fetch_client = require('./common/net/fetch-client.cjs');
23
+ const require_actions_actions = require('./actions/actions.cjs');
22
24
  const require_workos = require('./workos.cjs');
25
+ const require_factory = require('./factory.cjs');
23
26
  const require_organizations_interfaces_domain_data_interface = require('./organizations/interfaces/domain-data.interface.cjs');
24
27
  const require_organization_domains_interfaces_organization_domain_interface = require('./organization-domains/interfaces/organization-domain.interface.cjs');
25
28
  const require_portal_interfaces_generate_portal_link_intent_interface = require('./portal/interfaces/generate-portal-link-intent.interface.cjs');
@@ -29,13 +32,13 @@ const require_sso_interfaces_connection_type_enum = require('./sso/interfaces/co
29
32
  var WorkOSWorker = class extends require_workos.WorkOS {
30
33
  /** @override */
31
34
  createHttpClient(options, userAgent) {
35
+ const headers = { "User-Agent": userAgent };
36
+ const configHeaders = options.config?.headers;
37
+ if (configHeaders && typeof configHeaders === "object" && !Array.isArray(configHeaders) && !(configHeaders instanceof Headers)) Object.assign(headers, configHeaders);
38
+ if (this.key) headers["Authorization"] = `Bearer ${this.key}`;
32
39
  return new require_common_net_fetch_client.FetchHttpClient(this.baseURL, {
33
40
  ...options.config,
34
- headers: {
35
- ...options.config?.headers,
36
- Authorization: `Bearer ${this.key}`,
37
- "User-Agent": userAgent
38
- }
41
+ headers
39
42
  });
40
43
  }
41
44
  /** @override */
@@ -56,6 +59,7 @@ var WorkOSWorker = class extends require_workos.WorkOS {
56
59
  };
57
60
 
58
61
  //#endregion
62
+ exports.ApiKeyRequiredException = require_common_exceptions_api_key_required_exception.ApiKeyRequiredException;
59
63
  exports.AuthenticateWithSessionCookieFailureReason = require_user_management_interfaces_authenticate_with_session_cookie_interface.AuthenticateWithSessionCookieFailureReason;
60
64
  exports.AutoPaginatable = require_common_utils_pagination.AutoPaginatable;
61
65
  exports.BadRequestException = require_common_exceptions_bad_request_exception.BadRequestException;
@@ -70,6 +74,7 @@ exports.NotFoundException = require_common_exceptions_not_found_exception.NotFou
70
74
  exports.OauthException = require_common_exceptions_oauth_exception.OauthException;
71
75
  exports.OrganizationDomainState = require_organization_domains_interfaces_organization_domain_interface.OrganizationDomainState;
72
76
  exports.OrganizationDomainVerificationStrategy = require_organization_domains_interfaces_organization_domain_interface.OrganizationDomainVerificationStrategy;
77
+ exports.PKCE = require_pkce_pkce.PKCE;
73
78
  exports.RateLimitExceededException = require_common_exceptions_rate_limit_exceeded_exception.RateLimitExceededException;
74
79
  exports.RefreshSessionFailureReason = require_user_management_interfaces_refresh_and_seal_session_data_interface.RefreshSessionFailureReason;
75
80
  exports.ResourceOp = require_fga_interfaces_resource_op_enum.ResourceOp;
@@ -78,5 +83,6 @@ exports.UnauthorizedException = require_common_exceptions_unauthorized_exception
78
83
  exports.UnprocessableEntityException = require_common_exceptions_unprocessable_entity_exception.UnprocessableEntityException;
79
84
  exports.WarrantOp = require_fga_interfaces_warrant_op_enum.WarrantOp;
80
85
  exports.WorkOS = WorkOSWorker;
86
+ exports.createWorkOS = require_factory.createWorkOS;
81
87
  exports.serializeRevokeSessionOptions = require_user_management_interfaces_revoke_session_options_interface.serializeRevokeSessionOptions;
82
88
  //# sourceMappingURL=index.worker.cjs.map