@automate.ax/api-contract 0.141.0 → 0.143.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/events/clickup.d.ts +8 -0
- package/dist/events/clickup.js +20 -0
- package/dist/events/index.d.ts +68 -63
- package/dist/events/index.js +2 -0
- package/dist/events/notion.d.ts +63 -63
- package/dist/index.d.ts +100 -64
- package/dist/index.js +1 -1
- package/dist/org.d.ts +11 -0
- package/dist/org.js +5 -1
- package/dist/runtime.d.ts +21 -0
- package/dist/runtime.js +20 -0
- package/package.json +4 -4
- package/src/events/clickup.ts +24 -0
- package/src/events/index.ts +2 -0
- package/src/index.ts +2 -0
- package/src/org.ts +8 -1
- package/src/runtime.ts +24 -0
package/dist/index.js
CHANGED
|
@@ -17,7 +17,7 @@ export { AUTOMATION_ERROR_CAUSE_DEPTH, automationErrorSchema, } from "./errors.j
|
|
|
17
17
|
export { integrationAccountOutputSchema, integrationAccountRevocationImpactOutputSchema, integrationAccountRevocationOutputSchema, integrationServiceOutputSchema, } from "./account.js";
|
|
18
18
|
export { AUTOMATION_INVOCATION_DEFAULT_ENTRYPOINT, AUTOMATION_INVOCATION_RESERVED_ENTRYPOINT_PREFIX, AUTOMATION_IMAGE_GENERATION_ENTRYPOINT_PREFIX, AUTOMATION_LOG_MAX_ENTRIES, AUTOMATION_LOG_MAX_MESSAGE_LENGTH, AUTOMATION_OBSERVABILITY_MAX_ENCODED_BYTES, AUTOMATION_OBSERVABILITY_MAX_FIELDS, DEFAULT_GATEWAY_IMAGE_MODEL_ID, DEFAULT_GATEWAY_MODEL_ID, DEFAULT_ACTION_MAX_ATTEMPTS, MAX_ACTION_ATTEMPTS, actionReplaySafetySchema, automationInvocationInputSchema, automationInvocationOutputSchema, automationInvocationScheduleSchema, generationInputSchema, generationResultSchema, imageGenerationInputSchema, imageGenerationCompletionSchema, imageGenerationResultSchema, platformImageGenerationInputSchema, platformImageGenerationStartSchema, hashSignalCoordinatorConfiguration, runtimeContract, } from "./runtime.js";
|
|
19
19
|
export { createdOrganizationApiKeyOutputSchema, organizationApiKeyOutputSchema, } from "./api-key.js";
|
|
20
|
-
export { activeSubscriptionOutputSchema, createdInvitationOutputSchema, organizationDetailsOutputSchema, organizationInvitationOutputSchema, organizationMemberOutputSchema, organizationProjectOutputSchema, organizationRoleSchema, organizationRoles, organizationSummaryOutputSchema, publicOrganizationOutputSchema, } from "./org.js";
|
|
20
|
+
export { activeSubscriptionOutputSchema, createdInvitationOutputSchema, organizationDetailsOutputSchema, organizationInvitationOutputSchema, organizationMemberOutputSchema, organizationProjectOutputSchema, organizationRoleSchema, organizationRoles, organizationSummaryOutputSchema, proBillingPeriodSchema, publicOrganizationOutputSchema, } from "./org.js";
|
|
21
21
|
export { projectOutputSchema } from "./project.js";
|
|
22
22
|
export { cursorPageInfoSchema, cursorPageOutputSchema, cursorPaginationInputSchema, reasonableNameSchema, } from "./schemas.js";
|
|
23
23
|
export { userOutputSchema } from "./auth.js";
|
package/dist/org.d.ts
CHANGED
|
@@ -4,6 +4,12 @@ export declare const organizationRoleSchema: z.ZodEnum<{
|
|
|
4
4
|
member: "member";
|
|
5
5
|
admin: "admin";
|
|
6
6
|
}>;
|
|
7
|
+
export declare const proBillingPeriodSchema: z.ZodEnum<{
|
|
8
|
+
monthly: "monthly";
|
|
9
|
+
quarterly: "quarterly";
|
|
10
|
+
annual: "annual";
|
|
11
|
+
}>;
|
|
12
|
+
export type ProBillingPeriod = z.infer<typeof proBillingPeriodSchema>;
|
|
7
13
|
export { organizationRoles };
|
|
8
14
|
export declare const publicOrganizationOutputSchema: z.ZodObject<{
|
|
9
15
|
id: z.ZodString;
|
|
@@ -176,6 +182,11 @@ export declare const orgContract: {
|
|
|
176
182
|
url: z.ZodURL;
|
|
177
183
|
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
178
184
|
createEmbeddedCheckout: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
185
|
+
billingPeriod: z.ZodDefault<z.ZodEnum<{
|
|
186
|
+
monthly: "monthly";
|
|
187
|
+
quarterly: "quarterly";
|
|
188
|
+
annual: "annual";
|
|
189
|
+
}>>;
|
|
179
190
|
organizationId: z.ZodString;
|
|
180
191
|
}, z.core.$strip>, z.ZodObject<{
|
|
181
192
|
clientSecret: z.ZodString;
|
package/dist/org.js
CHANGED
|
@@ -3,6 +3,7 @@ import * as z from "zod";
|
|
|
3
3
|
import { cursorPageOutputSchema, cursorPaginationInputSchema, reasonableNameSchema, } from "./schemas.js";
|
|
4
4
|
import { organizationRoles } from "./permissions.js";
|
|
5
5
|
export const organizationRoleSchema = z.enum(organizationRoles);
|
|
6
|
+
export const proBillingPeriodSchema = z.enum(["monthly", "quarterly", "annual"]);
|
|
6
7
|
export { organizationRoles };
|
|
7
8
|
export const publicOrganizationOutputSchema = z.object({
|
|
8
9
|
id: z.string(),
|
|
@@ -86,7 +87,10 @@ export const orgContract = {
|
|
|
86
87
|
.input(z.object({ organizationId: z.string() }))
|
|
87
88
|
.output(z.object({ url: z.url() })),
|
|
88
89
|
createEmbeddedCheckout: oc
|
|
89
|
-
.input(z.object({
|
|
90
|
+
.input(z.object({
|
|
91
|
+
billingPeriod: proBillingPeriodSchema.default("monthly"),
|
|
92
|
+
organizationId: z.string(),
|
|
93
|
+
}))
|
|
90
94
|
.output(z.object({
|
|
91
95
|
clientSecret: z.string().min(1),
|
|
92
96
|
publishableKey: z.string().min(1),
|
package/dist/runtime.d.ts
CHANGED
|
@@ -2148,6 +2148,26 @@ export declare const runtimeContract: {
|
|
|
2148
2148
|
raw: z.ZodCustom<import("@automate.ax/codec/rpc").CodecEnvelope, import("@automate.ax/codec/rpc").CodecEnvelope>;
|
|
2149
2149
|
}, z.core.$strip>;
|
|
2150
2150
|
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
2151
|
+
googleAdsRequest: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
2152
|
+
accountId: z.ZodString;
|
|
2153
|
+
body: z.ZodOptional<z.ZodJSONSchema>;
|
|
2154
|
+
loginCustomerId: z.ZodOptional<z.ZodString>;
|
|
2155
|
+
method: z.ZodOptional<z.ZodEnum<{
|
|
2156
|
+
POST: "POST";
|
|
2157
|
+
GET: "GET";
|
|
2158
|
+
}>>;
|
|
2159
|
+
path: z.ZodString;
|
|
2160
|
+
}, z.core.$strict>, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
2161
|
+
ok: z.ZodLiteral<true>;
|
|
2162
|
+
payload: z.ZodJSONSchema;
|
|
2163
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2164
|
+
message: z.ZodString;
|
|
2165
|
+
ok: z.ZodLiteral<false>;
|
|
2166
|
+
providerStatus: z.ZodOptional<z.ZodString>;
|
|
2167
|
+
requestId: z.ZodOptional<z.ZodString>;
|
|
2168
|
+
retryAfter: z.ZodOptional<z.ZodString>;
|
|
2169
|
+
status: z.ZodNumber;
|
|
2170
|
+
}, z.core.$strip>], "ok">, Record<never, never>, Record<never, never>>;
|
|
2151
2171
|
startImageGeneration: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
2152
2172
|
entrypoint: z.ZodString;
|
|
2153
2173
|
model: z.ZodDefault<z.ZodCustom<GatewayImageModelId, GatewayImageModelId>>;
|
|
@@ -2759,6 +2779,7 @@ export declare const runtimeContract: {
|
|
|
2759
2779
|
binding: z.ZodString;
|
|
2760
2780
|
serviceId: z.ZodString;
|
|
2761
2781
|
}, z.core.$strict>, z.ZodObject<{
|
|
2782
|
+
accountId: z.ZodOptional<z.ZodString>;
|
|
2762
2783
|
connectionMethodId: z.ZodString;
|
|
2763
2784
|
secret: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
2764
2785
|
serviceId: z.ZodString;
|
package/dist/runtime.js
CHANGED
|
@@ -960,6 +960,25 @@ export const runtimeContract = {
|
|
|
960
960
|
generate: oc
|
|
961
961
|
.input(RUNTIME_GENERATION_INPUT_SCHEMA)
|
|
962
962
|
.output(RUNTIME_GENERATION_RESULT_SCHEMA),
|
|
963
|
+
googleAdsRequest: oc
|
|
964
|
+
.input(z.strictObject({
|
|
965
|
+
accountId: z.string().min(1),
|
|
966
|
+
body: z.json().optional(),
|
|
967
|
+
loginCustomerId: z.string().optional(),
|
|
968
|
+
method: z.enum(["GET", "POST"]).optional(),
|
|
969
|
+
path: z.string().min(1),
|
|
970
|
+
}))
|
|
971
|
+
.output(z.discriminatedUnion("ok", [
|
|
972
|
+
z.object({ ok: z.literal(true), payload: z.json() }),
|
|
973
|
+
z.object({
|
|
974
|
+
message: z.string(),
|
|
975
|
+
ok: z.literal(false),
|
|
976
|
+
providerStatus: z.string().optional(),
|
|
977
|
+
requestId: z.string().optional(),
|
|
978
|
+
retryAfter: z.string().optional(),
|
|
979
|
+
status: z.number().int(),
|
|
980
|
+
}),
|
|
981
|
+
])),
|
|
963
982
|
startImageGeneration: oc
|
|
964
983
|
.input(PLATFORM_IMAGE_GENERATION_TRANSPORT_INPUT_SCHEMA)
|
|
965
984
|
.output(platformImageGenerationStartSchema),
|
|
@@ -987,6 +1006,7 @@ export const runtimeContract = {
|
|
|
987
1006
|
serviceId: z.string().min(1),
|
|
988
1007
|
}))
|
|
989
1008
|
.output(z.object({
|
|
1009
|
+
accountId: z.string().min(1).optional(),
|
|
990
1010
|
connectionMethodId: z.string().min(1),
|
|
991
1011
|
secret: z.record(z.string(), z.unknown()),
|
|
992
1012
|
serviceId: z.string(),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@automate.ax/api-contract",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.143.0",
|
|
4
4
|
"description": "Public oRPC contract for the Automate.ax API.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -31,14 +31,14 @@
|
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@ai-sdk/gateway": "4.0.46",
|
|
34
|
-
"@automate.ax/codec": "0.
|
|
35
|
-
"@automate.ax/integration-contracts": "0.
|
|
34
|
+
"@automate.ax/codec": "0.143.0",
|
|
35
|
+
"@automate.ax/integration-contracts": "0.143.0",
|
|
36
36
|
"@orpc/contract": "1.15.0",
|
|
37
37
|
"fast-json-stable-stringify": "^2.1.0",
|
|
38
38
|
"zod": "^4.3.6"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@internal/config": "0.
|
|
41
|
+
"@internal/config": "0.3.0",
|
|
42
42
|
"@types/bun": "latest",
|
|
43
43
|
"@typescript/native": "npm:typescript@^7.0.2",
|
|
44
44
|
"@zachsents/oxlint-config": "^0.4.1",
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { oc } from "@orpc/contract"
|
|
2
|
+
import * as z from "zod"
|
|
3
|
+
|
|
4
|
+
export const clickUpEventsContract = {
|
|
5
|
+
clickUpEvent: oc
|
|
6
|
+
.route({
|
|
7
|
+
description:
|
|
8
|
+
"Receives and authenticates callbacks delivered by ClickUp webhooks.",
|
|
9
|
+
method: "POST",
|
|
10
|
+
operationId: "receiveClickUpEvent",
|
|
11
|
+
path: "/events/clickup/{sourceId}",
|
|
12
|
+
successStatus: 204,
|
|
13
|
+
summary: "Receive a ClickUp workspace event",
|
|
14
|
+
tags: ["Events"],
|
|
15
|
+
})
|
|
16
|
+
.input(
|
|
17
|
+
z.looseObject({
|
|
18
|
+
event: z.string(),
|
|
19
|
+
sourceId: z.string(),
|
|
20
|
+
webhook_id: z.string(),
|
|
21
|
+
}),
|
|
22
|
+
)
|
|
23
|
+
.output(z.void()),
|
|
24
|
+
}
|
package/src/events/index.ts
CHANGED
|
@@ -8,6 +8,7 @@ import { convexEventsContract } from "./convex"
|
|
|
8
8
|
import { discordEventsContract } from "./discord"
|
|
9
9
|
import { closeEventsContract } from "./close"
|
|
10
10
|
import { cloudflareEventsContract } from "./cloudflare"
|
|
11
|
+
import { clickUpEventsContract } from "./clickup"
|
|
11
12
|
import { googleCalendarEventsContract } from "./google-calendar"
|
|
12
13
|
import { googleFormsEventsContract } from "./google-forms"
|
|
13
14
|
import { googleDriveEventsContract } from "./google-drive"
|
|
@@ -39,6 +40,7 @@ export const eventsContract = {
|
|
|
39
40
|
...discordEventsContract,
|
|
40
41
|
...closeEventsContract,
|
|
41
42
|
...cloudflareEventsContract,
|
|
43
|
+
...clickUpEventsContract,
|
|
42
44
|
...googleCalendarEventsContract,
|
|
43
45
|
...googleDriveEventsContract,
|
|
44
46
|
...googleFormsEventsContract,
|
package/src/index.ts
CHANGED
|
@@ -97,7 +97,9 @@ export {
|
|
|
97
97
|
organizationRoleSchema,
|
|
98
98
|
organizationRoles,
|
|
99
99
|
organizationSummaryOutputSchema,
|
|
100
|
+
proBillingPeriodSchema,
|
|
100
101
|
publicOrganizationOutputSchema,
|
|
102
|
+
type ProBillingPeriod,
|
|
101
103
|
} from "./org"
|
|
102
104
|
export { projectOutputSchema } from "./project"
|
|
103
105
|
export {
|
package/src/org.ts
CHANGED
|
@@ -8,6 +8,8 @@ import {
|
|
|
8
8
|
import { organizationRoles } from "./permissions"
|
|
9
9
|
|
|
10
10
|
export const organizationRoleSchema = z.enum(organizationRoles)
|
|
11
|
+
export const proBillingPeriodSchema = z.enum(["monthly", "quarterly", "annual"])
|
|
12
|
+
export type ProBillingPeriod = z.infer<typeof proBillingPeriodSchema>
|
|
11
13
|
|
|
12
14
|
export { organizationRoles }
|
|
13
15
|
|
|
@@ -102,7 +104,12 @@ export const orgContract = {
|
|
|
102
104
|
.input(z.object({ organizationId: z.string() }))
|
|
103
105
|
.output(z.object({ url: z.url() })),
|
|
104
106
|
createEmbeddedCheckout: oc
|
|
105
|
-
.input(
|
|
107
|
+
.input(
|
|
108
|
+
z.object({
|
|
109
|
+
billingPeriod: proBillingPeriodSchema.default("monthly"),
|
|
110
|
+
organizationId: z.string(),
|
|
111
|
+
}),
|
|
112
|
+
)
|
|
106
113
|
.output(
|
|
107
114
|
z.object({
|
|
108
115
|
clientSecret: z.string().min(1),
|
package/src/runtime.ts
CHANGED
|
@@ -1175,6 +1175,29 @@ export const runtimeContract = {
|
|
|
1175
1175
|
generate: oc
|
|
1176
1176
|
.input(RUNTIME_GENERATION_INPUT_SCHEMA)
|
|
1177
1177
|
.output(RUNTIME_GENERATION_RESULT_SCHEMA),
|
|
1178
|
+
googleAdsRequest: oc
|
|
1179
|
+
.input(
|
|
1180
|
+
z.strictObject({
|
|
1181
|
+
accountId: z.string().min(1),
|
|
1182
|
+
body: z.json().optional(),
|
|
1183
|
+
loginCustomerId: z.string().optional(),
|
|
1184
|
+
method: z.enum(["GET", "POST"]).optional(),
|
|
1185
|
+
path: z.string().min(1),
|
|
1186
|
+
}),
|
|
1187
|
+
)
|
|
1188
|
+
.output(
|
|
1189
|
+
z.discriminatedUnion("ok", [
|
|
1190
|
+
z.object({ ok: z.literal(true), payload: z.json() }),
|
|
1191
|
+
z.object({
|
|
1192
|
+
message: z.string(),
|
|
1193
|
+
ok: z.literal(false),
|
|
1194
|
+
providerStatus: z.string().optional(),
|
|
1195
|
+
requestId: z.string().optional(),
|
|
1196
|
+
retryAfter: z.string().optional(),
|
|
1197
|
+
status: z.number().int(),
|
|
1198
|
+
}),
|
|
1199
|
+
]),
|
|
1200
|
+
),
|
|
1178
1201
|
startImageGeneration: oc
|
|
1179
1202
|
.input(PLATFORM_IMAGE_GENERATION_TRANSPORT_INPUT_SCHEMA)
|
|
1180
1203
|
.output(platformImageGenerationStartSchema),
|
|
@@ -1210,6 +1233,7 @@ export const runtimeContract = {
|
|
|
1210
1233
|
)
|
|
1211
1234
|
.output(
|
|
1212
1235
|
z.object({
|
|
1236
|
+
accountId: z.string().min(1).optional(),
|
|
1213
1237
|
connectionMethodId: z.string().min(1),
|
|
1214
1238
|
secret: z.record(z.string(), z.unknown()),
|
|
1215
1239
|
serviceId: z.string(),
|