@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.
- package/CHANGELOG.md +10 -0
- package/dist/cjs/admin-portal-audit-log-streaming.client.cjs +167 -0
- package/dist/cjs/admin-portal-audit-log-streaming.client.cjs.map +1 -0
- package/dist/cjs/admin-portal-audit-log-streaming.client.d.cts +26 -0
- package/dist/cjs/admin-portal-domain-verification.client.cjs.map +1 -1
- package/dist/cjs/admin-portal-sso-connection.client.cjs +4 -7
- package/dist/cjs/admin-portal-sso-connection.client.cjs.map +1 -1
- package/dist/cjs/api/api-provider.cjs.map +1 -1
- package/dist/cjs/api/api-provider.d.cts +1 -1
- package/dist/cjs/api/endpoint.cjs +176 -285
- package/dist/cjs/api/endpoint.cjs.map +1 -1
- package/dist/cjs/api/endpoint.d.cts +345 -379
- package/dist/cjs/directory-sync.client.cjs +16 -3
- package/dist/cjs/directory-sync.client.cjs.map +1 -1
- package/dist/cjs/experimental/api/fetch.cjs +42 -183
- package/dist/cjs/experimental/api/fetch.cjs.map +1 -1
- package/dist/cjs/experimental/api/fetch.d.cts +325 -369
- package/dist/cjs/experimental/api/react-query.cjs +151 -263
- package/dist/cjs/experimental/api/react-query.cjs.map +1 -1
- package/dist/cjs/experimental/api/react-query.d.cts +380 -370
- package/dist/cjs/experimental/api/swr.cjs +84 -183
- package/dist/cjs/experimental/api/swr.cjs.map +1 -1
- package/dist/cjs/experimental/api/swr.d.cts +356 -408
- package/dist/cjs/index.cjs +11 -0
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs/index.d.cts +2 -0
- package/dist/cjs/lib/add-mfa-dialog.cjs +18 -16
- package/dist/cjs/lib/add-mfa-dialog.cjs.map +1 -1
- package/dist/cjs/lib/admin-portal-audit-log-streaming.cjs +321 -0
- package/dist/cjs/lib/admin-portal-audit-log-streaming.cjs.map +1 -0
- package/dist/cjs/lib/admin-portal-audit-log-streaming.d.cts +54 -0
- package/dist/cjs/lib/admin-portal-sso-connection.cjs +0 -8
- package/dist/cjs/lib/admin-portal-sso-connection.cjs.map +1 -1
- package/dist/cjs/lib/admin-portal-sso-connection.d.cts +1 -2
- package/dist/cjs/lib/audit-log-stream-icons.cjs +63 -0
- package/dist/cjs/lib/audit-log-stream-icons.cjs.map +1 -0
- package/dist/cjs/lib/audit-log-stream-icons.d.cts +5 -0
- package/dist/cjs/lib/identity-providers.d.cts +2 -2
- package/dist/cjs/lib/provider-icon.cjs.map +1 -1
- package/dist/cjs/lib/provider-icon.d.cts +2 -2
- package/dist/cjs/workos-widgets.client.cjs +13 -1
- package/dist/cjs/workos-widgets.client.cjs.map +1 -1
- package/dist/esm/admin-portal-audit-log-streaming.client.d.ts +26 -0
- package/dist/esm/admin-portal-audit-log-streaming.client.js +153 -0
- package/dist/esm/admin-portal-audit-log-streaming.client.js.map +1 -0
- package/dist/esm/admin-portal-domain-verification.client.js +2 -2
- package/dist/esm/admin-portal-domain-verification.client.js.map +1 -1
- package/dist/esm/admin-portal-sso-connection.client.js +6 -9
- package/dist/esm/admin-portal-sso-connection.client.js.map +1 -1
- package/dist/esm/api/api-provider.d.ts +1 -1
- package/dist/esm/api/api-provider.js.map +1 -1
- package/dist/esm/api/endpoint.d.ts +345 -379
- package/dist/esm/api/endpoint.js +168 -265
- package/dist/esm/api/endpoint.js.map +1 -1
- package/dist/esm/directory-sync.client.js +16 -3
- package/dist/esm/directory-sync.client.js.map +1 -1
- package/dist/esm/experimental/api/fetch.d.ts +325 -369
- package/dist/esm/experimental/api/fetch.js +38 -163
- package/dist/esm/experimental/api/fetch.js.map +1 -1
- package/dist/esm/experimental/api/react-query.d.ts +380 -370
- package/dist/esm/experimental/api/react-query.js +141 -243
- package/dist/esm/experimental/api/react-query.js.map +1 -1
- package/dist/esm/experimental/api/swr.d.ts +356 -408
- package/dist/esm/experimental/api/swr.js +76 -163
- package/dist/esm/experimental/api/swr.js.map +1 -1
- package/dist/esm/index.d.ts +2 -0
- package/dist/esm/index.js +12 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/lib/add-mfa-dialog.js +18 -16
- package/dist/esm/lib/add-mfa-dialog.js.map +1 -1
- package/dist/esm/lib/admin-portal-audit-log-streaming.d.ts +54 -0
- package/dist/esm/lib/admin-portal-audit-log-streaming.js +290 -0
- package/dist/esm/lib/admin-portal-audit-log-streaming.js.map +1 -0
- package/dist/esm/lib/admin-portal-sso-connection.d.ts +1 -2
- package/dist/esm/lib/admin-portal-sso-connection.js +0 -8
- package/dist/esm/lib/admin-portal-sso-connection.js.map +1 -1
- package/dist/esm/lib/audit-log-stream-icons.d.ts +5 -0
- package/dist/esm/lib/audit-log-stream-icons.js +39 -0
- package/dist/esm/lib/audit-log-stream-icons.js.map +1 -0
- package/dist/esm/lib/identity-providers.d.ts +2 -2
- package/dist/esm/lib/provider-icon.d.ts +2 -2
- package/dist/esm/lib/provider-icon.js.map +1 -1
- package/dist/esm/workos-widgets.client.js +13 -1
- package/dist/esm/workos-widgets.client.js.map +1 -1
- package/package.json +2 -2
|
@@ -18,18 +18,6 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
var react_query_exports = {};
|
|
20
20
|
__export(react_query_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(react_query_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(react_query_exports, {
|
|
|
58
38
|
deletePasskey: () => deletePasskey,
|
|
59
39
|
deleteTotpFactors: () => deleteTotpFactors,
|
|
60
40
|
generateAdminPortalLink: () => generateAdminPortalLink,
|
|
41
|
+
getAuditLogStream: () => getAuditLogStream,
|
|
61
42
|
getAuthenticationInformationQueryKey: () => getAuthenticationInformationQueryKey,
|
|
62
43
|
getAuthenticationInformationQueryOptions: () => getAuthenticationInformationQueryOptions,
|
|
63
44
|
getAuthenticationInformationUrl: () => getAuthenticationInformationUrl,
|
|
@@ -79,14 +60,21 @@ __export(react_query_exports, {
|
|
|
79
60
|
getDeletePasskeyUrl: () => getDeletePasskeyUrl,
|
|
80
61
|
getDeleteTotpFactorsMutationOptions: () => getDeleteTotpFactorsMutationOptions,
|
|
81
62
|
getDeleteTotpFactorsUrl: () => getDeleteTotpFactorsUrl,
|
|
63
|
+
getDirectory: () => getDirectory,
|
|
82
64
|
getGenerateAdminPortalLinkMutationOptions: () => getGenerateAdminPortalLinkMutationOptions,
|
|
83
65
|
getGenerateAdminPortalLinkUrl: () => getGenerateAdminPortalLinkUrl,
|
|
66
|
+
getGetAuditLogStreamQueryKey: () => getGetAuditLogStreamQueryKey,
|
|
67
|
+
getGetAuditLogStreamQueryOptions: () => getGetAuditLogStreamQueryOptions,
|
|
68
|
+
getGetAuditLogStreamUrl: () => getGetAuditLogStreamUrl,
|
|
84
69
|
getGetDataInstallationAuthorizationStatusQueryKey: () => getGetDataInstallationAuthorizationStatusQueryKey,
|
|
85
70
|
getGetDataInstallationAuthorizationStatusQueryOptions: () => getGetDataInstallationAuthorizationStatusQueryOptions,
|
|
86
71
|
getGetDataInstallationAuthorizationStatusUrl: () => getGetDataInstallationAuthorizationStatusUrl,
|
|
87
72
|
getGetDataIntegrationAuthorizeUrlQueryKey: () => getGetDataIntegrationAuthorizeUrlQueryKey,
|
|
88
73
|
getGetDataIntegrationAuthorizeUrlQueryOptions: () => getGetDataIntegrationAuthorizeUrlQueryOptions,
|
|
89
74
|
getGetDataIntegrationAuthorizeUrlUrl: () => getGetDataIntegrationAuthorizeUrlUrl,
|
|
75
|
+
getGetDirectoryQueryKey: () => getGetDirectoryQueryKey,
|
|
76
|
+
getGetDirectoryQueryOptions: () => getGetDirectoryQueryOptions,
|
|
77
|
+
getGetDirectoryUrl: () => getGetDirectoryUrl,
|
|
90
78
|
getInviteMemberMutationOptions: () => getInviteMemberMutationOptions,
|
|
91
79
|
getInviteMemberUrl: () => getInviteMemberUrl,
|
|
92
80
|
getListDirectoriesQueryKey: () => getListDirectoriesQueryKey,
|
|
@@ -191,8 +179,10 @@ __export(react_query_exports, {
|
|
|
191
179
|
useDeletePasskey: () => useDeletePasskey,
|
|
192
180
|
useDeleteTotpFactors: () => useDeleteTotpFactors,
|
|
193
181
|
useGenerateAdminPortalLink: () => useGenerateAdminPortalLink,
|
|
182
|
+
useGetAuditLogStream: () => useGetAuditLogStream,
|
|
194
183
|
useGetDataInstallationAuthorizationStatus: () => useGetDataInstallationAuthorizationStatus,
|
|
195
184
|
useGetDataIntegrationAuthorizeUrl: () => useGetDataIntegrationAuthorizeUrl,
|
|
185
|
+
useGetDirectory: () => useGetDirectory,
|
|
196
186
|
useInviteMember: () => useInviteMember,
|
|
197
187
|
useListDirectories: () => useListDirectories,
|
|
198
188
|
useListOrganizationApiKeyPermissions: () => useListOrganizationApiKeyPermissions,
|
|
@@ -240,33 +230,6 @@ const MemberActionsItem = {
|
|
|
240
230
|
"revoke-invite": "revoke-invite",
|
|
241
231
|
"revoke-membership": "revoke-membership"
|
|
242
232
|
};
|
|
243
|
-
const CreateTotpFactorResponseAuthenticationFactorAllOfObject = {
|
|
244
|
-
authentication_factor: "authentication_factor"
|
|
245
|
-
};
|
|
246
|
-
const CreateTotpFactorResponseAuthenticationFactorAllOfType = {
|
|
247
|
-
generic_otp: "generic_otp",
|
|
248
|
-
sms: "sms",
|
|
249
|
-
totp: "totp",
|
|
250
|
-
webauthn: "webauthn"
|
|
251
|
-
};
|
|
252
|
-
const CreateTotpFactorResponseAuthenticationChallengeAllOfObject = {
|
|
253
|
-
authentication_challenge: "authentication_challenge"
|
|
254
|
-
};
|
|
255
|
-
const AuthenticationInformationResponseDataVerificationMethodsMfaOneOfProvider = {
|
|
256
|
-
MFA: "MFA"
|
|
257
|
-
};
|
|
258
|
-
const AuthenticationInformationResponseDataVerificationMethodsPasswordOneOfProvider = {
|
|
259
|
-
Password: "Password"
|
|
260
|
-
};
|
|
261
|
-
const AuthenticationInformationResponseDataVerificationMethodsPasskeyOneOfProvider = {
|
|
262
|
-
Passkey: "Passkey"
|
|
263
|
-
};
|
|
264
|
-
const SendVerificationResponseType = {
|
|
265
|
-
EmailVerification: "EmailVerification"
|
|
266
|
-
};
|
|
267
|
-
const SettingsResponseObject = {
|
|
268
|
-
settings: "settings"
|
|
269
|
-
};
|
|
270
233
|
const OrganizationDomainState = {
|
|
271
234
|
Failed: "Failed",
|
|
272
235
|
LegacyVerified: "LegacyVerified",
|
|
@@ -299,121 +262,6 @@ const SsoConnectionSessionJSONState = {
|
|
|
299
262
|
...SamlSessionState,
|
|
300
263
|
...OidcSessionState
|
|
301
264
|
};
|
|
302
|
-
const SsoConnectionAnyOfType = {
|
|
303
|
-
AdfsSaml: "AdfsSaml",
|
|
304
|
-
Auth0Saml: "Auth0Saml",
|
|
305
|
-
AzureSaml: "AzureSaml",
|
|
306
|
-
CasSaml: "CasSaml",
|
|
307
|
-
ClassLinkSaml: "ClassLinkSaml",
|
|
308
|
-
CloudflareSaml: "CloudflareSaml",
|
|
309
|
-
CyberArkSaml: "CyberArkSaml",
|
|
310
|
-
DuoSaml: "DuoSaml",
|
|
311
|
-
GenericSaml: "GenericSaml",
|
|
312
|
-
GoogleSaml: "GoogleSaml",
|
|
313
|
-
JumpCloudSaml: "JumpCloudSaml",
|
|
314
|
-
KeycloakSaml: "KeycloakSaml",
|
|
315
|
-
LastPassSaml: "LastPassSaml",
|
|
316
|
-
MiniOrangeSaml: "MiniOrangeSaml",
|
|
317
|
-
NetIqSaml: "NetIqSaml",
|
|
318
|
-
OktaSaml: "OktaSaml",
|
|
319
|
-
OneLoginSaml: "OneLoginSaml",
|
|
320
|
-
OracleSaml: "OracleSaml",
|
|
321
|
-
PingFederateSaml: "PingFederateSaml",
|
|
322
|
-
PingOneSaml: "PingOneSaml",
|
|
323
|
-
RipplingSaml: "RipplingSaml",
|
|
324
|
-
SalesforceSaml: "SalesforceSaml",
|
|
325
|
-
ShibbolethGenericSaml: "ShibbolethGenericSaml",
|
|
326
|
-
ShibbolethSaml: "ShibbolethSaml",
|
|
327
|
-
SimpleSamlPhpSaml: "SimpleSamlPhpSaml",
|
|
328
|
-
TestIdp: "TestIdp",
|
|
329
|
-
VmWareSaml: "VmWareSaml"
|
|
330
|
-
};
|
|
331
|
-
const SsoConnectionAnyOfState = {
|
|
332
|
-
Inactive: "Inactive",
|
|
333
|
-
Validating: "Validating",
|
|
334
|
-
Active: "Active",
|
|
335
|
-
Deleting: "Deleting"
|
|
336
|
-
};
|
|
337
|
-
const SsoConnectionAnyOfProviderTag = {
|
|
338
|
-
Saml: "Saml"
|
|
339
|
-
};
|
|
340
|
-
const SsoConnectionAnyOfEightAllOfState = {
|
|
341
|
-
Inactive: "Inactive",
|
|
342
|
-
Validating: "Validating",
|
|
343
|
-
Active: "Active",
|
|
344
|
-
Deleting: "Deleting"
|
|
345
|
-
};
|
|
346
|
-
const SsoConnectionAnyOfEightAllOfType = {
|
|
347
|
-
AdpOidc: "AdpOidc",
|
|
348
|
-
Auth0Migration: "Auth0Migration",
|
|
349
|
-
CleverOidc: "CleverOidc",
|
|
350
|
-
EntraIdOidc: "EntraIdOidc",
|
|
351
|
-
GenericOidc: "GenericOidc",
|
|
352
|
-
GoogleOidc: "GoogleOidc",
|
|
353
|
-
OktaOidc: "OktaOidc",
|
|
354
|
-
LoginGovOidc: "LoginGovOidc"
|
|
355
|
-
};
|
|
356
|
-
const SsoConnectionAnyOfEightAllOfProviderTag = {
|
|
357
|
-
OpenIdConnect: "OpenIdConnect"
|
|
358
|
-
};
|
|
359
|
-
const DataInstallationAllOfObject = {
|
|
360
|
-
data_installation: "data_installation",
|
|
361
|
-
connected_account: "connected_account"
|
|
362
|
-
};
|
|
363
|
-
const DataInstallationAllOfState = {
|
|
364
|
-
connected: "connected",
|
|
365
|
-
needs_reauthorization: "needs_reauthorization"
|
|
366
|
-
};
|
|
367
|
-
const DataIntegrationObject = {
|
|
368
|
-
data_integration: "data_integration"
|
|
369
|
-
};
|
|
370
|
-
const DataIntegrationIntegrationType = {
|
|
371
|
-
asana: "asana",
|
|
372
|
-
box: "box",
|
|
373
|
-
"cal-dot-com": "cal-dot-com",
|
|
374
|
-
calendly: "calendly",
|
|
375
|
-
confluence: "confluence",
|
|
376
|
-
dropbox: "dropbox",
|
|
377
|
-
"frame-io": "frame-io",
|
|
378
|
-
front: "front",
|
|
379
|
-
github: "github",
|
|
380
|
-
gitlab: "gitlab",
|
|
381
|
-
gmail: "gmail",
|
|
382
|
-
google: "google",
|
|
383
|
-
"google-calendar": "google-calendar",
|
|
384
|
-
"google-drive": "google-drive",
|
|
385
|
-
helpscout: "helpscout",
|
|
386
|
-
hubspot: "hubspot",
|
|
387
|
-
intercom: "intercom",
|
|
388
|
-
jira: "jira",
|
|
389
|
-
linear: "linear",
|
|
390
|
-
microsoft: "microsoft",
|
|
391
|
-
"microsoft-onedrive": "microsoft-onedrive",
|
|
392
|
-
"microsoft-onenote": "microsoft-onenote",
|
|
393
|
-
"microsoft-outlook": "microsoft-outlook",
|
|
394
|
-
"microsoft-outlook-calendar": "microsoft-outlook-calendar",
|
|
395
|
-
"microsoft-sharepoint": "microsoft-sharepoint",
|
|
396
|
-
"microsoft-teams": "microsoft-teams",
|
|
397
|
-
"microsoft-todo": "microsoft-todo",
|
|
398
|
-
notion: "notion",
|
|
399
|
-
prefect: "prefect",
|
|
400
|
-
"pydantic-logfire": "pydantic-logfire",
|
|
401
|
-
salesforce: "salesforce",
|
|
402
|
-
sentry: "sentry",
|
|
403
|
-
slack: "slack",
|
|
404
|
-
snowflake: "snowflake",
|
|
405
|
-
stripe: "stripe",
|
|
406
|
-
xero: "xero",
|
|
407
|
-
zendesk: "zendesk"
|
|
408
|
-
};
|
|
409
|
-
const DataIntegrationOwnership = {
|
|
410
|
-
userland_user: "userland_user",
|
|
411
|
-
organization: "organization"
|
|
412
|
-
};
|
|
413
|
-
const DataIntegrationCredentialsType = {
|
|
414
|
-
shared: "shared",
|
|
415
|
-
custom: "custom"
|
|
416
|
-
};
|
|
417
265
|
const DirectoryType = {
|
|
418
266
|
azure_scim_v20: "azure scim v2.0",
|
|
419
267
|
bamboohr: "bamboohr",
|
|
@@ -449,7 +297,8 @@ const DirectoryState = {
|
|
|
449
297
|
};
|
|
450
298
|
const GenerateAdminPortalLinkIntent = {
|
|
451
299
|
domain_verification: "domain_verification",
|
|
452
|
-
sso: "sso"
|
|
300
|
+
sso: "sso",
|
|
301
|
+
log_streams: "log_streams"
|
|
453
302
|
};
|
|
454
303
|
const getCreateOrganizationApiKeyUrl = () => {
|
|
455
304
|
return `https://api.workos.com/_widgets/ApiKeys/organization-api-keys`;
|
|
@@ -479,8 +328,10 @@ const getCreateOrganizationApiKeyMutationOptions = (options) => {
|
|
|
479
328
|
return { mutationFn, ...mutationOptions };
|
|
480
329
|
};
|
|
481
330
|
const useCreateOrganizationApiKey = (options, queryClient) => {
|
|
482
|
-
|
|
483
|
-
|
|
331
|
+
return (0, import_react_query.useMutation)(
|
|
332
|
+
getCreateOrganizationApiKeyMutationOptions(options),
|
|
333
|
+
queryClient
|
|
334
|
+
);
|
|
484
335
|
};
|
|
485
336
|
const getListOrganizationApiKeysUrl = (params) => {
|
|
486
337
|
const normalizedParams = new URLSearchParams();
|
|
@@ -520,8 +371,7 @@ const getListOrganizationApiKeysQueryOptions = (params, options) => {
|
|
|
520
371
|
function useListOrganizationApiKeys(params, options, queryClient) {
|
|
521
372
|
const queryOptions = getListOrganizationApiKeysQueryOptions(params, options);
|
|
522
373
|
const query = (0, import_react_query.useQuery)(queryOptions, queryClient);
|
|
523
|
-
query
|
|
524
|
-
return query;
|
|
374
|
+
return { ...query, queryKey: queryOptions.queryKey };
|
|
525
375
|
}
|
|
526
376
|
const getListOrganizationApiKeyPermissionsUrl = (params) => {
|
|
527
377
|
const normalizedParams = new URLSearchParams();
|
|
@@ -564,8 +414,7 @@ function useListOrganizationApiKeyPermissions(params, options, queryClient) {
|
|
|
564
414
|
options
|
|
565
415
|
);
|
|
566
416
|
const query = (0, import_react_query.useQuery)(queryOptions, queryClient);
|
|
567
|
-
query
|
|
568
|
-
return query;
|
|
417
|
+
return { ...query, queryKey: queryOptions.queryKey };
|
|
569
418
|
}
|
|
570
419
|
const getDeleteOrganizationApiKeyUrl = (apiKeyId) => {
|
|
571
420
|
return `https://api.workos.com/_widgets/ApiKeys/${apiKeyId}`;
|
|
@@ -593,8 +442,10 @@ const getDeleteOrganizationApiKeyMutationOptions = (options) => {
|
|
|
593
442
|
return { mutationFn, ...mutationOptions };
|
|
594
443
|
};
|
|
595
444
|
const useDeleteOrganizationApiKey = (options, queryClient) => {
|
|
596
|
-
|
|
597
|
-
|
|
445
|
+
return (0, import_react_query.useMutation)(
|
|
446
|
+
getDeleteOrganizationApiKeyMutationOptions(options),
|
|
447
|
+
queryClient
|
|
448
|
+
);
|
|
598
449
|
};
|
|
599
450
|
const getDeleteDataInstallationUrl = (installationId) => {
|
|
600
451
|
return `https://api.workos.com/_widgets/DataIntegrations/installations/${installationId}`;
|
|
@@ -622,8 +473,10 @@ const getDeleteDataInstallationMutationOptions = (options) => {
|
|
|
622
473
|
return { mutationFn, ...mutationOptions };
|
|
623
474
|
};
|
|
624
475
|
const useDeleteDataInstallation = (options, queryClient) => {
|
|
625
|
-
|
|
626
|
-
|
|
476
|
+
return (0, import_react_query.useMutation)(
|
|
477
|
+
getDeleteDataInstallationMutationOptions(options),
|
|
478
|
+
queryClient
|
|
479
|
+
);
|
|
627
480
|
};
|
|
628
481
|
const getMyDataIntegrationsUrl = () => {
|
|
629
482
|
return `https://api.workos.com/_widgets/DataIntegrations/mine`;
|
|
@@ -653,8 +506,7 @@ const getMyDataIntegrationsQueryOptions = (options) => {
|
|
|
653
506
|
function useMyDataIntegrations(options, queryClient) {
|
|
654
507
|
const queryOptions = getMyDataIntegrationsQueryOptions(options);
|
|
655
508
|
const query = (0, import_react_query.useQuery)(queryOptions, queryClient);
|
|
656
|
-
query
|
|
657
|
-
return query;
|
|
509
|
+
return { ...query, queryKey: queryOptions.queryKey };
|
|
658
510
|
}
|
|
659
511
|
const getGetDataInstallationAuthorizationStatusUrl = (dataIntegrationId, state) => {
|
|
660
512
|
return `https://api.workos.com/_widgets/DataIntegrations/${dataIntegrationId}/authorization-status/${state}`;
|
|
@@ -701,8 +553,7 @@ function useGetDataInstallationAuthorizationStatus(dataIntegrationId, state, opt
|
|
|
701
553
|
options
|
|
702
554
|
);
|
|
703
555
|
const query = (0, import_react_query.useQuery)(queryOptions, queryClient);
|
|
704
|
-
query
|
|
705
|
-
return query;
|
|
556
|
+
return { ...query, queryKey: queryOptions.queryKey };
|
|
706
557
|
}
|
|
707
558
|
const getGetDataIntegrationAuthorizeUrlUrl = (slug, params) => {
|
|
708
559
|
const normalizedParams = new URLSearchParams();
|
|
@@ -751,8 +602,7 @@ function useGetDataIntegrationAuthorizeUrl(slug, params, options, queryClient) {
|
|
|
751
602
|
options
|
|
752
603
|
);
|
|
753
604
|
const query = (0, import_react_query.useQuery)(queryOptions, queryClient);
|
|
754
|
-
query
|
|
755
|
-
return query;
|
|
605
|
+
return { ...query, queryKey: queryOptions.queryKey };
|
|
756
606
|
}
|
|
757
607
|
const getInviteMemberUrl = () => {
|
|
758
608
|
return `https://api.workos.com/_widgets/UserManagement/invite-user`;
|
|
@@ -782,8 +632,7 @@ const getInviteMemberMutationOptions = (options) => {
|
|
|
782
632
|
return { mutationFn, ...mutationOptions };
|
|
783
633
|
};
|
|
784
634
|
const useInviteMember = (options, queryClient) => {
|
|
785
|
-
|
|
786
|
-
return (0, import_react_query.useMutation)(mutationOptions, queryClient);
|
|
635
|
+
return (0, import_react_query.useMutation)(getInviteMemberMutationOptions(options), queryClient);
|
|
787
636
|
};
|
|
788
637
|
const getRevokeInviteUrl = (userId) => {
|
|
789
638
|
return `https://api.workos.com/_widgets/UserManagement/invites/${userId}`;
|
|
@@ -811,8 +660,7 @@ const getRevokeInviteMutationOptions = (options) => {
|
|
|
811
660
|
return { mutationFn, ...mutationOptions };
|
|
812
661
|
};
|
|
813
662
|
const useRevokeInvite = (options, queryClient) => {
|
|
814
|
-
|
|
815
|
-
return (0, import_react_query.useMutation)(mutationOptions, queryClient);
|
|
663
|
+
return (0, import_react_query.useMutation)(getRevokeInviteMutationOptions(options), queryClient);
|
|
816
664
|
};
|
|
817
665
|
const getResendInviteUrl = (userId) => {
|
|
818
666
|
return `https://api.workos.com/_widgets/UserManagement/invites/${userId}/resend`;
|
|
@@ -840,8 +688,7 @@ const getResendInviteMutationOptions = (options) => {
|
|
|
840
688
|
return { mutationFn, ...mutationOptions };
|
|
841
689
|
};
|
|
842
690
|
const useResendInvite = (options, queryClient) => {
|
|
843
|
-
|
|
844
|
-
return (0, import_react_query.useMutation)(mutationOptions, queryClient);
|
|
691
|
+
return (0, import_react_query.useMutation)(getResendInviteMutationOptions(options), queryClient);
|
|
845
692
|
};
|
|
846
693
|
const getMembersUrl = (params) => {
|
|
847
694
|
const normalizedParams = new URLSearchParams();
|
|
@@ -879,8 +726,7 @@ const getMembersQueryOptions = (params, options) => {
|
|
|
879
726
|
function useMembers(params, options, queryClient) {
|
|
880
727
|
const queryOptions = getMembersQueryOptions(params, options);
|
|
881
728
|
const query = (0, import_react_query.useQuery)(queryOptions, queryClient);
|
|
882
|
-
query
|
|
883
|
-
return query;
|
|
729
|
+
return { ...query, queryKey: queryOptions.queryKey };
|
|
884
730
|
}
|
|
885
731
|
const getRemoveMemberUrl = (userId) => {
|
|
886
732
|
return `https://api.workos.com/_widgets/UserManagement/members/${userId}`;
|
|
@@ -908,8 +754,7 @@ const getRemoveMemberMutationOptions = (options) => {
|
|
|
908
754
|
return { mutationFn, ...mutationOptions };
|
|
909
755
|
};
|
|
910
756
|
const useRemoveMember = (options, queryClient) => {
|
|
911
|
-
|
|
912
|
-
return (0, import_react_query.useMutation)(mutationOptions, queryClient);
|
|
757
|
+
return (0, import_react_query.useMutation)(getRemoveMemberMutationOptions(options), queryClient);
|
|
913
758
|
};
|
|
914
759
|
const getUpdateMemberUrl = (userId) => {
|
|
915
760
|
return `https://api.workos.com/_widgets/UserManagement/members/${userId}`;
|
|
@@ -939,8 +784,7 @@ const getUpdateMemberMutationOptions = (options) => {
|
|
|
939
784
|
return { mutationFn, ...mutationOptions };
|
|
940
785
|
};
|
|
941
786
|
const useUpdateMember = (options, queryClient) => {
|
|
942
|
-
|
|
943
|
-
return (0, import_react_query.useMutation)(mutationOptions, queryClient);
|
|
787
|
+
return (0, import_react_query.useMutation)(getUpdateMemberMutationOptions(options), queryClient);
|
|
944
788
|
};
|
|
945
789
|
const getOrganizationsUrl = () => {
|
|
946
790
|
return `https://api.workos.com/_widgets/UserManagement/organizations`;
|
|
@@ -974,8 +818,7 @@ const getOrganizationsQueryOptions = (options) => {
|
|
|
974
818
|
function useOrganizations(options, queryClient) {
|
|
975
819
|
const queryOptions = getOrganizationsQueryOptions(options);
|
|
976
820
|
const query = (0, import_react_query.useQuery)(queryOptions, queryClient);
|
|
977
|
-
query
|
|
978
|
-
return query;
|
|
821
|
+
return { ...query, queryKey: queryOptions.queryKey };
|
|
979
822
|
}
|
|
980
823
|
const getRolesUrl = () => {
|
|
981
824
|
return `https://api.workos.com/_widgets/UserManagement/roles`;
|
|
@@ -1003,8 +846,7 @@ const getRolesQueryOptions = (options) => {
|
|
|
1003
846
|
function useRoles(options, queryClient) {
|
|
1004
847
|
const queryOptions = getRolesQueryOptions(options);
|
|
1005
848
|
const query = (0, import_react_query.useQuery)(queryOptions, queryClient);
|
|
1006
|
-
query
|
|
1007
|
-
return query;
|
|
849
|
+
return { ...query, queryKey: queryOptions.queryKey };
|
|
1008
850
|
}
|
|
1009
851
|
const getRolesAndConfigUrl = () => {
|
|
1010
852
|
return `https://api.workos.com/_widgets/UserManagement/roles-and-config`;
|
|
@@ -1038,8 +880,7 @@ const getRolesAndConfigQueryOptions = (options) => {
|
|
|
1038
880
|
function useRolesAndConfig(options, queryClient) {
|
|
1039
881
|
const queryOptions = getRolesAndConfigQueryOptions(options);
|
|
1040
882
|
const query = (0, import_react_query.useQuery)(queryOptions, queryClient);
|
|
1041
|
-
query
|
|
1042
|
-
return query;
|
|
883
|
+
return { ...query, queryKey: queryOptions.queryKey };
|
|
1043
884
|
}
|
|
1044
885
|
const getAuthenticationInformationUrl = () => {
|
|
1045
886
|
return `https://api.workos.com/_widgets/UserProfile/authentication-information`;
|
|
@@ -1071,8 +912,7 @@ const getAuthenticationInformationQueryOptions = (options) => {
|
|
|
1071
912
|
function useAuthenticationInformation(options, queryClient) {
|
|
1072
913
|
const queryOptions = getAuthenticationInformationQueryOptions(options);
|
|
1073
914
|
const query = (0, import_react_query.useQuery)(queryOptions, queryClient);
|
|
1074
|
-
query
|
|
1075
|
-
return query;
|
|
915
|
+
return { ...query, queryKey: queryOptions.queryKey };
|
|
1076
916
|
}
|
|
1077
917
|
const getCreatePasswordUrl = () => {
|
|
1078
918
|
return `https://api.workos.com/_widgets/UserProfile/create-password`;
|
|
@@ -1102,8 +942,7 @@ const getCreatePasswordMutationOptions = (options) => {
|
|
|
1102
942
|
return { mutationFn, ...mutationOptions };
|
|
1103
943
|
};
|
|
1104
944
|
const useCreatePassword = (options, queryClient) => {
|
|
1105
|
-
|
|
1106
|
-
return (0, import_react_query.useMutation)(mutationOptions, queryClient);
|
|
945
|
+
return (0, import_react_query.useMutation)(getCreatePasswordMutationOptions(options), queryClient);
|
|
1107
946
|
};
|
|
1108
947
|
const getCreateTotpFactorUrl = () => {
|
|
1109
948
|
return `https://api.workos.com/_widgets/UserProfile/create-totp-factor`;
|
|
@@ -1130,8 +969,7 @@ const getCreateTotpFactorMutationOptions = (options) => {
|
|
|
1130
969
|
return { mutationFn, ...mutationOptions };
|
|
1131
970
|
};
|
|
1132
971
|
const useCreateTotpFactor = (options, queryClient) => {
|
|
1133
|
-
|
|
1134
|
-
return (0, import_react_query.useMutation)(mutationOptions, queryClient);
|
|
972
|
+
return (0, import_react_query.useMutation)(getCreateTotpFactorMutationOptions(options), queryClient);
|
|
1135
973
|
};
|
|
1136
974
|
const getMeUrl = () => {
|
|
1137
975
|
return `https://api.workos.com/_widgets/UserProfile/me`;
|
|
@@ -1157,8 +995,7 @@ const getMeQueryOptions = (options) => {
|
|
|
1157
995
|
function useMe(options, queryClient) {
|
|
1158
996
|
const queryOptions = getMeQueryOptions(options);
|
|
1159
997
|
const query = (0, import_react_query.useQuery)(queryOptions, queryClient);
|
|
1160
|
-
query
|
|
1161
|
-
return query;
|
|
998
|
+
return { ...query, queryKey: queryOptions.queryKey };
|
|
1162
999
|
}
|
|
1163
1000
|
const getUpdateMeUrl = () => {
|
|
1164
1001
|
return `https://api.workos.com/_widgets/UserProfile/me`;
|
|
@@ -1184,8 +1021,7 @@ const getUpdateMeMutationOptions = (options) => {
|
|
|
1184
1021
|
return { mutationFn, ...mutationOptions };
|
|
1185
1022
|
};
|
|
1186
1023
|
const useUpdateMe = (options, queryClient) => {
|
|
1187
|
-
|
|
1188
|
-
return (0, import_react_query.useMutation)(mutationOptions, queryClient);
|
|
1024
|
+
return (0, import_react_query.useMutation)(getUpdateMeMutationOptions(options), queryClient);
|
|
1189
1025
|
};
|
|
1190
1026
|
const getRegisterPasskeyUrl = () => {
|
|
1191
1027
|
return `https://api.workos.com/_widgets/UserProfile/passkeys`;
|
|
@@ -1212,8 +1048,7 @@ const getRegisterPasskeyMutationOptions = (options) => {
|
|
|
1212
1048
|
return { mutationFn, ...mutationOptions };
|
|
1213
1049
|
};
|
|
1214
1050
|
const useRegisterPasskey = (options, queryClient) => {
|
|
1215
|
-
|
|
1216
|
-
return (0, import_react_query.useMutation)(mutationOptions, queryClient);
|
|
1051
|
+
return (0, import_react_query.useMutation)(getRegisterPasskeyMutationOptions(options), queryClient);
|
|
1217
1052
|
};
|
|
1218
1053
|
const getVerifyPasskeyUrl = () => {
|
|
1219
1054
|
return `https://api.workos.com/_widgets/UserProfile/passkeys/verify`;
|
|
@@ -1243,8 +1078,7 @@ const getVerifyPasskeyMutationOptions = (options) => {
|
|
|
1243
1078
|
return { mutationFn, ...mutationOptions };
|
|
1244
1079
|
};
|
|
1245
1080
|
const useVerifyPasskey = (options, queryClient) => {
|
|
1246
|
-
|
|
1247
|
-
return (0, import_react_query.useMutation)(mutationOptions, queryClient);
|
|
1081
|
+
return (0, import_react_query.useMutation)(getVerifyPasskeyMutationOptions(options), queryClient);
|
|
1248
1082
|
};
|
|
1249
1083
|
const getDeletePasskeyUrl = (passkeyId) => {
|
|
1250
1084
|
return `https://api.workos.com/_widgets/UserProfile/passkeys/${passkeyId}`;
|
|
@@ -1272,8 +1106,7 @@ const getDeletePasskeyMutationOptions = (options) => {
|
|
|
1272
1106
|
return { mutationFn, ...mutationOptions };
|
|
1273
1107
|
};
|
|
1274
1108
|
const useDeletePasskey = (options, queryClient) => {
|
|
1275
|
-
|
|
1276
|
-
return (0, import_react_query.useMutation)(mutationOptions, queryClient);
|
|
1109
|
+
return (0, import_react_query.useMutation)(getDeletePasskeyMutationOptions(options), queryClient);
|
|
1277
1110
|
};
|
|
1278
1111
|
const getSendVerificationUrl = () => {
|
|
1279
1112
|
return `https://api.workos.com/_widgets/UserProfile/send-verification`;
|
|
@@ -1300,8 +1133,7 @@ const getSendVerificationMutationOptions = (options) => {
|
|
|
1300
1133
|
return { mutationFn, ...mutationOptions };
|
|
1301
1134
|
};
|
|
1302
1135
|
const useSendVerification = (options, queryClient) => {
|
|
1303
|
-
|
|
1304
|
-
return (0, import_react_query.useMutation)(mutationOptions, queryClient);
|
|
1136
|
+
return (0, import_react_query.useMutation)(getSendVerificationMutationOptions(options), queryClient);
|
|
1305
1137
|
};
|
|
1306
1138
|
const getSessionsUrl = () => {
|
|
1307
1139
|
return `https://api.workos.com/_widgets/UserProfile/sessions`;
|
|
@@ -1329,8 +1161,7 @@ const getSessionsQueryOptions = (options) => {
|
|
|
1329
1161
|
function useSessions(options, queryClient) {
|
|
1330
1162
|
const queryOptions = getSessionsQueryOptions(options);
|
|
1331
1163
|
const query = (0, import_react_query.useQuery)(queryOptions, queryClient);
|
|
1332
|
-
query
|
|
1333
|
-
return query;
|
|
1164
|
+
return { ...query, queryKey: queryOptions.queryKey };
|
|
1334
1165
|
}
|
|
1335
1166
|
const getRevokeAllSessionsUrl = () => {
|
|
1336
1167
|
return `https://api.workos.com/_widgets/UserProfile/sessions/revoke-all`;
|
|
@@ -1360,8 +1191,7 @@ const getRevokeAllSessionsMutationOptions = (options) => {
|
|
|
1360
1191
|
return { mutationFn, ...mutationOptions };
|
|
1361
1192
|
};
|
|
1362
1193
|
const useRevokeAllSessions = (options, queryClient) => {
|
|
1363
|
-
|
|
1364
|
-
return (0, import_react_query.useMutation)(mutationOptions, queryClient);
|
|
1194
|
+
return (0, import_react_query.useMutation)(getRevokeAllSessionsMutationOptions(options), queryClient);
|
|
1365
1195
|
};
|
|
1366
1196
|
const getRevokeSessionUrl = (sessionId) => {
|
|
1367
1197
|
return `https://api.workos.com/_widgets/UserProfile/sessions/revoke/${sessionId}`;
|
|
@@ -1389,8 +1219,7 @@ const getRevokeSessionMutationOptions = (options) => {
|
|
|
1389
1219
|
return { mutationFn, ...mutationOptions };
|
|
1390
1220
|
};
|
|
1391
1221
|
const useRevokeSession = (options, queryClient) => {
|
|
1392
|
-
|
|
1393
|
-
return (0, import_react_query.useMutation)(mutationOptions, queryClient);
|
|
1222
|
+
return (0, import_react_query.useMutation)(getRevokeSessionMutationOptions(options), queryClient);
|
|
1394
1223
|
};
|
|
1395
1224
|
const getDeleteTotpFactorsUrl = () => {
|
|
1396
1225
|
return `https://api.workos.com/_widgets/UserProfile/totp-factors`;
|
|
@@ -1417,8 +1246,7 @@ const getDeleteTotpFactorsMutationOptions = (options) => {
|
|
|
1417
1246
|
return { mutationFn, ...mutationOptions };
|
|
1418
1247
|
};
|
|
1419
1248
|
const useDeleteTotpFactors = (options, queryClient) => {
|
|
1420
|
-
|
|
1421
|
-
return (0, import_react_query.useMutation)(mutationOptions, queryClient);
|
|
1249
|
+
return (0, import_react_query.useMutation)(getDeleteTotpFactorsMutationOptions(options), queryClient);
|
|
1422
1250
|
};
|
|
1423
1251
|
const getUpdatePasswordUrl = () => {
|
|
1424
1252
|
return `https://api.workos.com/_widgets/UserProfile/update-password`;
|
|
@@ -1448,8 +1276,7 @@ const getUpdatePasswordMutationOptions = (options) => {
|
|
|
1448
1276
|
return { mutationFn, ...mutationOptions };
|
|
1449
1277
|
};
|
|
1450
1278
|
const useUpdatePassword = (options, queryClient) => {
|
|
1451
|
-
|
|
1452
|
-
return (0, import_react_query.useMutation)(mutationOptions, queryClient);
|
|
1279
|
+
return (0, import_react_query.useMutation)(getUpdatePasswordMutationOptions(options), queryClient);
|
|
1453
1280
|
};
|
|
1454
1281
|
const getVerifyUrl = () => {
|
|
1455
1282
|
return `https://api.workos.com/_widgets/UserProfile/verify`;
|
|
@@ -1475,8 +1302,7 @@ const getVerifyMutationOptions = (options) => {
|
|
|
1475
1302
|
return { mutationFn, ...mutationOptions };
|
|
1476
1303
|
};
|
|
1477
1304
|
const useVerify = (options, queryClient) => {
|
|
1478
|
-
|
|
1479
|
-
return (0, import_react_query.useMutation)(mutationOptions, queryClient);
|
|
1305
|
+
return (0, import_react_query.useMutation)(getVerifyMutationOptions(options), queryClient);
|
|
1480
1306
|
};
|
|
1481
1307
|
const getVerifyTotpFactorUrl = () => {
|
|
1482
1308
|
return `https://api.workos.com/_widgets/UserProfile/verify-totp-factor`;
|
|
@@ -1506,9 +1332,40 @@ const getVerifyTotpFactorMutationOptions = (options) => {
|
|
|
1506
1332
|
return { mutationFn, ...mutationOptions };
|
|
1507
1333
|
};
|
|
1508
1334
|
const useVerifyTotpFactor = (options, queryClient) => {
|
|
1509
|
-
|
|
1510
|
-
|
|
1335
|
+
return (0, import_react_query.useMutation)(getVerifyTotpFactorMutationOptions(options), queryClient);
|
|
1336
|
+
};
|
|
1337
|
+
const getGetAuditLogStreamUrl = () => {
|
|
1338
|
+
return `https://api.workos.com/_widgets/admin-portal/audit-log-stream`;
|
|
1511
1339
|
};
|
|
1340
|
+
const getAuditLogStream = async (options) => {
|
|
1341
|
+
const res = await fetch(getGetAuditLogStreamUrl(), {
|
|
1342
|
+
...options,
|
|
1343
|
+
method: "GET"
|
|
1344
|
+
});
|
|
1345
|
+
const body = [204, 205, 304].includes(res.status) ? null : await res.text();
|
|
1346
|
+
const data = body ? JSON.parse(body) : {};
|
|
1347
|
+
return {
|
|
1348
|
+
data,
|
|
1349
|
+
status: res.status,
|
|
1350
|
+
headers: res.headers
|
|
1351
|
+
};
|
|
1352
|
+
};
|
|
1353
|
+
const getGetAuditLogStreamQueryKey = () => {
|
|
1354
|
+
return [
|
|
1355
|
+
`https://api.workos.com/_widgets/admin-portal/audit-log-stream`
|
|
1356
|
+
];
|
|
1357
|
+
};
|
|
1358
|
+
const getGetAuditLogStreamQueryOptions = (options) => {
|
|
1359
|
+
const { query: queryOptions, fetch: fetchOptions } = options ?? {};
|
|
1360
|
+
const queryKey = queryOptions?.queryKey ?? getGetAuditLogStreamQueryKey();
|
|
1361
|
+
const queryFn = ({ signal }) => getAuditLogStream({ signal, ...fetchOptions });
|
|
1362
|
+
return { queryKey, queryFn, ...queryOptions };
|
|
1363
|
+
};
|
|
1364
|
+
function useGetAuditLogStream(options, queryClient) {
|
|
1365
|
+
const queryOptions = getGetAuditLogStreamQueryOptions(options);
|
|
1366
|
+
const query = (0, import_react_query.useQuery)(queryOptions, queryClient);
|
|
1367
|
+
return { ...query, queryKey: queryOptions.queryKey };
|
|
1368
|
+
}
|
|
1512
1369
|
const getGenerateAdminPortalLinkUrl = (params) => {
|
|
1513
1370
|
const normalizedParams = new URLSearchParams();
|
|
1514
1371
|
Object.entries(params || {}).forEach(([key, value]) => {
|
|
@@ -1542,8 +1399,10 @@ const getGenerateAdminPortalLinkMutationOptions = (options) => {
|
|
|
1542
1399
|
return { mutationFn, ...mutationOptions };
|
|
1543
1400
|
};
|
|
1544
1401
|
const useGenerateAdminPortalLink = (options, queryClient) => {
|
|
1545
|
-
|
|
1546
|
-
|
|
1402
|
+
return (0, import_react_query.useMutation)(
|
|
1403
|
+
getGenerateAdminPortalLinkMutationOptions(options),
|
|
1404
|
+
queryClient
|
|
1405
|
+
);
|
|
1547
1406
|
};
|
|
1548
1407
|
const getListOrganizationDomainsUrl = () => {
|
|
1549
1408
|
return `https://api.workos.com/_widgets/admin-portal/organization-domains`;
|
|
@@ -1575,8 +1434,7 @@ const getListOrganizationDomainsQueryOptions = (options) => {
|
|
|
1575
1434
|
function useListOrganizationDomains(options, queryClient) {
|
|
1576
1435
|
const queryOptions = getListOrganizationDomainsQueryOptions(options);
|
|
1577
1436
|
const query = (0, import_react_query.useQuery)(queryOptions, queryClient);
|
|
1578
|
-
query
|
|
1579
|
-
return query;
|
|
1437
|
+
return { ...query, queryKey: queryOptions.queryKey };
|
|
1580
1438
|
}
|
|
1581
1439
|
const getDeleteOrganizationDomainUrl = (domainId) => {
|
|
1582
1440
|
return `https://api.workos.com/_widgets/admin-portal/organization-domains/${domainId}`;
|
|
@@ -1604,8 +1462,10 @@ const getDeleteOrganizationDomainMutationOptions = (options) => {
|
|
|
1604
1462
|
return { mutationFn, ...mutationOptions };
|
|
1605
1463
|
};
|
|
1606
1464
|
const useDeleteOrganizationDomain = (options, queryClient) => {
|
|
1607
|
-
|
|
1608
|
-
|
|
1465
|
+
return (0, import_react_query.useMutation)(
|
|
1466
|
+
getDeleteOrganizationDomainMutationOptions(options),
|
|
1467
|
+
queryClient
|
|
1468
|
+
);
|
|
1609
1469
|
};
|
|
1610
1470
|
const getReverifyOrganizationDomainUrl = (domainId) => {
|
|
1611
1471
|
return `https://api.workos.com/_widgets/admin-portal/organization-domains/${domainId}/reverify`;
|
|
@@ -1633,8 +1493,10 @@ const getReverifyOrganizationDomainMutationOptions = (options) => {
|
|
|
1633
1493
|
return { mutationFn, ...mutationOptions };
|
|
1634
1494
|
};
|
|
1635
1495
|
const useReverifyOrganizationDomain = (options, queryClient) => {
|
|
1636
|
-
|
|
1637
|
-
|
|
1496
|
+
return (0, import_react_query.useMutation)(
|
|
1497
|
+
getReverifyOrganizationDomainMutationOptions(options),
|
|
1498
|
+
queryClient
|
|
1499
|
+
);
|
|
1638
1500
|
};
|
|
1639
1501
|
const getListSsoConnectionsUrl = () => {
|
|
1640
1502
|
return `https://api.workos.com/_widgets/admin-portal/sso-connections`;
|
|
@@ -1666,8 +1528,7 @@ const getListSsoConnectionsQueryOptions = (options) => {
|
|
|
1666
1528
|
function useListSsoConnections(options, queryClient) {
|
|
1667
1529
|
const queryOptions = getListSsoConnectionsQueryOptions(options);
|
|
1668
1530
|
const query = (0, import_react_query.useQuery)(queryOptions, queryClient);
|
|
1669
|
-
query
|
|
1670
|
-
return query;
|
|
1531
|
+
return { ...query, queryKey: queryOptions.queryKey };
|
|
1671
1532
|
}
|
|
1672
1533
|
const getListDirectoriesUrl = () => {
|
|
1673
1534
|
return `https://api.workos.com/_widgets/directory-sync/directories`;
|
|
@@ -1701,8 +1562,46 @@ const getListDirectoriesQueryOptions = (options) => {
|
|
|
1701
1562
|
function useListDirectories(options, queryClient) {
|
|
1702
1563
|
const queryOptions = getListDirectoriesQueryOptions(options);
|
|
1703
1564
|
const query = (0, import_react_query.useQuery)(queryOptions, queryClient);
|
|
1704
|
-
query
|
|
1705
|
-
|
|
1565
|
+
return { ...query, queryKey: queryOptions.queryKey };
|
|
1566
|
+
}
|
|
1567
|
+
const getGetDirectoryUrl = (directoryId) => {
|
|
1568
|
+
return `https://api.workos.com/_widgets/directory-sync/directories/${directoryId}`;
|
|
1569
|
+
};
|
|
1570
|
+
const getDirectory = async (directoryId, options) => {
|
|
1571
|
+
const res = await fetch(getGetDirectoryUrl(directoryId), {
|
|
1572
|
+
...options,
|
|
1573
|
+
method: "GET"
|
|
1574
|
+
});
|
|
1575
|
+
const body = [204, 205, 304].includes(res.status) ? null : await res.text();
|
|
1576
|
+
const data = body ? JSON.parse(body) : {};
|
|
1577
|
+
return {
|
|
1578
|
+
data,
|
|
1579
|
+
status: res.status,
|
|
1580
|
+
headers: res.headers
|
|
1581
|
+
};
|
|
1582
|
+
};
|
|
1583
|
+
const getGetDirectoryQueryKey = (directoryId) => {
|
|
1584
|
+
return [
|
|
1585
|
+
`https://api.workos.com/_widgets/directory-sync/directories/${directoryId}`
|
|
1586
|
+
];
|
|
1587
|
+
};
|
|
1588
|
+
const getGetDirectoryQueryOptions = (directoryId, options) => {
|
|
1589
|
+
const { query: queryOptions, fetch: fetchOptions } = options ?? {};
|
|
1590
|
+
const queryKey = queryOptions?.queryKey ?? getGetDirectoryQueryKey(directoryId);
|
|
1591
|
+
const queryFn = ({
|
|
1592
|
+
signal
|
|
1593
|
+
}) => getDirectory(directoryId, { signal, ...fetchOptions });
|
|
1594
|
+
return {
|
|
1595
|
+
queryKey,
|
|
1596
|
+
queryFn,
|
|
1597
|
+
enabled: !!directoryId,
|
|
1598
|
+
...queryOptions
|
|
1599
|
+
};
|
|
1600
|
+
};
|
|
1601
|
+
function useGetDirectory(directoryId, options, queryClient) {
|
|
1602
|
+
const queryOptions = getGetDirectoryQueryOptions(directoryId, options);
|
|
1603
|
+
const query = (0, import_react_query.useQuery)(queryOptions, queryClient);
|
|
1604
|
+
return { ...query, queryKey: queryOptions.queryKey };
|
|
1706
1605
|
}
|
|
1707
1606
|
const getSettingsUrl = () => {
|
|
1708
1607
|
return `https://api.workos.com/_widgets/settings`;
|
|
@@ -1730,23 +1629,10 @@ const getSettingsQueryOptions = (options) => {
|
|
|
1730
1629
|
function useSettings(options, queryClient) {
|
|
1731
1630
|
const queryOptions = getSettingsQueryOptions(options);
|
|
1732
1631
|
const query = (0, import_react_query.useQuery)(queryOptions, queryClient);
|
|
1733
|
-
query
|
|
1734
|
-
return query;
|
|
1632
|
+
return { ...query, queryKey: queryOptions.queryKey };
|
|
1735
1633
|
}
|
|
1736
1634
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1737
1635
|
0 && (module.exports = {
|
|
1738
|
-
AuthenticationInformationResponseDataVerificationMethodsMfaOneOfProvider,
|
|
1739
|
-
AuthenticationInformationResponseDataVerificationMethodsPasskeyOneOfProvider,
|
|
1740
|
-
AuthenticationInformationResponseDataVerificationMethodsPasswordOneOfProvider,
|
|
1741
|
-
CreateTotpFactorResponseAuthenticationChallengeAllOfObject,
|
|
1742
|
-
CreateTotpFactorResponseAuthenticationFactorAllOfObject,
|
|
1743
|
-
CreateTotpFactorResponseAuthenticationFactorAllOfType,
|
|
1744
|
-
DataInstallationAllOfObject,
|
|
1745
|
-
DataInstallationAllOfState,
|
|
1746
|
-
DataIntegrationCredentialsType,
|
|
1747
|
-
DataIntegrationIntegrationType,
|
|
1748
|
-
DataIntegrationObject,
|
|
1749
|
-
DataIntegrationOwnership,
|
|
1750
1636
|
DirectoryState,
|
|
1751
1637
|
DirectoryType,
|
|
1752
1638
|
DomainVerificationNameServer,
|
|
@@ -1756,14 +1642,6 @@ function useSettings(options, queryClient) {
|
|
|
1756
1642
|
OidcSessionState,
|
|
1757
1643
|
OrganizationDomainState,
|
|
1758
1644
|
SamlSessionState,
|
|
1759
|
-
SendVerificationResponseType,
|
|
1760
|
-
SettingsResponseObject,
|
|
1761
|
-
SsoConnectionAnyOfEightAllOfProviderTag,
|
|
1762
|
-
SsoConnectionAnyOfEightAllOfState,
|
|
1763
|
-
SsoConnectionAnyOfEightAllOfType,
|
|
1764
|
-
SsoConnectionAnyOfProviderTag,
|
|
1765
|
-
SsoConnectionAnyOfState,
|
|
1766
|
-
SsoConnectionAnyOfType,
|
|
1767
1645
|
SsoConnectionSessionJSONState,
|
|
1768
1646
|
authenticationInformation,
|
|
1769
1647
|
createOrganizationApiKey,
|
|
@@ -1775,6 +1653,7 @@ function useSettings(options, queryClient) {
|
|
|
1775
1653
|
deletePasskey,
|
|
1776
1654
|
deleteTotpFactors,
|
|
1777
1655
|
generateAdminPortalLink,
|
|
1656
|
+
getAuditLogStream,
|
|
1778
1657
|
getAuthenticationInformationQueryKey,
|
|
1779
1658
|
getAuthenticationInformationQueryOptions,
|
|
1780
1659
|
getAuthenticationInformationUrl,
|
|
@@ -1796,14 +1675,21 @@ function useSettings(options, queryClient) {
|
|
|
1796
1675
|
getDeletePasskeyUrl,
|
|
1797
1676
|
getDeleteTotpFactorsMutationOptions,
|
|
1798
1677
|
getDeleteTotpFactorsUrl,
|
|
1678
|
+
getDirectory,
|
|
1799
1679
|
getGenerateAdminPortalLinkMutationOptions,
|
|
1800
1680
|
getGenerateAdminPortalLinkUrl,
|
|
1681
|
+
getGetAuditLogStreamQueryKey,
|
|
1682
|
+
getGetAuditLogStreamQueryOptions,
|
|
1683
|
+
getGetAuditLogStreamUrl,
|
|
1801
1684
|
getGetDataInstallationAuthorizationStatusQueryKey,
|
|
1802
1685
|
getGetDataInstallationAuthorizationStatusQueryOptions,
|
|
1803
1686
|
getGetDataInstallationAuthorizationStatusUrl,
|
|
1804
1687
|
getGetDataIntegrationAuthorizeUrlQueryKey,
|
|
1805
1688
|
getGetDataIntegrationAuthorizeUrlQueryOptions,
|
|
1806
1689
|
getGetDataIntegrationAuthorizeUrlUrl,
|
|
1690
|
+
getGetDirectoryQueryKey,
|
|
1691
|
+
getGetDirectoryQueryOptions,
|
|
1692
|
+
getGetDirectoryUrl,
|
|
1807
1693
|
getInviteMemberMutationOptions,
|
|
1808
1694
|
getInviteMemberUrl,
|
|
1809
1695
|
getListDirectoriesQueryKey,
|
|
@@ -1908,8 +1794,10 @@ function useSettings(options, queryClient) {
|
|
|
1908
1794
|
useDeletePasskey,
|
|
1909
1795
|
useDeleteTotpFactors,
|
|
1910
1796
|
useGenerateAdminPortalLink,
|
|
1797
|
+
useGetAuditLogStream,
|
|
1911
1798
|
useGetDataInstallationAuthorizationStatus,
|
|
1912
1799
|
useGetDataIntegrationAuthorizeUrl,
|
|
1800
|
+
useGetDirectory,
|
|
1913
1801
|
useInviteMember,
|
|
1914
1802
|
useListDirectories,
|
|
1915
1803
|
useListOrganizationApiKeyPermissions,
|