@kya-os/contracts 1.3.3 → 1.3.5

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 (66) hide show
  1. package/package.json +3 -2
  2. package/README.md +0 -130
  3. package/dist/agentshield-api/endpoints.d.ts +0 -21
  4. package/dist/agentshield-api/endpoints.js +0 -20
  5. package/dist/agentshield-api/index.d.ts +0 -5
  6. package/dist/agentshield-api/index.js +0 -27
  7. package/dist/agentshield-api/schemas.d.ts +0 -9846
  8. package/dist/agentshield-api/schemas.js +0 -92
  9. package/dist/agentshield-api/types.d.ts +0 -92
  10. package/dist/agentshield-api/types.js +0 -12
  11. package/dist/config/base.d.ts +0 -19
  12. package/dist/config/base.js +0 -2
  13. package/dist/config/delegation.d.ts +0 -46
  14. package/dist/config/delegation.js +0 -2
  15. package/dist/config/identity.d.ts +0 -22
  16. package/dist/config/identity.js +0 -2
  17. package/dist/config/index.d.ts +0 -17
  18. package/dist/config/index.js +0 -2
  19. package/dist/config/proofing.d.ts +0 -26
  20. package/dist/config/proofing.js +0 -2
  21. package/dist/config/tool-protection.d.ts +0 -36
  22. package/dist/config/tool-protection.js +0 -2
  23. package/dist/delegation/constraints.d.ts +0 -726
  24. package/dist/delegation/constraints.js +0 -103
  25. package/dist/delegation/index.d.ts +0 -2
  26. package/dist/delegation/index.js +0 -18
  27. package/dist/delegation/schemas.d.ts +0 -8042
  28. package/dist/delegation/schemas.js +0 -232
  29. package/dist/did/index.d.ts +0 -3
  30. package/dist/did/index.js +0 -19
  31. package/dist/did/resolve-contract.d.ts +0 -53
  32. package/dist/did/resolve-contract.js +0 -12
  33. package/dist/did/schemas.d.ts +0 -33
  34. package/dist/did/schemas.js +0 -80
  35. package/dist/did/types.d.ts +0 -38
  36. package/dist/did/types.js +0 -37
  37. package/dist/env/constants.d.ts +0 -13
  38. package/dist/env/constants.js +0 -15
  39. package/dist/env/index.d.ts +0 -1
  40. package/dist/env/index.js +0 -17
  41. package/dist/proof/index.d.ts +0 -2
  42. package/dist/proof/index.js +0 -18
  43. package/dist/proof/proof-record.d.ts +0 -728
  44. package/dist/proof/proof-record.js +0 -60
  45. package/dist/proof/signing-spec.d.ts +0 -73
  46. package/dist/proof/signing-spec.js +0 -52
  47. package/dist/runtime/errors.d.ts +0 -179
  48. package/dist/runtime/errors.js +0 -51
  49. package/dist/runtime/headers.d.ts +0 -34
  50. package/dist/runtime/headers.js +0 -52
  51. package/dist/runtime/index.d.ts +0 -2
  52. package/dist/runtime/index.js +0 -18
  53. package/dist/tlkrc/index.d.ts +0 -1
  54. package/dist/tlkrc/index.js +0 -17
  55. package/dist/tlkrc/rotation.d.ts +0 -168
  56. package/dist/tlkrc/rotation.js +0 -55
  57. package/dist/tool-protection/index.d.ts +0 -129
  58. package/dist/tool-protection/index.js +0 -80
  59. package/dist/vc/index.d.ts +0 -2
  60. package/dist/vc/index.js +0 -18
  61. package/dist/vc/schemas.d.ts +0 -1888
  62. package/dist/vc/schemas.js +0 -116
  63. package/dist/vc/statuslist.d.ts +0 -292
  64. package/dist/vc/statuslist.js +0 -61
  65. package/dist/well-known/index.d.ts +0 -248
  66. package/dist/well-known/index.js +0 -104
