shoal-web-sdk 0.0.142 → 0.0.144

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, CreateEnvironmentVariableData, CreateEnvironmentVariableError, CreateProjectData, CreateProjectError, CreateProjectResponse, CreateSetupIntentData, CreateSetupIntentError, CreateSetupIntentResponse, CreateSpaceData, CreateSpaceError, CreateSpaceInviteData, CreateSpaceInviteError, CreateSpaceInviteResponse, CreateSpaceResponse, CreateUsernameData, CreateUsernameError, DeleteAccountIdentityData, DeleteAccountIdentityError, DeleteAccountIdentityResponse, DeleteEnvironmentVariableData, DeleteEnvironmentVariableError, DeleteEnvironmentVariableResponse, DeployVersionData, DeployVersionError, FetchBillingPricesData, FetchGraphM2mData, FetchKindeOrganisationBillingAgreementsData, FetchNodeM2mData, GetBillingPlanData, GetBillingUsageData, GetConnectedAppUrlData, GetEnvironmentOverviewData, GetEnvironmentVariablesData, GetEnvironmentVersionsData, GetGraphOverviewData, GetProjectOverviewData, GetServiceHealthData, GetSpaceInvitesData, GetSpaceOrgCodeData, GetSpaceOverviewData, GetSpaceStatsData, 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, UpdateEnvironmentVariableData, UpdateEnvironmentVariableError, UpdateGraphM2mData, UpdateGraphM2mError, UpdateGraphStateData, UpdateGraphStateError, UpdateUsernameData, UpdateUsernameError, UpdateUserProfileData, UpdateUserProfileError, VersionStatusData } from '../types.gen';
3
+ import type { CreateEnvironmentData, CreateEnvironmentError, CreateEnvironmentResponse, CreateEnvironmentVariableData, CreateEnvironmentVariableError, CreateProjectData, CreateProjectError, CreateProjectResponse, CreateSetupIntentData, CreateSetupIntentError, CreateSetupIntentResponse, CreateSpaceData, CreateSpaceError, CreateSpaceInviteData, CreateSpaceInviteError, CreateSpaceInviteResponse, CreateSpaceResponse, CreateUsernameData, CreateUsernameError, DeleteAccountIdentityData, DeleteAccountIdentityError, DeleteAccountIdentityResponse, DeleteEnvironmentVariableData, DeleteEnvironmentVariableError, DeleteEnvironmentVariableResponse, DeployVersionData, DeployVersionError, FetchBillingPricesData, FetchGraphM2mData, FetchKindeOrganisationBillingAgreementsData, FetchNodeM2mData, GetBillingPlanData, GetBillingUsageData, GetConnectedAppUrlData, GetEnvironmentOverviewData, GetEnvironmentVariablesData, GetEnvironmentVersionsData, GetGraphOverviewData, GetProjectOverviewData, GetServiceHealthData, GetSpaceInvitesData, GetSpaceOrgCodeData, GetSpaceOverviewData, GetSpaceStatsData, 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, UpdateEnvironmentVariableData, UpdateEnvironmentVariableError, UpdateGraphM2mData, UpdateGraphM2mError, UpdateGraphStateData, UpdateGraphStateError, UpdateNodeM2mData, UpdateNodeM2mError, UpdateNodeM2mResponse, 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;
@@ -96,6 +96,10 @@ export declare const fetchNodeM2mOptions: (options: Options<FetchNodeM2mData>) =
96
96
  [dataTagErrorSymbol]: Error;
97
97
  };
98
98
  };
99
+ /**
100
+ * Update a node by id with its props for M2M.
101
+ */
102
+ export declare const updateNodeM2mMutation: (options?: Partial<Options<UpdateNodeM2mData>>) => UseMutationOptions<UpdateNodeM2mResponse, UpdateNodeM2mError, Options<UpdateNodeM2mData>>;
99
103
  /**
100
104
  * This will submit a password reset request requiring the user to reset their password on next sign in.
101
105
  */
@@ -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, createEnvironmentVariable, createProject, createSetupIntent, createSpace, createSpaceInvite, createUsername, deleteAccountIdentity, deleteEnvironmentVariable, deployVersion, fetchBillingPrices, fetchGraphM2M, fetchKindeOrganisationBillingAgreements, fetchNodeM2M, getBillingPlan, getBillingUsage, getConnectedAppUrl, getEnvironmentOverview, getEnvironmentVariables, getEnvironmentVersions, getGraphOverview, getProjectOverview, getServiceHealth, getSpaceInvites, getSpaceOrgCode, getSpaceOverview, getSpaceStats, getUserIdentities, getUserInvites, getUserProfile, joinSpace, leaveSpace, listBillingInvoices, listInstallationBranches, listInstallationRepositories, listPaymentMethods, listSpaceMemberRoles, listSpaceMembers, listUserInstallations, listUserSpaces, recordCloudUsage, recordOnboardingAnalytics, rejectSpaceInvite, removePaymentMethod, requestAccountPasswordReset, requestSignedUploadUrl, revokeSpaceInvite, setDefaultPaymentMethod, updateBillingPlan, updateConnectedAppToken, updateEnvironmentVariable, updateGraphM2M, updateGraphState, updateUsername, updateUserProfile, versionStatus } from '../sdk.gen';
4
+ import { createEnvironment, createEnvironmentVariable, createProject, createSetupIntent, createSpace, createSpaceInvite, createUsername, deleteAccountIdentity, deleteEnvironmentVariable, deployVersion, fetchBillingPrices, fetchGraphM2M, fetchKindeOrganisationBillingAgreements, fetchNodeM2M, getBillingPlan, getBillingUsage, getConnectedAppUrl, getEnvironmentOverview, getEnvironmentVariables, getEnvironmentVersions, getGraphOverview, getProjectOverview, getServiceHealth, getSpaceInvites, getSpaceOrgCode, getSpaceOverview, getSpaceStats, getUserIdentities, getUserInvites, getUserProfile, joinSpace, leaveSpace, listBillingInvoices, listInstallationBranches, listInstallationRepositories, listPaymentMethods, listSpaceMemberRoles, listSpaceMembers, listUserInstallations, listUserSpaces, recordCloudUsage, recordOnboardingAnalytics, rejectSpaceInvite, removePaymentMethod, requestAccountPasswordReset, requestSignedUploadUrl, revokeSpaceInvite, setDefaultPaymentMethod, updateBillingPlan, updateConnectedAppToken, updateEnvironmentVariable, updateGraphM2M, updateGraphState, updateNodeM2M, 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) {
@@ -96,6 +96,22 @@ export const fetchNodeM2mOptions = (options) => {
96
96
  queryKey: fetchNodeM2mQueryKey(options)
97
97
  });
