@trigger.dev/core 3.0.0-beta.5 → 3.0.0-beta.50

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.
Files changed (201) hide show
  1. package/dist/api-Pl9fxB8v.d.mts +13879 -0
  2. package/dist/api-sNoooMbT.d.ts +13879 -0
  3. package/dist/catalog-H7yFiZ60.d.mts +202 -0
  4. package/dist/catalog-h79CG5Wy.d.ts +202 -0
  5. package/dist/common-CLW82lkt.d.mts +1423 -0
  6. package/dist/common-CLW82lkt.d.ts +1423 -0
  7. package/dist/{eventFilterMatches-2kHImluE.d.mts → eventFilter-66NaBAMi.d.mts} +1 -3
  8. package/dist/{eventFilterMatches-2kHImluE.d.ts → eventFilter-66NaBAMi.d.ts} +1 -3
  9. package/dist/eventFilterMatches.d.mts +6 -0
  10. package/dist/eventFilterMatches.d.ts +6 -0
  11. package/dist/eventFilterMatches.js +165 -0
  12. package/dist/eventFilterMatches.js.map +1 -0
  13. package/dist/eventFilterMatches.mjs +163 -0
  14. package/dist/eventFilterMatches.mjs.map +1 -0
  15. package/dist/index.d.mts +14 -16657
  16. package/dist/index.d.ts +14 -16657
  17. package/dist/index.js +8 -1
  18. package/dist/index.js.map +1 -1
  19. package/dist/index.mjs +8 -2
  20. package/dist/index.mjs.map +1 -1
  21. package/dist/json-DBPEJQRe.d.mts +16 -0
  22. package/dist/json-DBPEJQRe.d.ts +16 -0
  23. package/dist/manager-KvCabW1a.d.mts +18 -0
  24. package/dist/manager-OBA35PzR.d.ts +18 -0
  25. package/dist/messages-JvHJ83wv.d.mts +19428 -0
  26. package/dist/messages-JvHJ83wv.d.ts +19428 -0
  27. package/dist/replacements.d.mts +22 -0
  28. package/dist/replacements.d.ts +22 -0
  29. package/dist/replacements.js +33 -0
  30. package/dist/replacements.js.map +1 -0
  31. package/dist/replacements.mjs +28 -0
  32. package/dist/replacements.mjs.map +1 -0
  33. package/dist/requestFilter-HNZQEpQb.d.ts +180 -0
  34. package/dist/requestFilter-b5W2_1oP.d.mts +180 -0
  35. package/dist/requestFilterMatches.d.mts +13 -0
  36. package/dist/requestFilterMatches.d.ts +13 -0
  37. package/dist/requestFilterMatches.js +238 -0
  38. package/dist/requestFilterMatches.js.map +1 -0
  39. package/dist/requestFilterMatches.mjs +235 -0
  40. package/dist/requestFilterMatches.mjs.map +1 -0
  41. package/dist/retry.d.mts +10 -0
  42. package/dist/retry.d.ts +10 -0
  43. package/dist/retry.js +100 -0
  44. package/dist/retry.js.map +1 -0
  45. package/dist/retry.mjs +97 -0
  46. package/dist/retry.mjs.map +1 -0
  47. package/dist/schemas/index.d.mts +2611 -0
  48. package/dist/schemas/index.d.ts +2611 -0
  49. package/dist/schemas/index.js +1630 -0
  50. package/dist/schemas/index.js.map +1 -0
  51. package/dist/schemas/index.mjs +1463 -0
  52. package/dist/schemas/index.mjs.map +1 -0
  53. package/dist/schemas-C9ssfehv.d.mts +2568 -0
  54. package/dist/schemas-C9ssfehv.d.ts +2568 -0
  55. package/dist/taskLogger-CzADe4je.d.ts +33 -0
  56. package/dist/taskLogger-r_AFTX45.d.mts +33 -0
  57. package/dist/tracer-N0p2Fuuv.d.mts +23 -0
  58. package/dist/tracer-N0p2Fuuv.d.ts +23 -0
  59. package/dist/types.d.mts +11 -0
  60. package/dist/types.d.ts +11 -0
  61. package/dist/types.js +4 -0
  62. package/dist/types.js.map +1 -0
  63. package/dist/types.mjs +3 -0
  64. package/dist/types.mjs.map +1 -0
  65. package/dist/utils.d.mts +7 -0
  66. package/dist/utils.d.ts +7 -0
  67. package/dist/utils.js +33 -0
  68. package/dist/utils.js.map +1 -0
  69. package/dist/utils.mjs +30 -0
  70. package/dist/utils.mjs.map +1 -0
  71. package/dist/v3/dev/index.d.mts +29 -0
  72. package/dist/v3/dev/index.d.ts +29 -0
  73. package/dist/v3/dev/index.js +93 -0
  74. package/dist/v3/dev/index.js.map +1 -0
  75. package/dist/v3/dev/index.mjs +91 -0
  76. package/dist/v3/dev/index.mjs.map +1 -0
  77. package/dist/v3/errors.d.mts +39 -0
  78. package/dist/v3/errors.d.ts +39 -0
  79. package/dist/v3/errors.js +204 -0
  80. package/dist/v3/errors.js.map +1 -0
  81. package/dist/v3/errors.mjs +195 -0
  82. package/dist/v3/errors.mjs.map +1 -0
  83. package/dist/v3/index.d.mts +436 -20511
  84. package/dist/v3/index.d.ts +436 -20511
  85. package/dist/v3/index.js +2822 -2890
  86. package/dist/v3/index.js.map +1 -1
  87. package/dist/v3/index.mjs +2767 -2863
  88. package/dist/v3/index.mjs.map +1 -1
  89. package/dist/v3/logger-api.d.mts +24 -0
  90. package/dist/v3/logger-api.d.ts +24 -0
  91. package/dist/v3/logger-api.js +118 -0
  92. package/dist/v3/logger-api.js.map +1 -0
  93. package/dist/v3/logger-api.mjs +116 -0
  94. package/dist/v3/logger-api.mjs.map +1 -0
  95. package/dist/v3/otel/index.js +119 -53
  96. package/dist/v3/otel/index.js.map +1 -1
  97. package/dist/v3/otel/index.mjs +119 -53
  98. package/dist/v3/otel/index.mjs.map +1 -1
  99. package/dist/v3/prod/index.d.mts +46 -0
  100. package/dist/v3/prod/index.d.ts +46 -0
  101. package/dist/v3/prod/index.js +180 -0
  102. package/dist/v3/prod/index.js.map +1 -0
  103. package/dist/v3/prod/index.mjs +178 -0
  104. package/dist/v3/prod/index.mjs.map +1 -0
  105. package/dist/v3/schemas/index.d.mts +4741 -0
  106. package/dist/v3/schemas/index.d.ts +4741 -0
  107. package/dist/v3/schemas/index.js +2039 -0
  108. package/dist/v3/schemas/index.js.map +1 -0
  109. package/dist/v3/schemas/index.mjs +1900 -0
  110. package/dist/v3/schemas/index.mjs.map +1 -0
  111. package/dist/v3/semanticInternalAttributes.d.mts +56 -0
  112. package/dist/v3/semanticInternalAttributes.d.ts +56 -0
  113. package/dist/v3/semanticInternalAttributes.js +61 -0
  114. package/dist/v3/semanticInternalAttributes.js.map +1 -0
  115. package/dist/v3/semanticInternalAttributes.mjs +59 -0
  116. package/dist/v3/semanticInternalAttributes.mjs.map +1 -0
  117. package/dist/v3/utils/durations.d.mts +15 -0
  118. package/dist/v3/utils/durations.d.ts +15 -0
  119. package/dist/v3/utils/durations.js +93 -0
  120. package/dist/v3/utils/durations.js.map +1 -0
  121. package/dist/v3/utils/durations.mjs +82 -0
  122. package/dist/v3/utils/durations.mjs.map +1 -0
  123. package/dist/v3/utils/flattenAttributes.d.mts +8 -0
  124. package/dist/v3/utils/flattenAttributes.d.ts +8 -0
  125. package/dist/v3/utils/flattenAttributes.js +131 -0
  126. package/dist/v3/utils/flattenAttributes.js.map +1 -0
  127. package/dist/v3/utils/flattenAttributes.mjs +126 -0
  128. package/dist/v3/utils/flattenAttributes.mjs.map +1 -0
  129. package/dist/v3/utils/ioSerialization.d.mts +21 -0
  130. package/dist/v3/utils/ioSerialization.d.ts +21 -0
  131. package/dist/v3/utils/ioSerialization.js +2367 -0
  132. package/dist/v3/utils/ioSerialization.js.map +1 -0
  133. package/dist/v3/utils/ioSerialization.mjs +2358 -0
  134. package/dist/v3/utils/ioSerialization.mjs.map +1 -0
  135. package/dist/v3/utils/omit.d.mts +3 -0
  136. package/dist/v3/utils/omit.d.ts +3 -0
  137. package/dist/v3/utils/omit.js +20 -0
  138. package/dist/v3/utils/omit.js.map +1 -0
  139. package/dist/v3/utils/omit.mjs +18 -0
  140. package/dist/v3/utils/omit.mjs.map +1 -0
  141. package/dist/v3/utils/retries.d.mts +46 -0
  142. package/dist/v3/utils/retries.d.ts +46 -0
  143. package/dist/v3/utils/retries.js +118 -0
  144. package/dist/v3/utils/retries.js.map +1 -0
  145. package/dist/v3/utils/retries.mjs +113 -0
  146. package/dist/v3/utils/retries.mjs.map +1 -0
  147. package/dist/v3/utils/structuredLogger.d.mts +31 -0
  148. package/dist/v3/utils/structuredLogger.d.ts +31 -0
  149. package/dist/v3/utils/structuredLogger.js +88 -0
  150. package/dist/v3/utils/structuredLogger.js.map +1 -0
  151. package/dist/v3/utils/structuredLogger.mjs +86 -0
  152. package/dist/v3/utils/structuredLogger.mjs.map +1 -0
  153. package/dist/v3/utils/timers.d.mts +6 -0
  154. package/dist/v3/utils/timers.d.ts +6 -0
  155. package/dist/v3/utils/timers.js +31 -0
  156. package/dist/v3/utils/timers.js.map +1 -0
  157. package/dist/v3/utils/timers.mjs +28 -0
  158. package/dist/v3/utils/timers.mjs.map +1 -0
  159. package/dist/v3/workers/index.d.mts +144 -0
  160. package/dist/v3/workers/index.d.ts +144 -0
  161. package/dist/v3/workers/index.js +3683 -0
  162. package/dist/v3/workers/index.js.map +1 -0
  163. package/dist/v3/workers/index.mjs +3664 -0
  164. package/dist/v3/workers/index.mjs.map +1 -0
  165. package/dist/v3/zodIpc.d.mts +32 -0
  166. package/dist/v3/zodIpc.d.ts +32 -0
  167. package/dist/v3/zodIpc.js +268 -0
  168. package/dist/v3/zodIpc.js.map +1 -0
  169. package/dist/v3/zodIpc.mjs +266 -0
  170. package/dist/v3/zodIpc.mjs.map +1 -0
  171. package/dist/v3/zodMessageHandler.d.mts +82 -0
  172. package/dist/v3/zodMessageHandler.d.ts +82 -0
  173. package/dist/v3/zodMessageHandler.js +222 -0
  174. package/dist/v3/zodMessageHandler.js.map +1 -0
  175. package/dist/v3/zodMessageHandler.mjs +217 -0
  176. package/dist/v3/zodMessageHandler.mjs.map +1 -0
  177. package/dist/v3/zodNamespace.d.mts +3663 -0
  178. package/dist/v3/zodNamespace.d.ts +3663 -0
  179. package/dist/v3/zodNamespace.js +397 -0
  180. package/dist/v3/zodNamespace.js.map +1 -0
  181. package/dist/v3/zodNamespace.mjs +395 -0
  182. package/dist/v3/zodNamespace.mjs.map +1 -0
  183. package/dist/v3/zodSocket.d.mts +93 -0
  184. package/dist/v3/zodSocket.d.ts +93 -0
  185. package/dist/v3/zodSocket.js +350 -0
  186. package/dist/v3/zodSocket.js.map +1 -0
  187. package/dist/v3/zodSocket.mjs +346 -0
  188. package/dist/v3/zodSocket.mjs.map +1 -0
  189. package/dist/v3/zodfetch.d.mts +219 -0
  190. package/dist/v3/zodfetch.d.ts +219 -0
  191. package/dist/v3/zodfetch.js +834 -0
  192. package/dist/v3/zodfetch.js.map +1 -0
  193. package/dist/v3/zodfetch.mjs +811 -0
  194. package/dist/v3/zodfetch.mjs.map +1 -0
  195. package/dist/versions.d.mts +11 -0
  196. package/dist/versions.d.ts +11 -0
  197. package/dist/versions.js +31 -0
  198. package/dist/versions.js.map +1 -0
  199. package/dist/versions.mjs +27 -0
  200. package/dist/versions.mjs.map +1 -0
  201. package/package.json +223 -5
