@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
|
@@ -28,18 +28,6 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
29
|
var swr_exports = {};
|
|
30
30
|
__export(swr_exports, {
|
|
31
|
-
AuthenticationInformationResponseDataVerificationMethodsMfaOneOfProvider: () => AuthenticationInformationResponseDataVerificationMethodsMfaOneOfProvider,
|
|
32
|
-
AuthenticationInformationResponseDataVerificationMethodsPasskeyOneOfProvider: () => AuthenticationInformationResponseDataVerificationMethodsPasskeyOneOfProvider,
|
|
33
|
-
AuthenticationInformationResponseDataVerificationMethodsPasswordOneOfProvider: () => AuthenticationInformationResponseDataVerificationMethodsPasswordOneOfProvider,
|
|
34
|
-
CreateTotpFactorResponseAuthenticationChallengeAllOfObject: () => CreateTotpFactorResponseAuthenticationChallengeAllOfObject,
|
|
35
|
-
CreateTotpFactorResponseAuthenticationFactorAllOfObject: () => CreateTotpFactorResponseAuthenticationFactorAllOfObject,
|
|
36
|
-
CreateTotpFactorResponseAuthenticationFactorAllOfType: () => CreateTotpFactorResponseAuthenticationFactorAllOfType,
|
|
37
|
-
DataInstallationAllOfObject: () => DataInstallationAllOfObject,
|
|
38
|
-
DataInstallationAllOfState: () => DataInstallationAllOfState,
|
|
39
|
-
DataIntegrationCredentialsType: () => DataIntegrationCredentialsType,
|
|
40
|
-
DataIntegrationIntegrationType: () => DataIntegrationIntegrationType,
|
|
41
|
-
DataIntegrationObject: () => DataIntegrationObject,
|
|
42
|
-
DataIntegrationOwnership: () => DataIntegrationOwnership,
|
|
43
31
|
DirectoryState: () => DirectoryState,
|
|
44
32
|
DirectoryType: () => DirectoryType,
|
|
45
33
|
DomainVerificationNameServer: () => DomainVerificationNameServer,
|
|
@@ -49,14 +37,6 @@ __export(swr_exports, {
|
|
|
49
37
|
OidcSessionState: () => OidcSessionState,
|
|
50
38
|
OrganizationDomainState: () => OrganizationDomainState,
|
|
51
39
|
SamlSessionState: () => SamlSessionState,
|
|
52
|
-
SendVerificationResponseType: () => SendVerificationResponseType,
|
|
53
|
-
SettingsResponseObject: () => SettingsResponseObject,
|
|
54
|
-
SsoConnectionAnyOfEightAllOfProviderTag: () => SsoConnectionAnyOfEightAllOfProviderTag,
|
|
55
|
-
SsoConnectionAnyOfEightAllOfState: () => SsoConnectionAnyOfEightAllOfState,
|
|
56
|
-
SsoConnectionAnyOfEightAllOfType: () => SsoConnectionAnyOfEightAllOfType,
|
|
57
|
-
SsoConnectionAnyOfProviderTag: () => SsoConnectionAnyOfProviderTag,
|
|
58
|
-
SsoConnectionAnyOfState: () => SsoConnectionAnyOfState,
|
|
59
|
-
SsoConnectionAnyOfType: () => SsoConnectionAnyOfType,
|
|
60
40
|
SsoConnectionSessionJSONState: () => SsoConnectionSessionJSONState,
|
|
61
41
|
authenticationInformation: () => authenticationInformation,
|
|
62
42
|
createOrganizationApiKey: () => createOrganizationApiKey,
|
|
@@ -68,6 +48,7 @@ __export(swr_exports, {
|
|
|
68
48
|
deletePasskey: () => deletePasskey,
|
|
69
49
|
deleteTotpFactors: () => deleteTotpFactors,
|
|
70
50
|
generateAdminPortalLink: () => generateAdminPortalLink,
|
|
51
|
+
getAuditLogStream: () => getAuditLogStream,
|
|
71
52
|
getAuthenticationInformationKey: () => getAuthenticationInformationKey,
|
|
72
53
|
getAuthenticationInformationUrl: () => getAuthenticationInformationUrl,
|
|
73
54
|
getCreateOrganizationApiKeyMutationFetcher: () => getCreateOrganizationApiKeyMutationFetcher,
|
|
@@ -96,13 +77,18 @@ __export(swr_exports, {
|
|
|
96
77
|
getDeleteTotpFactorsMutationFetcher: () => getDeleteTotpFactorsMutationFetcher,
|
|
97
78
|
getDeleteTotpFactorsMutationKey: () => getDeleteTotpFactorsMutationKey,
|
|
98
79
|
getDeleteTotpFactorsUrl: () => getDeleteTotpFactorsUrl,
|
|
80
|
+
getDirectory: () => getDirectory,
|
|
99
81
|
getGenerateAdminPortalLinkMutationFetcher: () => getGenerateAdminPortalLinkMutationFetcher,
|
|
100
82
|
getGenerateAdminPortalLinkMutationKey: () => getGenerateAdminPortalLinkMutationKey,
|
|
101
83
|
getGenerateAdminPortalLinkUrl: () => getGenerateAdminPortalLinkUrl,
|
|
84
|
+
getGetAuditLogStreamKey: () => getGetAuditLogStreamKey,
|
|
85
|
+
getGetAuditLogStreamUrl: () => getGetAuditLogStreamUrl,
|
|
102
86
|
getGetDataInstallationAuthorizationStatusKey: () => getGetDataInstallationAuthorizationStatusKey,
|
|
103
87
|
getGetDataInstallationAuthorizationStatusUrl: () => getGetDataInstallationAuthorizationStatusUrl,
|
|
104
88
|
getGetDataIntegrationAuthorizeUrlKey: () => getGetDataIntegrationAuthorizeUrlKey,
|
|
105
89
|
getGetDataIntegrationAuthorizeUrlUrl: () => getGetDataIntegrationAuthorizeUrlUrl,
|
|
90
|
+
getGetDirectoryKey: () => getGetDirectoryKey,
|
|
91
|
+
getGetDirectoryUrl: () => getGetDirectoryUrl,
|
|
106
92
|
getInviteMemberMutationFetcher: () => getInviteMemberMutationFetcher,
|
|
107
93
|
getInviteMemberMutationKey: () => getInviteMemberMutationKey,
|
|
108
94
|
getInviteMemberUrl: () => getInviteMemberUrl,
|
|
@@ -209,8 +195,10 @@ __export(swr_exports, {
|
|
|
209
195
|
useDeletePasskey: () => useDeletePasskey,
|
|
210
196
|
useDeleteTotpFactors: () => useDeleteTotpFactors,
|
|
211
197
|
useGenerateAdminPortalLink: () => useGenerateAdminPortalLink,
|
|
198
|
+
useGetAuditLogStream: () => useGetAuditLogStream,
|
|
212
199
|
useGetDataInstallationAuthorizationStatus: () => useGetDataInstallationAuthorizationStatus,
|
|
213
200
|
useGetDataIntegrationAuthorizeUrl: () => useGetDataIntegrationAuthorizeUrl,
|
|
201
|
+
useGetDirectory: () => useGetDirectory,
|
|
214
202
|
useInviteMember: () => useInviteMember,
|
|
215
203
|
useListDirectories: () => useListDirectories,
|
|
216
204
|
useListOrganizationApiKeyPermissions: () => useListOrganizationApiKeyPermissions,
|
|
@@ -259,33 +247,6 @@ const MemberActionsItem = {
|
|
|
259
247
|
"revoke-invite": "revoke-invite",
|
|
260
248
|
"revoke-membership": "revoke-membership"
|
|
261
249
|
};
|
|
262
|
-
const CreateTotpFactorResponseAuthenticationFactorAllOfObject = {
|
|
263
|
-
authentication_factor: "authentication_factor"
|
|
264
|
-
};
|
|
265
|
-
const CreateTotpFactorResponseAuthenticationFactorAllOfType = {
|
|
266
|
-
generic_otp: "generic_otp",
|
|
267
|
-
sms: "sms",
|
|
268
|
-
totp: "totp",
|
|
269
|
-
webauthn: "webauthn"
|
|
270
|
-
};
|
|
271
|
-
const CreateTotpFactorResponseAuthenticationChallengeAllOfObject = {
|
|
272
|
-
authentication_challenge: "authentication_challenge"
|
|
273
|
-
};
|
|
274
|
-
const AuthenticationInformationResponseDataVerificationMethodsMfaOneOfProvider = {
|
|
275
|
-
MFA: "MFA"
|
|
276
|
-
};
|
|
277
|
-
const AuthenticationInformationResponseDataVerificationMethodsPasswordOneOfProvider = {
|
|
278
|
-
Password: "Password"
|
|
279
|
-
};
|
|
280
|
-
const AuthenticationInformationResponseDataVerificationMethodsPasskeyOneOfProvider = {
|
|
281
|
-
Passkey: "Passkey"
|
|
282
|
-
};
|
|
283
|
-
const SendVerificationResponseType = {
|
|
284
|
-
EmailVerification: "EmailVerification"
|
|
285
|
-
};
|
|
286
|
-
const SettingsResponseObject = {
|
|
287
|
-
settings: "settings"
|
|
288
|
-
};
|
|
289
250
|
const OrganizationDomainState = {
|
|
290
251
|
Failed: "Failed",
|
|
291
252
|
LegacyVerified: "LegacyVerified",
|
|
@@ -318,121 +279,6 @@ const SsoConnectionSessionJSONState = {
|
|
|
318
279
|
...SamlSessionState,
|
|
319
280
|
...OidcSessionState
|
|
320
281
|
};
|
|
321
|
-
const SsoConnectionAnyOfType = {
|
|
322
|
-
AdfsSaml: "AdfsSaml",
|
|
323
|
-
Auth0Saml: "Auth0Saml",
|
|
324
|
-
AzureSaml: "AzureSaml",
|
|
325
|
-
CasSaml: "CasSaml",
|
|
326
|
-
ClassLinkSaml: "ClassLinkSaml",
|
|
327
|
-
CloudflareSaml: "CloudflareSaml",
|
|
328
|
-
CyberArkSaml: "CyberArkSaml",
|
|
329
|
-
DuoSaml: "DuoSaml",
|
|
330
|
-
GenericSaml: "GenericSaml",
|
|
331
|
-
GoogleSaml: "GoogleSaml",
|
|
332
|
-
JumpCloudSaml: "JumpCloudSaml",
|
|
333
|
-
KeycloakSaml: "KeycloakSaml",
|
|
334
|
-
LastPassSaml: "LastPassSaml",
|
|
335
|
-
MiniOrangeSaml: "MiniOrangeSaml",
|
|
336
|
-
NetIqSaml: "NetIqSaml",
|
|
337
|
-
OktaSaml: "OktaSaml",
|
|
338
|
-
OneLoginSaml: "OneLoginSaml",
|
|
339
|
-
OracleSaml: "OracleSaml",
|
|
340
|
-
PingFederateSaml: "PingFederateSaml",
|
|
341
|
-
PingOneSaml: "PingOneSaml",
|
|
342
|
-
RipplingSaml: "RipplingSaml",
|
|
343
|
-
SalesforceSaml: "SalesforceSaml",
|
|
344
|
-
ShibbolethGenericSaml: "ShibbolethGenericSaml",
|
|
345
|
-
ShibbolethSaml: "ShibbolethSaml",
|
|
346
|
-
SimpleSamlPhpSaml: "SimpleSamlPhpSaml",
|
|
347
|
-
TestIdp: "TestIdp",
|
|
348
|
-
VmWareSaml: "VmWareSaml"
|
|
349
|
-
};
|
|
350
|
-
const SsoConnectionAnyOfState = {
|
|
351
|
-
Inactive: "Inactive",
|
|
352
|
-
Validating: "Validating",
|
|
353
|
-
Active: "Active",
|
|
354
|
-
Deleting: "Deleting"
|
|
355
|
-
};
|
|
356
|
-
const SsoConnectionAnyOfProviderTag = {
|
|
357
|
-
Saml: "Saml"
|
|
358
|
-
};
|
|
359
|
-
const SsoConnectionAnyOfEightAllOfState = {
|
|
360
|
-
Inactive: "Inactive",
|
|
361
|
-
Validating: "Validating",
|
|
362
|
-
Active: "Active",
|
|
363
|
-
Deleting: "Deleting"
|
|
364
|
-
};
|
|
365
|
-
const SsoConnectionAnyOfEightAllOfType = {
|
|
366
|
-
AdpOidc: "AdpOidc",
|
|
367
|
-
Auth0Migration: "Auth0Migration",
|
|
368
|
-
CleverOidc: "CleverOidc",
|
|
369
|
-
EntraIdOidc: "EntraIdOidc",
|
|
370
|
-
GenericOidc: "GenericOidc",
|
|
371
|
-
GoogleOidc: "GoogleOidc",
|
|
372
|
-
OktaOidc: "OktaOidc",
|
|
373
|
-
LoginGovOidc: "LoginGovOidc"
|
|
374
|
-
};
|
|
375
|
-
const SsoConnectionAnyOfEightAllOfProviderTag = {
|
|
376
|
-
OpenIdConnect: "OpenIdConnect"
|
|
377
|
-
};
|
|
378
|
-
const DataInstallationAllOfObject = {
|
|
379
|
-
data_installation: "data_installation",
|
|
380
|
-
connected_account: "connected_account"
|
|
381
|
-
};
|
|
382
|
-
const DataInstallationAllOfState = {
|
|
383
|
-
connected: "connected",
|
|
384
|
-
needs_reauthorization: "needs_reauthorization"
|
|
385
|
-
};
|
|
386
|
-
const DataIntegrationObject = {
|
|
387
|
-
data_integration: "data_integration"
|
|
388
|
-
};
|
|
389
|
-
const DataIntegrationIntegrationType = {
|
|
390
|
-
asana: "asana",
|
|
391
|
-
box: "box",
|
|
392
|
-
"cal-dot-com": "cal-dot-com",
|
|
393
|
-
calendly: "calendly",
|
|
394
|
-
confluence: "confluence",
|
|
395
|
-
dropbox: "dropbox",
|
|
396
|
-
"frame-io": "frame-io",
|
|
397
|
-
front: "front",
|
|
398
|
-
github: "github",
|
|
399
|
-
gitlab: "gitlab",
|
|
400
|
-
gmail: "gmail",
|
|
401
|
-
google: "google",
|
|
402
|
-
"google-calendar": "google-calendar",
|
|
403
|
-
"google-drive": "google-drive",
|
|
404
|
-
helpscout: "helpscout",
|
|
405
|
-
hubspot: "hubspot",
|
|
406
|
-
intercom: "intercom",
|
|
407
|
-
jira: "jira",
|
|
408
|
-
linear: "linear",
|
|
409
|
-
microsoft: "microsoft",
|
|
410
|
-
"microsoft-onedrive": "microsoft-onedrive",
|
|
411
|
-
"microsoft-onenote": "microsoft-onenote",
|
|
412
|
-
"microsoft-outlook": "microsoft-outlook",
|
|
413
|
-
"microsoft-outlook-calendar": "microsoft-outlook-calendar",
|
|
414
|
-
"microsoft-sharepoint": "microsoft-sharepoint",
|
|
415
|
-
"microsoft-teams": "microsoft-teams",
|
|
416
|
-
"microsoft-todo": "microsoft-todo",
|
|
417
|
-
notion: "notion",
|
|
418
|
-
prefect: "prefect",
|
|
419
|
-
"pydantic-logfire": "pydantic-logfire",
|
|
420
|
-
salesforce: "salesforce",
|
|
421
|
-
sentry: "sentry",
|
|
422
|
-
slack: "slack",
|
|
423
|
-
snowflake: "snowflake",
|
|
424
|
-
stripe: "stripe",
|
|
425
|
-
xero: "xero",
|
|
426
|
-
zendesk: "zendesk"
|
|
427
|
-
};
|
|
428
|
-
const DataIntegrationOwnership = {
|
|
429
|
-
userland_user: "userland_user",
|
|
430
|
-
organization: "organization"
|
|
431
|
-
};
|
|
432
|
-
const DataIntegrationCredentialsType = {
|
|
433
|
-
shared: "shared",
|
|
434
|
-
custom: "custom"
|
|
435
|
-
};
|
|
436
282
|
const DirectoryType = {
|
|
437
283
|
azure_scim_v20: "azure scim v2.0",
|
|
438
284
|
bamboohr: "bamboohr",
|
|
@@ -468,7 +314,8 @@ const DirectoryState = {
|
|
|
468
314
|
};
|
|
469
315
|
const GenerateAdminPortalLinkIntent = {
|
|
470
316
|
domain_verification: "domain_verification",
|
|
471
|
-
sso: "sso"
|
|
317
|
+
sso: "sso",
|
|
318
|
+
log_streams: "log_streams"
|
|
472
319
|
};
|
|
473
320
|
const getCreateOrganizationApiKeyUrl = () => {
|
|
474
321
|
return `https://api.workos.com/_widgets/ApiKeys/organization-api-keys`;
|
|
@@ -1587,6 +1434,38 @@ const useVerifyTotpFactor = (options) => {
|
|
|
1587
1434
|
...query
|
|
1588
1435
|
};
|
|
1589
1436
|
};
|
|
1437
|
+
const getGetAuditLogStreamUrl = () => {
|
|
1438
|
+
return `https://api.workos.com/_widgets/admin-portal/audit-log-stream`;
|
|
1439
|
+
};
|
|
1440
|
+
const getAuditLogStream = async (options) => {
|
|
1441
|
+
const res = await fetch(getGetAuditLogStreamUrl(), {
|
|
1442
|
+
...options,
|
|
1443
|
+
method: "GET"
|
|
1444
|
+
});
|
|
1445
|
+
const body = [204, 205, 304].includes(res.status) ? null : await res.text();
|
|
1446
|
+
const data = body ? JSON.parse(body) : {};
|
|
1447
|
+
return {
|
|
1448
|
+
data,
|
|
1449
|
+
status: res.status,
|
|
1450
|
+
headers: res.headers
|
|
1451
|
+
};
|
|
1452
|
+
};
|
|
1453
|
+
const getGetAuditLogStreamKey = () => [`https://api.workos.com/_widgets/admin-portal/audit-log-stream`];
|
|
1454
|
+
const useGetAuditLogStream = (options) => {
|
|
1455
|
+
const { swr: swrOptions, fetch: fetchOptions } = options ?? {};
|
|
1456
|
+
const isEnabled = swrOptions?.enabled !== false;
|
|
1457
|
+
const swrKey = swrOptions?.swrKey ?? (() => isEnabled ? getGetAuditLogStreamKey() : null);
|
|
1458
|
+
const swrFn = () => getAuditLogStream(fetchOptions);
|
|
1459
|
+
const query = (0, import_swr.default)(
|
|
1460
|
+
swrKey,
|
|
1461
|
+
swrFn,
|
|
1462
|
+
swrOptions
|
|
1463
|
+
);
|
|
1464
|
+
return {
|
|
1465
|
+
swrKey,
|
|
1466
|
+
...query
|
|
1467
|
+
};
|
|
1468
|
+
};
|
|
1590
1469
|
const getGenerateAdminPortalLinkUrl = (params) => {
|
|
1591
1470
|
const normalizedParams = new URLSearchParams();
|
|
1592
1471
|
Object.entries(params || {}).forEach(([key, value]) => {
|
|
@@ -1801,6 +1680,40 @@ const useListDirectories = (options) => {
|
|
|
1801
1680
|
...query
|
|
1802
1681
|
};
|
|
1803
1682
|
};
|
|
1683
|
+
const getGetDirectoryUrl = (directoryId) => {
|
|
1684
|
+
return `https://api.workos.com/_widgets/directory-sync/directories/${directoryId}`;
|
|
1685
|
+
};
|
|
1686
|
+
const getDirectory = async (directoryId, options) => {
|
|
1687
|
+
const res = await fetch(getGetDirectoryUrl(directoryId), {
|
|
1688
|
+
...options,
|
|
1689
|
+
method: "GET"
|
|
1690
|
+
});
|
|
1691
|
+
const body = [204, 205, 304].includes(res.status) ? null : await res.text();
|
|
1692
|
+
const data = body ? JSON.parse(body) : {};
|
|
1693
|
+
return {
|
|
1694
|
+
data,
|
|
1695
|
+
status: res.status,
|
|
1696
|
+
headers: res.headers
|
|
1697
|
+
};
|
|
1698
|
+
};
|
|
1699
|
+
const getGetDirectoryKey = (directoryId) => [
|
|
1700
|
+
`https://api.workos.com/_widgets/directory-sync/directories/${directoryId}`
|
|
1701
|
+
];
|
|
1702
|
+
const useGetDirectory = (directoryId, options) => {
|
|
1703
|
+
const { swr: swrOptions, fetch: fetchOptions } = options ?? {};
|
|
1704
|
+
const isEnabled = swrOptions?.enabled !== false && !!directoryId;
|
|
1705
|
+
const swrKey = swrOptions?.swrKey ?? (() => isEnabled ? getGetDirectoryKey(directoryId) : null);
|
|
1706
|
+
const swrFn = () => getDirectory(directoryId, fetchOptions);
|
|
1707
|
+
const query = (0, import_swr.default)(
|
|
1708
|
+
swrKey,
|
|
1709
|
+
swrFn,
|
|
1710
|
+
swrOptions
|
|
1711
|
+
);
|
|
1712
|
+
return {
|
|
1713
|
+
swrKey,
|
|
1714
|
+
...query
|
|
1715
|
+
};
|
|
1716
|
+
};
|
|
1804
1717
|
const getSettingsUrl = () => {
|
|
1805
1718
|
return `https://api.workos.com/_widgets/settings`;
|
|
1806
1719
|
};
|
|
@@ -1831,18 +1744,6 @@ const useSettings = (options) => {
|
|
|
1831
1744
|
};
|
|
1832
1745
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1833
1746
|
0 && (module.exports = {
|
|
1834
|
-
AuthenticationInformationResponseDataVerificationMethodsMfaOneOfProvider,
|
|
1835
|
-
AuthenticationInformationResponseDataVerificationMethodsPasskeyOneOfProvider,
|
|
1836
|
-
AuthenticationInformationResponseDataVerificationMethodsPasswordOneOfProvider,
|
|
1837
|
-
CreateTotpFactorResponseAuthenticationChallengeAllOfObject,
|
|
1838
|
-
CreateTotpFactorResponseAuthenticationFactorAllOfObject,
|
|
1839
|
-
CreateTotpFactorResponseAuthenticationFactorAllOfType,
|
|
1840
|
-
DataInstallationAllOfObject,
|
|
1841
|
-
DataInstallationAllOfState,
|
|
1842
|
-
DataIntegrationCredentialsType,
|
|
1843
|
-
DataIntegrationIntegrationType,
|
|
1844
|
-
DataIntegrationObject,
|
|
1845
|
-
DataIntegrationOwnership,
|
|
1846
1747
|
DirectoryState,
|
|
1847
1748
|
DirectoryType,
|
|
1848
1749
|
DomainVerificationNameServer,
|
|
@@ -1852,14 +1753,6 @@ const useSettings = (options) => {
|
|
|
1852
1753
|
OidcSessionState,
|
|
1853
1754
|
OrganizationDomainState,
|
|
1854
1755
|
SamlSessionState,
|
|
1855
|
-
SendVerificationResponseType,
|
|
1856
|
-
SettingsResponseObject,
|
|
1857
|
-
SsoConnectionAnyOfEightAllOfProviderTag,
|
|
1858
|
-
SsoConnectionAnyOfEightAllOfState,
|
|
1859
|
-
SsoConnectionAnyOfEightAllOfType,
|
|
1860
|
-
SsoConnectionAnyOfProviderTag,
|
|
1861
|
-
SsoConnectionAnyOfState,
|
|
1862
|
-
SsoConnectionAnyOfType,
|
|
1863
1756
|
SsoConnectionSessionJSONState,
|
|
1864
1757
|
authenticationInformation,
|
|
1865
1758
|
createOrganizationApiKey,
|
|
@@ -1871,6 +1764,7 @@ const useSettings = (options) => {
|
|
|
1871
1764
|
deletePasskey,
|
|
1872
1765
|
deleteTotpFactors,
|
|
1873
1766
|
generateAdminPortalLink,
|
|
1767
|
+
getAuditLogStream,
|
|
1874
1768
|
getAuthenticationInformationKey,
|
|
1875
1769
|
getAuthenticationInformationUrl,
|
|
1876
1770
|
getCreateOrganizationApiKeyMutationFetcher,
|
|
@@ -1899,13 +1793,18 @@ const useSettings = (options) => {
|
|
|
1899
1793
|
getDeleteTotpFactorsMutationFetcher,
|
|
1900
1794
|
getDeleteTotpFactorsMutationKey,
|
|
1901
1795
|
getDeleteTotpFactorsUrl,
|
|
1796
|
+
getDirectory,
|
|
1902
1797
|
getGenerateAdminPortalLinkMutationFetcher,
|
|
1903
1798
|
getGenerateAdminPortalLinkMutationKey,
|
|
1904
1799
|
getGenerateAdminPortalLinkUrl,
|
|
1800
|
+
getGetAuditLogStreamKey,
|
|
1801
|
+
getGetAuditLogStreamUrl,
|
|
1905
1802
|
getGetDataInstallationAuthorizationStatusKey,
|
|
1906
1803
|
getGetDataInstallationAuthorizationStatusUrl,
|
|
1907
1804
|
getGetDataIntegrationAuthorizeUrlKey,
|
|
1908
1805
|
getGetDataIntegrationAuthorizeUrlUrl,
|
|
1806
|
+
getGetDirectoryKey,
|
|
1807
|
+
getGetDirectoryUrl,
|
|
1909
1808
|
getInviteMemberMutationFetcher,
|
|
1910
1809
|
getInviteMemberMutationKey,
|
|
1911
1810
|
getInviteMemberUrl,
|
|
@@ -2012,8 +1911,10 @@ const useSettings = (options) => {
|
|
|
2012
1911
|
useDeletePasskey,
|
|
2013
1912
|
useDeleteTotpFactors,
|
|
2014
1913
|
useGenerateAdminPortalLink,
|
|
1914
|
+
useGetAuditLogStream,
|
|
2015
1915
|
useGetDataInstallationAuthorizationStatus,
|
|
2016
1916
|
useGetDataIntegrationAuthorizeUrl,
|
|
1917
|
+
useGetDirectory,
|
|
2017
1918
|
useInviteMember,
|
|
2018
1919
|
useListDirectories,
|
|
2019
1920
|
useListOrganizationApiKeyPermissions,
|