@workos-inc/widgets 1.8.2 → 1.9.1

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 (113) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/dist/cjs/admin-portal-domain-verification.client.cjs.map +1 -1
  3. package/dist/cjs/admin-portal-sso-connection.client.cjs +4 -7
  4. package/dist/cjs/admin-portal-sso-connection.client.cjs.map +1 -1
  5. package/dist/cjs/api/api-provider.cjs.map +1 -1
  6. package/dist/cjs/api/api-provider.d.cts +1 -1
  7. package/dist/cjs/api/endpoint.cjs +741 -771
  8. package/dist/cjs/api/endpoint.cjs.map +1 -1
  9. package/dist/cjs/api/endpoint.d.cts +860 -813
  10. package/dist/cjs/directory-sync.client.cjs +156 -0
  11. package/dist/cjs/directory-sync.client.cjs.map +1 -0
  12. package/dist/cjs/directory-sync.client.d.cts +26 -0
  13. package/dist/cjs/experimental/api/fetch.cjs +327 -411
  14. package/dist/cjs/experimental/api/fetch.cjs.map +1 -1
  15. package/dist/cjs/experimental/api/fetch.d.cts +832 -798
  16. package/dist/cjs/experimental/api/react-query.cjs +747 -777
  17. package/dist/cjs/experimental/api/react-query.cjs.map +1 -1
  18. package/dist/cjs/experimental/api/react-query.d.cts +1378 -1263
  19. package/dist/cjs/experimental/api/swr.cjs +720 -742
  20. package/dist/cjs/experimental/api/swr.cjs.map +1 -1
  21. package/dist/cjs/experimental/api/swr.d.cts +1218 -1175
  22. package/dist/cjs/index.cjs +5 -0
  23. package/dist/cjs/index.cjs.map +1 -1
  24. package/dist/cjs/index.d.cts +2 -0
  25. package/dist/cjs/lib/add-mfa-dialog.cjs +18 -16
  26. package/dist/cjs/lib/add-mfa-dialog.cjs.map +1 -1
  27. package/dist/cjs/lib/admin-portal-sso-connection.cjs +0 -8
  28. package/dist/cjs/lib/admin-portal-sso-connection.cjs.map +1 -1
  29. package/dist/cjs/lib/admin-portal-sso-connection.d.cts +1 -2
  30. package/dist/cjs/lib/api-keys/api-keys-context.cjs +1 -1
  31. package/dist/cjs/lib/api-keys/api-keys-context.cjs.map +1 -1
  32. package/dist/cjs/lib/api-keys/api-keys-table.cjs +7 -5
  33. package/dist/cjs/lib/api-keys/api-keys-table.cjs.map +1 -1
  34. package/dist/cjs/lib/directory-sync.cjs +288 -0
  35. package/dist/cjs/lib/directory-sync.cjs.map +1 -0
  36. package/dist/cjs/lib/directory-sync.d.cts +72 -0
  37. package/dist/cjs/lib/identity-providers.cjs +57 -1
  38. package/dist/cjs/lib/identity-providers.cjs.map +1 -1
  39. package/dist/cjs/lib/identity-providers.d.cts +5 -3
  40. package/dist/cjs/lib/pipes.cjs +9 -9
  41. package/dist/cjs/lib/pipes.cjs.map +1 -1
  42. package/dist/cjs/lib/provider-icon.cjs.map +1 -1
  43. package/dist/cjs/lib/provider-icon.d.cts +2 -2
  44. package/dist/cjs/lib/reset-mfa-dialog.cjs +2 -1
  45. package/dist/cjs/lib/reset-mfa-dialog.cjs.map +1 -1
  46. package/dist/cjs/lib/use-permissions.cjs.map +1 -1
  47. package/dist/cjs/lib/use-permissions.d.cts +1 -1
  48. package/dist/cjs/lib/users-management-context.cjs +1 -1
  49. package/dist/cjs/lib/users-management-context.cjs.map +1 -1
  50. package/dist/cjs/lib/users-management.cjs +3 -3
  51. package/dist/cjs/lib/users-management.cjs.map +1 -1
  52. package/dist/cjs/lib/utils.cjs +9 -0
  53. package/dist/cjs/lib/utils.cjs.map +1 -1
  54. package/dist/cjs/lib/utils.d.cts +16 -2
  55. package/dist/cjs/workos-widgets.client.cjs +13 -1
  56. package/dist/cjs/workos-widgets.client.cjs.map +1 -1
  57. package/dist/esm/admin-portal-domain-verification.client.js +2 -2
  58. package/dist/esm/admin-portal-domain-verification.client.js.map +1 -1
  59. package/dist/esm/admin-portal-sso-connection.client.js +6 -9
  60. package/dist/esm/admin-portal-sso-connection.client.js.map +1 -1
  61. package/dist/esm/api/api-provider.d.ts +1 -1
  62. package/dist/esm/api/api-provider.js.map +1 -1
  63. package/dist/esm/api/endpoint.d.ts +860 -813
  64. package/dist/esm/api/endpoint.js +727 -751
  65. package/dist/esm/api/endpoint.js.map +1 -1
  66. package/dist/esm/directory-sync.client.d.ts +26 -0
  67. package/dist/esm/directory-sync.client.js +134 -0
  68. package/dist/esm/directory-sync.client.js.map +1 -0
  69. package/dist/esm/experimental/api/fetch.d.ts +832 -798
  70. package/dist/esm/experimental/api/fetch.js +319 -391
  71. package/dist/esm/experimental/api/fetch.js.map +1 -1
  72. package/dist/esm/experimental/api/react-query.d.ts +1378 -1263
  73. package/dist/esm/experimental/api/react-query.js +730 -757
  74. package/dist/esm/experimental/api/react-query.js.map +1 -1
  75. package/dist/esm/experimental/api/swr.d.ts +1218 -1175
  76. package/dist/esm/experimental/api/swr.js +706 -722
  77. package/dist/esm/experimental/api/swr.js.map +1 -1
  78. package/dist/esm/index.d.ts +2 -0
  79. package/dist/esm/index.js +6 -0
  80. package/dist/esm/index.js.map +1 -1
  81. package/dist/esm/lib/add-mfa-dialog.js +18 -16
  82. package/dist/esm/lib/add-mfa-dialog.js.map +1 -1
  83. package/dist/esm/lib/admin-portal-sso-connection.d.ts +1 -2
  84. package/dist/esm/lib/admin-portal-sso-connection.js +0 -8
  85. package/dist/esm/lib/admin-portal-sso-connection.js.map +1 -1
  86. package/dist/esm/lib/api-keys/api-keys-context.js +1 -1
  87. package/dist/esm/lib/api-keys/api-keys-context.js.map +1 -1
  88. package/dist/esm/lib/api-keys/api-keys-table.js +7 -5
  89. package/dist/esm/lib/api-keys/api-keys-table.js.map +1 -1
  90. package/dist/esm/lib/directory-sync.d.ts +72 -0
  91. package/dist/esm/lib/directory-sync.js +259 -0
  92. package/dist/esm/lib/directory-sync.js.map +1 -0
  93. package/dist/esm/lib/identity-providers.d.ts +5 -3
  94. package/dist/esm/lib/identity-providers.js +55 -1
  95. package/dist/esm/lib/identity-providers.js.map +1 -1
  96. package/dist/esm/lib/pipes.js +9 -10
  97. package/dist/esm/lib/pipes.js.map +1 -1
  98. package/dist/esm/lib/provider-icon.d.ts +2 -2
  99. package/dist/esm/lib/provider-icon.js.map +1 -1
  100. package/dist/esm/lib/reset-mfa-dialog.js +2 -1
  101. package/dist/esm/lib/reset-mfa-dialog.js.map +1 -1
  102. package/dist/esm/lib/use-permissions.d.ts +1 -1
  103. package/dist/esm/lib/use-permissions.js.map +1 -1
  104. package/dist/esm/lib/users-management-context.js +1 -1
  105. package/dist/esm/lib/users-management-context.js.map +1 -1
  106. package/dist/esm/lib/users-management.js +5 -4
  107. package/dist/esm/lib/users-management.js.map +1 -1
  108. package/dist/esm/lib/utils.d.ts +16 -2
  109. package/dist/esm/lib/utils.js +8 -0
  110. package/dist/esm/lib/utils.js.map +1 -1
  111. package/dist/esm/workos-widgets.client.js +13 -1
  112. package/dist/esm/workos-widgets.client.js.map +1 -1
  113. package/package.json +2 -2
