@misofm/api-client 0.5.2 → 0.5.4
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/schemas.d.ts +11 -0
- package/dist/schemas.js +33 -3
- package/package.json +1 -1
package/dist/schemas.d.ts
CHANGED
|
@@ -47,6 +47,7 @@ export declare const trackViewSchema: z.ZodObject<{
|
|
|
47
47
|
splitBps: z.ZodNumber;
|
|
48
48
|
disc: z.ZodNumber;
|
|
49
49
|
masterBlobId: z.ZodOptional<z.ZodString>;
|
|
50
|
+
mixBlobId: z.ZodOptional<z.ZodString>;
|
|
50
51
|
}, z.core.$strip>;
|
|
51
52
|
/** A recording's work-role credits and recording billing positions. */
|
|
52
53
|
export declare const recordingCreditsSchema: z.ZodObject<{
|
|
@@ -190,6 +191,7 @@ export declare const releaseDetailWireSchema: z.ZodObject<{
|
|
|
190
191
|
splitBps: z.ZodNumber;
|
|
191
192
|
disc: z.ZodNumber;
|
|
192
193
|
masterBlobId: z.ZodOptional<z.ZodString>;
|
|
194
|
+
mixBlobId: z.ZodOptional<z.ZodString>;
|
|
193
195
|
}, z.core.$strip>>;
|
|
194
196
|
trackCredits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
195
197
|
compositionCredits: z.ZodArray<z.ZodObject<{
|
|
@@ -259,6 +261,7 @@ export declare const releaseDetailSchema: z.ZodObject<{
|
|
|
259
261
|
splitBps: z.ZodNumber;
|
|
260
262
|
disc: z.ZodNumber;
|
|
261
263
|
masterBlobId: z.ZodOptional<z.ZodString>;
|
|
264
|
+
mixBlobId: z.ZodOptional<z.ZodString>;
|
|
262
265
|
}, z.core.$strip>>;
|
|
263
266
|
trackCredits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodPipe<z.ZodUnion<readonly [z.ZodObject<{
|
|
264
267
|
compositionCredits: z.ZodArray<z.ZodObject<{
|
|
@@ -434,6 +437,7 @@ export declare const pressingDetailSchema: z.ZodObject<{
|
|
|
434
437
|
splitBps: z.ZodNumber;
|
|
435
438
|
disc: z.ZodNumber;
|
|
436
439
|
masterBlobId: z.ZodOptional<z.ZodString>;
|
|
440
|
+
mixBlobId: z.ZodOptional<z.ZodString>;
|
|
437
441
|
}, z.core.$strip>>;
|
|
438
442
|
trackCredits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodPipe<z.ZodUnion<readonly [z.ZodObject<{
|
|
439
443
|
compositionCredits: z.ZodArray<z.ZodObject<{
|
|
@@ -556,6 +560,7 @@ export declare const pressingDetailWireSchema: z.ZodObject<{
|
|
|
556
560
|
splitBps: z.ZodNumber;
|
|
557
561
|
disc: z.ZodNumber;
|
|
558
562
|
masterBlobId: z.ZodOptional<z.ZodString>;
|
|
563
|
+
mixBlobId: z.ZodOptional<z.ZodString>;
|
|
559
564
|
}, z.core.$strip>>;
|
|
560
565
|
trackCredits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
561
566
|
compositionCredits: z.ZodArray<z.ZodObject<{
|
|
@@ -629,6 +634,7 @@ export declare const recordAlbumSchema: z.ZodObject<{
|
|
|
629
634
|
splitBps: z.ZodNumber;
|
|
630
635
|
disc: z.ZodNumber;
|
|
631
636
|
masterBlobId: z.ZodOptional<z.ZodString>;
|
|
637
|
+
mixBlobId: z.ZodOptional<z.ZodString>;
|
|
632
638
|
}, z.core.$strip>>;
|
|
633
639
|
trackCredits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodPipe<z.ZodUnion<readonly [z.ZodObject<{
|
|
634
640
|
compositionCredits: z.ZodArray<z.ZodObject<{
|
|
@@ -740,6 +746,7 @@ export declare const recordAlbumWireSchema: z.ZodObject<{
|
|
|
740
746
|
splitBps: z.ZodNumber;
|
|
741
747
|
disc: z.ZodNumber;
|
|
742
748
|
masterBlobId: z.ZodOptional<z.ZodString>;
|
|
749
|
+
mixBlobId: z.ZodOptional<z.ZodString>;
|
|
743
750
|
}, z.core.$strip>>;
|
|
744
751
|
trackCredits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
745
752
|
compositionCredits: z.ZodArray<z.ZodObject<{
|
|
@@ -1007,6 +1014,8 @@ export declare const balanceSchema: z.ZodObject<{
|
|
|
1007
1014
|
address: z.ZodString;
|
|
1008
1015
|
coinType: z.ZodString;
|
|
1009
1016
|
balance: z.ZodString;
|
|
1017
|
+
coinBalance: z.ZodString;
|
|
1018
|
+
addressBalance: z.ZodString;
|
|
1010
1019
|
decimals: z.ZodNumber;
|
|
1011
1020
|
}, z.core.$strip>;
|
|
1012
1021
|
export declare const ownershipSchema: z.ZodObject<{
|
|
@@ -1116,6 +1125,7 @@ export declare const purchaseReceiptSchema: z.ZodObject<{
|
|
|
1116
1125
|
splitBps: z.ZodNumber;
|
|
1117
1126
|
disc: z.ZodNumber;
|
|
1118
1127
|
masterBlobId: z.ZodOptional<z.ZodString>;
|
|
1128
|
+
mixBlobId: z.ZodOptional<z.ZodString>;
|
|
1119
1129
|
}, z.core.$strip>>;
|
|
1120
1130
|
trackCredits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodPipe<z.ZodUnion<readonly [z.ZodObject<{
|
|
1121
1131
|
compositionCredits: z.ZodArray<z.ZodObject<{
|
|
@@ -1267,6 +1277,7 @@ export declare const purchaseReceiptWireSchema: z.ZodObject<{
|
|
|
1267
1277
|
splitBps: z.ZodNumber;
|
|
1268
1278
|
disc: z.ZodNumber;
|
|
1269
1279
|
masterBlobId: z.ZodOptional<z.ZodString>;
|
|
1280
|
+
mixBlobId: z.ZodOptional<z.ZodString>;
|
|
1270
1281
|
}, z.core.$strip>>;
|
|
1271
1282
|
trackCredits: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
1272
1283
|
compositionCredits: z.ZodArray<z.ZodObject<{
|
package/dist/schemas.js
CHANGED
|
@@ -29,7 +29,9 @@ export const suiIdSchema = z
|
|
|
29
29
|
/** A 32-byte Walrus blob id encoded as URL-safe, unpadded base64. */
|
|
30
30
|
export const walrusBlobIdSchema = z
|
|
31
31
|
.string()
|
|
32
|
-
|
|
32
|
+
// A 32-byte value has four meaningful bits in its final base64url character;
|
|
33
|
+
// requiring the two padding bits to be zero rejects non-canonical aliases.
|
|
34
|
+
.regex(/^[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048]$/, "expected a canonical Walrus blob id");
|
|
33
35
|
// ── Shared ───────────────────────────────────────────────────────────────────
|
|
34
36
|
export const workStateSchema = z.union([
|
|
35
37
|
z.object({ type: z.literal("Initialized") }),
|
|
@@ -61,6 +63,16 @@ export const trackViewSchema = z.object({
|
|
|
61
63
|
disc: z.number().int().min(1),
|
|
62
64
|
/** Streaming master attached through recording_master_reference, when present. */
|
|
63
65
|
masterBlobId: walrusBlobIdSchema.optional(),
|
|
66
|
+
/**
|
|
67
|
+
* Encrypted mix delivery descriptor attached to this release track, when present.
|
|
68
|
+
*
|
|
69
|
+
* This is a discovery hint. A client using it for protected playback must compare
|
|
70
|
+
* it with the authoritative release-track reference on Sui before trusting the
|
|
71
|
+
* descriptor or requesting a Seal key.
|
|
72
|
+
*/
|
|
73
|
+
mixBlobId: walrusBlobIdSchema
|
|
74
|
+
.describe("Discovery hint only. Before Walrus or Seal use, compare this blob ID with the authoritative release-track reference read directly from Sui.")
|
|
75
|
+
.optional(),
|
|
64
76
|
});
|
|
65
77
|
/** A recording's work-role credits and recording billing positions. */
|
|
66
78
|
export const recordingCreditsSchema = z.object({
|
|
@@ -276,12 +288,30 @@ export const workDetailSchema = ownedWorkSchema.extend({
|
|
|
276
288
|
discCount: z.number().int().min(0).optional(),
|
|
277
289
|
trackCount: z.number().int().min(0).optional(),
|
|
278
290
|
});
|
|
279
|
-
export const balanceSchema = z
|
|
291
|
+
export const balanceSchema = z
|
|
292
|
+
.object({
|
|
280
293
|
address: suiIdSchema,
|
|
281
294
|
coinType: z.string(),
|
|
282
|
-
/** Base units.
|
|
295
|
+
/** Base units. `coinBalance + addressBalance`. */
|
|
283
296
|
balance: u64Schema,
|
|
297
|
+
/** Base units held in address-owned `Coin<T>` objects. */
|
|
298
|
+
coinBalance: u64Schema,
|
|
299
|
+
/** Base units held in the address balance and available to `FundsWithdrawal`. */
|
|
300
|
+
addressBalance: u64Schema,
|
|
284
301
|
decimals: z.number().int().min(0).max(18),
|
|
302
|
+
})
|
|
303
|
+
.superRefine((value, context) => {
|
|
304
|
+
if (![value.balance, value.coinBalance, value.addressBalance].every((part) => /^\d+$/.test(part))) {
|
|
305
|
+
return;
|
|
306
|
+
}
|
|
307
|
+
if (BigInt(value.coinBalance) + BigInt(value.addressBalance) !==
|
|
308
|
+
BigInt(value.balance)) {
|
|
309
|
+
context.addIssue({
|
|
310
|
+
code: "custom",
|
|
311
|
+
path: ["balance"],
|
|
312
|
+
message: "expected coinBalance + addressBalance to equal balance",
|
|
313
|
+
});
|
|
314
|
+
}
|
|
285
315
|
});
|
|
286
316
|
export const ownershipSchema = z.object({
|
|
287
317
|
address: suiIdSchema,
|
package/package.json
CHANGED