shoal-web-sdk 0.0.118 → 0.0.119
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 +29 -1
- package/dist/sdk/@tanstack/react-query.gen.js +19 -1
- package/dist/sdk/sdk.gen.d.ts +5 -1
- package/dist/sdk/sdk.gen.js +15 -0
- package/dist/sdk/types.gen.d.ts +45 -0
- package/dist/sdk/zod.gen.d.ts +154 -0
- package/dist/sdk/zod.gen.js +12 -0
- package/dist/tanstack-codegen/generated/generated.d.ts +4 -1
- package/dist/tanstack-codegen/generated/generated.js +22 -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, GetBillingPlanData, GetBillingUsageData, GetConnectedAppUrlData, GetEnvironmentOverviewData, GetGraphOverviewData, GetProjectOverviewData, GetServiceHealthData, GetSpaceInvitesData, GetSpaceOrgCodeData, GetSpaceOverviewData, GetUserIdentitiesData, GetUserInvitesData, GetUserProfileData, JoinSpaceData, JoinSpaceError, LeaveSpaceData, LeaveSpaceError, 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 { 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, 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;
|
|
@@ -68,6 +68,34 @@ export declare const fetchGraphM2mOptions: (options: Options<FetchGraphM2mData>)
|
|
|
68
68
|
* Update a graph by version ID for M2M.
|
|
69
69
|
*/
|
|
70
70
|
export declare const updateGraphM2mMutation: (options?: Partial<Options<UpdateGraphM2mData>>) => UseMutationOptions<unknown, UpdateGraphM2mError, Options<UpdateGraphM2mData>>;
|
|
71
|
+
export declare const fetchNodeM2mQueryKey: (options: Options<FetchNodeM2mData>) => [Pick<Options<FetchNodeM2mData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
72
|
+
_id: string;
|
|
73
|
+
_infinite?: boolean;
|
|
74
|
+
tags?: ReadonlyArray<string>;
|
|
75
|
+
}];
|
|
76
|
+
/**
|
|
77
|
+
* Fetch a node by id with its props for M2M.
|
|
78
|
+
*/
|
|
79
|
+
export declare const fetchNodeM2mOptions: (options: Options<FetchNodeM2mData>) => import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<import("../types.gen").Node, Error, import("../types.gen").Node, [Pick<Options<FetchNodeM2mData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
80
|
+
_id: string;
|
|
81
|
+
_infinite?: boolean;
|
|
82
|
+
tags?: ReadonlyArray<string>;
|
|
83
|
+
}]>, "queryFn"> & {
|
|
84
|
+
queryFn?: import("@tanstack/react-query").QueryFunction<import("../types.gen").Node, [Pick<Options<FetchNodeM2mData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
85
|
+
_id: string;
|
|
86
|
+
_infinite?: boolean;
|
|
87
|
+
tags?: ReadonlyArray<string>;
|
|
88
|
+
}], never> | undefined;
|
|
89
|
+
} & {
|
|
90
|
+
queryKey: [Pick<Options<FetchNodeM2mData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
91
|
+
_id: string;
|
|
92
|
+
_infinite?: boolean;
|
|
93
|
+
tags?: ReadonlyArray<string>;
|
|
94
|
+
}] & {
|
|
95
|
+
[dataTagSymbol]: import("../types.gen").Node;
|
|
96
|
+
[dataTagErrorSymbol]: Error;
|
|
97
|
+
};
|
|
98
|
+
};
|
|
71
99
|
/**
|
|
72
100
|
* This will submit a password reset request requiring the user to reset their password on next sign in.
|
|
73
101
|
*/
|
|
@@ -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, getBillingPlan, getBillingUsage, getConnectedAppUrl, getEnvironmentOverview, getGraphOverview, getProjectOverview, getServiceHealth, getSpaceInvites, getSpaceOrgCode, getSpaceOverview, getUserIdentities, getUserInvites, getUserProfile, joinSpace, leaveSpace, 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 { 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, 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) {
|
|
@@ -78,6 +78,24 @@ export const updateGraphM2mMutation = (options) => {
|
|
|
78
78
|
};
|
|
79
79
|
return mutationOptions;
|
|
80
80
|
};
|
|
81
|
+
export const fetchNodeM2mQueryKey = (options) => createQueryKey('fetchNodeM2M', options);
|
|
82
|
+
/**
|
|
83
|
+
* Fetch a node by id with its props for M2M.
|
|
84
|
+
*/
|
|
85
|
+
export const fetchNodeM2mOptions = (options) => {
|
|
86
|
+
return queryOptions({
|
|
87
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
88
|
+
const { data } = await fetchNodeM2M({
|
|
89
|
+
...options,
|
|
90
|
+
...queryKey[0],
|
|
91
|
+
signal,
|
|
92
|
+
throwOnError: true
|
|
93
|
+
});
|
|
94
|
+
return data;
|
|
95
|
+
},
|
|
96
|
+
queryKey: fetchNodeM2mQueryKey(options)
|
|
97
|
+
});
|
|
98
|
+
};
|
|
81
99
|
/**
|
|
82
100
|
* This will submit a password reset request requiring the user to reset their password on next sign in.
|
|
83
101
|
*/
|
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, 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, 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 { 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, 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
|
|
@@ -25,6 +25,10 @@ export declare const fetchGraphM2M: <ThrowOnError extends boolean = false>(optio
|
|
|
25
25
|
* Update a graph by version ID for M2M.
|
|
26
26
|
*/
|
|
27
27
|
export declare const updateGraphM2M: <ThrowOnError extends boolean = false>(options: Options<UpdateGraphM2mData, ThrowOnError>) => import("./client").RequestResult<UpdateGraphM2mResponses, UpdateGraphM2mErrors, ThrowOnError, "fields">;
|
|
28
|
+
/**
|
|
29
|
+
* Fetch a node by id with its props for M2M.
|
|
30
|
+
*/
|
|
31
|
+
export declare const fetchNodeM2M: <ThrowOnError extends boolean = false>(options: Options<FetchNodeM2mData, ThrowOnError>) => import("./client").RequestResult<FetchNodeM2mResponses, FetchNodeM2mErrors, ThrowOnError, "fields">;
|
|
28
32
|
/**
|
|
29
33
|
* This will submit a password reset request requiring the user to reset their password on next sign in.
|
|
30
34
|
*/
|
package/dist/sdk/sdk.gen.js
CHANGED
|
@@ -49,6 +49,21 @@ export const updateGraphM2M = (options) => {
|
|
|
49
49
|
}
|
|
50
50
|
});
|
|
51
51
|
};
|
|
52
|
+
/**
|
|
53
|
+
* Fetch a node by id with its props for M2M.
|
|
54
|
+
*/
|
|
55
|
+
export const fetchNodeM2M = (options) => {
|
|
56
|
+
return (options.client ?? client).get({
|
|
57
|
+
security: [
|
|
58
|
+
{
|
|
59
|
+
scheme: 'bearer',
|
|
60
|
+
type: 'http'
|
|
61
|
+
}
|
|
62
|
+
],
|
|
63
|
+
url: '/m2m/graph/{versionUUID}/nodes/{nodeUUID}',
|
|
64
|
+
...options
|
|
65
|
+
});
|
|
66
|
+
};
|
|
52
67
|
/**
|
|
53
68
|
* This will submit a password reset request requiring the user to reset their password on next sign in.
|
|
54
69
|
*/
|
package/dist/sdk/types.gen.d.ts
CHANGED
|
@@ -582,6 +582,51 @@ export type UpdateGraphM2mResponses = {
|
|
|
582
582
|
*/
|
|
583
583
|
202: unknown;
|
|
584
584
|
};
|
|
585
|
+
export type FetchNodeM2mData = {
|
|
586
|
+
body?: never;
|
|
587
|
+
path: {
|
|
588
|
+
/**
|
|
589
|
+
* A version UUID.
|
|
590
|
+
*/
|
|
591
|
+
versionUUID: string;
|
|
592
|
+
/**
|
|
593
|
+
* The node ID this source ZIP is associated with.
|
|
594
|
+
*/
|
|
595
|
+
nodeUUID: string;
|
|
596
|
+
};
|
|
597
|
+
query?: never;
|
|
598
|
+
url: '/m2m/graph/{versionUUID}/nodes/{nodeUUID}';
|
|
599
|
+
};
|
|
600
|
+
export type FetchNodeM2mErrors = {
|
|
601
|
+
/**
|
|
602
|
+
* Invalid request parameters.
|
|
603
|
+
*/
|
|
604
|
+
400: ErrorResponse;
|
|
605
|
+
/**
|
|
606
|
+
* Unauthorised user.
|
|
607
|
+
*/
|
|
608
|
+
401: ErrorResponse;
|
|
609
|
+
/**
|
|
610
|
+
* Invalid credentials.
|
|
611
|
+
*/
|
|
612
|
+
403: ErrorResponse;
|
|
613
|
+
/**
|
|
614
|
+
* Related content not found.
|
|
615
|
+
*/
|
|
616
|
+
404: ErrorResponse;
|
|
617
|
+
/**
|
|
618
|
+
* Unexpected error.
|
|
619
|
+
*/
|
|
620
|
+
500: ErrorResponse;
|
|
621
|
+
};
|
|
622
|
+
export type FetchNodeM2mError = FetchNodeM2mErrors[keyof FetchNodeM2mErrors];
|
|
623
|
+
export type FetchNodeM2mResponses = {
|
|
624
|
+
/**
|
|
625
|
+
* Node fetched successfully.
|
|
626
|
+
*/
|
|
627
|
+
200: Node;
|
|
628
|
+
};
|
|
629
|
+
export type FetchNodeM2mResponse = FetchNodeM2mResponses[keyof FetchNodeM2mResponses];
|
|
585
630
|
export type RequestAccountPasswordResetData = {
|
|
586
631
|
body?: never;
|
|
587
632
|
path?: never;
|
package/dist/sdk/zod.gen.d.ts
CHANGED
|
@@ -1475,6 +1475,160 @@ export declare const zUpdateGraphM2mData: z.ZodObject<{
|
|
|
1475
1475
|
}, z.core.$strip>;
|
|
1476
1476
|
query: z.ZodOptional<z.ZodNever>;
|
|
1477
1477
|
}, z.core.$strip>;
|
|
1478
|
+
export declare const zFetchNodeM2mData: z.ZodObject<{
|
|
1479
|
+
body: z.ZodOptional<z.ZodNever>;
|
|
1480
|
+
path: z.ZodObject<{
|
|
1481
|
+
versionUUID: z.ZodUUID;
|
|
1482
|
+
nodeUUID: z.ZodUUID;
|
|
1483
|
+
}, z.core.$strip>;
|
|
1484
|
+
query: z.ZodOptional<z.ZodNever>;
|
|
1485
|
+
}, z.core.$strip>;
|
|
1486
|
+
/**
|
|
1487
|
+
* Node fetched successfully.
|
|
1488
|
+
*/
|
|
1489
|
+
export declare const zFetchNodeM2mResponse: z.ZodObject<{
|
|
1490
|
+
id: z.ZodUUID;
|
|
1491
|
+
name: z.ZodOptional<z.ZodString>;
|
|
1492
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1493
|
+
x: z.ZodNumber;
|
|
1494
|
+
y: z.ZodNumber;
|
|
1495
|
+
width: z.ZodInt;
|
|
1496
|
+
height: z.ZodInt;
|
|
1497
|
+
edges: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1498
|
+
id: z.ZodUUID;
|
|
1499
|
+
src: z.ZodUUID;
|
|
1500
|
+
dst: z.ZodUUID;
|
|
1501
|
+
typ: z.ZodEnum<{
|
|
1502
|
+
network: "network";
|
|
1503
|
+
route: "route";
|
|
1504
|
+
}>;
|
|
1505
|
+
props: z.ZodOptional<z.ZodUnion<readonly [z.ZodIntersection<z.ZodObject<{
|
|
1506
|
+
typ: z.ZodLiteral<"comment">;
|
|
1507
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1508
|
+
a: z.ZodOptional<z.ZodString>;
|
|
1509
|
+
}, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
|
|
1510
|
+
typ: z.ZodLiteral<"cache">;
|
|
1511
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1512
|
+
subdomain: z.ZodOptional<z.ZodString>;
|
|
1513
|
+
}, z.core.$strip>>]>>;
|
|
1514
|
+
}, z.core.$strip>>>;
|
|
1515
|
+
typ: z.ZodEnum<{
|
|
1516
|
+
function: "function";
|
|
1517
|
+
cache: "cache";
|
|
1518
|
+
comment: "comment";
|
|
1519
|
+
container: "container";
|
|
1520
|
+
cronjob: "cronjob";
|
|
1521
|
+
database: "database";
|
|
1522
|
+
queue: "queue";
|
|
1523
|
+
proxy: "proxy";
|
|
1524
|
+
vm: "vm";
|
|
1525
|
+
scheduler: "scheduler";
|
|
1526
|
+
}>;
|
|
1527
|
+
props: z.ZodOptional<z.ZodUnion<readonly [z.ZodIntersection<z.ZodObject<{
|
|
1528
|
+
typ: z.ZodLiteral<"comment">;
|
|
1529
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1530
|
+
comment: z.ZodOptional<z.ZodString>;
|
|
1531
|
+
}, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
|
|
1532
|
+
typ: z.ZodLiteral<"cache">;
|
|
1533
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1534
|
+
size: z.ZodOptional<z.ZodInt>;
|
|
1535
|
+
}, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
|
|
1536
|
+
typ: z.ZodLiteral<"container">;
|
|
1537
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1538
|
+
region: z.ZodEnum<{
|
|
1539
|
+
"africa-south1": "africa-south1";
|
|
1540
|
+
"asia-east1": "asia-east1";
|
|
1541
|
+
"asia-east2": "asia-east2";
|
|
1542
|
+
"asia-northeast1": "asia-northeast1";
|
|
1543
|
+
"asia-northeast2": "asia-northeast2";
|
|
1544
|
+
"asia-northeast3": "asia-northeast3";
|
|
1545
|
+
"asia-south1": "asia-south1";
|
|
1546
|
+
"asia-southeast1": "asia-southeast1";
|
|
1547
|
+
"asia-southeast2": "asia-southeast2";
|
|
1548
|
+
"australia-southeast1": "australia-southeast1";
|
|
1549
|
+
"europe-north1": "europe-north1";
|
|
1550
|
+
"europe-west1": "europe-west1";
|
|
1551
|
+
"europe-west2": "europe-west2";
|
|
1552
|
+
"europe-west3": "europe-west3";
|
|
1553
|
+
"europe-west4": "europe-west4";
|
|
1554
|
+
"europe-west6": "europe-west6";
|
|
1555
|
+
"northamerica-northeast1": "northamerica-northeast1";
|
|
1556
|
+
"northamerica-northeast2": "northamerica-northeast2";
|
|
1557
|
+
"southamerica-east1": "southamerica-east1";
|
|
1558
|
+
"southamerica-west1": "southamerica-west1";
|
|
1559
|
+
"us-central1": "us-central1";
|
|
1560
|
+
"us-east1": "us-east1";
|
|
1561
|
+
"us-east4": "us-east4";
|
|
1562
|
+
"us-west1": "us-west1";
|
|
1563
|
+
"us-west2": "us-west2";
|
|
1564
|
+
"us-west3": "us-west3";
|
|
1565
|
+
"us-west4": "us-west4";
|
|
1566
|
+
}>;
|
|
1567
|
+
port: z.ZodInt;
|
|
1568
|
+
cpu: z.ZodEnum<{
|
|
1569
|
+
1: "1";
|
|
1570
|
+
2: "2";
|
|
1571
|
+
4: "4";
|
|
1572
|
+
6: "6";
|
|
1573
|
+
8: "8";
|
|
1574
|
+
16: "16";
|
|
1575
|
+
32: "32";
|
|
1576
|
+
}>;
|
|
1577
|
+
memory: z.ZodEnum<{
|
|
1578
|
+
"128Mi": "128Mi";
|
|
1579
|
+
"256Mi": "256Mi";
|
|
1580
|
+
"512Mi": "512Mi";
|
|
1581
|
+
"1Gi": "1Gi";
|
|
1582
|
+
"2Gi": "2Gi";
|
|
1583
|
+
"4Gi": "4Gi";
|
|
1584
|
+
"8Gi": "8Gi";
|
|
1585
|
+
"16Gi": "16Gi";
|
|
1586
|
+
"32Gi": "32Gi";
|
|
1587
|
+
}>;
|
|
1588
|
+
ingress: z.ZodEnum<{
|
|
1589
|
+
INGRESS_TRAFFIC_ALL: "INGRESS_TRAFFIC_ALL";
|
|
1590
|
+
INGRESS_TRAFFIC_INTERNAL_ONLY: "INGRESS_TRAFFIC_INTERNAL_ONLY";
|
|
1591
|
+
INGRESS_TRAFFIC_INTERNAL_LOAD_BALANCER: "INGRESS_TRAFFIC_INTERNAL_LOAD_BALANCER";
|
|
1592
|
+
}>;
|
|
1593
|
+
timeoutSeconds: z.ZodOptional<z.ZodInt>;
|
|
1594
|
+
maxInstances: z.ZodOptional<z.ZodInt>;
|
|
1595
|
+
minInstances: z.ZodOptional<z.ZodInt>;
|
|
1596
|
+
concurrency: z.ZodOptional<z.ZodInt>;
|
|
1597
|
+
allowUnauthenticated: z.ZodOptional<z.ZodBoolean>;
|
|
1598
|
+
uri: z.ZodString;
|
|
1599
|
+
installationId: z.ZodOptional<z.ZodString>;
|
|
1600
|
+
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1601
|
+
}, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
|
|
1602
|
+
typ: z.ZodLiteral<"cronjob">;
|
|
1603
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1604
|
+
cronTab: z.ZodOptional<z.ZodString>;
|
|
1605
|
+
}, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
|
|
1606
|
+
typ: z.ZodLiteral<"database">;
|
|
1607
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1608
|
+
space: z.ZodOptional<z.ZodInt>;
|
|
1609
|
+
}, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
|
|
1610
|
+
typ: z.ZodLiteral<"function">;
|
|
1611
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1612
|
+
cpus: z.ZodOptional<z.ZodInt>;
|
|
1613
|
+
}, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
|
|
1614
|
+
typ: z.ZodLiteral<"queue">;
|
|
1615
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1616
|
+
foobar: z.ZodOptional<z.ZodString>;
|
|
1617
|
+
}, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
|
|
1618
|
+
typ: z.ZodLiteral<"proxy">;
|
|
1619
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1620
|
+
domain: z.ZodOptional<z.ZodString>;
|
|
1621
|
+
}, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
|
|
1622
|
+
typ: z.ZodLiteral<"vm">;
|
|
1623
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1624
|
+
os: z.ZodOptional<z.ZodString>;
|
|
1625
|
+
}, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
|
|
1626
|
+
typ: z.ZodLiteral<"scheduler">;
|
|
1627
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1628
|
+
url: z.ZodOptional<z.ZodString>;
|
|
1629
|
+
expression: z.ZodOptional<z.ZodString>;
|
|
1630
|
+
}, z.core.$strip>>]>>;
|
|
1631
|
+
}, z.core.$strip>;
|
|
1478
1632
|
export declare const zRequestAccountPasswordResetData: z.ZodObject<{
|
|
1479
1633
|
body: z.ZodOptional<z.ZodNever>;
|
|
1480
1634
|
path: z.ZodOptional<z.ZodNever>;
|
package/dist/sdk/zod.gen.js
CHANGED
|
@@ -589,6 +589,18 @@ export const zUpdateGraphM2mData = z.object({
|
|
|
589
589
|
}),
|
|
590
590
|
query: z.optional(z.never())
|
|
591
591
|
});
|
|
592
|
+
export const zFetchNodeM2mData = z.object({
|
|
593
|
+
body: z.optional(z.never()),
|
|
594
|
+
path: z.object({
|
|
595
|
+
versionUUID: z.uuid(),
|
|
596
|
+
nodeUUID: z.uuid()
|
|
597
|
+
}),
|
|
598
|
+
query: z.optional(z.never())
|
|
599
|
+
});
|
|
600
|
+
/**
|
|
601
|
+
* Node fetched successfully.
|
|
602
|
+
*/
|
|
603
|
+
export const zFetchNodeM2mResponse = zNode;
|
|
592
604
|
export const zRequestAccountPasswordResetData = z.object({
|
|
593
605
|
body: z.optional(z.never()),
|
|
594
606
|
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, 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, CreateEnvironmentData, CreateEnvironmentResponses, GetEnvironmentOverviewData, GetGraphOverviewData, UpdateGraphStateData, UpdateGraphStateResponses, DeployVersionData, DeployVersionResponses, RequestSignedUploadUrlData, RequestSignedUploadUrlResponses, RecordCloudUsageData, RecordCloudUsageResponses, GetBillingPlanData, UpdateBillingPlanData, UpdateBillingPlanResponses, CreateSetupIntentData, CreateSetupIntentResponses, ListPaymentMethodsData, RemovePaymentMethodData, RemovePaymentMethodResponses, SetDefaultPaymentMethodData, SetDefaultPaymentMethodResponses, GetBillingUsageData, FetchBillingPricesData } 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, 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, RequestSignedUploadUrlData, RequestSignedUploadUrlResponses, RecordCloudUsageData, RecordCloudUsageResponses, GetBillingPlanData, UpdateBillingPlanData, UpdateBillingPlanResponses, CreateSetupIntentData, CreateSetupIntentResponses, ListPaymentMethodsData, RemovePaymentMethodData, RemovePaymentMethodResponses, SetDefaultPaymentMethodData, SetDefaultPaymentMethodResponses, GetBillingUsageData, FetchBillingPricesData } 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>;
|
|
@@ -12,6 +12,9 @@ export declare const useUpdateGraphM2M: (config?: {
|
|
|
12
12
|
onError?: Parameters<typeof useMutation>["0"]["onError"];
|
|
13
13
|
retry?: boolean;
|
|
14
14
|
}) => import("@tanstack/react-query").UseMutationResult<unknown, unknown, Omit<UpdateGraphM2mData, "url">, unknown>;
|
|
15
|
+
export declare const useFetchNodeM2M: (options: Omit<FetchNodeM2mData, "url"> & {
|
|
16
|
+
enabled?: boolean;
|
|
17
|
+
}) => import("@tanstack/react-query").UseQueryResult<import("../../sdk/types.gen").Node | undefined, Error>;
|
|
15
18
|
export declare const useRequestAccountPasswordReset: (config?: {
|
|
16
19
|
onSuccess?: (data: GetSuccessResponse<RequestAccountPasswordResetResponses>) => void;
|
|
17
20
|
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, 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, createEnvironment, getEnvironmentOverview, getGraphOverview, updateGraphState, deployVersion, requestSignedUploadUrl, recordCloudUsage, getBillingPlan, updateBillingPlan, createSetupIntent, listPaymentMethods, removePaymentMethod, setDefaultPaymentMethod, getBillingUsage, fetchBillingPrices } from "../../sdk/sdk.gen";
|
|
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, createEnvironment, getEnvironmentOverview, getGraphOverview, updateGraphState, deployVersion, requestSignedUploadUrl, recordCloudUsage, getBillingPlan, updateBillingPlan, createSetupIntent, listPaymentMethods, removePaymentMethod, setDefaultPaymentMethod, getBillingUsage, fetchBillingPrices } from "../../sdk/sdk.gen";
|
|
6
6
|
export const useGetServiceHealth = (options) => {
|
|
7
7
|
const token = useToken();
|
|
8
8
|
let { enabled, ...rest } = options || { enabled: true };
|
|
@@ -64,6 +64,27 @@ export const useUpdateGraphM2M = (config) => {
|
|
|
64
64
|
retry: config?.retry
|
|
65
65
|
});
|
|
66
66
|
};
|
|
67
|
+
export const useFetchNodeM2M = (options) => {
|
|
68
|
+
const token = useToken();
|
|
69
|
+
let { enabled, ...rest } = options || { enabled: true };
|
|
70
|
+
const opts = { throwOnError: true, url: "/m2m/graph/{versionUUID}/nodes/{nodeUUID}" };
|
|
71
|
+
const funcer = async () => {
|
|
72
|
+
const auth = isPromise(token) ? (await token) || "" : token || "";
|
|
73
|
+
if (isPromise(token) && !token)
|
|
74
|
+
return;
|
|
75
|
+
const res = await fetchNodeM2M({ ...opts, ...rest, auth });
|
|
76
|
+
return res.data;
|
|
77
|
+
};
|
|
78
|
+
if (!token)
|
|
79
|
+
enabled = false;
|
|
80
|
+
return useQuery({
|
|
81
|
+
queryKey: ["m2m", "graph", options?.path?.versionUUID, "nodes", options?.path?.nodeUUID, options.query ?? {}],
|
|
82
|
+
queryFn: funcer,
|
|
83
|
+
enabled,
|
|
84
|
+
retry: false,
|
|
85
|
+
staleTime: 600000
|
|
86
|
+
});
|
|
87
|
+
};
|
|
67
88
|
export const useRequestAccountPasswordReset = (config) => {
|
|
68
89
|
const token = useToken();
|
|
69
90
|
const queryClient = useQueryClient();
|