@workos-inc/widgets 1.9.0 → 1.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (85) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/dist/cjs/admin-portal-audit-log-streaming.client.cjs +167 -0
  3. package/dist/cjs/admin-portal-audit-log-streaming.client.cjs.map +1 -0
  4. package/dist/cjs/admin-portal-audit-log-streaming.client.d.cts +26 -0
  5. package/dist/cjs/admin-portal-domain-verification.client.cjs.map +1 -1
  6. package/dist/cjs/admin-portal-sso-connection.client.cjs +4 -7
  7. package/dist/cjs/admin-portal-sso-connection.client.cjs.map +1 -1
  8. package/dist/cjs/api/api-provider.cjs.map +1 -1
  9. package/dist/cjs/api/api-provider.d.cts +1 -1
  10. package/dist/cjs/api/endpoint.cjs +176 -285
  11. package/dist/cjs/api/endpoint.cjs.map +1 -1
  12. package/dist/cjs/api/endpoint.d.cts +345 -379
  13. package/dist/cjs/directory-sync.client.cjs +16 -3
  14. package/dist/cjs/directory-sync.client.cjs.map +1 -1
  15. package/dist/cjs/experimental/api/fetch.cjs +42 -183
  16. package/dist/cjs/experimental/api/fetch.cjs.map +1 -1
  17. package/dist/cjs/experimental/api/fetch.d.cts +325 -369
  18. package/dist/cjs/experimental/api/react-query.cjs +151 -263
  19. package/dist/cjs/experimental/api/react-query.cjs.map +1 -1
  20. package/dist/cjs/experimental/api/react-query.d.cts +380 -370
  21. package/dist/cjs/experimental/api/swr.cjs +84 -183
  22. package/dist/cjs/experimental/api/swr.cjs.map +1 -1
  23. package/dist/cjs/experimental/api/swr.d.cts +356 -408
  24. package/dist/cjs/index.cjs +11 -0
  25. package/dist/cjs/index.cjs.map +1 -1
  26. package/dist/cjs/index.d.cts +2 -0
  27. package/dist/cjs/lib/add-mfa-dialog.cjs +18 -16
  28. package/dist/cjs/lib/add-mfa-dialog.cjs.map +1 -1
  29. package/dist/cjs/lib/admin-portal-audit-log-streaming.cjs +321 -0
  30. package/dist/cjs/lib/admin-portal-audit-log-streaming.cjs.map +1 -0
  31. package/dist/cjs/lib/admin-portal-audit-log-streaming.d.cts +54 -0
  32. package/dist/cjs/lib/admin-portal-sso-connection.cjs +0 -8
  33. package/dist/cjs/lib/admin-portal-sso-connection.cjs.map +1 -1
  34. package/dist/cjs/lib/admin-portal-sso-connection.d.cts +1 -2
  35. package/dist/cjs/lib/audit-log-stream-icons.cjs +63 -0
  36. package/dist/cjs/lib/audit-log-stream-icons.cjs.map +1 -0
  37. package/dist/cjs/lib/audit-log-stream-icons.d.cts +5 -0
  38. package/dist/cjs/lib/identity-providers.d.cts +2 -2
  39. package/dist/cjs/lib/provider-icon.cjs.map +1 -1
  40. package/dist/cjs/lib/provider-icon.d.cts +2 -2
  41. package/dist/cjs/workos-widgets.client.cjs +13 -1
  42. package/dist/cjs/workos-widgets.client.cjs.map +1 -1
  43. package/dist/esm/admin-portal-audit-log-streaming.client.d.ts +26 -0
  44. package/dist/esm/admin-portal-audit-log-streaming.client.js +153 -0
  45. package/dist/esm/admin-portal-audit-log-streaming.client.js.map +1 -0
  46. package/dist/esm/admin-portal-domain-verification.client.js +2 -2
  47. package/dist/esm/admin-portal-domain-verification.client.js.map +1 -1
  48. package/dist/esm/admin-portal-sso-connection.client.js +6 -9
  49. package/dist/esm/admin-portal-sso-connection.client.js.map +1 -1
  50. package/dist/esm/api/api-provider.d.ts +1 -1
  51. package/dist/esm/api/api-provider.js.map +1 -1
  52. package/dist/esm/api/endpoint.d.ts +345 -379
  53. package/dist/esm/api/endpoint.js +168 -265
  54. package/dist/esm/api/endpoint.js.map +1 -1
  55. package/dist/esm/directory-sync.client.js +16 -3
  56. package/dist/esm/directory-sync.client.js.map +1 -1
  57. package/dist/esm/experimental/api/fetch.d.ts +325 -369
  58. package/dist/esm/experimental/api/fetch.js +38 -163
  59. package/dist/esm/experimental/api/fetch.js.map +1 -1
  60. package/dist/esm/experimental/api/react-query.d.ts +380 -370
  61. package/dist/esm/experimental/api/react-query.js +141 -243
  62. package/dist/esm/experimental/api/react-query.js.map +1 -1
  63. package/dist/esm/experimental/api/swr.d.ts +356 -408
  64. package/dist/esm/experimental/api/swr.js +76 -163
  65. package/dist/esm/experimental/api/swr.js.map +1 -1
  66. package/dist/esm/index.d.ts +2 -0
  67. package/dist/esm/index.js +12 -0
  68. package/dist/esm/index.js.map +1 -1
  69. package/dist/esm/lib/add-mfa-dialog.js +18 -16
  70. package/dist/esm/lib/add-mfa-dialog.js.map +1 -1
  71. package/dist/esm/lib/admin-portal-audit-log-streaming.d.ts +54 -0
  72. package/dist/esm/lib/admin-portal-audit-log-streaming.js +290 -0
  73. package/dist/esm/lib/admin-portal-audit-log-streaming.js.map +1 -0
  74. package/dist/esm/lib/admin-portal-sso-connection.d.ts +1 -2
  75. package/dist/esm/lib/admin-portal-sso-connection.js +0 -8
  76. package/dist/esm/lib/admin-portal-sso-connection.js.map +1 -1
  77. package/dist/esm/lib/audit-log-stream-icons.d.ts +5 -0
  78. package/dist/esm/lib/audit-log-stream-icons.js +39 -0
  79. package/dist/esm/lib/audit-log-stream-icons.js.map +1 -0
  80. package/dist/esm/lib/identity-providers.d.ts +2 -2
  81. package/dist/esm/lib/provider-icon.d.ts +2 -2
  82. package/dist/esm/lib/provider-icon.js.map +1 -1
  83. package/dist/esm/workos-widgets.client.js +13 -1
  84. package/dist/esm/workos-widgets.client.js.map +1 -1
  85. package/package.json +2 -2
