@automate.ax/api-contract 0.76.0 → 0.77.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.
@@ -0,0 +1,90 @@
1
+ import { z } from "zod";
2
+ export declare const EXECUTION_DATASET_VERSION = 4;
3
+ export declare const executionDatasetResourceSchema: z.ZodEnum<{
4
+ automations: "automations";
5
+ projects: "projects";
6
+ actions: "actions";
7
+ events: "events";
8
+ outputs: "outputs";
9
+ contexts: "contexts";
10
+ "context-parents": "context-parents";
11
+ "event-links": "event-links";
12
+ "signal-invocations": "signal-invocations";
13
+ "signal-coordinators": "signal-coordinators";
14
+ "signal-offers": "signal-offers";
15
+ "signal-decisions": "signal-decisions";
16
+ logs: "logs";
17
+ "trace-spans": "trace-spans";
18
+ }>;
19
+ export declare const executionDatasetScopeSchema: z.ZodObject<{
20
+ organizationId: z.ZodNullable<z.ZodString>;
21
+ projectId: z.ZodNullable<z.ZodString>;
22
+ since: z.ZodNullable<z.ZodISODateTime>;
23
+ }, z.core.$strip>;
24
+ export declare const executionDatasetManifestSchema: z.ZodObject<{
25
+ consistency: z.ZodLiteral<"eventual">;
26
+ profileId: z.ZodString;
27
+ resources: z.ZodArray<z.ZodObject<{
28
+ name: z.ZodEnum<{
29
+ automations: "automations";
30
+ projects: "projects";
31
+ actions: "actions";
32
+ events: "events";
33
+ outputs: "outputs";
34
+ contexts: "contexts";
35
+ "context-parents": "context-parents";
36
+ "event-links": "event-links";
37
+ "signal-invocations": "signal-invocations";
38
+ "signal-coordinators": "signal-coordinators";
39
+ "signal-offers": "signal-offers";
40
+ "signal-decisions": "signal-decisions";
41
+ logs: "logs";
42
+ "trace-spans": "trace-spans";
43
+ }>;
44
+ url: z.ZodURL;
45
+ }, z.core.$strip>>;
46
+ schemaVersion: z.ZodLiteral<4>;
47
+ scope: z.ZodObject<{
48
+ organizationId: z.ZodNullable<z.ZodString>;
49
+ projectId: z.ZodNullable<z.ZodString>;
50
+ since: z.ZodNullable<z.ZodISODateTime>;
51
+ }, z.core.$strip>;
52
+ }, z.core.$strip>;
53
+ export type ExecutionDatasetManifest = z.infer<typeof executionDatasetManifestSchema>;
54
+ export type ExecutionDatasetResource = z.infer<typeof executionDatasetResourceSchema>;
55
+ export type ExecutionDatasetScope = z.infer<typeof executionDatasetScopeSchema>;
56
+ export declare const executionDataContract: {
57
+ manifest: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
58
+ organizationId: z.ZodOptional<z.ZodString>;
59
+ projectId: z.ZodOptional<z.ZodString>;
60
+ since: z.ZodOptional<z.ZodISODateTime>;
61
+ }, z.core.$strip>, z.ZodObject<{
62
+ consistency: z.ZodLiteral<"eventual">;
63
+ profileId: z.ZodString;
64
+ resources: z.ZodArray<z.ZodObject<{
65
+ name: z.ZodEnum<{
66
+ automations: "automations";
67
+ projects: "projects";
68
+ actions: "actions";
69
+ events: "events";
70
+ outputs: "outputs";
71
+ contexts: "contexts";
72
+ "context-parents": "context-parents";
73
+ "event-links": "event-links";
74
+ "signal-invocations": "signal-invocations";
75
+ "signal-coordinators": "signal-coordinators";
76
+ "signal-offers": "signal-offers";
77
+ "signal-decisions": "signal-decisions";
78
+ logs: "logs";
79
+ "trace-spans": "trace-spans";
80
+ }>;
81
+ url: z.ZodURL;
82
+ }, z.core.$strip>>;
83
+ schemaVersion: z.ZodLiteral<4>;
84
+ scope: z.ZodObject<{
85
+ organizationId: z.ZodNullable<z.ZodString>;
86
+ projectId: z.ZodNullable<z.ZodString>;
87
+ since: z.ZodNullable<z.ZodISODateTime>;
88
+ }, z.core.$strip>;
89
+ }, z.core.$strip>, Record<never, never>, Record<never, never>>;
90
+ };
@@ -0,0 +1,53 @@
1
+ import { oc } from "@orpc/contract";
2
+ import { z } from "zod";
3
+ export const EXECUTION_DATASET_VERSION = 4;
4
+ export const executionDatasetResourceSchema = z.enum([
5
+ "projects",
6
+ "automations",
7
+ "contexts",
8
+ "context-parents",
9
+ "event-links",
10
+ "events",
11
+ "actions",
12
+ "signal-invocations",
13
+ "signal-coordinators",
14
+ "signal-offers",
15
+ "signal-decisions",
16
+ "logs",
17
+ "outputs",
18
+ "trace-spans",
19
+ ]);
20
+ export const executionDatasetScopeSchema = z.object({
21
+ organizationId: z.string().nullable(),
22
+ projectId: z.string().nullable(),
23
+ since: z.iso.datetime({ offset: true }).nullable(),
24
+ });
25
+ export const executionDatasetManifestSchema = z.object({
26
+ consistency: z.literal("eventual"),
27
+ profileId: z.string().min(1),
28
+ resources: z
29
+ .object({
30
+ name: executionDatasetResourceSchema,
31
+ url: z.url(),
32
+ })
33
+ .array(),
34
+ schemaVersion: z.literal(EXECUTION_DATASET_VERSION),
35
+ scope: executionDatasetScopeSchema,
36
+ });
37
+ export const executionDataContract = {
38
+ manifest: oc
39
+ .route({
40
+ method: "GET",
41
+ path: "/execution-data/manifest",
42
+ operationId: "getExecutionDataManifest",
43
+ summary: "Get execution data manifest",
44
+ description: "Returns authenticated Electric shape resources for a validated execution-data scope.",
45
+ tags: ["Execution data"],
46
+ })
47
+ .input(z.object({
48
+ organizationId: z.string().optional(),
49
+ projectId: z.string().optional(),
50
+ since: z.iso.datetime({ offset: true }).optional(),
51
+ }))
52
+ .output(executionDatasetManifestSchema),
53
+ };