@automate.ax/api-contract 0.27.0 → 0.28.0
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.
- package/dist/deployment.d.ts +24 -1
- package/dist/deployment.js +26 -8
- package/dist/index.d.ts +48 -2
- package/package.json +2 -2
- package/src/deployment.ts +30 -8
package/dist/deployment.d.ts
CHANGED
|
@@ -11,8 +11,13 @@ export declare const deploymentTriggerInfoSchema: z.ZodObject<{
|
|
|
11
11
|
}, z.core.$strip>;
|
|
12
12
|
export type DeploymentTriggerInfo = z.infer<typeof deploymentTriggerInfoSchema>;
|
|
13
13
|
export declare const deploymentContract: {
|
|
14
|
+
cancel: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
15
|
+
deploymentId: z.ZodString;
|
|
16
|
+
projectId: z.ZodString;
|
|
17
|
+
}, z.core.$strip>, z.ZodVoid, Record<never, never>, Record<never, never>>;
|
|
14
18
|
create: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
15
19
|
artifact: z.ZodCustom<Blob, Blob>;
|
|
20
|
+
cancelExisting: z.ZodDefault<z.ZodBoolean>;
|
|
16
21
|
manifest: z.ZodArray<z.ZodObject<{
|
|
17
22
|
identityKey: z.ZodString;
|
|
18
23
|
}, z.core.$strip>>;
|
|
@@ -24,7 +29,24 @@ export declare const deploymentContract: {
|
|
|
24
29
|
rebindAccounts: z.ZodDefault<z.ZodBoolean>;
|
|
25
30
|
}, z.core.$strip>, z.ZodObject<{
|
|
26
31
|
id: z.ZodString;
|
|
27
|
-
}, z.core.$strip>, Record<never, never>,
|
|
32
|
+
}, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
|
|
33
|
+
DEPLOYMENT_IN_PROGRESS: {
|
|
34
|
+
readonly data: z.ZodObject<{
|
|
35
|
+
deploymentId: z.ZodString;
|
|
36
|
+
status: z.ZodEnum<{
|
|
37
|
+
succeeded: "succeeded";
|
|
38
|
+
failed: "failed";
|
|
39
|
+
planning: "planning";
|
|
40
|
+
awaiting_authorization: "awaiting_authorization";
|
|
41
|
+
configuring: "configuring";
|
|
42
|
+
publishing: "publishing";
|
|
43
|
+
cancelled: "cancelled";
|
|
44
|
+
}>;
|
|
45
|
+
}, z.core.$strip>;
|
|
46
|
+
readonly message: "A deployment is already in progress.";
|
|
47
|
+
readonly status: 409;
|
|
48
|
+
};
|
|
49
|
+
}>, Record<never, never>>;
|
|
28
50
|
get: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
29
51
|
deploymentId: z.ZodString;
|
|
30
52
|
projectId: z.ZodString;
|
|
@@ -59,6 +81,7 @@ export declare const deploymentContract: {
|
|
|
59
81
|
awaiting_authorization: "awaiting_authorization";
|
|
60
82
|
configuring: "configuring";
|
|
61
83
|
publishing: "publishing";
|
|
84
|
+
cancelled: "cancelled";
|
|
62
85
|
}>;
|
|
63
86
|
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
64
87
|
};
|
package/dist/deployment.js
CHANGED
|
@@ -12,10 +12,35 @@ export const deploymentTriggerInfoSchema = z.object({
|
|
|
12
12
|
name: z.string(),
|
|
13
13
|
type: z.string(),
|
|
14
14
|
});
|
|
15
|
+
const DEPLOYMENT_STATUS_SCHEMA = z.enum([
|
|
16
|
+
"planning",
|
|
17
|
+
"awaiting_authorization",
|
|
18
|
+
"configuring",
|
|
19
|
+
"publishing",
|
|
20
|
+
"succeeded",
|
|
21
|
+
"failed",
|
|
22
|
+
"cancelled",
|
|
23
|
+
]);
|
|
24
|
+
const DEPLOYMENT_IN_PROGRESS_ERROR = {
|
|
25
|
+
data: z.object({
|
|
26
|
+
deploymentId: z.string(),
|
|
27
|
+
status: DEPLOYMENT_STATUS_SCHEMA,
|
|
28
|
+
}),
|
|
29
|
+
message: "A deployment is already in progress.",
|
|
30
|
+
status: 409,
|
|
31
|
+
};
|
|
15
32
|
export const deploymentContract = {
|
|
33
|
+
cancel: oc
|
|
34
|
+
.input(z.object({
|
|
35
|
+
deploymentId: z.string(),
|
|
36
|
+
projectId: z.string(),
|
|
37
|
+
}))
|
|
38
|
+
.output(z.void()),
|
|
16
39
|
create: oc
|
|
40
|
+
.errors({ DEPLOYMENT_IN_PROGRESS: DEPLOYMENT_IN_PROGRESS_ERROR })
|
|
17
41
|
.input(z.object({
|
|
18
42
|
artifact: z.instanceof(Blob),
|
|
43
|
+
cancelExisting: z.boolean().default(false),
|
|
19
44
|
manifest: z
|
|
20
45
|
.object({
|
|
21
46
|
identityKey: z.string().min(1),
|
|
@@ -65,13 +90,6 @@ export const deploymentContract = {
|
|
|
65
90
|
id: z.string(),
|
|
66
91
|
name: z.string(),
|
|
67
92
|
}),
|
|
68
|
-
status:
|
|
69
|
-
"planning",
|
|
70
|
-
"awaiting_authorization",
|
|
71
|
-
"configuring",
|
|
72
|
-
"publishing",
|
|
73
|
-
"succeeded",
|
|
74
|
-
"failed",
|
|
75
|
-
]),
|
|
93
|
+
status: DEPLOYMENT_STATUS_SCHEMA,
|
|
76
94
|
})),
|
|
77
95
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -469,8 +469,13 @@ export declare const firstPartyContract: {
|
|
|
469
469
|
}, import("zod/v4/core").$strip>, import("zod").ZodVoid, Record<never, never>, Record<never, never>>;
|
|
470
470
|
};
|
|
471
471
|
deployment: {
|
|
472
|
+
cancel: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
473
|
+
deploymentId: import("zod").ZodString;
|
|
474
|
+
projectId: import("zod").ZodString;
|
|
475
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodVoid, Record<never, never>, Record<never, never>>;
|
|
472
476
|
create: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
473
477
|
artifact: import("zod").ZodCustom<Blob, Blob>;
|
|
478
|
+
cancelExisting: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
|
474
479
|
manifest: import("zod").ZodArray<import("zod").ZodObject<{
|
|
475
480
|
identityKey: import("zod").ZodString;
|
|
476
481
|
}, import("zod/v4/core").$strip>>;
|
|
@@ -482,7 +487,24 @@ export declare const firstPartyContract: {
|
|
|
482
487
|
rebindAccounts: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
|
483
488
|
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
484
489
|
id: import("zod").ZodString;
|
|
485
|
-
}, import("zod/v4/core").$strip>, Record<never, never>,
|
|
490
|
+
}, import("zod/v4/core").$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
|
|
491
|
+
DEPLOYMENT_IN_PROGRESS: {
|
|
492
|
+
readonly data: import("zod").ZodObject<{
|
|
493
|
+
deploymentId: import("zod").ZodString;
|
|
494
|
+
status: import("zod").ZodEnum<{
|
|
495
|
+
succeeded: "succeeded";
|
|
496
|
+
failed: "failed";
|
|
497
|
+
planning: "planning";
|
|
498
|
+
awaiting_authorization: "awaiting_authorization";
|
|
499
|
+
configuring: "configuring";
|
|
500
|
+
publishing: "publishing";
|
|
501
|
+
cancelled: "cancelled";
|
|
502
|
+
}>;
|
|
503
|
+
}, import("zod/v4/core").$strip>;
|
|
504
|
+
readonly message: "A deployment is already in progress.";
|
|
505
|
+
readonly status: 409;
|
|
506
|
+
};
|
|
507
|
+
}>, Record<never, never>>;
|
|
486
508
|
get: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
487
509
|
deploymentId: import("zod").ZodString;
|
|
488
510
|
projectId: import("zod").ZodString;
|
|
@@ -517,6 +539,7 @@ export declare const firstPartyContract: {
|
|
|
517
539
|
awaiting_authorization: "awaiting_authorization";
|
|
518
540
|
configuring: "configuring";
|
|
519
541
|
publishing: "publishing";
|
|
542
|
+
cancelled: "cancelled";
|
|
520
543
|
}>;
|
|
521
544
|
}, import("zod/v4/core").$strip>, Record<never, never>, Record<never, never>>;
|
|
522
545
|
};
|
|
@@ -1285,8 +1308,13 @@ export declare const contract: {
|
|
|
1285
1308
|
}, import("zod/v4/core").$strip>, import("zod").ZodVoid, Record<never, never>, Record<never, never>>;
|
|
1286
1309
|
};
|
|
1287
1310
|
deployment: {
|
|
1311
|
+
cancel: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
1312
|
+
deploymentId: import("zod").ZodString;
|
|
1313
|
+
projectId: import("zod").ZodString;
|
|
1314
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodVoid, Record<never, never>, Record<never, never>>;
|
|
1288
1315
|
create: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
1289
1316
|
artifact: import("zod").ZodCustom<Blob, Blob>;
|
|
1317
|
+
cancelExisting: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
|
1290
1318
|
manifest: import("zod").ZodArray<import("zod").ZodObject<{
|
|
1291
1319
|
identityKey: import("zod").ZodString;
|
|
1292
1320
|
}, import("zod/v4/core").$strip>>;
|
|
@@ -1298,7 +1326,24 @@ export declare const contract: {
|
|
|
1298
1326
|
rebindAccounts: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
|
1299
1327
|
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
1300
1328
|
id: import("zod").ZodString;
|
|
1301
|
-
}, import("zod/v4/core").$strip>, Record<never, never>,
|
|
1329
|
+
}, import("zod/v4/core").$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
|
|
1330
|
+
DEPLOYMENT_IN_PROGRESS: {
|
|
1331
|
+
readonly data: import("zod").ZodObject<{
|
|
1332
|
+
deploymentId: import("zod").ZodString;
|
|
1333
|
+
status: import("zod").ZodEnum<{
|
|
1334
|
+
succeeded: "succeeded";
|
|
1335
|
+
failed: "failed";
|
|
1336
|
+
planning: "planning";
|
|
1337
|
+
awaiting_authorization: "awaiting_authorization";
|
|
1338
|
+
configuring: "configuring";
|
|
1339
|
+
publishing: "publishing";
|
|
1340
|
+
cancelled: "cancelled";
|
|
1341
|
+
}>;
|
|
1342
|
+
}, import("zod/v4/core").$strip>;
|
|
1343
|
+
readonly message: "A deployment is already in progress.";
|
|
1344
|
+
readonly status: 409;
|
|
1345
|
+
};
|
|
1346
|
+
}>, Record<never, never>>;
|
|
1302
1347
|
get: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
1303
1348
|
deploymentId: import("zod").ZodString;
|
|
1304
1349
|
projectId: import("zod").ZodString;
|
|
@@ -1333,6 +1378,7 @@ export declare const contract: {
|
|
|
1333
1378
|
awaiting_authorization: "awaiting_authorization";
|
|
1334
1379
|
configuring: "configuring";
|
|
1335
1380
|
publishing: "publishing";
|
|
1381
|
+
cancelled: "cancelled";
|
|
1336
1382
|
}>;
|
|
1337
1383
|
}, import("zod/v4/core").$strip>, Record<never, never>, Record<never, never>>;
|
|
1338
1384
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@automate.ax/api-contract",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.28.0",
|
|
4
4
|
"description": "Public oRPC contract for the Automate.ax API.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@automate.ax/codec": "0.
|
|
29
|
+
"@automate.ax/codec": "0.28.0",
|
|
30
30
|
"@orpc/contract": "1.13.14",
|
|
31
31
|
"zod": "^4.3.6"
|
|
32
32
|
},
|
package/src/deployment.ts
CHANGED
|
@@ -17,11 +17,40 @@ export const deploymentTriggerInfoSchema = z.object({
|
|
|
17
17
|
|
|
18
18
|
export type DeploymentTriggerInfo = z.infer<typeof deploymentTriggerInfoSchema>
|
|
19
19
|
|
|
20
|
+
const DEPLOYMENT_STATUS_SCHEMA = z.enum([
|
|
21
|
+
"planning",
|
|
22
|
+
"awaiting_authorization",
|
|
23
|
+
"configuring",
|
|
24
|
+
"publishing",
|
|
25
|
+
"succeeded",
|
|
26
|
+
"failed",
|
|
27
|
+
"cancelled",
|
|
28
|
+
])
|
|
29
|
+
|
|
30
|
+
const DEPLOYMENT_IN_PROGRESS_ERROR = {
|
|
31
|
+
data: z.object({
|
|
32
|
+
deploymentId: z.string(),
|
|
33
|
+
status: DEPLOYMENT_STATUS_SCHEMA,
|
|
34
|
+
}),
|
|
35
|
+
message: "A deployment is already in progress.",
|
|
36
|
+
status: 409,
|
|
37
|
+
} as const
|
|
38
|
+
|
|
20
39
|
export const deploymentContract = {
|
|
40
|
+
cancel: oc
|
|
41
|
+
.input(
|
|
42
|
+
z.object({
|
|
43
|
+
deploymentId: z.string(),
|
|
44
|
+
projectId: z.string(),
|
|
45
|
+
}),
|
|
46
|
+
)
|
|
47
|
+
.output(z.void()),
|
|
21
48
|
create: oc
|
|
49
|
+
.errors({ DEPLOYMENT_IN_PROGRESS: DEPLOYMENT_IN_PROGRESS_ERROR })
|
|
22
50
|
.input(
|
|
23
51
|
z.object({
|
|
24
52
|
artifact: z.instanceof(Blob),
|
|
53
|
+
cancelExisting: z.boolean().default(false),
|
|
25
54
|
manifest: z
|
|
26
55
|
.object({
|
|
27
56
|
identityKey: z.string().min(1),
|
|
@@ -76,14 +105,7 @@ export const deploymentContract = {
|
|
|
76
105
|
id: z.string(),
|
|
77
106
|
name: z.string(),
|
|
78
107
|
}),
|
|
79
|
-
status:
|
|
80
|
-
"planning",
|
|
81
|
-
"awaiting_authorization",
|
|
82
|
-
"configuring",
|
|
83
|
-
"publishing",
|
|
84
|
-
"succeeded",
|
|
85
|
-
"failed",
|
|
86
|
-
]),
|
|
108
|
+
status: DEPLOYMENT_STATUS_SCHEMA,
|
|
87
109
|
}),
|
|
88
110
|
),
|
|
89
111
|
}
|