@@ -11,33 +11,6 @@ const MemberActionsItem = {
11
11
  "revoke-invite": "revoke-invite",
12
12
  "revoke-membership": "revoke-membership"
13
13
  };
14
- const CreateTotpFactorResponseAuthenticationFactorAllOfObject = {
15
- authentication_factor: "authentication_factor"
16
- };
17
- const CreateTotpFactorResponseAuthenticationFactorAllOfType = {
18
- generic_otp: "generic_otp",
19
- sms: "sms",
20
- totp: "totp",
21
- webauthn: "webauthn"
22
- };
23
- const CreateTotpFactorResponseAuthenticationChallengeAllOfObject = {
24
- authentication_challenge: "authentication_challenge"
25
- };
26
- const AuthenticationInformationResponseDataVerificationMethodsMfaProvider = {
27
- MFA: "MFA"
28
- };
29
- const AuthenticationInformationResponseDataVerificationMethodsPasswordProvider = {
30
- Password: "Password"
31
- };
32
- const AuthenticationInformationResponseDataVerificationMethodsPasskeyProvider = {
33
- Passkey: "Passkey"
34
- };
35
- const SendVerificationResponseType = {
36
- EmailVerification: "EmailVerification"
37
- };
38
- const SettingsResponseObject = {
39
- settings: "settings"
40
- };
41
14
  const OrganizationDomainState = {
42
15
  Failed: "Failed",
43
16
  LegacyVerified: "LegacyVerified",
@@ -70,126 +43,63 @@ const SsoConnectionSessionJSONState = {
70
43
  ...SamlSessionState,
71
44
  ...OidcSessionState
72
45
  };
73
- const SsoConnectionAnyOfType = {
74
- AdfsSaml: "AdfsSaml",
75
- Auth0Saml: "Auth0Saml",
76
- AzureSaml: "AzureSaml",
77
- CasSaml: "CasSaml",
78
- ClassLinkSaml: "ClassLinkSaml",
79
- CloudflareSaml: "CloudflareSaml",
80
- CyberArkSaml: "CyberArkSaml",
81
- DuoSaml: "DuoSaml",
82
- GenericSaml: "GenericSaml",
83
- GoogleSaml: "GoogleSaml",
84
- JumpCloudSaml: "JumpCloudSaml",
85
- KeycloakSaml: "KeycloakSaml",
86
- LastPassSaml: "LastPassSaml",
87
- MiniOrangeSaml: "MiniOrangeSaml",
88
- NetIqSaml: "NetIqSaml",
89
- OktaSaml: "OktaSaml",
90
- OneLoginSaml: "OneLoginSaml",
91
- OracleSaml: "OracleSaml",
92
- PingFederateSaml: "PingFederateSaml",
93
- PingOneSaml: "PingOneSaml",
94
- RipplingSaml: "RipplingSaml",
95
- SalesforceSaml: "SalesforceSaml",
96
- ShibbolethGenericSaml: "ShibbolethGenericSaml",
97
- ShibbolethSaml: "ShibbolethSaml",
98
- SimpleSamlPhpSaml: "SimpleSamlPhpSaml",
99
- TestIdp: "TestIdp",
100
- VmWareSaml: "VmWareSaml"
101
- };
102
- const SsoConnectionAnyOfState = {
103
- Inactive: "Inactive",
104
- Validating: "Validating",
105
- Active: "Active",
106
- Deleting: "Deleting"
107
- };
108
- const SsoConnectionAnyOfProviderTag = {
109
- Saml: "Saml"
110
- };
111
- const SsoConnectionAnyOfEightAllOfState = {
112
- Inactive: "Inactive",
113
- Validating: "Validating",
114
- Active: "Active",
115
- Deleting: "Deleting"
116
- };
117
- const SsoConnectionAnyOfEightAllOfType = {
118
- AdpOidc: "AdpOidc",
119
- Auth0Migration: "Auth0Migration",
120
- CleverOidc: "CleverOidc",
121
- EntraIdOidc: "EntraIdOidc",
122
- GenericOidc: "GenericOidc",
123
- GoogleOidc: "GoogleOidc",
124
- OktaOidc: "OktaOidc",
125
- LoginGovOidc: "LoginGovOidc"
126
- };
127
- const SsoConnectionAnyOfEightAllOfProviderTag = {
128
- OpenIdConnect: "OpenIdConnect"
129
- };
130
- const DataInstallationObject = {
131
- data_installation: "data_installation",
132
- connected_account: "connected_account"
133
- };
134
- const DataInstallationState = {
135
- connected: "connected",
136
- needs_reauthorization: "needs_reauthorization"
137
- };
138
- const DataIntegrationObject = {
139
- data_integration: "data_integration"
140
- };
141
- const DataIntegrationIntegrationType = {
142
- asana: "asana",
143
- box: "box",
144
- "cal-dot-com": "cal-dot-com",
145
- calendly: "calendly",
146
- confluence: "confluence",
147
- dropbox: "dropbox",
148
- "frame-io": "frame-io",
149
- front: "front",
150
- github: "github",
151
- gitlab: "gitlab",
152
- gmail: "gmail",
153
- google: "google",
154
- "google-calendar": "google-calendar",
155
- "google-drive": "google-drive",
156
- helpscout: "helpscout",
157
- hubspot: "hubspot",
158
- intercom: "intercom",
159
- jira: "jira",
160
- linear: "linear",
161
- microsoft: "microsoft",
162
- "microsoft-onedrive": "microsoft-onedrive",
163
- "microsoft-onenote": "microsoft-onenote",
164
- "microsoft-outlook": "microsoft-outlook",
165
- "microsoft-outlook-calendar": "microsoft-outlook-calendar",
166
- "microsoft-sharepoint": "microsoft-sharepoint",
167
- "microsoft-teams": "microsoft-teams",
168
- "microsoft-todo": "microsoft-todo",
169
- notion: "notion",
170
- prefect: "prefect",
171
- "pydantic-logfire": "pydantic-logfire",
172
- salesforce: "salesforce",
173
- sentry: "sentry",
174
- slack: "slack",
175
- snowflake: "snowflake",
176
- stripe: "stripe",
177
- xero: "xero",
178
- zendesk: "zendesk"
179
- };
180
- const DataIntegrationOwnership = {
181
- userland_user: "userland_user",
182
- organization: "organization"
183
- };
184
- const DataIntegrationCredentialsType = {
185
- shared: "shared",
186
- custom: "custom"
46
+ const DirectoryType = {
47
+ azure_scim_v20: "azure scim v2.0",
48
+ bamboohr: "bamboohr",
49
+ breathe_hr: "breathe hr",
50
+ cezanne_hr: "cezanne hr",
51
+ cyberark_scim_v20: "cyberark scim v2.0",
52
+ fourth_hr: "fourth hr",
53
+ generic_scim_v20: "generic scim v2.0",
54
+ gsuite_directory: "gsuite directory",
55
+ gusto: "gusto",
56
+ hibob: "hibob",
57
+ jump_cloud_scim_v20: "jump cloud scim v2.0",
58
+ okta_scim_v20: "okta scim v2.0",
59
+ onelogin_scim_v20: "onelogin scim v2.0",
60
+ people_hr: "people hr",
61
+ personio: "personio",
62
+ pingfederate_scim_v20: "pingfederate scim v2.0",
63
+ rippling: "rippling",
64
+ rippling_scim_v20: "rippling scim v2.0",
65
+ s3: "s3",
66
+ sailpoint_scim_v20: "sailpoint scim v2.0",
67
+ sftp: "sftp",
68
+ sftp_workday: "sftp workday",
69
+ workday: "workday"
70
+ };
71
+ const DirectoryState = {
72
+ requires_type: "requires_type",
73
+ linked: "linked",
74
+ validating: "validating",
75
+ invalid_credentials: "invalid_credentials",
76
+ unlinked: "unlinked",
77
+ deleting: "deleting"
187
78
  };
188
79
  const GenerateAdminPortalLinkIntent = {
189
80
  domain_verification: "domain_verification",
190
- sso: "sso"
81
+ sso: "sso",
82
+ log_streams: "log_streams"
191
83
  };
192
- const getMembersUrl = (params) => {
84
+ const getCreateOrganizationApiKeyUrl = () => {
85
+ return `https://api.workos.com/_widgets/ApiKeys/organization-api-keys`;
86
+ };
87
+ const createOrganizationApiKey = async (createOrganizationApiKeyRequest, options) => {
88
+ const res = await fetch(getCreateOrganizationApiKeyUrl(), {
89
+ ...options,
90
+ method: "POST",
91
+ headers: { "Content-Type": "application/json", ...options?.headers },
92
+ body: JSON.stringify(createOrganizationApiKeyRequest)
93
+ });
94
+ const body = [204, 205, 304].includes(res.status) ? null : await res.text();
95
+ const data = body ? JSON.parse(body) : {};
96
+ return {
97
+ data,
98
+ status: res.status,
99
+ headers: res.headers
100
+ };
101
+ };
102
+ const getListOrganizationApiKeysUrl = (params) => {
193
103
  const normalizedParams = new URLSearchParams();
194
104
  Object.entries(params || {}).forEach(([key, value]) => {
195
105
  if (value !== void 0) {
@@ -197,36 +107,51 @@ const getMembersUrl = (params) => {
197
107
  }
198
108
  });
199
109
  const stringifiedParams = normalizedParams.toString();
200
- return stringifiedParams.length > 0 ? `https://api.workos.com/_widgets/UserManagement/members?${stringifiedParams}` : `https://api.workos.com/_widgets/UserManagement/members`;
110
+ return stringifiedParams.length > 0 ? `https://api.workos.com/_widgets/ApiKeys/organization-api-keys?${stringifiedParams}` : `https://api.workos.com/_widgets/ApiKeys/organization-api-keys`;
201
111
  };
202
- const members = async (params, options) => {
203
- const res = await fetch(getMembersUrl(params), {
112
+ const listOrganizationApiKeys = async (params, options) => {
113
+ const res = await fetch(getListOrganizationApiKeysUrl(params), {
204
114
  ...options,
205
115
  method: "GET"
206
116
  });
207
117
  const body = [204, 205, 304].includes(res.status) ? null : await res.text();
208
118
  const data = body ? JSON.parse(body) : {};
209
- return { data, status: res.status, headers: res.headers };
119
+ return {
120
+ data,
121
+ status: res.status,
122
+ headers: res.headers
123
+ };
210
124
  };
211
- const getRolesUrl = () => {
212
- return `https://api.workos.com/_widgets/UserManagement/roles`;
125
+ const getListOrganizationApiKeyPermissionsUrl = (params) => {
126
+ const normalizedParams = new URLSearchParams();
127
+ Object.entries(params || {}).forEach(([key, value]) => {
128
+ if (value !== void 0) {
129
+ normalizedParams.append(key, value === null ? "null" : value.toString());
130
+ }
131
+ });
132
+ const stringifiedParams = normalizedParams.toString();
133
+ return stringifiedParams.length > 0 ? `https://api.workos.com/_widgets/ApiKeys/permissions?${stringifiedParams}` : `https://api.workos.com/_widgets/ApiKeys/permissions`;
213
134
  };
214
- const roles = async (options) => {
215
- const res = await fetch(getRolesUrl(), {
135
+ const listOrganizationApiKeyPermissions = async (params, options) => {
136
+ const res = await fetch(getListOrganizationApiKeyPermissionsUrl(params), {
216
137
  ...options,
217
138
  method: "GET"
218
139
  });
219
140
  const body = [204, 205, 304].includes(res.status) ? null : await res.text();
220
141
  const data = body ? JSON.parse(body) : {};
221
- return { data, status: res.status, headers: res.headers };
142
+ return {
143
+ data,
144
+ status: res.status,
145
+ headers: res.headers
146
+ };
222
147
  };
223
- const getRolesAndConfigUrl = () => {
224
- return `https://api.workos.com/_widgets/UserManagement/roles-and-config`;
148
+ const getDeleteOrganizationApiKeyUrl = (apiKeyId) => {
149
+ return `https://api.workos.com/_widgets/ApiKeys/${apiKeyId}`;
225
150
  };
226
- const rolesAndConfig = async (options) => {
227
- const res = await fetch(getRolesAndConfigUrl(), {
151
+ const deleteOrganizationApiKey = async (apiKeyId, options) => {
152
+ const res = await fetch(getDeleteOrganizationApiKeyUrl(apiKeyId), {
228
153
  ...options,
229
- method: "GET"
154
+ method: "DELETE"
230
155
  });
231
156
  const body = [204, 205, 304].includes(res.status) ? null : await res.text();
232
157
  const data = body ? JSON.parse(body) : {};
@@ -236,15 +161,13 @@ const rolesAndConfig = async (options) => {
236
161
  headers: res.headers
237
162
  };
238
163
  };
239
- const getInviteMemberUrl = () => {
240
- return `https://api.workos.com/_widgets/UserManagement/invite-user`;
164
+ const getDeleteDataInstallationUrl = (installationId) => {
165
+ return `https://api.workos.com/_widgets/DataIntegrations/installations/${installationId}`;
241
166
  };
242
- const inviteMember = async (inviteMemberBody, options) => {
243
- const res = await fetch(getInviteMemberUrl(), {
167
+ const deleteDataInstallation = async (installationId, options) => {
168
+ const res = await fetch(getDeleteDataInstallationUrl(installationId), {
244
169
  ...options,
245
- method: "POST",
246
- headers: { "Content-Type": "application/json", ...options?.headers },
247
- body: JSON.stringify(inviteMemberBody)
170
+ method: "DELETE"
248
171
  });
249
172
  const body = [204, 205, 304].includes(res.status) ? null : await res.text();
250
173
  const data = body ? JSON.parse(body) : {};
@@ -254,13 +177,13 @@ const inviteMember = async (inviteMemberBody, options) => {
254
177
  headers: res.headers
255
178
  };
256
179
  };
257
- const getResendInviteUrl = (userId) => {
258
- return `https://api.workos.com/_widgets/UserManagement/invites/${userId}/resend`;
180
+ const getMyDataIntegrationsUrl = () => {
181
+ return `https://api.workos.com/_widgets/DataIntegrations/mine`;
259
182
  };
260
- const resendInvite = async (userId, options) => {
261
- const res = await fetch(getResendInviteUrl(userId), {
183
+ const myDataIntegrations = async (options) => {
184
+ const res = await fetch(getMyDataIntegrationsUrl(), {
262
185
  ...options,
263
- method: "POST"
186
+ method: "GET"
264
187
  });
265
188
  const body = [204, 205, 304].includes(res.status) ? null : await res.text();
266
189
  const data = body ? JSON.parse(body) : {};
@@ -270,14 +193,17 @@ const resendInvite = async (userId, options) => {
270
193
  headers: res.headers
271
194
  };
272
195
  };
273
- const getRevokeInviteUrl = (userId) => {
274
- return `https://api.workos.com/_widgets/UserManagement/invites/${userId}`;
196
+ const getGetDataInstallationAuthorizationStatusUrl = (dataIntegrationId, state) => {
197
+ return `https://api.workos.com/_widgets/DataIntegrations/${dataIntegrationId}/authorization-status/${state}`;
275
198
  };
276
- const revokeInvite = async (userId, options) => {
277
- const res = await fetch(getRevokeInviteUrl(userId), {
278
- ...options,
279
- method: "DELETE"
280
- });
199
+ const getDataInstallationAuthorizationStatus = async (dataIntegrationId, state, options) => {
200
+ const res = await fetch(
201
+ getGetDataInstallationAuthorizationStatusUrl(dataIntegrationId, state),
202
+ {
203
+ ...options,
204
+ method: "GET"
205
+ }
206
+ );
281
207
  const body = [204, 205, 304].includes(res.status) ? null : await res.text();
282
208
  const data = body ? JSON.parse(body) : {};
283
209
  return {
@@ -286,13 +212,20 @@ const revokeInvite = async (userId, options) => {
286
212
  headers: res.headers
287
213
  };
288
214
  };
289
- const getRemoveMemberUrl = (userId) => {
290
- return `https://api.workos.com/_widgets/UserManagement/members/${userId}`;
215
+ const getGetDataIntegrationAuthorizeUrlUrl = (slug, params) => {
216
+ const normalizedParams = new URLSearchParams();
217
+ Object.entries(params || {}).forEach(([key, value]) => {
218
+ if (value !== void 0) {
219
+ normalizedParams.append(key, value === null ? "null" : value.toString());
220
+ }
221
+ });
222
+ const stringifiedParams = normalizedParams.toString();
223
+ return stringifiedParams.length > 0 ? `https://api.workos.com/_widgets/DataIntegrations/${slug}/authorize?${stringifiedParams}` : `https://api.workos.com/_widgets/DataIntegrations/${slug}/authorize`;
291
224
  };
292
- const removeMember = async (userId, options) => {
293
- const res = await fetch(getRemoveMemberUrl(userId), {
225
+ const getDataIntegrationAuthorizeUrl = async (slug, params, options) => {
226
+ const res = await fetch(getGetDataIntegrationAuthorizeUrlUrl(slug, params), {
294
227
  ...options,
295
- method: "DELETE"
228
+ method: "GET"
296
229
  });
297
230
  const body = [204, 205, 304].includes(res.status) ? null : await res.text();
298
231
  const data = body ? JSON.parse(body) : {};
@@ -302,15 +235,15 @@ const removeMember = async (userId, options) => {
302
235
  headers: res.headers
303
236
  };
304
237
  };
305
- const getUpdateMemberUrl = (userId) => {
306
- return `https://api.workos.com/_widgets/UserManagement/members/${userId}`;
238
+ const getInviteMemberUrl = () => {
239
+ return `https://api.workos.com/_widgets/UserManagement/invite-user`;
307
240
  };
308
- const updateMember = async (userId, updateMemberBody, options) => {
309
- const res = await fetch(getUpdateMemberUrl(userId), {
241
+ const inviteMember = async (inviteMemberBody, options) => {
242
+ const res = await fetch(getInviteMemberUrl(), {
310
243
  ...options,
311
244
  method: "POST",
312
245
  headers: { "Content-Type": "application/json", ...options?.headers },
313
- body: JSON.stringify(updateMemberBody)
246
+ body: JSON.stringify(inviteMemberBody)
314
247
  });
315
248
  const body = [204, 205, 304].includes(res.status) ? null : await res.text();
316
249
  const data = body ? JSON.parse(body) : {};
@@ -320,13 +253,13 @@ const updateMember = async (userId, updateMemberBody, options) => {
320
253
  headers: res.headers
321
254
  };
322
255
  };
323
- const getOrganizationsUrl = () => {
324
- return `https://api.workos.com/_widgets/UserManagement/organizations`;
256
+ const getRevokeInviteUrl = (userId) => {
257
+ return `https://api.workos.com/_widgets/UserManagement/invites/${userId}`;
325
258
  };
326
- const organizations = async (options) => {
327
- const res = await fetch(getOrganizationsUrl(), {
259
+ const revokeInvite = async (userId, options) => {
260
+ const res = await fetch(getRevokeInviteUrl(userId), {
328
261
  ...options,
329
- method: "GET"
262
+ method: "DELETE"
330
263
  });
331
264
  const body = [204, 205, 304].includes(res.status) ? null : await res.text();
332
265
  const data = body ? JSON.parse(body) : {};
@@ -336,39 +269,48 @@ const organizations = async (options) => {
336
269
  headers: res.headers
337
270
  };
338
271
  };
339
- const getMeUrl = () => {
340
- return `https://api.workos.com/_widgets/UserProfile/me`;
272
+ const getResendInviteUrl = (userId) => {
273
+ return `https://api.workos.com/_widgets/UserManagement/invites/${userId}/resend`;
341
274
  };
342
- const me = async (options) => {
343
- const res = await fetch(getMeUrl(), {
275
+ const resendInvite = async (userId, options) => {
276
+ const res = await fetch(getResendInviteUrl(userId), {
344
277
  ...options,
345
- method: "GET"
278
+ method: "POST"
346
279
  });
347
280
  const body = [204, 205, 304].includes(res.status) ? null : await res.text();
348
281
  const data = body ? JSON.parse(body) : {};
349
- return { data, status: res.status, headers: res.headers };
282
+ return {
283
+ data,
284
+ status: res.status,
285
+ headers: res.headers
286
+ };
350
287
  };
351
- const getUpdateMeUrl = () => {
352
- return `https://api.workos.com/_widgets/UserProfile/me`;
288
+ const getMembersUrl = (params) => {
289
+ const normalizedParams = new URLSearchParams();
290
+ Object.entries(params || {}).forEach(([key, value]) => {
291
+ if (value !== void 0) {
292
+ normalizedParams.append(key, value === null ? "null" : value.toString());
293
+ }
294
+ });
295
+ const stringifiedParams = normalizedParams.toString();
296
+ return stringifiedParams.length > 0 ? `https://api.workos.com/_widgets/UserManagement/members?${stringifiedParams}` : `https://api.workos.com/_widgets/UserManagement/members`;
353
297
  };
354
- const updateMe = async (updateMeBody, options) => {
355
- const res = await fetch(getUpdateMeUrl(), {
298
+ const members = async (params, options) => {
299
+ const res = await fetch(getMembersUrl(params), {
356
300
  ...options,
357
- method: "POST",
358
- headers: { "Content-Type": "application/json", ...options?.headers },
359
- body: JSON.stringify(updateMeBody)
301
+ method: "GET"
360
302
  });
361
303
  const body = [204, 205, 304].includes(res.status) ? null : await res.text();
362
304
  const data = body ? JSON.parse(body) : {};
363
305
  return { data, status: res.status, headers: res.headers };
364
306
  };
365
- const getCreateTotpFactorUrl = () => {
366
- return `https://api.workos.com/_widgets/UserProfile/create-totp-factor`;
307
+ const getRemoveMemberUrl = (userId) => {
308
+ return `https://api.workos.com/_widgets/UserManagement/members/${userId}`;
367
309
  };
368
- const createTotpFactor = async (options) => {
369
- const res = await fetch(getCreateTotpFactorUrl(), {
310
+ const removeMember = async (userId, options) => {
311
+ const res = await fetch(getRemoveMemberUrl(userId), {
370
312
  ...options,
371
- method: "POST"
313
+ method: "DELETE"
372
314
  });
373
315
  const body = [204, 205, 304].includes(res.status) ? null : await res.text();
374
316
  const data = body ? JSON.parse(body) : {};
@@ -378,15 +320,15 @@ const createTotpFactor = async (options) => {
378
320
  headers: res.headers
379
321
  };
380
322
  };
381
- const getVerifyTotpFactorUrl = () => {
382
- return `https://api.workos.com/_widgets/UserProfile/verify-totp-factor`;
323
+ const getUpdateMemberUrl = (userId) => {
324
+ return `https://api.workos.com/_widgets/UserManagement/members/${userId}`;
383
325
  };
384
- const verifyTotpFactor = async (verifyTotpFactorRequest, options) => {
385
- const res = await fetch(getVerifyTotpFactorUrl(), {
326
+ const updateMember = async (userId, updateMemberBody, options) => {
327
+ const res = await fetch(getUpdateMemberUrl(userId), {
386
328
  ...options,
387
329
  method: "POST",
388
330
  headers: { "Content-Type": "application/json", ...options?.headers },
389
- body: JSON.stringify(verifyTotpFactorRequest)
331
+ body: JSON.stringify(updateMemberBody)
390
332
  });
391
333
  const body = [204, 205, 304].includes(res.status) ? null : await res.text();
392
334
  const data = body ? JSON.parse(body) : {};
@@ -396,13 +338,13 @@ const verifyTotpFactor = async (verifyTotpFactorRequest, options) => {
396
338
  headers: res.headers
397
339
  };
398
340
  };
399
- const getDeleteTotpFactorsUrl = () => {
400
- return `https://api.workos.com/_widgets/UserProfile/totp-factors`;
341
+ const getOrganizationsUrl = () => {
342
+ return `https://api.workos.com/_widgets/UserManagement/organizations`;
401
343
  };
402
- const deleteTotpFactors = async (options) => {
403
- const res = await fetch(getDeleteTotpFactorsUrl(), {
344
+ const organizations = async (options) => {
345
+ const res = await fetch(getOrganizationsUrl(), {
404
346
  ...options,
405
- method: "DELETE"
347
+ method: "GET"
406
348
  });
407
349
  const body = [204, 205, 304].includes(res.status) ? null : await res.text();
408
350
  const data = body ? JSON.parse(body) : {};
@@ -412,31 +354,25 @@ const deleteTotpFactors = async (options) => {
412
354
  headers: res.headers
413
355
  };
414
356
  };
415
- const getAuthenticationInformationUrl = () => {
416
- return `https://api.workos.com/_widgets/UserProfile/authentication-information`;
357
+ const getRolesUrl = () => {
358
+ return `https://api.workos.com/_widgets/UserManagement/roles`;
417
359
  };
418
- const authenticationInformation = async (options) => {
419
- const res = await fetch(getAuthenticationInformationUrl(), {
360
+ const roles = async (options) => {
361
+ const res = await fetch(getRolesUrl(), {
420
362
  ...options,
421
363
  method: "GET"
422
364
  });
423
365
  const body = [204, 205, 304].includes(res.status) ? null : await res.text();
424
366
  const data = body ? JSON.parse(body) : {};
425
- return {
426
- data,
427
- status: res.status,
428
- headers: res.headers
429
- };
367
+ return { data, status: res.status, headers: res.headers };
430
368
  };
431
- const getCreatePasswordUrl = () => {
432
- return `https://api.workos.com/_widgets/UserProfile/create-password`;
369
+ const getRolesAndConfigUrl = () => {
370
+ return `https://api.workos.com/_widgets/UserManagement/roles-and-config`;
433
371
  };
434
- const createPassword = async (createPasswordRequest, options) => {
435
- const res = await fetch(getCreatePasswordUrl(), {
372
+ const rolesAndConfig = async (options) => {
373
+ const res = await fetch(getRolesAndConfigUrl(), {
436
374
  ...options,
437
- method: "POST",
438
- headers: { "Content-Type": "application/json", ...options?.headers },
439
- body: JSON.stringify(createPasswordRequest)
375
+ method: "GET"
440
376
  });
441
377
  const body = [204, 205, 304].includes(res.status) ? null : await res.text();
442
378
  const data = body ? JSON.parse(body) : {};
@@ -446,15 +382,13 @@ const createPassword = async (createPasswordRequest, options) => {
446
382
  headers: res.headers
447
383
  };
448
384
  };
449
- const getUpdatePasswordUrl = () => {
450
- return `https://api.workos.com/_widgets/UserProfile/update-password`;
385
+ const getAuthenticationInformationUrl = () => {
386
+ return `https://api.workos.com/_widgets/UserProfile/authentication-information`;
451
387
  };
452
- const updatePassword = async (updatePasswordRequest, options) => {
453
- const res = await fetch(getUpdatePasswordUrl(), {
388
+ const authenticationInformation = async (options) => {
389
+ const res = await fetch(getAuthenticationInformationUrl(), {
454
390
  ...options,
455
- method: "POST",
456
- headers: { "Content-Type": "application/json", ...options?.headers },
457
- body: JSON.stringify(updatePasswordRequest)
391
+ method: "GET"
458
392
  });
459
393
  const body = [204, 205, 304].includes(res.status) ? null : await res.text();
460
394
  const data = body ? JSON.parse(body) : {};
@@ -464,15 +398,15 @@ const updatePassword = async (updatePasswordRequest, options) => {
464
398
  headers: res.headers
465
399
  };
466
400
  };
467
- const getRevokeAllSessionsUrl = () => {
468
- return `https://api.workos.com/_widgets/UserProfile/sessions/revoke-all`;
401
+ const getCreatePasswordUrl = () => {
402
+ return `https://api.workos.com/_widgets/UserProfile/create-password`;
469
403
  };
470
- const revokeAllSessions = async (revokeAllSessionsRequest, options) => {
471
- const res = await fetch(getRevokeAllSessionsUrl(), {
404
+ const createPassword = async (createPasswordRequest, options) => {
405
+ const res = await fetch(getCreatePasswordUrl(), {
472
406
  ...options,
473
- method: "DELETE",
407
+ method: "POST",
474
408
  headers: { "Content-Type": "application/json", ...options?.headers },
475
- body: JSON.stringify(revokeAllSessionsRequest)
409
+ body: JSON.stringify(createPasswordRequest)
476
410
  });
477
411
  const body = [204, 205, 304].includes(res.status) ? null : await res.text();
478
412
  const data = body ? JSON.parse(body) : {};
@@ -482,13 +416,13 @@ const revokeAllSessions = async (revokeAllSessionsRequest, options) => {
482
416
  headers: res.headers
483
417
  };
484
418
  };
485
- const getRevokeSessionUrl = (sessionId) => {
486
- return `https://api.workos.com/_widgets/UserProfile/sessions/revoke/${sessionId}`;
419
+ const getCreateTotpFactorUrl = () => {
420
+ return `https://api.workos.com/_widgets/UserProfile/create-totp-factor`;
487
421
  };
488
- const revokeSession = async (sessionId, options) => {
489
- const res = await fetch(getRevokeSessionUrl(sessionId), {
422
+ const createTotpFactor = async (options) => {
423
+ const res = await fetch(getCreateTotpFactorUrl(), {
490
424
  ...options,
491
- method: "DELETE"
425
+ method: "POST"
492
426
  });
493
427
  const body = [204, 205, 304].includes(res.status) ? null : await res.text();
494
428
  const data = body ? JSON.parse(body) : {};
@@ -498,11 +432,11 @@ const revokeSession = async (sessionId, options) => {
498
432
  headers: res.headers
499
433
  };
500
434
  };
501
- const getSessionsUrl = () => {
502
- return `https://api.workos.com/_widgets/UserProfile/sessions`;
435
+ const getMeUrl = () => {
436
+ return `https://api.workos.com/_widgets/UserProfile/me`;
503
437
  };
504
- const sessions = async (options) => {
505
- const res = await fetch(getSessionsUrl(), {
438
+ const me = async (options) => {
439
+ const res = await fetch(getMeUrl(), {
506
440
  ...options,
507
441
  method: "GET"
508
442
  });
@@ -510,31 +444,15 @@ const sessions = async (options) => {
510
444
  const data = body ? JSON.parse(body) : {};
511
445
  return { data, status: res.status, headers: res.headers };
512
446
  };
513
- const getSendVerificationUrl = () => {
514
- return `https://api.workos.com/_widgets/UserProfile/send-verification`;
515
- };
516
- const sendVerification = async (options) => {
517
- const res = await fetch(getSendVerificationUrl(), {
518
- ...options,
519
- method: "POST"
520
- });
521
- const body = [204, 205, 304].includes(res.status) ? null : await res.text();
522
- const data = body ? JSON.parse(body) : {};
523
- return {
524
- data,
525
- status: res.status,
526
- headers: res.headers
527
- };
528
- };
529
- const getVerifyUrl = () => {
530
- return `https://api.workos.com/_widgets/UserProfile/verify`;
447
+ const getUpdateMeUrl = () => {
448
+ return `https://api.workos.com/_widgets/UserProfile/me`;
531
449
  };
532
- const verify = async (verifyRequest, options) => {
533
- const res = await fetch(getVerifyUrl(), {
450
+ const updateMe = async (updateMeBody, options) => {
451
+ const res = await fetch(getUpdateMeUrl(), {
534
452
  ...options,
535
453
  method: "POST",
536
454
  headers: { "Content-Type": "application/json", ...options?.headers },
537
- body: JSON.stringify(verifyRequest)
455
+ body: JSON.stringify(updateMeBody)
538
456
  });
539
457
  const body = [204, 205, 304].includes(res.status) ? null : await res.text();
540
458
  const data = body ? JSON.parse(body) : {};
@@ -590,11 +508,27 @@ const deletePasskey = async (passkeyId, options) => {
590
508
  headers: res.headers
591
509
  };
592
510
  };
593
- const getSettingsUrl = () => {
594
- return `https://api.workos.com/_widgets/settings`;
511
+ const getSendVerificationUrl = () => {
512
+ return `https://api.workos.com/_widgets/UserProfile/send-verification`;
595
513
  };
596
- const settings = async (options) => {
597
- const res = await fetch(getSettingsUrl(), {
514
+ const sendVerification = async (options) => {
515
+ const res = await fetch(getSendVerificationUrl(), {
516
+ ...options,
517
+ method: "POST"
518
+ });
519
+ const body = [204, 205, 304].includes(res.status) ? null : await res.text();
520
+ const data = body ? JSON.parse(body) : {};
521
+ return {
522
+ data,
523
+ status: res.status,
524
+ headers: res.headers
525
+ };
526
+ };
527
+ const getSessionsUrl = () => {
528
+ return `https://api.workos.com/_widgets/UserProfile/sessions`;
529
+ };
530
+ const sessions = async (options) => {
531
+ const res = await fetch(getSessionsUrl(), {
598
532
  ...options,
599
533
  method: "GET"
600
534
  });
@@ -602,13 +536,15 @@ const settings = async (options) => {
602
536
  const data = body ? JSON.parse(body) : {};
603
537
  return { data, status: res.status, headers: res.headers };
604
538
  };
605
- const getListOrganizationDomainsUrl = () => {
606
- return `https://api.workos.com/_widgets/admin-portal/organization-domains`;
539
+ const getRevokeAllSessionsUrl = () => {
540
+ return `https://api.workos.com/_widgets/UserProfile/sessions/revoke-all`;
607
541
  };
608
- const listOrganizationDomains = async (options) => {
609
- const res = await fetch(getListOrganizationDomainsUrl(), {
542
+ const revokeAllSessions = async (revokeAllSessionsRequest, options) => {
543
+ const res = await fetch(getRevokeAllSessionsUrl(), {
610
544
  ...options,
611
- method: "GET"
545
+ method: "DELETE",
546
+ headers: { "Content-Type": "application/json", ...options?.headers },
547
+ body: JSON.stringify(revokeAllSessionsRequest)
612
548
  });
613
549
  const body = [204, 205, 304].includes(res.status) ? null : await res.text();
614
550
  const data = body ? JSON.parse(body) : {};
@@ -618,20 +554,13 @@ const listOrganizationDomains = async (options) => {
618
554
  headers: res.headers
619
555
  };
620
556
  };
621
- const getGenerateAdminPortalLinkUrl = (params) => {
622
- const normalizedParams = new URLSearchParams();
623
- Object.entries(params || {}).forEach(([key, value]) => {
624
- if (value !== void 0) {
625
- normalizedParams.append(key, value === null ? "null" : value.toString());
626
- }
627
- });
628
- const stringifiedParams = normalizedParams.toString();
629
- return stringifiedParams.length > 0 ? `https://api.workos.com/_widgets/admin-portal/generate-link?${stringifiedParams}` : `https://api.workos.com/_widgets/admin-portal/generate-link`;
557
+ const getRevokeSessionUrl = (sessionId) => {
558
+ return `https://api.workos.com/_widgets/UserProfile/sessions/revoke/${sessionId}`;
630
559
  };
631
- const generateAdminPortalLink = async (params, options) => {
632
- const res = await fetch(getGenerateAdminPortalLinkUrl(params), {
560
+ const revokeSession = async (sessionId, options) => {
561
+ const res = await fetch(getRevokeSessionUrl(sessionId), {
633
562
  ...options,
634
- method: "POST"
563
+ method: "DELETE"
635
564
  });
636
565
  const body = [204, 205, 304].includes(res.status) ? null : await res.text();
637
566
  const data = body ? JSON.parse(body) : {};
@@ -641,11 +570,11 @@ const generateAdminPortalLink = async (params, options) => {
641
570
  headers: res.headers
642
571
  };
643
572
  };
644
- const getDeleteOrganizationDomainUrl = (domainId) => {
645
- return `https://api.workos.com/_widgets/admin-portal/organization-domains/${domainId}`;
573
+ const getDeleteTotpFactorsUrl = () => {
574
+ return `https://api.workos.com/_widgets/UserProfile/totp-factors`;
646
575
  };
647
- const deleteOrganizationDomain = async (domainId, options) => {
648
- const res = await fetch(getDeleteOrganizationDomainUrl(domainId), {
576
+ const deleteTotpFactors = async (options) => {
577
+ const res = await fetch(getDeleteTotpFactorsUrl(), {
649
578
  ...options,
650
579
  method: "DELETE"
651
580
  });
@@ -657,13 +586,15 @@ const deleteOrganizationDomain = async (domainId, options) => {
657
586
  headers: res.headers
658
587
  };
659
588
  };
660
- const getReverifyOrganizationDomainUrl = (domainId) => {
661
- return `https://api.workos.com/_widgets/admin-portal/organization-domains/${domainId}/reverify`;
589
+ const getUpdatePasswordUrl = () => {
590
+ return `https://api.workos.com/_widgets/UserProfile/update-password`;
662
591
  };
663
- const reverifyOrganizationDomain = async (domainId, options) => {
664
- const res = await fetch(getReverifyOrganizationDomainUrl(domainId), {
592
+ const updatePassword = async (updatePasswordRequest, options) => {
593
+ const res = await fetch(getUpdatePasswordUrl(), {
665
594
  ...options,
666
- method: "POST"
595
+ method: "POST",
596
+ headers: { "Content-Type": "application/json", ...options?.headers },
597
+ body: JSON.stringify(updatePasswordRequest)
667
598
  });
668
599
  const body = [204, 205, 304].includes(res.status) ? null : await res.text();
669
600
  const data = body ? JSON.parse(body) : {};
@@ -673,13 +604,29 @@ const reverifyOrganizationDomain = async (domainId, options) => {
673
604
  headers: res.headers
674
605
  };
675
606
  };
676
- const getListSsoConnectionsUrl = () => {
677
- return `https://api.workos.com/_widgets/admin-portal/sso-connections`;
607
+ const getVerifyUrl = () => {
608
+ return `https://api.workos.com/_widgets/UserProfile/verify`;
678
609
  };
679
- const listSsoConnections = async (options) => {
680
- const res = await fetch(getListSsoConnectionsUrl(), {
610
+ const verify = async (verifyRequest, options) => {
611
+ const res = await fetch(getVerifyUrl(), {
681
612
  ...options,
682
- method: "GET"
613
+ method: "POST",
614
+ headers: { "Content-Type": "application/json", ...options?.headers },
615
+ body: JSON.stringify(verifyRequest)
616
+ });
617
+ const body = [204, 205, 304].includes(res.status) ? null : await res.text();
618
+ const data = body ? JSON.parse(body) : {};
619
+ return { data, status: res.status, headers: res.headers };
620
+ };
621
+ const getVerifyTotpFactorUrl = () => {
622
+ return `https://api.workos.com/_widgets/UserProfile/verify-totp-factor`;
623
+ };
624
+ const verifyTotpFactor = async (verifyTotpFactorRequest, options) => {
625
+ const res = await fetch(getVerifyTotpFactorUrl(), {
626
+ ...options,
627
+ method: "POST",
628
+ headers: { "Content-Type": "application/json", ...options?.headers },
629
+ body: JSON.stringify(verifyTotpFactorRequest)
683
630
  });
684
631
  const body = [204, 205, 304].includes(res.status) ? null : await res.text();
685
632
  const data = body ? JSON.parse(body) : {};
@@ -689,15 +636,13 @@ const listSsoConnections = async (options) => {
689
636
  headers: res.headers
690
637
  };
691
638
  };
692
- const getCreateOrganizationApiKeyUrl = () => {
693
- return `https://api.workos.com/_widgets/ApiKeys/organization-api-keys`;
639
+ const getGetAuditLogStreamUrl = () => {
640
+ return `https://api.workos.com/_widgets/admin-portal/audit-log-stream`;
694
641
  };
695
- const createOrganizationApiKey = async (createOrganizationApiKeyRequest, options) => {
696
- const res = await fetch(getCreateOrganizationApiKeyUrl(), {
642
+ const getAuditLogStream = async (options) => {
643
+ const res = await fetch(getGetAuditLogStreamUrl(), {
697
644
  ...options,
698
- method: "POST",
699
- headers: { "Content-Type": "application/json", ...options?.headers },
700
- body: JSON.stringify(createOrganizationApiKeyRequest)
645
+ method: "GET"
701
646
  });
702
647
  const body = [204, 205, 304].includes(res.status) ? null : await res.text();
703
648
  const data = body ? JSON.parse(body) : {};
@@ -707,7 +652,7 @@ const createOrganizationApiKey = async (createOrganizationApiKeyRequest, options
707
652
  headers: res.headers
708
653
  };
709
654
  };
710
- const getListOrganizationApiKeysUrl = (params) => {
655
+ const getGenerateAdminPortalLinkUrl = (params) => {
711
656
  const normalizedParams = new URLSearchParams();
712
657
  Object.entries(params || {}).forEach(([key, value]) => {
713
658
  if (value !== void 0) {
@@ -715,12 +660,12 @@ const getListOrganizationApiKeysUrl = (params) => {
715
660
  }
716
661
  });
717
662
  const stringifiedParams = normalizedParams.toString();
718
- return stringifiedParams.length > 0 ? `https://api.workos.com/_widgets/ApiKeys/organization-api-keys?${stringifiedParams}` : `https://api.workos.com/_widgets/ApiKeys/organization-api-keys`;
663
+ return stringifiedParams.length > 0 ? `https://api.workos.com/_widgets/admin-portal/generate-link?${stringifiedParams}` : `https://api.workos.com/_widgets/admin-portal/generate-link`;
719
664
  };
720
- const listOrganizationApiKeys = async (params, options) => {
721
- const res = await fetch(getListOrganizationApiKeysUrl(params), {
665
+ const generateAdminPortalLink = async (params, options) => {
666
+ const res = await fetch(getGenerateAdminPortalLinkUrl(params), {
722
667
  ...options,
723
- method: "GET"
668
+ method: "POST"
724
669
  });
725
670
  const body = [204, 205, 304].includes(res.status) ? null : await res.text();
726
671
  const data = body ? JSON.parse(body) : {};
@@ -730,18 +675,11 @@ const listOrganizationApiKeys = async (params, options) => {
730
675
  headers: res.headers
731
676
  };
732
677
  };
733
- const getListOrganizationApiKeyPermissionsUrl = (params) => {
734
- const normalizedParams = new URLSearchParams();
735
- Object.entries(params || {}).forEach(([key, value]) => {
736
- if (value !== void 0) {
737
- normalizedParams.append(key, value === null ? "null" : value.toString());
738
- }
739
- });
740
- const stringifiedParams = normalizedParams.toString();
741
- return stringifiedParams.length > 0 ? `https://api.workos.com/_widgets/ApiKeys/permissions?${stringifiedParams}` : `https://api.workos.com/_widgets/ApiKeys/permissions`;
678
+ const getListOrganizationDomainsUrl = () => {
679
+ return `https://api.workos.com/_widgets/admin-portal/organization-domains`;
742
680
  };
743
- const listOrganizationApiKeyPermissions = async (params, options) => {
744
- const res = await fetch(getListOrganizationApiKeyPermissionsUrl(params), {
681
+ const listOrganizationDomains = async (options) => {
682
+ const res = await fetch(getListOrganizationDomainsUrl(), {
745
683
  ...options,
746
684
  method: "GET"
747
685
  });
@@ -753,11 +691,11 @@ const listOrganizationApiKeyPermissions = async (params, options) => {
753
691
  headers: res.headers
754
692
  };
755
693
  };
756
- const getDeleteOrganizationApiKeyUrl = (apiKeyId) => {
757
- return `https://api.workos.com/_widgets/ApiKeys/${apiKeyId}`;
694
+ const getDeleteOrganizationDomainUrl = (domainId) => {
695
+ return `https://api.workos.com/_widgets/admin-portal/organization-domains/${domainId}`;
758
696
  };
759
- const deleteOrganizationApiKey = async (apiKeyId, options) => {
760
- const res = await fetch(getDeleteOrganizationApiKeyUrl(apiKeyId), {
697
+ const deleteOrganizationDomain = async (domainId, options) => {
698
+ const res = await fetch(getDeleteOrganizationDomainUrl(domainId), {
761
699
  ...options,
762
700
  method: "DELETE"
763
701
  });
@@ -769,13 +707,13 @@ const deleteOrganizationApiKey = async (apiKeyId, options) => {
769
707
  headers: res.headers
770
708
  };
771
709
  };
772
- const getMyDataIntegrationsUrl = () => {
773
- return `https://api.workos.com/_widgets/DataIntegrations/mine`;
710
+ const getReverifyOrganizationDomainUrl = (domainId) => {
711
+ return `https://api.workos.com/_widgets/admin-portal/organization-domains/${domainId}/reverify`;
774
712
  };
775
- const myDataIntegrations = async (options) => {
776
- const res = await fetch(getMyDataIntegrationsUrl(), {
713
+ const reverifyOrganizationDomain = async (domainId, options) => {
714
+ const res = await fetch(getReverifyOrganizationDomainUrl(domainId), {
777
715
  ...options,
778
- method: "GET"
716
+ method: "POST"
779
717
  });
780
718
  const body = [204, 205, 304].includes(res.status) ? null : await res.text();
781
719
  const data = body ? JSON.parse(body) : {};
@@ -785,18 +723,11 @@ const myDataIntegrations = async (options) => {
785
723
  headers: res.headers
786
724
  };
787
725
  };
788
- const getGetDataIntegrationAuthorizeUrlUrl = (slug, params) => {
789
- const normalizedParams = new URLSearchParams();
790
- Object.entries(params || {}).forEach(([key, value]) => {
791
- if (value !== void 0) {
792
- normalizedParams.append(key, value === null ? "null" : value.toString());
793
- }
794
- });
795
- const stringifiedParams = normalizedParams.toString();
796
- return stringifiedParams.length > 0 ? `https://api.workos.com/_widgets/DataIntegrations/${slug}/authorize?${stringifiedParams}` : `https://api.workos.com/_widgets/DataIntegrations/${slug}/authorize`;
726
+ const getListSsoConnectionsUrl = () => {
727
+ return `https://api.workos.com/_widgets/admin-portal/sso-connections`;
797
728
  };
798
- const getDataIntegrationAuthorizeUrl = async (slug, params, options) => {
799
- const res = await fetch(getGetDataIntegrationAuthorizeUrlUrl(slug, params), {
729
+ const listSsoConnections = async (options) => {
730
+ const res = await fetch(getListSsoConnectionsUrl(), {
800
731
  ...options,
801
732
  method: "GET"
802
733
  });
@@ -808,17 +739,14 @@ const getDataIntegrationAuthorizeUrl = async (slug, params, options) => {
808
739
  headers: res.headers
809
740
  };
810
741
  };
811
- const getGetDataInstallationAuthorizationStatusUrl = (dataIntegrationId, state) => {
812
- return `https://api.workos.com/_widgets/DataIntegrations/${dataIntegrationId}/authorization-status/${state}`;
742
+ const getListDirectoriesUrl = () => {
743
+ return `https://api.workos.com/_widgets/directory-sync/directories`;
813
744
  };
814
- const getDataInstallationAuthorizationStatus = async (dataIntegrationId, state, options) => {
815
- const res = await fetch(
816
- getGetDataInstallationAuthorizationStatusUrl(dataIntegrationId, state),
817
- {
818
- ...options,
819
- method: "GET"
820
- }
821
- );
745
+ const listDirectories = async (options) => {
746
+ const res = await fetch(getListDirectoriesUrl(), {
747
+ ...options,
748
+ method: "GET"
749
+ });
822
750
  const body = [204, 205, 304].includes(res.status) ? null : await res.text();
823
751
  const data = body ? JSON.parse(body) : {};
824
752
  return {
@@ -827,13 +755,13 @@ const getDataInstallationAuthorizationStatus = async (dataIntegrationId, state,
827
755
  headers: res.headers
828
756
  };
829
757
  };
830
- const getDeleteDataInstallationUrl = (installationId) => {
831
- return `https://api.workos.com/_widgets/DataIntegrations/installations/${installationId}`;
758
+ const getGetDirectoryUrl = (directoryId) => {
759
+ return `https://api.workos.com/_widgets/directory-sync/directories/${directoryId}`;
832
760
  };
833
- const deleteDataInstallation = async (installationId, options) => {
834
- const res = await fetch(getDeleteDataInstallationUrl(installationId), {
761
+ const getDirectory = async (directoryId, options) => {
762
+ const res = await fetch(getGetDirectoryUrl(directoryId), {
835
763
  ...options,
836
- method: "DELETE"
764
+ method: "GET"
837
765
  });
838
766
  const body = [204, 205, 304].includes(res.status) ? null : await res.text();
839
767
  const data = body ? JSON.parse(body) : {};
@@ -843,19 +771,21 @@ const deleteDataInstallation = async (installationId, options) => {
843
771
  headers: res.headers
844
772
  };
845
773
  };
774
+ const getSettingsUrl = () => {
775
+ return `https://api.workos.com/_widgets/settings`;
776
+ };
777
+ const settings = async (options) => {
778
+ const res = await fetch(getSettingsUrl(), {
779
+ ...options,
780
+ method: "GET"
781
+ });
782
+ const body = [204, 205, 304].includes(res.status) ? null : await res.text();
783
+ const data = body ? JSON.parse(body) : {};
784
+ return { data, status: res.status, headers: res.headers };
785
+ };
846
786
  export {
847
- AuthenticationInformationResponseDataVerificationMethodsMfaProvider,
848
- AuthenticationInformationResponseDataVerificationMethodsPasskeyProvider,
849
- AuthenticationInformationResponseDataVerificationMethodsPasswordProvider,
850
- CreateTotpFactorResponseAuthenticationChallengeAllOfObject,
851
- CreateTotpFactorResponseAuthenticationFactorAllOfObject,
852
- CreateTotpFactorResponseAuthenticationFactorAllOfType,
853
- DataInstallationObject,
854
- DataInstallationState,
855
- DataIntegrationCredentialsType,
856
- DataIntegrationIntegrationType,
857
- DataIntegrationObject,
858
- DataIntegrationOwnership,
787
+ DirectoryState,
788
+ DirectoryType,
859
789
  DomainVerificationNameServer,
860
790
  GenerateAdminPortalLinkIntent,
861
791
  MemberActionsItem,
@@ -863,14 +793,6 @@ export {
863
793
  OidcSessionState,
864
794
  OrganizationDomainState,
865
795
  SamlSessionState,
866
- SendVerificationResponseType,
867
- SettingsResponseObject,
868
- SsoConnectionAnyOfEightAllOfProviderTag,
869
- SsoConnectionAnyOfEightAllOfState,
870
- SsoConnectionAnyOfEightAllOfType,
871
- SsoConnectionAnyOfProviderTag,
872
- SsoConnectionAnyOfState,
873
- SsoConnectionAnyOfType,
874
796
  SsoConnectionSessionJSONState,
875
797
  authenticationInformation,
876
798
  createOrganizationApiKey,
@@ -882,6 +804,7 @@ export {
882
804
  deletePasskey,
883
805
  deleteTotpFactors,
884
806
  generateAdminPortalLink,
807
+ getAuditLogStream,
885
808
  getAuthenticationInformationUrl,
886
809
  getCreateOrganizationApiKeyUrl,
887
810
  getCreatePasswordUrl,
@@ -893,10 +816,14 @@ export {
893
816
  getDeleteOrganizationDomainUrl,
894
817
  getDeletePasskeyUrl,
895
818
  getDeleteTotpFactorsUrl,
819
+ getDirectory,
896
820
  getGenerateAdminPortalLinkUrl,
821
+ getGetAuditLogStreamUrl,
897
822
  getGetDataInstallationAuthorizationStatusUrl,
898
823
  getGetDataIntegrationAuthorizeUrlUrl,
824
+ getGetDirectoryUrl,
899
825
  getInviteMemberUrl,
826
+ getListDirectoriesUrl,
900
827
  getListOrganizationApiKeyPermissionsUrl,
901
828
  getListOrganizationApiKeysUrl,
902
829
  getListOrganizationDomainsUrl,
@@ -924,6 +851,7 @@ export {
924
851
  getVerifyTotpFactorUrl,
925
852
  getVerifyUrl,
926
853
  inviteMember,
854
+ listDirectories,
927
855
  listOrganizationApiKeyPermissions,
928
856
  listOrganizationApiKeys,
929
857
  listOrganizationDomains,