@automate.ax/api-contract 0.28.0 → 0.29.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.
@@ -27,6 +27,11 @@ export declare const deploymentContract: {
27
27
  }>;
28
28
  projectId: z.ZodString;
29
29
  rebindAccounts: z.ZodDefault<z.ZodBoolean>;
30
+ git: z.ZodOptional<z.ZodObject<{
31
+ commitSha: z.ZodString;
32
+ dirty: z.ZodBoolean;
33
+ repositoryUrl: z.ZodString;
34
+ }, z.core.$strip>>;
30
35
  }, z.core.$strip>, z.ZodObject<{
31
36
  id: z.ZodString;
32
37
  }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
@@ -64,6 +69,11 @@ export declare const deploymentContract: {
64
69
  }, z.core.$strip>>;
65
70
  }, z.core.$strip>>;
66
71
  id: z.ZodString;
72
+ git: z.ZodNullable<z.ZodObject<{
73
+ commitSha: z.ZodString;
74
+ dirty: z.ZodBoolean;
75
+ repositoryUrl: z.ZodString;
76
+ }, z.core.$strip>>;
67
77
  job: z.ZodNullable<z.ZodObject<{
68
78
  attempts: z.ZodNumber;
69
79
  error: z.ZodNullable<z.ZodString>;
@@ -29,6 +29,11 @@ const DEPLOYMENT_IN_PROGRESS_ERROR = {
29
29
  message: "A deployment is already in progress.",
30
30
  status: 409,
31
31
  };
32
+ const GIT_SOURCE_SCHEMA = z.object({
33
+ commitSha: z.string().regex(/^[0-9a-f]{40}(?:[0-9a-f]{24})?$/),
34
+ dirty: z.boolean(),
35
+ repositoryUrl: z.string().min(1),
36
+ });
32
37
  export const deploymentContract = {
33
38
  cancel: oc
34
39
  .input(z.object({
@@ -62,6 +67,7 @@ export const deploymentContract = {
62
67
  mode: z.enum(["reconcile", "upsert"]),
63
68
  projectId: z.string(),
64
69
  rebindAccounts: z.boolean().default(false),
70
+ git: GIT_SOURCE_SCHEMA.optional(),
65
71
  }))
66
72
  .output(z.object({ id: z.string() })),
67
73
  get: oc
@@ -78,6 +84,7 @@ export const deploymentContract = {
78
84
  })
79
85
  .array(),
80
86
  id: z.string(),
87
+ git: GIT_SOURCE_SCHEMA.nullable(),
81
88
  job: z
82
89
  .object({
83
90
  attempts: z.number().int().nonnegative(),
package/dist/index.d.ts CHANGED
@@ -485,6 +485,11 @@ export declare const firstPartyContract: {
485
485
  }>;
486
486
  projectId: import("zod").ZodString;
487
487
  rebindAccounts: import("zod").ZodDefault<import("zod").ZodBoolean>;
488
+ git: import("zod").ZodOptional<import("zod").ZodObject<{
489
+ commitSha: import("zod").ZodString;
490
+ dirty: import("zod").ZodBoolean;
491
+ repositoryUrl: import("zod").ZodString;
492
+ }, import("zod/v4/core").$strip>>;
488
493
  }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
489
494
  id: import("zod").ZodString;
490
495
  }, import("zod/v4/core").$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
@@ -522,6 +527,11 @@ export declare const firstPartyContract: {
522
527
  }, import("zod/v4/core").$strip>>;
523
528
  }, import("zod/v4/core").$strip>>;
524
529
  id: import("zod").ZodString;
530
+ git: import("zod").ZodNullable<import("zod").ZodObject<{
531
+ commitSha: import("zod").ZodString;
532
+ dirty: import("zod").ZodBoolean;
533
+ repositoryUrl: import("zod").ZodString;
534
+ }, import("zod/v4/core").$strip>>;
525
535
  job: import("zod").ZodNullable<import("zod").ZodObject<{
526
536
  attempts: import("zod").ZodNumber;
527
537
  error: import("zod").ZodNullable<import("zod").ZodString>;
@@ -1324,6 +1334,11 @@ export declare const contract: {
1324
1334
  }>;
1325
1335
  projectId: import("zod").ZodString;
1326
1336
  rebindAccounts: import("zod").ZodDefault<import("zod").ZodBoolean>;
1337
+ git: import("zod").ZodOptional<import("zod").ZodObject<{
1338
+ commitSha: import("zod").ZodString;
1339
+ dirty: import("zod").ZodBoolean;
1340
+ repositoryUrl: import("zod").ZodString;
1341
+ }, import("zod/v4/core").$strip>>;
1327
1342
  }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
1328
1343
  id: import("zod").ZodString;
1329
1344
  }, import("zod/v4/core").$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
@@ -1361,6 +1376,11 @@ export declare const contract: {
1361
1376
  }, import("zod/v4/core").$strip>>;
1362
1377
  }, import("zod/v4/core").$strip>>;
1363
1378
  id: import("zod").ZodString;
1379
+ git: import("zod").ZodNullable<import("zod").ZodObject<{
1380
+ commitSha: import("zod").ZodString;
1381
+ dirty: import("zod").ZodBoolean;
1382
+ repositoryUrl: import("zod").ZodString;
1383
+ }, import("zod/v4/core").$strip>>;
1364
1384
  job: import("zod").ZodNullable<import("zod").ZodObject<{
1365
1385
  attempts: import("zod").ZodNumber;
1366
1386
  error: import("zod").ZodNullable<import("zod").ZodString>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@automate.ax/api-contract",
3
- "version": "0.28.0",
3
+ "version": "0.29.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.28.0",
29
+ "@automate.ax/codec": "0.29.0",
30
30
  "@orpc/contract": "1.13.14",
31
31
  "zod": "^4.3.6"
32
32
  },
package/src/deployment.ts CHANGED
@@ -36,6 +36,12 @@ const DEPLOYMENT_IN_PROGRESS_ERROR = {
36
36
  status: 409,
37
37
  } as const
38
38
 
39
+ const GIT_SOURCE_SCHEMA = z.object({
40
+ commitSha: z.string().regex(/^[0-9a-f]{40}(?:[0-9a-f]{24})?$/),
41
+ dirty: z.boolean(),
42
+ repositoryUrl: z.string().min(1),
43
+ })
44
+
39
45
  export const deploymentContract = {
40
46
  cancel: oc
41
47
  .input(
@@ -73,6 +79,7 @@ export const deploymentContract = {
73
79
  mode: z.enum(["reconcile", "upsert"]),
74
80
  projectId: z.string(),
75
81
  rebindAccounts: z.boolean().default(false),
82
+ git: GIT_SOURCE_SCHEMA.optional(),
76
83
  }),
77
84
  )
78
85
  .output(z.object({ id: z.string() })),
@@ -93,6 +100,7 @@ export const deploymentContract = {
93
100
  })
94
101
  .array(),
95
102
  id: z.string(),
103
+ git: GIT_SOURCE_SCHEMA.nullable(),
96
104
  job: z
97
105
  .object({
98
106
  attempts: z.number().int().nonnegative(),