shoal-web-sdk 1.0.10 → 1.0.11
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/dist/sdk/@tanstack/react-query.gen.d.ts +1 -87
- package/dist/sdk/@tanstack/react-query.gen.js +1 -106
- package/dist/sdk/sdk.gen.d.ts +1 -18
- package/dist/sdk/sdk.gen.js +0 -80
- package/dist/sdk/types.gen.d.ts +0 -252
- package/dist/sdk/zod.gen.d.ts +0 -185
- package/dist/sdk/zod.gen.js +0 -104
- package/dist/tanstack-codegen/generated/generated.d.ts +1 -28
- package/dist/tanstack-codegen/generated/generated.js +1 -79
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type InfiniteData, type UseMutationOptions } from '@tanstack/react-query';
|
|
2
2
|
import { type Options } from '../sdk.gen';
|
|
3
|
-
import type { CheckSubdomainUniquenessData, CreateEnvironmentData, CreateEnvironmentError, CreateEnvironmentResponse, CreateEnvironmentVariableData, CreateEnvironmentVariableError, CreateFeatureRequestData, CreateFeatureRequestError, CreateProjectData, CreateProjectError, CreateProjectResponse, CreateSetupIntentData, CreateSetupIntentError, CreateSetupIntentResponse, CreateSpaceData, CreateSpaceError, CreateSpaceInviteData, CreateSpaceInviteError, CreateSpaceInviteResponse, CreateSpaceResponse,
|
|
3
|
+
import type { CheckSubdomainUniquenessData, CreateEnvironmentData, CreateEnvironmentError, CreateEnvironmentResponse, CreateEnvironmentVariableData, CreateEnvironmentVariableError, CreateFeatureRequestData, CreateFeatureRequestError, CreateProjectData, CreateProjectError, CreateProjectResponse, CreateSetupIntentData, CreateSetupIntentError, CreateSetupIntentResponse, CreateSpaceData, CreateSpaceError, CreateSpaceInviteData, CreateSpaceInviteError, CreateSpaceInviteResponse, CreateSpaceResponse, CreateUsernameData, CreateUsernameError, DeleteAccountIdentityData, DeleteAccountIdentityError, DeleteAccountIdentityResponse, DeleteEnvironmentVariableData, DeleteEnvironmentVariableError, DeleteEnvironmentVariableResponse, DeployVersionData, DeployVersionError, FetchBillingPricesData, FetchGraphM2mData, FetchKindeOrganisationBillingAgreementsData, FetchNodeM2mData, GetBillingPlanData, GetBillingUsageData, GetConnectedAppUrlData, GetEnvironmentOverviewData, GetEnvironmentVariablesData, GetEnvironmentVersionsData, GetGraphOverviewData, GetProjectOverviewData, GetPublicInviteData, GetServiceHealthData, GetSpaceInvitesData, GetSpaceOrgCodeData, GetSpaceOverviewData, GetSpaceStatsData, GetUserIdentitiesData, GetUserInvitesData, GetUserProfileData, GetVersionData, GetVersionM2mData, JoinSpaceData, JoinSpaceError, LeaveSpaceData, LeaveSpaceError, ListBillingInvoicesData, ListInstallationBranchesData, ListInstallationRepositoriesData, ListPaymentMethodsData, ListSpaceMemberRolesData, ListSpaceMembersData, ListUserInstallationsData, ListUserSpacesData, RecordCloudUsageData, RecordCloudUsageError, RecordOnboardingAnalyticsData, RecordOnboardingAnalyticsError, RejectSpaceInviteData, RejectSpaceInviteError, RejectSpaceInviteResponse, RemovePaymentMethodData, RemovePaymentMethodError, RemovePaymentMethodResponse, RequestAccountPasswordResetData, RequestAccountPasswordResetError, RequestSignedDownloadUrlData, RequestSignedUploadUrlData, RequestSignedUploadUrlError, RequestSignedUploadUrlResponse, RevokeSpaceInviteData, RevokeSpaceInviteError, RevokeSpaceInviteResponse, SetDefaultPaymentMethodData, SetDefaultPaymentMethodError, SetDefaultPaymentMethodResponse, UpdateBillingPlanData, UpdateBillingPlanError, UpdateConnectedAppTokenData, UpdateConnectedAppTokenError, UpdateDeploymentStatusM2mData, UpdateDeploymentStatusM2mError, UpdateEnvironmentVariableData, UpdateEnvironmentVariableError, UpdateGraphM2mData, UpdateGraphM2mError, UpdateGraphStateData, UpdateGraphStateError, UpdateNodeM2mData, UpdateNodeM2mError, UpdateUsernameData, UpdateUsernameError, UpdateUserProfileData, UpdateUserProfileError } from '../types.gen';
|
|
4
4
|
export type QueryKey<TOptions extends Options> = [
|
|
5
5
|
Pick<TOptions, 'baseUrl' | 'body' | 'headers' | 'path' | 'query'> & {
|
|
6
6
|
_id: string;
|
|
@@ -450,84 +450,6 @@ export declare const createFeatureRequestMutation: (options?: Partial<Options<Cr
|
|
|
450
450
|
* Record analytics data captured during the onboarding flow.
|
|
451
451
|
*/
|
|
452
452
|
export declare const recordOnboardingAnalyticsMutation: (options?: Partial<Options<RecordOnboardingAnalyticsData>>) => UseMutationOptions<unknown, RecordOnboardingAnalyticsError, Options<RecordOnboardingAnalyticsData>>;
|
|
453
|
-
export declare const viewTemplatesQueryKey: (options?: Options<ViewTemplatesData>) => [Pick<Options<ViewTemplatesData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
454
|
-
_id: string;
|
|
455
|
-
_infinite?: boolean;
|
|
456
|
-
tags?: ReadonlyArray<string>;
|
|
457
|
-
}];
|
|
458
|
-
export declare const viewTemplatesOptions: (options?: Options<ViewTemplatesData>) => import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<import("../types.gen").PaginatedTemplates, Error, import("../types.gen").PaginatedTemplates, [Pick<Options<ViewTemplatesData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
459
|
-
_id: string;
|
|
460
|
-
_infinite?: boolean;
|
|
461
|
-
tags?: ReadonlyArray<string>;
|
|
462
|
-
}]>, "queryFn"> & {
|
|
463
|
-
queryFn?: import("@tanstack/react-query").QueryFunction<import("../types.gen").PaginatedTemplates, [Pick<Options<ViewTemplatesData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
464
|
-
_id: string;
|
|
465
|
-
_infinite?: boolean;
|
|
466
|
-
tags?: ReadonlyArray<string>;
|
|
467
|
-
}], never> | undefined;
|
|
468
|
-
} & {
|
|
469
|
-
queryKey: [Pick<Options<ViewTemplatesData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
470
|
-
_id: string;
|
|
471
|
-
_infinite?: boolean;
|
|
472
|
-
tags?: ReadonlyArray<string>;
|
|
473
|
-
}] & {
|
|
474
|
-
[dataTagSymbol]: import("../types.gen").PaginatedTemplates;
|
|
475
|
-
[dataTagErrorSymbol]: Error;
|
|
476
|
-
};
|
|
477
|
-
};
|
|
478
|
-
export declare const viewTemplatesInfiniteQueryKey: (options?: Options<ViewTemplatesData>) => QueryKey<Options<ViewTemplatesData>>;
|
|
479
|
-
export declare const viewTemplatesInfiniteOptions: (options?: Options<ViewTemplatesData>) => import("@tanstack/react-query").UseInfiniteQueryOptions<import("../types.gen").PaginatedTemplates, import("../types.gen").ErrorResponse, InfiniteData<import("../types.gen").PaginatedTemplates, unknown>, QueryKey<Options<ViewTemplatesData>>, number | Pick<Pick<Options<ViewTemplatesData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
480
|
-
_id: string;
|
|
481
|
-
_infinite?: boolean;
|
|
482
|
-
tags?: ReadonlyArray<string>;
|
|
483
|
-
}, "query" | "body" | "headers" | "path">> & {
|
|
484
|
-
initialData: InfiniteData<import("../types.gen").PaginatedTemplates, number | Pick<Pick<Options<ViewTemplatesData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
485
|
-
_id: string;
|
|
486
|
-
_infinite?: boolean;
|
|
487
|
-
tags?: ReadonlyArray<string>;
|
|
488
|
-
}, "query" | "body" | "headers" | "path">> | (() => InfiniteData<import("../types.gen").PaginatedTemplates, number | Pick<Pick<Options<ViewTemplatesData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
489
|
-
_id: string;
|
|
490
|
-
_infinite?: boolean;
|
|
491
|
-
tags?: ReadonlyArray<string>;
|
|
492
|
-
}, "query" | "body" | "headers" | "path">>) | undefined;
|
|
493
|
-
} & {
|
|
494
|
-
queryKey: QueryKey<Options<ViewTemplatesData>> & {
|
|
495
|
-
[dataTagSymbol]: InfiniteData<import("../types.gen").PaginatedTemplates, unknown>;
|
|
496
|
-
[dataTagErrorSymbol]: import("../types.gen").ErrorResponse;
|
|
497
|
-
};
|
|
498
|
-
};
|
|
499
|
-
export declare const getTemplateQueryKey: (options: Options<GetTemplateData>) => [Pick<Options<GetTemplateData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
500
|
-
_id: string;
|
|
501
|
-
_infinite?: boolean;
|
|
502
|
-
tags?: ReadonlyArray<string>;
|
|
503
|
-
}];
|
|
504
|
-
/**
|
|
505
|
-
* Retrieve a template record.
|
|
506
|
-
*/
|
|
507
|
-
export declare const getTemplateOptions: (options: Options<GetTemplateData>) => import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<import("../types.gen").Template, Error, import("../types.gen").Template, [Pick<Options<GetTemplateData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
508
|
-
_id: string;
|
|
509
|
-
_infinite?: boolean;
|
|
510
|
-
tags?: ReadonlyArray<string>;
|
|
511
|
-
}]>, "queryFn"> & {
|
|
512
|
-
queryFn?: import("@tanstack/react-query").QueryFunction<import("../types.gen").Template, [Pick<Options<GetTemplateData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
513
|
-
_id: string;
|
|
514
|
-
_infinite?: boolean;
|
|
515
|
-
tags?: ReadonlyArray<string>;
|
|
516
|
-
}], never> | undefined;
|
|
517
|
-
} & {
|
|
518
|
-
queryKey: [Pick<Options<GetTemplateData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
519
|
-
_id: string;
|
|
520
|
-
_infinite?: boolean;
|
|
521
|
-
tags?: ReadonlyArray<string>;
|
|
522
|
-
}] & {
|
|
523
|
-
[dataTagSymbol]: import("../types.gen").Template;
|
|
524
|
-
[dataTagErrorSymbol]: Error;
|
|
525
|
-
};
|
|
526
|
-
};
|
|
527
|
-
/**
|
|
528
|
-
* Update a template record.
|
|
529
|
-
*/
|
|
530
|
-
export declare const updateTemplateMutation: (options?: Partial<Options<UpdateTemplateData>>) => UseMutationOptions<UpdateTemplateResponse, UpdateTemplateError, Options<UpdateTemplateData>>;
|
|
531
453
|
/**
|
|
532
454
|
* Create a space.
|
|
533
455
|
*/
|
|
@@ -1032,14 +954,6 @@ export declare const updateEnvironmentVariableMutation: (options?: Partial<Optio
|
|
|
1032
954
|
* Create an environment variable. These are globally unique per project environment.
|
|
1033
955
|
*/
|
|
1034
956
|
export declare const createEnvironmentVariableMutation: (options?: Partial<Options<CreateEnvironmentVariableData>>) => UseMutationOptions<unknown, CreateEnvironmentVariableError, Options<CreateEnvironmentVariableData>>;
|
|
1035
|
-
/**
|
|
1036
|
-
* Delete a template record.
|
|
1037
|
-
*/
|
|
1038
|
-
export declare const deleteTemplateMutation: (options?: Partial<Options<DeleteTemplateData>>) => UseMutationOptions<DeleteTemplateResponse, DeleteTemplateError, Options<DeleteTemplateData>>;
|
|
1039
|
-
/**
|
|
1040
|
-
* Create a template. A template references the HEAD version of an environment.
|
|
1041
|
-
*/
|
|
1042
|
-
export declare const createTemplateMutation: (options?: Partial<Options<CreateTemplateData>>) => UseMutationOptions<CreateTemplateResponse, CreateTemplateError, Options<CreateTemplateData>>;
|
|
1043
957
|
export declare const getVersionQueryKey: (options: Options<GetVersionData>) => [Pick<Options<GetVersionData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
1044
958
|
_id: string;
|
|
1045
959
|
_infinite?: boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// This file is auto-generated by @hey-api/openapi-ts
|
|
2
2
|
import { infiniteQueryOptions, queryOptions } from '@tanstack/react-query';
|
|
3
3
|
import { client } from '../client.gen';
|
|
4
|
-
import { checkSubdomainUniqueness, createEnvironment, createEnvironmentVariable, createFeatureRequest, createProject, createSetupIntent, createSpace, createSpaceInvite,
|
|
4
|
+
import { checkSubdomainUniqueness, createEnvironment, createEnvironmentVariable, createFeatureRequest, createProject, createSetupIntent, createSpace, createSpaceInvite, createUsername, deleteAccountIdentity, deleteEnvironmentVariable, deployVersion, fetchBillingPrices, fetchGraphM2M, fetchKindeOrganisationBillingAgreements, fetchNodeM2M, getBillingPlan, getBillingUsage, getConnectedAppUrl, getEnvironmentOverview, getEnvironmentVariables, getEnvironmentVersions, getGraphOverview, getProjectOverview, getPublicInvite, getServiceHealth, getSpaceInvites, getSpaceOrgCode, getSpaceOverview, getSpaceStats, getUserIdentities, getUserInvites, getUserProfile, getVersion, getVersionM2M, joinSpace, leaveSpace, listBillingInvoices, listInstallationBranches, listInstallationRepositories, listPaymentMethods, listSpaceMemberRoles, listSpaceMembers, listUserInstallations, listUserSpaces, recordCloudUsage, recordOnboardingAnalytics, rejectSpaceInvite, removePaymentMethod, requestAccountPasswordReset, requestSignedDownloadUrl, requestSignedUploadUrl, revokeSpaceInvite, setDefaultPaymentMethod, updateBillingPlan, updateConnectedAppToken, updateDeploymentStatusM2M, updateEnvironmentVariable, updateGraphM2M, updateGraphState, updateNodeM2M, updateUsername, updateUserProfile } from '../sdk.gen';
|
|
5
5
|
const createQueryKey = (id, options, infinite, tags) => {
|
|
6
6
|
const params = { _id: id, baseUrl: options?.baseUrl || (options?.client ?? client).getConfig().baseUrl };
|
|
7
7
|
if (infinite) {
|
|
@@ -532,79 +532,6 @@ export const recordOnboardingAnalyticsMutation = (options) => {
|
|
|
532
532
|
};
|
|
533
533
|
return mutationOptions;
|
|
534
534
|
};
|
|
535
|
-
export const viewTemplatesQueryKey = (options) => createQueryKey('viewTemplates', options);
|
|
536
|
-
export const viewTemplatesOptions = (options) => {
|
|
537
|
-
return queryOptions({
|
|
538
|
-
queryFn: async ({ queryKey, signal }) => {
|
|
539
|
-
const { data } = await viewTemplates({
|
|
540
|
-
...options,
|
|
541
|
-
...queryKey[0],
|
|
542
|
-
signal,
|
|
543
|
-
throwOnError: true
|
|
544
|
-
});
|
|
545
|
-
return data;
|
|
546
|
-
},
|
|
547
|
-
queryKey: viewTemplatesQueryKey(options)
|
|
548
|
-
});
|
|
549
|
-
};
|
|
550
|
-
export const viewTemplatesInfiniteQueryKey = (options) => createQueryKey('viewTemplates', options, true);
|
|
551
|
-
export const viewTemplatesInfiniteOptions = (options) => {
|
|
552
|
-
return infiniteQueryOptions(
|
|
553
|
-
// @ts-ignore
|
|
554
|
-
{
|
|
555
|
-
queryFn: async ({ pageParam, queryKey, signal }) => {
|
|
556
|
-
// @ts-ignore
|
|
557
|
-
const page = typeof pageParam === 'object' ? pageParam : {
|
|
558
|
-
query: {
|
|
559
|
-
page: pageParam
|
|
560
|
-
}
|
|
561
|
-
};
|
|
562
|
-
const params = createInfiniteParams(queryKey, page);
|
|
563
|
-
const { data } = await viewTemplates({
|
|
564
|
-
...options,
|
|
565
|
-
...params,
|
|
566
|
-
signal,
|
|
567
|
-
throwOnError: true
|
|
568
|
-
});
|
|
569
|
-
return data;
|
|
570
|
-
},
|
|
571
|
-
queryKey: viewTemplatesInfiniteQueryKey(options)
|
|
572
|
-
});
|
|
573
|
-
};
|
|
574
|
-
export const getTemplateQueryKey = (options) => createQueryKey('getTemplate', options);
|
|
575
|
-
/**
|
|
576
|
-
* Retrieve a template record.
|
|
577
|
-
*/
|
|
578
|
-
export const getTemplateOptions = (options) => {
|
|
579
|
-
return queryOptions({
|
|
580
|
-
queryFn: async ({ queryKey, signal }) => {
|
|
581
|
-
const { data } = await getTemplate({
|
|
582
|
-
...options,
|
|
583
|
-
...queryKey[0],
|
|
584
|
-
signal,
|
|
585
|
-
throwOnError: true
|
|
586
|
-
});
|
|
587
|
-
return data;
|
|
588
|
-
},
|
|
589
|
-
queryKey: getTemplateQueryKey(options)
|
|
590
|
-
});
|
|
591
|
-
};
|
|
592
|
-
/**
|
|
593
|
-
* Update a template record.
|
|
594
|
-
*/
|
|
595
|
-
export const updateTemplateMutation = (options) => {
|
|
596
|
-
const mutationOptions = {
|
|
597
|
-
mutationFn: async (fnOptions) => {
|
|
598
|
-
const { data } = await updateTemplate({
|
|
599
|
-
...options,
|
|
600
|
-
...fnOptions,
|
|
601
|
-
throwOnError: true
|
|
602
|
-
});
|
|
603
|
-
return data;
|
|
604
|
-
}
|
|
605
|
-
};
|
|
606
|
-
return mutationOptions;
|
|
607
|
-
};
|
|
608
535
|
/**
|
|
609
536
|
* Create a space.
|
|
610
537
|
*/
|
|
@@ -1123,38 +1050,6 @@ export const createEnvironmentVariableMutation = (options) => {
|
|
|
1123
1050
|
};
|
|
1124
1051
|
return mutationOptions;
|
|
1125
1052
|
};
|
|
1126
|
-
/**
|
|
1127
|
-
* Delete a template record.
|
|
1128
|
-
*/
|
|
1129
|
-
export const deleteTemplateMutation = (options) => {
|
|
1130
|
-
const mutationOptions = {
|
|
1131
|
-
mutationFn: async (fnOptions) => {
|
|
1132
|
-
const { data } = await deleteTemplate({
|
|
1133
|
-
...options,
|
|
1134
|
-
...fnOptions,
|
|
1135
|
-
throwOnError: true
|
|
1136
|
-
});
|
|
1137
|
-
return data;
|
|
1138
|
-
}
|
|
1139
|
-
};
|
|
1140
|
-
return mutationOptions;
|
|
1141
|
-
};
|
|
1142
|
-
/**
|
|
1143
|
-
* Create a template. A template references the HEAD version of an environment.
|
|
1144
|
-
*/
|
|
1145
|
-
export const createTemplateMutation = (options) => {
|
|
1146
|
-
const mutationOptions = {
|
|
1147
|
-
mutationFn: async (fnOptions) => {
|
|
1148
|
-
const { data } = await createTemplate({
|
|
1149
|
-
...options,
|
|
1150
|
-
...fnOptions,
|
|
1151
|
-
throwOnError: true
|
|
1152
|
-
});
|
|
1153
|
-
return data;
|
|
1154
|
-
}
|
|
1155
|
-
};
|
|
1156
|
-
return mutationOptions;
|
|
1157
|
-
};
|
|
1158
1053
|
export const getVersionQueryKey = (options) => createQueryKey('getVersion', options);
|
|
1159
1054
|
/**
|
|
1160
1055
|
* Get a version inside an environment.
|
package/dist/sdk/sdk.gen.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Client, Options as Options2, TDataShape } from './client';
|
|
2
|
-
import type { CheckSubdomainUniquenessData, CheckSubdomainUniquenessErrors, CheckSubdomainUniquenessResponses, CreateEnvironmentData, CreateEnvironmentErrors, CreateEnvironmentResponses, CreateEnvironmentVariableData, CreateEnvironmentVariableErrors, CreateEnvironmentVariableResponses, CreateFeatureRequestData, CreateFeatureRequestErrors, CreateFeatureRequestResponses, CreateProjectData, CreateProjectErrors, CreateProjectResponses, CreateSetupIntentData, CreateSetupIntentErrors, CreateSetupIntentResponses, CreateSpaceData, CreateSpaceErrors, CreateSpaceInviteData, CreateSpaceInviteErrors, CreateSpaceInviteResponses, CreateSpaceResponses,
|
|
2
|
+
import type { CheckSubdomainUniquenessData, CheckSubdomainUniquenessErrors, CheckSubdomainUniquenessResponses, CreateEnvironmentData, CreateEnvironmentErrors, CreateEnvironmentResponses, CreateEnvironmentVariableData, CreateEnvironmentVariableErrors, CreateEnvironmentVariableResponses, CreateFeatureRequestData, CreateFeatureRequestErrors, CreateFeatureRequestResponses, CreateProjectData, CreateProjectErrors, CreateProjectResponses, CreateSetupIntentData, CreateSetupIntentErrors, CreateSetupIntentResponses, CreateSpaceData, CreateSpaceErrors, CreateSpaceInviteData, CreateSpaceInviteErrors, CreateSpaceInviteResponses, CreateSpaceResponses, CreateUsernameData, CreateUsernameErrors, CreateUsernameResponses, DeleteAccountIdentityData, DeleteAccountIdentityErrors, DeleteAccountIdentityResponses, DeleteEnvironmentVariableData, DeleteEnvironmentVariableErrors, DeleteEnvironmentVariableResponses, DeployVersionData, DeployVersionErrors, DeployVersionResponses, FetchBillingPricesData, FetchBillingPricesErrors, FetchBillingPricesResponses, FetchGraphM2mData, FetchGraphM2mErrors, FetchGraphM2mResponses, FetchKindeOrganisationBillingAgreementsData, FetchKindeOrganisationBillingAgreementsErrors, FetchKindeOrganisationBillingAgreementsResponses, FetchNodeM2mData, FetchNodeM2mErrors, FetchNodeM2mResponses, GetBillingPlanData, GetBillingPlanErrors, GetBillingPlanResponses, GetBillingUsageData, GetBillingUsageErrors, GetBillingUsageResponses, GetConnectedAppUrlData, GetConnectedAppUrlErrors, GetConnectedAppUrlResponses, GetEnvironmentOverviewData, GetEnvironmentOverviewErrors, GetEnvironmentOverviewResponses, GetEnvironmentVariablesData, GetEnvironmentVariablesErrors, GetEnvironmentVariablesResponses, GetEnvironmentVersionsData, GetEnvironmentVersionsResponses, GetGraphOverviewData, GetGraphOverviewErrors, GetGraphOverviewResponses, GetProjectOverviewData, GetProjectOverviewErrors, GetProjectOverviewResponses, GetPublicInviteData, GetPublicInviteErrors, GetPublicInviteResponses, GetServiceHealthData, GetServiceHealthResponses, GetSpaceInvitesData, GetSpaceInvitesErrors, GetSpaceInvitesResponses, GetSpaceOrgCodeData, GetSpaceOrgCodeErrors, GetSpaceOrgCodeResponses, GetSpaceOverviewData, GetSpaceOverviewErrors, GetSpaceOverviewResponses, GetSpaceStatsData, GetSpaceStatsErrors, GetSpaceStatsResponses, GetUserIdentitiesData, GetUserIdentitiesErrors, GetUserIdentitiesResponses, GetUserInvitesData, GetUserInvitesErrors, GetUserInvitesResponses, GetUserProfileData, GetUserProfileErrors, GetUserProfileResponses, GetVersionData, GetVersionErrors, GetVersionM2mData, GetVersionM2mErrors, GetVersionM2mResponses, GetVersionResponses, JoinSpaceData, JoinSpaceErrors, JoinSpaceResponses, LeaveSpaceData, LeaveSpaceErrors, LeaveSpaceResponses, ListBillingInvoicesData, ListBillingInvoicesErrors, ListBillingInvoicesResponses, ListInstallationBranchesData, ListInstallationBranchesErrors, ListInstallationBranchesResponses, ListInstallationRepositoriesData, ListInstallationRepositoriesErrors, ListInstallationRepositoriesResponses, ListPaymentMethodsData, ListPaymentMethodsErrors, ListPaymentMethodsResponses, ListSpaceMemberRolesData, ListSpaceMemberRolesErrors, ListSpaceMemberRolesResponses, ListSpaceMembersData, ListSpaceMembersErrors, ListSpaceMembersResponses, ListUserInstallationsData, ListUserInstallationsErrors, ListUserInstallationsResponses, ListUserSpacesData, ListUserSpacesErrors, ListUserSpacesResponses, RecordCloudUsageData, RecordCloudUsageErrors, RecordCloudUsageResponses, RecordOnboardingAnalyticsData, RecordOnboardingAnalyticsErrors, RecordOnboardingAnalyticsResponses, RejectSpaceInviteData, RejectSpaceInviteErrors, RejectSpaceInviteResponses, RemovePaymentMethodData, RemovePaymentMethodErrors, RemovePaymentMethodResponses, RequestAccountPasswordResetData, RequestAccountPasswordResetErrors, RequestAccountPasswordResetResponses, RequestSignedDownloadUrlData, RequestSignedDownloadUrlErrors, RequestSignedDownloadUrlResponses, RequestSignedUploadUrlData, RequestSignedUploadUrlErrors, RequestSignedUploadUrlResponses, RevokeSpaceInviteData, RevokeSpaceInviteErrors, RevokeSpaceInviteResponses, SetDefaultPaymentMethodData, SetDefaultPaymentMethodErrors, SetDefaultPaymentMethodResponses, UpdateBillingPlanData, UpdateBillingPlanErrors, UpdateBillingPlanResponses, UpdateConnectedAppTokenData, UpdateConnectedAppTokenErrors, UpdateConnectedAppTokenResponses, UpdateDeploymentStatusM2mData, UpdateDeploymentStatusM2mErrors, UpdateDeploymentStatusM2mResponses, UpdateEnvironmentVariableData, UpdateEnvironmentVariableErrors, UpdateEnvironmentVariableResponses, UpdateGraphM2mData, UpdateGraphM2mErrors, UpdateGraphM2mResponses, UpdateGraphStateData, UpdateGraphStateErrors, UpdateGraphStateResponses, UpdateNodeM2mData, UpdateNodeM2mErrors, UpdateNodeM2mResponses, UpdateUsernameData, UpdateUsernameErrors, UpdateUsernameResponses, UpdateUserProfileData, UpdateUserProfileErrors, UpdateUserProfileResponses } from './types.gen';
|
|
3
3
|
export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {
|
|
4
4
|
/**
|
|
5
5
|
* You can provide a client instance returned by `createClient()` instead of
|
|
@@ -95,15 +95,6 @@ export declare const createFeatureRequest: <ThrowOnError extends boolean = false
|
|
|
95
95
|
* Record analytics data captured during the onboarding flow.
|
|
96
96
|
*/
|
|
97
97
|
export declare const recordOnboardingAnalytics: <ThrowOnError extends boolean = false>(options: Options<RecordOnboardingAnalyticsData, ThrowOnError>) => import("./client").RequestResult<RecordOnboardingAnalyticsResponses, RecordOnboardingAnalyticsErrors, ThrowOnError, "fields">;
|
|
98
|
-
export declare const viewTemplates: <ThrowOnError extends boolean = false>(options?: Options<ViewTemplatesData, ThrowOnError>) => import("./client").RequestResult<ViewTemplatesResponses, ViewTemplatesErrors, ThrowOnError, "fields">;
|
|
99
|
-
/**
|
|
100
|
-
* Retrieve a template record.
|
|
101
|
-
*/
|
|
102
|
-
export declare const getTemplate: <ThrowOnError extends boolean = false>(options: Options<GetTemplateData, ThrowOnError>) => import("./client").RequestResult<GetTemplateResponses, GetTemplateErrors, ThrowOnError, "fields">;
|
|
103
|
-
/**
|
|
104
|
-
* Update a template record.
|
|
105
|
-
*/
|
|
106
|
-
export declare const updateTemplate: <ThrowOnError extends boolean = false>(options: Options<UpdateTemplateData, ThrowOnError>) => import("./client").RequestResult<UpdateTemplateResponses, UpdateTemplateErrors, ThrowOnError, "fields">;
|
|
107
98
|
/**
|
|
108
99
|
* Create a space.
|
|
109
100
|
*/
|
|
@@ -200,14 +191,6 @@ export declare const updateEnvironmentVariable: <ThrowOnError extends boolean =
|
|
|
200
191
|
* Create an environment variable. These are globally unique per project environment.
|
|
201
192
|
*/
|
|
202
193
|
export declare const createEnvironmentVariable: <ThrowOnError extends boolean = false>(options: Options<CreateEnvironmentVariableData, ThrowOnError>) => import("./client").RequestResult<CreateEnvironmentVariableResponses, CreateEnvironmentVariableErrors, ThrowOnError, "fields">;
|
|
203
|
-
/**
|
|
204
|
-
* Delete a template record.
|
|
205
|
-
*/
|
|
206
|
-
export declare const deleteTemplate: <ThrowOnError extends boolean = false>(options: Options<DeleteTemplateData, ThrowOnError>) => import("./client").RequestResult<DeleteTemplateResponses, DeleteTemplateErrors, ThrowOnError, "fields">;
|
|
207
|
-
/**
|
|
208
|
-
* Create a template. A template references the HEAD version of an environment.
|
|
209
|
-
*/
|
|
210
|
-
export declare const createTemplate: <ThrowOnError extends boolean = false>(options: Options<CreateTemplateData, ThrowOnError>) => import("./client").RequestResult<CreateTemplateResponses, CreateTemplateErrors, ThrowOnError, "fields">;
|
|
211
194
|
/**
|
|
212
195
|
* Get a version inside an environment.
|
|
213
196
|
*/
|
package/dist/sdk/sdk.gen.js
CHANGED
|
@@ -356,52 +356,6 @@ export const recordOnboardingAnalytics = (options) => {
|
|
|
356
356
|
}
|
|
357
357
|
});
|
|
358
358
|
};
|
|
359
|
-
export const viewTemplates = (options) => {
|
|
360
|
-
return (options?.client ?? client).get({
|
|
361
|
-
security: [
|
|
362
|
-
{
|
|
363
|
-
scheme: 'bearer',
|
|
364
|
-
type: 'http'
|
|
365
|
-
}
|
|
366
|
-
],
|
|
367
|
-
url: '/templates/view',
|
|
368
|
-
...options
|
|
369
|
-
});
|
|
370
|
-
};
|
|
371
|
-
/**
|
|
372
|
-
* Retrieve a template record.
|
|
373
|
-
*/
|
|
374
|
-
export const getTemplate = (options) => {
|
|
375
|
-
return (options.client ?? client).get({
|
|
376
|
-
security: [
|
|
377
|
-
{
|
|
378
|
-
scheme: 'bearer',
|
|
379
|
-
type: 'http'
|
|
380
|
-
}
|
|
381
|
-
],
|
|
382
|
-
url: '/templates/{template}',
|
|
383
|
-
...options
|
|
384
|
-
});
|
|
385
|
-
};
|
|
386
|
-
/**
|
|
387
|
-
* Update a template record.
|
|
388
|
-
*/
|
|
389
|
-
export const updateTemplate = (options) => {
|
|
390
|
-
return (options.client ?? client).patch({
|
|
391
|
-
security: [
|
|
392
|
-
{
|
|
393
|
-
scheme: 'bearer',
|
|
394
|
-
type: 'http'
|
|
395
|
-
}
|
|
396
|
-
],
|
|
397
|
-
url: '/templates/{template}',
|
|
398
|
-
...options,
|
|
399
|
-
headers: {
|
|
400
|
-
'Content-Type': 'application/json',
|
|
401
|
-
...options.headers
|
|
402
|
-
}
|
|
403
|
-
});
|
|
404
|
-
};
|
|
405
359
|
/**
|
|
406
360
|
* Create a space.
|
|
407
361
|
*/
|
|
@@ -786,40 +740,6 @@ export const createEnvironmentVariable = (options) => {
|
|
|
786
740
|
}
|
|
787
741
|
});
|
|
788
742
|
};
|
|
789
|
-
/**
|
|
790
|
-
* Delete a template record.
|
|
791
|
-
*/
|
|
792
|
-
export const deleteTemplate = (options) => {
|
|
793
|
-
return (options.client ?? client).delete({
|
|
794
|
-
security: [
|
|
795
|
-
{
|
|
796
|
-
scheme: 'bearer',
|
|
797
|
-
type: 'http'
|
|
798
|
-
}
|
|
799
|
-
],
|
|
800
|
-
url: '/auth/{spaceHandle}/{projectHandle}/{environmentHandle}/{template}',
|
|
801
|
-
...options
|
|
802
|
-
});
|
|
803
|
-
};
|
|
804
|
-
/**
|
|
805
|
-
* Create a template. A template references the HEAD version of an environment.
|
|
806
|
-
*/
|
|
807
|
-
export const createTemplate = (options) => {
|
|
808
|
-
return (options.client ?? client).post({
|
|
809
|
-
security: [
|
|
810
|
-
{
|
|
811
|
-
scheme: 'bearer',
|
|
812
|
-
type: 'http'
|
|
813
|
-
}
|
|
814
|
-
],
|
|
815
|
-
url: '/auth/{spaceHandle}/{projectHandle}/{environmentHandle}/templates/create',
|
|
816
|
-
...options,
|
|
817
|
-
headers: {
|
|
818
|
-
'Content-Type': 'application/json',
|
|
819
|
-
...options.headers
|
|
820
|
-
}
|
|
821
|
-
});
|
|
822
|
-
};
|
|
823
743
|
/**
|
|
824
744
|
* Get a version inside an environment.
|
|
825
745
|
*/
|
package/dist/sdk/types.gen.d.ts
CHANGED
|
@@ -9,26 +9,6 @@ export type EnvironmentVariable = {
|
|
|
9
9
|
key: string;
|
|
10
10
|
value: string;
|
|
11
11
|
};
|
|
12
|
-
export type UpdateTemplate = {
|
|
13
|
-
name?: string;
|
|
14
|
-
description?: string;
|
|
15
|
-
exported?: Array<string>;
|
|
16
|
-
};
|
|
17
|
-
export type CreateTemplate = {
|
|
18
|
-
name: string;
|
|
19
|
-
description: string;
|
|
20
|
-
exported: Array<string>;
|
|
21
|
-
};
|
|
22
|
-
export type Template = {
|
|
23
|
-
id: string;
|
|
24
|
-
environment: string;
|
|
25
|
-
ref: string;
|
|
26
|
-
updatedAt: string;
|
|
27
|
-
createdAt: string;
|
|
28
|
-
name: string;
|
|
29
|
-
description: string;
|
|
30
|
-
exported: Array<EnvironmentVariable>;
|
|
31
|
-
};
|
|
32
12
|
export type PlatformTier = 'free' | 'pro' | 'enterprise';
|
|
33
13
|
export type BillingInterval = 'monthly' | 'annual';
|
|
34
14
|
export type BillingPlanLookupKey = 'free-monthly' | 'pro-monthly' | 'pro-annual';
|
|
@@ -60,9 +40,6 @@ export type Pagination = {
|
|
|
60
40
|
limit: number;
|
|
61
41
|
total: number;
|
|
62
42
|
};
|
|
63
|
-
export type PaginatedTemplates = Pagination & {
|
|
64
|
-
templates: Array<Template>;
|
|
65
|
-
};
|
|
66
43
|
export type PaginatedInvites = Pagination & {
|
|
67
44
|
invites: Array<Invite>;
|
|
68
45
|
};
|
|
@@ -681,18 +658,6 @@ export type RepoOwner = string;
|
|
|
681
658
|
* Repository name.
|
|
682
659
|
*/
|
|
683
660
|
export type RepoName = string;
|
|
684
|
-
/**
|
|
685
|
-
* Template UUID.
|
|
686
|
-
*/
|
|
687
|
-
export type TemplateId = string;
|
|
688
|
-
/**
|
|
689
|
-
* Search value for a searchable field on an endpoint.
|
|
690
|
-
*/
|
|
691
|
-
export type Search = string;
|
|
692
|
-
/**
|
|
693
|
-
* The order results will appear in.
|
|
694
|
-
*/
|
|
695
|
-
export type Order = 'asc' | 'desc';
|
|
696
661
|
/**
|
|
697
662
|
* Page number (1-based).
|
|
698
663
|
*/
|
|
@@ -1550,129 +1515,6 @@ export type RecordOnboardingAnalyticsResponses = {
|
|
|
1550
1515
|
*/
|
|
1551
1516
|
202: unknown;
|
|
1552
1517
|
};
|
|
1553
|
-
export type ViewTemplatesData = {
|
|
1554
|
-
body?: never;
|
|
1555
|
-
path?: never;
|
|
1556
|
-
query?: {
|
|
1557
|
-
/**
|
|
1558
|
-
* Page size (max 100).
|
|
1559
|
-
*/
|
|
1560
|
-
limit?: number;
|
|
1561
|
-
/**
|
|
1562
|
-
* Page number (1-based).
|
|
1563
|
-
*/
|
|
1564
|
-
page?: number;
|
|
1565
|
-
/**
|
|
1566
|
-
* Search value for a searchable field on an endpoint.
|
|
1567
|
-
*/
|
|
1568
|
-
search?: string;
|
|
1569
|
-
/**
|
|
1570
|
-
* The order results will appear in.
|
|
1571
|
-
*/
|
|
1572
|
-
order?: 'asc' | 'desc';
|
|
1573
|
-
};
|
|
1574
|
-
url: '/templates/view';
|
|
1575
|
-
};
|
|
1576
|
-
export type ViewTemplatesErrors = {
|
|
1577
|
-
/**
|
|
1578
|
-
* Bad request.
|
|
1579
|
-
*/
|
|
1580
|
-
400: ErrorResponse;
|
|
1581
|
-
/**
|
|
1582
|
-
* Unauthorised user.
|
|
1583
|
-
*/
|
|
1584
|
-
401: ErrorResponse;
|
|
1585
|
-
/**
|
|
1586
|
-
* Invalid credentials.
|
|
1587
|
-
*/
|
|
1588
|
-
403: ErrorResponse;
|
|
1589
|
-
/**
|
|
1590
|
-
* Unexpected error.
|
|
1591
|
-
*/
|
|
1592
|
-
500: ErrorResponse;
|
|
1593
|
-
};
|
|
1594
|
-
export type ViewTemplatesError = ViewTemplatesErrors[keyof ViewTemplatesErrors];
|
|
1595
|
-
export type ViewTemplatesResponses = {
|
|
1596
|
-
/**
|
|
1597
|
-
* Paginated templates
|
|
1598
|
-
*/
|
|
1599
|
-
200: PaginatedTemplates;
|
|
1600
|
-
};
|
|
1601
|
-
export type ViewTemplatesResponse = ViewTemplatesResponses[keyof ViewTemplatesResponses];
|
|
1602
|
-
export type GetTemplateData = {
|
|
1603
|
-
body?: never;
|
|
1604
|
-
path: {
|
|
1605
|
-
/**
|
|
1606
|
-
* Template UUID.
|
|
1607
|
-
*/
|
|
1608
|
-
template: string;
|
|
1609
|
-
};
|
|
1610
|
-
query?: never;
|
|
1611
|
-
url: '/templates/{template}';
|
|
1612
|
-
};
|
|
1613
|
-
export type GetTemplateErrors = {
|
|
1614
|
-
/**
|
|
1615
|
-
* Bad request.
|
|
1616
|
-
*/
|
|
1617
|
-
400: ErrorResponse;
|
|
1618
|
-
/**
|
|
1619
|
-
* Unauthorised user.
|
|
1620
|
-
*/
|
|
1621
|
-
401: ErrorResponse;
|
|
1622
|
-
/**
|
|
1623
|
-
* Invalid credentials.
|
|
1624
|
-
*/
|
|
1625
|
-
403: ErrorResponse;
|
|
1626
|
-
/**
|
|
1627
|
-
* Unexpected error.
|
|
1628
|
-
*/
|
|
1629
|
-
500: ErrorResponse;
|
|
1630
|
-
};
|
|
1631
|
-
export type GetTemplateError = GetTemplateErrors[keyof GetTemplateErrors];
|
|
1632
|
-
export type GetTemplateResponses = {
|
|
1633
|
-
/**
|
|
1634
|
-
* The template.
|
|
1635
|
-
*/
|
|
1636
|
-
200: Template;
|
|
1637
|
-
};
|
|
1638
|
-
export type GetTemplateResponse = GetTemplateResponses[keyof GetTemplateResponses];
|
|
1639
|
-
export type UpdateTemplateData = {
|
|
1640
|
-
body: UpdateTemplate;
|
|
1641
|
-
path: {
|
|
1642
|
-
/**
|
|
1643
|
-
* Template UUID.
|
|
1644
|
-
*/
|
|
1645
|
-
template: string;
|
|
1646
|
-
};
|
|
1647
|
-
query?: never;
|
|
1648
|
-
url: '/templates/{template}';
|
|
1649
|
-
};
|
|
1650
|
-
export type UpdateTemplateErrors = {
|
|
1651
|
-
/**
|
|
1652
|
-
* Bad request.
|
|
1653
|
-
*/
|
|
1654
|
-
400: ErrorResponse;
|
|
1655
|
-
/**
|
|
1656
|
-
* Unauthorised user.
|
|
1657
|
-
*/
|
|
1658
|
-
401: ErrorResponse;
|
|
1659
|
-
/**
|
|
1660
|
-
* Invalid credentials.
|
|
1661
|
-
*/
|
|
1662
|
-
403: ErrorResponse;
|
|
1663
|
-
/**
|
|
1664
|
-
* Unexpected error.
|
|
1665
|
-
*/
|
|
1666
|
-
500: ErrorResponse;
|
|
1667
|
-
};
|
|
1668
|
-
export type UpdateTemplateError = UpdateTemplateErrors[keyof UpdateTemplateErrors];
|
|
1669
|
-
export type UpdateTemplateResponses = {
|
|
1670
|
-
/**
|
|
1671
|
-
* Updated Template.
|
|
1672
|
-
*/
|
|
1673
|
-
200: Template;
|
|
1674
|
-
};
|
|
1675
|
-
export type UpdateTemplateResponse = UpdateTemplateResponses[keyof UpdateTemplateResponses];
|
|
1676
1518
|
export type CreateSpaceData = {
|
|
1677
1519
|
body: CreateSpace;
|
|
1678
1520
|
path?: never;
|
|
@@ -2676,100 +2518,6 @@ export type CreateEnvironmentVariableResponses = {
|
|
|
2676
2518
|
*/
|
|
2677
2519
|
201: unknown;
|
|
2678
2520
|
};
|
|
2679
|
-
export type DeleteTemplateData = {
|
|
2680
|
-
body?: never;
|
|
2681
|
-
path: {
|
|
2682
|
-
/**
|
|
2683
|
-
* Template UUID.
|
|
2684
|
-
*/
|
|
2685
|
-
template: string;
|
|
2686
|
-
/**
|
|
2687
|
-
* The space handle. This must be globally unique.
|
|
2688
|
-
*/
|
|
2689
|
-
spaceHandle: string;
|
|
2690
|
-
/**
|
|
2691
|
-
* A project name. This must be unique to a space.
|
|
2692
|
-
*/
|
|
2693
|
-
projectHandle: string;
|
|
2694
|
-
/**
|
|
2695
|
-
* An environment name (e.g., dev, prod, foo-bar). This must be unique to a project.
|
|
2696
|
-
*/
|
|
2697
|
-
environmentHandle: string;
|
|
2698
|
-
};
|
|
2699
|
-
query?: never;
|
|
2700
|
-
url: '/auth/{spaceHandle}/{projectHandle}/{environmentHandle}/{template}';
|
|
2701
|
-
};
|
|
2702
|
-
export type DeleteTemplateErrors = {
|
|
2703
|
-
/**
|
|
2704
|
-
* Bad request.
|
|
2705
|
-
*/
|
|
2706
|
-
400: ErrorResponse;
|
|
2707
|
-
/**
|
|
2708
|
-
* Unauthorised user.
|
|
2709
|
-
*/
|
|
2710
|
-
401: ErrorResponse;
|
|
2711
|
-
/**
|
|
2712
|
-
* Invalid credentials.
|
|
2713
|
-
*/
|
|
2714
|
-
403: ErrorResponse;
|
|
2715
|
-
/**
|
|
2716
|
-
* Unexpected error.
|
|
2717
|
-
*/
|
|
2718
|
-
500: ErrorResponse;
|
|
2719
|
-
};
|
|
2720
|
-
export type DeleteTemplateError = DeleteTemplateErrors[keyof DeleteTemplateErrors];
|
|
2721
|
-
export type DeleteTemplateResponses = {
|
|
2722
|
-
/**
|
|
2723
|
-
* Template deleted.
|
|
2724
|
-
*/
|
|
2725
|
-
204: void;
|
|
2726
|
-
};
|
|
2727
|
-
export type DeleteTemplateResponse = DeleteTemplateResponses[keyof DeleteTemplateResponses];
|
|
2728
|
-
export type CreateTemplateData = {
|
|
2729
|
-
body: CreateTemplate;
|
|
2730
|
-
path: {
|
|
2731
|
-
/**
|
|
2732
|
-
* The space handle. This must be globally unique.
|
|
2733
|
-
*/
|
|
2734
|
-
spaceHandle: string;
|
|
2735
|
-
/**
|
|
2736
|
-
* A project name. This must be unique to a space.
|
|
2737
|
-
*/
|
|
2738
|
-
projectHandle: string;
|
|
2739
|
-
/**
|
|
2740
|
-
* An environment name (e.g., dev, prod, foo-bar). This must be unique to a project.
|
|
2741
|
-
*/
|
|
2742
|
-
environmentHandle: string;
|
|
2743
|
-
};
|
|
2744
|
-
query?: never;
|
|
2745
|
-
url: '/auth/{spaceHandle}/{projectHandle}/{environmentHandle}/templates/create';
|
|
2746
|
-
};
|
|
2747
|
-
export type CreateTemplateErrors = {
|
|
2748
|
-
/**
|
|
2749
|
-
* Bad request.
|
|
2750
|
-
*/
|
|
2751
|
-
400: ErrorResponse;
|
|
2752
|
-
/**
|
|
2753
|
-
* Unauthorised user.
|
|
2754
|
-
*/
|
|
2755
|
-
401: ErrorResponse;
|
|
2756
|
-
/**
|
|
2757
|
-
* Invalid credentials.
|
|
2758
|
-
*/
|
|
2759
|
-
403: ErrorResponse;
|
|
2760
|
-
/**
|
|
2761
|
-
* Unexpected error.
|
|
2762
|
-
*/
|
|
2763
|
-
500: ErrorResponse;
|
|
2764
|
-
};
|
|
2765
|
-
export type CreateTemplateError = CreateTemplateErrors[keyof CreateTemplateErrors];
|
|
2766
|
-
export type CreateTemplateResponses = {
|
|
2767
|
-
/**
|
|
2768
|
-
* Template created
|
|
2769
|
-
*/
|
|
2770
|
-
201: Template;
|
|
2771
|
-
};
|
|
2772
|
-
export type CreateTemplateResponse = CreateTemplateResponses[keyof CreateTemplateResponses];
|
|
2773
2521
|
export type GetVersionData = {
|
|
2774
2522
|
body?: never;
|
|
2775
2523
|
path: {
|
package/dist/sdk/zod.gen.d.ts
CHANGED
|
@@ -10,29 +10,6 @@ export declare const zEnvironmentVariables: z.ZodObject<{
|
|
|
10
10
|
value: z.ZodString;
|
|
11
11
|
}, z.core.$strip>>;
|
|
12
12
|
}, z.core.$strip>;
|
|
13
|
-
export declare const zUpdateTemplate: z.ZodObject<{
|
|
14
|
-
name: z.ZodOptional<z.ZodString>;
|
|
15
|
-
description: z.ZodOptional<z.ZodString>;
|
|
16
|
-
exported: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
17
|
-
}, z.core.$strip>;
|
|
18
|
-
export declare const zCreateTemplate: z.ZodObject<{
|
|
19
|
-
name: z.ZodString;
|
|
20
|
-
description: z.ZodString;
|
|
21
|
-
exported: z.ZodArray<z.ZodString>;
|
|
22
|
-
}, z.core.$strip>;
|
|
23
|
-
export declare const zTemplate: z.ZodObject<{
|
|
24
|
-
id: z.ZodUUID;
|
|
25
|
-
environment: z.ZodUUID;
|
|
26
|
-
ref: z.ZodUUID;
|
|
27
|
-
updatedAt: z.ZodISODateTime;
|
|
28
|
-
createdAt: z.ZodISODateTime;
|
|
29
|
-
name: z.ZodString;
|
|
30
|
-
description: z.ZodString;
|
|
31
|
-
exported: z.ZodArray<z.ZodObject<{
|
|
32
|
-
key: z.ZodString;
|
|
33
|
-
value: z.ZodString;
|
|
34
|
-
}, z.core.$strip>>;
|
|
35
|
-
}, z.core.$strip>;
|
|
36
13
|
export declare const zPlatformTier: z.ZodEnum<{
|
|
37
14
|
free: "free";
|
|
38
15
|
pro: "pro";
|
|
@@ -91,25 +68,6 @@ export declare const zPagination: z.ZodObject<{
|
|
|
91
68
|
limit: z.ZodInt;
|
|
92
69
|
total: z.ZodInt;
|
|
93
70
|
}, z.core.$strip>;
|
|
94
|
-
export declare const zPaginatedTemplates: z.ZodIntersection<z.ZodObject<{
|
|
95
|
-
page: z.ZodInt;
|
|
96
|
-
limit: z.ZodInt;
|
|
97
|
-
total: z.ZodInt;
|
|
98
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
99
|
-
templates: z.ZodArray<z.ZodObject<{
|
|
100
|
-
id: z.ZodUUID;
|
|
101
|
-
environment: z.ZodUUID;
|
|
102
|
-
ref: z.ZodUUID;
|
|
103
|
-
updatedAt: z.ZodISODateTime;
|
|
104
|
-
createdAt: z.ZodISODateTime;
|
|
105
|
-
name: z.ZodString;
|
|
106
|
-
description: z.ZodString;
|
|
107
|
-
exported: z.ZodArray<z.ZodObject<{
|
|
108
|
-
key: z.ZodString;
|
|
109
|
-
value: z.ZodString;
|
|
110
|
-
}, z.core.$strip>>;
|
|
111
|
-
}, z.core.$strip>>;
|
|
112
|
-
}, z.core.$strip>>;
|
|
113
71
|
export declare const zInvite: z.ZodObject<{
|
|
114
72
|
id: z.ZodUUID;
|
|
115
73
|
spaceName: z.ZodString;
|
|
@@ -1351,21 +1309,6 @@ export declare const zRepoOwner: z.ZodString;
|
|
|
1351
1309
|
* Repository name.
|
|
1352
1310
|
*/
|
|
1353
1311
|
export declare const zRepoName: z.ZodString;
|
|
1354
|
-
/**
|
|
1355
|
-
* Template UUID.
|
|
1356
|
-
*/
|
|
1357
|
-
export declare const zTemplateId: z.ZodUUID;
|
|
1358
|
-
/**
|
|
1359
|
-
* Search value for a searchable field on an endpoint.
|
|
1360
|
-
*/
|
|
1361
|
-
export declare const zSearch: z.ZodString;
|
|
1362
|
-
/**
|
|
1363
|
-
* The order results will appear in.
|
|
1364
|
-
*/
|
|
1365
|
-
export declare const zOrder: z.ZodEnum<{
|
|
1366
|
-
asc: "asc";
|
|
1367
|
-
desc: "desc";
|
|
1368
|
-
}>;
|
|
1369
1312
|
/**
|
|
1370
1313
|
* Page number (1-based).
|
|
1371
1314
|
*/
|
|
@@ -2331,91 +2274,6 @@ export declare const zRecordOnboardingAnalyticsData: z.ZodObject<{
|
|
|
2331
2274
|
path: z.ZodOptional<z.ZodNever>;
|
|
2332
2275
|
query: z.ZodOptional<z.ZodNever>;
|
|
2333
2276
|
}, z.core.$strip>;
|
|
2334
|
-
export declare const zViewTemplatesData: z.ZodObject<{
|
|
2335
|
-
body: z.ZodOptional<z.ZodNever>;
|
|
2336
|
-
path: z.ZodOptional<z.ZodNever>;
|
|
2337
|
-
query: z.ZodOptional<z.ZodObject<{
|
|
2338
|
-
limit: z.ZodDefault<z.ZodOptional<z.ZodInt>>;
|
|
2339
|
-
page: z.ZodDefault<z.ZodOptional<z.ZodInt>>;
|
|
2340
|
-
search: z.ZodOptional<z.ZodString>;
|
|
2341
|
-
order: z.ZodOptional<z.ZodEnum<{
|
|
2342
|
-
asc: "asc";
|
|
2343
|
-
desc: "desc";
|
|
2344
|
-
}>>;
|
|
2345
|
-
}, z.core.$strip>>;
|
|
2346
|
-
}, z.core.$strip>;
|
|
2347
|
-
/**
|
|
2348
|
-
* Paginated templates
|
|
2349
|
-
*/
|
|
2350
|
-
export declare const zViewTemplatesResponse: z.ZodIntersection<z.ZodObject<{
|
|
2351
|
-
page: z.ZodInt;
|
|
2352
|
-
limit: z.ZodInt;
|
|
2353
|
-
total: z.ZodInt;
|
|
2354
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
2355
|
-
templates: z.ZodArray<z.ZodObject<{
|
|
2356
|
-
id: z.ZodUUID;
|
|
2357
|
-
environment: z.ZodUUID;
|
|
2358
|
-
ref: z.ZodUUID;
|
|
2359
|
-
updatedAt: z.ZodISODateTime;
|
|
2360
|
-
createdAt: z.ZodISODateTime;
|
|
2361
|
-
name: z.ZodString;
|
|
2362
|
-
description: z.ZodString;
|
|
2363
|
-
exported: z.ZodArray<z.ZodObject<{
|
|
2364
|
-
key: z.ZodString;
|
|
2365
|
-
value: z.ZodString;
|
|
2366
|
-
}, z.core.$strip>>;
|
|
2367
|
-
}, z.core.$strip>>;
|
|
2368
|
-
}, z.core.$strip>>;
|
|
2369
|
-
export declare const zGetTemplateData: z.ZodObject<{
|
|
2370
|
-
body: z.ZodOptional<z.ZodNever>;
|
|
2371
|
-
path: z.ZodObject<{
|
|
2372
|
-
template: z.ZodUUID;
|
|
2373
|
-
}, z.core.$strip>;
|
|
2374
|
-
query: z.ZodOptional<z.ZodNever>;
|
|
2375
|
-
}, z.core.$strip>;
|
|
2376
|
-
/**
|
|
2377
|
-
* The template.
|
|
2378
|
-
*/
|
|
2379
|
-
export declare const zGetTemplateResponse: z.ZodObject<{
|
|
2380
|
-
id: z.ZodUUID;
|
|
2381
|
-
environment: z.ZodUUID;
|
|
2382
|
-
ref: z.ZodUUID;
|
|
2383
|
-
updatedAt: z.ZodISODateTime;
|
|
2384
|
-
createdAt: z.ZodISODateTime;
|
|
2385
|
-
name: z.ZodString;
|
|
2386
|
-
description: z.ZodString;
|
|
2387
|
-
exported: z.ZodArray<z.ZodObject<{
|
|
2388
|
-
key: z.ZodString;
|
|
2389
|
-
value: z.ZodString;
|
|
2390
|
-
}, z.core.$strip>>;
|
|
2391
|
-
}, z.core.$strip>;
|
|
2392
|
-
export declare const zUpdateTemplateData: z.ZodObject<{
|
|
2393
|
-
body: z.ZodObject<{
|
|
2394
|
-
name: z.ZodOptional<z.ZodString>;
|
|
2395
|
-
description: z.ZodOptional<z.ZodString>;
|
|
2396
|
-
exported: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2397
|
-
}, z.core.$strip>;
|
|
2398
|
-
path: z.ZodObject<{
|
|
2399
|
-
template: z.ZodUUID;
|
|
2400
|
-
}, z.core.$strip>;
|
|
2401
|
-
query: z.ZodOptional<z.ZodNever>;
|
|
2402
|
-
}, z.core.$strip>;
|
|
2403
|
-
/**
|
|
2404
|
-
* Updated Template.
|
|
2405
|
-
*/
|
|
2406
|
-
export declare const zUpdateTemplateResponse: z.ZodObject<{
|
|
2407
|
-
id: z.ZodUUID;
|
|
2408
|
-
environment: z.ZodUUID;
|
|
2409
|
-
ref: z.ZodUUID;
|
|
2410
|
-
updatedAt: z.ZodISODateTime;
|
|
2411
|
-
createdAt: z.ZodISODateTime;
|
|
2412
|
-
name: z.ZodString;
|
|
2413
|
-
description: z.ZodString;
|
|
2414
|
-
exported: z.ZodArray<z.ZodObject<{
|
|
2415
|
-
key: z.ZodString;
|
|
2416
|
-
value: z.ZodString;
|
|
2417
|
-
}, z.core.$strip>>;
|
|
2418
|
-
}, z.core.$strip>;
|
|
2419
2277
|
export declare const zCreateSpaceData: z.ZodObject<{
|
|
2420
2278
|
body: z.ZodObject<{
|
|
2421
2279
|
name: z.ZodString;
|
|
@@ -2923,49 +2781,6 @@ export declare const zCreateEnvironmentVariableData: z.ZodObject<{
|
|
|
2923
2781
|
}, z.core.$strip>;
|
|
2924
2782
|
query: z.ZodOptional<z.ZodNever>;
|
|
2925
2783
|
}, z.core.$strip>;
|
|
2926
|
-
export declare const zDeleteTemplateData: z.ZodObject<{
|
|
2927
|
-
body: z.ZodOptional<z.ZodNever>;
|
|
2928
|
-
path: z.ZodObject<{
|
|
2929
|
-
template: z.ZodUUID;
|
|
2930
|
-
spaceHandle: z.ZodString;
|
|
2931
|
-
projectHandle: z.ZodString;
|
|
2932
|
-
environmentHandle: z.ZodString;
|
|
2933
|
-
}, z.core.$strip>;
|
|
2934
|
-
query: z.ZodOptional<z.ZodNever>;
|
|
2935
|
-
}, z.core.$strip>;
|
|
2936
|
-
/**
|
|
2937
|
-
* Template deleted.
|
|
2938
|
-
*/
|
|
2939
|
-
export declare const zDeleteTemplateResponse: z.ZodVoid;
|
|
2940
|
-
export declare const zCreateTemplateData: z.ZodObject<{
|
|
2941
|
-
body: z.ZodObject<{
|
|
2942
|
-
name: z.ZodString;
|
|
2943
|
-
description: z.ZodString;
|
|
2944
|
-
exported: z.ZodArray<z.ZodString>;
|
|
2945
|
-
}, z.core.$strip>;
|
|
2946
|
-
path: z.ZodObject<{
|
|
2947
|
-
spaceHandle: z.ZodString;
|
|
2948
|
-
projectHandle: z.ZodString;
|
|
2949
|
-
environmentHandle: z.ZodString;
|
|
2950
|
-
}, z.core.$strip>;
|
|
2951
|
-
query: z.ZodOptional<z.ZodNever>;
|
|
2952
|
-
}, z.core.$strip>;
|
|
2953
|
-
/**
|
|
2954
|
-
* Template created
|
|
2955
|
-
*/
|
|
2956
|
-
export declare const zCreateTemplateResponse: z.ZodObject<{
|
|
2957
|
-
id: z.ZodUUID;
|
|
2958
|
-
environment: z.ZodUUID;
|
|
2959
|
-
ref: z.ZodUUID;
|
|
2960
|
-
updatedAt: z.ZodISODateTime;
|
|
2961
|
-
createdAt: z.ZodISODateTime;
|
|
2962
|
-
name: z.ZodString;
|
|
2963
|
-
description: z.ZodString;
|
|
2964
|
-
exported: z.ZodArray<z.ZodObject<{
|
|
2965
|
-
key: z.ZodString;
|
|
2966
|
-
value: z.ZodString;
|
|
2967
|
-
}, z.core.$strip>>;
|
|
2968
|
-
}, z.core.$strip>;
|
|
2969
2784
|
export declare const zGetVersionData: z.ZodObject<{
|
|
2970
2785
|
body: z.ZodOptional<z.ZodNever>;
|
|
2971
2786
|
path: z.ZodObject<{
|
package/dist/sdk/zod.gen.js
CHANGED
|
@@ -8,26 +8,6 @@ export const zEnvironmentVariable = z.object({
|
|
|
8
8
|
export const zEnvironmentVariables = z.object({
|
|
9
9
|
vars: z.array(zEnvironmentVariable)
|
|
10
10
|
});
|
|
11
|
-
export const zUpdateTemplate = z.object({
|
|
12
|
-
name: z.optional(z.string()),
|
|
13
|
-
description: z.optional(z.string()),
|
|
14
|
-
exported: z.optional(z.array(z.string()))
|
|
15
|
-
});
|
|
16
|
-
export const zCreateTemplate = z.object({
|
|
17
|
-
name: z.string(),
|
|
18
|
-
description: z.string(),
|
|
19
|
-
exported: z.array(z.string())
|
|
20
|
-
});
|
|
21
|
-
export const zTemplate = z.object({
|
|
22
|
-
id: z.uuid(),
|
|
23
|
-
environment: z.uuid(),
|
|
24
|
-
ref: z.uuid(),
|
|
25
|
-
updatedAt: z.iso.datetime(),
|
|
26
|
-
createdAt: z.iso.datetime(),
|
|
27
|
-
name: z.string(),
|
|
28
|
-
description: z.string(),
|
|
29
|
-
exported: z.array(zEnvironmentVariable)
|
|
30
|
-
});
|
|
31
11
|
export const zPlatformTier = z.enum([
|
|
32
12
|
'free',
|
|
33
13
|
'pro',
|
|
@@ -73,9 +53,6 @@ export const zPagination = z.object({
|
|
|
73
53
|
limit: z.int(),
|
|
74
54
|
total: z.int()
|
|
75
55
|
});
|
|
76
|
-
export const zPaginatedTemplates = zPagination.and(z.object({
|
|
77
|
-
templates: z.array(zTemplate)
|
|
78
|
-
}));
|
|
79
56
|
export const zInvite = z.object({
|
|
80
57
|
id: z.uuid(),
|
|
81
58
|
spaceName: z.string(),
|
|
@@ -661,21 +638,6 @@ export const zRepoOwner = z.string();
|
|
|
661
638
|
* Repository name.
|
|
662
639
|
*/
|
|
663
640
|
export const zRepoName = z.string();
|
|
664
|
-
/**
|
|
665
|
-
* Template UUID.
|
|
666
|
-
*/
|
|
667
|
-
export const zTemplateId = z.uuid();
|
|
668
|
-
/**
|
|
669
|
-
* Search value for a searchable field on an endpoint.
|
|
670
|
-
*/
|
|
671
|
-
export const zSearch = z.string();
|
|
672
|
-
/**
|
|
673
|
-
* The order results will appear in.
|
|
674
|
-
*/
|
|
675
|
-
export const zOrder = z.enum([
|
|
676
|
-
'asc',
|
|
677
|
-
'desc'
|
|
678
|
-
]);
|
|
679
641
|
/**
|
|
680
642
|
* Page number (1-based).
|
|
681
643
|
*/
|
|
@@ -926,45 +888,6 @@ export const zRecordOnboardingAnalyticsData = z.object({
|
|
|
926
888
|
path: z.optional(z.never()),
|
|
927
889
|
query: z.optional(z.never())
|
|
928
890
|
});
|
|
929
|
-
export const zViewTemplatesData = z.object({
|
|
930
|
-
body: z.optional(z.never()),
|
|
931
|
-
path: z.optional(z.never()),
|
|
932
|
-
query: z.optional(z.object({
|
|
933
|
-
limit: z.optional(z.int().gte(1).lte(100)).default(10),
|
|
934
|
-
page: z.optional(z.int().gte(1)).default(1),
|
|
935
|
-
search: z.optional(z.string()),
|
|
936
|
-
order: z.optional(z.enum([
|
|
937
|
-
'asc',
|
|
938
|
-
'desc'
|
|
939
|
-
]))
|
|
940
|
-
}))
|
|
941
|
-
});
|
|
942
|
-
/**
|
|
943
|
-
* Paginated templates
|
|
944
|
-
*/
|
|
945
|
-
export const zViewTemplatesResponse = zPaginatedTemplates;
|
|
946
|
-
export const zGetTemplateData = z.object({
|
|
947
|
-
body: z.optional(z.never()),
|
|
948
|
-
path: z.object({
|
|
949
|
-
template: z.uuid()
|
|
950
|
-
}),
|
|
951
|
-
query: z.optional(z.never())
|
|
952
|
-
});
|
|
953
|
-
/**
|
|
954
|
-
* The template.
|
|
955
|
-
*/
|
|
956
|
-
export const zGetTemplateResponse = zTemplate;
|
|
957
|
-
export const zUpdateTemplateData = z.object({
|
|
958
|
-
body: zUpdateTemplate,
|
|
959
|
-
path: z.object({
|
|
960
|
-
template: z.uuid()
|
|
961
|
-
}),
|
|
962
|
-
query: z.optional(z.never())
|
|
963
|
-
});
|
|
964
|
-
/**
|
|
965
|
-
* Updated Template.
|
|
966
|
-
*/
|
|
967
|
-
export const zUpdateTemplateResponse = zTemplate;
|
|
968
891
|
export const zCreateSpaceData = z.object({
|
|
969
892
|
body: zCreateSpace,
|
|
970
893
|
path: z.optional(z.never()),
|
|
@@ -1241,33 +1164,6 @@ export const zCreateEnvironmentVariableData = z.object({
|
|
|
1241
1164
|
}),
|
|
1242
1165
|
query: z.optional(z.never())
|
|
1243
1166
|
});
|
|
1244
|
-
export const zDeleteTemplateData = z.object({
|
|
1245
|
-
body: z.optional(z.never()),
|
|
1246
|
-
path: z.object({
|
|
1247
|
-
template: z.uuid(),
|
|
1248
|
-
spaceHandle: z.string(),
|
|
1249
|
-
projectHandle: z.string(),
|
|
1250
|
-
environmentHandle: z.string()
|
|
1251
|
-
}),
|
|
1252
|
-
query: z.optional(z.never())
|
|
1253
|
-
});
|
|
1254
|
-
/**
|
|
1255
|
-
* Template deleted.
|
|
1256
|
-
*/
|
|
1257
|
-
export const zDeleteTemplateResponse = z.void();
|
|
1258
|
-
export const zCreateTemplateData = z.object({
|
|
1259
|
-
body: zCreateTemplate,
|
|
1260
|
-
path: z.object({
|
|
1261
|
-
spaceHandle: z.string(),
|
|
1262
|
-
projectHandle: z.string(),
|
|
1263
|
-
environmentHandle: z.string()
|
|
1264
|
-
}),
|
|
1265
|
-
query: z.optional(z.never())
|
|
1266
|
-
});
|
|
1267
|
-
/**
|
|
1268
|
-
* Template created
|
|
1269
|
-
*/
|
|
1270
|
-
export const zCreateTemplateResponse = zTemplate;
|
|
1271
1167
|
export const zGetVersionData = z.object({
|
|
1272
1168
|
body: z.optional(z.never()),
|
|
1273
1169
|
path: z.object({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useMutation } from "@tanstack/react-query";
|
|
2
2
|
import { GetSuccessResponse } from "../util";
|
|
3
|
-
import { GetServiceHealthData, FetchGraphM2mData, UpdateGraphM2mData, UpdateGraphM2mResponses, FetchNodeM2mData, UpdateNodeM2mData, UpdateNodeM2mResponses, RequestAccountPasswordResetData, RequestAccountPasswordResetResponses, UpdateUsernameData, UpdateUsernameResponses, CreateUsernameData, CreateUsernameResponses, GetUserProfileData, UpdateUserProfileData, UpdateUserProfileResponses, GetUserIdentitiesData, DeleteAccountIdentityData, DeleteAccountIdentityResponses, GetConnectedAppUrlData, UpdateConnectedAppTokenData, UpdateConnectedAppTokenResponses, ListInstallationRepositoriesData, ListInstallationBranchesData, ListUserInstallationsData, ListUserSpacesData, CreateFeatureRequestData, CreateFeatureRequestResponses, RecordOnboardingAnalyticsData, RecordOnboardingAnalyticsResponses,
|
|
3
|
+
import { GetServiceHealthData, FetchGraphM2mData, UpdateGraphM2mData, UpdateGraphM2mResponses, FetchNodeM2mData, UpdateNodeM2mData, UpdateNodeM2mResponses, RequestAccountPasswordResetData, RequestAccountPasswordResetResponses, UpdateUsernameData, UpdateUsernameResponses, CreateUsernameData, CreateUsernameResponses, GetUserProfileData, UpdateUserProfileData, UpdateUserProfileResponses, GetUserIdentitiesData, DeleteAccountIdentityData, DeleteAccountIdentityResponses, GetConnectedAppUrlData, UpdateConnectedAppTokenData, UpdateConnectedAppTokenResponses, ListInstallationRepositoriesData, ListInstallationBranchesData, ListUserInstallationsData, ListUserSpacesData, CreateFeatureRequestData, CreateFeatureRequestResponses, RecordOnboardingAnalyticsData, RecordOnboardingAnalyticsResponses, CreateSpaceData, CreateSpaceResponses, GetPublicInviteData, GetUserInvitesData, JoinSpaceData, JoinSpaceResponses, RejectSpaceInviteData, RejectSpaceInviteResponses, GetSpaceOverviewData, GetSpaceOrgCodeData, GetSpaceStatsData, FetchKindeOrganisationBillingAgreementsData, GetSpaceInvitesData, CreateSpaceInviteData, CreateSpaceInviteResponses, RevokeSpaceInviteData, RevokeSpaceInviteResponses, ListSpaceMembersData, ListSpaceMemberRolesData, LeaveSpaceData, LeaveSpaceResponses, CreateProjectData, CreateProjectResponses, GetProjectOverviewData, CreateEnvironmentData, CreateEnvironmentResponses, GetEnvironmentOverviewData, GetEnvironmentVersionsData, DeleteEnvironmentVariableData, DeleteEnvironmentVariableResponses, GetEnvironmentVariablesData, UpdateEnvironmentVariableData, UpdateEnvironmentVariableResponses, CreateEnvironmentVariableData, CreateEnvironmentVariableResponses, GetVersionData, GetGraphOverviewData, UpdateGraphStateData, UpdateGraphStateResponses, DeployVersionData, DeployVersionResponses, RequestSignedDownloadUrlData, RequestSignedUploadUrlData, RequestSignedUploadUrlResponses, CheckSubdomainUniquenessData, RecordCloudUsageData, RecordCloudUsageResponses, GetBillingPlanData, UpdateBillingPlanData, UpdateBillingPlanResponses, CreateSetupIntentData, CreateSetupIntentResponses, ListPaymentMethodsData, RemovePaymentMethodData, RemovePaymentMethodResponses, SetDefaultPaymentMethodData, SetDefaultPaymentMethodResponses, GetBillingUsageData, FetchBillingPricesData, ListBillingInvoicesData } from "../../sdk/types.gen";
|
|
4
4
|
export declare const useGetServiceHealth: (options?: Omit<GetServiceHealthData, "url"> & {
|
|
5
5
|
enabled?: boolean;
|
|
6
6
|
}) => import("@tanstack/react-query").UseQueryResult<import("../../sdk/types.gen").HealthResponse | undefined, Error>;
|
|
@@ -111,17 +111,6 @@ export declare const useRecordOnboardingAnalytics: (config?: {
|
|
|
111
111
|
data: unknown;
|
|
112
112
|
headers: Headers;
|
|
113
113
|
}, unknown, Omit<RecordOnboardingAnalyticsData, "url">, unknown>;
|
|
114
|
-
export declare const useGetTemplate: (options: Omit<GetTemplateData, "url"> & {
|
|
115
|
-
enabled?: boolean;
|
|
116
|
-
}) => import("@tanstack/react-query").UseQueryResult<import("../../sdk/types.gen").Template | undefined, Error>;
|
|
117
|
-
export declare const useUpdateTemplate: (config?: {
|
|
118
|
-
onSuccess?: (data: GetSuccessResponse<UpdateTemplateResponses>, headers: Headers) => void;
|
|
119
|
-
onError?: Parameters<typeof useMutation>["0"]["onError"];
|
|
120
|
-
retry?: boolean;
|
|
121
|
-
}) => import("@tanstack/react-query").UseMutationResult<{
|
|
122
|
-
data: import("../../sdk/types.gen").Template | undefined;
|
|
123
|
-
headers: Headers;
|
|
124
|
-
}, unknown, Omit<UpdateTemplateData, "url">, unknown>;
|
|
125
114
|
export declare const useCreateSpace: (config?: {
|
|
126
115
|
onSuccess?: (data: GetSuccessResponse<CreateSpaceResponses>, headers: Headers) => void;
|
|
127
116
|
onError?: Parameters<typeof useMutation>["0"]["onError"];
|
|
@@ -249,22 +238,6 @@ export declare const useCreateEnvironmentVariable: (config?: {
|
|
|
249
238
|
data: unknown;
|
|
250
239
|
headers: Headers;
|
|
251
240
|
}, unknown, Omit<CreateEnvironmentVariableData, "url">, unknown>;
|
|
252
|
-
export declare const useDeleteTemplate: (config?: {
|
|
253
|
-
onSuccess?: (data: GetSuccessResponse<DeleteTemplateResponses>, headers: Headers) => void;
|
|
254
|
-
onError?: Parameters<typeof useMutation>["0"]["onError"];
|
|
255
|
-
retry?: boolean;
|
|
256
|
-
}) => import("@tanstack/react-query").UseMutationResult<{
|
|
257
|
-
data: void | undefined;
|
|
258
|
-
headers: Headers;
|
|
259
|
-
}, unknown, Omit<DeleteTemplateData, "url">, unknown>;
|
|
260
|
-
export declare const useCreateTemplate: (config?: {
|
|
261
|
-
onSuccess?: (data: GetSuccessResponse<CreateTemplateResponses>, headers: Headers) => void;
|
|
262
|
-
onError?: Parameters<typeof useMutation>["0"]["onError"];
|
|
263
|
-
retry?: boolean;
|
|
264
|
-
}) => import("@tanstack/react-query").UseMutationResult<{
|
|
265
|
-
data: import("../../sdk/types.gen").Template | undefined;
|
|
266
|
-
headers: Headers;
|
|
267
|
-
}, unknown, Omit<CreateTemplateData, "url">, unknown>;
|
|
268
241
|
export declare const useGetVersion: (options: Omit<GetVersionData, "url"> & {
|
|
269
242
|
enabled?: boolean;
|
|
270
243
|
}) => import("@tanstack/react-query").UseQueryResult<import("../../sdk/types.gen").Version | undefined, Error>;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
|
|
3
3
|
import { isPromise } from "../util";
|
|
4
4
|
import { useToken } from "../../provider/token-provider";
|
|
5
|
-
import { getServiceHealth, fetchGraphM2M, updateGraphM2M, fetchNodeM2M, updateNodeM2M, requestAccountPasswordReset, updateUsername, createUsername, getUserProfile, updateUserProfile, getUserIdentities, deleteAccountIdentity, getConnectedAppUrl, updateConnectedAppToken, listInstallationRepositories, listInstallationBranches, listUserInstallations, listUserSpaces, createFeatureRequest, recordOnboardingAnalytics,
|
|
5
|
+
import { getServiceHealth, fetchGraphM2M, updateGraphM2M, fetchNodeM2M, updateNodeM2M, requestAccountPasswordReset, updateUsername, createUsername, getUserProfile, updateUserProfile, getUserIdentities, deleteAccountIdentity, getConnectedAppUrl, updateConnectedAppToken, listInstallationRepositories, listInstallationBranches, listUserInstallations, listUserSpaces, createFeatureRequest, recordOnboardingAnalytics, createSpace, getPublicInvite, getUserInvites, joinSpace, rejectSpaceInvite, getSpaceOverview, getSpaceOrgCode, getSpaceStats, fetchKindeOrganisationBillingAgreements, getSpaceInvites, createSpaceInvite, revokeSpaceInvite, listSpaceMembers, listSpaceMemberRoles, leaveSpace, createProject, getProjectOverview, createEnvironment, getEnvironmentOverview, getEnvironmentVersions, deleteEnvironmentVariable, getEnvironmentVariables, updateEnvironmentVariable, createEnvironmentVariable, getVersion, getGraphOverview, updateGraphState, deployVersion, requestSignedDownloadUrl, requestSignedUploadUrl, checkSubdomainUniqueness, recordCloudUsage, getBillingPlan, updateBillingPlan, createSetupIntent, listPaymentMethods, removePaymentMethod, setDefaultPaymentMethod, getBillingUsage, fetchBillingPrices, listBillingInvoices } from "../../sdk/sdk.gen";
|
|
6
6
|
export const useGetServiceHealth = (options) => {
|
|
7
7
|
const token = useToken();
|
|
8
8
|
let { enabled, ...rest } = options || { enabled: true };
|
|
@@ -403,46 +403,6 @@ export const useRecordOnboardingAnalytics = (config) => {
|
|
|
403
403
|
retry: config?.retry
|
|
404
404
|
});
|
|
405
405
|
};
|
|
406
|
-
export const useGetTemplate = (options) => {
|
|
407
|
-
const token = useToken();
|
|
408
|
-
let { enabled, ...rest } = options || { enabled: true };
|
|
409
|
-
const opts = { throwOnError: true, url: "/templates/{template}" };
|
|
410
|
-
const funcer = async () => {
|
|
411
|
-
const auth = isPromise(token) ? (await token) || "" : token || "";
|
|
412
|
-
if (isPromise(token) && !token)
|
|
413
|
-
return;
|
|
414
|
-
const res = await getTemplate({ ...opts, ...rest, auth });
|
|
415
|
-
return res.data;
|
|
416
|
-
};
|
|
417
|
-
if (!token)
|
|
418
|
-
enabled = false;
|
|
419
|
-
return useQuery({
|
|
420
|
-
queryKey: ["templates", options?.path?.template, options.query ?? {}],
|
|
421
|
-
queryFn: funcer,
|
|
422
|
-
enabled,
|
|
423
|
-
retry: false,
|
|
424
|
-
staleTime: 600000
|
|
425
|
-
});
|
|
426
|
-
};
|
|
427
|
-
export const useUpdateTemplate = (config) => {
|
|
428
|
-
const token = useToken();
|
|
429
|
-
const queryClient = useQueryClient();
|
|
430
|
-
const opts = { throwOnError: true, url: "/templates/{template}" };
|
|
431
|
-
const funcer = async (options) => {
|
|
432
|
-
const auth = isPromise(token) ? (await token) || "" : token || "";
|
|
433
|
-
const res = await updateTemplate({ ...opts, ...options, auth });
|
|
434
|
-
return { data: res.data, headers: res.response.headers };
|
|
435
|
-
};
|
|
436
|
-
return useMutation({
|
|
437
|
-
mutationFn: funcer,
|
|
438
|
-
onSuccess: (res, options, c, ctx) => {
|
|
439
|
-
queryClient.invalidateQueries({ queryKey: ["templates", options?.path?.template] });
|
|
440
|
-
config?.onSuccess && config.onSuccess(res.data, res.headers);
|
|
441
|
-
},
|
|
442
|
-
onError: config?.onError,
|
|
443
|
-
retry: config?.retry
|
|
444
|
-
});
|
|
445
|
-
};
|
|
446
406
|
export const useCreateSpace = (config) => {
|
|
447
407
|
const token = useToken();
|
|
448
408
|
const queryClient = useQueryClient();
|
|
@@ -925,44 +885,6 @@ export const useCreateEnvironmentVariable = (config) => {
|
|
|
925
885
|
retry: config?.retry
|
|
926
886
|
});
|
|
927
887
|
};
|
|
928
|
-
export const useDeleteTemplate = (config) => {
|
|
929
|
-
const token = useToken();
|
|
930
|
-
const queryClient = useQueryClient();
|
|
931
|
-
const opts = { throwOnError: true, url: "/auth/{spaceHandle}/{projectHandle}/{environmentHandle}/{template}" };
|
|
932
|
-
const funcer = async (options) => {
|
|
933
|
-
const auth = isPromise(token) ? (await token) || "" : token || "";
|
|
934
|
-
const res = await deleteTemplate({ ...opts, ...options, auth });
|
|
935
|
-
return { data: res.data, headers: res.response.headers };
|
|
936
|
-
};
|
|
937
|
-
return useMutation({
|
|
938
|
-
mutationFn: funcer,
|
|
939
|
-
onSuccess: (res, options, c, ctx) => {
|
|
940
|
-
queryClient.invalidateQueries({ queryKey: [options?.path?.spaceHandle, options?.path?.projectHandle, options?.path?.environmentHandle, options?.path?.template] });
|
|
941
|
-
config?.onSuccess && config.onSuccess(res.data, res.headers);
|
|
942
|
-
},
|
|
943
|
-
onError: config?.onError,
|
|
944
|
-
retry: config?.retry
|
|
945
|
-
});
|
|
946
|
-
};
|
|
947
|
-
export const useCreateTemplate = (config) => {
|
|
948
|
-
const token = useToken();
|
|
949
|
-
const queryClient = useQueryClient();
|
|
950
|
-
const opts = { throwOnError: true, url: "/auth/{spaceHandle}/{projectHandle}/{environmentHandle}/templates/create" };
|
|
951
|
-
const funcer = async (options) => {
|
|
952
|
-
const auth = isPromise(token) ? (await token) || "" : token || "";
|
|
953
|
-
const res = await createTemplate({ ...opts, ...options, auth });
|
|
954
|
-
return { data: res.data, headers: res.response.headers };
|
|
955
|
-
};
|
|
956
|
-
return useMutation({
|
|
957
|
-
mutationFn: funcer,
|
|
958
|
-
onSuccess: (res, options, c, ctx) => {
|
|
959
|
-
queryClient.invalidateQueries({ queryKey: [options?.path?.spaceHandle, options?.path?.projectHandle, options?.path?.environmentHandle, "templates", "create"] });
|
|
960
|
-
config?.onSuccess && config.onSuccess(res.data, res.headers);
|
|
961
|
-
},
|
|
962
|
-
onError: config?.onError,
|
|
963
|
-
retry: config?.retry
|
|
964
|
-
});
|
|
965
|
-
};
|
|
966
888
|
export const useGetVersion = (options) => {
|
|
967
889
|
const token = useToken();
|
|
968
890
|
let { enabled, ...rest } = options || { enabled: true };
|