@runloop/reflex-client 0.3.0 → 0.4.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/README.md +4 -0
- package/dist/generated/model/adminSetOrgSandboxProviderBody.d.ts +11 -0
- package/dist/generated/model/adminSetOrgSandboxProviderBody.d.ts.map +1 -0
- package/dist/generated/model/adminSetOrgSandboxProviderBody.js +8 -0
- package/dist/generated/model/adminSetOrgSandboxProviderBody.js.map +1 -0
- package/dist/generated/model/adminSetOrgSecretBody.d.ts +11 -0
- package/dist/generated/model/adminSetOrgSecretBody.d.ts.map +1 -0
- package/dist/generated/model/adminSetOrgSecretBody.js +8 -0
- package/dist/generated/model/adminSetOrgSecretBody.js.map +1 -0
- package/dist/generated/model/adminValidateOrgSandboxProviderBody.d.ts +11 -0
- package/dist/generated/model/adminValidateOrgSandboxProviderBody.d.ts.map +1 -0
- package/dist/generated/model/adminValidateOrgSandboxProviderBody.js +8 -0
- package/dist/generated/model/adminValidateOrgSandboxProviderBody.js.map +1 -0
- package/dist/generated/model/index.d.ts +3 -0
- package/dist/generated/model/index.d.ts.map +1 -1
- package/dist/generated/model/index.js +3 -0
- package/dist/generated/model/index.js.map +1 -1
- package/dist/generated/org-setup.d.ts +197 -0
- package/dist/generated/org-setup.d.ts.map +1 -0
- package/dist/generated/org-setup.js +179 -0
- package/dist/generated/org-setup.js.map +1 -0
- package/dist/generated/organizations.d.ts +37 -161
- package/dist/generated/organizations.d.ts.map +1 -1
- package/dist/generated/organizations.js +27 -133
- package/dist/generated/organizations.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/react/model/adminSetOrgSandboxProviderBody.d.ts +11 -0
- package/dist/react/model/adminSetOrgSandboxProviderBody.d.ts.map +1 -0
- package/dist/react/model/adminSetOrgSandboxProviderBody.js +8 -0
- package/dist/react/model/adminSetOrgSandboxProviderBody.js.map +1 -0
- package/dist/react/model/adminSetOrgSecretBody.d.ts +11 -0
- package/dist/react/model/adminSetOrgSecretBody.d.ts.map +1 -0
- package/dist/react/model/adminSetOrgSecretBody.js +8 -0
- package/dist/react/model/adminSetOrgSecretBody.js.map +1 -0
- package/dist/react/model/adminValidateOrgSandboxProviderBody.d.ts +11 -0
- package/dist/react/model/adminValidateOrgSandboxProviderBody.d.ts.map +1 -0
- package/dist/react/model/adminValidateOrgSandboxProviderBody.js +8 -0
- package/dist/react/model/adminValidateOrgSandboxProviderBody.js.map +1 -0
- package/dist/react/org-setup.d.ts +324 -0
- package/dist/react/org-setup.d.ts.map +1 -0
- package/dist/react/org-setup.js +369 -0
- package/dist/react/org-setup.js.map +1 -0
- package/dist/react/organizations.d.ts +85 -304
- package/dist/react/organizations.d.ts.map +1 -1
- package/dist/react/organizations.js +55 -266
- package/dist/react/organizations.js.map +1 -1
- package/package.json +1 -1
- package/src/generated/model/adminSetOrgSandboxProviderBody.ts +11 -0
- package/src/generated/model/adminSetOrgSecretBody.ts +11 -0
- package/src/generated/model/adminValidateOrgSandboxProviderBody.ts +11 -0
- package/src/generated/model/index.ts +3 -0
- package/src/generated/org-setup.ts +501 -0
- package/src/generated/organizations.ts +52 -367
- package/src/index.ts +1 -0
- package/src/react/model/adminSetOrgSandboxProviderBody.ts +11 -0
- package/src/react/model/adminSetOrgSecretBody.ts +11 -0
- package/src/react/model/adminValidateOrgSandboxProviderBody.ts +11 -0
- package/src/react/org-setup.ts +911 -0
- package/src/react/organizations.ts +108 -630
|
@@ -240,61 +240,6 @@ export const useRebuildBaseImage = (options) => {
|
|
|
240
240
|
return useMutation(getRebuildBaseImageMutationOptions(options));
|
|
241
241
|
};
|
|
242
242
|
/**
|
|
243
|
-
* @summary Mark the org's guided setup as complete.
|
|
244
|
-
*/
|
|
245
|
-
export const completeOrgBootstrap = (id, options, signal) => {
|
|
246
|
-
return apiFetch({ url: `/organizations/${encodeURIComponent(String(id))}/bootstrap-complete`, method: 'POST', signal
|
|
247
|
-
}, options);
|
|
248
|
-
};
|
|
249
|
-
export const getCompleteOrgBootstrapMutationOptions = (options) => {
|
|
250
|
-
const mutationKey = ['completeOrgBootstrap'];
|
|
251
|
-
const { mutation: mutationOptions, request: requestOptions } = options ?
|
|
252
|
-
options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey ?
|
|
253
|
-
options
|
|
254
|
-
: { ...options, mutation: { ...options.mutation, mutationKey } }
|
|
255
|
-
: { mutation: { mutationKey, }, request: undefined };
|
|
256
|
-
const mutationFn = (props) => {
|
|
257
|
-
const { id } = props ?? {};
|
|
258
|
-
return completeOrgBootstrap(id, requestOptions);
|
|
259
|
-
};
|
|
260
|
-
return { mutationFn, ...mutationOptions };
|
|
261
|
-
};
|
|
262
|
-
/**
|
|
263
|
-
* @summary Mark the org's guided setup as complete.
|
|
264
|
-
*/
|
|
265
|
-
export const useCompleteOrgBootstrap = (options) => {
|
|
266
|
-
return useMutation(getCompleteOrgBootstrapMutationOptions(options));
|
|
267
|
-
};
|
|
268
|
-
/**
|
|
269
|
-
* The caller needs secrets access on both the source and target orgs.
|
|
270
|
-
* @summary Copy sandbox and model provider keys from another org.
|
|
271
|
-
*/
|
|
272
|
-
export const copyOrgKeyMaterial = (id, copyOrgKeyMaterialBody, options, signal) => {
|
|
273
|
-
return apiFetch({ url: `/organizations/${encodeURIComponent(String(id))}/copy-key-material`, method: 'POST',
|
|
274
|
-
headers: { 'Content-Type': 'application/json', },
|
|
275
|
-
data: copyOrgKeyMaterialBody, signal
|
|
276
|
-
}, options);
|
|
277
|
-
};
|
|
278
|
-
export const getCopyOrgKeyMaterialMutationOptions = (options) => {
|
|
279
|
-
const mutationKey = ['copyOrgKeyMaterial'];
|
|
280
|
-
const { mutation: mutationOptions, request: requestOptions } = options ?
|
|
281
|
-
options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey ?
|
|
282
|
-
options
|
|
283
|
-
: { ...options, mutation: { ...options.mutation, mutationKey } }
|
|
284
|
-
: { mutation: { mutationKey, }, request: undefined };
|
|
285
|
-
const mutationFn = (props) => {
|
|
286
|
-
const { id, data } = props ?? {};
|
|
287
|
-
return copyOrgKeyMaterial(id, data, requestOptions);
|
|
288
|
-
};
|
|
289
|
-
return { mutationFn, ...mutationOptions };
|
|
290
|
-
};
|
|
291
|
-
/**
|
|
292
|
-
* @summary Copy sandbox and model provider keys from another org.
|
|
293
|
-
*/
|
|
294
|
-
export const useCopyOrgKeyMaterial = (options) => {
|
|
295
|
-
return useMutation(getCopyOrgKeyMaterialMutationOptions(options));
|
|
296
|
-
};
|
|
297
|
-
/**
|
|
298
243
|
* @summary List the email domains claimed by the organization.
|
|
299
244
|
*/
|
|
300
245
|
export const listOrgEmailDomains = (id, options, signal) => {
|
|
@@ -537,34 +482,8 @@ export const useRemoveOrgMember = (options) => {
|
|
|
537
482
|
return useMutation(getRemoveOrgMemberMutationOptions(options));
|
|
538
483
|
};
|
|
539
484
|
/**
|
|
540
|
-
* @summary
|
|
485
|
+
* @summary List the org's installed, available, and system plugins.
|
|
541
486
|
*/
|
|
542
|
-
export const getOrgSetupState = (id, options, signal) => {
|
|
543
|
-
return apiFetch({ url: `/organizations/${encodeURIComponent(String(id))}/org-setup/state`, method: 'GET', signal
|
|
544
|
-
}, options);
|
|
545
|
-
};
|
|
546
|
-
export const getGetOrgSetupStateQueryKey = (id) => {
|
|
547
|
-
return [
|
|
548
|
-
`/organizations/${id}/org-setup/state`
|
|
549
|
-
];
|
|
550
|
-
};
|
|
551
|
-
export const getGetOrgSetupStateQueryOptions = (id, options) => {
|
|
552
|
-
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
553
|
-
const queryKey = queryOptions?.queryKey ?? getGetOrgSetupStateQueryKey(id);
|
|
554
|
-
const queryFn = ({ signal }) => getOrgSetupState(id, requestOptions, signal);
|
|
555
|
-
return { queryKey, queryFn, enabled: id !== null && id !== undefined, ...queryOptions };
|
|
556
|
-
};
|
|
557
|
-
/**
|
|
558
|
-
* @summary Report the org's guided setup progress.
|
|
559
|
-
*/
|
|
560
|
-
export function useGetOrgSetupState(id, options) {
|
|
561
|
-
const queryOptions = getGetOrgSetupStateQueryOptions(id, options);
|
|
562
|
-
const query = useQuery(queryOptions);
|
|
563
|
-
return withQueryKey(query, queryOptions.queryKey);
|
|
564
|
-
}
|
|
565
|
-
/**
|
|
566
|
-
* @summary List the org's installed, available, and system plugins.
|
|
567
|
-
*/
|
|
568
487
|
export const listOrgPlugins = (id, options, signal) => {
|
|
569
488
|
return apiFetch({ url: `/organizations/${encodeURIComponent(String(id))}/plugins`, method: 'GET', signal
|
|
570
489
|
}, options);
|
|
@@ -746,110 +665,6 @@ export function usePreviewOrgPluginUninstall(id, name, options) {
|
|
|
746
665
|
const query = useQuery(queryOptions);
|
|
747
666
|
return withQueryKey(query, queryOptions.queryKey);
|
|
748
667
|
}
|
|
749
|
-
/**
|
|
750
|
-
* @summary Mark a plugin setup step as complete.
|
|
751
|
-
*/
|
|
752
|
-
export const completePluginSetupStep = (id, plugin, step, options, signal) => {
|
|
753
|
-
return apiFetch({ url: `/organizations/${encodeURIComponent(String(id))}/plugins/${encodeURIComponent(String(plugin))}/setup-steps/${encodeURIComponent(String(step))}/complete`, method: 'POST', signal
|
|
754
|
-
}, options);
|
|
755
|
-
};
|
|
756
|
-
export const getCompletePluginSetupStepMutationOptions = (options) => {
|
|
757
|
-
const mutationKey = ['completePluginSetupStep'];
|
|
758
|
-
const { mutation: mutationOptions, request: requestOptions } = options ?
|
|
759
|
-
options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey ?
|
|
760
|
-
options
|
|
761
|
-
: { ...options, mutation: { ...options.mutation, mutationKey } }
|
|
762
|
-
: { mutation: { mutationKey, }, request: undefined };
|
|
763
|
-
const mutationFn = (props) => {
|
|
764
|
-
const { id, plugin, step } = props ?? {};
|
|
765
|
-
return completePluginSetupStep(id, plugin, step, requestOptions);
|
|
766
|
-
};
|
|
767
|
-
return { mutationFn, ...mutationOptions };
|
|
768
|
-
};
|
|
769
|
-
/**
|
|
770
|
-
* @summary Mark a plugin setup step as complete.
|
|
771
|
-
*/
|
|
772
|
-
export const useCompletePluginSetupStep = (options) => {
|
|
773
|
-
return useMutation(getCompletePluginSetupStepMutationOptions(options));
|
|
774
|
-
};
|
|
775
|
-
/**
|
|
776
|
-
* @summary Run a plugin setup step's connection test.
|
|
777
|
-
*/
|
|
778
|
-
export const testPluginSetupStep = (id, plugin, step, options, signal) => {
|
|
779
|
-
return apiFetch({ url: `/organizations/${encodeURIComponent(String(id))}/plugins/${encodeURIComponent(String(plugin))}/setup-steps/${encodeURIComponent(String(step))}/test`, method: 'POST', signal
|
|
780
|
-
}, options);
|
|
781
|
-
};
|
|
782
|
-
export const getTestPluginSetupStepMutationOptions = (options) => {
|
|
783
|
-
const mutationKey = ['testPluginSetupStep'];
|
|
784
|
-
const { mutation: mutationOptions, request: requestOptions } = options ?
|
|
785
|
-
options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey ?
|
|
786
|
-
options
|
|
787
|
-
: { ...options, mutation: { ...options.mutation, mutationKey } }
|
|
788
|
-
: { mutation: { mutationKey, }, request: undefined };
|
|
789
|
-
const mutationFn = (props) => {
|
|
790
|
-
const { id, plugin, step } = props ?? {};
|
|
791
|
-
return testPluginSetupStep(id, plugin, step, requestOptions);
|
|
792
|
-
};
|
|
793
|
-
return { mutationFn, ...mutationOptions };
|
|
794
|
-
};
|
|
795
|
-
/**
|
|
796
|
-
* @summary Run a plugin setup step's connection test.
|
|
797
|
-
*/
|
|
798
|
-
export const useTestPluginSetupStep = (options) => {
|
|
799
|
-
return useMutation(getTestPluginSetupStepMutationOptions(options));
|
|
800
|
-
};
|
|
801
|
-
/**
|
|
802
|
-
* @summary Mark the org's plugin selection as configured.
|
|
803
|
-
*/
|
|
804
|
-
export const markOrgPluginsConfigured = (id, options, signal) => {
|
|
805
|
-
return apiFetch({ url: `/organizations/${encodeURIComponent(String(id))}/plugins/mark-configured`, method: 'POST', signal
|
|
806
|
-
}, options);
|
|
807
|
-
};
|
|
808
|
-
export const getMarkOrgPluginsConfiguredMutationOptions = (options) => {
|
|
809
|
-
const mutationKey = ['markOrgPluginsConfigured'];
|
|
810
|
-
const { mutation: mutationOptions, request: requestOptions } = options ?
|
|
811
|
-
options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey ?
|
|
812
|
-
options
|
|
813
|
-
: { ...options, mutation: { ...options.mutation, mutationKey } }
|
|
814
|
-
: { mutation: { mutationKey, }, request: undefined };
|
|
815
|
-
const mutationFn = (props) => {
|
|
816
|
-
const { id } = props ?? {};
|
|
817
|
-
return markOrgPluginsConfigured(id, requestOptions);
|
|
818
|
-
};
|
|
819
|
-
return { mutationFn, ...mutationOptions };
|
|
820
|
-
};
|
|
821
|
-
/**
|
|
822
|
-
* @summary Mark the org's plugin selection as configured.
|
|
823
|
-
*/
|
|
824
|
-
export const useMarkOrgPluginsConfigured = (options) => {
|
|
825
|
-
return useMutation(getMarkOrgPluginsConfiguredMutationOptions(options));
|
|
826
|
-
};
|
|
827
|
-
/**
|
|
828
|
-
* @summary List setup steps for the org's active plugins.
|
|
829
|
-
*/
|
|
830
|
-
export const listPluginSetupSteps = (id, options, signal) => {
|
|
831
|
-
return apiFetch({ url: `/organizations/${encodeURIComponent(String(id))}/plugins/setup-steps`, method: 'GET', signal
|
|
832
|
-
}, options);
|
|
833
|
-
};
|
|
834
|
-
export const getListPluginSetupStepsQueryKey = (id) => {
|
|
835
|
-
return [
|
|
836
|
-
`/organizations/${id}/plugins/setup-steps`
|
|
837
|
-
];
|
|
838
|
-
};
|
|
839
|
-
export const getListPluginSetupStepsQueryOptions = (id, options) => {
|
|
840
|
-
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
841
|
-
const queryKey = queryOptions?.queryKey ?? getListPluginSetupStepsQueryKey(id);
|
|
842
|
-
const queryFn = ({ signal }) => listPluginSetupSteps(id, requestOptions, signal);
|
|
843
|
-
return { queryKey, queryFn, enabled: id !== null && id !== undefined, ...queryOptions };
|
|
844
|
-
};
|
|
845
|
-
/**
|
|
846
|
-
* @summary List setup steps for the org's active plugins.
|
|
847
|
-
*/
|
|
848
|
-
export function useListPluginSetupSteps(id, options) {
|
|
849
|
-
const queryOptions = getListPluginSetupStepsQueryOptions(id, options);
|
|
850
|
-
const query = useQuery(queryOptions);
|
|
851
|
-
return withQueryKey(query, queryOptions.queryKey);
|
|
852
|
-
}
|
|
853
668
|
/**
|
|
854
669
|
* @summary List the roles available in the organization.
|
|
855
670
|
*/
|
|
@@ -988,68 +803,42 @@ export const useRevokeOrgRole = (options) => {
|
|
|
988
803
|
return useMutation(getRevokeOrgRoleMutationOptions(options));
|
|
989
804
|
};
|
|
990
805
|
/**
|
|
991
|
-
* @summary
|
|
992
|
-
*/
|
|
993
|
-
export const provisionOrganizationRunloopAccount = (id, options, signal) => {
|
|
994
|
-
return apiFetch({ url: `/organizations/${encodeURIComponent(String(id))}/runloop-provider/provision`, method: 'POST', signal
|
|
995
|
-
}, options);
|
|
996
|
-
};
|
|
997
|
-
export const getProvisionOrganizationRunloopAccountMutationOptions = (options) => {
|
|
998
|
-
const mutationKey = ['provisionOrganizationRunloopAccount'];
|
|
999
|
-
const { mutation: mutationOptions, request: requestOptions } = options ?
|
|
1000
|
-
options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey ?
|
|
1001
|
-
options
|
|
1002
|
-
: { ...options, mutation: { ...options.mutation, mutationKey } }
|
|
1003
|
-
: { mutation: { mutationKey, }, request: undefined };
|
|
1004
|
-
const mutationFn = (props) => {
|
|
1005
|
-
const { id } = props ?? {};
|
|
1006
|
-
return provisionOrganizationRunloopAccount(id, requestOptions);
|
|
1007
|
-
};
|
|
1008
|
-
return { mutationFn, ...mutationOptions };
|
|
1009
|
-
};
|
|
1010
|
-
/**
|
|
1011
|
-
* @summary Provision a Runloop account for an organization
|
|
1012
|
-
*/
|
|
1013
|
-
export const useProvisionOrganizationRunloopAccount = (options) => {
|
|
1014
|
-
return useMutation(getProvisionOrganizationRunloopAccountMutationOptions(options));
|
|
1015
|
-
};
|
|
1016
|
-
/**
|
|
1017
|
-
* @summary Report the org's sandbox provider key and account.
|
|
806
|
+
* @summary Report a target org's sandbox provider key and account.
|
|
1018
807
|
*/
|
|
1019
|
-
export const
|
|
808
|
+
export const adminGetOrgSandboxProvider = (id, options, signal) => {
|
|
1020
809
|
return apiFetch({ url: `/organizations/${encodeURIComponent(String(id))}/sandbox-provider`, method: 'GET', signal
|
|
1021
810
|
}, options);
|
|
1022
811
|
};
|
|
1023
|
-
export const
|
|
812
|
+
export const getAdminGetOrgSandboxProviderQueryKey = (id) => {
|
|
1024
813
|
return [
|
|
1025
814
|
`/organizations/${id}/sandbox-provider`
|
|
1026
815
|
];
|
|
1027
816
|
};
|
|
1028
|
-
export const
|
|
817
|
+
export const getAdminGetOrgSandboxProviderQueryOptions = (id, options) => {
|
|
1029
818
|
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
1030
|
-
const queryKey = queryOptions?.queryKey ??
|
|
1031
|
-
const queryFn = ({ signal }) =>
|
|
819
|
+
const queryKey = queryOptions?.queryKey ?? getAdminGetOrgSandboxProviderQueryKey(id);
|
|
820
|
+
const queryFn = ({ signal }) => adminGetOrgSandboxProvider(id, requestOptions, signal);
|
|
1032
821
|
return { queryKey, queryFn, enabled: id !== null && id !== undefined, ...queryOptions };
|
|
1033
822
|
};
|
|
1034
823
|
/**
|
|
1035
|
-
* @summary Report
|
|
824
|
+
* @summary Report a target org's sandbox provider key and account.
|
|
1036
825
|
*/
|
|
1037
|
-
export function
|
|
1038
|
-
const queryOptions =
|
|
826
|
+
export function useAdminGetOrgSandboxProvider(id, options) {
|
|
827
|
+
const queryOptions = getAdminGetOrgSandboxProviderQueryOptions(id, options);
|
|
1039
828
|
const query = useQuery(queryOptions);
|
|
1040
829
|
return withQueryKey(query, queryOptions.queryKey);
|
|
1041
830
|
}
|
|
1042
831
|
/**
|
|
1043
|
-
* @summary Validate and save
|
|
832
|
+
* @summary Validate and save a target org's sandbox provider API key.
|
|
1044
833
|
*/
|
|
1045
|
-
export const
|
|
834
|
+
export const adminSetOrgSandboxProvider = (id, adminSetOrgSandboxProviderBody, options, signal) => {
|
|
1046
835
|
return apiFetch({ url: `/organizations/${encodeURIComponent(String(id))}/sandbox-provider`, method: 'PUT',
|
|
1047
836
|
headers: { 'Content-Type': 'application/json', },
|
|
1048
|
-
data:
|
|
837
|
+
data: adminSetOrgSandboxProviderBody, signal
|
|
1049
838
|
}, options);
|
|
1050
839
|
};
|
|
1051
|
-
export const
|
|
1052
|
-
const mutationKey = ['
|
|
840
|
+
export const getAdminSetOrgSandboxProviderMutationOptions = (options) => {
|
|
841
|
+
const mutationKey = ['adminSetOrgSandboxProvider'];
|
|
1053
842
|
const { mutation: mutationOptions, request: requestOptions } = options ?
|
|
1054
843
|
options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey ?
|
|
1055
844
|
options
|
|
@@ -1057,53 +846,53 @@ export const getSetSandboxProviderMutationOptions = (options) => {
|
|
|
1057
846
|
: { mutation: { mutationKey, }, request: undefined };
|
|
1058
847
|
const mutationFn = (props) => {
|
|
1059
848
|
const { id, data } = props ?? {};
|
|
1060
|
-
return
|
|
849
|
+
return adminSetOrgSandboxProvider(id, data, requestOptions);
|
|
1061
850
|
};
|
|
1062
851
|
return { mutationFn, ...mutationOptions };
|
|
1063
852
|
};
|
|
1064
853
|
/**
|
|
1065
|
-
* @summary Validate and save
|
|
854
|
+
* @summary Validate and save a target org's sandbox provider API key.
|
|
1066
855
|
*/
|
|
1067
|
-
export const
|
|
1068
|
-
return useMutation(
|
|
856
|
+
export const useAdminSetOrgSandboxProvider = (options) => {
|
|
857
|
+
return useMutation(getAdminSetOrgSandboxProviderMutationOptions(options));
|
|
1069
858
|
};
|
|
1070
859
|
/**
|
|
1071
|
-
* @summary Report whether
|
|
860
|
+
* @summary Report whether a target org's stored sandbox key works.
|
|
1072
861
|
*/
|
|
1073
|
-
export const
|
|
862
|
+
export const adminGetOrgSandboxProviderHealth = (id, options, signal) => {
|
|
1074
863
|
return apiFetch({ url: `/organizations/${encodeURIComponent(String(id))}/sandbox-provider/health`, method: 'GET', signal
|
|
1075
864
|
}, options);
|
|
1076
865
|
};
|
|
1077
|
-
export const
|
|
866
|
+
export const getAdminGetOrgSandboxProviderHealthQueryKey = (id) => {
|
|
1078
867
|
return [
|
|
1079
868
|
`/organizations/${id}/sandbox-provider/health`
|
|
1080
869
|
];
|
|
1081
870
|
};
|
|
1082
|
-
export const
|
|
871
|
+
export const getAdminGetOrgSandboxProviderHealthQueryOptions = (id, options) => {
|
|
1083
872
|
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
1084
|
-
const queryKey = queryOptions?.queryKey ??
|
|
1085
|
-
const queryFn = ({ signal }) =>
|
|
873
|
+
const queryKey = queryOptions?.queryKey ?? getAdminGetOrgSandboxProviderHealthQueryKey(id);
|
|
874
|
+
const queryFn = ({ signal }) => adminGetOrgSandboxProviderHealth(id, requestOptions, signal);
|
|
1086
875
|
return { queryKey, queryFn, enabled: id !== null && id !== undefined, ...queryOptions };
|
|
1087
876
|
};
|
|
1088
877
|
/**
|
|
1089
|
-
* @summary Report whether
|
|
878
|
+
* @summary Report whether a target org's stored sandbox key works.
|
|
1090
879
|
*/
|
|
1091
|
-
export function
|
|
1092
|
-
const queryOptions =
|
|
880
|
+
export function useAdminGetOrgSandboxProviderHealth(id, options) {
|
|
881
|
+
const queryOptions = getAdminGetOrgSandboxProviderHealthQueryOptions(id, options);
|
|
1093
882
|
const query = useQuery(queryOptions);
|
|
1094
883
|
return withQueryKey(query, queryOptions.queryKey);
|
|
1095
884
|
}
|
|
1096
885
|
/**
|
|
1097
|
-
* @summary Check a sandbox provider API key without saving it.
|
|
886
|
+
* @summary Check a sandbox provider API key against a target org's pin without saving it.
|
|
1098
887
|
*/
|
|
1099
|
-
export const
|
|
888
|
+
export const adminValidateOrgSandboxProvider = (id, adminValidateOrgSandboxProviderBody, options, signal) => {
|
|
1100
889
|
return apiFetch({ url: `/organizations/${encodeURIComponent(String(id))}/sandbox-provider/validate`, method: 'POST',
|
|
1101
890
|
headers: { 'Content-Type': 'application/json', },
|
|
1102
|
-
data:
|
|
891
|
+
data: adminValidateOrgSandboxProviderBody, signal
|
|
1103
892
|
}, options);
|
|
1104
893
|
};
|
|
1105
|
-
export const
|
|
1106
|
-
const mutationKey = ['
|
|
894
|
+
export const getAdminValidateOrgSandboxProviderMutationOptions = (options) => {
|
|
895
|
+
const mutationKey = ['adminValidateOrgSandboxProvider'];
|
|
1107
896
|
const { mutation: mutationOptions, request: requestOptions } = options ?
|
|
1108
897
|
options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey ?
|
|
1109
898
|
options
|
|
@@ -1111,27 +900,27 @@ export const getValidateSandboxProviderMutationOptions = (options) => {
|
|
|
1111
900
|
: { mutation: { mutationKey, }, request: undefined };
|
|
1112
901
|
const mutationFn = (props) => {
|
|
1113
902
|
const { id, data } = props ?? {};
|
|
1114
|
-
return
|
|
903
|
+
return adminValidateOrgSandboxProvider(id, data, requestOptions);
|
|
1115
904
|
};
|
|
1116
905
|
return { mutationFn, ...mutationOptions };
|
|
1117
906
|
};
|
|
1118
907
|
/**
|
|
1119
|
-
* @summary Check a sandbox provider API key without saving it.
|
|
908
|
+
* @summary Check a sandbox provider API key against a target org's pin without saving it.
|
|
1120
909
|
*/
|
|
1121
|
-
export const
|
|
1122
|
-
return useMutation(
|
|
910
|
+
export const useAdminValidateOrgSandboxProvider = (options) => {
|
|
911
|
+
return useMutation(getAdminValidateOrgSandboxProviderMutationOptions(options));
|
|
1123
912
|
};
|
|
1124
913
|
/**
|
|
1125
|
-
* @summary Save
|
|
914
|
+
* @summary Save a target org's secret by name.
|
|
1126
915
|
*/
|
|
1127
|
-
export const
|
|
916
|
+
export const adminSetOrgSecret = (id, name, adminSetOrgSecretBody, options, signal) => {
|
|
1128
917
|
return apiFetch({ url: `/organizations/${encodeURIComponent(String(id))}/secrets/${encodeURIComponent(String(name))}`, method: 'PUT',
|
|
1129
918
|
headers: { 'Content-Type': 'application/json', },
|
|
1130
|
-
data:
|
|
919
|
+
data: adminSetOrgSecretBody, signal
|
|
1131
920
|
}, options);
|
|
1132
921
|
};
|
|
1133
|
-
export const
|
|
1134
|
-
const mutationKey = ['
|
|
922
|
+
export const getAdminSetOrgSecretMutationOptions = (options) => {
|
|
923
|
+
const mutationKey = ['adminSetOrgSecret'];
|
|
1135
924
|
const { mutation: mutationOptions, request: requestOptions } = options ?
|
|
1136
925
|
options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey ?
|
|
1137
926
|
options
|
|
@@ -1139,39 +928,39 @@ export const getSetOrgSecretMutationOptions = (options) => {
|
|
|
1139
928
|
: { mutation: { mutationKey, }, request: undefined };
|
|
1140
929
|
const mutationFn = (props) => {
|
|
1141
930
|
const { id, name, data } = props ?? {};
|
|
1142
|
-
return
|
|
931
|
+
return adminSetOrgSecret(id, name, data, requestOptions);
|
|
1143
932
|
};
|
|
1144
933
|
return { mutationFn, ...mutationOptions };
|
|
1145
934
|
};
|
|
1146
935
|
/**
|
|
1147
|
-
* @summary Save
|
|
936
|
+
* @summary Save a target org's secret by name.
|
|
1148
937
|
*/
|
|
1149
|
-
export const
|
|
1150
|
-
return useMutation(
|
|
938
|
+
export const useAdminSetOrgSecret = (options) => {
|
|
939
|
+
return useMutation(getAdminSetOrgSecretMutationOptions(options));
|
|
1151
940
|
};
|
|
1152
941
|
/**
|
|
1153
|
-
* @summary Report which of
|
|
942
|
+
* @summary Report which of a target org's secrets are set.
|
|
1154
943
|
*/
|
|
1155
|
-
export const
|
|
944
|
+
export const adminGetOrgSecretsStatus = (id, options, signal) => {
|
|
1156
945
|
return apiFetch({ url: `/organizations/${encodeURIComponent(String(id))}/secrets/status`, method: 'GET', signal
|
|
1157
946
|
}, options);
|
|
1158
947
|
};
|
|
1159
|
-
export const
|
|
948
|
+
export const getAdminGetOrgSecretsStatusQueryKey = (id) => {
|
|
1160
949
|
return [
|
|
1161
950
|
`/organizations/${id}/secrets/status`
|
|
1162
951
|
];
|
|
1163
952
|
};
|
|
1164
|
-
export const
|
|
953
|
+
export const getAdminGetOrgSecretsStatusQueryOptions = (id, options) => {
|
|
1165
954
|
const { query: queryOptions, request: requestOptions } = options ?? {};
|
|
1166
|
-
const queryKey = queryOptions?.queryKey ??
|
|
1167
|
-
const queryFn = ({ signal }) =>
|
|
955
|
+
const queryKey = queryOptions?.queryKey ?? getAdminGetOrgSecretsStatusQueryKey(id);
|
|
956
|
+
const queryFn = ({ signal }) => adminGetOrgSecretsStatus(id, requestOptions, signal);
|
|
1168
957
|
return { queryKey, queryFn, enabled: id !== null && id !== undefined, ...queryOptions };
|
|
1169
958
|
};
|
|
1170
959
|
/**
|
|
1171
|
-
* @summary Report which of
|
|
960
|
+
* @summary Report which of a target org's secrets are set.
|
|
1172
961
|
*/
|
|
1173
|
-
export function
|
|
1174
|
-
const queryOptions =
|
|
962
|
+
export function useAdminGetOrgSecretsStatus(id, options) {
|
|
963
|
+
const queryOptions = getAdminGetOrgSecretsStatusQueryOptions(id, options);
|
|
1175
964
|
const query = useQuery(queryOptions);
|
|
1176
965
|
return withQueryKey(query, queryOptions.queryKey);
|
|
1177
966
|
}
|