tapimo 0.4.4 → 0.5.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 (162) hide show
  1. package/dist/App.d.ts +7403 -6127
  2. package/dist/App.d.ts.map +1 -1
  3. package/dist/App.js +4 -0
  4. package/dist/App.js.map +1 -1
  5. package/dist/Scope.d.ts +18 -1
  6. package/dist/Scope.d.ts.map +1 -1
  7. package/dist/Scope.js +24 -3
  8. package/dist/Scope.js.map +1 -1
  9. package/dist/admin/apps/verified-tokens.d.ts +115 -115
  10. package/dist/apps/data/App.d.ts +1838 -1534
  11. package/dist/apps/data/App.d.ts.map +1 -1
  12. package/dist/apps/data/App.js +135 -44
  13. package/dist/apps/data/App.js.map +1 -1
  14. package/dist/apps/data/{FundingRouteProviders.d.ts → FundingQuoteProviders.d.ts} +7 -7
  15. package/dist/apps/data/{FundingRouteProviders.d.ts.map → FundingQuoteProviders.d.ts.map} +1 -1
  16. package/dist/apps/data/{FundingRouteProviders.js → FundingQuoteProviders.js} +36 -91
  17. package/dist/apps/data/FundingQuoteProviders.js.map +1 -0
  18. package/dist/apps/data/index.d.ts +1 -1
  19. package/dist/apps/data/index.js +1 -1
  20. package/dist/apps/data/routes/activities.d.ts +242 -242
  21. package/dist/apps/data/routes/addresses.d.ts +227 -227
  22. package/dist/apps/data/routes/balances.d.ts +12 -12
  23. package/dist/apps/data/routes/balances.d.ts.map +1 -1
  24. package/dist/apps/data/routes/balances.js +67 -149
  25. package/dist/apps/data/routes/balances.js.map +1 -1
  26. package/dist/apps/data/routes/blocks.d.ts +125 -126
  27. package/dist/apps/data/routes/blocks.d.ts.map +1 -1
  28. package/dist/apps/data/routes/blocks.js +3 -5
  29. package/dist/apps/data/routes/blocks.js.map +1 -1
  30. package/dist/apps/data/routes/coingecko.d.ts +55 -54
  31. package/dist/apps/data/routes/coingecko.d.ts.map +1 -1
  32. package/dist/apps/data/routes/coingecko.js +3 -8
  33. package/dist/apps/data/routes/coingecko.js.map +1 -1
  34. package/dist/apps/data/routes/funding.d.ts +207 -388
  35. package/dist/apps/data/routes/funding.d.ts.map +1 -1
  36. package/dist/apps/data/routes/funding.js +143 -221
  37. package/dist/apps/data/routes/funding.js.map +1 -1
  38. package/dist/apps/data/routes/rpc.d.ts.map +1 -1
  39. package/dist/apps/data/routes/rpc.js +86 -16
  40. package/dist/apps/data/routes/rpc.js.map +1 -1
  41. package/dist/apps/data/routes/tokenlist.d.ts +33 -33
  42. package/dist/apps/data/routes/transactions.d.ts +281 -281
  43. package/dist/apps/data/routes/transfers.d.ts +58 -58
  44. package/dist/apps/data/routes/verified-tokens.d.ts +86 -86
  45. package/dist/apps/data/routes/webhooks.d.ts +340 -0
  46. package/dist/apps/data/routes/webhooks.d.ts.map +1 -1
  47. package/dist/apps/data/routes/webhooks.js +13 -1
  48. package/dist/apps/data/routes/webhooks.js.map +1 -1
  49. package/dist/apps/index.d.ts +1 -1
  50. package/dist/apps/index.js +1 -1
  51. package/dist/apps/management/App.d.ts +1090 -108
  52. package/dist/apps/management/App.d.ts.map +1 -1
  53. package/dist/apps/management/App.js +4 -0
  54. package/dist/apps/management/App.js.map +1 -1
  55. package/dist/apps/management/routes/api-keys.d.ts +118 -118
  56. package/dist/apps/management/routes/api-keys.js +2 -2
  57. package/dist/apps/management/routes/api-keys.js.map +1 -1
  58. package/dist/apps/management/routes/billing.d.ts +207 -207
  59. package/dist/apps/management/routes/invite-links.d.ts +1100 -0
  60. package/dist/apps/management/routes/invite-links.d.ts.map +1 -0
  61. package/dist/apps/management/routes/invite-links.js +411 -0
  62. package/dist/apps/management/routes/invite-links.js.map +1 -0
  63. package/dist/apps/management/routes/me.d.ts +17 -17
  64. package/dist/apps/management/routes/members.d.ts +71 -71
  65. package/dist/apps/management/routes/orgs.d.ts +12 -12
  66. package/dist/apps/management/routes/projects.d.ts +70 -70
  67. package/dist/apps/management/routes/scopes.d.ts +11 -11
  68. package/dist/apps/management/routes/scopes.d.ts.map +1 -1
  69. package/dist/apps/management/routes/scopes.js +2 -2
  70. package/dist/apps/management/routes/scopes.js.map +1 -1
  71. package/dist/apps/management/routes/usage.d.ts +75 -75
  72. package/dist/apps/relay/App.d.ts.map +1 -1
  73. package/dist/apps/relay/App.js +42 -4
  74. package/dist/apps/relay/App.js.map +1 -1
  75. package/dist/db/Db.d.ts +3 -0
  76. package/dist/db/Db.d.ts.map +1 -1
  77. package/dist/db/Db.js +57 -0
  78. package/dist/db/Db.js.map +1 -1
  79. package/dist/db/Schema.d.ts +31 -0
  80. package/dist/db/Schema.d.ts.map +1 -1
  81. package/dist/db/Schema.js +31 -0
  82. package/dist/db/Schema.js.map +1 -1
  83. package/dist/db/tables/inviteLinks.d.ts +42 -0
  84. package/dist/db/tables/inviteLinks.d.ts.map +1 -0
  85. package/dist/db/tables/inviteLinks.js +148 -0
  86. package/dist/db/tables/inviteLinks.js.map +1 -0
  87. package/dist/db/tables/organizations.d.ts.map +1 -1
  88. package/dist/db/tables/organizations.js +2 -0
  89. package/dist/db/tables/organizations.js.map +1 -1
  90. package/dist/handlers/relay.d.ts.map +1 -1
  91. package/dist/handlers/relay.js +13 -3
  92. package/dist/handlers/relay.js.map +1 -1
  93. package/dist/internal/Auth.d.ts +9 -1
  94. package/dist/internal/Auth.d.ts.map +1 -1
  95. package/dist/internal/Auth.js +130 -10
  96. package/dist/internal/Auth.js.map +1 -1
  97. package/dist/internal/EdgeCache.d.ts +3 -1
  98. package/dist/internal/EdgeCache.d.ts.map +1 -1
  99. package/dist/internal/EdgeCache.js +17 -2
  100. package/dist/internal/EdgeCache.js.map +1 -1
  101. package/dist/internal/{FundingRoutes.d.ts → FundingQuotes.d.ts} +185 -428
  102. package/dist/internal/FundingQuotes.d.ts.map +1 -0
  103. package/dist/internal/{FundingRoutes.js → FundingQuotes.js} +93 -218
  104. package/dist/internal/FundingQuotes.js.map +1 -0
  105. package/dist/internal/Viem.d.ts +3 -1
  106. package/dist/internal/Viem.d.ts.map +1 -1
  107. package/dist/internal/Viem.js +11 -2
  108. package/dist/internal/Viem.js.map +1 -1
  109. package/dist/internal/index.d.ts +1 -1
  110. package/dist/internal/index.js +1 -1
  111. package/package.json +1 -1
  112. package/src/ApiKeys.test.ts +23 -0
  113. package/src/App.test-d.ts +2 -0
  114. package/src/App.ts +6 -0
  115. package/src/Client.test-d.ts +20 -11
  116. package/src/Scope.test.ts +1 -0
  117. package/src/Scope.ts +30 -4
  118. package/src/apps/data/App.test.ts +354 -0
  119. package/src/apps/data/App.ts +159 -52
  120. package/src/apps/data/FundingQuoteProviders.test.ts +151 -0
  121. package/src/apps/data/{FundingRouteProviders.ts → FundingQuoteProviders.ts} +40 -101
  122. package/src/apps/data/index.ts +1 -1
  123. package/src/apps/data/routes/balances.test.ts +64 -18
  124. package/src/apps/data/routes/balances.ts +76 -177
  125. package/src/apps/data/routes/blocks.ts +3 -5
  126. package/src/apps/data/routes/coingecko.ts +3 -8
  127. package/src/apps/data/routes/funding.test.ts +151 -206
  128. package/src/apps/data/routes/funding.ts +156 -291
  129. package/src/apps/data/routes/indexer.test.ts +97 -1
  130. package/src/apps/data/routes/rpc.test.ts +219 -0
  131. package/src/apps/data/routes/rpc.ts +92 -17
  132. package/src/apps/data/routes/webhooks.test.ts +21 -0
  133. package/src/apps/data/routes/webhooks.ts +13 -1
  134. package/src/apps/index.ts +1 -1
  135. package/src/apps/management/App.ts +4 -0
  136. package/src/apps/management/routes/api-keys.test.ts +47 -3
  137. package/src/apps/management/routes/api-keys.ts +2 -2
  138. package/src/apps/management/routes/invite-links.test.ts +385 -0
  139. package/src/apps/management/routes/invite-links.ts +570 -0
  140. package/src/apps/management/routes/scopes.test.ts +3 -2
  141. package/src/apps/management/routes/scopes.ts +4 -2
  142. package/src/apps/relay/App.test.ts +324 -4
  143. package/src/apps/relay/App.ts +40 -4
  144. package/src/db/Db.ts +65 -0
  145. package/src/db/Schema.ts +39 -0
  146. package/src/db/tables/inviteLinks.ts +187 -0
  147. package/src/db/tables/organizations.ts +2 -0
  148. package/src/handlers/relay.ts +16 -4
  149. package/src/internal/Auth.test.ts +132 -22
  150. package/src/internal/Auth.ts +171 -14
  151. package/src/internal/EdgeCache.test.ts +24 -3
  152. package/src/internal/EdgeCache.ts +18 -2
  153. package/src/internal/FundingQuotes.test.ts +174 -0
  154. package/src/internal/{FundingRoutes.ts → FundingQuotes.ts} +153 -312
  155. package/src/internal/Viem.ts +14 -5
  156. package/src/internal/index.test.ts +1 -1
  157. package/src/internal/index.ts +1 -1
  158. package/dist/apps/data/FundingRouteProviders.js.map +0 -1
  159. package/dist/internal/FundingRoutes.d.ts.map +0 -1
  160. package/dist/internal/FundingRoutes.js.map +0 -1
  161. package/src/apps/data/FundingRouteProviders.test.ts +0 -225
  162. package/src/internal/FundingRoutes.test.ts +0 -213
