shoal-web-sdk 0.0.143 → 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
  */
@@ -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;
@@ -1567,6 +1567,252 @@ export declare const zFetchNodeM2mResponse: z.ZodObject<{
1567
1567
  paused: z.ZodBoolean;
1568
1568
  }, z.core.$strip>>]>>;
1569
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>;
1613
+ }, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
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">;
1720
+ }, z.core.$strip>, z.ZodObject<{
1721
+ path: z.ZodOptional<z.ZodString>;
1722
+ }, z.core.$strip>>]>>;
1723
+ }, z.core.$strip>>>;
1724
+ typ: z.ZodEnum<{
1725
+ function: "function";
1726
+ cache: "cache";
1727
+ comment: "comment";
1728
+ container: "container";
1729
+ cronjob: "cronjob";
1730
+ database: "database";
1731
+ queue: "queue";
1732
+ proxy: "proxy";
1733
+ vm: "vm";
1734
+ scheduler: "scheduler";
1735
+ }>;
1736
+ props: z.ZodOptional<z.ZodUnion<readonly [z.ZodIntersection<z.ZodObject<{
1737
+ typ: z.ZodLiteral<"comment">;
1738
+ }, z.core.$strip>, z.ZodObject<{
1739
+ comment: z.ZodOptional<z.ZodString>;
1740
+ }, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
1741
+ typ: z.ZodLiteral<"cache">;
1742
+ }, z.core.$strip>, z.ZodObject<{
1743
+ size: z.ZodOptional<z.ZodInt>;
1744
+ }, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
1745
+ typ: z.ZodLiteral<"container">;
1746
+ }, z.core.$strip>, z.ZodObject<{
1747
+ region: z.ZodEnum<{
1748
+ "europe-west2": "europe-west2";
1749
+ }>;
1750
+ port: z.ZodInt;
1751
+ cpu: z.ZodEnum<{
1752
+ 1: "1";
1753
+ 2: "2";
1754
+ }>;
1755
+ memory: z.ZodEnum<{
1756
+ "512Mi": "512Mi";
1757
+ "1Gi": "1Gi";
1758
+ "2Gi": "2Gi";
1759
+ }>;
1760
+ ingress: z.ZodEnum<{
1761
+ INGRESS_TRAFFIC_ALL: "INGRESS_TRAFFIC_ALL";
1762
+ INGRESS_TRAFFIC_INTERNAL_ONLY: "INGRESS_TRAFFIC_INTERNAL_ONLY";
1763
+ INGRESS_TRAFFIC_INTERNAL_LOAD_BALANCER: "INGRESS_TRAFFIC_INTERNAL_LOAD_BALANCER";
1764
+ }>;
1765
+ timeoutSeconds: z.ZodOptional<z.ZodInt>;
1766
+ maxInstances: z.ZodOptional<z.ZodInt>;
1767
+ minInstances: z.ZodOptional<z.ZodInt>;
1768
+ concurrency: z.ZodOptional<z.ZodInt>;
1769
+ allowUnauthenticated: z.ZodOptional<z.ZodBoolean>;
1770
+ uri: z.ZodOptional<z.ZodString>;
1771
+ installationId: z.ZodOptional<z.ZodString>;
1772
+ env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1773
+ }, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
1774
+ typ: z.ZodLiteral<"cronjob">;
1775
+ }, z.core.$strip>, z.ZodObject<{
1776
+ cronTab: z.ZodOptional<z.ZodString>;
1777
+ }, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
1778
+ typ: z.ZodLiteral<"database">;
1779
+ }, z.core.$strip>, z.ZodObject<{
1780
+ space: z.ZodOptional<z.ZodInt>;
1781
+ }, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
1782
+ typ: z.ZodLiteral<"function">;
1783
+ }, z.core.$strip>, z.ZodObject<{
1784
+ cpus: z.ZodOptional<z.ZodInt>;
1785
+ }, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
1786
+ typ: z.ZodLiteral<"queue">;
1787
+ }, z.core.$strip>, z.ZodObject<{
1788
+ foobar: z.ZodOptional<z.ZodString>;
1789
+ }, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
1790
+ typ: z.ZodLiteral<"proxy">;
1791
+ }, z.core.$strip>, z.ZodObject<{
1792
+ subdomain: z.ZodOptional<z.ZodString>;
1793
+ }, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
1794
+ typ: z.ZodLiteral<"vm">;
1795
+ }, z.core.$strip>, z.ZodObject<{
1796
+ os: z.ZodOptional<z.ZodString>;
1797
+ }, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
1798
+ typ: z.ZodLiteral<"scheduler">;
1799
+ }, z.core.$strip>, z.ZodObject<{
1800
+ expression: z.ZodString;
1801
+ timezone: z.ZodString;
1802
+ requestMethod: z.ZodEnum<{
1803
+ DELETE: "DELETE";
1804
+ GET: "GET";
1805
+ HEAD: "HEAD";
1806
+ OPTIONS: "OPTIONS";
1807
+ PATCH: "PATCH";
1808
+ POST: "POST";
1809
+ PUT: "PUT";
1810
+ }>;
1811
+ requestPayload: z.ZodOptional<z.ZodString>;
1812
+ requestHeaders: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1813
+ paused: z.ZodBoolean;
1814
+ }, z.core.$strip>>]>>;
1815
+ }, z.core.$strip>;
1570
1816
  export declare const zRequestAccountPasswordResetData: z.ZodObject<{
1571
1817
  body: z.ZodOptional<z.ZodNever>;
1572
1818
  path: z.ZodOptional<z.ZodNever>;
@@ -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.143",
3
+ "version": "0.0.144",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "build-hooks": "npx tsx tanstack-codegen/generator.ts",