@@ -1,726 +0,0 @@
1
- import { z } from 'zod';
2
- export declare const CurrencySchema: z.ZodEnum<["USD", "ops", "points"]>;
3
- export type Currency = z.infer<typeof CurrencySchema>;
4
- export declare const WindowKindSchema: z.ZodEnum<["rolling", "fixed"]>;
5
- export type WindowKind = z.infer<typeof WindowKindSchema>;
6
- export declare const BudgetWindowSchema: z.ZodObject<{
7
- kind: z.ZodEnum<["rolling", "fixed"]>;
8
- durationSec: z.ZodNumber;
9
- }, "strip", z.ZodTypeAny, {
10
- kind: "rolling" | "fixed";
11
- durationSec: number;
12
- }, {
13
- kind: "rolling" | "fixed";
14
- durationSec: number;
15
- }>;
16
- export type BudgetWindow = z.infer<typeof BudgetWindowSchema>;
17
- export declare const CrispBudgetSchema: z.ZodObject<{
18
- unit: z.ZodEnum<["USD", "ops", "points"]>;
19
- cap: z.ZodNumber;
20
- window: z.ZodOptional<z.ZodObject<{
21
- kind: z.ZodEnum<["rolling", "fixed"]>;
22
- durationSec: z.ZodNumber;
23
- }, "strip", z.ZodTypeAny, {
24
- kind: "rolling" | "fixed";
25
- durationSec: number;
26
- }, {
27
- kind: "rolling" | "fixed";
28
- durationSec: number;
29
- }>>;
30
- }, "strip", z.ZodTypeAny, {
31
- unit: "USD" | "ops" | "points";
32
- cap: number;
33
- window?: {
34
- kind: "rolling" | "fixed";
35
- durationSec: number;
36
- } | undefined;
37
- }, {
38
- unit: "USD" | "ops" | "points";
39
- cap: number;
40
- window?: {
41
- kind: "rolling" | "fixed";
42
- durationSec: number;
43
- } | undefined;
44
- }>;
45
- export type CrispBudget = z.infer<typeof CrispBudgetSchema>;
46
- export declare const ScopeMatcherSchema: z.ZodEnum<["exact", "prefix", "regex"]>;
47
- export type ScopeMatcher = z.infer<typeof ScopeMatcherSchema>;
48
- export declare const CrispScopeSchema: z.ZodObject<{
49
- resource: z.ZodString;
50
- matcher: z.ZodEnum<["exact", "prefix", "regex"]>;
51
- constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
52
- }, "strip", z.ZodTypeAny, {
53
- resource: string;
54
- matcher: "exact" | "prefix" | "regex";
55
- constraints?: Record<string, any> | undefined;
56
- }, {
57
- resource: string;
58
- matcher: "exact" | "prefix" | "regex";
59
- constraints?: Record<string, any> | undefined;
60
- }>;
61
- export type CrispScope = z.infer<typeof CrispScopeSchema>;
62
- export declare const DelegationConstraintsSchema: z.ZodObject<{
63
- notBefore: z.ZodOptional<z.ZodNumber>;
64
- notAfter: z.ZodOptional<z.ZodNumber>;
65
- scopes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
66
- crisp: z.ZodOptional<z.ZodObject<{
67
- budget: z.ZodOptional<z.ZodObject<{
68
- unit: z.ZodEnum<["USD", "ops", "points"]>;
69
- cap: z.ZodNumber;
70
- window: z.ZodOptional<z.ZodObject<{
71
- kind: z.ZodEnum<["rolling", "fixed"]>;
72
- durationSec: z.ZodNumber;
73
- }, "strip", z.ZodTypeAny, {
74
- kind: "rolling" | "fixed";
75
- durationSec: number;
76
- }, {
77
- kind: "rolling" | "fixed";
78
- durationSec: number;
79
- }>>;
80
- }, "strip", z.ZodTypeAny, {
81
- unit: "USD" | "ops" | "points";
82
- cap: number;
83
- window?: {
84
- kind: "rolling" | "fixed";
85
- durationSec: number;
86
- } | undefined;
87
- }, {
88
- unit: "USD" | "ops" | "points";
89
- cap: number;
90
- window?: {
91
- kind: "rolling" | "fixed";
92
- durationSec: number;
93
- } | undefined;
94
- }>>;
95
- scopes: z.ZodArray<z.ZodObject<{
96
- resource: z.ZodString;
97
- matcher: z.ZodEnum<["exact", "prefix", "regex"]>;
98
- constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
99
- }, "strip", z.ZodTypeAny, {
100
- resource: string;
101
- matcher: "exact" | "prefix" | "regex";
102
- constraints?: Record<string, any> | undefined;
103
- }, {
104
- resource: string;
105
- matcher: "exact" | "prefix" | "regex";
106
- constraints?: Record<string, any> | undefined;
107
- }>, "many">;
108
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
109
- budget: z.ZodOptional<z.ZodObject<{
110
- unit: z.ZodEnum<["USD", "ops", "points"]>;
111
- cap: z.ZodNumber;
112
- window: z.ZodOptional<z.ZodObject<{
113
- kind: z.ZodEnum<["rolling", "fixed"]>;
114
- durationSec: z.ZodNumber;
115
- }, "strip", z.ZodTypeAny, {
116
- kind: "rolling" | "fixed";
117
- durationSec: number;
118
- }, {
119
- kind: "rolling" | "fixed";
120
- durationSec: number;
121
- }>>;
122
- }, "strip", z.ZodTypeAny, {
123
- unit: "USD" | "ops" | "points";
124
- cap: number;
125
- window?: {
126
- kind: "rolling" | "fixed";
127
- durationSec: number;
128
- } | undefined;
129
- }, {
130
- unit: "USD" | "ops" | "points";
131
- cap: number;
132
- window?: {
133
- kind: "rolling" | "fixed";
134
- durationSec: number;
135
- } | undefined;
136
- }>>;
137
- scopes: z.ZodArray<z.ZodObject<{
138
- resource: z.ZodString;
139
- matcher: z.ZodEnum<["exact", "prefix", "regex"]>;
140
- constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
141
- }, "strip", z.ZodTypeAny, {
142
- resource: string;
143
- matcher: "exact" | "prefix" | "regex";
144
- constraints?: Record<string, any> | undefined;
145
- }, {
146
- resource: string;
147
- matcher: "exact" | "prefix" | "regex";
148
- constraints?: Record<string, any> | undefined;
149
- }>, "many">;
150
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
151
- budget: z.ZodOptional<z.ZodObject<{
152
- unit: z.ZodEnum<["USD", "ops", "points"]>;
153
- cap: z.ZodNumber;
154
- window: z.ZodOptional<z.ZodObject<{
155
- kind: z.ZodEnum<["rolling", "fixed"]>;
156
- durationSec: z.ZodNumber;
157
- }, "strip", z.ZodTypeAny, {
158
- kind: "rolling" | "fixed";
159
- durationSec: number;
160
- }, {
161
- kind: "rolling" | "fixed";
162
- durationSec: number;
163
- }>>;
164
- }, "strip", z.ZodTypeAny, {
165
- unit: "USD" | "ops" | "points";
166
- cap: number;
167
- window?: {
168
- kind: "rolling" | "fixed";
169
- durationSec: number;
170
- } | undefined;
171
- }, {
172
- unit: "USD" | "ops" | "points";
173
- cap: number;
174
- window?: {
175
- kind: "rolling" | "fixed";
176
- durationSec: number;
177
- } | undefined;
178
- }>>;
179
- scopes: z.ZodArray<z.ZodObject<{
180
- resource: z.ZodString;
181
- matcher: z.ZodEnum<["exact", "prefix", "regex"]>;
182
- constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
183
- }, "strip", z.ZodTypeAny, {
184
- resource: string;
185
- matcher: "exact" | "prefix" | "regex";
186
- constraints?: Record<string, any> | undefined;
187
- }, {
188
- resource: string;
189
- matcher: "exact" | "prefix" | "regex";
190
- constraints?: Record<string, any> | undefined;
191
- }>, "many">;
192
- }, z.ZodTypeAny, "passthrough">>>;
193
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
194
- notBefore: z.ZodOptional<z.ZodNumber>;
195
- notAfter: z.ZodOptional<z.ZodNumber>;
196
- scopes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
197
- crisp: z.ZodOptional<z.ZodObject<{
198
- budget: z.ZodOptional<z.ZodObject<{
199
- unit: z.ZodEnum<["USD", "ops", "points"]>;
200
- cap: z.ZodNumber;
201
- window: z.ZodOptional<z.ZodObject<{
202
- kind: z.ZodEnum<["rolling", "fixed"]>;
203
- durationSec: z.ZodNumber;
204
- }, "strip", z.ZodTypeAny, {
205
- kind: "rolling" | "fixed";
206
- durationSec: number;
207
- }, {
208
- kind: "rolling" | "fixed";
209
- durationSec: number;
210
- }>>;
211
- }, "strip", z.ZodTypeAny, {
212
- unit: "USD" | "ops" | "points";
213
- cap: number;
214
- window?: {
215
- kind: "rolling" | "fixed";
216
- durationSec: number;
217
- } | undefined;
218
- }, {
219
- unit: "USD" | "ops" | "points";
220
- cap: number;
221
- window?: {
222
- kind: "rolling" | "fixed";
223
- durationSec: number;
224
- } | undefined;
225
- }>>;
226
- scopes: z.ZodArray<z.ZodObject<{
227
- resource: z.ZodString;
228
- matcher: z.ZodEnum<["exact", "prefix", "regex"]>;
229
- constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
230
- }, "strip", z.ZodTypeAny, {
231
- resource: string;
232
- matcher: "exact" | "prefix" | "regex";
233
- constraints?: Record<string, any> | undefined;
234
- }, {
235
- resource: string;
236
- matcher: "exact" | "prefix" | "regex";
237
- constraints?: Record<string, any> | undefined;
238
- }>, "many">;
239
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
240
- budget: z.ZodOptional<z.ZodObject<{
241
- unit: z.ZodEnum<["USD", "ops", "points"]>;
242
- cap: z.ZodNumber;
243
- window: z.ZodOptional<z.ZodObject<{
244
- kind: z.ZodEnum<["rolling", "fixed"]>;
245
- durationSec: z.ZodNumber;
246
- }, "strip", z.ZodTypeAny, {
247
- kind: "rolling" | "fixed";
248
- durationSec: number;
249
- }, {
250
- kind: "rolling" | "fixed";
251
- durationSec: number;
252
- }>>;
253
- }, "strip", z.ZodTypeAny, {
254
- unit: "USD" | "ops" | "points";
255
- cap: number;
256
- window?: {
257
- kind: "rolling" | "fixed";
258
- durationSec: number;
259
- } | undefined;
260
- }, {
261
- unit: "USD" | "ops" | "points";
262
- cap: number;
263
- window?: {
264
- kind: "rolling" | "fixed";
265
- durationSec: number;
266
- } | undefined;
267
- }>>;
268
- scopes: z.ZodArray<z.ZodObject<{
269
- resource: z.ZodString;
270
- matcher: z.ZodEnum<["exact", "prefix", "regex"]>;
271
- constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
272
- }, "strip", z.ZodTypeAny, {
273
- resource: string;
274
- matcher: "exact" | "prefix" | "regex";
275
- constraints?: Record<string, any> | undefined;
276
- }, {
277
- resource: string;
278
- matcher: "exact" | "prefix" | "regex";
279
- constraints?: Record<string, any> | undefined;
280
- }>, "many">;
281
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
282
- budget: z.ZodOptional<z.ZodObject<{
283
- unit: z.ZodEnum<["USD", "ops", "points"]>;
284
- cap: z.ZodNumber;
285
- window: z.ZodOptional<z.ZodObject<{
286
- kind: z.ZodEnum<["rolling", "fixed"]>;
287
- durationSec: z.ZodNumber;
288
- }, "strip", z.ZodTypeAny, {
289
- kind: "rolling" | "fixed";
290
- durationSec: number;
291
- }, {
292
- kind: "rolling" | "fixed";
293
- durationSec: number;
294
- }>>;
295
- }, "strip", z.ZodTypeAny, {
296
- unit: "USD" | "ops" | "points";
297
- cap: number;
298
- window?: {
299
- kind: "rolling" | "fixed";
300
- durationSec: number;
301
- } | undefined;
302
- }, {
303
- unit: "USD" | "ops" | "points";
304
- cap: number;
305
- window?: {
306
- kind: "rolling" | "fixed";
307
- durationSec: number;
308
- } | undefined;
309
- }>>;
310
- scopes: z.ZodArray<z.ZodObject<{
311
- resource: z.ZodString;
312
- matcher: z.ZodEnum<["exact", "prefix", "regex"]>;
313
- constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
314
- }, "strip", z.ZodTypeAny, {
315
- resource: string;
316
- matcher: "exact" | "prefix" | "regex";
317
- constraints?: Record<string, any> | undefined;
318
- }, {
319
- resource: string;
320
- matcher: "exact" | "prefix" | "regex";
321
- constraints?: Record<string, any> | undefined;
322
- }>, "many">;
323
- }, z.ZodTypeAny, "passthrough">>>;
324
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
325
- notBefore: z.ZodOptional<z.ZodNumber>;
326
- notAfter: z.ZodOptional<z.ZodNumber>;
327
- scopes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
328
- crisp: z.ZodOptional<z.ZodObject<{
329
- budget: z.ZodOptional<z.ZodObject<{
330
- unit: z.ZodEnum<["USD", "ops", "points"]>;
331
- cap: z.ZodNumber;
332
- window: z.ZodOptional<z.ZodObject<{
333
- kind: z.ZodEnum<["rolling", "fixed"]>;
334
- durationSec: z.ZodNumber;
335
- }, "strip", z.ZodTypeAny, {
336
- kind: "rolling" | "fixed";
337
- durationSec: number;
338
- }, {
339
- kind: "rolling" | "fixed";
340
- durationSec: number;
341
- }>>;
342
- }, "strip", z.ZodTypeAny, {
343
- unit: "USD" | "ops" | "points";
344
- cap: number;
345
- window?: {
346
- kind: "rolling" | "fixed";
347
- durationSec: number;
348
- } | undefined;
349
- }, {
350
- unit: "USD" | "ops" | "points";
351
- cap: number;
352
- window?: {
353
- kind: "rolling" | "fixed";
354
- durationSec: number;
355
- } | undefined;
356
- }>>;
357
- scopes: z.ZodArray<z.ZodObject<{
358
- resource: z.ZodString;
359
- matcher: z.ZodEnum<["exact", "prefix", "regex"]>;
360
- constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
361
- }, "strip", z.ZodTypeAny, {
362
- resource: string;
363
- matcher: "exact" | "prefix" | "regex";
364
- constraints?: Record<string, any> | undefined;
365
- }, {
366
- resource: string;
367
- matcher: "exact" | "prefix" | "regex";
368
- constraints?: Record<string, any> | undefined;
369
- }>, "many">;
370
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
371
- budget: z.ZodOptional<z.ZodObject<{
372
- unit: z.ZodEnum<["USD", "ops", "points"]>;
373
- cap: z.ZodNumber;
374
- window: z.ZodOptional<z.ZodObject<{
375
- kind: z.ZodEnum<["rolling", "fixed"]>;
376
- durationSec: z.ZodNumber;
377
- }, "strip", z.ZodTypeAny, {
378
- kind: "rolling" | "fixed";
379
- durationSec: number;
380
- }, {
381
- kind: "rolling" | "fixed";
382
- durationSec: number;
383
- }>>;
384
- }, "strip", z.ZodTypeAny, {
385
- unit: "USD" | "ops" | "points";
386
- cap: number;
387
- window?: {
388
- kind: "rolling" | "fixed";
389
- durationSec: number;
390
- } | undefined;
391
- }, {
392
- unit: "USD" | "ops" | "points";
393
- cap: number;
394
- window?: {
395
- kind: "rolling" | "fixed";
396
- durationSec: number;
397
- } | undefined;
398
- }>>;
399
- scopes: z.ZodArray<z.ZodObject<{
400
- resource: z.ZodString;
401
- matcher: z.ZodEnum<["exact", "prefix", "regex"]>;
402
- constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
403
- }, "strip", z.ZodTypeAny, {
404
- resource: string;
405
- matcher: "exact" | "prefix" | "regex";
406
- constraints?: Record<string, any> | undefined;
407
- }, {
408
- resource: string;
409
- matcher: "exact" | "prefix" | "regex";
410
- constraints?: Record<string, any> | undefined;
411
- }>, "many">;
412
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
413
- budget: z.ZodOptional<z.ZodObject<{
414
- unit: z.ZodEnum<["USD", "ops", "points"]>;
415
- cap: z.ZodNumber;
416
- window: z.ZodOptional<z.ZodObject<{
417
- kind: z.ZodEnum<["rolling", "fixed"]>;
418
- durationSec: z.ZodNumber;
419
- }, "strip", z.ZodTypeAny, {
420
- kind: "rolling" | "fixed";
421
- durationSec: number;
422
- }, {
423
- kind: "rolling" | "fixed";
424
- durationSec: number;
425
- }>>;
426
- }, "strip", z.ZodTypeAny, {
427
- unit: "USD" | "ops" | "points";
428
- cap: number;
429
- window?: {
430
- kind: "rolling" | "fixed";
431
- durationSec: number;
432
- } | undefined;
433
- }, {
434
- unit: "USD" | "ops" | "points";
435
- cap: number;
436
- window?: {
437
- kind: "rolling" | "fixed";
438
- durationSec: number;
439
- } | undefined;
440
- }>>;
441
- scopes: z.ZodArray<z.ZodObject<{
442
- resource: z.ZodString;
443
- matcher: z.ZodEnum<["exact", "prefix", "regex"]>;
444
- constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
445
- }, "strip", z.ZodTypeAny, {
446
- resource: string;
447
- matcher: "exact" | "prefix" | "regex";
448
- constraints?: Record<string, any> | undefined;
449
- }, {
450
- resource: string;
451
- matcher: "exact" | "prefix" | "regex";
452
- constraints?: Record<string, any> | undefined;
453
- }>, "many">;
454
- }, z.ZodTypeAny, "passthrough">>>;
455
- }, z.ZodTypeAny, "passthrough">>;
456
- export type DelegationConstraints = z.infer<typeof DelegationConstraintsSchema>;
457
- export declare function validateDelegationConstraints(constraints: unknown): z.SafeParseReturnType<z.objectInputType<{
458
- notBefore: z.ZodOptional<z.ZodNumber>;
459
- notAfter: z.ZodOptional<z.ZodNumber>;
460
- scopes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
461
- crisp: z.ZodOptional<z.ZodObject<{
462
- budget: z.ZodOptional<z.ZodObject<{
463
- unit: z.ZodEnum<["USD", "ops", "points"]>;
464
- cap: z.ZodNumber;
465
- window: z.ZodOptional<z.ZodObject<{
466
- kind: z.ZodEnum<["rolling", "fixed"]>;
467
- durationSec: z.ZodNumber;
468
- }, "strip", z.ZodTypeAny, {
469
- kind: "rolling" | "fixed";
470
- durationSec: number;
471
- }, {
472
- kind: "rolling" | "fixed";
473
- durationSec: number;
474
- }>>;
475
- }, "strip", z.ZodTypeAny, {
476
- unit: "USD" | "ops" | "points";
477
- cap: number;
478
- window?: {
479
- kind: "rolling" | "fixed";
480
- durationSec: number;
481
- } | undefined;
482
- }, {
483
- unit: "USD" | "ops" | "points";
484
- cap: number;
485
- window?: {
486
- kind: "rolling" | "fixed";
487
- durationSec: number;
488
- } | undefined;
489
- }>>;
490
- scopes: z.ZodArray<z.ZodObject<{
491
- resource: z.ZodString;
492
- matcher: z.ZodEnum<["exact", "prefix", "regex"]>;
493
- constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
494
- }, "strip", z.ZodTypeAny, {
495
- resource: string;
496
- matcher: "exact" | "prefix" | "regex";
497
- constraints?: Record<string, any> | undefined;
498
- }, {
499
- resource: string;
500
- matcher: "exact" | "prefix" | "regex";
501
- constraints?: Record<string, any> | undefined;
502
- }>, "many">;
503
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
504
- budget: z.ZodOptional<z.ZodObject<{
505
- unit: z.ZodEnum<["USD", "ops", "points"]>;
506
- cap: z.ZodNumber;
507
- window: z.ZodOptional<z.ZodObject<{
508
- kind: z.ZodEnum<["rolling", "fixed"]>;
509
- durationSec: z.ZodNumber;
510
- }, "strip", z.ZodTypeAny, {
511
- kind: "rolling" | "fixed";
512
- durationSec: number;
513
- }, {
514
- kind: "rolling" | "fixed";
515
- durationSec: number;
516
- }>>;
517
- }, "strip", z.ZodTypeAny, {
518
- unit: "USD" | "ops" | "points";
519
- cap: number;
520
- window?: {
521
- kind: "rolling" | "fixed";
522
- durationSec: number;
523
- } | undefined;
524
- }, {
525
- unit: "USD" | "ops" | "points";
526
- cap: number;
527
- window?: {
528
- kind: "rolling" | "fixed";
529
- durationSec: number;
530
- } | undefined;
531
- }>>;
532
- scopes: z.ZodArray<z.ZodObject<{
533
- resource: z.ZodString;
534
- matcher: z.ZodEnum<["exact", "prefix", "regex"]>;
535
- constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
536
- }, "strip", z.ZodTypeAny, {
537
- resource: string;
538
- matcher: "exact" | "prefix" | "regex";
539
- constraints?: Record<string, any> | undefined;
540
- }, {
541
- resource: string;
542
- matcher: "exact" | "prefix" | "regex";
543
- constraints?: Record<string, any> | undefined;
544
- }>, "many">;
545
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
546
- budget: z.ZodOptional<z.ZodObject<{
547
- unit: z.ZodEnum<["USD", "ops", "points"]>;
548
- cap: z.ZodNumber;
549
- window: z.ZodOptional<z.ZodObject<{
550
- kind: z.ZodEnum<["rolling", "fixed"]>;
551
- durationSec: z.ZodNumber;
552
- }, "strip", z.ZodTypeAny, {
553
- kind: "rolling" | "fixed";
554
- durationSec: number;
555
- }, {
556
- kind: "rolling" | "fixed";
557
- durationSec: number;
558
- }>>;
559
- }, "strip", z.ZodTypeAny, {
560
- unit: "USD" | "ops" | "points";
561
- cap: number;
562
- window?: {
563
- kind: "rolling" | "fixed";
564
- durationSec: number;
565
- } | undefined;
566
- }, {
567
- unit: "USD" | "ops" | "points";
568
- cap: number;
569
- window?: {
570
- kind: "rolling" | "fixed";
571
- durationSec: number;
572
- } | undefined;
573
- }>>;
574
- scopes: z.ZodArray<z.ZodObject<{
575
- resource: z.ZodString;
576
- matcher: z.ZodEnum<["exact", "prefix", "regex"]>;
577
- constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
578
- }, "strip", z.ZodTypeAny, {
579
- resource: string;
580
- matcher: "exact" | "prefix" | "regex";
581
- constraints?: Record<string, any> | undefined;
582
- }, {
583
- resource: string;
584
- matcher: "exact" | "prefix" | "regex";
585
- constraints?: Record<string, any> | undefined;
586
- }>, "many">;
587
- }, z.ZodTypeAny, "passthrough">>>;
588
- }, z.ZodTypeAny, "passthrough">, z.objectOutputType<{
589
- notBefore: z.ZodOptional<z.ZodNumber>;
590
- notAfter: z.ZodOptional<z.ZodNumber>;
591
- scopes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
592
- crisp: z.ZodOptional<z.ZodObject<{
593
- budget: z.ZodOptional<z.ZodObject<{
594
- unit: z.ZodEnum<["USD", "ops", "points"]>;
595
- cap: z.ZodNumber;
596
- window: z.ZodOptional<z.ZodObject<{
597
- kind: z.ZodEnum<["rolling", "fixed"]>;
598
- durationSec: z.ZodNumber;
599
- }, "strip", z.ZodTypeAny, {
600
- kind: "rolling" | "fixed";
601
- durationSec: number;
602
- }, {
603
- kind: "rolling" | "fixed";
604
- durationSec: number;
605
- }>>;
606
- }, "strip", z.ZodTypeAny, {
607
- unit: "USD" | "ops" | "points";
608
- cap: number;
609
- window?: {
610
- kind: "rolling" | "fixed";
611
- durationSec: number;
612
- } | undefined;
613
- }, {
614
- unit: "USD" | "ops" | "points";
615
- cap: number;
616
- window?: {
617
- kind: "rolling" | "fixed";
618
- durationSec: number;
619
- } | undefined;
620
- }>>;
621
- scopes: z.ZodArray<z.ZodObject<{
622
- resource: z.ZodString;
623
- matcher: z.ZodEnum<["exact", "prefix", "regex"]>;
624
- constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
625
- }, "strip", z.ZodTypeAny, {
626
- resource: string;
627
- matcher: "exact" | "prefix" | "regex";
628
- constraints?: Record<string, any> | undefined;
629
- }, {
630
- resource: string;
631
- matcher: "exact" | "prefix" | "regex";
632
- constraints?: Record<string, any> | undefined;
633
- }>, "many">;
634
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
635
- budget: z.ZodOptional<z.ZodObject<{
636
- unit: z.ZodEnum<["USD", "ops", "points"]>;
637
- cap: z.ZodNumber;
638
- window: z.ZodOptional<z.ZodObject<{
639
- kind: z.ZodEnum<["rolling", "fixed"]>;
640
- durationSec: z.ZodNumber;
641
- }, "strip", z.ZodTypeAny, {
642
- kind: "rolling" | "fixed";
643
- durationSec: number;
644
- }, {
645
- kind: "rolling" | "fixed";
646
- durationSec: number;
647
- }>>;
648
- }, "strip", z.ZodTypeAny, {
649
- unit: "USD" | "ops" | "points";
650
- cap: number;
651
- window?: {
652
- kind: "rolling" | "fixed";
653
- durationSec: number;
654
- } | undefined;
655
- }, {
656
- unit: "USD" | "ops" | "points";
657
- cap: number;
658
- window?: {
659
- kind: "rolling" | "fixed";
660
- durationSec: number;
661
- } | undefined;
662
- }>>;
663
- scopes: z.ZodArray<z.ZodObject<{
664
- resource: z.ZodString;
665
- matcher: z.ZodEnum<["exact", "prefix", "regex"]>;
666
- constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
667
- }, "strip", z.ZodTypeAny, {
668
- resource: string;
669
- matcher: "exact" | "prefix" | "regex";
670
- constraints?: Record<string, any> | undefined;
671
- }, {
672
- resource: string;
673
- matcher: "exact" | "prefix" | "regex";
674
- constraints?: Record<string, any> | undefined;
675
- }>, "many">;
676
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
677
- budget: z.ZodOptional<z.ZodObject<{
678
- unit: z.ZodEnum<["USD", "ops", "points"]>;
679
- cap: z.ZodNumber;
680
- window: z.ZodOptional<z.ZodObject<{
681
- kind: z.ZodEnum<["rolling", "fixed"]>;
682
- durationSec: z.ZodNumber;
683
- }, "strip", z.ZodTypeAny, {
684
- kind: "rolling" | "fixed";
685
- durationSec: number;
686
- }, {
687
- kind: "rolling" | "fixed";
688
- durationSec: number;
689
- }>>;
690
- }, "strip", z.ZodTypeAny, {
691
- unit: "USD" | "ops" | "points";
692
- cap: number;
693
- window?: {
694
- kind: "rolling" | "fixed";
695
- durationSec: number;
696
- } | undefined;
697
- }, {
698
- unit: "USD" | "ops" | "points";
699
- cap: number;
700
- window?: {
701
- kind: "rolling" | "fixed";
702
- durationSec: number;
703
- } | undefined;
704
- }>>;
705
- scopes: z.ZodArray<z.ZodObject<{
706
- resource: z.ZodString;
707
- matcher: z.ZodEnum<["exact", "prefix", "regex"]>;
708
- constraints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
709
- }, "strip", z.ZodTypeAny, {
710
- resource: string;
711
- matcher: "exact" | "prefix" | "regex";
712
- constraints?: Record<string, any> | undefined;
713
- }, {
714
- resource: string;
715
- matcher: "exact" | "prefix" | "regex";
716
- constraints?: Record<string, any> | undefined;
717
- }>, "many">;
718
- }, z.ZodTypeAny, "passthrough">>>;
719
- }, z.ZodTypeAny, "passthrough">>;
720
- export declare function hasValidTimeRange(constraints: DelegationConstraints): boolean;
721
- export declare function areChildConstraintsValid(parent: DelegationConstraints, child: DelegationConstraints): boolean;
722
- export declare function doesResourceMatchScope(resource: string, scope: CrispScope): boolean;
723
- export declare const SUPPORTED_CURRENCIES: Currency[];
724
- export declare const SUPPORTED_MATCHERS: ScopeMatcher[];
725
- export declare const MAX_BUDGET_CAP: number;
726
- export declare const MAX_WINDOW_DURATION_SEC: number;