@camerontaylor/paseo-protocol 0.11.0-beta.1.fork.1 → 0.11.0-beta.3.fork.1

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.
@@ -20157,12 +20157,20 @@ export declare const ProviderUsageListResponseMessageSchema: z.ZodObject<{
20157
20157
  }, z.core.$strip>>;
20158
20158
  }, z.core.$strip>;
20159
20159
  }, z.core.$strip>;
20160
- export declare const UsageReportSchema: z.ZodObject<{
20161
- status: z.ZodEnum<{
20162
- error: "error";
20163
- unavailable: "unavailable";
20164
- available: "available";
20165
- }>;
20160
+ export declare const UsageProblemSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
20161
+ kind: z.ZodLiteral<"expired">;
20162
+ expiresAt: z.ZodISODateTime;
20163
+ refreshedBy: z.ZodOptional<z.ZodString>;
20164
+ }, z.core.$strip>, z.ZodObject<{
20165
+ kind: z.ZodLiteral<"rejected">;
20166
+ status: z.ZodNumber;
20167
+ refreshedBy: z.ZodOptional<z.ZodString>;
20168
+ }, z.core.$strip>, z.ZodObject<{
20169
+ kind: z.ZodLiteral<"no_quota">;
20170
+ detail: z.ZodString;
20171
+ }, z.core.$strip>], "kind">;
20172
+ export declare const UsageReportSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
20173
+ status: z.ZodLiteral<"available">;
20166
20174
  planLabel: z.ZodOptional<z.ZodString>;
20167
20175
  windows: z.ZodArray<z.ZodObject<{
20168
20176
  id: z.ZodString;
@@ -20212,8 +20220,24 @@ export declare const UsageReportSchema: z.ZodObject<{
20212
20220
  ok: "ok";
20213
20221
  }>>;
20214
20222
  }, z.core.$strip>>>;
