iterate 0.3.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (241) hide show
  1. package/README.md +164 -82
  2. package/dist/{next/api.d.ts → api.d.ts} +197 -33
  3. package/dist/{next/app-server.d.ts → app-server.d.ts} +7 -0
  4. package/dist/{next/app-server.mjs → app-server.mjs} +17 -15
  5. package/dist/app-server.mjs.map +1 -0
  6. package/dist/{next/app-session.mjs → app-session.mjs} +12 -15
  7. package/dist/app-session.mjs.map +1 -0
  8. package/dist/{next/app.mjs → app.mjs} +53 -14
  9. package/dist/app.mjs.map +1 -0
  10. package/dist/{next/client → client}/live-state.d.ts +11 -11
  11. package/dist/client/oauth.d.ts +17 -0
  12. package/dist/{next/client → client}/react.d.ts +10 -42
  13. package/dist/{next/client → client}/socket.d.ts +1 -0
  14. package/dist/client.mjs +156 -4
  15. package/dist/client.mjs.map +1 -0
  16. package/dist/{next/expression.d.ts → expression.d.ts} +11 -69
  17. package/dist/{next/expression.mjs → expression.mjs} +11 -109
  18. package/dist/expression.mjs.map +1 -0
  19. package/dist/lib-BWr-5mFO.mjs +36 -0
  20. package/dist/lib-BWr-5mFO.mjs.map +1 -0
  21. package/dist/{next/lib.d.ts → lib.d.ts} +16 -2
  22. package/dist/{next/lib.mjs → lib.mjs} +32 -3
  23. package/dist/lib.mjs.map +1 -0
  24. package/dist/node.d.ts +15 -3
  25. package/dist/node.mjs +36 -174
  26. package/dist/node.mjs.map +1 -1
  27. package/dist/{next/oauth-scopes.mjs → oauth-scopes.mjs} +1 -1
  28. package/dist/oauth-scopes.mjs.map +1 -0
  29. package/dist/{next/oauth.mjs → oauth.mjs} +14 -2
  30. package/dist/oauth.mjs.map +1 -0
  31. package/dist/principal.d.ts +8 -0
  32. package/dist/principal.mjs +8 -0
  33. package/dist/principal.mjs.map +1 -0
  34. package/dist/project-ingress.d.ts +58 -0
  35. package/dist/project-ingress.mjs +104 -0
  36. package/dist/project-ingress.mjs.map +1 -0
  37. package/dist/{next/react.mjs → react.mjs} +12 -12
  38. package/dist/react.mjs.map +1 -0
  39. package/dist/sdk/auth.d.ts +25 -0
  40. package/dist/sdk/index.d.ts +155 -0
  41. package/dist/sdk/record-pipelined-steps.d.ts +19 -0
  42. package/dist/sdk.mjs +245 -2
  43. package/dist/sdk.mjs.map +1 -0
  44. package/dist/{next/stream → stream}/processor.d.ts +28 -23
  45. package/dist/{next/stream → stream}/processor.mjs +48 -25
  46. package/dist/stream/processor.mjs.map +1 -0
  47. package/dist/{next/stream → stream}/run.d.ts +9 -6
  48. package/dist/{next/stream → stream}/run.mjs +13 -8
  49. package/dist/stream/run.mjs.map +1 -0
  50. package/dist/stream/test-support.d.ts +45 -0
  51. package/dist/stream/test-support.mjs +196 -0
  52. package/dist/stream/test-support.mjs.map +1 -0
  53. package/package.json +65 -219
  54. package/THIRD_PARTY_NOTICES.md +0 -55
  55. package/bin/iterate.js +0 -94
  56. package/dist/api-url-B6404M82.mjs +0 -17
  57. package/dist/api-url-B6404M82.mjs.map +0 -1
  58. package/dist/app-ref-BipL0feU.mjs +0 -35
  59. package/dist/app-ref-BipL0feU.mjs.map +0 -1
  60. package/dist/app-ref-C1CrgXqX.mjs +0 -7
  61. package/dist/app-ref-C1CrgXqX.mjs.map +0 -1
  62. package/dist/app-ref-DYai_om1.mjs +0 -7
  63. package/dist/app-ref-DYai_om1.mjs.map +0 -1
  64. package/dist/cli-D0c-pDL_.mjs +0 -1010
  65. package/dist/cli-D0c-pDL_.mjs.map +0 -1
  66. package/dist/client.d.ts +0 -3
  67. package/dist/cloudflare-BTm90gQ4.mjs +0 -951
  68. package/dist/cloudflare-BTm90gQ4.mjs.map +0 -1
  69. package/dist/contract-s4FW4eES.mjs +0 -309
  70. package/dist/contract-s4FW4eES.mjs.map +0 -1
  71. package/dist/document-review/index.d.ts +0 -5
  72. package/dist/document-review/types.d.ts +0 -107
  73. package/dist/document-review.mjs +0 -7015
  74. package/dist/document-review.mjs.map +0 -1
  75. package/dist/durable-object-processor-durability-CNsTjAJS.mjs +0 -205
  76. package/dist/durable-object-processor-durability-CNsTjAJS.mjs.map +0 -1
  77. package/dist/idempotency-DleloJNt.mjs +0 -28
  78. package/dist/idempotency-DleloJNt.mjs.map +0 -1
  79. package/dist/index.d.mts +0 -5
  80. package/dist/index.mjs +0 -8
  81. package/dist/index.mjs.map +0 -1
  82. package/dist/itx/api-url.d.ts +0 -6
  83. package/dist/itx/itx-node-client.d.ts +0 -65
  84. package/dist/itx/itx-session.d.ts +0 -215
  85. package/dist/itx/owned-rpc-session.d.ts +0 -14
  86. package/dist/itx/query-client.d.ts +0 -10
  87. package/dist/itx-api.generated.d.ts +0 -6195
  88. package/dist/itx-session-sjud8GiT.mjs +0 -534
  89. package/dist/itx-session-sjud8GiT.mjs.map +0 -1
  90. package/dist/live-state-BJNqOwFw.mjs +0 -299
  91. package/dist/live-state-BJNqOwFw.mjs.map +0 -1
  92. package/dist/next/app-server.mjs.map +0 -1
  93. package/dist/next/app-session.mjs.map +0 -1
  94. package/dist/next/app.mjs.map +0 -1
  95. package/dist/next/client/oauth.d.ts +0 -12
  96. package/dist/next/client.mjs +0 -156
  97. package/dist/next/client.mjs.map +0 -1
  98. package/dist/next/expression.mjs.map +0 -1
  99. package/dist/next/lib.mjs.map +0 -1
  100. package/dist/next/oauth-scopes.mjs.map +0 -1
  101. package/dist/next/oauth.mjs.map +0 -1
  102. package/dist/next/principal.d.ts +0 -64
  103. package/dist/next/principal.mjs +0 -98
  104. package/dist/next/principal.mjs.map +0 -1
  105. package/dist/next/project-ingress.d.ts +0 -37
  106. package/dist/next/project-ingress.mjs +0 -75
  107. package/dist/next/project-ingress.mjs.map +0 -1
  108. package/dist/next/react.mjs.map +0 -1
  109. package/dist/next/sdk/auth.d.ts +0 -5
  110. package/dist/next/sdk/index.d.ts +0 -112
  111. package/dist/next/sdk.mjs +0 -139
  112. package/dist/next/sdk.mjs.map +0 -1
  113. package/dist/next/stream/processor.mjs.map +0 -1
  114. package/dist/next/stream/run.mjs.map +0 -1
  115. package/dist/next-node.d.ts +0 -15
  116. package/dist/next-node.mjs +0 -51
  117. package/dist/next-node.mjs.map +0 -1
  118. package/dist/processor-host-capabilities-BMFH3KTM.mjs +0 -56
  119. package/dist/processor-host-capabilities-BMFH3KTM.mjs.map +0 -1
  120. package/dist/processors/cloudflare.d.ts +0 -3
  121. package/dist/processors/durable-object-processor-durability.d.ts +0 -79
  122. package/dist/processors/event-consumption-metrics.d.ts +0 -82
  123. package/dist/processors/idempotency.d.ts +0 -13
  124. package/dist/processors/index.d.ts +0 -12
  125. package/dist/processors/processor-contracts.d.ts +0 -342
  126. package/dist/processors/processor-facet.d.ts +0 -186
  127. package/dist/processors/processor-host-capabilities.d.ts +0 -60
  128. package/dist/processors/prompt-sections.d.ts +0 -17
  129. package/dist/processors/rpc-types.d.ts +0 -515
  130. package/dist/processors/schemas.d.ts +0 -102
  131. package/dist/processors/stream-handle.d.ts +0 -45
  132. package/dist/processors/stream-processor-keepalive.d.ts +0 -95
  133. package/dist/processors/stream-processor-registry.d.ts +0 -233
  134. package/dist/processors/stream-processor-runner.d.ts +0 -289
  135. package/dist/processors/stream-processor.d.ts +0 -339
  136. package/dist/processors/stream-runtime-metrics.d.ts +0 -107
  137. package/dist/processors/testing.d.ts +0 -302
  138. package/dist/processors-BoNyeBfQ.mjs +0 -10
  139. package/dist/processors-BoNyeBfQ.mjs.map +0 -1
  140. package/dist/processors-cloudflare.mjs +0 -3
  141. package/dist/processors-testing.mjs +0 -435
  142. package/dist/processors-testing.mjs.map +0 -1
  143. package/dist/processors.mjs +0 -52
  144. package/dist/processors.mjs.map +0 -1
  145. package/dist/protocol-DnK_f2m6.mjs +0 -251
  146. package/dist/protocol-DnK_f2m6.mjs.map +0 -1
  147. package/dist/sdk/capnweb/index.d.ts +0 -2
  148. package/dist/sdk/capnweb/live-state/compact.d.ts +0 -5
  149. package/dist/sdk/capnweb/live-state/diff.d.ts +0 -41
  150. package/dist/sdk/capnweb/live-state/engine.d.ts +0 -44
  151. package/dist/sdk/capnweb/live-state/index.d.ts +0 -41
  152. package/dist/sdk/capnweb/live-state/protocol.d.ts +0 -87
  153. package/dist/sdk/capnweb/live-state/retain.d.ts +0 -23
  154. package/dist/sdk/capnweb/live-state/store.d.ts +0 -20
  155. package/dist/sdk/capnweb/live-state/types.d.ts +0 -11
  156. package/dist/sdk/capnweb/react.d.ts +0 -45
  157. package/dist/sdk/capnweb/react.mjs +0 -316
  158. package/dist/sdk/capnweb/react.mjs.map +0 -1
  159. package/dist/sdk/capnweb.mjs +0 -4
  160. package/dist/sdk/itx/react.d.ts +0 -191
  161. package/dist/sdk/itx/react.mjs +0 -383
  162. package/dist/sdk/itx/react.mjs.map +0 -1
  163. package/dist/sdk-DMB-IM11.mjs +0 -933
  164. package/dist/sdk-DMB-IM11.mjs.map +0 -1
  165. package/dist/sdk.d.ts +0 -339
  166. package/dist/serve-itx.d.ts +0 -46
  167. package/dist/starter-apps/flake-dashboard/app-ref.d.ts +0 -31
  168. package/dist/starter-apps/flake-dashboard/configured-worker.mjs +0 -1055
  169. package/dist/starter-apps/flake-dashboard/configured-worker.mjs.map +0 -1
  170. package/dist/starter-apps/flake-dashboard/contract.d.ts +0 -4839
  171. package/dist/starter-apps/flake-dashboard/contract.mjs +0 -2
  172. package/dist/starter-apps/flake-dashboard/index.d.ts +0 -17
  173. package/dist/starter-apps/flake-dashboard/index.mjs +0 -56
  174. package/dist/starter-apps/flake-dashboard/index.mjs.map +0 -1
  175. package/dist/starter-apps/flake-dashboard/worker.d.ts +0 -4607
  176. package/dist/starter-apps/github-ai-linter/ai-linter.d.ts +0 -8914
  177. package/dist/starter-apps/github-ai-linter/configured-worker.mjs +0 -17987
  178. package/dist/starter-apps/github-ai-linter/configured-worker.mjs.map +0 -1
  179. package/dist/starter-apps/github-ai-linter/contract.d.ts +0 -9193
  180. package/dist/starter-apps/github-ai-linter/index.d.ts +0 -10
  181. package/dist/starter-apps/github-ai-linter/index.mjs +0 -36
  182. package/dist/starter-apps/github-ai-linter/index.mjs.map +0 -1
  183. package/dist/starter-apps/github-ai-linter/prompt.d.ts +0 -13
  184. package/dist/starter-apps/github-ai-linter/review-bot.d.ts +0 -808
  185. package/dist/starter-apps/github-ai-linter/rules.d.ts +0 -34
  186. package/dist/starter-apps/github-ai-linter/worker-ref.d.ts +0 -19
  187. package/dist/starter-apps/github-ai-linter/worker.d.ts +0 -19
  188. package/dist/starter-apps/github-ai-linter/worker.mjs +0 -947
  189. package/dist/starter-apps/github-ai-linter/worker.mjs.map +0 -1
  190. package/dist/starter-apps/guestbook/app-ref.d.ts +0 -27
  191. package/dist/starter-apps/guestbook/client.d.ts +0 -7
  192. package/dist/starter-apps/guestbook/client.mjs +0 -59
  193. package/dist/starter-apps/guestbook/configured-worker.mjs +0 -205
  194. package/dist/starter-apps/guestbook/configured-worker.mjs.map +0 -1
  195. package/dist/starter-apps/guestbook/index.d.ts +0 -9
  196. package/dist/starter-apps/guestbook/index.mjs +0 -31
  197. package/dist/starter-apps/guestbook/index.mjs.map +0 -1
  198. package/dist/starter-apps/guestbook/processor.d.ts +0 -2267
  199. package/dist/starter-apps/guestbook/worker.d.ts +0 -26
  200. package/dist/starter-apps/guestbook/worker.mjs +0 -191
  201. package/dist/starter-apps/guestbook/worker.mjs.map +0 -1
  202. package/dist/starter-apps/media/configured-worker.mjs +0 -577
  203. package/dist/starter-apps/media/configured-worker.mjs.map +0 -1
  204. package/dist/starter-apps/media/index.mjs +0 -36
  205. package/dist/starter-apps/media/index.mjs.map +0 -1
  206. package/dist/starter-apps/media/ref.mjs +0 -20
  207. package/dist/starter-apps/media/ref.mjs.map +0 -1
  208. package/dist/starter-apps/media/worker.mjs +0 -579
  209. package/dist/starter-apps/media/worker.mjs.map +0 -1
  210. package/dist/starter-apps/notes/configured-worker.mjs +0 -6134
  211. package/dist/starter-apps/notes/configured-worker.mjs.map +0 -1
  212. package/dist/starter-apps/notes/index.mjs +0 -23
  213. package/dist/starter-apps/notes/index.mjs.map +0 -1
  214. package/dist/starter-apps/notes/ref.mjs +0 -21
  215. package/dist/starter-apps/notes/ref.mjs.map +0 -1
  216. package/dist/starter-apps/notes/worker.mjs +0 -427
  217. package/dist/starter-apps/notes/worker.mjs.map +0 -1
  218. package/dist/starter-apps/todo/client.mjs +0 -59
  219. package/dist/starter-apps/todo/configured-worker.mjs +0 -2864
  220. package/dist/starter-apps/todo/configured-worker.mjs.map +0 -1
  221. package/dist/starter-apps/todo/index.d.ts +0 -8
  222. package/dist/starter-apps/todo/index.mjs +0 -29
  223. package/dist/starter-apps/todo/index.mjs.map +0 -1
  224. package/dist/stream-processor-keepalive-DAQTP6m3.mjs +0 -2082
  225. package/dist/stream-processor-keepalive-DAQTP6m3.mjs.map +0 -1
  226. package/dist/usingCtx-mZx5nsAW.mjs +0 -11800
  227. package/dist/usingCtx-mZx5nsAW.mjs.map +0 -1
  228. package/dist/worker-ref-DZxPDmb_.mjs +0 -390
  229. package/dist/worker-ref-DZxPDmb_.mjs.map +0 -1
  230. package/dist/worker.d.mts +0 -33
  231. package/dist/worker.mjs +0 -18
  232. package/dist/worker.mjs.map +0 -1
  233. package/menubar/Iterate.entitlements +0 -12
  234. package/menubar/Iterate.swift +0 -914
  235. package/menubar/IterateIcon.swift +0 -145
  236. package/menubar/README.md +0 -28
  237. package/menubar/build-menubar-app.sh +0 -59
  238. /package/dist/{next/api.mjs → api.mjs} +0 -0
  239. /package/dist/{next/app-session.d.ts → app-session.d.ts} +0 -0
  240. /package/dist/{next/app.d.ts → app.d.ts} +0 -0
  241. /package/dist/{next/oauth-scopes.d.ts → oauth-scopes.d.ts} +0 -0