98
98
  };
99
+ /**
100
+ * Update a node by id with its props for M2M.
101
+ */
102
+ export const updateNodeM2mMutation = (options) => {
103
+ const mutationOptions = {
104
+ mutationFn: async (fnOptions) => {
105
+ const { data } = await updateNodeM2M({
106
+ ...options,
107
+ ...fnOptions,
108
+ throwOnError: true
109
+ });
110
+ return data;
111
+ }
112
+ };
113
+ return mutationOptions;
114
+ };
99
115
  /**
100
116
  * This will submit a password reset request requiring the user to reset their password on next sign in.
101
117
  */
@@ -1,5 +1,5 @@
1
1
  import type { Client, Options as Options2, TDataShape } from './client';
2
- import type { CreateEnvironmentData, CreateEnvironmentErrors, CreateEnvironmentResponses, CreateEnvironmentVariableData, CreateEnvironmentVariableErrors, CreateEnvironmentVariableResponses, CreateProjectData, CreateProjectErrors, CreateProjectResponses, CreateSetupIntentData, CreateSetupIntentErrors, CreateSetupIntentResponses, CreateSpaceData, CreateSpaceErrors, CreateSpaceInviteData, CreateSpaceInviteErrors, CreateSpaceInviteResponses, CreateSpaceResponses, CreateUsernameData, CreateUsernameErrors, CreateUsernameResponses, DeleteAccountIdentityData, DeleteAccountIdentityErrors, DeleteAccountIdentityResponses, DeleteEnvironmentVariableData, DeleteEnvironmentVariableErrors, DeleteEnvironmentVariableResponses, DeployVersionData, DeployVersionErrors, DeployVersionResponses, FetchBillingPricesData, FetchBillingPricesErrors, FetchBillingPricesResponses, FetchGraphM2mData, FetchGraphM2mErrors, FetchGraphM2mResponses, FetchKindeOrganisationBillingAgreementsData, FetchKindeOrganisationBillingAgreementsErrors, FetchKindeOrganisationBillingAgreementsResponses, FetchNodeM2mData, FetchNodeM2mErrors, FetchNodeM2mResponses, GetBillingPlanData, GetBillingPlanErrors, GetBillingPlanResponses, GetBillingUsageData, GetBillingUsageErrors, GetBillingUsageResponses, GetConnectedAppUrlData, GetConnectedAppUrlErrors, GetConnectedAppUrlResponses, GetEnvironmentOverviewData, GetEnvironmentOverviewErrors, GetEnvironmentOverviewResponses, GetEnvironmentVariablesData, GetEnvironmentVariablesErrors, GetEnvironmentVariablesResponses, GetEnvironmentVersionsData, GetEnvironmentVersionsResponses, GetGraphOverviewData, GetGraphOverviewErrors, GetGraphOverviewResponses, GetProjectOverviewData, GetProjectOverviewErrors, GetProjectOverviewResponses, GetServiceHealthData, GetServiceHealthResponses, GetSpaceInvitesData, GetSpaceInvitesErrors, GetSpaceInvitesResponses, GetSpaceOrgCodeData, GetSpaceOrgCodeErrors, GetSpaceOrgCodeResponses, GetSpaceOverviewData, GetSpaceOverviewErrors, GetSpaceOverviewResponses, GetSpaceStatsData, GetSpaceStatsErrors, GetSpaceStatsResponses, 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, UpdateEnvironmentVariableData, UpdateEnvironmentVariableErrors, UpdateEnvironmentVariableResponses, UpdateGraphM2mData, UpdateGraphM2mErrors, UpdateGraphM2mResponses, UpdateGraphStateData, UpdateGraphStateErrors, UpdateGraphStateResponses, UpdateUsernameData, UpdateUsernameErrors, UpdateUsernameResponses, UpdateUserProfileData, UpdateUserProfileErrors, UpdateUserProfileResponses, VersionStatusData, VersionStatusErrors, VersionStatusResponses } from './types.gen';
2
+ import type { CreateEnvironmentData, CreateEnvironmentErrors, CreateEnvironmentResponses, CreateEnvironmentVariableData, CreateEnvironmentVariableErrors, CreateEnvironmentVariableResponses, CreateProjectData, CreateProjectErrors, CreateProjectResponses, CreateSetupIntentData, CreateSetupIntentErrors, CreateSetupIntentResponses, CreateSpaceData, CreateSpaceErrors, CreateSpaceInviteData, CreateSpaceInviteErrors, CreateSpaceInviteResponses, CreateSpaceResponses, CreateUsernameData, CreateUsernameErrors, CreateUsernameResponses, DeleteAccountIdentityData, DeleteAccountIdentityErrors, DeleteAccountIdentityResponses, DeleteEnvironmentVariableData, DeleteEnvironmentVariableErrors, DeleteEnvironmentVariableResponses, DeployVersionData, DeployVersionErrors, DeployVersionResponses, FetchBillingPricesData, FetchBillingPricesErrors, FetchBillingPricesResponses, FetchGraphM2mData, FetchGraphM2mErrors, FetchGraphM2mResponses, FetchKindeOrganisationBillingAgreementsData, FetchKindeOrganisationBillingAgreementsErrors, FetchKindeOrganisationBillingAgreementsResponses, FetchNodeM2mData, FetchNodeM2mErrors, FetchNodeM2mResponses, GetBillingPlanData, GetBillingPlanErrors, GetBillingPlanResponses, GetBillingUsageData, GetBillingUsageErrors, GetBillingUsageResponses, GetConnectedAppUrlData, GetConnectedAppUrlErrors, GetConnectedAppUrlResponses, GetEnvironmentOverviewData, GetEnvironmentOverviewErrors, GetEnvironmentOverviewResponses, GetEnvironmentVariablesData, GetEnvironmentVariablesErrors, GetEnvironmentVariablesResponses, GetEnvironmentVersionsData, GetEnvironmentVersionsResponses, GetGraphOverviewData, GetGraphOverviewErrors, GetGraphOverviewResponses, GetProjectOverviewData, GetProjectOverviewErrors, GetProjectOverviewResponses, GetServiceHealthData, GetServiceHealthResponses, GetSpaceInvitesData, GetSpaceInvitesErrors, GetSpaceInvitesResponses, GetSpaceOrgCodeData, GetSpaceOrgCodeErrors, GetSpaceOrgCodeResponses, GetSpaceOverviewData, GetSpaceOverviewErrors, GetSpaceOverviewResponses, GetSpaceStatsData, GetSpaceStatsErrors, GetSpaceStatsResponses, 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, UpdateEnvironmentVariableData, UpdateEnvironmentVariableErrors, UpdateEnvironmentVariableResponses, UpdateGraphM2mData, UpdateGraphM2mErrors, UpdateGraphM2mResponses, UpdateGraphStateData, UpdateGraphStateErrors, UpdateGraphStateResponses, UpdateNodeM2mData, UpdateNodeM2mErrors, UpdateNodeM2mResponses, 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
@@ -29,6 +29,10 @@ export declare const updateGraphM2M: <ThrowOnError extends boolean = false>(opti
29
29
  * Fetch a node by id with its props for M2M.
30
30
  */
31
31
  export declare const fetchNodeM2M: <ThrowOnError extends boolean = false>(options: Options<FetchNodeM2mData, ThrowOnError>) => import("./client").RequestResult<FetchNodeM2mResponses, FetchNodeM2mErrors, ThrowOnError, "fields">;
32
+ /**
33
+ * Update a node by id with its props for M2M.
34
+ */
35
+ export declare const updateNodeM2M: <ThrowOnError extends boolean = false>(options: Options<UpdateNodeM2mData, ThrowOnError>) => import("./client").RequestResult<UpdateNodeM2mResponses, UpdateNodeM2mErrors, ThrowOnError, "fields">;
32
36
  /**
33
37
  * This will submit a password reset request requiring the user to reset their password on next sign in.
34
38
  */
@@ -64,6 +64,25 @@ export const fetchNodeM2M = (options) => {
64
64
  ...options
65
65
  });
66
66
  };
