terse-types 0.1.2 → 0.1.4
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/ApiRouteBuilder.d.ts +3 -0
- package/dist/ApiRoutes.json +3 -0
- package/dist/AttioRecordFlatten.d.ts +19 -0
- package/dist/AttioRecordFlatten.js +71 -0
- package/dist/Configs.d.ts +31 -1
- package/dist/Configs.js +35 -4
- package/dist/Integrations.d.ts +13 -0
- package/dist/Integrations.js +13 -2
- package/dist/InvalidationKeys.d.ts +1 -0
- package/dist/InvalidationKeys.js +1 -0
- package/dist/OrganizationMetadata.d.ts +6 -0
- package/dist/OrganizationMetadata.js +10 -0
- package/dist/ToolDisplayUtils.js +89 -0
- package/dist/Tools.d.ts +715 -0
- package/dist/Tools.js +161 -1
- package/dist/json-schema/terse-types.schema.json +15994 -0
- package/dist/types.d.ts +64 -0
- package/package.json +1 -1
- package/dist/Events.d.ts +0 -112
- package/dist/Events.js +0 -32
- package/dist/TriggerProjections.d.ts +0 -18
- package/dist/TriggerProjections.js +0 -167
package/dist/types.d.ts
CHANGED
|
@@ -1012,6 +1012,10 @@ export declare const agentTriggerSchema: z.ZodObject<{
|
|
|
1012
1012
|
integrationId: z.ZodString;
|
|
1013
1013
|
integrationType: z.ZodLiteral<import("./Integrations.js").IntegrationType.RESEND>;
|
|
1014
1014
|
configType: z.ZodLiteral<import("./Configs.js").ConfigType.RESEND_OUTPUT>;
|
|
1015
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1016
|
+
integrationId: z.ZodString;
|
|
1017
|
+
integrationType: z.ZodLiteral<import("./Integrations.js").IntegrationType.APOLLO>;
|
|
1018
|
+
configType: z.ZodLiteral<import("./Configs.js").ConfigType.APOLLO_OUTPUT>;
|
|
1015
1019
|
}, z.core.$strip>]>;
|
|
1016
1020
|
metadata: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
1017
1021
|
webhookUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -1687,6 +1691,10 @@ export declare const agentOutputSchema: z.ZodObject<{
|
|
|
1687
1691
|
integrationId: z.ZodString;
|
|
1688
1692
|
integrationType: z.ZodLiteral<import("./Integrations.js").IntegrationType.RESEND>;
|
|
1689
1693
|
configType: z.ZodLiteral<import("./Configs.js").ConfigType.RESEND_OUTPUT>;
|
|
1694
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1695
|
+
integrationId: z.ZodString;
|
|
1696
|
+
integrationType: z.ZodLiteral<import("./Integrations.js").IntegrationType.APOLLO>;
|
|
1697
|
+
configType: z.ZodLiteral<import("./Configs.js").ConfigType.APOLLO_OUTPUT>;
|
|
1690
1698
|
}, z.core.$strip>]>;
|
|
1691
1699
|
}, z.core.$strip>;
|
|
1692
1700
|
export type AgentOutput = z.infer<typeof agentOutputSchema>;
|
|
@@ -2363,6 +2371,10 @@ export declare const transientAgentTriggerSchema: z.ZodObject<{
|
|
|
2363
2371
|
integrationId: z.ZodString;
|
|
2364
2372
|
integrationType: z.ZodLiteral<import("./Integrations.js").IntegrationType.RESEND>;
|
|
2365
2373
|
configType: z.ZodLiteral<import("./Configs.js").ConfigType.RESEND_OUTPUT>;
|
|
2374
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2375
|
+
integrationId: z.ZodString;
|
|
2376
|
+
integrationType: z.ZodLiteral<import("./Integrations.js").IntegrationType.APOLLO>;
|
|
2377
|
+
configType: z.ZodLiteral<import("./Configs.js").ConfigType.APOLLO_OUTPUT>;
|
|
2366
2378
|
}, z.core.$strip>]>>;
|
|
2367
2379
|
configType: z.ZodEnum<typeof import("./Configs.js").ConfigType>;
|
|
2368
2380
|
}, z.core.$strip>;
|
|
@@ -3036,6 +3048,10 @@ export declare const transientAgentOutputSchema: z.ZodObject<{
|
|
|
3036
3048
|
integrationId: z.ZodString;
|
|
3037
3049
|
integrationType: z.ZodLiteral<import("./Integrations.js").IntegrationType.RESEND>;
|
|
3038
3050
|
configType: z.ZodLiteral<import("./Configs.js").ConfigType.RESEND_OUTPUT>;
|
|
3051
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
3052
|
+
integrationId: z.ZodString;
|
|
3053
|
+
integrationType: z.ZodLiteral<import("./Integrations.js").IntegrationType.APOLLO>;
|
|
3054
|
+
configType: z.ZodLiteral<import("./Configs.js").ConfigType.APOLLO_OUTPUT>;
|
|
3039
3055
|
}, z.core.$strip>]>>;
|
|
3040
3056
|
configType: z.ZodEnum<typeof import("./Configs.js").ConfigType>;
|
|
3041
3057
|
}, z.core.$strip>;
|
|
@@ -3939,6 +3955,10 @@ export declare const agentSchema: z.ZodObject<{
|
|
|
3939
3955
|
integrationId: z.ZodString;
|
|
3940
3956
|
integrationType: z.ZodLiteral<import("./Integrations.js").IntegrationType.RESEND>;
|
|
3941
3957
|
configType: z.ZodLiteral<import("./Configs.js").ConfigType.RESEND_OUTPUT>;
|
|
3958
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
3959
|
+
integrationId: z.ZodString;
|
|
3960
|
+
integrationType: z.ZodLiteral<import("./Integrations.js").IntegrationType.APOLLO>;
|
|
3961
|
+
configType: z.ZodLiteral<import("./Configs.js").ConfigType.APOLLO_OUTPUT>;
|
|
3942
3962
|
}, z.core.$strip>]>;
|
|
3943
3963
|
metadata: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
3944
3964
|
webhookUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -4613,6 +4633,10 @@ export declare const agentSchema: z.ZodObject<{
|
|
|
4613
4633
|
integrationId: z.ZodString;
|
|
4614
4634
|
integrationType: z.ZodLiteral<import("./Integrations.js").IntegrationType.RESEND>;
|
|
4615
4635
|
configType: z.ZodLiteral<import("./Configs.js").ConfigType.RESEND_OUTPUT>;
|
|
4636
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
4637
|
+
integrationId: z.ZodString;
|
|
4638
|
+
integrationType: z.ZodLiteral<import("./Integrations.js").IntegrationType.APOLLO>;
|
|
4639
|
+
configType: z.ZodLiteral<import("./Configs.js").ConfigType.APOLLO_OUTPUT>;
|
|
4616
4640
|
}, z.core.$strip>]>;
|
|
4617
4641
|
}, z.core.$strip>>;
|
|
4618
4642
|
createdByUserId: z.ZodString;
|
|
@@ -5308,6 +5332,10 @@ export declare const agentUpdateSchema: z.ZodObject<{
|
|
|
5308
5332
|
integrationId: z.ZodString;
|
|
5309
5333
|
integrationType: z.ZodLiteral<import("./Integrations.js").IntegrationType.RESEND>;
|
|
5310
5334
|
configType: z.ZodLiteral<import("./Configs.js").ConfigType.RESEND_OUTPUT>;
|
|
5335
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
5336
|
+
integrationId: z.ZodString;
|
|
5337
|
+
integrationType: z.ZodLiteral<import("./Integrations.js").IntegrationType.APOLLO>;
|
|
5338
|
+
configType: z.ZodLiteral<import("./Configs.js").ConfigType.APOLLO_OUTPUT>;
|
|
5311
5339
|
}, z.core.$strip>]>;
|
|
5312
5340
|
metadata: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
5313
5341
|
webhookUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -5982,6 +6010,10 @@ export declare const agentUpdateSchema: z.ZodObject<{
|
|
|
5982
6010
|
integrationId: z.ZodString;
|
|
5983
6011
|
integrationType: z.ZodLiteral<import("./Integrations.js").IntegrationType.RESEND>;
|
|
5984
6012
|
configType: z.ZodLiteral<import("./Configs.js").ConfigType.RESEND_OUTPUT>;
|
|
6013
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
6014
|
+
integrationId: z.ZodString;
|
|
6015
|
+
integrationType: z.ZodLiteral<import("./Integrations.js").IntegrationType.APOLLO>;
|
|
6016
|
+
configType: z.ZodLiteral<import("./Configs.js").ConfigType.APOLLO_OUTPUT>;
|
|
5985
6017
|
}, z.core.$strip>]>;
|
|
5986
6018
|
}, z.core.$strip>>>;
|
|
5987
6019
|
prompt: z.ZodOptional<z.ZodObject<{
|
|
@@ -6687,6 +6719,10 @@ export declare const agentsResponseSchema: z.ZodObject<{
|
|
|
6687
6719
|
integrationId: z.ZodString;
|
|
6688
6720
|
integrationType: z.ZodLiteral<import("./Integrations.js").IntegrationType.RESEND>;
|
|
6689
6721
|
configType: z.ZodLiteral<import("./Configs.js").ConfigType.RESEND_OUTPUT>;
|
|
6722
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
6723
|
+
integrationId: z.ZodString;
|
|
6724
|
+
integrationType: z.ZodLiteral<import("./Integrations.js").IntegrationType.APOLLO>;
|
|
6725
|
+
configType: z.ZodLiteral<import("./Configs.js").ConfigType.APOLLO_OUTPUT>;
|
|
6690
6726
|
}, z.core.$strip>]>;
|
|
6691
6727
|
metadata: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
6692
6728
|
webhookUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -7361,6 +7397,10 @@ export declare const agentsResponseSchema: z.ZodObject<{
|
|
|
7361
7397
|
integrationId: z.ZodString;
|
|
7362
7398
|
integrationType: z.ZodLiteral<import("./Integrations.js").IntegrationType.RESEND>;
|
|
7363
7399
|
configType: z.ZodLiteral<import("./Configs.js").ConfigType.RESEND_OUTPUT>;
|
|
7400
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
7401
|
+
integrationId: z.ZodString;
|
|
7402
|
+
integrationType: z.ZodLiteral<import("./Integrations.js").IntegrationType.APOLLO>;
|
|
7403
|
+
configType: z.ZodLiteral<import("./Configs.js").ConfigType.APOLLO_OUTPUT>;
|
|
7364
7404
|
}, z.core.$strip>]>;
|
|
7365
7405
|
}, z.core.$strip>>;
|
|
7366
7406
|
createdByUserId: z.ZodString;
|
|
@@ -8069,6 +8109,10 @@ export declare const recentAgentSchema: z.ZodObject<{
|
|
|
8069
8109
|
integrationId: z.ZodString;
|
|
8070
8110
|
integrationType: z.ZodLiteral<import("./Integrations.js").IntegrationType.RESEND>;
|
|
8071
8111
|
configType: z.ZodLiteral<import("./Configs.js").ConfigType.RESEND_OUTPUT>;
|
|
8112
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
8113
|
+
integrationId: z.ZodString;
|
|
8114
|
+
integrationType: z.ZodLiteral<import("./Integrations.js").IntegrationType.APOLLO>;
|
|
8115
|
+
configType: z.ZodLiteral<import("./Configs.js").ConfigType.APOLLO_OUTPUT>;
|
|
8072
8116
|
}, z.core.$strip>]>;
|
|
8073
8117
|
metadata: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
8074
8118
|
webhookUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -8743,6 +8787,10 @@ export declare const recentAgentSchema: z.ZodObject<{
|
|
|
8743
8787
|
integrationId: z.ZodString;
|
|
8744
8788
|
integrationType: z.ZodLiteral<import("./Integrations.js").IntegrationType.RESEND>;
|
|
8745
8789
|
configType: z.ZodLiteral<import("./Configs.js").ConfigType.RESEND_OUTPUT>;
|
|
8790
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
8791
|
+
integrationId: z.ZodString;
|
|
8792
|
+
integrationType: z.ZodLiteral<import("./Integrations.js").IntegrationType.APOLLO>;
|
|
8793
|
+
configType: z.ZodLiteral<import("./Configs.js").ConfigType.APOLLO_OUTPUT>;
|
|
8746
8794
|
}, z.core.$strip>]>;
|
|
8747
8795
|
}, z.core.$strip>>;
|
|
8748
8796
|
createdByUserId: z.ZodString;
|
|
@@ -9239,6 +9287,10 @@ export declare const sdkAgentRunRequestBodySchema: z.ZodObject<{
|
|
|
9239
9287
|
integrationId: z.ZodString;
|
|
9240
9288
|
integrationType: z.ZodLiteral<import("./Integrations.js").IntegrationType.RESEND>;
|
|
9241
9289
|
configType: z.ZodLiteral<import("./Configs.js").ConfigType.RESEND_OUTPUT>;
|
|
9290
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
9291
|
+
integrationId: z.ZodString;
|
|
9292
|
+
integrationType: z.ZodLiteral<import("./Integrations.js").IntegrationType.APOLLO>;
|
|
9293
|
+
configType: z.ZodLiteral<import("./Configs.js").ConfigType.APOLLO_OUTPUT>;
|
|
9242
9294
|
}, z.core.$strip>]>>>;
|
|
9243
9295
|
options: z.ZodOptional<z.ZodObject<{
|
|
9244
9296
|
maxTurns: z.ZodOptional<z.ZodNumber>;
|
|
@@ -11341,6 +11393,10 @@ export declare const sdkAgentRunNormalizedRequestSchema: z.ZodObject<{
|
|
|
11341
11393
|
integrationId: z.ZodString;
|
|
11342
11394
|
integrationType: z.ZodLiteral<import("./Integrations.js").IntegrationType.RESEND>;
|
|
11343
11395
|
configType: z.ZodLiteral<import("./Configs.js").ConfigType.RESEND_OUTPUT>;
|
|
11396
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
11397
|
+
integrationId: z.ZodString;
|
|
11398
|
+
integrationType: z.ZodLiteral<import("./Integrations.js").IntegrationType.APOLLO>;
|
|
11399
|
+
configType: z.ZodLiteral<import("./Configs.js").ConfigType.APOLLO_OUTPUT>;
|
|
11344
11400
|
}, z.core.$strip>]>>;
|
|
11345
11401
|
toolApprovals: z.ZodArray<z.ZodString>;
|
|
11346
11402
|
options: z.ZodObject<{
|
|
@@ -13441,6 +13497,10 @@ export declare const sdkAgentRunResponseBodySchema: z.ZodObject<{
|
|
|
13441
13497
|
integrationId: z.ZodString;
|
|
13442
13498
|
integrationType: z.ZodLiteral<import("./Integrations.js").IntegrationType.RESEND>;
|
|
13443
13499
|
configType: z.ZodLiteral<import("./Configs.js").ConfigType.RESEND_OUTPUT>;
|
|
13500
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
13501
|
+
integrationId: z.ZodString;
|
|
13502
|
+
integrationType: z.ZodLiteral<import("./Integrations.js").IntegrationType.APOLLO>;
|
|
13503
|
+
configType: z.ZodLiteral<import("./Configs.js").ConfigType.APOLLO_OUTPUT>;
|
|
13444
13504
|
}, z.core.$strip>]>>;
|
|
13445
13505
|
toolApprovals: z.ZodArray<z.ZodString>;
|
|
13446
13506
|
options: z.ZodObject<{
|
|
@@ -19982,6 +20042,10 @@ export declare const sdkSampleEventsRequestSchema: z.ZodObject<{
|
|
|
19982
20042
|
integrationId: z.ZodString;
|
|
19983
20043
|
integrationType: z.ZodLiteral<import("./Integrations.js").IntegrationType.RESEND>;
|
|
19984
20044
|
configType: z.ZodLiteral<import("./Configs.js").ConfigType.RESEND_OUTPUT>;
|
|
20045
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
20046
|
+
integrationId: z.ZodString;
|
|
20047
|
+
integrationType: z.ZodLiteral<import("./Integrations.js").IntegrationType.APOLLO>;
|
|
20048
|
+
configType: z.ZodLiteral<import("./Configs.js").ConfigType.APOLLO_OUTPUT>;
|
|
19985
20049
|
}, z.core.$strip>]>;
|
|
19986
20050
|
}, z.core.$strip>>;
|
|
19987
20051
|
}, z.core.$strip>;
|
package/package.json
CHANGED
package/dist/Events.d.ts
DELETED
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
export declare const eventTypeSchema: z.ZodEnum<{
|
|
3
|
-
JOB_CREATED: "JOB_CREATED";
|
|
4
|
-
AUTOMATION_RAN: "AUTOMATION_RAN";
|
|
5
|
-
}>;
|
|
6
|
-
export type EventType = z.infer<typeof eventTypeSchema>;
|
|
7
|
-
declare const jobCreatedEventSchema: z.ZodObject<{
|
|
8
|
-
eventType: z.ZodLiteral<"JOB_CREATED">;
|
|
9
|
-
jobId: z.ZodString;
|
|
10
|
-
}, z.core.$strip>;
|
|
11
|
-
export type JobCreatedEvent = z.infer<typeof jobCreatedEventSchema>;
|
|
12
|
-
declare const automationSnapshotSchema: z.ZodObject<{
|
|
13
|
-
id: z.ZodString;
|
|
14
|
-
name: z.ZodString;
|
|
15
|
-
organizationId: z.ZodString;
|
|
16
|
-
projectId: z.ZodString;
|
|
17
|
-
userId: z.ZodString;
|
|
18
|
-
requireApproval: z.ZodBoolean;
|
|
19
|
-
}, z.core.$strip>;
|
|
20
|
-
export type AutomationSnapshot = z.infer<typeof automationSnapshotSchema>;
|
|
21
|
-
declare const runSnapshotSchema: z.ZodObject<{
|
|
22
|
-
id: z.ZodString;
|
|
23
|
-
status: z.ZodEnum<{
|
|
24
|
-
readonly SUCCESS: "success";
|
|
25
|
-
readonly FAILED: "failed";
|
|
26
|
-
readonly CANCELLED: "cancelled";
|
|
27
|
-
readonly SKIPPED: "skipped";
|
|
28
|
-
readonly IN_PROGRESS: "in_progress";
|
|
29
|
-
readonly AWAITING_APPROVAL: "awaiting_approval";
|
|
30
|
-
}>;
|
|
31
|
-
isManuallyTriggered: z.ZodBoolean;
|
|
32
|
-
startedAt: z.ZodString;
|
|
33
|
-
trigger: z.ZodObject<{
|
|
34
|
-
event: z.ZodString;
|
|
35
|
-
integration: z.ZodEnum<typeof import("./Integrations.js").IntegrationType>;
|
|
36
|
-
source: z.ZodString;
|
|
37
|
-
title: z.ZodOptional<z.ZodString>;
|
|
38
|
-
subheader: z.ZodOptional<z.ZodString>;
|
|
39
|
-
url: z.ZodOptional<z.ZodString>;
|
|
40
|
-
}, z.core.$strip>;
|
|
41
|
-
}, z.core.$strip>;
|
|
42
|
-
export type RunSnapshot = z.infer<typeof runSnapshotSchema>;
|
|
43
|
-
declare const automationRanEventSchema: z.ZodObject<{
|
|
44
|
-
eventType: z.ZodLiteral<"AUTOMATION_RAN">;
|
|
45
|
-
automation: z.ZodObject<{
|
|
46
|
-
id: z.ZodString;
|
|
47
|
-
name: z.ZodString;
|
|
48
|
-
organizationId: z.ZodString;
|
|
49
|
-
projectId: z.ZodString;
|
|
50
|
-
userId: z.ZodString;
|
|
51
|
-
requireApproval: z.ZodBoolean;
|
|
52
|
-
}, z.core.$strip>;
|
|
53
|
-
run: z.ZodObject<{
|
|
54
|
-
id: z.ZodString;
|
|
55
|
-
status: z.ZodEnum<{
|
|
56
|
-
readonly SUCCESS: "success";
|
|
57
|
-
readonly FAILED: "failed";
|
|
58
|
-
readonly CANCELLED: "cancelled";
|
|
59
|
-
readonly SKIPPED: "skipped";
|
|
60
|
-
readonly IN_PROGRESS: "in_progress";
|
|
61
|
-
readonly AWAITING_APPROVAL: "awaiting_approval";
|
|
62
|
-
}>;
|
|
63
|
-
isManuallyTriggered: z.ZodBoolean;
|
|
64
|
-
startedAt: z.ZodString;
|
|
65
|
-
trigger: z.ZodObject<{
|
|
66
|
-
event: z.ZodString;
|
|
67
|
-
integration: z.ZodEnum<typeof import("./Integrations.js").IntegrationType>;
|
|
68
|
-
source: z.ZodString;
|
|
69
|
-
title: z.ZodOptional<z.ZodString>;
|
|
70
|
-
subheader: z.ZodOptional<z.ZodString>;
|
|
71
|
-
url: z.ZodOptional<z.ZodString>;
|
|
72
|
-
}, z.core.$strip>;
|
|
73
|
-
}, z.core.$strip>;
|
|
74
|
-
}, z.core.$strip>;
|
|
75
|
-
export type AutomationRanEvent = z.infer<typeof automationRanEventSchema>;
|
|
76
|
-
export declare const domainEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
77
|
-
eventType: z.ZodLiteral<"JOB_CREATED">;
|
|
78
|
-
jobId: z.ZodString;
|
|
79
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
80
|
-
eventType: z.ZodLiteral<"AUTOMATION_RAN">;
|
|
81
|
-
automation: z.ZodObject<{
|
|
82
|
-
id: z.ZodString;
|
|
83
|
-
name: z.ZodString;
|
|
84
|
-
organizationId: z.ZodString;
|
|
85
|
-
projectId: z.ZodString;
|
|
86
|
-
userId: z.ZodString;
|
|
87
|
-
requireApproval: z.ZodBoolean;
|
|
88
|
-
}, z.core.$strip>;
|
|
89
|
-
run: z.ZodObject<{
|
|
90
|
-
id: z.ZodString;
|
|
91
|
-
status: z.ZodEnum<{
|
|
92
|
-
readonly SUCCESS: "success";
|
|
93
|
-
readonly FAILED: "failed";
|
|
94
|
-
readonly CANCELLED: "cancelled";
|
|
95
|
-
readonly SKIPPED: "skipped";
|
|
96
|
-
readonly IN_PROGRESS: "in_progress";
|
|
97
|
-
readonly AWAITING_APPROVAL: "awaiting_approval";
|
|
98
|
-
}>;
|
|
99
|
-
isManuallyTriggered: z.ZodBoolean;
|
|
100
|
-
startedAt: z.ZodString;
|
|
101
|
-
trigger: z.ZodObject<{
|
|
102
|
-
event: z.ZodString;
|
|
103
|
-
integration: z.ZodEnum<typeof import("./Integrations.js").IntegrationType>;
|
|
104
|
-
source: z.ZodString;
|
|
105
|
-
title: z.ZodOptional<z.ZodString>;
|
|
106
|
-
subheader: z.ZodOptional<z.ZodString>;
|
|
107
|
-
url: z.ZodOptional<z.ZodString>;
|
|
108
|
-
}, z.core.$strip>;
|
|
109
|
-
}, z.core.$strip>;
|
|
110
|
-
}, z.core.$strip>], "eventType">;
|
|
111
|
-
export type DomainEvent = z.infer<typeof domainEventSchema>;
|
|
112
|
-
export {};
|
package/dist/Events.js
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import { runHistoryStatusSchema } from "./RunHistoryTypes.js";
|
|
3
|
-
import { runHistoryTriggerSchema } from "./types.js";
|
|
4
|
-
export const eventTypeSchema = z.enum(["JOB_CREATED", "AUTOMATION_RAN"]);
|
|
5
|
-
const baseEventSchema = z.object({
|
|
6
|
-
eventType: eventTypeSchema
|
|
7
|
-
});
|
|
8
|
-
const jobCreatedEventSchema = baseEventSchema.extend({
|
|
9
|
-
eventType: z.literal("JOB_CREATED"),
|
|
10
|
-
jobId: z.string()
|
|
11
|
-
});
|
|
12
|
-
const automationSnapshotSchema = z.object({
|
|
13
|
-
id: z.string(),
|
|
14
|
-
name: z.string(),
|
|
15
|
-
organizationId: z.string(),
|
|
16
|
-
projectId: z.string(),
|
|
17
|
-
userId: z.string(),
|
|
18
|
-
requireApproval: z.boolean()
|
|
19
|
-
});
|
|
20
|
-
const runSnapshotSchema = z.object({
|
|
21
|
-
id: z.string(),
|
|
22
|
-
status: runHistoryStatusSchema,
|
|
23
|
-
isManuallyTriggered: z.boolean(),
|
|
24
|
-
startedAt: z.string().datetime(),
|
|
25
|
-
trigger: runHistoryTriggerSchema
|
|
26
|
-
});
|
|
27
|
-
const automationRanEventSchema = baseEventSchema.extend({
|
|
28
|
-
eventType: z.literal("AUTOMATION_RAN"),
|
|
29
|
-
automation: automationSnapshotSchema,
|
|
30
|
-
run: runSnapshotSchema
|
|
31
|
-
});
|
|
32
|
-
export const domainEventSchema = z.discriminatedUnion("eventType", [jobCreatedEventSchema, automationRanEventSchema]);
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type * as z from "zod";
|
|
2
|
-
export declare const triggerPayloadProjections: Readonly<Record<string, TriggerPayloadProjection>>;
|
|
3
|
-
export declare function isProjectedTriggerName(name: string): boolean;
|
|
4
|
-
export type TriggerPayloadSchemaProjection = {
|
|
5
|
-
kind: "schema";
|
|
6
|
-
schema: z.ZodType;
|
|
7
|
-
/** Printed verbatim after the payload interface name, e.g. "<TBody = unknown>". */
|
|
8
|
-
typeParams?: string;
|
|
9
|
-
/** Dot-path within the payload -> TypeScript type expression printed instead of the schema field. */
|
|
10
|
-
fieldOverrides?: Record<string, string>;
|
|
11
|
-
/** Extra terse-sdk type imports the overrides reference. */
|
|
12
|
-
sdkImports?: string[];
|
|
13
|
-
};
|
|
14
|
-
export type TriggerPayloadUnionProjection = {
|
|
15
|
-
kind: "union";
|
|
16
|
-
members: string[];
|
|
17
|
-
};
|
|
18
|
-
export type TriggerPayloadProjection = TriggerPayloadSchemaProjection | TriggerPayloadUnionProjection;
|
|
@@ -1,167 +0,0 @@
|
|
|
1
|
-
import { GithubIssueCommentCreatedTriggerSchema, GithubPRClosedTriggerSchema, GithubPRMergedTriggerSchema, GithubPROpenedTriggerSchema, GithubPRSynchronizedTriggerSchema, GithubPushTriggerSchema, attioCallRecordingCreatedTriggerSchema, attioCommentCreatedTriggerSchema, attioCommentDeletedTriggerSchema, attioCommentResolvedTriggerSchema, attioCommentUnresolvedTriggerSchema, attioListAttributeCreatedTriggerSchema, attioListAttributeUpdatedTriggerSchema, attioListCreatedTriggerSchema, attioListDeletedTriggerSchema, attioListEntryCreatedTriggerSchema, attioListEntryDeletedTriggerSchema, attioListEntryUpdatedTriggerSchema, attioListUpdatedTriggerSchema, attioNoteContentUpdatedTriggerSchema, attioNoteCreatedTriggerSchema, attioNoteDeletedTriggerSchema, attioNoteUpdatedTriggerSchema, attioObjectAttributeCreatedTriggerSchema, attioObjectAttributeUpdatedTriggerSchema, attioRecordCreatedTriggerSchema, attioRecordDeletedTriggerSchema, attioRecordMergedTriggerSchema, attioRecordUpdatedTriggerSchema, attioTaskCreatedTriggerSchema, attioTaskDeletedTriggerSchema, attioTaskUpdatedTriggerSchema, attioWorkspaceMemberCreatedTriggerSchema, cronTriggerSchema, gmailTriggerSchema, heyReachCampaignCompletedTriggerSchema, heyReachConnectionRequestAcceptedTriggerSchema, heyReachConnectionRequestSentTriggerSchema, heyReachFollowSentTriggerSchema, heyReachInmailReplyReceivedTriggerSchema, heyReachInmailSentTriggerSchema, heyReachLeadTagUpdatedTriggerSchema, heyReachLikedPostTriggerSchema, heyReachMessageReplyReceivedTriggerSchema, heyReachMessageSentTriggerSchema, heyReachViewedProfileTriggerSchema, linearCommentCreatedTriggerSchema, linearIssueCreatedTriggerSchema, linearIssueUpdatedTriggerSchema, slackAppMentionTriggerSchema, slackMessageTriggerSchema, slackReactionAddedTriggerSchema, webMonitorTriggerSchema, webhookTriggerSchema, workOSInvitationAcceptedTriggerSchema, workOSInvitationCreatedTriggerSchema, workOSInvitationResentTriggerSchema, workOSInvitationRevokedTriggerSchema, workOSOrganizationMembershipCreatedTriggerSchema, workOSOrganizationMembershipDeletedTriggerSchema, workOSOrganizationMembershipUpdatedTriggerSchema, workOSOrganizationTriggerSchema, workOSUserCreatedTriggerSchema, workOSUserDeletedTriggerSchema, workOSUserUpdatedTriggerSchema } from "./Triggers.js";
|
|
2
|
-
// The hand-written SlackMessageTrigger et al. widen these schema fields (z.array(z.unknown()))
|
|
3
|
-
// to the structured Slack types, so projections must print the widened form.
|
|
4
|
-
const slackWidenedFields = {
|
|
5
|
-
blocks: "SlackBlocks | null",
|
|
6
|
-
attachments: "SlackAttachments | null",
|
|
7
|
-
files: "SlackFiles | null"
|
|
8
|
-
};
|
|
9
|
-
const slackSdkImports = ["SlackAttachments", "SlackBlocks", "SlackFiles"];
|
|
10
|
-
const attioRecordProjection = (schema) => ({
|
|
11
|
-
kind: "schema",
|
|
12
|
-
schema,
|
|
13
|
-
typeParams: "<TValues = Record<string, unknown>>",
|
|
14
|
-
// The registered attio event transform flattens record.values before handlers run,
|
|
15
|
-
// matching the SDK-level generic, not the raw wire shape.
|
|
16
|
-
fieldOverrides: { "record.values": "TValues" }
|
|
17
|
-
});
|
|
18
|
-
export const triggerPayloadProjections = {
|
|
19
|
-
SlackMessageTrigger: { kind: "schema", schema: slackMessageTriggerSchema, fieldOverrides: slackWidenedFields, sdkImports: slackSdkImports },
|
|
20
|
-
SlackAppMentionTrigger: { kind: "schema", schema: slackAppMentionTriggerSchema, fieldOverrides: slackWidenedFields, sdkImports: slackSdkImports },
|
|
21
|
-
SlackReactionAddedTrigger: { kind: "schema", schema: slackReactionAddedTriggerSchema, fieldOverrides: slackWidenedFields, sdkImports: slackSdkImports },
|
|
22
|
-
SlackTrigger: { kind: "union", members: ["SlackMessageTrigger", "SlackAppMentionTrigger", "SlackReactionAddedTrigger"] },
|
|
23
|
-
GithubPushTrigger: { kind: "schema", schema: GithubPushTriggerSchema },
|
|
24
|
-
GithubPROpenedTrigger: { kind: "schema", schema: GithubPROpenedTriggerSchema },
|
|
25
|
-
GithubPRSynchronizedTrigger: { kind: "schema", schema: GithubPRSynchronizedTriggerSchema },
|
|
26
|
-
GithubPRClosedTrigger: { kind: "schema", schema: GithubPRClosedTriggerSchema },
|
|
27
|
-
GithubPRMergedTrigger: { kind: "schema", schema: GithubPRMergedTriggerSchema },
|
|
28
|
-
GithubIssueCommentCreatedTrigger: { kind: "schema", schema: GithubIssueCommentCreatedTriggerSchema },
|
|
29
|
-
GithubPRTrigger: { kind: "union", members: ["GithubPROpenedTrigger", "GithubPRSynchronizedTrigger", "GithubPRClosedTrigger", "GithubPRMergedTrigger"] },
|
|
30
|
-
GithubTrigger: {
|
|
31
|
-
kind: "union",
|
|
32
|
-
members: ["GithubPushTrigger", "GithubPROpenedTrigger", "GithubPRSynchronizedTrigger", "GithubPRClosedTrigger", "GithubPRMergedTrigger", "GithubIssueCommentCreatedTrigger"]
|
|
33
|
-
},
|
|
34
|
-
GmailTrigger: { kind: "schema", schema: gmailTriggerSchema },
|
|
35
|
-
LinearIssueCreatedTrigger: { kind: "schema", schema: linearIssueCreatedTriggerSchema },
|
|
36
|
-
LinearIssueUpdatedTrigger: { kind: "schema", schema: linearIssueUpdatedTriggerSchema },
|
|
37
|
-
LinearCommentCreatedTrigger: { kind: "schema", schema: linearCommentCreatedTriggerSchema },
|
|
38
|
-
LinearTrigger: { kind: "union", members: ["LinearIssueCreatedTrigger", "LinearIssueUpdatedTrigger", "LinearCommentCreatedTrigger"] },
|
|
39
|
-
WorkOSUserCreatedTrigger: { kind: "schema", schema: workOSUserCreatedTriggerSchema },
|
|
40
|
-
WorkOSUserUpdatedTrigger: { kind: "schema", schema: workOSUserUpdatedTriggerSchema },
|
|
41
|
-
WorkOSUserDeletedTrigger: { kind: "schema", schema: workOSUserDeletedTriggerSchema },
|
|
42
|
-
WorkOSUserTrigger: { kind: "union", members: ["WorkOSUserCreatedTrigger", "WorkOSUserUpdatedTrigger", "WorkOSUserDeletedTrigger"] },
|
|
43
|
-
WorkOSOrganizationMembershipCreatedTrigger: { kind: "schema", schema: workOSOrganizationMembershipCreatedTriggerSchema },
|
|
44
|
-
WorkOSOrganizationMembershipUpdatedTrigger: { kind: "schema", schema: workOSOrganizationMembershipUpdatedTriggerSchema },
|
|
45
|
-
WorkOSOrganizationMembershipDeletedTrigger: { kind: "schema", schema: workOSOrganizationMembershipDeletedTriggerSchema },
|
|
46
|
-
WorkOSMembershipTrigger: {
|
|
47
|
-
kind: "union",
|
|
48
|
-
members: ["WorkOSOrganizationMembershipCreatedTrigger", "WorkOSOrganizationMembershipUpdatedTrigger", "WorkOSOrganizationMembershipDeletedTrigger"]
|
|
49
|
-
},
|
|
50
|
-
WorkOSInvitationCreatedTrigger: { kind: "schema", schema: workOSInvitationCreatedTriggerSchema },
|
|
51
|
-
WorkOSInvitationAcceptedTrigger: { kind: "schema", schema: workOSInvitationAcceptedTriggerSchema },
|
|
52
|
-
WorkOSInvitationResentTrigger: { kind: "schema", schema: workOSInvitationResentTriggerSchema },
|
|
53
|
-
WorkOSInvitationRevokedTrigger: { kind: "schema", schema: workOSInvitationRevokedTriggerSchema },
|
|
54
|
-
WorkOSInvitationTrigger: {
|
|
55
|
-
kind: "union",
|
|
56
|
-
members: ["WorkOSInvitationCreatedTrigger", "WorkOSInvitationAcceptedTrigger", "WorkOSInvitationResentTrigger", "WorkOSInvitationRevokedTrigger"]
|
|
57
|
-
},
|
|
58
|
-
WorkOSOrganizationTrigger: { kind: "schema", schema: workOSOrganizationTriggerSchema },
|
|
59
|
-
WorkOSTrigger: {
|
|
60
|
-
kind: "union",
|
|
61
|
-
members: [
|
|
62
|
-
"WorkOSUserCreatedTrigger",
|
|
63
|
-
"WorkOSUserUpdatedTrigger",
|
|
64
|
-
"WorkOSUserDeletedTrigger",
|
|
65
|
-
"WorkOSOrganizationMembershipCreatedTrigger",
|
|
66
|
-
"WorkOSOrganizationMembershipUpdatedTrigger",
|
|
67
|
-
"WorkOSOrganizationMembershipDeletedTrigger",
|
|
68
|
-
"WorkOSInvitationCreatedTrigger",
|
|
69
|
-
"WorkOSInvitationAcceptedTrigger",
|
|
70
|
-
"WorkOSInvitationResentTrigger",
|
|
71
|
-
"WorkOSInvitationRevokedTrigger",
|
|
72
|
-
"WorkOSOrganizationTrigger"
|
|
73
|
-
]
|
|
74
|
-
},
|
|
75
|
-
HeyReachConnectionRequestSentTrigger: { kind: "schema", schema: heyReachConnectionRequestSentTriggerSchema },
|
|
76
|
-
HeyReachConnectionRequestAcceptedTrigger: { kind: "schema", schema: heyReachConnectionRequestAcceptedTriggerSchema },
|
|
77
|
-
HeyReachMessageSentTrigger: { kind: "schema", schema: heyReachMessageSentTriggerSchema },
|
|
78
|
-
HeyReachMessageReplyReceivedTrigger: { kind: "schema", schema: heyReachMessageReplyReceivedTriggerSchema },
|
|
79
|
-
HeyReachInmailSentTrigger: { kind: "schema", schema: heyReachInmailSentTriggerSchema },
|
|
80
|
-
HeyReachInmailReplyReceivedTrigger: { kind: "schema", schema: heyReachInmailReplyReceivedTriggerSchema },
|
|
81
|
-
HeyReachFollowSentTrigger: { kind: "schema", schema: heyReachFollowSentTriggerSchema },
|
|
82
|
-
HeyReachLikedPostTrigger: { kind: "schema", schema: heyReachLikedPostTriggerSchema },
|
|
83
|
-
HeyReachViewedProfileTrigger: { kind: "schema", schema: heyReachViewedProfileTriggerSchema },
|
|
84
|
-
HeyReachCampaignCompletedTrigger: { kind: "schema", schema: heyReachCampaignCompletedTriggerSchema },
|
|
85
|
-
HeyReachLeadTagUpdatedTrigger: { kind: "schema", schema: heyReachLeadTagUpdatedTriggerSchema },
|
|
86
|
-
HeyReachTrigger: {
|
|
87
|
-
kind: "union",
|
|
88
|
-
members: [
|
|
89
|
-
"HeyReachConnectionRequestSentTrigger",
|
|
90
|
-
"HeyReachConnectionRequestAcceptedTrigger",
|
|
91
|
-
"HeyReachMessageSentTrigger",
|
|
92
|
-
"HeyReachMessageReplyReceivedTrigger",
|
|
93
|
-
"HeyReachInmailSentTrigger",
|
|
94
|
-
"HeyReachInmailReplyReceivedTrigger",
|
|
95
|
-
"HeyReachFollowSentTrigger",
|
|
96
|
-
"HeyReachLikedPostTrigger",
|
|
97
|
-
"HeyReachViewedProfileTrigger",
|
|
98
|
-
"HeyReachCampaignCompletedTrigger",
|
|
99
|
-
"HeyReachLeadTagUpdatedTrigger"
|
|
100
|
-
]
|
|
101
|
-
},
|
|
102
|
-
AttioCallRecordingCreatedTrigger: { kind: "schema", schema: attioCallRecordingCreatedTriggerSchema },
|
|
103
|
-
AttioCommentCreatedTrigger: { kind: "schema", schema: attioCommentCreatedTriggerSchema },
|
|
104
|
-
AttioCommentResolvedTrigger: { kind: "schema", schema: attioCommentResolvedTriggerSchema },
|
|
105
|
-
AttioCommentUnresolvedTrigger: { kind: "schema", schema: attioCommentUnresolvedTriggerSchema },
|
|
106
|
-
AttioCommentDeletedTrigger: { kind: "schema", schema: attioCommentDeletedTriggerSchema },
|
|
107
|
-
AttioListCreatedTrigger: { kind: "schema", schema: attioListCreatedTriggerSchema },
|
|
108
|
-
AttioListUpdatedTrigger: { kind: "schema", schema: attioListUpdatedTriggerSchema },
|
|
109
|
-
AttioListDeletedTrigger: { kind: "schema", schema: attioListDeletedTriggerSchema },
|
|
110
|
-
AttioListAttributeCreatedTrigger: { kind: "schema", schema: attioListAttributeCreatedTriggerSchema },
|
|
111
|
-
AttioListAttributeUpdatedTrigger: { kind: "schema", schema: attioListAttributeUpdatedTriggerSchema },
|
|
112
|
-
AttioListEntryCreatedTrigger: { kind: "schema", schema: attioListEntryCreatedTriggerSchema },
|
|
113
|
-
AttioListEntryUpdatedTrigger: { kind: "schema", schema: attioListEntryUpdatedTriggerSchema },
|
|
114
|
-
AttioListEntryDeletedTrigger: { kind: "schema", schema: attioListEntryDeletedTriggerSchema },
|
|
115
|
-
AttioObjectAttributeCreatedTrigger: { kind: "schema", schema: attioObjectAttributeCreatedTriggerSchema },
|
|
116
|
-
AttioObjectAttributeUpdatedTrigger: { kind: "schema", schema: attioObjectAttributeUpdatedTriggerSchema },
|
|
117
|
-
AttioNoteCreatedTrigger: { kind: "schema", schema: attioNoteCreatedTriggerSchema },
|
|
118
|
-
AttioNoteContentUpdatedTrigger: { kind: "schema", schema: attioNoteContentUpdatedTriggerSchema },
|
|
119
|
-
AttioNoteUpdatedTrigger: { kind: "schema", schema: attioNoteUpdatedTriggerSchema },
|
|
120
|
-
AttioNoteDeletedTrigger: { kind: "schema", schema: attioNoteDeletedTriggerSchema },
|
|
121
|
-
AttioRecordCreatedTrigger: attioRecordProjection(attioRecordCreatedTriggerSchema),
|
|
122
|
-
AttioRecordMergedTrigger: attioRecordProjection(attioRecordMergedTriggerSchema),
|
|
123
|
-
AttioRecordUpdatedTrigger: attioRecordProjection(attioRecordUpdatedTriggerSchema),
|
|
124
|
-
AttioRecordDeletedTrigger: { kind: "schema", schema: attioRecordDeletedTriggerSchema },
|
|
125
|
-
AttioTaskCreatedTrigger: { kind: "schema", schema: attioTaskCreatedTriggerSchema },
|
|
126
|
-
AttioTaskUpdatedTrigger: { kind: "schema", schema: attioTaskUpdatedTriggerSchema },
|
|
127
|
-
AttioTaskDeletedTrigger: { kind: "schema", schema: attioTaskDeletedTriggerSchema },
|
|
128
|
-
AttioWorkspaceMemberCreatedTrigger: { kind: "schema", schema: attioWorkspaceMemberCreatedTriggerSchema },
|
|
129
|
-
AttioTrigger: {
|
|
130
|
-
kind: "union",
|
|
131
|
-
members: [
|
|
132
|
-
"AttioCallRecordingCreatedTrigger",
|
|
133
|
-
"AttioCommentCreatedTrigger",
|
|
134
|
-
"AttioCommentResolvedTrigger",
|
|
135
|
-
"AttioCommentUnresolvedTrigger",
|
|
136
|
-
"AttioCommentDeletedTrigger",
|
|
137
|
-
"AttioListCreatedTrigger",
|
|
138
|
-
"AttioListUpdatedTrigger",
|
|
139
|
-
"AttioListDeletedTrigger",
|
|
140
|
-
"AttioListAttributeCreatedTrigger",
|
|
141
|
-
"AttioListAttributeUpdatedTrigger",
|
|
142
|
-
"AttioListEntryCreatedTrigger",
|
|
143
|
-
"AttioListEntryUpdatedTrigger",
|
|
144
|
-
"AttioListEntryDeletedTrigger",
|
|
145
|
-
"AttioObjectAttributeCreatedTrigger",
|
|
146
|
-
"AttioObjectAttributeUpdatedTrigger",
|
|
147
|
-
"AttioNoteCreatedTrigger",
|
|
148
|
-
"AttioNoteContentUpdatedTrigger",
|
|
149
|
-
"AttioNoteUpdatedTrigger",
|
|
150
|
-
"AttioNoteDeletedTrigger",
|
|
151
|
-
"AttioRecordCreatedTrigger",
|
|
152
|
-
"AttioRecordMergedTrigger",
|
|
153
|
-
"AttioRecordUpdatedTrigger",
|
|
154
|
-
"AttioRecordDeletedTrigger",
|
|
155
|
-
"AttioTaskCreatedTrigger",
|
|
156
|
-
"AttioTaskUpdatedTrigger",
|
|
157
|
-
"AttioTaskDeletedTrigger",
|
|
158
|
-
"AttioWorkspaceMemberCreatedTrigger"
|
|
159
|
-
]
|
|
160
|
-
},
|
|
161
|
-
CronTrigger: { kind: "schema", schema: cronTriggerSchema },
|
|
162
|
-
WebhookTrigger: { kind: "schema", schema: webhookTriggerSchema, typeParams: "<TBody = unknown>", fieldOverrides: { body: "TBody" } },
|
|
163
|
-
WebMonitorTrigger: { kind: "schema", schema: webMonitorTriggerSchema, typeParams: "<TPayload = unknown>", fieldOverrides: { payload: "TPayload" } }
|
|
164
|
-
};
|
|
165
|
-
export function isProjectedTriggerName(name) {
|
|
166
|
-
return name in triggerPayloadProjections;
|
|
167
|
-
}
|