shoal-web-sdk 0.0.114 → 0.0.116

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
  */
@@ -352,6 +352,12 @@ export type VmNodeProps = {
352
352
  export type SignedUrlUploadResponse = {
353
353
  signedUrl: string;
354
354
  expiration: string;
355
+ /**
356
+ * Form fields required for the multipart POST upload
357
+ */
358
+ fields: {
359
+ [key: string]: string;
360
+ };
355
361
  };
356
362
  export type BillingPlan = {
357
363
  tier: PlatformTier;
@@ -535,6 +541,46 @@ export type FetchGraphM2mResponses = {
535
541
  200: Graph;
536
542
  };
537
543
  export type FetchGraphM2mResponse = FetchGraphM2mResponses[keyof FetchGraphM2mResponses];
544
+ export type UpdateGraphM2mData = {
545
+ body: Nodes;
546
+ path: {
547
+ /**
548
+ * A version UUID.
549
+ */
550
+ versionUUID: string;
551
+ };
552
+ query?: never;
553
+ url: '/m2m/graph/{versionUUID}';
554
+ };
555
+ export type UpdateGraphM2mErrors = {
556
+ /**
557
+ * Unauthorised user.
558
+ */
559
+ 401: ErrorResponse;
560
+ /**
561
+ * Invalid credentials.
562
+ */
563
+ 403: ErrorResponse;
564
+ /**
565
+ * Related content not found.
566
+ */
567
+ 404: ErrorResponse;
568
+ /**
569
+ * Unprocessable graph state.
570
+ */
571
+ 422: ErrorResponse;
572
+ /**
573
+ * Unexpected error.
574
+ */
575
+ 500: ErrorResponse;
576
+ };
577
+ export type UpdateGraphM2mError = UpdateGraphM2mErrors[keyof UpdateGraphM2mErrors];
578
+ export type UpdateGraphM2mResponses = {
579
+ /**
580
+ * Graph state updated successfully
581
+ */
582
+ 202: unknown;
583
+ };
538
584
  export type RequestAccountPasswordResetData = {
539
585
  body?: never;
540
586
  path?: never;
@@ -1026,6 +1026,7 @@ export declare const zGraph: z.ZodObject<{
1026
1026
  export declare const zSignedUrlUploadResponse: z.ZodObject<{
1027
1027
  signedUrl: z.ZodString;
1028
1028
  expiration: z.ZodISODateTime;
1029
+ fields: z.ZodRecord<z.ZodString, z.ZodString>;
1029
1030
  }, z.core.$strip>;
1030
1031
  export declare const zBillingPlan: z.ZodObject<{
1031
1032
  tier: z.ZodEnum<{
@@ -1318,6 +1319,156 @@ export declare const zFetchGraphM2mResponse: z.ZodObject<{
1318
1319
  }, z.core.$strip>>]>>;
1319
1320
  }, z.core.$strip>>;
1320
1321
  }, z.core.$strip>;
1322
+ export declare const zUpdateGraphM2mData: z.ZodObject<{
1323
+ body: z.ZodObject<{
1324
+ nodes: z.ZodArray<z.ZodObject<{
1325
+ id: z.ZodUUID;
1326
+ name: z.ZodOptional<z.ZodString>;
1327
+ description: z.ZodOptional<z.ZodString>;
1328
+ x: z.ZodNumber;
1329
+ y: z.ZodNumber;
1330
+ width: z.ZodInt;
1331
+ height: z.ZodInt;
1332
+ edges: z.ZodOptional<z.ZodArray<z.ZodObject<{
1333
+ id: z.ZodUUID;
1334
+ src: z.ZodUUID;
1335
+ dst: z.ZodUUID;
1336
+ typ: z.ZodEnum<{
1337
+ network: "network";
1338
+ route: "route";
1339
+ }>;
1340
+ props: z.ZodOptional<z.ZodUnion<readonly [z.ZodIntersection<z.ZodObject<{
1341
+ typ: z.ZodLiteral<"comment">;
1342
+ }, z.core.$strip>, z.ZodObject<{
1343
+ a: z.ZodOptional<z.ZodString>;
1344
+ }, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
1345
+ typ: z.ZodLiteral<"cache">;
1346
+ }, z.core.$strip>, z.ZodObject<{
1347
+ subdomain: z.ZodOptional<z.ZodString>;
1348
+ }, z.core.$strip>>]>>;
1349
+ }, z.core.$strip>>>;
1350
+ typ: z.ZodEnum<{
1351
+ function: "function";
1352
+ cache: "cache";
1353
+ comment: "comment";
1354
+ container: "container";
1355
+ cronjob: "cronjob";
1356
+ database: "database";
1357
+ queue: "queue";
1358
+ proxy: "proxy";
1359
+ vm: "vm";
1360
+ scheduler: "scheduler";
1361
+ }>;
1362
+ props: z.ZodOptional<z.ZodUnion<readonly [z.ZodIntersection<z.ZodObject<{
1363
+ typ: z.ZodLiteral<"comment">;
1364
+ }, z.core.$strip>, z.ZodObject<{
1365
+ comment: z.ZodOptional<z.ZodString>;
1366
+ }, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
1367
+ typ: z.ZodLiteral<"cache">;
1368
+ }, z.core.$strip>, z.ZodObject<{
1369
+ size: z.ZodOptional<z.ZodInt>;
1370
+ }, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
1371
+ typ: z.ZodLiteral<"container">;
1372
+ }, z.core.$strip>, z.ZodObject<{
1373
+ region: z.ZodEnum<{
1374
+ "africa-south1": "africa-south1";
1375
+ "asia-east1": "asia-east1";
1376
+ "asia-east2": "asia-east2";
1377
+ "asia-northeast1": "asia-northeast1";
1378
+ "asia-northeast2": "asia-northeast2";
1379
+ "asia-northeast3": "asia-northeast3";
1380
+ "asia-south1": "asia-south1";
1381
+ "asia-southeast1": "asia-southeast1";
1382
+ "asia-southeast2": "asia-southeast2";
1383
+ "australia-southeast1": "australia-southeast1";
1384
+ "europe-north1": "europe-north1";
1385
+ "europe-west1": "europe-west1";
1386
+ "europe-west2": "europe-west2";
1387
+ "europe-west3": "europe-west3";
1388
+ "europe-west4": "europe-west4";
1389
+ "europe-west6": "europe-west6";
1390
+ "northamerica-northeast1": "northamerica-northeast1";
1391
+ "northamerica-northeast2": "northamerica-northeast2";
1392
+ "southamerica-east1": "southamerica-east1";
1393
+ "southamerica-west1": "southamerica-west1";
1394
+ "us-central1": "us-central1";
1395
+ "us-east1": "us-east1";
1396
+ "us-east4": "us-east4";
1397
+ "us-west1": "us-west1";
1398
+ "us-west2": "us-west2";
1399
+ "us-west3": "us-west3";
1400
+ "us-west4": "us-west4";
1401
+ }>;
1402
+ port: z.ZodInt;
1403
+ cpu: z.ZodEnum<{
1404
+ 1: "1";
1405
+ 2: "2";
1406
+ 4: "4";
1407
+ 6: "6";
1408
+ 8: "8";
1409
+ 16: "16";
1410
+ 32: "32";
1411
+ }>;
1412
+ memory: z.ZodEnum<{
1413
+ "128Mi": "128Mi";
1414
+ "256Mi": "256Mi";
1415
+ "512Mi": "512Mi";
1416
+ "1Gi": "1Gi";
1417
+ "2Gi": "2Gi";
1418
+ "4Gi": "4Gi";
1419
+ "8Gi": "8Gi";
1420
+ "16Gi": "16Gi";
1421
+ "32Gi": "32Gi";
1422
+ }>;
1423
+ ingress: z.ZodEnum<{
1424
+ INGRESS_TRAFFIC_ALL: "INGRESS_TRAFFIC_ALL";
1425
+ INGRESS_TRAFFIC_INTERNAL_ONLY: "INGRESS_TRAFFIC_INTERNAL_ONLY";
1426
+ INGRESS_TRAFFIC_INTERNAL_LOAD_BALANCER: "INGRESS_TRAFFIC_INTERNAL_LOAD_BALANCER";
1427
+ }>;
1428
+ timeoutSeconds: z.ZodOptional<z.ZodInt>;
1429
+ maxInstances: z.ZodOptional<z.ZodInt>;
1430
+ minInstances: z.ZodOptional<z.ZodInt>;
1431
+ concurrency: z.ZodOptional<z.ZodInt>;
1432
+ allowUnauthenticated: z.ZodOptional<z.ZodBoolean>;
1433
+ uri: z.ZodString;
1434
+ env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1435
+ }, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
1436
+ typ: z.ZodLiteral<"cronjob">;
1437
+ }, z.core.$strip>, z.ZodObject<{
1438
+ cronTab: z.ZodOptional<z.ZodString>;
1439
+ }, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
1440
+ typ: z.ZodLiteral<"database">;
1441
+ }, z.core.$strip>, z.ZodObject<{
1442
+ space: z.ZodOptional<z.ZodInt>;
1443
+ }, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
1444
+ typ: z.ZodLiteral<"function">;
1445
+ }, z.core.$strip>, z.ZodObject<{
1446
+ cpus: z.ZodOptional<z.ZodInt>;
1447
+ }, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
1448
+ typ: z.ZodLiteral<"queue">;
1449
+ }, z.core.$strip>, z.ZodObject<{
1450
+ foobar: z.ZodOptional<z.ZodString>;
1451
+ }, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
1452
+ typ: z.ZodLiteral<"proxy">;
1453
+ }, z.core.$strip>, z.ZodObject<{
1454
+ domain: z.ZodOptional<z.ZodString>;
1455
+ }, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
1456
+ typ: z.ZodLiteral<"vm">;
1457
+ }, z.core.$strip>, z.ZodObject<{
1458
+ os: z.ZodOptional<z.ZodString>;
1459
+ }, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
1460
+ typ: z.ZodLiteral<"scheduler">;
1461
+ }, z.core.$strip>, z.ZodObject<{
1462
+ url: z.ZodOptional<z.ZodString>;
1463
+ expression: z.ZodOptional<z.ZodString>;
1464
+ }, z.core.$strip>>]>>;
1465
+ }, z.core.$strip>>;
1466
+ }, z.core.$strip>;
1467
+ path: z.ZodObject<{
1468
+ versionUUID: z.ZodUUID;
1469
+ }, z.core.$strip>;
1470
+ query: z.ZodOptional<z.ZodNever>;
1471
+ }, z.core.$strip>;
1321
1472
  export declare const zRequestAccountPasswordResetData: z.ZodObject<{
1322
1473
  body: z.ZodOptional<z.ZodNever>;
1323
1474
  path: z.ZodOptional<z.ZodNever>;
@@ -2232,6 +2383,7 @@ export declare const zRequestSignedUploadUrlData: z.ZodObject<{
2232
2383
  export declare const zRequestSignedUploadUrlResponse: z.ZodObject<{
2233
2384
  signedUrl: z.ZodString;
2234
2385
  expiration: z.ZodISODateTime;
2386
+ fields: z.ZodRecord<z.ZodString, z.ZodString>;
2235
2387
  }, z.core.$strip>;
2236
2388
  export declare const zRecordCloudUsageData: z.ZodObject<{
2237
2389
  body: z.ZodObject<{
@@ -444,7 +444,8 @@ export const zGraph = z.object({
444
444
  });
445
445
  export const zSignedUrlUploadResponse = z.object({
446
446
  signedUrl: z.string(),
447
- expiration: z.iso.datetime()
447
+ expiration: z.iso.datetime(),
448
+ fields: z.record(z.string(), z.string())
448
449
  });
449
450
  export const zBillingPlan = z.object({
450
451
  tier: zPlatformTier,
@@ -580,6 +581,13 @@ export const zFetchGraphM2mData = z.object({
580
581
  * Graph fetched successfully.
581
582
  */
582
583
  export const zFetchGraphM2mResponse = zGraph;
584
+ export const zUpdateGraphM2mData = z.object({
585
+ body: zNodes,
586
+ path: z.object({
587
+ versionUUID: z.uuid()
588
+ }),
589
+ query: z.optional(z.never())
590
+ });
583
591
  export const zRequestAccountPasswordResetData = z.object({
584
592
  body: z.optional(z.never()),
585
593
  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.114",
3
+ "version": "0.0.116",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "build-hooks": "npx tsx tanstack-codegen/generator.ts",