@atcute/bluemoji 2.0.0 → 3.0.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.
Files changed (66) hide show
  1. package/README.md +50 -8
  2. package/dist/index.d.ts +1 -0
  3. package/dist/index.js +2 -0
  4. package/dist/index.js.map +1 -0
  5. package/dist/lexicons/index.d.ts +13 -0
  6. package/dist/lexicons/index.js +14 -0
  7. package/dist/lexicons/index.js.map +1 -0
  8. package/dist/lexicons/types/blue/moji/collection/defs.d.ts +24 -0
  9. package/dist/lexicons/types/blue/moji/collection/defs.js +29 -0
  10. package/dist/lexicons/types/blue/moji/collection/defs.js.map +1 -0
  11. package/dist/lexicons/types/blue/moji/collection/getItem.d.ts +22 -0
  12. package/dist/lexicons/types/blue/moji/collection/getItem.js +19 -0
  13. package/dist/lexicons/types/blue/moji/collection/getItem.js.map +1 -0
  14. package/dist/lexicons/types/blue/moji/collection/item.d.ts +66 -0
  15. package/dist/lexicons/types/blue/moji/collection/item.js +59 -0
  16. package/dist/lexicons/types/blue/moji/collection/item.js.map +1 -0
  17. package/dist/lexicons/types/blue/moji/collection/listCollection.d.ts +34 -0
  18. package/dist/lexicons/types/blue/moji/collection/listCollection.js +29 -0
  19. package/dist/lexicons/types/blue/moji/collection/listCollection.js.map +1 -0
  20. package/dist/lexicons/types/blue/moji/collection/putItem.d.ts +25 -0
  21. package/dist/lexicons/types/blue/moji/collection/putItem.js +23 -0
  22. package/dist/lexicons/types/blue/moji/collection/putItem.js.map +1 -0
  23. package/dist/lexicons/types/blue/moji/collection/saveToCollection.d.ts +26 -0
  24. package/dist/lexicons/types/blue/moji/collection/saveToCollection.js +24 -0
  25. package/dist/lexicons/types/blue/moji/collection/saveToCollection.js.map +1 -0
  26. package/dist/lexicons/types/blue/moji/packs/defs.d.ts +67 -0
  27. package/dist/lexicons/types/blue/moji/packs/defs.js +71 -0
  28. package/dist/lexicons/types/blue/moji/packs/defs.js.map +1 -0
  29. package/dist/lexicons/types/blue/moji/packs/getActorPacks.d.ts +23 -0
  30. package/dist/lexicons/types/blue/moji/packs/getActorPacks.js +21 -0
  31. package/dist/lexicons/types/blue/moji/packs/getActorPacks.js.map +1 -0
  32. package/dist/lexicons/types/blue/moji/packs/getPack.d.ts +24 -0
  33. package/dist/lexicons/types/blue/moji/packs/getPack.js +24 -0
  34. package/dist/lexicons/types/blue/moji/packs/getPack.js.map +1 -0
  35. package/dist/lexicons/types/blue/moji/packs/getPacks.d.ts +20 -0
  36. package/dist/lexicons/types/blue/moji/packs/getPacks.js +19 -0
  37. package/dist/lexicons/types/blue/moji/packs/getPacks.js.map +1 -0
  38. package/dist/lexicons/types/blue/moji/packs/pack.d.ts +25 -0
  39. package/dist/lexicons/types/blue/moji/packs/pack.js +25 -0
  40. package/dist/lexicons/types/blue/moji/packs/pack.js.map +1 -0
  41. package/dist/lexicons/types/blue/moji/packs/packitem.d.ts +19 -0
  42. package/dist/lexicons/types/blue/moji/packs/packitem.js +11 -0
  43. package/dist/lexicons/types/blue/moji/packs/packitem.js.map +1 -0
  44. package/dist/lexicons/types/blue/moji/richtext/facet.d.ts +32 -0
  45. package/dist/lexicons/types/blue/moji/richtext/facet.js +26 -0
  46. package/dist/lexicons/types/blue/moji/richtext/facet.js.map +1 -0
  47. package/lib/index.ts +1 -0
  48. package/lib/lexicons/index.ts +13 -0
  49. package/lib/lexicons/types/blue/moji/collection/defs.ts +38 -0
  50. package/lib/lexicons/types/blue/moji/collection/getItem.ts +32 -0
  51. package/lib/lexicons/types/blue/moji/collection/item.ts +89 -0
  52. package/lib/lexicons/types/blue/moji/collection/listCollection.ts +48 -0
  53. package/lib/lexicons/types/blue/moji/collection/putItem.ts +36 -0
  54. package/lib/lexicons/types/blue/moji/collection/saveToCollection.ts +37 -0
  55. package/lib/lexicons/types/blue/moji/packs/defs.ts +90 -0
  56. package/lib/lexicons/types/blue/moji/packs/getActorPacks.ts +36 -0
  57. package/lib/lexicons/types/blue/moji/packs/getPack.ts +39 -0
  58. package/lib/lexicons/types/blue/moji/packs/getPacks.ts +32 -0
  59. package/lib/lexicons/types/blue/moji/packs/pack.ts +42 -0
  60. package/lib/lexicons/types/blue/moji/packs/packitem.ts +27 -0
  61. package/lib/lexicons/types/blue/moji/richtext/facet.ts +37 -0
  62. package/package.json +11 -10
  63. package/dist/lexicons.d.ts +0 -389
  64. package/dist/lexicons.js +0 -9
  65. package/dist/lexicons.js.map +0 -1
  66. package/lib/lexicons.ts +0 -392
