shoal-web-sdk 0.0.113 → 0.0.115

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.
@@ -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, RevokeSpaceInviteData, RevokeSpaceInviteError, RevokeSpaceInviteResponse, SetDefaultPaymentMethodData, SetDefaultPaymentMethodError, SetDefaultPaymentMethodResponse, UpdateBillingPlanData, UpdateBillingPlanError, UpdateConnectedAppTokenData, UpdateConnectedAppTokenError, 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, 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, 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;
@@ -42,7 +42,7 @@ export declare const fetchGraphM2mQueryKey: (options: Options<FetchGraphM2mData>
42
42
  tags?: ReadonlyArray<string>;
43
43
  }];
44
44
  /**
45
- * Fetch a graph by version ID for M2M
45
+ * Fetch a graph by version ID for M2M.
46
46
  */
47
47
  export declare const fetchGraphM2mOptions: (options: Options<FetchGraphM2mData>) => import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<import("../types.gen").Graph, Error, import("../types.gen").Graph, [Pick<Options<FetchGraphM2mData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
48
48
  _id: string;
@@ -64,6 +64,10 @@ export declare const fetchGraphM2mOptions: (options: Options<FetchGraphM2mData>)
64
64
  [dataTagErrorSymbol]: Error;
65
65
  };
66
66
  };
67
+ /**
68
+ * Update a graph by version ID for M2M.
69
+ */
70
+ export declare const updateGraphM2mMutation: (options?: Partial<Options<UpdateGraphM2mData>>) => UseMutationOptions<unknown, UpdateGraphM2mError, Options<UpdateGraphM2mData>>;
67
71
  /**
68
72
  * This will submit a password reset request requiring the user to reset their password on next sign in.
69
73
  */
@@ -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, updateGraphState, updateUsername, updateUserProfile } from '../sdk.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';
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) {
@@ -46,7 +46,7 @@ export const getServiceHealthOptions = (options) => {
46
46
  };
47
47
  export const fetchGraphM2mQueryKey = (options) => createQueryKey('fetchGraphM2M', options);
48
48
  /**
49
- * Fetch a graph by version ID for M2M
49
+ * Fetch a graph by version ID for M2M.
50
50
  */
51
51
  export const fetchGraphM2mOptions = (options) => {
52
52
  return queryOptions({
@@ -62,6 +62,22 @@ export const fetchGraphM2mOptions = (options) => {
62
62
  queryKey: fetchGraphM2mQueryKey(options)
63
63
  });
64
64
  };
65
+ /**
66
+ * Update a graph by version ID for M2M.
67
+ */
68
+ export const updateGraphM2mMutation = (options) => {
69
+ const mutationOptions = {
70
+ mutationFn: async (fnOptions) => {
71
+ const { data } = await updateGraphM2M({
72
+ ...options,
73
+ ...fnOptions,
74
+ throwOnError: true
75
+ });
76
+ return data;
77
+ }
78
+ };
79
+ return mutationOptions;
80
+ };
65
81
  /**
66
82
  * This will submit a password reset request requiring the user to reset their password on next sign in.
67
83
  */
@@ -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, 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, 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
@@ -18,9 +18,13 @@ export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends
18
18
  */
19
19
  export declare const getServiceHealth: <ThrowOnError extends boolean = false>(options?: Options<GetServiceHealthData, ThrowOnError>) => import("./client").RequestResult<GetServiceHealthResponses, unknown, ThrowOnError, "fields">;
20
20
  /**
21
- * Fetch a graph by version ID for M2M
21
+ * Fetch a graph by version ID for M2M.
22
22
  */
23
23
  export declare const fetchGraphM2M: <ThrowOnError extends boolean = false>(options: Options<FetchGraphM2mData, ThrowOnError>) => import("./client").RequestResult<FetchGraphM2mResponses, FetchGraphM2mErrors, ThrowOnError, "fields">;
24
+ /**
25
+ * Update a graph by version ID for M2M.
26
+ */
27
+ export declare const updateGraphM2M: <ThrowOnError extends boolean = false>(options: Options<UpdateGraphM2mData, ThrowOnError>) => import("./client").RequestResult<UpdateGraphM2mResponses, UpdateGraphM2mErrors, ThrowOnError, "fields">;
24
28
  /**
25
29
  * This will submit a password reset request requiring the user to reset their password on next sign in.
26
30
  */
@@ -16,7 +16,7 @@ export const getServiceHealth = (options) => {
16
16
  });
17
17
  };
