@polygonlabs/staker-pool-allocations-schemas 0.1.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 (114) hide show
  1. package/MIGRATION.md +5 -0
  2. package/dist/allocation-history.d.ts +30 -0
  3. package/dist/allocation-history.d.ts.map +1 -0
  4. package/dist/allocation-history.js +29 -0
  5. package/dist/allocation-history.js.map +1 -0
  6. package/dist/allocation.d.ts +31 -0
  7. package/dist/allocation.d.ts.map +1 -0
  8. package/dist/allocation.js +40 -0
  9. package/dist/allocation.js.map +1 -0
  10. package/dist/codegen.d.ts +6 -0
  11. package/dist/codegen.d.ts.map +1 -0
  12. package/dist/codegen.js +32 -0
  13. package/dist/codegen.js.map +1 -0
  14. package/dist/common.d.ts +19 -0
  15. package/dist/common.d.ts.map +1 -0
  16. package/dist/common.js +63 -0
  17. package/dist/common.js.map +1 -0
  18. package/dist/distribution.d.ts +60 -0
  19. package/dist/distribution.d.ts.map +1 -0
  20. package/dist/distribution.js +43 -0
  21. package/dist/distribution.js.map +1 -0
  22. package/dist/error.d.ts +10 -0
  23. package/dist/error.d.ts.map +1 -0
  24. package/dist/error.js +15 -0
  25. package/dist/error.js.map +1 -0
  26. package/dist/index.d.ts +13 -0
  27. package/dist/index.d.ts.map +1 -0
  28. package/dist/index.js +17 -0
  29. package/dist/index.js.map +1 -0
  30. package/dist/management.d.ts +80 -0
  31. package/dist/management.d.ts.map +1 -0
  32. package/dist/management.js +126 -0
  33. package/dist/management.js.map +1 -0
  34. package/dist/proof.d.ts +10 -0
  35. package/dist/proof.d.ts.map +1 -0
  36. package/dist/proof.js +25 -0
  37. package/dist/proof.js.map +1 -0
  38. package/dist/registry-management.d.ts +525 -0
  39. package/dist/registry-management.d.ts.map +1 -0
  40. package/dist/registry-management.js +33 -0
  41. package/dist/registry-management.js.map +1 -0
  42. package/dist/registry-public.d.ts +1323 -0
  43. package/dist/registry-public.d.ts.map +1 -0
  44. package/dist/registry-public.js +31 -0
  45. package/dist/registry-public.js.map +1 -0
  46. package/dist/routes-management/distributions.d.ts +137 -0
  47. package/dist/routes-management/distributions.d.ts.map +1 -0
  48. package/dist/routes-management/distributions.js +72 -0
  49. package/dist/routes-management/distributions.js.map +1 -0
  50. package/dist/routes-management/excluded-addresses.d.ts +132 -0
  51. package/dist/routes-management/excluded-addresses.d.ts.map +1 -0
  52. package/dist/routes-management/excluded-addresses.js +84 -0
  53. package/dist/routes-management/excluded-addresses.js.map +1 -0
  54. package/dist/routes-management/operational.d.ts +48 -0
  55. package/dist/routes-management/operational.d.ts.map +1 -0
  56. package/dist/routes-management/operational.js +47 -0
  57. package/dist/routes-management/operational.js.map +1 -0
  58. package/dist/routes-public/addresses.d.ts +79 -0
  59. package/dist/routes-public/addresses.d.ts.map +1 -0
  60. package/dist/routes-public/addresses.js +45 -0
  61. package/dist/routes-public/addresses.js.map +1 -0
  62. package/dist/routes-public/allocations.d.ts +155 -0
  63. package/dist/routes-public/allocations.d.ts.map +1 -0
  64. package/dist/routes-public/allocations.js +81 -0
  65. package/dist/routes-public/allocations.js.map +1 -0
  66. package/dist/routes-public/distributions.d.ts +123 -0
  67. package/dist/routes-public/distributions.d.ts.map +1 -0
  68. package/dist/routes-public/distributions.js +55 -0
  69. package/dist/routes-public/distributions.js.map +1 -0
  70. package/dist/routes-public/operational.d.ts +46 -0
  71. package/dist/routes-public/operational.d.ts.map +1 -0
  72. package/dist/routes-public/operational.js +36 -0
  73. package/dist/routes-public/operational.js.map +1 -0
  74. package/dist/routes-public/proofs.d.ts +50 -0
  75. package/dist/routes-public/proofs.d.ts.map +1 -0
  76. package/dist/routes-public/proofs.js +34 -0
  77. package/dist/routes-public/proofs.js.map +1 -0
  78. package/dist/routes-public/wire.d.ts +60 -0
  79. package/dist/routes-public/wire.d.ts.map +1 -0
  80. package/dist/routes-public/wire.js +62 -0
  81. package/dist/routes-public/wire.js.map +1 -0
  82. package/dist/tsconfig.lib.tsbuildinfo +1 -0
  83. package/dist/unclaimed-proofs.d.ts +20 -0
  84. package/dist/unclaimed-proofs.d.ts.map +1 -0
  85. package/dist/unclaimed-proofs.js +22 -0
  86. package/dist/unclaimed-proofs.js.map +1 -0
  87. package/dist/zod.d.ts +3 -0
  88. package/dist/zod.d.ts.map +1 -0
  89. package/dist/zod.js +8 -0
  90. package/dist/zod.js.map +1 -0
  91. package/openapi.json +1215 -0
  92. package/package.json +49 -0
  93. package/src/allocation-history.ts +35 -0
  94. package/src/allocation.ts +51 -0
  95. package/src/codegen.ts +50 -0
  96. package/src/common.ts +76 -0
  97. package/src/distribution.ts +52 -0
  98. package/src/error.ts +17 -0
  99. package/src/index.ts +16 -0
  100. package/src/management.ts +158 -0
  101. package/src/proof.ts +27 -0
  102. package/src/registry-management.ts +36 -0
  103. package/src/registry-public.ts +33 -0
  104. package/src/routes-management/distributions.ts +87 -0
  105. package/src/routes-management/excluded-addresses.ts +103 -0
  106. package/src/routes-management/operational.ts +60 -0
  107. package/src/routes-public/addresses.ts +58 -0
  108. package/src/routes-public/allocations.ts +104 -0
  109. package/src/routes-public/distributions.ts +69 -0
  110. package/src/routes-public/operational.ts +55 -0
  111. package/src/routes-public/proofs.ts +46 -0
  112. package/src/routes-public/wire.ts +74 -0
  113. package/src/unclaimed-proofs.ts +27 -0
  114. package/src/zod.ts +9 -0