package/lib/lexicons.ts DELETED
@@ -1,392 +0,0 @@
1
- /* eslint-disable */
2
- // This file is automatically generated, do not edit!
3
-
4
- /**
5
- * @module
6
- * Contains type declarations for Bluemoji lexicons
7
- */
8
-
9
- import '@atcute/client/lexicons';
10
- import '@atcute/bluesky/lexicons';
11
-
12
- declare module '@atcute/client/lexicons' {
13
- namespace BlueMojiCollectionDefs {
14
- interface CollectionView {
15
- [Brand.Type]?: 'blue.moji.collection.defs#collectionView';
16
- cid: At.Cid;
17
- creator: AppBskyActorDefs.ProfileView;
18
- indexedAt: string;
19
- /**
20
- * Minimum string length: 1 \
21
- * Maximum string length: 64
22
- */
23
- name: string;
24
- uri: At.ResourceUri;
25
- avatar?: At.GenericUri;
26
- /** Minimum: 0 */
27
- collectionItemCount?: number;
28
- /**
29
- * Maximum string length: 3000 \
30
- * Maximum grapheme length: 300
31
- */
32
- description?: string;
33
- descriptionFacets?: AppBskyRichtextFacet.Main[];
34
- labels?: ComAtprotoLabelDefs.Label[];
35
- }
36
- }
37
-
38
- /** Get a single emoji from a repository. Requires auth. */
39
- namespace BlueMojiCollectionGetItem {
40
- interface Params {
41
- /** The Bluemoji alias/rkey. */
42
- name: string;
43
- /** The handle or DID of the repo. */
44
- repo: At.Identifier;
45
- }
46
- type Input = undefined;
47
- interface Output {
48
- item: BlueMojiCollectionItem.ItemView;
49
- uri: At.ResourceUri;
50
- }
51
- }
52
-
53
- namespace BlueMojiCollectionItem {
54
- /** A custom emoji */
55
- interface Record {
56
- $type: 'blue.moji.collection.item';
57
- createdAt: string;
58
- /** Open union to allow for future formats */
59
- formats: Brand.Union<Formats_v0>;
60
- /** Should be in the format :emoji: */
61
- name: string;
62
- /** @default false */
63
- adultOnly?: boolean;
64
- alt?: string;
65
- copyOf?: At.ResourceUri;
66
- /**
67
- * Maximum string length: 1
68
- * @default "◌"
69
- */
70
- fallbackText?: string;
71
- /** Self-label values for this emoji. Effectively content warnings. */
72
- labels?: Brand.Union<ComAtprotoLabelDefs.SelfLabels>;
73
- }
74
- /** Limiting blobs to 256kb because there may be many on page and these get optimised by ImgProxy anyway */
75
- type Blob_v0 = At.Blob;
76
- /** 64kb should be enough for anybody */
77
- type Bytes_v0 = At.Bytes;
78
- interface Formats_v0 {
79
- [Brand.Type]?: 'blue.moji.collection.item#formats_v0';
80
- apng_128?: Bytes_v0;
81
- gif_128?: Blob_v0;
82
- lottie?: Bytes_v0;
83
- original?: At.Blob;
84
- png_128?: Blob_v0;
85
- webp_128?: Blob_v0;
86
- }
87
- interface ItemView {
88
- [Brand.Type]?: 'blue.moji.collection.item#itemView';
89
- formats: Formats_v0;
90
- name: string;
91
- /** @default false */
92
- adultOnly?: boolean;
93
- alt?: string;
94
- createdAt?: string;
95
- }
96
- }
97
-
98
- /** List a range of Bluemoji in a repository, matching a specific collection. Requires auth. */
99
- namespace BlueMojiCollectionListCollection {
100
- interface Params {
101
- cursor?: string;
102
- /**
103
- * The number of records to return. \
104
- * Minimum: 1 \
105
- * Maximum: 100
106
- * @default 50
107
- */
108
- limit?: number;
109
- /** Flag to reverse the order of the returned records. */
110
- reverse?: boolean;
111
- }
112
- type Input = undefined;
113
- interface Output {
114
- items: BlueMojiCollectionItem.ItemView[];
115
- cursor?: string;
116
- }
117
- interface ItemView {
118
- [Brand.Type]?: 'blue.moji.collection.listCollection#itemView';
119
- record: BlueMojiCollectionItem.ItemView;
120
- uri: At.ResourceUri;
121
- }
122
- }
123
-
124
- /** Write a Bluemoji record, creating or updating it as needed. Requires auth, implemented by AppView. */
125
- namespace BlueMojiCollectionPutItem {
126
- interface Params {}
127
- interface Input {
128
- item: BlueMojiCollectionItem.ItemView;
129
- /** The handle or DID of the repo (aka, current account). */
130
- repo: At.Identifier;
131
- /**
132
- * Can be set to 'false' to skip Lexicon schema validation of record data.
133
- * @default true
134
- */
135
- validate?: boolean;
136
- }
137
- interface Output {
138
- uri: At.ResourceUri;
139
- }
140
- interface Errors {}
141
- }
142
-
143
- /** Copy a single emoji from another repo. Requires auth. */
144
- namespace BlueMojiCollectionSaveToCollection {
145
- interface Params {}
146
- interface Input {
147
- /**
148
- * The source Bluemoji name/rkey. \
149
- * Maximum string length: 15
150
- */
151
- name: string;
152
- /** The handle or DID of the repo to copy from. */
153
- source: At.Identifier;
154
- /** The alias to save the Bluemoji to in the current logged-in user's repo. */
155
- renameTo?: string;
156
- }
157
- interface Output {
158
- item: BlueMojiCollectionItem.ItemView;
159
- uri: At.ResourceUri;
160
- }
161
- interface Errors {
162
- EmojiNotFound: {};
163
- DestinationExists: {};
164
- }
165
- }
166
-
167
- namespace BlueMojiPacksDefs {
168
- interface PackItemView {
169
- [Brand.Type]?: 'blue.moji.packs.defs#packItemView';
170
- subject: BlueMojiCollectionItem.ItemView;
171
- uri: At.ResourceUri;
172
- }
173
- interface PackView {
174
- [Brand.Type]?: 'blue.moji.packs.defs#packView';
175
- cid: At.Cid;
176
- creator: AppBskyActorDefs.ProfileView;
177
- indexedAt: string;
178
- /**
179
- * Minimum string length: 1 \
180
- * Maximum string length: 64
181
- */
182
- name: string;
183
- uri: At.ResourceUri;
184
- avatar?: At.GenericUri;
185
- /**
186
- * Maximum string length: 3000 \
187
- * Maximum grapheme length: 300
188
- */
189
- description?: string;
190
- descriptionFacets?: AppBskyRichtextFacet.Main[];
191
- labels?: ComAtprotoLabelDefs.Label[];
192
- /** Minimum: 0 */
193
- packItemCount?: number;
194
- viewer?: PackViewerState;
195
- }
196
- interface PackViewBasic {
197
- [Brand.Type]?: 'blue.moji.packs.defs#packViewBasic';
198
- cid: At.Cid;
199
- /**
200
- * Minimum string length: 1 \
201
- * Maximum string length: 64
202
- */
203
- name: string;
204
- uri: At.ResourceUri;
205
- avatar?: At.GenericUri;
206
- /**
207
- * Maximum string length: 3000 \
208
- * Maximum grapheme length: 300
209
- */
210
- description?: string;
211
- descriptionFacets?: BlueMojiRichtextFacet.Main[];
212
- indexedAt?: string;
213
- /** Minimum: 0 */
214
- itemCount?: number;
215
- labels?: ComAtprotoLabelDefs.Label[];
216
- viewer?: PackViewerState;
217
- }
218
- interface PackViewerState {
219
- [Brand.Type]?: 'blue.moji.packs.defs#packViewerState';
220
- savedToCollection?: boolean;
221
- }
222
- }
223
-
224
- /** Get a list of Bluemoji packs created by the actor. */
225
- namespace BlueMojiPacksGetActorPacks {
226
- interface Params {
227
- actor: At.Identifier;
228
- cursor?: string;
229
- /**
230
- * Minimum: 1 \
231
- * Maximum: 100
232
- * @default 50
233
- */
234
- limit?: number;
235
- }
236
- type Input = undefined;
237
- interface Output {
238
- packs: BlueMojiPacksDefs.PackViewBasic[];
239
- cursor?: string;
240
- }
241
- }
242
-
243
- /** Gets a 'view' (with additional context) of a specified pack. */
244
- namespace BlueMojiPacksGetPack {
245
- interface Params {
246
- /** Reference (AT-URI) of the pack record to hydrate. */
247
- pack: At.ResourceUri;
248
- cursor?: string;
249
- /**
250
- * Minimum: 1 \
251
- * Maximum: 100
252
- * @default 50
253
- */
254
- limit?: number;
255
- }
256
- type Input = undefined;
257
- interface Output {
258
- items: BlueMojiPacksDefs.PackItemView[];
259
- pack: BlueMojiPacksDefs.PackView;
260
- cursor?: string;
261
- }
262
- }
263
-
264
- /** Get views for a list of Bluemoji packs. */
265
- namespace BlueMojiPacksGetPacks {
266
- interface Params {
267
- /** Maximum array length: 25 */
268
- uris: At.ResourceUri[];
269
- }
270
- type Input = undefined;
271
- interface Output {
272
- packs: BlueMojiPacksDefs.PackViewBasic[];
273
- }
274
- }
275
-
276
- namespace BlueMojiPacksPack {
277
- /** A shareable Bluemoji pack */
278
- interface Record {
279
- $type: 'blue.moji.packs.pack';
280
- createdAt: string;
281
- /**
282
- * Minimum string length: 1 \
283
- * Maximum string length: 64
284
- */
285
- name: string;
286
- /** @default false */
287
- adultOnly?: boolean;
288
- /**
289
- * Maximum string length: 3000 \
290
- * Maximum grapheme length: 300
291
- */
292
- description?: string;
293
- descriptionFacets?: BlueMojiRichtextFacet.Main[];
294
- icon?: At.Blob;
295
- /** Self-label values for this emoji. Effectively content warnings. */
296
- labels?: Brand.Union<ComAtprotoLabelDefs.SelfLabels>;
297
- }
298
- }
299
-
300
- namespace BlueMojiPacksPackitem {
301
- /** Record representing a Bluemoji's inclusion in a specific pack. The AppView will ignore duplicate item records. */
302
- interface Record {
303
- $type: 'blue.moji.packs.packitem';
304
- createdAt: string;
305
- /** Reference (AT-URI) to the pack record (blue.moji.packs.pack). */
306
- pack: At.ResourceUri;
307
- /** Reference (AT-URI) to the Bluemoji item record (blue.moji.collection.item). */
308
- subject: At.ResourceUri;
309
- }
310
- }
311
-
312
- namespace BlueMojiRichtextFacet {
313
- interface Main {
314
- [Brand.Type]?: 'blue.moji.richtext.facet';
315
- /** DID of the user posting the Bluemoji */
316
- did: string;
317
- formats: Brand.Union<Formats_v0>;
318
- /** Name of the Bluemoji in :emoji: format */
319
- name: string;
320
- /** @default false */
321
- adultOnly?: boolean;
322
- alt?: string;
323
- /** Self-label values for this emoji. Effectively content warnings. */
324
- labels?: Brand.Union<ComAtprotoLabelDefs.SelfLabels>;
325
- }
326
- /** On the facet, only the CID is provided as this can be combined with the DID to create CDN URLs for non-animated blobs. For APNG and dotLottie, raw Bytes are served and require a com.atproto.repo.getRecord roundtrip on render so are marked with a boolean */
327
- interface Formats_v0 {
328
- [Brand.Type]?: 'blue.moji.richtext.facet#formats_v0';
329
- /** @default false */
330
- apng_128?: boolean;
331
- gif_128?: At.Cid;
332
- /** @default false */
333
- lottie?: boolean;
334
- png_128?: At.Cid;
335
- webp_128?: At.Cid;
336
- }
337
- }
338
-
339
- interface Records {
340
- 'blue.moji.collection.item': BlueMojiCollectionItem.Record;
341
- 'blue.moji.packs.pack': BlueMojiPacksPack.Record;
342
- 'blue.moji.packs.packitem': BlueMojiPacksPackitem.Record;
343
- }
344
-
345
- interface Queries {
346
- 'blue.moji.collection.getItem': {
347
- params: BlueMojiCollectionGetItem.Params;
348
- /** @deprecated */
349
- output: BlueMojiCollectionGetItem.Output;
350
- response: { json: BlueMojiCollectionGetItem.Output };
351
- };
352
- 'blue.moji.collection.listCollection': {
353
- params: BlueMojiCollectionListCollection.Params;
354
- /** @deprecated */
355
- output: BlueMojiCollectionListCollection.Output;
356
- response: { json: BlueMojiCollectionListCollection.Output };
357
- };
358
- 'blue.moji.packs.getActorPacks': {
359
- params: BlueMojiPacksGetActorPacks.Params;
360
- /** @deprecated */
361
- output: BlueMojiPacksGetActorPacks.Output;
362
- response: { json: BlueMojiPacksGetActorPacks.Output };
363
- };
364
- 'blue.moji.packs.getPack': {
365
- params: BlueMojiPacksGetPack.Params;
366
- /** @deprecated */
367
- output: BlueMojiPacksGetPack.Output;
368
- response: { json: BlueMojiPacksGetPack.Output };
369
- };
370
- 'blue.moji.packs.getPacks': {
371
- params: BlueMojiPacksGetPacks.Params;
372
- /** @deprecated */
373
- output: BlueMojiPacksGetPacks.Output;
374
- response: { json: BlueMojiPacksGetPacks.Output };
375
- };
376
- }
377
-
378
- interface Procedures {
379
- 'blue.moji.collection.putItem': {
380
- input: BlueMojiCollectionPutItem.Input;
381
- /** @deprecated */
382
- output: BlueMojiCollectionPutItem.Output;
383
- response: { json: BlueMojiCollectionPutItem.Output };
384
- };
385
- 'blue.moji.collection.saveToCollection': {
386
- input: BlueMojiCollectionSaveToCollection.Input;
387
- /** @deprecated */
388
- output: BlueMojiCollectionSaveToCollection.Output;
389
- response: { json: BlueMojiCollectionSaveToCollection.Output };
390
- };
391
- }
392
- }