@@ -63,15 +63,28 @@ const DirectorySyncImpl = (props) => {
63
63
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_directory_sync.DirectorySyncError, { error: permissionsQuery.error || error, ...props });
64
64
  }
65
65
  if (!directories?.data?.length) {
66
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_directory_sync.DirectorySync, { ...props, state: import_endpoint.DirectoryState.unlinked });
66
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
67
+ import_directory_sync.DirectorySync,
68
+ {
69
+ ...props,
70
+ state: import_endpoint.DirectoryState.unlinked,
71
+ link: directories?.link
72
+ }
73
+ );
67
74
  }
68
75
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
69
76
  import_error_boundary.ErrorBoundary,
70
77
  {
71
78
  fallbackRender: ({ error: error2 }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_directory_sync.DirectorySyncError, { error: error2, ...props }),
72
79
  children: directories.data.map((directory) => {
73
- const { id, state, type, metadata, updatedAt } = directory;
74
- const commonProps = { ...props, type, metadata, lastSyncAt: updatedAt };
80
+ const { id, state, type, metadata, lastSyncRunAt } = directory;
81
+ const commonProps = {
82
+ ...props,
83
+ type,
84
+ metadata,
85
+ lastSyncAt: lastSyncRunAt ?? null,
86
+ link: directories.link
87
+ };
75
88
  switch (state) {
76
89
  case import_endpoint.DirectoryState.invalid_credentials:
77
90
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/directory-sync.client.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport {\n DirectorySyncError,\n DirectorySyncLoading,\n DirectorySync as DirectorySyncPresentational,\n} from \"./lib/directory-sync.js\";\nimport type {\n DirectorySyncErrorProps,\n DirectorySyncLoadingProps,\n} from \"./lib/directory-sync.js\";\nimport { ApiProvider, AuthToken, useApiReady } from \"./api/api-provider.js\";\nimport { useWorkOsApiUrl } from \"./lib/widgets-context.js\";\nimport { ErrorBoundary } from \"./lib/error-boundary.js\";\nimport type { WidgetRootDomProps } from \"./lib/utils.js\";\nimport { DirectoryState, useListDirectories } from \"./api/endpoint.js\";\nimport { usePermissions } from \"./lib/use-permissions.js\";\ninterface DirectorySyncProps extends WidgetRootDomProps {\n authToken: AuthToken;\n}\n\nconst DirectorySync: React.FC<DirectorySyncProps> = ({\n authToken,\n ...domProps\n}) => {\n const baseUrl = useWorkOsApiUrl();\n\n return (\n <ErrorBoundary\n fallbackRender={({ error }) => (\n <DirectorySyncError {...domProps} error={error} />\n )}\n >\n <ApiProvider\n widgetType=\"directory-sync\"\n authToken={authToken}\n baseUrl={baseUrl}\n >\n <DirectorySyncImpl {...domProps} />\n </ApiProvider>\n </ErrorBoundary>\n );\n};\n\nconst DirectorySyncImpl = (props: WidgetRootDomProps) => {\n const isApiReady = useApiReady();\n const { data: directories, isLoading, isError, error } = useListDirectories();\n const permissionsQuery = usePermissions(\"widgets:dsync:manage\");\n\n if (!isApiReady || isLoading || permissionsQuery.isLoading) {\n return <DirectorySyncLoading {...props} />;\n }\n\n if (permissionsQuery.isError || isError) {\n return (\n <DirectorySyncError error={permissionsQuery.error || error} {...props} />\n );\n }\n\n if (!directories?.data?.length) {\n return (\n <DirectorySyncPresentational {...props} state={DirectoryState.unlinked} />\n );\n }\n\n return (\n <ErrorBoundary\n fallbackRender={({ error }) => (\n <DirectorySyncError error={error} {...props} />\n )}\n >\n {directories.data.map((directory) => {\n const { id, state, type, metadata, updatedAt } = directory;\n const commonProps = { ...props, type, metadata, lastSyncAt: updatedAt };\n\n switch (state) {\n case DirectoryState.invalid_credentials:\n return (\n <DirectorySyncPresentational\n key={id}\n {...commonProps}\n state={state}\n errorMessage=\"Your directory credentials are invalid or have expired. Please re-authenticate to resume syncing.\"\n />\n );\n case DirectoryState.linked:\n return (\n <DirectorySyncPresentational\n key={id}\n {...commonProps}\n state={state}\n />\n );\n case DirectoryState.validating:\n return (\n <DirectorySyncPresentational\n key={id}\n {...commonProps}\n state={state}\n />\n );\n case DirectoryState.deleting:\n return (\n <DirectorySyncPresentational\n key={id}\n {...commonProps}\n state={state}\n />\n );\n case DirectoryState.unlinked:\n return (\n <DirectorySyncPresentational\n key={id}\n {...commonProps}\n state={state}\n />\n );\n case DirectoryState.requires_type:\n return (\n <DirectorySyncPresentational\n key={id}\n {...commonProps}\n state={state}\n errorMessage=\"Your directory requires additional configuration. Please complete setup to begin syncing.\"\n />\n );\n }\n })}\n </ErrorBoundary>\n );\n};\n\nexport type {\n DirectorySyncProps,\n DirectorySyncLoadingProps,\n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CAAC,cAAc;AACnC,cAAM,EAAE,IAAI,OAAO,MAAM,UAAU,UAAU,IAAI;AACjD,cAAM,cAAc,EAAE,GAAG,OAAO,MAAM,UAAU,YAAY,UAAU;AAEtE,gBAAQ,OAAO;AAAA,UACb,KAAK,+BAAe;AAClB,mBACE;AAAA,cAAC,sBAAAD;AAAA,cAAA;AAAA,gBAEE,GAAG;AAAA,gBACJ;AAAA,gBACA,cAAa;AAAA;AAAA,cAHR;AAAA,YAIP;AAAA,UAEJ,KAAK,+BAAe;AAClB,mBACE;AAAA,cAAC,sBAAAA;AAAA,cAAA;AAAA,gBAEE,GAAG;AAAA,gBACJ;AAAA;AAAA,cAFK;AAAA,YAGP;AAAA,UAEJ,KAAK,+BAAe;AAClB,mBACE;AAAA,cAAC,sBAAAA;AAAA,cAAA;AAAA,gBAEE,GAAG;AAAA,gBACJ;AAAA;AAAA,cAFK;AAAA,YAGP;AAAA,UAEJ,KAAK,+BAAe;AAClB,mBACE;AAAA,cAAC,sBAAAA;AAAA,cAAA;AAAA,gBAEE,GAAG;AAAA,gBACJ;AAAA;AAAA,cAFK;AAAA,YAGP;AAAA,UAEJ,KAAK,+BAAe;AAClB,mBACE;AAAA,cAAC,sBAAAA;AAAA,cAAA;AAAA,gBAEE,GAAG;AAAA,gBACJ;AAAA;AAAA,cAFK;AAAA,YAGP;AAAA,UAEJ,KAAK,+BAAe;AAClB,mBACE;AAAA,cAAC,sBAAAA;AAAA,cAAA;AAAA,gBAEE,GAAG;AAAA,gBACJ;AAAA,gBACA,cAAa;AAAA;AAAA,cAHR;AAAA,YAIP;AAAA,QAEN;AAAA,MACF,CAAC;AAAA;AAAA,EACH;AAEJ;","names":["DirectorySyncPresentational","error"]}
1
+ {"version":3,"sources":["../../src/directory-sync.client.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport {\n DirectorySyncError,\n DirectorySyncLoading,\n DirectorySync as DirectorySyncPresentational,\n} from \"./lib/directory-sync.js\";\nimport type {\n DirectorySyncErrorProps,\n DirectorySyncLoadingProps,\n} from \"./lib/directory-sync.js\";\nimport { ApiProvider, AuthToken, useApiReady } from \"./api/api-provider.js\";\nimport { useWorkOsApiUrl } from \"./lib/widgets-context.js\";\nimport { ErrorBoundary } from \"./lib/error-boundary.js\";\nimport type { WidgetRootDomProps } from \"./lib/utils.js\";\nimport { DirectoryState, useListDirectories } from \"./api/endpoint.js\";\nimport { usePermissions } from \"./lib/use-permissions.js\";\ninterface DirectorySyncProps extends WidgetRootDomProps {\n authToken: AuthToken;\n}\n\nconst DirectorySync: React.FC<DirectorySyncProps> = ({\n authToken,\n ...domProps\n}) => {\n const baseUrl = useWorkOsApiUrl();\n\n return (\n <ErrorBoundary\n fallbackRender={({ error }) => (\n <DirectorySyncError {...domProps} error={error} />\n )}\n >\n <ApiProvider\n widgetType=\"directory-sync\"\n authToken={authToken}\n baseUrl={baseUrl}\n >\n <DirectorySyncImpl {...domProps} />\n </ApiProvider>\n </ErrorBoundary>\n );\n};\n\nconst DirectorySyncImpl = (props: WidgetRootDomProps) => {\n const isApiReady = useApiReady();\n const { data: directories, isLoading, isError, error } = useListDirectories();\n const permissionsQuery = usePermissions(\"widgets:dsync:manage\");\n\n if (!isApiReady || isLoading || permissionsQuery.isLoading) {\n return <DirectorySyncLoading {...props} />;\n }\n\n if (permissionsQuery.isError || isError) {\n return (\n <DirectorySyncError error={permissionsQuery.error || error} {...props} />\n );\n }\n\n if (!directories?.data?.length) {\n return (\n <DirectorySyncPresentational\n {...props}\n state={DirectoryState.unlinked}\n link={directories?.link}\n />\n );\n }\n\n return (\n <ErrorBoundary\n fallbackRender={({ error }) => (\n <DirectorySyncError error={error} {...props} />\n )}\n >\n {directories.data.map((directory) => {\n const { id, state, type, metadata, lastSyncRunAt } = directory;\n const commonProps = {\n ...props,\n type,\n metadata,\n lastSyncAt: lastSyncRunAt ?? null,\n link: directories.link,\n };\n\n switch (state) {\n case DirectoryState.invalid_credentials:\n return (\n <DirectorySyncPresentational\n key={id}\n {...commonProps}\n state={state}\n errorMessage=\"Your directory credentials are invalid or have expired. Please re-authenticate to resume syncing.\"\n />\n );\n case DirectoryState.linked:\n return (\n <DirectorySyncPresentational\n key={id}\n {...commonProps}\n state={state}\n />\n );\n case DirectoryState.validating:\n return (\n <DirectorySyncPresentational\n key={id}\n {...commonProps}\n state={state}\n />\n );\n case DirectoryState.deleting:\n return (\n <DirectorySyncPresentational\n key={id}\n {...commonProps}\n state={state}\n />\n );\n case DirectoryState.unlinked:\n return (\n <DirectorySyncPresentational\n key={id}\n {...commonProps}\n state={state}\n />\n );\n case DirectoryState.requires_type:\n return (\n <DirectorySyncPresentational\n key={id}\n {...commonProps}\n state={state}\n errorMessage=\"Your directory requires additional configuration. Please complete setup to begin syncing.\"\n />\n );\n }\n })}\n </ErrorBoundary>\n );\n};\n\nexport type {\n DirectorySyncProps,\n DirectorySyncLoadingProps,\n DirectorySyncErrorProps,\n};\nexport { DirectorySync, DirectorySyncLoading, DirectorySyncError };\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA+BQ;AA5BR,4BAIO;AAKP,0BAAoD;AACpD,6BAAgC;AAChC,4BAA8B;AAE9B,sBAAmD;AACnD,6BAA+B;AAK/B,MAAM,gBAA8C,CAAC;AAAA,EACnD;AAAA,EACA,GAAG;AACL,MAAM;AACJ,QAAM,cAAU,wCAAgB;AAEhC,SACE;AAAA,IAAC;AAAA;AAAA,MACC,gBAAgB,CAAC,EAAE,MAAM,MACvB,4CAAC,4CAAoB,GAAG,UAAU,OAAc;AAAA,MAGlD;AAAA,QAAC;AAAA;AAAA,UACC,YAAW;AAAA,UACX;AAAA,UACA;AAAA,UAEA,sDAAC,qBAAmB,GAAG,UAAU;AAAA;AAAA,MACnC;AAAA;AAAA,EACF;AAEJ;AAEA,MAAM,oBAAoB,CAAC,UAA8B;AACvD,QAAM,iBAAa,iCAAY;AAC/B,QAAM,EAAE,MAAM,aAAa,WAAW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;AAAA,UAEJ,KAAK,+BAAe;AAClB,mBACE;AAAA,cAAC,sBAAAA;AAAA,cAAA;AAAA,gBAEE,GAAG;AAAA,gBACJ;AAAA;AAAA,cAFK;AAAA,YAGP;AAAA,UAEJ,KAAK,+BAAe;AAClB,mBACE;AAAA,cAAC,sBAAAA;AAAA,cAAA;AAAA,gBAEE,GAAG;AAAA,gBACJ;AAAA;AAAA,cAFK;AAAA,YAGP;AAAA,UAEJ,KAAK,+BAAe;AAClB,mBACE;AAAA,cAAC,sBAAAA;AAAA,cAAA;AAAA,gBAEE,GAAG;AAAA,gBACJ;AAAA,gBACA,cAAa;AAAA;AAAA,cAHR;AAAA,YAIP;AAAA,QAEN;AAAA,MACF,CAAC;AAAA;AAAA,EACH;AAEJ;","names":["DirectorySyncPresentational","error"]}
@@ -18,18 +18,6 @@ var __copyProps = (to, from, except, desc) => {
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
19
  var fetch_exports = {};
20
20
  __export(fetch_exports, {
21
- AuthenticationInformationResponseDataVerificationMethodsMfaOneOfProvider: () => AuthenticationInformationResponseDataVerificationMethodsMfaOneOfProvider,
22
- AuthenticationInformationResponseDataVerificationMethodsPasskeyOneOfProvider: () => AuthenticationInformationResponseDataVerificationMethodsPasskeyOneOfProvider,
23
- AuthenticationInformationResponseDataVerificationMethodsPasswordOneOfProvider: () => AuthenticationInformationResponseDataVerificationMethodsPasswordOneOfProvider,
24
- CreateTotpFactorResponseAuthenticationChallengeAllOfObject: () => CreateTotpFactorResponseAuthenticationChallengeAllOfObject,
25
- CreateTotpFactorResponseAuthenticationFactorAllOfObject: () => CreateTotpFactorResponseAuthenticationFactorAllOfObject,
26
- CreateTotpFactorResponseAuthenticationFactorAllOfType: () => CreateTotpFactorResponseAuthenticationFactorAllOfType,
27
- DataInstallationAllOfObject: () => DataInstallationAllOfObject,
28
- DataInstallationAllOfState: () => DataInstallationAllOfState,
29
- DataIntegrationCredentialsType: () => DataIntegrationCredentialsType,
30
- DataIntegrationIntegrationType: () => DataIntegrationIntegrationType,
31
- DataIntegrationObject: () => DataIntegrationObject,
32
- DataIntegrationOwnership: () => DataIntegrationOwnership,
33
21
  DirectoryState: () => DirectoryState,
34
22
  DirectoryType: () => DirectoryType,
35
23
  DomainVerificationNameServer: () => DomainVerificationNameServer,
@@ -39,14 +27,6 @@ __export(fetch_exports, {
39
27
  OidcSessionState: () => OidcSessionState,
40
28
  OrganizationDomainState: () => OrganizationDomainState,
41
29
  SamlSessionState: () => SamlSessionState,
42
- SendVerificationResponseType: () => SendVerificationResponseType,
43
- SettingsResponseObject: () => SettingsResponseObject,
44
- SsoConnectionAnyOfEightAllOfProviderTag: () => SsoConnectionAnyOfEightAllOfProviderTag,
45
- SsoConnectionAnyOfEightAllOfState: () => SsoConnectionAnyOfEightAllOfState,
46
- SsoConnectionAnyOfEightAllOfType: () => SsoConnectionAnyOfEightAllOfType,
47
- SsoConnectionAnyOfProviderTag: () => SsoConnectionAnyOfProviderTag,
48
- SsoConnectionAnyOfState: () => SsoConnectionAnyOfState,
49
- SsoConnectionAnyOfType: () => SsoConnectionAnyOfType,
50
30
  SsoConnectionSessionJSONState: () => SsoConnectionSessionJSONState,
51
31
  authenticationInformation: () => authenticationInformation,
52
32
  createOrganizationApiKey: () => createOrganizationApiKey,
@@ -58,6 +38,7 @@ __export(fetch_exports, {
58
38
  deletePasskey: () => deletePasskey,
59
39
  deleteTotpFactors: () => deleteTotpFactors,
60
40
  generateAdminPortalLink: () => generateAdminPortalLink,
41
+ getAuditLogStream: () => getAuditLogStream,
61
42
  getAuthenticationInformationUrl: () => getAuthenticationInformationUrl,
62
43
  getCreateOrganizationApiKeyUrl: () => getCreateOrganizationApiKeyUrl,
63
44
  getCreatePasswordUrl: () => getCreatePasswordUrl,
@@ -69,9 +50,12 @@ __export(fetch_exports, {
69
50
  getDeleteOrganizationDomainUrl: () => getDeleteOrganizationDomainUrl,
70
51
  getDeletePasskeyUrl: () => getDeletePasskeyUrl,
71
52
  getDeleteTotpFactorsUrl: () => getDeleteTotpFactorsUrl,
53
+ getDirectory: () => getDirectory,
72
54
  getGenerateAdminPortalLinkUrl: () => getGenerateAdminPortalLinkUrl,
55
+ getGetAuditLogStreamUrl: () => getGetAuditLogStreamUrl,
73
56
  getGetDataInstallationAuthorizationStatusUrl: () => getGetDataInstallationAuthorizationStatusUrl,
74
57
  getGetDataIntegrationAuthorizeUrlUrl: () => getGetDataIntegrationAuthorizeUrlUrl,
58
+ getGetDirectoryUrl: () => getGetDirectoryUrl,
75
59
  getInviteMemberUrl: () => getInviteMemberUrl,
76
60
  getListDirectoriesUrl: () => getListDirectoriesUrl,
77
61
  getListOrganizationApiKeyPermissionsUrl: () => getListOrganizationApiKeyPermissionsUrl,
@@ -143,33 +127,6 @@ const MemberActionsItem = {
143
127
  "revoke-invite": "revoke-invite",
144
128
  "revoke-membership": "revoke-membership"
145
129
  };
146
- const CreateTotpFactorResponseAuthenticationFactorAllOfObject = {
147
- authentication_factor: "authentication_factor"
148
- };
149
- const CreateTotpFactorResponseAuthenticationFactorAllOfType = {
150
- generic_otp: "generic_otp",
151
- sms: "sms",
152
- totp: "totp",
153
- webauthn: "webauthn"
154
- };
155
- const CreateTotpFactorResponseAuthenticationChallengeAllOfObject = {
156
- authentication_challenge: "authentication_challenge"
157
- };
158
- const AuthenticationInformationResponseDataVerificationMethodsMfaOneOfProvider = {
159
- MFA: "MFA"
160
- };
161
- const AuthenticationInformationResponseDataVerificationMethodsPasswordOneOfProvider = {
162
- Password: "Password"
163
- };
164
- const AuthenticationInformationResponseDataVerificationMethodsPasskeyOneOfProvider = {
165
- Passkey: "Passkey"
166
- };
167
- const SendVerificationResponseType = {
168
- EmailVerification: "EmailVerification"
169
- };
170
- const SettingsResponseObject = {
171
- settings: "settings"
172
- };
173
130
  const OrganizationDomainState = {
174
131
  Failed: "Failed",
175
132
  LegacyVerified: "LegacyVerified",
@@ -202,121 +159,6 @@ const SsoConnectionSessionJSONState = {
202
159
  ...SamlSessionState,
203
160
  ...OidcSessionState
204
161
  };
205
- const SsoConnectionAnyOfType = {
206
- AdfsSaml: "AdfsSaml",
207
- Auth0Saml: "Auth0Saml",
208
- AzureSaml: "AzureSaml",
209
- CasSaml: "CasSaml",
210
- ClassLinkSaml: "ClassLinkSaml",
211
- CloudflareSaml: "CloudflareSaml",
212
- CyberArkSaml: "CyberArkSaml",
213
- DuoSaml: "DuoSaml",
214
- GenericSaml: "GenericSaml",
215
- GoogleSaml: "GoogleSaml",
216
- JumpCloudSaml: "JumpCloudSaml",
217
- KeycloakSaml: "KeycloakSaml",
218
- LastPassSaml: "LastPassSaml",
219
- MiniOrangeSaml: "MiniOrangeSaml",
220
- NetIqSaml: "NetIqSaml",
221
- OktaSaml: "OktaSaml",
222
- OneLoginSaml: "OneLoginSaml",
223
- OracleSaml: "OracleSaml",
224
- PingFederateSaml: "PingFederateSaml",
225
- PingOneSaml: "PingOneSaml",
226
- RipplingSaml: "RipplingSaml",
227
- SalesforceSaml: "SalesforceSaml",
228
- ShibbolethGenericSaml: "ShibbolethGenericSaml",
229
- ShibbolethSaml: "ShibbolethSaml",
230
- SimpleSamlPhpSaml: "SimpleSamlPhpSaml",
231
- TestIdp: "TestIdp",
232
- VmWareSaml: "VmWareSaml"
233
- };
234
- const SsoConnectionAnyOfState = {
235
- Inactive: "Inactive",
236
- Validating: "Validating",
237
- Active: "Active",
238
- Deleting: "Deleting"
239
- };
240
- const SsoConnectionAnyOfProviderTag = {
241
- Saml: "Saml"
242
- };
243
- const SsoConnectionAnyOfEightAllOfState = {
244
- Inactive: "Inactive",
245
- Validating: "Validating",
246
- Active: "Active",
247
- Deleting: "Deleting"
248
- };
249
- const SsoConnectionAnyOfEightAllOfType = {
250
- AdpOidc: "AdpOidc",
251
- Auth0Migration: "Auth0Migration",
252
- CleverOidc: "CleverOidc",
253
- EntraIdOidc: "EntraIdOidc",
254
- GenericOidc: "GenericOidc",
255
- GoogleOidc: "GoogleOidc",
256
- OktaOidc: "OktaOidc",
257
- LoginGovOidc: "LoginGovOidc"
258
- };
259
- const SsoConnectionAnyOfEightAllOfProviderTag = {
260
- OpenIdConnect: "OpenIdConnect"
261
- };
262
- const DataInstallationAllOfObject = {
263
- data_installation: "data_installation",
264
- connected_account: "connected_account"
265
- };
266
- const DataInstallationAllOfState = {
267
- connected: "connected",
268
- needs_reauthorization: "needs_reauthorization"
269
- };
270
- const DataIntegrationObject = {
271
- data_integration: "data_integration"
272
- };
273
- const DataIntegrationIntegrationType = {
274
- asana: "asana",
275
- box: "box",
276
- "cal-dot-com": "cal-dot-com",
277
- calendly: "calendly",
278
- confluence: "confluence",
279
- dropbox: "dropbox",
280
- "frame-io": "frame-io",
281
- front: "front",
282
- github: "github",
283
- gitlab: "gitlab",
284
- gmail: "gmail",
285
- google: "google",
286
- "google-calendar": "google-calendar",
287
- "google-drive": "google-drive",
288
- helpscout: "helpscout",
289
- hubspot: "hubspot",
290
- intercom: "intercom",
291
- jira: "jira",
292
- linear: "linear",
293
- microsoft: "microsoft",
294
- "microsoft-onedrive": "microsoft-onedrive",
295
- "microsoft-onenote": "microsoft-onenote",
296
- "microsoft-outlook": "microsoft-outlook",
297
- "microsoft-outlook-calendar": "microsoft-outlook-calendar",
298
- "microsoft-sharepoint": "microsoft-sharepoint",
299
- "microsoft-teams": "microsoft-teams",
300
- "microsoft-todo": "microsoft-todo",
301
- notion: "notion",
302
- prefect: "prefect",
303
- "pydantic-logfire": "pydantic-logfire",
304
- salesforce: "salesforce",
305
- sentry: "sentry",
306
- slack: "slack",
307
- snowflake: "snowflake",
308
- stripe: "stripe",
309
- xero: "xero",
310
- zendesk: "zendesk"
311
- };
312
- const DataIntegrationOwnership = {
313
- userland_user: "userland_user",
314
- organization: "organization"
315
- };
316
- const DataIntegrationCredentialsType = {
317
- shared: "shared",
318
- custom: "custom"
319
- };
320
162
  const DirectoryType = {
321
163
  azure_scim_v20: "azure scim v2.0",
322
164
  bamboohr: "bamboohr",
@@ -352,7 +194,8 @@ const DirectoryState = {
352
194
  };
353
195
  const GenerateAdminPortalLinkIntent = {
354
196
  domain_verification: "domain_verification",
355
- sso: "sso"
197
+ sso: "sso",
198
+ log_streams: "log_streams"
356
199
  };
357
200
  const getCreateOrganizationApiKeyUrl = () => {
358
201
  return `https://api.workos.com/_widgets/ApiKeys/organization-api-keys`;
@@ -909,6 +752,22 @@ const verifyTotpFactor = async (verifyTotpFactorRequest, options) => {
909
752
  headers: res.headers
910
753
  };
911
754
  };
755
+ const getGetAuditLogStreamUrl = () => {
756
+ return `https://api.workos.com/_widgets/admin-portal/audit-log-stream`;
757
+ };
758
+ const getAuditLogStream = async (options) => {
759
+ const res = await fetch(getGetAuditLogStreamUrl(), {
760
+ ...options,
761
+ method: "GET"
762
+ });
763
+ const body = [204, 205, 304].includes(res.status) ? null : await res.text();
764
+ const data = body ? JSON.parse(body) : {};
765
+ return {
766
+ data,
767
+ status: res.status,
768
+ headers: res.headers
769
+ };
770
+ };
912
771
  const getGenerateAdminPortalLinkUrl = (params) => {
913
772
  const normalizedParams = new URLSearchParams();
914
773
  Object.entries(params || {}).forEach(([key, value]) => {
@@ -1012,6 +871,22 @@ const listDirectories = async (options) => {
1012
871
  headers: res.headers
1013
872
  };
1014
873
  };
874
+ const getGetDirectoryUrl = (directoryId) => {
875
+ return `https://api.workos.com/_widgets/directory-sync/directories/${directoryId}`;
876
+ };
877
+ const getDirectory = async (directoryId, options) => {
878
+ const res = await fetch(getGetDirectoryUrl(directoryId), {
879
+ ...options,
880
+ method: "GET"
881
+ });
882
+ const body = [204, 205, 304].includes(res.status) ? null : await res.text();
883
+ const data = body ? JSON.parse(body) : {};
884
+ return {
885
+ data,
886
+ status: res.status,
887
+ headers: res.headers
888
+ };
889
+ };
1015
890
  const getSettingsUrl = () => {
1016
891
  return `https://api.workos.com/_widgets/settings`;
1017
892
  };
@@ -1026,18 +901,6 @@ const settings = async (options) => {
1026
901
  };
1027
902
  // Annotate the CommonJS export names for ESM import in node:
1028
903
  0 && (module.exports = {
1029
- AuthenticationInformationResponseDataVerificationMethodsMfaOneOfProvider,
1030
- AuthenticationInformationResponseDataVerificationMethodsPasskeyOneOfProvider,
1031
- AuthenticationInformationResponseDataVerificationMethodsPasswordOneOfProvider,
1032
- CreateTotpFactorResponseAuthenticationChallengeAllOfObject,
1033
- CreateTotpFactorResponseAuthenticationFactorAllOfObject,
1034
- CreateTotpFactorResponseAuthenticationFactorAllOfType,
1035
- DataInstallationAllOfObject,
1036
- DataInstallationAllOfState,
1037
- DataIntegrationCredentialsType,
1038
- DataIntegrationIntegrationType,
1039
- DataIntegrationObject,
1040
- DataIntegrationOwnership,
1041
904
  DirectoryState,
1042
905
  DirectoryType,
1043
906
  DomainVerificationNameServer,
@@ -1047,14 +910,6 @@ const settings = async (options) => {
1047
910
  OidcSessionState,
1048
911
  OrganizationDomainState,
1049
912
  SamlSessionState,
1050
- SendVerificationResponseType,
1051
- SettingsResponseObject,
1052
- SsoConnectionAnyOfEightAllOfProviderTag,
1053
- SsoConnectionAnyOfEightAllOfState,
1054
- SsoConnectionAnyOfEightAllOfType,
1055
- SsoConnectionAnyOfProviderTag,
1056
- SsoConnectionAnyOfState,
1057
- SsoConnectionAnyOfType,
1058
913
  SsoConnectionSessionJSONState,
1059
914
  authenticationInformation,
1060
915
  createOrganizationApiKey,
@@ -1066,6 +921,7 @@ const settings = async (options) => {
1066
921
  deletePasskey,
1067
922
  deleteTotpFactors,
1068
923
  generateAdminPortalLink,
924
+ getAuditLogStream,
1069
925
  getAuthenticationInformationUrl,
1070
926
  getCreateOrganizationApiKeyUrl,
1071
927
  getCreatePasswordUrl,
@@ -1077,9 +933,12 @@ const settings = async (options) => {
1077
933
  getDeleteOrganizationDomainUrl,
1078
934
  getDeletePasskeyUrl,
1079
935
  getDeleteTotpFactorsUrl,
936
+ getDirectory,
1080
937
  getGenerateAdminPortalLinkUrl,
938
+ getGetAuditLogStreamUrl,
1081
939
  getGetDataInstallationAuthorizationStatusUrl,
1082
940
  getGetDataIntegrationAuthorizeUrlUrl,
941
+ getGetDirectoryUrl,
1083
942
  getInviteMemberUrl,
1084
943
  getListDirectoriesUrl,
1085
944
  getListOrganizationApiKeyPermissionsUrl,