@@ -0,0 +1,2611 @@
1
+ import { au as RuntimeEnvironmentType } from '../api-sNoooMbT.js';
2
+ export { al as ApiEventLog, ak as ApiEventLogSchema, ay as AutoYieldConfig, ax as AutoYieldConfigSchema, aG as AutoYieldMetadata, aF as AutoYieldMetadataSchema, be as CachedTask, cb as CachedTaskSchema, bd as ClientTask, bs as CompleteTaskBodyInput, br as CompleteTaskBodyInputSchema, bt as CompleteTaskBodyOutput, bv as CompleteTaskBodyV2Input, bu as CompleteTaskBodyV2InputSchema, N as ConcurrencyLimitOptionsSchema, bU as CreateExternalConnectionBody, bT as CreateExternalConnectionBodySchema, b8 as CreateRunResponseBody, b7 as CreateRunResponseBodySchema, D as DELIVER_WEBHOOK_REQUEST, as as DeliverEventResponse, ar as DeliverEventResponseSchema, a4 as DynamicTriggerEndpointMetadata, a3 as DynamicTriggerEndpointMetadataSchema, ae as EndpointHeadersSchema, a9 as EndpointIndexError, a8 as EndpointIndexErrorSchema, c1 as EphemeralEventDispatcherRequestBody, c0 as EphemeralEventDispatcherRequestBodySchema, c3 as EphemeralEventDispatcherResponseBody, c2 as EphemeralEventDispatcherResponseBodySchema, ag as ExecuteJobHeadersSchema, af as ExecuteJobRunMetadataSchema, bx as FailTaskBodyInput, bw as FailTaskBodyInputSchema, ad as GetEndpointIndexResponse, ac as GetEndpointIndexResponseSchema, bW as GetRunStatuses, bV as GetRunStatusesSchema, y as HandleTriggerSource, x as HandleTriggerSourceSchema, a5 as HttpEndpointMetadata, C as HttpEndpointRequestHeadersSchema, B as HttpSourceRequestHeaders, A as HttpSourceRequestHeadersSchema, H as HttpSourceResponseMetadata, bC as HttpSourceResponseSchema, a7 as IndexEndpointResponse, a6 as IndexEndpointResponseSchema, aa as IndexEndpointStats, bN as InitializeCronScheduleBodySchema, bK as InitializeTriggerBody, bJ as InitializeTriggerBodySchema, bZ as InvokeJobRequestBody, bY as InvokeJobRequestBodySchema, bX as InvokeJobResponseSchema, b$ as InvokeOptions, b_ as InvokeOptionsSchema, X as JobMetadata, O as JobMetadataSchema, c5 as KeyValueStoreResponseBody, c4 as KeyValueStoreResponseBodySchema, bc as LogMessage, bb as LogMessageSchema, bz as NormalizedRequest, by as NormalizedRequestSchema, bB as NormalizedResponse, bA as NormalizedResponseSchema, bk as OverridableRunTaskOptions, F as PongErrorResponseSchema, I as PongResponse, G as PongResponseSchema, P as PongSuccessResponseSchema, b4 as PreprocessRunBody, b3 as PreprocessRunBodySchema, b6 as PreprocessRunResponse, b5 as PreprocessRunResponseSchema, M as QueueOptions, Q as QueueOptionsSchema, n as REGISTER_SOURCE_EVENT_V1, o as REGISTER_SOURCE_EVENT_V2, i as REGISTER_WEBHOOK, ai as RawEvent, ah as RawEventSchema, bf as RedactSchema, ba as RedactString, b9 as RedactStringSchema, bO as RegisterCronScheduleBody, R as RegisterHTTPTriggerSourceBodySchema, bM as RegisterIntervalScheduleBody, bL as RegisterIntervalScheduleBodySchema, f as RegisterSMTPTriggerSourceBodySchema, g as RegisterSQSTriggerSourceBodySchema, bQ as RegisterScheduleBody, bP as RegisterScheduleBodySchema, bS as RegisterScheduleResponseBody, bR as RegisterScheduleResponseBodySchema, h as RegisterSourceChannelBodySchema, u as RegisterSourceEventOptions, r as RegisterSourceEventSchemaV1, v as RegisterSourceEventSchemaV2, s as RegisterSourceEventV1, w as RegisterSourceEventV2, bF as RegisterTriggerBodySchemaV1, bH as RegisterTriggerBodySchemaV2, bG as RegisterTriggerBodyV1, bI as RegisterTriggerBodyV2, q as RegisterTriggerSource, p as RegisterTriggerSourceSchema, m as RegisterWebhookPayload, l as RegisterWebhookPayloadSchema, k as RegisterWebhookSource, j as RegisterWebhookSourceSchema, t as RegisteredOptionsDiff, bh as RetryOptions, bg as RetryOptionsSchema, aI as RunJobAutoYieldExecutionError, aH as RunJobAutoYieldExecutionErrorSchema, aM as RunJobAutoYieldRateLimitError, aL as RunJobAutoYieldRateLimitErrorSchema, aK as RunJobAutoYieldWithCompletedTaskExecutionError, aJ as RunJobAutoYieldWithCompletedTaskExecutionErrorSchema, aA as RunJobBody, az as RunJobBodySchema, aW as RunJobCanceledWithTask, aV as RunJobCanceledWithTaskSchema, aC as RunJobError, a_ as RunJobErrorResponse, aZ as RunJobErrorResponseSchema, aB as RunJobErrorSchema, aO as RunJobInvalidPayloadError, aN as RunJobInvalidPayloadErrorSchema, b2 as RunJobResponse, b1 as RunJobResponseSchema, b0 as RunJobResumeWithParallelTask, a$ as RunJobResumeWithParallelTaskSchema, aS as RunJobResumeWithTask, aR as RunJobResumeWithTaskSchema, aU as RunJobRetryWithTask, aT as RunJobRetryWithTaskSchema, aY as RunJobSuccess, aX as RunJobSuccessSchema, aQ as RunJobUnresolvedAuthError, aP as RunJobUnresolvedAuthErrorSchema, aE as RunJobYieldExecutionError, aD as RunJobYieldExecutionErrorSchema, aw as RunSourceContext, av as RunSourceContextSchema, bm as RunTaskBodyInput, bl as RunTaskBodyInputSchema, bo as RunTaskBodyOutput, bn as RunTaskBodyOutputSchema, bj as RunTaskOptions, bi as RunTaskOptionsSchema, bq as RunTaskResponseWithCachedTasksBody, bp as RunTaskResponseWithCachedTasksBodySchema, at as RuntimeEnvironmentTypeSchema, ao as SendBulkEventsBodySchema, aj as SendEvent, ap as SendEventBody, an as SendEventBodySchema, aq as SendEventOptions, am as SendEventOptionsSchema, ca as ServerTask, c9 as ServerTaskSchema, S as SourceEventOption, Y as SourceMetadataV1, _ as SourceMetadataV2, Z as SourceMetadataV2Schema, c8 as TaskSchema, c7 as TaskStatus, c6 as TaskStatusSchema, z as TriggerSource, T as TriggerSourceSchema, a as UpdateTriggerSourceBodyV1, U as UpdateTriggerSourceBodyV1Schema, c as UpdateTriggerSourceBodyV2, b as UpdateTriggerSourceBodyV2Schema, e as UpdateWebhookBody, d as UpdateWebhookBodySchema, J as ValidateErrorResponseSchema, L as ValidateResponse, K as ValidateResponseSchema, V as ValidateSuccessResponseSchema, a2 as WebhookContextMetadata, a1 as WebhookContextMetadataSchema, bE as WebhookDeliveryResponse, bD as WebhookDeliveryResponseSchema, a0 as WebhookMetadata, $ as WebhookMetadataSchema, E as WebhookSourceRequestHeaders, W as WebhookSourceRequestHeadersSchema, ab as parseEndpointIndexStats } from '../api-sNoooMbT.js';
3
+ import { S as SerializableJson } from '../json-DBPEJQRe.js';
4
+ export { D as DeserializedJson, a as DeserializedJsonSchema, b as SerializableJsonSchema } from '../json-DBPEJQRe.js';
5
+ import { E as EventFilter } from '../eventFilter-66NaBAMi.js';
6
+ export { a as EventFilterSchema, c as EventRule, b as EventRuleSchema, s as stringPatternMatchers } from '../eventFilter-66NaBAMi.js';
7
+ import { z } from 'zod';
8
+ export { H as HTTPMethodUnionSchema, a as HttpMethod, b as RequestFilter, R as RequestFilterSchema, d as ResponseFilter, c as ResponseFilterSchema, S as StringMatch } from '../requestFilter-HNZQEpQb.js';
9
+ import { Prettify } from '../types.js';
10
+
11
+ declare const EventExampleSchema: z.ZodObject<{
12
+ id: z.ZodString;
13
+ icon: z.ZodOptional<z.ZodString>;
14
+ name: z.ZodString;
15
+ payload: z.ZodAny;
16
+ }, "strip", z.ZodTypeAny, {
17
+ name: string;
18
+ id: string;
19
+ icon?: string | undefined;
20
+ payload?: any;
21
+ }, {
22
+ name: string;
23
+ id: string;
24
+ icon?: string | undefined;
25
+ payload?: any;
26
+ }>;
27
+ type EventExample = z.infer<typeof EventExampleSchema>;
28
+ declare const EventSpecificationSchema: z.ZodObject<{
29
+ name: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
30
+ title: z.ZodString;
31
+ source: z.ZodString;
32
+ icon: z.ZodString;
33
+ filter: z.ZodOptional<z.ZodType<EventFilter, z.ZodTypeDef, EventFilter>>;
34
+ properties: z.ZodOptional<z.ZodArray<z.ZodObject<{
35
+ label: z.ZodString;
36
+ text: z.ZodString;
37
+ url: z.ZodOptional<z.ZodString>;
38
+ imageUrl: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
39
+ }, "strip", z.ZodTypeAny, {
40
+ label: string;
41
+ text: string;
42
+ url?: string | undefined;
43
+ imageUrl?: string[] | undefined;
44
+ }, {
45
+ label: string;
46
+ text: string;
47
+ url?: string | undefined;
48
+ imageUrl?: string[] | undefined;
49
+ }>, "many">>;
50
+ schema: z.ZodOptional<z.ZodAny>;
51
+ examples: z.ZodOptional<z.ZodArray<z.ZodObject<{
52
+ id: z.ZodString;
53
+ icon: z.ZodOptional<z.ZodString>;
54
+ name: z.ZodString;
55
+ payload: z.ZodAny;
56
+ }, "strip", z.ZodTypeAny, {
57
+ name: string;
58
+ id: string;
59
+ icon?: string | undefined;
60
+ payload?: any;
61
+ }, {
62
+ name: string;
63
+ id: string;
64
+ icon?: string | undefined;
65
+ payload?: any;
66
+ }>, "many">>;
67
+ }, "strip", z.ZodTypeAny, {
68
+ name: (string | string[]) & (string | string[] | undefined);
69
+ source: string;
70
+ icon: string;
71
+ title: string;
72
+ filter?: EventFilter | undefined;
73
+ properties?: {
74
+ label: string;
75
+ text: string;
76
+ url?: string | undefined;
77
+ imageUrl?: string[] | undefined;
78
+ }[] | undefined;
79
+ schema?: any;
80
+ examples?: {
81
+ name: string;
82
+ id: string;
83
+ icon?: string | undefined;
84
+ payload?: any;
85
+ }[] | undefined;
86
+ }, {
87
+ name: (string | string[]) & (string | string[] | undefined);
88
+ source: string;
89
+ icon: string;
90
+ title: string;
91
+ filter?: EventFilter | undefined;
92
+ properties?: {
93
+ label: string;
94
+ text: string;
95
+ url?: string | undefined;
96
+ imageUrl?: string[] | undefined;
97
+ }[] | undefined;
98
+ schema?: any;
99
+ examples?: {
100
+ name: string;
101
+ id: string;
102
+ icon?: string | undefined;
103
+ payload?: any;
104
+ }[] | undefined;
105
+ }>;
106
+ declare const DynamicTriggerMetadataSchema: z.ZodObject<{
107
+ type: z.ZodLiteral<"dynamic">;
108
+ id: z.ZodString;
109
+ }, "strip", z.ZodTypeAny, {
110
+ type: "dynamic";
111
+ id: string;
112
+ }, {
113
+ type: "dynamic";
114
+ id: string;
115
+ }>;
116
+ declare const TriggerHelpSchema: z.ZodObject<{
117
+ noRuns: z.ZodOptional<z.ZodObject<{
118
+ text: z.ZodString;
119
+ link: z.ZodOptional<z.ZodString>;
120
+ }, "strip", z.ZodTypeAny, {
121
+ text: string;
122
+ link?: string | undefined;
123
+ }, {
124
+ text: string;
125
+ link?: string | undefined;
126
+ }>>;
127
+ }, "strip", z.ZodTypeAny, {
128
+ noRuns?: {
129
+ text: string;
130
+ link?: string | undefined;
131
+ } | undefined;
132
+ }, {
133
+ noRuns?: {
134
+ text: string;
135
+ link?: string | undefined;
136
+ } | undefined;
137
+ }>;
138
+ declare const StaticTriggerMetadataSchema: z.ZodObject<{
139
+ type: z.ZodLiteral<"static">;
140
+ title: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
141
+ properties: z.ZodOptional<z.ZodArray<z.ZodObject<{
142
+ label: z.ZodString;
143
+ text: z.ZodString;
144
+ url: z.ZodOptional<z.ZodString>;
145
+ imageUrl: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
146
+ }, "strip", z.ZodTypeAny, {
147
+ label: string;
148
+ text: string;
149
+ url?: string | undefined;
150
+ imageUrl?: string[] | undefined;
151
+ }, {
152
+ label: string;
153
+ text: string;
154
+ url?: string | undefined;
155
+ imageUrl?: string[] | undefined;
156
+ }>, "many">>;
157
+ rule: z.ZodObject<{
158
+ event: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
159
+ source: z.ZodString;
160
+ payload: z.ZodOptional<z.ZodType<EventFilter, z.ZodTypeDef, EventFilter>>;
161
+ context: z.ZodOptional<z.ZodType<EventFilter, z.ZodTypeDef, EventFilter>>;
162
+ }, "strip", z.ZodTypeAny, {
163
+ event: (string | string[]) & (string | string[] | undefined);
164
+ source: string;
165
+ payload?: EventFilter | undefined;
166
+ context?: EventFilter | undefined;
167
+ }, {
168
+ event: (string | string[]) & (string | string[] | undefined);
169
+ source: string;
170
+ payload?: EventFilter | undefined;
171
+ context?: EventFilter | undefined;
172
+ }>;
173
+ link: z.ZodOptional<z.ZodString>;
174
+ help: z.ZodOptional<z.ZodObject<{
175
+ noRuns: z.ZodOptional<z.ZodObject<{
176
+ text: z.ZodString;
177
+ link: z.ZodOptional<z.ZodString>;
178
+ }, "strip", z.ZodTypeAny, {
179
+ text: string;
180
+ link?: string | undefined;
181
+ }, {
182
+ text: string;
183
+ link?: string | undefined;
184
+ }>>;
185
+ }, "strip", z.ZodTypeAny, {
186
+ noRuns?: {
187
+ text: string;
188
+ link?: string | undefined;
189
+ } | undefined;
190
+ }, {
191
+ noRuns?: {
192
+ text: string;
193
+ link?: string | undefined;
194
+ } | undefined;
195
+ }>>;
196
+ }, "strip", z.ZodTypeAny, {
197
+ type: "static";
198
+ title: (string | string[]) & (string | string[] | undefined);
199
+ rule: {
200
+ event: (string | string[]) & (string | string[] | undefined);
201
+ source: string;
202
+ payload?: EventFilter | undefined;
203
+ context?: EventFilter | undefined;
204
+ };
205
+ properties?: {
206
+ label: string;
207
+ text: string;
208
+ url?: string | undefined;
209
+ imageUrl?: string[] | undefined;
210
+ }[] | undefined;
211
+ link?: string | undefined;
212
+ help?: {
213
+ noRuns?: {
214
+ text: string;
215
+ link?: string | undefined;
216
+ } | undefined;
217
+ } | undefined;
218
+ }, {
219
+ type: "static";
220
+ title: (string | string[]) & (string | string[] | undefined);
221
+ rule: {
222
+ event: (string | string[]) & (string | string[] | undefined);
223
+ source: string;
224
+ payload?: EventFilter | undefined;
225
+ context?: EventFilter | undefined;
226
+ };
227
+ properties?: {
228
+ label: string;
229
+ text: string;
230
+ url?: string | undefined;
231
+ imageUrl?: string[] | undefined;
232
+ }[] | undefined;
233
+ link?: string | undefined;
234
+ help?: {
235
+ noRuns?: {
236
+ text: string;
237
+ link?: string | undefined;
238
+ } | undefined;
239
+ } | undefined;
240
+ }>;
241
+ declare const InvokeTriggerMetadataSchema: z.ZodObject<{
242
+ type: z.ZodLiteral<"invoke">;
243
+ }, "strip", z.ZodTypeAny, {
244
+ type: "invoke";
245
+ }, {
246
+ type: "invoke";
247
+ }>;
248
+ declare const ScheduledTriggerMetadataSchema: z.ZodObject<{
249
+ type: z.ZodLiteral<"scheduled">;
250
+ schedule: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
251
+ type: z.ZodLiteral<"interval">;
252
+ options: z.ZodObject<{
253
+ seconds: z.ZodNumber;
254
+ }, "strip", z.ZodTypeAny, {
255
+ seconds: number;
256
+ }, {
257
+ seconds: number;
258
+ }>;
259
+ accountId: z.ZodOptional<z.ZodString>;
260
+ metadata: z.ZodAny;
261
+ }, "strip", z.ZodTypeAny, {
262
+ options: {
263
+ seconds: number;
264
+ };
265
+ type: "interval";
266
+ accountId?: string | undefined;
267
+ metadata?: any;
268
+ }, {
269
+ options: {
270
+ seconds: number;
271
+ };
272
+ type: "interval";
273
+ accountId?: string | undefined;
274
+ metadata?: any;
275
+ }>, z.ZodObject<{
276
+ type: z.ZodLiteral<"cron">;
277
+ options: z.ZodObject<{
278
+ cron: z.ZodString;
279
+ }, "strip", z.ZodTypeAny, {
280
+ cron: string;
281
+ }, {
282
+ cron: string;
283
+ }>;
284
+ accountId: z.ZodOptional<z.ZodString>;
285
+ metadata: z.ZodAny;
286
+ }, "strip", z.ZodTypeAny, {
287
+ options: {
288
+ cron: string;
289
+ };
290
+ type: "cron";
291
+ accountId?: string | undefined;
292
+ metadata?: any;
293
+ }, {
294
+ options: {
295
+ cron: string;
296
+ };
297
+ type: "cron";
298
+ accountId?: string | undefined;
299
+ metadata?: any;
300
+ }>]>;
301
+ }, "strip", z.ZodTypeAny, {
302
+ type: "scheduled";
303
+ schedule: {
304
+ options: {
305
+ cron: string;
306
+ };
307
+ type: "cron";
308
+ accountId?: string | undefined;
309
+ metadata?: any;
310
+ } | {
311
+ options: {
312
+ seconds: number;
313
+ };
314
+ type: "interval";
315
+ accountId?: string | undefined;
316
+ metadata?: any;
317
+ };
318
+ }, {
319
+ type: "scheduled";
320
+ schedule: {
321
+ options: {
322
+ cron: string;
323
+ };
324
+ type: "cron";
325
+ accountId?: string | undefined;
326
+ metadata?: any;
327
+ } | {
328
+ options: {
329
+ seconds: number;
330
+ };
331
+ type: "interval";
332
+ accountId?: string | undefined;
333
+ metadata?: any;
334
+ };
335
+ }>;
336
+ declare const TriggerMetadataSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
337
+ type: z.ZodLiteral<"dynamic">;
338
+ id: z.ZodString;
339
+ }, "strip", z.ZodTypeAny, {
340
+ type: "dynamic";
341
+ id: string;
342
+ }, {
343
+ type: "dynamic";
344
+ id: string;
345
+ }>, z.ZodObject<{
346
+ type: z.ZodLiteral<"static">;
347
+ title: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
348
+ properties: z.ZodOptional<z.ZodArray<z.ZodObject<{
349
+ label: z.ZodString;
350
+ text: z.ZodString;
351
+ url: z.ZodOptional<z.ZodString>;
352
+ imageUrl: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
353
+ }, "strip", z.ZodTypeAny, {
354
+ label: string;
355
+ text: string;
356
+ url?: string | undefined;
357
+ imageUrl?: string[] | undefined;
358
+ }, {
359
+ label: string;
360
+ text: string;
361
+ url?: string | undefined;
362
+ imageUrl?: string[] | undefined;
363
+ }>, "many">>;
364
+ rule: z.ZodObject<{
365
+ event: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
366
+ source: z.ZodString;
367
+ payload: z.ZodOptional<z.ZodType<EventFilter, z.ZodTypeDef, EventFilter>>;
368
+ context: z.ZodOptional<z.ZodType<EventFilter, z.ZodTypeDef, EventFilter>>;
369
+ }, "strip", z.ZodTypeAny, {
370
+ event: (string | string[]) & (string | string[] | undefined);
371
+ source: string;
372
+ payload?: EventFilter | undefined;
373
+ context?: EventFilter | undefined;
374
+ }, {
375
+ event: (string | string[]) & (string | string[] | undefined);
376
+ source: string;
377
+ payload?: EventFilter | undefined;
378
+ context?: EventFilter | undefined;
379
+ }>;
380
+ link: z.ZodOptional<z.ZodString>;
381
+ help: z.ZodOptional<z.ZodObject<{
382
+ noRuns: z.ZodOptional<z.ZodObject<{
383
+ text: z.ZodString;
384
+ link: z.ZodOptional<z.ZodString>;
385
+ }, "strip", z.ZodTypeAny, {
386
+ text: string;
387
+ link?: string | undefined;
388
+ }, {
389
+ text: string;
390
+ link?: string | undefined;
391
+ }>>;
392
+ }, "strip", z.ZodTypeAny, {
393
+ noRuns?: {
394
+ text: string;
395
+ link?: string | undefined;
396
+ } | undefined;
397
+ }, {
398
+ noRuns?: {
399
+ text: string;
400
+ link?: string | undefined;
401
+ } | undefined;
402
+ }>>;
403
+ }, "strip", z.ZodTypeAny, {
404
+ type: "static";
405
+ title: (string | string[]) & (string | string[] | undefined);
406
+ rule: {
407
+ event: (string | string[]) & (string | string[] | undefined);
408
+ source: string;
409
+ payload?: EventFilter | undefined;
410
+ context?: EventFilter | undefined;
411
+ };
412
+ properties?: {
413
+ label: string;
414
+ text: string;
415
+ url?: string | undefined;
416
+ imageUrl?: string[] | undefined;
417
+ }[] | undefined;
418
+ link?: string | undefined;
419
+ help?: {
420
+ noRuns?: {
421
+ text: string;
422
+ link?: string | undefined;
423
+ } | undefined;
424
+ } | undefined;
425
+ }, {
426
+ type: "static";
427
+ title: (string | string[]) & (string | string[] | undefined);
428
+ rule: {
429
+ event: (string | string[]) & (string | string[] | undefined);
430
+ source: string;
431
+ payload?: EventFilter | undefined;
432
+ context?: EventFilter | undefined;
433
+ };
434
+ properties?: {
435
+ label: string;
436
+ text: string;
437
+ url?: string | undefined;
438
+ imageUrl?: string[] | undefined;
439
+ }[] | undefined;
440
+ link?: string | undefined;
441
+ help?: {
442
+ noRuns?: {
443
+ text: string;
444
+ link?: string | undefined;
445
+ } | undefined;
446
+ } | undefined;
447
+ }>, z.ZodObject<{
448
+ type: z.ZodLiteral<"scheduled">;
449
+ schedule: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
450
+ type: z.ZodLiteral<"interval">;
451
+ options: z.ZodObject<{
452
+ seconds: z.ZodNumber;
453
+ }, "strip", z.ZodTypeAny, {
454
+ seconds: number;
455
+ }, {
456
+ seconds: number;
457
+ }>;
458
+ accountId: z.ZodOptional<z.ZodString>;
459
+ metadata: z.ZodAny;
460
+ }, "strip", z.ZodTypeAny, {
461
+ options: {
462
+ seconds: number;
463
+ };
464
+ type: "interval";
465
+ accountId?: string | undefined;
466
+ metadata?: any;
467
+ }, {
468
+ options: {
469
+ seconds: number;
470
+ };
471
+ type: "interval";
472
+ accountId?: string | undefined;
473
+ metadata?: any;
474
+ }>, z.ZodObject<{
475
+ type: z.ZodLiteral<"cron">;
476
+ options: z.ZodObject<{
477
+ cron: z.ZodString;
478
+ }, "strip", z.ZodTypeAny, {
479
+ cron: string;
480
+ }, {
481
+ cron: string;
482
+ }>;
483
+ accountId: z.ZodOptional<z.ZodString>;
484
+ metadata: z.ZodAny;
485
+ }, "strip", z.ZodTypeAny, {
486
+ options: {
487
+ cron: string;
488
+ };
489
+ type: "cron";
490
+ accountId?: string | undefined;
491
+ metadata?: any;
492
+ }, {
493
+ options: {
494
+ cron: string;
495
+ };
496
+ type: "cron";
497
+ accountId?: string | undefined;
498
+ metadata?: any;
499
+ }>]>;
500
+ }, "strip", z.ZodTypeAny, {
501
+ type: "scheduled";
502
+ schedule: {
503
+ options: {
504
+ cron: string;
505
+ };
506
+ type: "cron";
507
+ accountId?: string | undefined;
508
+ metadata?: any;
509
+ } | {
510
+ options: {
511
+ seconds: number;
512
+ };
513
+ type: "interval";
514
+ accountId?: string | undefined;
515
+ metadata?: any;
516
+ };
517
+ }, {
518
+ type: "scheduled";
519
+ schedule: {
520
+ options: {
521
+ cron: string;
522
+ };
523
+ type: "cron";
524
+ accountId?: string | undefined;
525
+ metadata?: any;
526
+ } | {
527
+ options: {
528
+ seconds: number;
529
+ };
530
+ type: "interval";
531
+ accountId?: string | undefined;
532
+ metadata?: any;
533
+ };
534
+ }>, z.ZodObject<{
535
+ type: z.ZodLiteral<"invoke">;
536
+ }, "strip", z.ZodTypeAny, {
537
+ type: "invoke";
538
+ }, {
539
+ type: "invoke";
540
+ }>]>;
541
+ type TriggerMetadata = z.infer<typeof TriggerMetadataSchema>;
542
+
543
+ declare const ErrorWithStackSchema: z.ZodObject<{
544
+ message: z.ZodString;
545
+ name: z.ZodOptional<z.ZodString>;
546
+ stack: z.ZodOptional<z.ZodString>;
547
+ }, "strip", z.ZodTypeAny, {
548
+ message: string;
549
+ name?: string | undefined;
550
+ stack?: string | undefined;
551
+ }, {
552
+ message: string;
553
+ name?: string | undefined;
554
+ stack?: string | undefined;
555
+ }>;
556
+ type ErrorWithStack = z.infer<typeof ErrorWithStackSchema>;
557
+ declare const SchemaErrorSchema: z.ZodObject<{
558
+ path: z.ZodArray<z.ZodString, "many">;
559
+ message: z.ZodString;
560
+ }, "strip", z.ZodTypeAny, {
561
+ message: string;
562
+ path: string[];
563
+ }, {
564
+ message: string;
565
+ path: string[];
566
+ }>;
567
+ type SchemaError = z.infer<typeof SchemaErrorSchema>;
568
+
569
+ /** A property that is displayed in the logs */
570
+ declare const DisplayPropertySchema: z.ZodObject<{
571
+ /** The label for the property */
572
+ label: z.ZodString;
573
+ /** The value of the property */
574
+ text: z.ZodString;
575
+ /** The URL to link to when the property is clicked */
576
+ url: z.ZodOptional<z.ZodString>;
577
+ /** The URL to a list of images to display next to the property */
578
+ imageUrl: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
579
+ }, "strip", z.ZodTypeAny, {
580
+ label: string;
581
+ text: string;
582
+ url?: string | undefined;
583
+ imageUrl?: string[] | undefined;
584
+ }, {
585
+ label: string;
586
+ text: string;
587
+ url?: string | undefined;
588
+ imageUrl?: string[] | undefined;
589
+ }>;
590
+ declare const DisplayPropertiesSchema: z.ZodArray<z.ZodObject<{
591
+ /** The label for the property */
592
+ label: z.ZodString;
593
+ /** The value of the property */
594
+ text: z.ZodString;
595
+ /** The URL to link to when the property is clicked */
596
+ url: z.ZodOptional<z.ZodString>;
597
+ /** The URL to a list of images to display next to the property */
598
+ imageUrl: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
599
+ }, "strip", z.ZodTypeAny, {
600
+ label: string;
601
+ text: string;
602
+ url?: string | undefined;
603
+ imageUrl?: string[] | undefined;
604
+ }, {
605
+ label: string;
606
+ text: string;
607
+ url?: string | undefined;
608
+ imageUrl?: string[] | undefined;
609
+ }>, "many">;
610
+ type DisplayProperty = z.infer<typeof DisplayPropertySchema>;
611
+ declare const StyleSchema: z.ZodObject<{
612
+ /** The style, `normal` or `minimal` */
613
+ style: z.ZodEnum<["normal", "minimal"]>;
614
+ /** A variant of the style. */
615
+ variant: z.ZodOptional<z.ZodString>;
616
+ }, "strip", z.ZodTypeAny, {
617
+ style: "normal" | "minimal";
618
+ variant?: string | undefined;
619
+ }, {
620
+ style: "normal" | "minimal";
621
+ variant?: string | undefined;
622
+ }>;
623
+ type Style = z.infer<typeof StyleSchema>;
624
+ type StyleName = Style["style"];
625
+
626
+ declare const ConnectionAuthSchema: z.ZodObject<{
627
+ type: z.ZodEnum<["oauth2", "apiKey"]>;
628
+ accessToken: z.ZodString;
629
+ scopes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
630
+ additionalFields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
631
+ }, "strip", z.ZodTypeAny, {
632
+ type: "oauth2" | "apiKey";
633
+ accessToken: string;
634
+ scopes?: string[] | undefined;
635
+ additionalFields?: Record<string, string> | undefined;
636
+ }, {
637
+ type: "oauth2" | "apiKey";
638
+ accessToken: string;
639
+ scopes?: string[] | undefined;
640
+ additionalFields?: Record<string, string> | undefined;
641
+ }>;
642
+ type ConnectionAuth = z.infer<typeof ConnectionAuthSchema>;
643
+ declare const IntegrationMetadataSchema: z.ZodObject<{
644
+ id: z.ZodString;
645
+ name: z.ZodString;
646
+ instructions: z.ZodOptional<z.ZodString>;
647
+ }, "strip", z.ZodTypeAny, {
648
+ name: string;
649
+ id: string;
650
+ instructions?: string | undefined;
651
+ }, {
652
+ name: string;
653
+ id: string;
654
+ instructions?: string | undefined;
655
+ }>;
656
+ type IntegrationMetadata = z.infer<typeof IntegrationMetadataSchema>;
657
+ declare const IntegrationConfigSchema: z.ZodObject<{
658
+ id: z.ZodString;
659
+ metadata: z.ZodObject<{
660
+ id: z.ZodString;
661
+ name: z.ZodString;
662
+ instructions: z.ZodOptional<z.ZodString>;
663
+ }, "strip", z.ZodTypeAny, {
664
+ name: string;
665
+ id: string;
666
+ instructions?: string | undefined;
667
+ }, {
668
+ name: string;
669
+ id: string;
670
+ instructions?: string | undefined;
671
+ }>;
672
+ authSource: z.ZodEnum<["HOSTED", "LOCAL", "RESOLVER"]>;
673
+ }, "strip", z.ZodTypeAny, {
674
+ id: string;
675
+ metadata: {
676
+ name: string;
677
+ id: string;
678
+ instructions?: string | undefined;
679
+ };
680
+ authSource: "HOSTED" | "LOCAL" | "RESOLVER";
681
+ }, {
682
+ id: string;
683
+ metadata: {
684
+ name: string;
685
+ id: string;
686
+ instructions?: string | undefined;
687
+ };
688
+ authSource: "HOSTED" | "LOCAL" | "RESOLVER";
689
+ }>;
690
+ type IntegrationConfig = z.infer<typeof IntegrationConfigSchema>;
691
+
692
+ declare const SCHEDULED_EVENT = "dev.trigger.scheduled";
693
+ declare const ScheduledPayloadSchema: z.ZodObject<{
694
+ ts: z.ZodDate;
695
+ lastTimestamp: z.ZodOptional<z.ZodDate>;
696
+ }, "strip", z.ZodTypeAny, {
697
+ ts: Date;
698
+ lastTimestamp?: Date | undefined;
699
+ }, {
700
+ ts: Date;
701
+ lastTimestamp?: Date | undefined;
702
+ }>;
703
+ type ScheduledPayload = z.infer<typeof ScheduledPayloadSchema>;
704
+ declare const IntervalOptionsSchema: z.ZodObject<{
705
+ /** The number of seconds for the interval. Min = 20, Max = 2_592_000 (30 days) */
706
+ seconds: z.ZodNumber;
707
+ }, "strip", z.ZodTypeAny, {
708
+ seconds: number;
709
+ }, {
710
+ seconds: number;
711
+ }>;
712
+ /** Interval options */
713
+ type IntervalOptions = z.infer<typeof IntervalOptionsSchema>;
714
+ declare const CronOptionsSchema: z.ZodObject<{
715
+ /** A CRON expression that defines the schedule. A useful tool when writing CRON
716
+ expressions is [crontab guru](https://crontab.guru). Note that the timezone
717
+ used is UTC. */
718
+ cron: z.ZodString;
719
+ }, "strip", z.ZodTypeAny, {
720
+ cron: string;
721
+ }, {
722
+ cron: string;
723
+ }>;
724
+ /** The options for a `cronTrigger()` */
725
+ type CronOptions = z.infer<typeof CronOptionsSchema>;
726
+ declare const CronMetadataSchema: z.ZodObject<{
727
+ type: z.ZodLiteral<"cron">;
728
+ options: z.ZodObject<{
729
+ /** A CRON expression that defines the schedule. A useful tool when writing CRON
730
+ expressions is [crontab guru](https://crontab.guru). Note that the timezone
731
+ used is UTC. */
732
+ cron: z.ZodString;
733
+ }, "strip", z.ZodTypeAny, {
734
+ cron: string;
735
+ }, {
736
+ cron: string;
737
+ }>;
738
+ /** An optional Account ID to associate with runs triggered by this interval */
739
+ accountId: z.ZodOptional<z.ZodString>;
740
+ metadata: z.ZodAny;
741
+ }, "strip", z.ZodTypeAny, {
742
+ options: {
743
+ cron: string;
744
+ };
745
+ type: "cron";
746
+ accountId?: string | undefined;
747
+ metadata?: any;
748
+ }, {
749
+ options: {
750
+ cron: string;
751
+ };
752
+ type: "cron";
753
+ accountId?: string | undefined;
754
+ metadata?: any;
755
+ }>;
756
+ type CronMetadata = z.infer<typeof CronMetadataSchema>;
757
+ declare const IntervalMetadataSchema: z.ZodObject<{
758
+ /** An interval reoccurs at the specified number of seconds */
759
+ type: z.ZodLiteral<"interval">;
760
+ /** An object containing options about the interval. */
761
+ options: z.ZodObject<{
762
+ /** The number of seconds for the interval. Min = 20, Max = 2_592_000 (30 days) */
763
+ seconds: z.ZodNumber;
764
+ }, "strip", z.ZodTypeAny, {
765
+ seconds: number;
766
+ }, {
767
+ seconds: number;
768
+ }>;
769
+ /** An optional Account ID to associate with runs triggered by this interval */
770
+ accountId: z.ZodOptional<z.ZodString>;
771
+ /** Any additional metadata about the schedule. */
772
+ metadata: z.ZodAny;
773
+ }, "strip", z.ZodTypeAny, {
774
+ options: {
775
+ seconds: number;
776
+ };
777
+ type: "interval";
778
+ accountId?: string | undefined;
779
+ metadata?: any;
780
+ }, {
781
+ options: {
782
+ seconds: number;
783
+ };
784
+ type: "interval";
785
+ accountId?: string | undefined;
786
+ metadata?: any;
787
+ }>;
788
+ type IntervalMetadata = z.infer<typeof IntervalMetadataSchema>;
789
+ declare const ScheduleMetadataSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
790
+ /** An interval reoccurs at the specified number of seconds */
791
+ type: z.ZodLiteral<"interval">;
792
+ /** An object containing options about the interval. */
793
+ options: z.ZodObject<{
794
+ /** The number of seconds for the interval. Min = 20, Max = 2_592_000 (30 days) */
795
+ seconds: z.ZodNumber;
796
+ }, "strip", z.ZodTypeAny, {
797
+ seconds: number;
798
+ }, {
799
+ seconds: number;
800
+ }>;
801
+ /** An optional Account ID to associate with runs triggered by this interval */
802
+ accountId: z.ZodOptional<z.ZodString>;
803
+ /** Any additional metadata about the schedule. */
804
+ metadata: z.ZodAny;
805
+ }, "strip", z.ZodTypeAny, {
806
+ options: {
807
+ seconds: number;
808
+ };
809
+ type: "interval";
810
+ accountId?: string | undefined;
811
+ metadata?: any;
812
+ }, {
813
+ options: {
814
+ seconds: number;
815
+ };
816
+ type: "interval";
817
+ accountId?: string | undefined;
818
+ metadata?: any;
819
+ }>, z.ZodObject<{
820
+ type: z.ZodLiteral<"cron">;
821
+ options: z.ZodObject<{
822
+ /** A CRON expression that defines the schedule. A useful tool when writing CRON
823
+ expressions is [crontab guru](https://crontab.guru). Note that the timezone
824
+ used is UTC. */
825
+ cron: z.ZodString;
826
+ }, "strip", z.ZodTypeAny, {
827
+ cron: string;
828
+ }, {
829
+ cron: string;
830
+ }>;
831
+ /** An optional Account ID to associate with runs triggered by this interval */
832
+ accountId: z.ZodOptional<z.ZodString>;
833
+ metadata: z.ZodAny;
834
+ }, "strip", z.ZodTypeAny, {
835
+ options: {
836
+ cron: string;
837
+ };
838
+ type: "cron";
839
+ accountId?: string | undefined;
840
+ metadata?: any;
841
+ }, {
842
+ options: {
843
+ cron: string;
844
+ };
845
+ type: "cron";
846
+ accountId?: string | undefined;
847
+ metadata?: any;
848
+ }>]>;
849
+ type ScheduleMetadata = z.infer<typeof ScheduleMetadataSchema>;
850
+ declare const RegisterDynamicSchedulePayloadSchema: z.ZodObject<{
851
+ id: z.ZodString;
852
+ jobs: z.ZodArray<z.ZodObject<{
853
+ id: z.ZodString;
854
+ version: z.ZodString;
855
+ }, "strip", z.ZodTypeAny, {
856
+ version: string;
857
+ id: string;
858
+ }, {
859
+ version: string;
860
+ id: string;
861
+ }>, "many">;
862
+ }, "strip", z.ZodTypeAny, {
863
+ id: string;
864
+ jobs: {
865
+ version: string;
866
+ id: string;
867
+ }[];
868
+ }, {
869
+ id: string;
870
+ jobs: {
871
+ version: string;
872
+ id: string;
873
+ }[];
874
+ }>;
875
+ type RegisterDynamicSchedulePayload = z.infer<typeof RegisterDynamicSchedulePayloadSchema>;
876
+
877
+ declare const MISSING_CONNECTION_NOTIFICATION = "dev.trigger.notifications.missingConnection";
878
+ declare const MISSING_CONNECTION_RESOLVED_NOTIFICATION = "dev.trigger.notifications.missingConnectionResolved";
879
+ declare const CommonMissingConnectionNotificationPayloadSchema: z.ZodObject<{
880
+ id: z.ZodString;
881
+ client: z.ZodObject<{
882
+ id: z.ZodString;
883
+ title: z.ZodString;
884
+ scopes: z.ZodArray<z.ZodString, "many">;
885
+ createdAt: z.ZodDate;
886
+ updatedAt: z.ZodDate;
887
+ }, "strip", z.ZodTypeAny, {
888
+ scopes: string[];
889
+ id: string;
890
+ title: string;
891
+ updatedAt: Date;
892
+ createdAt: Date;
893
+ }, {
894
+ scopes: string[];
895
+ id: string;
896
+ title: string;
897
+ updatedAt: Date;
898
+ createdAt: Date;
899
+ }>;
900
+ authorizationUrl: z.ZodString;
901
+ }, "strip", z.ZodTypeAny, {
902
+ id: string;
903
+ client: {
904
+ scopes: string[];
905
+ id: string;
906
+ title: string;
907
+ updatedAt: Date;
908
+ createdAt: Date;
909
+ };
910
+ authorizationUrl: string;
911
+ }, {
912
+ id: string;
913
+ client: {
914
+ scopes: string[];
915
+ id: string;
916
+ title: string;
917
+ updatedAt: Date;
918
+ createdAt: Date;
919
+ };
920
+ authorizationUrl: string;
921
+ }>;
922
+ declare const MissingDeveloperConnectionNotificationPayloadSchema: z.ZodObject<{
923
+ id: z.ZodString;
924
+ client: z.ZodObject<{
925
+ id: z.ZodString;
926
+ title: z.ZodString;
927
+ scopes: z.ZodArray<z.ZodString, "many">;
928
+ createdAt: z.ZodDate;
929
+ updatedAt: z.ZodDate;
930
+ }, "strip", z.ZodTypeAny, {
931
+ scopes: string[];
932
+ id: string;
933
+ title: string;
934
+ updatedAt: Date;
935
+ createdAt: Date;
936
+ }, {
937
+ scopes: string[];
938
+ id: string;
939
+ title: string;
940
+ updatedAt: Date;
941
+ createdAt: Date;
942
+ }>;
943
+ authorizationUrl: z.ZodString;
944
+ type: z.ZodLiteral<"DEVELOPER">;
945
+ }, "strip", z.ZodTypeAny, {
946
+ type: "DEVELOPER";
947
+ id: string;
948
+ client: {
949
+ scopes: string[];
950
+ id: string;
951
+ title: string;
952
+ updatedAt: Date;
953
+ createdAt: Date;
954
+ };
955
+ authorizationUrl: string;
956
+ }, {
957
+ type: "DEVELOPER";
958
+ id: string;
959
+ client: {
960
+ scopes: string[];
961
+ id: string;
962
+ title: string;
963
+ updatedAt: Date;
964
+ createdAt: Date;
965
+ };
966
+ authorizationUrl: string;
967
+ }>;
968
+ declare const MissingExternalConnectionNotificationPayloadSchema: z.ZodObject<{
969
+ id: z.ZodString;
970
+ client: z.ZodObject<{
971
+ id: z.ZodString;
972
+ title: z.ZodString;
973
+ scopes: z.ZodArray<z.ZodString, "many">;
974
+ createdAt: z.ZodDate;
975
+ updatedAt: z.ZodDate;
976
+ }, "strip", z.ZodTypeAny, {
977
+ scopes: string[];
978
+ id: string;
979
+ title: string;
980
+ updatedAt: Date;
981
+ createdAt: Date;
982
+ }, {
983
+ scopes: string[];
984
+ id: string;
985
+ title: string;
986
+ updatedAt: Date;
987
+ createdAt: Date;
988
+ }>;
989
+ authorizationUrl: z.ZodString;
990
+ type: z.ZodLiteral<"EXTERNAL">;
991
+ account: z.ZodObject<{
992
+ id: z.ZodString;
993
+ metadata: z.ZodAny;
994
+ }, "strip", z.ZodTypeAny, {
995
+ id: string;
996
+ metadata?: any;
997
+ }, {
998
+ id: string;
999
+ metadata?: any;
1000
+ }>;
1001
+ }, "strip", z.ZodTypeAny, {
1002
+ type: "EXTERNAL";
1003
+ id: string;
1004
+ account: {
1005
+ id: string;
1006
+ metadata?: any;
1007
+ };
1008
+ client: {
1009
+ scopes: string[];
1010
+ id: string;
1011
+ title: string;
1012
+ updatedAt: Date;
1013
+ createdAt: Date;
1014
+ };
1015
+ authorizationUrl: string;
1016
+ }, {
1017
+ type: "EXTERNAL";
1018
+ id: string;
1019
+ account: {
1020
+ id: string;
1021
+ metadata?: any;
1022
+ };
1023
+ client: {
1024
+ scopes: string[];
1025
+ id: string;
1026
+ title: string;
1027
+ updatedAt: Date;
1028
+ createdAt: Date;
1029
+ };
1030
+ authorizationUrl: string;
1031
+ }>;
1032
+ declare const MissingConnectionNotificationPayloadSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1033
+ id: z.ZodString;
1034
+ client: z.ZodObject<{
1035
+ id: z.ZodString;
1036
+ title: z.ZodString;
1037
+ scopes: z.ZodArray<z.ZodString, "many">;
1038
+ createdAt: z.ZodDate;
1039
+ updatedAt: z.ZodDate;
1040
+ }, "strip", z.ZodTypeAny, {
1041
+ scopes: string[];
1042
+ id: string;
1043
+ title: string;
1044
+ updatedAt: Date;
1045
+ createdAt: Date;
1046
+ }, {
1047
+ scopes: string[];
1048
+ id: string;
1049
+ title: string;
1050
+ updatedAt: Date;
1051
+ createdAt: Date;
1052
+ }>;
1053
+ authorizationUrl: z.ZodString;
1054
+ type: z.ZodLiteral<"DEVELOPER">;
1055
+ }, "strip", z.ZodTypeAny, {
1056
+ type: "DEVELOPER";
1057
+ id: string;
1058
+ client: {
1059
+ scopes: string[];
1060
+ id: string;
1061
+ title: string;
1062
+ updatedAt: Date;
1063
+ createdAt: Date;
1064
+ };
1065
+ authorizationUrl: string;
1066
+ }, {
1067
+ type: "DEVELOPER";
1068
+ id: string;
1069
+ client: {
1070
+ scopes: string[];
1071
+ id: string;
1072
+ title: string;
1073
+ updatedAt: Date;
1074
+ createdAt: Date;
1075
+ };
1076
+ authorizationUrl: string;
1077
+ }>, z.ZodObject<{
1078
+ id: z.ZodString;
1079
+ client: z.ZodObject<{
1080
+ id: z.ZodString;
1081
+ title: z.ZodString;
1082
+ scopes: z.ZodArray<z.ZodString, "many">;
1083
+ createdAt: z.ZodDate;
1084
+ updatedAt: z.ZodDate;
1085
+ }, "strip", z.ZodTypeAny, {
1086
+ scopes: string[];
1087
+ id: string;
1088
+ title: string;
1089
+ updatedAt: Date;
1090
+ createdAt: Date;
1091
+ }, {
1092
+ scopes: string[];
1093
+ id: string;
1094
+ title: string;
1095
+ updatedAt: Date;
1096
+ createdAt: Date;
1097
+ }>;
1098
+ authorizationUrl: z.ZodString;
1099
+ type: z.ZodLiteral<"EXTERNAL">;
1100
+ account: z.ZodObject<{
1101
+ id: z.ZodString;
1102
+ metadata: z.ZodAny;
1103
+ }, "strip", z.ZodTypeAny, {
1104
+ id: string;
1105
+ metadata?: any;
1106
+ }, {
1107
+ id: string;
1108
+ metadata?: any;
1109
+ }>;
1110
+ }, "strip", z.ZodTypeAny, {
1111
+ type: "EXTERNAL";
1112
+ id: string;
1113
+ account: {
1114
+ id: string;
1115
+ metadata?: any;
1116
+ };
1117
+ client: {
1118
+ scopes: string[];
1119
+ id: string;
1120
+ title: string;
1121
+ updatedAt: Date;
1122
+ createdAt: Date;
1123
+ };
1124
+ authorizationUrl: string;
1125
+ }, {
1126
+ type: "EXTERNAL";
1127
+ id: string;
1128
+ account: {
1129
+ id: string;
1130
+ metadata?: any;
1131
+ };
1132
+ client: {
1133
+ scopes: string[];
1134
+ id: string;
1135
+ title: string;
1136
+ updatedAt: Date;
1137
+ createdAt: Date;
1138
+ };
1139
+ authorizationUrl: string;
1140
+ }>]>;
1141
+ type MissingConnectionNotificationPayload = z.infer<typeof MissingConnectionNotificationPayloadSchema>;
1142
+ declare const CommonMissingConnectionNotificationResolvedPayloadSchema: z.ZodObject<{
1143
+ id: z.ZodString;
1144
+ client: z.ZodObject<{
1145
+ id: z.ZodString;
1146
+ title: z.ZodString;
1147
+ scopes: z.ZodArray<z.ZodString, "many">;
1148
+ createdAt: z.ZodDate;
1149
+ updatedAt: z.ZodDate;
1150
+ integrationIdentifier: z.ZodString;
1151
+ integrationAuthMethod: z.ZodString;
1152
+ }, "strip", z.ZodTypeAny, {
1153
+ scopes: string[];
1154
+ id: string;
1155
+ title: string;
1156
+ updatedAt: Date;
1157
+ createdAt: Date;
1158
+ integrationIdentifier: string;
1159
+ integrationAuthMethod: string;
1160
+ }, {
1161
+ scopes: string[];
1162
+ id: string;
1163
+ title: string;
1164
+ updatedAt: Date;
1165
+ createdAt: Date;
1166
+ integrationIdentifier: string;
1167
+ integrationAuthMethod: string;
1168
+ }>;
1169
+ expiresAt: z.ZodDate;
1170
+ }, "strip", z.ZodTypeAny, {
1171
+ id: string;
1172
+ client: {
1173
+ scopes: string[];
1174
+ id: string;
1175
+ title: string;
1176
+ updatedAt: Date;
1177
+ createdAt: Date;
1178
+ integrationIdentifier: string;
1179
+ integrationAuthMethod: string;
1180
+ };
1181
+ expiresAt: Date;
1182
+ }, {
1183
+ id: string;
1184
+ client: {
1185
+ scopes: string[];
1186
+ id: string;
1187
+ title: string;
1188
+ updatedAt: Date;
1189
+ createdAt: Date;
1190
+ integrationIdentifier: string;
1191
+ integrationAuthMethod: string;
1192
+ };
1193
+ expiresAt: Date;
1194
+ }>;
1195
+ declare const MissingDeveloperConnectionResolvedNotificationPayloadSchema: z.ZodObject<{
1196
+ id: z.ZodString;
1197
+ client: z.ZodObject<{
1198
+ id: z.ZodString;
1199
+ title: z.ZodString;
1200
+ scopes: z.ZodArray<z.ZodString, "many">;
1201
+ createdAt: z.ZodDate;
1202
+ updatedAt: z.ZodDate;
1203
+ integrationIdentifier: z.ZodString;
1204
+ integrationAuthMethod: z.ZodString;
1205
+ }, "strip", z.ZodTypeAny, {
1206
+ scopes: string[];
1207
+ id: string;
1208
+ title: string;
1209
+ updatedAt: Date;
1210
+ createdAt: Date;
1211
+ integrationIdentifier: string;
1212
+ integrationAuthMethod: string;
1213
+ }, {
1214
+ scopes: string[];
1215
+ id: string;
1216
+ title: string;
1217
+ updatedAt: Date;
1218
+ createdAt: Date;
1219
+ integrationIdentifier: string;
1220
+ integrationAuthMethod: string;
1221
+ }>;
1222
+ expiresAt: z.ZodDate;
1223
+ type: z.ZodLiteral<"DEVELOPER">;
1224
+ }, "strip", z.ZodTypeAny, {
1225
+ type: "DEVELOPER";
1226
+ id: string;
1227
+ client: {
1228
+ scopes: string[];
1229
+ id: string;
1230
+ title: string;
1231
+ updatedAt: Date;
1232
+ createdAt: Date;
1233
+ integrationIdentifier: string;
1234
+ integrationAuthMethod: string;
1235
+ };
1236
+ expiresAt: Date;
1237
+ }, {
1238
+ type: "DEVELOPER";
1239
+ id: string;
1240
+ client: {
1241
+ scopes: string[];
1242
+ id: string;
1243
+ title: string;
1244
+ updatedAt: Date;
1245
+ createdAt: Date;
1246
+ integrationIdentifier: string;
1247
+ integrationAuthMethod: string;
1248
+ };
1249
+ expiresAt: Date;
1250
+ }>;
1251
+ declare const MissingExternalConnectionResolvedNotificationPayloadSchema: z.ZodObject<{
1252
+ id: z.ZodString;
1253
+ client: z.ZodObject<{
1254
+ id: z.ZodString;
1255
+ title: z.ZodString;
1256
+ scopes: z.ZodArray<z.ZodString, "many">;
1257
+ createdAt: z.ZodDate;
1258
+ updatedAt: z.ZodDate;
1259
+ integrationIdentifier: z.ZodString;
1260
+ integrationAuthMethod: z.ZodString;
1261
+ }, "strip", z.ZodTypeAny, {
1262
+ scopes: string[];
1263
+ id: string;
1264
+ title: string;
1265
+ updatedAt: Date;
1266
+ createdAt: Date;
1267
+ integrationIdentifier: string;
1268
+ integrationAuthMethod: string;
1269
+ }, {
1270
+ scopes: string[];
1271
+ id: string;
1272
+ title: string;
1273
+ updatedAt: Date;
1274
+ createdAt: Date;
1275
+ integrationIdentifier: string;
1276
+ integrationAuthMethod: string;
1277
+ }>;
1278
+ expiresAt: z.ZodDate;
1279
+ type: z.ZodLiteral<"EXTERNAL">;
1280
+ account: z.ZodObject<{
1281
+ id: z.ZodString;
1282
+ metadata: z.ZodAny;
1283
+ }, "strip", z.ZodTypeAny, {
1284
+ id: string;
1285
+ metadata?: any;
1286
+ }, {
1287
+ id: string;
1288
+ metadata?: any;
1289
+ }>;
1290
+ }, "strip", z.ZodTypeAny, {
1291
+ type: "EXTERNAL";
1292
+ id: string;
1293
+ account: {
1294
+ id: string;
1295
+ metadata?: any;
1296
+ };
1297
+ client: {
1298
+ scopes: string[];
1299
+ id: string;
1300
+ title: string;
1301
+ updatedAt: Date;
1302
+ createdAt: Date;
1303
+ integrationIdentifier: string;
1304
+ integrationAuthMethod: string;
1305
+ };
1306
+ expiresAt: Date;
1307
+ }, {
1308
+ type: "EXTERNAL";
1309
+ id: string;
1310
+ account: {
1311
+ id: string;
1312
+ metadata?: any;
1313
+ };
1314
+ client: {
1315
+ scopes: string[];
1316
+ id: string;
1317
+ title: string;
1318
+ updatedAt: Date;
1319
+ createdAt: Date;
1320
+ integrationIdentifier: string;
1321
+ integrationAuthMethod: string;
1322
+ };
1323
+ expiresAt: Date;
1324
+ }>;
1325
+ declare const MissingConnectionResolvedNotificationPayloadSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1326
+ id: z.ZodString;
1327
+ client: z.ZodObject<{
1328
+ id: z.ZodString;
1329
+ title: z.ZodString;
1330
+ scopes: z.ZodArray<z.ZodString, "many">;
1331
+ createdAt: z.ZodDate;
1332
+ updatedAt: z.ZodDate;
1333
+ integrationIdentifier: z.ZodString;
1334
+ integrationAuthMethod: z.ZodString;
1335
+ }, "strip", z.ZodTypeAny, {
1336
+ scopes: string[];
1337
+ id: string;
1338
+ title: string;
1339
+ updatedAt: Date;
1340
+ createdAt: Date;
1341
+ integrationIdentifier: string;
1342
+ integrationAuthMethod: string;
1343
+ }, {
1344
+ scopes: string[];
1345
+ id: string;
1346
+ title: string;
1347
+ updatedAt: Date;
1348
+ createdAt: Date;
1349
+ integrationIdentifier: string;
1350
+ integrationAuthMethod: string;
1351
+ }>;
1352
+ expiresAt: z.ZodDate;
1353
+ type: z.ZodLiteral<"DEVELOPER">;
1354
+ }, "strip", z.ZodTypeAny, {
1355
+ type: "DEVELOPER";
1356
+ id: string;
1357
+ client: {
1358
+ scopes: string[];
1359
+ id: string;
1360
+ title: string;
1361
+ updatedAt: Date;
1362
+ createdAt: Date;
1363
+ integrationIdentifier: string;
1364
+ integrationAuthMethod: string;
1365
+ };
1366
+ expiresAt: Date;
1367
+ }, {
1368
+ type: "DEVELOPER";
1369
+ id: string;
1370
+ client: {
1371
+ scopes: string[];
1372
+ id: string;
1373
+ title: string;
1374
+ updatedAt: Date;
1375
+ createdAt: Date;
1376
+ integrationIdentifier: string;
1377
+ integrationAuthMethod: string;
1378
+ };
1379
+ expiresAt: Date;
1380
+ }>, z.ZodObject<{
1381
+ id: z.ZodString;
1382
+ client: z.ZodObject<{
1383
+ id: z.ZodString;
1384
+ title: z.ZodString;
1385
+ scopes: z.ZodArray<z.ZodString, "many">;
1386
+ createdAt: z.ZodDate;
1387
+ updatedAt: z.ZodDate;
1388
+ integrationIdentifier: z.ZodString;
1389
+ integrationAuthMethod: z.ZodString;
1390
+ }, "strip", z.ZodTypeAny, {
1391
+ scopes: string[];
1392
+ id: string;
1393
+ title: string;
1394
+ updatedAt: Date;
1395
+ createdAt: Date;
1396
+ integrationIdentifier: string;
1397
+ integrationAuthMethod: string;
1398
+ }, {
1399
+ scopes: string[];
1400
+ id: string;
1401
+ title: string;
1402
+ updatedAt: Date;
1403
+ createdAt: Date;
1404
+ integrationIdentifier: string;
1405
+ integrationAuthMethod: string;
1406
+ }>;
1407
+ expiresAt: z.ZodDate;
1408
+ type: z.ZodLiteral<"EXTERNAL">;
1409
+ account: z.ZodObject<{
1410
+ id: z.ZodString;
1411
+ metadata: z.ZodAny;
1412
+ }, "strip", z.ZodTypeAny, {
1413
+ id: string;
1414
+ metadata?: any;
1415
+ }, {
1416
+ id: string;
1417
+ metadata?: any;
1418
+ }>;
1419
+ }, "strip", z.ZodTypeAny, {
1420
+ type: "EXTERNAL";
1421
+ id: string;
1422
+ account: {
1423
+ id: string;
1424
+ metadata?: any;
1425
+ };
1426
+ client: {
1427
+ scopes: string[];
1428
+ id: string;
1429
+ title: string;
1430
+ updatedAt: Date;
1431
+ createdAt: Date;
1432
+ integrationIdentifier: string;
1433
+ integrationAuthMethod: string;
1434
+ };
1435
+ expiresAt: Date;
1436
+ }, {
1437
+ type: "EXTERNAL";
1438
+ id: string;
1439
+ account: {
1440
+ id: string;
1441
+ metadata?: any;
1442
+ };
1443
+ client: {
1444
+ scopes: string[];
1445
+ id: string;
1446
+ title: string;
1447
+ updatedAt: Date;
1448
+ createdAt: Date;
1449
+ integrationIdentifier: string;
1450
+ integrationAuthMethod: string;
1451
+ };
1452
+ expiresAt: Date;
1453
+ }>]>;
1454
+ type MissingConnectionResolvedNotificationPayload = z.infer<typeof MissingConnectionResolvedNotificationPayloadSchema>;
1455
+
1456
+ declare const FetchRetryHeadersStrategySchema: z.ZodObject<{
1457
+ /** The `headers` strategy retries the request using info from the response headers. */
1458
+ strategy: z.ZodLiteral<"headers">;
1459
+ /** The header to use to determine the maximum number of times to retry the request. */
1460
+ limitHeader: z.ZodString;
1461
+ /** The header to use to determine the number of remaining retries. */
1462
+ remainingHeader: z.ZodString;
1463
+ /** The header to use to determine the time when the number of remaining retries will be reset. */
1464
+ resetHeader: z.ZodString;
1465
+ /** The event filter to use to determine if the request should be retried. */
1466
+ bodyFilter: z.ZodOptional<z.ZodType<EventFilter, z.ZodTypeDef, EventFilter>>;
1467
+ /** The format of the `resetHeader` value. */
1468
+ resetFormat: z.ZodDefault<z.ZodEnum<["unix_timestamp", "unix_timestamp_in_ms", "iso_8601", "iso_8601_duration_openai_variant"]>>;
1469
+ }, "strip", z.ZodTypeAny, {
1470
+ strategy: "headers";
1471
+ limitHeader: string;
1472
+ remainingHeader: string;
1473
+ resetHeader: string;
1474
+ resetFormat: "unix_timestamp" | "unix_timestamp_in_ms" | "iso_8601" | "iso_8601_duration_openai_variant";
1475
+ bodyFilter?: EventFilter | undefined;
1476
+ }, {
1477
+ strategy: "headers";
1478
+ limitHeader: string;
1479
+ remainingHeader: string;
1480
+ resetHeader: string;
1481
+ bodyFilter?: EventFilter | undefined;
1482
+ resetFormat?: "unix_timestamp" | "unix_timestamp_in_ms" | "iso_8601" | "iso_8601_duration_openai_variant" | undefined;
1483
+ }>;
1484
+ type FetchRetryHeadersStrategy = z.infer<typeof FetchRetryHeadersStrategySchema>;
1485
+ /** The `backoff` strategy retries the request with an exponential backoff. */
1486
+ declare const FetchRetryBackoffStrategySchema: z.ZodObject<{
1487
+ limit: z.ZodOptional<z.ZodNumber>;
1488
+ factor: z.ZodOptional<z.ZodNumber>;
1489
+ minTimeoutInMs: z.ZodOptional<z.ZodNumber>;
1490
+ maxTimeoutInMs: z.ZodOptional<z.ZodNumber>;
1491
+ randomize: z.ZodOptional<z.ZodBoolean>;
1492
+ strategy: z.ZodLiteral<"backoff">;
1493
+ bodyFilter: z.ZodOptional<z.ZodType<EventFilter, z.ZodTypeDef, EventFilter>>;
1494
+ }, "strip", z.ZodTypeAny, {
1495
+ strategy: "backoff";
1496
+ limit?: number | undefined;
1497
+ factor?: number | undefined;
1498
+ minTimeoutInMs?: number | undefined;
1499
+ maxTimeoutInMs?: number | undefined;
1500
+ randomize?: boolean | undefined;
1501
+ bodyFilter?: EventFilter | undefined;
1502
+ }, {
1503
+ strategy: "backoff";
1504
+ limit?: number | undefined;
1505
+ factor?: number | undefined;
1506
+ minTimeoutInMs?: number | undefined;
1507
+ maxTimeoutInMs?: number | undefined;
1508
+ randomize?: boolean | undefined;
1509
+ bodyFilter?: EventFilter | undefined;
1510
+ }>;
1511
+ /** The `backoff` strategy retries the request with an exponential backoff. */
1512
+ type FetchRetryBackoffStrategy = z.infer<typeof FetchRetryBackoffStrategySchema>;
1513
+ declare const FetchRetryStrategySchema: z.ZodDiscriminatedUnion<"strategy", [z.ZodObject<{
1514
+ /** The `headers` strategy retries the request using info from the response headers. */
1515
+ strategy: z.ZodLiteral<"headers">;
1516
+ /** The header to use to determine the maximum number of times to retry the request. */
1517
+ limitHeader: z.ZodString;
1518
+ /** The header to use to determine the number of remaining retries. */
1519
+ remainingHeader: z.ZodString;
1520
+ /** The header to use to determine the time when the number of remaining retries will be reset. */
1521
+ resetHeader: z.ZodString;
1522
+ /** The event filter to use to determine if the request should be retried. */
1523
+ bodyFilter: z.ZodOptional<z.ZodType<EventFilter, z.ZodTypeDef, EventFilter>>;
1524
+ /** The format of the `resetHeader` value. */
1525
+ resetFormat: z.ZodDefault<z.ZodEnum<["unix_timestamp", "unix_timestamp_in_ms", "iso_8601", "iso_8601_duration_openai_variant"]>>;
1526
+ }, "strip", z.ZodTypeAny, {
1527
+ strategy: "headers";
1528
+ limitHeader: string;
1529
+ remainingHeader: string;
1530
+ resetHeader: string;
1531
+ resetFormat: "unix_timestamp" | "unix_timestamp_in_ms" | "iso_8601" | "iso_8601_duration_openai_variant";
1532
+ bodyFilter?: EventFilter | undefined;
1533
+ }, {
1534
+ strategy: "headers";
1535
+ limitHeader: string;
1536
+ remainingHeader: string;
1537
+ resetHeader: string;
1538
+ bodyFilter?: EventFilter | undefined;
1539
+ resetFormat?: "unix_timestamp" | "unix_timestamp_in_ms" | "iso_8601" | "iso_8601_duration_openai_variant" | undefined;
1540
+ }>, z.ZodObject<{
1541
+ limit: z.ZodOptional<z.ZodNumber>;
1542
+ factor: z.ZodOptional<z.ZodNumber>;
1543
+ minTimeoutInMs: z.ZodOptional<z.ZodNumber>;
1544
+ maxTimeoutInMs: z.ZodOptional<z.ZodNumber>;
1545
+ randomize: z.ZodOptional<z.ZodBoolean>;
1546
+ strategy: z.ZodLiteral<"backoff">;
1547
+ bodyFilter: z.ZodOptional<z.ZodType<EventFilter, z.ZodTypeDef, EventFilter>>;
1548
+ }, "strip", z.ZodTypeAny, {
1549
+ strategy: "backoff";
1550
+ limit?: number | undefined;
1551
+ factor?: number | undefined;
1552
+ minTimeoutInMs?: number | undefined;
1553
+ maxTimeoutInMs?: number | undefined;
1554
+ randomize?: boolean | undefined;
1555
+ bodyFilter?: EventFilter | undefined;
1556
+ }, {
1557
+ strategy: "backoff";
1558
+ limit?: number | undefined;
1559
+ factor?: number | undefined;
1560
+ minTimeoutInMs?: number | undefined;
1561
+ maxTimeoutInMs?: number | undefined;
1562
+ randomize?: boolean | undefined;
1563
+ bodyFilter?: EventFilter | undefined;
1564
+ }>]>;
1565
+ type FetchRetryStrategy = z.infer<typeof FetchRetryStrategySchema>;
1566
+ /** The options for a fetch request */
1567
+ declare const FetchRequestInitSchema: z.ZodObject<{
1568
+ /** The HTTP method to use for the request. */
1569
+ method: z.ZodOptional<z.ZodString>;
1570
+ /** Any headers to send with the request. Note that you can use [redactString](https://trigger.dev/docs/sdk/redactString) to prevent sensitive information from being stored (e.g. in the logs), like API keys and tokens. */
1571
+ headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodObject<{
1572
+ __redactedString: z.ZodLiteral<true>;
1573
+ strings: z.ZodArray<z.ZodString, "many">;
1574
+ interpolations: z.ZodArray<z.ZodString, "many">;
1575
+ }, "strip", z.ZodTypeAny, {
1576
+ __redactedString: true;
1577
+ strings: string[];
1578
+ interpolations: string[];
1579
+ }, {
1580
+ __redactedString: true;
1581
+ strings: string[];
1582
+ interpolations: string[];
1583
+ }>]>>>;
1584
+ /** The body of the request. */
1585
+ body: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodType<ArrayBuffer, z.ZodTypeDef, ArrayBuffer>]>>;
1586
+ }, "strip", z.ZodTypeAny, {
1587
+ method?: string | undefined;
1588
+ headers?: Record<string, string | {
1589
+ __redactedString: true;
1590
+ strings: string[];
1591
+ interpolations: string[];
1592
+ }> | undefined;
1593
+ body?: string | ArrayBuffer | undefined;
1594
+ }, {
1595
+ method?: string | undefined;
1596
+ headers?: Record<string, string | {
1597
+ __redactedString: true;
1598
+ strings: string[];
1599
+ interpolations: string[];
1600
+ }> | undefined;
1601
+ body?: string | ArrayBuffer | undefined;
1602
+ }>;
1603
+ /** The options for a fetch request */
1604
+ type FetchRequestInit = z.infer<typeof FetchRequestInitSchema>;
1605
+ declare const FetchRetryOptionsSchema: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<"strategy", [z.ZodObject<{
1606
+ /** The `headers` strategy retries the request using info from the response headers. */
1607
+ strategy: z.ZodLiteral<"headers">;
1608
+ /** The header to use to determine the maximum number of times to retry the request. */
1609
+ limitHeader: z.ZodString;
1610
+ /** The header to use to determine the number of remaining retries. */
1611
+ remainingHeader: z.ZodString;
1612
+ /** The header to use to determine the time when the number of remaining retries will be reset. */
1613
+ resetHeader: z.ZodString;
1614
+ /** The event filter to use to determine if the request should be retried. */
1615
+ bodyFilter: z.ZodOptional<z.ZodType<EventFilter, z.ZodTypeDef, EventFilter>>;
1616
+ /** The format of the `resetHeader` value. */
1617
+ resetFormat: z.ZodDefault<z.ZodEnum<["unix_timestamp", "unix_timestamp_in_ms", "iso_8601", "iso_8601_duration_openai_variant"]>>;
1618
+ }, "strip", z.ZodTypeAny, {
1619
+ strategy: "headers";
1620
+ limitHeader: string;
1621
+ remainingHeader: string;
1622
+ resetHeader: string;
1623
+ resetFormat: "unix_timestamp" | "unix_timestamp_in_ms" | "iso_8601" | "iso_8601_duration_openai_variant";
1624
+ bodyFilter?: EventFilter | undefined;
1625
+ }, {
1626
+ strategy: "headers";
1627
+ limitHeader: string;
1628
+ remainingHeader: string;
1629
+ resetHeader: string;
1630
+ bodyFilter?: EventFilter | undefined;
1631
+ resetFormat?: "unix_timestamp" | "unix_timestamp_in_ms" | "iso_8601" | "iso_8601_duration_openai_variant" | undefined;
1632
+ }>, z.ZodObject<{
1633
+ limit: z.ZodOptional<z.ZodNumber>;
1634
+ factor: z.ZodOptional<z.ZodNumber>;
1635
+ minTimeoutInMs: z.ZodOptional<z.ZodNumber>;
1636
+ maxTimeoutInMs: z.ZodOptional<z.ZodNumber>;
1637
+ randomize: z.ZodOptional<z.ZodBoolean>;
1638
+ strategy: z.ZodLiteral<"backoff">;
1639
+ bodyFilter: z.ZodOptional<z.ZodType<EventFilter, z.ZodTypeDef, EventFilter>>;
1640
+ }, "strip", z.ZodTypeAny, {
1641
+ strategy: "backoff";
1642
+ limit?: number | undefined;
1643
+ factor?: number | undefined;
1644
+ minTimeoutInMs?: number | undefined;
1645
+ maxTimeoutInMs?: number | undefined;
1646
+ randomize?: boolean | undefined;
1647
+ bodyFilter?: EventFilter | undefined;
1648
+ }, {
1649
+ strategy: "backoff";
1650
+ limit?: number | undefined;
1651
+ factor?: number | undefined;
1652
+ minTimeoutInMs?: number | undefined;
1653
+ maxTimeoutInMs?: number | undefined;
1654
+ randomize?: boolean | undefined;
1655
+ bodyFilter?: EventFilter | undefined;
1656
+ }>]>>;
1657
+ /** An object where the key is a status code pattern and the value is a retrying strategy. Supported patterns are:
1658
+ - Specific status codes: 429
1659
+ - Ranges: 500-599
1660
+ - Wildcards: 2xx, 3xx, 4xx, 5xx
1661
+ */
1662
+ type FetchRetryOptions = z.infer<typeof FetchRetryOptionsSchema>;
1663
+ declare const FetchTimeoutOptionsSchema: z.ZodObject<{
1664
+ durationInMs: z.ZodNumber;
1665
+ retry: z.ZodOptional<z.ZodObject<{
1666
+ limit: z.ZodOptional<z.ZodNumber>;
1667
+ factor: z.ZodOptional<z.ZodNumber>;
1668
+ minTimeoutInMs: z.ZodOptional<z.ZodNumber>;
1669
+ maxTimeoutInMs: z.ZodOptional<z.ZodNumber>;
1670
+ randomize: z.ZodOptional<z.ZodBoolean>;
1671
+ }, "strip", z.ZodTypeAny, {
1672
+ limit?: number | undefined;
1673
+ factor?: number | undefined;
1674
+ minTimeoutInMs?: number | undefined;
1675
+ maxTimeoutInMs?: number | undefined;
1676
+ randomize?: boolean | undefined;
1677
+ }, {
1678
+ limit?: number | undefined;
1679
+ factor?: number | undefined;
1680
+ minTimeoutInMs?: number | undefined;
1681
+ maxTimeoutInMs?: number | undefined;
1682
+ randomize?: boolean | undefined;
1683
+ }>>;
1684
+ }, "strip", z.ZodTypeAny, {
1685
+ durationInMs: number;
1686
+ retry?: {
1687
+ limit?: number | undefined;
1688
+ factor?: number | undefined;
1689
+ minTimeoutInMs?: number | undefined;
1690
+ maxTimeoutInMs?: number | undefined;
1691
+ randomize?: boolean | undefined;
1692
+ } | undefined;
1693
+ }, {
1694
+ durationInMs: number;
1695
+ retry?: {
1696
+ limit?: number | undefined;
1697
+ factor?: number | undefined;
1698
+ minTimeoutInMs?: number | undefined;
1699
+ maxTimeoutInMs?: number | undefined;
1700
+ randomize?: boolean | undefined;
1701
+ } | undefined;
1702
+ }>;
1703
+ type FetchTimeoutOptions = z.infer<typeof FetchTimeoutOptionsSchema>;
1704
+ declare const FetchOperationSchema: z.ZodObject<{
1705
+ url: z.ZodString;
1706
+ requestInit: z.ZodOptional<z.ZodObject<{
1707
+ /** The HTTP method to use for the request. */
1708
+ method: z.ZodOptional<z.ZodString>;
1709
+ /** Any headers to send with the request. Note that you can use [redactString](https://trigger.dev/docs/sdk/redactString) to prevent sensitive information from being stored (e.g. in the logs), like API keys and tokens. */
1710
+ headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodObject<{
1711
+ __redactedString: z.ZodLiteral<true>;
1712
+ strings: z.ZodArray<z.ZodString, "many">;
1713
+ interpolations: z.ZodArray<z.ZodString, "many">;
1714
+ }, "strip", z.ZodTypeAny, {
1715
+ __redactedString: true;
1716
+ strings: string[];
1717
+ interpolations: string[];
1718
+ }, {
1719
+ __redactedString: true;
1720
+ strings: string[];
1721
+ interpolations: string[];
1722
+ }>]>>>;
1723
+ /** The body of the request. */
1724
+ body: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodType<ArrayBuffer, z.ZodTypeDef, ArrayBuffer>]>>;
1725
+ }, "strip", z.ZodTypeAny, {
1726
+ method?: string | undefined;
1727
+ headers?: Record<string, string | {
1728
+ __redactedString: true;
1729
+ strings: string[];
1730
+ interpolations: string[];
1731
+ }> | undefined;
1732
+ body?: string | ArrayBuffer | undefined;
1733
+ }, {
1734
+ method?: string | undefined;
1735
+ headers?: Record<string, string | {
1736
+ __redactedString: true;
1737
+ strings: string[];
1738
+ interpolations: string[];
1739
+ }> | undefined;
1740
+ body?: string | ArrayBuffer | undefined;
1741
+ }>>;
1742
+ retry: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<"strategy", [z.ZodObject<{
1743
+ /** The `headers` strategy retries the request using info from the response headers. */
1744
+ strategy: z.ZodLiteral<"headers">;
1745
+ /** The header to use to determine the maximum number of times to retry the request. */
1746
+ limitHeader: z.ZodString;
1747
+ /** The header to use to determine the number of remaining retries. */
1748
+ remainingHeader: z.ZodString;
1749
+ /** The header to use to determine the time when the number of remaining retries will be reset. */
1750
+ resetHeader: z.ZodString;
1751
+ /** The event filter to use to determine if the request should be retried. */
1752
+ bodyFilter: z.ZodOptional<z.ZodType<EventFilter, z.ZodTypeDef, EventFilter>>;
1753
+ /** The format of the `resetHeader` value. */
1754
+ resetFormat: z.ZodDefault<z.ZodEnum<["unix_timestamp", "unix_timestamp_in_ms", "iso_8601", "iso_8601_duration_openai_variant"]>>;
1755
+ }, "strip", z.ZodTypeAny, {
1756
+ strategy: "headers";
1757
+ limitHeader: string;
1758
+ remainingHeader: string;
1759
+ resetHeader: string;
1760
+ resetFormat: "unix_timestamp" | "unix_timestamp_in_ms" | "iso_8601" | "iso_8601_duration_openai_variant";
1761
+ bodyFilter?: EventFilter | undefined;
1762
+ }, {
1763
+ strategy: "headers";
1764
+ limitHeader: string;
1765
+ remainingHeader: string;
1766
+ resetHeader: string;
1767
+ bodyFilter?: EventFilter | undefined;
1768
+ resetFormat?: "unix_timestamp" | "unix_timestamp_in_ms" | "iso_8601" | "iso_8601_duration_openai_variant" | undefined;
1769
+ }>, z.ZodObject<{
1770
+ limit: z.ZodOptional<z.ZodNumber>;
1771
+ factor: z.ZodOptional<z.ZodNumber>;
1772
+ minTimeoutInMs: z.ZodOptional<z.ZodNumber>;
1773
+ maxTimeoutInMs: z.ZodOptional<z.ZodNumber>;
1774
+ randomize: z.ZodOptional<z.ZodBoolean>;
1775
+ strategy: z.ZodLiteral<"backoff">;
1776
+ bodyFilter: z.ZodOptional<z.ZodType<EventFilter, z.ZodTypeDef, EventFilter>>;
1777
+ }, "strip", z.ZodTypeAny, {
1778
+ strategy: "backoff";
1779
+ limit?: number | undefined;
1780
+ factor?: number | undefined;
1781
+ minTimeoutInMs?: number | undefined;
1782
+ maxTimeoutInMs?: number | undefined;
1783
+ randomize?: boolean | undefined;
1784
+ bodyFilter?: EventFilter | undefined;
1785
+ }, {
1786
+ strategy: "backoff";
1787
+ limit?: number | undefined;
1788
+ factor?: number | undefined;
1789
+ minTimeoutInMs?: number | undefined;
1790
+ maxTimeoutInMs?: number | undefined;
1791
+ randomize?: boolean | undefined;
1792
+ bodyFilter?: EventFilter | undefined;
1793
+ }>]>>>;
1794
+ timeout: z.ZodOptional<z.ZodObject<{
1795
+ durationInMs: z.ZodNumber;
1796
+ retry: z.ZodOptional<z.ZodObject<{
1797
+ limit: z.ZodOptional<z.ZodNumber>;
1798
+ factor: z.ZodOptional<z.ZodNumber>;
1799
+ minTimeoutInMs: z.ZodOptional<z.ZodNumber>;
1800
+ maxTimeoutInMs: z.ZodOptional<z.ZodNumber>;
1801
+ randomize: z.ZodOptional<z.ZodBoolean>;
1802
+ }, "strip", z.ZodTypeAny, {
1803
+ limit?: number | undefined;
1804
+ factor?: number | undefined;
1805
+ minTimeoutInMs?: number | undefined;
1806
+ maxTimeoutInMs?: number | undefined;
1807
+ randomize?: boolean | undefined;
1808
+ }, {
1809
+ limit?: number | undefined;
1810
+ factor?: number | undefined;
1811
+ minTimeoutInMs?: number | undefined;
1812
+ maxTimeoutInMs?: number | undefined;
1813
+ randomize?: boolean | undefined;
1814
+ }>>;
1815
+ }, "strip", z.ZodTypeAny, {
1816
+ durationInMs: number;
1817
+ retry?: {
1818
+ limit?: number | undefined;
1819
+ factor?: number | undefined;
1820
+ minTimeoutInMs?: number | undefined;
1821
+ maxTimeoutInMs?: number | undefined;
1822
+ randomize?: boolean | undefined;
1823
+ } | undefined;
1824
+ }, {
1825
+ durationInMs: number;
1826
+ retry?: {
1827
+ limit?: number | undefined;
1828
+ factor?: number | undefined;
1829
+ minTimeoutInMs?: number | undefined;
1830
+ maxTimeoutInMs?: number | undefined;
1831
+ randomize?: boolean | undefined;
1832
+ } | undefined;
1833
+ }>>;
1834
+ }, "strip", z.ZodTypeAny, {
1835
+ url: string;
1836
+ requestInit?: {
1837
+ method?: string | undefined;
1838
+ headers?: Record<string, string | {
1839
+ __redactedString: true;
1840
+ strings: string[];
1841
+ interpolations: string[];
1842
+ }> | undefined;
1843
+ body?: string | ArrayBuffer | undefined;
1844
+ } | undefined;
1845
+ retry?: Record<string, {
1846
+ strategy: "headers";
1847
+ limitHeader: string;
1848
+ remainingHeader: string;
1849
+ resetHeader: string;
1850
+ resetFormat: "unix_timestamp" | "unix_timestamp_in_ms" | "iso_8601" | "iso_8601_duration_openai_variant";
1851
+ bodyFilter?: EventFilter | undefined;
1852
+ } | {
1853
+ strategy: "backoff";
1854
+ limit?: number | undefined;
1855
+ factor?: number | undefined;
1856
+ minTimeoutInMs?: number | undefined;
1857
+ maxTimeoutInMs?: number | undefined;
1858
+ randomize?: boolean | undefined;
1859
+ bodyFilter?: EventFilter | undefined;
1860
+ }> | undefined;
1861
+ timeout?: {
1862
+ durationInMs: number;
1863
+ retry?: {
1864
+ limit?: number | undefined;
1865
+ factor?: number | undefined;
1866
+ minTimeoutInMs?: number | undefined;
1867
+ maxTimeoutInMs?: number | undefined;
1868
+ randomize?: boolean | undefined;
1869
+ } | undefined;
1870
+ } | undefined;
1871
+ }, {
1872
+ url: string;
1873
+ requestInit?: {
1874
+ method?: string | undefined;
1875
+ headers?: Record<string, string | {
1876
+ __redactedString: true;
1877
+ strings: string[];
1878
+ interpolations: string[];
1879
+ }> | undefined;
1880
+ body?: string | ArrayBuffer | undefined;
1881
+ } | undefined;
1882
+ retry?: Record<string, {
1883
+ strategy: "headers";
1884
+ limitHeader: string;
1885
+ remainingHeader: string;
1886
+ resetHeader: string;
1887
+ bodyFilter?: EventFilter | undefined;
1888
+ resetFormat?: "unix_timestamp" | "unix_timestamp_in_ms" | "iso_8601" | "iso_8601_duration_openai_variant" | undefined;
1889
+ } | {
1890
+ strategy: "backoff";
1891
+ limit?: number | undefined;
1892
+ factor?: number | undefined;
1893
+ minTimeoutInMs?: number | undefined;
1894
+ maxTimeoutInMs?: number | undefined;
1895
+ randomize?: boolean | undefined;
1896
+ bodyFilter?: EventFilter | undefined;
1897
+ }> | undefined;
1898
+ timeout?: {
1899
+ durationInMs: number;
1900
+ retry?: {
1901
+ limit?: number | undefined;
1902
+ factor?: number | undefined;
1903
+ minTimeoutInMs?: number | undefined;
1904
+ maxTimeoutInMs?: number | undefined;
1905
+ randomize?: boolean | undefined;
1906
+ } | undefined;
1907
+ } | undefined;
1908
+ }>;
1909
+ type FetchOperation = z.infer<typeof FetchOperationSchema>;
1910
+ declare const FetchPollOperationSchema: z.ZodObject<{
1911
+ url: z.ZodString;
1912
+ interval: z.ZodDefault<z.ZodNumber>;
1913
+ timeout: z.ZodDefault<z.ZodNumber>;
1914
+ responseFilter: z.ZodObject<{
1915
+ headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
1916
+ $endsWith: z.ZodString;
1917
+ }, "strip", z.ZodTypeAny, {
1918
+ $endsWith: string;
1919
+ }, {
1920
+ $endsWith: string;
1921
+ }>, z.ZodObject<{
1922
+ $startsWith: z.ZodString;
1923
+ }, "strip", z.ZodTypeAny, {
1924
+ $startsWith: string;
1925
+ }, {
1926
+ $startsWith: string;
1927
+ }>, z.ZodObject<{
1928
+ $ignoreCaseEquals: z.ZodString;
1929
+ }, "strip", z.ZodTypeAny, {
1930
+ $ignoreCaseEquals: string;
1931
+ }, {
1932
+ $ignoreCaseEquals: string;
1933
+ }>]>, "many">]>>>;
1934
+ body: z.ZodOptional<z.ZodType<EventFilter, z.ZodTypeDef, EventFilter>>;
1935
+ status: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
1936
+ }, "strip", z.ZodTypeAny, {
1937
+ headers?: Record<string, string[] | ({
1938
+ $endsWith: string;
1939
+ } | {
1940
+ $startsWith: string;
1941
+ } | {
1942
+ $ignoreCaseEquals: string;
1943
+ })[]> | undefined;
1944
+ body?: EventFilter | undefined;
1945
+ status?: number[] | undefined;
1946
+ }, {
1947
+ headers?: Record<string, string[] | ({
1948
+ $endsWith: string;
1949
+ } | {
1950
+ $startsWith: string;
1951
+ } | {
1952
+ $ignoreCaseEquals: string;
1953
+ })[]> | undefined;
1954
+ body?: EventFilter | undefined;
1955
+ status?: number[] | undefined;
1956
+ }>;
1957
+ requestInit: z.ZodOptional<z.ZodObject<{
1958
+ /** The HTTP method to use for the request. */
1959
+ method: z.ZodOptional<z.ZodString>;
1960
+ /** Any headers to send with the request. Note that you can use [redactString](https://trigger.dev/docs/sdk/redactString) to prevent sensitive information from being stored (e.g. in the logs), like API keys and tokens. */
1961
+ headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodObject<{
1962
+ __redactedString: z.ZodLiteral<true>;
1963
+ strings: z.ZodArray<z.ZodString, "many">;
1964
+ interpolations: z.ZodArray<z.ZodString, "many">;
1965
+ }, "strip", z.ZodTypeAny, {
1966
+ __redactedString: true;
1967
+ strings: string[];
1968
+ interpolations: string[];
1969
+ }, {
1970
+ __redactedString: true;
1971
+ strings: string[];
1972
+ interpolations: string[];
1973
+ }>]>>>;
1974
+ /** The body of the request. */
1975
+ body: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodType<ArrayBuffer, z.ZodTypeDef, ArrayBuffer>]>>;
1976
+ }, "strip", z.ZodTypeAny, {
1977
+ method?: string | undefined;
1978
+ headers?: Record<string, string | {
1979
+ __redactedString: true;
1980
+ strings: string[];
1981
+ interpolations: string[];
1982
+ }> | undefined;
1983
+ body?: string | ArrayBuffer | undefined;
1984
+ }, {
1985
+ method?: string | undefined;
1986
+ headers?: Record<string, string | {
1987
+ __redactedString: true;
1988
+ strings: string[];
1989
+ interpolations: string[];
1990
+ }> | undefined;
1991
+ body?: string | ArrayBuffer | undefined;
1992
+ }>>;
1993
+ requestTimeout: z.ZodOptional<z.ZodObject<{
1994
+ durationInMs: z.ZodNumber;
1995
+ retry: z.ZodOptional<z.ZodObject<{
1996
+ limit: z.ZodOptional<z.ZodNumber>;
1997
+ factor: z.ZodOptional<z.ZodNumber>;
1998
+ minTimeoutInMs: z.ZodOptional<z.ZodNumber>;
1999
+ maxTimeoutInMs: z.ZodOptional<z.ZodNumber>;
2000
+ randomize: z.ZodOptional<z.ZodBoolean>;
2001
+ }, "strip", z.ZodTypeAny, {
2002
+ limit?: number | undefined;
2003
+ factor?: number | undefined;
2004
+ minTimeoutInMs?: number | undefined;
2005
+ maxTimeoutInMs?: number | undefined;
2006
+ randomize?: boolean | undefined;
2007
+ }, {
2008
+ limit?: number | undefined;
2009
+ factor?: number | undefined;
2010
+ minTimeoutInMs?: number | undefined;
2011
+ maxTimeoutInMs?: number | undefined;
2012
+ randomize?: boolean | undefined;
2013
+ }>>;
2014
+ }, "strip", z.ZodTypeAny, {
2015
+ durationInMs: number;
2016
+ retry?: {
2017
+ limit?: number | undefined;
2018
+ factor?: number | undefined;
2019
+ minTimeoutInMs?: number | undefined;
2020
+ maxTimeoutInMs?: number | undefined;
2021
+ randomize?: boolean | undefined;
2022
+ } | undefined;
2023
+ }, {
2024
+ durationInMs: number;
2025
+ retry?: {
2026
+ limit?: number | undefined;
2027
+ factor?: number | undefined;
2028
+ minTimeoutInMs?: number | undefined;
2029
+ maxTimeoutInMs?: number | undefined;
2030
+ randomize?: boolean | undefined;
2031
+ } | undefined;
2032
+ }>>;
2033
+ }, "strip", z.ZodTypeAny, {
2034
+ url: string;
2035
+ interval: number;
2036
+ timeout: number;
2037
+ responseFilter: {
2038
+ headers?: Record<string, string[] | ({
2039
+ $endsWith: string;
2040
+ } | {
2041
+ $startsWith: string;
2042
+ } | {
2043
+ $ignoreCaseEquals: string;
2044
+ })[]> | undefined;
2045
+ body?: EventFilter | undefined;
2046
+ status?: number[] | undefined;
2047
+ };
2048
+ requestInit?: {
2049
+ method?: string | undefined;
2050
+ headers?: Record<string, string | {
2051
+ __redactedString: true;
2052
+ strings: string[];
2053
+ interpolations: string[];
2054
+ }> | undefined;
2055
+ body?: string | ArrayBuffer | undefined;
2056
+ } | undefined;
2057
+ requestTimeout?: {
2058
+ durationInMs: number;
2059
+ retry?: {
2060
+ limit?: number | undefined;
2061
+ factor?: number | undefined;
2062
+ minTimeoutInMs?: number | undefined;
2063
+ maxTimeoutInMs?: number | undefined;
2064
+ randomize?: boolean | undefined;
2065
+ } | undefined;
2066
+ } | undefined;
2067
+ }, {
2068
+ url: string;
2069
+ responseFilter: {
2070
+ headers?: Record<string, string[] | ({
2071
+ $endsWith: string;
2072
+ } | {
2073
+ $startsWith: string;
2074
+ } | {
2075
+ $ignoreCaseEquals: string;
2076
+ })[]> | undefined;
2077
+ body?: EventFilter | undefined;
2078
+ status?: number[] | undefined;
2079
+ };
2080
+ interval?: number | undefined;
2081
+ timeout?: number | undefined;
2082
+ requestInit?: {
2083
+ method?: string | undefined;
2084
+ headers?: Record<string, string | {
2085
+ __redactedString: true;
2086
+ strings: string[];
2087
+ interpolations: string[];
2088
+ }> | undefined;
2089
+ body?: string | ArrayBuffer | undefined;
2090
+ } | undefined;
2091
+ requestTimeout?: {
2092
+ durationInMs: number;
2093
+ retry?: {
2094
+ limit?: number | undefined;
2095
+ factor?: number | undefined;
2096
+ minTimeoutInMs?: number | undefined;
2097
+ maxTimeoutInMs?: number | undefined;
2098
+ randomize?: boolean | undefined;
2099
+ } | undefined;
2100
+ } | undefined;
2101
+ }>;
2102
+ type FetchPollOperation = Prettify<z.infer<typeof FetchPollOperationSchema>>;
2103
+
2104
+ declare const GetEventSchema: z.ZodObject<{
2105
+ /** The event id */
2106
+ id: z.ZodString;
2107
+ /** The event name */
2108
+ name: z.ZodString;
2109
+ /** When the event was created */
2110
+ createdAt: z.ZodDate;
2111
+ /** When the event was last updated */
2112
+ updatedAt: z.ZodDate;
2113
+ /** The runs that were triggered by the event */
2114
+ runs: z.ZodArray<z.ZodObject<{
2115
+ /** The Run id */
2116
+ id: z.ZodString;
2117
+ /** The Run status */
2118
+ status: z.ZodUnion<[z.ZodLiteral<"PENDING">, z.ZodLiteral<"QUEUED">, z.ZodLiteral<"WAITING_ON_CONNECTIONS">, z.ZodLiteral<"PREPROCESSING">, z.ZodLiteral<"STARTED">, z.ZodLiteral<"SUCCESS">, z.ZodLiteral<"FAILURE">, z.ZodLiteral<"TIMED_OUT">, z.ZodLiteral<"ABORTED">, z.ZodLiteral<"CANCELED">, z.ZodLiteral<"UNRESOLVED_AUTH">, z.ZodLiteral<"INVALID_PAYLOAD">, z.ZodLiteral<"EXECUTING">, z.ZodLiteral<"WAITING_TO_CONTINUE">, z.ZodLiteral<"WAITING_TO_EXECUTE">]>;
2119
+ /** When the run started */
2120
+ startedAt: z.ZodNullable<z.ZodOptional<z.ZodDate>>;
2121
+ /** When the run completed */
2122
+ completedAt: z.ZodNullable<z.ZodOptional<z.ZodDate>>;
2123
+ }, "strip", z.ZodTypeAny, {
2124
+ status: "PENDING" | "CANCELED" | "QUEUED" | "WAITING_ON_CONNECTIONS" | "PREPROCESSING" | "STARTED" | "SUCCESS" | "FAILURE" | "TIMED_OUT" | "ABORTED" | "UNRESOLVED_AUTH" | "INVALID_PAYLOAD" | "EXECUTING" | "WAITING_TO_CONTINUE" | "WAITING_TO_EXECUTE";
2125
+ id: string;
2126
+ startedAt?: Date | null | undefined;
2127
+ completedAt?: Date | null | undefined;
2128
+ }, {
2129
+ status: "PENDING" | "CANCELED" | "QUEUED" | "WAITING_ON_CONNECTIONS" | "PREPROCESSING" | "STARTED" | "SUCCESS" | "FAILURE" | "TIMED_OUT" | "ABORTED" | "UNRESOLVED_AUTH" | "INVALID_PAYLOAD" | "EXECUTING" | "WAITING_TO_CONTINUE" | "WAITING_TO_EXECUTE";
2130
+ id: string;
2131
+ startedAt?: Date | null | undefined;
2132
+ completedAt?: Date | null | undefined;
2133
+ }>, "many">;
2134
+ }, "strip", z.ZodTypeAny, {
2135
+ name: string;
2136
+ id: string;
2137
+ updatedAt: Date;
2138
+ runs: {
2139
+ status: "PENDING" | "CANCELED" | "QUEUED" | "WAITING_ON_CONNECTIONS" | "PREPROCESSING" | "STARTED" | "SUCCESS" | "FAILURE" | "TIMED_OUT" | "ABORTED" | "UNRESOLVED_AUTH" | "INVALID_PAYLOAD" | "EXECUTING" | "WAITING_TO_CONTINUE" | "WAITING_TO_EXECUTE";
2140
+ id: string;
2141
+ startedAt?: Date | null | undefined;
2142
+ completedAt?: Date | null | undefined;
2143
+ }[];
2144
+ createdAt: Date;
2145
+ }, {
2146
+ name: string;
2147
+ id: string;
2148
+ updatedAt: Date;
2149
+ runs: {
2150
+ status: "PENDING" | "CANCELED" | "QUEUED" | "WAITING_ON_CONNECTIONS" | "PREPROCESSING" | "STARTED" | "SUCCESS" | "FAILURE" | "TIMED_OUT" | "ABORTED" | "UNRESOLVED_AUTH" | "INVALID_PAYLOAD" | "EXECUTING" | "WAITING_TO_CONTINUE" | "WAITING_TO_EXECUTE";
2151
+ id: string;
2152
+ startedAt?: Date | null | undefined;
2153
+ completedAt?: Date | null | undefined;
2154
+ }[];
2155
+ createdAt: Date;
2156
+ }>;
2157
+ type GetEvent = z.infer<typeof GetEventSchema>;
2158
+ declare const CancelRunsForEventSchema: z.ZodObject<{
2159
+ cancelledRunIds: z.ZodArray<z.ZodString, "many">;
2160
+ failedToCancelRunIds: z.ZodArray<z.ZodString, "many">;
2161
+ }, "strip", z.ZodTypeAny, {
2162
+ cancelledRunIds: string[];
2163
+ failedToCancelRunIds: string[];
2164
+ }, {
2165
+ cancelledRunIds: string[];
2166
+ failedToCancelRunIds: string[];
2167
+ }>;
2168
+ type CancelRunsForEvent = z.infer<typeof CancelRunsForEventSchema>;
2169
+
2170
+ declare const StatusUpdateStateSchema: z.ZodUnion<[z.ZodLiteral<"loading">, z.ZodLiteral<"success">, z.ZodLiteral<"failure">]>;
2171
+ type StatusUpdateState = z.infer<typeof StatusUpdateStateSchema>;
2172
+ declare const StatusUpdateDataSchema: z.ZodRecord<z.ZodString, z.ZodType<SerializableJson, z.ZodTypeDef, SerializableJson>>;
2173
+ type StatusUpdateData = z.infer<typeof StatusUpdateDataSchema>;
2174
+ declare const StatusUpdateSchema: z.ZodObject<{
2175
+ label: z.ZodOptional<z.ZodString>;
2176
+ state: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"loading">, z.ZodLiteral<"success">, z.ZodLiteral<"failure">]>>;
2177
+ data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<SerializableJson, z.ZodTypeDef, SerializableJson>>>;
2178
+ }, "strip", z.ZodTypeAny, {
2179
+ label?: string | undefined;
2180
+ state?: "loading" | "success" | "failure" | undefined;
2181
+ data?: Record<string, SerializableJson> | undefined;
2182
+ }, {
2183
+ label?: string | undefined;
2184
+ state?: "loading" | "success" | "failure" | undefined;
2185
+ data?: Record<string, SerializableJson> | undefined;
2186
+ }>;
2187
+ type StatusUpdate = z.infer<typeof StatusUpdateSchema>;
2188
+ declare const InitalStatusUpdateSchema: z.ZodObject<{
2189
+ data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<SerializableJson, z.ZodTypeDef, SerializableJson>>>;
2190
+ label: z.ZodString;
2191
+ state: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"loading">, z.ZodLiteral<"success">, z.ZodLiteral<"failure">]>>;
2192
+ }, "strip", z.ZodTypeAny, {
2193
+ label: string;
2194
+ data?: Record<string, SerializableJson> | undefined;
2195
+ state?: "loading" | "success" | "failure" | undefined;
2196
+ }, {
2197
+ label: string;
2198
+ data?: Record<string, SerializableJson> | undefined;
2199
+ state?: "loading" | "success" | "failure" | undefined;
2200
+ }>;
2201
+ type InitialStatusUpdate = z.infer<typeof InitalStatusUpdateSchema>;
2202
+ declare const StatusHistorySchema: z.ZodArray<z.ZodObject<{
2203
+ label: z.ZodOptional<z.ZodString>;
2204
+ state: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"loading">, z.ZodLiteral<"success">, z.ZodLiteral<"failure">]>>;
2205
+ data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<SerializableJson, z.ZodTypeDef, SerializableJson>>>;
2206
+ }, "strip", z.ZodTypeAny, {
2207
+ label?: string | undefined;
2208
+ state?: "loading" | "success" | "failure" | undefined;
2209
+ data?: Record<string, SerializableJson> | undefined;
2210
+ }, {
2211
+ label?: string | undefined;
2212
+ state?: "loading" | "success" | "failure" | undefined;
2213
+ data?: Record<string, SerializableJson> | undefined;
2214
+ }>, "many">;
2215
+ type StatusHistory = z.infer<typeof StatusHistorySchema>;
2216
+ declare const JobRunStatusRecordSchema: z.ZodObject<{
2217
+ data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<SerializableJson, z.ZodTypeDef, SerializableJson>>>;
2218
+ label: z.ZodString;
2219
+ state: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"loading">, z.ZodLiteral<"success">, z.ZodLiteral<"failure">]>>;
2220
+ key: z.ZodString;
2221
+ history: z.ZodArray<z.ZodObject<{
2222
+ label: z.ZodOptional<z.ZodString>;
2223
+ state: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"loading">, z.ZodLiteral<"success">, z.ZodLiteral<"failure">]>>;
2224
+ data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<SerializableJson, z.ZodTypeDef, SerializableJson>>>;
2225
+ }, "strip", z.ZodTypeAny, {
2226
+ label?: string | undefined;
2227
+ state?: "loading" | "success" | "failure" | undefined;
2228
+ data?: Record<string, SerializableJson> | undefined;
2229
+ }, {
2230
+ label?: string | undefined;
2231
+ state?: "loading" | "success" | "failure" | undefined;
2232
+ data?: Record<string, SerializableJson> | undefined;
2233
+ }>, "many">;
2234
+ }, "strip", z.ZodTypeAny, {
2235
+ label: string;
2236
+ key: string;
2237
+ history: {
2238
+ label?: string | undefined;
2239
+ state?: "loading" | "success" | "failure" | undefined;
2240
+ data?: Record<string, SerializableJson> | undefined;
2241
+ }[];
2242
+ data?: Record<string, SerializableJson> | undefined;
2243
+ state?: "loading" | "success" | "failure" | undefined;
2244
+ }, {
2245
+ label: string;
2246
+ key: string;
2247
+ history: {
2248
+ label?: string | undefined;
2249
+ state?: "loading" | "success" | "failure" | undefined;
2250
+ data?: Record<string, SerializableJson> | undefined;
2251
+ }[];
2252
+ data?: Record<string, SerializableJson> | undefined;
2253
+ state?: "loading" | "success" | "failure" | undefined;
2254
+ }>;
2255
+ type JobRunStatusRecord = z.infer<typeof JobRunStatusRecordSchema>;
2256
+
2257
+ declare const RunStatusSchema: z.ZodUnion<[z.ZodLiteral<"PENDING">, z.ZodLiteral<"QUEUED">, z.ZodLiteral<"WAITING_ON_CONNECTIONS">, z.ZodLiteral<"PREPROCESSING">, z.ZodLiteral<"STARTED">, z.ZodLiteral<"SUCCESS">, z.ZodLiteral<"FAILURE">, z.ZodLiteral<"TIMED_OUT">, z.ZodLiteral<"ABORTED">, z.ZodLiteral<"CANCELED">, z.ZodLiteral<"UNRESOLVED_AUTH">, z.ZodLiteral<"INVALID_PAYLOAD">, z.ZodLiteral<"EXECUTING">, z.ZodLiteral<"WAITING_TO_CONTINUE">, z.ZodLiteral<"WAITING_TO_EXECUTE">]>;
2258
+ declare const RunTaskSchema: z.ZodObject<{
2259
+ /** The Task id */
2260
+ id: z.ZodString;
2261
+ /** The key that you defined when creating the Task, the first param in any task. */
2262
+ displayKey: z.ZodNullable<z.ZodString>;
2263
+ /** The Task status */
2264
+ status: z.ZodEnum<["PENDING", "WAITING", "RUNNING", "COMPLETED", "ERRORED", "CANCELED"]>;
2265
+ /** The name of the Task */
2266
+ name: z.ZodString;
2267
+ /** The icon of the Task, a string.
2268
+ * For integrations, this will be a lowercase name of the company.
2269
+ * Can be used with the [@trigger.dev/companyicons](https://www.npmjs.com/package/@trigger.dev/companyicons) package to display an svg. */
2270
+ icon: z.ZodNullable<z.ZodString>;
2271
+ /** When the task started */
2272
+ startedAt: z.ZodNullable<z.ZodDate>;
2273
+ /** When the task completed */
2274
+ completedAt: z.ZodNullable<z.ZodDate>;
2275
+ }, "strip", z.ZodTypeAny, {
2276
+ name: string;
2277
+ status: "PENDING" | "WAITING" | "RUNNING" | "COMPLETED" | "ERRORED" | "CANCELED";
2278
+ id: string;
2279
+ icon: string | null;
2280
+ startedAt: Date | null;
2281
+ completedAt: Date | null;
2282
+ displayKey: string | null;
2283
+ }, {
2284
+ name: string;
2285
+ status: "PENDING" | "WAITING" | "RUNNING" | "COMPLETED" | "ERRORED" | "CANCELED";
2286
+ id: string;
2287
+ icon: string | null;
2288
+ startedAt: Date | null;
2289
+ completedAt: Date | null;
2290
+ displayKey: string | null;
2291
+ }>;
2292
+ type RunTaskWithSubtasks = z.infer<typeof RunTaskSchema> & {
2293
+ /** The subtasks of the task */
2294
+ subtasks?: RunTaskWithSubtasks[];
2295
+ };
2296
+ declare const GetRunOptionsSchema: z.ZodObject<{
2297
+ /** Return subtasks, which appear in a `subtasks` array on a task. @default false */
2298
+ subtasks: z.ZodOptional<z.ZodBoolean>;
2299
+ /** You can use this to get more tasks, if there are more than are returned in a single batch @default undefined */
2300
+ cursor: z.ZodOptional<z.ZodString>;
2301
+ /** How many tasks you want to return in one go, max 50. @default 20 */
2302
+ take: z.ZodOptional<z.ZodNumber>;
2303
+ }, "strip", z.ZodTypeAny, {
2304
+ subtasks?: boolean | undefined;
2305
+ cursor?: string | undefined;
2306
+ take?: number | undefined;
2307
+ }, {
2308
+ subtasks?: boolean | undefined;
2309
+ cursor?: string | undefined;
2310
+ take?: number | undefined;
2311
+ }>;
2312
+ type GetRunOptions = z.infer<typeof GetRunOptionsSchema>;
2313
+ declare const GetRunOptionsWithTaskDetailsSchema: z.ZodObject<{
2314
+ subtasks: z.ZodOptional<z.ZodBoolean>;
2315
+ cursor: z.ZodOptional<z.ZodString>;
2316
+ take: z.ZodOptional<z.ZodNumber>;
2317
+ taskdetails: z.ZodOptional<z.ZodBoolean>;
2318
+ }, "strip", z.ZodTypeAny, {
2319
+ subtasks?: boolean | undefined;
2320
+ cursor?: string | undefined;
2321
+ take?: number | undefined;
2322
+ taskdetails?: boolean | undefined;
2323
+ }, {
2324
+ subtasks?: boolean | undefined;
2325
+ cursor?: string | undefined;
2326
+ take?: number | undefined;
2327
+ taskdetails?: boolean | undefined;
2328
+ }>;
2329
+ type GetRunOptionsWithTaskDetails = z.infer<typeof GetRunOptionsWithTaskDetailsSchema>;
2330
+ declare const GetRunSchema: z.ZodObject<{
2331
+ status: z.ZodUnion<[z.ZodLiteral<"PENDING">, z.ZodLiteral<"QUEUED">, z.ZodLiteral<"WAITING_ON_CONNECTIONS">, z.ZodLiteral<"PREPROCESSING">, z.ZodLiteral<"STARTED">, z.ZodLiteral<"SUCCESS">, z.ZodLiteral<"FAILURE">, z.ZodLiteral<"TIMED_OUT">, z.ZodLiteral<"ABORTED">, z.ZodLiteral<"CANCELED">, z.ZodLiteral<"UNRESOLVED_AUTH">, z.ZodLiteral<"INVALID_PAYLOAD">, z.ZodLiteral<"EXECUTING">, z.ZodLiteral<"WAITING_TO_CONTINUE">, z.ZodLiteral<"WAITING_TO_EXECUTE">]>;
2332
+ id: z.ZodString;
2333
+ startedAt: z.ZodNullable<z.ZodDate>;
2334
+ completedAt: z.ZodNullable<z.ZodDate>;
2335
+ updatedAt: z.ZodNullable<z.ZodDate>;
2336
+ output: z.ZodOptional<z.ZodAny>;
2337
+ tasks: z.ZodArray<z.ZodType<RunTaskWithSubtasks, z.ZodTypeDef, RunTaskWithSubtasks>, "many">;
2338
+ statuses: z.ZodDefault<z.ZodArray<z.ZodObject<{
2339
+ data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<SerializableJson, z.ZodTypeDef, SerializableJson>>>;
2340
+ label: z.ZodString;
2341
+ state: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"loading">, z.ZodLiteral<"success">, z.ZodLiteral<"failure">]>>;
2342
+ key: z.ZodString;
2343
+ history: z.ZodArray<z.ZodObject<{
2344
+ label: z.ZodOptional<z.ZodString>;
2345
+ state: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"loading">, z.ZodLiteral<"success">, z.ZodLiteral<"failure">]>>;
2346
+ data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<SerializableJson, z.ZodTypeDef, SerializableJson>>>;
2347
+ }, "strip", z.ZodTypeAny, {
2348
+ label?: string | undefined;
2349
+ state?: "loading" | "success" | "failure" | undefined;
2350
+ data?: Record<string, SerializableJson> | undefined;
2351
+ }, {
2352
+ label?: string | undefined;
2353
+ state?: "loading" | "success" | "failure" | undefined;
2354
+ data?: Record<string, SerializableJson> | undefined;
2355
+ }>, "many">;
2356
+ }, "strip", z.ZodTypeAny, {
2357
+ label: string;
2358
+ key: string;
2359
+ history: {
2360
+ label?: string | undefined;
2361
+ state?: "loading" | "success" | "failure" | undefined;
2362
+ data?: Record<string, SerializableJson> | undefined;
2363
+ }[];
2364
+ data?: Record<string, SerializableJson> | undefined;
2365
+ state?: "loading" | "success" | "failure" | undefined;
2366
+ }, {
2367
+ label: string;
2368
+ key: string;
2369
+ history: {
2370
+ label?: string | undefined;
2371
+ state?: "loading" | "success" | "failure" | undefined;
2372
+ data?: Record<string, SerializableJson> | undefined;
2373
+ }[];
2374
+ data?: Record<string, SerializableJson> | undefined;
2375
+ state?: "loading" | "success" | "failure" | undefined;
2376
+ }>, "many">>;
2377
+ nextCursor: z.ZodOptional<z.ZodString>;
2378
+ }, "strip", z.ZodTypeAny, {
2379
+ status: "PENDING" | "CANCELED" | "QUEUED" | "WAITING_ON_CONNECTIONS" | "PREPROCESSING" | "STARTED" | "SUCCESS" | "FAILURE" | "TIMED_OUT" | "ABORTED" | "UNRESOLVED_AUTH" | "INVALID_PAYLOAD" | "EXECUTING" | "WAITING_TO_CONTINUE" | "WAITING_TO_EXECUTE";
2380
+ id: string;
2381
+ startedAt: Date | null;
2382
+ completedAt: Date | null;
2383
+ updatedAt: Date | null;
2384
+ tasks: RunTaskWithSubtasks[];
2385
+ statuses: {
2386
+ label: string;
2387
+ key: string;
2388
+ history: {
2389
+ label?: string | undefined;
2390
+ state?: "loading" | "success" | "failure" | undefined;
2391
+ data?: Record<string, SerializableJson> | undefined;
2392
+ }[];
2393
+ data?: Record<string, SerializableJson> | undefined;
2394
+ state?: "loading" | "success" | "failure" | undefined;
2395
+ }[];
2396
+ output?: any;
2397
+ nextCursor?: string | undefined;
2398
+ }, {
2399
+ status: "PENDING" | "CANCELED" | "QUEUED" | "WAITING_ON_CONNECTIONS" | "PREPROCESSING" | "STARTED" | "SUCCESS" | "FAILURE" | "TIMED_OUT" | "ABORTED" | "UNRESOLVED_AUTH" | "INVALID_PAYLOAD" | "EXECUTING" | "WAITING_TO_CONTINUE" | "WAITING_TO_EXECUTE";
2400
+ id: string;
2401
+ startedAt: Date | null;
2402
+ completedAt: Date | null;
2403
+ updatedAt: Date | null;
2404
+ tasks: RunTaskWithSubtasks[];
2405
+ output?: any;
2406
+ statuses?: {
2407
+ label: string;
2408
+ key: string;
2409
+ history: {
2410
+ label?: string | undefined;
2411
+ state?: "loading" | "success" | "failure" | undefined;
2412
+ data?: Record<string, SerializableJson> | undefined;
2413
+ }[];
2414
+ data?: Record<string, SerializableJson> | undefined;
2415
+ state?: "loading" | "success" | "failure" | undefined;
2416
+ }[] | undefined;
2417
+ nextCursor?: string | undefined;
2418
+ }>;
2419
+ type GetRun = Prettify<z.infer<typeof GetRunSchema>>;
2420
+ declare const GetRunsOptionsSchema: z.ZodObject<{
2421
+ /** You can use this to get more tasks, if there are more than are returned in a single batch @default undefined */
2422
+ cursor: z.ZodOptional<z.ZodString>;
2423
+ /** How many runs you want to return in one go, max 50. @default 20 */
2424
+ take: z.ZodOptional<z.ZodNumber>;
2425
+ }, "strip", z.ZodTypeAny, {
2426
+ cursor?: string | undefined;
2427
+ take?: number | undefined;
2428
+ }, {
2429
+ cursor?: string | undefined;
2430
+ take?: number | undefined;
2431
+ }>;
2432
+ type GetRunsOptions = z.infer<typeof GetRunsOptionsSchema>;
2433
+ declare const GetRunsSchema: z.ZodObject<{
2434
+ /** The runs from the query */
2435
+ runs: z.ZodArray<z.ZodObject<{
2436
+ /** The Run id */
2437
+ id: z.ZodString;
2438
+ /** The Run status */
2439
+ status: z.ZodUnion<[z.ZodLiteral<"PENDING">, z.ZodLiteral<"QUEUED">, z.ZodLiteral<"WAITING_ON_CONNECTIONS">, z.ZodLiteral<"PREPROCESSING">, z.ZodLiteral<"STARTED">, z.ZodLiteral<"SUCCESS">, z.ZodLiteral<"FAILURE">, z.ZodLiteral<"TIMED_OUT">, z.ZodLiteral<"ABORTED">, z.ZodLiteral<"CANCELED">, z.ZodLiteral<"UNRESOLVED_AUTH">, z.ZodLiteral<"INVALID_PAYLOAD">, z.ZodLiteral<"EXECUTING">, z.ZodLiteral<"WAITING_TO_CONTINUE">, z.ZodLiteral<"WAITING_TO_EXECUTE">]>;
2440
+ /** When the run started */
2441
+ startedAt: z.ZodNullable<z.ZodDate>;
2442
+ /** When the run was last updated */
2443
+ updatedAt: z.ZodNullable<z.ZodDate>;
2444
+ /** When the run was completed */
2445
+ completedAt: z.ZodNullable<z.ZodDate>;
2446
+ }, "strip", z.ZodTypeAny, {
2447
+ status: "PENDING" | "CANCELED" | "QUEUED" | "WAITING_ON_CONNECTIONS" | "PREPROCESSING" | "STARTED" | "SUCCESS" | "FAILURE" | "TIMED_OUT" | "ABORTED" | "UNRESOLVED_AUTH" | "INVALID_PAYLOAD" | "EXECUTING" | "WAITING_TO_CONTINUE" | "WAITING_TO_EXECUTE";
2448
+ id: string;
2449
+ startedAt: Date | null;
2450
+ completedAt: Date | null;
2451
+ updatedAt: Date | null;
2452
+ }, {
2453
+ status: "PENDING" | "CANCELED" | "QUEUED" | "WAITING_ON_CONNECTIONS" | "PREPROCESSING" | "STARTED" | "SUCCESS" | "FAILURE" | "TIMED_OUT" | "ABORTED" | "UNRESOLVED_AUTH" | "INVALID_PAYLOAD" | "EXECUTING" | "WAITING_TO_CONTINUE" | "WAITING_TO_EXECUTE";
2454
+ id: string;
2455
+ startedAt: Date | null;
2456
+ completedAt: Date | null;
2457
+ updatedAt: Date | null;
2458
+ }>, "many">;
2459
+ /** If there are more runs, you can use this to get them */
2460
+ nextCursor: z.ZodOptional<z.ZodString>;
2461
+ }, "strip", z.ZodTypeAny, {
2462
+ runs: {
2463
+ status: "PENDING" | "CANCELED" | "QUEUED" | "WAITING_ON_CONNECTIONS" | "PREPROCESSING" | "STARTED" | "SUCCESS" | "FAILURE" | "TIMED_OUT" | "ABORTED" | "UNRESOLVED_AUTH" | "INVALID_PAYLOAD" | "EXECUTING" | "WAITING_TO_CONTINUE" | "WAITING_TO_EXECUTE";
2464
+ id: string;
2465
+ startedAt: Date | null;
2466
+ completedAt: Date | null;
2467
+ updatedAt: Date | null;
2468
+ }[];
2469
+ nextCursor?: string | undefined;
2470
+ }, {
2471
+ runs: {
2472
+ status: "PENDING" | "CANCELED" | "QUEUED" | "WAITING_ON_CONNECTIONS" | "PREPROCESSING" | "STARTED" | "SUCCESS" | "FAILURE" | "TIMED_OUT" | "ABORTED" | "UNRESOLVED_AUTH" | "INVALID_PAYLOAD" | "EXECUTING" | "WAITING_TO_CONTINUE" | "WAITING_TO_EXECUTE";
2473
+ id: string;
2474
+ startedAt: Date | null;
2475
+ completedAt: Date | null;
2476
+ updatedAt: Date | null;
2477
+ }[];
2478
+ nextCursor?: string | undefined;
2479
+ }>;
2480
+ type RunNotificationJobMetadata = {
2481
+ id: string;
2482
+ version: string;
2483
+ };
2484
+ type RunNotificationEnvMetadata = {
2485
+ slug: string;
2486
+ id: string;
2487
+ type: RuntimeEnvironmentType;
2488
+ };
2489
+ type RunNotificationOrgMetadata = {
2490
+ slug: string;
2491
+ id: string;
2492
+ title: string;
2493
+ };
2494
+ type RunNotificationProjectMetadata = {
2495
+ slug: string;
2496
+ id: string;
2497
+ name: string;
2498
+ };
2499
+ type RunNotificationAccountMetadata = {
2500
+ id: string;
2501
+ metadata?: any;
2502
+ };
2503
+ type RunNotificationInvocationMetadata<T = any> = {
2504
+ id: string;
2505
+ context: any;
2506
+ timestamp: Date;
2507
+ payload: T;
2508
+ };
2509
+ type RunNotificationRunMetadata = {
2510
+ /** The Run id */
2511
+ id: string;
2512
+ /** The Run status */
2513
+ statuses: JobRunStatusRecord[];
2514
+ /** When the run started */
2515
+ startedAt: Date;
2516
+ /** When the run was last updated */
2517
+ updatedAt: Date;
2518
+ /** When the run was completed */
2519
+ completedAt: Date;
2520
+ /** If the run was a test or not */
2521
+ isTest: boolean;
2522
+ executionDurationInMs: number;
2523
+ executionCount: number;
2524
+ };
2525
+ type RunNotificationCommon<TPayload = any> = {
2526
+ /** The Run id */
2527
+ id: string;
2528
+ /** The Run status */
2529
+ statuses: JobRunStatusRecord[];
2530
+ /** When the run started */
2531
+ startedAt: Date;
2532
+ /** When the run was last updated */
2533
+ updatedAt: Date;
2534
+ /** When the run was completed */
2535
+ completedAt: Date;
2536
+ /** If the run was a test or not */
2537
+ isTest: boolean;
2538
+ executionDurationInMs: number;
2539
+ executionCount: number;
2540
+ /** Job metadata */
2541
+ job: RunNotificationJobMetadata;
2542
+ /** Environment metadata */
2543
+ environment: RunNotificationEnvMetadata;
2544
+ /** Organization metadata */
2545
+ organization: RunNotificationOrgMetadata;
2546
+ /** Project metadata */
2547
+ project: RunNotificationProjectMetadata;
2548
+ /** Account metadata */
2549
+ account?: RunNotificationAccountMetadata;
2550
+ /** Invocation metadata */
2551
+ invocation: RunNotificationInvocationMetadata<TPayload>;
2552
+ };
2553
+ type SuccessfulRunNotification<TOutput, TPayload = any> = RunNotificationCommon<TPayload> & {
2554
+ ok: true;
2555
+ /** The Run status */
2556
+ status: "SUCCESS";
2557
+ /** The output of the run */
2558
+ output: TOutput;
2559
+ };
2560
+ type FailedRunNotification<TPayload = any> = RunNotificationCommon<TPayload> & {
2561
+ ok: false;
2562
+ /** The Run status */
2563
+ status: "FAILURE" | "TIMED_OUT" | "ABORTED" | "CANCELED" | "UNRESOLVED_AUTH" | "INVALID_PAYLOAD";
2564
+ /** The error of the run */
2565
+ error: any;
2566
+ /** The task that failed */
2567
+ task?: {
2568
+ id: string;
2569
+ cacheKey: string | null;
2570
+ status: string;
2571
+ name: string;
2572
+ icon: string | null;
2573
+ startedAt: string;
2574
+ error: ErrorWithStack;
2575
+ params: any | null;
2576
+ };
2577
+ };
2578
+ type RunNotification<TOutput, TPayload = any> = SuccessfulRunNotification<TOutput, TPayload> | FailedRunNotification<TPayload>;
2579
+
2580
+ declare function addMissingVersionField(val: unknown): unknown;
2581
+
2582
+ declare const RequestWithRawBodySchema: z.ZodObject<{
2583
+ url: z.ZodString;
2584
+ method: z.ZodString;
2585
+ headers: z.ZodRecord<z.ZodString, z.ZodString>;
2586
+ rawBody: z.ZodString;
2587
+ }, "strip", z.ZodTypeAny, {
2588
+ url: string;
2589
+ method: string;
2590
+ headers: Record<string, string>;
2591
+ rawBody: string;
2592
+ }, {
2593
+ url: string;
2594
+ method: string;
2595
+ headers: Record<string, string>;
2596
+ rawBody: string;
2597
+ }>;
2598
+
2599
+ declare const CancelRunsForJobSchema: z.ZodObject<{
2600
+ cancelledRunIds: z.ZodArray<z.ZodString, "many">;
2601
+ failedToCancelRunIds: z.ZodArray<z.ZodString, "many">;
2602
+ }, "strip", z.ZodTypeAny, {
2603
+ cancelledRunIds: string[];
2604
+ failedToCancelRunIds: string[];
2605
+ }, {
2606
+ cancelledRunIds: string[];
2607
+ failedToCancelRunIds: string[];
2608
+ }>;
2609
+ type CancelRunsForJob = z.infer<typeof CancelRunsForJobSchema>;
2610
+
2611
+ export { type CancelRunsForEvent, CancelRunsForEventSchema, type CancelRunsForJob, CancelRunsForJobSchema, CommonMissingConnectionNotificationPayloadSchema, CommonMissingConnectionNotificationResolvedPayloadSchema, type ConnectionAuth, ConnectionAuthSchema, type CronMetadata, CronMetadataSchema, type CronOptions, CronOptionsSchema, DisplayPropertiesSchema, type DisplayProperty, DisplayPropertySchema, DynamicTriggerMetadataSchema, type ErrorWithStack, ErrorWithStackSchema, type EventExample, EventExampleSchema, EventFilter, EventSpecificationSchema, type FailedRunNotification, type FetchOperation, FetchOperationSchema, type FetchPollOperation, FetchPollOperationSchema, type FetchRequestInit, FetchRequestInitSchema, type FetchRetryBackoffStrategy, FetchRetryBackoffStrategySchema, type FetchRetryHeadersStrategy, FetchRetryHeadersStrategySchema, type FetchRetryOptions, FetchRetryOptionsSchema, type FetchRetryStrategy, FetchRetryStrategySchema, type FetchTimeoutOptions, FetchTimeoutOptionsSchema, type GetEvent, GetEventSchema, type GetRun, type GetRunOptions, type GetRunOptionsWithTaskDetails, GetRunSchema, type GetRunsOptions, GetRunsSchema, type InitialStatusUpdate, type IntegrationConfig, IntegrationConfigSchema, type IntegrationMetadata, IntegrationMetadataSchema, type IntervalMetadata, IntervalMetadataSchema, type IntervalOptions, IntervalOptionsSchema, InvokeTriggerMetadataSchema, type JobRunStatusRecord, JobRunStatusRecordSchema, MISSING_CONNECTION_NOTIFICATION, MISSING_CONNECTION_RESOLVED_NOTIFICATION, type MissingConnectionNotificationPayload, MissingConnectionNotificationPayloadSchema, type MissingConnectionResolvedNotificationPayload, MissingConnectionResolvedNotificationPayloadSchema, MissingDeveloperConnectionNotificationPayloadSchema, MissingDeveloperConnectionResolvedNotificationPayloadSchema, MissingExternalConnectionNotificationPayloadSchema, MissingExternalConnectionResolvedNotificationPayloadSchema, type RegisterDynamicSchedulePayload, RegisterDynamicSchedulePayloadSchema, RequestWithRawBodySchema, type RunNotification, type RunNotificationAccountMetadata, type RunNotificationEnvMetadata, type RunNotificationInvocationMetadata, type RunNotificationJobMetadata, type RunNotificationOrgMetadata, type RunNotificationProjectMetadata, type RunNotificationRunMetadata, RunStatusSchema, RunTaskSchema, type RunTaskWithSubtasks, RuntimeEnvironmentType, SCHEDULED_EVENT, type ScheduleMetadata, ScheduleMetadataSchema, type ScheduledPayload, ScheduledPayloadSchema, ScheduledTriggerMetadataSchema, type SchemaError, SchemaErrorSchema, SerializableJson, StaticTriggerMetadataSchema, type StatusHistory, StatusHistorySchema, type StatusUpdate, type StatusUpdateData, StatusUpdateSchema, type StatusUpdateState, StatusUpdateStateSchema, type Style, type StyleName, StyleSchema, type SuccessfulRunNotification, TriggerHelpSchema, type TriggerMetadata, TriggerMetadataSchema, addMissingVersionField };