@@ -1,2267 +0,0 @@
1
- import { z } from "zod";
2
- import { StreamProcessor } from "../../processors/index.ts";
3
- import type { ProcessorState, ReduceArgs } from "../../processors/index.ts";
4
- export declare const GuestbookProcessorContract: {
5
- slug: string;
6
- version: string;
7
- description: string;
8
- stateSchema: z.ZodObject<{
9
- birthCertificate: z.ZodDefault<z.ZodNullable<z.ZodObject<{
10
- config: z.ZodObject<{
11
- title: z.ZodString;
12
- }, z.core.$strip>;
13
- }, z.core.$strip>>>;
14
- entries: z.ZodDefault<z.ZodArray<z.ZodObject<{
15
- name: z.ZodString;
16
- message: z.ZodString;
17
- signedAt: z.ZodString;
18
- }, z.core.$strip>>>;
19
- }, z.core.$strip>;
20
- processorDeps?: readonly [] | undefined;
21
- events: {
22
- readonly "events.iterate.com/guestbook/created": {
23
- readonly description: string;
24
- readonly payloadSchema: z.ZodObject<{
25
- config: z.ZodObject<{
26
- title: z.ZodString;
27
- }, z.core.$strip>;
28
- }, z.core.$strip>;
29
- readonly examples: readonly [{
30
- readonly description: "A guestbook born with its display title.";
31
- readonly payload: {
32
- readonly config: {
33
- readonly title: "Guestbook";
34
- };
35
- };
36
- }];
37
- };
38
- readonly "events.iterate.com/guestbook/entry-signed": {
39
- readonly description: "Someone signed the guestbook: their name and message.";
40
- readonly payloadSchema: z.ZodObject<{
41
- name: z.ZodString;
42
- message: z.ZodString;
43
- }, z.core.$strip>;
44
- readonly examples: readonly [{
45
- readonly description: "A visitor left a note.";
46
- readonly payload: {
47
- readonly name: "Ada";
48
- readonly message: "Lovely worker you have here.";
49
- };
50
- }];
51
- };
52
- };
53
- consumes: readonly ["events.iterate.com/guestbook/created", "events.iterate.com/guestbook/entry-signed"];
54
- emits: readonly [];
55
- buildEvent: <const Event extends ((Omit<{
56
- type: string;
57
- payload?: Record<string, unknown> | undefined;
58
- metadata?: Record<string, unknown> | undefined;
59
- source?: {
60
- processor?: {
61
- slug: string;
62
- version: string;
63
- stream: {
64
- path: string;
65
- projectId: string | null;
66
- streamId: string;
67
- };
68
- whileProcessing?: {
69
- offset: number;
70
- type: string;
71
- } | undefined;
72
- } | undefined;
73
- copiedFrom?: {
74
- name: string;
75
- streamId: string;
76
- streamCreatedAt: string;
77
- cursorChangedAtSourceOffset: number;
78
- createdAt: string;
79
- offset: number;
80
- path: string;
81
- projectId: string | null;
82
- type: string;
83
- }[] | undefined;
84
- } | undefined;
85
- idempotencyKey?: string | undefined;
86
- ephemeral?: true | undefined;
87
- }, "payload" | "type"> & {
88
- type: "events.iterate.com/guestbook/created";
89
- payload: {
90
- config: {
91
- title: string;
92
- };
93
- };
94
- }) | (Omit<{
95
- type: string;
96
- payload?: Record<string, unknown> | undefined;
97
- metadata?: Record<string, unknown> | undefined;
98
- source?: {
99
- processor?: {
100
- slug: string;
101
- version: string;
102
- stream: {
103
- path: string;
104
- projectId: string | null;
105
- streamId: string;
106
- };
107
- whileProcessing?: {
108
- offset: number;
109
- type: string;
110
- } | undefined;
111
- } | undefined;
112
- copiedFrom?: {
113
- name: string;
114
- streamId: string;
115
- streamCreatedAt: string;
116
- cursorChangedAtSourceOffset: number;
117
- createdAt: string;
118
- offset: number;
119
- path: string;
120
- projectId: string | null;
121
- type: string;
122
- }[] | undefined;
123
- } | undefined;
124
- idempotencyKey?: string | undefined;
125
- ephemeral?: true | undefined;
126
- }, "payload" | "type"> & {
127
- type: "events.iterate.com/guestbook/entry-signed";
128
- payload: {
129
- name: string;
130
- message: string;
131
- };
132
- })) & {
133
- type: string;
134
- }>(event: Event) => Event extends unknown ? Omit<Event, "payload"> & Pick<Event["type"] extends infer T ? T extends Event["type"] ? T extends unknown ? (T extends "events.iterate.com/guestbook/created" | "events.iterate.com/guestbook/entry-signed" ? {
135
- readonly "events.iterate.com/guestbook/created": {
136
- readonly description: string;
137
- readonly payloadSchema: z.ZodObject<{
138
- config: z.ZodObject<{
139
- title: z.ZodString;
140
- }, z.core.$strip>;
141
- }, z.core.$strip>;
142
- readonly examples: readonly [{
143
- readonly description: "A guestbook born with its display title.";
144
- readonly payload: {
145
- readonly config: {
146
- readonly title: "Guestbook";
147
- };
148
- };
149
- }];
150
- };
151
- readonly "events.iterate.com/guestbook/entry-signed": {
152
- readonly description: "Someone signed the guestbook: their name and message.";
153
- readonly payloadSchema: z.ZodObject<{
154
- name: z.ZodString;
155
- message: z.ZodString;
156
- }, z.core.$strip>;
157
- readonly examples: readonly [{
158
- readonly description: "A visitor left a note.";
159
- readonly payload: {
160
- readonly name: "Ada";
161
- readonly message: "Lovely worker you have here.";
162
- };
163
- }];
164
- };
165
- }[T] : never) extends import("../../processors/processor-contracts.ts").EventDefinition<infer PayloadOutput, unknown> ? Omit<{
166
- type: string;
167
- payload?: Record<string, unknown> | undefined;
168
- metadata?: Record<string, unknown> | undefined;
169
- source?: {
170
- processor?: {
171
- slug: string;
172
- version: string;
173
- stream: {
174
- path: string;
175
- projectId: string | null;
176
- streamId: string;
177
- };
178
- whileProcessing?: {
179
- offset: number;
180
- type: string;
181
- } | undefined;
182
- } | undefined;
183
- copiedFrom?: {
184
- name: string;
185
- streamId: string;
186
- streamCreatedAt: string;
187
- cursorChangedAtSourceOffset: number;
188
- createdAt: string;
189
- offset: number;
190
- path: string;
191
- projectId: string | null;
192
- type: string;
193
- }[] | undefined;
194
- } | undefined;
195
- idempotencyKey?: string | undefined;
196
- ephemeral?: true | undefined;
197
- }, "payload" | "type"> & {
198
- type: T;
199
- payload: PayloadOutput;
200
- } & {
201
- payload: PayloadOutput;
202
- } & (import("../../processors/processor-contracts.ts").EventDefinition<PayloadOutput, unknown> & (T extends "events.iterate.com/guestbook/created" | "events.iterate.com/guestbook/entry-signed" ? {
203
- readonly "events.iterate.com/guestbook/created": {
204
- readonly description: string;
205
- readonly payloadSchema: z.ZodObject<{
206
- config: z.ZodObject<{
207
- title: z.ZodString;
208
- }, z.core.$strip>;
209
- }, z.core.$strip>;
210
- readonly examples: readonly [{
211
- readonly description: "A guestbook born with its display title.";
212
- readonly payload: {
213
- readonly config: {
214
- readonly title: "Guestbook";
215
- };
216
- };
217
- }];
218
- };
219
- readonly "events.iterate.com/guestbook/entry-signed": {
220
- readonly description: "Someone signed the guestbook: their name and message.";
221
- readonly payloadSchema: z.ZodObject<{
222
- name: z.ZodString;
223
- message: z.ZodString;
224
- }, z.core.$strip>;
225
- readonly examples: readonly [{
226
- readonly description: "A visitor left a note.";
227
- readonly payload: {
228
- readonly name: "Ada";
229
- readonly message: "Lovely worker you have here.";
230
- };
231
- }];
232
- };
233
- }[T] : never) extends infer T_1 ? T_1 extends import("../../processors/processor-contracts.ts").EventDefinition<PayloadOutput, unknown> & (T extends "events.iterate.com/guestbook/created" | "events.iterate.com/guestbook/entry-signed" ? {
234
- readonly "events.iterate.com/guestbook/created": {
235
- readonly description: string;
236
- readonly payloadSchema: z.ZodObject<{
237
- config: z.ZodObject<{
238
- title: z.ZodString;
239
- }, z.core.$strip>;
240
- }, z.core.$strip>;
241
- readonly examples: readonly [{
242
- readonly description: "A guestbook born with its display title.";
243
- readonly payload: {
244
- readonly config: {
245
- readonly title: "Guestbook";
246
- };
247
- };
248
- }];
249
- };
250
- readonly "events.iterate.com/guestbook/entry-signed": {
251
- readonly description: "Someone signed the guestbook: their name and message.";
252
- readonly payloadSchema: z.ZodObject<{
253
- name: z.ZodString;
254
- message: z.ZodString;
255
- }, z.core.$strip>;
256
- readonly examples: readonly [{
257
- readonly description: "A visitor left a note.";
258
- readonly payload: {
259
- readonly name: "Ada";
260
- readonly message: "Lovely worker you have here.";
261
- };
262
- }];
263
- };
264
- }[T] : never) ? T_1 extends {
265
- ephemeral: true;
266
- } ? {
267
- ephemeral: true;
268
- } : unknown : never : never) : never : never : never : never, "payload"> & ((Event["type"] extends infer T_2 ? T_2 extends Event["type"] ? T_2 extends "events.iterate.com/guestbook/created" | "events.iterate.com/guestbook/entry-signed" ? {
269
- readonly "events.iterate.com/guestbook/created": {
270
- readonly description: string;
271
- readonly payloadSchema: z.ZodObject<{
272
- config: z.ZodObject<{
273
- title: z.ZodString;
274
- }, z.core.$strip>;
275
- }, z.core.$strip>;
276
- readonly examples: readonly [{
277
- readonly description: "A guestbook born with its display title.";
278
- readonly payload: {
279
- readonly config: {
280
- readonly title: "Guestbook";
281
- };
282
- };
283
- }];
284
- };
285
- readonly "events.iterate.com/guestbook/entry-signed": {
286
- readonly description: "Someone signed the guestbook: their name and message.";
287
- readonly payloadSchema: z.ZodObject<{
288
- name: z.ZodString;
289
- message: z.ZodString;
290
- }, z.core.$strip>;
291
- readonly examples: readonly [{
292
- readonly description: "A visitor left a note.";
293
- readonly payload: {
294
- readonly name: "Ada";
295
- readonly message: "Lovely worker you have here.";
296
- };
297
- }];
298
- };
299
- }[T_2] : never : never : never) extends infer T_3 ? T_3 extends (Event["type"] extends infer T_4 ? T_4 extends Event["type"] ? T_4 extends "events.iterate.com/guestbook/created" | "events.iterate.com/guestbook/entry-signed" ? {
300
- readonly "events.iterate.com/guestbook/created": {
301
- readonly description: string;
302
- readonly payloadSchema: z.ZodObject<{
303
- config: z.ZodObject<{
304
- title: z.ZodString;
305
- }, z.core.$strip>;
306
- }, z.core.$strip>;
307
- readonly examples: readonly [{
308
- readonly description: "A guestbook born with its display title.";
309
- readonly payload: {
310
- readonly config: {
311
- readonly title: "Guestbook";
312
- };
313
- };
314
- }];
315
- };
316
- readonly "events.iterate.com/guestbook/entry-signed": {
317
- readonly description: "Someone signed the guestbook: their name and message.";
318
- readonly payloadSchema: z.ZodObject<{
319
- name: z.ZodString;
320
- message: z.ZodString;
321
- }, z.core.$strip>;
322
- readonly examples: readonly [{
323
- readonly description: "A visitor left a note.";
324
- readonly payload: {
325
- readonly name: "Ada";
326
- readonly message: "Lovely worker you have here.";
327
- };
328
- }];
329
- };
330
- }[T_4] : never : never : never) ? T_3 extends {
331
- ephemeral: true;
332
- } ? {
333
- ephemeral: true;
334
- } : unknown : never : never) : never;
335
- parseEvent: <const Event extends import("../../processors/schemas.ts").StreamEvent>(event: Event) => (Extract<"events.iterate.com/guestbook/created", Event["type"]> extends infer T ? T extends Extract<"events.iterate.com/guestbook/created", Event["type"]> ? T extends unknown ? (T extends "events.iterate.com/guestbook/created" | "events.iterate.com/guestbook/entry-signed" ? {
336
- readonly "events.iterate.com/guestbook/created": {
337
- readonly description: string;
338
- readonly payloadSchema: z.ZodObject<{
339
- config: z.ZodObject<{
340
- title: z.ZodString;
341
- }, z.core.$strip>;
342
- }, z.core.$strip>;
343
- readonly examples: readonly [{
344
- readonly description: "A guestbook born with its display title.";
345
- readonly payload: {
346
- readonly config: {
347
- readonly title: "Guestbook";
348
- };
349
- };
350
- }];
351
- };
352
- readonly "events.iterate.com/guestbook/entry-signed": {
353
- readonly description: "Someone signed the guestbook: their name and message.";
354
- readonly payloadSchema: z.ZodObject<{
355
- name: z.ZodString;
356
- message: z.ZodString;
357
- }, z.core.$strip>;
358
- readonly examples: readonly [{
359
- readonly description: "A visitor left a note.";
360
- readonly payload: {
361
- readonly name: "Ada";
362
- readonly message: "Lovely worker you have here.";
363
- };
364
- }];
365
- };
366
- }[T] : never) extends import("../../processors/processor-contracts.ts").EventDefinition<infer PayloadOutput, unknown> ? Omit<{
367
- type: string;
368
- offset: number;
369
- createdAt: string;
370
- path: string;
371
- payload?: Record<string, unknown> | undefined;
372
- metadata?: Record<string, unknown> | undefined;
373
- source?: {
374
- processor?: {
375
- slug: string;
376
- version: string;
377
- stream: {
378
- path: string;
379
- projectId: string | null;
380
- streamId: string;
381
- };
382
- whileProcessing?: {
383
- offset: number;
384
- type: string;
385
- } | undefined;
386
- } | undefined;
387
- copiedFrom?: {
388
- name: string;
389
- streamId: string;
390
- streamCreatedAt: string;
391
- cursorChangedAtSourceOffset: number;
392
- createdAt: string;
393
- offset: number;
394
- path: string;
395
- projectId: string | null;
396
- type: string;
397
- }[] | undefined;
398
- } | undefined;
399
- idempotencyKey?: string | undefined;
400
- ephemeral?: true | undefined;
401
- }, "payload" | "type"> & Omit<{
402
- type: string;
403
- payload?: Record<string, unknown> | undefined;
404
- metadata?: Record<string, unknown> | undefined;
405
- source?: {
406
- processor?: {
407
- slug: string;
408
- version: string;
409
- stream: {
410
- path: string;
411
- projectId: string | null;
412
- streamId: string;
413
- };
414
- whileProcessing?: {
415
- offset: number;
416
- type: string;
417
- } | undefined;
418
- } | undefined;
419
- copiedFrom?: {
420
- name: string;
421
- streamId: string;
422
- streamCreatedAt: string;
423
- cursorChangedAtSourceOffset: number;
424
- createdAt: string;
425
- offset: number;
426
- path: string;
427
- projectId: string | null;
428
- type: string;
429
- }[] | undefined;
430
- } | undefined;
431
- idempotencyKey?: string | undefined;
432
- ephemeral?: true | undefined;
433
- }, "payload" | "type"> & {
434
- type: T;
435
- payload: PayloadOutput;
436
- } & {
437
- payload: PayloadOutput;
438
- } & (import("../../processors/processor-contracts.ts").EventDefinition<PayloadOutput, unknown> & (T extends "events.iterate.com/guestbook/created" | "events.iterate.com/guestbook/entry-signed" ? {
439
- readonly "events.iterate.com/guestbook/created": {
440
- readonly description: string;
441
- readonly payloadSchema: z.ZodObject<{
442
- config: z.ZodObject<{
443
- title: z.ZodString;
444
- }, z.core.$strip>;
445
- }, z.core.$strip>;
446
- readonly examples: readonly [{
447
- readonly description: "A guestbook born with its display title.";
448
- readonly payload: {
449
- readonly config: {
450
- readonly title: "Guestbook";
451
- };
452
- };
453
- }];
454
- };
455
- readonly "events.iterate.com/guestbook/entry-signed": {
456
- readonly description: "Someone signed the guestbook: their name and message.";
457
- readonly payloadSchema: z.ZodObject<{
458
- name: z.ZodString;
459
- message: z.ZodString;
460
- }, z.core.$strip>;
461
- readonly examples: readonly [{
462
- readonly description: "A visitor left a note.";
463
- readonly payload: {
464
- readonly name: "Ada";
465
- readonly message: "Lovely worker you have here.";
466
- };
467
- }];
468
- };
469
- }[T] : never) extends infer T_1 ? T_1 extends import("../../processors/processor-contracts.ts").EventDefinition<PayloadOutput, unknown> & (T extends "events.iterate.com/guestbook/created" | "events.iterate.com/guestbook/entry-signed" ? {
470
- readonly "events.iterate.com/guestbook/created": {
471
- readonly description: string;
472
- readonly payloadSchema: z.ZodObject<{
473
- config: z.ZodObject<{
474
- title: z.ZodString;
475
- }, z.core.$strip>;
476
- }, z.core.$strip>;
477
- readonly examples: readonly [{
478
- readonly description: "A guestbook born with its display title.";
479
- readonly payload: {
480
- readonly config: {
481
- readonly title: "Guestbook";
482
- };
483
- };
484
- }];
485
- };
486
- readonly "events.iterate.com/guestbook/entry-signed": {
487
- readonly description: "Someone signed the guestbook: their name and message.";
488
- readonly payloadSchema: z.ZodObject<{
489
- name: z.ZodString;
490
- message: z.ZodString;
491
- }, z.core.$strip>;
492
- readonly examples: readonly [{
493
- readonly description: "A visitor left a note.";
494
- readonly payload: {
495
- readonly name: "Ada";
496
- readonly message: "Lovely worker you have here.";
497
- };
498
- }];
499
- };
500
- }[T] : never) ? T_1 extends {
501
- ephemeral: true;
502
- } ? {
503
- ephemeral: true;
504
- } : unknown : never : never) : never : never : never : never) | (Extract<"events.iterate.com/guestbook/entry-signed", Event["type"]> extends infer T_2 ? T_2 extends Extract<"events.iterate.com/guestbook/entry-signed", Event["type"]> ? T_2 extends unknown ? (T_2 extends "events.iterate.com/guestbook/created" | "events.iterate.com/guestbook/entry-signed" ? {
505
- readonly "events.iterate.com/guestbook/created": {
506
- readonly description: string;
507
- readonly payloadSchema: z.ZodObject<{
508
- config: z.ZodObject<{
509
- title: z.ZodString;
510
- }, z.core.$strip>;
511
- }, z.core.$strip>;
512
- readonly examples: readonly [{
513
- readonly description: "A guestbook born with its display title.";
514
- readonly payload: {
515
- readonly config: {
516
- readonly title: "Guestbook";
517
- };
518
- };
519
- }];
520
- };
521
- readonly "events.iterate.com/guestbook/entry-signed": {
522
- readonly description: "Someone signed the guestbook: their name and message.";
523
- readonly payloadSchema: z.ZodObject<{
524
- name: z.ZodString;
525
- message: z.ZodString;
526
- }, z.core.$strip>;
527
- readonly examples: readonly [{
528
- readonly description: "A visitor left a note.";
529
- readonly payload: {
530
- readonly name: "Ada";
531
- readonly message: "Lovely worker you have here.";
532
- };
533
- }];
534
- };
535
- }[T_2] : never) extends import("../../processors/processor-contracts.ts").EventDefinition<infer PayloadOutput, unknown> ? Omit<{
536
- type: string;
537
- offset: number;
538
- createdAt: string;
539
- path: string;
540
- payload?: Record<string, unknown> | undefined;
541
- metadata?: Record<string, unknown> | undefined;
542
- source?: {
543
- processor?: {
544
- slug: string;
545
- version: string;
546
- stream: {
547
- path: string;
548
- projectId: string | null;
549
- streamId: string;
550
- };
551
- whileProcessing?: {
552
- offset: number;
553
- type: string;
554
- } | undefined;
555
- } | undefined;
556
- copiedFrom?: {
557
- name: string;
558
- streamId: string;
559
- streamCreatedAt: string;
560
- cursorChangedAtSourceOffset: number;
561
- createdAt: string;
562
- offset: number;
563
- path: string;
564
- projectId: string | null;
565
- type: string;
566
- }[] | undefined;
567
- } | undefined;
568
- idempotencyKey?: string | undefined;
569
- ephemeral?: true | undefined;
570
- }, "payload" | "type"> & Omit<{
571
- type: string;
572
- payload?: Record<string, unknown> | undefined;
573
- metadata?: Record<string, unknown> | undefined;
574
- source?: {
575
- processor?: {
576
- slug: string;
577
- version: string;
578
- stream: {
579
- path: string;
580
- projectId: string | null;
581
- streamId: string;
582
- };
583
- whileProcessing?: {
584
- offset: number;
585
- type: string;
586
- } | undefined;
587
- } | undefined;
588
- copiedFrom?: {
589
- name: string;
590
- streamId: string;
591
- streamCreatedAt: string;
592
- cursorChangedAtSourceOffset: number;
593
- createdAt: string;
594
- offset: number;
595
- path: string;
596
- projectId: string | null;
597
- type: string;
598
- }[] | undefined;
599
- } | undefined;
600
- idempotencyKey?: string | undefined;
601
- ephemeral?: true | undefined;
602
- }, "payload" | "type"> & {
603
- type: T_2;
604
- payload: PayloadOutput;
605
- } & {
606
- payload: PayloadOutput;
607
- } & (import("../../processors/processor-contracts.ts").EventDefinition<PayloadOutput, unknown> & (T_2 extends "events.iterate.com/guestbook/created" | "events.iterate.com/guestbook/entry-signed" ? {
608
- readonly "events.iterate.com/guestbook/created": {
609
- readonly description: string;
610
- readonly payloadSchema: z.ZodObject<{
611
- config: z.ZodObject<{
612
- title: z.ZodString;
613
- }, z.core.$strip>;
614
- }, z.core.$strip>;
615
- readonly examples: readonly [{
616
- readonly description: "A guestbook born with its display title.";
617
- readonly payload: {
618
- readonly config: {
619
- readonly title: "Guestbook";
620
- };
621
- };
622
- }];
623
- };
624
- readonly "events.iterate.com/guestbook/entry-signed": {
625
- readonly description: "Someone signed the guestbook: their name and message.";
626
- readonly payloadSchema: z.ZodObject<{
627
- name: z.ZodString;
628
- message: z.ZodString;
629
- }, z.core.$strip>;
630
- readonly examples: readonly [{
631
- readonly description: "A visitor left a note.";
632
- readonly payload: {
633
- readonly name: "Ada";
634
- readonly message: "Lovely worker you have here.";
635
- };
636
- }];
637
- };
638
- }[T_2] : never) extends infer T_3 ? T_3 extends import("../../processors/processor-contracts.ts").EventDefinition<PayloadOutput, unknown> & (T_2 extends "events.iterate.com/guestbook/created" | "events.iterate.com/guestbook/entry-signed" ? {
639
- readonly "events.iterate.com/guestbook/created": {
640
- readonly description: string;
641
- readonly payloadSchema: z.ZodObject<{
642
- config: z.ZodObject<{
643
- title: z.ZodString;
644
- }, z.core.$strip>;
645
- }, z.core.$strip>;
646
- readonly examples: readonly [{
647
- readonly description: "A guestbook born with its display title.";
648
- readonly payload: {
649
- readonly config: {
650
- readonly title: "Guestbook";
651
- };
652
- };
653
- }];
654
- };
655
- readonly "events.iterate.com/guestbook/entry-signed": {
656
- readonly description: "Someone signed the guestbook: their name and message.";
657
- readonly payloadSchema: z.ZodObject<{
658
- name: z.ZodString;
659
- message: z.ZodString;
660
- }, z.core.$strip>;
661
- readonly examples: readonly [{
662
- readonly description: "A visitor left a note.";
663
- readonly payload: {
664
- readonly name: "Ada";
665
- readonly message: "Lovely worker you have here.";
666
- };
667
- }];
668
- };
669
- }[T_2] : never) ? T_3 extends {
670
- ephemeral: true;
671
- } ? {
672
- ephemeral: true;
673
- } : unknown : never : never) : never : never : never : never);
674
- parseEventInput: <const Event extends import("../../processors/schemas.ts").StreamEventInput>(event: Event) => (Extract<"events.iterate.com/guestbook/created", Event["type"]> extends infer T ? T extends Extract<"events.iterate.com/guestbook/created", Event["type"]> ? T extends unknown ? (T extends "events.iterate.com/guestbook/created" | "events.iterate.com/guestbook/entry-signed" ? {
675
- readonly "events.iterate.com/guestbook/created": {
676
- readonly description: string;
677
- readonly payloadSchema: z.ZodObject<{
678
- config: z.ZodObject<{
679
- title: z.ZodString;
680
- }, z.core.$strip>;
681
- }, z.core.$strip>;
682
- readonly examples: readonly [{
683
- readonly description: "A guestbook born with its display title.";
684
- readonly payload: {
685
- readonly config: {
686
- readonly title: "Guestbook";
687
- };
688
- };
689
- }];
690
- };
691
- readonly "events.iterate.com/guestbook/entry-signed": {
692
- readonly description: "Someone signed the guestbook: their name and message.";
693
- readonly payloadSchema: z.ZodObject<{
694
- name: z.ZodString;
695
- message: z.ZodString;
696
- }, z.core.$strip>;
697
- readonly examples: readonly [{
698
- readonly description: "A visitor left a note.";
699
- readonly payload: {
700
- readonly name: "Ada";
701
- readonly message: "Lovely worker you have here.";
702
- };
703
- }];
704
- };
705
- }[T] : never) extends import("../../processors/processor-contracts.ts").EventDefinition<infer PayloadOutput, unknown> ? Omit<{
706
- type: string;
707
- payload?: Record<string, unknown> | undefined;
708
- metadata?: Record<string, unknown> | undefined;
709
- source?: {
710
- processor?: {
711
- slug: string;
712
- version: string;
713
- stream: {
714
- path: string;
715
- projectId: string | null;
716
- streamId: string;
717
- };
718
- whileProcessing?: {
719
- offset: number;
720
- type: string;
721
- } | undefined;
722
- } | undefined;
723
- copiedFrom?: {
724
- name: string;
725
- streamId: string;
726
- streamCreatedAt: string;
727
- cursorChangedAtSourceOffset: number;
728
- createdAt: string;
729
- offset: number;
730
- path: string;
731
- projectId: string | null;
732
- type: string;
733
- }[] | undefined;
734
- } | undefined;
735
- idempotencyKey?: string | undefined;
736
- ephemeral?: true | undefined;
737
- }, "payload" | "type"> & {
738
- type: T;
739
- payload: PayloadOutput;
740
- } & {
741
- payload: PayloadOutput;
742
- } & (import("../../processors/processor-contracts.ts").EventDefinition<PayloadOutput, unknown> & (T extends "events.iterate.com/guestbook/created" | "events.iterate.com/guestbook/entry-signed" ? {
743
- readonly "events.iterate.com/guestbook/created": {
744
- readonly description: string;
745
- readonly payloadSchema: z.ZodObject<{
746
- config: z.ZodObject<{
747
- title: z.ZodString;
748
- }, z.core.$strip>;
749
- }, z.core.$strip>;
750
- readonly examples: readonly [{
751
- readonly description: "A guestbook born with its display title.";
752
- readonly payload: {
753
- readonly config: {
754
- readonly title: "Guestbook";
755
- };
756
- };
757
- }];
758
- };
759
- readonly "events.iterate.com/guestbook/entry-signed": {
760
- readonly description: "Someone signed the guestbook: their name and message.";
761
- readonly payloadSchema: z.ZodObject<{
762
- name: z.ZodString;
763
- message: z.ZodString;
764
- }, z.core.$strip>;
765
- readonly examples: readonly [{
766
- readonly description: "A visitor left a note.";
767
- readonly payload: {
768
- readonly name: "Ada";
769
- readonly message: "Lovely worker you have here.";
770
- };
771
- }];
772
- };
773
- }[T] : never) extends infer T_1 ? T_1 extends import("../../processors/processor-contracts.ts").EventDefinition<PayloadOutput, unknown> & (T extends "events.iterate.com/guestbook/created" | "events.iterate.com/guestbook/entry-signed" ? {
774
- readonly "events.iterate.com/guestbook/created": {
775
- readonly description: string;
776
- readonly payloadSchema: z.ZodObject<{
777
- config: z.ZodObject<{
778
- title: z.ZodString;
779
- }, z.core.$strip>;
780
- }, z.core.$strip>;
781
- readonly examples: readonly [{
782
- readonly description: "A guestbook born with its display title.";
783
- readonly payload: {
784
- readonly config: {
785
- readonly title: "Guestbook";
786
- };
787
- };
788
- }];
789
- };
790
- readonly "events.iterate.com/guestbook/entry-signed": {
791
- readonly description: "Someone signed the guestbook: their name and message.";
792
- readonly payloadSchema: z.ZodObject<{
793
- name: z.ZodString;
794
- message: z.ZodString;
795
- }, z.core.$strip>;
796
- readonly examples: readonly [{
797
- readonly description: "A visitor left a note.";
798
- readonly payload: {
799
- readonly name: "Ada";
800
- readonly message: "Lovely worker you have here.";
801
- };
802
- }];
803
- };
804
- }[T] : never) ? T_1 extends {
805
- ephemeral: true;
806
- } ? {
807
- ephemeral: true;
808
- } : unknown : never : never) : never : never : never : never) | (Extract<"events.iterate.com/guestbook/entry-signed", Event["type"]> extends infer T_2 ? T_2 extends Extract<"events.iterate.com/guestbook/entry-signed", Event["type"]> ? T_2 extends unknown ? (T_2 extends "events.iterate.com/guestbook/created" | "events.iterate.com/guestbook/entry-signed" ? {
809
- readonly "events.iterate.com/guestbook/created": {
810
- readonly description: string;
811
- readonly payloadSchema: z.ZodObject<{
812
- config: z.ZodObject<{
813
- title: z.ZodString;
814
- }, z.core.$strip>;
815
- }, z.core.$strip>;
816
- readonly examples: readonly [{
817
- readonly description: "A guestbook born with its display title.";
818
- readonly payload: {
819
- readonly config: {
820
- readonly title: "Guestbook";
821
- };
822
- };
823
- }];
824
- };
825
- readonly "events.iterate.com/guestbook/entry-signed": {
826
- readonly description: "Someone signed the guestbook: their name and message.";
827
- readonly payloadSchema: z.ZodObject<{
828
- name: z.ZodString;
829
- message: z.ZodString;
830
- }, z.core.$strip>;
831
- readonly examples: readonly [{
832
- readonly description: "A visitor left a note.";
833
- readonly payload: {
834
- readonly name: "Ada";
835
- readonly message: "Lovely worker you have here.";
836
- };
837
- }];
838
- };
839
- }[T_2] : never) extends import("../../processors/processor-contracts.ts").EventDefinition<infer PayloadOutput, unknown> ? Omit<{
840
- type: string;
841
- payload?: Record<string, unknown> | undefined;
842
- metadata?: Record<string, unknown> | undefined;
843
- source?: {
844
- processor?: {
845
- slug: string;
846
- version: string;
847
- stream: {
848
- path: string;
849
- projectId: string | null;
850
- streamId: string;
851
- };
852
- whileProcessing?: {
853
- offset: number;
854
- type: string;
855
- } | undefined;
856
- } | undefined;
857
- copiedFrom?: {
858
- name: string;
859
- streamId: string;
860
- streamCreatedAt: string;
861
- cursorChangedAtSourceOffset: number;
862
- createdAt: string;
863
- offset: number;
864
- path: string;
865
- projectId: string | null;
866
- type: string;
867
- }[] | undefined;
868
- } | undefined;
869
- idempotencyKey?: string | undefined;
870
- ephemeral?: true | undefined;
871
- }, "payload" | "type"> & {
872
- type: T_2;
873
- payload: PayloadOutput;
874
- } & {
875
- payload: PayloadOutput;
876
- } & (import("../../processors/processor-contracts.ts").EventDefinition<PayloadOutput, unknown> & (T_2 extends "events.iterate.com/guestbook/created" | "events.iterate.com/guestbook/entry-signed" ? {
877
- readonly "events.iterate.com/guestbook/created": {
878
- readonly description: string;
879
- readonly payloadSchema: z.ZodObject<{
880
- config: z.ZodObject<{
881
- title: z.ZodString;
882
- }, z.core.$strip>;
883
- }, z.core.$strip>;
884
- readonly examples: readonly [{
885
- readonly description: "A guestbook born with its display title.";
886
- readonly payload: {
887
- readonly config: {
888
- readonly title: "Guestbook";
889
- };
890
- };
891
- }];
892
- };
893
- readonly "events.iterate.com/guestbook/entry-signed": {
894
- readonly description: "Someone signed the guestbook: their name and message.";
895
- readonly payloadSchema: z.ZodObject<{
896
- name: z.ZodString;
897
- message: z.ZodString;
898
- }, z.core.$strip>;
899
- readonly examples: readonly [{
900
- readonly description: "A visitor left a note.";
901
- readonly payload: {
902
- readonly name: "Ada";
903
- readonly message: "Lovely worker you have here.";
904
- };
905
- }];
906
- };
907
- }[T_2] : never) extends infer T_3 ? T_3 extends import("../../processors/processor-contracts.ts").EventDefinition<PayloadOutput, unknown> & (T_2 extends "events.iterate.com/guestbook/created" | "events.iterate.com/guestbook/entry-signed" ? {
908
- readonly "events.iterate.com/guestbook/created": {
909
- readonly description: string;
910
- readonly payloadSchema: z.ZodObject<{
911
- config: z.ZodObject<{
912
- title: z.ZodString;
913
- }, z.core.$strip>;
914
- }, z.core.$strip>;
915
- readonly examples: readonly [{
916
- readonly description: "A guestbook born with its display title.";
917
- readonly payload: {
918
- readonly config: {
919
- readonly title: "Guestbook";
920
- };
921
- };
922
- }];
923
- };
924
- readonly "events.iterate.com/guestbook/entry-signed": {
925
- readonly description: "Someone signed the guestbook: their name and message.";
926
- readonly payloadSchema: z.ZodObject<{
927
- name: z.ZodString;
928
- message: z.ZodString;
929
- }, z.core.$strip>;
930
- readonly examples: readonly [{
931
- readonly description: "A visitor left a note.";
932
- readonly payload: {
933
- readonly name: "Ada";
934
- readonly message: "Lovely worker you have here.";
935
- };
936
- }];
937
- };
938
- }[T_2] : never) ? T_3 extends {
939
- ephemeral: true;
940
- } ? {
941
- ephemeral: true;
942
- } : unknown : never : never) : never : never : never : never);
943
- parseConsumedInput: <const Event extends (Omit<Omit<{
944
- type: string;
945
- payload?: Record<string, unknown> | undefined;
946
- metadata?: Record<string, unknown> | undefined;
947
- source?: {
948
- processor?: {
949
- slug: string;
950
- version: string;
951
- stream: {
952
- path: string;
953
- projectId: string | null;
954
- streamId: string;
955
- };
956
- whileProcessing?: {
957
- offset: number;
958
- type: string;
959
- } | undefined;
960
- } | undefined;
961
- copiedFrom?: {
962
- name: string;
963
- streamId: string;
964
- streamCreatedAt: string;
965
- cursorChangedAtSourceOffset: number;
966
- createdAt: string;
967
- offset: number;
968
- path: string;
969
- projectId: string | null;
970
- type: string;
971
- }[] | undefined;
972
- } | undefined;
973
- idempotencyKey?: string | undefined;
974
- ephemeral?: true | undefined;
975
- }, "payload" | "type"> & {
976
- type: "events.iterate.com/guestbook/created";
977
- payload: {
978
- config: {
979
- title: string;
980
- };
981
- };
982
- }, "ephemeral"> & {
983
- ephemeral?: never;
984
- }) | (Omit<Omit<{
985
- type: string;
986
- payload?: Record<string, unknown> | undefined;
987
- metadata?: Record<string, unknown> | undefined;
988
- source?: {
989
- processor?: {
990
- slug: string;
991
- version: string;
992
- stream: {
993
- path: string;
994
- projectId: string | null;
995
- streamId: string;
996
- };
997
- whileProcessing?: {
998
- offset: number;
999
- type: string;
1000
- } | undefined;
1001
- } | undefined;
1002
- copiedFrom?: {
1003
- name: string;
1004
- streamId: string;
1005
- streamCreatedAt: string;
1006
- cursorChangedAtSourceOffset: number;
1007
- createdAt: string;
1008
- offset: number;
1009
- path: string;
1010
- projectId: string | null;
1011
- type: string;
1012
- }[] | undefined;
1013
- } | undefined;
1014
- idempotencyKey?: string | undefined;
1015
- ephemeral?: true | undefined;
1016
- }, "payload" | "type"> & {
1017
- type: "events.iterate.com/guestbook/entry-signed";
1018
- payload: {
1019
- name: string;
1020
- message: string;
1021
- };
1022
- }, "ephemeral"> & {
1023
- ephemeral?: never;
1024
- })>(event: Event) => "*" extends Extract<"events.iterate.com/guestbook/created", Event["type"]> | Extract<"events.iterate.com/guestbook/entry-signed", Event["type"]> ? Omit<{
1025
- type: string;
1026
- payload?: Record<string, unknown> | undefined;
1027
- metadata?: Record<string, unknown> | undefined;
1028
- source?: {
1029
- processor?: {
1030
- slug: string;
1031
- version: string;
1032
- stream: {
1033
- path: string;
1034
- projectId: string | null;
1035
- streamId: string;
1036
- };
1037
- whileProcessing?: {
1038
- offset: number;
1039
- type: string;
1040
- } | undefined;
1041
- } | undefined;
1042
- copiedFrom?: {
1043
- name: string;
1044
- streamId: string;
1045
- streamCreatedAt: string;
1046
- cursorChangedAtSourceOffset: number;
1047
- createdAt: string;
1048
- offset: number;
1049
- path: string;
1050
- projectId: string | null;
1051
- type: string;
1052
- }[] | undefined;
1053
- } | undefined;
1054
- idempotencyKey?: string | undefined;
1055
- ephemeral?: true | undefined;
1056
- }, "ephemeral"> & {
1057
- ephemeral?: never;
1058
- } : Extract<"events.iterate.com/guestbook/created", Event["type"]> | Extract<"events.iterate.com/guestbook/entry-signed", Event["type"]> extends infer Type extends string ? (Type extends "events.iterate.com/guestbook/created" | "events.iterate.com/guestbook/entry-signed" ? {
1059
- readonly "events.iterate.com/guestbook/created": {
1060
- readonly description: string;
1061
- readonly payloadSchema: z.ZodObject<{
1062
- config: z.ZodObject<{
1063
- title: z.ZodString;
1064
- }, z.core.$strip>;
1065
- }, z.core.$strip>;
1066
- readonly examples: readonly [{
1067
- readonly description: "A guestbook born with its display title.";
1068
- readonly payload: {
1069
- readonly config: {
1070
- readonly title: "Guestbook";
1071
- };
1072
- };
1073
- }];
1074
- };
1075
- readonly "events.iterate.com/guestbook/entry-signed": {
1076
- readonly description: "Someone signed the guestbook: their name and message.";
1077
- readonly payloadSchema: z.ZodObject<{
1078
- name: z.ZodString;
1079
- message: z.ZodString;
1080
- }, z.core.$strip>;
1081
- readonly examples: readonly [{
1082
- readonly description: "A visitor left a note.";
1083
- readonly payload: {
1084
- readonly name: "Ada";
1085
- readonly message: "Lovely worker you have here.";
1086
- };
1087
- }];
1088
- };
1089
- }[Type] : never) extends import("../../processors/processor-contracts.ts").EventDefinition<infer PayloadOutput, unknown> ? Omit<Omit<{
1090
- type: string;
1091
- payload?: Record<string, unknown> | undefined;
1092
- metadata?: Record<string, unknown> | undefined;
1093
- source?: {
1094
- processor?: {
1095
- slug: string;
1096
- version: string;
1097
- stream: {
1098
- path: string;
1099
- projectId: string | null;
1100
- streamId: string;
1101
- };
1102
- whileProcessing?: {
1103
- offset: number;
1104
- type: string;
1105
- } | undefined;
1106
- } | undefined;
1107
- copiedFrom?: {
1108
- name: string;
1109
- streamId: string;
1110
- streamCreatedAt: string;
1111
- cursorChangedAtSourceOffset: number;
1112
- createdAt: string;
1113
- offset: number;
1114
- path: string;
1115
- projectId: string | null;
1116
- type: string;
1117
- }[] | undefined;
1118
- } | undefined;
1119
- idempotencyKey?: string | undefined;
1120
- ephemeral?: true | undefined;
1121
- }, "payload" | "type"> & {
1122
- type: Type;
1123
- payload: PayloadOutput;
1124
- }, "ephemeral"> & {
1125
- ephemeral?: never;
1126
- } : never : never;
1127
- };
1128
- export type GuestbookProcessorContract = typeof GuestbookProcessorContract;
1129
- export type GuestbookState = ProcessorState<GuestbookProcessorContract>;
1130
- export declare class GuestbookProcessor extends StreamProcessor<GuestbookProcessorContract> {
1131
- readonly contract: {
1132
- slug: string;
1133
- version: string;
1134
- description: string;
1135
- stateSchema: z.ZodObject<{
1136
- birthCertificate: z.ZodDefault<z.ZodNullable<z.ZodObject<{
1137
- config: z.ZodObject<{
1138
- title: z.ZodString;
1139
- }, z.core.$strip>;
1140
- }, z.core.$strip>>>;
1141
- entries: z.ZodDefault<z.ZodArray<z.ZodObject<{
1142
- name: z.ZodString;
1143
- message: z.ZodString;
1144
- signedAt: z.ZodString;
1145
- }, z.core.$strip>>>;
1146
- }, z.core.$strip>;
1147
- processorDeps?: readonly [] | undefined;
1148
- events: {
1149
- readonly "events.iterate.com/guestbook/created": {
1150
- readonly description: string;
1151
- readonly payloadSchema: z.ZodObject<{
1152
- config: z.ZodObject<{
1153
- title: z.ZodString;
1154
- }, z.core.$strip>;
1155
- }, z.core.$strip>;
1156
- readonly examples: readonly [{
1157
- readonly description: "A guestbook born with its display title.";
1158
- readonly payload: {
1159
- readonly config: {
1160
- readonly title: "Guestbook";
1161
- };
1162
- };
1163
- }];
1164
- };
1165
- readonly "events.iterate.com/guestbook/entry-signed": {
1166
- readonly description: "Someone signed the guestbook: their name and message.";
1167
- readonly payloadSchema: z.ZodObject<{
1168
- name: z.ZodString;
1169
- message: z.ZodString;
1170
- }, z.core.$strip>;
1171
- readonly examples: readonly [{
1172
- readonly description: "A visitor left a note.";
1173
- readonly payload: {
1174
- readonly name: "Ada";
1175
- readonly message: "Lovely worker you have here.";
1176
- };
1177
- }];
1178
- };
1179
- };
1180
- consumes: readonly ["events.iterate.com/guestbook/created", "events.iterate.com/guestbook/entry-signed"];
1181
- emits: readonly [];
1182
- buildEvent: <const Event extends ((Omit<{
1183
- type: string;
1184
- payload?: Record<string, unknown> | undefined;
1185
- metadata?: Record<string, unknown> | undefined;
1186
- source?: {
1187
- processor?: {
1188
- slug: string;
1189
- version: string;
1190
- stream: {
1191
- path: string;
1192
- projectId: string | null;
1193
- streamId: string;
1194
- };
1195
- whileProcessing?: {
1196
- offset: number;
1197
- type: string;
1198
- } | undefined;
1199
- } | undefined;
1200
- copiedFrom?: {
1201
- name: string;
1202
- streamId: string;
1203
- streamCreatedAt: string;
1204
- cursorChangedAtSourceOffset: number;
1205
- createdAt: string;
1206
- offset: number;
1207
- path: string;
1208
- projectId: string | null;
1209
- type: string;
1210
- }[] | undefined;
1211
- } | undefined;
1212
- idempotencyKey?: string | undefined;
1213
- ephemeral?: true | undefined;
1214
- }, "payload" | "type"> & {
1215
- type: "events.iterate.com/guestbook/created";
1216
- payload: {
1217
- config: {
1218
- title: string;
1219
- };
1220
- };
1221
- }) | (Omit<{
1222
- type: string;
1223
- payload?: Record<string, unknown> | undefined;
1224
- metadata?: Record<string, unknown> | undefined;
1225
- source?: {
1226
- processor?: {
1227
- slug: string;
1228
- version: string;
1229
- stream: {
1230
- path: string;
1231
- projectId: string | null;
1232
- streamId: string;
1233
- };
1234
- whileProcessing?: {
1235
- offset: number;
1236
- type: string;
1237
- } | undefined;
1238
- } | undefined;
1239
- copiedFrom?: {
1240
- name: string;
1241
- streamId: string;
1242
- streamCreatedAt: string;
1243
- cursorChangedAtSourceOffset: number;
1244
- createdAt: string;
1245
- offset: number;
1246
- path: string;
1247
- projectId: string | null;
1248
- type: string;
1249
- }[] | undefined;
1250
- } | undefined;
1251
- idempotencyKey?: string | undefined;
1252
- ephemeral?: true | undefined;
1253
- }, "payload" | "type"> & {
1254
- type: "events.iterate.com/guestbook/entry-signed";
1255
- payload: {
1256
- name: string;
1257
- message: string;
1258
- };
1259
- })) & {
1260
- type: string;
1261
- }>(event: Event) => Event extends unknown ? Omit<Event, "payload"> & Pick<Event["type"] extends infer T ? T extends Event["type"] ? T extends unknown ? (T extends "events.iterate.com/guestbook/created" | "events.iterate.com/guestbook/entry-signed" ? {
1262
- readonly "events.iterate.com/guestbook/created": {
1263
- readonly description: string;
1264
- readonly payloadSchema: z.ZodObject<{
1265
- config: z.ZodObject<{
1266
- title: z.ZodString;
1267
- }, z.core.$strip>;
1268
- }, z.core.$strip>;
1269
- readonly examples: readonly [{
1270
- readonly description: "A guestbook born with its display title.";
1271
- readonly payload: {
1272
- readonly config: {
1273
- readonly title: "Guestbook";
1274
- };
1275
- };
1276
- }];
1277
- };
1278
- readonly "events.iterate.com/guestbook/entry-signed": {
1279
- readonly description: "Someone signed the guestbook: their name and message.";
1280
- readonly payloadSchema: z.ZodObject<{
1281
- name: z.ZodString;
1282
- message: z.ZodString;
1283
- }, z.core.$strip>;
1284
- readonly examples: readonly [{
1285
- readonly description: "A visitor left a note.";
1286
- readonly payload: {
1287
- readonly name: "Ada";
1288
- readonly message: "Lovely worker you have here.";
1289
- };
1290
- }];
1291
- };
1292
- }[T] : never) extends import("../../processors/processor-contracts.ts").EventDefinition<infer PayloadOutput, unknown> ? Omit<{
1293
- type: string;
1294
- payload?: Record<string, unknown> | undefined;
1295
- metadata?: Record<string, unknown> | undefined;
1296
- source?: {
1297
- processor?: {
1298
- slug: string;
1299
- version: string;
1300
- stream: {
1301
- path: string;
1302
- projectId: string | null;
1303
- streamId: string;
1304
- };
1305
- whileProcessing?: {
1306
- offset: number;
1307
- type: string;
1308
- } | undefined;
1309
- } | undefined;
1310
- copiedFrom?: {
1311
- name: string;
1312
- streamId: string;
1313
- streamCreatedAt: string;
1314
- cursorChangedAtSourceOffset: number;
1315
- createdAt: string;
1316
- offset: number;
1317
- path: string;
1318
- projectId: string | null;
1319
- type: string;
1320
- }[] | undefined;
1321
- } | undefined;
1322
- idempotencyKey?: string | undefined;
1323
- ephemeral?: true | undefined;
1324
- }, "payload" | "type"> & {
1325
- type: T;
1326
- payload: PayloadOutput;
1327
- } & {
1328
- payload: PayloadOutput;
1329
- } & (import("../../processors/processor-contracts.ts").EventDefinition<PayloadOutput, unknown> & (T extends "events.iterate.com/guestbook/created" | "events.iterate.com/guestbook/entry-signed" ? {
1330
- readonly "events.iterate.com/guestbook/created": {
1331
- readonly description: string;
1332
- readonly payloadSchema: z.ZodObject<{
1333
- config: z.ZodObject<{
1334
- title: z.ZodString;
1335
- }, z.core.$strip>;
1336
- }, z.core.$strip>;
1337
- readonly examples: readonly [{
1338
- readonly description: "A guestbook born with its display title.";
1339
- readonly payload: {
1340
- readonly config: {
1341
- readonly title: "Guestbook";
1342
- };
1343
- };
1344
- }];
1345
- };
1346
- readonly "events.iterate.com/guestbook/entry-signed": {
1347
- readonly description: "Someone signed the guestbook: their name and message.";
1348
- readonly payloadSchema: z.ZodObject<{
1349
- name: z.ZodString;
1350
- message: z.ZodString;
1351
- }, z.core.$strip>;
1352
- readonly examples: readonly [{
1353
- readonly description: "A visitor left a note.";
1354
- readonly payload: {
1355
- readonly name: "Ada";
1356
- readonly message: "Lovely worker you have here.";
1357
- };
1358
- }];
1359
- };
1360
- }[T] : never) extends infer T_1 ? T_1 extends import("../../processors/processor-contracts.ts").EventDefinition<PayloadOutput, unknown> & (T extends "events.iterate.com/guestbook/created" | "events.iterate.com/guestbook/entry-signed" ? {
1361
- readonly "events.iterate.com/guestbook/created": {
1362
- readonly description: string;
1363
- readonly payloadSchema: z.ZodObject<{
1364
- config: z.ZodObject<{
1365
- title: z.ZodString;
1366
- }, z.core.$strip>;
1367
- }, z.core.$strip>;
1368
- readonly examples: readonly [{
1369
- readonly description: "A guestbook born with its display title.";
1370
- readonly payload: {
1371
- readonly config: {
1372
- readonly title: "Guestbook";
1373
- };
1374
- };
1375
- }];
1376
- };
1377
- readonly "events.iterate.com/guestbook/entry-signed": {
1378
- readonly description: "Someone signed the guestbook: their name and message.";
1379
- readonly payloadSchema: z.ZodObject<{
1380
- name: z.ZodString;
1381
- message: z.ZodString;
1382
- }, z.core.$strip>;
1383
- readonly examples: readonly [{
1384
- readonly description: "A visitor left a note.";
1385
- readonly payload: {
1386
- readonly name: "Ada";
1387
- readonly message: "Lovely worker you have here.";
1388
- };
1389
- }];
1390
- };
1391
- }[T] : never) ? T_1 extends {
1392
- ephemeral: true;
1393
- } ? {
1394
- ephemeral: true;
1395
- } : unknown : never : never) : never : never : never : never, "payload"> & ((Event["type"] extends infer T_2 ? T_2 extends Event["type"] ? T_2 extends "events.iterate.com/guestbook/created" | "events.iterate.com/guestbook/entry-signed" ? {
1396
- readonly "events.iterate.com/guestbook/created": {
1397
- readonly description: string;
1398
- readonly payloadSchema: z.ZodObject<{
1399
- config: z.ZodObject<{
1400
- title: z.ZodString;
1401
- }, z.core.$strip>;
1402
- }, z.core.$strip>;
1403
- readonly examples: readonly [{
1404
- readonly description: "A guestbook born with its display title.";
1405
- readonly payload: {
1406
- readonly config: {
1407
- readonly title: "Guestbook";
1408
- };
1409
- };
1410
- }];
1411
- };
1412
- readonly "events.iterate.com/guestbook/entry-signed": {
1413
- readonly description: "Someone signed the guestbook: their name and message.";
1414
- readonly payloadSchema: z.ZodObject<{
1415
- name: z.ZodString;
1416
- message: z.ZodString;
1417
- }, z.core.$strip>;
1418
- readonly examples: readonly [{
1419
- readonly description: "A visitor left a note.";
1420
- readonly payload: {
1421
- readonly name: "Ada";
1422
- readonly message: "Lovely worker you have here.";
1423
- };
1424
- }];
1425
- };
1426
- }[T_2] : never : never : never) extends infer T_3 ? T_3 extends (Event["type"] extends infer T_4 ? T_4 extends Event["type"] ? T_4 extends "events.iterate.com/guestbook/created" | "events.iterate.com/guestbook/entry-signed" ? {
1427
- readonly "events.iterate.com/guestbook/created": {
1428
- readonly description: string;
1429
- readonly payloadSchema: z.ZodObject<{
1430
- config: z.ZodObject<{
1431
- title: z.ZodString;
1432
- }, z.core.$strip>;
1433
- }, z.core.$strip>;
1434
- readonly examples: readonly [{
1435
- readonly description: "A guestbook born with its display title.";
1436
- readonly payload: {
1437
- readonly config: {
1438
- readonly title: "Guestbook";
1439
- };
1440
- };
1441
- }];
1442
- };
1443
- readonly "events.iterate.com/guestbook/entry-signed": {
1444
- readonly description: "Someone signed the guestbook: their name and message.";
1445
- readonly payloadSchema: z.ZodObject<{
1446
- name: z.ZodString;
1447
- message: z.ZodString;
1448
- }, z.core.$strip>;
1449
- readonly examples: readonly [{
1450
- readonly description: "A visitor left a note.";
1451
- readonly payload: {
1452
- readonly name: "Ada";
1453
- readonly message: "Lovely worker you have here.";
1454
- };
1455
- }];
1456
- };
1457
- }[T_4] : never : never : never) ? T_3 extends {
1458
- ephemeral: true;
1459
- } ? {
1460
- ephemeral: true;
1461
- } : unknown : never : never) : never;
1462
- parseEvent: <const Event extends import("../../processors/schemas.ts").StreamEvent>(event: Event) => (Extract<"events.iterate.com/guestbook/created", Event["type"]> extends infer T ? T extends Extract<"events.iterate.com/guestbook/created", Event["type"]> ? T extends unknown ? (T extends "events.iterate.com/guestbook/created" | "events.iterate.com/guestbook/entry-signed" ? {
1463
- readonly "events.iterate.com/guestbook/created": {
1464
- readonly description: string;
1465
- readonly payloadSchema: z.ZodObject<{
1466
- config: z.ZodObject<{
1467
- title: z.ZodString;
1468
- }, z.core.$strip>;
1469
- }, z.core.$strip>;
1470
- readonly examples: readonly [{
1471
- readonly description: "A guestbook born with its display title.";
1472
- readonly payload: {
1473
- readonly config: {
1474
- readonly title: "Guestbook";
1475
- };
1476
- };
1477
- }];
1478
- };
1479
- readonly "events.iterate.com/guestbook/entry-signed": {
1480
- readonly description: "Someone signed the guestbook: their name and message.";
1481
- readonly payloadSchema: z.ZodObject<{
1482
- name: z.ZodString;
1483
- message: z.ZodString;
1484
- }, z.core.$strip>;
1485
- readonly examples: readonly [{
1486
- readonly description: "A visitor left a note.";
1487
- readonly payload: {
1488
- readonly name: "Ada";
1489
- readonly message: "Lovely worker you have here.";
1490
- };
1491
- }];
1492
- };
1493
- }[T] : never) extends import("../../processors/processor-contracts.ts").EventDefinition<infer PayloadOutput, unknown> ? Omit<{
1494
- type: string;
1495
- offset: number;
1496
- createdAt: string;
1497
- path: string;
1498
- payload?: Record<string, unknown> | undefined;
1499
- metadata?: Record<string, unknown> | undefined;
1500
- source?: {
1501
- processor?: {
1502
- slug: string;
1503
- version: string;
1504
- stream: {
1505
- path: string;
1506
- projectId: string | null;
1507
- streamId: string;
1508
- };
1509
- whileProcessing?: {
1510
- offset: number;
1511
- type: string;
1512
- } | undefined;
1513
- } | undefined;
1514
- copiedFrom?: {
1515
- name: string;
1516
- streamId: string;
1517
- streamCreatedAt: string;
1518
- cursorChangedAtSourceOffset: number;
1519
- createdAt: string;
1520
- offset: number;
1521
- path: string;
1522
- projectId: string | null;
1523
- type: string;
1524
- }[] | undefined;
1525
- } | undefined;
1526
- idempotencyKey?: string | undefined;
1527
- ephemeral?: true | undefined;
1528
- }, "payload" | "type"> & Omit<{
1529
- type: string;
1530
- payload?: Record<string, unknown> | undefined;
1531
- metadata?: Record<string, unknown> | undefined;
1532
- source?: {
1533
- processor?: {
1534
- slug: string;
1535
- version: string;
1536
- stream: {
1537
- path: string;
1538
- projectId: string | null;
1539
- streamId: string;
1540
- };
1541
- whileProcessing?: {
1542
- offset: number;
1543
- type: string;
1544
- } | undefined;
1545
- } | undefined;
1546
- copiedFrom?: {
1547
- name: string;
1548
- streamId: string;
1549
- streamCreatedAt: string;
1550
- cursorChangedAtSourceOffset: number;
1551
- createdAt: string;
1552
- offset: number;
1553
- path: string;
1554
- projectId: string | null;
1555
- type: string;
1556
- }[] | undefined;
1557
- } | undefined;
1558
- idempotencyKey?: string | undefined;
1559
- ephemeral?: true | undefined;
1560
- }, "payload" | "type"> & {
1561
- type: T;
1562
- payload: PayloadOutput;
1563
- } & {
1564
- payload: PayloadOutput;
1565
- } & (import("../../processors/processor-contracts.ts").EventDefinition<PayloadOutput, unknown> & (T extends "events.iterate.com/guestbook/created" | "events.iterate.com/guestbook/entry-signed" ? {
1566
- readonly "events.iterate.com/guestbook/created": {
1567
- readonly description: string;
1568
- readonly payloadSchema: z.ZodObject<{
1569
- config: z.ZodObject<{
1570
- title: z.ZodString;
1571
- }, z.core.$strip>;
1572
- }, z.core.$strip>;
1573
- readonly examples: readonly [{
1574
- readonly description: "A guestbook born with its display title.";
1575
- readonly payload: {
1576
- readonly config: {
1577
- readonly title: "Guestbook";
1578
- };
1579
- };
1580
- }];
1581
- };
1582
- readonly "events.iterate.com/guestbook/entry-signed": {
1583
- readonly description: "Someone signed the guestbook: their name and message.";
1584
- readonly payloadSchema: z.ZodObject<{
1585
- name: z.ZodString;
1586
- message: z.ZodString;
1587
- }, z.core.$strip>;
1588
- readonly examples: readonly [{
1589
- readonly description: "A visitor left a note.";
1590
- readonly payload: {
1591
- readonly name: "Ada";
1592
- readonly message: "Lovely worker you have here.";
1593
- };
1594
- }];
1595
- };
1596
- }[T] : never) extends infer T_1 ? T_1 extends import("../../processors/processor-contracts.ts").EventDefinition<PayloadOutput, unknown> & (T extends "events.iterate.com/guestbook/created" | "events.iterate.com/guestbook/entry-signed" ? {
1597
- readonly "events.iterate.com/guestbook/created": {
1598
- readonly description: string;
1599
- readonly payloadSchema: z.ZodObject<{
1600
- config: z.ZodObject<{
1601
- title: z.ZodString;
1602
- }, z.core.$strip>;
1603
- }, z.core.$strip>;
1604
- readonly examples: readonly [{
1605
- readonly description: "A guestbook born with its display title.";
1606
- readonly payload: {
1607
- readonly config: {
1608
- readonly title: "Guestbook";
1609
- };
1610
- };
1611
- }];
1612
- };
1613
- readonly "events.iterate.com/guestbook/entry-signed": {
1614
- readonly description: "Someone signed the guestbook: their name and message.";
1615
- readonly payloadSchema: z.ZodObject<{
1616
- name: z.ZodString;
1617
- message: z.ZodString;
1618
- }, z.core.$strip>;
1619
- readonly examples: readonly [{
1620
- readonly description: "A visitor left a note.";
1621
- readonly payload: {
1622
- readonly name: "Ada";
1623
- readonly message: "Lovely worker you have here.";
1624
- };
1625
- }];
1626
- };
1627
- }[T] : never) ? T_1 extends {
1628
- ephemeral: true;
1629
- } ? {
1630
- ephemeral: true;
1631
- } : unknown : never : never) : never : never : never : never) | (Extract<"events.iterate.com/guestbook/entry-signed", Event["type"]> extends infer T_2 ? T_2 extends Extract<"events.iterate.com/guestbook/entry-signed", Event["type"]> ? T_2 extends unknown ? (T_2 extends "events.iterate.com/guestbook/created" | "events.iterate.com/guestbook/entry-signed" ? {
1632
- readonly "events.iterate.com/guestbook/created": {
1633
- readonly description: string;
1634
- readonly payloadSchema: z.ZodObject<{
1635
- config: z.ZodObject<{
1636
- title: z.ZodString;
1637
- }, z.core.$strip>;
1638
- }, z.core.$strip>;
1639
- readonly examples: readonly [{
1640
- readonly description: "A guestbook born with its display title.";
1641
- readonly payload: {
1642
- readonly config: {
1643
- readonly title: "Guestbook";
1644
- };
1645
- };
1646
- }];
1647
- };
1648
- readonly "events.iterate.com/guestbook/entry-signed": {
1649
- readonly description: "Someone signed the guestbook: their name and message.";
1650
- readonly payloadSchema: z.ZodObject<{
1651
- name: z.ZodString;
1652
- message: z.ZodString;
1653
- }, z.core.$strip>;
1654
- readonly examples: readonly [{
1655
- readonly description: "A visitor left a note.";
1656
- readonly payload: {
1657
- readonly name: "Ada";
1658
- readonly message: "Lovely worker you have here.";
1659
- };
1660
- }];
1661
- };
1662
- }[T_2] : never) extends import("../../processors/processor-contracts.ts").EventDefinition<infer PayloadOutput, unknown> ? Omit<{
1663
- type: string;
1664
- offset: number;
1665
- createdAt: string;
1666
- path: string;
1667
- payload?: Record<string, unknown> | undefined;
1668
- metadata?: Record<string, unknown> | undefined;
1669
- source?: {
1670
- processor?: {
1671
- slug: string;
1672
- version: string;
1673
- stream: {
1674
- path: string;
1675
- projectId: string | null;
1676
- streamId: string;
1677
- };
1678
- whileProcessing?: {
1679
- offset: number;
1680
- type: string;
1681
- } | undefined;
1682
- } | undefined;
1683
- copiedFrom?: {
1684
- name: string;
1685
- streamId: string;
1686
- streamCreatedAt: string;
1687
- cursorChangedAtSourceOffset: number;
1688
- createdAt: string;
1689
- offset: number;
1690
- path: string;
1691
- projectId: string | null;
1692
- type: string;
1693
- }[] | undefined;
1694
- } | undefined;
1695
- idempotencyKey?: string | undefined;
1696
- ephemeral?: true | undefined;
1697
- }, "payload" | "type"> & Omit<{
1698
- type: string;
1699
- payload?: Record<string, unknown> | undefined;
1700
- metadata?: Record<string, unknown> | undefined;
1701
- source?: {
1702
- processor?: {
1703
- slug: string;
1704
- version: string;
1705
- stream: {
1706
- path: string;
1707
- projectId: string | null;
1708
- streamId: string;
1709
- };
1710
- whileProcessing?: {
1711
- offset: number;
1712
- type: string;
1713
- } | undefined;
1714
- } | undefined;
1715
- copiedFrom?: {
1716
- name: string;
1717
- streamId: string;
1718
- streamCreatedAt: string;
1719
- cursorChangedAtSourceOffset: number;
1720
- createdAt: string;
1721
- offset: number;
1722
- path: string;
1723
- projectId: string | null;
1724
- type: string;
1725
- }[] | undefined;
1726
- } | undefined;
1727
- idempotencyKey?: string | undefined;
1728
- ephemeral?: true | undefined;
1729
- }, "payload" | "type"> & {
1730
- type: T_2;
1731
- payload: PayloadOutput;
1732
- } & {
1733
- payload: PayloadOutput;
1734
- } & (import("../../processors/processor-contracts.ts").EventDefinition<PayloadOutput, unknown> & (T_2 extends "events.iterate.com/guestbook/created" | "events.iterate.com/guestbook/entry-signed" ? {
1735
- readonly "events.iterate.com/guestbook/created": {
1736
- readonly description: string;
1737
- readonly payloadSchema: z.ZodObject<{
1738
- config: z.ZodObject<{
1739
- title: z.ZodString;
1740
- }, z.core.$strip>;
1741
- }, z.core.$strip>;
1742
- readonly examples: readonly [{
1743
- readonly description: "A guestbook born with its display title.";
1744
- readonly payload: {
1745
- readonly config: {
1746
- readonly title: "Guestbook";
1747
- };
1748
- };
1749
- }];
1750
- };
1751
- readonly "events.iterate.com/guestbook/entry-signed": {
1752
- readonly description: "Someone signed the guestbook: their name and message.";
1753
- readonly payloadSchema: z.ZodObject<{
1754
- name: z.ZodString;
1755
- message: z.ZodString;
1756
- }, z.core.$strip>;
1757
- readonly examples: readonly [{
1758
- readonly description: "A visitor left a note.";
1759
- readonly payload: {
1760
- readonly name: "Ada";
1761
- readonly message: "Lovely worker you have here.";
1762
- };
1763
- }];
1764
- };
1765
- }[T_2] : never) extends infer T_3 ? T_3 extends import("../../processors/processor-contracts.ts").EventDefinition<PayloadOutput, unknown> & (T_2 extends "events.iterate.com/guestbook/created" | "events.iterate.com/guestbook/entry-signed" ? {
1766
- readonly "events.iterate.com/guestbook/created": {
1767
- readonly description: string;
1768
- readonly payloadSchema: z.ZodObject<{
1769
- config: z.ZodObject<{
1770
- title: z.ZodString;
1771
- }, z.core.$strip>;
1772
- }, z.core.$strip>;
1773
- readonly examples: readonly [{
1774
- readonly description: "A guestbook born with its display title.";
1775
- readonly payload: {
1776
- readonly config: {
1777
- readonly title: "Guestbook";
1778
- };
1779
- };
1780
- }];
1781
- };
1782
- readonly "events.iterate.com/guestbook/entry-signed": {
1783
- readonly description: "Someone signed the guestbook: their name and message.";
1784
- readonly payloadSchema: z.ZodObject<{
1785
- name: z.ZodString;
1786
- message: z.ZodString;
1787
- }, z.core.$strip>;
1788
- readonly examples: readonly [{
1789
- readonly description: "A visitor left a note.";
1790
- readonly payload: {
1791
- readonly name: "Ada";
1792
- readonly message: "Lovely worker you have here.";
1793
- };
1794
- }];
1795
- };
1796
- }[T_2] : never) ? T_3 extends {
1797
- ephemeral: true;
1798
- } ? {
1799
- ephemeral: true;
1800
- } : unknown : never : never) : never : never : never : never);
1801
- parseEventInput: <const Event extends import("../../processors/schemas.ts").StreamEventInput>(event: Event) => (Extract<"events.iterate.com/guestbook/created", Event["type"]> extends infer T ? T extends Extract<"events.iterate.com/guestbook/created", Event["type"]> ? T extends unknown ? (T extends "events.iterate.com/guestbook/created" | "events.iterate.com/guestbook/entry-signed" ? {
1802
- readonly "events.iterate.com/guestbook/created": {
1803
- readonly description: string;
1804
- readonly payloadSchema: z.ZodObject<{
1805
- config: z.ZodObject<{
1806
- title: z.ZodString;
1807
- }, z.core.$strip>;
1808
- }, z.core.$strip>;
1809
- readonly examples: readonly [{
1810
- readonly description: "A guestbook born with its display title.";
1811
- readonly payload: {
1812
- readonly config: {
1813
- readonly title: "Guestbook";
1814
- };
1815
- };
1816
- }];
1817
- };
1818
- readonly "events.iterate.com/guestbook/entry-signed": {
1819
- readonly description: "Someone signed the guestbook: their name and message.";
1820
- readonly payloadSchema: z.ZodObject<{
1821
- name: z.ZodString;
1822
- message: z.ZodString;
1823
- }, z.core.$strip>;
1824
- readonly examples: readonly [{
1825
- readonly description: "A visitor left a note.";
1826
- readonly payload: {
1827
- readonly name: "Ada";
1828
- readonly message: "Lovely worker you have here.";
1829
- };
1830
- }];
1831
- };
1832
- }[T] : never) extends import("../../processors/processor-contracts.ts").EventDefinition<infer PayloadOutput, unknown> ? Omit<{
1833
- type: string;
1834
- payload?: Record<string, unknown> | undefined;
1835
- metadata?: Record<string, unknown> | undefined;
1836
- source?: {
1837
- processor?: {
1838
- slug: string;
1839
- version: string;
1840
- stream: {
1841
- path: string;
1842
- projectId: string | null;
1843
- streamId: string;
1844
- };
1845
- whileProcessing?: {
1846
- offset: number;
1847
- type: string;
1848
- } | undefined;
1849
- } | undefined;
1850
- copiedFrom?: {
1851
- name: string;
1852
- streamId: string;
1853
- streamCreatedAt: string;
1854
- cursorChangedAtSourceOffset: number;
1855
- createdAt: string;
1856
- offset: number;
1857
- path: string;
1858
- projectId: string | null;
1859
- type: string;
1860
- }[] | undefined;
1861
- } | undefined;
1862
- idempotencyKey?: string | undefined;
1863
- ephemeral?: true | undefined;
1864
- }, "payload" | "type"> & {
1865
- type: T;
1866
- payload: PayloadOutput;
1867
- } & {
1868
- payload: PayloadOutput;
1869
- } & (import("../../processors/processor-contracts.ts").EventDefinition<PayloadOutput, unknown> & (T extends "events.iterate.com/guestbook/created" | "events.iterate.com/guestbook/entry-signed" ? {
1870
- readonly "events.iterate.com/guestbook/created": {
1871
- readonly description: string;
1872
- readonly payloadSchema: z.ZodObject<{
1873
- config: z.ZodObject<{
1874
- title: z.ZodString;
1875
- }, z.core.$strip>;
1876
- }, z.core.$strip>;
1877
- readonly examples: readonly [{
1878
- readonly description: "A guestbook born with its display title.";
1879
- readonly payload: {
1880
- readonly config: {
1881
- readonly title: "Guestbook";
1882
- };
1883
- };
1884
- }];
1885
- };
1886
- readonly "events.iterate.com/guestbook/entry-signed": {
1887
- readonly description: "Someone signed the guestbook: their name and message.";
1888
- readonly payloadSchema: z.ZodObject<{
1889
- name: z.ZodString;
1890
- message: z.ZodString;
1891
- }, z.core.$strip>;
1892
- readonly examples: readonly [{
1893
- readonly description: "A visitor left a note.";
1894
- readonly payload: {
1895
- readonly name: "Ada";
1896
- readonly message: "Lovely worker you have here.";
1897
- };
1898
- }];
1899
- };
1900
- }[T] : never) extends infer T_1 ? T_1 extends import("../../processors/processor-contracts.ts").EventDefinition<PayloadOutput, unknown> & (T extends "events.iterate.com/guestbook/created" | "events.iterate.com/guestbook/entry-signed" ? {
1901
- readonly "events.iterate.com/guestbook/created": {
1902
- readonly description: string;
1903
- readonly payloadSchema: z.ZodObject<{
1904
- config: z.ZodObject<{
1905
- title: z.ZodString;
1906
- }, z.core.$strip>;
1907
- }, z.core.$strip>;
1908
- readonly examples: readonly [{
1909
- readonly description: "A guestbook born with its display title.";
1910
- readonly payload: {
1911
- readonly config: {
1912
- readonly title: "Guestbook";
1913
- };
1914
- };
1915
- }];
1916
- };
1917
- readonly "events.iterate.com/guestbook/entry-signed": {
1918
- readonly description: "Someone signed the guestbook: their name and message.";
1919
- readonly payloadSchema: z.ZodObject<{
1920
- name: z.ZodString;
1921
- message: z.ZodString;
1922
- }, z.core.$strip>;
1923
- readonly examples: readonly [{
1924
- readonly description: "A visitor left a note.";
1925
- readonly payload: {
1926
- readonly name: "Ada";
1927
- readonly message: "Lovely worker you have here.";
1928
- };
1929
- }];
1930
- };
1931
- }[T] : never) ? T_1 extends {
1932
- ephemeral: true;
1933
- } ? {
1934
- ephemeral: true;
1935
- } : unknown : never : never) : never : never : never : never) | (Extract<"events.iterate.com/guestbook/entry-signed", Event["type"]> extends infer T_2 ? T_2 extends Extract<"events.iterate.com/guestbook/entry-signed", Event["type"]> ? T_2 extends unknown ? (T_2 extends "events.iterate.com/guestbook/created" | "events.iterate.com/guestbook/entry-signed" ? {
1936
- readonly "events.iterate.com/guestbook/created": {
1937
- readonly description: string;
1938
- readonly payloadSchema: z.ZodObject<{
1939
- config: z.ZodObject<{
1940
- title: z.ZodString;
1941
- }, z.core.$strip>;
1942
- }, z.core.$strip>;
1943
- readonly examples: readonly [{
1944
- readonly description: "A guestbook born with its display title.";
1945
- readonly payload: {
1946
- readonly config: {
1947
- readonly title: "Guestbook";
1948
- };
1949
- };
1950
- }];
1951
- };
1952
- readonly "events.iterate.com/guestbook/entry-signed": {
1953
- readonly description: "Someone signed the guestbook: their name and message.";
1954
- readonly payloadSchema: z.ZodObject<{
1955
- name: z.ZodString;
1956
- message: z.ZodString;
1957
- }, z.core.$strip>;
1958
- readonly examples: readonly [{
1959
- readonly description: "A visitor left a note.";
1960
- readonly payload: {
1961
- readonly name: "Ada";
1962
- readonly message: "Lovely worker you have here.";
1963
- };
1964
- }];
1965
- };
1966
- }[T_2] : never) extends import("../../processors/processor-contracts.ts").EventDefinition<infer PayloadOutput, unknown> ? Omit<{
1967
- type: string;
1968
- payload?: Record<string, unknown> | undefined;
1969
- metadata?: Record<string, unknown> | undefined;
1970
- source?: {
1971
- processor?: {
1972
- slug: string;
1973
- version: string;
1974
- stream: {
1975
- path: string;
1976
- projectId: string | null;
1977
- streamId: string;
1978
- };
1979
- whileProcessing?: {
1980
- offset: number;
1981
- type: string;
1982
- } | undefined;
1983
- } | undefined;
1984
- copiedFrom?: {
1985
- name: string;
1986
- streamId: string;
1987
- streamCreatedAt: string;
1988
- cursorChangedAtSourceOffset: number;
1989
- createdAt: string;
1990
- offset: number;
1991
- path: string;
1992
- projectId: string | null;
1993
- type: string;
1994
- }[] | undefined;
1995
- } | undefined;
1996
- idempotencyKey?: string | undefined;
1997
- ephemeral?: true | undefined;
1998
- }, "payload" | "type"> & {
1999
- type: T_2;
2000
- payload: PayloadOutput;
2001
- } & {
2002
- payload: PayloadOutput;
2003
- } & (import("../../processors/processor-contracts.ts").EventDefinition<PayloadOutput, unknown> & (T_2 extends "events.iterate.com/guestbook/created" | "events.iterate.com/guestbook/entry-signed" ? {
2004
- readonly "events.iterate.com/guestbook/created": {
2005
- readonly description: string;
2006
- readonly payloadSchema: z.ZodObject<{
2007
- config: z.ZodObject<{
2008
- title: z.ZodString;
2009
- }, z.core.$strip>;
2010
- }, z.core.$strip>;
2011
- readonly examples: readonly [{
2012
- readonly description: "A guestbook born with its display title.";
2013
- readonly payload: {
2014
- readonly config: {
2015
- readonly title: "Guestbook";
2016
- };
2017
- };
2018
- }];
2019
- };
2020
- readonly "events.iterate.com/guestbook/entry-signed": {
2021
- readonly description: "Someone signed the guestbook: their name and message.";
2022
- readonly payloadSchema: z.ZodObject<{
2023
- name: z.ZodString;
2024
- message: z.ZodString;
2025
- }, z.core.$strip>;
2026
- readonly examples: readonly [{
2027
- readonly description: "A visitor left a note.";
2028
- readonly payload: {
2029
- readonly name: "Ada";
2030
- readonly message: "Lovely worker you have here.";
2031
- };
2032
- }];
2033
- };
2034
- }[T_2] : never) extends infer T_3 ? T_3 extends import("../../processors/processor-contracts.ts").EventDefinition<PayloadOutput, unknown> & (T_2 extends "events.iterate.com/guestbook/created" | "events.iterate.com/guestbook/entry-signed" ? {
2035
- readonly "events.iterate.com/guestbook/created": {
2036
- readonly description: string;
2037
- readonly payloadSchema: z.ZodObject<{
2038
- config: z.ZodObject<{
2039
- title: z.ZodString;
2040
- }, z.core.$strip>;
2041
- }, z.core.$strip>;
2042
- readonly examples: readonly [{
2043
- readonly description: "A guestbook born with its display title.";
2044
- readonly payload: {
2045
- readonly config: {
2046
- readonly title: "Guestbook";
2047
- };
2048
- };
2049
- }];
2050
- };
2051
- readonly "events.iterate.com/guestbook/entry-signed": {
2052
- readonly description: "Someone signed the guestbook: their name and message.";
2053
- readonly payloadSchema: z.ZodObject<{
2054
- name: z.ZodString;
2055
- message: z.ZodString;
2056
- }, z.core.$strip>;
2057
- readonly examples: readonly [{
2058
- readonly description: "A visitor left a note.";
2059
- readonly payload: {
2060
- readonly name: "Ada";
2061
- readonly message: "Lovely worker you have here.";
2062
- };
2063
- }];
2064
- };
2065
- }[T_2] : never) ? T_3 extends {
2066
- ephemeral: true;
2067
- } ? {
2068
- ephemeral: true;
2069
- } : unknown : never : never) : never : never : never : never);
2070
- parseConsumedInput: <const Event extends (Omit<Omit<{
2071
- type: string;
2072
- payload?: Record<string, unknown> | undefined;
2073
- metadata?: Record<string, unknown> | undefined;
2074
- source?: {
2075
- processor?: {
2076
- slug: string;
2077
- version: string;
2078
- stream: {
2079
- path: string;
2080
- projectId: string | null;
2081
- streamId: string;
2082
- };
2083
- whileProcessing?: {
2084
- offset: number;
2085
- type: string;
2086
- } | undefined;
2087
- } | undefined;
2088
- copiedFrom?: {
2089
- name: string;
2090
- streamId: string;
2091
- streamCreatedAt: string;
2092
- cursorChangedAtSourceOffset: number;
2093
- createdAt: string;
2094
- offset: number;
2095
- path: string;
2096
- projectId: string | null;
2097
- type: string;
2098
- }[] | undefined;
2099
- } | undefined;
2100
- idempotencyKey?: string | undefined;
2101
- ephemeral?: true | undefined;
2102
- }, "payload" | "type"> & {
2103
- type: "events.iterate.com/guestbook/created";
2104
- payload: {
2105
- config: {
2106
- title: string;
2107
- };
2108
- };
2109
- }, "ephemeral"> & {
2110
- ephemeral?: never;
2111
- }) | (Omit<Omit<{
2112
- type: string;
2113
- payload?: Record<string, unknown> | undefined;
2114
- metadata?: Record<string, unknown> | undefined;
2115
- source?: {
2116
- processor?: {
2117
- slug: string;
2118
- version: string;
2119
- stream: {
2120
- path: string;
2121
- projectId: string | null;
2122
- streamId: string;
2123
- };
2124
- whileProcessing?: {
2125
- offset: number;
2126
- type: string;
2127
- } | undefined;
2128
- } | undefined;
2129
- copiedFrom?: {
2130
- name: string;
2131
- streamId: string;
2132
- streamCreatedAt: string;
2133
- cursorChangedAtSourceOffset: number;
2134
- createdAt: string;
2135
- offset: number;
2136
- path: string;
2137
- projectId: string | null;
2138
- type: string;
2139
- }[] | undefined;
2140
- } | undefined;
2141
- idempotencyKey?: string | undefined;
2142
- ephemeral?: true | undefined;
2143
- }, "payload" | "type"> & {
2144
- type: "events.iterate.com/guestbook/entry-signed";
2145
- payload: {
2146
- name: string;
2147
- message: string;
2148
- };
2149
- }, "ephemeral"> & {
2150
- ephemeral?: never;
2151
- })>(event: Event) => "*" extends Extract<"events.iterate.com/guestbook/created", Event["type"]> | Extract<"events.iterate.com/guestbook/entry-signed", Event["type"]> ? Omit<{
2152
- type: string;
2153
- payload?: Record<string, unknown> | undefined;
2154
- metadata?: Record<string, unknown> | undefined;
2155
- source?: {
2156
- processor?: {
2157
- slug: string;
2158
- version: string;
2159
- stream: {
2160
- path: string;
2161
- projectId: string | null;
2162
- streamId: string;
2163
- };
2164
- whileProcessing?: {
2165
- offset: number;
2166
- type: string;
2167
- } | undefined;
2168
- } | undefined;
2169
- copiedFrom?: {
2170
- name: string;
2171
- streamId: string;
2172
- streamCreatedAt: string;
2173
- cursorChangedAtSourceOffset: number;
2174
- createdAt: string;
2175
- offset: number;
2176
- path: string;
2177
- projectId: string | null;
2178
- type: string;
2179
- }[] | undefined;
2180
- } | undefined;
2181
- idempotencyKey?: string | undefined;
2182
- ephemeral?: true | undefined;
2183
- }, "ephemeral"> & {
2184
- ephemeral?: never;
2185
- } : Extract<"events.iterate.com/guestbook/created", Event["type"]> | Extract<"events.iterate.com/guestbook/entry-signed", Event["type"]> extends infer Type extends string ? (Type extends "events.iterate.com/guestbook/created" | "events.iterate.com/guestbook/entry-signed" ? {
2186
- readonly "events.iterate.com/guestbook/created": {
2187
- readonly description: string;
2188
- readonly payloadSchema: z.ZodObject<{
2189
- config: z.ZodObject<{
2190
- title: z.ZodString;
2191
- }, z.core.$strip>;
2192
- }, z.core.$strip>;
2193
- readonly examples: readonly [{
2194
- readonly description: "A guestbook born with its display title.";
2195
- readonly payload: {
2196
- readonly config: {
2197
- readonly title: "Guestbook";
2198
- };
2199
- };
2200
- }];
2201
- };
2202
- readonly "events.iterate.com/guestbook/entry-signed": {
2203
- readonly description: "Someone signed the guestbook: their name and message.";
2204
- readonly payloadSchema: z.ZodObject<{
2205
- name: z.ZodString;
2206
- message: z.ZodString;
2207
- }, z.core.$strip>;
2208
- readonly examples: readonly [{
2209
- readonly description: "A visitor left a note.";
2210
- readonly payload: {
2211
- readonly name: "Ada";
2212
- readonly message: "Lovely worker you have here.";
2213
- };
2214
- }];
2215
- };
2216
- }[Type] : never) extends import("../../processors/processor-contracts.ts").EventDefinition<infer PayloadOutput, unknown> ? Omit<Omit<{
2217
- type: string;
2218
- payload?: Record<string, unknown> | undefined;
2219
- metadata?: Record<string, unknown> | undefined;
2220
- source?: {
2221
- processor?: {
2222
- slug: string;
2223
- version: string;
2224
- stream: {
2225
- path: string;
2226
- projectId: string | null;
2227
- streamId: string;
2228
- };
2229
- whileProcessing?: {
2230
- offset: number;
2231
- type: string;
2232
- } | undefined;
2233
- } | undefined;
2234
- copiedFrom?: {
2235
- name: string;
2236
- streamId: string;
2237
- streamCreatedAt: string;
2238
- cursorChangedAtSourceOffset: number;
2239
- createdAt: string;
2240
- offset: number;
2241
- path: string;
2242
- projectId: string | null;
2243
- type: string;
2244
- }[] | undefined;
2245
- } | undefined;
2246
- idempotencyKey?: string | undefined;
2247
- ephemeral?: true | undefined;
2248
- }, "payload" | "type"> & {
2249
- type: Type;
2250
- payload: PayloadOutput;
2251
- }, "ephemeral"> & {
2252
- ephemeral?: never;
2253
- } : never : never;
2254
- };
2255
- protected reduce({ event, state }: ReduceArgs<GuestbookProcessorContract>): {
2256
- birthCertificate: {
2257
- config: {
2258
- title: string;
2259
- };
2260
- } | null;
2261
- entries: {
2262
- name: string;
2263
- message: string;
2264
- signedAt: string;
2265
- }[];
2266
- };
2267
- }