67
+ /**
68
+ * Update a node by id with its props for M2M.
69
+ */
70
+ export const updateNodeM2M = (options) => {
71
+ return (options.client ?? client).put({
72
+ security: [
73
+ {
74
+ scheme: 'bearer',
75
+ type: 'http'
76
+ }
77
+ ],
78
+ url: '/m2m/graph/{versionUUID}/nodes/{nodeUUID}',
79
+ ...options,
80
+ headers: {
81
+ 'Content-Type': 'application/json',
82
+ ...options.headers
83
+ }
84
+ });
85
+ };
67
86
  /**
68
87
  * This will submit a password reset request requiring the user to reset their password on next sign in.
69
88
  */
@@ -311,9 +311,9 @@ export type Edge = {
311
311
  dst: string;
312
312
  typ: EdgeType;
313
313
  props?: ({
314
- typ: 'comment';
314
+ typ: 'network';
315
315
  } & NetworkEdgeProps) | ({
316
- typ: 'cache';
316
+ typ: 'route';
317
317
  } & RouteEdgeProps);
318
318
  };
319
319
  export type NetworkEdgeProps = {
@@ -766,6 +766,51 @@ export type FetchNodeM2mResponses = {
766
766
  200: Node;
767
767
  };
768
768
  export type FetchNodeM2mResponse = FetchNodeM2mResponses[keyof FetchNodeM2mResponses];
769
+ export type UpdateNodeM2mData = {
770
+ body: Node;
771
+ path: {
772
+ /**
773
+ * A version UUID.
774
+ */
775
+ versionUUID: string;
776
+ /**
777
+ * The node ID this source ZIP is associated with.
778
+ */
779
+ nodeUUID: string;
780
+ };
781
+ query?: never;
782
+ url: '/m2m/graph/{versionUUID}/nodes/{nodeUUID}';
783
+ };
784
+ export type UpdateNodeM2mErrors = {
785
+ /**
786
+ * Invalid request parameters.
787
+ */
788
+ 400: ErrorResponse;
789
+ /**
790
+ * Unauthorised user.
791
+ */
792
+ 401: ErrorResponse;
793
+ /**
794
+ * Invalid credentials.
795
+ */
796
+ 403: ErrorResponse;
797
+ /**
798
+ * Related content not found.
799
+ */
800
+ 404: ErrorResponse;
801
+ /**
802
+ * Unexpected error.
803
+ */
804
+ 500: ErrorResponse;
805
+ };
806
+ export type UpdateNodeM2mError = UpdateNodeM2mErrors[keyof UpdateNodeM2mErrors];
807
+ export type UpdateNodeM2mResponses = {
808
+ /**
809
+ * Node fetched successfully.
810
+ */
811
+ 200: Node;
812
+ };
813
+ export type UpdateNodeM2mResponse = UpdateNodeM2mResponses[keyof UpdateNodeM2mResponses];
769
814
  export type RequestAccountPasswordResetData = {
770
815
  body?: never;
771
816
  path?: never;
@@ -504,11 +504,11 @@ export declare const zEdge: z.ZodObject<{
504
504
  route: "route";
505
505
  }>;
506
506
  props: z.ZodOptional<z.ZodUnion<readonly [z.ZodIntersection<z.ZodObject<{
507
- typ: z.ZodLiteral<"comment">;
507
+ typ: z.ZodLiteral<"network">;
508
508
  }, z.core.$strip>, z.ZodObject<{
509
509
  a: z.ZodOptional<z.ZodString>;
510
510
  }, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
511
- typ: z.ZodLiteral<"cache">;
511
+ typ: z.ZodLiteral<"route">;
512
512
  }, z.core.$strip>, z.ZodObject<{
513
513
  path: z.ZodOptional<z.ZodString>;
514
514
  }, z.core.$strip>>]>>;
@@ -636,11 +636,11 @@ export declare const zNode: z.ZodObject<{
636
636
  route: "route";
637
637
  }>;
638
638
  props: z.ZodOptional<z.ZodUnion<readonly [z.ZodIntersection<z.ZodObject<{
639
- typ: z.ZodLiteral<"comment">;
639
+ typ: z.ZodLiteral<"network">;
640
640
  }, z.core.$strip>, z.ZodObject<{
641
641
  a: z.ZodOptional<z.ZodString>;
642
642
  }, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
643
- typ: z.ZodLiteral<"cache">;
643
+ typ: z.ZodLiteral<"route">;
644
644
  }, z.core.$strip>, z.ZodObject<{
645
645
  path: z.ZodOptional<z.ZodString>;
646
646
  }, z.core.$strip>>]>>;
