shoal-web-sdk 0.0.124 → 0.0.125
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 +5 -1
- package/dist/sdk/@tanstack/react-query.gen.js +17 -1
- package/dist/sdk/sdk.gen.d.ts +5 -1
- package/dist/sdk/sdk.gen.js +19 -0
- package/dist/sdk/types.gen.d.ts +52 -0
- package/dist/sdk/zod.gen.d.ts +52 -0
- package/dist/sdk/zod.gen.js +22 -0
- package/dist/tanstack-codegen/generated/generated.d.ts +6 -1
- package/dist/tanstack-codegen/generated/generated.js +20 -1
- 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 { CreateEnvironmentData, CreateEnvironmentError, CreateEnvironmentResponse, CreateProjectData, CreateProjectError, CreateProjectResponse, CreateSetupIntentData, CreateSetupIntentError, CreateSetupIntentResponse, CreateSpaceData, CreateSpaceError, CreateSpaceInviteData, CreateSpaceInviteError, CreateSpaceInviteResponse, CreateSpaceResponse, CreateUsernameData, CreateUsernameError, DeleteAccountIdentityData, DeleteAccountIdentityError, DeleteAccountIdentityResponse, DeployVersionData, DeployVersionError, FetchBillingPricesData, FetchGraphM2mData, FetchKindeOrganisationBillingAgreementsData, FetchLogsData, FetchNodeM2mData, GetBillingPlanData, GetBillingUsageData, GetConnectedAppUrlData, GetEnvironmentOverviewData, GetGraphOverviewData, GetProjectOverviewData, GetServiceHealthData, GetSpaceInvitesData, GetSpaceOrgCodeData, GetSpaceOverviewData, GetUserIdentitiesData, GetUserInvitesData, GetUserProfileData, JoinSpaceData, JoinSpaceError, LeaveSpaceData, LeaveSpaceError, ListBillingInvoicesData, ListInstallationBranchesData, ListInstallationRepositoriesData, ListPaymentMethodsData, ListSpaceMemberRolesData, ListSpaceMembersData, ListUserInstallationsData, ListUserSpacesData, RecordCloudUsageData, RecordCloudUsageError, RejectSpaceInviteData, RejectSpaceInviteError, RejectSpaceInviteResponse, RemovePaymentMethodData, RemovePaymentMethodError, RemovePaymentMethodResponse, RequestAccountPasswordResetData, RequestAccountPasswordResetError, RequestSignedUploadUrlData, RequestSignedUploadUrlError, RequestSignedUploadUrlResponse, RevokeSpaceInviteData, RevokeSpaceInviteError, RevokeSpaceInviteResponse, SetDefaultPaymentMethodData, SetDefaultPaymentMethodError, SetDefaultPaymentMethodResponse, UpdateBillingPlanData, UpdateBillingPlanError, UpdateConnectedAppTokenData, UpdateConnectedAppTokenError, UpdateGraphM2mData, UpdateGraphM2mError, UpdateGraphStateData, UpdateGraphStateError, UpdateUsernameData, UpdateUsernameError, UpdateUserProfileData, UpdateUserProfileError } from '../types.gen';
|
|
3
|
+
import type { BootstrapOnboardingWorkspaceData, BootstrapOnboardingWorkspaceError, BootstrapOnboardingWorkspaceResponse2, CreateEnvironmentData, CreateEnvironmentError, CreateEnvironmentResponse, CreateProjectData, CreateProjectError, CreateProjectResponse, CreateSetupIntentData, CreateSetupIntentError, CreateSetupIntentResponse, CreateSpaceData, CreateSpaceError, CreateSpaceInviteData, CreateSpaceInviteError, CreateSpaceInviteResponse, CreateSpaceResponse, CreateUsernameData, CreateUsernameError, DeleteAccountIdentityData, DeleteAccountIdentityError, DeleteAccountIdentityResponse, DeployVersionData, DeployVersionError, FetchBillingPricesData, FetchGraphM2mData, FetchKindeOrganisationBillingAgreementsData, FetchLogsData, FetchNodeM2mData, GetBillingPlanData, GetBillingUsageData, GetConnectedAppUrlData, GetEnvironmentOverviewData, GetGraphOverviewData, GetProjectOverviewData, GetServiceHealthData, GetSpaceInvitesData, GetSpaceOrgCodeData, GetSpaceOverviewData, GetUserIdentitiesData, GetUserInvitesData, GetUserProfileData, JoinSpaceData, JoinSpaceError, LeaveSpaceData, LeaveSpaceError, ListBillingInvoicesData, ListInstallationBranchesData, ListInstallationRepositoriesData, ListPaymentMethodsData, ListSpaceMemberRolesData, ListSpaceMembersData, ListUserInstallationsData, ListUserSpacesData, RecordCloudUsageData, RecordCloudUsageError, RejectSpaceInviteData, RejectSpaceInviteError, RejectSpaceInviteResponse, RemovePaymentMethodData, RemovePaymentMethodError, RemovePaymentMethodResponse, RequestAccountPasswordResetData, RequestAccountPasswordResetError, RequestSignedUploadUrlData, RequestSignedUploadUrlError, RequestSignedUploadUrlResponse, RevokeSpaceInviteData, RevokeSpaceInviteError, RevokeSpaceInviteResponse, SetDefaultPaymentMethodData, SetDefaultPaymentMethodError, SetDefaultPaymentMethodResponse, UpdateBillingPlanData, UpdateBillingPlanError, UpdateConnectedAppTokenData, UpdateConnectedAppTokenError, UpdateGraphM2mData, UpdateGraphM2mError, UpdateGraphStateData, UpdateGraphStateError, 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;
|
|
@@ -412,6 +412,10 @@ export declare const listUserSpacesInfiniteOptions: (options?: Options<ListUserS
|
|
|
412
412
|
[dataTagErrorSymbol]: import("../types.gen").ErrorResponse;
|
|
413
413
|
};
|
|
414
414
|
};
|
|
415
|
+
/**
|
|
416
|
+
* Create a default onboarding workspace, project, and main environment.
|
|
417
|
+
*/
|
|
418
|
+
export declare const bootstrapOnboardingWorkspaceMutation: (options?: Partial<Options<BootstrapOnboardingWorkspaceData>>) => UseMutationOptions<BootstrapOnboardingWorkspaceResponse2, BootstrapOnboardingWorkspaceError, Options<BootstrapOnboardingWorkspaceData>>;
|
|
415
419
|
/**
|
|
416
420
|
* Create a space.
|
|
417
421
|
*/
|
|
@@ -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 { createEnvironment, createProject, createSetupIntent, createSpace, createSpaceInvite, createUsername, deleteAccountIdentity, deployVersion, fetchBillingPrices, fetchGraphM2M, fetchKindeOrganisationBillingAgreements, fetchLogs, fetchNodeM2M, getBillingPlan, getBillingUsage, getConnectedAppUrl, getEnvironmentOverview, getGraphOverview, getProjectOverview, getServiceHealth, getSpaceInvites, getSpaceOrgCode, getSpaceOverview, getUserIdentities, getUserInvites, getUserProfile, joinSpace, leaveSpace, listBillingInvoices, listInstallationBranches, listInstallationRepositories, listPaymentMethods, listSpaceMemberRoles, listSpaceMembers, listUserInstallations, listUserSpaces, recordCloudUsage, rejectSpaceInvite, removePaymentMethod, requestAccountPasswordReset, requestSignedUploadUrl, revokeSpaceInvite, setDefaultPaymentMethod, updateBillingPlan, updateConnectedAppToken, updateGraphM2M, updateGraphState, updateUsername, updateUserProfile } from '../sdk.gen';
|
|
4
|
+
import { bootstrapOnboardingWorkspace, createEnvironment, createProject, createSetupIntent, createSpace, createSpaceInvite, createUsername, deleteAccountIdentity, deployVersion, fetchBillingPrices, fetchGraphM2M, fetchKindeOrganisationBillingAgreements, fetchLogs, fetchNodeM2M, getBillingPlan, getBillingUsage, getConnectedAppUrl, getEnvironmentOverview, getGraphOverview, getProjectOverview, getServiceHealth, getSpaceInvites, getSpaceOrgCode, getSpaceOverview, getUserIdentities, getUserInvites, getUserProfile, joinSpace, leaveSpace, listBillingInvoices, listInstallationBranches, listInstallationRepositories, listPaymentMethods, listSpaceMemberRoles, listSpaceMembers, listUserInstallations, listUserSpaces, recordCloudUsage, rejectSpaceInvite, removePaymentMethod, requestAccountPasswordReset, requestSignedUploadUrl, revokeSpaceInvite, setDefaultPaymentMethod, updateBillingPlan, updateConnectedAppToken, updateGraphM2M, updateGraphState, 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) {
|
|
@@ -456,6 +456,22 @@ export const listUserSpacesInfiniteOptions = (options) => {
|
|
|
456
456
|
queryKey: listUserSpacesInfiniteQueryKey(options)
|
|
457
457
|
});
|
|
458
458
|
};
|
|
459
|
+
/**
|
|
460
|
+
* Create a default onboarding workspace, project, and main environment.
|
|
461
|
+
*/
|
|
462
|
+
export const bootstrapOnboardingWorkspaceMutation = (options) => {
|
|
463
|
+
const mutationOptions = {
|
|
464
|
+
mutationFn: async (fnOptions) => {
|
|
465
|
+
const { data } = await bootstrapOnboardingWorkspace({
|
|
466
|
+
...options,
|
|
467
|
+
...fnOptions,
|
|
468
|
+
throwOnError: true
|
|
469
|
+
});
|
|
470
|
+
return data;
|
|
471
|
+
}
|
|
472
|
+
};
|
|
473
|
+
return mutationOptions;
|
|
474
|
+
};
|
|
459
475
|
/**
|
|
460
476
|
* Create a space.
|
|
461
477
|
*/
|
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 { CreateEnvironmentData, CreateEnvironmentErrors, CreateEnvironmentResponses, CreateProjectData, CreateProjectErrors, CreateProjectResponses, CreateSetupIntentData, CreateSetupIntentErrors, CreateSetupIntentResponses, CreateSpaceData, CreateSpaceErrors, CreateSpaceInviteData, CreateSpaceInviteErrors, CreateSpaceInviteResponses, CreateSpaceResponses, CreateUsernameData, CreateUsernameErrors, CreateUsernameResponses, DeleteAccountIdentityData, DeleteAccountIdentityErrors, DeleteAccountIdentityResponses, DeployVersionData, DeployVersionErrors, DeployVersionResponses, FetchBillingPricesData, FetchBillingPricesErrors, FetchBillingPricesResponses, FetchGraphM2mData, FetchGraphM2mErrors, FetchGraphM2mResponses, FetchKindeOrganisationBillingAgreementsData, FetchKindeOrganisationBillingAgreementsErrors, FetchKindeOrganisationBillingAgreementsResponses, FetchLogsData, FetchLogsErrors, FetchLogsResponses, FetchNodeM2mData, FetchNodeM2mErrors, FetchNodeM2mResponses, GetBillingPlanData, GetBillingPlanErrors, GetBillingPlanResponses, GetBillingUsageData, GetBillingUsageErrors, GetBillingUsageResponses, GetConnectedAppUrlData, GetConnectedAppUrlErrors, GetConnectedAppUrlResponses, GetEnvironmentOverviewData, GetEnvironmentOverviewErrors, GetEnvironmentOverviewResponses, GetGraphOverviewData, GetGraphOverviewErrors, GetGraphOverviewResponses, GetProjectOverviewData, GetProjectOverviewErrors, GetProjectOverviewResponses, GetServiceHealthData, GetServiceHealthResponses, GetSpaceInvitesData, GetSpaceInvitesErrors, GetSpaceInvitesResponses, GetSpaceOrgCodeData, GetSpaceOrgCodeErrors, GetSpaceOrgCodeResponses, GetSpaceOverviewData, GetSpaceOverviewErrors, GetSpaceOverviewResponses, GetUserIdentitiesData, GetUserIdentitiesErrors, GetUserIdentitiesResponses, GetUserInvitesData, GetUserInvitesErrors, GetUserInvitesResponses, GetUserProfileData, GetUserProfileErrors, GetUserProfileResponses, 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, RejectSpaceInviteData, RejectSpaceInviteErrors, RejectSpaceInviteResponses, RemovePaymentMethodData, RemovePaymentMethodErrors, RemovePaymentMethodResponses, RequestAccountPasswordResetData, RequestAccountPasswordResetErrors, RequestAccountPasswordResetResponses, RequestSignedUploadUrlData, RequestSignedUploadUrlErrors, RequestSignedUploadUrlResponses, RevokeSpaceInviteData, RevokeSpaceInviteErrors, RevokeSpaceInviteResponses, SetDefaultPaymentMethodData, SetDefaultPaymentMethodErrors, SetDefaultPaymentMethodResponses, UpdateBillingPlanData, UpdateBillingPlanErrors, UpdateBillingPlanResponses, UpdateConnectedAppTokenData, UpdateConnectedAppTokenErrors, UpdateConnectedAppTokenResponses, UpdateGraphM2mData, UpdateGraphM2mErrors, UpdateGraphM2mResponses, UpdateGraphStateData, UpdateGraphStateErrors, UpdateGraphStateResponses, UpdateUsernameData, UpdateUsernameErrors, UpdateUsernameResponses, UpdateUserProfileData, UpdateUserProfileErrors, UpdateUserProfileResponses } from './types.gen';
|
|
2
|
+
import type { BootstrapOnboardingWorkspaceData, BootstrapOnboardingWorkspaceErrors, BootstrapOnboardingWorkspaceResponses, CreateEnvironmentData, CreateEnvironmentErrors, CreateEnvironmentResponses, CreateProjectData, CreateProjectErrors, CreateProjectResponses, CreateSetupIntentData, CreateSetupIntentErrors, CreateSetupIntentResponses, CreateSpaceData, CreateSpaceErrors, CreateSpaceInviteData, CreateSpaceInviteErrors, CreateSpaceInviteResponses, CreateSpaceResponses, CreateUsernameData, CreateUsernameErrors, CreateUsernameResponses, DeleteAccountIdentityData, DeleteAccountIdentityErrors, DeleteAccountIdentityResponses, DeployVersionData, DeployVersionErrors, DeployVersionResponses, FetchBillingPricesData, FetchBillingPricesErrors, FetchBillingPricesResponses, FetchGraphM2mData, FetchGraphM2mErrors, FetchGraphM2mResponses, FetchKindeOrganisationBillingAgreementsData, FetchKindeOrganisationBillingAgreementsErrors, FetchKindeOrganisationBillingAgreementsResponses, FetchLogsData, FetchLogsErrors, FetchLogsResponses, FetchNodeM2mData, FetchNodeM2mErrors, FetchNodeM2mResponses, GetBillingPlanData, GetBillingPlanErrors, GetBillingPlanResponses, GetBillingUsageData, GetBillingUsageErrors, GetBillingUsageResponses, GetConnectedAppUrlData, GetConnectedAppUrlErrors, GetConnectedAppUrlResponses, GetEnvironmentOverviewData, GetEnvironmentOverviewErrors, GetEnvironmentOverviewResponses, GetGraphOverviewData, GetGraphOverviewErrors, GetGraphOverviewResponses, GetProjectOverviewData, GetProjectOverviewErrors, GetProjectOverviewResponses, GetServiceHealthData, GetServiceHealthResponses, GetSpaceInvitesData, GetSpaceInvitesErrors, GetSpaceInvitesResponses, GetSpaceOrgCodeData, GetSpaceOrgCodeErrors, GetSpaceOrgCodeResponses, GetSpaceOverviewData, GetSpaceOverviewErrors, GetSpaceOverviewResponses, GetUserIdentitiesData, GetUserIdentitiesErrors, GetUserIdentitiesResponses, GetUserInvitesData, GetUserInvitesErrors, GetUserInvitesResponses, GetUserProfileData, GetUserProfileErrors, GetUserProfileResponses, 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, RejectSpaceInviteData, RejectSpaceInviteErrors, RejectSpaceInviteResponses, RemovePaymentMethodData, RemovePaymentMethodErrors, RemovePaymentMethodResponses, RequestAccountPasswordResetData, RequestAccountPasswordResetErrors, RequestAccountPasswordResetResponses, RequestSignedUploadUrlData, RequestSignedUploadUrlErrors, RequestSignedUploadUrlResponses, RevokeSpaceInviteData, RevokeSpaceInviteErrors, RevokeSpaceInviteResponses, SetDefaultPaymentMethodData, SetDefaultPaymentMethodErrors, SetDefaultPaymentMethodResponses, UpdateBillingPlanData, UpdateBillingPlanErrors, UpdateBillingPlanResponses, UpdateConnectedAppTokenData, UpdateConnectedAppTokenErrors, UpdateConnectedAppTokenResponses, UpdateGraphM2mData, UpdateGraphM2mErrors, UpdateGraphM2mResponses, UpdateGraphStateData, UpdateGraphStateErrors, UpdateGraphStateResponses, 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
|
|
@@ -81,6 +81,10 @@ export declare const listUserInstallations: <ThrowOnError extends boolean = fals
|
|
|
81
81
|
* List spaces for the authenticated user with organization details.
|
|
82
82
|
*/
|
|
83
83
|
export declare const listUserSpaces: <ThrowOnError extends boolean = false>(options?: Options<ListUserSpacesData, ThrowOnError>) => import("./client").RequestResult<ListUserSpacesResponses, ListUserSpacesErrors, ThrowOnError, "fields">;
|
|
84
|
+
/**
|
|
85
|
+
* Create a default onboarding workspace, project, and main environment.
|
|
86
|
+
*/
|
|
87
|
+
export declare const bootstrapOnboardingWorkspace: <ThrowOnError extends boolean = false>(options: Options<BootstrapOnboardingWorkspaceData, ThrowOnError>) => import("./client").RequestResult<BootstrapOnboardingWorkspaceResponses, BootstrapOnboardingWorkspaceErrors, ThrowOnError, "fields">;
|
|
84
88
|
/**
|
|
85
89
|
* Create a space.
|
|
86
90
|
*/
|
package/dist/sdk/sdk.gen.js
CHANGED
|
@@ -271,6 +271,25 @@ export const listUserSpaces = (options) => {
|
|
|
271
271
|
...options
|
|
272
272
|
});
|
|
273
273
|
};
|
|
274
|
+
/**
|
|
275
|
+
* Create a default onboarding workspace, project, and main environment.
|
|
276
|
+
*/
|
|
277
|
+
export const bootstrapOnboardingWorkspace = (options) => {
|
|
278
|
+
return (options.client ?? client).post({
|
|
279
|
+
security: [
|
|
280
|
+
{
|
|
281
|
+
scheme: 'bearer',
|
|
282
|
+
type: 'http'
|
|
283
|
+
}
|
|
284
|
+
],
|
|
285
|
+
url: '/auth/onboarding/bootstrap-workspace',
|
|
286
|
+
...options,
|
|
287
|
+
headers: {
|
|
288
|
+
'Content-Type': 'application/json',
|
|
289
|
+
...options.headers
|
|
290
|
+
}
|
|
291
|
+
});
|
|
292
|
+
};
|
|
274
293
|
/**
|
|
275
294
|
* Create a space.
|
|
276
295
|
*/
|
package/dist/sdk/types.gen.d.ts
CHANGED
|
@@ -70,6 +70,22 @@ export type CreateEnvironment = {
|
|
|
70
70
|
handle: string;
|
|
71
71
|
description?: string;
|
|
72
72
|
};
|
|
73
|
+
export type BootstrapOnboardingWorkspace = {
|
|
74
|
+
/**
|
|
75
|
+
* Seed value used to derive default onboarding names and handles.
|
|
76
|
+
*/
|
|
77
|
+
seed: string;
|
|
78
|
+
};
|
|
79
|
+
export type OnboardingBootstrapResource = {
|
|
80
|
+
id: string;
|
|
81
|
+
name: string;
|
|
82
|
+
handle: string;
|
|
83
|
+
};
|
|
84
|
+
export type BootstrapOnboardingWorkspaceResponse = {
|
|
85
|
+
space: OnboardingBootstrapResource;
|
|
86
|
+
project: OnboardingBootstrapResource;
|
|
87
|
+
environment: OnboardingBootstrapResource;
|
|
88
|
+
};
|
|
73
89
|
export type SpaceOverview = {
|
|
74
90
|
id: string;
|
|
75
91
|
name: string;
|
|
@@ -1206,6 +1222,42 @@ export type ListUserSpacesResponses = {
|
|
|
1206
1222
|
200: UserSpacesResponse;
|
|
1207
1223
|
};
|
|
1208
1224
|
export type ListUserSpacesResponse = ListUserSpacesResponses[keyof ListUserSpacesResponses];
|
|
1225
|
+
export type BootstrapOnboardingWorkspaceData = {
|
|
1226
|
+
body: BootstrapOnboardingWorkspace;
|
|
1227
|
+
path?: never;
|
|
1228
|
+
query?: never;
|
|
1229
|
+
url: '/auth/onboarding/bootstrap-workspace';
|
|
1230
|
+
};
|
|
1231
|
+
export type BootstrapOnboardingWorkspaceErrors = {
|
|
1232
|
+
/**
|
|
1233
|
+
* Bad request.
|
|
1234
|
+
*/
|
|
1235
|
+
400: ErrorResponse;
|
|
1236
|
+
/**
|
|
1237
|
+
* Unauthorised user.
|
|
1238
|
+
*/
|
|
1239
|
+
401: ErrorResponse;
|
|
1240
|
+
/**
|
|
1241
|
+
* Invalid credentials.
|
|
1242
|
+
*/
|
|
1243
|
+
403: ErrorResponse;
|
|
1244
|
+
/**
|
|
1245
|
+
* Related content not found.
|
|
1246
|
+
*/
|
|
1247
|
+
404: ErrorResponse;
|
|
1248
|
+
/**
|
|
1249
|
+
* Unexpected error.
|
|
1250
|
+
*/
|
|
1251
|
+
500: ErrorResponse;
|
|
1252
|
+
};
|
|
1253
|
+
export type BootstrapOnboardingWorkspaceError = BootstrapOnboardingWorkspaceErrors[keyof BootstrapOnboardingWorkspaceErrors];
|
|
1254
|
+
export type BootstrapOnboardingWorkspaceResponses = {
|
|
1255
|
+
/**
|
|
1256
|
+
* Successfully bootstrapped onboarding resources.
|
|
1257
|
+
*/
|
|
1258
|
+
201: BootstrapOnboardingWorkspaceResponse;
|
|
1259
|
+
};
|
|
1260
|
+
export type BootstrapOnboardingWorkspaceResponse2 = BootstrapOnboardingWorkspaceResponses[keyof BootstrapOnboardingWorkspaceResponses];
|
|
1209
1261
|
export type CreateSpaceData = {
|
|
1210
1262
|
body: CreateSpace;
|
|
1211
1263
|
path?: never;
|
package/dist/sdk/zod.gen.d.ts
CHANGED
|
@@ -111,6 +111,31 @@ export declare const zCreateEnvironment: z.ZodObject<{
|
|
|
111
111
|
handle: z.ZodString;
|
|
112
112
|
description: z.ZodOptional<z.ZodString>;
|
|
113
113
|
}, z.core.$strip>;
|
|
114
|
+
export declare const zBootstrapOnboardingWorkspace: z.ZodObject<{
|
|
115
|
+
seed: z.ZodString;
|
|
116
|
+
}, z.core.$strip>;
|
|
117
|
+
export declare const zOnboardingBootstrapResource: z.ZodObject<{
|
|
118
|
+
id: z.ZodString;
|
|
119
|
+
name: z.ZodString;
|
|
120
|
+
handle: z.ZodString;
|
|
121
|
+
}, z.core.$strip>;
|
|
122
|
+
export declare const zBootstrapOnboardingWorkspaceResponse: z.ZodObject<{
|
|
123
|
+
space: z.ZodObject<{
|
|
124
|
+
id: z.ZodString;
|
|
125
|
+
name: z.ZodString;
|
|
126
|
+
handle: z.ZodString;
|
|
127
|
+
}, z.core.$strip>;
|
|
128
|
+
project: z.ZodObject<{
|
|
129
|
+
id: z.ZodString;
|
|
130
|
+
name: z.ZodString;
|
|
131
|
+
handle: z.ZodString;
|
|
132
|
+
}, z.core.$strip>;
|
|
133
|
+
environment: z.ZodObject<{
|
|
134
|
+
id: z.ZodString;
|
|
135
|
+
name: z.ZodString;
|
|
136
|
+
handle: z.ZodString;
|
|
137
|
+
}, z.core.$strip>;
|
|
138
|
+
}, z.core.$strip>;
|
|
114
139
|
export declare const zSpaceOrgCodeResponse: z.ZodObject<{
|
|
115
140
|
orgCode: z.ZodString;
|
|
116
141
|
}, z.core.$strip>;
|
|
@@ -1905,6 +1930,33 @@ export declare const zListUserSpacesResponse: z.ZodObject<{
|
|
|
1905
1930
|
}, z.core.$strip>>;
|
|
1906
1931
|
next_page: z.ZodOptional<z.ZodInt>;
|
|
1907
1932
|
}, z.core.$strip>;
|
|
1933
|
+
export declare const zBootstrapOnboardingWorkspaceData: z.ZodObject<{
|
|
1934
|
+
body: z.ZodObject<{
|
|
1935
|
+
seed: z.ZodString;
|
|
1936
|
+
}, z.core.$strip>;
|
|
1937
|
+
path: z.ZodOptional<z.ZodNever>;
|
|
1938
|
+
query: z.ZodOptional<z.ZodNever>;
|
|
1939
|
+
}, z.core.$strip>;
|
|
1940
|
+
/**
|
|
1941
|
+
* Successfully bootstrapped onboarding resources.
|
|
1942
|
+
*/
|
|
1943
|
+
export declare const zBootstrapOnboardingWorkspaceResponse2: z.ZodObject<{
|
|
1944
|
+
space: z.ZodObject<{
|
|
1945
|
+
id: z.ZodString;
|
|
1946
|
+
name: z.ZodString;
|
|
1947
|
+
handle: z.ZodString;
|
|
1948
|
+
}, z.core.$strip>;
|
|
1949
|
+
project: z.ZodObject<{
|
|
1950
|
+
id: z.ZodString;
|
|
1951
|
+
name: z.ZodString;
|
|
1952
|
+
handle: z.ZodString;
|
|
1953
|
+
}, z.core.$strip>;
|
|
1954
|
+
environment: z.ZodObject<{
|
|
1955
|
+
id: z.ZodString;
|
|
1956
|
+
name: z.ZodString;
|
|
1957
|
+
handle: z.ZodString;
|
|
1958
|
+
}, z.core.$strip>;
|
|
1959
|
+
}, z.core.$strip>;
|
|
1908
1960
|
export declare const zCreateSpaceData: z.ZodObject<{
|
|
1909
1961
|
body: z.ZodObject<{
|
|
1910
1962
|
name: z.ZodString;
|
package/dist/sdk/zod.gen.js
CHANGED
|
@@ -83,6 +83,19 @@ export const zCreateEnvironment = z.object({
|
|
|
83
83
|
handle: z.string(),
|
|
84
84
|
description: z.optional(z.string())
|
|
85
85
|
});
|
|
86
|
+
export const zBootstrapOnboardingWorkspace = z.object({
|
|
87
|
+
seed: z.string()
|
|
88
|
+
});
|
|
89
|
+
export const zOnboardingBootstrapResource = z.object({
|
|
90
|
+
id: z.string(),
|
|
91
|
+
name: z.string(),
|
|
92
|
+
handle: z.string()
|
|
93
|
+
});
|
|
94
|
+
export const zBootstrapOnboardingWorkspaceResponse = z.object({
|
|
95
|
+
space: zOnboardingBootstrapResource,
|
|
96
|
+
project: zOnboardingBootstrapResource,
|
|
97
|
+
environment: zOnboardingBootstrapResource
|
|
98
|
+
});
|
|
86
99
|
export const zSpaceOrgCodeResponse = z.object({
|
|
87
100
|
orgCode: z.string()
|
|
88
101
|
});
|
|
@@ -777,6 +790,15 @@ export const zListUserSpacesData = z.object({
|
|
|
777
790
|
* A list of spaces for the authenticated user.
|
|
778
791
|
*/
|
|
779
792
|
export const zListUserSpacesResponse = zUserSpacesResponse;
|
|
793
|
+
export const zBootstrapOnboardingWorkspaceData = z.object({
|
|
794
|
+
body: zBootstrapOnboardingWorkspace,
|
|
795
|
+
path: z.optional(z.never()),
|
|
796
|
+
query: z.optional(z.never())
|
|
797
|
+
});
|
|
798
|
+
/**
|
|
799
|
+
* Successfully bootstrapped onboarding resources.
|
|
800
|
+
*/
|
|
801
|
+
export const zBootstrapOnboardingWorkspaceResponse2 = zBootstrapOnboardingWorkspaceResponse;
|
|
780
802
|
export const zCreateSpaceData = z.object({
|
|
781
803
|
body: zCreateSpace,
|
|
782
804
|
path: z.optional(z.never()),
|
|
@@ -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, RequestAccountPasswordResetData, RequestAccountPasswordResetResponses, UpdateUsernameData, UpdateUsernameResponses, CreateUsernameData, CreateUsernameResponses, GetUserProfileData, UpdateUserProfileData, UpdateUserProfileResponses, GetUserIdentitiesData, DeleteAccountIdentityData, DeleteAccountIdentityResponses, GetConnectedAppUrlData, UpdateConnectedAppTokenData, UpdateConnectedAppTokenResponses, ListInstallationRepositoriesData, ListInstallationBranchesData, ListUserInstallationsData, ListUserSpacesData, CreateSpaceData, CreateSpaceResponses, GetUserInvitesData, JoinSpaceData, JoinSpaceResponses, RejectSpaceInviteData, RejectSpaceInviteResponses, GetSpaceOverviewData, GetSpaceOrgCodeData, FetchKindeOrganisationBillingAgreementsData, GetSpaceInvitesData, CreateSpaceInviteData, CreateSpaceInviteResponses, RevokeSpaceInviteData, RevokeSpaceInviteResponses, ListSpaceMembersData, ListSpaceMemberRolesData, LeaveSpaceData, LeaveSpaceResponses, CreateProjectData, CreateProjectResponses, GetProjectOverviewData, FetchLogsData, CreateEnvironmentData, CreateEnvironmentResponses, GetEnvironmentOverviewData, GetGraphOverviewData, UpdateGraphStateData, UpdateGraphStateResponses, DeployVersionData, DeployVersionResponses, RequestSignedUploadUrlData, RequestSignedUploadUrlResponses, RecordCloudUsageData, RecordCloudUsageResponses, GetBillingPlanData, UpdateBillingPlanData, UpdateBillingPlanResponses, CreateSetupIntentData, CreateSetupIntentResponses, ListPaymentMethodsData, RemovePaymentMethodData, RemovePaymentMethodResponses, SetDefaultPaymentMethodData, SetDefaultPaymentMethodResponses, GetBillingUsageData, FetchBillingPricesData, ListBillingInvoicesData } from "../../sdk/types.gen";
|
|
3
|
+
import { GetServiceHealthData, FetchGraphM2mData, UpdateGraphM2mData, UpdateGraphM2mResponses, FetchNodeM2mData, RequestAccountPasswordResetData, RequestAccountPasswordResetResponses, UpdateUsernameData, UpdateUsernameResponses, CreateUsernameData, CreateUsernameResponses, GetUserProfileData, UpdateUserProfileData, UpdateUserProfileResponses, GetUserIdentitiesData, DeleteAccountIdentityData, DeleteAccountIdentityResponses, GetConnectedAppUrlData, UpdateConnectedAppTokenData, UpdateConnectedAppTokenResponses, ListInstallationRepositoriesData, ListInstallationBranchesData, ListUserInstallationsData, ListUserSpacesData, BootstrapOnboardingWorkspaceData, BootstrapOnboardingWorkspaceResponses, CreateSpaceData, CreateSpaceResponses, GetUserInvitesData, JoinSpaceData, JoinSpaceResponses, RejectSpaceInviteData, RejectSpaceInviteResponses, GetSpaceOverviewData, GetSpaceOrgCodeData, FetchKindeOrganisationBillingAgreementsData, GetSpaceInvitesData, CreateSpaceInviteData, CreateSpaceInviteResponses, RevokeSpaceInviteData, RevokeSpaceInviteResponses, ListSpaceMembersData, ListSpaceMemberRolesData, LeaveSpaceData, LeaveSpaceResponses, CreateProjectData, CreateProjectResponses, GetProjectOverviewData, FetchLogsData, CreateEnvironmentData, CreateEnvironmentResponses, GetEnvironmentOverviewData, GetGraphOverviewData, UpdateGraphStateData, UpdateGraphStateResponses, DeployVersionData, DeployVersionResponses, RequestSignedUploadUrlData, RequestSignedUploadUrlResponses, 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>;
|
|
@@ -66,6 +66,11 @@ export declare const useListUserInstallations: (options?: Omit<ListUserInstallat
|
|
|
66
66
|
export declare const useListUserSpaces: (options?: Omit<ListUserSpacesData, "url"> & {
|
|
67
67
|
enabled?: boolean;
|
|
68
68
|
}) => import("@tanstack/react-query").UseQueryResult<import("../../sdk/types.gen").UserSpacesResponse | undefined, Error>;
|
|
69
|
+
export declare const useBootstrapOnboardingWorkspace: (config?: {
|
|
70
|
+
onSuccess?: (data: GetSuccessResponse<BootstrapOnboardingWorkspaceResponses>) => void;
|
|
71
|
+
onError?: Parameters<typeof useMutation>["0"]["onError"];
|
|
72
|
+
retry?: boolean;
|
|
73
|
+
}) => import("@tanstack/react-query").UseMutationResult<import("../../sdk/types.gen").BootstrapOnboardingWorkspaceResponse | undefined, unknown, Omit<BootstrapOnboardingWorkspaceData, "url">, unknown>;
|
|
69
74
|
export declare const useCreateSpace: (config?: {
|
|
70
75
|
onSuccess?: (data: GetSuccessResponse<CreateSpaceResponses>) => void;
|
|
71
76
|
onError?: Parameters<typeof useMutation>["0"]["onError"];
|
|
@@ -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, requestAccountPasswordReset, updateUsername, createUsername, getUserProfile, updateUserProfile, getUserIdentities, deleteAccountIdentity, getConnectedAppUrl, updateConnectedAppToken, listInstallationRepositories, listInstallationBranches, listUserInstallations, listUserSpaces, createSpace, getUserInvites, joinSpace, rejectSpaceInvite, getSpaceOverview, getSpaceOrgCode, fetchKindeOrganisationBillingAgreements, getSpaceInvites, createSpaceInvite, revokeSpaceInvite, listSpaceMembers, listSpaceMemberRoles, leaveSpace, createProject, getProjectOverview, fetchLogs, createEnvironment, getEnvironmentOverview, getGraphOverview, updateGraphState, deployVersion, requestSignedUploadUrl, recordCloudUsage, getBillingPlan, updateBillingPlan, createSetupIntent, listPaymentMethods, removePaymentMethod, setDefaultPaymentMethod, getBillingUsage, fetchBillingPrices, listBillingInvoices } from "../../sdk/sdk.gen";
|
|
5
|
+
import { getServiceHealth, fetchGraphM2M, updateGraphM2M, fetchNodeM2M, requestAccountPasswordReset, updateUsername, createUsername, getUserProfile, updateUserProfile, getUserIdentities, deleteAccountIdentity, getConnectedAppUrl, updateConnectedAppToken, listInstallationRepositories, listInstallationBranches, listUserInstallations, listUserSpaces, bootstrapOnboardingWorkspace, createSpace, getUserInvites, joinSpace, rejectSpaceInvite, getSpaceOverview, getSpaceOrgCode, fetchKindeOrganisationBillingAgreements, getSpaceInvites, createSpaceInvite, revokeSpaceInvite, listSpaceMembers, listSpaceMemberRoles, leaveSpace, createProject, getProjectOverview, fetchLogs, createEnvironment, getEnvironmentOverview, getGraphOverview, updateGraphState, deployVersion, requestSignedUploadUrl, 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 };
|
|
@@ -346,6 +346,25 @@ export const useListUserSpaces = (options) => {
|
|
|
346
346
|
staleTime: 600000
|
|
347
347
|
});
|
|
348
348
|
};
|
|
349
|
+
export const useBootstrapOnboardingWorkspace = (config) => {
|
|
350
|
+
const token = useToken();
|
|
351
|
+
const queryClient = useQueryClient();
|
|
352
|
+
const opts = { throwOnError: true, url: "/auth/onboarding/bootstrap-workspace" };
|
|
353
|
+
const funcer = async (options) => {
|
|
354
|
+
const auth = isPromise(token) ? (await token) || "" : token || "";
|
|
355
|
+
const res = await bootstrapOnboardingWorkspace({ ...opts, ...options, auth });
|
|
356
|
+
return res?.data;
|
|
357
|
+
};
|
|
358
|
+
return useMutation({
|
|
359
|
+
mutationFn: funcer,
|
|
360
|
+
onSuccess: (res, options, c, ctx) => {
|
|
361
|
+
queryClient.invalidateQueries({ queryKey: ["onboarding", "bootstrap-workspace"] });
|
|
362
|
+
config?.onSuccess && config.onSuccess(res);
|
|
363
|
+
},
|
|
364
|
+
onError: config?.onError,
|
|
365
|
+
retry: config?.retry
|
|
366
|
+
});
|
|
367
|
+
};
|
|
349
368
|
export const useCreateSpace = (config) => {
|
|
350
369
|
const token = useToken();
|
|
351
370
|
const queryClient = useQueryClient();
|