@claudexor/schema 4.0.1 → 4.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.
- package/dist/account-resources.d.ts +64 -27
- package/dist/account-resources.d.ts.map +1 -1
- package/dist/account-target.d.ts +3 -0
- package/dist/account-target.d.ts.map +1 -1
- package/dist/account-target.js +2 -0
- package/dist/account-target.js.map +1 -1
- package/dist/attachment.js +1 -1
- package/dist/attachment.js.map +1 -1
- package/dist/budget.d.ts +3 -0
- package/dist/budget.d.ts.map +1 -1
- package/dist/budget.js +2 -0
- package/dist/budget.js.map +1 -1
- package/dist/credential-profile-snapshot.d.ts +64 -28
- package/dist/credential-profile-snapshot.d.ts.map +1 -1
- package/dist/harness-quota.d.ts +8 -3
- package/dist/harness-quota.d.ts.map +1 -1
- package/dist/harness.d.ts +17 -5
- package/dist/harness.d.ts.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/model-image.d.ts +416 -0
- package/dist/model-image.d.ts.map +1 -0
- package/dist/model-image.js +77 -0
- package/dist/model-image.js.map +1 -0
- package/dist/model-operation.d.ts +143 -0
- package/dist/model-operation.d.ts.map +1 -1
- package/dist/model-operation.js +22 -0
- package/dist/model-operation.js.map +1 -1
- package/dist/quota-availability.d.ts +33 -0
- package/dist/quota-availability.d.ts.map +1 -0
- package/dist/quota-availability.js +130 -0
- package/dist/quota-availability.js.map +1 -0
- package/dist/quota-read.d.ts +38 -9
- package/dist/quota-read.d.ts.map +1 -1
- package/dist/quota-read.js +5 -3
- package/dist/quota-read.js.map +1 -1
- package/dist/quota-request-kind.d.ts +9 -0
- package/dist/quota-request-kind.d.ts.map +1 -0
- package/dist/quota-request-kind.js +8 -0
- package/dist/quota-request-kind.js.map +1 -0
- package/dist/quota.d.ts +60 -49
- package/dist/quota.d.ts.map +1 -1
- package/dist/quota.js +17 -126
- package/dist/quota.js.map +1 -1
- package/dist/rate-limit.d.ts +3 -0
- package/dist/rate-limit.d.ts.map +1 -1
- package/dist/rate-limit.js +2 -0
- package/dist/rate-limit.js.map +1 -1
- package/generated/BudgetObservation.schema.json +11 -0
- package/generated/ControlAccountResetResponse.schema.json +14 -1
- package/generated/ControlAccountResourcesResponse.schema.json +14 -1
- package/generated/ControlCredentialProfilesQueryResponse.schema.json +14 -1
- package/generated/ControlCredentialProfilesResourcesResponse.schema.json +14 -1
- package/generated/ControlCredentialProfilesSnapshotResponse.schema.json +14 -1
- package/generated/ControlModelSourcesAccountsResponse.schema.json +62 -0
- package/generated/ControlModelSourcesQueryResponse.schema.json +62 -0
- package/generated/ControlQuotaFreshnessResponse.schema.json +14 -1
- package/generated/ControlQuotaQueryResponse.schema.json +17 -1
- package/generated/ControlQuotaReadRequest.schema.json +15 -1
- package/generated/ControlQuotaRefreshRequest.schema.json +8 -0
- package/generated/ControlQuotaResponse.schema.json +14 -1
- package/generated/ControlUploadCreateRequest.schema.json +1 -1
- package/generated/HarnessEvent.schema.json +21 -1
- package/generated/ImageCallRequest.schema.json +145 -0
- package/generated/ImageCallResult.schema.json +415 -0
- package/package.json +2 -2
package/dist/quota-read.d.ts
CHANGED
|
@@ -3,11 +3,28 @@ import { z } from "zod/v3";
|
|
|
3
3
|
* accept constraint freshness. Clients explicitly select the read projection;
|
|
4
4
|
* operation discovery is optional, and old engines may return strict legacy data
|
|
5
5
|
* (3.24) or reject the selector with HTTP 400 (3.25.0/3.25.1). */
|
|
6
|
-
export declare const ControlQuotaReadRequest: z.ZodObject<{
|
|
6
|
+
export declare const ControlQuotaReadRequest: z.ZodObject<Omit<{
|
|
7
|
+
target: z.ZodOptional<z.ZodObject<{
|
|
8
|
+
harness: z.ZodString;
|
|
9
|
+
profile_id: z.ZodString;
|
|
10
|
+
}, "strict", z.ZodTypeAny, {
|
|
11
|
+
harness: string;
|
|
12
|
+
profile_id: string;
|
|
13
|
+
}, {
|
|
14
|
+
harness: string;
|
|
15
|
+
profile_id: string;
|
|
16
|
+
}>>;
|
|
17
|
+
requestKind: z.ZodOptional<z.ZodEnum<["text", "image"]>>;
|
|
18
|
+
model: z.ZodOptional<z.ZodString>;
|
|
19
|
+
}, "target"> & {
|
|
7
20
|
view: z.ZodOptional<z.ZodEnum<["resources", "constraint_freshness"]>>;
|
|
8
21
|
}, "strict", z.ZodTypeAny, {
|
|
22
|
+
requestKind?: "image" | "text" | undefined;
|
|
23
|
+
model?: string | undefined;
|
|
9
24
|
view?: "constraint_freshness" | "resources" | undefined;
|
|
10
25
|
}, {
|
|
26
|
+
requestKind?: "image" | "text" | undefined;
|
|
27
|
+
model?: string | undefined;
|
|
11
28
|
view?: "constraint_freshness" | "resources" | undefined;
|
|
12
29
|
}>;
|
|
13
30
|
export type ControlQuotaReadRequest = z.infer<typeof ControlQuotaReadRequest>;
|
|
@@ -28,7 +45,7 @@ export declare const ControlQuotaFreshnessSnapshot: z.ZodObject<{
|
|
|
28
45
|
plan_label?: string | null | undefined;
|
|
29
46
|
subject_id?: string | null | undefined;
|
|
30
47
|
}>;
|
|
31
|
-
source: z.ZodEnum<["codex_app_server", "codex_rollout", "claude_statusline", "claude_api_retry", "claude_oauth_usage", "agy_command_usage", "cursor_rate_limit", "claude_rate_limit_event", "codex_app_server_event"]>;
|
|
48
|
+
source: z.ZodEnum<["codex_app_server", "codex_rollout", "claude_statusline", "claude_api_retry", "claude_oauth_usage", "agy_command_usage", "cursor_rate_limit", "claude_rate_limit_event", "codex_app_server_event", "codex_image_response"]>;
|
|
32
49
|
observed_at: z.ZodString;
|
|
33
50
|
freshness: z.ZodEnum<["fresh", "stale", "unknown"]>;
|
|
34
51
|
snapshot_id: z.ZodOptional<z.ZodString>;
|
|
@@ -80,6 +97,7 @@ export declare const ControlQuotaFreshnessSnapshot: z.ZodObject<{
|
|
|
80
97
|
applies_to_models: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
|
|
81
98
|
applies_to_model_prefixes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
82
99
|
applies_to_unspecified_model: z.ZodOptional<z.ZodBoolean>;
|
|
100
|
+
applies_to_request_kinds: z.ZodOptional<z.ZodArray<z.ZodEnum<["text", "image"]>, "many">>;
|
|
83
101
|
used_ratio: z.ZodNullable<z.ZodNumber>;
|
|
84
102
|
window_seconds: z.ZodNullable<z.ZodNumber>;
|
|
85
103
|
resets_at: z.ZodNullable<z.ZodString>;
|
|
@@ -92,6 +110,7 @@ export declare const ControlQuotaFreshnessSnapshot: z.ZodObject<{
|
|
|
92
110
|
applies_to_models?: string[] | null | undefined;
|
|
93
111
|
applies_to_model_prefixes?: string[] | undefined;
|
|
94
112
|
applies_to_unspecified_model?: boolean | undefined;
|
|
113
|
+
applies_to_request_kinds?: ("image" | "text")[] | undefined;
|
|
95
114
|
used_ratio: number | null;
|
|
96
115
|
window_seconds: number | null;
|
|
97
116
|
resets_at: string | null;
|
|
@@ -103,6 +122,7 @@ export declare const ControlQuotaFreshnessSnapshot: z.ZodObject<{
|
|
|
103
122
|
applies_to_models?: string[] | null | undefined;
|
|
104
123
|
applies_to_model_prefixes?: string[] | undefined;
|
|
105
124
|
applies_to_unspecified_model?: boolean | undefined;
|
|
125
|
+
applies_to_request_kinds?: ("image" | "text")[] | undefined;
|
|
106
126
|
used_ratio: number | null;
|
|
107
127
|
window_seconds: number | null;
|
|
108
128
|
resets_at: string | null;
|
|
@@ -116,7 +136,7 @@ export declare const ControlQuotaFreshnessSnapshot: z.ZodObject<{
|
|
|
116
136
|
plan_label: string | null;
|
|
117
137
|
subject_id: string | null;
|
|
118
138
|
};
|
|
119
|
-
source: "agy_command_usage" | "claude_api_retry" | "claude_oauth_usage" | "claude_rate_limit_event" | "claude_statusline" | "codex_app_server" | "codex_app_server_event" | "codex_rollout" | "cursor_rate_limit";
|
|
139
|
+
source: "agy_command_usage" | "claude_api_retry" | "claude_oauth_usage" | "claude_rate_limit_event" | "claude_statusline" | "codex_app_server" | "codex_app_server_event" | "codex_image_response" | "codex_rollout" | "cursor_rate_limit";
|
|
120
140
|
observed_at: string;
|
|
121
141
|
freshness: "fresh" | "stale" | "unknown";
|
|
122
142
|
snapshot_id?: string | undefined;
|
|
@@ -137,6 +157,7 @@ export declare const ControlQuotaFreshnessSnapshot: z.ZodObject<{
|
|
|
137
157
|
applies_to_models?: string[] | null | undefined;
|
|
138
158
|
applies_to_model_prefixes?: string[] | undefined;
|
|
139
159
|
applies_to_unspecified_model?: boolean | undefined;
|
|
160
|
+
applies_to_request_kinds?: ("image" | "text")[] | undefined;
|
|
140
161
|
used_ratio: number | null;
|
|
141
162
|
window_seconds: number | null;
|
|
142
163
|
resets_at: string | null;
|
|
@@ -150,7 +171,7 @@ export declare const ControlQuotaFreshnessSnapshot: z.ZodObject<{
|
|
|
150
171
|
plan_label?: string | null | undefined;
|
|
151
172
|
subject_id?: string | null | undefined;
|
|
152
173
|
};
|
|
153
|
-
source: "agy_command_usage" | "claude_api_retry" | "claude_oauth_usage" | "claude_rate_limit_event" | "claude_statusline" | "codex_app_server" | "codex_app_server_event" | "codex_rollout" | "cursor_rate_limit";
|
|
174
|
+
source: "agy_command_usage" | "claude_api_retry" | "claude_oauth_usage" | "claude_rate_limit_event" | "claude_statusline" | "codex_app_server" | "codex_app_server_event" | "codex_image_response" | "codex_rollout" | "cursor_rate_limit";
|
|
154
175
|
observed_at: string;
|
|
155
176
|
freshness: "fresh" | "stale" | "unknown";
|
|
156
177
|
snapshot_id?: string | undefined;
|
|
@@ -171,6 +192,7 @@ export declare const ControlQuotaFreshnessSnapshot: z.ZodObject<{
|
|
|
171
192
|
applies_to_models?: string[] | null | undefined;
|
|
172
193
|
applies_to_model_prefixes?: string[] | undefined;
|
|
173
194
|
applies_to_unspecified_model?: boolean | undefined;
|
|
195
|
+
applies_to_request_kinds?: ("image" | "text")[] | undefined;
|
|
174
196
|
used_ratio: number | null;
|
|
175
197
|
window_seconds: number | null;
|
|
176
198
|
resets_at: string | null;
|
|
@@ -281,7 +303,7 @@ export declare const ControlQuotaFreshnessResponse: z.ZodObject<{
|
|
|
281
303
|
plan_label?: string | null | undefined;
|
|
282
304
|
subject_id?: string | null | undefined;
|
|
283
305
|
}>;
|
|
284
|
-
source: z.ZodEnum<["codex_app_server", "codex_rollout", "claude_statusline", "claude_api_retry", "claude_oauth_usage", "agy_command_usage", "cursor_rate_limit", "claude_rate_limit_event", "codex_app_server_event"]>;
|
|
306
|
+
source: z.ZodEnum<["codex_app_server", "codex_rollout", "claude_statusline", "claude_api_retry", "claude_oauth_usage", "agy_command_usage", "cursor_rate_limit", "claude_rate_limit_event", "codex_app_server_event", "codex_image_response"]>;
|
|
285
307
|
observed_at: z.ZodString;
|
|
286
308
|
freshness: z.ZodEnum<["fresh", "stale", "unknown"]>;
|
|
287
309
|
snapshot_id: z.ZodOptional<z.ZodString>;
|
|
@@ -333,6 +355,7 @@ export declare const ControlQuotaFreshnessResponse: z.ZodObject<{
|
|
|
333
355
|
applies_to_models: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
|
|
334
356
|
applies_to_model_prefixes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
335
357
|
applies_to_unspecified_model: z.ZodOptional<z.ZodBoolean>;
|
|
358
|
+
applies_to_request_kinds: z.ZodOptional<z.ZodArray<z.ZodEnum<["text", "image"]>, "many">>;
|
|
336
359
|
used_ratio: z.ZodNullable<z.ZodNumber>;
|
|
337
360
|
window_seconds: z.ZodNullable<z.ZodNumber>;
|
|
338
361
|
resets_at: z.ZodNullable<z.ZodString>;
|
|
@@ -345,6 +368,7 @@ export declare const ControlQuotaFreshnessResponse: z.ZodObject<{
|
|
|
345
368
|
applies_to_models?: string[] | null | undefined;
|
|
346
369
|
applies_to_model_prefixes?: string[] | undefined;
|
|
347
370
|
applies_to_unspecified_model?: boolean | undefined;
|
|
371
|
+
applies_to_request_kinds?: ("image" | "text")[] | undefined;
|
|
348
372
|
used_ratio: number | null;
|
|
349
373
|
window_seconds: number | null;
|
|
350
374
|
resets_at: string | null;
|
|
@@ -356,6 +380,7 @@ export declare const ControlQuotaFreshnessResponse: z.ZodObject<{
|
|
|
356
380
|
applies_to_models?: string[] | null | undefined;
|
|
357
381
|
applies_to_model_prefixes?: string[] | undefined;
|
|
358
382
|
applies_to_unspecified_model?: boolean | undefined;
|
|
383
|
+
applies_to_request_kinds?: ("image" | "text")[] | undefined;
|
|
359
384
|
used_ratio: number | null;
|
|
360
385
|
window_seconds: number | null;
|
|
361
386
|
resets_at: string | null;
|
|
@@ -369,7 +394,7 @@ export declare const ControlQuotaFreshnessResponse: z.ZodObject<{
|
|
|
369
394
|
plan_label: string | null;
|
|
370
395
|
subject_id: string | null;
|
|
371
396
|
};
|
|
372
|
-
source: "agy_command_usage" | "claude_api_retry" | "claude_oauth_usage" | "claude_rate_limit_event" | "claude_statusline" | "codex_app_server" | "codex_app_server_event" | "codex_rollout" | "cursor_rate_limit";
|
|
397
|
+
source: "agy_command_usage" | "claude_api_retry" | "claude_oauth_usage" | "claude_rate_limit_event" | "claude_statusline" | "codex_app_server" | "codex_app_server_event" | "codex_image_response" | "codex_rollout" | "cursor_rate_limit";
|
|
373
398
|
observed_at: string;
|
|
374
399
|
freshness: "fresh" | "stale" | "unknown";
|
|
375
400
|
snapshot_id?: string | undefined;
|
|
@@ -390,6 +415,7 @@ export declare const ControlQuotaFreshnessResponse: z.ZodObject<{
|
|
|
390
415
|
applies_to_models?: string[] | null | undefined;
|
|
391
416
|
applies_to_model_prefixes?: string[] | undefined;
|
|
392
417
|
applies_to_unspecified_model?: boolean | undefined;
|
|
418
|
+
applies_to_request_kinds?: ("image" | "text")[] | undefined;
|
|
393
419
|
used_ratio: number | null;
|
|
394
420
|
window_seconds: number | null;
|
|
395
421
|
resets_at: string | null;
|
|
@@ -403,7 +429,7 @@ export declare const ControlQuotaFreshnessResponse: z.ZodObject<{
|
|
|
403
429
|
plan_label?: string | null | undefined;
|
|
404
430
|
subject_id?: string | null | undefined;
|
|
405
431
|
};
|
|
406
|
-
source: "agy_command_usage" | "claude_api_retry" | "claude_oauth_usage" | "claude_rate_limit_event" | "claude_statusline" | "codex_app_server" | "codex_app_server_event" | "codex_rollout" | "cursor_rate_limit";
|
|
432
|
+
source: "agy_command_usage" | "claude_api_retry" | "claude_oauth_usage" | "claude_rate_limit_event" | "claude_statusline" | "codex_app_server" | "codex_app_server_event" | "codex_image_response" | "codex_rollout" | "cursor_rate_limit";
|
|
407
433
|
observed_at: string;
|
|
408
434
|
freshness: "fresh" | "stale" | "unknown";
|
|
409
435
|
snapshot_id?: string | undefined;
|
|
@@ -424,6 +450,7 @@ export declare const ControlQuotaFreshnessResponse: z.ZodObject<{
|
|
|
424
450
|
applies_to_models?: string[] | null | undefined;
|
|
425
451
|
applies_to_model_prefixes?: string[] | undefined;
|
|
426
452
|
applies_to_unspecified_model?: boolean | undefined;
|
|
453
|
+
applies_to_request_kinds?: ("image" | "text")[] | undefined;
|
|
427
454
|
used_ratio: number | null;
|
|
428
455
|
window_seconds: number | null;
|
|
429
456
|
resets_at: string | null;
|
|
@@ -462,7 +489,7 @@ export declare const ControlQuotaFreshnessResponse: z.ZodObject<{
|
|
|
462
489
|
plan_label: string | null;
|
|
463
490
|
subject_id: string | null;
|
|
464
491
|
};
|
|
465
|
-
source: "agy_command_usage" | "claude_api_retry" | "claude_oauth_usage" | "claude_rate_limit_event" | "claude_statusline" | "codex_app_server" | "codex_app_server_event" | "codex_rollout" | "cursor_rate_limit";
|
|
492
|
+
source: "agy_command_usage" | "claude_api_retry" | "claude_oauth_usage" | "claude_rate_limit_event" | "claude_statusline" | "codex_app_server" | "codex_app_server_event" | "codex_image_response" | "codex_rollout" | "cursor_rate_limit";
|
|
466
493
|
observed_at: string;
|
|
467
494
|
freshness: "fresh" | "stale" | "unknown";
|
|
468
495
|
snapshot_id?: string | undefined;
|
|
@@ -483,6 +510,7 @@ export declare const ControlQuotaFreshnessResponse: z.ZodObject<{
|
|
|
483
510
|
applies_to_models?: string[] | null | undefined;
|
|
484
511
|
applies_to_model_prefixes?: string[] | undefined;
|
|
485
512
|
applies_to_unspecified_model?: boolean | undefined;
|
|
513
|
+
applies_to_request_kinds?: ("image" | "text")[] | undefined;
|
|
486
514
|
used_ratio: number | null;
|
|
487
515
|
window_seconds: number | null;
|
|
488
516
|
resets_at: string | null;
|
|
@@ -521,7 +549,7 @@ export declare const ControlQuotaFreshnessResponse: z.ZodObject<{
|
|
|
521
549
|
plan_label?: string | null | undefined;
|
|
522
550
|
subject_id?: string | null | undefined;
|
|
523
551
|
};
|
|
524
|
-
source: "agy_command_usage" | "claude_api_retry" | "claude_oauth_usage" | "claude_rate_limit_event" | "claude_statusline" | "codex_app_server" | "codex_app_server_event" | "codex_rollout" | "cursor_rate_limit";
|
|
552
|
+
source: "agy_command_usage" | "claude_api_retry" | "claude_oauth_usage" | "claude_rate_limit_event" | "claude_statusline" | "codex_app_server" | "codex_app_server_event" | "codex_image_response" | "codex_rollout" | "cursor_rate_limit";
|
|
525
553
|
observed_at: string;
|
|
526
554
|
freshness: "fresh" | "stale" | "unknown";
|
|
527
555
|
snapshot_id?: string | undefined;
|
|
@@ -542,6 +570,7 @@ export declare const ControlQuotaFreshnessResponse: z.ZodObject<{
|
|
|
542
570
|
applies_to_models?: string[] | null | undefined;
|
|
543
571
|
applies_to_model_prefixes?: string[] | undefined;
|
|
544
572
|
applies_to_unspecified_model?: boolean | undefined;
|
|
573
|
+
applies_to_request_kinds?: ("image" | "text")[] | undefined;
|
|
545
574
|
used_ratio: number | null;
|
|
546
575
|
window_seconds: number | null;
|
|
547
576
|
resets_at: string | null;
|
package/dist/quota-read.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"quota-read.d.ts","sourceRoot":"","sources":["../src/quota-read.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"quota-read.d.ts","sourceRoot":"","sources":["../src/quota-read.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAS3B;;;kEAGkE;AAClE,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;EAKjC,CAAC;AACJ,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAE9E,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAQxC,CAAC;AACH,MAAM,MAAM,6BAA6B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC;AAE1F,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAIzC,CAAC;AACF,MAAM,MAAM,6BAA6B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC"}
|
package/dist/quota-read.js
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { z } from "zod/v3";
|
|
2
|
+
import { ControlQuotaRefreshRequest } from "./account-target.js";
|
|
2
3
|
import { ControlQuotaResponse, ControlQuotaSnapshot, QuotaConstraint, QuotaFreshness, } from "./quota.js";
|
|
3
4
|
/** Response-only schemas: neither persisted evidence nor legacy wire shapes
|
|
4
5
|
* accept constraint freshness. Clients explicitly select the read projection;
|
|
5
6
|
* operation discovery is optional, and old engines may return strict legacy data
|
|
6
7
|
* (3.24) or reject the selector with HTTP 400 (3.25.0/3.25.1). */
|
|
7
|
-
export const ControlQuotaReadRequest =
|
|
8
|
-
.
|
|
9
|
-
.strict()
|
|
8
|
+
export const ControlQuotaReadRequest = ControlQuotaRefreshRequest.omit({ target: true })
|
|
9
|
+
.extend({ view: z.enum(["resources", "constraint_freshness"]).optional() })
|
|
10
|
+
.strict()
|
|
11
|
+
.describe("GET /v2/quota query selectors, each at most once; there is no body. Omitted requestKind means text availability, omitted model keeps the model-agnostic projection, and omitted view keeps the legacy shape. Reads cached snapshots without refreshing quota.");
|
|
10
12
|
export const ControlQuotaFreshnessSnapshot = ControlQuotaSnapshot.extend({
|
|
11
13
|
constraints: z.array(QuotaConstraint.extend({
|
|
12
14
|
freshness: QuotaFreshness.describe("Read-time freshness from raw snapshot freshness, observation age (stale after 300000ms), and this constraint's own reset (stale at equality); a reset cutoff stales earlier evidence. Never inferred from aggregate freshness or a sibling reset; no refill is inferred. The compatibility reset_credits row reports its resets facet's freshness instead."),
|
package/dist/quota-read.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"quota-read.js","sourceRoot":"","sources":["../src/quota-read.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAC3B,OAAO,EACL,oBAAoB,EACpB,oBAAoB,EACpB,eAAe,EACf,cAAc,GACf,MAAM,YAAY,CAAC;AAEpB;;;kEAGkE;AAClE,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC;
|
|
1
|
+
{"version":3,"file":"quota-read.js","sourceRoot":"","sources":["../src/quota-read.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAC3B,OAAO,EAAE,0BAA0B,EAAE,MAAM,qBAAqB,CAAC;AACjE,OAAO,EACL,oBAAoB,EACpB,oBAAoB,EACpB,eAAe,EACf,cAAc,GACf,MAAM,YAAY,CAAC;AAEpB;;;kEAGkE;AAClE,MAAM,CAAC,MAAM,uBAAuB,GAAG,0BAA0B,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;KACrF,MAAM,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE,sBAAsB,CAAC,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC;KAC1E,MAAM,EAAE;KACR,QAAQ,CACP,+PAA+P,CAChQ,CAAC;AAGJ,MAAM,CAAC,MAAM,6BAA6B,GAAG,oBAAoB,CAAC,MAAM,CAAC;IACvE,WAAW,EAAE,CAAC,CAAC,KAAK,CAClB,eAAe,CAAC,MAAM,CAAC;QACrB,SAAS,EAAE,cAAc,CAAC,QAAQ,CAChC,4VAA4V,CAC7V;KACF,CAAC,CACH;CACF,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,6BAA6B,GAAG,oBAAoB,CAAC,MAAM,CAAC;IACvE,SAAS,EAAE,CAAC,CAAC,KAAK,CAAC,6BAA6B,CAAC;CAClD,CAAC,CAAC,QAAQ,CACT,wLAAwL,CACzL,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from "zod/v3";
|
|
2
|
+
/** Shared by quota evidence and account read/refresh requests without a schema cycle. */
|
|
3
|
+
export declare const QuotaRequestKind: z.ZodEnum<["text", "image"]>;
|
|
4
|
+
export type QuotaRequestKind = z.infer<typeof QuotaRequestKind>;
|
|
5
|
+
/** Operation applicability is independent of any vendor model-id spelling. */
|
|
6
|
+
export declare function quotaConstraintAppliesToRequestKind(constraint: {
|
|
7
|
+
applies_to_request_kinds?: QuotaRequestKind[];
|
|
8
|
+
}, requestKind?: QuotaRequestKind): boolean;
|
|
9
|
+
//# sourceMappingURL=quota-request-kind.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"quota-request-kind.d.ts","sourceRoot":"","sources":["../src/quota-request-kind.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAE3B,yFAAyF;AACzF,eAAO,MAAM,gBAAgB,8BAA4B,CAAC;AAC1D,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAEhE,8EAA8E;AAC9E,wBAAgB,mCAAmC,CACjD,UAAU,EAAE;IAAE,wBAAwB,CAAC,EAAE,gBAAgB,EAAE,CAAA;CAAE,EAC7D,WAAW,GAAE,gBAAyB,GACrC,OAAO,CAET"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { z } from "zod/v3";
|
|
2
|
+
/** Shared by quota evidence and account read/refresh requests without a schema cycle. */
|
|
3
|
+
export const QuotaRequestKind = z.enum(["text", "image"]);
|
|
4
|
+
/** Operation applicability is independent of any vendor model-id spelling. */
|
|
5
|
+
export function quotaConstraintAppliesToRequestKind(constraint, requestKind = "text") {
|
|
6
|
+
return constraint.applies_to_request_kinds?.includes(requestKind) ?? true;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=quota-request-kind.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"quota-request-kind.js","sourceRoot":"","sources":["../src/quota-request-kind.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAE3B,yFAAyF;AACzF,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;AAG1D,8EAA8E;AAC9E,MAAM,UAAU,mCAAmC,CACjD,UAA6D,EAC7D,WAAW,GAAqB,MAAM;IAEtC,OAAO,UAAU,CAAC,wBAAwB,EAAE,QAAQ,CAAC,WAAW,CAAC,IAAI,IAAI,CAAC;AAC5E,CAAC"}
|