20215
- error: z.ZodOptional<z.ZodString>;
20216
- }, z.core.$strip>;
20223
+ }, z.core.$strip>, z.ZodObject<{
20224
+ status: z.ZodLiteral<"unavailable">;
20225
+ problem: z.ZodDiscriminatedUnion<[z.ZodObject<{
20226
+ kind: z.ZodLiteral<"expired">;
20227
+ expiresAt: z.ZodISODateTime;
20228
+ refreshedBy: z.ZodOptional<z.ZodString>;
20229
+ }, z.core.$strip>, z.ZodObject<{
20230
+ kind: z.ZodLiteral<"rejected">;
20231
+ status: z.ZodNumber;
20232
+ refreshedBy: z.ZodOptional<z.ZodString>;
20233
+ }, z.core.$strip>, z.ZodObject<{
20234
+ kind: z.ZodLiteral<"no_quota">;
20235
+ detail: z.ZodString;
20236
+ }, z.core.$strip>], "kind">;
20237
+ }, z.core.$strip>, z.ZodObject<{
20238
+ status: z.ZodLiteral<"error">;
20239
+ error: z.ZodString;
20240
+ }, z.core.$strip>], "status">;
20217
20241
  export declare const UsageReportEntrySchema: z.ZodObject<{
20218
20242
  id: z.ZodString;
20219
20243
  account: z.ZodObject<{
@@ -20223,12 +20247,8 @@ export declare const UsageReportEntrySchema: z.ZodObject<{
20223
20247
  sourceId: z.ZodString;
20224
20248
  sourceLabel: z.ZodString;
20225
20249
  icon: z.ZodOptional<z.ZodString>;
20226
- report: z.ZodObject<{
20227
- status: z.ZodEnum<{
20228
- error: "error";
20229
- unavailable: "unavailable";
20230
- available: "available";
20231
- }>;
20250
+ report: z.ZodDiscriminatedUnion<[z.ZodObject<{
20251
+ status: z.ZodLiteral<"available">;
20232
20252
  planLabel: z.ZodOptional<z.ZodString>;
20233
20253
  windows: z.ZodArray<z.ZodObject<{
20234
20254
  id: z.ZodString;
@@ -20278,8 +20298,24 @@ export declare const UsageReportEntrySchema: z.ZodObject<{
20278
20298
  ok: "ok";
20279
20299
  }>>;
20280
20300
  }, z.core.$strip>>>;
20281
- error: z.ZodOptional<z.ZodString>;
20282
- }, z.core.$strip>;
20301
+ }, z.core.$strip>, z.ZodObject<{
20302
+ status: z.ZodLiteral<"unavailable">;
20303
+ problem: z.ZodDiscriminatedUnion<[z.ZodObject<{
20304
+ kind: z.ZodLiteral<"expired">;
20305
+ expiresAt: z.ZodISODateTime;
20306
+ refreshedBy: z.ZodOptional<z.ZodString>;
20307
+ }, z.core.$strip>, z.ZodObject<{
20308
+ kind: z.ZodLiteral<"rejected">;
20309
+ status: z.ZodNumber;
20310
+ refreshedBy: z.ZodOptional<z.ZodString>;
20311
+ }, z.core.$strip>, z.ZodObject<{
20312
+ kind: z.ZodLiteral<"no_quota">;
20313
+ detail: z.ZodString;
20314
+ }, z.core.$strip>], "kind">;
20315
+ }, z.core.$strip>, z.ZodObject<{
20316
+ status: z.ZodLiteral<"error">;
20317
+ error: z.ZodString;
20318
+ }, z.core.$strip>], "status">;
20283
20319
  }, z.core.$strip>;
20284
20320
  export declare const UsageListReportsResponseMessageSchema: z.ZodObject<{
20285
20321
  type: z.ZodLiteral<"usage.list_reports.response">;
@@ -20294,12 +20330,8 @@ export declare const UsageListReportsResponseMessageSchema: z.ZodObject<{
20294
20330
  sourceId: z.ZodString;
20295
20331
  sourceLabel: z.ZodString;
20296
20332
  icon: z.ZodOptional<z.ZodString>;
20297
- report: z.ZodObject<{
20298
- status: z.ZodEnum<{
20299
- error: "error";
20300
- unavailable: "unavailable";
20301
- available: "available";
20302
- }>;
20333
+ report: z.ZodDiscriminatedUnion<[z.ZodObject<{
20334
+ status: z.ZodLiteral<"available">;
20303
20335
  planLabel: z.ZodOptional<z.ZodString>;
20304
20336
  windows: z.ZodArray<z.ZodObject<{
20305
20337
  id: z.ZodString;
@@ -20349,8 +20381,24 @@ export declare const UsageListReportsResponseMessageSchema: z.ZodObject<{
20349
20381
  ok: "ok";
20350
20382
  }>>;
20351
20383
  }, z.core.$strip>>>;
20352
- error: z.ZodOptional<z.ZodString>;
20353
- }, z.core.$strip>;
20384
+ }, z.core.$strip>, z.ZodObject<{
20385
+ status: z.ZodLiteral<"unavailable">;
20386
+ problem: z.ZodDiscriminatedUnion<[z.ZodObject<{
20387
+ kind: z.ZodLiteral<"expired">;
20388
+ expiresAt: z.ZodISODateTime;
20389
+ refreshedBy: z.ZodOptional<z.ZodString>;
20390
+ }, z.core.$strip>, z.ZodObject<{
20391
+ kind: z.ZodLiteral<"rejected">;
20392
+ status: z.ZodNumber;
20393
+ refreshedBy: z.ZodOptional<z.ZodString>;
20394
+ }, z.core.$strip>, z.ZodObject<{
20395
+ kind: z.ZodLiteral<"no_quota">;
20396
+ detail: z.ZodString;
20397
+ }, z.core.$strip>], "kind">;
20398
+ }, z.core.$strip>, z.ZodObject<{
20399
+ status: z.ZodLiteral<"error">;
20400
+ error: z.ZodString;
20401
+ }, z.core.$strip>], "status">;
20354
20402
  }, z.core.$strip>>;
20355
20403
  }, z.core.$strip>;
20356
20404
  }, z.core.$strip>;
@@ -32970,12 +33018,8 @@ export declare const SessionOutboundMessageSchema: z.ZodDiscriminatedUnion<[z.Zo
32970
33018
  sourceId: z.ZodString;
32971
33019
  sourceLabel: z.ZodString;
32972
33020
  icon: z.ZodOptional<z.ZodString>;
32973
- report: z.ZodObject<{
32974
- status: z.ZodEnum<{
32975
- error: "error";
32976
- unavailable: "unavailable";
32977
- available: "available";
32978
- }>;
33021
+ report: z.ZodDiscriminatedUnion<[z.ZodObject<{
33022
+ status: z.ZodLiteral<"available">;
32979
33023
  planLabel: z.ZodOptional<z.ZodString>;
32980
33024
  windows: z.ZodArray<z.ZodObject<{
32981
33025
  id: z.ZodString;
@@ -33025,8 +33069,24 @@ export declare const SessionOutboundMessageSchema: z.ZodDiscriminatedUnion<[z.Zo
33025
33069
  ok: "ok";
33026
33070
  }>>;
33027
33071
  }, z.core.$strip>>>;
33028
- error: z.ZodOptional<z.ZodString>;
33029
- }, z.core.$strip>;
33072
+ }, z.core.$strip>, z.ZodObject<{
33073
+ status: z.ZodLiteral<"unavailable">;
33074
+ problem: z.ZodDiscriminatedUnion<[z.ZodObject<{
33075
+ kind: z.ZodLiteral<"expired">;
33076
+ expiresAt: z.ZodISODateTime;
33077
+ refreshedBy: z.ZodOptional<z.ZodString>;
33078
+ }, z.core.$strip>, z.ZodObject<{
33079
+ kind: z.ZodLiteral<"rejected">;
33080
+ status: z.ZodNumber;
33081
+ refreshedBy: z.ZodOptional<z.ZodString>;
33082
+ }, z.core.$strip>, z.ZodObject<{
33083
+ kind: z.ZodLiteral<"no_quota">;
33084
+ detail: z.ZodString;
33085
+ }, z.core.$strip>], "kind">;
33086
+ }, z.core.$strip>, z.ZodObject<{
33087
+ status: z.ZodLiteral<"error">;
33088
+ error: z.ZodString;
33089
+ }, z.core.$strip>], "status">;
33030
33090
  }, z.core.$strip>>;
33031
33091
  }, z.core.$strip>;
