@automate.ax/api-contract 0.53.0 → 0.55.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.
@@ -5,33 +5,6 @@ export declare const automationExecutionStatusSchema: z.ZodEnum<{
5
5
  completed: "completed";
6
6
  }>;
7
7
  export declare const automationContract: {
8
- get: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
9
- automationId: z.ZodString;
10
- projectId: z.ZodString;
11
- }, z.core.$strip>, z.ZodObject<{
12
- activeDeployment: z.ZodObject<{
13
- createdAt: z.ZodDate;
14
- git: z.ZodNullable<z.ZodObject<{
15
- commitSha: z.ZodString;
16
- dirty: z.ZodBoolean;
17
- repositoryUrl: z.ZodString;
18
- }, z.core.$strip>>;
19
- id: z.ZodString;
20
- }, z.core.$strip>;
21
- createdAt: z.ZodDate;
22
- description: z.ZodString;
23
- id: z.ZodString;
24
- identityKey: z.ZodString;
25
- triggers: z.ZodArray<z.ZodObject<{
26
- details: z.ZodArray<z.ZodObject<{
27
- label: z.ZodString;
28
- value: z.ZodString;
29
- }, z.core.$strip>>;
30
- name: z.ZodString;
31
- type: z.ZodString;
32
- }, z.core.$strip>>;
33
- updatedAt: z.ZodDate;
34
- }, z.core.$strip>, Record<never, never>, Record<never, never>>;
35
8
  getExecution: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
36
9
  automationId: z.ZodString;
37
10
  executionId: z.ZodString;
@@ -43,8 +16,8 @@ export declare const automationContract: {
43
16
  running: "running";
44
17
  completed: "completed";
45
18
  }>;
46
- createdAt: z.ZodDate;
47
19
  completedAt: z.ZodNullable<z.ZodDate>;