@@ -755,11 +755,11 @@ export declare const zNodes: z.ZodObject<{
755
755
  route: "route";
756
756
  }>;
757
757
  props: z.ZodOptional<z.ZodUnion<readonly [z.ZodIntersection<z.ZodObject<{
758
- typ: z.ZodLiteral<"comment">;
758
+ typ: z.ZodLiteral<"network">;
759
759
  }, z.core.$strip>, z.ZodObject<{
760
760
  a: z.ZodOptional<z.ZodString>;
761
761
  }, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
762
- typ: z.ZodLiteral<"cache">;
762
+ typ: z.ZodLiteral<"route">;
763
763
  }, z.core.$strip>, z.ZodObject<{
764
764
  path: z.ZodOptional<z.ZodString>;
765
765
  }, z.core.$strip>>]>>;
@@ -876,11 +876,11 @@ export declare const zGraph: z.ZodObject<{
876
876
  route: "route";
877
877
  }>;
878
878
  props: z.ZodOptional<z.ZodUnion<readonly [z.ZodIntersection<z.ZodObject<{
879
- typ: z.ZodLiteral<"comment">;
879
+ typ: z.ZodLiteral<"network">;
880
880
  }, z.core.$strip>, z.ZodObject<{
881
881
  a: z.ZodOptional<z.ZodString>;
882
882
  }, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
883
- typ: z.ZodLiteral<"cache">;
883
+ typ: z.ZodLiteral<"route">;
884
884
  }, z.core.$strip>, z.ZodObject<{
885
885
  path: z.ZodOptional<z.ZodString>;
886
886
  }, z.core.$strip>>]>>;
@@ -1210,11 +1210,11 @@ export declare const zFetchGraphM2mResponse: z.ZodObject<{
1210
1210
  route: "route";
1211
1211
  }>;
1212
1212
  props: z.ZodOptional<z.ZodUnion<readonly [z.ZodIntersection<z.ZodObject<{
1213
- typ: z.ZodLiteral<"comment">;
1213
+ typ: z.ZodLiteral<"network">;
1214
1214
  }, z.core.$strip>, z.ZodObject<{
1215
1215
  a: z.ZodOptional<z.ZodString>;
1216
1216
  }, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
1217
- typ: z.ZodLiteral<"cache">;
1217
+ typ: z.ZodLiteral<"route">;
1218
1218
  }, z.core.$strip>, z.ZodObject<{
1219
1219
  path: z.ZodOptional<z.ZodString>;
1220
1220
  }, z.core.$strip>>]>>;
@@ -1331,11 +1331,11 @@ export declare const zUpdateGraphM2mData: z.ZodObject<{
1331
1331
  route: "route";
1332
1332
  }>;
1333
1333
  props: z.ZodOptional<z.ZodUnion<readonly [z.ZodIntersection<z.ZodObject<{
1334
- typ: z.ZodLiteral<"comment">;
1334
+ typ: z.ZodLiteral<"network">;
1335
1335
  }, z.core.$strip>, z.ZodObject<{
1336
1336
  a: z.ZodOptional<z.ZodString>;
1337
1337
  }, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
1338
- typ: z.ZodLiteral<"cache">;
1338
+ typ: z.ZodLiteral<"route">;
1339
1339
  }, z.core.$strip>, z.ZodObject<{
1340
1340
  path: z.ZodOptional<z.ZodString>;
1341
1341
  }, z.core.$strip>>]>>;
@@ -1466,11 +1466,257 @@ export declare const zFetchNodeM2mResponse: z.ZodObject<{
1466
1466
  route: "route";
1467
1467
  }>;