33032
33092
  }, z.core.$strip>, z.ZodObject<{
@@ -34257,6 +34317,7 @@ export type ProvidersSnapshotUpdateMessage = z.infer<typeof ProvidersSnapshotUpd
34257
34317
  export type RefreshProvidersSnapshotResponseMessage = z.infer<typeof RefreshProvidersSnapshotResponseMessageSchema>;
34258
34318
  export type ProviderDiagnosticResponseMessage = z.infer<typeof ProviderDiagnosticResponseMessageSchema>;
34259
34319
  export type ProviderUsageTone = z.infer<typeof ProviderUsageToneSchema>;
34320
+ export type UsageProblem = z.infer<typeof UsageProblemSchema>;
34260
34321
  export type UsageReport = z.infer<typeof UsageReportSchema>;
34261
34322
  export type UsageReportEntry = z.infer<typeof UsageReportEntrySchema>;
34262
34323
  export type UsageListReportsResponseMessage = z.infer<typeof UsageListReportsResponseMessageSchema>;
@@ -48349,12 +48410,8 @@ export declare const WSSessionOutboundSchema: z.ZodObject<{
48349
48410
  sourceId: z.ZodString;
48350
48411
  sourceLabel: z.ZodString;
48351
48412
  icon: z.ZodOptional<z.ZodString>;
48352
- report: z.ZodObject<{
48353
- status: z.ZodEnum<{
48354
- error: "error";
48355
- unavailable: "unavailable";
48356
- available: "available";
48357
- }>;
48413
+ report: z.ZodDiscriminatedUnion<[z.ZodObject<{
48414
+ status: z.ZodLiteral<"available">;
48358
48415
  planLabel: z.ZodOptional<z.ZodString>;
48359
48416
  windows: z.ZodArray<z.ZodObject<{
48360
48417
  id: z.ZodString;
@@ -48404,8 +48461,24 @@ export declare const WSSessionOutboundSchema: z.ZodObject<{
48404
48461
  ok: "ok";
48405
48462
  }>>;
48406
48463
  }, z.core.$strip>>>;
48407
- error: z.ZodOptional<z.ZodString>;
48408
- }, z.core.$strip>;
48464
+ }, z.core.$strip>, z.ZodObject<{
48465
+ status: z.ZodLiteral<"unavailable">;
48466
+ problem: z.ZodDiscriminatedUnion<[z.ZodObject<{
48467
+ kind: z.ZodLiteral<"expired">;
48468
+ expiresAt: z.ZodISODateTime;
48469
+ refreshedBy: z.ZodOptional<z.ZodString>;
48470
+ }, z.core.$strip>, z.ZodObject<{
48471
+ kind: z.ZodLiteral<"rejected">;
48472
+ status: z.ZodNumber;
48473
+ refreshedBy: z.ZodOptional<z.ZodString>;
48474
+ }, z.core.$strip>, z.ZodObject<{
48475
+ kind: z.ZodLiteral<"no_quota">;
48476
+ detail: z.ZodString;
48477
+ }, z.core.$strip>], "kind">;
48478
+ }, z.core.$strip>, z.ZodObject<{
48479
+ status: z.ZodLiteral<"error">;
48480
+ error: z.ZodString;
48481
+ }, z.core.$strip>], "status">;
48409
48482
  }, z.core.$strip>>;
48410
48483
  }, z.core.$strip>;
