@trigger.dev/core 0.0.0-prerelease-20240603154820 → 0.0.0-prerelease-20240723165848

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 (187) hide show
  1. package/dist/api-Pl9fxB8v.d.mts +13879 -0
  2. package/dist/api-sNoooMbT.d.ts +13879 -0
  3. package/dist/{catalog-dRKTgwQ7.d.ts → catalog-H7yFiZ60.d.mts} +52 -52
  4. package/dist/{catalog-XTlJQaMn.d.mts → catalog-h79CG5Wy.d.ts} +52 -52
  5. package/dist/{manager-JkbddlcO.d.mts → common-CLW82lkt.d.mts} +280 -16
  6. package/dist/{manager-JkbddlcO.d.ts → common-CLW82lkt.d.ts} +280 -16
  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 -16716
  16. package/dist/index.d.ts +14 -16716
  17. package/dist/index.js +1 -1
  18. package/dist/index.js.map +1 -1
  19. package/dist/index.mjs +1 -1
  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-6_-q72KG.d.mts → messages-JvHJ83wv.d.mts} +2978 -291
  26. package/dist/{messages-6_-q72KG.d.ts → messages-JvHJ83wv.d.ts} +2978 -291
  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-r4ZP9S-F.d.mts → schemas-C9ssfehv.d.mts} +270 -33
  54. package/dist/{schemas-r4ZP9S-F.d.ts → schemas-C9ssfehv.d.ts} +270 -33
  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 +2 -1
  72. package/dist/v3/dev/index.d.ts +2 -1
  73. package/dist/v3/dev/index.js.map +1 -1
  74. package/dist/v3/dev/index.mjs.map +1 -1
  75. package/dist/v3/errors.d.mts +39 -0
  76. package/dist/v3/errors.d.ts +39 -0
  77. package/dist/v3/errors.js +204 -0
  78. package/dist/v3/errors.js.map +1 -0
  79. package/dist/v3/errors.mjs +195 -0
  80. package/dist/v3/errors.mjs.map +1 -0
  81. package/dist/v3/index.d.mts +172 -4737
  82. package/dist/v3/index.d.ts +172 -4737
  83. package/dist/v3/index.js +871 -620
  84. package/dist/v3/index.js.map +1 -1
  85. package/dist/v3/index.mjs +856 -620
  86. package/dist/v3/index.mjs.map +1 -1
  87. package/dist/v3/logger-api.d.mts +24 -0
  88. package/dist/v3/logger-api.d.ts +24 -0
  89. package/dist/v3/logger-api.js +118 -0
  90. package/dist/v3/logger-api.js.map +1 -0
  91. package/dist/v3/logger-api.mjs +116 -0
  92. package/dist/v3/logger-api.mjs.map +1 -0
  93. package/dist/v3/otel/index.js +36 -12
  94. package/dist/v3/otel/index.js.map +1 -1
  95. package/dist/v3/otel/index.mjs +36 -12
  96. package/dist/v3/otel/index.mjs.map +1 -1
  97. package/dist/v3/prod/index.d.mts +4 -3
  98. package/dist/v3/prod/index.d.ts +4 -3
  99. package/dist/v3/prod/index.js +7 -131
  100. package/dist/v3/prod/index.js.map +1 -1
  101. package/dist/v3/prod/index.mjs +7 -131
  102. package/dist/v3/prod/index.mjs.map +1 -1
  103. package/dist/v3/schemas/index.d.mts +4807 -0
  104. package/dist/v3/schemas/index.d.ts +4807 -0
  105. package/dist/v3/schemas/index.js +2065 -0
  106. package/dist/v3/schemas/index.js.map +1 -0
  107. package/dist/v3/schemas/index.mjs +1924 -0
  108. package/dist/v3/schemas/index.mjs.map +1 -0
  109. package/dist/v3/semanticInternalAttributes.d.mts +56 -0
  110. package/dist/v3/semanticInternalAttributes.d.ts +56 -0
  111. package/dist/v3/semanticInternalAttributes.js +61 -0
  112. package/dist/v3/semanticInternalAttributes.js.map +1 -0
  113. package/dist/v3/semanticInternalAttributes.mjs +59 -0
  114. package/dist/v3/semanticInternalAttributes.mjs.map +1 -0
  115. package/dist/v3/utils/durations.d.mts +15 -0
  116. package/dist/v3/utils/durations.d.ts +15 -0
  117. package/dist/v3/utils/durations.js +93 -0
  118. package/dist/v3/utils/durations.js.map +1 -0
  119. package/dist/v3/utils/durations.mjs +82 -0
  120. package/dist/v3/utils/durations.mjs.map +1 -0
  121. package/dist/v3/utils/flattenAttributes.d.mts +8 -0
  122. package/dist/v3/utils/flattenAttributes.d.ts +8 -0
  123. package/dist/v3/utils/flattenAttributes.js +131 -0
  124. package/dist/v3/utils/flattenAttributes.js.map +1 -0
  125. package/dist/v3/utils/flattenAttributes.mjs +126 -0
  126. package/dist/v3/utils/flattenAttributes.mjs.map +1 -0
  127. package/dist/v3/utils/ioSerialization.d.mts +21 -0
  128. package/dist/v3/utils/ioSerialization.d.ts +21 -0
  129. package/dist/v3/utils/ioSerialization.js +2403 -0
  130. package/dist/v3/utils/ioSerialization.js.map +1 -0
  131. package/dist/v3/utils/ioSerialization.mjs +2394 -0
  132. package/dist/v3/utils/ioSerialization.mjs.map +1 -0
  133. package/dist/v3/utils/omit.d.mts +3 -0
  134. package/dist/v3/utils/omit.d.ts +3 -0
  135. package/dist/v3/utils/omit.js +20 -0
  136. package/dist/v3/utils/omit.js.map +1 -0
  137. package/dist/v3/utils/omit.mjs +18 -0
  138. package/dist/v3/utils/omit.mjs.map +1 -0
  139. package/dist/v3/utils/retries.d.mts +46 -0
  140. package/dist/v3/utils/retries.d.ts +46 -0
  141. package/dist/v3/utils/retries.js +118 -0
  142. package/dist/v3/utils/retries.js.map +1 -0
  143. package/dist/v3/utils/retries.mjs +113 -0
  144. package/dist/v3/utils/retries.mjs.map +1 -0
  145. package/dist/v3/utils/timers.d.mts +6 -0
  146. package/dist/v3/utils/timers.d.ts +6 -0
  147. package/dist/v3/utils/timers.js +31 -0
  148. package/dist/v3/utils/timers.js.map +1 -0
  149. package/dist/v3/utils/timers.mjs +28 -0
  150. package/dist/v3/utils/timers.mjs.map +1 -0
  151. package/dist/v3/workers/index.d.mts +56 -8
  152. package/dist/v3/workers/index.d.ts +56 -8
  153. package/dist/v3/workers/index.js +755 -279
  154. package/dist/v3/workers/index.js.map +1 -1
  155. package/dist/v3/workers/index.mjs +753 -280
  156. package/dist/v3/workers/index.mjs.map +1 -1
  157. package/dist/v3/zodIpc.js.map +1 -1
  158. package/dist/v3/zodIpc.mjs.map +1 -1
  159. package/dist/v3/zodMessageHandler.d.mts +16 -3
  160. package/dist/v3/zodMessageHandler.d.ts +16 -3
  161. package/dist/v3/zodMessageHandler.js +77 -23
  162. package/dist/v3/zodMessageHandler.js.map +1 -1
  163. package/dist/v3/zodMessageHandler.mjs +77 -23
  164. package/dist/v3/zodMessageHandler.mjs.map +1 -1
  165. package/dist/v3/zodNamespace.js +59 -28
  166. package/dist/v3/zodNamespace.js.map +1 -1
  167. package/dist/v3/zodNamespace.mjs +60 -29
  168. package/dist/v3/zodNamespace.mjs.map +1 -1
  169. package/dist/v3/zodSocket.d.mts +8 -3
  170. package/dist/v3/zodSocket.d.ts +8 -3
  171. package/dist/v3/zodSocket.js +56 -25
  172. package/dist/v3/zodSocket.js.map +1 -1
  173. package/dist/v3/zodSocket.mjs +57 -26
  174. package/dist/v3/zodSocket.mjs.map +1 -1
  175. package/dist/v3/zodfetch.d.mts +15 -58
  176. package/dist/v3/zodfetch.d.ts +15 -58
  177. package/dist/v3/zodfetch.js +246 -156
  178. package/dist/v3/zodfetch.js.map +1 -1
  179. package/dist/v3/zodfetch.mjs +244 -149
  180. package/dist/v3/zodfetch.mjs.map +1 -1
  181. package/dist/versions.d.mts +11 -0
  182. package/dist/versions.d.ts +11 -0
  183. package/dist/versions.js +31 -0
  184. package/dist/versions.js.map +1 -0
  185. package/dist/versions.mjs +27 -0
  186. package/dist/versions.mjs.map +1 -0
  187. package/package.json +154 -10
