sidekick-shared 0.28.1 → 0.28.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +25 -0
- package/README.md +29 -13
- package/dist/browser.d.ts +2 -0
- package/dist/browser.js +10 -1
- package/dist/codexQuota.js +17 -4
- package/dist/esm/browser.js +2 -0
- package/dist/esm/codexQuota.js +18 -5
- package/dist/esm/index.js +3 -3
- package/dist/esm/modelContext.js +32 -0
- package/dist/esm/modelInfo.js +186 -0
- package/dist/esm/multiProviderQuotaService.js +1 -1
- package/dist/esm/quota.js +356 -24
- package/dist/esm/quotaHistory.js +33 -8
- package/dist/esm/quotaPoller.js +5 -2
- package/dist/esm/quotaResolver.js +31 -6
- package/dist/esm/quotaSnapshots.js +65 -10
- package/dist/esm/quotaThresholds.js +7 -2
- package/dist/esm/schemas/index.js +2 -2
- package/dist/esm/schemas/quota.js +30 -0
- package/dist/esm/schemas/quotaHistory.js +10 -2
- package/dist/esm/schemas/stateFile.js +9 -0
- package/dist/esm/stateFile.js +18 -3
- package/dist/esm/statusline/claudeStatuslinePayload.js +16 -4
- package/dist/esm/statusline/formatter.js +57 -18
- package/dist/esm/statusline/index.js +2 -2
- package/dist/esm/zaiQuotaApi.js +4 -2
- package/dist/index.d.ts +6 -6
- package/dist/index.js +18 -5
- package/dist/modelContext.js +32 -0
- package/dist/modelInfo.js +186 -0
- package/dist/multiProviderQuotaService.js +1 -1
- package/dist/quota.d.ts +131 -1
- package/dist/quota.js +366 -24
- package/dist/quotaHistory.d.ts +10 -0
- package/dist/quotaHistory.js +34 -8
- package/dist/quotaPoller.d.ts +11 -3
- package/dist/quotaPoller.js +5 -2
- package/dist/quotaResolver.js +30 -5
- package/dist/quotaSnapshots.js +64 -9
- package/dist/quotaThresholds.js +7 -2
- package/dist/schemas/index.d.ts +3 -3
- package/dist/schemas/index.js +5 -2
- package/dist/schemas/quota.d.ts +258 -0
- package/dist/schemas/quota.js +31 -1
- package/dist/schemas/quotaHistory.d.ts +2 -0
- package/dist/schemas/quotaHistory.js +10 -2
- package/dist/schemas/stateFile.d.ts +34 -0
- package/dist/schemas/stateFile.js +10 -1
- package/dist/stateFile.d.ts +18 -0
- package/dist/stateFile.js +17 -2
- package/dist/statusline/claudeStatuslinePayload.d.ts +4 -3
- package/dist/statusline/claudeStatuslinePayload.js +16 -4
- package/dist/statusline/formatter.d.ts +5 -0
- package/dist/statusline/formatter.js +56 -17
- package/dist/statusline/index.d.ts +4 -4
- package/dist/statusline/index.js +5 -1
- package/dist/zaiQuotaApi.js +3 -1
- package/package.json +1 -1
package/dist/quotaSnapshots.js
CHANGED
|
@@ -83,6 +83,27 @@ function windowResetMs(value) {
|
|
|
83
83
|
const ms = Date.parse(value);
|
|
84
84
|
return Number.isFinite(ms) ? ms : 0;
|
|
85
85
|
}
|
|
86
|
+
/**
|
|
87
|
+
* Rank two samples by one window's reset time. A later reset means a newer
|
|
88
|
+
* window, so it wins — except that an existing window which had already reset
|
|
89
|
+
* by the time the newer sample was captured is obsolete and always yields.
|
|
90
|
+
* Without that exception a pre-reset sample outranks every later sample whose
|
|
91
|
+
* window has not started yet (empty reset), and the snapshot freezes.
|
|
92
|
+
* Returns `undefined` when the reset times tie.
|
|
93
|
+
*/
|
|
94
|
+
function compareWindowResets(existing, next, asOfMs) {
|
|
95
|
+
const existingReset = windowResetMs(existing.resetsAt);
|
|
96
|
+
const nextReset = windowResetMs(next.resetsAt);
|
|
97
|
+
if (existingReset === nextReset)
|
|
98
|
+
return undefined;
|
|
99
|
+
if (existingReset > 0 && asOfMs > 0 && existingReset <= asOfMs)
|
|
100
|
+
return false;
|
|
101
|
+
return existingReset > nextReset;
|
|
102
|
+
}
|
|
103
|
+
function windowPresenceChanged(existing, next) {
|
|
104
|
+
return (Boolean(existing.fiveHour.absent) !== Boolean(next.fiveHour.absent) ||
|
|
105
|
+
Boolean(existing.sevenDay.absent) !== Boolean(next.sevenDay.absent));
|
|
106
|
+
}
|
|
86
107
|
// Preserve the best-known same-window snapshot while still allowing lower
|
|
87
108
|
// utilization after Codex advances to a newer reset window.
|
|
88
109
|
function shouldKeepExistingSnapshot(existing, next) {
|
|
@@ -95,20 +116,50 @@ function shouldKeepExistingSnapshot(existing, next) {
|
|
|
95
116
|
const nextAggregate = (0, codex_1.isAggregateCodexLimit)(next.limitId);
|
|
96
117
|
if (existingAggregate !== nextAggregate)
|
|
97
118
|
return existingAggregate;
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
if (
|
|
101
|
-
return
|
|
102
|
-
|
|
103
|
-
const
|
|
104
|
-
|
|
105
|
-
|
|
119
|
+
// The plan's window layout changed (a window appeared or disappeared): the
|
|
120
|
+
// reset times are not comparable, so the newer capture wins.
|
|
121
|
+
if (windowPresenceChanged(existing, next)) {
|
|
122
|
+
return snapshotTimeMs(existing) > snapshotTimeMs(next);
|
|
123
|
+
}
|
|
124
|
+
const asOfMs = snapshotTimeMs(next);
|
|
125
|
+
const primary = compareWindowResets(existing.fiveHour, next.fiveHour, asOfMs);
|
|
126
|
+
if (primary !== undefined)
|
|
127
|
+
return primary;
|
|
128
|
+
const secondary = compareWindowResets(existing.sevenDay, next.sevenDay, asOfMs);
|
|
129
|
+
if (secondary !== undefined)
|
|
130
|
+
return secondary;
|
|
106
131
|
const existingUtilization = existing.fiveHour.utilization + existing.sevenDay.utilization;
|
|
107
132
|
const nextUtilization = next.fiveHour.utilization + next.sevenDay.utilization;
|
|
108
133
|
if (existingUtilization !== nextUtilization)
|
|
109
134
|
return existingUtilization > nextUtilization;
|
|
110
135
|
return snapshotTimeMs(existing) > snapshotTimeMs(next);
|
|
111
136
|
}
|
|
137
|
+
/**
|
|
138
|
+
* Status-line and history samples only know the two headline windows. Keep
|
|
139
|
+
* the plan label, extra usage, and still-running extra meters (e.g. a Fable
|
|
140
|
+
* weekly cap) an earlier API sample recorded, so a fresh status-line write
|
|
141
|
+
* does not erase them from every snapshot reader.
|
|
142
|
+
*/
|
|
143
|
+
function carryApiOnlyFields(existing, next) {
|
|
144
|
+
const merged = { ...next };
|
|
145
|
+
if (merged.planLabel === undefined && existing.planLabel !== undefined) {
|
|
146
|
+
merged.planLabel = existing.planLabel;
|
|
147
|
+
}
|
|
148
|
+
if (merged.planType === undefined && existing.planType !== undefined) {
|
|
149
|
+
merged.planType = existing.planType;
|
|
150
|
+
}
|
|
151
|
+
if (merged.extraUsage === undefined && existing.extraUsage !== undefined) {
|
|
152
|
+
merged.extraUsage = existing.extraUsage;
|
|
153
|
+
}
|
|
154
|
+
if (merged.limits === undefined && existing.limits !== undefined) {
|
|
155
|
+
const asOfMs = snapshotTimeMs(next);
|
|
156
|
+
// Headline meters duplicate the fresher windows on `next`; carry only the extras.
|
|
157
|
+
const running = (0, quota_1.extraQuotaRows)(existing).filter((row) => windowResetMs(row.resetsAt) > asOfMs);
|
|
158
|
+
if (running.length > 0)
|
|
159
|
+
merged.limits = running;
|
|
160
|
+
}
|
|
161
|
+
return merged;
|
|
162
|
+
}
|
|
112
163
|
function writeQuotaSnapshot(providerId, accountId, quota) {
|
|
113
164
|
withSnapshotStoreLock(() => {
|
|
114
165
|
const store = readStore();
|
|
@@ -130,7 +181,11 @@ function writeQuotaSnapshot(providerId, accountId, quota) {
|
|
|
130
181
|
};
|
|
131
182
|
if (index >= 0 && shouldKeepExistingSnapshot(store.snapshots[index].quota, snapshot))
|
|
132
183
|
return;
|
|
133
|
-
const record = {
|
|
184
|
+
const record = {
|
|
185
|
+
providerId,
|
|
186
|
+
accountId,
|
|
187
|
+
quota: existingQuota ? carryApiOnlyFields(existingQuota, snapshot) : snapshot,
|
|
188
|
+
};
|
|
134
189
|
if (index >= 0)
|
|
135
190
|
store.snapshots[index] = record;
|
|
136
191
|
else
|
package/dist/quotaThresholds.js
CHANGED
|
@@ -55,8 +55,13 @@ function evaluateWindow(window, quota, thresholds, previous) {
|
|
|
55
55
|
function evaluateQuotaThresholds(quota, config = exports.DEFAULT_QUOTA_THRESHOLDS, memory = {}) {
|
|
56
56
|
if (!quota.available)
|
|
57
57
|
return { alerts: [], memory };
|
|
58
|
-
|
|
59
|
-
const
|
|
58
|
+
// A window the plan does not have (Ultra's missing five-hour limit) never alerts.
|
|
59
|
+
const fiveHour = quota.fiveHour.absent
|
|
60
|
+
? { alert: null, memory: memory.fiveHour ?? { resetsAt: '', level: 0 } }
|
|
61
|
+
: evaluateWindow('fiveHour', quota.fiveHour, config.fiveHour, memory.fiveHour);
|
|
62
|
+
const sevenDay = quota.sevenDay.absent
|
|
63
|
+
? { alert: null, memory: memory.sevenDay ?? { resetsAt: '', level: 0 } }
|
|
64
|
+
: evaluateWindow('sevenDay', quota.sevenDay, config.sevenDay, memory.sevenDay);
|
|
60
65
|
return {
|
|
61
66
|
alerts: [fiveHour.alert, sevenDay.alert].filter((alert) => alert !== null),
|
|
62
67
|
memory: { fiveHour: fiveHour.memory, sevenDay: sevenDay.memory },
|
package/dist/schemas/index.d.ts
CHANGED
|
@@ -23,7 +23,7 @@ export { transcriptSourceProvenanceSchema, canonicalTranscriptBlockSchema, canon
|
|
|
23
23
|
export type { CanonicalSessionTranscript, CanonicalTranscriptMessage, CanonicalToolCall, TranscriptSourceProvenance, } from '../transcript';
|
|
24
24
|
export { observationProvenanceV1Schema, observedAgentSessionV1Schema, observedValueV1Schema, pendingUserRequestV1Schema, providerCapabilitiesV1Schema, providerSessionAdapterV1Schema, sessionEvidenceRefV1Schema, } from './observedSessionV1';
|
|
25
25
|
export type { ObservationProvenanceV1, ObservedAgentSessionV1, ObservedValueV1, PendingUserRequestV1, ProviderCapabilitiesV1, ProviderSessionAdapterV1, SessionEvidenceRefV1, } from '../types/observedSessionV1';
|
|
26
|
-
export { quotaWindowSchema, quotaStateSchema, quotaFailureKindSchema, quotaProviderIdSchema, quotaSourceSchema, codexResetCreditSchema, codexResetCreditsSnapshotSchema, peakHoursStateSchema, quotaFailureDescriptorSchema, runtimeQuotaProviderSchema, providerQuotaStateSchema, claudeProviderQuotaStateSchema, codexProviderQuotaStateSchema, zaiProviderQuotaStateSchema, providerQuotaMapSchema, } from './quota';
|
|
26
|
+
export { quotaWindowSchema, quotaStateSchema, quotaLimitRowSchema, quotaExtraUsageSchema, quotaFailureKindSchema, quotaProviderIdSchema, quotaSourceSchema, codexResetCreditSchema, codexResetCreditsSnapshotSchema, peakHoursStateSchema, quotaFailureDescriptorSchema, runtimeQuotaProviderSchema, providerQuotaStateSchema, claudeProviderQuotaStateSchema, codexProviderQuotaStateSchema, zaiProviderQuotaStateSchema, providerQuotaMapSchema, } from './quota';
|
|
27
27
|
export type { CodexResetCredit, CodexResetCreditsSnapshot, QuotaWindow, QuotaState, } from '../quota';
|
|
28
28
|
export type { PeakHoursState } from '../peakHours';
|
|
29
29
|
export type { QuotaFailureDescriptor } from '../quotaPresentation';
|
|
@@ -43,5 +43,5 @@ export type { AccountLaunchEnv } from '../accountLaunch';
|
|
|
43
43
|
export type { RunningAccountConsumer, RunningProcess } from '../processDetection';
|
|
44
44
|
export { assistantTurnEventSchema, assistantTurnEventTypeSchema, assistantTurnNarrationStepSchema, assistantTurnProcessSchema, assistantTurnProcessStepSchema, assistantTurnProjectionSchema, assistantTurnReasoningTimelineItemSchema, assistantTurnSubagentSchema, assistantTurnSubagentStatusSchema, assistantTurnTimelineItemSchema, assistantTurnToolGroupStepSchema, assistantTurnToolRefSchema, } from './assistantTurn';
|
|
45
45
|
export type { AssistantTurnEvent, AssistantTurnEventType, AssistantTurnProcess, AssistantTurnProcessStep, AssistantTurnProjection, AssistantTurnSubagent, AssistantTurnSubagentStatus, AssistantTurnTimelineItem, AssistantTurnToolRef, } from '../turns/assistantTurn';
|
|
46
|
-
export { sidekickStateFileSchema, stateFileAccountSchema, stateFileBillingBlockSchema, stateFileContextSchema, stateFileQuotaSchema, stateFileQuotaWindowSchema, stateFileSessionSchema, stateFileWriterSchema, } from './stateFile';
|
|
47
|
-
export type { SidekickStateFile, StateFileAccount, StateFileBillingBlock, StateFileContext, StateFileQuota, StateFileQuotaWindow, StateFileSession, StateFileWriter, } from '../stateFile';
|
|
46
|
+
export { sidekickStateFileSchema, stateFileAccountSchema, stateFileBillingBlockSchema, stateFileContextSchema, stateFileQuotaSchema, stateFileQuotaWindowSchema, stateFileQuotaLimitSchema, stateFileSessionSchema, stateFileWriterSchema, } from './stateFile';
|
|
47
|
+
export type { SidekickStateFile, StateFileAccount, StateFileBillingBlock, StateFileContext, StateFileQuota, StateFileQuotaWindow, StateFileQuotaLimit, StateFileSession, StateFileWriter, } from '../stateFile';
|
package/dist/schemas/index.js
CHANGED
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
* subpath is self-sufficient for boundary-validation modules.
|
|
13
13
|
*/
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.
|
|
16
|
-
exports.stateFileWriterSchema = exports.stateFileSessionSchema = exports.stateFileQuotaWindowSchema = exports.stateFileQuotaSchema = exports.stateFileContextSchema = exports.stateFileBillingBlockSchema = exports.stateFileAccountSchema = exports.sidekickStateFileSchema = exports.assistantTurnToolRefSchema = exports.assistantTurnToolGroupStepSchema = exports.assistantTurnTimelineItemSchema = exports.assistantTurnSubagentStatusSchema = exports.assistantTurnSubagentSchema = exports.assistantTurnReasoningTimelineItemSchema = exports.assistantTurnProjectionSchema = exports.assistantTurnProcessStepSchema = exports.assistantTurnProcessSchema = exports.assistantTurnNarrationStepSchema = exports.assistantTurnEventTypeSchema = exports.assistantTurnEventSchema = exports.accountLaunchEnvSchema = exports.syncReportSchema = exports.providerSyncReportSchema = exports.lastSwitchRecordSchema = exports.switchAccountResultSchema = exports.runningAccountConsumerSchema = exports.accountConsumerKindSchema = exports.runningProcessSchema = exports.accountViewSchema = exports.accountHealthSchema = exports.accountHealthSidecarSchema = exports.accountHealthSourceSchema = exports.accountHealthStateSchema = exports.listAllAccountsResultSchema = exports.savedAccountProfileSchema = exports.accountEntrySchema = exports.accountLoginStatusSchema = exports.beginAccountLoginResultSchema = exports.accountManagerResultSchema = exports.accountProviderIdSchema = exports.activeAccountStatusSchema = exports.activeProviderAccountStatusSchema = exports.quotaHistoryDailyBucketSchema = exports.quotaHistorySampleSchema = void 0;
|
|
15
|
+
exports.zaiProviderQuotaStateSchema = exports.codexProviderQuotaStateSchema = exports.claudeProviderQuotaStateSchema = exports.providerQuotaStateSchema = exports.runtimeQuotaProviderSchema = exports.quotaFailureDescriptorSchema = exports.peakHoursStateSchema = exports.codexResetCreditsSnapshotSchema = exports.codexResetCreditSchema = exports.quotaSourceSchema = exports.quotaProviderIdSchema = exports.quotaFailureKindSchema = exports.quotaExtraUsageSchema = exports.quotaLimitRowSchema = exports.quotaStateSchema = exports.quotaWindowSchema = exports.sessionEvidenceRefV1Schema = exports.providerSessionAdapterV1Schema = exports.providerCapabilitiesV1Schema = exports.pendingUserRequestV1Schema = exports.observedValueV1Schema = exports.observedAgentSessionV1Schema = exports.observationProvenanceV1Schema = exports.canonicalSessionTranscriptSchema = exports.canonicalTranscriptMessageSchema = exports.canonicalToolCallSchema = exports.canonicalTranscriptBlockSchema = exports.transcriptSourceProvenanceSchema = exports.providerFailureDiagnosisSchema = exports.providerRetryAfterSchema = exports.providerFailureEvidenceSchema = exports.providerAuthenticationEvidenceSchema = exports.tokenEstimateSchema = exports.normalizedUsageCostSchema = exports.normalizedUsageSchema = exports.toolResultSessionEventSchema = exports.toolUseSessionEventSchema = exports.systemSessionEventSchema = exports.summarySessionEventSchema = exports.assistantSessionEventSchema = exports.userSessionEventSchema = exports.extractSessionEvents = exports.permissionModeSchema = exports.sessionEventSchema = exports.sessionMessageSchema = exports.messageUsageSchema = exports.SESSION_PROVIDER_IDS = exports.RUNTIME_QUOTA_PROVIDER_IDS = exports.QUOTA_PROVIDER_IDS = exports.ACCOUNT_PROVIDER_IDS = void 0;
|
|
16
|
+
exports.stateFileWriterSchema = exports.stateFileSessionSchema = exports.stateFileQuotaLimitSchema = exports.stateFileQuotaWindowSchema = exports.stateFileQuotaSchema = exports.stateFileContextSchema = exports.stateFileBillingBlockSchema = exports.stateFileAccountSchema = exports.sidekickStateFileSchema = exports.assistantTurnToolRefSchema = exports.assistantTurnToolGroupStepSchema = exports.assistantTurnTimelineItemSchema = exports.assistantTurnSubagentStatusSchema = exports.assistantTurnSubagentSchema = exports.assistantTurnReasoningTimelineItemSchema = exports.assistantTurnProjectionSchema = exports.assistantTurnProcessStepSchema = exports.assistantTurnProcessSchema = exports.assistantTurnNarrationStepSchema = exports.assistantTurnEventTypeSchema = exports.assistantTurnEventSchema = exports.accountLaunchEnvSchema = exports.syncReportSchema = exports.providerSyncReportSchema = exports.lastSwitchRecordSchema = exports.switchAccountResultSchema = exports.runningAccountConsumerSchema = exports.accountConsumerKindSchema = exports.runningProcessSchema = exports.accountViewSchema = exports.accountHealthSchema = exports.accountHealthSidecarSchema = exports.accountHealthSourceSchema = exports.accountHealthStateSchema = exports.listAllAccountsResultSchema = exports.savedAccountProfileSchema = exports.accountEntrySchema = exports.accountLoginStatusSchema = exports.beginAccountLoginResultSchema = exports.accountManagerResultSchema = exports.accountProviderIdSchema = exports.activeAccountStatusSchema = exports.activeProviderAccountStatusSchema = exports.quotaHistoryDailyBucketSchema = exports.quotaHistorySampleSchema = exports.quotaHistoryRuntimeProviderSchema = exports.providerQuotaMapSchema = void 0;
|
|
17
17
|
var providerIds_1 = require("../providerIds");
|
|
18
18
|
Object.defineProperty(exports, "ACCOUNT_PROVIDER_IDS", { enumerable: true, get: function () { return providerIds_1.ACCOUNT_PROVIDER_IDS; } });
|
|
19
19
|
Object.defineProperty(exports, "QUOTA_PROVIDER_IDS", { enumerable: true, get: function () { return providerIds_1.QUOTA_PROVIDER_IDS; } });
|
|
@@ -58,6 +58,8 @@ Object.defineProperty(exports, "sessionEvidenceRefV1Schema", { enumerable: true,
|
|
|
58
58
|
var quota_1 = require("./quota");
|
|
59
59
|
Object.defineProperty(exports, "quotaWindowSchema", { enumerable: true, get: function () { return quota_1.quotaWindowSchema; } });
|
|
60
60
|
Object.defineProperty(exports, "quotaStateSchema", { enumerable: true, get: function () { return quota_1.quotaStateSchema; } });
|
|
61
|
+
Object.defineProperty(exports, "quotaLimitRowSchema", { enumerable: true, get: function () { return quota_1.quotaLimitRowSchema; } });
|
|
62
|
+
Object.defineProperty(exports, "quotaExtraUsageSchema", { enumerable: true, get: function () { return quota_1.quotaExtraUsageSchema; } });
|
|
61
63
|
Object.defineProperty(exports, "quotaFailureKindSchema", { enumerable: true, get: function () { return quota_1.quotaFailureKindSchema; } });
|
|
62
64
|
Object.defineProperty(exports, "quotaProviderIdSchema", { enumerable: true, get: function () { return quota_1.quotaProviderIdSchema; } });
|
|
63
65
|
Object.defineProperty(exports, "quotaSourceSchema", { enumerable: true, get: function () { return quota_1.quotaSourceSchema; } });
|
|
@@ -119,5 +121,6 @@ Object.defineProperty(exports, "stateFileBillingBlockSchema", { enumerable: true
|
|
|
119
121
|
Object.defineProperty(exports, "stateFileContextSchema", { enumerable: true, get: function () { return stateFile_1.stateFileContextSchema; } });
|
|
120
122
|
Object.defineProperty(exports, "stateFileQuotaSchema", { enumerable: true, get: function () { return stateFile_1.stateFileQuotaSchema; } });
|
|
121
123
|
Object.defineProperty(exports, "stateFileQuotaWindowSchema", { enumerable: true, get: function () { return stateFile_1.stateFileQuotaWindowSchema; } });
|
|
124
|
+
Object.defineProperty(exports, "stateFileQuotaLimitSchema", { enumerable: true, get: function () { return stateFile_1.stateFileQuotaLimitSchema; } });
|
|
122
125
|
Object.defineProperty(exports, "stateFileSessionSchema", { enumerable: true, get: function () { return stateFile_1.stateFileSessionSchema; } });
|
|
123
126
|
Object.defineProperty(exports, "stateFileWriterSchema", { enumerable: true, get: function () { return stateFile_1.stateFileWriterSchema; } });
|
package/dist/schemas/quota.d.ts
CHANGED
|
@@ -12,6 +12,32 @@ import { z } from 'zod';
|
|
|
12
12
|
export declare const quotaWindowSchema: z.ZodObject<{
|
|
13
13
|
utilization: z.ZodNumber;
|
|
14
14
|
resetsAt: z.ZodString;
|
|
15
|
+
absent: z.ZodOptional<z.ZodBoolean>;
|
|
16
|
+
windowMs: z.ZodOptional<z.ZodNumber>;
|
|
17
|
+
}, z.core.$strip>;
|
|
18
|
+
export declare const quotaLimitRowSchema: z.ZodObject<{
|
|
19
|
+
kind: z.ZodString;
|
|
20
|
+
group: z.ZodString;
|
|
21
|
+
label: z.ZodString;
|
|
22
|
+
utilization: z.ZodNumber;
|
|
23
|
+
resetsAt: z.ZodString;
|
|
24
|
+
windowMs: z.ZodOptional<z.ZodNumber>;
|
|
25
|
+
projected: z.ZodOptional<z.ZodNumber>;
|
|
26
|
+
scopeModel: z.ZodOptional<z.ZodString>;
|
|
27
|
+
scopeSurface: z.ZodOptional<z.ZodString>;
|
|
28
|
+
severity: z.ZodOptional<z.ZodString>;
|
|
29
|
+
isActive: z.ZodOptional<z.ZodBoolean>;
|
|
30
|
+
allowancePercentOfWeekly: z.ZodOptional<z.ZodNumber>;
|
|
31
|
+
usedPercentOfWeekly: z.ZodOptional<z.ZodNumber>;
|
|
32
|
+
}, z.core.$strip>;
|
|
33
|
+
export declare const quotaExtraUsageSchema: z.ZodObject<{
|
|
34
|
+
enabled: z.ZodBoolean;
|
|
35
|
+
monthlyLimit: z.ZodNullable<z.ZodNumber>;
|
|
36
|
+
usedCredits: z.ZodNullable<z.ZodNumber>;
|
|
37
|
+
utilization: z.ZodNullable<z.ZodNumber>;
|
|
38
|
+
currency: z.ZodOptional<z.ZodString>;
|
|
39
|
+
decimalPlaces: z.ZodOptional<z.ZodNumber>;
|
|
40
|
+
disabledReason: z.ZodOptional<z.ZodString>;
|
|
15
41
|
}, z.core.$strip>;
|
|
16
42
|
export declare const quotaFailureKindSchema: z.ZodEnum<{
|
|
17
43
|
unknown: "unknown";
|
|
@@ -68,10 +94,14 @@ export declare const quotaStateSchema: z.ZodObject<{
|
|
|
68
94
|
fiveHour: z.ZodObject<{
|
|
69
95
|
utilization: z.ZodNumber;
|
|
70
96
|
resetsAt: z.ZodString;
|
|
97
|
+
absent: z.ZodOptional<z.ZodBoolean>;
|
|
98
|
+
windowMs: z.ZodOptional<z.ZodNumber>;
|
|
71
99
|
}, z.core.$strip>;
|
|
72
100
|
sevenDay: z.ZodObject<{
|
|
73
101
|
utilization: z.ZodNumber;
|
|
74
102
|
resetsAt: z.ZodString;
|
|
103
|
+
absent: z.ZodOptional<z.ZodBoolean>;
|
|
104
|
+
windowMs: z.ZodOptional<z.ZodNumber>;
|
|
75
105
|
}, z.core.$strip>;
|
|
76
106
|
available: z.ZodBoolean;
|
|
77
107
|
error: z.ZodOptional<z.ZodString>;
|
|
@@ -132,7 +162,32 @@ export declare const quotaStateSchema: z.ZodObject<{
|
|
|
132
162
|
capturedAt: z.ZodOptional<z.ZodString>;
|
|
133
163
|
}, z.core.$strip>>;
|
|
134
164
|
planType: z.ZodOptional<z.ZodString>;
|
|
165
|
+
planLabel: z.ZodOptional<z.ZodString>;
|
|
135
166
|
rateLimitReachedType: z.ZodOptional<z.ZodString>;
|
|
167
|
+
limits: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
168
|
+
kind: z.ZodString;
|
|
169
|
+
group: z.ZodString;
|
|
170
|
+
label: z.ZodString;
|
|
171
|
+
utilization: z.ZodNumber;
|
|
172
|
+
resetsAt: z.ZodString;
|
|
173
|
+
windowMs: z.ZodOptional<z.ZodNumber>;
|
|
174
|
+
projected: z.ZodOptional<z.ZodNumber>;
|
|
175
|
+
scopeModel: z.ZodOptional<z.ZodString>;
|
|
176
|
+
scopeSurface: z.ZodOptional<z.ZodString>;
|
|
177
|
+
severity: z.ZodOptional<z.ZodString>;
|
|
178
|
+
isActive: z.ZodOptional<z.ZodBoolean>;
|
|
179
|
+
allowancePercentOfWeekly: z.ZodOptional<z.ZodNumber>;
|
|
180
|
+
usedPercentOfWeekly: z.ZodOptional<z.ZodNumber>;
|
|
181
|
+
}, z.core.$strip>>>;
|
|
182
|
+
extraUsage: z.ZodOptional<z.ZodObject<{
|
|
183
|
+
enabled: z.ZodBoolean;
|
|
184
|
+
monthlyLimit: z.ZodNullable<z.ZodNumber>;
|
|
185
|
+
usedCredits: z.ZodNullable<z.ZodNumber>;
|
|
186
|
+
utilization: z.ZodNullable<z.ZodNumber>;
|
|
187
|
+
currency: z.ZodOptional<z.ZodString>;
|
|
188
|
+
decimalPlaces: z.ZodOptional<z.ZodNumber>;
|
|
189
|
+
disabledReason: z.ZodOptional<z.ZodString>;
|
|
190
|
+
}, z.core.$strip>>;
|
|
136
191
|
}, z.core.$strip>;
|
|
137
192
|
export declare const peakHoursStateSchema: z.ZodObject<{
|
|
138
193
|
status: z.ZodEnum<{
|
|
@@ -180,10 +235,14 @@ export declare const providerQuotaStateSchema: z.ZodObject<{
|
|
|
180
235
|
fiveHour: z.ZodObject<{
|
|
181
236
|
utilization: z.ZodNumber;
|
|
182
237
|
resetsAt: z.ZodString;
|
|
238
|
+
absent: z.ZodOptional<z.ZodBoolean>;
|
|
239
|
+
windowMs: z.ZodOptional<z.ZodNumber>;
|
|
183
240
|
}, z.core.$strip>;
|
|
184
241
|
sevenDay: z.ZodObject<{
|
|
185
242
|
utilization: z.ZodNumber;
|
|
186
243
|
resetsAt: z.ZodString;
|
|
244
|
+
absent: z.ZodOptional<z.ZodBoolean>;
|
|
245
|
+
windowMs: z.ZodOptional<z.ZodNumber>;
|
|
187
246
|
}, z.core.$strip>;
|
|
188
247
|
available: z.ZodBoolean;
|
|
189
248
|
error: z.ZodOptional<z.ZodString>;
|
|
@@ -244,7 +303,32 @@ export declare const providerQuotaStateSchema: z.ZodObject<{
|
|
|
244
303
|
capturedAt: z.ZodOptional<z.ZodString>;
|
|
245
304
|
}, z.core.$strip>>;
|
|
246
305
|
planType: z.ZodOptional<z.ZodString>;
|
|
306
|
+
planLabel: z.ZodOptional<z.ZodString>;
|
|
247
307
|
rateLimitReachedType: z.ZodOptional<z.ZodString>;
|
|
308
|
+
limits: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
309
|
+
kind: z.ZodString;
|
|
310
|
+
group: z.ZodString;
|
|
311
|
+
label: z.ZodString;
|
|
312
|
+
utilization: z.ZodNumber;
|
|
313
|
+
resetsAt: z.ZodString;
|
|
314
|
+
windowMs: z.ZodOptional<z.ZodNumber>;
|
|
315
|
+
projected: z.ZodOptional<z.ZodNumber>;
|
|
316
|
+
scopeModel: z.ZodOptional<z.ZodString>;
|
|
317
|
+
scopeSurface: z.ZodOptional<z.ZodString>;
|
|
318
|
+
severity: z.ZodOptional<z.ZodString>;
|
|
319
|
+
isActive: z.ZodOptional<z.ZodBoolean>;
|
|
320
|
+
allowancePercentOfWeekly: z.ZodOptional<z.ZodNumber>;
|
|
321
|
+
usedPercentOfWeekly: z.ZodOptional<z.ZodNumber>;
|
|
322
|
+
}, z.core.$strip>>>;
|
|
323
|
+
extraUsage: z.ZodOptional<z.ZodObject<{
|
|
324
|
+
enabled: z.ZodBoolean;
|
|
325
|
+
monthlyLimit: z.ZodNullable<z.ZodNumber>;
|
|
326
|
+
usedCredits: z.ZodNullable<z.ZodNumber>;
|
|
327
|
+
utilization: z.ZodNullable<z.ZodNumber>;
|
|
328
|
+
currency: z.ZodOptional<z.ZodString>;
|
|
329
|
+
decimalPlaces: z.ZodOptional<z.ZodNumber>;
|
|
330
|
+
disabledReason: z.ZodOptional<z.ZodString>;
|
|
331
|
+
}, z.core.$strip>>;
|
|
248
332
|
accountLabel: z.ZodOptional<z.ZodString>;
|
|
249
333
|
accountDetail: z.ZodOptional<z.ZodString>;
|
|
250
334
|
peakHours: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
@@ -294,10 +378,14 @@ export declare const claudeProviderQuotaStateSchema: z.ZodObject<{
|
|
|
294
378
|
fiveHour: z.ZodObject<{
|
|
295
379
|
utilization: z.ZodNumber;
|
|
296
380
|
resetsAt: z.ZodString;
|
|
381
|
+
absent: z.ZodOptional<z.ZodBoolean>;
|
|
382
|
+
windowMs: z.ZodOptional<z.ZodNumber>;
|
|
297
383
|
}, z.core.$strip>;
|
|
298
384
|
sevenDay: z.ZodObject<{
|
|
299
385
|
utilization: z.ZodNumber;
|
|
300
386
|
resetsAt: z.ZodString;
|
|
387
|
+
absent: z.ZodOptional<z.ZodBoolean>;
|
|
388
|
+
windowMs: z.ZodOptional<z.ZodNumber>;
|
|
301
389
|
}, z.core.$strip>;
|
|
302
390
|
available: z.ZodBoolean;
|
|
303
391
|
error: z.ZodOptional<z.ZodString>;
|
|
@@ -358,7 +446,32 @@ export declare const claudeProviderQuotaStateSchema: z.ZodObject<{
|
|
|
358
446
|
capturedAt: z.ZodOptional<z.ZodString>;
|
|
359
447
|
}, z.core.$strip>>;
|
|
360
448
|
planType: z.ZodOptional<z.ZodString>;
|
|
449
|
+
planLabel: z.ZodOptional<z.ZodString>;
|
|
361
450
|
rateLimitReachedType: z.ZodOptional<z.ZodString>;
|
|
451
|
+
limits: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
452
|
+
kind: z.ZodString;
|
|
453
|
+
group: z.ZodString;
|
|
454
|
+
label: z.ZodString;
|
|
455
|
+
utilization: z.ZodNumber;
|
|
456
|
+
resetsAt: z.ZodString;
|
|
457
|
+
windowMs: z.ZodOptional<z.ZodNumber>;
|
|
458
|
+
projected: z.ZodOptional<z.ZodNumber>;
|
|
459
|
+
scopeModel: z.ZodOptional<z.ZodString>;
|
|
460
|
+
scopeSurface: z.ZodOptional<z.ZodString>;
|
|
461
|
+
severity: z.ZodOptional<z.ZodString>;
|
|
462
|
+
isActive: z.ZodOptional<z.ZodBoolean>;
|
|
463
|
+
allowancePercentOfWeekly: z.ZodOptional<z.ZodNumber>;
|
|
464
|
+
usedPercentOfWeekly: z.ZodOptional<z.ZodNumber>;
|
|
465
|
+
}, z.core.$strip>>>;
|
|
466
|
+
extraUsage: z.ZodOptional<z.ZodObject<{
|
|
467
|
+
enabled: z.ZodBoolean;
|
|
468
|
+
monthlyLimit: z.ZodNullable<z.ZodNumber>;
|
|
469
|
+
usedCredits: z.ZodNullable<z.ZodNumber>;
|
|
470
|
+
utilization: z.ZodNullable<z.ZodNumber>;
|
|
471
|
+
currency: z.ZodOptional<z.ZodString>;
|
|
472
|
+
decimalPlaces: z.ZodOptional<z.ZodNumber>;
|
|
473
|
+
disabledReason: z.ZodOptional<z.ZodString>;
|
|
474
|
+
}, z.core.$strip>>;
|
|
362
475
|
accountLabel: z.ZodOptional<z.ZodString>;
|
|
363
476
|
accountDetail: z.ZodOptional<z.ZodString>;
|
|
364
477
|
peakHours: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
@@ -404,10 +517,14 @@ export declare const codexProviderQuotaStateSchema: z.ZodObject<{
|
|
|
404
517
|
fiveHour: z.ZodObject<{
|
|
405
518
|
utilization: z.ZodNumber;
|
|
406
519
|
resetsAt: z.ZodString;
|
|
520
|
+
absent: z.ZodOptional<z.ZodBoolean>;
|
|
521
|
+
windowMs: z.ZodOptional<z.ZodNumber>;
|
|
407
522
|
}, z.core.$strip>;
|
|
408
523
|
sevenDay: z.ZodObject<{
|
|
409
524
|
utilization: z.ZodNumber;
|
|
410
525
|
resetsAt: z.ZodString;
|
|
526
|
+
absent: z.ZodOptional<z.ZodBoolean>;
|
|
527
|
+
windowMs: z.ZodOptional<z.ZodNumber>;
|
|
411
528
|
}, z.core.$strip>;
|
|
412
529
|
available: z.ZodBoolean;
|
|
413
530
|
error: z.ZodOptional<z.ZodString>;
|
|
@@ -468,7 +585,32 @@ export declare const codexProviderQuotaStateSchema: z.ZodObject<{
|
|
|
468
585
|
capturedAt: z.ZodOptional<z.ZodString>;
|
|
469
586
|
}, z.core.$strip>>;
|
|
470
587
|
planType: z.ZodOptional<z.ZodString>;
|
|
588
|
+
planLabel: z.ZodOptional<z.ZodString>;
|
|
471
589
|
rateLimitReachedType: z.ZodOptional<z.ZodString>;
|
|
590
|
+
limits: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
591
|
+
kind: z.ZodString;
|
|
592
|
+
group: z.ZodString;
|
|
593
|
+
label: z.ZodString;
|
|
594
|
+
utilization: z.ZodNumber;
|
|
595
|
+
resetsAt: z.ZodString;
|
|
596
|
+
windowMs: z.ZodOptional<z.ZodNumber>;
|
|
597
|
+
projected: z.ZodOptional<z.ZodNumber>;
|
|
598
|
+
scopeModel: z.ZodOptional<z.ZodString>;
|
|
599
|
+
scopeSurface: z.ZodOptional<z.ZodString>;
|
|
600
|
+
severity: z.ZodOptional<z.ZodString>;
|
|
601
|
+
isActive: z.ZodOptional<z.ZodBoolean>;
|
|
602
|
+
allowancePercentOfWeekly: z.ZodOptional<z.ZodNumber>;
|
|
603
|
+
usedPercentOfWeekly: z.ZodOptional<z.ZodNumber>;
|
|
604
|
+
}, z.core.$strip>>>;
|
|
605
|
+
extraUsage: z.ZodOptional<z.ZodObject<{
|
|
606
|
+
enabled: z.ZodBoolean;
|
|
607
|
+
monthlyLimit: z.ZodNullable<z.ZodNumber>;
|
|
608
|
+
usedCredits: z.ZodNullable<z.ZodNumber>;
|
|
609
|
+
utilization: z.ZodNullable<z.ZodNumber>;
|
|
610
|
+
currency: z.ZodOptional<z.ZodString>;
|
|
611
|
+
decimalPlaces: z.ZodOptional<z.ZodNumber>;
|
|
612
|
+
disabledReason: z.ZodOptional<z.ZodString>;
|
|
613
|
+
}, z.core.$strip>>;
|
|
472
614
|
accountLabel: z.ZodOptional<z.ZodString>;
|
|
473
615
|
accountDetail: z.ZodOptional<z.ZodString>;
|
|
474
616
|
peakHours: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
@@ -514,10 +656,14 @@ export declare const zaiProviderQuotaStateSchema: z.ZodObject<{
|
|
|
514
656
|
fiveHour: z.ZodObject<{
|
|
515
657
|
utilization: z.ZodNumber;
|
|
516
658
|
resetsAt: z.ZodString;
|
|
659
|
+
absent: z.ZodOptional<z.ZodBoolean>;
|
|
660
|
+
windowMs: z.ZodOptional<z.ZodNumber>;
|
|
517
661
|
}, z.core.$strip>;
|
|
518
662
|
sevenDay: z.ZodObject<{
|
|
519
663
|
utilization: z.ZodNumber;
|
|
520
664
|
resetsAt: z.ZodString;
|
|
665
|
+
absent: z.ZodOptional<z.ZodBoolean>;
|
|
666
|
+
windowMs: z.ZodOptional<z.ZodNumber>;
|
|
521
667
|
}, z.core.$strip>;
|
|
522
668
|
available: z.ZodBoolean;
|
|
523
669
|
error: z.ZodOptional<z.ZodString>;
|
|
@@ -578,7 +724,32 @@ export declare const zaiProviderQuotaStateSchema: z.ZodObject<{
|
|
|
578
724
|
capturedAt: z.ZodOptional<z.ZodString>;
|
|
579
725
|
}, z.core.$strip>>;
|
|
580
726
|
planType: z.ZodOptional<z.ZodString>;
|
|
727
|
+
planLabel: z.ZodOptional<z.ZodString>;
|
|
581
728
|
rateLimitReachedType: z.ZodOptional<z.ZodString>;
|
|
729
|
+
limits: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
730
|
+
kind: z.ZodString;
|
|
731
|
+
group: z.ZodString;
|
|
732
|
+
label: z.ZodString;
|
|
733
|
+
utilization: z.ZodNumber;
|
|
734
|
+
resetsAt: z.ZodString;
|
|
735
|
+
windowMs: z.ZodOptional<z.ZodNumber>;
|
|
736
|
+
projected: z.ZodOptional<z.ZodNumber>;
|
|
737
|
+
scopeModel: z.ZodOptional<z.ZodString>;
|
|
738
|
+
scopeSurface: z.ZodOptional<z.ZodString>;
|
|
739
|
+
severity: z.ZodOptional<z.ZodString>;
|
|
740
|
+
isActive: z.ZodOptional<z.ZodBoolean>;
|
|
741
|
+
allowancePercentOfWeekly: z.ZodOptional<z.ZodNumber>;
|
|
742
|
+
usedPercentOfWeekly: z.ZodOptional<z.ZodNumber>;
|
|
743
|
+
}, z.core.$strip>>>;
|
|
744
|
+
extraUsage: z.ZodOptional<z.ZodObject<{
|
|
745
|
+
enabled: z.ZodBoolean;
|
|
746
|
+
monthlyLimit: z.ZodNullable<z.ZodNumber>;
|
|
747
|
+
usedCredits: z.ZodNullable<z.ZodNumber>;
|
|
748
|
+
utilization: z.ZodNullable<z.ZodNumber>;
|
|
749
|
+
currency: z.ZodOptional<z.ZodString>;
|
|
750
|
+
decimalPlaces: z.ZodOptional<z.ZodNumber>;
|
|
751
|
+
disabledReason: z.ZodOptional<z.ZodString>;
|
|
752
|
+
}, z.core.$strip>>;
|
|
582
753
|
accountLabel: z.ZodOptional<z.ZodString>;
|
|
583
754
|
accountDetail: z.ZodOptional<z.ZodString>;
|
|
584
755
|
peakHours: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
@@ -625,10 +796,14 @@ export declare const providerQuotaMapSchema: z.ZodObject<{
|
|
|
625
796
|
fiveHour: z.ZodObject<{
|
|
626
797
|
utilization: z.ZodNumber;
|
|
627
798
|
resetsAt: z.ZodString;
|
|
799
|
+
absent: z.ZodOptional<z.ZodBoolean>;
|
|
800
|
+
windowMs: z.ZodOptional<z.ZodNumber>;
|
|
628
801
|
}, z.core.$strip>;
|
|
629
802
|
sevenDay: z.ZodObject<{
|
|
630
803
|
utilization: z.ZodNumber;
|
|
631
804
|
resetsAt: z.ZodString;
|
|
805
|
+
absent: z.ZodOptional<z.ZodBoolean>;
|
|
806
|
+
windowMs: z.ZodOptional<z.ZodNumber>;
|
|
632
807
|
}, z.core.$strip>;
|
|
633
808
|
available: z.ZodBoolean;
|
|
634
809
|
error: z.ZodOptional<z.ZodString>;
|
|
@@ -689,7 +864,32 @@ export declare const providerQuotaMapSchema: z.ZodObject<{
|
|
|
689
864
|
capturedAt: z.ZodOptional<z.ZodString>;
|
|
690
865
|
}, z.core.$strip>>;
|
|
691
866
|
planType: z.ZodOptional<z.ZodString>;
|
|
867
|
+
planLabel: z.ZodOptional<z.ZodString>;
|
|
692
868
|
rateLimitReachedType: z.ZodOptional<z.ZodString>;
|
|
869
|
+
limits: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
870
|
+
kind: z.ZodString;
|
|
871
|
+
group: z.ZodString;
|
|
872
|
+
label: z.ZodString;
|
|
873
|
+
utilization: z.ZodNumber;
|
|
874
|
+
resetsAt: z.ZodString;
|
|
875
|
+
windowMs: z.ZodOptional<z.ZodNumber>;
|
|
876
|
+
projected: z.ZodOptional<z.ZodNumber>;
|
|
877
|
+
scopeModel: z.ZodOptional<z.ZodString>;
|
|
878
|
+
scopeSurface: z.ZodOptional<z.ZodString>;
|
|
879
|
+
severity: z.ZodOptional<z.ZodString>;
|
|
880
|
+
isActive: z.ZodOptional<z.ZodBoolean>;
|
|
881
|
+
allowancePercentOfWeekly: z.ZodOptional<z.ZodNumber>;
|
|
882
|
+
usedPercentOfWeekly: z.ZodOptional<z.ZodNumber>;
|
|
883
|
+
}, z.core.$strip>>>;
|
|
884
|
+
extraUsage: z.ZodOptional<z.ZodObject<{
|
|
885
|
+
enabled: z.ZodBoolean;
|
|
886
|
+
monthlyLimit: z.ZodNullable<z.ZodNumber>;
|
|
887
|
+
usedCredits: z.ZodNullable<z.ZodNumber>;
|
|
888
|
+
utilization: z.ZodNullable<z.ZodNumber>;
|
|
889
|
+
currency: z.ZodOptional<z.ZodString>;
|
|
890
|
+
decimalPlaces: z.ZodOptional<z.ZodNumber>;
|
|
891
|
+
disabledReason: z.ZodOptional<z.ZodString>;
|
|
892
|
+
}, z.core.$strip>>;
|
|
693
893
|
accountLabel: z.ZodOptional<z.ZodString>;
|
|
694
894
|
accountDetail: z.ZodOptional<z.ZodString>;
|
|
695
895
|
peakHours: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
@@ -735,10 +935,14 @@ export declare const providerQuotaMapSchema: z.ZodObject<{
|
|
|
735
935
|
fiveHour: z.ZodObject<{
|
|
736
936
|
utilization: z.ZodNumber;
|
|
737
937
|
resetsAt: z.ZodString;
|
|
938
|
+
absent: z.ZodOptional<z.ZodBoolean>;
|
|
939
|
+
windowMs: z.ZodOptional<z.ZodNumber>;
|
|
738
940
|
}, z.core.$strip>;
|
|
739
941
|
sevenDay: z.ZodObject<{
|
|
740
942
|
utilization: z.ZodNumber;
|
|
741
943
|
resetsAt: z.ZodString;
|
|
944
|
+
absent: z.ZodOptional<z.ZodBoolean>;
|
|
945
|
+
windowMs: z.ZodOptional<z.ZodNumber>;
|
|
742
946
|
}, z.core.$strip>;
|
|
743
947
|
available: z.ZodBoolean;
|
|
744
948
|
error: z.ZodOptional<z.ZodString>;
|
|
@@ -799,7 +1003,32 @@ export declare const providerQuotaMapSchema: z.ZodObject<{
|
|
|
799
1003
|
capturedAt: z.ZodOptional<z.ZodString>;
|
|
800
1004
|
}, z.core.$strip>>;
|
|
801
1005
|
planType: z.ZodOptional<z.ZodString>;
|
|
1006
|
+
planLabel: z.ZodOptional<z.ZodString>;
|
|
802
1007
|
rateLimitReachedType: z.ZodOptional<z.ZodString>;
|
|
1008
|
+
limits: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1009
|
+
kind: z.ZodString;
|
|
1010
|
+
group: z.ZodString;
|
|
1011
|
+
label: z.ZodString;
|
|
1012
|
+
utilization: z.ZodNumber;
|
|
1013
|
+
resetsAt: z.ZodString;
|
|
1014
|
+
windowMs: z.ZodOptional<z.ZodNumber>;
|
|
1015
|
+
projected: z.ZodOptional<z.ZodNumber>;
|
|
1016
|
+
scopeModel: z.ZodOptional<z.ZodString>;
|
|
1017
|
+
scopeSurface: z.ZodOptional<z.ZodString>;
|
|
1018
|
+
severity: z.ZodOptional<z.ZodString>;
|
|
1019
|
+
isActive: z.ZodOptional<z.ZodBoolean>;
|
|
1020
|
+
allowancePercentOfWeekly: z.ZodOptional<z.ZodNumber>;
|
|
1021
|
+
usedPercentOfWeekly: z.ZodOptional<z.ZodNumber>;
|
|
1022
|
+
}, z.core.$strip>>>;
|
|
1023
|
+
extraUsage: z.ZodOptional<z.ZodObject<{
|
|
1024
|
+
enabled: z.ZodBoolean;
|
|
1025
|
+
monthlyLimit: z.ZodNullable<z.ZodNumber>;
|
|
1026
|
+
usedCredits: z.ZodNullable<z.ZodNumber>;
|
|
1027
|
+
utilization: z.ZodNullable<z.ZodNumber>;
|
|
1028
|
+
currency: z.ZodOptional<z.ZodString>;
|
|
1029
|
+
decimalPlaces: z.ZodOptional<z.ZodNumber>;
|
|
1030
|
+
disabledReason: z.ZodOptional<z.ZodString>;
|
|
1031
|
+
}, z.core.$strip>>;
|
|
803
1032
|
accountLabel: z.ZodOptional<z.ZodString>;
|
|
804
1033
|
accountDetail: z.ZodOptional<z.ZodString>;
|
|
805
1034
|
peakHours: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
@@ -845,10 +1074,14 @@ export declare const providerQuotaMapSchema: z.ZodObject<{
|
|
|
845
1074
|
fiveHour: z.ZodObject<{
|
|
846
1075
|
utilization: z.ZodNumber;
|
|
847
1076
|
resetsAt: z.ZodString;
|
|
1077
|
+
absent: z.ZodOptional<z.ZodBoolean>;
|
|
1078
|
+
windowMs: z.ZodOptional<z.ZodNumber>;
|
|
848
1079
|
}, z.core.$strip>;
|
|
849
1080
|
sevenDay: z.ZodObject<{
|
|
850
1081
|
utilization: z.ZodNumber;
|
|
851
1082
|
resetsAt: z.ZodString;
|
|
1083
|
+
absent: z.ZodOptional<z.ZodBoolean>;
|
|
1084
|
+
windowMs: z.ZodOptional<z.ZodNumber>;
|
|
852
1085
|
}, z.core.$strip>;
|
|
853
1086
|
available: z.ZodBoolean;
|
|
854
1087
|
error: z.ZodOptional<z.ZodString>;
|
|
@@ -909,7 +1142,32 @@ export declare const providerQuotaMapSchema: z.ZodObject<{
|
|
|
909
1142
|
capturedAt: z.ZodOptional<z.ZodString>;
|
|
910
1143
|
}, z.core.$strip>>;
|
|
911
1144
|
planType: z.ZodOptional<z.ZodString>;
|
|
1145
|
+
planLabel: z.ZodOptional<z.ZodString>;
|
|
912
1146
|
rateLimitReachedType: z.ZodOptional<z.ZodString>;
|
|
1147
|
+
limits: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1148
|
+
kind: z.ZodString;
|
|
1149
|
+
group: z.ZodString;
|
|
1150
|
+
label: z.ZodString;
|
|
1151
|
+
utilization: z.ZodNumber;
|
|
1152
|
+
resetsAt: z.ZodString;
|
|
1153
|
+
windowMs: z.ZodOptional<z.ZodNumber>;
|
|
1154
|
+
projected: z.ZodOptional<z.ZodNumber>;
|
|
1155
|
+
scopeModel: z.ZodOptional<z.ZodString>;
|
|
1156
|
+
scopeSurface: z.ZodOptional<z.ZodString>;
|
|
1157
|
+
severity: z.ZodOptional<z.ZodString>;
|
|
1158
|
+
isActive: z.ZodOptional<z.ZodBoolean>;
|
|
1159
|
+
allowancePercentOfWeekly: z.ZodOptional<z.ZodNumber>;
|
|
1160
|
+
usedPercentOfWeekly: z.ZodOptional<z.ZodNumber>;
|
|
1161
|
+
}, z.core.$strip>>>;
|
|
1162
|
+
extraUsage: z.ZodOptional<z.ZodObject<{
|
|
1163
|
+
enabled: z.ZodBoolean;
|
|
1164
|
+
monthlyLimit: z.ZodNullable<z.ZodNumber>;
|
|
1165
|
+
usedCredits: z.ZodNullable<z.ZodNumber>;
|
|
1166
|
+
utilization: z.ZodNullable<z.ZodNumber>;
|
|
1167
|
+
currency: z.ZodOptional<z.ZodString>;
|
|
1168
|
+
decimalPlaces: z.ZodOptional<z.ZodNumber>;
|
|
1169
|
+
disabledReason: z.ZodOptional<z.ZodString>;
|
|
1170
|
+
}, z.core.$strip>>;
|
|
913
1171
|
accountLabel: z.ZodOptional<z.ZodString>;
|
|
914
1172
|
accountDetail: z.ZodOptional<z.ZodString>;
|
|
915
1173
|
peakHours: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
package/dist/schemas/quota.js
CHANGED
|
@@ -10,13 +10,40 @@
|
|
|
10
10
|
* @module schemas/quota
|
|
11
11
|
*/
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
exports.providerQuotaMapSchema = exports.zaiProviderQuotaStateSchema = exports.codexProviderQuotaStateSchema = exports.claudeProviderQuotaStateSchema = exports.providerQuotaStateSchema = exports.runtimeQuotaProviderSchema = exports.quotaFailureDescriptorSchema = exports.peakHoursStateSchema = exports.quotaStateSchema = exports.codexResetCreditsSnapshotSchema = exports.codexResetCreditSchema = exports.quotaFreshnessSchema = exports.quotaCapturedSourceSchema = exports.quotaSourceSchema = exports.quotaProviderIdSchema = exports.quotaFailureKindSchema = exports.quotaWindowSchema = void 0;
|
|
13
|
+
exports.providerQuotaMapSchema = exports.zaiProviderQuotaStateSchema = exports.codexProviderQuotaStateSchema = exports.claudeProviderQuotaStateSchema = exports.providerQuotaStateSchema = exports.runtimeQuotaProviderSchema = exports.quotaFailureDescriptorSchema = exports.peakHoursStateSchema = exports.quotaStateSchema = exports.codexResetCreditsSnapshotSchema = exports.codexResetCreditSchema = exports.quotaFreshnessSchema = exports.quotaCapturedSourceSchema = exports.quotaSourceSchema = exports.quotaProviderIdSchema = exports.quotaFailureKindSchema = exports.quotaExtraUsageSchema = exports.quotaLimitRowSchema = exports.quotaWindowSchema = void 0;
|
|
14
14
|
const zod_1 = require("zod");
|
|
15
15
|
const providerIds_1 = require("../providerIds");
|
|
16
16
|
// ── QuotaWindow ──
|
|
17
17
|
exports.quotaWindowSchema = zod_1.z.object({
|
|
18
18
|
utilization: zod_1.z.number(),
|
|
19
19
|
resetsAt: zod_1.z.string(),
|
|
20
|
+
absent: zod_1.z.boolean().optional(),
|
|
21
|
+
windowMs: zod_1.z.number().optional(),
|
|
22
|
+
});
|
|
23
|
+
// ── QuotaLimitRow / QuotaExtraUsage ──
|
|
24
|
+
exports.quotaLimitRowSchema = zod_1.z.object({
|
|
25
|
+
kind: zod_1.z.string(),
|
|
26
|
+
group: zod_1.z.string(),
|
|
27
|
+
label: zod_1.z.string(),
|
|
28
|
+
utilization: zod_1.z.number(),
|
|
29
|
+
resetsAt: zod_1.z.string(),
|
|
30
|
+
windowMs: zod_1.z.number().optional(),
|
|
31
|
+
projected: zod_1.z.number().optional(),
|
|
32
|
+
scopeModel: zod_1.z.string().optional(),
|
|
33
|
+
scopeSurface: zod_1.z.string().optional(),
|
|
34
|
+
severity: zod_1.z.string().optional(),
|
|
35
|
+
isActive: zod_1.z.boolean().optional(),
|
|
36
|
+
allowancePercentOfWeekly: zod_1.z.number().optional(),
|
|
37
|
+
usedPercentOfWeekly: zod_1.z.number().optional(),
|
|
38
|
+
});
|
|
39
|
+
exports.quotaExtraUsageSchema = zod_1.z.object({
|
|
40
|
+
enabled: zod_1.z.boolean(),
|
|
41
|
+
monthlyLimit: zod_1.z.number().nullable(),
|
|
42
|
+
usedCredits: zod_1.z.number().nullable(),
|
|
43
|
+
utilization: zod_1.z.number().nullable(),
|
|
44
|
+
currency: zod_1.z.string().optional(),
|
|
45
|
+
decimalPlaces: zod_1.z.number().optional(),
|
|
46
|
+
disabledReason: zod_1.z.string().optional(),
|
|
20
47
|
});
|
|
21
48
|
// ── QuotaState ──
|
|
22
49
|
exports.quotaFailureKindSchema = zod_1.z.enum([
|
|
@@ -77,7 +104,10 @@ exports.quotaStateSchema = zod_1.z.object({
|
|
|
77
104
|
credits: zod_1.z.unknown().optional(),
|
|
78
105
|
resetCredits: exports.codexResetCreditsSnapshotSchema.optional(),
|
|
79
106
|
planType: zod_1.z.string().optional(),
|
|
107
|
+
planLabel: zod_1.z.string().optional(),
|
|
80
108
|
rateLimitReachedType: zod_1.z.string().optional(),
|
|
109
|
+
limits: zod_1.z.array(exports.quotaLimitRowSchema).optional(),
|
|
110
|
+
extraUsage: exports.quotaExtraUsageSchema.optional(),
|
|
81
111
|
});
|
|
82
112
|
// ── PeakHoursState ──
|
|
83
113
|
exports.peakHoursStateSchema = zod_1.z.object({
|
|
@@ -26,10 +26,12 @@ export declare const quotaHistorySampleSchema: z.ZodObject<{
|
|
|
26
26
|
fiveHour: z.ZodObject<{
|
|
27
27
|
utilization: z.ZodNumber;
|
|
28
28
|
resetsAt: z.ZodString;
|
|
29
|
+
absent: z.ZodOptional<z.ZodBoolean>;
|
|
29
30
|
}, z.core.$strip>;
|
|
30
31
|
sevenDay: z.ZodObject<{
|
|
31
32
|
utilization: z.ZodNumber;
|
|
32
33
|
resetsAt: z.ZodString;
|
|
34
|
+
absent: z.ZodOptional<z.ZodBoolean>;
|
|
33
35
|
}, z.core.$strip>;
|
|
34
36
|
available: z.ZodBoolean;
|
|
35
37
|
error: z.ZodOptional<z.ZodString>;
|