@workos-inc/widgets 1.13.0 → 1.13.1-next.1780691322935

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.
@@ -108,8 +108,8 @@ __export(swr_exports, {
108
108
  getInviteMemberMutationFetcher: () => getInviteMemberMutationFetcher,
109
109
  getInviteMemberMutationKey: () => getInviteMemberMutationKey,
110
110
  getInviteMemberUrl: () => getInviteMemberUrl,
111
- getListDataIntegrationOrganizationOverridesKey: () => getListDataIntegrationOrganizationOverridesKey,
112
- getListDataIntegrationOrganizationOverridesUrl: () => getListDataIntegrationOrganizationOverridesUrl,
111
+ getListDataIntegrationConfigurationsKey: () => getListDataIntegrationConfigurationsKey,
112
+ getListDataIntegrationConfigurationsUrl: () => getListDataIntegrationConfigurationsUrl,
113
113
  getListDirectoriesKey: () => getListDirectoriesKey,
114
114
  getListDirectoriesUrl: () => getListDirectoriesUrl,
115
115
  getListOrganizationApiKeyPermissionsKey: () => getListOrganizationApiKeyPermissionsKey,
@@ -176,9 +176,9 @@ __export(swr_exports, {
176
176
  getUpdatePasswordMutationFetcher: () => getUpdatePasswordMutationFetcher,
177
177
  getUpdatePasswordMutationKey: () => getUpdatePasswordMutationKey,
178
178
  getUpdatePasswordUrl: () => getUpdatePasswordUrl,
179
- getUpsertDataIntegrationOrganizationOverrideMutationFetcher: () => getUpsertDataIntegrationOrganizationOverrideMutationFetcher,
180
- getUpsertDataIntegrationOrganizationOverrideMutationKey: () => getUpsertDataIntegrationOrganizationOverrideMutationKey,
181
- getUpsertDataIntegrationOrganizationOverrideUrl: () => getUpsertDataIntegrationOrganizationOverrideUrl,
179
+ getUpsertDataIntegrationConfigurationMutationFetcher: () => getUpsertDataIntegrationConfigurationMutationFetcher,
180
+ getUpsertDataIntegrationConfigurationMutationKey: () => getUpsertDataIntegrationConfigurationMutationKey,
181
+ getUpsertDataIntegrationConfigurationUrl: () => getUpsertDataIntegrationConfigurationUrl,
182
182
  getVerifyEmailChangeMutationFetcher: () => getVerifyEmailChangeMutationFetcher,
183
183
  getVerifyEmailChangeMutationKey: () => getVerifyEmailChangeMutationKey,
184
184
  getVerifyEmailChangeUrl: () => getVerifyEmailChangeUrl,
@@ -192,7 +192,7 @@ __export(swr_exports, {
192
192
  getVerifyTotpFactorUrl: () => getVerifyTotpFactorUrl,
193
193
  getVerifyUrl: () => getVerifyUrl,
194
194
  inviteMember: () => inviteMember,
195
- listDataIntegrationOrganizationOverrides: () => listDataIntegrationOrganizationOverrides,
195
+ listDataIntegrationConfigurations: () => listDataIntegrationConfigurations,
196
196
  listDirectories: () => listDirectories,
197
197
  listOrganizationApiKeyPermissions: () => listOrganizationApiKeyPermissions,
198
198
  listOrganizationApiKeys: () => listOrganizationApiKeys,
@@ -220,7 +220,7 @@ __export(swr_exports, {
220
220
  updateMe: () => updateMe,
221
221
  updateMember: () => updateMember,
222
222
  updatePassword: () => updatePassword,
223
- upsertDataIntegrationOrganizationOverride: () => upsertDataIntegrationOrganizationOverride,
223
+ upsertDataIntegrationConfiguration: () => upsertDataIntegrationConfiguration,
224
224
  useAuthenticationInformation: () => useAuthenticationInformation,
225
225
  useCreateOrganizationApiKey: () => useCreateOrganizationApiKey,
226
226
  useCreatePassword: () => useCreatePassword,
@@ -240,7 +240,7 @@ __export(swr_exports, {
240
240
  useGetDataIntegrationAuthorizeUrl: () => useGetDataIntegrationAuthorizeUrl,
241
241
  useGetDirectory: () => useGetDirectory,
242
242
  useInviteMember: () => useInviteMember,
243
- useListDataIntegrationOrganizationOverrides: () => useListDataIntegrationOrganizationOverrides,
243
+ useListDataIntegrationConfigurations: () => useListDataIntegrationConfigurations,
244
244
  useListDirectories: () => useListDirectories,
245
245
  useListOrganizationApiKeyPermissions: () => useListOrganizationApiKeyPermissions,
246
246
  useListOrganizationApiKeys: () => useListOrganizationApiKeys,
@@ -268,7 +268,7 @@ __export(swr_exports, {
268
268
  useUpdateMe: () => useUpdateMe,
269
269
  useUpdateMember: () => useUpdateMember,
270
270
  useUpdatePassword: () => useUpdatePassword,
271
- useUpsertDataIntegrationOrganizationOverride: () => useUpsertDataIntegrationOrganizationOverride,
271
+ useUpsertDataIntegrationConfiguration: () => useUpsertDataIntegrationConfiguration,
272
272
  useVerify: () => useVerify,
273
273
  useVerifyEmailChange: () => useVerifyEmailChange,
274
274
  useVerifyPasskey: () => useVerifyPasskey,
@@ -554,6 +554,38 @@ const useExpireOrganizationApiKey = (apiKeyId, options) => {
554
554
  ...query
555
555
  };
556
556
  };
557
+ const getListDataIntegrationConfigurationsUrl = () => {
558
+ return `https://api.workos.com/_widgets/DataIntegrations/configurations`;
559
+ };
560
+ const listDataIntegrationConfigurations = async (options) => {
561
+ const res = await fetch(getListDataIntegrationConfigurationsUrl(), {
562
+ ...options,
563
+ method: "GET"
564
+ });
565
+ const body = [204, 205, 304].includes(res.status) ? null : await res.text();
566
+ const data = body ? JSON.parse(body) : {};
567
+ return {
568
+ data,
569
+ status: res.status,
570
+ headers: res.headers
571
+ };
572
+ };
573
+ const getListDataIntegrationConfigurationsKey = () => [`https://api.workos.com/_widgets/DataIntegrations/configurations`];
574
+ const useListDataIntegrationConfigurations = (options) => {
575
+ const { swr: swrOptions, fetch: fetchOptions } = options ?? {};
576
+ const isEnabled = swrOptions?.enabled !== false;
577
+ const swrKey = swrOptions?.swrKey ?? (() => isEnabled ? getListDataIntegrationConfigurationsKey() : null);
578
+ const swrFn = () => listDataIntegrationConfigurations(fetchOptions);
579
+ const query = (0, import_swr.default)(
580
+ swrKey,
581
+ swrFn,
582
+ swrOptions
583
+ );
584
+ return {
585
+ swrKey,
586
+ ...query
587
+ };
588
+ };
557
589
  const getDeleteDataInstallationUrl = (installationId) => {
558
590
  return `https://api.workos.com/_widgets/DataIntegrations/installations/${installationId}`;
559
591
  };
@@ -623,40 +655,6 @@ const useMyDataIntegrations = (options) => {
623
655
  ...query
624
656
  };
625
657
  };
626
- const getListDataIntegrationOrganizationOverridesUrl = () => {
627
- return `https://api.workos.com/_widgets/DataIntegrations/organization-overrides`;
628
- };
629
- const listDataIntegrationOrganizationOverrides = async (options) => {
630
- const res = await fetch(getListDataIntegrationOrganizationOverridesUrl(), {
631
- ...options,
632
- method: "GET"
633
- });
634
- const body = [204, 205, 304].includes(res.status) ? null : await res.text();
635
- const data = body ? JSON.parse(body) : {};
636
- return {
637
- data,
638
- status: res.status,
639
- headers: res.headers
640
- };
641
- };
642
- const getListDataIntegrationOrganizationOverridesKey = () => [
643
- `https://api.workos.com/_widgets/DataIntegrations/organization-overrides`
644
- ];
645
- const useListDataIntegrationOrganizationOverrides = (options) => {
646
- const { swr: swrOptions, fetch: fetchOptions } = options ?? {};
647
- const isEnabled = swrOptions?.enabled !== false;
648
- const swrKey = swrOptions?.swrKey ?? (() => isEnabled ? getListDataIntegrationOrganizationOverridesKey() : null);
649
- const swrFn = () => listDataIntegrationOrganizationOverrides(fetchOptions);
650
- const query = (0, import_swr.default)(
651
- swrKey,
652
- swrFn,
653
- swrOptions
654
- );
655
- return {
656
- swrKey,
657
- ...query
658
- };
659
- };
660
658
  const getGetDataInstallationAuthorizationStatusUrl = (dataIntegrationId, state) => {
661
659
  return `https://api.workos.com/_widgets/DataIntegrations/${dataIntegrationId}/authorization-status/${state}`;
662
660
  };
@@ -740,19 +738,16 @@ const useGetDataIntegrationAuthorizeUrl = (slug, params, options) => {
740
738
  ...query
741
739
  };
742
740
  };
743
- const getUpsertDataIntegrationOrganizationOverrideUrl = (slug) => {
744
- return `https://api.workos.com/_widgets/DataIntegrations/${slug}/organization-override`;
741
+ const getUpsertDataIntegrationConfigurationUrl = (slug) => {
742
+ return `https://api.workos.com/_widgets/DataIntegrations/${slug}/configuration`;
745
743
  };
746
- const upsertDataIntegrationOrganizationOverride = async (slug, upsertDataIntegrationOrganizationOverrideBody, options) => {
747
- const res = await fetch(
748
- getUpsertDataIntegrationOrganizationOverrideUrl(slug),
749
- {
750
- ...options,
751
- method: "PUT",
752
- headers: { "Content-Type": "application/json", ...options?.headers },
753
- body: JSON.stringify(upsertDataIntegrationOrganizationOverrideBody)
754
- }
755
- );
744
+ const upsertDataIntegrationConfiguration = async (slug, upsertDataIntegrationConfigurationBody, options) => {
745
+ const res = await fetch(getUpsertDataIntegrationConfigurationUrl(slug), {
746
+ ...options,
747
+ method: "PUT",
748
+ headers: { "Content-Type": "application/json", ...options?.headers },
749
+ body: JSON.stringify(upsertDataIntegrationConfigurationBody)
750
+ });
756
751
  const body = [204, 205, 304].includes(res.status) ? null : await res.text();
757
752
  const data = body ? JSON.parse(body) : {};
758
753
  return {
@@ -761,18 +756,18 @@ const upsertDataIntegrationOrganizationOverride = async (slug, upsertDataIntegra
761
756
  headers: res.headers
762
757
  };
763
758
  };
764
- const getUpsertDataIntegrationOrganizationOverrideMutationFetcher = (slug, options) => {
759
+ const getUpsertDataIntegrationConfigurationMutationFetcher = (slug, options) => {
765
760
  return (_, { arg }) => {
766
- return upsertDataIntegrationOrganizationOverride(slug, arg, options);
761
+ return upsertDataIntegrationConfiguration(slug, arg, options);
767
762
  };
768
763
  };
769
- const getUpsertDataIntegrationOrganizationOverrideMutationKey = (slug) => [
770
- `https://api.workos.com/_widgets/DataIntegrations/${slug}/organization-override`
764
+ const getUpsertDataIntegrationConfigurationMutationKey = (slug) => [
765
+ `https://api.workos.com/_widgets/DataIntegrations/${slug}/configuration`
771
766
  ];
772
- const useUpsertDataIntegrationOrganizationOverride = (slug, options) => {
767
+ const useUpsertDataIntegrationConfiguration = (slug, options) => {
773
768
  const { swr: swrOptions, fetch: fetchOptions } = options ?? {};
774
- const swrKey = swrOptions?.swrKey ?? getUpsertDataIntegrationOrganizationOverrideMutationKey(slug);
775
- const swrFn = getUpsertDataIntegrationOrganizationOverrideMutationFetcher(
769
+ const swrKey = swrOptions?.swrKey ?? getUpsertDataIntegrationConfigurationMutationKey(slug);
770
+ const swrFn = getUpsertDataIntegrationConfigurationMutationFetcher(
776
771
  slug,
777
772
  fetchOptions
778
773
  );
@@ -2236,8 +2231,8 @@ const useSettings = (options) => {
2236
2231
  getInviteMemberMutationFetcher,
2237
2232
  getInviteMemberMutationKey,
2238
2233
  getInviteMemberUrl,
2239
- getListDataIntegrationOrganizationOverridesKey,
2240
- getListDataIntegrationOrganizationOverridesUrl,
2234
+ getListDataIntegrationConfigurationsKey,
2235
+ getListDataIntegrationConfigurationsUrl,
2241
2236
  getListDirectoriesKey,
2242
2237
  getListDirectoriesUrl,
2243
2238
  getListOrganizationApiKeyPermissionsKey,
@@ -2304,9 +2299,9 @@ const useSettings = (options) => {
2304
2299
  getUpdatePasswordMutationFetcher,
2305
2300
  getUpdatePasswordMutationKey,
2306
2301
  getUpdatePasswordUrl,
2307
- getUpsertDataIntegrationOrganizationOverrideMutationFetcher,
2308
- getUpsertDataIntegrationOrganizationOverrideMutationKey,
2309
- getUpsertDataIntegrationOrganizationOverrideUrl,
2302
+ getUpsertDataIntegrationConfigurationMutationFetcher,
2303
+ getUpsertDataIntegrationConfigurationMutationKey,
2304
+ getUpsertDataIntegrationConfigurationUrl,
2310
2305
  getVerifyEmailChangeMutationFetcher,
2311
2306
  getVerifyEmailChangeMutationKey,
2312
2307
  getVerifyEmailChangeUrl,
@@ -2320,7 +2315,7 @@ const useSettings = (options) => {
2320
2315
  getVerifyTotpFactorUrl,
2321
2316
  getVerifyUrl,
2322
2317
  inviteMember,
2323
- listDataIntegrationOrganizationOverrides,
2318
+ listDataIntegrationConfigurations,
2324
2319
  listDirectories,
2325
2320
  listOrganizationApiKeyPermissions,
2326
2321
  listOrganizationApiKeys,
@@ -2348,7 +2343,7 @@ const useSettings = (options) => {
2348
2343
  updateMe,
2349
2344
  updateMember,
2350
2345
  updatePassword,
2351
- upsertDataIntegrationOrganizationOverride,
2346
+ upsertDataIntegrationConfiguration,
2352
2347
  useAuthenticationInformation,
2353
2348
  useCreateOrganizationApiKey,
2354
2349
  useCreatePassword,
@@ -2368,7 +2363,7 @@ const useSettings = (options) => {
2368
2363
  useGetDataIntegrationAuthorizeUrl,
2369
2364
  useGetDirectory,
2370
2365
  useInviteMember,
2371
- useListDataIntegrationOrganizationOverrides,
2366
+ useListDataIntegrationConfigurations,
2372
2367
  useListDirectories,
2373
2368
  useListOrganizationApiKeyPermissions,
2374
2369
  useListOrganizationApiKeys,
@@ -2396,7 +2391,7 @@ const useSettings = (options) => {
2396
2391
  useUpdateMe,
2397
2392
  useUpdateMember,
2398
2393
  useUpdatePassword,
2399
- useUpsertDataIntegrationOrganizationOverride,
2394
+ useUpsertDataIntegrationConfiguration,
2400
2395
  useVerify,
2401
2396
  useVerifyEmailChange,
2402
2397
  useVerifyPasskey,