@ihavethatonvinyl/lexicons 0.0.0-stage → 0.2.2
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/LICENSE +20 -0
- package/dist/index.d.ts +600 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/package.json +39 -3
- package/schemas/com/ihavethatonvinyl/article/createArticleRevision.json +34 -0
- package/schemas/com/ihavethatonvinyl/article/defs.json +446 -0
- package/schemas/com/ihavethatonvinyl/article/getArticle.json +52 -0
- package/schemas/com/ihavethatonvinyl/article/listArticles.json +71 -0
- package/schemas/com/ihavethatonvinyl/article/publishArticleRevision.json +43 -0
- package/schemas/com/ihavethatonvinyl/article/revision.json +46 -0
- package/schemas/com/ihavethatonvinyl/article/unpublishArticle.json +20 -0
- package/schemas/com/ihavethatonvinyl/article.json +30 -0
- package/schemas/com/ihavethatonvinyl/auth/editor.json +31 -0
- package/schemas/com/ihavethatonvinyl/auth/publisher.json +25 -0
- package/README.md +0 -3
package/LICENSE
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright 2026 Josh Ghiloni
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
6
|
+
this software and associated documentation files (the "Software"), to deal in
|
|
7
|
+
the Software without restriction, including without limitation the rights to
|
|
8
|
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
|
9
|
+
the Software, and to permit persons to whom the Software is furnished to do so,
|
|
10
|
+
subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
|
17
|
+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
|
18
|
+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
19
|
+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
20
|
+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,600 @@
|
|
|
1
|
+
import { l } from "@atproto/lex";
|
|
2
|
+
declare const $nsid$10 = "com.atproto.repo.strongRef";
|
|
3
|
+
type $nsid$10 = typeof $nsid$10;
|
|
4
|
+
type Main$2 = {
|
|
5
|
+
$type?: 'com.atproto.repo.strongRef';
|
|
6
|
+
cid: l.CidString;
|
|
7
|
+
uri: l.AtUriString;
|
|
8
|
+
};
|
|
9
|
+
declare const main$9: l.TypedObjectSchema<"com.atproto.repo.strongRef", l.Validator<Main$2, Main$2>>;
|
|
10
|
+
declare const $type$2 = "com.atproto.repo.strongRef";
|
|
11
|
+
type $type$2 = typeof $type$2;
|
|
12
|
+
declare const $isTypeOf$2: <TValue extends Record<string, unknown>>(value: TValue) => value is l.MaybeTypedObject<"com.atproto.repo.strongRef", TValue>;
|
|
13
|
+
declare const $build$2: {
|
|
14
|
+
(input: Omit<Main$2, "$type">): {
|
|
15
|
+
$type: 'com.atproto.repo.strongRef';
|
|
16
|
+
cid: l.CidString;
|
|
17
|
+
uri: l.AtUriString;
|
|
18
|
+
};
|
|
19
|
+
(input: Omit<Main$2, "$type">): {
|
|
20
|
+
$type: 'com.atproto.repo.strongRef';
|
|
21
|
+
cid: l.CidString;
|
|
22
|
+
uri: l.AtUriString;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
declare const $assert$2: (input: unknown, options?: l.ValidateOptions) => asserts input is {
|
|
26
|
+
$type?: 'com.atproto.repo.strongRef';
|
|
27
|
+
cid: l.CidString;
|
|
28
|
+
uri: l.AtUriString;
|
|
29
|
+
};
|
|
30
|
+
declare const $check$2: (input: unknown, options?: l.ValidateOptions) => void;
|
|
31
|
+
declare const $cast$2: <I>(input: I, options?: l.ValidateOptions) => I & {
|
|
32
|
+
$type?: 'com.atproto.repo.strongRef';
|
|
33
|
+
cid: l.CidString;
|
|
34
|
+
uri: l.AtUriString;
|
|
35
|
+
};
|
|
36
|
+
declare const $ifMatches$2: <I>(input: I, options?: l.ValidateOptions) => (I & {
|
|
37
|
+
$type?: 'com.atproto.repo.strongRef';
|
|
38
|
+
cid: l.CidString;
|
|
39
|
+
uri: l.AtUriString;
|
|
40
|
+
}) | undefined;
|
|
41
|
+
declare const $matches$2: <I>(input: I, options?: l.ValidateOptions) => input is I & {
|
|
42
|
+
$type?: 'com.atproto.repo.strongRef';
|
|
43
|
+
cid: l.CidString;
|
|
44
|
+
uri: l.AtUriString;
|
|
45
|
+
};
|
|
46
|
+
declare const $parse$2: (input: unknown, options?: l.ParseOptions) => {
|
|
47
|
+
$type?: 'com.atproto.repo.strongRef';
|
|
48
|
+
cid: l.CidString;
|
|
49
|
+
uri: l.AtUriString;
|
|
50
|
+
};
|
|
51
|
+
declare const $safeParse$2: (input: unknown, options?: l.ParseOptions) => l.ValidationResult<{
|
|
52
|
+
$type?: 'com.atproto.repo.strongRef';
|
|
53
|
+
cid: l.CidString;
|
|
54
|
+
uri: l.AtUriString;
|
|
55
|
+
}>;
|
|
56
|
+
declare const $validate$2: <I>(input: I, options?: l.ValidateOptions) => I & {
|
|
57
|
+
$type?: 'com.atproto.repo.strongRef';
|
|
58
|
+
cid: l.CidString;
|
|
59
|
+
uri: l.AtUriString;
|
|
60
|
+
};
|
|
61
|
+
declare const $safeValidate$2: <I>(input: I, options?: l.ValidateOptions) => l.ValidationResult<I & {
|
|
62
|
+
$type?: 'com.atproto.repo.strongRef';
|
|
63
|
+
cid: l.CidString;
|
|
64
|
+
uri: l.AtUriString;
|
|
65
|
+
}>;
|
|
66
|
+
declare namespace strongRef_d_exports {
|
|
67
|
+
export { $assert$2 as $assert, $build$2 as $build, $cast$2 as $cast, $check$2 as $check, $ifMatches$2 as $ifMatches, $isTypeOf$2 as $isTypeOf, $matches$2 as $matches, $nsid$10 as $nsid, $parse$2 as $parse, $safeParse$2 as $safeParse, $safeValidate$2 as $safeValidate, $type$2 as $type, $validate$2 as $validate, Main$2 as Main, main$9 as default, main$9 as main };
|
|
68
|
+
}
|
|
69
|
+
declare namespace repo_d_exports {
|
|
70
|
+
export { strongRef_d_exports as strongRef };
|
|
71
|
+
}
|
|
72
|
+
declare namespace atproto_d_exports {
|
|
73
|
+
export { repo_d_exports as repo };
|
|
74
|
+
}
|
|
75
|
+
declare const $nsid$9 = "com.ihavethatonvinyl.article.defs";
|
|
76
|
+
type $nsid$9 = typeof $nsid$9;
|
|
77
|
+
type ParagraphBlockData = {
|
|
78
|
+
$type?: 'com.ihavethatonvinyl.article.defs#paragraphBlockData';
|
|
79
|
+
text: string;
|
|
80
|
+
};
|
|
81
|
+
declare const paragraphBlockData: l.TypedObjectSchema<"com.ihavethatonvinyl.article.defs#paragraphBlockData", l.Validator<ParagraphBlockData, ParagraphBlockData>>;
|
|
82
|
+
type HeaderBlockData = {
|
|
83
|
+
$type?: 'com.ihavethatonvinyl.article.defs#headerBlockData';
|
|
84
|
+
text: string;
|
|
85
|
+
level: number;
|
|
86
|
+
};
|
|
87
|
+
declare const headerBlockData: l.TypedObjectSchema<"com.ihavethatonvinyl.article.defs#headerBlockData", l.Validator<HeaderBlockData, HeaderBlockData>>;
|
|
88
|
+
type DividerBlockData = {
|
|
89
|
+
$type?: 'com.ihavethatonvinyl.article.defs#dividerBlockData';
|
|
90
|
+
};
|
|
91
|
+
declare const dividerBlockData: l.TypedObjectSchema<"com.ihavethatonvinyl.article.defs#dividerBlockData", l.Validator<DividerBlockData, DividerBlockData>>;
|
|
92
|
+
type QuoteBlockData = {
|
|
93
|
+
$type?: 'com.ihavethatonvinyl.article.defs#quoteBlockData';
|
|
94
|
+
text: string;
|
|
95
|
+
caption?: string;
|
|
96
|
+
alignment?: 'left' | 'center';
|
|
97
|
+
};
|
|
98
|
+
declare const quoteBlockData: l.TypedObjectSchema<"com.ihavethatonvinyl.article.defs#quoteBlockData", l.Validator<QuoteBlockData, QuoteBlockData>>;
|
|
99
|
+
type CheckedListItemMeta = {
|
|
100
|
+
$type?: 'com.ihavethatonvinyl.article.defs#checkedListItemMeta';
|
|
101
|
+
checked?: boolean;
|
|
102
|
+
};
|
|
103
|
+
declare const checkedListItemMeta: l.TypedObjectSchema<"com.ihavethatonvinyl.article.defs#checkedListItemMeta", l.Validator<CheckedListItemMeta, CheckedListItemMeta>>;
|
|
104
|
+
type OrderedListItemMeta = {
|
|
105
|
+
$type?: 'com.ihavethatonvinyl.article.defs#orderedListItemMeta';
|
|
106
|
+
start?: number;
|
|
107
|
+
counterType?: string;
|
|
108
|
+
};
|
|
109
|
+
declare const orderedListItemMeta: l.TypedObjectSchema<"com.ihavethatonvinyl.article.defs#orderedListItemMeta", l.Validator<OrderedListItemMeta, OrderedListItemMeta>>;
|
|
110
|
+
type ListItem = {
|
|
111
|
+
$type?: 'com.ihavethatonvinyl.article.defs#listItem';
|
|
112
|
+
content: string;
|
|
113
|
+
meta?: l.$Typed<CheckedListItemMeta> | l.$Typed<OrderedListItemMeta> | l.Unknown$TypedObject | null;
|
|
114
|
+
items?: ListItem[];
|
|
115
|
+
};
|
|
116
|
+
declare const listItem: l.TypedObjectSchema<"com.ihavethatonvinyl.article.defs#listItem", l.Validator<ListItem, ListItem>>;
|
|
117
|
+
type ListBlockData = {
|
|
118
|
+
$type?: 'com.ihavethatonvinyl.article.defs#listBlockData';
|
|
119
|
+
style: 'ordered' | 'unordered' | 'checked' | l.UnknownString;
|
|
120
|
+
meta?: l.$Typed<CheckedListItemMeta> | l.$Typed<OrderedListItemMeta> | l.Unknown$TypedObject | null;
|
|
121
|
+
items?: ListItem[];
|
|
122
|
+
};
|
|
123
|
+
declare const listBlockData: l.TypedObjectSchema<"com.ihavethatonvinyl.article.defs#listBlockData", l.Validator<ListBlockData, ListBlockData>>;
|
|
124
|
+
type Url = {
|
|
125
|
+
$type?: 'com.ihavethatonvinyl.article.defs#url';
|
|
126
|
+
url: l.UriString;
|
|
127
|
+
};
|
|
128
|
+
declare const url: l.TypedObjectSchema<"com.ihavethatonvinyl.article.defs#url", l.Validator<Url, Url>>;
|
|
129
|
+
type LocalImage = {
|
|
130
|
+
$type?: 'com.ihavethatonvinyl.article.defs#localImage';
|
|
131
|
+
mimeType: string;
|
|
132
|
+
b64Data: string;
|
|
133
|
+
};
|
|
134
|
+
declare const localImage: l.TypedObjectSchema<"com.ihavethatonvinyl.article.defs#localImage", l.Validator<LocalImage, LocalImage>>;
|
|
135
|
+
type ImageBlockData = {
|
|
136
|
+
$type?: 'com.ihavethatonvinyl.article.defs#imageBlockData';
|
|
137
|
+
file?: Url;
|
|
138
|
+
imageBlob?: l.BlobRef;
|
|
139
|
+
image?: LocalImage;
|
|
140
|
+
caption?: string;
|
|
141
|
+
withBorder?: boolean;
|
|
142
|
+
withBackground?: boolean;
|
|
143
|
+
stretched?: boolean;
|
|
144
|
+
};
|
|
145
|
+
declare const imageBlockData: l.TypedObjectSchema<"com.ihavethatonvinyl.article.defs#imageBlockData", l.Validator<ImageBlockData, ImageBlockData>>;
|
|
146
|
+
type LinkMeta = {
|
|
147
|
+
$type?: 'com.ihavethatonvinyl.article.defs#linkMeta';
|
|
148
|
+
title?: string;
|
|
149
|
+
description?: string;
|
|
150
|
+
image?: Url;
|
|
151
|
+
};
|
|
152
|
+
declare const linkMeta: l.TypedObjectSchema<"com.ihavethatonvinyl.article.defs#linkMeta", l.Validator<LinkMeta, LinkMeta>>;
|
|
153
|
+
type LinkBlockData = {
|
|
154
|
+
$type?: 'com.ihavethatonvinyl.article.defs#linkBlockData';
|
|
155
|
+
url: l.UriString;
|
|
156
|
+
meta?: LinkMeta;
|
|
157
|
+
};
|
|
158
|
+
declare const linkBlockData: l.TypedObjectSchema<"com.ihavethatonvinyl.article.defs#linkBlockData", l.Validator<LinkBlockData, LinkBlockData>>;
|
|
159
|
+
type TableRow = {
|
|
160
|
+
$type?: 'com.ihavethatonvinyl.article.defs#tableRow';
|
|
161
|
+
columns: string[];
|
|
162
|
+
};
|
|
163
|
+
declare const tableRow: l.TypedObjectSchema<"com.ihavethatonvinyl.article.defs#tableRow", l.Validator<TableRow, TableRow>>;
|
|
164
|
+
type TableBlockData = {
|
|
165
|
+
$type?: 'com.ihavethatonvinyl.article.defs#tableBlockData';
|
|
166
|
+
withHeadings?: boolean;
|
|
167
|
+
stretched?: boolean;
|
|
168
|
+
rows: TableRow[];
|
|
169
|
+
};
|
|
170
|
+
declare const tableBlockData: l.TypedObjectSchema<"com.ihavethatonvinyl.article.defs#tableBlockData", l.Validator<TableBlockData, TableBlockData>>;
|
|
171
|
+
type Paragraph = {
|
|
172
|
+
$type?: 'com.ihavethatonvinyl.article.defs#paragraph';
|
|
173
|
+
type?: 'paragraph';
|
|
174
|
+
data?: ParagraphBlockData;
|
|
175
|
+
};
|
|
176
|
+
declare const paragraph: l.TypedObjectSchema<"com.ihavethatonvinyl.article.defs#paragraph", l.Validator<Paragraph, Paragraph>>;
|
|
177
|
+
type Header = {
|
|
178
|
+
$type?: 'com.ihavethatonvinyl.article.defs#header';
|
|
179
|
+
type?: 'header';
|
|
180
|
+
data?: HeaderBlockData;
|
|
181
|
+
};
|
|
182
|
+
declare const header: l.TypedObjectSchema<"com.ihavethatonvinyl.article.defs#header", l.Validator<Header, Header>>;
|
|
183
|
+
type Divider = {
|
|
184
|
+
$type?: 'com.ihavethatonvinyl.article.defs#divider';
|
|
185
|
+
type?: 'divider';
|
|
186
|
+
data?: DividerBlockData;
|
|
187
|
+
};
|
|
188
|
+
declare const divider: l.TypedObjectSchema<"com.ihavethatonvinyl.article.defs#divider", l.Validator<Divider, Divider>>;
|
|
189
|
+
type Quote = {
|
|
190
|
+
$type?: 'com.ihavethatonvinyl.article.defs#quote';
|
|
191
|
+
type?: 'quote';
|
|
192
|
+
data?: QuoteBlockData;
|
|
193
|
+
};
|
|
194
|
+
declare const quote: l.TypedObjectSchema<"com.ihavethatonvinyl.article.defs#quote", l.Validator<Quote, Quote>>;
|
|
195
|
+
type List = {
|
|
196
|
+
$type?: 'com.ihavethatonvinyl.article.defs#list';
|
|
197
|
+
type?: 'list';
|
|
198
|
+
data?: ListBlockData;
|
|
199
|
+
};
|
|
200
|
+
declare const list: l.TypedObjectSchema<"com.ihavethatonvinyl.article.defs#list", l.Validator<List, List>>;
|
|
201
|
+
type Image = {
|
|
202
|
+
$type?: 'com.ihavethatonvinyl.article.defs#image';
|
|
203
|
+
type?: 'image';
|
|
204
|
+
data?: ImageBlockData;
|
|
205
|
+
};
|
|
206
|
+
declare const image: l.TypedObjectSchema<"com.ihavethatonvinyl.article.defs#image", l.Validator<Image, Image>>;
|
|
207
|
+
type Link = {
|
|
208
|
+
$type?: 'com.ihavethatonvinyl.article.defs#link';
|
|
209
|
+
type?: 'linkTool';
|
|
210
|
+
data?: LinkBlockData;
|
|
211
|
+
};
|
|
212
|
+
declare const link: l.TypedObjectSchema<"com.ihavethatonvinyl.article.defs#link", l.Validator<Link, Link>>;
|
|
213
|
+
type Table = {
|
|
214
|
+
$type?: 'com.ihavethatonvinyl.article.defs#table';
|
|
215
|
+
type?: 'table';
|
|
216
|
+
data?: TableBlockData;
|
|
217
|
+
};
|
|
218
|
+
declare const table: l.TypedObjectSchema<"com.ihavethatonvinyl.article.defs#table", l.Validator<Table, Table>>;
|
|
219
|
+
/** An article's contents */
|
|
220
|
+
type Contents = {
|
|
221
|
+
$type?: 'com.ihavethatonvinyl.article.defs#contents';
|
|
222
|
+
/**
|
|
223
|
+
* The article title
|
|
224
|
+
*/
|
|
225
|
+
title: string;
|
|
226
|
+
/**
|
|
227
|
+
* The blurb to be shown in list view
|
|
228
|
+
*/
|
|
229
|
+
blurb: string;
|
|
230
|
+
/**
|
|
231
|
+
* The image shown at the beginning of the article and in list view
|
|
232
|
+
*/
|
|
233
|
+
heroImage?: l.BlobRef;
|
|
234
|
+
/**
|
|
235
|
+
* A list of authors for the article. Free-form to allow plain names, or identifiers for a user
|
|
236
|
+
*/
|
|
237
|
+
authors: string[];
|
|
238
|
+
categories: ('conversations' | 'q-and-a' | 'essays' | 'features' | 'liner-notes' | l.UnknownString)[];
|
|
239
|
+
body?: (l.$Typed<Paragraph> | l.$Typed<Header> | l.$Typed<Divider> | l.$Typed<Quote> | l.$Typed<List> | l.$Typed<Image> | l.$Typed<Link> | l.$Typed<Table> | l.Unknown$TypedObject)[];
|
|
240
|
+
};
|
|
241
|
+
/** An article's contents */
|
|
242
|
+
declare const contents: l.TypedObjectSchema<"com.ihavethatonvinyl.article.defs#contents", l.Validator<Contents, Contents>>;
|
|
243
|
+
declare const $nsid$8 = "com.ihavethatonvinyl.article.revision";
|
|
244
|
+
type $nsid$8 = typeof $nsid$8;
|
|
245
|
+
/** An I Have That on Vinyl article revision */
|
|
246
|
+
type Main$1 = {
|
|
247
|
+
$type: 'com.ihavethatonvinyl.article.revision';
|
|
248
|
+
published: l.DatetimeString;
|
|
249
|
+
publishedBy: l.DidString;
|
|
250
|
+
articles?: Main$2[];
|
|
251
|
+
contents: Contents;
|
|
252
|
+
/**
|
|
253
|
+
* A short description of what was updated
|
|
254
|
+
*/
|
|
255
|
+
notes?: string;
|
|
256
|
+
};
|
|
257
|
+
/** An I Have That on Vinyl article revision */
|
|
258
|
+
declare const main$8: l.RecordSchema<"tid", "com.ihavethatonvinyl.article.revision", l.Validator<Omit<Main$1, "$type">, Omit<Main$1, "$type">>>;
|
|
259
|
+
declare const $type$1 = "com.ihavethatonvinyl.article.revision";
|
|
260
|
+
type $type$1 = typeof $type$1;
|
|
261
|
+
declare const $isTypeOf$1: <TValue extends {
|
|
262
|
+
$type?: unknown;
|
|
263
|
+
}>(value: TValue) => value is l.TypedRecord<"com.ihavethatonvinyl.article.revision", TValue>;
|
|
264
|
+
declare const $build$1: {
|
|
265
|
+
(input: Omit<Omit<Main$1, "$type">, "$type">): {
|
|
266
|
+
$type: "com.ihavethatonvinyl.article.revision";
|
|
267
|
+
published: l.DatetimeString;
|
|
268
|
+
publishedBy: l.DidString;
|
|
269
|
+
articles?: Main$2[];
|
|
270
|
+
contents: Contents;
|
|
271
|
+
notes?: string;
|
|
272
|
+
};
|
|
273
|
+
(input: Omit<Omit<Main$1, "$type">, "$type">): {
|
|
274
|
+
$type: "com.ihavethatonvinyl.article.revision";
|
|
275
|
+
published: l.DatetimeString;
|
|
276
|
+
publishedBy: l.DidString;
|
|
277
|
+
articles?: Main$2[];
|
|
278
|
+
contents: Contents;
|
|
279
|
+
notes?: string;
|
|
280
|
+
};
|
|
281
|
+
};
|
|
282
|
+
declare const $assert$1: (input: unknown, options?: l.ValidateOptions) => asserts input is {
|
|
283
|
+
$type: "com.ihavethatonvinyl.article.revision";
|
|
284
|
+
published: l.DatetimeString;
|
|
285
|
+
publishedBy: l.DidString;
|
|
286
|
+
articles?: Main$2[];
|
|
287
|
+
contents: Contents;
|
|
288
|
+
notes?: string;
|
|
289
|
+
};
|
|
290
|
+
declare const $check$1: (input: unknown, options?: l.ValidateOptions) => void;
|
|
291
|
+
declare const $cast$1: <I>(input: I, options?: l.ValidateOptions) => I & {
|
|
292
|
+
$type: "com.ihavethatonvinyl.article.revision";
|
|
293
|
+
published: l.DatetimeString;
|
|
294
|
+
publishedBy: l.DidString;
|
|
295
|
+
articles?: Main$2[];
|
|
296
|
+
contents: Contents;
|
|
297
|
+
notes?: string;
|
|
298
|
+
};
|
|
299
|
+
declare const $ifMatches$1: <I>(input: I, options?: l.ValidateOptions) => (I & {
|
|
300
|
+
$type: "com.ihavethatonvinyl.article.revision";
|
|
301
|
+
published: l.DatetimeString;
|
|
302
|
+
publishedBy: l.DidString;
|
|
303
|
+
articles?: Main$2[];
|
|
304
|
+
contents: Contents;
|
|
305
|
+
notes?: string;
|
|
306
|
+
}) | undefined;
|
|
307
|
+
declare const $matches$1: <I>(input: I, options?: l.ValidateOptions) => input is I & {
|
|
308
|
+
$type: "com.ihavethatonvinyl.article.revision";
|
|
309
|
+
published: l.DatetimeString;
|
|
310
|
+
publishedBy: l.DidString;
|
|
311
|
+
articles?: Main$2[];
|
|
312
|
+
contents: Contents;
|
|
313
|
+
notes?: string;
|
|
314
|
+
};
|
|
315
|
+
declare const $parse$1: (input: unknown, options?: l.ParseOptions) => {
|
|
316
|
+
$type: "com.ihavethatonvinyl.article.revision";
|
|
317
|
+
published: l.DatetimeString;
|
|
318
|
+
publishedBy: l.DidString;
|
|
319
|
+
articles?: Main$2[];
|
|
320
|
+
contents: Contents;
|
|
321
|
+
notes?: string;
|
|
322
|
+
};
|
|
323
|
+
declare const $safeParse$1: (input: unknown, options?: l.ParseOptions) => l.ValidationResult<{
|
|
324
|
+
$type: "com.ihavethatonvinyl.article.revision";
|
|
325
|
+
published: l.DatetimeString;
|
|
326
|
+
publishedBy: l.DidString;
|
|
327
|
+
articles?: Main$2[];
|
|
328
|
+
contents: Contents;
|
|
329
|
+
notes?: string;
|
|
330
|
+
}>;
|
|
331
|
+
declare const $validate$1: <I>(input: I, options?: l.ValidateOptions) => I & {
|
|
332
|
+
$type: "com.ihavethatonvinyl.article.revision";
|
|
333
|
+
published: l.DatetimeString;
|
|
334
|
+
publishedBy: l.DidString;
|
|
335
|
+
articles?: Main$2[];
|
|
336
|
+
contents: Contents;
|
|
337
|
+
notes?: string;
|
|
338
|
+
};
|
|
339
|
+
declare const $safeValidate$1: <I>(input: I, options?: l.ValidateOptions) => l.ValidationResult<I & {
|
|
340
|
+
$type: "com.ihavethatonvinyl.article.revision";
|
|
341
|
+
published: l.DatetimeString;
|
|
342
|
+
publishedBy: l.DidString;
|
|
343
|
+
articles?: Main$2[];
|
|
344
|
+
contents: Contents;
|
|
345
|
+
notes?: string;
|
|
346
|
+
}>;
|
|
347
|
+
declare const $nsid$7 = "com.ihavethatonvinyl.article.createArticleRevision";
|
|
348
|
+
type $nsid$7 = typeof $nsid$7;
|
|
349
|
+
declare const $params$4: l.ParamsSchema<{}>;
|
|
350
|
+
type $Params$4 = l.InferOutput<typeof $params$4>;
|
|
351
|
+
declare const $input$2: l.Payload<"application/json", l.ObjectSchema<{
|
|
352
|
+
contents: l.OptionalSchema<l.RefSchema<l.Validator<Contents, Contents>>>;
|
|
353
|
+
}>>;
|
|
354
|
+
type $Input$2<B = l.BinaryData> = l.InferPayload<typeof $input$2, B>;
|
|
355
|
+
type $InputBody$2<B = l.BinaryData> = l.InferPayloadBody<typeof $input$2, B>;
|
|
356
|
+
declare const $output$4: l.Payload<"application/json", l.ObjectSchema<{
|
|
357
|
+
revision: l.OptionalSchema<l.RefSchema<l.Validator<Main$1, Main$1>>>;
|
|
358
|
+
}>>;
|
|
359
|
+
type $Output$4<B = l.BinaryData> = l.InferPayload<typeof $output$4, B>;
|
|
360
|
+
type $OutputBody$4<B = l.BinaryData> = l.InferPayloadBody<typeof $output$4, B>;
|
|
361
|
+
/** creates an article revision. If articles is empty, it's assumed this is a new article */
|
|
362
|
+
declare const main$7: l.Procedure<"com.ihavethatonvinyl.article.createArticleRevision", l.ParamsSchema<{}>, l.Payload<"application/json", l.ObjectSchema<{
|
|
363
|
+
contents: l.OptionalSchema<l.RefSchema<l.Validator<Contents, Contents>>>;
|
|
364
|
+
}>>, l.Payload<"application/json", l.ObjectSchema<{
|
|
365
|
+
revision: l.OptionalSchema<l.RefSchema<l.Validator<Main$1, Main$1>>>;
|
|
366
|
+
}>>, undefined>;
|
|
367
|
+
declare const $lxm$4 = "com.ihavethatonvinyl.article.createArticleRevision";
|
|
368
|
+
type $lxm$4 = typeof $lxm$4;
|
|
369
|
+
declare namespace createArticleRevision_d_exports {
|
|
370
|
+
export { $Input$2 as $Input, $InputBody$2 as $InputBody, $Output$4 as $Output, $OutputBody$4 as $OutputBody, $Params$4 as $Params, $input$2 as $input, $lxm$4 as $lxm, $nsid$7 as $nsid, $output$4 as $output, $params$4 as $params, main$7 as default, main$7 as main };
|
|
371
|
+
}
|
|
372
|
+
declare const $nsid$6 = "com.ihavethatonvinyl.article.unpublishArticle";
|
|
373
|
+
type $nsid$6 = typeof $nsid$6;
|
|
374
|
+
declare const $params$3: l.ParamsSchema<{
|
|
375
|
+
readonly article: l.OptionalSchema<l.StringSchema<{
|
|
376
|
+
readonly format: "at-uri";
|
|
377
|
+
}>>;
|
|
378
|
+
}>;
|
|
379
|
+
type $Params$3 = l.InferOutput<typeof $params$3>;
|
|
380
|
+
declare const $input$1: l.Payload<undefined, undefined>;
|
|
381
|
+
type $Input$1<B = l.BinaryData> = l.InferPayload<typeof $input$1, B>;
|
|
382
|
+
type $InputBody$1<B = l.BinaryData> = l.InferPayloadBody<typeof $input$1, B>;
|
|
383
|
+
declare const $output$3: l.Payload<undefined, undefined>;
|
|
384
|
+
type $Output$3<B = l.BinaryData> = l.InferPayload<typeof $output$3, B>;
|
|
385
|
+
type $OutputBody$3<B = l.BinaryData> = l.InferPayloadBody<typeof $output$3, B>;
|
|
386
|
+
/** Deletes an article and removes any refs to it from all revisions */
|
|
387
|
+
declare const main$6: l.Procedure<"com.ihavethatonvinyl.article.unpublishArticle", l.ParamsSchema<{
|
|
388
|
+
readonly article: l.OptionalSchema<l.StringSchema<{
|
|
389
|
+
readonly format: "at-uri";
|
|
390
|
+
}>>;
|
|
391
|
+
}>, l.Payload<undefined, undefined>, l.Payload<undefined, undefined>, undefined>;
|
|
392
|
+
declare const $lxm$3 = "com.ihavethatonvinyl.article.unpublishArticle";
|
|
393
|
+
type $lxm$3 = typeof $lxm$3;
|
|
394
|
+
declare namespace unpublishArticle_d_exports {
|
|
395
|
+
export { $Input$1 as $Input, $InputBody$1 as $InputBody, $Output$3 as $Output, $OutputBody$3 as $OutputBody, $Params$3 as $Params, $input$1 as $input, $lxm$3 as $lxm, $nsid$6 as $nsid, $output$3 as $output, $params$3 as $params, main$6 as default, main$6 as main };
|
|
396
|
+
}
|
|
397
|
+
declare const $nsid$5 = "com.ihavethatonvinyl.article";
|
|
398
|
+
type $nsid$5 = typeof $nsid$5;
|
|
399
|
+
/** An I Have That on Vinyl article. It is immutable so backlinks and comments survive edits. The record key acts as the article's URL slug */
|
|
400
|
+
type Main = {
|
|
401
|
+
$type: 'com.ihavethatonvinyl.article';
|
|
402
|
+
/**
|
|
403
|
+
* The date the article was originally published
|
|
404
|
+
*/
|
|
405
|
+
published: l.DatetimeString;
|
|
406
|
+
/**
|
|
407
|
+
* The user who published the article
|
|
408
|
+
*/
|
|
409
|
+
publishedBy: l.DidString;
|
|
410
|
+
};
|
|
411
|
+
/** An I Have That on Vinyl article. It is immutable so backlinks and comments survive edits. The record key acts as the article's URL slug */
|
|
412
|
+
declare const main$5: l.RecordSchema<"literal:self", "com.ihavethatonvinyl.article", l.Validator<Omit<Main, "$type">, Omit<Main, "$type">>>;
|
|
413
|
+
declare const $type = "com.ihavethatonvinyl.article";
|
|
414
|
+
type $type = typeof $type;
|
|
415
|
+
declare const $isTypeOf: <TValue extends {
|
|
416
|
+
$type?: unknown;
|
|
417
|
+
}>(value: TValue) => value is l.TypedRecord<"com.ihavethatonvinyl.article", TValue>;
|
|
418
|
+
declare const $build: {
|
|
419
|
+
(input: Omit<Omit<Main, "$type">, "$type">): {
|
|
420
|
+
$type: "com.ihavethatonvinyl.article";
|
|
421
|
+
published: l.DatetimeString;
|
|
422
|
+
publishedBy: l.DidString;
|
|
423
|
+
};
|
|
424
|
+
(input: Omit<Omit<Main, "$type">, "$type">): {
|
|
425
|
+
$type: "com.ihavethatonvinyl.article";
|
|
426
|
+
published: l.DatetimeString;
|
|
427
|
+
publishedBy: l.DidString;
|
|
428
|
+
};
|
|
429
|
+
};
|
|
430
|
+
declare const $assert: (input: unknown, options?: l.ValidateOptions) => asserts input is {
|
|
431
|
+
$type: "com.ihavethatonvinyl.article";
|
|
432
|
+
published: l.DatetimeString;
|
|
433
|
+
publishedBy: l.DidString;
|
|
434
|
+
};
|
|
435
|
+
declare const $check: (input: unknown, options?: l.ValidateOptions) => void;
|
|
436
|
+
declare const $cast: <I>(input: I, options?: l.ValidateOptions) => I & {
|
|
437
|
+
$type: "com.ihavethatonvinyl.article";
|
|
438
|
+
published: l.DatetimeString;
|
|
439
|
+
publishedBy: l.DidString;
|
|
440
|
+
};
|
|
441
|
+
declare const $ifMatches: <I>(input: I, options?: l.ValidateOptions) => (I & {
|
|
442
|
+
$type: "com.ihavethatonvinyl.article";
|
|
443
|
+
published: l.DatetimeString;
|
|
444
|
+
publishedBy: l.DidString;
|
|
445
|
+
}) | undefined;
|
|
446
|
+
declare const $matches: <I>(input: I, options?: l.ValidateOptions) => input is I & {
|
|
447
|
+
$type: "com.ihavethatonvinyl.article";
|
|
448
|
+
published: l.DatetimeString;
|
|
449
|
+
publishedBy: l.DidString;
|
|
450
|
+
};
|
|
451
|
+
declare const $parse: (input: unknown, options?: l.ParseOptions) => {
|
|
452
|
+
$type: "com.ihavethatonvinyl.article";
|
|
453
|
+
published: l.DatetimeString;
|
|
454
|
+
publishedBy: l.DidString;
|
|
455
|
+
};
|
|
456
|
+
declare const $safeParse: (input: unknown, options?: l.ParseOptions) => l.ValidationResult<{
|
|
457
|
+
$type: "com.ihavethatonvinyl.article";
|
|
458
|
+
published: l.DatetimeString;
|
|
459
|
+
publishedBy: l.DidString;
|
|
460
|
+
}>;
|
|
461
|
+
declare const $validate: <I>(input: I, options?: l.ValidateOptions) => I & {
|
|
462
|
+
$type: "com.ihavethatonvinyl.article";
|
|
463
|
+
published: l.DatetimeString;
|
|
464
|
+
publishedBy: l.DidString;
|
|
465
|
+
};
|
|
466
|
+
declare const $safeValidate: <I>(input: I, options?: l.ValidateOptions) => l.ValidationResult<I & {
|
|
467
|
+
$type: "com.ihavethatonvinyl.article";
|
|
468
|
+
published: l.DatetimeString;
|
|
469
|
+
publishedBy: l.DidString;
|
|
470
|
+
}>;
|
|
471
|
+
declare namespace defs_d_exports {
|
|
472
|
+
export { $nsid$9 as $nsid, CheckedListItemMeta, Contents, Divider, DividerBlockData, Header, HeaderBlockData, Image, ImageBlockData, Link, LinkBlockData, LinkMeta, List, ListBlockData, ListItem, LocalImage, OrderedListItemMeta, Paragraph, ParagraphBlockData, Quote, QuoteBlockData, Table, TableBlockData, TableRow, Url, checkedListItemMeta, contents, divider, dividerBlockData, header, headerBlockData, image, imageBlockData, link, linkBlockData, linkMeta, list, listBlockData, listItem, localImage, orderedListItemMeta, paragraph, paragraphBlockData, quote, quoteBlockData, table, tableBlockData, tableRow, url };
|
|
473
|
+
}
|
|
474
|
+
declare const $nsid$4 = "com.ihavethatonvinyl.article.getArticle";
|
|
475
|
+
type $nsid$4 = typeof $nsid$4;
|
|
476
|
+
declare const $params$2: l.ParamsSchema<{
|
|
477
|
+
readonly article: l.OptionalSchema<l.StringSchema<{
|
|
478
|
+
readonly format: "at-uri";
|
|
479
|
+
}>>;
|
|
480
|
+
readonly allVersions: l.OptionalSchema<l.WithDefaultSchema<l.BooleanSchema>>;
|
|
481
|
+
}>;
|
|
482
|
+
type $Params$2 = l.InferOutput<typeof $params$2>;
|
|
483
|
+
declare const $output$2: l.Payload<"application/json", l.ObjectSchema<{
|
|
484
|
+
article: l.RefSchema<l.Validator<Main, Main>>;
|
|
485
|
+
contents: l.RefSchema<l.Validator<Main$1, Main$1>>;
|
|
486
|
+
history: l.OptionalSchema<l.ArraySchema<l.RefSchema<l.Validator<Main$1, Main$1>>>>;
|
|
487
|
+
}>>;
|
|
488
|
+
type $Output$2<B = l.BinaryData> = l.InferPayload<typeof $output$2, B>;
|
|
489
|
+
type $OutputBody$2<B = l.BinaryData> = l.InferPayloadBody<typeof $output$2, B>;
|
|
490
|
+
/** Fetch an article with its latest revision, plus optionally all older versions */
|
|
491
|
+
declare const main$4: l.Query<"com.ihavethatonvinyl.article.getArticle", l.ParamsSchema<{
|
|
492
|
+
readonly article: l.OptionalSchema<l.StringSchema<{
|
|
493
|
+
readonly format: "at-uri";
|
|
494
|
+
}>>;
|
|
495
|
+
readonly allVersions: l.OptionalSchema<l.WithDefaultSchema<l.BooleanSchema>>;
|
|
496
|
+
}>, l.Payload<"application/json", l.ObjectSchema<{
|
|
497
|
+
article: l.RefSchema<l.Validator<Main, Main>>;
|
|
498
|
+
contents: l.RefSchema<l.Validator<Main$1, Main$1>>;
|
|
499
|
+
history: l.OptionalSchema<l.ArraySchema<l.RefSchema<l.Validator<Main$1, Main$1>>>>;
|
|
500
|
+
}>>, undefined>;
|
|
501
|
+
declare const $lxm$2 = "com.ihavethatonvinyl.article.getArticle";
|
|
502
|
+
type $lxm$2 = typeof $lxm$2;
|
|
503
|
+
declare namespace getArticle_d_exports {
|
|
504
|
+
export { $Output$2 as $Output, $OutputBody$2 as $OutputBody, $Params$2 as $Params, $lxm$2 as $lxm, $nsid$4 as $nsid, $output$2 as $output, $params$2 as $params, main$4 as default, main$4 as main };
|
|
505
|
+
}
|
|
506
|
+
declare const $nsid$3 = "com.ihavethatonvinyl.article.listArticles";
|
|
507
|
+
type $nsid$3 = typeof $nsid$3;
|
|
508
|
+
declare const $params$1: l.ParamsSchema<{
|
|
509
|
+
readonly limit: l.OptionalSchema<l.WithDefaultSchema<l.IntegerSchema>>;
|
|
510
|
+
readonly cursor: l.OptionalSchema<l.StringSchema<{}>>;
|
|
511
|
+
readonly sort: l.OptionalSchema<l.WithDefaultSchema<l.EnumSchema<"asc" | "desc">>>;
|
|
512
|
+
readonly sortBy: l.OptionalSchema<l.WithDefaultSchema<l.StringSchema<{
|
|
513
|
+
knownValues: ["published", "updated"];
|
|
514
|
+
}>>>;
|
|
515
|
+
}>;
|
|
516
|
+
type $Params$1 = l.InferOutput<typeof $params$1>;
|
|
517
|
+
declare const $output$1: l.Payload<"application/json", l.ObjectSchema<{
|
|
518
|
+
items: l.ArraySchema<l.RefSchema<l.Validator<Main$1, Main$1>>>;
|
|
519
|
+
cursor: l.StringSchema<{}>;
|
|
520
|
+
total: l.IntegerSchema;
|
|
521
|
+
}>>;
|
|
522
|
+
type $Output$1<B = l.BinaryData> = l.InferPayload<typeof $output$1, B>;
|
|
523
|
+
type $OutputBody$1<B = l.BinaryData> = l.InferPayloadBody<typeof $output$1, B>;
|
|
524
|
+
/** returns the latest version of the articles that match the search criteria */
|
|
525
|
+
declare const main$3: l.Query<"com.ihavethatonvinyl.article.listArticles", l.ParamsSchema<{
|
|
526
|
+
readonly limit: l.OptionalSchema<l.WithDefaultSchema<l.IntegerSchema>>;
|
|
527
|
+
readonly cursor: l.OptionalSchema<l.StringSchema<{}>>;
|
|
528
|
+
readonly sort: l.OptionalSchema<l.WithDefaultSchema<l.EnumSchema<"asc" | "desc">>>;
|
|
529
|
+
readonly sortBy: l.OptionalSchema<l.WithDefaultSchema<l.StringSchema<{
|
|
530
|
+
knownValues: ["published", "updated"];
|
|
531
|
+
}>>>;
|
|
532
|
+
}>, l.Payload<"application/json", l.ObjectSchema<{
|
|
533
|
+
items: l.ArraySchema<l.RefSchema<l.Validator<Main$1, Main$1>>>;
|
|
534
|
+
cursor: l.StringSchema<{}>;
|
|
535
|
+
total: l.IntegerSchema;
|
|
536
|
+
}>>, undefined>;
|
|
537
|
+
declare const $lxm$1 = "com.ihavethatonvinyl.article.listArticles";
|
|
538
|
+
type $lxm$1 = typeof $lxm$1;
|
|
539
|
+
declare namespace listArticles_d_exports {
|
|
540
|
+
export { $Output$1 as $Output, $OutputBody$1 as $OutputBody, $Params$1 as $Params, $lxm$1 as $lxm, $nsid$3 as $nsid, $output$1 as $output, $params$1 as $params, main$3 as default, main$3 as main };
|
|
541
|
+
}
|
|
542
|
+
declare const $nsid$2 = "com.ihavethatonvinyl.article.publishArticleRevision";
|
|
543
|
+
type $nsid$2 = typeof $nsid$2;
|
|
544
|
+
declare const $params: l.ParamsSchema<{
|
|
545
|
+
readonly revision: l.StringSchema<{
|
|
546
|
+
readonly format: "at-uri";
|
|
547
|
+
}>;
|
|
548
|
+
}>;
|
|
549
|
+
type $Params = l.InferOutput<typeof $params>;
|
|
550
|
+
declare const $input: l.Payload<undefined, undefined>;
|
|
551
|
+
type $Input<B = l.BinaryData> = l.InferPayload<typeof $input, B>;
|
|
552
|
+
type $InputBody<B = l.BinaryData> = l.InferPayloadBody<typeof $input, B>;
|
|
553
|
+
declare const $output: l.Payload<"application/json", l.ObjectSchema<{
|
|
554
|
+
article: l.RefSchema<l.Validator<Main, Main>>;
|
|
555
|
+
contents: l.RefSchema<l.Validator<Main$1, Main$1>>;
|
|
556
|
+
}>>;
|
|
557
|
+
type $Output<B = l.BinaryData> = l.InferPayload<typeof $output, B>;
|
|
558
|
+
type $OutputBody<B = l.BinaryData> = l.InferPayloadBody<typeof $output, B>;
|
|
559
|
+
/** publishes an article revision. if one of the revision's article refs exists in the repo, it is considered an update */
|
|
560
|
+
declare const main$2: l.Procedure<"com.ihavethatonvinyl.article.publishArticleRevision", l.ParamsSchema<{
|
|
561
|
+
readonly revision: l.StringSchema<{
|
|
562
|
+
readonly format: "at-uri";
|
|
563
|
+
}>;
|
|
564
|
+
}>, l.Payload<undefined, undefined>, l.Payload<"application/json", l.ObjectSchema<{
|
|
565
|
+
article: l.RefSchema<l.Validator<Main, Main>>;
|
|
566
|
+
contents: l.RefSchema<l.Validator<Main$1, Main$1>>;
|
|
567
|
+
}>>, undefined>;
|
|
568
|
+
declare const $lxm = "com.ihavethatonvinyl.article.publishArticleRevision";
|
|
569
|
+
type $lxm = typeof $lxm;
|
|
570
|
+
declare namespace publishArticleRevision_d_exports {
|
|
571
|
+
export { $Input, $InputBody, $Output, $OutputBody, $Params, $input, $lxm, $nsid$2 as $nsid, $output, $params, main$2 as default, main$2 as main };
|
|
572
|
+
}
|
|
573
|
+
declare namespace revision_d_exports {
|
|
574
|
+
export { $assert$1 as $assert, $build$1 as $build, $cast$1 as $cast, $check$1 as $check, $ifMatches$1 as $ifMatches, $isTypeOf$1 as $isTypeOf, $matches$1 as $matches, $nsid$8 as $nsid, $parse$1 as $parse, $safeParse$1 as $safeParse, $safeValidate$1 as $safeValidate, $type$1 as $type, $validate$1 as $validate, Main$1 as Main, main$8 as default, main$8 as main };
|
|
575
|
+
}
|
|
576
|
+
declare namespace article_d_exports {
|
|
577
|
+
export { $assert, $build, $cast, $check, $ifMatches, $isTypeOf, $matches, $nsid$5 as $nsid, $parse, $safeParse, $safeValidate, $type, $validate, Main, createArticleRevision_d_exports as createArticleRevision, main$5 as default, defs_d_exports as defs, getArticle_d_exports as getArticle, listArticles_d_exports as listArticles, main$5 as main, publishArticleRevision_d_exports as publishArticleRevision, revision_d_exports as revision, unpublishArticle_d_exports as unpublishArticle };
|
|
578
|
+
}
|
|
579
|
+
declare const $nsid$1 = "com.ihavethatonvinyl.auth.editor";
|
|
580
|
+
type $nsid$1 = typeof $nsid$1;
|
|
581
|
+
declare const main$1: l.PermissionSet<"com.ihavethatonvinyl.auth.editor", readonly [l.Permission<"repo", l.Params>, l.Permission<"blob", l.Params>]>;
|
|
582
|
+
declare namespace editor_d_exports {
|
|
583
|
+
export { $nsid$1 as $nsid, main$1 as default, main$1 as main };
|
|
584
|
+
}
|
|
585
|
+
declare const $nsid = "com.ihavethatonvinyl.auth.publisher";
|
|
586
|
+
type $nsid = typeof $nsid;
|
|
587
|
+
declare const main: l.PermissionSet<"com.ihavethatonvinyl.auth.publisher", readonly [l.Permission<"repo", l.Params>]>;
|
|
588
|
+
declare namespace publisher_d_exports {
|
|
589
|
+
export { $nsid, main as default, main };
|
|
590
|
+
}
|
|
591
|
+
declare namespace auth_d_exports {
|
|
592
|
+
export { editor_d_exports as editor, publisher_d_exports as publisher };
|
|
593
|
+
}
|
|
594
|
+
declare namespace ihavethatonvinyl_d_exports {
|
|
595
|
+
export { article_d_exports as article, auth_d_exports as auth };
|
|
596
|
+
}
|
|
597
|
+
declare namespace com_d_exports {
|
|
598
|
+
export { atproto_d_exports as atproto, ihavethatonvinyl_d_exports as ihavethatonvinyl };
|
|
599
|
+
}
|
|
600
|
+
export { com_d_exports as com };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{t as e}from"./rolldown-runtime-P3Pd_6ND.js";import{l as t}from"@atproto/lex";const n=`com.atproto.repo.strongRef`,r=/*#__PURE__*/ t.typedObject(n,`main`,/*#__PURE__*/ t.object({cid:/*#__PURE__*/ t.string({format:`cid`}),uri:/*#__PURE__*/ t.string({format:`at-uri`})})),ee=/*#__PURE__*/ r.isTypeOf.bind(r),te=/*#__PURE__*/ r.build.bind(r),ne=/*#__PURE__*/ r.assert.bind(r),re=/*#__PURE__*/ r.check.bind(r),ie=/*#__PURE__*/ r.cast.bind(r),ae=/*#__PURE__*/ r.ifMatches.bind(r),oe=/*#__PURE__*/ r.matches.bind(r),se=/*#__PURE__*/ r.parse.bind(r),ce=/*#__PURE__*/ r.safeParse.bind(r),le=/*#__PURE__*/ r.validate.bind(r),ue=/*#__PURE__*/ r.safeValidate.bind(r);var de=/* @__PURE__ */ e({$assert:()=>ne,$build:()=>te,$cast:()=>ie,$check:()=>re,$ifMatches:()=>ae,$isTypeOf:()=>ee,$matches:()=>oe,$nsid:()=>n,$parse:()=>se,$safeParse:()=>ce,$safeValidate:()=>ue,$type:()=>`com.atproto.repo.strongRef`,$validate:()=>le,default:()=>r,main:()=>r}),fe=/* @__PURE__ */ e({strongRef:()=>de}),pe=/* @__PURE__ */ e({repo:()=>fe});const i=`com.ihavethatonvinyl.article.defs`,a=/*#__PURE__*/ t.typedObject(i,`paragraphBlockData`,/*#__PURE__*/ t.object({text:/*#__PURE__*/ t.string()})),o=/*#__PURE__*/ t.typedObject(i,`headerBlockData`,/*#__PURE__*/ t.object({text:/*#__PURE__*/ t.string(),level:/*#__PURE__*/ t.integer({minimum:1,maximum:6})})),s=/*#__PURE__*/ t.typedObject(i,`dividerBlockData`,/*#__PURE__*/ t.object({})),me=/*#__PURE__*/ t.typedObject(i,`quoteBlockData`,/*#__PURE__*/ t.object({text:/*#__PURE__*/ t.string(),caption:/*#__PURE__*/ t.optional(/*#__PURE__*/ t.string()),alignment:/*#__PURE__*/ t.optional(/*#__PURE__*/ t.withDefault(/*#__PURE__*/ t.enum([`left`,`center`]),`left`))})),c=/*#__PURE__*/ t.typedObject(i,`checkedListItemMeta`,/*#__PURE__*/ t.object({checked:/*#__PURE__*/ t.optional(/*#__PURE__*/ t.boolean())})),l=/*#__PURE__*/ t.typedObject(i,`orderedListItemMeta`,/*#__PURE__*/ t.object({start:/*#__PURE__*/ t.optional(/*#__PURE__*/ t.integer({minimum:1})),counterType:/*#__PURE__*/ t.optional(/*#__PURE__*/ t.string())})),u=/*#__PURE__*/ t.typedObject(i,`listItem`,/*#__PURE__*/ t.object({content:/*#__PURE__*/ t.string(),meta:/*#__PURE__*/ t.optional(/*#__PURE__*/ t.nullable(/*#__PURE__*/ t.typedUnion([/*#__PURE__*/ t.typedRef((()=>c)),/*#__PURE__*/ t.typedRef((()=>l))],!1))),items:/*#__PURE__*/ t.optional(/*#__PURE__*/ t.array(/*#__PURE__*/ t.ref((()=>u))))})),d=/*#__PURE__*/ t.typedObject(i,`listBlockData`,/*#__PURE__*/ t.object({style:/*#__PURE__*/ t.string(),meta:/*#__PURE__*/ t.optional(/*#__PURE__*/ t.nullable(/*#__PURE__*/ t.typedUnion([/*#__PURE__*/ t.typedRef((()=>c)),/*#__PURE__*/ t.typedRef((()=>l))],!1))),items:/*#__PURE__*/ t.optional(/*#__PURE__*/ t.array(/*#__PURE__*/ t.ref((()=>u))))})),f=/*#__PURE__*/ t.typedObject(i,`url`,/*#__PURE__*/ t.object({url:/*#__PURE__*/ t.string({format:`uri`})})),p=/*#__PURE__*/ t.typedObject(i,`localImage`,/*#__PURE__*/ t.object({mimeType:/*#__PURE__*/ t.string(),b64Data:/*#__PURE__*/ t.string({maxLength:1468006})})),m=/*#__PURE__*/ t.typedObject(i,`imageBlockData`,/*#__PURE__*/ t.object({file:/*#__PURE__*/ t.optional(/*#__PURE__*/ t.ref((()=>f))),imageBlob:/*#__PURE__*/ t.optional(/*#__PURE__*/ t.blob({accept:[`image/*`],maxSize:1048576})),image:/*#__PURE__*/ t.optional(/*#__PURE__*/ t.ref((()=>p))),caption:/*#__PURE__*/ t.optional(/*#__PURE__*/ t.string()),withBorder:/*#__PURE__*/ t.optional(/*#__PURE__*/ t.boolean()),withBackground:/*#__PURE__*/ t.optional(/*#__PURE__*/ t.boolean()),stretched:/*#__PURE__*/ t.optional(/*#__PURE__*/ t.boolean())})),h=/*#__PURE__*/ t.typedObject(i,`linkMeta`,/*#__PURE__*/ t.object({title:/*#__PURE__*/ t.optional(/*#__PURE__*/ t.string()),description:/*#__PURE__*/ t.optional(/*#__PURE__*/ t.string()),image:/*#__PURE__*/ t.optional(/*#__PURE__*/ t.ref((()=>f)))})),g=/*#__PURE__*/ t.typedObject(i,`linkBlockData`,/*#__PURE__*/ t.object({url:/*#__PURE__*/ t.string({format:`uri`}),meta:/*#__PURE__*/ t.optional(/*#__PURE__*/ t.ref((()=>h)))})),_=/*#__PURE__*/ t.typedObject(i,`tableRow`,/*#__PURE__*/ t.object({columns:/*#__PURE__*/ t.array(/*#__PURE__*/ t.string(),{minLength:1})})),v=/*#__PURE__*/ t.typedObject(i,`tableBlockData`,/*#__PURE__*/ t.object({withHeadings:/*#__PURE__*/ t.optional(/*#__PURE__*/ t.boolean()),stretched:/*#__PURE__*/ t.optional(/*#__PURE__*/ t.boolean()),rows:/*#__PURE__*/ t.array(/*#__PURE__*/ t.ref((()=>_)),{minLength:1})})),y=/*#__PURE__*/ t.typedObject(i,`paragraph`,/*#__PURE__*/ t.object({type:/*#__PURE__*/ t.optional(/*#__PURE__*/ t.literal(`paragraph`)),data:/*#__PURE__*/ t.optional(/*#__PURE__*/ t.ref((()=>a)))})),b=/*#__PURE__*/ t.typedObject(i,`header`,/*#__PURE__*/ t.object({type:/*#__PURE__*/ t.optional(/*#__PURE__*/ t.literal(`header`)),data:/*#__PURE__*/ t.optional(/*#__PURE__*/ t.ref((()=>o)))})),x=/*#__PURE__*/ t.typedObject(i,`divider`,/*#__PURE__*/ t.object({type:/*#__PURE__*/ t.optional(/*#__PURE__*/ t.literal(`divider`)),data:/*#__PURE__*/ t.optional(/*#__PURE__*/ t.ref((()=>s)))})),S=/*#__PURE__*/ t.typedObject(i,`quote`,/*#__PURE__*/ t.object({type:/*#__PURE__*/ t.optional(/*#__PURE__*/ t.literal(`quote`)),data:/*#__PURE__*/ t.optional(/*#__PURE__*/ t.ref((()=>me)))})),C=/*#__PURE__*/ t.typedObject(i,`list`,/*#__PURE__*/ t.object({type:/*#__PURE__*/ t.optional(/*#__PURE__*/ t.literal(`list`)),data:/*#__PURE__*/ t.optional(/*#__PURE__*/ t.ref((()=>d)))})),w=/*#__PURE__*/ t.typedObject(i,`image`,/*#__PURE__*/ t.object({type:/*#__PURE__*/ t.optional(/*#__PURE__*/ t.literal(`image`)),data:/*#__PURE__*/ t.optional(/*#__PURE__*/ t.ref((()=>m)))})),T=/*#__PURE__*/ t.typedObject(i,`link`,/*#__PURE__*/ t.object({type:/*#__PURE__*/ t.optional(/*#__PURE__*/ t.literal(`linkTool`)),data:/*#__PURE__*/ t.optional(/*#__PURE__*/ t.ref((()=>g)))})),E=/*#__PURE__*/ t.typedObject(i,`table`,/*#__PURE__*/ t.object({type:/*#__PURE__*/ t.optional(/*#__PURE__*/ t.literal(`table`)),data:/*#__PURE__*/ t.optional(/*#__PURE__*/ t.ref((()=>v)))})),D=/*#__PURE__*/ t.typedObject(i,`contents`,/*#__PURE__*/ t.object({title:/*#__PURE__*/ t.string({minGraphemes:1,maxGraphemes:256}),blurb:/*#__PURE__*/ t.string({maxGraphemes:2048}),heroImage:/*#__PURE__*/ t.optional(/*#__PURE__*/ t.blob({accept:[`image/*`],maxSize:1048576})),authors:/*#__PURE__*/ t.array(/*#__PURE__*/ t.string(),{minLength:1,maxLength:5}),categories:/*#__PURE__*/ t.array(/*#__PURE__*/ t.string(),{minLength:1}),body:/*#__PURE__*/ t.optional(/*#__PURE__*/ t.array(/*#__PURE__*/ t.typedUnion([/*#__PURE__*/ t.typedRef((()=>y)),/*#__PURE__*/ t.typedRef((()=>b)),/*#__PURE__*/ t.typedRef((()=>x)),/*#__PURE__*/ t.typedRef((()=>S)),/*#__PURE__*/ t.typedRef((()=>C)),/*#__PURE__*/ t.typedRef((()=>w)),/*#__PURE__*/ t.typedRef((()=>T)),/*#__PURE__*/ t.typedRef((()=>E))],!1)))})),O=`com.ihavethatonvinyl.article.revision`,k=/*#__PURE__*/ t.record(`tid`,O,/*#__PURE__*/ t.object({published:/*#__PURE__*/ t.string({format:`datetime`}),publishedBy:/*#__PURE__*/ t.string({format:`did`}),articles:/*#__PURE__*/ t.optional(/*#__PURE__*/ t.array(/*#__PURE__*/ t.ref((()=>r)),{minLength:1})),contents:/*#__PURE__*/ t.ref((()=>D)),notes:/*#__PURE__*/ t.optional(/*#__PURE__*/ t.string({maxGraphemes:1024}))})),he=/*#__PURE__*/ k.isTypeOf.bind(k),ge=/*#__PURE__*/ k.build.bind(k),_e=/*#__PURE__*/ k.assert.bind(k),ve=/*#__PURE__*/ k.check.bind(k),ye=/*#__PURE__*/ k.cast.bind(k),be=/*#__PURE__*/ k.ifMatches.bind(k),xe=/*#__PURE__*/ k.matches.bind(k),Se=/*#__PURE__*/ k.parse.bind(k),Ce=/*#__PURE__*/ k.safeParse.bind(k),we=/*#__PURE__*/ k.validate.bind(k),Te=/*#__PURE__*/ k.safeValidate.bind(k),A=`com.ihavethatonvinyl.article.createArticleRevision`,j=/*#__PURE__*/ t.params(),M=/*#__PURE__*/ t.jsonPayload({contents:/*#__PURE__*/ t.optional(/*#__PURE__*/ t.ref((()=>D)))}),N=/*#__PURE__*/ t.jsonPayload({revision:/*#__PURE__*/ t.optional(/*#__PURE__*/ t.ref((()=>k)))}),P=/*#__PURE__*/ t.procedure(A,j,M,N);var Ee=/* @__PURE__ */ e({$input:()=>M,$lxm:()=>`com.ihavethatonvinyl.article.createArticleRevision`,$nsid:()=>A,$output:()=>N,$params:()=>j,default:()=>P,main:()=>P});const F=`com.ihavethatonvinyl.article.unpublishArticle`,De=/*#__PURE__*/ t.params({article:/*#__PURE__*/ t.optional(/*#__PURE__*/ t.string({format:`at-uri`}))}),I=/*#__PURE__*/ t.payload(),L=/*#__PURE__*/ t.payload(),R=/*#__PURE__*/ t.procedure(F,De,I,L);var Oe=/* @__PURE__ */ e({$input:()=>I,$lxm:()=>`com.ihavethatonvinyl.article.unpublishArticle`,$nsid:()=>F,$output:()=>L,$params:()=>De,default:()=>R,main:()=>R});const z=`com.ihavethatonvinyl.article`,B=/*#__PURE__*/ t.record(`literal:self`,z,/*#__PURE__*/ t.object({published:/*#__PURE__*/ t.string({format:`datetime`}),publishedBy:/*#__PURE__*/ t.string({format:`did`})})),ke=/*#__PURE__*/ B.isTypeOf.bind(B),Ae=/*#__PURE__*/ B.build.bind(B),je=/*#__PURE__*/ B.assert.bind(B),Me=/*#__PURE__*/ B.check.bind(B),Ne=/*#__PURE__*/ B.cast.bind(B),Pe=/*#__PURE__*/ B.ifMatches.bind(B),Fe=/*#__PURE__*/ B.matches.bind(B),Ie=/*#__PURE__*/ B.parse.bind(B),Le=/*#__PURE__*/ B.safeParse.bind(B),Re=/*#__PURE__*/ B.validate.bind(B),ze=/*#__PURE__*/ B.safeValidate.bind(B);var Be=/* @__PURE__ */ e({$nsid:()=>i,checkedListItemMeta:()=>c,contents:()=>D,divider:()=>x,dividerBlockData:()=>s,header:()=>b,headerBlockData:()=>o,image:()=>w,imageBlockData:()=>m,link:()=>T,linkBlockData:()=>g,linkMeta:()=>h,list:()=>C,listBlockData:()=>d,listItem:()=>u,localImage:()=>p,orderedListItemMeta:()=>l,paragraph:()=>y,paragraphBlockData:()=>a,quote:()=>S,quoteBlockData:()=>me,table:()=>E,tableBlockData:()=>v,tableRow:()=>_,url:()=>f});const V=`com.ihavethatonvinyl.article.getArticle`,H=/*#__PURE__*/ t.params({article:/*#__PURE__*/ t.optional(/*#__PURE__*/ t.string({format:`at-uri`})),allVersions:/*#__PURE__*/ t.optional(/*#__PURE__*/ t.withDefault(/*#__PURE__*/ t.boolean(),!1))}),U=/*#__PURE__*/ t.jsonPayload({article:/*#__PURE__*/ t.ref((()=>B)),contents:/*#__PURE__*/ t.ref((()=>k)),history:/*#__PURE__*/ t.optional(/*#__PURE__*/ t.array(/*#__PURE__*/ t.ref((()=>k))))}),W=/*#__PURE__*/ t.query(V,H,U);var Ve=/* @__PURE__ */ e({$lxm:()=>`com.ihavethatonvinyl.article.getArticle`,$nsid:()=>V,$output:()=>U,$params:()=>H,default:()=>W,main:()=>W});const G=`com.ihavethatonvinyl.article.listArticles`,K=/*#__PURE__*/ t.params({limit:/*#__PURE__*/ t.optional(/*#__PURE__*/ t.withDefault(/*#__PURE__*/ t.integer({minimum:1,maximum:100}),25)),cursor:/*#__PURE__*/ t.optional(/*#__PURE__*/ t.string()),sort:/*#__PURE__*/ t.optional(/*#__PURE__*/ t.withDefault(/*#__PURE__*/ t.enum([`asc`,`desc`]),`desc`)),sortBy:/*#__PURE__*/ t.optional(/*#__PURE__*/ t.withDefault(/*#__PURE__*/ t.string(),`published`))}),q=/*#__PURE__*/ t.jsonPayload({items:/*#__PURE__*/ t.array(/*#__PURE__*/ t.ref((()=>k))),cursor:/*#__PURE__*/ t.string(),total:/*#__PURE__*/ t.integer({minimum:0})}),J=/*#__PURE__*/ t.query(G,K,q);var He=/* @__PURE__ */ e({$lxm:()=>`com.ihavethatonvinyl.article.listArticles`,$nsid:()=>G,$output:()=>q,$params:()=>K,default:()=>J,main:()=>J});const Y=`com.ihavethatonvinyl.article.publishArticleRevision`,X=/*#__PURE__*/ t.params({revision:/*#__PURE__*/ t.string({format:`at-uri`})}),Z=/*#__PURE__*/ t.payload(),Q=/*#__PURE__*/ t.jsonPayload({article:/*#__PURE__*/ t.ref((()=>B)),contents:/*#__PURE__*/ t.ref((()=>k))}),$=/*#__PURE__*/ t.procedure(Y,X,Z,Q);var Ue=/* @__PURE__ */ e({$input:()=>Z,$lxm:()=>`com.ihavethatonvinyl.article.publishArticleRevision`,$nsid:()=>Y,$output:()=>Q,$params:()=>X,default:()=>$,main:()=>$}),We=/* @__PURE__ */ e({$assert:()=>_e,$build:()=>ge,$cast:()=>ye,$check:()=>ve,$ifMatches:()=>be,$isTypeOf:()=>he,$matches:()=>xe,$nsid:()=>O,$parse:()=>Se,$safeParse:()=>Ce,$safeValidate:()=>Te,$type:()=>`com.ihavethatonvinyl.article.revision`,$validate:()=>we,default:()=>k,main:()=>k}),Ge=/* @__PURE__ */ e({$assert:()=>je,$build:()=>Ae,$cast:()=>Ne,$check:()=>Me,$ifMatches:()=>Pe,$isTypeOf:()=>ke,$matches:()=>Fe,$nsid:()=>z,$parse:()=>Ie,$safeParse:()=>Le,$safeValidate:()=>ze,$type:()=>`com.ihavethatonvinyl.article`,$validate:()=>Re,createArticleRevision:()=>Ee,default:()=>B,defs:()=>Be,getArticle:()=>Ve,listArticles:()=>He,main:()=>B,publishArticleRevision:()=>Ue,revision:()=>We,unpublishArticle:()=>Oe});const Ke=`com.ihavethatonvinyl.auth.editor`,qe=/*#__PURE__*/ t.permissionSet(Ke,[/*#__PURE__*/ t.permission(`repo`,{action:[`create`],collection:[`com.ihavethatonvinyl.article.revision`]}),/*#__PURE__*/ t.permission(`blob`,{accept:[`image/*`]})],{title:`ihavethatonvinyl.com`,detail:`Manage article contents`});var Je=/* @__PURE__ */ e({$nsid:()=>Ke,default:()=>qe,main:()=>qe});const Ye=`com.ihavethatonvinyl.auth.publisher`,Xe=/*#__PURE__*/ t.permissionSet(Ye,[/*#__PURE__*/ t.permission(`repo`,{action:[`create`,`delete`],collection:[`com.ihavethatonvinyl.article`]})],{title:`ihavethatonvinyl.com`,detail:`Manage articles`});var Ze=/* @__PURE__ */ e({$nsid:()=>Ye,default:()=>Xe,main:()=>Xe}),Qe=/* @__PURE__ */ e({editor:()=>Je,publisher:()=>Ze}),$e=/* @__PURE__ */ e({article:()=>Ge,auth:()=>Qe}),et=/* @__PURE__ */ e({atproto:()=>pe,ihavethatonvinyl:()=>$e});export{et as com};
|
|
2
|
+
//# sourceMappingURL=index.js.map
|