@workos-inc/widgets 1.9.0 → 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.
- package/CHANGELOG.md +6 -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/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/lib/add-mfa-dialog.cjs +18 -16
- package/dist/cjs/lib/add-mfa-dialog.cjs.map +1 -1
- 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/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-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/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/lib/add-mfa-dialog.js +18 -16
- package/dist/esm/lib/add-mfa-dialog.js.map +1 -1
- 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/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 +4 -4
|
@@ -13,33 +13,6 @@ const MemberActionsItem = {
|
|
|
13
13
|
"revoke-invite": "revoke-invite",
|
|
14
14
|
"revoke-membership": "revoke-membership"
|
|
15
15
|
};
|
|
16
|
-
const CreateTotpFactorResponseAuthenticationFactorAllOfObject = {
|
|
17
|
-
authentication_factor: "authentication_factor"
|
|
18
|
-
};
|
|
19
|
-
const CreateTotpFactorResponseAuthenticationFactorAllOfType = {
|
|
20
|
-
generic_otp: "generic_otp",
|
|
21
|
-
sms: "sms",
|
|
22
|
-
totp: "totp",
|
|
23
|
-
webauthn: "webauthn"
|
|
24
|
-
};
|
|
25
|
-
const CreateTotpFactorResponseAuthenticationChallengeAllOfObject = {
|
|
26
|
-
authentication_challenge: "authentication_challenge"
|
|
27
|
-
};
|
|
28
|
-
const AuthenticationInformationResponseDataVerificationMethodsMfaOneOfProvider = {
|
|
29
|
-
MFA: "MFA"
|
|
30
|
-
};
|
|
31
|
-
const AuthenticationInformationResponseDataVerificationMethodsPasswordOneOfProvider = {
|
|
32
|
-
Password: "Password"
|
|
33
|
-
};
|
|
34
|
-
const AuthenticationInformationResponseDataVerificationMethodsPasskeyOneOfProvider = {
|
|
35
|
-
Passkey: "Passkey"
|
|
36
|
-
};
|
|
37
|
-
const SendVerificationResponseType = {
|
|
38
|
-
EmailVerification: "EmailVerification"
|
|
39
|
-
};
|
|
40
|
-
const SettingsResponseObject = {
|
|
41
|
-
settings: "settings"
|
|
42
|
-
};
|
|
43
16
|
const OrganizationDomainState = {
|
|
44
17
|
Failed: "Failed",
|
|
45
18
|
LegacyVerified: "LegacyVerified",
|
|
@@ -72,121 +45,6 @@ const SsoConnectionSessionJSONState = {
|
|
|
72
45
|
...SamlSessionState,
|
|
73
46
|
...OidcSessionState
|
|
74
47
|
};
|
|
75
|
-
const SsoConnectionAnyOfType = {
|
|
76
|
-
AdfsSaml: "AdfsSaml",
|
|
77
|
-
Auth0Saml: "Auth0Saml",
|
|
78
|
-
AzureSaml: "AzureSaml",
|
|
79
|
-
CasSaml: "CasSaml",
|
|
80
|
-
ClassLinkSaml: "ClassLinkSaml",
|
|
81
|
-
CloudflareSaml: "CloudflareSaml",
|
|
82
|
-
CyberArkSaml: "CyberArkSaml",
|
|
83
|
-
DuoSaml: "DuoSaml",
|
|
84
|
-
GenericSaml: "GenericSaml",
|
|
85
|
-
GoogleSaml: "GoogleSaml",
|
|
86
|
-
JumpCloudSaml: "JumpCloudSaml",
|
|
87
|
-
KeycloakSaml: "KeycloakSaml",
|
|
88
|
-
LastPassSaml: "LastPassSaml",
|
|
89
|
-
MiniOrangeSaml: "MiniOrangeSaml",
|
|
90
|
-
NetIqSaml: "NetIqSaml",
|
|
91
|
-
OktaSaml: "OktaSaml",
|
|
92
|
-
OneLoginSaml: "OneLoginSaml",
|
|
93
|
-
OracleSaml: "OracleSaml",
|
|
94
|
-
PingFederateSaml: "PingFederateSaml",
|
|
95
|
-
PingOneSaml: "PingOneSaml",
|
|
96
|
-
RipplingSaml: "RipplingSaml",
|
|
97
|
-
SalesforceSaml: "SalesforceSaml",
|
|
98
|
-
ShibbolethGenericSaml: "ShibbolethGenericSaml",
|
|
99
|
-
ShibbolethSaml: "ShibbolethSaml",
|
|
100
|
-
SimpleSamlPhpSaml: "SimpleSamlPhpSaml",
|
|
101
|
-
TestIdp: "TestIdp",
|
|
102
|
-
VmWareSaml: "VmWareSaml"
|
|
103
|
-
};
|
|
104
|
-
const SsoConnectionAnyOfState = {
|
|
105
|
-
Inactive: "Inactive",
|
|
106
|
-
Validating: "Validating",
|
|
107
|
-
Active: "Active",
|
|
108
|
-
Deleting: "Deleting"
|
|
109
|
-
};
|
|
110
|
-
const SsoConnectionAnyOfProviderTag = {
|
|
111
|
-
Saml: "Saml"
|
|
112
|
-
};
|
|
113
|
-
const SsoConnectionAnyOfEightAllOfState = {
|
|
114
|
-
Inactive: "Inactive",
|
|
115
|
-
Validating: "Validating",
|
|
116
|
-
Active: "Active",
|
|
117
|
-
Deleting: "Deleting"
|
|
118
|
-
};
|
|
119
|
-
const SsoConnectionAnyOfEightAllOfType = {
|
|
120
|
-
AdpOidc: "AdpOidc",
|
|
121
|
-
Auth0Migration: "Auth0Migration",
|
|
122
|
-
CleverOidc: "CleverOidc",
|
|
123
|
-
EntraIdOidc: "EntraIdOidc",
|
|
124
|
-
GenericOidc: "GenericOidc",
|
|
125
|
-
GoogleOidc: "GoogleOidc",
|
|
126
|
-
OktaOidc: "OktaOidc",
|
|
127
|
-
LoginGovOidc: "LoginGovOidc"
|
|
128
|
-
};
|
|
129
|
-
const SsoConnectionAnyOfEightAllOfProviderTag = {
|
|
130
|
-
OpenIdConnect: "OpenIdConnect"
|
|
131
|
-
};
|
|
132
|
-
const DataInstallationAllOfObject = {
|
|
133
|
-
data_installation: "data_installation",
|
|
134
|
-
connected_account: "connected_account"
|
|
135
|
-
};
|
|
136
|
-
const DataInstallationAllOfState = {
|
|
137
|
-
connected: "connected",
|
|
138
|
-
needs_reauthorization: "needs_reauthorization"
|
|
139
|
-
};
|
|
140
|
-
const DataIntegrationObject = {
|
|
141
|
-
data_integration: "data_integration"
|
|
142
|
-
};
|
|
143
|
-
const DataIntegrationIntegrationType = {
|
|
144
|
-
asana: "asana",
|
|
145
|
-
box: "box",
|
|
146
|
-
"cal-dot-com": "cal-dot-com",
|
|
147
|
-
calendly: "calendly",
|
|
148
|
-
confluence: "confluence",
|
|
149
|
-
dropbox: "dropbox",
|
|
150
|
-
"frame-io": "frame-io",
|
|
151
|
-
front: "front",
|
|
152
|
-
github: "github",
|
|
153
|
-
gitlab: "gitlab",
|
|
154
|
-
gmail: "gmail",
|
|
155
|
-
google: "google",
|
|
156
|
-
"google-calendar": "google-calendar",
|
|
157
|
-
"google-drive": "google-drive",
|
|
158
|
-
helpscout: "helpscout",
|
|
159
|
-
hubspot: "hubspot",
|
|
160
|
-
intercom: "intercom",
|
|
161
|
-
jira: "jira",
|
|
162
|
-
linear: "linear",
|
|
163
|
-
microsoft: "microsoft",
|
|
164
|
-
"microsoft-onedrive": "microsoft-onedrive",
|
|
165
|
-
"microsoft-onenote": "microsoft-onenote",
|
|
166
|
-
"microsoft-outlook": "microsoft-outlook",
|
|
167
|
-
"microsoft-outlook-calendar": "microsoft-outlook-calendar",
|
|
168
|
-
"microsoft-sharepoint": "microsoft-sharepoint",
|
|
169
|
-
"microsoft-teams": "microsoft-teams",
|
|
170
|
-
"microsoft-todo": "microsoft-todo",
|
|
171
|
-
notion: "notion",
|
|
172
|
-
prefect: "prefect",
|
|
173
|
-
"pydantic-logfire": "pydantic-logfire",
|
|
174
|
-
salesforce: "salesforce",
|
|
175
|
-
sentry: "sentry",
|
|
176
|
-
slack: "slack",
|
|
177
|
-
snowflake: "snowflake",
|
|
178
|
-
stripe: "stripe",
|
|
179
|
-
xero: "xero",
|
|
180
|
-
zendesk: "zendesk"
|
|
181
|
-
};
|
|
182
|
-
const DataIntegrationOwnership = {
|
|
183
|
-
userland_user: "userland_user",
|
|
184
|
-
organization: "organization"
|
|
185
|
-
};
|
|
186
|
-
const DataIntegrationCredentialsType = {
|
|
187
|
-
shared: "shared",
|
|
188
|
-
custom: "custom"
|
|
189
|
-
};
|
|
190
48
|
const DirectoryType = {
|
|
191
49
|
azure_scim_v20: "azure scim v2.0",
|
|
192
50
|
bamboohr: "bamboohr",
|
|
@@ -222,7 +80,8 @@ const DirectoryState = {
|
|
|
222
80
|
};
|
|
223
81
|
const GenerateAdminPortalLinkIntent = {
|
|
224
82
|
domain_verification: "domain_verification",
|
|
225
|
-
sso: "sso"
|
|
83
|
+
sso: "sso",
|
|
84
|
+
log_streams: "log_streams"
|
|
226
85
|
};
|
|
227
86
|
const getCreateOrganizationApiKeyUrl = () => {
|
|
228
87
|
return `https://api.workos.com/_widgets/ApiKeys/organization-api-keys`;
|
|
@@ -1341,6 +1200,38 @@ const useVerifyTotpFactor = (options) => {
|
|
|
1341
1200
|
...query
|
|
1342
1201
|
};
|
|
1343
1202
|
};
|
|
1203
|
+
const getGetAuditLogStreamUrl = () => {
|
|
1204
|
+
return `https://api.workos.com/_widgets/admin-portal/audit-log-stream`;
|
|
1205
|
+
};
|
|
1206
|
+
const getAuditLogStream = async (options) => {
|
|
1207
|
+
const res = await fetch(getGetAuditLogStreamUrl(), {
|
|
1208
|
+
...options,
|
|
1209
|
+
method: "GET"
|
|
1210
|
+
});
|
|
1211
|
+
const body = [204, 205, 304].includes(res.status) ? null : await res.text();
|
|
1212
|
+
const data = body ? JSON.parse(body) : {};
|
|
1213
|
+
return {
|
|
1214
|
+
data,
|
|
1215
|
+
status: res.status,
|
|
1216
|
+
headers: res.headers
|
|
1217
|
+
};
|
|
1218
|
+
};
|
|
1219
|
+
const getGetAuditLogStreamKey = () => [`https://api.workos.com/_widgets/admin-portal/audit-log-stream`];
|
|
1220
|
+
const useGetAuditLogStream = (options) => {
|
|
1221
|
+
const { swr: swrOptions, fetch: fetchOptions } = options ?? {};
|
|
1222
|
+
const isEnabled = swrOptions?.enabled !== false;
|
|
1223
|
+
const swrKey = swrOptions?.swrKey ?? (() => isEnabled ? getGetAuditLogStreamKey() : null);
|
|
1224
|
+
const swrFn = () => getAuditLogStream(fetchOptions);
|
|
1225
|
+
const query = useSwr(
|
|
1226
|
+
swrKey,
|
|
1227
|
+
swrFn,
|
|
1228
|
+
swrOptions
|
|
1229
|
+
);
|
|
1230
|
+
return {
|
|
1231
|
+
swrKey,
|
|
1232
|
+
...query
|
|
1233
|
+
};
|
|
1234
|
+
};
|
|
1344
1235
|
const getGenerateAdminPortalLinkUrl = (params) => {
|
|
1345
1236
|
const normalizedParams = new URLSearchParams();
|
|
1346
1237
|
Object.entries(params || {}).forEach(([key, value]) => {
|
|
@@ -1555,6 +1446,40 @@ const useListDirectories = (options) => {
|
|
|
1555
1446
|
...query
|
|
1556
1447
|
};
|
|
1557
1448
|
};
|
|
1449
|
+
const getGetDirectoryUrl = (directoryId) => {
|
|
1450
|
+
return `https://api.workos.com/_widgets/directory-sync/directories/${directoryId}`;
|
|
1451
|
+
};
|
|
1452
|
+
const getDirectory = async (directoryId, options) => {
|
|
1453
|
+
const res = await fetch(getGetDirectoryUrl(directoryId), {
|
|
1454
|
+
...options,
|
|
1455
|
+
method: "GET"
|
|
1456
|
+
});
|
|
1457
|
+
const body = [204, 205, 304].includes(res.status) ? null : await res.text();
|
|
1458
|
+
const data = body ? JSON.parse(body) : {};
|
|
1459
|
+
return {
|
|
1460
|
+
data,
|
|
1461
|
+
status: res.status,
|
|
1462
|
+
headers: res.headers
|
|
1463
|
+
};
|
|
1464
|
+
};
|
|
1465
|
+
const getGetDirectoryKey = (directoryId) => [
|
|
1466
|
+
`https://api.workos.com/_widgets/directory-sync/directories/${directoryId}`
|
|
1467
|
+
];
|
|
1468
|
+
const useGetDirectory = (directoryId, options) => {
|
|
1469
|
+
const { swr: swrOptions, fetch: fetchOptions } = options ?? {};
|
|
1470
|
+
const isEnabled = swrOptions?.enabled !== false && !!directoryId;
|
|
1471
|
+
const swrKey = swrOptions?.swrKey ?? (() => isEnabled ? getGetDirectoryKey(directoryId) : null);
|
|
1472
|
+
const swrFn = () => getDirectory(directoryId, fetchOptions);
|
|
1473
|
+
const query = useSwr(
|
|
1474
|
+
swrKey,
|
|
1475
|
+
swrFn,
|
|
1476
|
+
swrOptions
|
|
1477
|
+
);
|
|
1478
|
+
return {
|
|
1479
|
+
swrKey,
|
|
1480
|
+
...query
|
|
1481
|
+
};
|
|
1482
|
+
};
|
|
1558
1483
|
const getSettingsUrl = () => {
|
|
1559
1484
|
return `https://api.workos.com/_widgets/settings`;
|
|
1560
1485
|
};
|
|
@@ -1584,18 +1509,6 @@ const useSettings = (options) => {
|
|
|
1584
1509
|
};
|
|
1585
1510
|
};
|
|
1586
1511
|
export {
|
|
1587
|
-
AuthenticationInformationResponseDataVerificationMethodsMfaOneOfProvider,
|
|
1588
|
-
AuthenticationInformationResponseDataVerificationMethodsPasskeyOneOfProvider,
|
|
1589
|
-
AuthenticationInformationResponseDataVerificationMethodsPasswordOneOfProvider,
|
|
1590
|
-
CreateTotpFactorResponseAuthenticationChallengeAllOfObject,
|
|
1591
|
-
CreateTotpFactorResponseAuthenticationFactorAllOfObject,
|
|
1592
|
-
CreateTotpFactorResponseAuthenticationFactorAllOfType,
|
|
1593
|
-
DataInstallationAllOfObject,
|
|
1594
|
-
DataInstallationAllOfState,
|
|
1595
|
-
DataIntegrationCredentialsType,
|
|
1596
|
-
DataIntegrationIntegrationType,
|
|
1597
|
-
DataIntegrationObject,
|
|
1598
|
-
DataIntegrationOwnership,
|
|
1599
1512
|
DirectoryState,
|
|
1600
1513
|
DirectoryType,
|
|
1601
1514
|
DomainVerificationNameServer,
|
|
@@ -1605,14 +1518,6 @@ export {
|
|
|
1605
1518
|
OidcSessionState,
|
|
1606
1519
|
OrganizationDomainState,
|
|
1607
1520
|
SamlSessionState,
|
|
1608
|
-
SendVerificationResponseType,
|
|
1609
|
-
SettingsResponseObject,
|
|
1610
|
-
SsoConnectionAnyOfEightAllOfProviderTag,
|
|
1611
|
-
SsoConnectionAnyOfEightAllOfState,
|
|
1612
|
-
SsoConnectionAnyOfEightAllOfType,
|
|
1613
|
-
SsoConnectionAnyOfProviderTag,
|
|
1614
|
-
SsoConnectionAnyOfState,
|
|
1615
|
-
SsoConnectionAnyOfType,
|
|
1616
1521
|
SsoConnectionSessionJSONState,
|
|
1617
1522
|
authenticationInformation,
|
|
1618
1523
|
createOrganizationApiKey,
|
|
@@ -1624,6 +1529,7 @@ export {
|
|
|
1624
1529
|
deletePasskey,
|
|
1625
1530
|
deleteTotpFactors,
|
|
1626
1531
|
generateAdminPortalLink,
|
|
1532
|
+
getAuditLogStream,
|
|
1627
1533
|
getAuthenticationInformationKey,
|
|
1628
1534
|
getAuthenticationInformationUrl,
|
|
1629
1535
|
getCreateOrganizationApiKeyMutationFetcher,
|
|
@@ -1652,13 +1558,18 @@ export {
|
|
|
1652
1558
|
getDeleteTotpFactorsMutationFetcher,
|
|
1653
1559
|
getDeleteTotpFactorsMutationKey,
|
|
1654
1560
|
getDeleteTotpFactorsUrl,
|
|
1561
|
+
getDirectory,
|
|
1655
1562
|
getGenerateAdminPortalLinkMutationFetcher,
|
|
1656
1563
|
getGenerateAdminPortalLinkMutationKey,
|
|
1657
1564
|
getGenerateAdminPortalLinkUrl,
|
|
1565
|
+
getGetAuditLogStreamKey,
|
|
1566
|
+
getGetAuditLogStreamUrl,
|
|
1658
1567
|
getGetDataInstallationAuthorizationStatusKey,
|
|
1659
1568
|
getGetDataInstallationAuthorizationStatusUrl,
|
|
1660
1569
|
getGetDataIntegrationAuthorizeUrlKey,
|
|
1661
1570
|
getGetDataIntegrationAuthorizeUrlUrl,
|
|
1571
|
+
getGetDirectoryKey,
|
|
1572
|
+
getGetDirectoryUrl,
|
|
1662
1573
|
getInviteMemberMutationFetcher,
|
|
1663
1574
|
getInviteMemberMutationKey,
|
|
1664
1575
|
getInviteMemberUrl,
|
|
@@ -1765,8 +1676,10 @@ export {
|
|
|
1765
1676
|
useDeletePasskey,
|
|
1766
1677
|
useDeleteTotpFactors,
|
|
1767
1678
|
useGenerateAdminPortalLink,
|
|
1679
|
+
useGetAuditLogStream,
|
|
1768
1680
|
useGetDataInstallationAuthorizationStatus,
|
|
1769
1681
|
useGetDataIntegrationAuthorizeUrl,
|
|
1682
|
+
useGetDirectory,
|
|
1770
1683
|
useInviteMember,
|
|
1771
1684
|
useListDirectories,
|
|
1772
1685
|
useListOrganizationApiKeyPermissions,
|