@@ -128,21 +128,26 @@ export declare namespace schema {
128
128
  }
129
129
  }
130
130
  /**
131
- * Mounts project-attributed API key mint, list, and revoke routes plus the org-wide list. Access follows the caller's organization ownership.
131
+ * Mounts project-attributed API key mint, list, and revoke routes plus the org-wide list. Project routes enforce caller organization and project attribution.
132
132
  */
133
133
  export declare function apiKeys(options?: apiKeys.Options): import("hono/hono-base").HonoBase<App.Environment, {
134
134
  "/v1/orgs/:orgId{org_[A-Za-z0-9_-]+}/projects/:projectId{prj_[A-Za-z0-9_-]+}/api-keys": {
135
135
  $post: {
136
136
  output: {
137
- error: {
138
- code: "upstream_error";
139
- details?: readonly Response.error.Detail[] | undefined;
140
- message: string;
141
- };
142
- requestId: string;
137
+ createdAt: string;
138
+ createdBy?: string | undefined;
139
+ environment: "production" | "sandbox";
140
+ expiresAt?: string | undefined;
141
+ id: string;
142
+ name?: string | undefined;
143
+ orgId: string;
144
+ projectId?: string | undefined;
145
+ scopes: string[];
146
+ tokenLast4: string;
147
+ token: string;
143
148
  };
144
149
  outputFormat: "json";
145
- status: 502;
150
+ status: 200;
146
151
  input: {
147
152
  param: {
148
153
  orgId: string;
@@ -181,14 +186,14 @@ export declare function apiKeys(options?: apiKeys.Options): import("hono/hono-ba
181
186
  } | {
182
187
  output: {
183
188
  error: {
184
- code: "api_key_invalid" | "api_key_missing";
189
+ code: "param_invalid";
185
190
  details?: readonly Response.error.Detail[] | undefined;
186
191
  message: string;
187
192
  };
188
193
  requestId: string;
189
194
  };
190
195
  outputFormat: "json";
191
- status: 401;
196
+ status: 400;
192
197
  input: {
193
198
  param: {
194
199
  orgId: string;
@@ -204,14 +209,14 @@ export declare function apiKeys(options?: apiKeys.Options): import("hono/hono-ba
204
209
  } | {
205
210
  output: {
206
211
  error: {
207
- code: "forbidden";
212
+ code: "body_invalid";
208
213
  details?: readonly Response.error.Detail[] | undefined;
209
214
  message: string;
210
215
  };
211
216
  requestId: string;
212
217
  };
213
218
  outputFormat: "json";
214
- status: 403;
219
+ status: 400;
215
220
  input: {
216
221
  param: {
217
222
  orgId: string;
@@ -227,14 +232,14 @@ export declare function apiKeys(options?: apiKeys.Options): import("hono/hono-ba
227
232
  } | {
228
233
  output: {
229
234
  error: {
230
- code: "organization_not_found" | "project_not_found";
235
+ code: "api_key_invalid" | "api_key_missing";
231
236
  details?: readonly Response.error.Detail[] | undefined;
232
237
  message: string;
233
238
  };
234
239
  requestId: string;
235
240
  };
236
241
  outputFormat: "json";
237
- status: 404;
242
+ status: 401;
238
243
  input: {
239
244
  param: {
240
245
  orgId: string;
@@ -250,14 +255,14 @@ export declare function apiKeys(options?: apiKeys.Options): import("hono/hono-ba
250
255
  } | {
251
256
  output: {
252
257
  error: {
253
- code: "param_invalid";
258
+ code: "forbidden";
254
259
  details?: readonly Response.error.Detail[] | undefined;
255
260
  message: string;
256
261
  };
257
262
  requestId: string;
258
263
  };
259
264
  outputFormat: "json";
260
- status: 400;
265
+ status: 403;
261
266
  input: {
262
267
  param: {
263
268
  orgId: string;
@@ -273,14 +278,14 @@ export declare function apiKeys(options?: apiKeys.Options): import("hono/hono-ba
273
278
  } | {
274
279
  output: {
275
280
  error: {
276
- code: "body_invalid";
281
+ code: "scope_not_issuable";
277
282
  details?: readonly Response.error.Detail[] | undefined;
278
283
  message: string;
279
284
  };
280
285
  requestId: string;
281
286
  };
282
287
  outputFormat: "json";
283
- status: 400;
288
+ status: 403;
284
289
  input: {
285
290
  param: {
286
291
  orgId: string;
@@ -296,7 +301,7 @@ export declare function apiKeys(options?: apiKeys.Options): import("hono/hono-ba
296
301
  } | {
297
302
  output: {
298
303
  error: {
299
- code: "api_keys_not_enabled";
304
+ code: "organization_not_found" | "project_not_found";
300
305
  details?: readonly Response.error.Detail[] | undefined;
301
306
  message: string;
302
307
  };
@@ -319,14 +324,14 @@ export declare function apiKeys(options?: apiKeys.Options): import("hono/hono-ba
319
324
  } | {
320
325
  output: {
321
326
  error: {
322
- code: "scope_not_issuable";
327
+ code: "api_keys_not_enabled";
323
328
  details?: readonly Response.error.Detail[] | undefined;
324
329
  message: string;
325
330
  };
326
331
  requestId: string;
327
332
  };
328
333
  outputFormat: "json";
329
- status: 403;
334
+ status: 404;
330
335
  input: {
331
336
  param: {
332
337
  orgId: string;
@@ -341,20 +346,15 @@ export declare function apiKeys(options?: apiKeys.Options): import("hono/hono-ba
341
346
  };
342
347
  } | {
343
348
  output: {
344
- createdAt: string;
345
- createdBy?: string | undefined;
346
- environment: "production" | "sandbox";
347
- expiresAt?: string | undefined;
348
- id: string;
349
- name?: string | undefined;
350
- orgId: string;
351
- projectId?: string | undefined;
352
- scopes: string[];
353
- tokenLast4: string;
354
- token: string;
349
+ error: {
350
+ code: "upstream_error";
351
+ details?: readonly Response.error.Detail[] | undefined;
352
+ message: string;
353
+ };
354
+ requestId: string;
355
355
  };
356
356
  outputFormat: "json";
357
- status: 200;
357
+ status: 502;
358
358
  input: {
359
359
  param: {
360
360
  orgId: string;
@@ -373,15 +373,21 @@ export declare function apiKeys(options?: apiKeys.Options): import("hono/hono-ba
373
373
  "/v1/orgs/:orgId{org_[A-Za-z0-9_-]+}/projects/:projectId{prj_[A-Za-z0-9_-]+}/api-keys": {
374
374
  $get: {
375
375
  output: {
376
- error: {
377
- code: "upstream_error";
378
- details?: readonly Response.error.Detail[] | undefined;
379
- message: string;
380
- };
381
- requestId: string;
376
+ data: {
377
+ createdAt: string;
378
+ createdBy?: string | undefined;
379
+ environment: "production" | "sandbox";
380
+ expiresAt?: string | undefined;
381
+ id: string;
382
+ name?: string | undefined;
383
+ orgId: string;
384
+ projectId?: string | undefined;
385
+ scopes: string[];
386
+ tokenLast4: string;
387
+ }[];
382
388
  };
383
389
  outputFormat: "json";
384
- status: 502;
390
+ status: 200;
385
391
  input: {
386
392
  param: {
387
393
  orgId: string;
@@ -416,14 +422,14 @@ export declare function apiKeys(options?: apiKeys.Options): import("hono/hono-ba
416
422
  } | {
417
423
  output: {
418
424
  error: {
419
- code: "api_key_invalid" | "api_key_missing";
425
+ code: "query_invalid";
420
426
  details?: readonly Response.error.Detail[] | undefined;
421
427
  message: string;
422
428
  };
423
429
  requestId: string;
424
430
  };
425
431
  outputFormat: "json";
426
- status: 401;
432
+ status: 400;
427
433
  input: {
428
434
  param: {
429
435
  orgId: string;
@@ -437,14 +443,14 @@ export declare function apiKeys(options?: apiKeys.Options): import("hono/hono-ba
437
443
  } | {
438
444
  output: {
439
445
  error: {
440
- code: "api_key_forbidden";
446
+ code: "param_invalid";
441
447
  details?: readonly Response.error.Detail[] | undefined;
442
448
  message: string;
443
449
  };
444
450
  requestId: string;
445
451
  };
446
452
  outputFormat: "json";
447
- status: 403;
453
+ status: 400;
448
454
  input: {
449
455
  param: {
450
456
  orgId: string;
@@ -458,14 +464,14 @@ export declare function apiKeys(options?: apiKeys.Options): import("hono/hono-ba
458
464
  } | {
459
465
  output: {
460
466
  error: {
461
- code: "payment_required" | "rate_limit_exceeded";
467
+ code: "api_key_invalid" | "api_key_missing";
462
468
  details?: readonly Response.error.Detail[] | undefined;
463
469
  message: string;
464
470
  };
465
471
  requestId: string;
466
472
  };
467
473
  outputFormat: "json";
468
- status: 429;
474
+ status: 401;
469
475
  input: {
470
476
  param: {
471
477
  orgId: string;
@@ -479,14 +485,14 @@ export declare function apiKeys(options?: apiKeys.Options): import("hono/hono-ba
479
485
  } | {
480
486
  output: {
481
487
  error: {
482
- code: "query_invalid";
488
+ code: "api_key_forbidden";
483
489
  details?: readonly Response.error.Detail[] | undefined;
484
490
  message: string;
485
491
  };
486
492
  requestId: string;
487
493
  };
488
494
  outputFormat: "json";
489
- status: 400;
495
+ status: 403;
490
496
  input: {
491
497
  param: {
492
498
  orgId: string;
@@ -521,14 +527,14 @@ export declare function apiKeys(options?: apiKeys.Options): import("hono/hono-ba
521
527
  } | {
522
528
  output: {
523
529
  error: {
524
- code: "param_invalid";
530
+ code: "api_keys_not_enabled";
525
531
  details?: readonly Response.error.Detail[] | undefined;
526
532
  message: string;
527
533
  };
528
534
  requestId: string;
529
535
  };
530
536
  outputFormat: "json";
531
- status: 400;
537
+ status: 404;
532
538
  input: {
533
539
  param: {
534
540
  orgId: string;
@@ -542,14 +548,14 @@ export declare function apiKeys(options?: apiKeys.Options): import("hono/hono-ba
542
548
  } | {
543
549
  output: {
544
550
  error: {
545
- code: "api_keys_not_enabled";
551
+ code: "payment_required" | "rate_limit_exceeded";
546
552
  details?: readonly Response.error.Detail[] | undefined;
547
553
  message: string;
548
554
  };
549
555
  requestId: string;
550
556
  };
551
557
  outputFormat: "json";
552
- status: 404;
558
+ status: 429;
553
559
  input: {
554
560
  param: {
555
561
  orgId: string;
@@ -562,21 +568,15 @@ export declare function apiKeys(options?: apiKeys.Options): import("hono/hono-ba
562
568
  };
563
569
  } | {
564
570
  output: {
565
- data: {
566
- createdAt: string;
567
- createdBy?: string | undefined;
568
- environment: "production" | "sandbox";
569
- expiresAt?: string | undefined;
570
- id: string;
571
- name?: string | undefined;
572
- orgId: string;
573
- projectId?: string | undefined;
574
- scopes: string[];
575
- tokenLast4: string;
576
- }[];
571
+ error: {
572
+ code: "upstream_error";
573
+ details?: readonly Response.error.Detail[] | undefined;
574
+ message: string;
575
+ };
576
+ requestId: string;
577
577
  };
578
578
  outputFormat: "json";
579
- status: 200;
579
+ status: 502;
580
580
  input: {
581
581
  param: {
582
582
  orgId: string;
@@ -593,15 +593,21 @@ export declare function apiKeys(options?: apiKeys.Options): import("hono/hono-ba
593
593
  "/v1/orgs/:orgId{org_[A-Za-z0-9_-]+}/api-keys": {
594
594
  $get: {
595
595
  output: {
596
- error: {
597
- code: "upstream_error";
598
- details?: readonly Response.error.Detail[] | undefined;
599
- message: string;
600
- };
601
- requestId: string;
596
+ data: {
597
+ createdAt: string;
598
+ createdBy?: string | undefined;
599
+ environment: "production" | "sandbox";
600
+ expiresAt?: string | undefined;
601
+ id: string;
602
+ name?: string | undefined;
603
+ orgId: string;
604
+ projectId?: string | undefined;
605
+ scopes: string[];
606
+ tokenLast4: string;
607
+ }[];
602
608
  };
603
609
  outputFormat: "json";
604
- status: 502;
610
+ status: 200;
605
611
  input: {
606
612
  param: {
607
613
  orgId: string;
@@ -634,14 +640,14 @@ export declare function apiKeys(options?: apiKeys.Options): import("hono/hono-ba
634
640
  } | {
635
641
  output: {
636
642
  error: {
637
- code: "api_key_invalid" | "api_key_missing";
643
+ code: "query_invalid";
638
644
  details?: readonly Response.error.Detail[] | undefined;
639
645
  message: string;
640
646
  };
641
647
  requestId: string;
642
648
  };
643
649
  outputFormat: "json";
644
- status: 401;
650
+ status: 400;
645
651
  input: {
646
652
  param: {
647
653
  orgId: string;
@@ -654,14 +660,14 @@ export declare function apiKeys(options?: apiKeys.Options): import("hono/hono-ba
654
660
  } | {
655
661
  output: {
656
662
  error: {
657
- code: "api_key_forbidden";
663
+ code: "param_invalid";
658
664
  details?: readonly Response.error.Detail[] | undefined;
659
665
  message: string;
660
666
  };
661
667
  requestId: string;
662
668
  };
663
669
  outputFormat: "json";
664
- status: 403;
670
+ status: 400;
665
671
  input: {
666
672
  param: {
667
673
  orgId: string;
@@ -674,14 +680,14 @@ export declare function apiKeys(options?: apiKeys.Options): import("hono/hono-ba
674
680
  } | {
675
681
  output: {
676
682
  error: {
677
- code: "payment_required" | "rate_limit_exceeded";
683
+ code: "api_key_invalid" | "api_key_missing";
678
684
  details?: readonly Response.error.Detail[] | undefined;
679
685
  message: string;
680
686
  };
681
687
  requestId: string;
682
688
  };
683
689
  outputFormat: "json";
684
- status: 429;
690
+ status: 401;
685
691
  input: {
686
692
  param: {
687
693
  orgId: string;
@@ -694,14 +700,14 @@ export declare function apiKeys(options?: apiKeys.Options): import("hono/hono-ba
694
700
  } | {
695
701
  output: {
696
702
  error: {
697
- code: "query_invalid";
703
+ code: "api_key_forbidden";
698
704
  details?: readonly Response.error.Detail[] | undefined;
699
705
  message: string;
700
706
  };
701
707
  requestId: string;
702
708
  };
703
709
  outputFormat: "json";
704
- status: 400;
710
+ status: 403;
705
711
  input: {
706
712
  param: {
707
713
  orgId: string;
@@ -714,14 +720,14 @@ export declare function apiKeys(options?: apiKeys.Options): import("hono/hono-ba
714
720
  } | {
715
721
  output: {
716
722
  error: {
717
- code: "param_invalid";
723
+ code: "api_keys_not_enabled";
718
724
  details?: readonly Response.error.Detail[] | undefined;
719
725
  message: string;
720
726
  };
721
727
  requestId: string;
722
728
  };
723
729
  outputFormat: "json";
724
- status: 400;
730
+ status: 404;
725
731
  input: {
726
732
  param: {
727
733
  orgId: string;
@@ -734,7 +740,7 @@ export declare function apiKeys(options?: apiKeys.Options): import("hono/hono-ba
734
740
  } | {
735
741
  output: {
736
742
  error: {
737
- code: "api_keys_not_enabled";
743
+ code: "organization_not_found";
738
744
  details?: readonly Response.error.Detail[] | undefined;
739
745
  message: string;
740
746
  };
@@ -754,14 +760,14 @@ export declare function apiKeys(options?: apiKeys.Options): import("hono/hono-ba
754
760
  } | {
755
761
  output: {
756
762
  error: {
757
- code: "organization_not_found";
763
+ code: "payment_required" | "rate_limit_exceeded";
758
764
  details?: readonly Response.error.Detail[] | undefined;
759
765
  message: string;
760
766
  };
761
767
  requestId: string;
762
768
  };
763
769
  outputFormat: "json";
764
- status: 404;
770
+ status: 429;
765
771
  input: {
766
772
  param: {
767
773
  orgId: string;
@@ -773,21 +779,15 @@ export declare function apiKeys(options?: apiKeys.Options): import("hono/hono-ba
773
779
  };
774
780
  } | {
775
781
  output: {
776
- data: {
777
- createdAt: string;
778
- createdBy?: string | undefined;
779
- environment: "production" | "sandbox";
780
- expiresAt?: string | undefined;
781
- id: string;
782
- name?: string | undefined;
783
- orgId: string;
784
- projectId?: string | undefined;
785
- scopes: string[];
786
- tokenLast4: string;
787
- }[];
782
+ error: {
783
+ code: "upstream_error";
784
+ details?: readonly Response.error.Detail[] | undefined;
785
+ message: string;
786
+ };
787
+ requestId: string;
788
788
  };
789
789
  outputFormat: "json";
790
- status: 200;
790
+ status: 502;
791
791
  input: {
792
792
  param: {
793
793
  orgId: string;
@@ -803,15 +803,10 @@ export declare function apiKeys(options?: apiKeys.Options): import("hono/hono-ba
803
803
  "/v1/orgs/:orgId{org_[A-Za-z0-9_-]+}/projects/:projectId{prj_[A-Za-z0-9_-]+}/api-keys/:keyId{key_[A-Za-z0-9_-]+}": {
804
804
  $delete: {
805
805
  output: {
806
- error: {
807
- code: "upstream_error";
808
- details?: readonly Response.error.Detail[] | undefined;
809
- message: string;
810
- };
811
- requestId: string;
806
+ id: string;
812
807
  };
813
808
  outputFormat: "json";
814
- status: 502;
809
+ status: 200;
815
810
  input: {
816
811
  param: {
817
812
  keyId: string;
@@ -840,14 +835,14 @@ export declare function apiKeys(options?: apiKeys.Options): import("hono/hono-ba
840
835
  } | {
841
836
  output: {
842
837
  error: {
843
- code: "api_key_invalid" | "api_key_missing";
838
+ code: "param_invalid";
844
839
  details?: readonly Response.error.Detail[] | undefined;
845
840
  message: string;
846
841
  };
847
842
  requestId: string;
848
843
  };
849
844
  outputFormat: "json";
850
- status: 401;
845
+ status: 400;
851
846
  input: {
852
847
  param: {
853
848
  keyId: string;
@@ -858,14 +853,14 @@ export declare function apiKeys(options?: apiKeys.Options): import("hono/hono-ba
858
853
  } | {
859
854
  output: {
860
855
  error: {
861
- code: "api_key_forbidden";
856
+ code: "api_key_invalid" | "api_key_missing";
862
857
  details?: readonly Response.error.Detail[] | undefined;
863
858
  message: string;
864
859
  };
865
860
  requestId: string;
866
861
  };
867
862
  outputFormat: "json";
868
- status: 403;
863
+ status: 401;
869
864
  input: {
870
865
  param: {
871
866
  keyId: string;
@@ -876,14 +871,14 @@ export declare function apiKeys(options?: apiKeys.Options): import("hono/hono-ba
876
871
  } | {
877
872
  output: {
878
873
  error: {
879
- code: "payment_required" | "rate_limit_exceeded";
874
+ code: "api_key_forbidden";
880
875
  details?: readonly Response.error.Detail[] | undefined;
881
876
  message: string;
882
877
  };
883
878
  requestId: string;
884
879
  };
885
880
  outputFormat: "json";
886
- status: 429;
881
+ status: 403;
887
882
  input: {
888
883
  param: {
889
884
  keyId: string;
@@ -912,14 +907,14 @@ export declare function apiKeys(options?: apiKeys.Options): import("hono/hono-ba
912
907
  } | {
913
908
  output: {
914
909
  error: {
915
- code: "param_invalid";
910
+ code: "api_keys_not_enabled";
916
911
  details?: readonly Response.error.Detail[] | undefined;
917
912
  message: string;
918
913
  };
919
914
  requestId: string;
920
915
  };
921
916
  outputFormat: "json";
922
- status: 400;
917
+ status: 404;
923
918
  input: {
924
919
  param: {
925
920
  keyId: string;
@@ -930,7 +925,7 @@ export declare function apiKeys(options?: apiKeys.Options): import("hono/hono-ba
930
925
  } | {
931
926
  output: {
932
927
  error: {
933
- code: "api_keys_not_enabled";
928
+ code: "api_key_not_found";
934
929
  details?: readonly Response.error.Detail[] | undefined;
935
930
  message: string;
936
931
  };
@@ -948,14 +943,14 @@ export declare function apiKeys(options?: apiKeys.Options): import("hono/hono-ba
948
943
  } | {
949
944
  output: {
950
945
  error: {
951
- code: "api_key_not_found";
946
+ code: "payment_required" | "rate_limit_exceeded";
952
947
  details?: readonly Response.error.Detail[] | undefined;
953
948
  message: string;
954
949
  };
955
950
  requestId: string;
956
951
  };
957
952
  outputFormat: "json";
958
- status: 404;
953
+ status: 429;
959
954
  input: {
960
955
  param: {
961
956
  keyId: string;
@@ -965,10 +960,15 @@ export declare function apiKeys(options?: apiKeys.Options): import("hono/hono-ba
965
960
  };
966
961
  } | {
967
962
  output: {
968
- id: string;
963
+ error: {
964
+ code: "upstream_error";
965
+ details?: readonly Response.error.Detail[] | undefined;
966
+ message: string;
967
+ };
968
+ requestId: string;
969
969
  };
970
970
  outputFormat: "json";
971
- status: 200;
971
+ status: 502;
972
972
  input: {
973
973
  param: {
974
974
  keyId: string;
@@ -38,7 +38,7 @@ export var schema;
38
38
  z.meta({ examples: ['prj_1a2b3c4d5e6f7g8h9j0k1m2n'] })),
39
39
  scopes: z
40
40
  .array(z.string().check(z.minLength(1)))
41
- .check(z.describe("Granted scopes. '*' (grant-all) appears only on keys minted by the super admin."), z.meta({ examples: [['data:read']] })),
41
+ .check(z.describe("Granted scopes. '*' and non-self-serve scopes appear only on keys minted by the super admin."), z.meta({ examples: [['data:read']] })),
42
42
  tokenLast4: z
43
43
  .string()
44
44
  .check(z.describe('Last 4 characters of the plaintext token.'), z.meta({ examples: ['a1b2'] })),
@@ -140,7 +140,7 @@ export var schema;
140
140
  })(revokeApiKey = schema.revokeApiKey || (schema.revokeApiKey = {}));
141
141
  })(schema || (schema = {}));
142
142
  /**
143
- * Mounts project-attributed API key mint, list, and revoke routes plus the org-wide list. Access follows the caller's organization ownership.
143
+ * Mounts project-attributed API key mint, list, and revoke routes plus the org-wide list. Project routes enforce caller organization and project attribution.
144
144
  */
145
145
  export function apiKeys(options = {}) {
146
146
  const hidden = !options.enabled;