@oxy.so/contracts 4.2.0 → 4.3.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.
@@ -0,0 +1,1049 @@
1
+ /**
2
+ * Stickers — the wire shape of Oxy's shared sticker catalogue.
3
+ *
4
+ * One catalogue serves every app: Allo sends a sticker in a chat, Mention draws
5
+ * one in an empty state, and both resolve the same id to the same animation.
6
+ * The API validates its output against these schemas and `@oxy.so/stickers`
7
+ * validates its input against the same ones.
8
+ *
9
+ * A sticker is a Lottie animation plus a static fallback image, both served
10
+ * from Oxy's CDN at content-addressed, immutable URLs. The fallback is what a
11
+ * surface that cannot animate shows — a push notification, a federated copy of
12
+ * a post, a person who asked for reduced motion.
13
+ *
14
+ * Platform-agnostic — zod only. ESM-safe (no `require()`).
15
+ */
16
+ import { z } from 'zod';
17
+ /**
18
+ * The square canvases a sticker may be authored at. Lottie is vectors, so the
19
+ * canvas is a coordinate space rather than a resolution: a 1024 file draws as
20
+ * sharply in a 128-point bubble as a 512 one.
21
+ */
22
+ export declare const STICKER_CANVAS_SIZES: readonly [512, 1024];
23
+ /** Size of the static fallback image every sticker gets. */
24
+ export declare const STICKER_FALLBACK_SIZE = 512;
25
+ /** Longest loop a sticker may have. */
26
+ export declare const STICKER_MAX_DURATION_MS = 10000;
27
+ /** Highest frame rate a sticker may declare. */
28
+ export declare const STICKER_MAX_FRAME_RATE = 60;
29
+ /**
30
+ * Largest Lottie JSON accepted on upload, before the API normalizes it.
31
+ * Exported animations carry pretty-printing and full float precision, so the
32
+ * raw file is routinely many times the size of what is stored.
33
+ */
34
+ export declare const STICKER_MAX_UPLOAD_BYTES: number;
35
+ /**
36
+ * Largest animation STORED, after normalization (minified, floats rounded,
37
+ * expressions removed). The CDN compresses JSON in transit, which takes a
38
+ * typical sticker to a few tens of kilobytes on the wire.
39
+ */
40
+ export declare const STICKER_MAX_ANIMATION_BYTES: number;
41
+ /** Largest static fallback accepted on upload, when one is supplied. */
42
+ export declare const STICKER_MAX_FALLBACK_BYTES: number;
43
+ /** How many stickers one pack may hold. */
44
+ export declare const STICKER_PACK_MAX_STICKERS = 120;
45
+ /** How many packs one person may have installed. */
46
+ export declare const STICKER_MAX_INSTALLED_PACKS = 200;
47
+ /** How many ids one resolve call may ask about. */
48
+ export declare const STICKER_RESOLVE_MAX_IDS = 100;
49
+ /** Lowercase-hex SHA-256 of a file's bytes. */
50
+ export declare const stickerSha256Schema: z.ZodString;
51
+ /** A pack's public URL segment. */
52
+ export declare const stickerPackSlugSchema: z.ZodString;
53
+ export declare const stickerIdSchema: z.ZodString;
54
+ export declare const stickerPackStatusSchema: z.ZodEnum<["draft", "published", "archived"]>;
55
+ export type StickerPackStatus = z.infer<typeof stickerPackStatusSchema>;
56
+ /** One stored file: where to fetch it and the hash its bytes must have. */
57
+ export declare const stickerFileSchema: z.ZodObject<{
58
+ url: z.ZodString;
59
+ sha256: z.ZodString;
60
+ mime: z.ZodString;
61
+ bytes: z.ZodNumber;
62
+ }, "strip", z.ZodTypeAny, {
63
+ url: string;
64
+ sha256: string;
65
+ mime: string;
66
+ bytes: number;
67
+ }, {
68
+ url: string;
69
+ sha256: string;
70
+ mime: string;
71
+ bytes: number;
72
+ }>;
73
+ export type StickerFile = z.infer<typeof stickerFileSchema>;
74
+ export declare const stickerSchema: z.ZodObject<{
75
+ id: z.ZodString;
76
+ packId: z.ZodString;
77
+ emoji: z.ZodArray<z.ZodString, "many">;
78
+ keywords: z.ZodArray<z.ZodString, "many">;
79
+ size: z.ZodNumber;
80
+ durationMs: z.ZodNumber;
81
+ /** The Lottie JSON. */
82
+ animation: z.ZodObject<{
83
+ url: z.ZodString;
84
+ sha256: z.ZodString;
85
+ mime: z.ZodString;
86
+ bytes: z.ZodNumber;
87
+ }, "strip", z.ZodTypeAny, {
88
+ url: string;
89
+ sha256: string;
90
+ mime: string;
91
+ bytes: number;
92
+ }, {
93
+ url: string;
94
+ sha256: string;
95
+ mime: string;
96
+ bytes: number;
97
+ }>;
98
+ /** A static image of the same sticker. */
99
+ fallback: z.ZodObject<{
100
+ url: z.ZodString;
101
+ sha256: z.ZodString;
102
+ mime: z.ZodString;
103
+ bytes: z.ZodNumber;
104
+ }, "strip", z.ZodTypeAny, {
105
+ url: string;
106
+ sha256: string;
107
+ mime: string;
108
+ bytes: number;
109
+ }, {
110
+ url: string;
111
+ sha256: string;
112
+ mime: string;
113
+ bytes: number;
114
+ }>;
115
+ }, "strip", z.ZodTypeAny, {
116
+ id: string;
117
+ size: number;
118
+ emoji: string[];
119
+ fallback: {
120
+ url: string;
121
+ sha256: string;
122
+ mime: string;
123
+ bytes: number;
124
+ };
125
+ packId: string;
126
+ keywords: string[];
127
+ durationMs: number;
128
+ animation: {
129
+ url: string;
130
+ sha256: string;
131
+ mime: string;
132
+ bytes: number;
133
+ };
134
+ }, {
135
+ id: string;
136
+ size: number;
137
+ emoji: string[];
138
+ fallback: {
139
+ url: string;
140
+ sha256: string;
141
+ mime: string;
142
+ bytes: number;
143
+ };
144
+ packId: string;
145
+ keywords: string[];
146
+ durationMs: number;
147
+ animation: {
148
+ url: string;
149
+ sha256: string;
150
+ mime: string;
151
+ bytes: number;
152
+ };
153
+ }>;
154
+ export type Sticker = z.infer<typeof stickerSchema>;
155
+ /** What a shop card needs. */
156
+ export declare const stickerPackSummarySchema: z.ZodObject<{
157
+ id: z.ZodString;
158
+ slug: z.ZodString;
159
+ title: z.ZodString;
160
+ description: z.ZodNullable<z.ZodString>;
161
+ author: z.ZodNullable<z.ZodString>;
162
+ status: z.ZodEnum<["draft", "published", "archived"]>;
163
+ publishedAt: z.ZodNullable<z.ZodString>;
164
+ stickerCount: z.ZodNumber;
165
+ /** The first sticker, drawn as the pack's cover. Null for an empty draft. */
166
+ cover: z.ZodNullable<z.ZodObject<{
167
+ id: z.ZodString;
168
+ packId: z.ZodString;
169
+ emoji: z.ZodArray<z.ZodString, "many">;
170
+ keywords: z.ZodArray<z.ZodString, "many">;
171
+ size: z.ZodNumber;
172
+ durationMs: z.ZodNumber;
173
+ /** The Lottie JSON. */
174
+ animation: z.ZodObject<{
175
+ url: z.ZodString;
176
+ sha256: z.ZodString;
177
+ mime: z.ZodString;
178
+ bytes: z.ZodNumber;
179
+ }, "strip", z.ZodTypeAny, {
180
+ url: string;
181
+ sha256: string;
182
+ mime: string;
183
+ bytes: number;
184
+ }, {
185
+ url: string;
186
+ sha256: string;
187
+ mime: string;
188
+ bytes: number;
189
+ }>;
190
+ /** A static image of the same sticker. */
191
+ fallback: z.ZodObject<{
192
+ url: z.ZodString;
193
+ sha256: z.ZodString;
194
+ mime: z.ZodString;
195
+ bytes: z.ZodNumber;
196
+ }, "strip", z.ZodTypeAny, {
197
+ url: string;
198
+ sha256: string;
199
+ mime: string;
200
+ bytes: number;
201
+ }, {
202
+ url: string;
203
+ sha256: string;
204
+ mime: string;
205
+ bytes: number;
206
+ }>;
207
+ }, "strip", z.ZodTypeAny, {
208
+ id: string;
209
+ size: number;
210
+ emoji: string[];
211
+ fallback: {
212
+ url: string;
213
+ sha256: string;
214
+ mime: string;
215
+ bytes: number;
216
+ };
217
+ packId: string;
218
+ keywords: string[];
219
+ durationMs: number;
220
+ animation: {
221
+ url: string;
222
+ sha256: string;
223
+ mime: string;
224
+ bytes: number;
225
+ };
226
+ }, {
227
+ id: string;
228
+ size: number;
229
+ emoji: string[];
230
+ fallback: {
231
+ url: string;
232
+ sha256: string;
233
+ mime: string;
234
+ bytes: number;
235
+ };
236
+ packId: string;
237
+ keywords: string[];
238
+ durationMs: number;
239
+ animation: {
240
+ url: string;
241
+ sha256: string;
242
+ mime: string;
243
+ bytes: number;
244
+ };
245
+ }>>;
246
+ }, "strip", z.ZodTypeAny, {
247
+ status: "draft" | "published" | "archived";
248
+ description: string | null;
249
+ id: string;
250
+ title: string;
251
+ author: string | null;
252
+ slug: string;
253
+ publishedAt: string | null;
254
+ stickerCount: number;
255
+ cover: {
256
+ id: string;
257
+ size: number;
258
+ emoji: string[];
259
+ fallback: {
260
+ url: string;
261
+ sha256: string;
262
+ mime: string;
263
+ bytes: number;
264
+ };
265
+ packId: string;
266
+ keywords: string[];
267
+ durationMs: number;
268
+ animation: {
269
+ url: string;
270
+ sha256: string;
271
+ mime: string;
272
+ bytes: number;
273
+ };
274
+ } | null;
275
+ }, {
276
+ status: "draft" | "published" | "archived";
277
+ description: string | null;
278
+ id: string;
279
+ title: string;
280
+ author: string | null;
281
+ slug: string;
282
+ publishedAt: string | null;
283
+ stickerCount: number;
284
+ cover: {
285
+ id: string;
286
+ size: number;
287
+ emoji: string[];
288
+ fallback: {
289
+ url: string;
290
+ sha256: string;
291
+ mime: string;
292
+ bytes: number;
293
+ };
294
+ packId: string;
295
+ keywords: string[];
296
+ durationMs: number;
297
+ animation: {
298
+ url: string;
299
+ sha256: string;
300
+ mime: string;
301
+ bytes: number;
302
+ };
303
+ } | null;
304
+ }>;
305
+ export type StickerPackSummary = z.infer<typeof stickerPackSummarySchema>;
306
+ export declare const stickerPackSchema: z.ZodObject<{
307
+ id: z.ZodString;
308
+ slug: z.ZodString;
309
+ title: z.ZodString;
310
+ description: z.ZodNullable<z.ZodString>;
311
+ author: z.ZodNullable<z.ZodString>;
312
+ status: z.ZodEnum<["draft", "published", "archived"]>;
313
+ publishedAt: z.ZodNullable<z.ZodString>;
314
+ stickerCount: z.ZodNumber;
315
+ /** The first sticker, drawn as the pack's cover. Null for an empty draft. */
316
+ cover: z.ZodNullable<z.ZodObject<{
317
+ id: z.ZodString;
318
+ packId: z.ZodString;
319
+ emoji: z.ZodArray<z.ZodString, "many">;
320
+ keywords: z.ZodArray<z.ZodString, "many">;
321
+ size: z.ZodNumber;
322
+ durationMs: z.ZodNumber;
323
+ /** The Lottie JSON. */
324
+ animation: z.ZodObject<{
325
+ url: z.ZodString;
326
+ sha256: z.ZodString;
327
+ mime: z.ZodString;
328
+ bytes: z.ZodNumber;
329
+ }, "strip", z.ZodTypeAny, {
330
+ url: string;
331
+ sha256: string;
332
+ mime: string;
333
+ bytes: number;
334
+ }, {
335
+ url: string;
336
+ sha256: string;
337
+ mime: string;
338
+ bytes: number;
339
+ }>;
340
+ /** A static image of the same sticker. */
341
+ fallback: z.ZodObject<{
342
+ url: z.ZodString;
343
+ sha256: z.ZodString;
344
+ mime: z.ZodString;
345
+ bytes: z.ZodNumber;
346
+ }, "strip", z.ZodTypeAny, {
347
+ url: string;
348
+ sha256: string;
349
+ mime: string;
350
+ bytes: number;
351
+ }, {
352
+ url: string;
353
+ sha256: string;
354
+ mime: string;
355
+ bytes: number;
356
+ }>;
357
+ }, "strip", z.ZodTypeAny, {
358
+ id: string;
359
+ size: number;
360
+ emoji: string[];
361
+ fallback: {
362
+ url: string;
363
+ sha256: string;
364
+ mime: string;
365
+ bytes: number;
366
+ };
367
+ packId: string;
368
+ keywords: string[];
369
+ durationMs: number;
370
+ animation: {
371
+ url: string;
372
+ sha256: string;
373
+ mime: string;
374
+ bytes: number;
375
+ };
376
+ }, {
377
+ id: string;
378
+ size: number;
379
+ emoji: string[];
380
+ fallback: {
381
+ url: string;
382
+ sha256: string;
383
+ mime: string;
384
+ bytes: number;
385
+ };
386
+ packId: string;
387
+ keywords: string[];
388
+ durationMs: number;
389
+ animation: {
390
+ url: string;
391
+ sha256: string;
392
+ mime: string;
393
+ bytes: number;
394
+ };
395
+ }>>;
396
+ } & {
397
+ stickers: z.ZodArray<z.ZodObject<{
398
+ id: z.ZodString;
399
+ packId: z.ZodString;
400
+ emoji: z.ZodArray<z.ZodString, "many">;
401
+ keywords: z.ZodArray<z.ZodString, "many">;
402
+ size: z.ZodNumber;
403
+ durationMs: z.ZodNumber;
404
+ /** The Lottie JSON. */
405
+ animation: z.ZodObject<{
406
+ url: z.ZodString;
407
+ sha256: z.ZodString;
408
+ mime: z.ZodString;
409
+ bytes: z.ZodNumber;
410
+ }, "strip", z.ZodTypeAny, {
411
+ url: string;
412
+ sha256: string;
413
+ mime: string;
414
+ bytes: number;
415
+ }, {
416
+ url: string;
417
+ sha256: string;
418
+ mime: string;
419
+ bytes: number;
420
+ }>;
421
+ /** A static image of the same sticker. */
422
+ fallback: z.ZodObject<{
423
+ url: z.ZodString;
424
+ sha256: z.ZodString;
425
+ mime: z.ZodString;
426
+ bytes: z.ZodNumber;
427
+ }, "strip", z.ZodTypeAny, {
428
+ url: string;
429
+ sha256: string;
430
+ mime: string;
431
+ bytes: number;
432
+ }, {
433
+ url: string;
434
+ sha256: string;
435
+ mime: string;
436
+ bytes: number;
437
+ }>;
438
+ }, "strip", z.ZodTypeAny, {
439
+ id: string;
440
+ size: number;
441
+ emoji: string[];
442
+ fallback: {
443
+ url: string;
444
+ sha256: string;
445
+ mime: string;
446
+ bytes: number;
447
+ };
448
+ packId: string;
449
+ keywords: string[];
450
+ durationMs: number;
451
+ animation: {
452
+ url: string;
453
+ sha256: string;
454
+ mime: string;
455
+ bytes: number;
456
+ };
457
+ }, {
458
+ id: string;
459
+ size: number;
460
+ emoji: string[];
461
+ fallback: {
462
+ url: string;
463
+ sha256: string;
464
+ mime: string;
465
+ bytes: number;
466
+ };
467
+ packId: string;
468
+ keywords: string[];
469
+ durationMs: number;
470
+ animation: {
471
+ url: string;
472
+ sha256: string;
473
+ mime: string;
474
+ bytes: number;
475
+ };
476
+ }>, "many">;
477
+ }, "strip", z.ZodTypeAny, {
478
+ status: "draft" | "published" | "archived";
479
+ description: string | null;
480
+ id: string;
481
+ title: string;
482
+ author: string | null;
483
+ slug: string;
484
+ publishedAt: string | null;
485
+ stickerCount: number;
486
+ cover: {
487
+ id: string;
488
+ size: number;
489
+ emoji: string[];
490
+ fallback: {
491
+ url: string;
492
+ sha256: string;
493
+ mime: string;
494
+ bytes: number;
495
+ };
496
+ packId: string;
497
+ keywords: string[];
498
+ durationMs: number;
499
+ animation: {
500
+ url: string;
501
+ sha256: string;
502
+ mime: string;
503
+ bytes: number;
504
+ };
505
+ } | null;
506
+ stickers: {
507
+ id: string;
508
+ size: number;
509
+ emoji: string[];
510
+ fallback: {
511
+ url: string;
512
+ sha256: string;
513
+ mime: string;
514
+ bytes: number;
515
+ };
516
+ packId: string;
517
+ keywords: string[];
518
+ durationMs: number;
519
+ animation: {
520
+ url: string;
521
+ sha256: string;
522
+ mime: string;
523
+ bytes: number;
524
+ };
525
+ }[];
526
+ }, {
527
+ status: "draft" | "published" | "archived";
528
+ description: string | null;
529
+ id: string;
530
+ title: string;
531
+ author: string | null;
532
+ slug: string;
533
+ publishedAt: string | null;
534
+ stickerCount: number;
535
+ cover: {
536
+ id: string;
537
+ size: number;
538
+ emoji: string[];
539
+ fallback: {
540
+ url: string;
541
+ sha256: string;
542
+ mime: string;
543
+ bytes: number;
544
+ };
545
+ packId: string;
546
+ keywords: string[];
547
+ durationMs: number;
548
+ animation: {
549
+ url: string;
550
+ sha256: string;
551
+ mime: string;
552
+ bytes: number;
553
+ };
554
+ } | null;
555
+ stickers: {
556
+ id: string;
557
+ size: number;
558
+ emoji: string[];
559
+ fallback: {
560
+ url: string;
561
+ sha256: string;
562
+ mime: string;
563
+ bytes: number;
564
+ };
565
+ packId: string;
566
+ keywords: string[];
567
+ durationMs: number;
568
+ animation: {
569
+ url: string;
570
+ sha256: string;
571
+ mime: string;
572
+ bytes: number;
573
+ };
574
+ }[];
575
+ }>;
576
+ export type StickerPack = z.infer<typeof stickerPackSchema>;
577
+ /** A pack in someone's picker. */
578
+ export declare const installedStickerPackSchema: z.ZodObject<{
579
+ id: z.ZodString;
580
+ slug: z.ZodString;
581
+ title: z.ZodString;
582
+ description: z.ZodNullable<z.ZodString>;
583
+ author: z.ZodNullable<z.ZodString>;
584
+ status: z.ZodEnum<["draft", "published", "archived"]>;
585
+ publishedAt: z.ZodNullable<z.ZodString>;
586
+ stickerCount: z.ZodNumber;
587
+ /** The first sticker, drawn as the pack's cover. Null for an empty draft. */
588
+ cover: z.ZodNullable<z.ZodObject<{
589
+ id: z.ZodString;
590
+ packId: z.ZodString;
591
+ emoji: z.ZodArray<z.ZodString, "many">;
592
+ keywords: z.ZodArray<z.ZodString, "many">;
593
+ size: z.ZodNumber;
594
+ durationMs: z.ZodNumber;
595
+ /** The Lottie JSON. */
596
+ animation: z.ZodObject<{
597
+ url: z.ZodString;
598
+ sha256: z.ZodString;
599
+ mime: z.ZodString;
600
+ bytes: z.ZodNumber;
601
+ }, "strip", z.ZodTypeAny, {
602
+ url: string;
603
+ sha256: string;
604
+ mime: string;
605
+ bytes: number;
606
+ }, {
607
+ url: string;
608
+ sha256: string;
609
+ mime: string;
610
+ bytes: number;
611
+ }>;
612
+ /** A static image of the same sticker. */
613
+ fallback: z.ZodObject<{
614
+ url: z.ZodString;
615
+ sha256: z.ZodString;
616
+ mime: z.ZodString;
617
+ bytes: z.ZodNumber;
618
+ }, "strip", z.ZodTypeAny, {
619
+ url: string;
620
+ sha256: string;
621
+ mime: string;
622
+ bytes: number;
623
+ }, {
624
+ url: string;
625
+ sha256: string;
626
+ mime: string;
627
+ bytes: number;
628
+ }>;
629
+ }, "strip", z.ZodTypeAny, {
630
+ id: string;
631
+ size: number;
632
+ emoji: string[];
633
+ fallback: {
634
+ url: string;
635
+ sha256: string;
636
+ mime: string;
637
+ bytes: number;
638
+ };
639
+ packId: string;
640
+ keywords: string[];
641
+ durationMs: number;
642
+ animation: {
643
+ url: string;
644
+ sha256: string;
645
+ mime: string;
646
+ bytes: number;
647
+ };
648
+ }, {
649
+ id: string;
650
+ size: number;
651
+ emoji: string[];
652
+ fallback: {
653
+ url: string;
654
+ sha256: string;
655
+ mime: string;
656
+ bytes: number;
657
+ };
658
+ packId: string;
659
+ keywords: string[];
660
+ durationMs: number;
661
+ animation: {
662
+ url: string;
663
+ sha256: string;
664
+ mime: string;
665
+ bytes: number;
666
+ };
667
+ }>>;
668
+ } & {
669
+ stickers: z.ZodArray<z.ZodObject<{
670
+ id: z.ZodString;
671
+ packId: z.ZodString;
672
+ emoji: z.ZodArray<z.ZodString, "many">;
673
+ keywords: z.ZodArray<z.ZodString, "many">;
674
+ size: z.ZodNumber;
675
+ durationMs: z.ZodNumber;
676
+ /** The Lottie JSON. */
677
+ animation: z.ZodObject<{
678
+ url: z.ZodString;
679
+ sha256: z.ZodString;
680
+ mime: z.ZodString;
681
+ bytes: z.ZodNumber;
682
+ }, "strip", z.ZodTypeAny, {
683
+ url: string;
684
+ sha256: string;
685
+ mime: string;
686
+ bytes: number;
687
+ }, {
688
+ url: string;
689
+ sha256: string;
690
+ mime: string;
691
+ bytes: number;
692
+ }>;
693
+ /** A static image of the same sticker. */
694
+ fallback: z.ZodObject<{
695
+ url: z.ZodString;
696
+ sha256: z.ZodString;
697
+ mime: z.ZodString;
698
+ bytes: z.ZodNumber;
699
+ }, "strip", z.ZodTypeAny, {
700
+ url: string;
701
+ sha256: string;
702
+ mime: string;
703
+ bytes: number;
704
+ }, {
705
+ url: string;
706
+ sha256: string;
707
+ mime: string;
708
+ bytes: number;
709
+ }>;
710
+ }, "strip", z.ZodTypeAny, {
711
+ id: string;
712
+ size: number;
713
+ emoji: string[];
714
+ fallback: {
715
+ url: string;
716
+ sha256: string;
717
+ mime: string;
718
+ bytes: number;
719
+ };
720
+ packId: string;
721
+ keywords: string[];
722
+ durationMs: number;
723
+ animation: {
724
+ url: string;
725
+ sha256: string;
726
+ mime: string;
727
+ bytes: number;
728
+ };
729
+ }, {
730
+ id: string;
731
+ size: number;
732
+ emoji: string[];
733
+ fallback: {
734
+ url: string;
735
+ sha256: string;
736
+ mime: string;
737
+ bytes: number;
738
+ };
739
+ packId: string;
740
+ keywords: string[];
741
+ durationMs: number;
742
+ animation: {
743
+ url: string;
744
+ sha256: string;
745
+ mime: string;
746
+ bytes: number;
747
+ };
748
+ }>, "many">;
749
+ } & {
750
+ installedAt: z.ZodString;
751
+ }, "strip", z.ZodTypeAny, {
752
+ status: "draft" | "published" | "archived";
753
+ description: string | null;
754
+ id: string;
755
+ title: string;
756
+ author: string | null;
757
+ slug: string;
758
+ publishedAt: string | null;
759
+ stickerCount: number;
760
+ cover: {
761
+ id: string;
762
+ size: number;
763
+ emoji: string[];
764
+ fallback: {
765
+ url: string;
766
+ sha256: string;
767
+ mime: string;
768
+ bytes: number;
769
+ };
770
+ packId: string;
771
+ keywords: string[];
772
+ durationMs: number;
773
+ animation: {
774
+ url: string;
775
+ sha256: string;
776
+ mime: string;
777
+ bytes: number;
778
+ };
779
+ } | null;
780
+ stickers: {
781
+ id: string;
782
+ size: number;
783
+ emoji: string[];
784
+ fallback: {
785
+ url: string;
786
+ sha256: string;
787
+ mime: string;
788
+ bytes: number;
789
+ };
790
+ packId: string;
791
+ keywords: string[];
792
+ durationMs: number;
793
+ animation: {
794
+ url: string;
795
+ sha256: string;
796
+ mime: string;
797
+ bytes: number;
798
+ };
799
+ }[];
800
+ installedAt: string;
801
+ }, {
802
+ status: "draft" | "published" | "archived";
803
+ description: string | null;
804
+ id: string;
805
+ title: string;
806
+ author: string | null;
807
+ slug: string;
808
+ publishedAt: string | null;
809
+ stickerCount: number;
810
+ cover: {
811
+ id: string;
812
+ size: number;
813
+ emoji: string[];
814
+ fallback: {
815
+ url: string;
816
+ sha256: string;
817
+ mime: string;
818
+ bytes: number;
819
+ };
820
+ packId: string;
821
+ keywords: string[];
822
+ durationMs: number;
823
+ animation: {
824
+ url: string;
825
+ sha256: string;
826
+ mime: string;
827
+ bytes: number;
828
+ };
829
+ } | null;
830
+ stickers: {
831
+ id: string;
832
+ size: number;
833
+ emoji: string[];
834
+ fallback: {
835
+ url: string;
836
+ sha256: string;
837
+ mime: string;
838
+ bytes: number;
839
+ };
840
+ packId: string;
841
+ keywords: string[];
842
+ durationMs: number;
843
+ animation: {
844
+ url: string;
845
+ sha256: string;
846
+ mime: string;
847
+ bytes: number;
848
+ };
849
+ }[];
850
+ installedAt: string;
851
+ }>;
852
+ export type InstalledStickerPack = z.infer<typeof installedStickerPackSchema>;
853
+ /**
854
+ * How an app stores or sends a sticker: its id, the pack it came from, and the
855
+ * hash of the animation it showed. The hash lets a receiver verify the bytes it
856
+ * fetched are the ones the sender saw — which matters in an end-to-end
857
+ * encrypted chat, where the server relaying the message never sees it.
858
+ */
859
+ export declare const stickerRefSchema: z.ZodObject<{
860
+ stickerId: z.ZodString;
861
+ packId: z.ZodString;
862
+ sha256: z.ZodString;
863
+ }, "strip", z.ZodTypeAny, {
864
+ sha256: string;
865
+ packId: string;
866
+ stickerId: string;
867
+ }, {
868
+ sha256: string;
869
+ packId: string;
870
+ stickerId: string;
871
+ }>;
872
+ export type StickerRef = z.infer<typeof stickerRefSchema>;
873
+ /** POST /stickers/resolve */
874
+ export declare const resolveStickersRequestSchema: z.ZodObject<{
875
+ ids: z.ZodArray<z.ZodString, "many">;
876
+ }, "strip", z.ZodTypeAny, {
877
+ ids: string[];
878
+ }, {
879
+ ids: string[];
880
+ }>;
881
+ export type ResolveStickersRequest = z.infer<typeof resolveStickersRequestSchema>;
882
+ /** Unknown ids are absent, not errors: a caller checks what came back. */
883
+ export declare const resolveStickersResponseSchema: z.ZodObject<{
884
+ stickers: z.ZodArray<z.ZodObject<{
885
+ id: z.ZodString;
886
+ packId: z.ZodString;
887
+ emoji: z.ZodArray<z.ZodString, "many">;
888
+ keywords: z.ZodArray<z.ZodString, "many">;
889
+ size: z.ZodNumber;
890
+ durationMs: z.ZodNumber;
891
+ /** The Lottie JSON. */
892
+ animation: z.ZodObject<{
893
+ url: z.ZodString;
894
+ sha256: z.ZodString;
895
+ mime: z.ZodString;
896
+ bytes: z.ZodNumber;
897
+ }, "strip", z.ZodTypeAny, {
898
+ url: string;
899
+ sha256: string;
900
+ mime: string;
901
+ bytes: number;
902
+ }, {
903
+ url: string;
904
+ sha256: string;
905
+ mime: string;
906
+ bytes: number;
907
+ }>;
908
+ /** A static image of the same sticker. */
909
+ fallback: z.ZodObject<{
910
+ url: z.ZodString;
911
+ sha256: z.ZodString;
912
+ mime: z.ZodString;
913
+ bytes: z.ZodNumber;
914
+ }, "strip", z.ZodTypeAny, {
915
+ url: string;
916
+ sha256: string;
917
+ mime: string;
918
+ bytes: number;
919
+ }, {
920
+ url: string;
921
+ sha256: string;
922
+ mime: string;
923
+ bytes: number;
924
+ }>;
925
+ }, "strip", z.ZodTypeAny, {
926
+ id: string;
927
+ size: number;
928
+ emoji: string[];
929
+ fallback: {
930
+ url: string;
931
+ sha256: string;
932
+ mime: string;
933
+ bytes: number;
934
+ };
935
+ packId: string;
936
+ keywords: string[];
937
+ durationMs: number;
938
+ animation: {
939
+ url: string;
940
+ sha256: string;
941
+ mime: string;
942
+ bytes: number;
943
+ };
944
+ }, {
945
+ id: string;
946
+ size: number;
947
+ emoji: string[];
948
+ fallback: {
949
+ url: string;
950
+ sha256: string;
951
+ mime: string;
952
+ bytes: number;
953
+ };
954
+ packId: string;
955
+ keywords: string[];
956
+ durationMs: number;
957
+ animation: {
958
+ url: string;
959
+ sha256: string;
960
+ mime: string;
961
+ bytes: number;
962
+ };
963
+ }>, "many">;
964
+ }, "strip", z.ZodTypeAny, {
965
+ stickers: {
966
+ id: string;
967
+ size: number;
968
+ emoji: string[];
969
+ fallback: {
970
+ url: string;
971
+ sha256: string;
972
+ mime: string;
973
+ bytes: number;
974
+ };
975
+ packId: string;
976
+ keywords: string[];
977
+ durationMs: number;
978
+ animation: {
979
+ url: string;
980
+ sha256: string;
981
+ mime: string;
982
+ bytes: number;
983
+ };
984
+ }[];
985
+ }, {
986
+ stickers: {
987
+ id: string;
988
+ size: number;
989
+ emoji: string[];
990
+ fallback: {
991
+ url: string;
992
+ sha256: string;
993
+ mime: string;
994
+ bytes: number;
995
+ };
996
+ packId: string;
997
+ keywords: string[];
998
+ durationMs: number;
999
+ animation: {
1000
+ url: string;
1001
+ sha256: string;
1002
+ mime: string;
1003
+ bytes: number;
1004
+ };
1005
+ }[];
1006
+ }>;
1007
+ export type ResolveStickersResponse = z.infer<typeof resolveStickersResponseSchema>;
1008
+ /** PATCH /stickers/me/packs/order — the installed pack ids, first to last. */
1009
+ export declare const reorderStickerPacksRequestSchema: z.ZodObject<{
1010
+ packIds: z.ZodArray<z.ZodString, "many">;
1011
+ }, "strip", z.ZodTypeAny, {
1012
+ packIds: string[];
1013
+ }, {
1014
+ packIds: string[];
1015
+ }>;
1016
+ export type ReorderStickerPacksRequest = z.infer<typeof reorderStickerPacksRequestSchema>;
1017
+ /** POST /stickers/admin/packs */
1018
+ export declare const createStickerPackRequestSchema: z.ZodObject<{
1019
+ slug: z.ZodString;
1020
+ title: z.ZodString;
1021
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1022
+ author: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1023
+ }, "strip", z.ZodTypeAny, {
1024
+ title: string;
1025
+ slug: string;
1026
+ description?: string | null | undefined;
1027
+ author?: string | null | undefined;
1028
+ }, {
1029
+ title: string;
1030
+ slug: string;
1031
+ description?: string | null | undefined;
1032
+ author?: string | null | undefined;
1033
+ }>;
1034
+ export type CreateStickerPackRequest = z.infer<typeof createStickerPackRequestSchema>;
1035
+ /** PATCH /stickers/admin/packs/:packId */
1036
+ export declare const updateStickerPackRequestSchema: z.ZodObject<{
1037
+ description: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
1038
+ title: z.ZodOptional<z.ZodString>;
1039
+ author: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
1040
+ }, "strip", z.ZodTypeAny, {
1041
+ description?: string | null | undefined;
1042
+ title?: string | undefined;
1043
+ author?: string | null | undefined;
1044
+ }, {
1045
+ description?: string | null | undefined;
1046
+ title?: string | undefined;
1047
+ author?: string | null | undefined;
1048
+ }>;
1049
+ export type UpdateStickerPackRequest = z.infer<typeof updateStickerPackRequestSchema>;