@@ -0,0 +1,525 @@
1
+ import { TypedRegistry } from '@polygonlabs/openapi-registry';
2
+ export declare const buildManagementRegistry: () => TypedRegistry<{}, {
3
+ ApiKeyAuth: true;
4
+ }> & TypedRegistry<{
5
+ getHealthCheck: import("@polygonlabs/openapi-registry").MergedRoute<{
6
+ readonly operationId: "getHealthCheck";
7
+ readonly method: "get";
8
+ readonly path: "/health-check";
9
+ readonly summary: "Liveness probe";
10
+ readonly description: string;
11
+ readonly responses: {
12
+ readonly 200: {
13
+ readonly description: "Service is alive.";
14
+ readonly content: {
15
+ readonly 'application/json': {
16
+ readonly schema: import("zod").ZodObject<{
17
+ status: import("zod").ZodLiteral<"ok">;
18
+ }, import("zod/v4/core").$strip>;
19
+ };
20
+ };
21
+ };
22
+ };
23
+ }>;
24
+ } & {
25
+ getReadiness: import("@polygonlabs/openapi-registry").MergedRoute<{
26
+ readonly operationId: "getReadiness";
27
+ readonly method: "get";
28
+ readonly path: "/readiness";
29
+ readonly summary: "Readiness probe";
30
+ readonly description: string;
31
+ readonly responses: {
32
+ readonly 200: {
33
+ readonly description: "Service is ready.";
34
+ readonly content: {
35
+ readonly 'application/json': {
36
+ readonly schema: import("zod").ZodObject<{
37
+ status: import("zod").ZodLiteral<"ok">;
38
+ }, import("zod/v4/core").$strip>;
39
+ };
40
+ };
41
+ };
42
+ };
43
+ }>;
44
+ }, {
45
+ ApiKeyAuth: true;
46
+ }> & TypedRegistry<{
47
+ getHealthCheck: import("@polygonlabs/openapi-registry").MergedRoute<{
48
+ readonly operationId: "getHealthCheck";
49
+ readonly method: "get";
50
+ readonly path: "/health-check";
51
+ readonly summary: "Liveness probe";
52
+ readonly description: string;
53
+ readonly responses: {
54
+ readonly 200: {
55
+ readonly description: "Service is alive.";
56
+ readonly content: {
57
+ readonly 'application/json': {
58
+ readonly schema: import("zod").ZodObject<{
59
+ status: import("zod").ZodLiteral<"ok">;
60
+ }, import("zod/v4/core").$strip>;
61
+ };
62
+ };
63
+ };
64
+ };
65
+ }>;
66
+ } & {
67
+ getReadiness: import("@polygonlabs/openapi-registry").MergedRoute<{
68
+ readonly operationId: "getReadiness";
69
+ readonly method: "get";
70
+ readonly path: "/readiness";
71
+ readonly summary: "Readiness probe";
72
+ readonly description: string;
73
+ readonly responses: {
74
+ readonly 200: {
75
+ readonly description: "Service is ready.";
76
+ readonly content: {
77
+ readonly 'application/json': {
78
+ readonly schema: import("zod").ZodObject<{
79
+ status: import("zod").ZodLiteral<"ok">;
80
+ }, import("zod/v4/core").$strip>;
81
+ };
82
+ };
83
+ };
84
+ };
85
+ }>;
86
+ } & {
87
+ triggerDistribution: import("@polygonlabs/openapi-registry").MergedRoute<{
88
+ readonly operationId: "triggerDistribution";
89
+ readonly method: "post";
90
+ readonly path: "/v1/{network}/management/distributions";
91
+ readonly summary: "Trigger a new distribution run";
92
+ readonly description: string;
93
+ readonly security: [{
94
+ readonly ApiKeyAuth: [];
95
+ }];
96
+ readonly request: {
97
+ readonly params: import("zod").ZodObject<{
98
+ network: import("zod").ZodEnum<{
99
+ mainnet: "mainnet";
100
+ amoy: "amoy";
101
+ }>;
102
+ }, import("zod/v4/core").$strip>;
103
+ readonly body: {
104
+ readonly content: {
105
+ readonly 'application/json': {
106
+ readonly schema: import("zod").ZodObject<{
107
+ startPoSBlock: import("zod").ZodString;
108
+ endPoSBlock: import("zod").ZodString;
109
+ distributionId: import("zod").ZodOptional<import("zod").ZodString>;
110
+ force: import("zod").ZodOptional<import("zod").ZodBoolean>;
111
+ polUsdPrice: import("zod").ZodOptional<import("zod").ZodString>;
112
+ }, import("zod/v4/core").$strip>;
113
+ };
114
+ };
115
+ };
116
+ };
117
+ readonly responses: {
118
+ readonly 202: {
119
+ readonly description: "Trigger accepted. Status reflects the row at the moment of acceptance.";
120
+ readonly content: {
121
+ readonly 'application/json': {
122
+ readonly schema: import("zod").ZodObject<{
123
+ network: import("zod").ZodEnum<{
124
+ mainnet: "mainnet";
125
+ amoy: "amoy";
126
+ }>;
127
+ distributionId: import("zod").ZodString;
128
+ status: import("zod").ZodEnum<{
129
+ pending: "pending";
130
+ running: "running";
131
+ completed: "completed";
132
+ failed: "failed";
133
+ }>;
134
+ }, import("zod/v4/core").$strip>;
135
+ };
136
+ };
137
+ };
138
+ readonly 409: {
139
+ readonly description: "`force: true` on a non-terminal distribution.";
140
+ readonly content: {
141
+ readonly 'application/json': {
142
+ readonly schema: import("zod").ZodObject<{
143
+ error: import("zod").ZodLiteral<true>;
144
+ message: import("zod").ZodString;
145
+ info: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
146
+ }, import("zod/v4/core").$strip>;
147
+ };
148
+ };
149
+ };
150
+ };
151
+ }>;
152
+ } & {
153
+ deleteDistribution: import("@polygonlabs/openapi-registry").MergedRoute<{
154
+ readonly operationId: "deleteDistribution";
155
+ readonly method: "delete";
156
+ readonly path: "/v1/{network}/management/distributions/{distributionId}";
157
+ readonly summary: "Remove a stale distribution";
158
+ readonly description: string;
159
+ readonly security: [{
160
+ readonly ApiKeyAuth: [];
161
+ }];
162
+ readonly request: {
163
+ readonly params: import("zod").ZodObject<{
164
+ network: import("zod").ZodEnum<{
165
+ mainnet: "mainnet";
166
+ amoy: "amoy";
167
+ }>;
168
+ distributionId: import("zod").ZodString;
169
+ }, import("zod/v4/core").$strip>;
170
+ };
171
+ readonly responses: {
172
+ readonly 200: {
173
+ readonly description: "The distribution and its allocations were removed.";
174
+ readonly content: {
175
+ readonly 'application/json': {
176
+ readonly schema: import("zod").ZodObject<{
177
+ network: import("zod").ZodEnum<{
178
+ mainnet: "mainnet";
179
+ amoy: "amoy";
180
+ }>;
181
+ distributionId: import("zod").ZodString;
182
+ removed: import("zod").ZodBoolean;
183
+ priorStatus: import("zod").ZodEnum<{
184
+ pending: "pending";
185
+ running: "running";
186
+ failed: "failed";
187
+ }>;
188
+ deletedAllocations: import("zod").ZodNumber;
189
+ }, import("zod/v4/core").$strip>;
190
+ };
191
+ };
192
+ };
193
+ readonly 404: {
194
+ readonly description: "No distribution with that (network, id).";
195
+ readonly content: {
196
+ readonly 'application/json': {
197
+ readonly schema: import("zod").ZodObject<{
198
+ error: import("zod").ZodLiteral<true>;
199
+ message: import("zod").ZodString;
200
+ info: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
201
+ }, import("zod/v4/core").$strip>;
202
+ };
203
+ };
204
+ };
205
+ readonly 409: {
206
+ readonly description: "The distribution is `completed` and cannot be deleted.";
207
+ readonly content: {
208
+ readonly 'application/json': {
209
+ readonly schema: import("zod").ZodObject<{
210
+ error: import("zod").ZodLiteral<true>;
211
+ message: import("zod").ZodString;
212
+ info: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
213
+ }, import("zod/v4/core").$strip>;
214
+ };
215
+ };
216
+ };
217
+ };
218
+ }>;
219
+ }, {
220
+ ApiKeyAuth: true;
221
+ }> & TypedRegistry<{
222
+ getHealthCheck: import("@polygonlabs/openapi-registry").MergedRoute<{
223
+ readonly operationId: "getHealthCheck";
224
+ readonly method: "get";
225
+ readonly path: "/health-check";
226
+ readonly summary: "Liveness probe";
227
+ readonly description: string;
228
+ readonly responses: {
229
+ readonly 200: {
230
+ readonly description: "Service is alive.";
231
+ readonly content: {
232
+ readonly 'application/json': {
233
+ readonly schema: import("zod").ZodObject<{
234
+ status: import("zod").ZodLiteral<"ok">;
235
+ }, import("zod/v4/core").$strip>;
236
+ };
237
+ };
238
+ };
239
+ };
240
+ }>;
241
+ } & {
242
+ getReadiness: import("@polygonlabs/openapi-registry").MergedRoute<{
243
+ readonly operationId: "getReadiness";
244
+ readonly method: "get";
245
+ readonly path: "/readiness";
246
+ readonly summary: "Readiness probe";
247
+ readonly description: string;
248
+ readonly responses: {
249
+ readonly 200: {
250
+ readonly description: "Service is ready.";
251
+ readonly content: {
252
+ readonly 'application/json': {
253
+ readonly schema: import("zod").ZodObject<{
254
+ status: import("zod").ZodLiteral<"ok">;
255
+ }, import("zod/v4/core").$strip>;
256
+ };
257
+ };
258
+ };
259
+ };
260
+ }>;
261
+ } & {
262
+ triggerDistribution: import("@polygonlabs/openapi-registry").MergedRoute<{
263
+ readonly operationId: "triggerDistribution";
264
+ readonly method: "post";
265
+ readonly path: "/v1/{network}/management/distributions";
266
+ readonly summary: "Trigger a new distribution run";
267
+ readonly description: string;
268
+ readonly security: [{
269
+ readonly ApiKeyAuth: [];
270
+ }];
271
+ readonly request: {
272
+ readonly params: import("zod").ZodObject<{
273
+ network: import("zod").ZodEnum<{
274
+ mainnet: "mainnet";
275
+ amoy: "amoy";
276
+ }>;
277
+ }, import("zod/v4/core").$strip>;
278
+ readonly body: {
279
+ readonly content: {
280
+ readonly 'application/json': {
281
+ readonly schema: import("zod").ZodObject<{
282
+ startPoSBlock: import("zod").ZodString;
283
+ endPoSBlock: import("zod").ZodString;
284
+ distributionId: import("zod").ZodOptional<import("zod").ZodString>;
285
+ force: import("zod").ZodOptional<import("zod").ZodBoolean>;
286
+ polUsdPrice: import("zod").ZodOptional<import("zod").ZodString>;
287
+ }, import("zod/v4/core").$strip>;
288
+ };
289
+ };
290
+ };
291
+ };
292
+ readonly responses: {
293
+ readonly 202: {
294
+ readonly description: "Trigger accepted. Status reflects the row at the moment of acceptance.";
295
+ readonly content: {
296
+ readonly 'application/json': {
297
+ readonly schema: import("zod").ZodObject<{
298
+ network: import("zod").ZodEnum<{
299
+ mainnet: "mainnet";
300
+ amoy: "amoy";
301
+ }>;
302
+ distributionId: import("zod").ZodString;
303
+ status: import("zod").ZodEnum<{
304
+ pending: "pending";
305
+ running: "running";
306
+ completed: "completed";
307
+ failed: "failed";
308
+ }>;
309
+ }, import("zod/v4/core").$strip>;
310
+ };
311
+ };
312
+ };
313
+ readonly 409: {
314
+ readonly description: "`force: true` on a non-terminal distribution.";
315
+ readonly content: {
316
+ readonly 'application/json': {
317
+ readonly schema: import("zod").ZodObject<{
318
+ error: import("zod").ZodLiteral<true>;
319
+ message: import("zod").ZodString;
320
+ info: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
321
+ }, import("zod/v4/core").$strip>;
322
+ };
323
+ };
324
+ };
325
+ };
326
+ }>;
327
+ } & {
328
+ deleteDistribution: import("@polygonlabs/openapi-registry").MergedRoute<{
329
+ readonly operationId: "deleteDistribution";
330
+ readonly method: "delete";
331
+ readonly path: "/v1/{network}/management/distributions/{distributionId}";
332
+ readonly summary: "Remove a stale distribution";
333
+ readonly description: string;
334
+ readonly security: [{
335
+ readonly ApiKeyAuth: [];
336
+ }];
337
+ readonly request: {
338
+ readonly params: import("zod").ZodObject<{
339
+ network: import("zod").ZodEnum<{
340
+ mainnet: "mainnet";
341
+ amoy: "amoy";
342
+ }>;
343
+ distributionId: import("zod").ZodString;
344
+ }, import("zod/v4/core").$strip>;
345
+ };
346
+ readonly responses: {
347
+ readonly 200: {
348
+ readonly description: "The distribution and its allocations were removed.";
349
+ readonly content: {
350
+ readonly 'application/json': {
351
+ readonly schema: import("zod").ZodObject<{
352
+ network: import("zod").ZodEnum<{
353
+ mainnet: "mainnet";
354
+ amoy: "amoy";
355
+ }>;
356
+ distributionId: import("zod").ZodString;
357
+ removed: import("zod").ZodBoolean;
358
+ priorStatus: import("zod").ZodEnum<{
359
+ pending: "pending";
360
+ running: "running";
361
+ failed: "failed";
362
+ }>;
363
+ deletedAllocations: import("zod").ZodNumber;
364
+ }, import("zod/v4/core").$strip>;
365
+ };
366
+ };
367
+ };
368
+ readonly 404: {
369
+ readonly description: "No distribution with that (network, id).";
370
+ readonly content: {
371
+ readonly 'application/json': {
372
+ readonly schema: import("zod").ZodObject<{
373
+ error: import("zod").ZodLiteral<true>;
374
+ message: import("zod").ZodString;
375
+ info: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
376
+ }, import("zod/v4/core").$strip>;
377
+ };
378
+ };
379
+ };
380
+ readonly 409: {
381
+ readonly description: "The distribution is `completed` and cannot be deleted.";
382
+ readonly content: {
383
+ readonly 'application/json': {
384
+ readonly schema: import("zod").ZodObject<{
385
+ error: import("zod").ZodLiteral<true>;
386
+ message: import("zod").ZodString;
387
+ info: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
388
+ }, import("zod/v4/core").$strip>;
389
+ };
390
+ };
391
+ };
392
+ };
393
+ }>;
394
+ } & {
395
+ listExcludedAddresses: import("@polygonlabs/openapi-registry").MergedRoute<{
396
+ readonly operationId: "listExcludedAddresses";
397
+ readonly method: "get";
398
+ readonly path: "/v1/{network}/management/excluded-addresses";
399
+ readonly summary: "List addresses excluded from the merkle tree (settled off-chain)";
400
+ readonly description: "Requires `x-api-key`. Returns the curated excluded-address list for the network.";
401
+ readonly security: [{
402
+ readonly ApiKeyAuth: [];
403
+ }];
404
+ readonly request: {
405
+ readonly params: import("zod").ZodObject<{
406
+ network: import("zod").ZodEnum<{
407
+ mainnet: "mainnet";
408
+ amoy: "amoy";
409
+ }>;
410
+ }, import("zod/v4/core").$strip>;
411
+ };
412
+ readonly responses: {
413
+ readonly 200: {
414
+ readonly description: "The excluded-address list.";
415
+ readonly content: {
416
+ readonly 'application/json': {
417
+ readonly schema: import("zod").ZodObject<{
418
+ items: import("zod").ZodArray<import("zod").ZodObject<{
419
+ network: import("zod").ZodEnum<{
420
+ mainnet: "mainnet";
421
+ amoy: "amoy";
422
+ }>;
423
+ label: import("zod").ZodString;
424
+ createdBy: import("zod").ZodString;
425
+ createdAt: import("zod").ZodISODateTime;
426
+ updatedAt: import("zod").ZodISODateTime;
427
+ address: import("zod").ZodString;
428
+ }, import("zod/v4/core").$strip>>;
429
+ }, import("zod/v4/core").$strip>;
430
+ };
431
+ };
432
+ };
433
+ };
434
+ }>;
435
+ } & {
436
+ addExcludedAddress: import("@polygonlabs/openapi-registry").MergedRoute<{
437
+ readonly operationId: "addExcludedAddress";
438
+ readonly method: "post";
439
+ readonly path: "/v1/{network}/management/excluded-addresses";
440
+ readonly summary: "Add (or re-label) an excluded address";
441
+ readonly description: string;
442
+ readonly security: [{
443
+ readonly ApiKeyAuth: [];
444
+ }];
445
+ readonly request: {
446
+ readonly params: import("zod").ZodObject<{
447
+ network: import("zod").ZodEnum<{
448
+ mainnet: "mainnet";
449
+ amoy: "amoy";
450
+ }>;
451
+ }, import("zod/v4/core").$strip>;
452
+ readonly body: {
453
+ readonly content: {
454
+ readonly 'application/json': {
455
+ readonly schema: import("zod").ZodObject<{
456
+ address: import("zod").ZodPipe<import("zod").ZodString, import("zod").ZodTransform<string, string>>;
457
+ label: import("zod").ZodString;
458
+ createdBy: import("zod").ZodOptional<import("zod").ZodString>;
459
+ }, import("zod/v4/core").$strip>;
460
+ };
461
+ };
462
+ };
463
+ };
464
+ readonly responses: {
465
+ readonly 200: {
466
+ readonly description: "The upserted excluded-address row.";
467
+ readonly content: {
468
+ readonly 'application/json': {
469
+ readonly schema: import("zod").ZodObject<{
470
+ network: import("zod").ZodEnum<{
471
+ mainnet: "mainnet";
472
+ amoy: "amoy";
473
+ }>;
474
+ label: import("zod").ZodString;
475
+ createdBy: import("zod").ZodString;
476
+ createdAt: import("zod").ZodISODateTime;
477
+ updatedAt: import("zod").ZodISODateTime;
478
+ address: import("zod").ZodString;
479
+ }, import("zod/v4/core").$strip>;
480
+ };
481
+ };
482
+ };
483
+ };
484
+ }>;
485
+ } & {
486
+ removeExcludedAddress: import("@polygonlabs/openapi-registry").MergedRoute<{
487
+ readonly operationId: "removeExcludedAddress";
488
+ readonly method: "delete";
489
+ readonly path: "/v1/{network}/management/excluded-addresses/{address}";
490
+ readonly summary: "Remove an excluded address";
491
+ readonly description: "Requires `x-api-key`. Idempotent — `removed: false` when the address was not present.";
492
+ readonly security: [{
493
+ readonly ApiKeyAuth: [];
494
+ }];
495
+ readonly request: {
496
+ readonly params: import("zod").ZodObject<{
497
+ network: import("zod").ZodEnum<{
498
+ mainnet: "mainnet";
499
+ amoy: "amoy";
500
+ }>;
501
+ address: import("zod").ZodPipe<import("zod").ZodString, import("zod").ZodTransform<string, string>>;
502
+ }, import("zod/v4/core").$strip>;
503
+ };
504
+ readonly responses: {
505
+ readonly 200: {
506
+ readonly description: "Removal result.";
507
+ readonly content: {
508
+ readonly 'application/json': {
509
+ readonly schema: import("zod").ZodObject<{
510
+ network: import("zod").ZodEnum<{
511
+ mainnet: "mainnet";
512
+ amoy: "amoy";
513
+ }>;
514
+ removed: import("zod").ZodBoolean;
515
+ address: import("zod").ZodString;
516
+ }, import("zod/v4/core").$strip>;
517
+ };
518
+ };
519
+ };
520
+ };
521
+ }>;
522
+ }, {
523
+ ApiKeyAuth: true;
524
+ }>;
525
+ //# sourceMappingURL=registry-management.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registry-management.d.ts","sourceRoot":"","sources":["../src/registry-management.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAmB9D,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgBD,CAAC"}
@@ -0,0 +1,33 @@
1
+ import { TypedRegistry } from '@polygonlabs/openapi-registry';
2
+ import { addManagementDistributionRoutes } from "./routes-management/distributions.js";
3
+ import { addExcludedAddressRoutes } from "./routes-management/excluded-addresses.js";
4
+ import { addOperationalRoutes } from "./routes-management/operational.js";
5
+ // Registry composition for the WORKER service's management surface (the
6
+ // public read API has its own registry). `TypedRegistry` accumulates the
7
+ // registered operations and security schemes into its *type* via chained
8
+ // method returns — the chain's final value is what `buildManagementRegistry`
9
+ // returns, and the worker derives the registry-driven router, the typed
10
+ // handler binding (`HandlerMapFor<typeof buildManagementRegistry, ...>`),
11
+ // and the served OpenAPI document from that one inferred type.
12
+ //
13
+ // One chained expression on purpose: discarding any link's return drops the
14
+ // type-level narrow even though the runtime registration still happens (see
15
+ // @polygonlabs/openapi-registry's "The one rule"). To add a route, append a
16
+ // `.registerPath({...})` inside the relevant helper under
17
+ // `./routes-management/`, or add a new domain helper and `.with(...)` here.
18
+ export const buildManagementRegistry = () => new TypedRegistry()
19
+ // Operations opt in via `security: [{ ApiKeyAuth: [] }]`; the
20
+ // registry-driven router then requires an `ApiKeyAuth` handler at
21
+ // compile time and runs it before request validation. The operational
22
+ // probes declare no security and stay unauthenticated.
23
+ .registerSecurityScheme('ApiKeyAuth', {
24
+ type: 'apiKey',
25
+ in: 'header',
26
+ name: 'x-api-key',
27
+ description: 'Management API key (`MANAGEMENT_API_KEY`, Secret-Manager-backed). ' +
28
+ 'Required on every management operation.'
29
+ })
30
+ .with(addOperationalRoutes)
31
+ .with(addManagementDistributionRoutes)
32
+ .with(addExcludedAddressRoutes);
33
+ //# sourceMappingURL=registry-management.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registry-management.js","sourceRoot":"","sources":["../src/registry-management.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAE9D,OAAO,EAAE,+BAA+B,EAAE,MAAM,sCAAsC,CAAC;AACvF,OAAO,EAAE,wBAAwB,EAAE,MAAM,2CAA2C,CAAC;AACrF,OAAO,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAE1E,wEAAwE;AACxE,yEAAyE;AACzE,yEAAyE;AACzE,6EAA6E;AAC7E,wEAAwE;AACxE,0EAA0E;AAC1E,+DAA+D;AAC/D,EAAE;AACF,4EAA4E;AAC5E,4EAA4E;AAC5E,4EAA4E;AAC5E,0DAA0D;AAC1D,4EAA4E;AAC5E,MAAM,CAAC,MAAM,uBAAuB,GAAG,GAAG,EAAE,CAC1C,IAAI,aAAa,EAAE;IACjB,8DAA8D;IAC9D,kEAAkE;IAClE,sEAAsE;IACtE,uDAAuD;KACtD,sBAAsB,CAAC,YAAY,EAAE;IACpC,IAAI,EAAE,QAAQ;IACd,EAAE,EAAE,QAAQ;IACZ,IAAI,EAAE,WAAW;IACjB,WAAW,EACT,oEAAoE;QACpE,yCAAyC;CAC5C,CAAC;KACD,IAAI,CAAC,oBAAoB,CAAC;KAC1B,IAAI,CAAC,+BAA+B,CAAC;KACrC,IAAI,CAAC,wBAAwB,CAAC,CAAC"}