@atcute/bluemoji 1.0.3 → 2.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.
- package/README.md +23 -2
- package/dist/lexicons.d.ts +54 -26
- package/lib/lexicons.ts +392 -0
- package/package.json +12 -8
package/README.md
CHANGED
|
@@ -1,9 +1,30 @@
|
|
|
1
1
|
# @atcute/bluemoji
|
|
2
2
|
|
|
3
|
-
[Bluemoji](https://github.com/aendra-rininsland/bluemoji) type definitions for `@atcute/client`, a
|
|
3
|
+
[Bluemoji](https://github.com/aendra-rininsland/bluemoji) type definitions for `@atcute/client`, a
|
|
4
|
+
lightweight and cute API client for AT Protocol.
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
## usage
|
|
7
|
+
|
|
8
|
+
you'd need to import `@atcute/bluemoji/lexicons` into your project, either by adding it into the
|
|
9
|
+
`types` field in `tsconfig.json` or by importing it on your source code.
|
|
10
|
+
|
|
11
|
+
```jsonc
|
|
12
|
+
// tsconfig.json
|
|
13
|
+
{
|
|
14
|
+
"compilerOptions": {
|
|
15
|
+
"types": ["@atcute/bluemoji/lexicons"],
|
|
16
|
+
},
|
|
17
|
+
}
|
|
18
|
+
```
|
|
6
19
|
|
|
7
20
|
```ts
|
|
21
|
+
// env.d.ts
|
|
22
|
+
/// <reference types="@atcute/bluemoji/lexicons" />
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
```ts
|
|
26
|
+
// index.ts
|
|
8
27
|
import '@atcute/bluemoji/lexicons';
|
|
9
28
|
```
|
|
29
|
+
|
|
30
|
+
newly added lexicons are augmented to `@atcute/client/lexicons` module
|
package/dist/lexicons.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ declare module '@atcute/client/lexicons' {
|
|
|
8
8
|
namespace BlueMojiCollectionDefs {
|
|
9
9
|
interface CollectionView {
|
|
10
10
|
[Brand.Type]?: 'blue.moji.collection.defs#collectionView';
|
|
11
|
-
cid: At.
|
|
11
|
+
cid: At.Cid;
|
|
12
12
|
creator: AppBskyActorDefs.ProfileView;
|
|
13
13
|
indexedAt: string;
|
|
14
14
|
/**
|
|
@@ -16,8 +16,8 @@ declare module '@atcute/client/lexicons' {
|
|
|
16
16
|
* Maximum string length: 64
|
|
17
17
|
*/
|
|
18
18
|
name: string;
|
|
19
|
-
uri: At.
|
|
20
|
-
avatar?:
|
|
19
|
+
uri: At.ResourceUri;
|
|
20
|
+
avatar?: At.GenericUri;
|
|
21
21
|
/** Minimum: 0 */
|
|
22
22
|
collectionItemCount?: number;
|
|
23
23
|
/**
|
|
@@ -35,12 +35,12 @@ declare module '@atcute/client/lexicons' {
|
|
|
35
35
|
/** The Bluemoji alias/rkey. */
|
|
36
36
|
name: string;
|
|
37
37
|
/** The handle or DID of the repo. */
|
|
38
|
-
repo:
|
|
38
|
+
repo: At.Identifier;
|
|
39
39
|
}
|
|
40
40
|
type Input = undefined;
|
|
41
41
|
interface Output {
|
|
42
42
|
item: BlueMojiCollectionItem.ItemView;
|
|
43
|
-
uri: At.
|
|
43
|
+
uri: At.ResourceUri;
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
namespace BlueMojiCollectionItem {
|
|
@@ -55,7 +55,7 @@ declare module '@atcute/client/lexicons' {
|
|
|
55
55
|
/** @default false */
|
|
56
56
|
adultOnly?: boolean;
|
|
57
57
|
alt?: string;
|
|
58
|
-
copyOf?: At.
|
|
58
|
+
copyOf?: At.ResourceUri;
|
|
59
59
|
/**
|
|
60
60
|
* Maximum string length: 1
|
|
61
61
|
* @default "◌"
|
|
@@ -109,7 +109,7 @@ declare module '@atcute/client/lexicons' {
|
|
|
109
109
|
interface ItemView {
|
|
110
110
|
[Brand.Type]?: 'blue.moji.collection.listCollection#itemView';
|
|
111
111
|
record: BlueMojiCollectionItem.ItemView;
|
|
112
|
-
uri: At.
|
|
112
|
+
uri: At.ResourceUri;
|
|
113
113
|
}
|
|
114
114
|
}
|
|
115
115
|
/** Write a Bluemoji record, creating or updating it as needed. Requires auth, implemented by AppView. */
|
|
@@ -119,7 +119,7 @@ declare module '@atcute/client/lexicons' {
|
|
|
119
119
|
interface Input {
|
|
120
120
|
item: BlueMojiCollectionItem.ItemView;
|
|
121
121
|
/** The handle or DID of the repo (aka, current account). */
|
|
122
|
-
repo:
|
|
122
|
+
repo: At.Identifier;
|
|
123
123
|
/**
|
|
124
124
|
* Can be set to 'false' to skip Lexicon schema validation of record data.
|
|
125
125
|
* @default true
|
|
@@ -127,7 +127,7 @@ declare module '@atcute/client/lexicons' {
|
|
|
127
127
|
validate?: boolean;
|
|
128
128
|
}
|
|
129
129
|
interface Output {
|
|
130
|
-
uri: At.
|
|
130
|
+
uri: At.ResourceUri;
|
|
131
131
|
}
|
|
132
132
|
interface Errors {
|
|
133
133
|
}
|
|
@@ -143,13 +143,13 @@ declare module '@atcute/client/lexicons' {
|
|
|
143
143
|
*/
|
|
144
144
|
name: string;
|
|
145
145
|
/** The handle or DID of the repo to copy from. */
|
|
146
|
-
source:
|
|
146
|
+
source: At.Identifier;
|
|
147
147
|
/** The alias to save the Bluemoji to in the current logged-in user's repo. */
|
|
148
148
|
renameTo?: string;
|
|
149
149
|
}
|
|
150
150
|
interface Output {
|
|
151
151
|
item: BlueMojiCollectionItem.ItemView;
|
|
152
|
-
uri: At.
|
|
152
|
+
uri: At.ResourceUri;
|
|
153
153
|
}
|
|
154
154
|
interface Errors {
|
|
155
155
|
EmojiNotFound: {};
|
|
@@ -160,11 +160,11 @@ declare module '@atcute/client/lexicons' {
|
|
|
160
160
|
interface PackItemView {
|
|
161
161
|
[Brand.Type]?: 'blue.moji.packs.defs#packItemView';
|
|
162
162
|
subject: BlueMojiCollectionItem.ItemView;
|
|
163
|
-
uri: At.
|
|
163
|
+
uri: At.ResourceUri;
|
|
164
164
|
}
|
|
165
165
|
interface PackView {
|
|
166
166
|
[Brand.Type]?: 'blue.moji.packs.defs#packView';
|
|
167
|
-
cid: At.
|
|
167
|
+
cid: At.Cid;
|
|
168
168
|
creator: AppBskyActorDefs.ProfileView;
|
|
169
169
|
indexedAt: string;
|
|
170
170
|
/**
|
|
@@ -172,8 +172,8 @@ declare module '@atcute/client/lexicons' {
|
|
|
172
172
|
* Maximum string length: 64
|
|
173
173
|
*/
|
|
174
174
|
name: string;
|
|
175
|
-
uri: At.
|
|
176
|
-
avatar?:
|
|
175
|
+
uri: At.ResourceUri;
|
|
176
|
+
avatar?: At.GenericUri;
|
|
177
177
|
/**
|
|
178
178
|
* Maximum string length: 3000 \
|
|
179
179
|
* Maximum grapheme length: 300
|
|
@@ -187,14 +187,14 @@ declare module '@atcute/client/lexicons' {
|
|
|
187
187
|
}
|
|
188
188
|
interface PackViewBasic {
|
|
189
189
|
[Brand.Type]?: 'blue.moji.packs.defs#packViewBasic';
|
|
190
|
-
cid: At.
|
|
190
|
+
cid: At.Cid;
|
|
191
191
|
/**
|
|
192
192
|
* Minimum string length: 1 \
|
|
193
193
|
* Maximum string length: 64
|
|
194
194
|
*/
|
|
195
195
|
name: string;
|
|
196
|
-
uri: At.
|
|
197
|
-
avatar?:
|
|
196
|
+
uri: At.ResourceUri;
|
|
197
|
+
avatar?: At.GenericUri;
|
|
198
198
|
/**
|
|
199
199
|
* Maximum string length: 3000 \
|
|
200
200
|
* Maximum grapheme length: 300
|
|
@@ -215,7 +215,7 @@ declare module '@atcute/client/lexicons' {
|
|
|
215
215
|
/** Get a list of Bluemoji packs created by the actor. */
|
|
216
216
|
namespace BlueMojiPacksGetActorPacks {
|
|
217
217
|
interface Params {
|
|
218
|
-
actor:
|
|
218
|
+
actor: At.Identifier;
|
|
219
219
|
cursor?: string;
|
|
220
220
|
/**
|
|
221
221
|
* Minimum: 1 \
|
|
@@ -234,7 +234,7 @@ declare module '@atcute/client/lexicons' {
|
|
|
234
234
|
namespace BlueMojiPacksGetPack {
|
|
235
235
|
interface Params {
|
|
236
236
|
/** Reference (AT-URI) of the pack record to hydrate. */
|
|
237
|
-
pack: At.
|
|
237
|
+
pack: At.ResourceUri;
|
|
238
238
|
cursor?: string;
|
|
239
239
|
/**
|
|
240
240
|
* Minimum: 1 \
|
|
@@ -254,7 +254,7 @@ declare module '@atcute/client/lexicons' {
|
|
|
254
254
|
namespace BlueMojiPacksGetPacks {
|
|
255
255
|
interface Params {
|
|
256
256
|
/** Maximum array length: 25 */
|
|
257
|
-
uris: At.
|
|
257
|
+
uris: At.ResourceUri[];
|
|
258
258
|
}
|
|
259
259
|
type Input = undefined;
|
|
260
260
|
interface Output {
|
|
@@ -290,9 +290,9 @@ declare module '@atcute/client/lexicons' {
|
|
|
290
290
|
$type: 'blue.moji.packs.packitem';
|
|
291
291
|
createdAt: string;
|
|
292
292
|
/** Reference (AT-URI) to the pack record (blue.moji.packs.pack). */
|
|
293
|
-
pack: At.
|
|
293
|
+
pack: At.ResourceUri;
|
|
294
294
|
/** Reference (AT-URI) to the Bluemoji item record (blue.moji.collection.item). */
|
|
295
|
-
subject: At.
|
|
295
|
+
subject: At.ResourceUri;
|
|
296
296
|
}
|
|
297
297
|
}
|
|
298
298
|
namespace BlueMojiRichtextFacet {
|
|
@@ -314,11 +314,11 @@ declare module '@atcute/client/lexicons' {
|
|
|
314
314
|
[Brand.Type]?: 'blue.moji.richtext.facet#formats_v0';
|
|
315
315
|
/** @default false */
|
|
316
316
|
apng_128?: boolean;
|
|
317
|
-
gif_128?: At.
|
|
317
|
+
gif_128?: At.Cid;
|
|
318
318
|
/** @default false */
|
|
319
319
|
lottie?: boolean;
|
|
320
|
-
png_128?: At.
|
|
321
|
-
webp_128?: At.
|
|
320
|
+
png_128?: At.Cid;
|
|
321
|
+
webp_128?: At.Cid;
|
|
322
322
|
}
|
|
323
323
|
}
|
|
324
324
|
interface Records {
|
|
@@ -329,33 +329,61 @@ declare module '@atcute/client/lexicons' {
|
|
|
329
329
|
interface Queries {
|
|
330
330
|
'blue.moji.collection.getItem': {
|
|
331
331
|
params: BlueMojiCollectionGetItem.Params;
|
|
332
|
+
/** @deprecated */
|
|
332
333
|
output: BlueMojiCollectionGetItem.Output;
|
|
334
|
+
response: {
|
|
335
|
+
json: BlueMojiCollectionGetItem.Output;
|
|
336
|
+
};
|
|
333
337
|
};
|
|
334
338
|
'blue.moji.collection.listCollection': {
|
|
335
339
|
params: BlueMojiCollectionListCollection.Params;
|
|
340
|
+
/** @deprecated */
|
|
336
341
|
output: BlueMojiCollectionListCollection.Output;
|
|
342
|
+
response: {
|
|
343
|
+
json: BlueMojiCollectionListCollection.Output;
|
|
344
|
+
};
|
|
337
345
|
};
|
|
338
346
|
'blue.moji.packs.getActorPacks': {
|
|
339
347
|
params: BlueMojiPacksGetActorPacks.Params;
|
|
348
|
+
/** @deprecated */
|
|
340
349
|
output: BlueMojiPacksGetActorPacks.Output;
|
|
350
|
+
response: {
|
|
351
|
+
json: BlueMojiPacksGetActorPacks.Output;
|
|
352
|
+
};
|
|
341
353
|
};
|
|
342
354
|
'blue.moji.packs.getPack': {
|
|
343
355
|
params: BlueMojiPacksGetPack.Params;
|
|
356
|
+
/** @deprecated */
|
|
344
357
|
output: BlueMojiPacksGetPack.Output;
|
|
358
|
+
response: {
|
|
359
|
+
json: BlueMojiPacksGetPack.Output;
|
|
360
|
+
};
|
|
345
361
|
};
|
|
346
362
|
'blue.moji.packs.getPacks': {
|
|
347
363
|
params: BlueMojiPacksGetPacks.Params;
|
|
364
|
+
/** @deprecated */
|
|
348
365
|
output: BlueMojiPacksGetPacks.Output;
|
|
366
|
+
response: {
|
|
367
|
+
json: BlueMojiPacksGetPacks.Output;
|
|
368
|
+
};
|
|
349
369
|
};
|
|
350
370
|
}
|
|
351
371
|
interface Procedures {
|
|
352
372
|
'blue.moji.collection.putItem': {
|
|
353
373
|
input: BlueMojiCollectionPutItem.Input;
|
|
374
|
+
/** @deprecated */
|
|
354
375
|
output: BlueMojiCollectionPutItem.Output;
|
|
376
|
+
response: {
|
|
377
|
+
json: BlueMojiCollectionPutItem.Output;
|
|
378
|
+
};
|
|
355
379
|
};
|
|
356
380
|
'blue.moji.collection.saveToCollection': {
|
|
357
381
|
input: BlueMojiCollectionSaveToCollection.Input;
|
|
382
|
+
/** @deprecated */
|
|
358
383
|
output: BlueMojiCollectionSaveToCollection.Output;
|
|
384
|
+
response: {
|
|
385
|
+
json: BlueMojiCollectionSaveToCollection.Output;
|
|
386
|
+
};
|
|
359
387
|
};
|
|
360
388
|
}
|
|
361
389
|
}
|
package/lib/lexicons.ts
ADDED
|
@@ -0,0 +1,392 @@
|
|
|
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
|
+
}
|
package/package.json
CHANGED
|
@@ -1,26 +1,30 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"name": "@atcute/bluemoji",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "2.0.0",
|
|
5
5
|
"description": "Bluemoji type definitions for atcute",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
8
|
-
"url": "https://
|
|
8
|
+
"url": "https://github.com/mary-ext/atcute",
|
|
9
|
+
"directory": "packages/definitions/bluemoji"
|
|
9
10
|
},
|
|
10
11
|
"files": [
|
|
11
|
-
"dist/"
|
|
12
|
+
"dist/",
|
|
13
|
+
"lib/",
|
|
14
|
+
"!lib/**/*.bench.ts",
|
|
15
|
+
"!lib/**/*.test.ts"
|
|
12
16
|
],
|
|
13
17
|
"exports": {
|
|
14
18
|
"./lexicons": "./dist/lexicons.js"
|
|
15
19
|
},
|
|
16
20
|
"peerDependencies": {
|
|
17
|
-
"@atcute/bluesky": "^
|
|
18
|
-
"@atcute/client": "^
|
|
21
|
+
"@atcute/bluesky": "^2.0.0",
|
|
22
|
+
"@atcute/client": "^3.0.0"
|
|
19
23
|
},
|
|
20
24
|
"devDependencies": {
|
|
21
|
-
"@atcute/
|
|
22
|
-
"@atcute/
|
|
23
|
-
"@atcute/
|
|
25
|
+
"@atcute/client": "^3.0.0",
|
|
26
|
+
"@atcute/lex-cli": "^1.1.0",
|
|
27
|
+
"@atcute/bluesky": "^2.0.0"
|
|
24
28
|
},
|
|
25
29
|
"scripts": {
|
|
26
30
|
"build": "tsc",
|