18
18
  /**
19
- * Fetch a graph by version ID for M2M
19
+ * Fetch a graph by version ID for M2M.
20
20
  */
21
21
  export const fetchGraphM2M = (options) => {
22
22
  return (options.client ?? client).get({
@@ -30,6 +30,25 @@ export const fetchGraphM2M = (options) => {
30
30
  ...options
31
31
  });
32
32
  };
33
+ /**
34
+ * Update a graph by version ID for M2M.
35
+ */
36
+ export const updateGraphM2M = (options) => {
37
+ return (options.client ?? client).put({
38
+ security: [
39
+ {
40
+ scheme: 'bearer',
41
+ type: 'http'
42
+ }
43
+ ],
44
+ url: '/m2m/graph/{versionUUID}',
45
+ ...options,
46
+ headers: {
47
+ 'Content-Type': 'application/json',
48
+ ...options.headers
49
+ }
50
+ });
51
+ };
33
52
  /**
34
53
  * This will submit a password reset request requiring the user to reset their password on next sign in.
35
54
  */
@@ -323,7 +323,6 @@ export type ContainerNodeProps = {
323
323
  concurrency?: number;
324
324
  allowUnauthenticated?: boolean;
325
325
  uri: string;
326
- digest?: string;
327
326
  env?: {
328
327
  [key: string]: string;
329
328
  };
@@ -536,6 +535,46 @@ export type FetchGraphM2mResponses = {
536
535
  200: Graph;
537
536
  };
538
537
  export type FetchGraphM2mResponse = FetchGraphM2mResponses[keyof FetchGraphM2mResponses];
538
+ export type UpdateGraphM2mData = {
539
+ body: Nodes;
540
+ path: {
541
+ /**
542
+ * A version UUID.
543
+ */
544
+ versionUUID: string;
545
+ };
546
+ query?: never;
547
+ url: '/m2m/graph/{versionUUID}';
548
+ };
549
+ export type UpdateGraphM2mErrors = {
550
+ /**
551
+ * Unauthorised user.
552
+ */
553
+ 401: ErrorResponse;
554
+ /**
555
+ * Invalid credentials.
556
+ */
557
+ 403: ErrorResponse;
558
+ /**
559
+ * Related content not found.
560
+ */
561
+ 404: ErrorResponse;
562
+ /**
563
+ * Unprocessable graph state.
564
+ */
565
+ 422: ErrorResponse;
566
+ /**
567
+ * Unexpected error.
568
+ */
569
+ 500: ErrorResponse;
570
+ };
571
+ export type UpdateGraphM2mError = UpdateGraphM2mErrors[keyof UpdateGraphM2mErrors];
572
+ export type UpdateGraphM2mResponses = {
573
+ /**
574
+ * Graph state updated successfully
575
+ */
576
+ 202: unknown;
577
+ };
539
578
  export type RequestAccountPasswordResetData = {
540
579
  body?: never;
541
580
  path?: never;
@@ -572,7 +572,6 @@ export declare const zContainerNodeProps: z.ZodObject<{
572
572
  concurrency: z.ZodOptional<z.ZodInt>;
573
573
  allowUnauthenticated: z.ZodOptional<z.ZodBoolean>;
574
574
  uri: z.ZodString;
575
- digest: z.ZodOptional<z.ZodString>;
576
575
  env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
577
576
  }, z.core.$strip>;
578
577
  export declare const zCronJobNodeProps: z.ZodObject<{
@@ -703,7 +702,6 @@ export declare const zNode: z.ZodObject<{
703
702
  concurrency: z.ZodOptional<z.ZodInt>;
704
703
  allowUnauthenticated: z.ZodOptional<z.ZodBoolean>;
705
704
  uri: z.ZodString;
706
- digest: z.ZodOptional<z.ZodString>;
707
705
  env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
708
706
  }, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
709
707
  typ: z.ZodLiteral<"cronjob">;
@@ -847,7 +845,6 @@ export declare const zNodes: z.ZodObject<{
847
845
  concurrency: z.ZodOptional<z.ZodInt>;
848
846
  allowUnauthenticated: z.ZodOptional<z.ZodBoolean>;
849
847
  uri: z.ZodString;
850
- digest: z.ZodOptional<z.ZodString>;
851
848
  env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
852
849
  }, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
853
850
  typ: z.ZodLiteral<"cronjob">;
@@ -993,7 +990,6 @@ export declare const zGraph: z.ZodObject<{
993
990
  concurrency: z.ZodOptional<z.ZodInt>;
994
991
  allowUnauthenticated: z.ZodOptional<z.ZodBoolean>;
995
992
  uri: z.ZodString;
996
- digest: z.ZodOptional<z.ZodString>;
997
993
  env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
998
994
  }, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
999
995
  typ: z.ZodLiteral<"cronjob">;
@@ -1289,7 +1285,6 @@ export declare const zFetchGraphM2mResponse: z.ZodObject<{
1289
1285
  concurrency: z.ZodOptional<z.ZodInt>;
1290
1286
  allowUnauthenticated: z.ZodOptional<z.ZodBoolean>;
1291
1287
  uri: z.ZodString;
1292
- digest: z.ZodOptional<z.ZodString>;
1293
1288
  env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1294
1289
  }, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
1295
1290
  typ: z.ZodLiteral<"cronjob">;
@@ -1323,6 +1318,156 @@ export declare const zFetchGraphM2mResponse: z.ZodObject<{
1323
1318
  }, z.core.$strip>>]>>;
1324
1319
  }, z.core.$strip>>;
1325
1320
  }, z.core.$strip>;
1321
+ export declare const zUpdateGraphM2mData: z.ZodObject<{
1322
+ body: z.ZodObject<{
1323
+ nodes: z.ZodArray<z.ZodObject<{
1324
+ id: z.ZodUUID;
1325
+ name: z.ZodOptional<z.ZodString>;
1326
+ description: z.ZodOptional<z.ZodString>;
1327
+ x: z.ZodNumber;
1328
+ y: z.ZodNumber;
1329
+ width: z.ZodInt;
1330
+ height: z.ZodInt;
1331
+ edges: z.ZodOptional<z.ZodArray<z.ZodObject<{
1332
+ id: z.ZodUUID;
1333
+ src: z.ZodUUID;
1334
+ dst: z.ZodUUID;
1335
+ typ: z.ZodEnum<{
1336
+ network: "network";
1337
+ route: "route";
1338
+ }>;
1339
+ props: z.ZodOptional<z.ZodUnion<readonly [z.ZodIntersection<z.ZodObject<{
1340
+ typ: z.ZodLiteral<"comment">;
1341
+ }, z.core.$strip>, z.ZodObject<{
1342
+ a: z.ZodOptional<z.ZodString>;
1343
+ }, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
1344
+ typ: z.ZodLiteral<"cache">;
1345
+ }, z.core.$strip>, z.ZodObject<{
1346
+ subdomain: z.ZodOptional<z.ZodString>;
1347
+ }, z.core.$strip>>]>>;
1348
+ }, z.core.$strip>>>;
1349
+ typ: z.ZodEnum<{
1350
+ function: "function";
1351
+ cache: "cache";
1352
+ comment: "comment";
1353
+ container: "container";
1354
+ cronjob: "cronjob";
1355
+ database: "database";
1356
+ queue: "queue";
1357
+ proxy: "proxy";
1358
+ vm: "vm";
1359
+ scheduler: "scheduler";
1360
+ }>;
1361
+ props: z.ZodOptional<z.ZodUnion<readonly [z.ZodIntersection<z.ZodObject<{
1362
+ typ: z.ZodLiteral<"comment">;
1363
+ }, z.core.$strip>, z.ZodObject<{
1364
+ comment: z.ZodOptional<z.ZodString>;
1365
+ }, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
1366
+ typ: z.ZodLiteral<"cache">;
1367
+ }, z.core.$strip>, z.ZodObject<{
1368
+ size: z.ZodOptional<z.ZodInt>;
1369
+ }, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
1370
+ typ: z.ZodLiteral<"container">;
1371
+ }, z.core.$strip>, z.ZodObject<{
1372
+ region: z.ZodEnum<{
1373
+ "africa-south1": "africa-south1";
1374
+ "asia-east1": "asia-east1";
1375
+ "asia-east2": "asia-east2";
1376
+ "asia-northeast1": "asia-northeast1";
1377
+ "asia-northeast2": "asia-northeast2";
1378
+ "asia-northeast3": "asia-northeast3";
1379
+ "asia-south1": "asia-south1";
1380
+ "asia-southeast1": "asia-southeast1";
1381
+ "asia-southeast2": "asia-southeast2";
1382
+ "australia-southeast1": "australia-southeast1";
1383
+ "europe-north1": "europe-north1";
1384
+ "europe-west1": "europe-west1";
1385
+ "europe-west2": "europe-west2";
1386
+ "europe-west3": "europe-west3";
1387
+ "europe-west4": "europe-west4";
1388
+ "europe-west6": "europe-west6";
1389
+ "northamerica-northeast1": "northamerica-northeast1";
1390
+ "northamerica-northeast2": "northamerica-northeast2";
1391
+ "southamerica-east1": "southamerica-east1";
1392
+ "southamerica-west1": "southamerica-west1";
1393
+ "us-central1": "us-central1";
1394
+ "us-east1": "us-east1";
1395
+ "us-east4": "us-east4";
1396
+ "us-west1": "us-west1";
1397
+ "us-west2": "us-west2";
1398
+ "us-west3": "us-west3";
1399
+ "us-west4": "us-west4";
1400
+ }>;
1401
+ port: z.ZodInt;
1402
+ cpu: z.ZodEnum<{
1403
+ 1: "1";
1404
+ 2: "2";
1405
+ 4: "4";
1406
+ 6: "6";
1407
+ 8: "8";
1408
+ 16: "16";
1409
+ 32: "32";
1410
+ }>;
1411
+ memory: z.ZodEnum<{
1412
+ "128Mi": "128Mi";
1413
+ "256Mi": "256Mi";
1414
+ "512Mi": "512Mi";
1415
+ "1Gi": "1Gi";
1416
+ "2Gi": "2Gi";
1417
+ "4Gi": "4Gi";
1418
+ "8Gi": "8Gi";
1419
+ "16Gi": "16Gi";
1420
+ "32Gi": "32Gi";
1421
+ }>;
1422
+ ingress: z.ZodEnum<{
1423
+ INGRESS_TRAFFIC_ALL: "INGRESS_TRAFFIC_ALL";
1424
+ INGRESS_TRAFFIC_INTERNAL_ONLY: "INGRESS_TRAFFIC_INTERNAL_ONLY";
1425
+ INGRESS_TRAFFIC_INTERNAL_LOAD_BALANCER: "INGRESS_TRAFFIC_INTERNAL_LOAD_BALANCER";
1426
+ }>;
1427
+ timeoutSeconds: z.ZodOptional<z.ZodInt>;
1428
+ maxInstances: z.ZodOptional<z.ZodInt>;
1429
+ minInstances: z.ZodOptional<z.ZodInt>;
1430
+ concurrency: z.ZodOptional<z.ZodInt>;
1431
+ allowUnauthenticated: z.ZodOptional<z.ZodBoolean>;
1432
+ uri: z.ZodString;
1433
+ env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1434
+ }, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
1435
+ typ: z.ZodLiteral<"cronjob">;
1436
+ }, z.core.$strip>, z.ZodObject<{
1437
+ cronTab: z.ZodOptional<z.ZodString>;
1438
+ }, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
1439
+ typ: z.ZodLiteral<"database">;
1440
+ }, z.core.$strip>, z.ZodObject<{
1441
+ space: z.ZodOptional<z.ZodInt>;
1442
+ }, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
1443
+ typ: z.ZodLiteral<"function">;
1444
+ }, z.core.$strip>, z.ZodObject<{
1445
+ cpus: z.ZodOptional<z.ZodInt>;
1446
+ }, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
1447
+ typ: z.ZodLiteral<"queue">;
1448
+ }, z.core.$strip>, z.ZodObject<{
1449
+ foobar: z.ZodOptional<z.ZodString>;
1450
+ }, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
1451
+ typ: z.ZodLiteral<"proxy">;
1452
+ }, z.core.$strip>, z.ZodObject<{
1453
+ domain: z.ZodOptional<z.ZodString>;
1454
+ }, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
1455
+ typ: z.ZodLiteral<"vm">;
1456
+ }, z.core.$strip>, z.ZodObject<{
1457
+ os: z.ZodOptional<z.ZodString>;
1458
+ }, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
1459
+ typ: z.ZodLiteral<"scheduler">;
1460
+ }, z.core.$strip>, z.ZodObject<{
1461
+ url: z.ZodOptional<z.ZodString>;
1462
+ expression: z.ZodOptional<z.ZodString>;
1463
+ }, z.core.$strip>>]>>;
1464
+ }, z.core.$strip>>;
1465
+ }, z.core.$strip>;
1466
+ path: z.ZodObject<{
1467
+ versionUUID: z.ZodUUID;
1468
+ }, z.core.$strip>;
1469
+ query: z.ZodOptional<z.ZodNever>;
1470
+ }, z.core.$strip>;
1326
1471
  export declare const zRequestAccountPasswordResetData: z.ZodObject<{
1327
1472
  body: z.ZodOptional<z.ZodNever>;
1328
1473
  path: z.ZodOptional<z.ZodNever>;
@@ -2024,7 +2169,6 @@ export declare const zGetGraphOverviewResponse: z.ZodObject<{
2024
2169
  concurrency: z.ZodOptional<z.ZodInt>;
2025
2170
  allowUnauthenticated: z.ZodOptional<z.ZodBoolean>;
2026
2171
  uri: z.ZodString;
2027
- digest: z.ZodOptional<z.ZodString>;
2028
2172
  env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
2029
2173
  }, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
2030
2174
  typ: z.ZodLiteral<"cronjob">;
@@ -2170,7 +2314,6 @@ export declare const zUpdateGraphStateData: z.ZodObject<{
2170
2314
  concurrency: z.ZodOptional<z.ZodInt>;
2171
2315
  allowUnauthenticated: z.ZodOptional<z.ZodBoolean>;
2172
2316
  uri: z.ZodString;
2173
- digest: z.ZodOptional<z.ZodString>;
2174
2317
  env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
2175
2318
  }, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
2176
2319
  typ: z.ZodLiteral<"cronjob">;
@@ -372,7 +372,6 @@ export const zContainerNodeProps = z.object({
372
372
  concurrency: z.optional(z.int()),
373
373
  allowUnauthenticated: z.optional(z.boolean()),
374
374
  uri: z.string(),
375
- digest: z.optional(z.string()),
376
375
  env: z.optional(z.record(z.string(), z.string()))
377
376
  });
378
377
  export const zCronJobNodeProps = z.object({
@@ -581,6 +580,13 @@ export const zFetchGraphM2mData = z.object({
581
580
  * Graph fetched successfully.
582
581
  */
583
582
  export const zFetchGraphM2mResponse = zGraph;
583
+ export const zUpdateGraphM2mData = z.object({
584
+ body: zNodes,
585
+ path: z.object({
586
+ versionUUID: z.uuid()
587
+ }),
588
+ query: z.optional(z.never())
589
+ });
584
590
  export const zRequestAccountPasswordResetData = z.object({
585
591
  body: z.optional(z.never()),
586
592
  path: z.optional(z.never()),
@@ -1,12 +1,17 @@
1
1
  import { useMutation } from "@tanstack/react-query";
2
2
  import { GetSuccessResponse } from "../util";
3
- import { GetServiceHealthData, FetchGraphM2mData, 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, RecordCloudUsageData, RecordCloudUsageResponses, GetBillingPlanData, UpdateBillingPlanData, UpdateBillingPlanResponses, CreateSetupIntentData, CreateSetupIntentResponses, ListPaymentMethodsData, RemovePaymentMethodData, RemovePaymentMethodResponses, SetDefaultPaymentMethodData, SetDefaultPaymentMethodResponses, GetBillingUsageData, FetchBillingPricesData } from "../../sdk/types.gen";
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, 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>;
7
7
  export declare const useFetchGraphM2M: (options: Omit<FetchGraphM2mData, "url"> & {
8
8
  enabled?: boolean;
9
9
  }) => import("@tanstack/react-query").UseQueryResult<import("../../sdk/types.gen").Graph | undefined, Error>;
10
+ export declare const useUpdateGraphM2M: (config?: {
11
+ onSuccess?: (data: GetSuccessResponse<UpdateGraphM2mResponses>) => void;
12
+ onError?: Parameters<typeof useMutation>["0"]["onError"];
13
+ retry?: boolean;
14
+ }) => import("@tanstack/react-query").UseMutationResult<unknown, unknown, Omit<UpdateGraphM2mData, "url">, unknown>;
10
15
  export declare const useRequestAccountPasswordReset: (config?: {
11
16
  onSuccess?: (data: GetSuccessResponse<RequestAccountPasswordResetResponses>) => void;
12
17
  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, 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, 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 };
@@ -45,6 +45,25 @@ export const useFetchGraphM2M = (options) => {
45
45
  staleTime: 600000
46
46
  });
47
47
  };
48
+ export const useUpdateGraphM2M = (config) => {
49
+ const token = useToken();
50
+ const queryClient = useQueryClient();
51
+ const opts = { throwOnError: true, url: "/m2m/graph/{versionUUID}" };
52
+ const funcer = async (options) => {
53
+ const auth = isPromise(token) ? (await token) || "" : token || "";
54
+ const res = await updateGraphM2M({ ...opts, ...options, auth });
55
+ return res?.data;
56
+ };
57
+ return useMutation({
58
+ mutationFn: funcer,
59
+ onSuccess: (res, options, c, ctx) => {
60
+ queryClient.invalidateQueries({ queryKey: ["m2m", "graph", options?.path?.versionUUID] });
61
+ config?.onSuccess && config.onSuccess(res);
62
+ },
63
+ onError: config?.onError,
64
+ retry: config?.retry
65
+ });
66
+ };
48
67
  export const useRequestAccountPasswordReset = (config) => {
49
68
  const token = useToken();
50
69
  const queryClient = useQueryClient();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shoal-web-sdk",
3
- "version": "0.0.113",
3
+ "version": "0.0.115",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "build-hooks": "npx tsx tanstack-codegen/generator.ts",