@atproto/lexicon 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +31 -0
- package/build.js +22 -0
- package/dist/index.d.ts +126 -0
- package/dist/index.js +3897 -0
- package/dist/index.js.map +7 -0
- package/dist/src/index.d.ts +2 -0
- package/dist/src/lexicons.d.ts +15 -0
- package/dist/src/record/index.d.ts +4 -0
- package/dist/src/record/schema.d.ts +9 -0
- package/dist/src/record/schemas.d.ts +10 -0
- package/dist/src/record/util.d.ts +1 -0
- package/dist/src/record/validation.d.ts +24 -0
- package/dist/src/record/validator.d.ts +17 -0
- package/dist/src/record-validator.d.ts +17 -0
- package/dist/src/schema.d.ts +9 -0
- package/dist/src/schemas.d.ts +10 -0
- package/dist/src/types.d.ts +30268 -0
- package/dist/src/util.d.ts +6 -0
- package/dist/src/validation.d.ts +6 -0
- package/dist/src/validators/blob.d.ts +6 -0
- package/dist/src/validators/complex.d.ts +5 -0
- package/dist/src/validators/primitives.d.ts +9 -0
- package/dist/src/validators/xrpc.d.ts +3 -0
- package/dist/src/view-validator.d.ts +13 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -0
- package/dist/types.d.ts +73 -0
- package/dist/types.js +35 -0
- package/jest.config.js +6 -0
- package/package.json +21 -0
- package/src/index.ts +2 -0
- package/src/lexicons.ts +203 -0
- package/src/types.ts +318 -0
- package/src/util.ts +107 -0
- package/src/validation.ts +48 -0
- package/src/validators/blob.ts +57 -0
- package/src/validators/complex.ts +152 -0
- package/src/validators/primitives.ts +300 -0
- package/src/validators/xrpc.ts +50 -0
- package/tests/_scaffolds/lexicons.ts +379 -0
- package/tests/general.test.ts +611 -0
- package/tsconfig.build.json +4 -0
- package/tsconfig.json +11 -0
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Lexicons } from './lexicons';
|
|
2
|
+
import { LexUserType, LexRefVariant, ValidationResult } from './types';
|
|
3
|
+
export declare function toLexUri(str: string, baseUri?: string): string;
|
|
4
|
+
export declare function validateOneOf(lexicons: Lexicons, path: string, def: LexRefVariant | LexUserType, value: unknown, mustBeObj?: boolean): ValidationResult;
|
|
5
|
+
export declare function assertValidOneOf(lexicons: Lexicons, path: string, def: LexRefVariant | LexUserType, value: unknown, mustBeObj?: boolean): void;
|
|
6
|
+
export declare function toConcreteTypes(lexicons: Lexicons, def: LexRefVariant | LexUserType): LexUserType[];
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Lexicons } from './lexicons';
|
|
2
|
+
import { LexRecord, LexXrpcProcedure, LexXrpcQuery } from './types';
|
|
3
|
+
export declare function assertValidRecord(lexicons: Lexicons, def: LexRecord, value: unknown): void;
|
|
4
|
+
export declare function assertValidXrpcParams(lexicons: Lexicons, def: LexXrpcProcedure | LexXrpcQuery, value: unknown): void;
|
|
5
|
+
export declare function assertValidXrpcInput(lexicons: Lexicons, def: LexXrpcProcedure, value: unknown): void;
|
|
6
|
+
export declare function assertValidXrpcOutput(lexicons: Lexicons, def: LexXrpcProcedure | LexXrpcQuery, value: unknown): void;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Lexicons } from '../lexicons';
|
|
2
|
+
import { LexUserType, ValidationResult } from '../types';
|
|
3
|
+
export declare function blob(lexicons: Lexicons, path: string, def: LexUserType, value: unknown): ValidationResult;
|
|
4
|
+
export declare function image(lexicons: Lexicons, path: string, def: LexUserType, value: unknown): ValidationResult;
|
|
5
|
+
export declare function video(lexicons: Lexicons, path: string, def: LexUserType, value: unknown): ValidationResult;
|
|
6
|
+
export declare function audio(lexicons: Lexicons, path: string, def: LexUserType, value: unknown): ValidationResult;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Lexicons } from '../lexicons';
|
|
2
|
+
import { LexUserType, ValidationResult } from '../types';
|
|
3
|
+
export declare function validate(lexicons: Lexicons, path: string, def: LexUserType, value: unknown): ValidationResult;
|
|
4
|
+
export declare function array(lexicons: Lexicons, path: string, def: LexUserType, value: unknown): ValidationResult;
|
|
5
|
+
export declare function object(lexicons: Lexicons, path: string, def: LexUserType, value: unknown): ValidationResult;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Lexicons } from '../lexicons';
|
|
2
|
+
import { LexUserType, ValidationResult } from '../types';
|
|
3
|
+
export declare function validate(lexicons: Lexicons, path: string, def: LexUserType, value: unknown): ValidationResult;
|
|
4
|
+
export declare function boolean(lexicons: Lexicons, path: string, def: LexUserType, value: unknown): ValidationResult;
|
|
5
|
+
export declare function number(lexicons: Lexicons, path: string, def: LexUserType, value: unknown): ValidationResult;
|
|
6
|
+
export declare function integer(lexicons: Lexicons, path: string, def: LexUserType, value: unknown): ValidationResult;
|
|
7
|
+
export declare function string(lexicons: Lexicons, path: string, def: LexUserType, value: unknown): ValidationResult;
|
|
8
|
+
export declare function datetime(lexicons: Lexicons, path: string, def: LexUserType, value: unknown): ValidationResult;
|
|
9
|
+
export declare function unknown(lexicons: Lexicons, path: string, def: LexUserType, value: unknown): ValidationResult;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import AdxSchema from './schema';
|
|
2
|
+
import { AdxValidationResult } from './validation';
|
|
3
|
+
export declare class AdxViewValidator {
|
|
4
|
+
view: AdxSchema;
|
|
5
|
+
constructor(view: AdxSchema);
|
|
6
|
+
validateParams(value: unknown): AdxValidationResult;
|
|
7
|
+
isParamsValid(value: any): boolean;
|
|
8
|
+
assertParamsValid(value: any): AdxValidationResult;
|
|
9
|
+
validateResponse(value: unknown): AdxValidationResult;
|
|
10
|
+
isResponseValid(value: any): boolean;
|
|
11
|
+
assertResponseValid(value: any): AdxValidationResult;
|
|
12
|
+
}
|
|
13
|
+
export default AdxViewValidator;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"program":{"fileNames":["../../../node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/typescript/lib/lib.es2020.d.ts","../../../node_modules/typescript/lib/lib.es2021.d.ts","../../../node_modules/typescript/lib/lib.es2022.d.ts","../../../node_modules/typescript/lib/lib.esnext.d.ts","../../../node_modules/typescript/lib/lib.dom.d.ts","../../../node_modules/typescript/lib/lib.dom.iterable.d.ts","../../../node_modules/typescript/lib/lib.webworker.d.ts","../../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../../node_modules/typescript/lib/lib.es2021.promise.d.ts","../../../node_modules/typescript/lib/lib.es2021.string.d.ts","../../../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../../node_modules/typescript/lib/lib.es2021.intl.d.ts","../../../node_modules/typescript/lib/lib.es2022.array.d.ts","../../../node_modules/typescript/lib/lib.es2022.error.d.ts","../../../node_modules/typescript/lib/lib.es2022.intl.d.ts","../../../node_modules/typescript/lib/lib.es2022.object.d.ts","../../../node_modules/typescript/lib/lib.es2022.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2022.string.d.ts","../../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../../../node_modules/zod/lib/helpers/typealiases.d.ts","../../../node_modules/zod/lib/helpers/util.d.ts","../../../node_modules/zod/lib/zoderror.d.ts","../../../node_modules/zod/lib/locales/en.d.ts","../../../node_modules/zod/lib/errors.d.ts","../../../node_modules/zod/lib/helpers/parseutil.d.ts","../../../node_modules/zod/lib/helpers/enumutil.d.ts","../../../node_modules/zod/lib/helpers/errorutil.d.ts","../../../node_modules/zod/lib/helpers/partialutil.d.ts","../../../node_modules/zod/lib/types.d.ts","../../../node_modules/zod/lib/external.d.ts","../../../node_modules/zod/lib/index.d.ts","../../../node_modules/zod/index.d.ts","../../nsid/src/index.ts","../src/types.ts","../src/validators/primitives.ts","../src/validators/blob.ts","../src/validators/complex.ts","../src/util.ts","../src/validators/xrpc.ts","../src/validation.ts","../src/lexicons.ts","../src/index.ts","../../../node_modules/@babel/types/lib/index.d.ts","../../../node_modules/@types/babel__generator/index.d.ts","../../../node_modules/@babel/parser/typings/babel-parser.d.ts","../../../node_modules/@types/babel__template/index.d.ts","../../../node_modules/@types/babel__traverse/index.d.ts","../../../node_modules/@types/babel__core/index.d.ts","../../../node_modules/@types/node/ts4.8/assert.d.ts","../../../node_modules/@types/node/ts4.8/assert/strict.d.ts","../../../node_modules/@types/node/ts4.8/globals.d.ts","../../../node_modules/@types/node/ts4.8/async_hooks.d.ts","../../../node_modules/@types/node/ts4.8/buffer.d.ts","../../../node_modules/@types/node/ts4.8/child_process.d.ts","../../../node_modules/@types/node/ts4.8/cluster.d.ts","../../../node_modules/@types/node/ts4.8/console.d.ts","../../../node_modules/@types/node/ts4.8/constants.d.ts","../../../node_modules/@types/node/ts4.8/crypto.d.ts","../../../node_modules/@types/node/ts4.8/dgram.d.ts","../../../node_modules/@types/node/ts4.8/diagnostics_channel.d.ts","../../../node_modules/@types/node/ts4.8/dns.d.ts","../../../node_modules/@types/node/ts4.8/dns/promises.d.ts","../../../node_modules/@types/node/ts4.8/domain.d.ts","../../../node_modules/@types/node/ts4.8/dom-events.d.ts","../../../node_modules/@types/node/ts4.8/events.d.ts","../../../node_modules/@types/node/ts4.8/fs.d.ts","../../../node_modules/@types/node/ts4.8/fs/promises.d.ts","../../../node_modules/@types/node/ts4.8/http.d.ts","../../../node_modules/@types/node/ts4.8/http2.d.ts","../../../node_modules/@types/node/ts4.8/https.d.ts","../../../node_modules/@types/node/ts4.8/inspector.d.ts","../../../node_modules/@types/node/ts4.8/module.d.ts","../../../node_modules/@types/node/ts4.8/net.d.ts","../../../node_modules/@types/node/ts4.8/os.d.ts","../../../node_modules/@types/node/ts4.8/path.d.ts","../../../node_modules/@types/node/ts4.8/perf_hooks.d.ts","../../../node_modules/@types/node/ts4.8/process.d.ts","../../../node_modules/@types/node/ts4.8/punycode.d.ts","../../../node_modules/@types/node/ts4.8/querystring.d.ts","../../../node_modules/@types/node/ts4.8/readline.d.ts","../../../node_modules/@types/node/ts4.8/readline/promises.d.ts","../../../node_modules/@types/node/ts4.8/repl.d.ts","../../../node_modules/@types/node/ts4.8/stream.d.ts","../../../node_modules/@types/node/ts4.8/stream/promises.d.ts","../../../node_modules/@types/node/ts4.8/stream/consumers.d.ts","../../../node_modules/@types/node/ts4.8/stream/web.d.ts","../../../node_modules/@types/node/ts4.8/string_decoder.d.ts","../../../node_modules/@types/node/ts4.8/test.d.ts","../../../node_modules/@types/node/ts4.8/timers.d.ts","../../../node_modules/@types/node/ts4.8/timers/promises.d.ts","../../../node_modules/@types/node/ts4.8/tls.d.ts","../../../node_modules/@types/node/ts4.8/trace_events.d.ts","../../../node_modules/@types/node/ts4.8/tty.d.ts","../../../node_modules/@types/node/ts4.8/url.d.ts","../../../node_modules/@types/node/ts4.8/util.d.ts","../../../node_modules/@types/node/ts4.8/v8.d.ts","../../../node_modules/@types/node/ts4.8/vm.d.ts","../../../node_modules/@types/node/ts4.8/wasi.d.ts","../../../node_modules/@types/node/ts4.8/worker_threads.d.ts","../../../node_modules/@types/node/ts4.8/zlib.d.ts","../../../node_modules/@types/node/ts4.8/globals.global.d.ts","../../../node_modules/@types/node/ts4.8/index.d.ts","../../../node_modules/@types/bn.js/index.d.ts","../../../node_modules/@types/connect/index.d.ts","../../../node_modules/@types/body-parser/index.d.ts","../../../node_modules/@types/cors/index.d.ts","../../../node_modules/@types/elliptic/index.d.ts","../../../node_modules/@types/range-parser/index.d.ts","../../../node_modules/@types/qs/index.d.ts","../../../node_modules/@types/express-serve-static-core/index.d.ts","../../../node_modules/@types/mime/mime.d.ts","../../../node_modules/@types/mime/index.d.ts","../../../node_modules/@types/serve-static/index.d.ts","../../../node_modules/@types/express/index.d.ts","../../../node_modules/@types/graceful-fs/index.d.ts","../../../node_modules/@types/http-errors/index.d.ts","../../../node_modules/@types/istanbul-lib-coverage/index.d.ts","../../../node_modules/@types/istanbul-lib-report/index.d.ts","../../../node_modules/@types/istanbul-reports/index.d.ts","../../../node_modules/@jest/expect-utils/build/index.d.ts","../../../node_modules/chalk/index.d.ts","../../../node_modules/@sinclair/typebox/typebox.d.ts","../../../node_modules/@jest/schemas/build/index.d.ts","../../../node_modules/pretty-format/build/index.d.ts","../../../node_modules/jest-diff/build/index.d.ts","../../../node_modules/jest-matcher-utils/build/index.d.ts","../../../node_modules/expect/build/index.d.ts","../../../node_modules/@types/jest/index.d.ts","../../../node_modules/@types/json-schema/index.d.ts","../../../node_modules/@types/jsonwebtoken/index.d.ts","../../../node_modules/@types/minimatch/index.d.ts","../../../node_modules/@types/minimist/index.d.ts","../../../node_modules/@types/nodemailer/lib/dkim/index.d.ts","../../../node_modules/@types/nodemailer/lib/mailer/mail-message.d.ts","../../../node_modules/@types/nodemailer/lib/xoauth2/index.d.ts","../../../node_modules/@types/nodemailer/lib/mailer/index.d.ts","../../../node_modules/@types/nodemailer/lib/mime-node/index.d.ts","../../../node_modules/@types/nodemailer/lib/smtp-connection/index.d.ts","../../../node_modules/@types/nodemailer/lib/shared/index.d.ts","../../../node_modules/@types/nodemailer/lib/json-transport/index.d.ts","../../../node_modules/@types/nodemailer/lib/sendmail-transport/index.d.ts","../../../node_modules/@types/nodemailer/lib/ses-transport/index.d.ts","../../../node_modules/@types/nodemailer/lib/smtp-pool/index.d.ts","../../../node_modules/@types/nodemailer/lib/smtp-transport/index.d.ts","../../../node_modules/@types/nodemailer/lib/stream-transport/index.d.ts","../../../node_modules/@types/nodemailer/index.d.ts","../../../node_modules/@types/normalize-package-data/index.d.ts","../../../node_modules/@types/parse-json/index.d.ts","../../../node_modules/pg-types/index.d.ts","../../../node_modules/pg-protocol/dist/messages.d.ts","../../../node_modules/pg-protocol/dist/serializer.d.ts","../../../node_modules/pg-protocol/dist/parser.d.ts","../../../node_modules/pg-protocol/dist/index.d.ts","../../../node_modules/@types/pg/index.d.ts","../../../node_modules/@types/prettier/index.d.ts","../../../node_modules/@types/sharp/index.d.ts","../../../node_modules/@types/stack-utils/index.d.ts","../../../node_modules/@types/yargs-parser/index.d.ts","../../../node_modules/@types/yargs/index.d.ts","../../../node_modules/@types/node/index.d.ts","../../../node_modules/@types/node/http.d.ts","../../../node_modules/@types/node/events.d.ts","../../../node_modules/@types/node/fs.d.ts","../../../node_modules/@types/node/stream.d.ts","../../../node_modules/@types/node/net.d.ts","../../../node_modules/@types/node/url.d.ts","../../../node_modules/@types/node/tls.d.ts","../../../node_modules/@types/node/util.d.ts"],"fileInfos":[{"version":"f20c05dbfe50a208301d2a1da37b9931bce0466eb5a1f4fe240971b4ecc82b67","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06","e6b724280c694a9f588847f754198fb96c43d805f065c3a5b28bbc9594541c84","1fc5ab7a764205c68fa10d381b08417795fc73111d6dd16b5b1ed36badb743d9","746d62152361558ea6d6115cf0da4dd10ede041d14882ede3568bce5dc4b4f1f","d11a03592451da2d1065e09e61f4e2a9bf68f780f4f6623c18b57816a9679d17","aea179452def8a6152f98f63b191b84e7cbd69b0e248c91e61fb2e52328abe8c",{"version":"9b087de7268e4efc5f215347a62656663933d63c0b1d7b624913240367b999ea","affectsGlobalScope":true},{"version":"3260e3386d9535b804205bdddb5618a9a27735bd22927f48ad54363abcd23d45","affectsGlobalScope":true},{"version":"adb09ec0a64fc17dbbc4a228b3b18aa5f01db3440a6b0cbb02354df58674d584","affectsGlobalScope":true},{"version":"adb996790133eb33b33aadb9c09f15c2c575e71fb57a62de8bf74dbf59ec7dfb","affectsGlobalScope":true},{"version":"8cc8c5a3bac513368b0157f3d8b31cfdcfe78b56d3724f30f80ed9715e404af8","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"c5c05907c02476e4bde6b7e76a79ffcd948aedd14b6a8f56e4674221b0417398","affectsGlobalScope":true},{"version":"0d5f52b3174bee6edb81260ebcd792692c32c81fd55499d69531496f3f2b25e7","affectsGlobalScope":true},{"version":"55f400eec64d17e888e278f4def2f254b41b89515d3b88ad75d5e05f019daddd","affectsGlobalScope":true},{"version":"181f1784c6c10b751631b24ce60c7f78b20665db4550b335be179217bacc0d5f","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"75ec0bdd727d887f1b79ed6619412ea72ba3c81d92d0787ccb64bab18d261f14","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"81cac4cbc92c0c839c70f8ffb94eb61e2d32dc1c3cf6d95844ca099463cf37ea","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"d154ea5bb7f7f9001ed9153e876b2d5b8f5c2bb9ec02b3ae0d239ec769f1f2ae","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951","affectsGlobalScope":true},{"version":"6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de","affectsGlobalScope":true},{"version":"6e7997ef61de3132e4d4b2250e75343f487903ddf5370e7ce33cf1b9db9a63ed","affectsGlobalScope":true},{"version":"2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993","affectsGlobalScope":true},{"version":"09aa50414b80c023553090e2f53827f007a301bc34b0495bfb2c3c08ab9ad1eb","affectsGlobalScope":true},{"version":"d7f680a43f8cd12a6b6122c07c54ba40952b0c8aa140dcfcf32eb9e6cb028596","affectsGlobalScope":true},{"version":"3787b83e297de7c315d55d4a7c546ae28e5f6c0a361b7a1dcec1f1f50a54ef11","affectsGlobalScope":true},{"version":"e7e8e1d368290e9295ef18ca23f405cf40d5456fa9f20db6373a61ca45f75f40","affectsGlobalScope":true},{"version":"faf0221ae0465363c842ce6aa8a0cbda5d9296940a8e26c86e04cc4081eea21e","affectsGlobalScope":true},{"version":"06393d13ea207a1bfe08ec8d7be562549c5e2da8983f2ee074e00002629d1871","affectsGlobalScope":true},{"version":"775d9c9fd150d5de79e0450f35bc8b8f94ae64e3eb5da12725ff2a649dccc777","affectsGlobalScope":true},{"version":"b248e32ca52e8f5571390a4142558ae4f203ae2f94d5bac38a3084d529ef4e58","affectsGlobalScope":true},{"version":"6c55633c733c8378db65ac3da7a767c3cf2cf3057f0565a9124a16a3a2019e87","affectsGlobalScope":true},{"version":"fb4416144c1bf0323ccbc9afb0ab289c07312214e8820ad17d709498c865a3fe","affectsGlobalScope":true},{"version":"5b0ca94ec819d68d33da516306c15297acec88efeb0ae9e2b39f71dbd9685ef7","affectsGlobalScope":true},{"version":"34c839eaaa6d78c8674ae2c37af2236dee6831b13db7b4ef4df3ec889a04d4f2","affectsGlobalScope":true},{"version":"34478567f8a80171f88f2f30808beb7da15eac0538ae91282dd33dce928d98ed","affectsGlobalScope":true},{"version":"ab7d58e6161a550ff92e5aff755dc37fe896245348332cd5f1e1203479fe0ed1","affectsGlobalScope":true},{"version":"6bda95ea27a59a276e46043b7065b55bd4b316c25e70e29b572958fa77565d43","affectsGlobalScope":true},{"version":"aedb8de1abb2ff1095c153854a6df7deae4a5709c37297f9d6e9948b6806fa66","affectsGlobalScope":true},{"version":"a4da0551fd39b90ca7ce5f68fb55d4dc0c1396d589b612e1902f68ee090aaada","affectsGlobalScope":true},{"version":"11ffe3c281f375fff9ffdde8bbec7669b4dd671905509079f866f2354a788064","affectsGlobalScope":true},{"version":"52d1bb7ab7a3306fd0375c8bff560feed26ed676a5b0457fa8027b563aecb9a4","affectsGlobalScope":true},"9afae14803f3b7343ed6d193173008715c1fa3421a353a818c805244ed737a84","bb98c05ae5cb9bd7cb7ad76fe517251a661787a6f24337b842f47faf393f79c7","a93bf95f7009c90e7d1edb092560d4052e3ebbe9b9ad2d796bcd95dc4306825c","8485b6da53ec35637d072e516631d25dae53984500de70a6989058f24354666f","ebe80346928736532e4a822154eb77f57ef3389dbe2b3ba4e571366a15448ef2","c2cb3c8ff388781258ea9ddbcd8a947f751bddd6886e1d3b3ea09ddaa895df80","f672c876c1a04a223cf2023b3d91e8a52bb1544c576b81bf64a8fec82be9969c","014b34d4c2ef27191fdf3feabb6557ec92127f813910725b6e79ed9a49e466b6","72efc3e8cee3cb13144cb63bb8aacf28f918439a2ff222de89e0e5d7ba9c7170","b61efb129c7011068cb4ccbbd86d5741ac82653476b09f46d3d06dd99b5b687e","2b7961486503fa279a4f1a52928d8c31fc6558c335b750878721467210552dd7","d1f62988c7e8e8650f7ed39520a766648155abbf75dd89f60e24f069433301d4","5568d7c32e5cf5f35e092649f4e5e168c3114c800b1d7545b7ae5e0415704802","14e6f51486f4234e46f1b2c09c852989754de877fda7b2afdd709627e24b9882",{"version":"207dbf55dfe32ef1298e5945f196911bb7fb75a2ebd15e3606c65535ad8f474d","signature":"b435c6342f547e830b4904425b8a430cfa022bf159ea2d4d841d8bdbdfee21dc"},{"version":"3d20a183069527c92a7d6cb79ca521fa4f8cc9d36b56cb269db4088c220d0ac9","signature":"e7778192de29a6a8aae9395394b523984ad598147a7014966826bda5f5854346"},{"version":"4c8aa3b64e4973c8d22231943bc8ebbecdc3c2d8c6aaac829151c3dbc0bfc7c8","signature":"bcced1fb6651f23d180730f79c885cc1c27f8773bb3587df3521962374d5a4b5"},{"version":"4f5e1e2785adc88653b1888a315532329a4b615a09a422c2bc1cb2f49df33740","signature":"9b119134ec6b78ab1f0d5e51a9307712a5ef432b38df87344bfef6bc6adc7bd7"},{"version":"906dd0e8fa586117f9ed4dd86573c68b1a1080adc63221429f8b29975d357714","signature":"9bd0ee27b8654e9dc684ee03bdd65938529b8b1b3e7487893026fcfaedbfa38b"},{"version":"2861e0a8090f7ebd61dd1fa9970b04a5a2afe911ab4baca19cdc21a8e6ed9b28","signature":"00b74781e4064dfac7e73337fcc7dc79fb931b2a4ab5d8870a88c623b3f3ae9d"},{"version":"0966a4236c1616d428cf4615cffb6fcd8bc16c0f4852a8146610ec3cb48af913","signature":"31b9727cf2d26267b352d2cf863136f50add4ec0de54a606c2d01dfa811bcb67"},{"version":"8859c7be12542da46ae05d00f5e9eccd8aba56ad687852b3565bf40e94a5924e","signature":"cc0f042e95351028a5add6d55707f8e9e3c153967b6ab0641af16b98274ad281"},{"version":"b4e1ab9692322413a0095065c5a5e8a4f433e2b082d02635b82fae7e17a8fc6a","signature":"81dbb6c96e55a01e76c340b79b308c47f156f1e443a27034d3a0736181ad8f69"},"c561efdf5ba0b62619745d4761fe2d9756f23db972e039367d15922fed67fd2f","cc957354aa3c94c9961ebf46282cfde1e81d107fc5785a61f62c67f1dd3ac2eb","7ec238b220ea991b6643e24191b1f552a65956d5f6de4c6144e700b9985265d8","93de1c6dab503f053efe8d304cb522bb3a89feab8c98f307a674a4fae04773e9","dae3d1adc67ac3dbd1cd471889301339ec439837b5df565982345be20c8fca9a","5426e62886b7be7806312d31a00e8f7dccd6fe63ba9bbefe99ee2eab29cc48a3","7e771891adaa85b690266bc37bd6eb43bc57eecc4b54693ead36467e7369952a","a69c09dbea52352f479d3e7ac949fde3d17b195abe90b045d619f747b38d6d1a",{"version":"02873d070f9cb79f50833fbf4a9a27ac578a2edf8ddb8421eba1b37faba83bfb","affectsGlobalScope":true},"21a167fec8f933752fb8157f06d28fab6817af3ad9b0bdb1908a10762391eab9",{"version":"c0db280fa6b09d7b8d6720a19a47f485956a41ee0e6914f1b704033eb69c6058","affectsGlobalScope":true},"0c0cee62cb619aed81133b904f644515ba3064487002a7da83fd8aa07b1b4abd","5a94487653355b56018122d92392beb2e5f4a6c63ba5cef83bbe1c99775ef713",{"version":"d5135ad93b33adcce80b18f8065087934cdc1730d63db58562edcf017e1aad9b","affectsGlobalScope":true},"82408ed3e959ddc60d3e9904481b5a8dc16469928257af22a3f7d1a3bc7fd8c4","afcc1c426b76db7ec80e563d4fb0ba9e6bcc6e63c2d7e9342e649dc56d26347f","bb9c4ffa5e6290c6980b63c815cdd1625876dadb2efaf77edbe82984be93e55e","489532ff54b714f0e0939947a1c560e516d3ae93d51d639ab02e907a0e950114","f30bb836526d930a74593f7b0f5c1c46d10856415a8f69e5e2fc3db80371e362","14b5aa23c5d0ae1907bc696ac7b6915d88f7d85799cc0dc2dcf98fbce2c5a67c","5c439dafdc09abe4d6c260a96b822fa0ba5be7203c71a63ab1f1423cd9e838ea",{"version":"6b526a5ec4a401ca7c26cfe6a48e641d8f30af76673bad3b06a1b4504594a960","affectsGlobalScope":true},{"version":"816ad2e607a96de5bcac7d437f843f5afd8957f1fa5eefa6bba8e4ed7ca8fd84","affectsGlobalScope":true},"cec36af22f514322f870e81d30675c78df82ae8bf4863f5fd4e4424c040c678d","d903fafe96674bc0b2ac38a5be4a8fc07b14c2548d1cdb165a80ea24c44c0c54","b01a80007e448d035a16c74b5c95a5405b2e81b12fabcf18b75aa9eb9ef28990","04eb6578a588d6a46f50299b55f30e3a04ef27d0c5a46c57d8fcc211cd530faa","dbe5aa5a5dd8bd1c6a8d11b1310c3f0cdabaacc78a37b394a8c7b14faeb5fb84","2c828a5405191d006115ab34e191b8474bc6c86ffdc401d1a9864b1b6e088a58",{"version":"e8b18c6385ff784228a6f369694fcf1a6b475355ba89090a88de13587a9391d5","affectsGlobalScope":true},"d4ac44f01d42f541631c5fc88d0ed8efac29a3a3ad9a745d9fd58f8b61ed132e","7c013aa892414a7fdcfd861ae524a668eaa3ede8c7c0acafaf611948122c8d93","b0973c3cbcdc59b37bf477731d468696ecaf442593ec51bab497a613a580fe30",{"version":"4989e92ba5b69b182d2caaea6295af52b7dc73a4f7a2e336a676722884e7139d","affectsGlobalScope":true},{"version":"b3624aed92dab6da8484280d3cb3e2f4130ec3f4ef3f8201c95144ae9e898bb6","affectsGlobalScope":true},"5153a2fd150e46ce57bb3f8db1318d33f6ad3261ed70ceeff92281c0608c74a3","210d54cd652ec0fec8c8916e4af59bb341065576ecda039842f9ffb2e908507c","36b03690b628eab08703d63f04eaa89c5df202e5f1edf3989f13ad389cd2c091","0effadd232a20498b11308058e334d3339cc5bf8c4c858393e38d9d4c0013dcf","25846d43937c672bab7e8195f3d881f93495df712ee901860effc109918938cc","3163f47436da41706c6e2b3c1511f3b7cce9f9f3905b2f3e01246c48b4ba7d14","1b952304137851e45bc009785de89ada562d9376177c97e37702e39e60c2f1ff","69ee23dd0d215b09907ad30d23f88b7790c93329d1faf31d7835552a10cf7cbf","44b8b584a338b190a59f4f6929d072431950c7bd92ec2694821c11bce180c8a5","23b89798789dffbd437c0c423f5d02d11f9736aea73d6abf16db4f812ff36eda","213fc4f2b172d8beb74b77d7c1b41488d67348066d185e4263470cbb010cd6e8",{"version":"970a90f76d4d219ad60819d61f5994514087ba94c985647a3474a5a3d12714ed","affectsGlobalScope":true},"664d8f2d59164f2e08c543981453893bc7e003e4dfd29651ce09db13e9457980","4c8525f256873c7ba3135338c647eaf0ca7115a1a2805ae2d0056629461186ce","3c13ef48634e7b5012fcf7e8fce7496352c2d779a7201389ca96a2a81ee4314d","5d0a25ec910fa36595f85a67ac992d7a53dd4064a1ba6aea1c9f14ab73a023f2",{"version":"f0900cd5d00fe1263ff41201fb8073dbeb984397e4af3b8002a5c207a30bdc33","affectsGlobalScope":true},{"version":"f7db71191aa7aac5d6bc927ed6e7075c2763d22c7238227ec0c63c8cf5cb6a8b","affectsGlobalScope":true},"06d7c42d256f0ce6afe1b2b6cfbc97ab391f29dadb00dd0ae8e8f23f5bc916c3","ec4bd1b200670fb567920db572d6701ed42a9641d09c4ff6869768c8f81b404c","e59a892d87e72733e2a9ca21611b9beb52977be2696c7ba4b216cbbb9a48f5aa",{"version":"da26af7362f53d122283bc69fed862b9a9fe27e01bc6a69d1d682e0e5a4df3e6","affectsGlobalScope":true},"8a300fa9b698845a1f9c41ecbe2c5966634582a8e2020d51abcace9b55aa959e",{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true},"652ee9c5103e89102d87bc20d167a02a0e3e5e53665674466c8cfea8a9e418c7","01f7828047b5c6703d3c601473618b448f5506a88fcac852638b0715c3abf4eb","6d829824ead8999f87b6df21200df3c6150391b894b4e80662caa462bd48d073","afc559c1b93df37c25aef6b3dfa2d64325b0e112e887ee18bf7e6f4ec383fc90","6fbd58e4015b9ae31ea977d4d549eb24a1102cc798b57ec5d70868b542c06612","b8a427b9fe88504a6fb092e21adfe272d144394a2ced7f9e4adc3de7efa6e216","16d51f964ec125ad2024cf03f0af444b3bc3ec3614d9345cc54d09bab45c9a4c","ba601641fac98c229ccd4a303f747de376d761babb33229bb7153bed9356c9cc",{"version":"ae3fe461989bbd951344efc1f1fe932360ce7392e6126bdb225a82a1bbaf15ee","affectsGlobalScope":true},"5b9ecf7da4d71cf3832dbb8336150fa924631811f488ad4690c2dfec2b4fb1d7","951c85f75aac041dddbedfedf565886a7b494e29ec1532e2a9b4a6180560b50e","f47887b61c6cf2f48746980390d6cb5b8013518951d912cfb37fe748071942be","15c88bfd1b8dc7231ff828ae8df5d955bae5ebca4cf2bcb417af5821e52299ae","3ebae8c00411116a66fca65b08228ea0cf0b72724701f9b854442100aab55aba","f463d61cf39c3a6a5f96cdf7adfdb72a0b1d663f7b5d5b6dd042adba835430c2","8b06ac3faeacb8484d84ddb44571d8f410697f98d7bfa86c0fda60373a9f5215","7eb06594824ada538b1d8b48c3925a83e7db792f47a081a62cf3e5c4e23cf0ee","f5638f7c2f12a9a1a57b5c41b3c1ea7db3876c003bab68e6a57afd6bcc169af0","763e521cf114b80e0dd0e21ca49b9f8ae62e8999555a5e7bade8ce36b33001c2","0d14fa22c41fdc7277e6f71473b20ebc07f40f00e38875142335d5b63cdfc9d2","3e6bbb0883148627ca0854a9f62d820aaf1a0f1842f5568176721fef156b8f23","ffcc5500e77223169833fc6eb59b3a507944a1f89574e0a1276b0ea7fc22c4a4","22f13de9e2fe5f0f4724797abd3d34a1cdd6e47ef81fc4933fea3b8bf4ad524b","e3ba509d3dce019b3190ceb2f3fc88e2610ab717122dabd91a9efaa37804040d","cda0cb09b995489b7f4c57f168cd31b83dcbaa7aad49612734fb3c9c73f6e4f2","f72f8428f3c1caa22e9c247d046603b85b442c0dae7b77a7a0bc092c18867cb7",{"version":"195f63105abc03e72b6a176e3e34dfb5ac932b55db378fdc7874b1617e24b465","affectsGlobalScope":true},"f3e604694b624fa3f83f6684185452992088f5efb2cf136b62474aa106d6f1b6","bb4ed283cfb3db7ec1d4bb79c37f5e96d39b340f1f4de995c4b0b836c8d5fa05","8841e2aa774b89bd23302dede20663306dc1b9902431ac64b24be8b8d0e3f649","209e814e8e71aec74f69686a9506dd7610b97ab59dcee9446266446f72a76d05","bb654d426b82e0846cd4bd7de91d637039ecdfd63c94447373490178f80846fe","db90f54098b237753ac9c846e39cd49aa538dcad07a2e1c68a138f3c0f8e621d","92ad68795c32309fb43576cacb38bd2677deeed38f5730dcd4a8c5e65463ae15","4b16417aab5a4b276fd4a7db95120a8c7b4d49a6d68ddfe075e9f46dcbf22f00","eecb2ea10a1500dcc6bdeff14be1fb43806f63a9b8562e16e1b4fc8baa8dfa8d","221a6ab66d611349faaf80af49c7a34d95623787610fd153fed4da0811abdcae","f3d84d6f83cf131e4db335dc8100898adbeb01dd4cf4e2fe695ab220eac98be4","6521aaade4e1d23cbc4b665083b004aeaca23f3347ba2422f88d1828968a0056","e79130cf2ba010f2b79747bf43b086252ad041b130768331a1144c0a86185877","e9709ed827c40789c669736fc78e2ab603605e8e81325d1e6d7a5eb451810dd0","dafce7a7b279977940b6b4b50017625e4f922f73094433d2875994bdc0b27e87","6fc76efbb61d3336833ef44ff3f37552667f26c2a73b368f3b4b259f19f2c234","479496e5bb48f2f5e981ef646665bc09fd9ab080e86e9ea882ca4369411604af","6c559dee3c6251c261b67df08e01d4cbc89cbd7a63300150c636705733cebfff","6fa0008bf91a4cc9c8963bace4bba0bd6865cbfa29c3e3ccc461155660fb113a","2b8264b2fefd7367e0f20e2c04eed5d3038831fe00f5efbc110ff0131aab899b","f60e3e3060207ac982da13363181fd7ee4beecc19a7c569f0d6bb034331066c2","17230b34bb564a3a2e36f9d3985372ccab4ad1722df2c43f7c5c2b553f68e5db","87ed0f84f0691d5c724b23159db96342e6b04ac69201b02c65936f4281ce1fbe","13868c5792808236b17dfe2803eafce911ea4d09d3b2fda95391891a494f988f","0dfe35191a04e8f9dc7caeb9f52f2ee07402736563d12cbccd15fb5f31ac877f","fa5c2d3fcd8e227e180815df0a0903ed4b116400452af8a75ac5b68e5e1de9da","93c4fc5b5237c09bc9ed65cb8f0dc1d89034406ab40500b89701341994897142","9adb78bae51a473d33f40da9bdb50c0e491d1cc7a5db776665853effa0cd3374","b0d10e46cfe3f6c476b69af02eaa38e4ccc7430221ce3109ae84bb9fb8282298","70e9a18da08294f75bf23e46c7d69e67634c0765d355887b9b41f0d959e1426e","28288f5e5f8b7b895ed2abe6359c1da3e0d14a64b5aef985071285671f347c01"],"options":{"allowSyntheticDefaultImports":true,"composite":true,"declaration":true,"emitDeclarationOnly":true,"emitDecoratorMetadata":true,"esModuleInterop":true,"experimentalDecorators":true,"jsx":1,"module":1,"noImplicitAny":false,"outDir":"./","removeComments":true,"skipLibCheck":true,"sourceMap":true,"strict":true,"strictPropertyInitialization":false,"target":7},"fileIdsList":[[80,132],[132],[132,159],[80,81,82,83,84,132],[80,82,132],[132,139],[105,132,139,141],[105,132,139],[105,132],[132,140],[102,105,132,139,145,146],[132,142,146,147,150],[103,132,139],[132,154],[132,155],[132,161,164],[132,148],[132,149],[86,132],[89,132],[90,95,123,132],[91,102,103,110,120,131,132],[91,92,102,110,132],[93,132],[94,95,103,111,132],[95,120,128,132],[96,98,102,110,132],[97,132],[98,99,132],[102,132],[100,102,132],[102,103,104,120,131,132],[102,103,104,117,120,123,132],[132,136],[105,110,120,131,132],[102,103,105,106,110,120,128,131,132],[105,107,120,128,131,132],[86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138],[102,108,132],[109,131,132],[98,102,110,120,132],[111,132],[112,132],[89,113,132],[114,130,132,136],[115,132],[116,132],[102,117,118,132],[117,119,132,134],[90,102,120,121,122,123,132],[90,120,122,132],[120,121,132],[123,132],[124,132],[102,126,127,132],[126,127,132],[95,110,120,128,132],[129,132],[110,130,132],[90,105,116,131,132],[95,132],[120,132,133],[132,134],[132,135],[90,95,102,104,113,120,131,132,134,136],[120,132,137],[132,139,171,173,177,178,179,180,181,182],[120,132,139],[102,132,139,171,173,174,176,183],[102,110,120,131,132,139,170,171,172,174,175,176,183],[120,132,139,173,174],[120,132,139,173,175],[132,139,171,173,174,176,183],[120,132,139,175],[102,110,120,128,132,139,172,174,176],[102,132,139,171,173,174,175,176,183],[102,120,132,139,171,172,173,174,175,176,183],[102,120,132,139,171,173,174,176,183],[105,120,132,139,176],[102,120,128,132,139,186,187,190,191],[105,132,139,149],[132,195],[132,157,163],[132,161],[132,158,162],[132,139,187,188,189],[120,132,139,187],[132,160],[68,132],[59,60,132],[57,58,59,61,62,66,132],[58,59,132],[67,132],[59,132],[57,58,59,62,63,64,65,132],[57,58,68,132],[71,78,132],[69,71,75,77,132],[69,70,132],[71,74,78,132],[71,74,75,76,78,132],[71,72,73,75,78,132],[71,72,78,132],[80],[159],[80,81,82,83,84],[80,82],[197],[141,197,198],[197,198],[198],[140],[145,146,197,198,199],[142,146,147,150],[197,200],[154],[155],[161,164],[148],[149],[171,173,177,178,179,180,181,182,197],[197,201],[171,173,174,176,183,197,199],[170,171,172,174,175,176,183,197,199,201,202,203],[173,174,197,201],[173,175,197,201],[171,173,174,176,183,197],[175,197,201],[172,174,176,197,199,201,202,204],[171,173,174,175,176,183,197,199],[171,172,173,174,175,176,183,197,199,201],[171,173,174,176,183,197,199,201],[176,197,198,201],[186,187,190,191,197,199,201,204,205],[149,197,198],[195],[157,163],[161],[158,162],[187,188,189,197,205],[197,205],[187,197,201,205],[205],[160],[68],[59,60],[57,58,59,61,62,66],[58,59],[67],[59],[57,58,59,62,63,64,65],[57,58,68],[71,78],[71],[69]],"referencedMap":[[82,1],[80,2],[157,2],[160,3],[159,2],[85,4],[81,1],[83,5],[84,1],[140,6],[142,7],[141,8],[143,9],[144,10],[147,11],[151,12],[152,13],[153,2],[154,2],[155,14],[156,15],[165,16],[166,2],[167,6],[149,17],[148,18],[168,2],[169,2],[86,19],[87,19],[89,20],[90,21],[91,22],[92,23],[93,24],[94,25],[95,26],[96,27],[97,28],[98,29],[99,29],[101,30],[100,31],[102,30],[103,32],[104,33],[88,34],[138,2],[105,35],[106,36],[107,37],[139,38],[108,39],[109,40],[110,41],[111,42],[112,43],[113,44],[114,45],[115,46],[116,47],[117,48],[118,48],[119,49],[120,50],[122,51],[121,52],[123,53],[124,54],[125,2],[126,55],[127,56],[128,57],[129,58],[130,59],[131,60],[132,61],[133,62],[134,63],[135,64],[136,65],[137,66],[183,67],[170,68],[177,69],[173,70],[171,71],[174,72],[178,73],[179,69],[176,74],[175,75],[180,76],[181,77],[182,78],[172,79],[184,2],[185,2],[191,80],[192,2],[146,2],[145,2],[150,81],[193,68],[194,2],[195,2],[196,82],[158,2],[164,83],[162,84],[163,85],[190,86],[187,6],[189,87],[188,6],[186,2],[161,88],[11,2],[12,2],[15,2],[14,2],[2,2],[16,2],[17,2],[18,2],[19,2],[20,2],[21,2],[22,2],[23,2],[3,2],[4,2],[27,2],[24,2],[25,2],[26,2],[28,2],[29,2],[30,2],[5,2],[31,2],[32,2],[33,2],[34,2],[6,2],[35,2],[36,2],[37,2],[38,2],[7,2],[39,2],[44,2],[45,2],[40,2],[41,2],[42,2],[43,2],[8,2],[49,2],[46,2],[47,2],[48,2],[50,2],[9,2],[51,2],[52,2],[53,2],[54,2],[55,2],[1,2],[10,2],[56,2],[13,2],[69,89],[61,90],[67,91],[63,2],[64,2],[62,92],[65,89],[57,2],[58,2],[68,93],[60,94],[66,95],[59,96],[79,97],[78,98],[71,99],[75,100],[77,101],[73,97],[74,102],[72,97],[76,103],[70,2]],"exportedModulesMap":[[82,104],[160,105],[85,106],[81,104],[83,107],[84,104],[140,108],[142,109],[141,110],[143,111],[144,112],[147,113],[151,114],[152,115],[155,116],[156,117],[165,118],[167,108],[149,119],[148,120],[86,19],[87,19],[89,20],[90,21],[91,22],[92,23],[93,24],[94,25],[95,26],[96,27],[97,28],[98,29],[99,29],[101,30],[100,31],[102,30],[103,32],[104,33],[88,34],[138,2],[105,35],[106,36],[107,37],[139,38],[108,39],[109,40],[110,41],[111,42],[112,43],[113,44],[114,45],[115,46],[116,47],[117,48],[118,48],[119,49],[120,50],[122,51],[121,52],[123,53],[124,54],[125,2],[126,55],[127,56],[128,57],[129,58],[130,59],[131,60],[132,61],[133,62],[134,63],[135,64],[136,65],[137,66],[183,121],[170,122],[177,123],[173,124],[171,125],[174,126],[178,127],[179,123],[176,128],[175,129],[180,130],[181,131],[182,132],[172,133],[191,134],[150,135],[193,68],[196,136],[164,137],[162,138],[163,139],[190,140],[187,141],[189,142],[188,141],[186,143],[161,144],[69,145],[61,146],[67,147],[62,148],[65,145],[68,149],[60,150],[66,151],[59,152],[79,153],[78,154],[71,155],[75,153],[77,153],[73,153],[74,153],[72,153],[76,153]],"semanticDiagnosticsPerFile":[82,80,157,160,159,85,81,83,84,140,142,141,143,144,147,151,152,153,154,155,156,165,166,167,149,148,168,169,86,87,89,90,91,92,93,94,95,96,97,98,99,101,100,102,103,104,88,138,105,106,107,139,108,109,110,111,112,113,114,115,116,117,118,119,120,122,121,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,183,170,177,173,171,174,178,179,176,175,180,181,182,172,184,185,191,192,146,145,150,193,194,195,196,158,164,162,163,190,187,189,188,186,161,11,12,15,14,2,16,17,18,19,20,21,22,23,3,4,27,24,25,26,28,29,30,5,31,32,33,34,6,35,36,37,38,7,39,44,45,40,41,42,43,8,49,46,47,48,50,9,51,52,53,54,55,1,10,56,13,69,61,67,63,64,62,65,57,58,68,60,66,59,79,78,71,75,77,73,74,72,76,70],"latestChangedDtsFile":"./src/util.d.ts"},"version":"4.8.4"}
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
declare const adxSchemaDefinitionType: z.ZodEnum<["adxs-collection", "adxs-record", "adxs-view"]>;
|
|
3
|
+
export declare type AdxSchemaDefinitionType = z.infer<typeof adxSchemaDefinitionType>;
|
|
4
|
+
declare const adxSchemaDefinitionLocalizedStrings: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
5
|
+
nameSingular: z.ZodString;
|
|
6
|
+
namePlural: z.ZodString;
|
|
7
|
+
}, "strip", z.ZodTypeAny, {
|
|
8
|
+
nameSingular: string;
|
|
9
|
+
namePlural: string;
|
|
10
|
+
}, {
|
|
11
|
+
nameSingular: string;
|
|
12
|
+
namePlural: string;
|
|
13
|
+
}>>;
|
|
14
|
+
export declare type AdxSchemaDefinitionLocalizedStrings = z.infer<typeof adxSchemaDefinitionLocalizedStrings>;
|
|
15
|
+
export declare const adxSchemaDefinition: z.ZodObject<{
|
|
16
|
+
$type: z.ZodEnum<["adxs-collection", "adxs-record", "adxs-view"]>;
|
|
17
|
+
author: z.ZodString;
|
|
18
|
+
name: z.ZodString;
|
|
19
|
+
revision: z.ZodOptional<z.ZodNumber>;
|
|
20
|
+
locale: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
21
|
+
nameSingular: z.ZodString;
|
|
22
|
+
namePlural: z.ZodString;
|
|
23
|
+
}, "strip", z.ZodTypeAny, {
|
|
24
|
+
nameSingular: string;
|
|
25
|
+
namePlural: string;
|
|
26
|
+
}, {
|
|
27
|
+
nameSingular: string;
|
|
28
|
+
namePlural: string;
|
|
29
|
+
}>>>;
|
|
30
|
+
reads: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
31
|
+
schema: z.ZodOptional<z.ZodAny>;
|
|
32
|
+
parameters: z.ZodOptional<z.ZodAny>;
|
|
33
|
+
response: z.ZodOptional<z.ZodAny>;
|
|
34
|
+
}, "strip", z.ZodTypeAny, {
|
|
35
|
+
revision?: number | undefined;
|
|
36
|
+
locale?: Record<string, {
|
|
37
|
+
nameSingular: string;
|
|
38
|
+
namePlural: string;
|
|
39
|
+
}> | undefined;
|
|
40
|
+
reads?: string[] | undefined;
|
|
41
|
+
schema?: any;
|
|
42
|
+
parameters?: any;
|
|
43
|
+
response?: any;
|
|
44
|
+
$type: "adxs-collection" | "adxs-record" | "adxs-view";
|
|
45
|
+
author: string;
|
|
46
|
+
name: string;
|
|
47
|
+
}, {
|
|
48
|
+
revision?: number | undefined;
|
|
49
|
+
locale?: Record<string, {
|
|
50
|
+
nameSingular: string;
|
|
51
|
+
namePlural: string;
|
|
52
|
+
}> | undefined;
|
|
53
|
+
reads?: string[] | undefined;
|
|
54
|
+
schema?: any;
|
|
55
|
+
parameters?: any;
|
|
56
|
+
response?: any;
|
|
57
|
+
$type: "adxs-collection" | "adxs-record" | "adxs-view";
|
|
58
|
+
author: string;
|
|
59
|
+
name: string;
|
|
60
|
+
}>;
|
|
61
|
+
export declare type AdxSchemaDefinition = z.infer<typeof adxSchemaDefinition>;
|
|
62
|
+
export declare const adxFallbackStrings: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
63
|
+
export declare type AdxFallbackStrings = z.infer<typeof adxFallbackStrings>;
|
|
64
|
+
export declare class AdxSchemaDefinitionMalformedError extends Error {
|
|
65
|
+
schemaDef: any;
|
|
66
|
+
issues?: z.ZodIssue[] | undefined;
|
|
67
|
+
constructor(message: string, schemaDef: any, issues?: z.ZodIssue[] | undefined);
|
|
68
|
+
}
|
|
69
|
+
export declare class SchemaNotFoundError extends Error {
|
|
70
|
+
}
|
|
71
|
+
export declare class WrongSchemaTypeError extends Error {
|
|
72
|
+
}
|
|
73
|
+
export {};
|
package/dist/types.js
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
const adxSchemaDefinitionType = z.enum([
|
|
3
|
+
'adxs-collection',
|
|
4
|
+
'adxs-record',
|
|
5
|
+
'adxs-view',
|
|
6
|
+
]);
|
|
7
|
+
const adxSchemaDefinitionLocalizedStrings = z.record(z.object({
|
|
8
|
+
nameSingular: z.string(),
|
|
9
|
+
namePlural: z.string(),
|
|
10
|
+
}));
|
|
11
|
+
export const adxSchemaDefinition = z.object({
|
|
12
|
+
$type: adxSchemaDefinitionType,
|
|
13
|
+
author: z.string(),
|
|
14
|
+
name: z.string(),
|
|
15
|
+
revision: z.number().optional(),
|
|
16
|
+
locale: adxSchemaDefinitionLocalizedStrings.optional(),
|
|
17
|
+
reads: z.string().array().optional(),
|
|
18
|
+
schema: z.any().optional(),
|
|
19
|
+
parameters: z.any().optional(),
|
|
20
|
+
response: z.any().optional(),
|
|
21
|
+
});
|
|
22
|
+
export const adxFallbackStrings = z.record(z.string());
|
|
23
|
+
export class AdxSchemaDefinitionMalformedError extends Error {
|
|
24
|
+
constructor(message, schemaDef, issues) {
|
|
25
|
+
super(message);
|
|
26
|
+
this.schemaDef = schemaDef;
|
|
27
|
+
this.issues = issues;
|
|
28
|
+
this.schemaDef = schemaDef;
|
|
29
|
+
this.issues = issues;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
export class SchemaNotFoundError extends Error {
|
|
33
|
+
}
|
|
34
|
+
export class WrongSchemaTypeError extends Error {
|
|
35
|
+
}
|
package/jest.config.js
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@atproto/lexicon",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"main": "src/index.ts",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"test": "jest",
|
|
7
|
+
"prettier": "prettier --check src/",
|
|
8
|
+
"prettier:fix": "prettier --write src/",
|
|
9
|
+
"lint": "eslint . --ext .ts,.tsx",
|
|
10
|
+
"lint:fix": "yarn lint --fix",
|
|
11
|
+
"verify": "run-p prettier lint",
|
|
12
|
+
"verify:fix": "yarn prettier:fix && yarn lint:fix",
|
|
13
|
+
"build": "node ./build.js",
|
|
14
|
+
"postbuild": "tsc --build tsconfig.build.json"
|
|
15
|
+
},
|
|
16
|
+
"license": "MIT",
|
|
17
|
+
"dependencies": {
|
|
18
|
+
"@atproto/nsid": "*",
|
|
19
|
+
"zod": "^3.14.2"
|
|
20
|
+
}
|
|
21
|
+
}
|
package/src/index.ts
ADDED
package/src/lexicons.ts
ADDED
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
import { ZodError } from 'zod'
|
|
2
|
+
import {
|
|
3
|
+
LexiconDoc,
|
|
4
|
+
lexiconDoc,
|
|
5
|
+
LexRecord,
|
|
6
|
+
LexXrpcProcedure,
|
|
7
|
+
LexXrpcQuery,
|
|
8
|
+
LexUserType,
|
|
9
|
+
LexiconDocMalformedError,
|
|
10
|
+
LexiconDefNotFoundError,
|
|
11
|
+
InvalidLexiconError,
|
|
12
|
+
ValidationError,
|
|
13
|
+
isObj,
|
|
14
|
+
hasProp,
|
|
15
|
+
} from './types'
|
|
16
|
+
import {
|
|
17
|
+
assertValidRecord,
|
|
18
|
+
assertValidXrpcParams,
|
|
19
|
+
assertValidXrpcInput,
|
|
20
|
+
assertValidXrpcOutput,
|
|
21
|
+
} from './validation'
|
|
22
|
+
import { toLexUri } from './util'
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* A collection of compiled lexicons.
|
|
26
|
+
*/
|
|
27
|
+
export class Lexicons {
|
|
28
|
+
docs: Map<string, LexiconDoc> = new Map()
|
|
29
|
+
defs: Map<string, LexUserType> = new Map()
|
|
30
|
+
|
|
31
|
+
constructor(docs?: unknown[]) {
|
|
32
|
+
if (docs?.length) {
|
|
33
|
+
for (const doc of docs) {
|
|
34
|
+
this.add(doc)
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Add a lexicon doc.
|
|
41
|
+
*/
|
|
42
|
+
add(doc: unknown): void {
|
|
43
|
+
try {
|
|
44
|
+
lexiconDoc.parse(doc)
|
|
45
|
+
} catch (e) {
|
|
46
|
+
if (e instanceof ZodError) {
|
|
47
|
+
throw new LexiconDocMalformedError(
|
|
48
|
+
`Failed to parse schema definition ${
|
|
49
|
+
(doc as Record<string, string>).id
|
|
50
|
+
}`,
|
|
51
|
+
doc,
|
|
52
|
+
e.issues,
|
|
53
|
+
)
|
|
54
|
+
} else {
|
|
55
|
+
throw e
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
const validatedDoc = doc as LexiconDoc
|
|
59
|
+
const uri = toLexUri(validatedDoc.id)
|
|
60
|
+
if (this.docs.has(uri)) {
|
|
61
|
+
throw new Error(`${uri} has already been registered`)
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
// WARNING
|
|
65
|
+
// mutates the object
|
|
66
|
+
// -prf
|
|
67
|
+
resolveRefUris(validatedDoc, uri)
|
|
68
|
+
|
|
69
|
+
this.docs.set(uri, validatedDoc)
|
|
70
|
+
for (const [defUri, def] of iterDefs(validatedDoc)) {
|
|
71
|
+
this.defs.set(defUri, def)
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Remove a lexicon doc.
|
|
77
|
+
*/
|
|
78
|
+
remove(uri: string) {
|
|
79
|
+
uri = toLexUri(uri)
|
|
80
|
+
const doc = this.docs.get(uri)
|
|
81
|
+
if (!doc) {
|
|
82
|
+
throw new Error(`Unable to remove "${uri}": does not exist`)
|
|
83
|
+
}
|
|
84
|
+
for (const [defUri, _def] of iterDefs(doc)) {
|
|
85
|
+
this.defs.delete(defUri)
|
|
86
|
+
}
|
|
87
|
+
this.docs.delete(uri)
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Get a lexicon doc.
|
|
92
|
+
*/
|
|
93
|
+
get(uri: string): LexiconDoc | undefined {
|
|
94
|
+
uri = toLexUri(uri)
|
|
95
|
+
return this.docs.get(uri)
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Get a definition.
|
|
100
|
+
*/
|
|
101
|
+
getDef(uri: string): LexUserType | undefined {
|
|
102
|
+
uri = toLexUri(uri)
|
|
103
|
+
return this.defs.get(uri)
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Get a def, throw if not found. Throws on not found.
|
|
108
|
+
*/
|
|
109
|
+
getDefOrThrow(uri: string, types?: string[]): LexUserType {
|
|
110
|
+
const def = this.getDef(uri)
|
|
111
|
+
if (!def) {
|
|
112
|
+
throw new LexiconDefNotFoundError(`Lexicon not found: ${uri}`)
|
|
113
|
+
}
|
|
114
|
+
if (types && !types.includes(def.type)) {
|
|
115
|
+
throw new InvalidLexiconError(
|
|
116
|
+
`Not a ${types.join(' or ')} lexicon: ${uri}`,
|
|
117
|
+
)
|
|
118
|
+
}
|
|
119
|
+
return def
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Validate a record and throw on any error.
|
|
124
|
+
*/
|
|
125
|
+
assertValidRecord(lexUri: string, value: unknown) {
|
|
126
|
+
lexUri = toLexUri(lexUri)
|
|
127
|
+
const def = this.getDefOrThrow(lexUri, ['record'])
|
|
128
|
+
if (!isObj(value)) {
|
|
129
|
+
throw new ValidationError(`Record must be an object`)
|
|
130
|
+
}
|
|
131
|
+
if (!hasProp(value, '$type') || typeof value.$type !== 'string') {
|
|
132
|
+
throw new ValidationError(`Record/$type must be a string`)
|
|
133
|
+
}
|
|
134
|
+
const $type = (value as Record<string, string>).$type || ''
|
|
135
|
+
if (toLexUri($type) !== lexUri) {
|
|
136
|
+
throw new ValidationError(
|
|
137
|
+
`Invalid $type: must be ${lexUri}, got ${$type}`,
|
|
138
|
+
)
|
|
139
|
+
}
|
|
140
|
+
assertValidRecord(this, def as LexRecord, value)
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* Validate xrpc query params and throw on any error.
|
|
145
|
+
*/
|
|
146
|
+
assertValidXrpcParams(lexUri: string, value: unknown) {
|
|
147
|
+
lexUri = toLexUri(lexUri)
|
|
148
|
+
const def = this.getDefOrThrow(lexUri, ['query', 'procedure'])
|
|
149
|
+
assertValidXrpcParams(this, def as LexXrpcProcedure | LexXrpcQuery, value)
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* Validate xrpc input body and throw on any error.
|
|
154
|
+
*/
|
|
155
|
+
assertValidXrpcInput(lexUri: string, value: unknown) {
|
|
156
|
+
lexUri = toLexUri(lexUri)
|
|
157
|
+
const def = this.getDefOrThrow(lexUri, ['procedure'])
|
|
158
|
+
assertValidXrpcInput(this, def as LexXrpcProcedure, value)
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* Validate xrpc output body and throw on any error.
|
|
163
|
+
*/
|
|
164
|
+
assertValidXrpcOutput(lexUri: string, value: unknown) {
|
|
165
|
+
lexUri = toLexUri(lexUri)
|
|
166
|
+
const def = this.getDefOrThrow(lexUri, ['query', 'procedure'])
|
|
167
|
+
assertValidXrpcOutput(this, def as LexXrpcProcedure | LexXrpcQuery, value)
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
function* iterDefs(doc: LexiconDoc): Generator<[string, LexUserType]> {
|
|
172
|
+
for (const defId in doc.defs) {
|
|
173
|
+
yield [`lex:${doc.id}#${defId}`, doc.defs[defId]]
|
|
174
|
+
if (defId === 'main') {
|
|
175
|
+
yield [`lex:${doc.id}`, doc.defs[defId]]
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
// WARNING
|
|
181
|
+
// this method mutates objects
|
|
182
|
+
// -prf
|
|
183
|
+
function resolveRefUris(obj: any, baseUri: string): any {
|
|
184
|
+
for (const k in obj) {
|
|
185
|
+
if (obj.type === 'ref') {
|
|
186
|
+
obj.ref = toLexUri(obj.ref, baseUri)
|
|
187
|
+
} else if (obj.type === 'union') {
|
|
188
|
+
obj.refs = obj.refs.map((ref) => toLexUri(ref, baseUri))
|
|
189
|
+
} else if (Array.isArray(obj[k])) {
|
|
190
|
+
obj[k] = obj[k].map((item: any) => {
|
|
191
|
+
if (typeof item === 'string') {
|
|
192
|
+
return item.startsWith('#') ? toLexUri(item, baseUri) : item
|
|
193
|
+
} else if (item && typeof item === 'object') {
|
|
194
|
+
return resolveRefUris(item, baseUri)
|
|
195
|
+
}
|
|
196
|
+
return item
|
|
197
|
+
})
|
|
198
|
+
} else if (obj[k] && typeof obj[k] === 'object') {
|
|
199
|
+
obj[k] = resolveRefUris(obj[k], baseUri)
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
return obj
|
|
203
|
+
}
|