shoal-web-sdk 0.0.76 → 0.0.78
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.
|
@@ -528,12 +528,12 @@ export declare const getGraphOverviewQueryKey: (options: Options<GetGraphOvervie
|
|
|
528
528
|
/**
|
|
529
529
|
* Get a graph for a version inside an environment.
|
|
530
530
|
*/
|
|
531
|
-
export declare const getGraphOverviewOptions: (options: Options<GetGraphOverviewData>) => import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<import("../types.gen").
|
|
531
|
+
export declare const getGraphOverviewOptions: (options: Options<GetGraphOverviewData>) => import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<import("../types.gen").Graph, Error, import("../types.gen").Graph, [Pick<Options<GetGraphOverviewData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
532
532
|
_id: string;
|
|
533
533
|
_infinite?: boolean;
|
|
534
534
|
tags?: ReadonlyArray<string>;
|
|
535
535
|
}]>, "queryFn"> & {
|
|
536
|
-
queryFn?: import("@tanstack/react-query").QueryFunction<import("../types.gen").
|
|
536
|
+
queryFn?: import("@tanstack/react-query").QueryFunction<import("../types.gen").Graph, [Pick<Options<GetGraphOverviewData>, "query" | "body" | "headers" | "path" | "baseUrl"> & {
|
|
537
537
|
_id: string;
|
|
538
538
|
_infinite?: boolean;
|
|
539
539
|
tags?: ReadonlyArray<string>;
|
|
@@ -544,7 +544,7 @@ export declare const getGraphOverviewOptions: (options: Options<GetGraphOverview
|
|
|
544
544
|
_infinite?: boolean;
|
|
545
545
|
tags?: ReadonlyArray<string>;
|
|
546
546
|
}] & {
|
|
547
|
-
[dataTagSymbol]: import("../types.gen").
|
|
547
|
+
[dataTagSymbol]: import("../types.gen").Graph;
|
|
548
548
|
[dataTagErrorSymbol]: Error;
|
|
549
549
|
};
|
|
550
550
|
};
|
package/dist/sdk/types.gen.d.ts
CHANGED
|
@@ -205,6 +205,10 @@ export type Nodes = {
|
|
|
205
205
|
export type Uuids = {
|
|
206
206
|
ids: Array<string>;
|
|
207
207
|
};
|
|
208
|
+
export type Graph = {
|
|
209
|
+
versionUUID: string;
|
|
210
|
+
nodes: Array<Node>;
|
|
211
|
+
};
|
|
208
212
|
export type Edge = {
|
|
209
213
|
id: string;
|
|
210
214
|
src: string;
|
|
@@ -212,7 +216,6 @@ export type Edge = {
|
|
|
212
216
|
};
|
|
213
217
|
export type Node = {
|
|
214
218
|
id: string;
|
|
215
|
-
versionId?: string;
|
|
216
219
|
name?: string;
|
|
217
220
|
description?: string;
|
|
218
221
|
x?: number;
|
|
@@ -1148,7 +1151,7 @@ export type GetGraphOverviewResponses = {
|
|
|
1148
1151
|
/**
|
|
1149
1152
|
* A graph overview.
|
|
1150
1153
|
*/
|
|
1151
|
-
200:
|
|
1154
|
+
200: Graph;
|
|
1152
1155
|
};
|
|
1153
1156
|
export type GetGraphOverviewResponse = GetGraphOverviewResponses[keyof GetGraphOverviewResponses];
|
|
1154
1157
|
export type UpdateGraphStateData = {
|
package/dist/sdk/zod.gen.d.ts
CHANGED
|
@@ -460,7 +460,6 @@ export declare const zVmNodeProps: z.ZodObject<{
|
|
|
460
460
|
}, z.core.$strip>;
|
|
461
461
|
export declare const zNode: z.ZodObject<{
|
|
462
462
|
id: z.ZodUUID;
|
|
463
|
-
versionId: z.ZodOptional<z.ZodUUID>;
|
|
464
463
|
name: z.ZodOptional<z.ZodString>;
|
|
465
464
|
description: z.ZodOptional<z.ZodString>;
|
|
466
465
|
x: z.ZodOptional<z.ZodNumber>;
|
|
@@ -576,7 +575,123 @@ export declare const zNode: z.ZodObject<{
|
|
|
576
575
|
export declare const zNodes: z.ZodObject<{
|
|
577
576
|
nodes: z.ZodArray<z.ZodObject<{
|
|
578
577
|
id: z.ZodUUID;
|
|
579
|
-
|
|
578
|
+
name: z.ZodOptional<z.ZodString>;
|
|
579
|
+
description: z.ZodOptional<z.ZodString>;
|
|
580
|
+
x: z.ZodOptional<z.ZodNumber>;
|
|
581
|
+
y: z.ZodOptional<z.ZodNumber>;
|
|
582
|
+
width: z.ZodOptional<z.ZodInt>;
|
|
583
|
+
height: z.ZodOptional<z.ZodInt>;
|
|
584
|
+
edges: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
585
|
+
id: z.ZodUUID;
|
|
586
|
+
src: z.ZodUUID;
|
|
587
|
+
dst: z.ZodUUID;
|
|
588
|
+
}, z.core.$strip>>>;
|
|
589
|
+
typ: z.ZodEnum<{
|
|
590
|
+
function: "function";
|
|
591
|
+
cache: "cache";
|
|
592
|
+
comment: "comment";
|
|
593
|
+
container: "container";
|
|
594
|
+
cronjob: "cronjob";
|
|
595
|
+
database: "database";
|
|
596
|
+
message_queue: "message_queue";
|
|
597
|
+
proxy: "proxy";
|
|
598
|
+
vm: "vm";
|
|
599
|
+
}>;
|
|
600
|
+
props: z.ZodOptional<z.ZodUnion<readonly [z.ZodIntersection<z.ZodObject<{
|
|
601
|
+
typ: z.ZodLiteral<"comment">;
|
|
602
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
603
|
+
comment: z.ZodOptional<z.ZodString>;
|
|
604
|
+
}, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
|
|
605
|
+
typ: z.ZodLiteral<"cache">;
|
|
606
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
607
|
+
size: z.ZodOptional<z.ZodInt>;
|
|
608
|
+
}, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
|
|
609
|
+
typ: z.ZodLiteral<"container">;
|
|
610
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
611
|
+
region: z.ZodOptional<z.ZodEnum<{
|
|
612
|
+
"africa-south1": "africa-south1";
|
|
613
|
+
"asia-east1": "asia-east1";
|
|
614
|
+
"asia-east2": "asia-east2";
|
|
615
|
+
"asia-northeast1": "asia-northeast1";
|
|
616
|
+
"asia-northeast2": "asia-northeast2";
|
|
617
|
+
"asia-northeast3": "asia-northeast3";
|
|
618
|
+
"asia-south1": "asia-south1";
|
|
619
|
+
"asia-southeast1": "asia-southeast1";
|
|
620
|
+
"asia-southeast2": "asia-southeast2";
|
|
621
|
+
"australia-southeast1": "australia-southeast1";
|
|
622
|
+
"europe-north1": "europe-north1";
|
|
623
|
+
"europe-west1": "europe-west1";
|
|
624
|
+
"europe-west2": "europe-west2";
|
|
625
|
+
"europe-west3": "europe-west3";
|
|
626
|
+
"europe-west4": "europe-west4";
|
|
627
|
+
"europe-west6": "europe-west6";
|
|
628
|
+
"northamerica-northeast1": "northamerica-northeast1";
|
|
629
|
+
"northamerica-northeast2": "northamerica-northeast2";
|
|
630
|
+
"southamerica-east1": "southamerica-east1";
|
|
631
|
+
"southamerica-west1": "southamerica-west1";
|
|
632
|
+
"us-central1": "us-central1";
|
|
633
|
+
"us-east1": "us-east1";
|
|
634
|
+
"us-east4": "us-east4";
|
|
635
|
+
"us-west1": "us-west1";
|
|
636
|
+
"us-west2": "us-west2";
|
|
637
|
+
"us-west3": "us-west3";
|
|
638
|
+
"us-west4": "us-west4";
|
|
639
|
+
}>>;
|
|
640
|
+
image: z.ZodOptional<z.ZodString>;
|
|
641
|
+
port: z.ZodOptional<z.ZodInt>;
|
|
642
|
+
cpu: z.ZodOptional<z.ZodString>;
|
|
643
|
+
memory: z.ZodOptional<z.ZodEnum<{
|
|
644
|
+
"128Mi": "128Mi";
|
|
645
|
+
"256Mi": "256Mi";
|
|
646
|
+
"512Mi": "512Mi";
|
|
647
|
+
"1Gi": "1Gi";
|
|
648
|
+
"2Gi": "2Gi";
|
|
649
|
+
"4Gi": "4Gi";
|
|
650
|
+
"8Gi": "8Gi";
|
|
651
|
+
"16Gi": "16Gi";
|
|
652
|
+
"32Gi": "32Gi";
|
|
653
|
+
}>>;
|
|
654
|
+
ingress: z.ZodOptional<z.ZodEnum<{
|
|
655
|
+
INGRESS_TRAFFIC_ALL: "INGRESS_TRAFFIC_ALL";
|
|
656
|
+
INGRESS_TRAFFIC_INTERNAL_ONLY: "INGRESS_TRAFFIC_INTERNAL_ONLY";
|
|
657
|
+
INGRESS_TRAFFIC_INTERNAL_LOAD_BALANCER: "INGRESS_TRAFFIC_INTERNAL_LOAD_BALANCER";
|
|
658
|
+
}>>;
|
|
659
|
+
timeoutSeconds: z.ZodOptional<z.ZodInt>;
|
|
660
|
+
maxInstances: z.ZodOptional<z.ZodInt>;
|
|
661
|
+
minInstances: z.ZodOptional<z.ZodInt>;
|
|
662
|
+
concurrency: z.ZodOptional<z.ZodInt>;
|
|
663
|
+
allowUnauthenticated: z.ZodOptional<z.ZodBoolean>;
|
|
664
|
+
}, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
|
|
665
|
+
typ: z.ZodLiteral<"cronjob">;
|
|
666
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
667
|
+
cronTab: z.ZodOptional<z.ZodString>;
|
|
668
|
+
}, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
|
|
669
|
+
typ: z.ZodLiteral<"database">;
|
|
670
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
671
|
+
space: z.ZodOptional<z.ZodInt>;
|
|
672
|
+
}, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
|
|
673
|
+
typ: z.ZodLiteral<"function">;
|
|
674
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
675
|
+
cpus: z.ZodOptional<z.ZodInt>;
|
|
676
|
+
}, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
|
|
677
|
+
typ: z.ZodLiteral<"message_queue">;
|
|
678
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
679
|
+
foobar: z.ZodOptional<z.ZodString>;
|
|
680
|
+
}, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
|
|
681
|
+
typ: z.ZodLiteral<"proxy">;
|
|
682
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
683
|
+
domain: z.ZodOptional<z.ZodString>;
|
|
684
|
+
}, z.core.$strip>>, z.ZodIntersection<z.ZodObject<{
|
|
685
|
+
typ: z.ZodLiteral<"vm">;
|
|
686
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
687
|
+
os: z.ZodOptional<z.ZodString>;
|
|
688
|
+
}, z.core.$strip>>]>>;
|
|
689
|
+
}, z.core.$strip>>;
|
|
690
|
+
}, z.core.$strip>;
|
|
691
|
+
export declare const zGraph: z.ZodObject<{
|
|
692
|
+
versionUUID: z.ZodUUID;
|
|
693
|
+
nodes: z.ZodArray<z.ZodObject<{
|
|
694
|
+
id: z.ZodUUID;
|
|
580
695
|
name: z.ZodOptional<z.ZodString>;
|
|
581
696
|
description: z.ZodOptional<z.ZodString>;
|
|
582
697
|
x: z.ZodOptional<z.ZodNumber>;
|
|
@@ -1176,9 +1291,9 @@ export declare const zGetGraphOverviewData: z.ZodObject<{
|
|
|
1176
1291
|
* A graph overview.
|
|
1177
1292
|
*/
|
|
1178
1293
|
export declare const zGetGraphOverviewResponse: z.ZodObject<{
|
|
1294
|
+
versionUUID: z.ZodUUID;
|
|
1179
1295
|
nodes: z.ZodArray<z.ZodObject<{
|
|
1180
1296
|
id: z.ZodUUID;
|
|
1181
|
-
versionId: z.ZodOptional<z.ZodUUID>;
|
|
1182
1297
|
name: z.ZodOptional<z.ZodString>;
|
|
1183
1298
|
description: z.ZodOptional<z.ZodString>;
|
|
1184
1299
|
x: z.ZodOptional<z.ZodNumber>;
|
|
@@ -1296,7 +1411,6 @@ export declare const zUpdateGraphStateData: z.ZodObject<{
|
|
|
1296
1411
|
body: z.ZodObject<{
|
|
1297
1412
|
nodes: z.ZodArray<z.ZodObject<{
|
|
1298
1413
|
id: z.ZodUUID;
|
|
1299
|
-
versionId: z.ZodOptional<z.ZodUUID>;
|
|
1300
1414
|
name: z.ZodOptional<z.ZodString>;
|
|
1301
1415
|
description: z.ZodOptional<z.ZodString>;
|
|
1302
1416
|
x: z.ZodOptional<z.ZodNumber>;
|
package/dist/sdk/zod.gen.js
CHANGED
|
@@ -304,7 +304,6 @@ export const zVmNodeProps = z.object({
|
|
|
304
304
|
});
|
|
305
305
|
export const zNode = z.object({
|
|
306
306
|
id: z.uuid(),
|
|
307
|
-
versionId: z.optional(z.uuid()),
|
|
308
307
|
name: z.optional(z.string()),
|
|
309
308
|
description: z.optional(z.string()),
|
|
310
309
|
x: z.optional(z.number()),
|
|
@@ -346,6 +345,10 @@ export const zNode = z.object({
|
|
|
346
345
|
export const zNodes = z.object({
|
|
347
346
|
nodes: z.array(zNode)
|
|
348
347
|
});
|
|
348
|
+
export const zGraph = z.object({
|
|
349
|
+
versionUUID: z.uuid(),
|
|
350
|
+
nodes: z.array(zNode)
|
|
351
|
+
});
|
|
349
352
|
/**
|
|
350
353
|
* A version number with in an environment.
|
|
351
354
|
*/
|
|
@@ -637,7 +640,7 @@ export const zGetGraphOverviewData = z.object({
|
|
|
637
640
|
/**
|
|
638
641
|
* A graph overview.
|
|
639
642
|
*/
|
|
640
|
-
export const zGetGraphOverviewResponse =
|
|
643
|
+
export const zGetGraphOverviewResponse = zGraph;
|
|
641
644
|
export const zUpdateGraphStateData = z.object({
|
|
642
645
|
body: zNodes,
|
|
643
646
|
path: z.object({
|
|
@@ -77,7 +77,7 @@ export declare const useGetEnvironmentOverview: (options: Omit<GetEnvironmentOve
|
|
|
77
77
|
}) => import("@tanstack/react-query").UseQueryResult<import("../../sdk/types.gen").EnvironmentOverview | undefined, Error>;
|
|
78
78
|
export declare const useGetGraphOverview: (options: Omit<GetGraphOverviewData, "url"> & {
|
|
79
79
|
enabled?: boolean;
|
|
80
|
-
}) => import("@tanstack/react-query").UseQueryResult<import("../../sdk/types.gen").
|
|
80
|
+
}) => import("@tanstack/react-query").UseQueryResult<import("../../sdk/types.gen").Graph | undefined, Error>;
|
|
81
81
|
export declare const useUpdateGraphState: (config?: {
|
|
82
82
|
onSuccess?: (data: GetSuccessResponse<UpdateGraphStateResponses>) => void;
|
|
83
83
|
onError?: Parameters<typeof useMutation>["0"]["onError"];
|
package/package.json
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "shoal-web-sdk",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.78",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build-hooks": "npx tsx tanstack-codegen/generator.ts",
|
|
7
7
|
"build-sdk": "npx openapi-ts",
|
|
8
8
|
"build-ts": "tsc",
|
|
9
|
-
"build": "npm run build-sdk && npm run build-hooks && npm run build-ts && npm run remove-tanstack",
|
|
10
|
-
"remove-tanstack": "rimraf sdk/@tanstack"
|
|
9
|
+
"build": "npm run build-sdk && npm run build-hooks && npm run build-ts && npm run remove-tanstack && npm run patch-sdk",
|
|
10
|
+
"remove-tanstack": "rimraf sdk/@tanstack",
|
|
11
|
+
"patch-sdk": "npx tsx sdk-patch.ts"
|
|
11
12
|
},
|
|
12
13
|
"repository": {
|
|
13
14
|
"type": "git",
|