48411
48484
  }, z.core.$strip>, z.ZodObject<{
@@ -63378,12 +63451,8 @@ export declare const WSOutboundMessageSchema: z.ZodDiscriminatedUnion<[z.ZodObje
63378
63451
  sourceId: z.ZodString;
63379
63452
  sourceLabel: z.ZodString;
63380
63453
  icon: z.ZodOptional<z.ZodString>;
63381
- report: z.ZodObject<{
63382
- status: z.ZodEnum<{
63383
- error: "error";
63384
- unavailable: "unavailable";
63385
- available: "available";
63386
- }>;
63454
+ report: z.ZodDiscriminatedUnion<[z.ZodObject<{
63455
+ status: z.ZodLiteral<"available">;
63387
63456
  planLabel: z.ZodOptional<z.ZodString>;
63388
63457
  windows: z.ZodArray<z.ZodObject<{
63389
63458
  id: z.ZodString;
@@ -63433,8 +63502,24 @@ export declare const WSOutboundMessageSchema: z.ZodDiscriminatedUnion<[z.ZodObje
63433
63502
  ok: "ok";
63434
63503
  }>>;
63435
63504
  }, z.core.$strip>>>;
63436
- error: z.ZodOptional<z.ZodString>;
63437
- }, z.core.$strip>;
63505
+ }, z.core.$strip>, z.ZodObject<{
63506
+ status: z.ZodLiteral<"unavailable">;
63507
+ problem: z.ZodDiscriminatedUnion<[z.ZodObject<{
63508
+ kind: z.ZodLiteral<"expired">;
63509
+ expiresAt: z.ZodISODateTime;
63510
+ refreshedBy: z.ZodOptional<z.ZodString>;
63511
+ }, z.core.$strip>, z.ZodObject<{
63512
+ kind: z.ZodLiteral<"rejected">;
63513
+ status: z.ZodNumber;
63514
+ refreshedBy: z.ZodOptional<z.ZodString>;
63515
+ }, z.core.$strip>, z.ZodObject<{
63516
+ kind: z.ZodLiteral<"no_quota">;
63517
+ detail: z.ZodString;
63518
+ }, z.core.$strip>], "kind">;
63519
+ }, z.core.$strip>, z.ZodObject<{
63520
+ status: z.ZodLiteral<"error">;
63521
+ error: z.ZodString;
63522
+ }, z.core.$strip>], "status">;
63438
63523
  }, z.core.$strip>>;
63439
63524
  }, z.core.$strip>;
63440
63525
  }, z.core.$strip>, z.ZodObject<{
package/dist/messages.js CHANGED
@@ -5634,14 +5634,30 @@ export const ProviderUsageListResponseMessageSchema = z.object({
5634
5634
  providers: z.array(ProviderUsageSchema),
5635
5635
  }),
5636
5636
  });