@@ -0,0 +1,22 @@
1
+ import { D as DeserializedJson } from './json-DBPEJQRe.mjs';
2
+ import 'zod';
3
+
4
+ interface ExampleReplacement {
5
+ marker: string;
6
+ replace(input: ExampleInputData): DeserializedJson;
7
+ }
8
+ type ExampleInputData = {
9
+ match: {
10
+ key: string;
11
+ value: string;
12
+ };
13
+ data: {
14
+ now: Date;
15
+ };
16
+ };
17
+ declare const currentDate: ExampleReplacement;
18
+ declare const currentTimestampMilliseconds: ExampleReplacement;
19
+ declare const currentTimestampSeconds: ExampleReplacement;
20
+ declare const replacements: ExampleReplacement[];
21
+
22
+ export { type ExampleReplacement, currentDate, currentTimestampMilliseconds, currentTimestampSeconds, replacements };
@@ -0,0 +1,22 @@
1
+ import { D as DeserializedJson } from './json-DBPEJQRe.js';
2
+ import 'zod';
3
+
4
+ interface ExampleReplacement {
5
+ marker: string;
6
+ replace(input: ExampleInputData): DeserializedJson;
7
+ }
8
+ type ExampleInputData = {
9
+ match: {
10
+ key: string;
11
+ value: string;
12
+ };
13
+ data: {
14
+ now: Date;
15
+ };
16
+ };
17
+ declare const currentDate: ExampleReplacement;
18
+ declare const currentTimestampMilliseconds: ExampleReplacement;
19
+ declare const currentTimestampSeconds: ExampleReplacement;
20
+ declare const replacements: ExampleReplacement[];
21
+
22
+ export { type ExampleReplacement, currentDate, currentTimestampMilliseconds, currentTimestampSeconds, replacements };
@@ -0,0 +1,33 @@
1
+ 'use strict';
2
+
3
+ // src/replacements.ts
4
+ var currentDate = {
5
+ marker: "__CURRENT_DATE__",
6
+ replace({ data: { now } }) {
7
+ return now.toISOString();
8
+ }
9
+ };
10
+ var currentTimestampMilliseconds = {
11
+ marker: "__CURRENT_TIMESTAMP_MS__",
12
+ replace({ data: { now } }) {
13
+ return now.getTime();
14
+ }
15
+ };
16
+ var currentTimestampSeconds = {
17
+ marker: "__CURRENT_TIMESTAMP_S__",
18
+ replace({ data: { now } }) {
19
+ return now.getTime() / 1e3;
20
+ }
21
+ };
22
+ var replacements = [
23
+ currentDate,
24
+ currentTimestampMilliseconds,
25
+ currentTimestampSeconds
26
+ ];
27
+
28
+ exports.currentDate = currentDate;
29
+ exports.currentTimestampMilliseconds = currentTimestampMilliseconds;
30
+ exports.currentTimestampSeconds = currentTimestampSeconds;
31
+ exports.replacements = replacements;
32
+ //# sourceMappingURL=out.js.map
33
+ //# sourceMappingURL=replacements.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/replacements.ts"],"names":["currentDate","marker","replace","data","now","toISOString","currentTimestampMilliseconds","getTime","currentTimestampSeconds","replacements"],"mappings":";AAiBO,IAAMA,cAAkC;EAC7CC,QAAQ;EACRC,QAAQ,EAAEC,MAAM,EAAEC,IAAG,EAAE,GAAsB;AAC3C,WAAOA,IAAIC,YAAW;EACxB;AACF;AAEO,IAAMC,+BAAmD;EAC9DL,QAAQ;EACRC,QAAQ,EAAEC,MAAM,EAAEC,IAAG,EAAE,GAAsB;AAC3C,WAAOA,IAAIG,QAAO;EACpB;AACF;AAEO,IAAMC,0BAA8C;EACzDP,QAAQ;EACRC,QAAQ,EAAEC,MAAM,EAAEC,IAAG,EAAE,GAAsB;AAC3C,WAAOA,IAAIG,QAAO,IAAK;EACzB;AACF;AAEO,IAAME,eAAqC;EAChDT;EACAM;EACAE","sourcesContent":["import { DeserializedJson } from \"./schemas\";\n\nexport interface ExampleReplacement {\n marker: string;\n replace(input: ExampleInputData): DeserializedJson;\n}\n\ntype ExampleInputData = {\n match: {\n key: string;\n value: string;\n };\n data: {\n now: Date;\n };\n};\n\nexport const currentDate: ExampleReplacement = {\n marker: \"__CURRENT_DATE__\",\n replace({ data: { now } }: ExampleInputData) {\n return now.toISOString();\n },\n};\n\nexport const currentTimestampMilliseconds: ExampleReplacement = {\n marker: \"__CURRENT_TIMESTAMP_MS__\",\n replace({ data: { now } }: ExampleInputData) {\n return now.getTime();\n },\n};\n\nexport const currentTimestampSeconds: ExampleReplacement = {\n marker: \"__CURRENT_TIMESTAMP_S__\",\n replace({ data: { now } }: ExampleInputData) {\n return now.getTime() / 1000;\n },\n};\n\nexport const replacements: ExampleReplacement[] = [\n currentDate,\n currentTimestampMilliseconds,\n currentTimestampSeconds,\n];\n"]}
@@ -0,0 +1,28 @@
1
+ // src/replacements.ts
2
+ var currentDate = {
3
+ marker: "__CURRENT_DATE__",
4
+ replace({ data: { now } }) {
5
+ return now.toISOString();
6
+ }
7
+ };
8
+ var currentTimestampMilliseconds = {
9
+ marker: "__CURRENT_TIMESTAMP_MS__",
10
+ replace({ data: { now } }) {
11
+ return now.getTime();
12
+ }
13
+ };
14
+ var currentTimestampSeconds = {
15
+ marker: "__CURRENT_TIMESTAMP_S__",
16
+ replace({ data: { now } }) {
17
+ return now.getTime() / 1e3;
18
+ }
19
+ };
20
+ var replacements = [
21
+ currentDate,
22
+ currentTimestampMilliseconds,
23
+ currentTimestampSeconds
24
+ ];
25
+
26
+ export { currentDate, currentTimestampMilliseconds, currentTimestampSeconds, replacements };
27
+ //# sourceMappingURL=out.js.map
28
+ //# sourceMappingURL=replacements.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/replacements.ts"],"names":["currentDate","marker","replace","data","now","toISOString","currentTimestampMilliseconds","getTime","currentTimestampSeconds","replacements"],"mappings":";AAiBO,IAAMA,cAAkC;EAC7CC,QAAQ;EACRC,QAAQ,EAAEC,MAAM,EAAEC,IAAG,EAAE,GAAsB;AAC3C,WAAOA,IAAIC,YAAW;EACxB;AACF;AAEO,IAAMC,+BAAmD;EAC9DL,QAAQ;EACRC,QAAQ,EAAEC,MAAM,EAAEC,IAAG,EAAE,GAAsB;AAC3C,WAAOA,IAAIG,QAAO;EACpB;AACF;AAEO,IAAMC,0BAA8C;EACzDP,QAAQ;EACRC,QAAQ,EAAEC,MAAM,EAAEC,IAAG,EAAE,GAAsB;AAC3C,WAAOA,IAAIG,QAAO,IAAK;EACzB;AACF;AAEO,IAAME,eAAqC;EAChDT;EACAM;EACAE","sourcesContent":["import { DeserializedJson } from \"./schemas\";\n\nexport interface ExampleReplacement {\n marker: string;\n replace(input: ExampleInputData): DeserializedJson;\n}\n\ntype ExampleInputData = {\n match: {\n key: string;\n value: string;\n };\n data: {\n now: Date;\n };\n};\n\nexport const currentDate: ExampleReplacement = {\n marker: \"__CURRENT_DATE__\",\n replace({ data: { now } }: ExampleInputData) {\n return now.toISOString();\n },\n};\n\nexport const currentTimestampMilliseconds: ExampleReplacement = {\n marker: \"__CURRENT_TIMESTAMP_MS__\",\n replace({ data: { now } }: ExampleInputData) {\n return now.getTime();\n },\n};\n\nexport const currentTimestampSeconds: ExampleReplacement = {\n marker: \"__CURRENT_TIMESTAMP_S__\",\n replace({ data: { now } }: ExampleInputData) {\n return now.getTime() / 1000;\n },\n};\n\nexport const replacements: ExampleReplacement[] = [\n currentDate,\n currentTimestampMilliseconds,\n currentTimestampSeconds,\n];\n"]}
@@ -0,0 +1,180 @@
1
+ import { E as EventFilter } from './eventFilter-66NaBAMi.js';
2
+ import { z } from 'zod';
3
+ import { Prettify } from './types.js';
4
+
5
+ declare const StringMatchSchema: z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
6
+ $endsWith: z.ZodString;
7
+ }, "strip", z.ZodTypeAny, {
8
+ $endsWith: string;
9
+ }, {
10
+ $endsWith: string;
11
+ }>, z.ZodObject<{
12
+ $startsWith: z.ZodString;
13
+ }, "strip", z.ZodTypeAny, {
14
+ $startsWith: string;
15
+ }, {
16
+ $startsWith: string;
17
+ }>, z.ZodObject<{
18
+ $ignoreCaseEquals: z.ZodString;
19
+ }, "strip", z.ZodTypeAny, {
20
+ $ignoreCaseEquals: string;
21
+ }, {
22
+ $ignoreCaseEquals: string;
23
+ }>]>, "many">]>;
24
+ type StringMatch = z.infer<typeof StringMatchSchema>;
25
+ declare const HTTPMethodUnionSchema: z.ZodUnion<[z.ZodLiteral<"GET">, z.ZodLiteral<"POST">, z.ZodLiteral<"PUT">, z.ZodLiteral<"PATCH">, z.ZodLiteral<"DELETE">, z.ZodLiteral<"HEAD">, z.ZodLiteral<"OPTIONS">]>;
26
+ type HttpMethod = z.infer<typeof HTTPMethodUnionSchema>;
27
+ /** Only Requests that match this filter will cause the `handler` function to run.
28
+ * For example, you can use this to only respond to `GET` Requests. */
29
+ declare const RequestFilterSchema: z.ZodObject<{
30
+ /** An array of HTTP methods to match.
31
+ * For example, `["GET", "POST"]` will match both `GET` and `POST` Requests. */
32
+ method: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodLiteral<"GET">, z.ZodLiteral<"POST">, z.ZodLiteral<"PUT">, z.ZodLiteral<"PATCH">, z.ZodLiteral<"DELETE">, z.ZodLiteral<"HEAD">, z.ZodLiteral<"OPTIONS">]>, "many">>;
33
+ /** An object of header key/values to match.
34
+ * This uses the [EventFilter matching syntax](https://trigger.dev/docs/documentation/guides/event-filter).
35
+
36
+ @example
37
+ ```ts
38
+ filter: {
39
+ header: {
40
+ "content-type": ["application/json"],
41
+ },
42
+ },
43
+ ``` */
44
+ headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
45
+ $endsWith: z.ZodString;
46
+ }, "strip", z.ZodTypeAny, {
47
+ $endsWith: string;
48
+ }, {
49
+ $endsWith: string;
50
+ }>, z.ZodObject<{
51
+ $startsWith: z.ZodString;
52
+ }, "strip", z.ZodTypeAny, {
53
+ $startsWith: string;
54
+ }, {
55
+ $startsWith: string;
56
+ }>, z.ZodObject<{
57
+ $ignoreCaseEquals: z.ZodString;
58
+ }, "strip", z.ZodTypeAny, {
59
+ $ignoreCaseEquals: string;
60
+ }, {
61
+ $ignoreCaseEquals: string;
62
+ }>]>, "many">]>>>;
63
+ /** An object of query parameters to match.
64
+ * This uses the [EventFilter matching syntax](https://trigger.dev/docs/documentation/guides/event-filter).
65
+
66
+ @example
67
+ ```ts
68
+ filter: {
69
+ query: {
70
+ "hub.mode": [{ $startsWith: "sub" }],
71
+ },
72
+ },
73
+ ``` */
74
+ query: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
75
+ $endsWith: z.ZodString;
76
+ }, "strip", z.ZodTypeAny, {
77
+ $endsWith: string;
78
+ }, {
79
+ $endsWith: string;
80
+ }>, z.ZodObject<{
81
+ $startsWith: z.ZodString;
82
+ }, "strip", z.ZodTypeAny, {
83
+ $startsWith: string;
84
+ }, {
85
+ $startsWith: string;
86
+ }>, z.ZodObject<{
87
+ $ignoreCaseEquals: z.ZodString;
88
+ }, "strip", z.ZodTypeAny, {
89
+ $ignoreCaseEquals: string;
90
+ }, {
91
+ $ignoreCaseEquals: string;
92
+ }>]>, "many">]>>>;
93
+ /** An object of key/values to match.
94
+ * This uses the [EventFilter matching syntax](https://trigger.dev/docs/documentation/guides/event-filter).
95
+ */
96
+ body: z.ZodOptional<z.ZodType<EventFilter, z.ZodTypeDef, EventFilter>>;
97
+ }, "strip", z.ZodTypeAny, {
98
+ method?: ("GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "HEAD" | "OPTIONS")[] | undefined;
99
+ headers?: Record<string, string[] | ({
100
+ $endsWith: string;
101
+ } | {
102
+ $startsWith: string;
103
+ } | {
104
+ $ignoreCaseEquals: string;
105
+ })[]> | undefined;
106
+ query?: Record<string, string[] | ({
107
+ $endsWith: string;
108
+ } | {
109
+ $startsWith: string;
110
+ } | {
111
+ $ignoreCaseEquals: string;
112
+ })[]> | undefined;
113
+ body?: EventFilter | undefined;
114
+ }, {
115
+ method?: ("GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "HEAD" | "OPTIONS")[] | undefined;
116
+ headers?: Record<string, string[] | ({
117
+ $endsWith: string;
118
+ } | {
119
+ $startsWith: string;
120
+ } | {
121
+ $ignoreCaseEquals: string;
122
+ })[]> | undefined;
123
+ query?: Record<string, string[] | ({
124
+ $endsWith: string;
125
+ } | {
126
+ $startsWith: string;
127
+ } | {
128
+ $ignoreCaseEquals: string;
129
+ })[]> | undefined;
130
+ body?: EventFilter | undefined;
131
+ }>;
132
+ type RequestFilter = z.infer<typeof RequestFilterSchema>;
133
+ /** Only Requests that match this filter will cause the `handler` function to run.
134
+ * For example, you can use this to only respond to `GET` Requests. */
135
+ declare const ResponseFilterSchema: z.ZodObject<{
136
+ headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
137
+ $endsWith: z.ZodString;
138
+ }, "strip", z.ZodTypeAny, {
139
+ $endsWith: string;
140
+ }, {
141
+ $endsWith: string;
142
+ }>, z.ZodObject<{
143
+ $startsWith: z.ZodString;
144
+ }, "strip", z.ZodTypeAny, {
145
+ $startsWith: string;
146
+ }, {
147
+ $startsWith: string;
148
+ }>, z.ZodObject<{
149
+ $ignoreCaseEquals: z.ZodString;
150
+ }, "strip", z.ZodTypeAny, {
151
+ $ignoreCaseEquals: string;
152
+ }, {
153
+ $ignoreCaseEquals: string;
154
+ }>]>, "many">]>>>;
155
+ body: z.ZodOptional<z.ZodType<EventFilter, z.ZodTypeDef, EventFilter>>;
156
+ status: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
157
+ }, "strip", z.ZodTypeAny, {
158
+ headers?: Record<string, string[] | ({
159
+ $endsWith: string;
160
+ } | {
161
+ $startsWith: string;
162
+ } | {
163
+ $ignoreCaseEquals: string;
164
+ })[]> | undefined;
165
+ body?: EventFilter | undefined;
166
+ status?: number[] | undefined;
167
+ }, {
168
+ headers?: Record<string, string[] | ({
169
+ $endsWith: string;
170
+ } | {
171
+ $startsWith: string;
172
+ } | {
173
+ $ignoreCaseEquals: string;
174
+ })[]> | undefined;
175
+ body?: EventFilter | undefined;
176
+ status?: number[] | undefined;
177
+ }>;
178
+ type ResponseFilter = Prettify<z.infer<typeof ResponseFilterSchema>>;
179
+
180
+ export { HTTPMethodUnionSchema as H, RequestFilterSchema as R, type StringMatch as S, type HttpMethod as a, type RequestFilter as b, ResponseFilterSchema as c, type ResponseFilter as d };
@@ -0,0 +1,180 @@
1
+ import { E as EventFilter } from './eventFilter-66NaBAMi.mjs';
2
+ import { z } from 'zod';
3
+ import { Prettify } from './types.mjs';
4
+
5
+ declare const StringMatchSchema: z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
6
+ $endsWith: z.ZodString;
7
+ }, "strip", z.ZodTypeAny, {
8
+ $endsWith: string;
9
+ }, {
10
+ $endsWith: string;
11
+ }>, z.ZodObject<{
12
+ $startsWith: z.ZodString;
13
+ }, "strip", z.ZodTypeAny, {
14
+ $startsWith: string;
15
+ }, {
16
+ $startsWith: string;
17
+ }>, z.ZodObject<{
18
+ $ignoreCaseEquals: z.ZodString;
19
+ }, "strip", z.ZodTypeAny, {
20
+ $ignoreCaseEquals: string;
21
+ }, {
22
+ $ignoreCaseEquals: string;
23
+ }>]>, "many">]>;
24
+ type StringMatch = z.infer<typeof StringMatchSchema>;
25
+ declare const HTTPMethodUnionSchema: z.ZodUnion<[z.ZodLiteral<"GET">, z.ZodLiteral<"POST">, z.ZodLiteral<"PUT">, z.ZodLiteral<"PATCH">, z.ZodLiteral<"DELETE">, z.ZodLiteral<"HEAD">, z.ZodLiteral<"OPTIONS">]>;
26
+ type HttpMethod = z.infer<typeof HTTPMethodUnionSchema>;
27
+ /** Only Requests that match this filter will cause the `handler` function to run.
28
+ * For example, you can use this to only respond to `GET` Requests. */
29
+ declare const RequestFilterSchema: z.ZodObject<{
30
+ /** An array of HTTP methods to match.
31
+ * For example, `["GET", "POST"]` will match both `GET` and `POST` Requests. */
32
+ method: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodLiteral<"GET">, z.ZodLiteral<"POST">, z.ZodLiteral<"PUT">, z.ZodLiteral<"PATCH">, z.ZodLiteral<"DELETE">, z.ZodLiteral<"HEAD">, z.ZodLiteral<"OPTIONS">]>, "many">>;
33
+ /** An object of header key/values to match.
34
+ * This uses the [EventFilter matching syntax](https://trigger.dev/docs/documentation/guides/event-filter).
35
+
36
+ @example
37
+ ```ts
38
+ filter: {
39
+ header: {
40
+ "content-type": ["application/json"],
41
+ },
42
+ },
43
+ ``` */
44
+ headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
45
+ $endsWith: z.ZodString;
46
+ }, "strip", z.ZodTypeAny, {
47
+ $endsWith: string;
48
+ }, {
49
+ $endsWith: string;
50
+ }>, z.ZodObject<{
51
+ $startsWith: z.ZodString;
52
+ }, "strip", z.ZodTypeAny, {
53
+ $startsWith: string;
54
+ }, {
55
+ $startsWith: string;
56
+ }>, z.ZodObject<{
57
+ $ignoreCaseEquals: z.ZodString;
58
+ }, "strip", z.ZodTypeAny, {
59
+ $ignoreCaseEquals: string;
60
+ }, {
61
+ $ignoreCaseEquals: string;
62
+ }>]>, "many">]>>>;
63
+ /** An object of query parameters to match.
64
+ * This uses the [EventFilter matching syntax](https://trigger.dev/docs/documentation/guides/event-filter).
65
+
66
+ @example
67
+ ```ts
68
+ filter: {
69
+ query: {
70
+ "hub.mode": [{ $startsWith: "sub" }],
71
+ },
72
+ },
73
+ ``` */
74
+ query: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
75
+ $endsWith: z.ZodString;
76
+ }, "strip", z.ZodTypeAny, {
77
+ $endsWith: string;
78
+ }, {
79
+ $endsWith: string;
80
+ }>, z.ZodObject<{
81
+ $startsWith: z.ZodString;
82
+ }, "strip", z.ZodTypeAny, {
83
+ $startsWith: string;
84
+ }, {
85
+ $startsWith: string;
86
+ }>, z.ZodObject<{
87
+ $ignoreCaseEquals: z.ZodString;
88
+ }, "strip", z.ZodTypeAny, {
89
+ $ignoreCaseEquals: string;
90
+ }, {
91
+ $ignoreCaseEquals: string;
92
+ }>]>, "many">]>>>;
93
+ /** An object of key/values to match.
94
+ * This uses the [EventFilter matching syntax](https://trigger.dev/docs/documentation/guides/event-filter).
95
+ */
96
+ body: z.ZodOptional<z.ZodType<EventFilter, z.ZodTypeDef, EventFilter>>;
97
+ }, "strip", z.ZodTypeAny, {
98
+ method?: ("GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "HEAD" | "OPTIONS")[] | undefined;
99
+ headers?: Record<string, string[] | ({
100
+ $endsWith: string;
101
+ } | {
102
+ $startsWith: string;
103
+ } | {
104
+ $ignoreCaseEquals: string;
105
+ })[]> | undefined;
106
+ query?: Record<string, string[] | ({
107
+ $endsWith: string;
108
+ } | {
109
+ $startsWith: string;
110
+ } | {
111
+ $ignoreCaseEquals: string;
112
+ })[]> | undefined;
113
+ body?: EventFilter | undefined;
114
+ }, {
115
+ method?: ("GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "HEAD" | "OPTIONS")[] | undefined;
116
+ headers?: Record<string, string[] | ({
117
+ $endsWith: string;
118
+ } | {
119
+ $startsWith: string;
120
+ } | {
121
+ $ignoreCaseEquals: string;
122
+ })[]> | undefined;
123
+ query?: Record<string, string[] | ({
124
+ $endsWith: string;
125
+ } | {
126
+ $startsWith: string;
127
+ } | {
128
+ $ignoreCaseEquals: string;
129
+ })[]> | undefined;
130
+ body?: EventFilter | undefined;
131
+ }>;
132
+ type RequestFilter = z.infer<typeof RequestFilterSchema>;
133
+ /** Only Requests that match this filter will cause the `handler` function to run.
134
+ * For example, you can use this to only respond to `GET` Requests. */
135
+ declare const ResponseFilterSchema: z.ZodObject<{
136
+ headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
137
+ $endsWith: z.ZodString;
138
+ }, "strip", z.ZodTypeAny, {
139
+ $endsWith: string;
140
+ }, {
141
+ $endsWith: string;
142
+ }>, z.ZodObject<{
143
+ $startsWith: z.ZodString;
144
+ }, "strip", z.ZodTypeAny, {
145
+ $startsWith: string;
146
+ }, {
147
+ $startsWith: string;
148
+ }>, z.ZodObject<{
149
+ $ignoreCaseEquals: z.ZodString;
150
+ }, "strip", z.ZodTypeAny, {
151
+ $ignoreCaseEquals: string;
152
+ }, {
153
+ $ignoreCaseEquals: string;
154
+ }>]>, "many">]>>>;
155
+ body: z.ZodOptional<z.ZodType<EventFilter, z.ZodTypeDef, EventFilter>>;
156
+ status: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
157
+ }, "strip", z.ZodTypeAny, {
158
+ headers?: Record<string, string[] | ({
159
+ $endsWith: string;
160
+ } | {
161
+ $startsWith: string;
162
+ } | {
163
+ $ignoreCaseEquals: string;
164
+ })[]> | undefined;
165
+ body?: EventFilter | undefined;
166
+ status?: number[] | undefined;
167
+ }, {
168
+ headers?: Record<string, string[] | ({
169
+ $endsWith: string;
170
+ } | {
171
+ $startsWith: string;
172
+ } | {
173
+ $ignoreCaseEquals: string;
174
+ })[]> | undefined;
175
+ body?: EventFilter | undefined;
176
+ status?: number[] | undefined;
177
+ }>;
178
+ type ResponseFilter = Prettify<z.infer<typeof ResponseFilterSchema>>;
179
+
180
+ export { HTTPMethodUnionSchema as H, RequestFilterSchema as R, type StringMatch as S, type HttpMethod as a, type RequestFilter as b, ResponseFilterSchema as c, type ResponseFilter as d };
@@ -0,0 +1,13 @@
1
+ import { b as RequestFilter, d as ResponseFilter } from './requestFilter-b5W2_1oP.mjs';
2
+ import './eventFilter-66NaBAMi.mjs';
3
+ import 'zod';
4
+ import './types.mjs';
5
+
6
+ declare function requestFilterMatches(request: Request, filter: RequestFilter): Promise<boolean>;
7
+ type ResponseFilterMatchResult = {
8
+ match: boolean;
9
+ body?: unknown;
10
+ };
11
+ declare function responseFilterMatches(response: Response, filter: ResponseFilter): Promise<ResponseFilterMatchResult>;
12
+
13
+ export { type ResponseFilterMatchResult, requestFilterMatches, responseFilterMatches };
@@ -0,0 +1,13 @@
1
+ import { b as RequestFilter, d as ResponseFilter } from './requestFilter-HNZQEpQb.js';
2
+ import './eventFilter-66NaBAMi.js';
3
+ import 'zod';
4
+ import './types.js';
5
+
6
+ declare function requestFilterMatches(request: Request, filter: RequestFilter): Promise<boolean>;
7
+ type ResponseFilterMatchResult = {
8
+ match: boolean;
9
+ body?: unknown;
10
+ };
11
+ declare function responseFilterMatches(response: Response, filter: ResponseFilter): Promise<ResponseFilterMatchResult>;
12
+
13
+ export { type ResponseFilterMatchResult, requestFilterMatches, responseFilterMatches };