@polygonlabs/example-schemas 0.0.0-stage → 1.2.3

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.
@@ -0,0 +1,903 @@
1
+ /**
2
+ * Registry composition for the Example REST API.
3
+ *
4
+ * `TypedRegistry` accumulates registered operations and security schemes
5
+ * into its type via chained method returns — `registerPath`,
6
+ * `registerSecurityScheme`, and `with(fn)` each return a `TypedRegistry`
7
+ * narrowed with what was just registered. The chain's final value is what
8
+ * `buildRegistry` returns; downstream consumers read the accumulated
9
+ * manifest via `OperationsOf<typeof buildRegistry>`.
10
+ *
11
+ * To add a new route: append a `.registerPath({...})` call inside the
12
+ * relevant per-domain helper under `./routes/`, or add a new domain
13
+ * helper and `.with(addNewDomainRoutes)` here. Nothing else needs
14
+ * updating — the OpenAPI spec, the codegen'd client, the server's
15
+ * request/response validation, and the typed handler binding all derive
16
+ * from the registry's accumulated type.
17
+ */
18
+ import { TypedRegistry } from '@polygonlabs/openapi-registry';
19
+ export declare const buildRegistry: () => TypedRegistry<{}, {
20
+ ApiKeyAuth: true;
21
+ }, import("@polygonlabs/openapi-registry").DefaultErrors> & TypedRegistry<{
22
+ getHealthCheck: import("@polygonlabs/openapi-registry").MergedRoute<{
23
+ readonly operationId: "getHealthCheck";
24
+ readonly method: "get";
25
+ readonly path: "/health-check";
26
+ readonly summary: "Liveness check";
27
+ readonly responses: {
28
+ readonly 200: {
29
+ readonly description: "Service is alive";
30
+ readonly content: {
31
+ readonly 'application/json': {
32
+ readonly schema: import("zod").ZodObject<{
33
+ success: import("zod").ZodBoolean;
34
+ }, import("zod/v4/core").$strip>;
35
+ };
36
+ };
37
+ };
38
+ };
39
+ }, import("@polygonlabs/openapi-registry").DefaultErrors>;
40
+ } & {
41
+ getHello: import("@polygonlabs/openapi-registry").MergedRoute<{
42
+ readonly operationId: "getHello";
43
+ readonly method: "get";
44
+ readonly path: "/api/hello";
45
+ readonly summary: "Hello world";
46
+ readonly responses: {
47
+ readonly 200: {
48
+ readonly description: "Greeting response";
49
+ readonly content: {
50
+ readonly 'application/json': {
51
+ readonly schema: import("zod").ZodObject<{
52
+ message: import("zod").ZodString;
53
+ }, import("zod/v4/core").$strip>;
54
+ };
55
+ };
56
+ };
57
+ };
58
+ }, import("@polygonlabs/openapi-registry").DefaultErrors>;
59
+ }, {
60
+ ApiKeyAuth: true;
61
+ }, import("@polygonlabs/openapi-registry").DefaultErrors> & TypedRegistry<{
62
+ getHealthCheck: import("@polygonlabs/openapi-registry").MergedRoute<{
63
+ readonly operationId: "getHealthCheck";
64
+ readonly method: "get";
65
+ readonly path: "/health-check";
66
+ readonly summary: "Liveness check";
67
+ readonly responses: {
68
+ readonly 200: {
69
+ readonly description: "Service is alive";
70
+ readonly content: {
71
+ readonly 'application/json': {
72
+ readonly schema: import("zod").ZodObject<{
73
+ success: import("zod").ZodBoolean;
74
+ }, import("zod/v4/core").$strip>;
75
+ };
76
+ };
77
+ };
78
+ };
79
+ }, import("@polygonlabs/openapi-registry").DefaultErrors>;
80
+ } & {
81
+ getHello: import("@polygonlabs/openapi-registry").MergedRoute<{
82
+ readonly operationId: "getHello";
83
+ readonly method: "get";
84
+ readonly path: "/api/hello";
85
+ readonly summary: "Hello world";
86
+ readonly responses: {
87
+ readonly 200: {
88
+ readonly description: "Greeting response";
89
+ readonly content: {
90
+ readonly 'application/json': {
91
+ readonly schema: import("zod").ZodObject<{
92
+ message: import("zod").ZodString;
93
+ }, import("zod/v4/core").$strip>;
94
+ };
95
+ };
96
+ };
97
+ };
98
+ }, import("@polygonlabs/openapi-registry").DefaultErrors>;
99
+ } & {
100
+ getBlockNumber: import("@polygonlabs/openapi-registry").MergedRoute<{
101
+ readonly operationId: "getBlockNumber";
102
+ readonly method: "get";
103
+ readonly path: "/api/block-number";
104
+ readonly summary: "Current block number";
105
+ readonly description: "Returns the latest block number from the configured RPC endpoint.";
106
+ readonly responses: {
107
+ readonly 200: {
108
+ readonly description: "Latest block number";
109
+ readonly content: {
110
+ readonly 'application/json': {
111
+ readonly schema: import("zod").ZodObject<{
112
+ blockNumber: import("zod").ZodCodec<import("zod").ZodString, import("zod").ZodBigIntFormat>;
113
+ }, import("zod/v4/core").$strip>;
114
+ };
115
+ };
116
+ };
117
+ };
118
+ }, import("@polygonlabs/openapi-registry").DefaultErrors>;
119
+ } & {
120
+ getBlockMetadata: import("@polygonlabs/openapi-registry").MergedRoute<{
121
+ readonly operationId: "getBlockMetadata";
122
+ readonly method: "get";
123
+ readonly path: "/api/blocks/{blockNumber}";
124
+ readonly summary: "Block metadata by height";
125
+ readonly description: "Looks up a block by its height via RPC and returns header metadata.";
126
+ readonly security: [{
127
+ readonly ApiKeyAuth: [];
128
+ }];
129
+ readonly request: {
130
+ readonly params: import("zod").ZodObject<{
131
+ blockNumber: import("zod").ZodCodec<import("zod").ZodString, import("zod").ZodBigIntFormat>;
132
+ }, import("zod/v4/core").$strip>;
133
+ };
134
+ readonly responses: {
135
+ readonly 200: {
136
+ readonly description: "Block metadata";
137
+ readonly content: {
138
+ readonly 'application/json': {
139
+ readonly schema: import("zod").ZodObject<{
140
+ number: import("zod").ZodCodec<import("zod").ZodString, import("zod").ZodBigIntFormat>;
141
+ hash: import("zod").ZodString;
142
+ parentHash: import("zod").ZodString;
143
+ timestamp: import("zod").ZodCodec<import("zod").ZodString, import("zod").ZodBigIntFormat>;
144
+ }, import("zod/v4/core").$strip>;
145
+ };
146
+ };
147
+ };
148
+ readonly 404: {
149
+ readonly description: "Block not found";
150
+ readonly content: {
151
+ readonly 'application/json': {
152
+ readonly schema: import("zod").ZodObject<{
153
+ error: import("zod").ZodLiteral<true>;
154
+ message: import("zod").ZodString;
155
+ info: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
156
+ }, import("zod/v4/core").$strip>;
157
+ };
158
+ };
159
+ };
160
+ };
161
+ }, import("@polygonlabs/openapi-registry").DefaultErrors>;
162
+ }, {
163
+ ApiKeyAuth: true;
164
+ }, import("@polygonlabs/openapi-registry").DefaultErrors> & TypedRegistry<{
165
+ getHealthCheck: import("@polygonlabs/openapi-registry").MergedRoute<{
166
+ readonly operationId: "getHealthCheck";
167
+ readonly method: "get";
168
+ readonly path: "/health-check";
169
+ readonly summary: "Liveness check";
170
+ readonly responses: {
171
+ readonly 200: {
172
+ readonly description: "Service is alive";
173
+ readonly content: {
174
+ readonly 'application/json': {
175
+ readonly schema: import("zod").ZodObject<{
176
+ success: import("zod").ZodBoolean;
177
+ }, import("zod/v4/core").$strip>;
178
+ };
179
+ };
180
+ };
181
+ };
182
+ }, import("@polygonlabs/openapi-registry").DefaultErrors>;
183
+ } & {
184
+ getHello: import("@polygonlabs/openapi-registry").MergedRoute<{
185
+ readonly operationId: "getHello";
186
+ readonly method: "get";
187
+ readonly path: "/api/hello";
188
+ readonly summary: "Hello world";
189
+ readonly responses: {
190
+ readonly 200: {
191
+ readonly description: "Greeting response";
192
+ readonly content: {
193
+ readonly 'application/json': {
194
+ readonly schema: import("zod").ZodObject<{
195
+ message: import("zod").ZodString;
196
+ }, import("zod/v4/core").$strip>;
197
+ };
198
+ };
199
+ };
200
+ };
201
+ }, import("@polygonlabs/openapi-registry").DefaultErrors>;
202
+ } & {
203
+ getBlockNumber: import("@polygonlabs/openapi-registry").MergedRoute<{
204
+ readonly operationId: "getBlockNumber";
205
+ readonly method: "get";
206
+ readonly path: "/api/block-number";
207
+ readonly summary: "Current block number";
208
+ readonly description: "Returns the latest block number from the configured RPC endpoint.";
209
+ readonly responses: {
210
+ readonly 200: {
211
+ readonly description: "Latest block number";
212
+ readonly content: {
213
+ readonly 'application/json': {
214
+ readonly schema: import("zod").ZodObject<{
215
+ blockNumber: import("zod").ZodCodec<import("zod").ZodString, import("zod").ZodBigIntFormat>;
216
+ }, import("zod/v4/core").$strip>;
217
+ };
218
+ };
219
+ };
220
+ };
221
+ }, import("@polygonlabs/openapi-registry").DefaultErrors>;
222
+ } & {
223
+ getBlockMetadata: import("@polygonlabs/openapi-registry").MergedRoute<{
224
+ readonly operationId: "getBlockMetadata";
225
+ readonly method: "get";
226
+ readonly path: "/api/blocks/{blockNumber}";
227
+ readonly summary: "Block metadata by height";
228
+ readonly description: "Looks up a block by its height via RPC and returns header metadata.";
229
+ readonly security: [{
230
+ readonly ApiKeyAuth: [];
231
+ }];
232
+ readonly request: {
233
+ readonly params: import("zod").ZodObject<{
234
+ blockNumber: import("zod").ZodCodec<import("zod").ZodString, import("zod").ZodBigIntFormat>;
235
+ }, import("zod/v4/core").$strip>;
236
+ };
237
+ readonly responses: {
238
+ readonly 200: {
239
+ readonly description: "Block metadata";
240
+ readonly content: {
241
+ readonly 'application/json': {
242
+ readonly schema: import("zod").ZodObject<{
243
+ number: import("zod").ZodCodec<import("zod").ZodString, import("zod").ZodBigIntFormat>;
244
+ hash: import("zod").ZodString;
245
+ parentHash: import("zod").ZodString;
246
+ timestamp: import("zod").ZodCodec<import("zod").ZodString, import("zod").ZodBigIntFormat>;
247
+ }, import("zod/v4/core").$strip>;
248
+ };
249
+ };
250
+ };
251
+ readonly 404: {
252
+ readonly description: "Block not found";
253
+ readonly content: {
254
+ readonly 'application/json': {
255
+ readonly schema: import("zod").ZodObject<{
256
+ error: import("zod").ZodLiteral<true>;
257
+ message: import("zod").ZodString;
258
+ info: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
259
+ }, import("zod/v4/core").$strip>;
260
+ };
261
+ };
262
+ };
263
+ };
264
+ }, import("@polygonlabs/openapi-registry").DefaultErrors>;
265
+ } & {
266
+ createMessage: import("@polygonlabs/openapi-registry").MergedRoute<{
267
+ readonly operationId: "createMessage";
268
+ readonly method: "post";
269
+ readonly path: "/api/messages";
270
+ readonly summary: "Create a message";
271
+ readonly request: {
272
+ readonly body: {
273
+ readonly content: {
274
+ readonly 'application/json': {
275
+ readonly schema: import("zod").ZodObject<{
276
+ text: import("zod").ZodString;
277
+ }, import("zod/v4/core").$strip>;
278
+ };
279
+ };
280
+ };
281
+ };
282
+ readonly responses: {
283
+ readonly 200: {
284
+ readonly description: "Message created";
285
+ readonly content: {
286
+ readonly 'application/json': {
287
+ readonly schema: import("zod").ZodObject<{
288
+ id: import("zod").ZodUUID;
289
+ text: import("zod").ZodString;
290
+ createdAt: import("zod").ZodCodec<import("zod").ZodISODateTime, import("zod").ZodDate>;
291
+ }, import("zod/v4/core").$strip>;
292
+ };
293
+ };
294
+ };
295
+ };
296
+ }, import("@polygonlabs/openapi-registry").DefaultErrors>;
297
+ } & {
298
+ listMessages: import("@polygonlabs/openapi-registry").MergedRoute<{
299
+ readonly operationId: "listMessages";
300
+ readonly method: "get";
301
+ readonly path: "/api/messages";
302
+ readonly summary: "List messages";
303
+ readonly request: {
304
+ readonly query: import("zod").ZodObject<{
305
+ cursor: import("zod").ZodOptional<import("zod").ZodString>;
306
+ since: import("zod").ZodOptional<import("zod").ZodCodec<import("zod").ZodISODateTime, import("zod").ZodDate>>;
307
+ }, import("zod/v4/core").$strip>;
308
+ };
309
+ readonly responses: {
310
+ readonly 200: {
311
+ readonly description: "Page of messages";
312
+ readonly content: {
313
+ readonly 'application/json': {
314
+ readonly schema: import("zod").ZodObject<{
315
+ items: import("zod").ZodArray<import("zod").ZodObject<{
316
+ id: import("zod").ZodUUID;
317
+ text: import("zod").ZodString;
318
+ createdAt: import("zod").ZodCodec<import("zod").ZodISODateTime, import("zod").ZodDate>;
319
+ }, import("zod/v4/core").$strip>>;
320
+ nextCursor: import("zod").ZodNullable<import("zod").ZodString>;
321
+ }, import("zod/v4/core").$strip>;
322
+ };
323
+ };
324
+ };
325
+ };
326
+ }, import("@polygonlabs/openapi-registry").DefaultErrors>;
327
+ } & {
328
+ getMessage: import("@polygonlabs/openapi-registry").MergedRoute<{
329
+ readonly operationId: "getMessage";
330
+ readonly method: "get";
331
+ readonly path: "/api/messages/{id}";
332
+ readonly summary: "Get a message by id";
333
+ readonly request: {
334
+ readonly params: import("zod").ZodObject<{
335
+ id: import("zod").ZodUUID;
336
+ }, import("zod/v4/core").$strip>;
337
+ };
338
+ readonly responses: {
339
+ readonly 200: {
340
+ readonly description: "Message";
341
+ readonly content: {
342
+ readonly 'application/json': {
343
+ readonly schema: import("zod").ZodObject<{
344
+ id: import("zod").ZodUUID;
345
+ text: import("zod").ZodString;
346
+ createdAt: import("zod").ZodCodec<import("zod").ZodISODateTime, import("zod").ZodDate>;
347
+ }, import("zod/v4/core").$strip>;
348
+ };
349
+ };
350
+ };
351
+ readonly 404: {
352
+ readonly description: "Not found";
353
+ readonly content: {
354
+ readonly 'application/json': {
355
+ readonly schema: import("zod").ZodObject<{
356
+ error: import("zod").ZodLiteral<true>;
357
+ message: import("zod").ZodString;
358
+ info: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
359
+ }, import("zod/v4/core").$strip>;
360
+ };
361
+ };
362
+ };
363
+ };
364
+ }, import("@polygonlabs/openapi-registry").DefaultErrors>;
365
+ }, {
366
+ ApiKeyAuth: true;
367
+ }, import("@polygonlabs/openapi-registry").DefaultErrors> & TypedRegistry<{
368
+ getHealthCheck: import("@polygonlabs/openapi-registry").MergedRoute<{
369
+ readonly operationId: "getHealthCheck";
370
+ readonly method: "get";
371
+ readonly path: "/health-check";
372
+ readonly summary: "Liveness check";
373
+ readonly responses: {
374
+ readonly 200: {
375
+ readonly description: "Service is alive";
376
+ readonly content: {
377
+ readonly 'application/json': {
378
+ readonly schema: import("zod").ZodObject<{
379
+ success: import("zod").ZodBoolean;
380
+ }, import("zod/v4/core").$strip>;
381
+ };
382
+ };
383
+ };
384
+ };
385
+ }, import("@polygonlabs/openapi-registry").DefaultErrors>;
386
+ } & {
387
+ getHello: import("@polygonlabs/openapi-registry").MergedRoute<{
388
+ readonly operationId: "getHello";
389
+ readonly method: "get";
390
+ readonly path: "/api/hello";
391
+ readonly summary: "Hello world";
392
+ readonly responses: {
393
+ readonly 200: {
394
+ readonly description: "Greeting response";
395
+ readonly content: {
396
+ readonly 'application/json': {
397
+ readonly schema: import("zod").ZodObject<{
398
+ message: import("zod").ZodString;
399
+ }, import("zod/v4/core").$strip>;
400
+ };
401
+ };
402
+ };
403
+ };
404
+ }, import("@polygonlabs/openapi-registry").DefaultErrors>;
405
+ } & {
406
+ getBlockNumber: import("@polygonlabs/openapi-registry").MergedRoute<{
407
+ readonly operationId: "getBlockNumber";
408
+ readonly method: "get";
409
+ readonly path: "/api/block-number";
410
+ readonly summary: "Current block number";
411
+ readonly description: "Returns the latest block number from the configured RPC endpoint.";
412
+ readonly responses: {
413
+ readonly 200: {
414
+ readonly description: "Latest block number";
415
+ readonly content: {
416
+ readonly 'application/json': {
417
+ readonly schema: import("zod").ZodObject<{
418
+ blockNumber: import("zod").ZodCodec<import("zod").ZodString, import("zod").ZodBigIntFormat>;
419
+ }, import("zod/v4/core").$strip>;
420
+ };
421
+ };
422
+ };
423
+ };
424
+ }, import("@polygonlabs/openapi-registry").DefaultErrors>;
425
+ } & {
426
+ getBlockMetadata: import("@polygonlabs/openapi-registry").MergedRoute<{
427
+ readonly operationId: "getBlockMetadata";
428
+ readonly method: "get";
429
+ readonly path: "/api/blocks/{blockNumber}";
430
+ readonly summary: "Block metadata by height";
431
+ readonly description: "Looks up a block by its height via RPC and returns header metadata.";
432
+ readonly security: [{
433
+ readonly ApiKeyAuth: [];
434
+ }];
435
+ readonly request: {
436
+ readonly params: import("zod").ZodObject<{
437
+ blockNumber: import("zod").ZodCodec<import("zod").ZodString, import("zod").ZodBigIntFormat>;
438
+ }, import("zod/v4/core").$strip>;
439
+ };
440
+ readonly responses: {
441
+ readonly 200: {
442
+ readonly description: "Block metadata";
443
+ readonly content: {
444
+ readonly 'application/json': {
445
+ readonly schema: import("zod").ZodObject<{
446
+ number: import("zod").ZodCodec<import("zod").ZodString, import("zod").ZodBigIntFormat>;
447
+ hash: import("zod").ZodString;
448
+ parentHash: import("zod").ZodString;
449
+ timestamp: import("zod").ZodCodec<import("zod").ZodString, import("zod").ZodBigIntFormat>;
450
+ }, import("zod/v4/core").$strip>;
451
+ };
452
+ };
453
+ };
454
+ readonly 404: {
455
+ readonly description: "Block not found";
456
+ readonly content: {
457
+ readonly 'application/json': {
458
+ readonly schema: import("zod").ZodObject<{
459
+ error: import("zod").ZodLiteral<true>;
460
+ message: import("zod").ZodString;
461
+ info: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
462
+ }, import("zod/v4/core").$strip>;
463
+ };
464
+ };
465
+ };
466
+ };
467
+ }, import("@polygonlabs/openapi-registry").DefaultErrors>;
468
+ } & {
469
+ createMessage: import("@polygonlabs/openapi-registry").MergedRoute<{
470
+ readonly operationId: "createMessage";
471
+ readonly method: "post";
472
+ readonly path: "/api/messages";
473
+ readonly summary: "Create a message";
474
+ readonly request: {
475
+ readonly body: {
476
+ readonly content: {
477
+ readonly 'application/json': {
478
+ readonly schema: import("zod").ZodObject<{
479
+ text: import("zod").ZodString;
480
+ }, import("zod/v4/core").$strip>;
481
+ };
482
+ };
483
+ };
484
+ };
485
+ readonly responses: {
486
+ readonly 200: {
487
+ readonly description: "Message created";
488
+ readonly content: {
489
+ readonly 'application/json': {
490
+ readonly schema: import("zod").ZodObject<{
491
+ id: import("zod").ZodUUID;
492
+ text: import("zod").ZodString;
493
+ createdAt: import("zod").ZodCodec<import("zod").ZodISODateTime, import("zod").ZodDate>;
494
+ }, import("zod/v4/core").$strip>;
495
+ };
496
+ };
497
+ };
498
+ };
499
+ }, import("@polygonlabs/openapi-registry").DefaultErrors>;
500
+ } & {
501
+ listMessages: import("@polygonlabs/openapi-registry").MergedRoute<{
502
+ readonly operationId: "listMessages";
503
+ readonly method: "get";
504
+ readonly path: "/api/messages";
505
+ readonly summary: "List messages";
506
+ readonly request: {
507
+ readonly query: import("zod").ZodObject<{
508
+ cursor: import("zod").ZodOptional<import("zod").ZodString>;
509
+ since: import("zod").ZodOptional<import("zod").ZodCodec<import("zod").ZodISODateTime, import("zod").ZodDate>>;
510
+ }, import("zod/v4/core").$strip>;
511
+ };
512
+ readonly responses: {
513
+ readonly 200: {
514
+ readonly description: "Page of messages";
515
+ readonly content: {
516
+ readonly 'application/json': {
517
+ readonly schema: import("zod").ZodObject<{
518
+ items: import("zod").ZodArray<import("zod").ZodObject<{
519
+ id: import("zod").ZodUUID;
520
+ text: import("zod").ZodString;
521
+ createdAt: import("zod").ZodCodec<import("zod").ZodISODateTime, import("zod").ZodDate>;
522
+ }, import("zod/v4/core").$strip>>;
523
+ nextCursor: import("zod").ZodNullable<import("zod").ZodString>;
524
+ }, import("zod/v4/core").$strip>;
525
+ };
526
+ };
527
+ };
528
+ };
529
+ }, import("@polygonlabs/openapi-registry").DefaultErrors>;
530
+ } & {
531
+ getMessage: import("@polygonlabs/openapi-registry").MergedRoute<{
532
+ readonly operationId: "getMessage";
533
+ readonly method: "get";
534
+ readonly path: "/api/messages/{id}";
535
+ readonly summary: "Get a message by id";
536
+ readonly request: {
537
+ readonly params: import("zod").ZodObject<{
538
+ id: import("zod").ZodUUID;
539
+ }, import("zod/v4/core").$strip>;
540
+ };
541
+ readonly responses: {
542
+ readonly 200: {
543
+ readonly description: "Message";
544
+ readonly content: {
545
+ readonly 'application/json': {
546
+ readonly schema: import("zod").ZodObject<{
547
+ id: import("zod").ZodUUID;
548
+ text: import("zod").ZodString;
549
+ createdAt: import("zod").ZodCodec<import("zod").ZodISODateTime, import("zod").ZodDate>;
550
+ }, import("zod/v4/core").$strip>;
551
+ };
552
+ };
553
+ };
554
+ readonly 404: {
555
+ readonly description: "Not found";
556
+ readonly content: {
557
+ readonly 'application/json': {
558
+ readonly schema: import("zod").ZodObject<{
559
+ error: import("zod").ZodLiteral<true>;
560
+ message: import("zod").ZodString;
561
+ info: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
562
+ }, import("zod/v4/core").$strip>;
563
+ };
564
+ };
565
+ };
566
+ };
567
+ }, import("@polygonlabs/openapi-registry").DefaultErrors>;
568
+ } & {
569
+ getWidget: import("@polygonlabs/openapi-registry").MergedRoute<{
570
+ readonly operationId: "getWidget";
571
+ readonly method: "get";
572
+ readonly path: "/api/widgets/{id}";
573
+ readonly summary: "Get a widget by id";
574
+ readonly description: string;
575
+ readonly request: {
576
+ readonly params: import("zod").ZodObject<{
577
+ id: import("zod").ZodUUID;
578
+ }, import("zod/v4/core").$strip>;
579
+ };
580
+ readonly responses: {
581
+ readonly 200: {
582
+ readonly description: "Widget";
583
+ readonly content: {
584
+ readonly 'application/json': {
585
+ readonly schema: import("zod").ZodObject<{
586
+ id: import("zod").ZodUUID;
587
+ name: import("zod").ZodString;
588
+ }, import("zod/v4/core").$strip>;
589
+ };
590
+ };
591
+ };
592
+ readonly 404: {
593
+ readonly description: "Not found";
594
+ readonly content: {
595
+ readonly 'application/json': {
596
+ readonly schema: import("zod").ZodObject<{
597
+ error: import("zod").ZodLiteral<true>;
598
+ message: import("zod").ZodString;
599
+ info: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
600
+ }, import("zod/v4/core").$strip>;
601
+ };
602
+ };
603
+ };
604
+ };
605
+ }, import("@polygonlabs/openapi-registry").DefaultErrors>;
606
+ }, {
607
+ ApiKeyAuth: true;
608
+ }, import("@polygonlabs/openapi-registry").DefaultErrors> & TypedRegistry<{
609
+ getHealthCheck: import("@polygonlabs/openapi-registry").MergedRoute<{
610
+ readonly operationId: "getHealthCheck";
611
+ readonly method: "get";
612
+ readonly path: "/health-check";
613
+ readonly summary: "Liveness check";
614
+ readonly responses: {
615
+ readonly 200: {
616
+ readonly description: "Service is alive";
617
+ readonly content: {
618
+ readonly 'application/json': {
619
+ readonly schema: import("zod").ZodObject<{
620
+ success: import("zod").ZodBoolean;
621
+ }, import("zod/v4/core").$strip>;
622
+ };
623
+ };
624
+ };
625
+ };
626
+ }, import("@polygonlabs/openapi-registry").DefaultErrors>;
627
+ } & {
628
+ getHello: import("@polygonlabs/openapi-registry").MergedRoute<{
629
+ readonly operationId: "getHello";
630
+ readonly method: "get";
631
+ readonly path: "/api/hello";
632
+ readonly summary: "Hello world";
633
+ readonly responses: {
634
+ readonly 200: {
635
+ readonly description: "Greeting response";
636
+ readonly content: {
637
+ readonly 'application/json': {
638
+ readonly schema: import("zod").ZodObject<{
639
+ message: import("zod").ZodString;
640
+ }, import("zod/v4/core").$strip>;
641
+ };
642
+ };
643
+ };
644
+ };
645
+ }, import("@polygonlabs/openapi-registry").DefaultErrors>;
646
+ } & {
647
+ getBlockNumber: import("@polygonlabs/openapi-registry").MergedRoute<{
648
+ readonly operationId: "getBlockNumber";
649
+ readonly method: "get";
650
+ readonly path: "/api/block-number";
651
+ readonly summary: "Current block number";
652
+ readonly description: "Returns the latest block number from the configured RPC endpoint.";
653
+ readonly responses: {
654
+ readonly 200: {
655
+ readonly description: "Latest block number";
656
+ readonly content: {
657
+ readonly 'application/json': {
658
+ readonly schema: import("zod").ZodObject<{
659
+ blockNumber: import("zod").ZodCodec<import("zod").ZodString, import("zod").ZodBigIntFormat>;
660
+ }, import("zod/v4/core").$strip>;
661
+ };
662
+ };
663
+ };
664
+ };
665
+ }, import("@polygonlabs/openapi-registry").DefaultErrors>;
666
+ } & {
667
+ getBlockMetadata: import("@polygonlabs/openapi-registry").MergedRoute<{
668
+ readonly operationId: "getBlockMetadata";
669
+ readonly method: "get";
670
+ readonly path: "/api/blocks/{blockNumber}";
671
+ readonly summary: "Block metadata by height";
672
+ readonly description: "Looks up a block by its height via RPC and returns header metadata.";
673
+ readonly security: [{
674
+ readonly ApiKeyAuth: [];
675
+ }];
676
+ readonly request: {
677
+ readonly params: import("zod").ZodObject<{
678
+ blockNumber: import("zod").ZodCodec<import("zod").ZodString, import("zod").ZodBigIntFormat>;
679
+ }, import("zod/v4/core").$strip>;
680
+ };
681
+ readonly responses: {
682
+ readonly 200: {
683
+ readonly description: "Block metadata";
684
+ readonly content: {
685
+ readonly 'application/json': {
686
+ readonly schema: import("zod").ZodObject<{
687
+ number: import("zod").ZodCodec<import("zod").ZodString, import("zod").ZodBigIntFormat>;
688
+ hash: import("zod").ZodString;
689
+ parentHash: import("zod").ZodString;
690
+ timestamp: import("zod").ZodCodec<import("zod").ZodString, import("zod").ZodBigIntFormat>;
691
+ }, import("zod/v4/core").$strip>;
692
+ };
693
+ };
694
+ };
695
+ readonly 404: {
696
+ readonly description: "Block not found";
697
+ readonly content: {
698
+ readonly 'application/json': {
699
+ readonly schema: import("zod").ZodObject<{
700
+ error: import("zod").ZodLiteral<true>;
701
+ message: import("zod").ZodString;
702
+ info: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
703
+ }, import("zod/v4/core").$strip>;
704
+ };
705
+ };
706
+ };
707
+ };
708
+ }, import("@polygonlabs/openapi-registry").DefaultErrors>;
709
+ } & {
710
+ createMessage: import("@polygonlabs/openapi-registry").MergedRoute<{
711
+ readonly operationId: "createMessage";
712
+ readonly method: "post";
713
+ readonly path: "/api/messages";
714
+ readonly summary: "Create a message";
715
+ readonly request: {
716
+ readonly body: {
717
+ readonly content: {
718
+ readonly 'application/json': {
719
+ readonly schema: import("zod").ZodObject<{
720
+ text: import("zod").ZodString;
721
+ }, import("zod/v4/core").$strip>;
722
+ };
723
+ };
724
+ };
725
+ };
726
+ readonly responses: {
727
+ readonly 200: {
728
+ readonly description: "Message created";
729
+ readonly content: {
730
+ readonly 'application/json': {
731
+ readonly schema: import("zod").ZodObject<{
732
+ id: import("zod").ZodUUID;
733
+ text: import("zod").ZodString;
734
+ createdAt: import("zod").ZodCodec<import("zod").ZodISODateTime, import("zod").ZodDate>;
735
+ }, import("zod/v4/core").$strip>;
736
+ };
737
+ };
738
+ };
739
+ };
740
+ }, import("@polygonlabs/openapi-registry").DefaultErrors>;
741
+ } & {
742
+ listMessages: import("@polygonlabs/openapi-registry").MergedRoute<{
743
+ readonly operationId: "listMessages";
744
+ readonly method: "get";
745
+ readonly path: "/api/messages";
746
+ readonly summary: "List messages";
747
+ readonly request: {
748
+ readonly query: import("zod").ZodObject<{
749
+ cursor: import("zod").ZodOptional<import("zod").ZodString>;
750
+ since: import("zod").ZodOptional<import("zod").ZodCodec<import("zod").ZodISODateTime, import("zod").ZodDate>>;
751
+ }, import("zod/v4/core").$strip>;
752
+ };
753
+ readonly responses: {
754
+ readonly 200: {
755
+ readonly description: "Page of messages";
756
+ readonly content: {
757
+ readonly 'application/json': {
758
+ readonly schema: import("zod").ZodObject<{
759
+ items: import("zod").ZodArray<import("zod").ZodObject<{
760
+ id: import("zod").ZodUUID;
761
+ text: import("zod").ZodString;
762
+ createdAt: import("zod").ZodCodec<import("zod").ZodISODateTime, import("zod").ZodDate>;
763
+ }, import("zod/v4/core").$strip>>;
764
+ nextCursor: import("zod").ZodNullable<import("zod").ZodString>;
765
+ }, import("zod/v4/core").$strip>;
766
+ };
767
+ };
768
+ };
769
+ };
770
+ }, import("@polygonlabs/openapi-registry").DefaultErrors>;
771
+ } & {
772
+ getMessage: import("@polygonlabs/openapi-registry").MergedRoute<{
773
+ readonly operationId: "getMessage";
774
+ readonly method: "get";
775
+ readonly path: "/api/messages/{id}";
776
+ readonly summary: "Get a message by id";
777
+ readonly request: {
778
+ readonly params: import("zod").ZodObject<{
779
+ id: import("zod").ZodUUID;
780
+ }, import("zod/v4/core").$strip>;
781
+ };
782
+ readonly responses: {
783
+ readonly 200: {
784
+ readonly description: "Message";
785
+ readonly content: {
786
+ readonly 'application/json': {
787
+ readonly schema: import("zod").ZodObject<{
788
+ id: import("zod").ZodUUID;
789
+ text: import("zod").ZodString;
790
+ createdAt: import("zod").ZodCodec<import("zod").ZodISODateTime, import("zod").ZodDate>;
791
+ }, import("zod/v4/core").$strip>;
792
+ };
793
+ };
794
+ };
795
+ readonly 404: {
796
+ readonly description: "Not found";
797
+ readonly content: {
798
+ readonly 'application/json': {
799
+ readonly schema: import("zod").ZodObject<{
800
+ error: import("zod").ZodLiteral<true>;
801
+ message: import("zod").ZodString;
802
+ info: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
803
+ }, import("zod/v4/core").$strip>;
804
+ };
805
+ };
806
+ };
807
+ };
808
+ }, import("@polygonlabs/openapi-registry").DefaultErrors>;
809
+ } & {
810
+ getWidget: import("@polygonlabs/openapi-registry").MergedRoute<{
811
+ readonly operationId: "getWidget";
812
+ readonly method: "get";
813
+ readonly path: "/api/widgets/{id}";
814
+ readonly summary: "Get a widget by id";
815
+ readonly description: string;
816
+ readonly request: {
817
+ readonly params: import("zod").ZodObject<{
818
+ id: import("zod").ZodUUID;
819
+ }, import("zod/v4/core").$strip>;
820
+ };
821
+ readonly responses: {
822
+ readonly 200: {
823
+ readonly description: "Widget";
824
+ readonly content: {
825
+ readonly 'application/json': {
826
+ readonly schema: import("zod").ZodObject<{
827
+ id: import("zod").ZodUUID;
828
+ name: import("zod").ZodString;
829
+ }, import("zod/v4/core").$strip>;
830
+ };
831
+ };
832
+ };
833
+ readonly 404: {
834
+ readonly description: "Not found";
835
+ readonly content: {
836
+ readonly 'application/json': {
837
+ readonly schema: import("zod").ZodObject<{
838
+ error: import("zod").ZodLiteral<true>;
839
+ message: import("zod").ZodString;
840
+ info: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
841
+ }, import("zod/v4/core").$strip>;
842
+ };
843
+ };
844
+ };
845
+ };
846
+ }, import("@polygonlabs/openapi-registry").DefaultErrors>;
847
+ } & {
848
+ listEvents: import("@polygonlabs/openapi-registry").MergedRoute<{
849
+ readonly operationId: "listEvents";
850
+ readonly method: "get";
851
+ readonly path: "/events";
852
+ readonly summary: "List indexed on-chain events";
853
+ readonly description: string;
854
+ readonly request: {
855
+ readonly query: import("zod").ZodObject<{
856
+ chain: import("zod").ZodOptional<import("zod").ZodCodec<import("zod").ZodString, import("zod").ZodInt>>;
857
+ contractAddress: import("zod").ZodOptional<import("zod").ZodString>;
858
+ eventName: import("zod").ZodOptional<import("zod").ZodString>;
859
+ cursor: import("zod").ZodOptional<import("zod").ZodString>;
860
+ limit: import("zod").ZodOptional<import("zod").ZodCodec<import("zod").ZodString, import("zod").ZodNumber>>;
861
+ }, import("zod/v4/core").$strip>;
862
+ };
863
+ readonly responses: {
864
+ readonly 200: {
865
+ readonly description: "Page of indexed events";
866
+ readonly content: {
867
+ readonly 'application/json': {
868
+ readonly schema: import("zod").ZodObject<{
869
+ items: import("zod").ZodArray<import("zod").ZodObject<{
870
+ id: import("zod").ZodString;
871
+ chain: import("zod").ZodNumber;
872
+ contractAddress: import("zod").ZodString;
873
+ eventName: import("zod").ZodString;
874
+ blockNumber: import("zod").ZodNumber;
875
+ transactionIndex: import("zod").ZodOptional<import("zod").ZodNumber>;
876
+ txHash: import("zod").ZodString;
877
+ logIndex: import("zod").ZodNumber;
878
+ args: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodNumber, import("zod").ZodBoolean]>>;
879
+ indexedAt: import("zod").ZodNumber;
880
+ }, import("zod/v4/core").$strip>>;
881
+ nextCursor: import("zod").ZodNullable<import("zod").ZodString>;
882
+ }, import("zod/v4/core").$strip>;
883
+ };
884
+ };
885
+ };
886
+ readonly 422: {
887
+ readonly description: "Malformed pagination cursor";
888
+ readonly content: {
889
+ readonly 'application/json': {
890
+ readonly schema: import("zod").ZodObject<{
891
+ error: import("zod").ZodLiteral<true>;
892
+ message: import("zod").ZodString;
893
+ info: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
894
+ }, import("zod/v4/core").$strip>;
895
+ };
896
+ };
897
+ };
898
+ };
899
+ }, import("@polygonlabs/openapi-registry").DefaultErrors>;
900
+ }, {
901
+ ApiKeyAuth: true;
902
+ }, import("@polygonlabs/openapi-registry").DefaultErrors>;
903
+ //# sourceMappingURL=registry.d.ts.map