1468
1468
  props: z.ZodOptional<z.ZodUnion<readonly [z.ZodIntersection<z.ZodObject<{
1469
- typ: z.ZodLiteral<"comment">;
1469
+ typ: z.ZodLiteral<"network">;
1470
1470
  }, z.core.$strip>, z.ZodObject<{
1471
1471
  a: z.ZodOptional<z.ZodString>;
1472
+ }, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
1473
+ typ: z.ZodLiteral<"route">;
1474
+ }, z.core.$strip>, z.ZodObject<{
1475
+ path: z.ZodOptional<z.ZodString>;
1476
+ }, z.core.$strip>>]>>;
1477
+ }, z.core.$strip>>>;
1478
+ typ: z.ZodEnum<{
1479
+ function: "function";
1480
+ cache: "cache";
1481
+ comment: "comment";
1482
+ container: "container";
1483
+ cronjob: "cronjob";
1484
+ database: "database";
1485
+ queue: "queue";
1486
+ proxy: "proxy";
1487
+ vm: "vm";
1488
+ scheduler: "scheduler";
1489
+ }>;
1490
+ props: z.ZodOptional<z.ZodUnion<readonly [z.ZodIntersection<z.ZodObject<{
1491
+ typ: z.ZodLiteral<"comment">;
1492
+ }, z.core.$strip>, z.ZodObject<{
1493
+ comment: z.ZodOptional<z.ZodString>;
1494
+ }, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
1495
+ typ: z.ZodLiteral<"cache">;
1496
+ }, z.core.$strip>, z.ZodObject<{
1497
+ size: z.ZodOptional<z.ZodInt>;
1498
+ }, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
1499
+ typ: z.ZodLiteral<"container">;
1500
+ }, z.core.$strip>, z.ZodObject<{
1501
+ region: z.ZodEnum<{
1502
+ "europe-west2": "europe-west2";
1503
+ }>;
1504
+ port: z.ZodInt;
1505
+ cpu: z.ZodEnum<{
1506
+ 1: "1";
1507
+ 2: "2";
1508
+ }>;
1509
+ memory: z.ZodEnum<{
1510
+ "512Mi": "512Mi";
1511
+ "1Gi": "1Gi";
1512
+ "2Gi": "2Gi";
1513
+ }>;
1514
+ ingress: z.ZodEnum<{
1515
+ INGRESS_TRAFFIC_ALL: "INGRESS_TRAFFIC_ALL";
1516
+ INGRESS_TRAFFIC_INTERNAL_ONLY: "INGRESS_TRAFFIC_INTERNAL_ONLY";
1517
+ INGRESS_TRAFFIC_INTERNAL_LOAD_BALANCER: "INGRESS_TRAFFIC_INTERNAL_LOAD_BALANCER";
1518
+ }>;
1519
+ timeoutSeconds: z.ZodOptional<z.ZodInt>;
1520
+ maxInstances: z.ZodOptional<z.ZodInt>;
1521
+ minInstances: z.ZodOptional<z.ZodInt>;
1522
+ concurrency: z.ZodOptional<z.ZodInt>;
1523
+ allowUnauthenticated: z.ZodOptional<z.ZodBoolean>;
1524
+ uri: z.ZodOptional<z.ZodString>;
1525
+ installationId: z.ZodOptional<z.ZodString>;
1526
+ env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1527
+ }, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
1528
+ typ: z.ZodLiteral<"cronjob">;
1529
+ }, z.core.$strip>, z.ZodObject<{
1530
+ cronTab: z.ZodOptional<z.ZodString>;
1531
+ }, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
1532
+ typ: z.ZodLiteral<"database">;
1533
+ }, z.core.$strip>, z.ZodObject<{
1534
+ space: z.ZodOptional<z.ZodInt>;
1535
+ }, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
1536
+ typ: z.ZodLiteral<"function">;
1537
+ }, z.core.$strip>, z.ZodObject<{
1538
+ cpus: z.ZodOptional<z.ZodInt>;
1539
+ }, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
1540
+ typ: z.ZodLiteral<"queue">;
1541
+ }, z.core.$strip>, z.ZodObject<{
1542
+ foobar: z.ZodOptional<z.ZodString>;
1543
+ }, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
1544
+ typ: z.ZodLiteral<"proxy">;
1545
+ }, z.core.$strip>, z.ZodObject<{
1546
+ subdomain: z.ZodOptional<z.ZodString>;
1547
+ }, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
1548
+ typ: z.ZodLiteral<"vm">;
1549
+ }, z.core.$strip>, z.ZodObject<{
1550
+ os: z.ZodOptional<z.ZodString>;
1551
+ }, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
1552
+ typ: z.ZodLiteral<"scheduler">;
1553
+ }, z.core.$strip>, z.ZodObject<{
1554
+ expression: z.ZodString;
1555
+ timezone: z.ZodString;
1556
+ requestMethod: z.ZodEnum<{
1557
+ DELETE: "DELETE";
1558
+ GET: "GET";
1559
+ HEAD: "HEAD";
1560
+ OPTIONS: "OPTIONS";
1561
+ PATCH: "PATCH";
1562
+ POST: "POST";
1563
+ PUT: "PUT";
1564
+ }>;
1565
+ requestPayload: z.ZodOptional<z.ZodString>;
1566
+ requestHeaders: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1567
+ paused: z.ZodBoolean;
1568
+ }, z.core.$strip>>]>>;
1569
+ }, z.core.$strip>;
1570
+ export declare const zUpdateNodeM2mData: z.ZodObject<{
1571
+ body: z.ZodObject<{
1572
+ id: z.ZodUUID;
1573
+ name: z.ZodOptional<z.ZodString>;
1574
+ description: z.ZodOptional<z.ZodString>;
1575
+ x: z.ZodNumber;
1576
+ y: z.ZodNumber;
1577
+ width: z.ZodInt;
1578
+ height: z.ZodInt;
1579
+ edges: z.ZodOptional<z.ZodArray<z.ZodObject<{
1580
+ id: z.ZodUUID;
1581
+ src: z.ZodUUID;
1582
+ dst: z.ZodUUID;
1583
+ typ: z.ZodEnum<{
1584
+ network: "network";
1585
+ route: "route";
1586
+ }>;
1587
+ props: z.ZodOptional<z.ZodUnion<readonly [z.ZodIntersection<z.ZodObject<{
1588
+ typ: z.ZodLiteral<"network">;
1589
+ }, z.core.$strip>, z.ZodObject<{
1590
+ a: z.ZodOptional<z.ZodString>;
1591
+ }, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
1592
+ typ: z.ZodLiteral<"route">;
1593
+ }, z.core.$strip>, z.ZodObject<{
1594
+ path: z.ZodOptional<z.ZodString>;
1595
+ }, z.core.$strip>>]>>;
1596
+ }, z.core.$strip>>>;
1597
+ typ: z.ZodEnum<{
1598
+ function: "function";
1599
+ cache: "cache";
1600
+ comment: "comment";
1601
+ container: "container";
1602
+ cronjob: "cronjob";
1603
+ database: "database";
1604
+ queue: "queue";
1605
+ proxy: "proxy";
1606
+ vm: "vm";
1607
+ scheduler: "scheduler";
1608
+ }>;
1609
+ props: z.ZodOptional<z.ZodUnion<readonly [z.ZodIntersection<z.ZodObject<{
1610
+ typ: z.ZodLiteral<"comment">;
1611
+ }, z.core.$strip>, z.ZodObject<{
1612
+ comment: z.ZodOptional<z.ZodString>;
1472
1613
  }, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
1473
1614
  typ: z.ZodLiteral<"cache">;
1615
+ }, z.core.$strip>, z.ZodObject<{
1616
+ size: z.ZodOptional<z.ZodInt>;
1617
+ }, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
1618
+ typ: z.ZodLiteral<"container">;
1619
+ }, z.core.$strip>, z.ZodObject<{
1620
+ region: z.ZodEnum<{
1621
+ "europe-west2": "europe-west2";
1622
+ }>;
1623
+ port: z.ZodInt;
1624
+ cpu: z.ZodEnum<{
1625
+ 1: "1";
1626
+ 2: "2";
1627
+ }>;
1628
+ memory: z.ZodEnum<{
1629
+ "512Mi": "512Mi";
1630
+ "1Gi": "1Gi";
1631
+ "2Gi": "2Gi";
1632
+ }>;
1633
+ ingress: z.ZodEnum<{
1634
+ INGRESS_TRAFFIC_ALL: "INGRESS_TRAFFIC_ALL";
1635
+ INGRESS_TRAFFIC_INTERNAL_ONLY: "INGRESS_TRAFFIC_INTERNAL_ONLY";
1636
+ INGRESS_TRAFFIC_INTERNAL_LOAD_BALANCER: "INGRESS_TRAFFIC_INTERNAL_LOAD_BALANCER";
1637
+ }>;
1638
+ timeoutSeconds: z.ZodOptional<z.ZodInt>;
1639
+ maxInstances: z.ZodOptional<z.ZodInt>;
1640
+ minInstances: z.ZodOptional<z.ZodInt>;
1641
+ concurrency: z.ZodOptional<z.ZodInt>;
1642
+ allowUnauthenticated: z.ZodOptional<z.ZodBoolean>;
1643
+ uri: z.ZodOptional<z.ZodString>;
1644
+ installationId: z.ZodOptional<z.ZodString>;
1645
+ env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1646
+ }, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
1647
+ typ: z.ZodLiteral<"cronjob">;
1648
+ }, z.core.$strip>, z.ZodObject<{
1649
+ cronTab: z.ZodOptional<z.ZodString>;
1650
+ }, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
1651
+ typ: z.ZodLiteral<"database">;
1652
+ }, z.core.$strip>, z.ZodObject<{
1653
+ space: z.ZodOptional<z.ZodInt>;
1654
+ }, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
1655
+ typ: z.ZodLiteral<"function">;
1656
+ }, z.core.$strip>, z.ZodObject<{
1657
+ cpus: z.ZodOptional<z.ZodInt>;
1658
+ }, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
1659
+ typ: z.ZodLiteral<"queue">;
1660
+ }, z.core.$strip>, z.ZodObject<{
1661
+ foobar: z.ZodOptional<z.ZodString>;
1662
+ }, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
1663
+ typ: z.ZodLiteral<"proxy">;
1664
+ }, z.core.$strip>, z.ZodObject<{
1665
+ subdomain: z.ZodOptional<z.ZodString>;
1666
+ }, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
1667
+ typ: z.ZodLiteral<"vm">;
1668
+ }, z.core.$strip>, z.ZodObject<{
1669
+ os: z.ZodOptional<z.ZodString>;
1670
+ }, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
1671
+ typ: z.ZodLiteral<"scheduler">;
1672
+ }, z.core.$strip>, z.ZodObject<{
1673
+ expression: z.ZodString;
1674
+ timezone: z.ZodString;
1675
+ requestMethod: z.ZodEnum<{
1676
+ DELETE: "DELETE";
1677
+ GET: "GET";
1678
+ HEAD: "HEAD";
1679
+ OPTIONS: "OPTIONS";
1680
+ PATCH: "PATCH";
1681
+ POST: "POST";
1682
+ PUT: "PUT";
1683
+ }>;
1684
+ requestPayload: z.ZodOptional<z.ZodString>;
1685
+ requestHeaders: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1686
+ paused: z.ZodBoolean;
1687
+ }, z.core.$strip>>]>>;
1688
+ }, z.core.$strip>;
1689
+ path: z.ZodObject<{
1690
+ versionUUID: z.ZodUUID;
1691
+ nodeUUID: z.ZodUUID;
1692
+ }, z.core.$strip>;
1693
+ query: z.ZodOptional<z.ZodNever>;
1694
+ }, z.core.$strip>;
1695
+ /**
1696
+ * Node fetched successfully.
1697
+ */
1698
+ export declare const zUpdateNodeM2mResponse: z.ZodObject<{
1699
+ id: z.ZodUUID;
1700
+ name: z.ZodOptional<z.ZodString>;
1701
+ description: z.ZodOptional<z.ZodString>;
1702
+ x: z.ZodNumber;
1703
+ y: z.ZodNumber;
1704
+ width: z.ZodInt;
1705
+ height: z.ZodInt;
1706
+ edges: z.ZodOptional<z.ZodArray<z.ZodObject<{
1707
+ id: z.ZodUUID;
1708
+ src: z.ZodUUID;
1709
+ dst: z.ZodUUID;
1710
+ typ: z.ZodEnum<{
1711
+ network: "network";
1712
+ route: "route";
1713
+ }>;
1714
+ props: z.ZodOptional<z.ZodUnion<readonly [z.ZodIntersection<z.ZodObject<{
1715
+ typ: z.ZodLiteral<"network">;
1716
+ }, z.core.$strip>, z.ZodObject<{
1717
+ a: z.ZodOptional<z.ZodString>;
1718
+ }, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
1719
+ typ: z.ZodLiteral<"route">;
1474
1720
  }, z.core.$strip>, z.ZodObject<{
1475
1721
  path: z.ZodOptional<z.ZodString>;
1476
1722
  }, z.core.$strip>>]>>;
@@ -2311,11 +2557,11 @@ export declare const zGetGraphOverviewResponse: z.ZodObject<{
2311
2557
  route: "route";
2312
2558
  }>;
2313
2559
  props: z.ZodOptional<z.ZodUnion<readonly [z.ZodIntersection<z.ZodObject<{
2314
- typ: z.ZodLiteral<"comment">;
2560
+ typ: z.ZodLiteral<"network">;
2315
2561
  }, z.core.$strip>, z.ZodObject<{
2316
2562
  a: z.ZodOptional<z.ZodString>;
2317
2563
  }, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
2318
- typ: z.ZodLiteral<"cache">;
2564
+ typ: z.ZodLiteral<"route">;
2319
2565
  }, z.core.$strip>, z.ZodObject<{
2320
2566
  path: z.ZodOptional<z.ZodString>;
2321
2567
  }, z.core.$strip>>]>>;
