@atproto/lex-document 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +48 -0
- package/dist/lexicon-document.d.ts +3453 -21513
- package/dist/lexicon-document.d.ts.map +1 -1
- package/dist/lexicon-document.js +103 -135
- package/dist/lexicon-document.js.map +1 -1
- package/dist/lexicon-schema-builder.d.ts +11 -51
- package/dist/lexicon-schema-builder.d.ts.map +1 -1
- package/dist/lexicon-schema-builder.js +68 -15
- package/dist/lexicon-schema-builder.js.map +1 -1
- package/package.json +9 -4
- package/src/lexicon-document.test.ts +92 -2
- package/src/lexicon-document.ts +198 -276
- package/src/lexicon-schema-builder.test.ts +97 -7
- package/src/lexicon-schema-builder.ts +73 -19
- package/tsconfig.build.json +12 -0
- package/tsconfig.json +7 -0
- package/tsconfig.tests.json +9 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lexicon-document.d.ts","sourceRoot":"","sources":["../src/lexicon-document.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,qBAAqB,CAAA;AAMvC,eAAO,MAAM,oBAAoB;;;;;;;;;;;;EAUhC,CAAA;AACD,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAA;AAEjE,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;EAahC,CAAA;AACD,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAA;AAEjE,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,YAAY,CAAA;AAChD,eAAO,MAAM,yBAAyB,uIAErC,CAAA;AAED,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;EAiB/B,CAAA;AACD,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAA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GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAA"}
|
package/dist/lexicon-document.js
CHANGED
|
@@ -1,65 +1,60 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.lexiconDocumentSchema = exports.lexiconIdentifierSchema = exports.lexiconSubscriptionSchema = exports.lexiconProcedureSchema = exports.lexiconQuerySchema = exports.lexiconError = exports.lexiconSubscriptionMessage = exports.lexiconPayload = exports.lexiconParameters = exports.lexiconRecordSchema = exports.lexiconObjectSchema = exports.lexiconArraySchema = exports.lexiconRefUnionSchema = exports.lexiconRefSchema = exports.lexiconTokenSchema = exports.lexiconUnknownSchema = exports.lexiconBlobSchema = exports.lexiconCidLinkSchema = exports.lexiconBytesSchema = exports.lexiconStringSchema = exports.
|
|
3
|
+
exports.lexiconDocumentSchema = exports.lexiconIdentifierSchema = exports.lexiconSubscriptionSchema = exports.lexiconProcedureSchema = exports.lexiconQuerySchema = exports.lexiconError = exports.lexiconSubscriptionMessage = exports.lexiconPayload = exports.lexiconParameters = exports.lexiconRecordSchema = exports.lexiconRecordKeySchema = exports.lexiconObjectSchema = exports.lexiconArraySchema = exports.lexiconRefUnionSchema = exports.lexiconRefSchema = exports.lexiconTokenSchema = exports.lexiconUnknownSchema = exports.lexiconBlobSchema = exports.lexiconCidLinkSchema = exports.lexiconBytesSchema = exports.lexiconStringSchema = exports.lexiconIntegerSchema = exports.lexiconBooleanSchema = void 0;
|
|
4
4
|
const lex_schema_1 = require("@atproto/lex-schema");
|
|
5
|
+
// Re-usable shortcuts (avoid creating too many schemas)
|
|
6
|
+
const bool = lex_schema_1.l.boolean();
|
|
7
|
+
const int = lex_schema_1.l.integer();
|
|
8
|
+
const str = lex_schema_1.l.string();
|
|
9
|
+
const boopOpt = lex_schema_1.l.optional(bool);
|
|
10
|
+
const intOpt = lex_schema_1.l.optional(int);
|
|
11
|
+
const strOpt = lex_schema_1.l.optional(str);
|
|
12
|
+
const strArrOpt = lex_schema_1.l.optional(lex_schema_1.l.array(str));
|
|
5
13
|
// https://atproto.com/specs/lexicon
|
|
6
14
|
// "Concrete" Types
|
|
7
15
|
exports.lexiconBooleanSchema = lex_schema_1.l.object({
|
|
8
16
|
type: lex_schema_1.l.literal('boolean'),
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}, {
|
|
13
|
-
required: ['type'],
|
|
17
|
+
default: boopOpt,
|
|
18
|
+
const: boopOpt,
|
|
19
|
+
description: strOpt,
|
|
14
20
|
});
|
|
15
21
|
exports.lexiconIntegerSchema = lex_schema_1.l.object({
|
|
16
22
|
type: lex_schema_1.l.literal('integer'),
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}, {
|
|
24
|
-
required: ['type'],
|
|
23
|
+
default: intOpt,
|
|
24
|
+
minimum: intOpt,
|
|
25
|
+
maximum: intOpt,
|
|
26
|
+
enum: lex_schema_1.l.optional(lex_schema_1.l.array(lex_schema_1.l.integer())),
|
|
27
|
+
const: intOpt,
|
|
28
|
+
description: strOpt,
|
|
25
29
|
});
|
|
26
|
-
exports.lexiconStringFormatSchema = lex_schema_1.l.enum(lex_schema_1.l.STRING_FORMATS);
|
|
27
30
|
exports.lexiconStringSchema = lex_schema_1.l.object({
|
|
28
31
|
type: lex_schema_1.l.literal('string'),
|
|
29
|
-
format:
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
}, {
|
|
40
|
-
required: ['type'],
|
|
32
|
+
format: lex_schema_1.l.optional(lex_schema_1.l.enum(lex_schema_1.l.STRING_FORMATS)),
|
|
33
|
+
default: strOpt,
|
|
34
|
+
minLength: intOpt,
|
|
35
|
+
maxLength: intOpt,
|
|
36
|
+
minGraphemes: intOpt,
|
|
37
|
+
maxGraphemes: intOpt,
|
|
38
|
+
enum: strArrOpt,
|
|
39
|
+
const: strOpt,
|
|
40
|
+
knownValues: strArrOpt,
|
|
41
|
+
description: strOpt,
|
|
41
42
|
});
|
|
42
43
|
exports.lexiconBytesSchema = lex_schema_1.l.object({
|
|
43
44
|
type: lex_schema_1.l.literal('bytes'),
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
}, {
|
|
48
|
-
required: ['type'],
|
|
45
|
+
maxLength: intOpt,
|
|
46
|
+
minLength: intOpt,
|
|
47
|
+
description: strOpt,
|
|
49
48
|
});
|
|
50
49
|
exports.lexiconCidLinkSchema = lex_schema_1.l.object({
|
|
51
50
|
type: lex_schema_1.l.literal('cid-link'),
|
|
52
|
-
description:
|
|
53
|
-
}, {
|
|
54
|
-
required: ['type'],
|
|
51
|
+
description: strOpt,
|
|
55
52
|
});
|
|
56
53
|
exports.lexiconBlobSchema = lex_schema_1.l.object({
|
|
57
54
|
type: lex_schema_1.l.literal('blob'),
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
}, {
|
|
62
|
-
required: ['type'],
|
|
55
|
+
accept: strArrOpt,
|
|
56
|
+
maxSize: intOpt,
|
|
57
|
+
description: strOpt,
|
|
63
58
|
});
|
|
64
59
|
const CONCRETE_TYPES = [
|
|
65
60
|
exports.lexiconBooleanSchema,
|
|
@@ -74,30 +69,22 @@ const CONCRETE_TYPES = [
|
|
|
74
69
|
// Meta types
|
|
75
70
|
exports.lexiconUnknownSchema = lex_schema_1.l.object({
|
|
76
71
|
type: lex_schema_1.l.literal('unknown'),
|
|
77
|
-
description:
|
|
78
|
-
}, {
|
|
79
|
-
required: ['type'],
|
|
72
|
+
description: strOpt,
|
|
80
73
|
});
|
|
81
74
|
exports.lexiconTokenSchema = lex_schema_1.l.object({
|
|
82
75
|
type: lex_schema_1.l.literal('token'),
|
|
83
|
-
description:
|
|
84
|
-
}, {
|
|
85
|
-
required: ['type'],
|
|
76
|
+
description: strOpt,
|
|
86
77
|
});
|
|
87
78
|
exports.lexiconRefSchema = lex_schema_1.l.object({
|
|
88
79
|
type: lex_schema_1.l.literal('ref'),
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
}, {
|
|
92
|
-
required: ['type', 'ref'],
|
|
80
|
+
ref: str,
|
|
81
|
+
description: strOpt,
|
|
93
82
|
});
|
|
94
83
|
exports.lexiconRefUnionSchema = lex_schema_1.l.object({
|
|
95
84
|
type: lex_schema_1.l.literal('union'),
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
}, {
|
|
100
|
-
required: ['type', 'refs'],
|
|
85
|
+
refs: lex_schema_1.l.array(str),
|
|
86
|
+
closed: boopOpt,
|
|
87
|
+
description: strOpt,
|
|
101
88
|
});
|
|
102
89
|
// Complex Types
|
|
103
90
|
const ARRAY_ITEMS_SCHEMAS = [
|
|
@@ -109,131 +96,114 @@ const ARRAY_ITEMS_SCHEMAS = [
|
|
|
109
96
|
];
|
|
110
97
|
exports.lexiconArraySchema = lex_schema_1.l.object({
|
|
111
98
|
type: lex_schema_1.l.literal('array'),
|
|
112
|
-
description: lex_schema_1.l.string(),
|
|
113
99
|
items: lex_schema_1.l.discriminatedUnion('type', ARRAY_ITEMS_SCHEMAS),
|
|
114
|
-
minLength:
|
|
115
|
-
maxLength:
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
100
|
+
minLength: intOpt,
|
|
101
|
+
maxLength: intOpt,
|
|
102
|
+
description: strOpt,
|
|
103
|
+
});
|
|
104
|
+
const requirePropertiesRefinement = {
|
|
105
|
+
check: (v) => !v.required || v.required.every((k) => k in v.properties),
|
|
106
|
+
message: 'All required parameters must be defined in properties',
|
|
107
|
+
path: 'required',
|
|
108
|
+
};
|
|
109
|
+
exports.lexiconObjectSchema = lex_schema_1.l.refine(lex_schema_1.l.object({
|
|
120
110
|
type: lex_schema_1.l.literal('object'),
|
|
121
|
-
|
|
122
|
-
required: lex_schema_1.l.array(lex_schema_1.l.string()),
|
|
123
|
-
nullable: lex_schema_1.l.array(lex_schema_1.l.string()),
|
|
124
|
-
properties: lex_schema_1.l.dict(lex_schema_1.l.string(), lex_schema_1.l.discriminatedUnion('type', [
|
|
111
|
+
properties: lex_schema_1.l.dict(str, lex_schema_1.l.discriminatedUnion('type', [
|
|
125
112
|
...ARRAY_ITEMS_SCHEMAS,
|
|
126
113
|
exports.lexiconArraySchema,
|
|
127
114
|
])),
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
115
|
+
required: strArrOpt,
|
|
116
|
+
nullable: strArrOpt,
|
|
117
|
+
description: strOpt,
|
|
118
|
+
}), requirePropertiesRefinement);
|
|
131
119
|
// Records
|
|
120
|
+
exports.lexiconRecordKeySchema = lex_schema_1.l.custom(lex_schema_1.l.isLexiconRecordKey, 'Invalid record key definition (must be "any", "nsid", "tid", or "literal:<string>")');
|
|
132
121
|
exports.lexiconRecordSchema = lex_schema_1.l.object({
|
|
133
122
|
type: lex_schema_1.l.literal('record'),
|
|
134
|
-
description: lex_schema_1.l.string(),
|
|
135
|
-
key: lex_schema_1.l.string(),
|
|
136
123
|
record: exports.lexiconObjectSchema,
|
|
137
|
-
|
|
124
|
+
description: strOpt,
|
|
125
|
+
key: exports.lexiconRecordKeySchema,
|
|
126
|
+
});
|
|
138
127
|
// XRPC Methods
|
|
139
|
-
exports.lexiconParameters = lex_schema_1.l.object({
|
|
128
|
+
exports.lexiconParameters = lex_schema_1.l.refine(lex_schema_1.l.object({
|
|
140
129
|
type: lex_schema_1.l.literal('params'),
|
|
141
|
-
|
|
142
|
-
required: lex_schema_1.l.array(lex_schema_1.l.string()),
|
|
143
|
-
properties: lex_schema_1.l.dict(lex_schema_1.l.string(), lex_schema_1.l.discriminatedUnion('type', [
|
|
130
|
+
properties: lex_schema_1.l.dict(str, lex_schema_1.l.discriminatedUnion('type', [
|
|
144
131
|
exports.lexiconBooleanSchema,
|
|
145
132
|
exports.lexiconIntegerSchema,
|
|
146
133
|
exports.lexiconStringSchema,
|
|
147
134
|
lex_schema_1.l.object({
|
|
148
135
|
type: lex_schema_1.l.literal('array'),
|
|
149
|
-
description: lex_schema_1.l.string(),
|
|
150
136
|
items: lex_schema_1.l.discriminatedUnion('type', [
|
|
151
137
|
exports.lexiconBooleanSchema,
|
|
152
138
|
exports.lexiconIntegerSchema,
|
|
153
139
|
exports.lexiconStringSchema,
|
|
154
140
|
]),
|
|
155
|
-
minLength:
|
|
156
|
-
maxLength:
|
|
157
|
-
|
|
158
|
-
required: ['type', 'items'],
|
|
141
|
+
minLength: intOpt,
|
|
142
|
+
maxLength: intOpt,
|
|
143
|
+
description: strOpt,
|
|
159
144
|
}),
|
|
160
145
|
])),
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
});
|
|
146
|
+
required: strArrOpt,
|
|
147
|
+
description: strOpt,
|
|
148
|
+
}), requirePropertiesRefinement);
|
|
164
149
|
exports.lexiconPayload = lex_schema_1.l.object({
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
schema: lex_schema_1.l.discriminatedUnion('type', [
|
|
150
|
+
encoding: str,
|
|
151
|
+
schema: lex_schema_1.l.optional(lex_schema_1.l.discriminatedUnion('type', [
|
|
168
152
|
exports.lexiconRefSchema,
|
|
169
153
|
exports.lexiconRefUnionSchema,
|
|
170
154
|
exports.lexiconObjectSchema,
|
|
171
|
-
]),
|
|
172
|
-
|
|
173
|
-
required: ['encoding'],
|
|
155
|
+
])),
|
|
156
|
+
description: strOpt,
|
|
174
157
|
});
|
|
175
158
|
exports.lexiconSubscriptionMessage = lex_schema_1.l.object({
|
|
176
|
-
description:
|
|
177
|
-
schema: lex_schema_1.l.discriminatedUnion('type', [
|
|
159
|
+
description: strOpt,
|
|
160
|
+
schema: lex_schema_1.l.optional(lex_schema_1.l.discriminatedUnion('type', [
|
|
178
161
|
exports.lexiconRefSchema,
|
|
179
162
|
exports.lexiconRefUnionSchema,
|
|
180
163
|
exports.lexiconObjectSchema,
|
|
181
|
-
]),
|
|
164
|
+
])),
|
|
182
165
|
});
|
|
183
166
|
exports.lexiconError = lex_schema_1.l.object({
|
|
184
167
|
name: lex_schema_1.l.string({ minLength: 1 }),
|
|
185
|
-
description:
|
|
186
|
-
}, {
|
|
187
|
-
required: ['name'],
|
|
168
|
+
description: strOpt,
|
|
188
169
|
});
|
|
189
170
|
exports.lexiconQuerySchema = lex_schema_1.l.object({
|
|
190
171
|
type: lex_schema_1.l.literal('query'),
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
}, {
|
|
196
|
-
required: ['type'],
|
|
172
|
+
parameters: lex_schema_1.l.optional(exports.lexiconParameters),
|
|
173
|
+
output: lex_schema_1.l.optional(exports.lexiconPayload),
|
|
174
|
+
errors: lex_schema_1.l.optional(lex_schema_1.l.array(exports.lexiconError)),
|
|
175
|
+
description: strOpt,
|
|
197
176
|
});
|
|
198
177
|
exports.lexiconProcedureSchema = lex_schema_1.l.object({
|
|
199
178
|
type: lex_schema_1.l.literal('procedure'),
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
}, {
|
|
206
|
-
required: ['type'],
|
|
179
|
+
parameters: lex_schema_1.l.optional(exports.lexiconParameters),
|
|
180
|
+
input: lex_schema_1.l.optional(exports.lexiconPayload),
|
|
181
|
+
output: lex_schema_1.l.optional(exports.lexiconPayload),
|
|
182
|
+
errors: lex_schema_1.l.optional(lex_schema_1.l.array(exports.lexiconError)),
|
|
183
|
+
description: strOpt,
|
|
207
184
|
});
|
|
208
185
|
exports.lexiconSubscriptionSchema = lex_schema_1.l.object({
|
|
209
186
|
type: lex_schema_1.l.literal('subscription'),
|
|
210
|
-
description:
|
|
211
|
-
parameters: exports.lexiconParameters,
|
|
212
|
-
message: exports.lexiconSubscriptionMessage,
|
|
213
|
-
errors: lex_schema_1.l.array(exports.lexiconError),
|
|
214
|
-
}, {
|
|
215
|
-
required: ['type'],
|
|
187
|
+
description: strOpt,
|
|
188
|
+
parameters: lex_schema_1.l.optional(exports.lexiconParameters),
|
|
189
|
+
message: lex_schema_1.l.optional(exports.lexiconSubscriptionMessage),
|
|
190
|
+
errors: lex_schema_1.l.optional(lex_schema_1.l.array(exports.lexiconError)),
|
|
216
191
|
});
|
|
217
192
|
// Permissions
|
|
218
193
|
const lexiconLanguageSchema = lex_schema_1.l.string({ format: 'language' });
|
|
219
|
-
const lexiconLanguageDict = lex_schema_1.l.dict(lexiconLanguageSchema,
|
|
220
|
-
const lexiconPermissionSchema = lex_schema_1.l.object({
|
|
194
|
+
const lexiconLanguageDict = lex_schema_1.l.dict(lexiconLanguageSchema, str);
|
|
195
|
+
const lexiconPermissionSchema = lex_schema_1.l.intersection(lex_schema_1.l.object({
|
|
221
196
|
type: lex_schema_1.l.literal('permission'),
|
|
222
197
|
resource: lex_schema_1.l.string({ minLength: 1 }),
|
|
223
|
-
},
|
|
224
|
-
required: ['type', 'resource'],
|
|
225
|
-
unknownProperties: lex_schema_1.l.paramsSchema,
|
|
226
|
-
});
|
|
198
|
+
}), lex_schema_1.l.paramsSchema);
|
|
227
199
|
const lexiconPermissionSetSchema = lex_schema_1.l.object({
|
|
228
200
|
type: lex_schema_1.l.literal('permission-set'),
|
|
229
|
-
description: lex_schema_1.l.string(),
|
|
230
|
-
title: lex_schema_1.l.string(),
|
|
231
|
-
'title:lang': lexiconLanguageDict,
|
|
232
|
-
detail: lex_schema_1.l.string(),
|
|
233
|
-
'detail:lang': lexiconLanguageDict,
|
|
234
201
|
permissions: lex_schema_1.l.array(lexiconPermissionSchema),
|
|
235
|
-
|
|
236
|
-
|
|
202
|
+
title: strOpt,
|
|
203
|
+
'title:lang': lex_schema_1.l.optional(lexiconLanguageDict),
|
|
204
|
+
detail: strOpt,
|
|
205
|
+
'detail:lang': lex_schema_1.l.optional(lexiconLanguageDict),
|
|
206
|
+
description: strOpt,
|
|
237
207
|
});
|
|
238
208
|
// Schemas that can appear anywhere in the defs
|
|
239
209
|
const NAMED_LEXICON_SCHEMAS = [
|
|
@@ -255,12 +225,10 @@ exports.lexiconIdentifierSchema = lex_schema_1.l.string({ format: 'nsid' });
|
|
|
255
225
|
exports.lexiconDocumentSchema = lex_schema_1.l.object({
|
|
256
226
|
lexicon: lex_schema_1.l.literal(1),
|
|
257
227
|
id: exports.lexiconIdentifierSchema,
|
|
258
|
-
revision:
|
|
259
|
-
description:
|
|
260
|
-
defs: lex_schema_1.l.
|
|
261
|
-
|
|
262
|
-
}),
|
|
263
|
-
}, {
|
|
264
|
-
required: ['lexicon', 'id', 'defs'],
|
|
228
|
+
revision: intOpt,
|
|
229
|
+
description: strOpt,
|
|
230
|
+
defs: lex_schema_1.l.intersection(lex_schema_1.l.object({
|
|
231
|
+
main: lex_schema_1.l.optional(lex_schema_1.l.discriminatedUnion('type', MAIN_LEXICON_SCHEMAS)),
|
|
232
|
+
}), lex_schema_1.l.dict(lex_schema_1.l.string({ minLength: 1 }), lex_schema_1.l.discriminatedUnion('type', NAMED_LEXICON_SCHEMAS))),
|
|
265
233
|
});
|
|
266
234
|
//# sourceMappingURL=lexicon-document.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lexicon-document.js","sourceRoot":"","sources":["../src/lexicon-document.ts"],"names":[],"mappings":";;;AAAA,oDAAuC;AAEvC,oCAAoC;AAEpC,mBAAmB;AAEN,QAAA,oBAAoB,GAAG,cAAC,CAAC,MAAM,CAC1C;IACE,IAAI,EAAE,cAAC,CAAC,OAAO,CAAC,SAAS,CAAC;IAC1B,WAAW,EAAE,cAAC,CAAC,MAAM,EAAE;IACvB,OAAO,EAAE,cAAC,CAAC,OAAO,EAAE;IACpB,KAAK,EAAE,cAAC,CAAC,OAAO,EAAE;CACnB,EACD;IACE,QAAQ,EAAE,CAAC,MAAM,CAAC;CACnB,CACF,CAAA;AAGY,QAAA,oBAAoB,GAAG,cAAC,CAAC,MAAM,CAC1C;IACE,IAAI,EAAE,cAAC,CAAC,OAAO,C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,CAAC,kBAAkB,CAAC,MAAM,EAAE,oBAAoB,CAAC,EAAE,EAC5D;QACE,iBAAiB,EAAE,cAAC,CAAC,IAAI,CACvB,cAAC,CAAC,MAAM,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC,EAC1B,cAAC,CAAC,kBAAkB,CAAC,MAAM,EAAE,qBAAqB,CAAC,CACpD;KACF,CACF;CACF,EACD;IACE,QAAQ,EAAE,CAAC,SAAS,EAAE,IAAI,EAAE,MAAM,CAAC;CACpC,CACF,CAAA","sourcesContent":["import { l } from '@atproto/lex-schema'\n\n// https://atproto.com/specs/lexicon\n\n// \"Concrete\" Types\n\nexport const lexiconBooleanSchema = l.object(\n {\n type: l.literal('boolean'),\n description: l.string(),\n default: l.boolean(),\n const: l.boolean(),\n },\n {\n required: ['type'],\n },\n)\nexport type LexiconBoolean = l.Infer<typeof lexiconBooleanSchema>\n\nexport const lexiconIntegerSchema = l.object(\n {\n type: l.literal('integer'),\n description: l.string(),\n default: l.integer(),\n minimum: l.integer(),\n maximum: l.integer(),\n enum: l.array(l.integer()),\n const: l.integer(),\n },\n {\n required: ['type'],\n },\n)\nexport type LexiconInteger = l.Infer<typeof lexiconIntegerSchema>\n\nexport type LexiconStringFormat = l.StringFormat\nexport const lexiconStringFormatSchema = l.enum<LexiconStringFormat>(\n l.STRING_FORMATS,\n)\n\nexport const lexiconStringSchema = l.object(\n {\n type: l.literal('string'),\n format: lexiconStringFormatSchema,\n description: l.string(),\n default: l.string(),\n minLength: l.integer(),\n maxLength: l.integer(),\n minGraphemes: l.integer(),\n maxGraphemes: l.integer(),\n enum: l.array(l.string()),\n const: l.string(),\n knownValues: l.array(l.string()),\n },\n {\n required: ['type'],\n },\n)\nexport type LexiconString = l.Infer<typeof lexiconStringSchema>\n\nexport const lexiconBytesSchema = l.object(\n {\n type: l.literal('bytes'),\n description: l.string(),\n maxLength: l.integer(),\n minLength: l.integer(),\n },\n {\n required: ['type'],\n },\n)\nexport type LexiconBytes = l.Infer<typeof lexiconBytesSchema>\n\nexport const lexiconCidLinkSchema = l.object(\n {\n type: l.literal('cid-link'),\n description: l.string(),\n },\n {\n required: ['type'],\n },\n)\nexport type LexiconCid = l.Infer<typeof lexiconCidLinkSchema>\n\nexport const lexiconBlobSchema = l.object(\n {\n type: l.literal('blob'),\n description: l.string(),\n accept: l.array(l.string()),\n maxSize: l.integer(),\n },\n {\n required: ['type'],\n },\n)\nexport type LexiconBlob = l.Infer<typeof lexiconBlobSchema>\n\nconst CONCRETE_TYPES = [\n lexiconBooleanSchema,\n lexiconIntegerSchema,\n lexiconStringSchema,\n // Lexicon (DAG-CBOR)\n lexiconBytesSchema,\n lexiconCidLinkSchema,\n // Lexicon Specific\n lexiconBlobSchema,\n] as const\n\n// Meta types\n\nexport const lexiconUnknownSchema = l.object(\n {\n type: l.literal('unknown'),\n description: l.string(),\n },\n {\n required: ['type'],\n },\n)\nexport type LexiconUnknown = l.Infer<typeof lexiconUnknownSchema>\n\nexport const lexiconTokenSchema = l.object(\n {\n type: l.literal('token'),\n description: l.string(),\n },\n {\n required: ['type'],\n },\n)\nexport type LexiconToken = l.Infer<typeof lexiconTokenSchema>\n\nexport const lexiconRefSchema = l.object(\n {\n type: l.literal('ref'),\n description: l.string(),\n ref: l.string(),\n },\n {\n required: ['type', 'ref'],\n },\n)\nexport type LexiconRef = l.Infer<typeof lexiconRefSchema>\n\nexport const lexiconRefUnionSchema = l.object(\n {\n type: l.literal('union'),\n description: l.string(),\n refs: l.array(l.string()),\n closed: l.boolean(),\n },\n {\n required: ['type', 'refs'],\n },\n)\nexport type LexiconRefUnion = l.Infer<typeof lexiconRefUnionSchema>\n\n// Complex Types\n\nconst ARRAY_ITEMS_SCHEMAS = [\n ...CONCRETE_TYPES,\n // Meta\n lexiconUnknownSchema,\n lexiconRefSchema,\n lexiconRefUnionSchema,\n] as const\n\nexport type LexiconArrayItems = l.Infer<(typeof ARRAY_ITEMS_SCHEMAS)[number]>\n\nexport const lexiconArraySchema = l.object(\n {\n type: l.literal('array'),\n description: l.string(),\n items: l.discriminatedUnion('type', ARRAY_ITEMS_SCHEMAS),\n minLength: l.integer(),\n maxLength: l.integer(),\n },\n {\n required: ['type', 'items'],\n },\n)\nexport type LexiconArray = l.Infer<typeof lexiconArraySchema>\n\nexport const lexiconObjectSchema = l.object(\n {\n type: l.literal('object'),\n description: l.string(),\n required: l.array(l.string()),\n nullable: l.array(l.string()),\n properties: l.dict(\n l.string(),\n l.discriminatedUnion('type', [\n ...ARRAY_ITEMS_SCHEMAS,\n lexiconArraySchema,\n ]),\n ),\n },\n {\n required: ['type', 'properties'],\n },\n)\nexport type LexiconObject = l.Infer<typeof lexiconObjectSchema>\n\n// Records\n\nexport const lexiconRecordSchema = l.object(\n {\n type: l.literal('record'),\n description: l.string(),\n key: l.string(),\n record: lexiconObjectSchema,\n },\n { required: ['type', 'record'] },\n)\nexport type LexiconRecord = l.Infer<typeof lexiconRecordSchema>\n\n// XRPC Methods\n\nexport const lexiconParameters = l.object(\n {\n type: l.literal('params'),\n description: l.string(),\n required: l.array(l.string()),\n properties: l.dict(\n l.string(),\n l.discriminatedUnion('type', [\n lexiconBooleanSchema,\n lexiconIntegerSchema,\n lexiconStringSchema,\n l.object(\n {\n type: l.literal('array'),\n description: l.string(),\n items: l.discriminatedUnion('type', [\n lexiconBooleanSchema,\n lexiconIntegerSchema,\n lexiconStringSchema,\n ]),\n minLength: l.integer(),\n maxLength: l.integer(),\n },\n {\n required: ['type', 'items'],\n },\n ),\n ]),\n ),\n },\n {\n required: ['type', 'properties'],\n },\n)\nexport type LexiconParameters = l.Infer<typeof lexiconParameters>\n\nexport const lexiconPayload = l.object(\n {\n description: l.string(),\n encoding: l.string(),\n schema: l.discriminatedUnion('type', [\n lexiconRefSchema,\n lexiconRefUnionSchema,\n lexiconObjectSchema,\n ]),\n },\n {\n required: ['encoding'],\n },\n)\nexport type LexiconPayload = l.Infer<typeof lexiconPayload>\n\nexport const lexiconSubscriptionMessage = l.object({\n description: l.string(),\n schema: l.discriminatedUnion('type', [\n lexiconRefSchema,\n lexiconRefUnionSchema,\n lexiconObjectSchema,\n ]),\n})\nexport type LexiconSubscriptionMessage = l.Infer<\n typeof lexiconSubscriptionMessage\n>\n\nexport const lexiconError = l.object(\n {\n name: l.string({ minLength: 1 }),\n description: l.string(),\n },\n {\n required: ['name'],\n },\n)\nexport type LexiconError = l.Infer<typeof lexiconError>\n\nexport const lexiconQuerySchema = l.object(\n {\n type: l.literal('query'),\n description: l.string(),\n parameters: lexiconParameters,\n output: lexiconPayload,\n errors: l.array(lexiconError),\n },\n {\n required: ['type'],\n },\n)\nexport type LexiconQuery = l.Infer<typeof lexiconQuerySchema>\n\nexport const lexiconProcedureSchema = l.object(\n {\n type: l.literal('procedure'),\n description: l.string(),\n parameters: lexiconParameters,\n input: lexiconPayload,\n output: lexiconPayload,\n errors: l.array(lexiconError),\n },\n {\n required: ['type'],\n },\n)\nexport type LexiconProcedure = l.Infer<typeof lexiconProcedureSchema>\n\nexport const lexiconSubscriptionSchema = l.object(\n {\n type: l.literal('subscription'),\n description: l.string(),\n parameters: lexiconParameters,\n message: lexiconSubscriptionMessage,\n errors: l.array(lexiconError),\n },\n {\n required: ['type'],\n },\n)\n\nexport type LexiconSubscription = l.Infer<typeof lexiconSubscriptionSchema>\n\n// Permissions\n\nconst lexiconLanguageSchema = l.string({ format: 'language' })\n\nexport type LexiconLanguage = l.Infer<typeof lexiconLanguageSchema>\n\nconst lexiconLanguageDict = l.dict(lexiconLanguageSchema, l.string())\n\nexport type LexiconLanguageDict = l.Infer<typeof lexiconLanguageDict>\n\nconst lexiconPermissionSchema = l.object(\n {\n type: l.literal('permission'),\n resource: l.string({ minLength: 1 }),\n },\n {\n required: ['type', 'resource'],\n unknownProperties: l.paramsSchema,\n },\n)\n\nexport type LexiconPermission = l.Infer<typeof lexiconPermissionSchema>\n\nconst lexiconPermissionSetSchema = l.object(\n {\n type: l.literal('permission-set'),\n description: l.string(),\n title: l.string(),\n 'title:lang': lexiconLanguageDict,\n detail: l.string(),\n 'detail:lang': lexiconLanguageDict,\n permissions: l.array(lexiconPermissionSchema),\n },\n {\n required: ['type', 'permissions'],\n },\n)\n\nexport type LexiconPermissionSet = l.Infer<typeof lexiconPermissionSetSchema>\n\n// Schemas that can appear anywhere in the defs\nconst NAMED_LEXICON_SCHEMAS = [\n ...CONCRETE_TYPES,\n lexiconArraySchema,\n lexiconObjectSchema,\n lexiconTokenSchema,\n] as const\n\nexport type NamedLexiconDefinition = l.Infer<\n (typeof NAMED_LEXICON_SCHEMAS)[number]\n>\n\n// Schemas that can only appear as \"main\" def\nconst MAIN_LEXICON_SCHEMAS = [\n lexiconPermissionSetSchema,\n lexiconProcedureSchema,\n lexiconQuerySchema,\n lexiconRecordSchema,\n lexiconSubscriptionSchema,\n ...NAMED_LEXICON_SCHEMAS,\n] as const\n\nexport type MainLexiconDefinition = l.Infer<\n (typeof MAIN_LEXICON_SCHEMAS)[number]\n>\n\nexport const lexiconIdentifierSchema = l.string({ format: 'nsid' })\nexport type LexiconIdentifier = l.Infer<typeof lexiconIdentifierSchema>\n\nexport const lexiconDocumentSchema = l.object(\n {\n lexicon: l.literal(1),\n id: lexiconIdentifierSchema,\n revision: l.integer(),\n description: l.string(),\n defs: l.object(\n { main: l.discriminatedUnion('type', MAIN_LEXICON_SCHEMAS) },\n {\n unknownProperties: l.dict(\n l.string({ minLength: 1 }),\n l.discriminatedUnion('type', NAMED_LEXICON_SCHEMAS),\n ),\n },\n ),\n },\n {\n required: ['lexicon', 'id', 'defs'],\n },\n)\nexport type LexiconDocument = l.Infer<typeof lexiconDocumentSchema>\n"]}
|
|
1
|
+
{"version":3,"file":"lexicon-document.js","sourceRoot":"","sources":["../src/lexicon-document.ts"],"names":[],"mappings":";;;AAAA,oDAAuC;AAEvC,wDAAwD;AAExD,MAAM,IAAI,GAAG,cAAC,CAAC,OAAO,EAAE,CAAA;AACxB,MAAM,GAAG,GAAG,cAAC,CAAC,OAAO,EAAE,CAAA;AAC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AAqB,GAAG;IAC5B,GAAG,cAAc;IACjB,0BAAkB;IAClB,2BAAmB;IACnB,0BAAkB;CACV,CAAA;AAMV,6CAA6C;AAC7C,MAAM,oBAAoB,GAAG;IAC3B,0BAA0B;IAC1B,8BAAsB;IACtB,0BAAkB;IAClB,2BAAmB;IACnB,iCAAyB;IACzB,GAAG,qBAAqB;CAChB,CAAA;AAMG,QAAA,uBAAuB,GAAG,cAAC,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAA;AAGtD,QAAA,qBAAqB,GAAG,cAAC,CAAC,MAAM,CAAC;IAC5C,OAAO,EAAE,cAAC,CAAC,OAAO,CAAC,CAAC,CAAC;IACrB,EAAE,EAAE,+BAAuB;IAC3B,QAAQ,EAAE,MAAM;IAChB,WAAW,EAAE,MAAM;IACnB,IAAI,EAAE,cAAC,CAAC,YAAY,CAClB,cAAC,CAAC,MAAM,CAAC;QACP,IAAI,EAAE,cAAC,CAAC,QAAQ,CAAC,cAAC,CAAC,kBAAkB,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAC;KACrE,CAAC,EACF,cAAC,CAAC,IAAI,CACJ,cAAC,CAAC,MAAM,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC,EAC1B,cAAC,CAAC,kBAAkB,CAAC,MAAM,EAAE,qBAAqB,CAAC,CACpD,CACF;CACF,CAAC,CAAA","sourcesContent":["import { l } from '@atproto/lex-schema'\n\n// Re-usable shortcuts (avoid creating too many schemas)\n\nconst bool = l.boolean()\nconst int = l.integer()\nconst str = l.string()\n\nconst boopOpt = l.optional(bool)\nconst intOpt = l.optional(int)\nconst strOpt = l.optional(str)\n\nconst strArrOpt = l.optional(l.array(str))\n\n// https://atproto.com/specs/lexicon\n\n// \"Concrete\" Types\n\nexport const lexiconBooleanSchema = l.object({\n type: l.literal('boolean'),\n default: boopOpt,\n const: boopOpt,\n description: strOpt,\n})\nexport type LexiconBoolean = l.Infer<typeof lexiconBooleanSchema>\n\nexport const lexiconIntegerSchema = l.object({\n type: l.literal('integer'),\n default: intOpt,\n minimum: intOpt,\n maximum: intOpt,\n enum: l.optional(l.array(l.integer())),\n const: intOpt,\n description: strOpt,\n})\nexport type LexiconInteger = l.Infer<typeof lexiconIntegerSchema>\n\nexport const lexiconStringSchema = l.object({\n type: l.literal('string'),\n format: l.optional(l.enum<l.StringFormat>(l.STRING_FORMATS)),\n default: strOpt,\n minLength: intOpt,\n maxLength: intOpt,\n minGraphemes: intOpt,\n maxGraphemes: intOpt,\n enum: strArrOpt,\n const: strOpt,\n knownValues: strArrOpt,\n description: strOpt,\n})\nexport type LexiconString = l.Infer<typeof lexiconStringSchema>\n\nexport const lexiconBytesSchema = l.object({\n type: l.literal('bytes'),\n maxLength: intOpt,\n minLength: intOpt,\n description: strOpt,\n})\nexport type LexiconBytes = l.Infer<typeof lexiconBytesSchema>\n\nexport const lexiconCidLinkSchema = l.object({\n type: l.literal('cid-link'),\n description: strOpt,\n})\nexport type LexiconCid = l.Infer<typeof lexiconCidLinkSchema>\n\nexport const lexiconBlobSchema = l.object({\n type: l.literal('blob'),\n accept: strArrOpt,\n maxSize: intOpt,\n description: strOpt,\n})\nexport type LexiconBlob = l.Infer<typeof lexiconBlobSchema>\n\nconst CONCRETE_TYPES = [\n lexiconBooleanSchema,\n lexiconIntegerSchema,\n lexiconStringSchema,\n // Lexicon (DAG-CBOR)\n lexiconBytesSchema,\n lexiconCidLinkSchema,\n // Lexicon Specific\n lexiconBlobSchema,\n] as const\n\n// Meta types\n\nexport const lexiconUnknownSchema = l.object({\n type: l.literal('unknown'),\n description: strOpt,\n})\nexport type LexiconUnknown = l.Infer<typeof lexiconUnknownSchema>\n\nexport const lexiconTokenSchema = l.object({\n type: l.literal('token'),\n description: strOpt,\n})\nexport type LexiconToken = l.Infer<typeof lexiconTokenSchema>\n\nexport const lexiconRefSchema = l.object({\n type: l.literal('ref'),\n ref: str,\n description: strOpt,\n})\nexport type LexiconRef = l.Infer<typeof lexiconRefSchema>\n\nexport const lexiconRefUnionSchema = l.object({\n type: l.literal('union'),\n refs: l.array(str),\n closed: boopOpt,\n description: strOpt,\n})\nexport type LexiconRefUnion = l.Infer<typeof lexiconRefUnionSchema>\n\n// Complex Types\n\nconst ARRAY_ITEMS_SCHEMAS = [\n ...CONCRETE_TYPES,\n // Meta\n lexiconUnknownSchema,\n lexiconRefSchema,\n lexiconRefUnionSchema,\n] as const\n\nexport type LexiconArrayItems = l.Infer<(typeof ARRAY_ITEMS_SCHEMAS)[number]>\n\nexport const lexiconArraySchema = l.object({\n type: l.literal('array'),\n items: l.discriminatedUnion('type', ARRAY_ITEMS_SCHEMAS),\n minLength: intOpt,\n maxLength: intOpt,\n description: strOpt,\n})\nexport type LexiconArray = l.Infer<typeof lexiconArraySchema>\n\nconst requirePropertiesRefinement: l.RefinementCheck<{\n required?: string[]\n properties: Record<string, unknown>\n}> = {\n check: (v) => !v.required || v.required.every((k) => k in v.properties),\n message: 'All required parameters must be defined in properties',\n path: 'required',\n}\n\nexport const lexiconObjectSchema = l.refine(\n l.object({\n type: l.literal('object'),\n properties: l.dict(\n str,\n l.discriminatedUnion('type', [\n ...ARRAY_ITEMS_SCHEMAS,\n lexiconArraySchema,\n ]),\n ),\n required: strArrOpt,\n nullable: strArrOpt,\n description: strOpt,\n }),\n requirePropertiesRefinement,\n)\nexport type LexiconObject = l.Infer<typeof lexiconObjectSchema>\n\n// Records\n\nexport const lexiconRecordKeySchema = l.custom(\n l.isLexiconRecordKey,\n 'Invalid record key definition (must be \"any\", \"nsid\", \"tid\", or \"literal:<string>\")',\n)\n\nexport type LexiconRecordKey = l.LexiconRecordKey\n\nexport const lexiconRecordSchema = l.object({\n type: l.literal('record'),\n record: lexiconObjectSchema,\n description: strOpt,\n key: lexiconRecordKeySchema,\n})\nexport type LexiconRecord = l.Infer<typeof lexiconRecordSchema>\n\n// XRPC Methods\n\nexport const lexiconParameters = l.refine(\n l.object({\n type: l.literal('params'),\n properties: l.dict(\n str,\n l.discriminatedUnion('type', [\n lexiconBooleanSchema,\n lexiconIntegerSchema,\n lexiconStringSchema,\n l.object({\n type: l.literal('array'),\n items: l.discriminatedUnion('type', [\n lexiconBooleanSchema,\n lexiconIntegerSchema,\n lexiconStringSchema,\n ]),\n minLength: intOpt,\n maxLength: intOpt,\n description: strOpt,\n }),\n ]),\n ),\n required: strArrOpt,\n description: strOpt,\n }),\n requirePropertiesRefinement,\n)\nexport type LexiconParameters = l.Infer<typeof lexiconParameters>\n\nexport const lexiconPayload = l.object({\n encoding: str,\n schema: l.optional(\n l.discriminatedUnion('type', [\n lexiconRefSchema,\n lexiconRefUnionSchema,\n lexiconObjectSchema,\n ]),\n ),\n description: strOpt,\n})\nexport type LexiconPayload = l.Infer<typeof lexiconPayload>\n\nexport const lexiconSubscriptionMessage = l.object({\n description: strOpt,\n schema: l.optional(\n l.discriminatedUnion('type', [\n lexiconRefSchema,\n lexiconRefUnionSchema,\n lexiconObjectSchema,\n ]),\n ),\n})\nexport type LexiconSubscriptionMessage = l.Infer<\n typeof lexiconSubscriptionMessage\n>\n\nexport const lexiconError = l.object({\n name: l.string({ minLength: 1 }),\n description: strOpt,\n})\nexport type LexiconError = l.Infer<typeof lexiconError>\n\nexport const lexiconQuerySchema = l.object({\n type: l.literal('query'),\n parameters: l.optional(lexiconParameters),\n output: l.optional(lexiconPayload),\n errors: l.optional(l.array(lexiconError)),\n description: strOpt,\n})\nexport type LexiconQuery = l.Infer<typeof lexiconQuerySchema>\n\nexport const lexiconProcedureSchema = l.object({\n type: l.literal('procedure'),\n parameters: l.optional(lexiconParameters),\n input: l.optional(lexiconPayload),\n output: l.optional(lexiconPayload),\n errors: l.optional(l.array(lexiconError)),\n description: strOpt,\n})\nexport type LexiconProcedure = l.Infer<typeof lexiconProcedureSchema>\n\nexport const lexiconSubscriptionSchema = l.object({\n type: l.literal('subscription'),\n description: strOpt,\n parameters: l.optional(lexiconParameters),\n message: l.optional(lexiconSubscriptionMessage),\n errors: l.optional(l.array(lexiconError)),\n})\n\nexport type LexiconSubscription = l.Infer<typeof lexiconSubscriptionSchema>\n\n// Permissions\n\nconst lexiconLanguageSchema = l.string({ format: 'language' })\n\nexport type LexiconLanguage = l.Infer<typeof lexiconLanguageSchema>\n\nconst lexiconLanguageDict = l.dict(lexiconLanguageSchema, str)\n\nexport type LexiconLanguageDict = l.Infer<typeof lexiconLanguageDict>\n\nconst lexiconPermissionSchema = l.intersection(\n l.object({\n type: l.literal('permission'),\n resource: l.string({ minLength: 1 }),\n }),\n l.paramsSchema,\n)\n\nexport type LexiconPermission = l.Infer<typeof lexiconPermissionSchema>\n\nconst lexiconPermissionSetSchema = l.object({\n type: l.literal('permission-set'),\n permissions: l.array(lexiconPermissionSchema),\n title: strOpt,\n 'title:lang': l.optional(lexiconLanguageDict),\n detail: strOpt,\n 'detail:lang': l.optional(lexiconLanguageDict),\n description: strOpt,\n})\n\nexport type LexiconPermissionSet = l.Infer<typeof lexiconPermissionSetSchema>\n\n// Schemas that can appear anywhere in the defs\nconst NAMED_LEXICON_SCHEMAS = [\n ...CONCRETE_TYPES,\n lexiconArraySchema,\n lexiconObjectSchema,\n lexiconTokenSchema,\n] as const\n\nexport type NamedLexiconDefinition = l.Infer<\n (typeof NAMED_LEXICON_SCHEMAS)[number]\n>\n\n// Schemas that can only appear as \"main\" def\nconst MAIN_LEXICON_SCHEMAS = [\n lexiconPermissionSetSchema,\n lexiconProcedureSchema,\n lexiconQuerySchema,\n lexiconRecordSchema,\n lexiconSubscriptionSchema,\n ...NAMED_LEXICON_SCHEMAS,\n] as const\n\nexport type MainLexiconDefinition = l.Infer<\n (typeof MAIN_LEXICON_SCHEMAS)[number]\n>\n\nexport const lexiconIdentifierSchema = l.string({ format: 'nsid' })\nexport type LexiconIdentifier = l.Infer<typeof lexiconIdentifierSchema>\n\nexport const lexiconDocumentSchema = l.object({\n lexicon: l.literal(1),\n id: lexiconIdentifierSchema,\n revision: intOpt,\n description: strOpt,\n defs: l.intersection(\n l.object({\n main: l.optional(l.discriminatedUnion('type', MAIN_LEXICON_SCHEMAS)),\n }),\n l.dict(\n l.string({ minLength: 1 }),\n l.discriminatedUnion('type', NAMED_LEXICON_SCHEMAS),\n ),\n ),\n})\nexport type LexiconDocument = l.Infer<typeof lexiconDocumentSchema>\n"]}
|
|
@@ -18,72 +18,32 @@ export declare class LexiconSchemaBuilder {
|
|
|
18
18
|
#private;
|
|
19
19
|
protected indexer: LexiconIndexer;
|
|
20
20
|
static build(indexer: LexiconIndexer, fullRef: string): Promise<l.Validator<unknown>>;
|
|
21
|
-
static buildAll(indexer: LexiconIndexer): Promise<Map<string, l.Validator<unknown> | l.Query<any, any, any, any> | l.Subscription<any, any, any, any> | l.Procedure<any, any, any, any, any> | l.PermissionSet<any, any
|
|
21
|
+
static buildAll(indexer: LexiconIndexer): Promise<Map<string, l.Validator<unknown> | l.Query<any, any, any, any> | l.Subscription<any, any, any, any> | l.Procedure<any, any, any, any, any> | l.PermissionSet<any, any>>>;
|
|
22
22
|
constructor(indexer: LexiconIndexer);
|
|
23
23
|
done(): Promise<void>;
|
|
24
24
|
buildFullRef: (fullRef: string) => Promise<l.Validator<unknown> | l.PermissionSet<`${string}.${string}.${string}`, l.Permission<string, {
|
|
25
25
|
[x: string]: string | number | boolean | (string | number | boolean)[];
|
|
26
|
-
}>[], {
|
|
27
|
-
type: "permission-set";
|
|
28
|
-
permissions: {
|
|
29
|
-
[x: string]: string | number | boolean | (string | number | boolean)[];
|
|
30
|
-
type: "permission";
|
|
31
|
-
resource: string;
|
|
32
|
-
}[];
|
|
33
|
-
description?: string | undefined;
|
|
34
|
-
title?: string | undefined;
|
|
35
|
-
detail?: string | undefined;
|
|
36
|
-
"title:lang"?: Record<string, string> | undefined;
|
|
37
|
-
"detail:lang"?: Record<string, string> | undefined;
|
|
38
|
-
}> | l.Procedure<`${string}.${string}.${string}`, l.ParamsSchema<{}, l.ParamsSchemaOptions, {}>, l.Payload<string | undefined, l.Validator<any> | undefined>, l.Payload<string | undefined, l.Validator<any> | undefined>, string[]> | l.Query<`${string}.${string}.${string}`, l.ParamsSchema<{}, l.ParamsSchemaOptions, {}>, l.Payload<string | undefined, l.Validator<any> | undefined>, string[]> | l.Subscription<`${string}.${string}.${string}`, l.ParamsSchema<{}, l.ParamsSchemaOptions, {}>, l.RefSchema<unknown> | l.TypedUnionSchema<l.TypedRefSchema<any>[], boolean> | l.ObjectSchema<any, any, {
|
|
26
|
+
}>[]> | l.Procedure<`${string}.${string}.${string}`, l.ParamsSchema<{}>, l.Payload<string | undefined, l.Validator<any> | undefined>, l.Payload<string | undefined, l.Validator<any> | undefined>, string[]> | l.Query<`${string}.${string}.${string}`, l.ParamsSchema<{}>, l.Payload<string | undefined, l.Validator<any> | undefined>, string[]> | l.Subscription<`${string}.${string}.${string}`, l.ParamsSchema<{}>, l.ObjectSchema<any> | l.RefSchema<unknown> | l.TypedUnionSchema<l.TypedRefSchema<{
|
|
39
27
|
[x: string]: any;
|
|
40
|
-
} |
|
|
41
|
-
[x: string]: any;
|
|
42
|
-
} | {
|
|
43
|
-
[x: string]: any;
|
|
44
|
-
} | {
|
|
45
|
-
[x: string]: any;
|
|
46
|
-
}> | undefined, string[]>>;
|
|
28
|
+
}>[], boolean> | undefined, string[]>>;
|
|
47
29
|
protected buildRefGetter(fullRef: string): () => l.Validator<unknown>;
|
|
48
30
|
protected buildTypedRefGetter(fullRef: string): () => l.TypedObjectSchema | l.RecordSchema;
|
|
49
31
|
protected compileDef(doc: LexiconDocument, hash: string): l.Validator<unknown> | l.PermissionSet<`${string}.${string}.${string}`, l.Permission<string, {
|
|
50
32
|
[x: string]: string | number | boolean | (string | number | boolean)[];
|
|
51
|
-
}>[], {
|
|
52
|
-
type: "permission-set";
|
|
53
|
-
permissions: {
|
|
54
|
-
[x: string]: string | number | boolean | (string | number | boolean)[];
|
|
55
|
-
type: "permission";
|
|
56
|
-
resource: string;
|
|
57
|
-
}[];
|
|
58
|
-
description?: string | undefined;
|
|
59
|
-
title?: string | undefined;
|
|
60
|
-
detail?: string | undefined;
|
|
61
|
-
"title:lang"?: Record<string, string> | undefined;
|
|
62
|
-
"detail:lang"?: Record<string, string> | undefined;
|
|
63
|
-
}> | l.Procedure<`${string}.${string}.${string}`, l.ParamsSchema<{}, l.ParamsSchemaOptions, {}>, l.Payload<string | undefined, l.Validator<any> | undefined>, l.Payload<string | undefined, l.Validator<any> | undefined>, string[]> | l.Query<`${string}.${string}.${string}`, l.ParamsSchema<{}, l.ParamsSchemaOptions, {}>, l.Payload<string | undefined, l.Validator<any> | undefined>, string[]> | l.Subscription<`${string}.${string}.${string}`, l.ParamsSchema<{}, l.ParamsSchemaOptions, {}>, l.RefSchema<unknown> | l.TypedUnionSchema<l.TypedRefSchema<any>[], boolean> | l.ObjectSchema<any, any, {
|
|
64
|
-
[x: string]: any;
|
|
65
|
-
} | {
|
|
66
|
-
[x: string]: any;
|
|
67
|
-
} | {
|
|
33
|
+
}>[]> | l.Procedure<`${string}.${string}.${string}`, l.ParamsSchema<{}>, l.Payload<string | undefined, l.Validator<any> | undefined>, l.Payload<string | undefined, l.Validator<any> | undefined>, string[]> | l.Query<`${string}.${string}.${string}`, l.ParamsSchema<{}>, l.Payload<string | undefined, l.Validator<any> | undefined>, string[]> | l.Subscription<`${string}.${string}.${string}`, l.ParamsSchema<{}>, l.ObjectSchema<any> | l.RefSchema<unknown> | l.TypedUnionSchema<l.TypedRefSchema<{
|
|
68
34
|
[x: string]: any;
|
|
69
|
-
} |
|
|
70
|
-
[x: string]: any;
|
|
71
|
-
}> | undefined, string[]>;
|
|
35
|
+
}>[], boolean> | undefined, string[]>;
|
|
72
36
|
protected compileLeaf(doc: LexiconDocument, def: LexiconArray | LexiconArrayItems): l.Validator<unknown>;
|
|
73
|
-
protected compileRef(doc: LexiconDocument, def: LexiconRef | LexiconRefUnion): l.RefSchema<unknown> | l.TypedUnionSchema<l.TypedRefSchema<
|
|
37
|
+
protected compileRef(doc: LexiconDocument, def: LexiconRef | LexiconRefUnion): l.RefSchema<unknown> | l.TypedUnionSchema<l.TypedRefSchema<{
|
|
38
|
+
[x: string]: any;
|
|
39
|
+
}>[], boolean>;
|
|
74
40
|
protected compileObject(doc: LexiconDocument, def: LexiconObject): l.ObjectSchema;
|
|
75
41
|
protected compilePayload(doc: LexiconDocument, def: LexiconPayload | undefined): l.Payload;
|
|
76
42
|
protected compileErrors(_doc: LexiconDocument, errors?: readonly LexiconError[]): undefined | string[];
|
|
77
|
-
protected compilePayloadSchema(doc: LexiconDocument, def?: LexiconObject | LexiconRef | LexiconRefUnion): l.ObjectSchema<any
|
|
78
|
-
[x: string]: any;
|
|
79
|
-
} | {
|
|
80
|
-
[x: string]: any;
|
|
81
|
-
} | {
|
|
82
|
-
[x: string]: any;
|
|
83
|
-
} | {
|
|
43
|
+
protected compilePayloadSchema(doc: LexiconDocument, def?: LexiconObject | LexiconRef | LexiconRefUnion): l.ObjectSchema<any> | l.RefSchema<unknown> | l.TypedUnionSchema<l.TypedRefSchema<{
|
|
84
44
|
[x: string]: any;
|
|
85
|
-
}>
|
|
86
|
-
protected compileParams(doc: LexiconDocument, def?: LexiconParameters): l.ParamsSchema<{}
|
|
45
|
+
}>[], boolean> | undefined;
|
|
46
|
+
protected compileParams(doc: LexiconDocument, def?: LexiconParameters): l.ParamsSchema<{}>;
|
|
87
47
|
}
|
|
88
48
|
export declare function memoize<Fn extends (arg: string) => unknown>(fn: Fn): Fn;
|
|
89
49
|
//# sourceMappingURL=lexicon-schema-builder.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lexicon-schema-builder.d.ts","sourceRoot":"","sources":["../src/lexicon-schema-builder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,qBAAqB,CAAA;AACvC,OAAO,EACL,YAAY,EACZ,iBAAiB,EACjB,eAAe,EACf,YAAY,EACZ,aAAa,EACb,iBAAiB,EACjB,cAAc,EACd,UAAU,EACV,eAAe,EAChB,MAAM,uBAAuB,CAAA;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