5637
- export const UsageReportSchema = z.object({
5638
- status: ProviderUsageStatusSchema,
5639
- planLabel: z.string().optional(),
5640
- windows: z.array(ProviderUsageWindowSchema),
5641
- balances: z.array(ProviderUsageBalanceSchema).optional(),
5642
- details: z.array(ProviderUsageDetailSchema).optional(),
5643
- error: z.string().optional(),
5644
- });
5637
+ export const UsageProblemSchema = z.discriminatedUnion("kind", [
5638
+ z.object({
5639
+ kind: z.literal("expired"),
5640
+ expiresAt: z.iso.datetime(),
5641
+ refreshedBy: z.string().optional(),
5642
+ }),
5643
+ z.object({
5644
+ kind: z.literal("rejected"),
5645
+ status: z.number().int(),
5646
+ refreshedBy: z.string().optional(),
5647
+ }),
5648
+ z.object({ kind: z.literal("no_quota"), detail: z.string() }),
5649
+ ]);
5650
+ export const UsageReportSchema = z.discriminatedUnion("status", [
5651
+ z.object({
5652
+ status: z.literal("available"),
5653
+ planLabel: z.string().optional(),
5654
+ windows: z.array(ProviderUsageWindowSchema),
5655
+ balances: z.array(ProviderUsageBalanceSchema).optional(),
5656
+ details: z.array(ProviderUsageDetailSchema).optional(),
5657
+ }),
5658
+ z.object({ status: z.literal("unavailable"), problem: UsageProblemSchema }),
5659
+ z.object({ status: z.literal("error"), error: z.string() }),
5660
+ ]);
5645
5661
  export const UsageReportEntrySchema = z.object({
5646
5662
  id: z.string(),
5647
5663
  account: z.object({ label: z.string().optional() }),
@@ -10943,12 +10943,8 @@ export declare const WSOutboundMessageSchema: {
10943
10943
  sourceId: import("zod").ZodString;
10944
10944
  sourceLabel: import("zod").ZodString;
10945
10945
  icon: import("zod").ZodOptional<import("zod").ZodString>;
10946
- report: import("zod").ZodObject<{
10947
- status: import("zod").ZodEnum<{
10948
- error: "error";
10949
- unavailable: "unavailable";
10950
- available: "available";
10951
- }>;
10946
+ report: import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
10947
+ status: import("zod").ZodLiteral<"available">;
10952
10948
  planLabel: import("zod").ZodOptional<import("zod").ZodString>;
10953
10949
  windows: import("zod").ZodArray<import("zod").ZodObject<{
10954
10950
  id: import("zod").ZodString;
@@ -10998,8 +10994,24 @@ export declare const WSOutboundMessageSchema: {
10998
10994
  ok: "ok";
10999
10995
  }>>;
11000
10996
  }, import("zod/v4/core").$strip>>>;
11001
- error: import("zod").ZodOptional<import("zod").ZodString>;
11002
- }, import("zod/v4/core").$strip>;
10997
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
10998
+ status: import("zod").ZodLiteral<"unavailable">;
10999
+ problem: import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
11000
+ kind: import("zod").ZodLiteral<"expired">;
11001
+ expiresAt: import("zod").ZodISODateTime;
11002
+ refreshedBy: import("zod").ZodOptional<import("zod").ZodString>;
11003
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
11004
+ kind: import("zod").ZodLiteral<"rejected">;
11005
+ status: import("zod").ZodNumber;
11006
+ refreshedBy: import("zod").ZodOptional<import("zod").ZodString>;
11007
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
11008
+ kind: import("zod").ZodLiteral<"no_quota">;
11009
+ detail: import("zod").ZodString;
11010
+ }, import("zod/v4/core").$strip>], "kind">;
11011
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
11012
+ status: import("zod").ZodLiteral<"error">;
11013
+ error: import("zod").ZodString;
11014
+ }, import("zod/v4/core").$strip>], "status">;
11003
11015
  }, import("zod/v4/core").$strip>>;
11004
11016
  }, import("zod/v4/core").$strip>;
11005
11017
  }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camerontaylor/paseo-protocol",
3
- "version": "0.11.0-beta.1.fork.1",
3
+ "version": "0.11.0-beta.3.fork.1",
4
4
  "description": "Paseo shared protocol schemas and wire types",
5
5
  "files": [
6
6
  "dist",