20
+ createdAt: z.ZodDate;
48
21
  failure: z.ZodNullable<z.ZodObject<{
49
22
  message: z.ZodString;
50
23
  name: z.ZodString;
@@ -1,7 +1,6 @@
1
1
  import { encodableSchema } from "@automate.ax/codec";
2
2
  import { oc } from "@orpc/contract";
3
3
  import { z } from "zod";
4
- import { deploymentTriggerInfoSchema } from "./deployment.js";
5
4
  export const automationExecutionStatusSchema = z.enum([
6
5
  "running",
7
6
  "completed",
@@ -20,30 +19,6 @@ const EXECUTION_SUMMARY_SCHEMA = z.object({
20
19
  status: automationExecutionStatusSchema,
21
20
  });
22
21
  export const automationContract = {
23
- get: oc
24
- .input(z.object({
25
- automationId: z.string(),
26
- projectId: z.string(),
27
- }))
28
- .output(z.object({
29
- activeDeployment: z.object({
30
- createdAt: z.date(),
31
- git: z
32
- .object({
33
- commitSha: z.string(),
34
- dirty: z.boolean(),
35
- repositoryUrl: z.string(),
36
- })
37
- .nullable(),
38
- id: z.string(),
39
- }),
40
- createdAt: z.date(),
41
- description: z.string(),
42
- id: z.string(),
43
- identityKey: z.string(),
44
- triggers: deploymentTriggerInfoSchema.array(),
45
- updatedAt: z.date(),
46
- })),
47
22
  getExecution: oc
48
23
  .input(z.object({
49
24
  automationId: z.string(),
@@ -1,35 +1,6 @@
1
1
  import { z } from "zod";
2
2
  /** SDK compatibility version used to select the immutable runtime image. */
3
3
  export declare const AUTOMATION_SDK_VERSION = "2";
4
- export type HttpTriggerScope = "trigger" | "automation" | "project";
5
- export interface HttpTriggerEndpointOptions {
6
- appOrigin: string;
7
- automationId: string;
8
- hookSlot: number;
9
- projectId: string;
10
- scope: HttpTriggerScope;
11
- }
12
- /**
13
- * Returns the public URL for one deployed HTTP trigger.
14
- *
15
- * @param options - Public origin and trigger identity.
16
- */
17
- export declare function getHttpTriggerEndpoint(options: HttpTriggerEndpointOptions): string;
18
- /**
19
- * Returns the durable endpoint identity for one configured HTTP scope.
20
- *
21
- * @param options - Trigger and owning resource identity.
22
- */
23
- export declare function getHttpTriggerEndpointKey(options: Omit<HttpTriggerEndpointOptions, "appOrigin">): string;
24
- export declare const deploymentTriggerInfoSchema: z.ZodObject<{
25
- details: z.ZodArray<z.ZodObject<{
26
- label: z.ZodString;
27
- value: z.ZodString;
28
- }, z.core.$strip>>;
29
- name: z.ZodString;
30
- type: z.ZodString;
31
- }, z.core.$strip>;
32
- export type DeploymentTriggerInfo = z.infer<typeof deploymentTriggerInfoSchema>;
33
4
  export declare const deploymentContract: {
34
5
  cancel: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
35
6
  deploymentId: z.ZodString;
@@ -50,6 +21,7 @@ export declare const deploymentContract: {
50
21
  git: z.ZodOptional<z.ZodObject<{
51
22
  commitSha: z.ZodString;
52
23
  dirty: z.ZodBoolean;
24
+ projectPath: z.ZodString;
53
25
  repositoryUrl: z.ZodString;
54
26
  }, z.core.$strip>>;
55
27
  }, z.core.$strip>, z.ZodObject<{
@@ -80,13 +52,10 @@ export declare const deploymentContract: {
80
52
  description: z.ZodString;
81
53
  id: z.ZodString;
82
54
  identityKey: z.ZodString;
83
- triggers: z.ZodArray<z.ZodObject<{
84
- details: z.ZodArray<z.ZodObject<{
85
- label: z.ZodString;
86
- value: z.ZodString;
87
- }, z.core.$strip>>;
88
- name: z.ZodString;
89
- type: z.ZodString;
55
+ subscriptions: z.ZodArray<z.ZodObject<{
56
+ config: z.ZodJSONSchema;
57
+ eventType: z.ZodString;
58
+ hookSlot: z.ZodNumber;
90
59
  }, z.core.$strip>>;
91
60
  }, z.core.$strip>>;
92
61
  createdAt: z.ZodDate;
@@ -94,6 +63,7 @@ export declare const deploymentContract: {
94
63
  git: z.ZodNullable<z.ZodObject<{
95
64
  commitSha: z.ZodString;
96
65
  dirty: z.ZodBoolean;
66
+ projectPath: z.ZodString;
97
67
  repositoryUrl: z.ZodString;
98
68
  }, z.core.$strip>>;
99
69
  job: z.ZodNullable<z.ZodObject<{
@@ -2,36 +2,6 @@ import { oc } from "@orpc/contract";
2
2
  import { z } from "zod";
3
3
  /** SDK compatibility version used to select the immutable runtime image. */
4
4
  export const AUTOMATION_SDK_VERSION = "2";
5
- /**
6
- * Returns the public URL for one deployed HTTP trigger.
7
- *
8
- * @param options - Public origin and trigger identity.
9
- */
10
- export function getHttpTriggerEndpoint(options) {
11
- return new URL(`/x/${getHttpTriggerEndpointKey(options)}/`, options.appOrigin).toString();
12
- }
13
- /**
14
- * Returns the durable endpoint identity for one configured HTTP scope.
15
- *
16
- * @param options - Trigger and owning resource identity.
17
- */
18
- export function getHttpTriggerEndpointKey(options) {
19
- if (options.scope === "project")
20
- return options.projectId;
21
- if (options.scope === "automation")
22
- return options.automationId;
23
- return `${options.automationId}:${options.hookSlot}`;
24
- }
25
- export const deploymentTriggerInfoSchema = z.object({
26
- details: z
27
- .object({
28
- label: z.string(),
29
- value: z.string(),
30
- })
31
- .array(),
32
- name: z.string(),
33
- type: z.string(),
34
- });
35
5
  const DEPLOYMENT_STATUS_SCHEMA = z.enum([
36
6
  "planning",
37
7
  "awaiting_authorization",
@@ -52,6 +22,7 @@ const DEPLOYMENT_IN_PROGRESS_ERROR = {
52
22
  const GIT_SOURCE_SCHEMA = z.object({
53
23
  commitSha: z.string().regex(/^[0-9a-f]{40}(?:[0-9a-f]{24})?$/),
54
24
  dirty: z.boolean(),
25
+ projectPath: z.string(),
55
26
  repositoryUrl: z.string().min(1),
56
27
  });
57
28
  export const deploymentContract = {
@@ -101,7 +72,13 @@ export const deploymentContract = {
101
72
  description: z.string(),
102
73
  id: z.string(),
103
74
  identityKey: z.string(),
104
- triggers: deploymentTriggerInfoSchema.array(),
75
+ subscriptions: z
76
+ .object({
77
+ config: z.json(),
78
+ eventType: z.string(),
79
+ hookSlot: z.number().int().nonnegative(),
80
+ })
81
+ .array(),
105
82
  })
106
83
  .array(),
107
84
  createdAt: z.date(),
package/dist/index.d.ts CHANGED
@@ -1,12 +1,12 @@
1
1
  export { automationExecutionStatusSchema } from "./automation.js";
2
- export { AUTOMATION_SDK_VERSION, deploymentTriggerInfoSchema, getHttpTriggerEndpoint, getHttpTriggerEndpointKey, type DeploymentTriggerInfo, type HttpTriggerEndpointOptions, type HttpTriggerScope, } from "./deployment.js";
2
+ export { AUTOMATION_SDK_VERSION } from "./deployment.js";
3
3
  export { integrationAccountOutputSchema } from "./account.js";
4
4
  export { AUTOMATION_INVOCATION_DEFAULT_ENTRYPOINT, AUTOMATION_INVOCATION_RESERVED_ENTRYPOINT_PREFIX, DEFAULT_GATEWAY_MODEL_ID, automationInvocationInputSchema, automationInvocationOutputSchema, automationInvocationScheduleSchema, generationInputSchema, generationResultSchema, runtimeContract, type GenerationInput, type GenerationResult, type RuntimeGenerationInput, } from "./runtime.js";
5
5
  export type { GatewayModelId } from "@ai-sdk/gateway";
6
6
  export { createdOrganizationApiKeyOutputSchema, organizationApiKeyOutputSchema, } from "./api-key.js";
7
- export { activeSubscriptionOutputSchema, createdInvitationOutputSchema, organizationDetailsOutputSchema, organizationInvitationOutputSchema, organizationMemberOutputSchema, organizationPhoneNumberOutputSchema, organizationProjectOutputSchema, organizationRoleSchema, organizationSummaryOutputSchema, publicOrganizationOutputSchema, } from "./org.js";
7
+ export { activeSubscriptionOutputSchema, createdInvitationOutputSchema, organizationDetailsOutputSchema, organizationInvitationOutputSchema, organizationMemberOutputSchema, organizationProjectOutputSchema, organizationRoleSchema, organizationSummaryOutputSchema, publicOrganizationOutputSchema, } from "./org.js";
8
8
  export { projectOutputSchema } from "./project.js";
9
- export { e164PhoneNumberSchema, reasonableNameSchema } from "./schemas.js";
9
+ export { reasonableNameSchema } from "./schemas.js";
10
10
  export { userOutputSchema } from "./auth.js";
11
11
  export { managementPermissionStatement, managementRolePermissions, organizationApiKeyPermissions, type ManagementPermission, } from "./permissions.js";
12
12
  /** Procedures exposed by the public Node client and OpenAPI document. */
@@ -97,12 +97,10 @@ export declare const publicContract: {
97
97
  emailRecipients: import("zod").ZodNumber;
98
98
  projects: import("zod").ZodNumber;
99
99
  seats: import("zod").ZodNumber;
100
- smsSegments: import("zod").ZodNumber;
101
100
  }, import("zod/v4/core").$strip>;
102
101
  usage: import("zod").ZodObject<{
103
102
  aiSpendUsd: import("zod").ZodNumber;
104
103
  emailRecipients: import("zod").ZodNumber;
105
- smsSegments: import("zod").ZodNumber;
106
104
  }, import("zod/v4/core").$strip>;
107
105
  members: import("zod").ZodArray<import("zod").ZodObject<{
108
106
  id: import("zod").ZodString;
@@ -129,13 +127,6 @@ export declare const publicContract: {
129
127
  createdAt: import("zod").ZodDate;
130
128
  expiresAt: import("zod").ZodDate;
131
129
  }, import("zod/v4/core").$strip>>;
132
- phoneNumbers: import("zod").ZodArray<import("zod").ZodObject<{
133
- id: import("zod").ZodString;
134
- phoneNumber: import("zod").ZodString;
135
- createdAt: import("zod").ZodDate;
136
- verifiedAt: import("zod").ZodNullable<import("zod").ZodDate>;
137
- consentedAt: import("zod").ZodNullable<import("zod").ZodDate>;
138
- }, import("zod/v4/core").$strip>>;
139
130
  projects: import("zod").ZodArray<import("zod").ZodObject<{
140
131
  id: import("zod").ZodString;
141
132
  name: import("zod").ZodString;
@@ -197,12 +188,10 @@ export declare const publicContract: {
197
188
  emailRecipients: import("zod").ZodNumber;
198
189
  projects: import("zod").ZodNumber;
199
190
  seats: import("zod").ZodNumber;
200
- smsSegments: import("zod").ZodNumber;
201
191
  }, import("zod/v4/core").$strip>;
202
192
  usage: import("zod").ZodObject<{
203
193
  aiSpendUsd: import("zod").ZodNumber;
204
194
  emailRecipients: import("zod").ZodNumber;
205
- smsSegments: import("zod").ZodNumber;
206
195
  }, import("zod/v4/core").$strip>;
207
196
  }, import("zod/v4/core").$strip>>, Record<never, never>, Record<never, never>>;
208
197
  remove: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
@@ -354,33 +343,6 @@ export declare const firstPartyContract: {
354
343
  }, import("zod/v4/core").$strip>, import("zod").ZodVoid, Record<never, never>, Record<never, never>>;
355
344
  };
356
345
  automation: {
357
- get: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
358
- automationId: import("zod").ZodString;
359
- projectId: import("zod").ZodString;
360
- }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
361
- activeDeployment: import("zod").ZodObject<{
362
- createdAt: import("zod").ZodDate;
363
- git: import("zod").ZodNullable<import("zod").ZodObject<{
364
- commitSha: import("zod").ZodString;
365
- dirty: import("zod").ZodBoolean;
366
- repositoryUrl: import("zod").ZodString;
367
- }, import("zod/v4/core").$strip>>;
368
- id: import("zod").ZodString;
369
- }, import("zod/v4/core").$strip>;
370
- createdAt: import("zod").ZodDate;
371
- description: import("zod").ZodString;
372
- id: import("zod").ZodString;
373
- identityKey: import("zod").ZodString;
374
- triggers: import("zod").ZodArray<import("zod").ZodObject<{
375
- details: import("zod").ZodArray<import("zod").ZodObject<{
376
- label: import("zod").ZodString;
377
- value: import("zod").ZodString;
378
- }, import("zod/v4/core").$strip>>;
379
- name: import("zod").ZodString;
380
- type: import("zod").ZodString;
381
- }, import("zod/v4/core").$strip>>;
382
- updatedAt: import("zod").ZodDate;
383
- }, import("zod/v4/core").$strip>, Record<never, never>, Record<never, never>>;
384
346
  getExecution: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
385
347
  automationId: import("zod").ZodString;
386
348
  executionId: import("zod").ZodString;
@@ -392,8 +354,8 @@ export declare const firstPartyContract: {
392
354
  running: "running";
393
355
  completed: "completed";
394
356
  }>;
395
- createdAt: import("zod").ZodDate;
396
357
  completedAt: import("zod").ZodNullable<import("zod").ZodDate>;
358
+ createdAt: import("zod").ZodDate;
397
359
  failure: import("zod").ZodNullable<import("zod").ZodObject<{
398
360
  message: import("zod").ZodString;
399
361
  name: import("zod").ZodString;
@@ -530,6 +492,7 @@ export declare const firstPartyContract: {
530
492
  git: import("zod").ZodOptional<import("zod").ZodObject<{
531
493
  commitSha: import("zod").ZodString;
532
494
  dirty: import("zod").ZodBoolean;
495
+ projectPath: import("zod").ZodString;
533
496
  repositoryUrl: import("zod").ZodString;
534
497
  }, import("zod/v4/core").$strip>>;
535
498
  }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
@@ -560,13 +523,10 @@ export declare const firstPartyContract: {
560
523
  description: import("zod").ZodString;
561
524
  id: import("zod").ZodString;
562
525
  identityKey: import("zod").ZodString;
563
- triggers: import("zod").ZodArray<import("zod").ZodObject<{
564
- details: import("zod").ZodArray<import("zod").ZodObject<{
565
- label: import("zod").ZodString;
566
- value: import("zod").ZodString;
567
- }, import("zod/v4/core").$strip>>;
568
- name: import("zod").ZodString;
569
- type: import("zod").ZodString;
526
+ subscriptions: import("zod").ZodArray<import("zod").ZodObject<{
527
+ config: import("zod").ZodJSONSchema;
528
+ eventType: import("zod").ZodString;
529
+ hookSlot: import("zod").ZodNumber;
570
530
  }, import("zod/v4/core").$strip>>;
571
531
  }, import("zod/v4/core").$strip>>;
572
532
  createdAt: import("zod").ZodDate;
@@ -574,6 +534,7 @@ export declare const firstPartyContract: {
574
534
  git: import("zod").ZodNullable<import("zod").ZodObject<{
575
535
  commitSha: import("zod").ZodString;
576
536
  dirty: import("zod").ZodBoolean;
537
+ projectPath: import("zod").ZodString;
577
538
  repositoryUrl: import("zod").ZodString;
578
539
  }, import("zod/v4/core").$strip>>;
579
540
  job: import("zod").ZodNullable<import("zod").ZodObject<{
@@ -645,23 +606,6 @@ export declare const firstPartyContract: {
645
606
  clientSecret: import("zod").ZodString;
646
607
  publishableKey: import("zod").ZodString;
647
608
  }, import("zod/v4/core").$strip>, Record<never, never>, Record<never, never>>;
648
- removePhoneNumber: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
649
- organizationId: import("zod").ZodString;
650
- phoneNumberId: import("zod").ZodString;
651
- }, import("zod/v4/core").$strip>, import("zod").ZodVoid, Record<never, never>, Record<never, never>>;
652
- requestPhoneNumberVerification: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
653
- organizationId: import("zod").ZodString;
654
- phoneNumber: import("zod").ZodString;
655
- smsConsent: import("zod").ZodLiteral<true>;
656
- }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
657
- expiresAt: import("zod").ZodDate;
658
- phoneNumberId: import("zod").ZodString;
659
- }, import("zod/v4/core").$strip>, Record<never, never>, Record<never, never>>;
660
- verifyPhoneNumber: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
661
- organizationId: import("zod").ZodString;
662
- phoneNumberId: import("zod").ZodString;
663
- code: import("zod").ZodString;
664
- }, import("zod/v4/core").$strip>, import("zod").ZodVoid, Record<never, never>, Record<never, never>>;
665
609
  create: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
666
610
  id: import("zod").ZodOptional<import("zod").ZodString>;
667
611
  name: import("zod").ZodString;
@@ -707,12 +651,10 @@ export declare const firstPartyContract: {
707
651
  emailRecipients: import("zod").ZodNumber;
708
652
  projects: import("zod").ZodNumber;
709
653
  seats: import("zod").ZodNumber;
710
- smsSegments: import("zod").ZodNumber;
711
654
  }, import("zod/v4/core").$strip>;
712
655
  usage: import("zod").ZodObject<{
713
656
  aiSpendUsd: import("zod").ZodNumber;
714
657
  emailRecipients: import("zod").ZodNumber;
715
- smsSegments: import("zod").ZodNumber;
716
658
  }, import("zod/v4/core").$strip>;
717
659
  members: import("zod").ZodArray<import("zod").ZodObject<{
718
660
  id: import("zod").ZodString;
@@ -739,13 +681,6 @@ export declare const firstPartyContract: {
739
681
  createdAt: import("zod").ZodDate;
740
682
  expiresAt: import("zod").ZodDate;
741
683
  }, import("zod/v4/core").$strip>>;
742
- phoneNumbers: import("zod").ZodArray<import("zod").ZodObject<{
743
- id: import("zod").ZodString;
744
- phoneNumber: import("zod").ZodString;
745
- createdAt: import("zod").ZodDate;
746
- verifiedAt: import("zod").ZodNullable<import("zod").ZodDate>;
747
- consentedAt: import("zod").ZodNullable<import("zod").ZodDate>;
748
- }, import("zod/v4/core").$strip>>;
749
684
  projects: import("zod").ZodArray<import("zod").ZodObject<{
750
685
  id: import("zod").ZodString;
751
686
  name: import("zod").ZodString;
@@ -807,12 +742,10 @@ export declare const firstPartyContract: {
807
742
  emailRecipients: import("zod").ZodNumber;
808
743
  projects: import("zod").ZodNumber;
809
744
  seats: import("zod").ZodNumber;
810
- smsSegments: import("zod").ZodNumber;
811
745
  }, import("zod/v4/core").$strip>;
812
746
  usage: import("zod").ZodObject<{
813
747
  aiSpendUsd: import("zod").ZodNumber;
814
748
  emailRecipients: import("zod").ZodNumber;
815
- smsSegments: import("zod").ZodNumber;
816
749
  }, import("zod/v4/core").$strip>;
817
750
  }, import("zod/v4/core").$strip>>, Record<never, never>, Record<never, never>>;
818
751
  remove: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
@@ -1630,13 +1563,6 @@ export declare const contract: {
1630
1563
  }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
1631
1564
  id: import("zod").ZodNullable<import("zod").ZodString>;
1632
1565
  }, import("zod/v4/core").$strip>, Record<never, never>, Record<never, never>>;
1633
- sendSms: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
1634
- deliveryIndex: import("zod").ZodDefault<import("zod").ZodNumber>;
1635
- text: import("zod").ZodString;
1636
- to: import("zod").ZodDefault<import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodLiteral<"*">]>>;
1637
- }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
1638
- ids: import("zod").ZodArray<import("zod").ZodString>;
1639
- }, import("zod/v4/core").$strip>, Record<never, never>, Record<never, never>>;
1640
1566
  };
1641
1567
  account: {
1642
1568
  beginConnection: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
@@ -1690,33 +1616,6 @@ export declare const contract: {
1690
1616
  }, import("zod/v4/core").$strip>, import("zod").ZodVoid, Record<never, never>, Record<never, never>>;
1691
1617
  };
1692
1618
  automation: {
1693
- get: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
1694
- automationId: import("zod").ZodString;
1695
- projectId: import("zod").ZodString;
1696
- }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
1697
- activeDeployment: import("zod").ZodObject<{
1698
- createdAt: import("zod").ZodDate;
1699
- git: import("zod").ZodNullable<import("zod").ZodObject<{
1700
- commitSha: import("zod").ZodString;
1701
- dirty: import("zod").ZodBoolean;
1702
- repositoryUrl: import("zod").ZodString;
1703
- }, import("zod/v4/core").$strip>>;
1704
- id: import("zod").ZodString;
1705
- }, import("zod/v4/core").$strip>;
1706
- createdAt: import("zod").ZodDate;
1707
- description: import("zod").ZodString;
1708
- id: import("zod").ZodString;
1709
- identityKey: import("zod").ZodString;
1710
- triggers: import("zod").ZodArray<import("zod").ZodObject<{
1711
- details: import("zod").ZodArray<import("zod").ZodObject<{
1712
- label: import("zod").ZodString;
1713
- value: import("zod").ZodString;
1714
- }, import("zod/v4/core").$strip>>;
1715
- name: import("zod").ZodString;
1716
- type: import("zod").ZodString;
1717
- }, import("zod/v4/core").$strip>>;
1718
- updatedAt: import("zod").ZodDate;
1719
- }, import("zod/v4/core").$strip>, Record<never, never>, Record<never, never>>;
1720
1619
  getExecution: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
1721
1620
  automationId: import("zod").ZodString;
1722
1621
  executionId: import("zod").ZodString;
@@ -1728,8 +1627,8 @@ export declare const contract: {
1728
1627
  running: "running";
1729
1628
  completed: "completed";
1730
1629
  }>;
1731
- createdAt: import("zod").ZodDate;
1732
1630
  completedAt: import("zod").ZodNullable<import("zod").ZodDate>;
1631
+ createdAt: import("zod").ZodDate;
1733
1632
  failure: import("zod").ZodNullable<import("zod").ZodObject<{
1734
1633
  message: import("zod").ZodString;
1735
1634
  name: import("zod").ZodString;
@@ -1809,6 +1708,7 @@ export declare const contract: {
1809
1708
  git: import("zod").ZodOptional<import("zod").ZodObject<{
1810
1709
  commitSha: import("zod").ZodString;
1811
1710
  dirty: import("zod").ZodBoolean;
1711
+ projectPath: import("zod").ZodString;
1812
1712
  repositoryUrl: import("zod").ZodString;
1813
1713
  }, import("zod/v4/core").$strip>>;
1814
1714
  }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
@@ -1839,13 +1739,10 @@ export declare const contract: {
1839
1739
  description: import("zod").ZodString;
1840
1740
  id: import("zod").ZodString;
1841
1741
  identityKey: import("zod").ZodString;
1842
- triggers: import("zod").ZodArray<import("zod").ZodObject<{
1843
- details: import("zod").ZodArray<import("zod").ZodObject<{
1844
- label: import("zod").ZodString;
1845
- value: import("zod").ZodString;
1846
- }, import("zod/v4/core").$strip>>;
1847
- name: import("zod").ZodString;
1848
- type: import("zod").ZodString;
1742
+ subscriptions: import("zod").ZodArray<import("zod").ZodObject<{
1743
+ config: import("zod").ZodJSONSchema;
1744
+ eventType: import("zod").ZodString;
1745
+ hookSlot: import("zod").ZodNumber;
1849
1746
  }, import("zod/v4/core").$strip>>;
1850
1747
  }, import("zod/v4/core").$strip>>;
1851
1748
  createdAt: import("zod").ZodDate;
@@ -1853,6 +1750,7 @@ export declare const contract: {
1853
1750
  git: import("zod").ZodNullable<import("zod").ZodObject<{
1854
1751
  commitSha: import("zod").ZodString;
1855
1752
  dirty: import("zod").ZodBoolean;
1753
+ projectPath: import("zod").ZodString;
1856
1754
  repositoryUrl: import("zod").ZodString;
1857
1755
  }, import("zod/v4/core").$strip>>;
1858
1756
  job: import("zod").ZodNullable<import("zod").ZodObject<{
@@ -1924,23 +1822,6 @@ export declare const contract: {
1924
1822
  clientSecret: import("zod").ZodString;
1925
1823
  publishableKey: import("zod").ZodString;
1926
1824
  }, import("zod/v4/core").$strip>, Record<never, never>, Record<never, never>>;
1927
- removePhoneNumber: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
1928
- organizationId: import("zod").ZodString;
1929
- phoneNumberId: import("zod").ZodString;
1930
- }, import("zod/v4/core").$strip>, import("zod").ZodVoid, Record<never, never>, Record<never, never>>;
1931
- requestPhoneNumberVerification: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
1932
- organizationId: import("zod").ZodString;
1933
- phoneNumber: import("zod").ZodString;
1934
- smsConsent: import("zod").ZodLiteral<true>;
1935
- }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
1936
- expiresAt: import("zod").ZodDate;
1937
- phoneNumberId: import("zod").ZodString;
1938
- }, import("zod/v4/core").$strip>, Record<never, never>, Record<never, never>>;
1939
- verifyPhoneNumber: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
1940
- organizationId: import("zod").ZodString;
1941
- phoneNumberId: import("zod").ZodString;
1942
- code: import("zod").ZodString;
1943
- }, import("zod/v4/core").$strip>, import("zod").ZodVoid, Record<never, never>, Record<never, never>>;
1944
1825
  create: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
1945
1826
  id: import("zod").ZodOptional<import("zod").ZodString>;
1946
1827
  name: import("zod").ZodString;
@@ -1986,12 +1867,10 @@ export declare const contract: {
1986
1867
  emailRecipients: import("zod").ZodNumber;
1987
1868
  projects: import("zod").ZodNumber;
1988
1869
  seats: import("zod").ZodNumber;
1989
- smsSegments: import("zod").ZodNumber;
1990
1870
  }, import("zod/v4/core").$strip>;
1991
1871
  usage: import("zod").ZodObject<{
1992
1872
  aiSpendUsd: import("zod").ZodNumber;
1993
1873
  emailRecipients: import("zod").ZodNumber;
1994
- smsSegments: import("zod").ZodNumber;
1995
1874
  }, import("zod/v4/core").$strip>;
1996
1875
  members: import("zod").ZodArray<import("zod").ZodObject<{
1997
1876
  id: import("zod").ZodString;
@@ -2018,13 +1897,6 @@ export declare const contract: {
2018
1897
  createdAt: import("zod").ZodDate;
2019
1898
  expiresAt: import("zod").ZodDate;
2020
1899
  }, import("zod/v4/core").$strip>>;
2021
- phoneNumbers: import("zod").ZodArray<import("zod").ZodObject<{
2022
- id: import("zod").ZodString;
2023
- phoneNumber: import("zod").ZodString;
2024
- createdAt: import("zod").ZodDate;
2025
- verifiedAt: import("zod").ZodNullable<import("zod").ZodDate>;
2026
- consentedAt: import("zod").ZodNullable<import("zod").ZodDate>;
2027
- }, import("zod/v4/core").$strip>>;
2028
1900
  projects: import("zod").ZodArray<import("zod").ZodObject<{
2029
1901
  id: import("zod").ZodString;
2030
1902
  name: import("zod").ZodString;
@@ -2086,12 +1958,10 @@ export declare const contract: {
2086
1958
  emailRecipients: import("zod").ZodNumber;
2087
1959
  projects: import("zod").ZodNumber;
2088
1960
  seats: import("zod").ZodNumber;
2089
- smsSegments: import("zod").ZodNumber;
2090
1961
  }, import("zod/v4/core").$strip>;
2091
1962
  usage: import("zod").ZodObject<{
2092
1963
  aiSpendUsd: import("zod").ZodNumber;
2093
1964
  emailRecipients: import("zod").ZodNumber;
2094
- smsSegments: import("zod").ZodNumber;
2095
1965
  }, import("zod/v4/core").$strip>;
2096
1966
  }, import("zod/v4/core").$strip>>, Record<never, never>, Record<never, never>>;
2097
1967
  remove: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
package/dist/index.js CHANGED
@@ -9,13 +9,13 @@ import { orgContract } from "./org.js";
9
9
  import { projectContract } from "./project.js";
10
10
  import { runtimeContract } from "./runtime.js";
11
11
  export { automationExecutionStatusSchema } from "./automation.js";
12
- export { AUTOMATION_SDK_VERSION, deploymentTriggerInfoSchema, getHttpTriggerEndpoint, getHttpTriggerEndpointKey, } from "./deployment.js";
12
+ export { AUTOMATION_SDK_VERSION } from "./deployment.js";
13
13
  export { integrationAccountOutputSchema } from "./account.js";
14
14
  export { AUTOMATION_INVOCATION_DEFAULT_ENTRYPOINT, AUTOMATION_INVOCATION_RESERVED_ENTRYPOINT_PREFIX, DEFAULT_GATEWAY_MODEL_ID, automationInvocationInputSchema, automationInvocationOutputSchema, automationInvocationScheduleSchema, generationInputSchema, generationResultSchema, runtimeContract, } from "./runtime.js";
15
15
  export { createdOrganizationApiKeyOutputSchema, organizationApiKeyOutputSchema, } from "./api-key.js";
16
- export { activeSubscriptionOutputSchema, createdInvitationOutputSchema, organizationDetailsOutputSchema, organizationInvitationOutputSchema, organizationMemberOutputSchema, organizationPhoneNumberOutputSchema, organizationProjectOutputSchema, organizationRoleSchema, organizationSummaryOutputSchema, publicOrganizationOutputSchema, } from "./org.js";
16
+ export { activeSubscriptionOutputSchema, createdInvitationOutputSchema, organizationDetailsOutputSchema, organizationInvitationOutputSchema, organizationMemberOutputSchema, organizationProjectOutputSchema, organizationRoleSchema, organizationSummaryOutputSchema, publicOrganizationOutputSchema, } from "./org.js";
17
17
  export { projectOutputSchema } from "./project.js";
18
- export { e164PhoneNumberSchema, reasonableNameSchema } from "./schemas.js";
18
+ export { reasonableNameSchema } from "./schemas.js";
19
19
  export { userOutputSchema } from "./auth.js";
20
20
  export { managementPermissionStatement, managementRolePermissions, organizationApiKeyPermissions, } from "./permissions.js";
21
21
  /** Procedures exposed by the public Node client and OpenAPI document. */
@@ -60,9 +60,6 @@ export const firstPartyContract = {
60
60
  createBillingPortal: orgContract.createBillingPortal,
61
61
  createCheckout: orgContract.createCheckout,
62
62
  createEmbeddedCheckout: orgContract.createEmbeddedCheckout,
63
- removePhoneNumber: orgContract.removePhoneNumber,
64
- requestPhoneNumberVerification: orgContract.requestPhoneNumberVerification,
65
- verifyPhoneNumber: orgContract.verifyPhoneNumber,
66
63
  },
67
64
  project: {
68
65
  ...publicContract.project,
package/dist/org.d.ts CHANGED
@@ -46,21 +46,12 @@ export declare const organizationSummaryOutputSchema: z.ZodObject<{
46
46
  emailRecipients: z.ZodNumber;
47
47
  projects: z.ZodNumber;
48
48
  seats: z.ZodNumber;
49
- smsSegments: z.ZodNumber;
50
49
  }, z.core.$strip>;
51
50
  usage: z.ZodObject<{
52
51
  aiSpendUsd: z.ZodNumber;
53
52
  emailRecipients: z.ZodNumber;
54
- smsSegments: z.ZodNumber;
55
53
  }, z.core.$strip>;
56
54
  }, z.core.$strip>;
57
- export declare const organizationPhoneNumberOutputSchema: z.ZodObject<{
58
- id: z.ZodString;
59
- phoneNumber: z.ZodString;
60
- createdAt: z.ZodDate;
61
- verifiedAt: z.ZodNullable<z.ZodDate>;
62
- consentedAt: z.ZodNullable<z.ZodDate>;
63
- }, z.core.$strip>;
64
55
  export declare const organizationMemberOutputSchema: z.ZodObject<{
65
56
  id: z.ZodString;
66
57
  userId: z.ZodString;
@@ -122,12 +113,10 @@ export declare const organizationDetailsOutputSchema: z.ZodObject<{
122
113
  emailRecipients: z.ZodNumber;
123
114
  projects: z.ZodNumber;
124
115
  seats: z.ZodNumber;
125
- smsSegments: z.ZodNumber;
126
116
  }, z.core.$strip>;
127
117
  usage: z.ZodObject<{
128
118
  aiSpendUsd: z.ZodNumber;
129
119
  emailRecipients: z.ZodNumber;
130
- smsSegments: z.ZodNumber;
131
120
  }, z.core.$strip>;
132
121
  members: z.ZodArray<z.ZodObject<{
133
122
  id: z.ZodString;
@@ -154,13 +143,6 @@ export declare const organizationDetailsOutputSchema: z.ZodObject<{
154
143
  createdAt: z.ZodDate;
155
144
  expiresAt: z.ZodDate;
156
145
  }, z.core.$strip>>;
157
- phoneNumbers: z.ZodArray<z.ZodObject<{
158
- id: z.ZodString;
159
- phoneNumber: z.ZodString;
160
- createdAt: z.ZodDate;
161
- verifiedAt: z.ZodNullable<z.ZodDate>;
162
- consentedAt: z.ZodNullable<z.ZodDate>;
163
- }, z.core.$strip>>;
164
146
  projects: z.ZodArray<z.ZodObject<{
165
147
  id: z.ZodString;
166
148
  name: z.ZodString;
@@ -242,12 +224,10 @@ export declare const orgContract: {
242
224
  emailRecipients: z.ZodNumber;
243
225
  projects: z.ZodNumber;
244
226
  seats: z.ZodNumber;
245
- smsSegments: z.ZodNumber;
246
227
  }, z.core.$strip>;
247
228
  usage: z.ZodObject<{
248
229
  aiSpendUsd: z.ZodNumber;
249
230
  emailRecipients: z.ZodNumber;
250
- smsSegments: z.ZodNumber;
251
231
  }, z.core.$strip>;
252
232
  members: z.ZodArray<z.ZodObject<{
253
233
  id: z.ZodString;
@@ -274,13 +254,6 @@ export declare const orgContract: {
274
254
  createdAt: z.ZodDate;
275
255
  expiresAt: z.ZodDate;
276
256
  }, z.core.$strip>>;
277
- phoneNumbers: z.ZodArray<z.ZodObject<{
278
- id: z.ZodString;
279
- phoneNumber: z.ZodString;
280
- createdAt: z.ZodDate;
281
- verifiedAt: z.ZodNullable<z.ZodDate>;
282
- consentedAt: z.ZodNullable<z.ZodDate>;
283
- }, z.core.$strip>>;
284
257
  projects: z.ZodArray<z.ZodObject<{
285
258
  id: z.ZodString;
286
259
  name: z.ZodString;
@@ -342,37 +315,18 @@ export declare const orgContract: {
342
315
  emailRecipients: z.ZodNumber;
343
316
  projects: z.ZodNumber;
344
317
  seats: z.ZodNumber;
345
- smsSegments: z.ZodNumber;
346
318
  }, z.core.$strip>;
347
319
  usage: z.ZodObject<{
348
320
  aiSpendUsd: z.ZodNumber;
349
321
  emailRecipients: z.ZodNumber;
350
- smsSegments: z.ZodNumber;
351
322
  }, z.core.$strip>;
352
323
  }, z.core.$strip>>, Record<never, never>, Record<never, never>>;
353
324
  remove: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
354
325
  organizationId: z.ZodString;
355
326
  memberIdOrEmail: z.ZodString;
356
327
  }, z.core.$strip>, z.ZodVoid, Record<never, never>, Record<never, never>>;
357
- removePhoneNumber: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
358
- organizationId: z.ZodString;
359
- phoneNumberId: z.ZodString;
360
- }, z.core.$strip>, z.ZodVoid, Record<never, never>, Record<never, never>>;
361
- requestPhoneNumberVerification: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
362
- organizationId: z.ZodString;
363
- phoneNumber: z.ZodString;
364
- smsConsent: z.ZodLiteral<true>;
365
- }, z.core.$strip>, z.ZodObject<{
366
- expiresAt: z.ZodDate;
367
- phoneNumberId: z.ZodString;
368
- }, z.core.$strip>, Record<never, never>, Record<never, never>>;
369
328
  update: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
370
329
  organizationId: z.ZodString;
371
330
  name: z.ZodString;
372
331
  }, z.core.$strip>, z.ZodVoid, Record<never, never>, Record<never, never>>;
373
- verifyPhoneNumber: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
374
- organizationId: z.ZodString;
375
- phoneNumberId: z.ZodString;
376
- code: z.ZodString;
377
- }, z.core.$strip>, z.ZodVoid, Record<never, never>, Record<never, never>>;
378
332
  };
package/dist/org.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { oc } from "@orpc/contract";
2
2
  import { z } from "zod";
3
- import { e164PhoneNumberSchema, reasonableNameSchema } from "./schemas.js";
3
+ import { reasonableNameSchema } from "./schemas.js";
4
4
  export const organizationRoleSchema = z.enum(["member", "admin", "owner"]);
5
5
  export const publicOrganizationOutputSchema = z.object({
6
6
  id: z.string(),
@@ -30,21 +30,12 @@ export const organizationSummaryOutputSchema = z.object({
30
30
  emailRecipients: z.number(),
31
31
  projects: z.number(),
32
32
  seats: z.number(),
33
- smsSegments: z.number(),
34
33
  }),
35
34
  usage: z.object({
36
35
  aiSpendUsd: z.number(),
37
36
  emailRecipients: z.number(),
38
- smsSegments: z.number(),
39
37
  }),
40
38
  });
41
- export const organizationPhoneNumberOutputSchema = z.object({
42
- id: z.string(),
43
- phoneNumber: e164PhoneNumberSchema,
44
- createdAt: z.date(),
45
- verifiedAt: z.date().nullable(),
46
- consentedAt: z.date().nullable(),
47
- });
48
39
  export const organizationMemberOutputSchema = z.object({
49
40
  id: z.string(),
50
41
  userId: z.string(),
@@ -70,7 +61,6 @@ export const organizationProjectOutputSchema = z.object({
70
61
  export const organizationDetailsOutputSchema = organizationSummaryOutputSchema.extend({
71
62
  members: organizationMemberOutputSchema.array(),
72
63
  invitations: organizationInvitationOutputSchema.array(),
73
- phoneNumbers: organizationPhoneNumberOutputSchema.array(),
74
64
  projects: organizationProjectOutputSchema.array(),
75
65
  });
76
66
  export const createdInvitationOutputSchema = z.object({
@@ -193,40 +183,6 @@ export const orgContract = {
193
183
  memberIdOrEmail: z.string().min(1),
194
184
  }))
195
185
  .output(z.void()),
196
- removePhoneNumber: oc
197
- .route({
198
- method: "DELETE",
199
- path: "/organizations/{organizationId}/phone-numbers/{phoneNumberId}",
200
- operationId: "removeOrganizationPhoneNumber",
201
- summary: "Remove organization phone number",
202
- description: "Removes an organization SMS destination and its verification and consent state.",
203
- tags: ["Organizations"],
204
- successStatus: 204,
205
- })
206
- .input(z.object({
207
- organizationId: z.string(),
208
- phoneNumberId: z.string(),
209
- }))
210
- .output(z.void()),
211
- requestPhoneNumberVerification: oc
212
- .route({
213
- method: "POST",
214
- path: "/organizations/{organizationId}/phone-numbers/verifications",
215
- operationId: "requestOrganizationPhoneNumberVerification",
216
- summary: "Request organization phone verification",
217
- description: "Sends a verification code after the caller explicitly consents to organization automation SMS alerts.",
218
- tags: ["Organizations"],
219
- successStatus: 201,
220
- })
221
- .input(z.object({
222
- organizationId: z.string(),
223
- phoneNumber: e164PhoneNumberSchema,
224
- smsConsent: z.literal(true),
225
- }))
226
- .output(z.object({
227
- expiresAt: z.date(),
228
- phoneNumberId: z.string(),
229
- })),
230
186
  update: oc
231
187
  .route({
232
188
  method: "PATCH",
@@ -242,23 +198,4 @@ export const orgContract = {
242
198
  name: reasonableNameSchema,
243
199
  }))
244
200
  .output(z.void()),
245
- verifyPhoneNumber: oc
246
- .route({
247
- method: "POST",
248
- path: "/organizations/{organizationId}/phone-numbers/{phoneNumberId}/verification",
249
- operationId: "verifyOrganizationPhoneNumber",
250
- summary: "Verify organization phone number",
251
- description: "Verifies possession of an organization SMS destination and activates its recorded consent.",
252
- tags: ["Organizations"],
253
- successStatus: 204,
254
- })
255
- .input(z.object({
256
- organizationId: z.string(),
257
- phoneNumberId: z.string(),
258
- code: z
259
- .string()
260
- .trim()
261
- .regex(/^\d{6}$/),
262
- }))
263
- .output(z.void()),
264
201
  };
package/dist/runtime.d.ts CHANGED
@@ -696,12 +696,5 @@ export declare const runtimeContract: {
696
696
  }, z.core.$strip>, z.ZodObject<{
697
697
  id: z.ZodNullable<z.ZodString>;
698
698
  }, z.core.$strip>, Record<never, never>, Record<never, never>>;
699
- sendSms: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
700
- deliveryIndex: z.ZodDefault<z.ZodNumber>;
701
- text: z.ZodString;
702
- to: z.ZodDefault<z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<"*">]>>;
703
- }, z.core.$strip>, z.ZodObject<{
704
- ids: z.ZodArray<z.ZodString>;
705
- }, z.core.$strip>, Record<never, never>, Record<never, never>>;
706
699
  };
707
700
  export {};
package/dist/runtime.js CHANGED
@@ -1,7 +1,6 @@
1
1
  import { encodableSchema } from "@automate.ax/codec";
2
2
  import { oc } from "@orpc/contract";
3
3
  import { z } from "zod";
4
- import { e164PhoneNumberSchema } from "./schemas.js";
5
4
  /** Default model used by the platform Vercel AI Gateway account. */
6
5
  export const DEFAULT_GATEWAY_MODEL_ID = "openai/gpt-4.1-nano";
7
6
  export const AUTOMATION_INVOCATION_DEFAULT_ENTRYPOINT = "default";
@@ -426,13 +425,4 @@ export const runtimeContract = {
426
425
  .output(z.object({
427
426
  id: z.string().nullable(),
428
427
  })),
429
- sendSms: oc
430
- .input(z.object({
431
- deliveryIndex: z.number().int().nonnegative().default(0),
432
- text: z.string().trim().min(1).max(1_000),
433
- to: z.union([e164PhoneNumberSchema, z.literal("*")]).default("*"),
434
- }))
435
- .output(z.object({
436
- ids: z.string().array(),
437
- })),
438
428
  };
package/dist/schemas.d.ts CHANGED
@@ -1,4 +1,2 @@
1
1
  import { z } from "zod";
2
2
  export declare const reasonableNameSchema: z.ZodString;
3
- /** Canonical E.164 phone number accepted by SMS boundaries. */
4
- export declare const e164PhoneNumberSchema: z.ZodString;
package/dist/schemas.js CHANGED
@@ -1,7 +1,2 @@
1
1
  import { z } from "zod";
2
2
  export const reasonableNameSchema = z.string().min(1).max(255).trim();
3
- /** Canonical E.164 phone number accepted by SMS boundaries. */
4
- export const e164PhoneNumberSchema = z
5
- .string()
6
- .trim()
7
- .regex(/^\+[1-9]\d{1,14}$/, "Use an E.164 phone number such as +12065550123.");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@automate.ax/api-contract",
3
- "version": "0.53.0",
3
+ "version": "0.55.0",
4
4
  "description": "Public oRPC contract for the Automate.ax API.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -28,7 +28,7 @@
28
28
  },
29
29
  "dependencies": {
30
30
  "@ai-sdk/gateway": "^4.0.46",
31
- "@automate.ax/codec": "0.53.0",
31
+ "@automate.ax/codec": "0.55.0",
32
32
  "@orpc/contract": "1.15.0",
33
33
  "zod": "^4.3.6"
34
34
  },
package/src/automation.ts CHANGED
@@ -1,7 +1,6 @@
1
1
  import { encodableSchema } from "@automate.ax/codec"
2
2
  import { oc } from "@orpc/contract"
3
3
  import { z } from "zod"
4
- import { deploymentTriggerInfoSchema } from "./deployment"
5
4
 
6
5
  export const automationExecutionStatusSchema = z.enum([
7
6
  "running",
@@ -24,34 +23,6 @@ const EXECUTION_SUMMARY_SCHEMA = z.object({
24
23
  })
25
24
 
26
25
  export const automationContract = {
27
- get: oc
28
- .input(
29
- z.object({
30
- automationId: z.string(),
31
- projectId: z.string(),
32
- }),
33
- )
34
- .output(
35
- z.object({
36
- activeDeployment: z.object({
37
- createdAt: z.date(),
38
- git: z
39
- .object({
40
- commitSha: z.string(),
41
- dirty: z.boolean(),
42
- repositoryUrl: z.string(),
43
- })
44
- .nullable(),
45
- id: z.string(),
46
- }),
47
- createdAt: z.date(),
48
- description: z.string(),
49
- id: z.string(),
50
- identityKey: z.string(),
51
- triggers: deploymentTriggerInfoSchema.array(),
52
- updatedAt: z.date(),
53
- }),
54
- ),
55
26
  getExecution: oc
56
27
  .input(
57
28
  z.object({
package/src/deployment.ts CHANGED
@@ -4,54 +4,6 @@ import { z } from "zod"
4
4
  /** SDK compatibility version used to select the immutable runtime image. */
5
5
  export const AUTOMATION_SDK_VERSION = "2"
6
6
 
7
- export type HttpTriggerScope = "trigger" | "automation" | "project"
8
-
9
- export interface HttpTriggerEndpointOptions {
10
- appOrigin: string
11
- automationId: string
12
- hookSlot: number
13
- projectId: string
14
- scope: HttpTriggerScope
15
- }
16
-
17
- /**
18
- * Returns the public URL for one deployed HTTP trigger.
19
- *
20
- * @param options - Public origin and trigger identity.
21
- */
22
- export function getHttpTriggerEndpoint(options: HttpTriggerEndpointOptions) {
23
- return new URL(
24
- `/x/${getHttpTriggerEndpointKey(options)}/`,
25
- options.appOrigin,
26
- ).toString()
27
- }
28
-
29
- /**
30
- * Returns the durable endpoint identity for one configured HTTP scope.
31
- *
32
- * @param options - Trigger and owning resource identity.
33
- */
34
- export function getHttpTriggerEndpointKey(
35
- options: Omit<HttpTriggerEndpointOptions, "appOrigin">,
36
- ) {
37
- if (options.scope === "project") return options.projectId
38
- if (options.scope === "automation") return options.automationId
39
- return `${options.automationId}:${options.hookSlot}`
40
- }
41
-
42
- export const deploymentTriggerInfoSchema = z.object({
43
- details: z
44
- .object({
45
- label: z.string(),
46
- value: z.string(),
47
- })
48
- .array(),
49
- name: z.string(),
50
- type: z.string(),
51
- })
52
-
53
- export type DeploymentTriggerInfo = z.infer<typeof deploymentTriggerInfoSchema>
54
-
55
7
  const DEPLOYMENT_STATUS_SCHEMA = z.enum([
56
8
  "planning",
57
9
  "awaiting_authorization",
@@ -74,6 +26,7 @@ const DEPLOYMENT_IN_PROGRESS_ERROR = {
74
26
  const GIT_SOURCE_SCHEMA = z.object({
75
27
  commitSha: z.string().regex(/^[0-9a-f]{40}(?:[0-9a-f]{24})?$/),
76
28
  dirty: z.boolean(),
29
+ projectPath: z.string(),
77
30
  repositoryUrl: z.string().min(1),
78
31
  })
79
32
 
@@ -132,7 +85,13 @@ export const deploymentContract = {
132
85
  description: z.string(),
133
86
  id: z.string(),
134
87
  identityKey: z.string(),
135
- triggers: deploymentTriggerInfoSchema.array(),
88
+ subscriptions: z
89
+ .object({
90
+ config: z.json(),
91
+ eventType: z.string(),
92
+ hookSlot: z.number().int().nonnegative(),
93
+ })
94
+ .array(),
136
95
  })
137
96
  .array(),
138
97
  createdAt: z.date(),
package/src/index.ts CHANGED
@@ -10,15 +10,7 @@ import { projectContract } from "./project"
10
10
  import { runtimeContract } from "./runtime"
11
11
 
12
12
  export { automationExecutionStatusSchema } from "./automation"
13
- export {
14
- AUTOMATION_SDK_VERSION,
15
- deploymentTriggerInfoSchema,
16
- getHttpTriggerEndpoint,
17
- getHttpTriggerEndpointKey,
18
- type DeploymentTriggerInfo,
19
- type HttpTriggerEndpointOptions,
20
- type HttpTriggerScope,
21
- } from "./deployment"
13
+ export { AUTOMATION_SDK_VERSION } from "./deployment"
22
14
  export { integrationAccountOutputSchema } from "./account"
23
15
  export {
24
16
  AUTOMATION_INVOCATION_DEFAULT_ENTRYPOINT,
@@ -45,14 +37,13 @@ export {
45
37
  organizationDetailsOutputSchema,
46
38
  organizationInvitationOutputSchema,
47
39
  organizationMemberOutputSchema,
48
- organizationPhoneNumberOutputSchema,
49
40
  organizationProjectOutputSchema,
50
41
  organizationRoleSchema,
51
42
  organizationSummaryOutputSchema,
52
43
  publicOrganizationOutputSchema,
53
44
  } from "./org"
54
45
  export { projectOutputSchema } from "./project"
55
- export { e164PhoneNumberSchema, reasonableNameSchema } from "./schemas"
46
+ export { reasonableNameSchema } from "./schemas"
56
47
  export { userOutputSchema } from "./auth"
57
48
  export {
58
49
  managementPermissionStatement,
@@ -104,9 +95,6 @@ export const firstPartyContract = {
104
95
  createBillingPortal: orgContract.createBillingPortal,
105
96
  createCheckout: orgContract.createCheckout,
106
97
  createEmbeddedCheckout: orgContract.createEmbeddedCheckout,
107
- removePhoneNumber: orgContract.removePhoneNumber,
108
- requestPhoneNumberVerification: orgContract.requestPhoneNumberVerification,
109
- verifyPhoneNumber: orgContract.verifyPhoneNumber,
110
98
  },
111
99
  project: {
112
100
  ...publicContract.project,
package/src/org.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { oc } from "@orpc/contract"
2
2
  import { z } from "zod"
3
- import { e164PhoneNumberSchema, reasonableNameSchema } from "./schemas"
3
+ import { reasonableNameSchema } from "./schemas"
4
4
 
5
5
  export const organizationRoleSchema = z.enum(["member", "admin", "owner"])
6
6
 
@@ -34,23 +34,13 @@ export const organizationSummaryOutputSchema = z.object({
34
34
  emailRecipients: z.number(),
35
35
  projects: z.number(),
36
36
  seats: z.number(),
37
- smsSegments: z.number(),
38
37
  }),
39
38
  usage: z.object({
40
39
  aiSpendUsd: z.number(),
41
40
  emailRecipients: z.number(),
42
- smsSegments: z.number(),
43
41
  }),
44
42
  })
45
43
 
46
- export const organizationPhoneNumberOutputSchema = z.object({
47
- id: z.string(),
48
- phoneNumber: e164PhoneNumberSchema,
49
- createdAt: z.date(),
50
- verifiedAt: z.date().nullable(),
51
- consentedAt: z.date().nullable(),
52
- })
53
-
54
44
  export const organizationMemberOutputSchema = z.object({
55
45
  id: z.string(),
56
46
  userId: z.string(),
@@ -80,7 +70,6 @@ export const organizationDetailsOutputSchema =
80
70
  organizationSummaryOutputSchema.extend({
81
71
  members: organizationMemberOutputSchema.array(),
82
72
  invitations: organizationInvitationOutputSchema.array(),
83
- phoneNumbers: organizationPhoneNumberOutputSchema.array(),
84
73
  projects: organizationProjectOutputSchema.array(),
85
74
  })
86
75
 
@@ -221,48 +210,6 @@ export const orgContract = {
221
210
  }),
222
211
  )
223
212
  .output(z.void()),
224
- removePhoneNumber: oc
225
- .route({
226
- method: "DELETE",
227
- path: "/organizations/{organizationId}/phone-numbers/{phoneNumberId}",
228
- operationId: "removeOrganizationPhoneNumber",
229
- summary: "Remove organization phone number",
230
- description:
231
- "Removes an organization SMS destination and its verification and consent state.",
232
- tags: ["Organizations"],
233
- successStatus: 204,
234
- })
235
- .input(
236
- z.object({
237
- organizationId: z.string(),
238
- phoneNumberId: z.string(),
239
- }),
240
- )
241
- .output(z.void()),
242
- requestPhoneNumberVerification: oc
243
- .route({
244
- method: "POST",
245
- path: "/organizations/{organizationId}/phone-numbers/verifications",
246
- operationId: "requestOrganizationPhoneNumberVerification",
247
- summary: "Request organization phone verification",
248
- description:
249
- "Sends a verification code after the caller explicitly consents to organization automation SMS alerts.",
250
- tags: ["Organizations"],
251
- successStatus: 201,
252
- })
253
- .input(
254
- z.object({
255
- organizationId: z.string(),
256
- phoneNumber: e164PhoneNumberSchema,
257
- smsConsent: z.literal(true),
258
- }),
259
- )
260
- .output(
261
- z.object({
262
- expiresAt: z.date(),
263
- phoneNumberId: z.string(),
264
- }),
265
- ),
266
213
  update: oc
267
214
  .route({
268
215
  method: "PATCH",
@@ -280,26 +227,4 @@ export const orgContract = {
280
227
  }),
281
228
  )
282
229
  .output(z.void()),
283
- verifyPhoneNumber: oc
284
- .route({
285
- method: "POST",
286
- path: "/organizations/{organizationId}/phone-numbers/{phoneNumberId}/verification",
287
- operationId: "verifyOrganizationPhoneNumber",
288
- summary: "Verify organization phone number",
289
- description:
290
- "Verifies possession of an organization SMS destination and activates its recorded consent.",
291
- tags: ["Organizations"],
292
- successStatus: 204,
293
- })
294
- .input(
295
- z.object({
296
- organizationId: z.string(),
297
- phoneNumberId: z.string(),
298
- code: z
299
- .string()
300
- .trim()
301
- .regex(/^\d{6}$/),
302
- }),
303
- )
304
- .output(z.void()),
305
230
  }
package/src/runtime.ts CHANGED
@@ -2,7 +2,6 @@ import { encodableSchema } from "@automate.ax/codec"
2
2
  import type { GatewayModelId } from "@ai-sdk/gateway"
3
3
  import { oc } from "@orpc/contract"
4
4
  import { z } from "zod"
5
- import { e164PhoneNumberSchema } from "./schemas"
6
5
 
7
6
  /** Default model used by the platform Vercel AI Gateway account. */
8
7
  export const DEFAULT_GATEWAY_MODEL_ID =
@@ -490,17 +489,4 @@ export const runtimeContract = {
490
489
  id: z.string().nullable(),
491
490
  }),
492
491
  ),
493
- sendSms: oc
494
- .input(
495
- z.object({
496
- deliveryIndex: z.number().int().nonnegative().default(0),
497
- text: z.string().trim().min(1).max(1_000),
498
- to: z.union([e164PhoneNumberSchema, z.literal("*")]).default("*"),
499
- }),
500
- )
501
- .output(
502
- z.object({
503
- ids: z.string().array(),
504
- }),
505
- ),
506
492
  }
package/src/schemas.ts CHANGED
@@ -1,9 +1,3 @@
1
1
  import { z } from "zod"
2
2
 
3
3
  export const reasonableNameSchema = z.string().min(1).max(255).trim()
4
-
5
- /** Canonical E.164 phone number accepted by SMS boundaries. */
6
- export const e164PhoneNumberSchema = z
7
- .string()
8
- .trim()
9
- .regex(/^\+[1-9]\d{1,14}$/, "Use an E.164 phone number such as +12065550123.")