shoal-web-sdk 0.0.131 → 0.0.133
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 +3 -3
- package/dist/sdk/@tanstack/react-query.gen.js +4 -4
- package/dist/sdk/sdk.gen.d.ts +3 -3
- package/dist/sdk/sdk.gen.js +3 -3
- package/dist/sdk/types.gen.d.ts +19 -26
- package/dist/sdk/zod.gen.d.ts +8 -46
- package/dist/sdk/zod.gen.js +6 -18
- package/dist/tanstack-codegen/generated/generated.d.ts +4 -4
- package/dist/tanstack-codegen/generated/generated.js +5 -5
- 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 {
|
|
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, 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, RecordOnboardingAnalyticsData, RecordOnboardingAnalyticsError, 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, VersionStatusData } from '../types.gen';
|
|
4
4
|
export type QueryKey<TOptions extends Options> = [
|
|
5
5
|
Pick<TOptions, 'baseUrl' | 'body' | 'headers' | 'path' | 'query'> & {
|
|
6
6
|
_id: string;
|
|
@@ -413,9 +413,9 @@ export declare const listUserSpacesInfiniteOptions: (options?: Options<ListUserS
|
|
|
413
413
|
};
|
|
414
414
|
};
|
|
415
415
|
/**
|
|
416
|
-
*
|
|
416
|
+
* Record analytics data captured during the onboarding flow.
|
|
417
417
|
*/
|
|
418
|
-
export declare const
|
|
418
|
+
export declare const recordOnboardingAnalyticsMutation: (options?: Partial<Options<RecordOnboardingAnalyticsData>>) => UseMutationOptions<unknown, RecordOnboardingAnalyticsError, Options<RecordOnboardingAnalyticsData>>;
|
|
419
419
|
/**
|
|
420
420
|
* Create a space.
|
|
421
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 {
|
|
4
|
+
import { createEnvironment, createProject, createSetupIntent, createSpace, createSpaceInvite, createUsername, deleteAccountIdentity, deployVersion, fetchBillingPrices, fetchGraphM2M, fetchKindeOrganisationBillingAgreements, 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, recordOnboardingAnalytics, rejectSpaceInvite, removePaymentMethod, requestAccountPasswordReset, requestSignedUploadUrl, revokeSpaceInvite, setDefaultPaymentMethod, updateBillingPlan, updateConnectedAppToken, updateGraphM2M, updateGraphState, updateUsername, updateUserProfile, versionStatus } 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) {
|
|
@@ -457,12 +457,12 @@ export const listUserSpacesInfiniteOptions = (options) => {
|
|
|
457
457
|
});
|
|
458
458
|
};
|
|
459
459
|
/**
|
|
460
|
-
*
|
|
460
|
+
* Record analytics data captured during the onboarding flow.
|
|
461
461
|
*/
|
|
462
|
-
export const
|
|
462
|
+
export const recordOnboardingAnalyticsMutation = (options) => {
|
|
463
463
|
const mutationOptions = {
|
|
464
464
|
mutationFn: async (fnOptions) => {
|
|
465
|
-
const { data } = await
|
|
465
|
+
const { data } = await recordOnboardingAnalytics({
|
|
466
466
|
...options,
|
|
467
467
|
...fnOptions,
|
|
468
468
|
throwOnError: true
|
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 {
|
|
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, 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, RecordOnboardingAnalyticsData, RecordOnboardingAnalyticsErrors, RecordOnboardingAnalyticsResponses, 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, VersionStatusData, VersionStatusErrors, VersionStatusResponses } 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
|
|
@@ -82,9 +82,9 @@ export declare const listUserInstallations: <ThrowOnError extends boolean = fals
|
|
|
82
82
|
*/
|
|
83
83
|
export declare const listUserSpaces: <ThrowOnError extends boolean = false>(options?: Options<ListUserSpacesData, ThrowOnError>) => import("./client").RequestResult<ListUserSpacesResponses, ListUserSpacesErrors, ThrowOnError, "fields">;
|
|
84
84
|
/**
|
|
85
|
-
*
|
|
85
|
+
* Record analytics data captured during the onboarding flow.
|
|
86
86
|
*/
|
|
87
|
-
export declare const
|
|
87
|
+
export declare const recordOnboardingAnalytics: <ThrowOnError extends boolean = false>(options: Options<RecordOnboardingAnalyticsData, ThrowOnError>) => import("./client").RequestResult<RecordOnboardingAnalyticsResponses, RecordOnboardingAnalyticsErrors, ThrowOnError, "fields">;
|
|
88
88
|
/**
|
|
89
89
|
* Create a space.
|
|
90
90
|
*/
|
package/dist/sdk/sdk.gen.js
CHANGED
|
@@ -272,9 +272,9 @@ export const listUserSpaces = (options) => {
|
|
|
272
272
|
});
|
|
273
273
|
};
|
|
274
274
|
/**
|
|
275
|
-
*
|
|
275
|
+
* Record analytics data captured during the onboarding flow.
|
|
276
276
|
*/
|
|
277
|
-
export const
|
|
277
|
+
export const recordOnboardingAnalytics = (options) => {
|
|
278
278
|
return (options.client ?? client).post({
|
|
279
279
|
security: [
|
|
280
280
|
{
|
|
@@ -282,7 +282,7 @@ export const bootstrapOnboardingWorkspace = (options) => {
|
|
|
282
282
|
type: 'http'
|
|
283
283
|
}
|
|
284
284
|
],
|
|
285
|
-
url: '/auth/onboarding/
|
|
285
|
+
url: '/auth/onboarding/analytics',
|
|
286
286
|
...options,
|
|
287
287
|
headers: {
|
|
288
288
|
'Content-Type': 'application/json',
|
package/dist/sdk/types.gen.d.ts
CHANGED
|
@@ -63,21 +63,19 @@ export type CreateEnvironment = {
|
|
|
63
63
|
handle: string;
|
|
64
64
|
description?: string;
|
|
65
65
|
};
|
|
66
|
-
export type
|
|
66
|
+
export type OnboardingAnalytics = {
|
|
67
67
|
/**
|
|
68
|
-
*
|
|
68
|
+
* The user's occupational role.
|
|
69
69
|
*/
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
project: OnboardingBootstrapResource;
|
|
80
|
-
environment: OnboardingBootstrapResource;
|
|
70
|
+
occupation?: string;
|
|
71
|
+
/**
|
|
72
|
+
* The size of the user's company or team.
|
|
73
|
+
*/
|
|
74
|
+
companySize?: string;
|
|
75
|
+
/**
|
|
76
|
+
* How the user heard about Shoal.
|
|
77
|
+
*/
|
|
78
|
+
referralSource?: string;
|
|
81
79
|
};
|
|
82
80
|
export type SpaceOverview = {
|
|
83
81
|
id: string;
|
|
@@ -1210,13 +1208,13 @@ export type ListUserSpacesResponses = {
|
|
|
1210
1208
|
200: UserSpacesResponse;
|
|
1211
1209
|
};
|
|
1212
1210
|
export type ListUserSpacesResponse = ListUserSpacesResponses[keyof ListUserSpacesResponses];
|
|
1213
|
-
export type
|
|
1214
|
-
body:
|
|
1211
|
+
export type RecordOnboardingAnalyticsData = {
|
|
1212
|
+
body: OnboardingAnalytics;
|
|
1215
1213
|
path?: never;
|
|
1216
1214
|
query?: never;
|
|
1217
|
-
url: '/auth/onboarding/
|
|
1215
|
+
url: '/auth/onboarding/analytics';
|
|
1218
1216
|
};
|
|
1219
|
-
export type
|
|
1217
|
+
export type RecordOnboardingAnalyticsErrors = {
|
|
1220
1218
|
/**
|
|
1221
1219
|
* Bad request.
|
|
1222
1220
|
*/
|
|
@@ -1229,23 +1227,18 @@ export type BootstrapOnboardingWorkspaceErrors = {
|
|
|
1229
1227
|
* Invalid credentials.
|
|
1230
1228
|
*/
|
|
1231
1229
|
403: ErrorResponse;
|
|
1232
|
-
/**
|
|
1233
|
-
* Related content not found.
|
|
1234
|
-
*/
|
|
1235
|
-
404: ErrorResponse;
|
|
1236
1230
|
/**
|
|
1237
1231
|
* Unexpected error.
|
|
1238
1232
|
*/
|
|
1239
1233
|
500: ErrorResponse;
|
|
1240
1234
|
};
|
|
1241
|
-
export type
|
|
1242
|
-
export type
|
|
1235
|
+
export type RecordOnboardingAnalyticsError = RecordOnboardingAnalyticsErrors[keyof RecordOnboardingAnalyticsErrors];
|
|
1236
|
+
export type RecordOnboardingAnalyticsResponses = {
|
|
1243
1237
|
/**
|
|
1244
|
-
*
|
|
1238
|
+
* Analytics data recorded.
|
|
1245
1239
|
*/
|
|
1246
|
-
|
|
1240
|
+
202: unknown;
|
|
1247
1241
|
};
|
|
1248
|
-
export type BootstrapOnboardingWorkspaceResponse2 = BootstrapOnboardingWorkspaceResponses[keyof BootstrapOnboardingWorkspaceResponses];
|
|
1249
1242
|
export type CreateSpaceData = {
|
|
1250
1243
|
body: CreateSpace;
|
|
1251
1244
|
path?: never;
|
package/dist/sdk/zod.gen.d.ts
CHANGED
|
@@ -115,30 +115,10 @@ export declare const zCreateEnvironment: z.ZodObject<{
|
|
|
115
115
|
handle: z.ZodString;
|
|
116
116
|
description: z.ZodOptional<z.ZodString>;
|
|
117
117
|
}, z.core.$strip>;
|
|
118
|
-
export declare const
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
id: z.ZodString;
|
|
123
|
-
name: z.ZodString;
|
|
124
|
-
handle: z.ZodString;
|
|
125
|
-
}, z.core.$strip>;
|
|
126
|
-
export declare const zBootstrapOnboardingWorkspaceResponse: z.ZodObject<{
|
|
127
|
-
space: z.ZodObject<{
|
|
128
|
-
id: z.ZodString;
|
|
129
|
-
name: z.ZodString;
|
|
130
|
-
handle: z.ZodString;
|
|
131
|
-
}, z.core.$strip>;
|
|
132
|
-
project: z.ZodObject<{
|
|
133
|
-
id: z.ZodString;
|
|
134
|
-
name: z.ZodString;
|
|
135
|
-
handle: z.ZodString;
|
|
136
|
-
}, z.core.$strip>;
|
|
137
|
-
environment: z.ZodObject<{
|
|
138
|
-
id: z.ZodString;
|
|
139
|
-
name: z.ZodString;
|
|
140
|
-
handle: z.ZodString;
|
|
141
|
-
}, z.core.$strip>;
|
|
118
|
+
export declare const zOnboardingAnalytics: z.ZodObject<{
|
|
119
|
+
occupation: z.ZodOptional<z.ZodString>;
|
|
120
|
+
companySize: z.ZodOptional<z.ZodString>;
|
|
121
|
+
referralSource: z.ZodOptional<z.ZodString>;
|
|
142
122
|
}, z.core.$strip>;
|
|
143
123
|
export declare const zSpaceOrgCodeResponse: z.ZodObject<{
|
|
144
124
|
orgCode: z.ZodString;
|
|
@@ -2015,33 +1995,15 @@ export declare const zListUserSpacesResponse: z.ZodObject<{
|
|
|
2015
1995
|
}, z.core.$strip>>;
|
|
2016
1996
|
next_page: z.ZodOptional<z.ZodInt>;
|
|
2017
1997
|
}, z.core.$strip>;
|
|
2018
|
-
export declare const
|
|
1998
|
+
export declare const zRecordOnboardingAnalyticsData: z.ZodObject<{
|
|
2019
1999
|
body: z.ZodObject<{
|
|
2020
|
-
|
|
2000
|
+
occupation: z.ZodOptional<z.ZodString>;
|
|
2001
|
+
companySize: z.ZodOptional<z.ZodString>;
|
|
2002
|
+
referralSource: z.ZodOptional<z.ZodString>;
|
|
2021
2003
|
}, z.core.$strip>;
|
|
2022
2004
|
path: z.ZodOptional<z.ZodNever>;
|
|
2023
2005
|
query: z.ZodOptional<z.ZodNever>;
|
|
2024
2006
|
}, z.core.$strip>;
|
|
2025
|
-
/**
|
|
2026
|
-
* Successfully bootstrapped onboarding resources.
|
|
2027
|
-
*/
|
|
2028
|
-
export declare const zBootstrapOnboardingWorkspaceResponse2: z.ZodObject<{
|
|
2029
|
-
space: z.ZodObject<{
|
|
2030
|
-
id: z.ZodString;
|
|
2031
|
-
name: z.ZodString;
|
|
2032
|
-
handle: z.ZodString;
|
|
2033
|
-
}, z.core.$strip>;
|
|
2034
|
-
project: z.ZodObject<{
|
|
2035
|
-
id: z.ZodString;
|
|
2036
|
-
name: z.ZodString;
|
|
2037
|
-
handle: z.ZodString;
|
|
2038
|
-
}, z.core.$strip>;
|
|
2039
|
-
environment: z.ZodObject<{
|
|
2040
|
-
id: z.ZodString;
|
|
2041
|
-
name: z.ZodString;
|
|
2042
|
-
handle: z.ZodString;
|
|
2043
|
-
}, z.core.$strip>;
|
|
2044
|
-
}, z.core.$strip>;
|
|
2045
2007
|
export declare const zCreateSpaceData: z.ZodObject<{
|
|
2046
2008
|
body: z.ZodObject<{
|
|
2047
2009
|
name: z.ZodString;
|
package/dist/sdk/zod.gen.js
CHANGED
|
@@ -85,18 +85,10 @@ export const zCreateEnvironment = z.object({
|
|
|
85
85
|
handle: z.string(),
|
|
86
86
|
description: z.optional(z.string())
|
|
87
87
|
});
|
|
88
|
-
export const
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
id: z.string(),
|
|
93
|
-
name: z.string(),
|
|
94
|
-
handle: z.string()
|
|
95
|
-
});
|
|
96
|
-
export const zBootstrapOnboardingWorkspaceResponse = z.object({
|
|
97
|
-
space: zOnboardingBootstrapResource,
|
|
98
|
-
project: zOnboardingBootstrapResource,
|
|
99
|
-
environment: zOnboardingBootstrapResource
|
|
88
|
+
export const zOnboardingAnalytics = z.object({
|
|
89
|
+
occupation: z.optional(z.string()),
|
|
90
|
+
companySize: z.optional(z.string()),
|
|
91
|
+
referralSource: z.optional(z.string())
|
|
100
92
|
});
|
|
101
93
|
export const zSpaceOrgCodeResponse = z.object({
|
|
102
94
|
orgCode: z.string()
|
|
@@ -793,15 +785,11 @@ export const zListUserSpacesData = z.object({
|
|
|
793
785
|
* A list of spaces for the authenticated user.
|
|
794
786
|
*/
|
|
795
787
|
export const zListUserSpacesResponse = zUserSpacesResponse;
|
|
796
|
-
export const
|
|
797
|
-
body:
|
|
788
|
+
export const zRecordOnboardingAnalyticsData = z.object({
|
|
789
|
+
body: zOnboardingAnalytics,
|
|
798
790
|
path: z.optional(z.never()),
|
|
799
791
|
query: z.optional(z.never())
|
|
800
792
|
});
|
|
801
|
-
/**
|
|
802
|
-
* Successfully bootstrapped onboarding resources.
|
|
803
|
-
*/
|
|
804
|
-
export const zBootstrapOnboardingWorkspaceResponse2 = zBootstrapOnboardingWorkspaceResponse;
|
|
805
793
|
export const zCreateSpaceData = z.object({
|
|
806
794
|
body: zCreateSpace,
|
|
807
795
|
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,
|
|
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, RecordOnboardingAnalyticsData, RecordOnboardingAnalyticsResponses, CreateSpaceData, CreateSpaceResponses, GetUserInvitesData, JoinSpaceData, JoinSpaceResponses, RejectSpaceInviteData, RejectSpaceInviteResponses, GetSpaceOverviewData, GetSpaceOrgCodeData, FetchKindeOrganisationBillingAgreementsData, GetSpaceInvitesData, CreateSpaceInviteData, CreateSpaceInviteResponses, RevokeSpaceInviteData, RevokeSpaceInviteResponses, ListSpaceMembersData, ListSpaceMemberRolesData, LeaveSpaceData, LeaveSpaceResponses, CreateProjectData, CreateProjectResponses, GetProjectOverviewData, CreateEnvironmentData, CreateEnvironmentResponses, GetEnvironmentOverviewData, GetGraphOverviewData, UpdateGraphStateData, UpdateGraphStateResponses, DeployVersionData, DeployVersionResponses, VersionStatusData, 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,11 +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
|
|
70
|
-
onSuccess?: (data: GetSuccessResponse<
|
|
69
|
+
export declare const useRecordOnboardingAnalytics: (config?: {
|
|
70
|
+
onSuccess?: (data: GetSuccessResponse<RecordOnboardingAnalyticsResponses>) => void;
|
|
71
71
|
onError?: Parameters<typeof useMutation>["0"]["onError"];
|
|
72
72
|
retry?: boolean;
|
|
73
|
-
}) => import("@tanstack/react-query").UseMutationResult<
|
|
73
|
+
}) => import("@tanstack/react-query").UseMutationResult<unknown, unknown, Omit<RecordOnboardingAnalyticsData, "url">, unknown>;
|
|
74
74
|
export declare const useCreateSpace: (config?: {
|
|
75
75
|
onSuccess?: (data: GetSuccessResponse<CreateSpaceResponses>) => void;
|
|
76
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,
|
|
5
|
+
import { getServiceHealth, fetchGraphM2M, updateGraphM2M, fetchNodeM2M, requestAccountPasswordReset, updateUsername, createUsername, getUserProfile, updateUserProfile, getUserIdentities, deleteAccountIdentity, getConnectedAppUrl, updateConnectedAppToken, listInstallationRepositories, listInstallationBranches, listUserInstallations, listUserSpaces, recordOnboardingAnalytics, createSpace, getUserInvites, joinSpace, rejectSpaceInvite, getSpaceOverview, getSpaceOrgCode, fetchKindeOrganisationBillingAgreements, getSpaceInvites, createSpaceInvite, revokeSpaceInvite, listSpaceMembers, listSpaceMemberRoles, leaveSpace, createProject, getProjectOverview, createEnvironment, getEnvironmentOverview, getGraphOverview, updateGraphState, deployVersion, versionStatus, 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,19 +346,19 @@ export const useListUserSpaces = (options) => {
|
|
|
346
346
|
staleTime: 600000
|
|
347
347
|
});
|
|
348
348
|
};
|
|
349
|
-
export const
|
|
349
|
+
export const useRecordOnboardingAnalytics = (config) => {
|
|
350
350
|
const token = useToken();
|
|
351
351
|
const queryClient = useQueryClient();
|
|
352
|
-
const opts = { throwOnError: true, url: "/auth/onboarding/
|
|
352
|
+
const opts = { throwOnError: true, url: "/auth/onboarding/analytics" };
|
|
353
353
|
const funcer = async (options) => {
|
|
354
354
|
const auth = isPromise(token) ? (await token) || "" : token || "";
|
|
355
|
-
const res = await
|
|
355
|
+
const res = await recordOnboardingAnalytics({ ...opts, ...options, auth });
|
|
356
356
|
return res?.data;
|
|
357
357
|
};
|
|
358
358
|
return useMutation({
|
|
359
359
|
mutationFn: funcer,
|
|
360
360
|
onSuccess: (res, options, c, ctx) => {
|
|
361
|
-
queryClient.invalidateQueries({ queryKey: ["onboarding", "
|
|
361
|
+
queryClient.invalidateQueries({ queryKey: ["onboarding", "analytics"] });
|
|
362
362
|
config?.onSuccess && config.onSuccess(res);
|
|
363
363
|
},
|
|
364
364
|
onError: config?.onError,
|