@@ -2432,11 +2678,11 @@ export declare const zUpdateGraphStateData: z.ZodObject<{
2432
2678
  route: "route";
2433
2679
  }>;
2434
2680
  props: z.ZodOptional<z.ZodUnion<readonly [z.ZodIntersection<z.ZodObject<{
2435
- typ: z.ZodLiteral<"comment">;
2681
+ typ: z.ZodLiteral<"network">;
2436
2682
  }, z.core.$strip>, z.ZodObject<{
2437
2683
  a: z.ZodOptional<z.ZodString>;
2438
2684
  }, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
2439
- typ: z.ZodLiteral<"cache">;
2685
+ typ: z.ZodLiteral<"route">;
2440
2686
  }, z.core.$strip>, z.ZodObject<{
2441
2687
  path: z.ZodOptional<z.ZodString>;
2442
2688
  }, z.core.$strip>>]>>;
@@ -324,10 +324,10 @@ export const zEdge = z.object({
324
324
  typ: zEdgeType,
325
325
  props: z.optional(z.union([
326
326
  z.object({
327
- typ: z.literal('comment')
327
+ typ: z.literal('network')
328
328
  }).and(zNetworkEdgeProps),
329
329
  z.object({
330
- typ: z.literal('cache')
330
+ typ: z.literal('route')
331
331
  }).and(zRouteEdgeProps)
332
332
  ]))
333
333
  });
