@trigger.dev/core 3.0.0-beta.48 → 3.0.0-beta.49

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 (155) hide show
  1. package/dist/api-Pl9fxB8v.d.mts +13879 -0
  2. package/dist/api-sNoooMbT.d.ts +13879 -0
  3. package/dist/{catalog-NxVZnWZh.d.ts → catalog-U7_q4XsM.d.mts} +12 -34
  4. package/dist/{catalog-N-X0Te3W.d.mts → catalog-bSnBE19I.d.ts} +12 -34
  5. package/dist/{common-fIyU5pmz.d.mts → common-CLW82lkt.d.mts} +1 -1
  6. package/dist/{common-fIyU5pmz.d.ts → common-CLW82lkt.d.ts} +1 -1
  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-X_HrWQ7_.d.mts → manager-KvCabW1a.d.mts} +1 -1
  24. package/dist/{manager-2ZQ3_twq.d.ts → manager-OBA35PzR.d.ts} +1 -1
  25. package/dist/replacements.d.mts +22 -0
  26. package/dist/replacements.d.ts +22 -0
  27. package/dist/replacements.js +33 -0
  28. package/dist/replacements.js.map +1 -0
  29. package/dist/replacements.mjs +28 -0
  30. package/dist/replacements.mjs.map +1 -0
  31. package/dist/requestFilter-HNZQEpQb.d.ts +180 -0
  32. package/dist/requestFilter-b5W2_1oP.d.mts +180 -0
  33. package/dist/requestFilterMatches.d.mts +13 -0
  34. package/dist/requestFilterMatches.d.ts +13 -0
  35. package/dist/requestFilterMatches.js +238 -0
  36. package/dist/requestFilterMatches.js.map +1 -0
  37. package/dist/requestFilterMatches.mjs +235 -0
  38. package/dist/requestFilterMatches.mjs.map +1 -0
  39. package/dist/retry.d.mts +10 -0
  40. package/dist/retry.d.ts +10 -0
  41. package/dist/retry.js +100 -0
  42. package/dist/retry.js.map +1 -0
  43. package/dist/retry.mjs +97 -0
  44. package/dist/retry.mjs.map +1 -0
  45. package/dist/schemas/index.d.mts +2611 -0
  46. package/dist/schemas/index.d.ts +2611 -0
  47. package/dist/schemas/index.js +1630 -0
  48. package/dist/schemas/index.js.map +1 -0
  49. package/dist/schemas/index.mjs +1463 -0
  50. package/dist/schemas/index.mjs.map +1 -0
  51. package/dist/{schemas-Zy7mGFgD.d.mts → schemas-WHkFakb3.d.mts} +4 -1
  52. package/dist/{schemas-Zy7mGFgD.d.ts → schemas-WHkFakb3.d.ts} +4 -1
  53. package/dist/taskLogger-CzADe4je.d.ts +33 -0
  54. package/dist/taskLogger-r_AFTX45.d.mts +33 -0
  55. package/dist/types.d.mts +11 -0
  56. package/dist/types.d.ts +11 -0
  57. package/dist/types.js +4 -0
  58. package/dist/types.js.map +1 -0
  59. package/dist/types.mjs +3 -0
  60. package/dist/types.mjs.map +1 -0
  61. package/dist/utils.d.mts +7 -0
  62. package/dist/utils.d.ts +7 -0
  63. package/dist/utils.js +33 -0
  64. package/dist/utils.js.map +1 -0
  65. package/dist/utils.mjs +30 -0
  66. package/dist/utils.mjs.map +1 -0
  67. package/dist/v3/dev/index.d.mts +2 -2
  68. package/dist/v3/dev/index.d.ts +2 -2
  69. package/dist/v3/errors.d.mts +39 -0
  70. package/dist/v3/errors.d.ts +39 -0
  71. package/dist/v3/errors.js +204 -0
  72. package/dist/v3/errors.js.map +1 -0
  73. package/dist/v3/errors.mjs +195 -0
  74. package/dist/v3/errors.mjs.map +1 -0
  75. package/dist/v3/index.d.mts +46 -211
  76. package/dist/v3/index.d.ts +46 -211
  77. package/dist/v3/index.js +3 -2
  78. package/dist/v3/index.js.map +1 -1
  79. package/dist/v3/index.mjs +3 -2
  80. package/dist/v3/index.mjs.map +1 -1
  81. package/dist/v3/logger-api.d.mts +24 -0
  82. package/dist/v3/logger-api.d.ts +24 -0
  83. package/dist/v3/logger-api.js +118 -0
  84. package/dist/v3/logger-api.js.map +1 -0
  85. package/dist/v3/logger-api.mjs +116 -0
  86. package/dist/v3/logger-api.mjs.map +1 -0
  87. package/dist/v3/otel/index.js +1 -1
  88. package/dist/v3/otel/index.js.map +1 -1
  89. package/dist/v3/otel/index.mjs +1 -1
  90. package/dist/v3/otel/index.mjs.map +1 -1
  91. package/dist/v3/prod/index.d.mts +3 -3
  92. package/dist/v3/prod/index.d.ts +3 -3
  93. package/dist/v3/schemas/index.d.mts +110 -110
  94. package/dist/v3/schemas/index.d.ts +110 -110
  95. package/dist/v3/schemas/index.js +2 -1
  96. package/dist/v3/schemas/index.js.map +1 -1
  97. package/dist/v3/schemas/index.mjs +2 -1
  98. package/dist/v3/schemas/index.mjs.map +1 -1
  99. package/dist/v3/semanticInternalAttributes.d.mts +56 -0
  100. package/dist/v3/semanticInternalAttributes.d.ts +56 -0
  101. package/dist/v3/semanticInternalAttributes.js +61 -0
  102. package/dist/v3/semanticInternalAttributes.js.map +1 -0
  103. package/dist/v3/semanticInternalAttributes.mjs +59 -0
  104. package/dist/v3/semanticInternalAttributes.mjs.map +1 -0
  105. package/dist/v3/utils/flattenAttributes.d.mts +8 -0
  106. package/dist/v3/utils/flattenAttributes.d.ts +8 -0
  107. package/dist/v3/utils/flattenAttributes.js +131 -0
  108. package/dist/v3/utils/flattenAttributes.js.map +1 -0
  109. package/dist/v3/utils/flattenAttributes.mjs +126 -0
  110. package/dist/v3/utils/flattenAttributes.mjs.map +1 -0
  111. package/dist/v3/utils/ioSerialization.d.mts +21 -0
  112. package/dist/v3/utils/ioSerialization.d.ts +21 -0
  113. package/dist/v3/utils/ioSerialization.js +2348 -0
  114. package/dist/v3/utils/ioSerialization.js.map +1 -0
  115. package/dist/v3/utils/ioSerialization.mjs +2339 -0
  116. package/dist/v3/utils/ioSerialization.mjs.map +1 -0
  117. package/dist/v3/utils/omit.d.mts +3 -0
  118. package/dist/v3/utils/omit.d.ts +3 -0
  119. package/dist/v3/utils/omit.js +20 -0
  120. package/dist/v3/utils/omit.js.map +1 -0
  121. package/dist/v3/utils/omit.mjs +18 -0
  122. package/dist/v3/utils/omit.mjs.map +1 -0
  123. package/dist/v3/utils/retries.d.mts +46 -0
  124. package/dist/v3/utils/retries.d.ts +46 -0
  125. package/dist/v3/utils/retries.js +118 -0
  126. package/dist/v3/utils/retries.js.map +1 -0
  127. package/dist/v3/utils/retries.mjs +113 -0
  128. package/dist/v3/utils/retries.mjs.map +1 -0
  129. package/dist/v3/workers/index.d.mts +7 -6
  130. package/dist/v3/workers/index.d.ts +7 -6
  131. package/dist/v3/workers/index.js +3 -2
  132. package/dist/v3/workers/index.js.map +1 -1
  133. package/dist/v3/workers/index.mjs +3 -2
  134. package/dist/v3/workers/index.mjs.map +1 -1
  135. package/dist/v3/zodIpc.js.map +1 -1
  136. package/dist/v3/zodIpc.mjs.map +1 -1
  137. package/dist/v3/zodMessageHandler.d.mts +16 -3
  138. package/dist/v3/zodMessageHandler.d.ts +16 -3
  139. package/dist/v3/zodMessageHandler.js +59 -13
  140. package/dist/v3/zodMessageHandler.js.map +1 -1
  141. package/dist/v3/zodMessageHandler.mjs +59 -13
  142. package/dist/v3/zodMessageHandler.mjs.map +1 -1
  143. package/dist/v3/zodNamespace.js.map +1 -1
  144. package/dist/v3/zodNamespace.mjs.map +1 -1
  145. package/dist/v3/zodfetch.d.mts +1 -1
  146. package/dist/v3/zodfetch.d.ts +1 -1
  147. package/dist/versions.d.mts +11 -0
  148. package/dist/versions.d.ts +11 -0
  149. package/dist/versions.js +31 -0
  150. package/dist/versions.js.map +1 -0
  151. package/dist/versions.mjs +27 -0
  152. package/dist/versions.mjs.map +1 -0
  153. package/package.json +137 -17
  154. package/dist/{messages-Sggr4tid.d.mts → messages-I-h-zZN9.d.mts} +32 -32
  155. package/dist/{messages-Sggr4tid.d.ts → messages-I-h-zZN9.d.ts} +32 -32