@@ -665,6 +665,18 @@ export const zFetchNodeM2mData = z.object({
665
665
  * Node fetched successfully.
666
666
  */
667
667
  export const zFetchNodeM2mResponse = zNode;
668
+ export const zUpdateNodeM2mData = z.object({
669
+ body: zNode,
670
+ path: z.object({
671
+ versionUUID: z.uuid(),
672
+ nodeUUID: z.uuid()
673
+ }),
674
+ query: z.optional(z.never())
675
+ });
676
+ /**
677
+ * Node fetched successfully.
678
+ */
679
+ export const zUpdateNodeM2mResponse = zNode;
668
680
  export const zRequestAccountPasswordResetData = z.object({
669
681
  body: z.optional(z.never()),
670
682
  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, RecordOnboardingAnalyticsData, RecordOnboardingAnalyticsResponses, CreateSpaceData, CreateSpaceResponses, GetUserInvitesData, JoinSpaceData, JoinSpaceResponses, RejectSpaceInviteData, RejectSpaceInviteResponses, GetSpaceOverviewData, GetSpaceOrgCodeData, GetSpaceStatsData, FetchKindeOrganisationBillingAgreementsData, GetSpaceInvitesData, CreateSpaceInviteData, CreateSpaceInviteResponses, RevokeSpaceInviteData, RevokeSpaceInviteResponses, ListSpaceMembersData, ListSpaceMemberRolesData, LeaveSpaceData, LeaveSpaceResponses, CreateProjectData, CreateProjectResponses, GetProjectOverviewData, CreateEnvironmentData, CreateEnvironmentResponses, GetEnvironmentOverviewData, GetEnvironmentVersionsData, DeleteEnvironmentVariableData, DeleteEnvironmentVariableResponses, GetEnvironmentVariablesData, UpdateEnvironmentVariableData, UpdateEnvironmentVariableResponses, CreateEnvironmentVariableData, CreateEnvironmentVariableResponses, 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";
3
+ import { GetServiceHealthData, FetchGraphM2mData, UpdateGraphM2mData, UpdateGraphM2mResponses, FetchNodeM2mData, UpdateNodeM2mData, UpdateNodeM2mResponses, RequestAccountPasswordResetData, RequestAccountPasswordResetResponses, UpdateUsernameData, UpdateUsernameResponses, CreateUsernameData, CreateUsernameResponses, GetUserProfileData, UpdateUserProfileData, UpdateUserProfileResponses, GetUserIdentitiesData, DeleteAccountIdentityData, DeleteAccountIdentityResponses, GetConnectedAppUrlData, UpdateConnectedAppTokenData, UpdateConnectedAppTokenResponses, ListInstallationRepositoriesData, ListInstallationBranchesData, ListUserInstallationsData, ListUserSpacesData, RecordOnboardingAnalyticsData, RecordOnboardingAnalyticsResponses, CreateSpaceData, CreateSpaceResponses, GetUserInvitesData, JoinSpaceData, JoinSpaceResponses, RejectSpaceInviteData, RejectSpaceInviteResponses, GetSpaceOverviewData, GetSpaceOrgCodeData, GetSpaceStatsData, FetchKindeOrganisationBillingAgreementsData, GetSpaceInvitesData, CreateSpaceInviteData, CreateSpaceInviteResponses, RevokeSpaceInviteData, RevokeSpaceInviteResponses, ListSpaceMembersData, ListSpaceMemberRolesData, LeaveSpaceData, LeaveSpaceResponses, CreateProjectData, CreateProjectResponses, GetProjectOverviewData, CreateEnvironmentData, CreateEnvironmentResponses, GetEnvironmentOverviewData, GetEnvironmentVersionsData, DeleteEnvironmentVariableData, DeleteEnvironmentVariableResponses, GetEnvironmentVariablesData, UpdateEnvironmentVariableData, UpdateEnvironmentVariableResponses, CreateEnvironmentVariableData, CreateEnvironmentVariableResponses, 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>;
@@ -15,6 +15,11 @@ export declare const useUpdateGraphM2M: (config?: {
15
15
  export declare const useFetchNodeM2M: (options: Omit<FetchNodeM2mData, "url"> & {
16
16
  enabled?: boolean;
17
17
  }) => import("@tanstack/react-query").UseQueryResult<import("../../sdk/types.gen").Node | undefined, Error>;
18
+ export declare const useUpdateNodeM2M: (config?: {
19
+ onSuccess?: (data: GetSuccessResponse<UpdateNodeM2mResponses>) => void;
20
+ onError?: Parameters<typeof useMutation>["0"]["onError"];
21
+ retry?: boolean;
22
+ }) => import("@tanstack/react-query").UseMutationResult<import("../../sdk/types.gen").Node | undefined, unknown, Omit<UpdateNodeM2mData, "url">, unknown>;
18
23
  export declare const useRequestAccountPasswordReset: (config?: {
19
24
  onSuccess?: (data: GetSuccessResponse<RequestAccountPasswordResetResponses>) => void;
20
25
  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, recordOnboardingAnalytics, createSpace, getUserInvites, joinSpace, rejectSpaceInvite, getSpaceOverview, getSpaceOrgCode, getSpaceStats, fetchKindeOrganisationBillingAgreements, getSpaceInvites, createSpaceInvite, revokeSpaceInvite, listSpaceMembers, listSpaceMemberRoles, leaveSpace, createProject, getProjectOverview, createEnvironment, getEnvironmentOverview, getEnvironmentVersions, deleteEnvironmentVariable, getEnvironmentVariables, updateEnvironmentVariable, createEnvironmentVariable, getGraphOverview, updateGraphState, deployVersion, versionStatus, requestSignedUploadUrl, recordCloudUsage, getBillingPlan, updateBillingPlan, createSetupIntent, listPaymentMethods, removePaymentMethod, setDefaultPaymentMethod, getBillingUsage, fetchBillingPrices, listBillingInvoices } from "../../sdk/sdk.gen";
5
+ import { getServiceHealth, fetchGraphM2M, updateGraphM2M, fetchNodeM2M, updateNodeM2M, requestAccountPasswordReset, updateUsername, createUsername, getUserProfile, updateUserProfile, getUserIdentities, deleteAccountIdentity, getConnectedAppUrl, updateConnectedAppToken, listInstallationRepositories, listInstallationBranches, listUserInstallations, listUserSpaces, recordOnboardingAnalytics, createSpace, getUserInvites, joinSpace, rejectSpaceInvite, getSpaceOverview, getSpaceOrgCode, getSpaceStats, fetchKindeOrganisationBillingAgreements, getSpaceInvites, createSpaceInvite, revokeSpaceInvite, listSpaceMembers, listSpaceMemberRoles, leaveSpace, createProject, getProjectOverview, createEnvironment, getEnvironmentOverview, getEnvironmentVersions, deleteEnvironmentVariable, getEnvironmentVariables, updateEnvironmentVariable, createEnvironmentVariable, 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 };
@@ -85,6 +85,25 @@ export const useFetchNodeM2M = (options) => {
85
85
  staleTime: 600000
86
86
  });
87
87
  };
88
+ export const useUpdateNodeM2M = (config) => {
89
+ const token = useToken();
90
+ const queryClient = useQueryClient();
91
+ const opts = { throwOnError: true, url: "/m2m/graph/{versionUUID}/nodes/{nodeUUID}" };
92
+ const funcer = async (options) => {
93
+ const auth = isPromise(token) ? (await token) || "" : token || "";
94
+ const res = await updateNodeM2M({ ...opts, ...options, auth });
95
+ return res?.data;
96
+ };
97
+ return useMutation({
98
+ mutationFn: funcer,
99
+ onSuccess: (res, options, c, ctx) => {
100
+ queryClient.invalidateQueries({ queryKey: ["m2m", "graph", options?.path?.versionUUID, "nodes", options?.path?.nodeUUID] });
101
+ config?.onSuccess && config.onSuccess(res);
102
+ },
103
+ onError: config?.onError,
104
+ retry: config?.retry
105
+ });
106
+ };
88
107
  export const useRequestAccountPasswordReset = (config) => {
89
108
  const token = useToken();
90
109
  const queryClient = useQueryClient();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shoal-web-sdk",
3
- "version": "0.0.142",
3
+ "version": "0.0.144",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "build-hooks": "npx tsx tanstack-codegen/generator.ts",