@@ -0,0 +1,16 @@
1
+ import { z } from 'zod';
2
+
3
+ declare const LiteralSchema: z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>;
4
+ type Literal = z.infer<typeof LiteralSchema>;
5
+ type DeserializedJson = Literal | {
6
+ [key: string]: DeserializedJson;
7
+ } | DeserializedJson[];
8
+ declare const DeserializedJsonSchema: z.ZodType<DeserializedJson>;
9
+ declare const SerializableSchema: z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodDate, z.ZodUndefined, z.ZodSymbol]>;
10
+ type Serializable = z.infer<typeof SerializableSchema>;
11
+ type SerializableJson = Serializable | {
12
+ [key: string]: SerializableJson;
13
+ } | SerializableJson[];
14
+ declare const SerializableJsonSchema: z.ZodType<SerializableJson>;
15
+
16
+ export { type DeserializedJson as D, type SerializableJson as S, DeserializedJsonSchema as a, SerializableJsonSchema as b };
@@ -0,0 +1,16 @@
1
+ import { z } from 'zod';
2
+
3
+ declare const LiteralSchema: z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>;
4
+ type Literal = z.infer<typeof LiteralSchema>;
5
+ type DeserializedJson = Literal | {
6
+ [key: string]: DeserializedJson;
7
+ } | DeserializedJson[];
8
+ declare const DeserializedJsonSchema: z.ZodType<DeserializedJson>;
9
+ declare const SerializableSchema: z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodDate, z.ZodUndefined, z.ZodSymbol]>;
10
+ type Serializable = z.infer<typeof SerializableSchema>;
11
+ type SerializableJson = Serializable | {
12
+ [key: string]: SerializableJson;
13
+ } | SerializableJson[];
14
+ declare const SerializableJsonSchema: z.ZodType<SerializableJson>;
15
+
16
+ export { type DeserializedJson as D, type SerializableJson as S, DeserializedJsonSchema as a, SerializableJsonSchema as b };
@@ -1,4 +1,4 @@
1
- import { a as TaskRunContext, T as TaskRunExecutionResult, B as BatchTaskRunExecutionResult } from './common-fIyU5pmz.mjs';
1
+ import { a as TaskRunContext, T as TaskRunExecutionResult, B as BatchTaskRunExecutionResult } from './common-CLW82lkt.mjs';
2
2
 
3
3
  interface RuntimeManager {
4
4
  disable(): void;
@@ -1,4 +1,4 @@
1
- import { a as TaskRunContext, T as TaskRunExecutionResult, B as BatchTaskRunExecutionResult } from './common-fIyU5pmz.js';
1
+ import { a as TaskRunContext, T as TaskRunExecutionResult, B as BatchTaskRunExecutionResult } from './common-CLW82lkt.js';
2
2
 
3
3
  interface RuntimeManager {
4
4
  disable(): void;
@@ -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 };