@atproto/ozone 0.1.161 → 0.1.163
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 +20 -0
- package/LICENSE.txt +1 -1
- package/dist/daemon/materialized-view-refresher.d.ts.map +1 -1
- package/dist/daemon/materialized-view-refresher.js +8 -1
- package/dist/daemon/materialized-view-refresher.js.map +1 -1
- package/dist/lexicon/index.d.ts +13 -0
- package/dist/lexicon/index.d.ts.map +1 -1
- package/dist/lexicon/index.js +37 -1
- package/dist/lexicon/index.js.map +1 -1
- package/dist/lexicon/lexicons.d.ts +914 -12
- package/dist/lexicon/lexicons.d.ts.map +1 -1
- package/dist/lexicon/lexicons.js +474 -5
- package/dist/lexicon/lexicons.js.map +1 -1
- package/dist/lexicon/types/app/bsky/actor/defs.d.ts +23 -1
- package/dist/lexicon/types/app/bsky/actor/defs.d.ts.map +1 -1
- package/dist/lexicon/types/app/bsky/actor/defs.js +18 -0
- package/dist/lexicon/types/app/bsky/actor/defs.js.map +1 -1
- package/dist/lexicon/types/app/bsky/ageassurance/defs.d.ts +2 -0
- package/dist/lexicon/types/app/bsky/ageassurance/defs.d.ts.map +1 -1
- package/dist/lexicon/types/app/bsky/ageassurance/defs.js.map +1 -1
- package/dist/lexicon/types/app/bsky/draft/createDraft.d.ts +27 -0
- package/dist/lexicon/types/app/bsky/draft/createDraft.d.ts.map +1 -0
- package/dist/lexicon/types/app/bsky/draft/createDraft.js +7 -0
- package/dist/lexicon/types/app/bsky/draft/createDraft.js.map +1 -0
- package/dist/lexicon/types/app/bsky/draft/defs.d.ts +110 -0
- package/dist/lexicon/types/app/bsky/draft/defs.d.ts.map +1 -0
- package/dist/lexicon/types/app/bsky/draft/defs.js +97 -0
- package/dist/lexicon/types/app/bsky/draft/defs.js.map +1 -0
- package/dist/lexicon/types/app/bsky/draft/deleteDraft.d.ts +14 -0
- package/dist/lexicon/types/app/bsky/draft/deleteDraft.d.ts.map +1 -0
- package/dist/lexicon/types/app/bsky/draft/deleteDraft.js +7 -0
- package/dist/lexicon/types/app/bsky/draft/deleteDraft.js.map +1 -0
- package/dist/lexicon/types/app/bsky/draft/getDrafts.d.ts +24 -0
- package/dist/lexicon/types/app/bsky/draft/getDrafts.d.ts.map +1 -0
- package/dist/lexicon/types/app/bsky/draft/getDrafts.js +7 -0
- package/dist/lexicon/types/app/bsky/draft/getDrafts.js.map +1 -0
- package/dist/lexicon/types/app/bsky/draft/updateDraft.d.ts +15 -0
- package/dist/lexicon/types/app/bsky/draft/updateDraft.d.ts.map +1 -0
- package/dist/lexicon/types/app/bsky/draft/updateDraft.js +7 -0
- package/dist/lexicon/types/app/bsky/draft/updateDraft.js.map +1 -0
- package/dist/lexicon/types/app/bsky/embed/video.d.ts +4 -0
- package/dist/lexicon/types/app/bsky/embed/video.d.ts.map +1 -1
- package/dist/lexicon/types/app/bsky/embed/video.js.map +1 -1
- package/dist/lexicon/types/app/bsky/unspecced/getSuggestedUsers.d.ts +2 -0
- package/dist/lexicon/types/app/bsky/unspecced/getSuggestedUsers.d.ts.map +1 -1
- package/dist/lexicon/types/app/bsky/unspecced/getSuggestedUsers.js.map +1 -1
- package/dist/lexicon/types/app/bsky/unspecced/getSuggestedUsersSkeleton.d.ts +2 -0
- package/dist/lexicon/types/app/bsky/unspecced/getSuggestedUsersSkeleton.d.ts.map +1 -1
- package/dist/lexicon/types/app/bsky/unspecced/getSuggestedUsersSkeleton.js.map +1 -1
- package/dist/lexicon/types/com/atproto/server/deleteSession.d.ts +1 -0
- package/dist/lexicon/types/com/atproto/server/deleteSession.d.ts.map +1 -1
- package/dist/lexicon/types/com/atproto/server/deleteSession.js.map +1 -1
- package/dist/lexicon/types/com/atproto/server/getSession.d.ts +3 -3
- package/dist/lexicon/types/com/atproto/server/getSession.d.ts.map +1 -1
- package/dist/lexicon/types/com/atproto/server/getSession.js.map +1 -1
- package/dist/lexicon/types/com/atproto/server/refreshSession.d.ts +4 -1
- package/dist/lexicon/types/com/atproto/server/refreshSession.d.ts.map +1 -1
- package/dist/lexicon/types/com/atproto/server/refreshSession.js.map +1 -1
- package/dist/mod-service/util.d.ts.map +1 -1
- package/dist/mod-service/util.js +3 -1
- package/dist/mod-service/util.js.map +1 -1
- package/dist/verification/issuer.d.ts.map +1 -1
- package/dist/verification/issuer.js +9 -0
- package/dist/verification/issuer.js.map +1 -1
- package/package.json +8 -8
- package/src/daemon/materialized-view-refresher.ts +9 -3
- package/src/lexicon/index.ts +62 -0
- package/src/lexicon/lexicons.ts +491 -5
- package/src/lexicon/types/app/bsky/actor/defs.ts +41 -0
- package/src/lexicon/types/app/bsky/ageassurance/defs.ts +2 -0
- package/src/lexicon/types/app/bsky/draft/createDraft.ts +46 -0
- package/src/lexicon/types/app/bsky/draft/defs.ts +212 -0
- package/src/lexicon/types/app/bsky/draft/deleteDraft.ts +33 -0
- package/src/lexicon/types/app/bsky/draft/getDrafts.ts +42 -0
- package/src/lexicon/types/app/bsky/draft/updateDraft.ts +34 -0
- package/src/lexicon/types/app/bsky/embed/video.ts +4 -0
- package/src/lexicon/types/app/bsky/unspecced/getSuggestedUsers.ts +2 -0
- package/src/lexicon/types/app/bsky/unspecced/getSuggestedUsersSkeleton.ts +2 -0
- package/src/lexicon/types/com/atproto/server/deleteSession.ts +1 -0
- package/src/lexicon/types/com/atproto/server/getSession.ts +1 -1
- package/src/lexicon/types/com/atproto/server/refreshSession.ts +4 -1
- package/src/mod-service/util.ts +3 -2
- package/src/verification/issuer.ts +11 -0
- package/tests/query-labels.test.ts +0 -2
- package/tests/verification.test.ts +20 -0
- package/tsconfig.build.tsbuildinfo +1 -1
- package/tsconfig.tests.tsbuildinfo +0 -1
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isDraftWithId = isDraftWithId;
|
|
4
|
+
exports.validateDraftWithId = validateDraftWithId;
|
|
5
|
+
exports.isDraft = isDraft;
|
|
6
|
+
exports.validateDraft = validateDraft;
|
|
7
|
+
exports.isDraftPost = isDraftPost;
|
|
8
|
+
exports.validateDraftPost = validateDraftPost;
|
|
9
|
+
exports.isDraftView = isDraftView;
|
|
10
|
+
exports.validateDraftView = validateDraftView;
|
|
11
|
+
exports.isDraftEmbedLocalRef = isDraftEmbedLocalRef;
|
|
12
|
+
exports.validateDraftEmbedLocalRef = validateDraftEmbedLocalRef;
|
|
13
|
+
exports.isDraftEmbedCaption = isDraftEmbedCaption;
|
|
14
|
+
exports.validateDraftEmbedCaption = validateDraftEmbedCaption;
|
|
15
|
+
exports.isDraftEmbedImage = isDraftEmbedImage;
|
|
16
|
+
exports.validateDraftEmbedImage = validateDraftEmbedImage;
|
|
17
|
+
exports.isDraftEmbedVideo = isDraftEmbedVideo;
|
|
18
|
+
exports.validateDraftEmbedVideo = validateDraftEmbedVideo;
|
|
19
|
+
exports.isDraftEmbedExternal = isDraftEmbedExternal;
|
|
20
|
+
exports.validateDraftEmbedExternal = validateDraftEmbedExternal;
|
|
21
|
+
exports.isDraftEmbedRecord = isDraftEmbedRecord;
|
|
22
|
+
exports.validateDraftEmbedRecord = validateDraftEmbedRecord;
|
|
23
|
+
const lexicons_1 = require("../../../../lexicons");
|
|
24
|
+
const util_1 = require("../../../../util");
|
|
25
|
+
const is$typed = util_1.is$typed, validate = lexicons_1.validate;
|
|
26
|
+
const id = 'app.bsky.draft.defs';
|
|
27
|
+
const hashDraftWithId = 'draftWithId';
|
|
28
|
+
function isDraftWithId(v) {
|
|
29
|
+
return is$typed(v, id, hashDraftWithId);
|
|
30
|
+
}
|
|
31
|
+
function validateDraftWithId(v) {
|
|
32
|
+
return validate(v, id, hashDraftWithId);
|
|
33
|
+
}
|
|
34
|
+
const hashDraft = 'draft';
|
|
35
|
+
function isDraft(v) {
|
|
36
|
+
return is$typed(v, id, hashDraft);
|
|
37
|
+
}
|
|
38
|
+
function validateDraft(v) {
|
|
39
|
+
return validate(v, id, hashDraft);
|
|
40
|
+
}
|
|
41
|
+
const hashDraftPost = 'draftPost';
|
|
42
|
+
function isDraftPost(v) {
|
|
43
|
+
return is$typed(v, id, hashDraftPost);
|
|
44
|
+
}
|
|
45
|
+
function validateDraftPost(v) {
|
|
46
|
+
return validate(v, id, hashDraftPost);
|
|
47
|
+
}
|
|
48
|
+
const hashDraftView = 'draftView';
|
|
49
|
+
function isDraftView(v) {
|
|
50
|
+
return is$typed(v, id, hashDraftView);
|
|
51
|
+
}
|
|
52
|
+
function validateDraftView(v) {
|
|
53
|
+
return validate(v, id, hashDraftView);
|
|
54
|
+
}
|
|
55
|
+
const hashDraftEmbedLocalRef = 'draftEmbedLocalRef';
|
|
56
|
+
function isDraftEmbedLocalRef(v) {
|
|
57
|
+
return is$typed(v, id, hashDraftEmbedLocalRef);
|
|
58
|
+
}
|
|
59
|
+
function validateDraftEmbedLocalRef(v) {
|
|
60
|
+
return validate(v, id, hashDraftEmbedLocalRef);
|
|
61
|
+
}
|
|
62
|
+
const hashDraftEmbedCaption = 'draftEmbedCaption';
|
|
63
|
+
function isDraftEmbedCaption(v) {
|
|
64
|
+
return is$typed(v, id, hashDraftEmbedCaption);
|
|
65
|
+
}
|
|
66
|
+
function validateDraftEmbedCaption(v) {
|
|
67
|
+
return validate(v, id, hashDraftEmbedCaption);
|
|
68
|
+
}
|
|
69
|
+
const hashDraftEmbedImage = 'draftEmbedImage';
|
|
70
|
+
function isDraftEmbedImage(v) {
|
|
71
|
+
return is$typed(v, id, hashDraftEmbedImage);
|
|
72
|
+
}
|
|
73
|
+
function validateDraftEmbedImage(v) {
|
|
74
|
+
return validate(v, id, hashDraftEmbedImage);
|
|
75
|
+
}
|
|
76
|
+
const hashDraftEmbedVideo = 'draftEmbedVideo';
|
|
77
|
+
function isDraftEmbedVideo(v) {
|
|
78
|
+
return is$typed(v, id, hashDraftEmbedVideo);
|
|
79
|
+
}
|
|
80
|
+
function validateDraftEmbedVideo(v) {
|
|
81
|
+
return validate(v, id, hashDraftEmbedVideo);
|
|
82
|
+
}
|
|
83
|
+
const hashDraftEmbedExternal = 'draftEmbedExternal';
|
|
84
|
+
function isDraftEmbedExternal(v) {
|
|
85
|
+
return is$typed(v, id, hashDraftEmbedExternal);
|
|
86
|
+
}
|
|
87
|
+
function validateDraftEmbedExternal(v) {
|
|
88
|
+
return validate(v, id, hashDraftEmbedExternal);
|
|
89
|
+
}
|
|
90
|
+
const hashDraftEmbedRecord = 'draftEmbedRecord';
|
|
91
|
+
function isDraftEmbedRecord(v) {
|
|
92
|
+
return is$typed(v, id, hashDraftEmbedRecord);
|
|
93
|
+
}
|
|
94
|
+
function validateDraftEmbedRecord(v) {
|
|
95
|
+
return validate(v, id, hashDraftEmbedRecord);
|
|
96
|
+
}
|
|
97
|
+
//# sourceMappingURL=defs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"defs.js","sourceRoot":"","sources":["../../../../../../src/lexicon/types/app/bsky/draft/defs.ts"],"names":[],"mappings":";;AA8BA,sCAEC;AAED,kDAEC;AA8BD,0BAEC;AAED,sCAEC;AAgBD,kCAEC;AAED,8CAEC;AAgBD,kCAEC;AAED,8CAEC;AAUD,oDAEC;AAED,gEAEC;AAUD,kDAEC;AAED,8DAEC;AAUD,8CAEC;AAED,0DAEC;AAWD,8CAEC;AAED,0DAEC;AASD,oDAEC;AAED,gEAEC;AASD,gDAEC;AAED,4DAEC;AA9MD,mDAA4D;AAC5D,2CAIyB;AAMzB,MAAM,QAAQ,GAAG,eAAS,EACxB,QAAQ,GAAG,mBAAS,CAAA;AACtB,MAAM,EAAE,GAAG,qBAAqB,CAAA;AAUhC,MAAM,eAAe,GAAG,aAAa,CAAA;AAErC,SAAgB,aAAa,CAAI,CAAI;IACnC,OAAO,QAAQ,CAAC,CAAC,EAAE,EAAE,EAAE,eAAe,CAAC,CAAA;AACzC,CAAC;AAED,SAAgB,mBAAmB,CAAI,CAAI;IACzC,OAAO,QAAQ,CAAkB,CAAC,EAAE,EAAE,EAAE,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sourcesContent":["/**\n * GENERATED CODE - DO NOT MODIFY\n */\nimport { type ValidationResult, BlobRef } from '@atproto/lexicon'\nimport { CID } from 'multiformats/cid'\nimport { validate as _validate } from '../../../../lexicons'\nimport {\n type $Typed,\n is$typed as _is$typed,\n type OmitKey,\n} from '../../../../util'\nimport type * as AppBskyFeedPostgate from '../feed/postgate.js'\nimport type * as AppBskyFeedThreadgate from '../feed/threadgate.js'\nimport type * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs.js'\nimport type * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef.js'\n\nconst is$typed = _is$typed,\n validate = _validate\nconst id = 'app.bsky.draft.defs'\n\n/** A draft with an identifier, used to store drafts in private storage (stash). */\nexport interface DraftWithId {\n $type?: 'app.bsky.draft.defs#draftWithId'\n /** A TID to be used as a draft identifier. */\n id: string\n draft: Draft\n}\n\nconst hashDraftWithId = 'draftWithId'\n\nexport function isDraftWithId<V>(v: V) {\n return is$typed(v, id, hashDraftWithId)\n}\n\nexport function validateDraftWithId<V>(v: V) {\n return validate<DraftWithId & V>(v, id, hashDraftWithId)\n}\n\n/** A draft containing an array of draft posts. */\nexport interface Draft {\n $type?: 'app.bsky.draft.defs#draft'\n /** UUIDv4 identifier of the device that created this draft. */\n deviceId?: string\n /** The device and/or platform on which the draft was created. */\n deviceName?: string\n /** Array of draft posts that compose this draft. */\n posts: DraftPost[]\n /** Indicates human language of posts primary text content. */\n langs?: string[]\n /** Embedding rules for the postgates to be created when this draft is published. */\n postgateEmbeddingRules?: (\n | $Typed<AppBskyFeedPostgate.DisableRule>\n | { $type: string }\n )[]\n /** Allow-rules for the threadgate to be created when this draft is published. */\n threadgateAllow?: (\n | $Typed<AppBskyFeedThreadgate.MentionRule>\n | $Typed<AppBskyFeedThreadgate.FollowerRule>\n | $Typed<AppBskyFeedThreadgate.FollowingRule>\n | $Typed<AppBskyFeedThreadgate.ListRule>\n | { $type: string }\n )[]\n}\n\nconst hashDraft = 'draft'\n\nexport function isDraft<V>(v: V) {\n return is$typed(v, id, hashDraft)\n}\n\nexport function validateDraft<V>(v: V) {\n return validate<Draft & V>(v, id, hashDraft)\n}\n\n/** One of the posts that compose a draft. */\nexport interface DraftPost {\n $type?: 'app.bsky.draft.defs#draftPost'\n /** The primary post content. */\n text: string\n labels?: $Typed<ComAtprotoLabelDefs.SelfLabels> | { $type: string }\n embedImages?: DraftEmbedImage[]\n embedVideos?: DraftEmbedVideo[]\n embedExternals?: DraftEmbedExternal[]\n embedRecords?: DraftEmbedRecord[]\n}\n\nconst hashDraftPost = 'draftPost'\n\nexport function isDraftPost<V>(v: V) {\n return is$typed(v, id, hashDraftPost)\n}\n\nexport function validateDraftPost<V>(v: V) {\n return validate<DraftPost & V>(v, id, hashDraftPost)\n}\n\n/** View to present drafts data to users. */\nexport interface DraftView {\n $type?: 'app.bsky.draft.defs#draftView'\n /** A TID to be used as a draft identifier. */\n id: string\n draft: Draft\n /** The time the draft was created. */\n createdAt: string\n /** The time the draft was last updated. */\n updatedAt: string\n}\n\nconst hashDraftView = 'draftView'\n\nexport function isDraftView<V>(v: V) {\n return is$typed(v, id, hashDraftView)\n}\n\nexport function validateDraftView<V>(v: V) {\n return validate<DraftView & V>(v, id, hashDraftView)\n}\n\nexport interface DraftEmbedLocalRef {\n $type?: 'app.bsky.draft.defs#draftEmbedLocalRef'\n /** Local, on-device ref to file to be embedded. Embeds are currently device-bound for drafts. */\n path: string\n}\n\nconst hashDraftEmbedLocalRef = 'draftEmbedLocalRef'\n\nexport function isDraftEmbedLocalRef<V>(v: V) {\n return is$typed(v, id, hashDraftEmbedLocalRef)\n}\n\nexport function validateDraftEmbedLocalRef<V>(v: V) {\n return validate<DraftEmbedLocalRef & V>(v, id, hashDraftEmbedLocalRef)\n}\n\nexport interface DraftEmbedCaption {\n $type?: 'app.bsky.draft.defs#draftEmbedCaption'\n lang: string\n content: string\n}\n\nconst hashDraftEmbedCaption = 'draftEmbedCaption'\n\nexport function isDraftEmbedCaption<V>(v: V) {\n return is$typed(v, id, hashDraftEmbedCaption)\n}\n\nexport function validateDraftEmbedCaption<V>(v: V) {\n return validate<DraftEmbedCaption & V>(v, id, hashDraftEmbedCaption)\n}\n\nexport interface DraftEmbedImage {\n $type?: 'app.bsky.draft.defs#draftEmbedImage'\n localRef: DraftEmbedLocalRef\n alt?: string\n}\n\nconst hashDraftEmbedImage = 'draftEmbedImage'\n\nexport function isDraftEmbedImage<V>(v: V) {\n return is$typed(v, id, hashDraftEmbedImage)\n}\n\nexport function validateDraftEmbedImage<V>(v: V) {\n return validate<DraftEmbedImage & V>(v, id, hashDraftEmbedImage)\n}\n\nexport interface DraftEmbedVideo {\n $type?: 'app.bsky.draft.defs#draftEmbedVideo'\n localRef: DraftEmbedLocalRef\n alt?: string\n captions?: DraftEmbedCaption[]\n}\n\nconst hashDraftEmbedVideo = 'draftEmbedVideo'\n\nexport function isDraftEmbedVideo<V>(v: V) {\n return is$typed(v, id, hashDraftEmbedVideo)\n}\n\nexport function validateDraftEmbedVideo<V>(v: V) {\n return validate<DraftEmbedVideo & V>(v, id, hashDraftEmbedVideo)\n}\n\nexport interface DraftEmbedExternal {\n $type?: 'app.bsky.draft.defs#draftEmbedExternal'\n uri: string\n}\n\nconst hashDraftEmbedExternal = 'draftEmbedExternal'\n\nexport function isDraftEmbedExternal<V>(v: V) {\n return is$typed(v, id, hashDraftEmbedExternal)\n}\n\nexport function validateDraftEmbedExternal<V>(v: V) {\n return validate<DraftEmbedExternal & V>(v, id, hashDraftEmbedExternal)\n}\n\nexport interface DraftEmbedRecord {\n $type?: 'app.bsky.draft.defs#draftEmbedRecord'\n record: ComAtprotoRepoStrongRef.Main\n}\n\nconst hashDraftEmbedRecord = 'draftEmbedRecord'\n\nexport function isDraftEmbedRecord<V>(v: V) {\n return is$typed(v, id, hashDraftEmbedRecord)\n}\n\nexport function validateDraftEmbedRecord<V>(v: V) {\n return validate<DraftEmbedRecord & V>(v, id, hashDraftEmbedRecord)\n}\n"]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export type QueryParams = {};
|
|
2
|
+
export interface InputSchema {
|
|
3
|
+
id: string;
|
|
4
|
+
}
|
|
5
|
+
export interface HandlerInput {
|
|
6
|
+
encoding: 'application/json';
|
|
7
|
+
body: InputSchema;
|
|
8
|
+
}
|
|
9
|
+
export interface HandlerError {
|
|
10
|
+
status: number;
|
|
11
|
+
message?: string;
|
|
12
|
+
}
|
|
13
|
+
export type HandlerOutput = HandlerError | void;
|
|
14
|
+
//# sourceMappingURL=deleteDraft.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deleteDraft.d.ts","sourceRoot":"","sources":["../../../../../../src/lexicon/types/app/bsky/draft/deleteDraft.ts"],"names":[],"mappings":"AAgBA,MAAM,MAAM,WAAW,GAAG,EAAE,CAAA;AAE5B,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAA;CACX;AAED,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,kBAAkB,CAAA;IAC5B,IAAI,EAAE,WAAW,CAAA;CAClB;AAED,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAED,MAAM,MAAM,aAAa,GAAG,YAAY,GAAG,IAAI,CAAA"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const lexicons_1 = require("../../../../lexicons");
|
|
4
|
+
const util_1 = require("../../../../util");
|
|
5
|
+
const is$typed = util_1.is$typed, validate = lexicons_1.validate;
|
|
6
|
+
const id = 'app.bsky.draft.deleteDraft';
|
|
7
|
+
//# sourceMappingURL=deleteDraft.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deleteDraft.js","sourceRoot":"","sources":["../../../../../../src/lexicon/types/app/bsky/draft/deleteDraft.ts"],"names":[],"mappings":";;AAKA,mDAA4D;AAC5D,2CAIyB;AAEzB,MAAM,QAAQ,GAAG,eAAS,EACxB,QAAQ,GAAG,mBAAS,CAAA;AACtB,MAAM,EAAE,GAAG,4BAA4B,CAAA","sourcesContent":["/**\n * GENERATED CODE - DO NOT MODIFY\n */\nimport { type ValidationResult, BlobRef } from '@atproto/lexicon'\nimport { CID } from 'multiformats/cid'\nimport { validate as _validate } from '../../../../lexicons'\nimport {\n type $Typed,\n is$typed as _is$typed,\n type OmitKey,\n} from '../../../../util'\n\nconst is$typed = _is$typed,\n validate = _validate\nconst id = 'app.bsky.draft.deleteDraft'\n\nexport type QueryParams = {}\n\nexport interface InputSchema {\n id: string\n}\n\nexport interface HandlerInput {\n encoding: 'application/json'\n body: InputSchema\n}\n\nexport interface HandlerError {\n status: number\n message?: string\n}\n\nexport type HandlerOutput = HandlerError | void\n"]}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type * as AppBskyDraftDefs from './defs.js';
|
|
2
|
+
export type QueryParams = {
|
|
3
|
+
limit: number;
|
|
4
|
+
cursor?: string;
|
|
5
|
+
};
|
|
6
|
+
export type InputSchema = undefined;
|
|
7
|
+
export interface OutputSchema {
|
|
8
|
+
cursor?: string;
|
|
9
|
+
drafts: AppBskyDraftDefs.DraftView[];
|
|
10
|
+
}
|
|
11
|
+
export type HandlerInput = void;
|
|
12
|
+
export interface HandlerSuccess {
|
|
13
|
+
encoding: 'application/json';
|
|
14
|
+
body: OutputSchema;
|
|
15
|
+
headers?: {
|
|
16
|
+
[key: string]: string;
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
export interface HandlerError {
|
|
20
|
+
status: number;
|
|
21
|
+
message?: string;
|
|
22
|
+
}
|
|
23
|
+
export type HandlerOutput = HandlerError | HandlerSuccess;
|
|
24
|
+
//# sourceMappingURL=getDrafts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getDrafts.d.ts","sourceRoot":"","sources":["../../../../../../src/lexicon/types/app/bsky/draft/getDrafts.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,KAAK,gBAAgB,MAAM,WAAW,CAAA;AAMlD,MAAM,MAAM,WAAW,GAAG;IACxB,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB,CAAA;AACD,MAAM,MAAM,WAAW,GAAG,SAAS,CAAA;AAEnC,MAAM,WAAW,YAAY;IAC3B,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,MAAM,EAAE,gBAAgB,CAAC,SAAS,EAAE,CAAA;CACrC;AAED,MAAM,MAAM,YAAY,GAAG,IAAI,CAAA;AAE/B,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,kBAAkB,CAAA;IAC5B,IAAI,EAAE,YAAY,CAAA;IAClB,OAAO,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAA;CACpC;AAED,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAED,MAAM,MAAM,aAAa,GAAG,YAAY,GAAG,cAAc,CAAA"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const lexicons_1 = require("../../../../lexicons");
|
|
4
|
+
const util_1 = require("../../../../util");
|
|
5
|
+
const is$typed = util_1.is$typed, validate = lexicons_1.validate;
|
|
6
|
+
const id = 'app.bsky.draft.getDrafts';
|
|
7
|
+
//# sourceMappingURL=getDrafts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getDrafts.js","sourceRoot":"","sources":["../../../../../../src/lexicon/types/app/bsky/draft/getDrafts.ts"],"names":[],"mappings":";;AAKA,mDAA4D;AAC5D,2CAIyB;AAGzB,MAAM,QAAQ,GAAG,eAAS,EACxB,QAAQ,GAAG,mBAAS,CAAA;AACtB,MAAM,EAAE,GAAG,0BAA0B,CAAA","sourcesContent":["/**\n * GENERATED CODE - DO NOT MODIFY\n */\nimport { type ValidationResult, BlobRef } from '@atproto/lexicon'\nimport { CID } from 'multiformats/cid'\nimport { validate as _validate } from '../../../../lexicons'\nimport {\n type $Typed,\n is$typed as _is$typed,\n type OmitKey,\n} from '../../../../util'\nimport type * as AppBskyDraftDefs from './defs.js'\n\nconst is$typed = _is$typed,\n validate = _validate\nconst id = 'app.bsky.draft.getDrafts'\n\nexport type QueryParams = {\n limit: number\n cursor?: string\n}\nexport type InputSchema = undefined\n\nexport interface OutputSchema {\n cursor?: string\n drafts: AppBskyDraftDefs.DraftView[]\n}\n\nexport type HandlerInput = void\n\nexport interface HandlerSuccess {\n encoding: 'application/json'\n body: OutputSchema\n headers?: { [key: string]: string }\n}\n\nexport interface HandlerError {\n status: number\n message?: string\n}\n\nexport type HandlerOutput = HandlerError | HandlerSuccess\n"]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type * as AppBskyDraftDefs from './defs.js';
|
|
2
|
+
export type QueryParams = {};
|
|
3
|
+
export interface InputSchema {
|
|
4
|
+
draft: AppBskyDraftDefs.DraftWithId;
|
|
5
|
+
}
|
|
6
|
+
export interface HandlerInput {
|
|
7
|
+
encoding: 'application/json';
|
|
8
|
+
body: InputSchema;
|
|
9
|
+
}
|
|
10
|
+
export interface HandlerError {
|
|
11
|
+
status: number;
|
|
12
|
+
message?: string;
|
|
13
|
+
}
|
|
14
|
+
export type HandlerOutput = HandlerError | void;
|
|
15
|
+
//# sourceMappingURL=updateDraft.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"updateDraft.d.ts","sourceRoot":"","sources":["../../../../../../src/lexicon/types/app/bsky/draft/updateDraft.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,KAAK,gBAAgB,MAAM,WAAW,CAAA;AAMlD,MAAM,MAAM,WAAW,GAAG,EAAE,CAAA;AAE5B,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,gBAAgB,CAAC,WAAW,CAAA;CACpC;AAED,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,kBAAkB,CAAA;IAC5B,IAAI,EAAE,WAAW,CAAA;CAClB;AAED,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAED,MAAM,MAAM,aAAa,GAAG,YAAY,GAAG,IAAI,CAAA"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const lexicons_1 = require("../../../../lexicons");
|
|
4
|
+
const util_1 = require("../../../../util");
|
|
5
|
+
const is$typed = util_1.is$typed, validate = lexicons_1.validate;
|
|
6
|
+
const id = 'app.bsky.draft.updateDraft';
|
|
7
|
+
//# sourceMappingURL=updateDraft.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"updateDraft.js","sourceRoot":"","sources":["../../../../../../src/lexicon/types/app/bsky/draft/updateDraft.ts"],"names":[],"mappings":";;AAKA,mDAA4D;AAC5D,2CAIyB;AAGzB,MAAM,QAAQ,GAAG,eAAS,EACxB,QAAQ,GAAG,mBAAS,CAAA;AACtB,MAAM,EAAE,GAAG,4BAA4B,CAAA","sourcesContent":["/**\n * GENERATED CODE - DO NOT MODIFY\n */\nimport { type ValidationResult, BlobRef } from '@atproto/lexicon'\nimport { CID } from 'multiformats/cid'\nimport { validate as _validate } from '../../../../lexicons'\nimport {\n type $Typed,\n is$typed as _is$typed,\n type OmitKey,\n} from '../../../../util'\nimport type * as AppBskyDraftDefs from './defs.js'\n\nconst is$typed = _is$typed,\n validate = _validate\nconst id = 'app.bsky.draft.updateDraft'\n\nexport type QueryParams = {}\n\nexport interface InputSchema {\n draft: AppBskyDraftDefs.DraftWithId\n}\n\nexport interface HandlerInput {\n encoding: 'application/json'\n body: InputSchema\n}\n\nexport interface HandlerError {\n status: number\n message?: string\n}\n\nexport type HandlerOutput = HandlerError | void\n"]}
|
|
@@ -11,6 +11,8 @@ export interface Main {
|
|
|
11
11
|
/** Alt text description of the video, for accessibility. */
|
|
12
12
|
alt?: string;
|
|
13
13
|
aspectRatio?: AppBskyEmbedDefs.AspectRatio;
|
|
14
|
+
/** A hint to the client about how to present the video. */
|
|
15
|
+
presentation?: 'default' | 'gif' | (string & {});
|
|
14
16
|
}
|
|
15
17
|
export declare function isMain<V>(v: V): v is import("../../../../util").$TypedObject<V, "app.bsky.embed.video", "main">;
|
|
16
18
|
export declare function validateMain<V>(v: V): ValidationResult<Main & V>;
|
|
@@ -28,6 +30,8 @@ export interface View {
|
|
|
28
30
|
thumbnail?: string;
|
|
29
31
|
alt?: string;
|
|
30
32
|
aspectRatio?: AppBskyEmbedDefs.AspectRatio;
|
|
33
|
+
/** A hint to the client about how to present the video. */
|
|
34
|
+
presentation?: 'default' | 'gif' | (string & {});
|
|
31
35
|
}
|
|
32
36
|
export declare function isView<V>(v: V): v is import("../../../../util").$TypedObject<V, "app.bsky.embed.video", "view">;
|
|
33
37
|
export declare function validateView<V>(v: V): ValidationResult<View & V>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"video.d.ts","sourceRoot":"","sources":["../../../../../../src/lexicon/types/app/bsky/embed/video.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,KAAK,gBAAgB,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAQjE,OAAO,KAAK,KAAK,gBAAgB,MAAM,WAAW,CAAA;AAMlD,MAAM,WAAW,IAAI;IACnB,KAAK,CAAC,EAAE,sBAAsB,CAAA;IAC9B,wEAAwE;IACxE,KAAK,EAAE,OAAO,CAAA;IACd,QAAQ,CAAC,EAAE,OAAO,EAAE,CAAA;IACpB,4DAA4D;IAC5D,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,WAAW,CAAC,EAAE,gBA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AAW,CAAA;IAC1C,2DAA2D;IAC3D,YAAY,CAAC,EAAE,SAAS,GAAG,KAAK,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAA;CACjD;AAID,wBAAgB,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,mFAE7B;AAED,wBAAgB,YAAY,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,8BAEnC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"video.js","sourceRoot":"","sources":["../../../../../../src/lexicon/types/app/bsky/embed/video.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"video.js","sourceRoot":"","sources":["../../../../../../src/lexicon/types/app/bsky/embed/video.ts"],"names":[],"mappings":";;AA+BA,wBAEC;AAED,oCAEC;AAUD,8BAEC;AAED,0CAEC;AAeD,wBAEC;AAED,oCAEC;AArED,mDAA4D;AAC5D,2CAIyB;AAGzB,MAAM,QAAQ,GAAG,eAAS,EACxB,QAAQ,GAAG,mBAAS,CAAA;AACtB,MAAM,EAAE,GAAG,sBAAsB,CAAA;AAcjC,MAAM,QAAQ,GAAG,MAAM,CAAA;AAEvB,SAAgB,MAAM,CAAI,CAAI;IAC5B,OAAO,QAAQ,CAAC,CAAC,EAAE,EAAE,EAAE,QAAQ,CAAC,CAAA;AAClC,CAAC;AAED,SAAgB,YAAY,CAAI,CAAI;IAClC,OAAO,QAAQ,CAAW,CAAC,EAAE,EAAE,EAAE,QAAQ,CAAC,CAAA;AAC5C,CAAC;AAQD,MAAM,WAAW,GAAG,SAAS,CAAA;AAE7B,SAAgB,SAAS,CAAI,CAAI;IAC/B,OAAO,QAAQ,CAAC,CAAC,EAAE,EAAE,EAAE,WAAW,CAAC,CAAA;AACrC,CAAC;AAED,SAAgB,eAAe,CAAI,CAAI;IACrC,OAAO,QAAQ,CAAc,CAAC,EAAE,EAAE,EAAE,WAAW,CAAC,CAAA;AAClD,CAAC;AAaD,MAAM,QAAQ,GAAG,MAAM,CAAA;AAEvB,SAAgB,MAAM,CAAI,CAAI;IAC5B,OAAO,QAAQ,CAAC,CAAC,EAAE,EAAE,EAAE,QAAQ,CAAC,CAAA;AAClC,CAAC;AAED,SAAgB,YAAY,CAAI,CAAI;IAClC,OAAO,QAAQ,CAAW,CAAC,EAAE,EAAE,EAAE,QAAQ,CAAC,CAAA;AAC5C,CAAC","sourcesContent":["/**\n * GENERATED CODE - DO NOT MODIFY\n */\nimport { type ValidationResult, BlobRef } from '@atproto/lexicon'\nimport { CID } from 'multiformats/cid'\nimport { validate as _validate } from '../../../../lexicons'\nimport {\n type $Typed,\n is$typed as _is$typed,\n type OmitKey,\n} from '../../../../util'\nimport type * as AppBskyEmbedDefs from './defs.js'\n\nconst is$typed = _is$typed,\n validate = _validate\nconst id = 'app.bsky.embed.video'\n\nexport interface Main {\n $type?: 'app.bsky.embed.video'\n /** The mp4 video file. May be up to 100mb, formerly limited to 50mb. */\n video: BlobRef\n captions?: Caption[]\n /** Alt text description of the video, for accessibility. */\n alt?: string\n aspectRatio?: AppBskyEmbedDefs.AspectRatio\n /** A hint to the client about how to present the video. */\n presentation?: 'default' | 'gif' | (string & {})\n}\n\nconst hashMain = 'main'\n\nexport function isMain<V>(v: V) {\n return is$typed(v, id, hashMain)\n}\n\nexport function validateMain<V>(v: V) {\n return validate<Main & V>(v, id, hashMain)\n}\n\nexport interface Caption {\n $type?: 'app.bsky.embed.video#caption'\n lang: string\n file: BlobRef\n}\n\nconst hashCaption = 'caption'\n\nexport function isCaption<V>(v: V) {\n return is$typed(v, id, hashCaption)\n}\n\nexport function validateCaption<V>(v: V) {\n return validate<Caption & V>(v, id, hashCaption)\n}\n\nexport interface View {\n $type?: 'app.bsky.embed.video#view'\n cid: string\n playlist: string\n thumbnail?: string\n alt?: string\n aspectRatio?: AppBskyEmbedDefs.AspectRatio\n /** A hint to the client about how to present the video. */\n presentation?: 'default' | 'gif' | (string & {})\n}\n\nconst hashView = 'view'\n\nexport function isView<V>(v: V) {\n return is$typed(v, id, hashView)\n}\n\nexport function validateView<V>(v: V) {\n return validate<View & V>(v, id, hashView)\n}\n"]}
|
|
@@ -7,6 +7,8 @@ export type QueryParams = {
|
|
|
7
7
|
export type InputSchema = undefined;
|
|
8
8
|
export interface OutputSchema {
|
|
9
9
|
actors: AppBskyActorDefs.ProfileView[];
|
|
10
|
+
/** Snowflake for this recommendation, use when submitting recommendation events. */
|
|
11
|
+
recId?: string;
|
|
10
12
|
}
|
|
11
13
|
export type HandlerInput = void;
|
|
12
14
|
export interface HandlerSuccess {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getSuggestedUsers.d.ts","sourceRoot":"","sources":["../../../../../../src/lexicon/types/app/bsky/unspecced/getSuggestedUsers.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,KAAK,gBAAgB,MAAM,kBAAkB,CAAA;AAMzD,MAAM,MAAM,WAAW,GAAG;IACxB,gDAAgD;IAChD,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,KAAK,EAAE,MAAM,CAAA;CACd,CAAA;AACD,MAAM,MAAM,WAAW,GAAG,SAAS,CAAA;AAEnC,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,gBAAgB,CAAC,WAAW,EAAE,CAAA;
|
|
1
|
+
{"version":3,"file":"getSuggestedUsers.d.ts","sourceRoot":"","sources":["../../../../../../src/lexicon/types/app/bsky/unspecced/getSuggestedUsers.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,KAAK,gBAAgB,MAAM,kBAAkB,CAAA;AAMzD,MAAM,MAAM,WAAW,GAAG;IACxB,gDAAgD;IAChD,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,KAAK,EAAE,MAAM,CAAA;CACd,CAAA;AACD,MAAM,MAAM,WAAW,GAAG,SAAS,CAAA;AAEnC,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,gBAAgB,CAAC,WAAW,EAAE,CAAA;IACtC,oFAAoF;IACpF,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED,MAAM,MAAM,YAAY,GAAG,IAAI,CAAA;AAE/B,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,kBAAkB,CAAA;IAC5B,IAAI,EAAE,YAAY,CAAA;IAClB,OAAO,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAA;CACpC;AAED,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAED,MAAM,MAAM,aAAa,GAAG,YAAY,GAAG,cAAc,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getSuggestedUsers.js","sourceRoot":"","sources":["../../../../../../src/lexicon/types/app/bsky/unspecced/getSuggestedUsers.ts"],"names":[],"mappings":";;AAKA,mDAA4D;AAC5D,2CAIyB;AAGzB,MAAM,QAAQ,GAAG,eAAS,EACxB,QAAQ,GAAG,mBAAS,CAAA;AACtB,MAAM,EAAE,GAAG,sCAAsC,CAAA","sourcesContent":["/**\n * GENERATED CODE - DO NOT MODIFY\n */\nimport { type ValidationResult, BlobRef } from '@atproto/lexicon'\nimport { CID } from 'multiformats/cid'\nimport { validate as _validate } from '../../../../lexicons'\nimport {\n type $Typed,\n is$typed as _is$typed,\n type OmitKey,\n} from '../../../../util'\nimport type * as AppBskyActorDefs from '../actor/defs.js'\n\nconst is$typed = _is$typed,\n validate = _validate\nconst id = 'app.bsky.unspecced.getSuggestedUsers'\n\nexport type QueryParams = {\n /** Category of users to get suggestions for. */\n category?: string\n limit: number\n}\nexport type InputSchema = undefined\n\nexport interface OutputSchema {\n actors: AppBskyActorDefs.ProfileView[]\n}\n\nexport type HandlerInput = void\n\nexport interface HandlerSuccess {\n encoding: 'application/json'\n body: OutputSchema\n headers?: { [key: string]: string }\n}\n\nexport interface HandlerError {\n status: number\n message?: string\n}\n\nexport type HandlerOutput = HandlerError | HandlerSuccess\n"]}
|
|
1
|
+
{"version":3,"file":"getSuggestedUsers.js","sourceRoot":"","sources":["../../../../../../src/lexicon/types/app/bsky/unspecced/getSuggestedUsers.ts"],"names":[],"mappings":";;AAKA,mDAA4D;AAC5D,2CAIyB;AAGzB,MAAM,QAAQ,GAAG,eAAS,EACxB,QAAQ,GAAG,mBAAS,CAAA;AACtB,MAAM,EAAE,GAAG,sCAAsC,CAAA","sourcesContent":["/**\n * GENERATED CODE - DO NOT MODIFY\n */\nimport { type ValidationResult, BlobRef } from '@atproto/lexicon'\nimport { CID } from 'multiformats/cid'\nimport { validate as _validate } from '../../../../lexicons'\nimport {\n type $Typed,\n is$typed as _is$typed,\n type OmitKey,\n} from '../../../../util'\nimport type * as AppBskyActorDefs from '../actor/defs.js'\n\nconst is$typed = _is$typed,\n validate = _validate\nconst id = 'app.bsky.unspecced.getSuggestedUsers'\n\nexport type QueryParams = {\n /** Category of users to get suggestions for. */\n category?: string\n limit: number\n}\nexport type InputSchema = undefined\n\nexport interface OutputSchema {\n actors: AppBskyActorDefs.ProfileView[]\n /** Snowflake for this recommendation, use when submitting recommendation events. */\n recId?: string\n}\n\nexport type HandlerInput = void\n\nexport interface HandlerSuccess {\n encoding: 'application/json'\n body: OutputSchema\n headers?: { [key: string]: string }\n}\n\nexport interface HandlerError {\n status: number\n message?: string\n}\n\nexport type HandlerOutput = HandlerError | HandlerSuccess\n"]}
|
|
@@ -8,6 +8,8 @@ export type QueryParams = {
|
|
|
8
8
|
export type InputSchema = undefined;
|
|
9
9
|
export interface OutputSchema {
|
|
10
10
|
dids: string[];
|
|
11
|
+
/** Snowflake for this recommendation, use when submitting recommendation events. */
|
|
12
|
+
recId?: string;
|
|
11
13
|
}
|
|
12
14
|
export type HandlerInput = void;
|
|
13
15
|
export interface HandlerSuccess {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getSuggestedUsersSkeleton.d.ts","sourceRoot":"","sources":["../../../../../../src/lexicon/types/app/bsky/unspecced/getSuggestedUsersSkeleton.ts"],"names":[],"mappings":"AAgBA,MAAM,MAAM,WAAW,GAAG;IACxB,+FAA+F;IAC/F,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,gDAAgD;IAChD,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,KAAK,EAAE,MAAM,CAAA;CACd,CAAA;AACD,MAAM,MAAM,WAAW,GAAG,SAAS,CAAA;AAEnC,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,EAAE,CAAA;CACf;AAED,MAAM,MAAM,YAAY,GAAG,IAAI,CAAA;AAE/B,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,kBAAkB,CAAA;IAC5B,IAAI,EAAE,YAAY,CAAA;IAClB,OAAO,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAA;CACpC;AAED,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAED,MAAM,MAAM,aAAa,GAAG,YAAY,GAAG,cAAc,CAAA"}
|
|
1
|
+
{"version":3,"file":"getSuggestedUsersSkeleton.d.ts","sourceRoot":"","sources":["../../../../../../src/lexicon/types/app/bsky/unspecced/getSuggestedUsersSkeleton.ts"],"names":[],"mappings":"AAgBA,MAAM,MAAM,WAAW,GAAG;IACxB,+FAA+F;IAC/F,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,gDAAgD;IAChD,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,KAAK,EAAE,MAAM,CAAA;CACd,CAAA;AACD,MAAM,MAAM,WAAW,GAAG,SAAS,CAAA;AAEnC,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,EAAE,CAAA;IACd,oFAAoF;IACpF,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED,MAAM,MAAM,YAAY,GAAG,IAAI,CAAA;AAE/B,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,kBAAkB,CAAA;IAC5B,IAAI,EAAE,YAAY,CAAA;IAClB,OAAO,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAA;CACpC;AAED,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAED,MAAM,MAAM,aAAa,GAAG,YAAY,GAAG,cAAc,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getSuggestedUsersSkeleton.js","sourceRoot":"","sources":["../../../../../../src/lexicon/types/app/bsky/unspecced/getSuggestedUsersSkeleton.ts"],"names":[],"mappings":";;AAKA,mDAA4D;AAC5D,2CAIyB;AAEzB,MAAM,QAAQ,GAAG,eAAS,EACxB,QAAQ,GAAG,mBAAS,CAAA;AACtB,MAAM,EAAE,GAAG,8CAA8C,CAAA","sourcesContent":["/**\n * GENERATED CODE - DO NOT MODIFY\n */\nimport { type ValidationResult, BlobRef } from '@atproto/lexicon'\nimport { CID } from 'multiformats/cid'\nimport { validate as _validate } from '../../../../lexicons'\nimport {\n type $Typed,\n is$typed as _is$typed,\n type OmitKey,\n} from '../../../../util'\n\nconst is$typed = _is$typed,\n validate = _validate\nconst id = 'app.bsky.unspecced.getSuggestedUsersSkeleton'\n\nexport type QueryParams = {\n /** DID of the account making the request (not included for public/unauthenticated queries). */\n viewer?: string\n /** Category of users to get suggestions for. */\n category?: string\n limit: number\n}\nexport type InputSchema = undefined\n\nexport interface OutputSchema {\n dids: string[]\n}\n\nexport type HandlerInput = void\n\nexport interface HandlerSuccess {\n encoding: 'application/json'\n body: OutputSchema\n headers?: { [key: string]: string }\n}\n\nexport interface HandlerError {\n status: number\n message?: string\n}\n\nexport type HandlerOutput = HandlerError | HandlerSuccess\n"]}
|
|
1
|
+
{"version":3,"file":"getSuggestedUsersSkeleton.js","sourceRoot":"","sources":["../../../../../../src/lexicon/types/app/bsky/unspecced/getSuggestedUsersSkeleton.ts"],"names":[],"mappings":";;AAKA,mDAA4D;AAC5D,2CAIyB;AAEzB,MAAM,QAAQ,GAAG,eAAS,EACxB,QAAQ,GAAG,mBAAS,CAAA;AACtB,MAAM,EAAE,GAAG,8CAA8C,CAAA","sourcesContent":["/**\n * GENERATED CODE - DO NOT MODIFY\n */\nimport { type ValidationResult, BlobRef } from '@atproto/lexicon'\nimport { CID } from 'multiformats/cid'\nimport { validate as _validate } from '../../../../lexicons'\nimport {\n type $Typed,\n is$typed as _is$typed,\n type OmitKey,\n} from '../../../../util'\n\nconst is$typed = _is$typed,\n validate = _validate\nconst id = 'app.bsky.unspecced.getSuggestedUsersSkeleton'\n\nexport type QueryParams = {\n /** DID of the account making the request (not included for public/unauthenticated queries). */\n viewer?: string\n /** Category of users to get suggestions for. */\n category?: string\n limit: number\n}\nexport type InputSchema = undefined\n\nexport interface OutputSchema {\n dids: string[]\n /** Snowflake for this recommendation, use when submitting recommendation events. */\n recId?: string\n}\n\nexport type HandlerInput = void\n\nexport interface HandlerSuccess {\n encoding: 'application/json'\n body: OutputSchema\n headers?: { [key: string]: string }\n}\n\nexport interface HandlerError {\n status: number\n message?: string\n}\n\nexport type HandlerOutput = HandlerError | HandlerSuccess\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deleteSession.d.ts","sourceRoot":"","sources":["../../../../../../src/lexicon/types/com/atproto/server/deleteSession.ts"],"names":[],"mappings":"AAgBA,MAAM,MAAM,WAAW,GAAG,EAAE,CAAA;AAC5B,MAAM,MAAM,WAAW,GAAG,SAAS,CAAA;AACnC,MAAM,MAAM,YAAY,GAAG,IAAI,CAAA;AAE/B,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,MAAM,CAAA;
|
|
1
|
+
{"version":3,"file":"deleteSession.d.ts","sourceRoot":"","sources":["../../../../../../src/lexicon/types/com/atproto/server/deleteSession.ts"],"names":[],"mappings":"AAgBA,MAAM,MAAM,WAAW,GAAG,EAAE,CAAA;AAC5B,MAAM,MAAM,WAAW,GAAG,SAAS,CAAA;AACnC,MAAM,MAAM,YAAY,GAAG,IAAI,CAAA;AAE/B,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,KAAK,CAAC,EAAE,cAAc,GAAG,cAAc,CAAA;CACxC;AAED,MAAM,MAAM,aAAa,GAAG,YAAY,GAAG,IAAI,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deleteSession.js","sourceRoot":"","sources":["../../../../../../src/lexicon/types/com/atproto/server/deleteSession.ts"],"names":[],"mappings":";;AAKA,mDAA4D;AAC5D,2CAIyB;AAEzB,MAAM,QAAQ,GAAG,eAAS,EACxB,QAAQ,GAAG,mBAAS,CAAA;AACtB,MAAM,EAAE,GAAG,kCAAkC,CAAA","sourcesContent":["/**\n * GENERATED CODE - DO NOT MODIFY\n */\nimport { type ValidationResult, BlobRef } from '@atproto/lexicon'\nimport { CID } from 'multiformats/cid'\nimport { validate as _validate } from '../../../../lexicons'\nimport {\n type $Typed,\n is$typed as _is$typed,\n type OmitKey,\n} from '../../../../util'\n\nconst is$typed = _is$typed,\n validate = _validate\nconst id = 'com.atproto.server.deleteSession'\n\nexport type QueryParams = {}\nexport type InputSchema = undefined\nexport type HandlerInput = void\n\nexport interface HandlerError {\n status: number\n message?: string\n}\n\nexport type HandlerOutput = HandlerError | void\n"]}
|
|
1
|
+
{"version":3,"file":"deleteSession.js","sourceRoot":"","sources":["../../../../../../src/lexicon/types/com/atproto/server/deleteSession.ts"],"names":[],"mappings":";;AAKA,mDAA4D;AAC5D,2CAIyB;AAEzB,MAAM,QAAQ,GAAG,eAAS,EACxB,QAAQ,GAAG,mBAAS,CAAA;AACtB,MAAM,EAAE,GAAG,kCAAkC,CAAA","sourcesContent":["/**\n * GENERATED CODE - DO NOT MODIFY\n */\nimport { type ValidationResult, BlobRef } from '@atproto/lexicon'\nimport { CID } from 'multiformats/cid'\nimport { validate as _validate } from '../../../../lexicons'\nimport {\n type $Typed,\n is$typed as _is$typed,\n type OmitKey,\n} from '../../../../util'\n\nconst is$typed = _is$typed,\n validate = _validate\nconst id = 'com.atproto.server.deleteSession'\n\nexport type QueryParams = {}\nexport type InputSchema = undefined\nexport type HandlerInput = void\n\nexport interface HandlerError {\n status: number\n message?: string\n error?: 'InvalidToken' | 'ExpiredToken'\n}\n\nexport type HandlerOutput = HandlerError | void\n"]}
|
|
@@ -3,12 +3,12 @@ export type InputSchema = undefined;
|
|
|
3
3
|
export interface OutputSchema {
|
|
4
4
|
handle: string;
|
|
5
5
|
did: string;
|
|
6
|
-
email?: string;
|
|
7
|
-
emailConfirmed?: boolean;
|
|
8
|
-
emailAuthFactor?: boolean;
|
|
9
6
|
didDoc?: {
|
|
10
7
|
[_ in string]: unknown;
|
|
11
8
|
};
|
|
9
|
+
email?: string;
|
|
10
|
+
emailConfirmed?: boolean;
|
|
11
|
+
emailAuthFactor?: boolean;
|
|
12
12
|
active?: boolean;
|
|
13
13
|
/** If active=false, this optional field indicates a possible reason for why the account is not active. If active=false and no status is supplied, then the host makes no claim for why the repository is no longer being hosted. */
|
|
14
14
|
status?: 'takendown' | 'suspended' | 'deactivated' | (string & {});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getSession.d.ts","sourceRoot":"","sources":["../../../../../../src/lexicon/types/com/atproto/server/getSession.ts"],"names":[],"mappings":"AAgBA,MAAM,MAAM,WAAW,GAAG,EAAE,CAAA;AAC5B,MAAM,MAAM,WAAW,GAAG,SAAS,CAAA;AAEnC,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAA;IACd,GAAG,EAAE,MAAM,CAAA;IACX,
|
|
1
|
+
{"version":3,"file":"getSession.d.ts","sourceRoot":"","sources":["../../../../../../src/lexicon/types/com/atproto/server/getSession.ts"],"names":[],"mappings":"AAgBA,MAAM,MAAM,WAAW,GAAG,EAAE,CAAA;AAC5B,MAAM,MAAM,WAAW,GAAG,SAAS,CAAA;AAEnC,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAA;IACd,GAAG,EAAE,MAAM,CAAA;IACX,MAAM,CAAC,EAAE;SAAG,CAAC,IAAI,MAAM,GAAG,OAAO;KAAE,CAAA;IACnC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,oOAAoO;IACpO,MAAM,CAAC,EAAE,WAAW,GAAG,WAAW,GAAG,aAAa,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAA;CACnE;AAED,MAAM,MAAM,YAAY,GAAG,IAAI,CAAA;AAE/B,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,kBAAkB,CAAA;IAC5B,IAAI,EAAE,YAAY,CAAA;IAClB,OAAO,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAA;CACpC;AAED,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAED,MAAM,MAAM,aAAa,GAAG,YAAY,GAAG,cAAc,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getSession.js","sourceRoot":"","sources":["../../../../../../src/lexicon/types/com/atproto/server/getSession.ts"],"names":[],"mappings":";;AAKA,mDAA4D;AAC5D,2CAIyB;AAEzB,MAAM,QAAQ,GAAG,eAAS,EACxB,QAAQ,GAAG,mBAAS,CAAA;AACtB,MAAM,EAAE,GAAG,+BAA+B,CAAA","sourcesContent":["/**\n * GENERATED CODE - DO NOT MODIFY\n */\nimport { type ValidationResult, BlobRef } from '@atproto/lexicon'\nimport { CID } from 'multiformats/cid'\nimport { validate as _validate } from '../../../../lexicons'\nimport {\n type $Typed,\n is$typed as _is$typed,\n type OmitKey,\n} from '../../../../util'\n\nconst is$typed = _is$typed,\n validate = _validate\nconst id = 'com.atproto.server.getSession'\n\nexport type QueryParams = {}\nexport type InputSchema = undefined\n\nexport interface OutputSchema {\n handle: string\n did: string\n
|
|
1
|
+
{"version":3,"file":"getSession.js","sourceRoot":"","sources":["../../../../../../src/lexicon/types/com/atproto/server/getSession.ts"],"names":[],"mappings":";;AAKA,mDAA4D;AAC5D,2CAIyB;AAEzB,MAAM,QAAQ,GAAG,eAAS,EACxB,QAAQ,GAAG,mBAAS,CAAA;AACtB,MAAM,EAAE,GAAG,+BAA+B,CAAA","sourcesContent":["/**\n * GENERATED CODE - DO NOT MODIFY\n */\nimport { type ValidationResult, BlobRef } from '@atproto/lexicon'\nimport { CID } from 'multiformats/cid'\nimport { validate as _validate } from '../../../../lexicons'\nimport {\n type $Typed,\n is$typed as _is$typed,\n type OmitKey,\n} from '../../../../util'\n\nconst is$typed = _is$typed,\n validate = _validate\nconst id = 'com.atproto.server.getSession'\n\nexport type QueryParams = {}\nexport type InputSchema = undefined\n\nexport interface OutputSchema {\n handle: string\n did: string\n didDoc?: { [_ in string]: unknown }\n email?: string\n emailConfirmed?: boolean\n emailAuthFactor?: boolean\n active?: boolean\n /** If active=false, this optional field indicates a possible reason for why the account is not active. If active=false and no status is supplied, then the host makes no claim for why the repository is no longer being hosted. */\n status?: 'takendown' | 'suspended' | 'deactivated' | (string & {})\n}\n\nexport type HandlerInput = void\n\nexport interface HandlerSuccess {\n encoding: 'application/json'\n body: OutputSchema\n headers?: { [key: string]: string }\n}\n\nexport interface HandlerError {\n status: number\n message?: string\n}\n\nexport type HandlerOutput = HandlerError | HandlerSuccess\n"]}
|
|
@@ -8,6 +8,9 @@ export interface OutputSchema {
|
|
|
8
8
|
didDoc?: {
|
|
9
9
|
[_ in string]: unknown;
|
|
10
10
|
};
|
|
11
|
+
email?: string;
|
|
12
|
+
emailConfirmed?: boolean;
|
|
13
|
+
emailAuthFactor?: boolean;
|
|
11
14
|
active?: boolean;
|
|
12
15
|
/** Hosting status of the account. If not specified, then assume 'active'. */
|
|
13
16
|
status?: 'takendown' | 'suspended' | 'deactivated' | (string & {});
|
|
@@ -23,7 +26,7 @@ export interface HandlerSuccess {
|
|
|
23
26
|
export interface HandlerError {
|
|
24
27
|
status: number;
|
|
25
28
|
message?: string;
|
|
26
|
-
error?: 'AccountTakedown';
|
|
29
|
+
error?: 'AccountTakedown' | 'InvalidToken' | 'ExpiredToken';
|
|
27
30
|
}
|
|
28
31
|
export type HandlerOutput = HandlerError | HandlerSuccess;
|
|
29
32
|
//# sourceMappingURL=refreshSession.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"refreshSession.d.ts","sourceRoot":"","sources":["../../../../../../src/lexicon/types/com/atproto/server/refreshSession.ts"],"names":[],"mappings":"AAgBA,MAAM,MAAM,WAAW,GAAG,EAAE,CAAA;AAC5B,MAAM,MAAM,WAAW,GAAG,SAAS,CAAA;AAEnC,MAAM,WAAW,YAAY;IAC3B,SAAS,EAAE,MAAM,CAAA;IACjB,UAAU,EAAE,MAAM,CAAA;IAClB,MAAM,EAAE,MAAM,CAAA;IACd,GAAG,EAAE,MAAM,CAAA;IACX,MAAM,CAAC,EAAE;SAAG,CAAC,IAAI,MAAM,GAAG,OAAO;KAAE,CAAA;IACnC,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,6EAA6E;IAC7E,MAAM,CAAC,EAAE,WAAW,GAAG,WAAW,GAAG,aAAa,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAA;CACnE;AAED,MAAM,MAAM,YAAY,GAAG,IAAI,CAAA;AAE/B,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,kBAAkB,CAAA;IAC5B,IAAI,EAAE,YAAY,CAAA;IAClB,OAAO,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAA;CACpC;AAED,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,KAAK,CAAC,EAAE,iBAAiB,CAAA;
|
|
1
|
+
{"version":3,"file":"refreshSession.d.ts","sourceRoot":"","sources":["../../../../../../src/lexicon/types/com/atproto/server/refreshSession.ts"],"names":[],"mappings":"AAgBA,MAAM,MAAM,WAAW,GAAG,EAAE,CAAA;AAC5B,MAAM,MAAM,WAAW,GAAG,SAAS,CAAA;AAEnC,MAAM,WAAW,YAAY;IAC3B,SAAS,EAAE,MAAM,CAAA;IACjB,UAAU,EAAE,MAAM,CAAA;IAClB,MAAM,EAAE,MAAM,CAAA;IACd,GAAG,EAAE,MAAM,CAAA;IACX,MAAM,CAAC,EAAE;SAAG,CAAC,IAAI,MAAM,GAAG,OAAO;KAAE,CAAA;IACnC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,6EAA6E;IAC7E,MAAM,CAAC,EAAE,WAAW,GAAG,WAAW,GAAG,aAAa,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAA;CACnE;AAED,MAAM,MAAM,YAAY,GAAG,IAAI,CAAA;AAE/B,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,kBAAkB,CAAA;IAC5B,IAAI,EAAE,YAAY,CAAA;IAClB,OAAO,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAA;CACpC;AAED,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,KAAK,CAAC,EAAE,iBAAiB,GAAG,cAAc,GAAG,cAAc,CAAA;CAC5D;AAED,MAAM,MAAM,aAAa,GAAG,YAAY,GAAG,cAAc,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"refreshSession.js","sourceRoot":"","sources":["../../../../../../src/lexicon/types/com/atproto/server/refreshSession.ts"],"names":[],"mappings":";;AAKA,mDAA4D;AAC5D,2CAIyB;AAEzB,MAAM,QAAQ,GAAG,eAAS,EACxB,QAAQ,GAAG,mBAAS,CAAA;AACtB,MAAM,EAAE,GAAG,mCAAmC,CAAA","sourcesContent":["/**\n * GENERATED CODE - DO NOT MODIFY\n */\nimport { type ValidationResult, BlobRef } from '@atproto/lexicon'\nimport { CID } from 'multiformats/cid'\nimport { validate as _validate } from '../../../../lexicons'\nimport {\n type $Typed,\n is$typed as _is$typed,\n type OmitKey,\n} from '../../../../util'\n\nconst is$typed = _is$typed,\n validate = _validate\nconst id = 'com.atproto.server.refreshSession'\n\nexport type QueryParams = {}\nexport type InputSchema = undefined\n\nexport interface OutputSchema {\n accessJwt: string\n refreshJwt: string\n handle: string\n did: string\n didDoc?: { [_ in string]: unknown }\n active?: boolean\n /** Hosting status of the account. If not specified, then assume 'active'. */\n status?: 'takendown' | 'suspended' | 'deactivated' | (string & {})\n}\n\nexport type HandlerInput = void\n\nexport interface HandlerSuccess {\n encoding: 'application/json'\n body: OutputSchema\n headers?: { [key: string]: string }\n}\n\nexport interface HandlerError {\n status: number\n message?: string\n error?: 'AccountTakedown'\n}\n\nexport type HandlerOutput = HandlerError | HandlerSuccess\n"]}
|
|
1
|
+
{"version":3,"file":"refreshSession.js","sourceRoot":"","sources":["../../../../../../src/lexicon/types/com/atproto/server/refreshSession.ts"],"names":[],"mappings":";;AAKA,mDAA4D;AAC5D,2CAIyB;AAEzB,MAAM,QAAQ,GAAG,eAAS,EACxB,QAAQ,GAAG,mBAAS,CAAA;AACtB,MAAM,EAAE,GAAG,mCAAmC,CAAA","sourcesContent":["/**\n * GENERATED CODE - DO NOT MODIFY\n */\nimport { type ValidationResult, BlobRef } from '@atproto/lexicon'\nimport { CID } from 'multiformats/cid'\nimport { validate as _validate } from '../../../../lexicons'\nimport {\n type $Typed,\n is$typed as _is$typed,\n type OmitKey,\n} from '../../../../util'\n\nconst is$typed = _is$typed,\n validate = _validate\nconst id = 'com.atproto.server.refreshSession'\n\nexport type QueryParams = {}\nexport type InputSchema = undefined\n\nexport interface OutputSchema {\n accessJwt: string\n refreshJwt: string\n handle: string\n did: string\n didDoc?: { [_ in string]: unknown }\n email?: string\n emailConfirmed?: boolean\n emailAuthFactor?: boolean\n active?: boolean\n /** Hosting status of the account. If not specified, then assume 'active'. */\n status?: 'takendown' | 'suspended' | 'deactivated' | (string & {})\n}\n\nexport type HandlerInput = void\n\nexport interface HandlerSuccess {\n encoding: 'application/json'\n body: OutputSchema\n headers?: { [key: string]: string }\n}\n\nexport interface HandlerError {\n status: number\n message?: string\n error?: 'AccountTakedown' | 'InvalidToken' | 'ExpiredToken'\n}\n\nexport type HandlerOutput = HandlerError | HandlerSuccess\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../src/mod-service/util.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../src/mod-service/util.ts"],"names":[],"mappings":"AAEA,OAAO,QAAQ,MAAM,cAAc,CAAA;AAEnC,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAA;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAA;AAC7C,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAA;AACnC,OAAO,EAAE,KAAK,EAAE,MAAM,yCAAyC,CAAA;AAE/D,MAAM,MAAM,WAAW,GAAG,KAAK,GAAG;IAAE,GAAG,EAAE,UAAU,CAAA;CAAE,CAAA;AAErD,eAAO,MAAM,WAAW,GAAI,KAAK,QAAQ,KAAG,KAY3C,CAAA;AAED,eAAO,MAAM,cAAc,GACzB,OAAO,KAAK,EACZ,eAAe,MAAM,KACpB,IAAI,CAAC,QAAQ,EAAE,IAAI,CAYrB,CAAA;AAED,eAAO,MAAM,SAAS,GACpB,OAAO,KAAK,EACZ,YAAY,OAAO,KAClB,OAAO,CAAC,WAAW,CAsBrB,CAAA;AAED,eAAO,MAAM,SAAS,GAAI,KAAK,GAAG,YAKjC,CAAA;AAED,eAAO,MAAM,kBAAkB,GAC7B,YAAY,UAAU,EACtB,KAAK,MAAM,EACX,UAAU,OAAO;;;;;;EASlB,CAAA;AAED,eAAO,MAAM,gBAAgB,GAAI,UAAU,IAAI,WAG9C,CAAA;AAED,eAAO,MAAM,kBAAkB,GAAI,SAAS,KAAK,wCAEhD,CAAA"}
|
package/dist/mod-service/util.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
/* eslint-disable import/no-deprecated */
|
|
3
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
5
4
|
};
|
|
@@ -39,6 +38,9 @@ const formatLabelRow = (label, signingKeyId) => {
|
|
|
39
38
|
exports.formatLabelRow = formatLabelRow;
|
|
40
39
|
const signLabel = async (label, signingKey) => {
|
|
41
40
|
const { ver, src, uri, cid, val, neg, cts, exp } = label;
|
|
41
|
+
// @TODO cborEncode now ignores undefined properties, so we might not need to
|
|
42
|
+
// reformat the label here. We might want to consider this if we ever re-visit
|
|
43
|
+
// the logic below:
|
|
42
44
|
const reformatted = (0, common_1.noUndefinedVals)({
|
|
43
45
|
ver: ver ?? 1,
|
|
44
46
|
src,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"util.js","sourceRoot":"","sources":["../../src/mod-service/util.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"util.js","sourceRoot":"","sources":["../../src/mod-service/util.ts"],"names":[],"mappings":";;;;;;AAAA,wDAA0B;AAC1B,mCAA4B;AAC5B,uDAAmC;A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MAAM,EAAE,GAAG,EAAE,GAAG,MAAM,UAAU,CAAC,GAAG,CAAC,kBAAkB,CAAC,GAAG,CAAC,CAAA;IAC5D,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,CAAA;IACxB,IAAI,CAAC,OAAO,IAAI,CAAC,IAAA,iBAAS,EAAC,GAAG,CAAC,EAAE,CAAC;QAChC,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,CAAA;IAC7B,CAAC;IAED,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,IAAI,aAAQ,CAAC,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,EAAE,CAAA;AACvD,CAAC,CAAA;AAZY,QAAA,kBAAkB,sBAY9B;AAEM,MAAM,gBAAgB,GAAG,CAAC,QAAc,EAAE,EAAE;IACjD,MAAM,CAAC,IAAI,CAAC,GAAG,QAAQ,CAAC,WAAW,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;IAChD,OAAO,IAAI,CAAA;AACb,CAAC,CAAA;AAHY,QAAA,gBAAgB,oBAG5B;AAEM,MAAM,kBAAkB,GAAG,CAAC,OAAc,EAAE,EAAE;IACnD,OAAO,IAAA,YAAG,EAAQ,cAAc,OAAO,WAAW,CAAA;AACpD,CAAC,CAAA;AAFY,QAAA,kBAAkB,sBAE9B","sourcesContent":["import net from 'node:net'\nimport { sql } from 'kysely'\nimport AtpAgent from '@atproto/api'\nimport { cborEncode, noUndefinedVals } from '@atproto/common'\nimport { Keypair } from '@atproto/crypto'\nimport { IdResolver } from '@atproto/identity'\nimport { LabelRow } from '../db/schema/label'\nimport { DbRef } from '../db/types'\nimport { Label } from '../lexicon/types/com/atproto/label/defs'\n\nexport type SignedLabel = Label & { sig: Uint8Array }\n\nexport const formatLabel = (row: LabelRow): Label => {\n return noUndefinedVals({\n ver: 1,\n src: row.src,\n uri: row.uri,\n cid: row.cid === '' ? undefined : row.cid,\n val: row.val,\n neg: row.neg === true ? true : undefined,\n cts: row.cts,\n exp: row.exp ?? undefined,\n sig: row.sig ? new Uint8Array(row.sig) : undefined,\n } satisfies Label) as unknown as Label\n}\n\nexport const formatLabelRow = (\n label: Label,\n signingKeyId?: number,\n): Omit<LabelRow, 'id'> => {\n return {\n src: label.src,\n uri: label.uri,\n cid: label.cid ?? '',\n val: label.val,\n neg: !!label.neg,\n cts: label.cts,\n exp: label.exp ?? null,\n sig: label.sig ? Buffer.from(label.sig) : null,\n signingKeyId: signingKeyId ?? null,\n }\n}\n\nexport const signLabel = async (\n label: Label,\n signingKey: Keypair,\n): Promise<SignedLabel> => {\n const { ver, src, uri, cid, val, neg, cts, exp } = label\n // @TODO cborEncode now ignores undefined properties, so we might not need to\n // reformat the label here. We might want to consider this if we ever re-visit\n // the logic below:\n const reformatted = noUndefinedVals({\n ver: ver ?? 1,\n src,\n uri,\n cid,\n val,\n neg: neg === true ? true : undefined,\n cts,\n exp,\n } satisfies Label) as unknown as Label\n\n const bytes = cborEncode(reformatted)\n const sig = await signingKey.sign(bytes)\n return {\n ...reformatted,\n sig,\n }\n}\n\nexport const isSafeUrl = (url: URL) => {\n if (url.protocol !== 'https:') return false\n if (!url.hostname || url.hostname === 'localhost') return false\n if (net.isIP(url.hostname) !== 0) return false\n return true\n}\n\nexport const getPdsAgentForRepo = async (\n idResolver: IdResolver,\n did: string,\n devMode?: boolean,\n) => {\n const { pds } = await idResolver.did.resolveAtprotoData(did)\n const url = new URL(pds)\n if (!devMode && !isSafeUrl(url)) {\n return { url, agent: null }\n }\n\n return { url, agent: new AtpAgent({ service: url }) }\n}\n\nexport const dateFromDatetime = (datetime: Date) => {\n const [date] = datetime.toISOString().split('T')\n return date\n}\n\nexport const dateFromDbDatetime = (dateRef: DbRef) => {\n return sql<string>`SPLIT_PART(${dateRef}, 'T', 1)`\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"issuer.d.ts","sourceRoot":"","sources":["../../src/verification/issuer.ts"],"names":[],"mappings":"A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wD;qBACtD,MAAM;mBACR,MAAM;;;IAqDX,MAAM,CAAC,EAAE,IAAI,EAAE,EAAE;QAAE,IAAI,EAAE,MAAM,EAAE,CAAA;KAAE;;;iBAED,MAAM;mBAAS,MAAM;;;CAkC9D"}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.VerificationIssuer = void 0;
|
|
4
4
|
const api_1 = require("@atproto/api");
|
|
5
|
+
const HANDLE_INVALID = 'handle.invalid';
|
|
5
6
|
class VerificationIssuer {
|
|
6
7
|
constructor(verifierConfig) {
|
|
7
8
|
Object.defineProperty(this, "verifierConfig", {
|
|
@@ -53,6 +54,14 @@ class VerificationIssuer {
|
|
|
53
54
|
const now = new Date().toISOString();
|
|
54
55
|
const agent = await this.getAgent();
|
|
55
56
|
await Promise.allSettled(verifications.map(async ({ displayName, handle, subject, createdAt }) => {
|
|
57
|
+
if (handle.toLowerCase() === HANDLE_INVALID) {
|
|
58
|
+
failedVerifications.push({
|
|
59
|
+
$type: 'tools.ozone.verification.grantVerifications#grantError',
|
|
60
|
+
error: 'Cannot verify with invalid handle',
|
|
61
|
+
subject,
|
|
62
|
+
});
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
56
65
|
try {
|
|
57
66
|
const verificationRecord = {
|
|
58
67
|
createdAt: createdAt || now,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"issuer.js","sourceRoot":"","sources":["../../src/verification/issuer.ts"],"names":[],"mappings":";;;AACA,sCAA8D;AAe9D,MAAa,kBAAkB;IAG7B,YAAoB,cAA8B;QAAtC;;;;mBAAQ,cAAc;WAAgB;QAF1C;;;;mBAAU,IAAI,uBAAiB,CAAC,IAAI,GAAG,CAAC,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC;WAAA;QACjE;;;;mBAAQ,IAAI,WAAK,CAAC,IAAI,CAAC,OAAO,CAAC;WAAA;IACc,CAAC;IAEtD,MAAM,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VerifierConfig } from '../config'\nimport { Verification } from '../db/schema/verification'\n\nexport type VerificationInput = {\n displayName: string\n handle: string\n subject: string\n createdAt?: string\n}\n\nexport type VerificationIssuerCreator = (\n verifierConfig: VerifierConfig,\n) => VerificationIssuer\n\nconst HANDLE_INVALID = 'handle.invalid'\n\nexport class VerificationIssuer {\n private session = new CredentialSession(new URL(this.verifierConfig.url))\n private agent = new Agent(this.session)\n constructor(private verifierConfig: VerifierConfig) {}\n\n static creator() {\n return (verifierConfig: VerifierConfig) =>\n new VerificationIssuer(verifierConfig)\n }\n\n async getAgent() {\n if (!this.session.hasSession) {\n await this.session.login({\n identifier: this.verifierConfig.did,\n password: this.verifierConfig.password,\n })\n }\n\n // Trigger a test request to check if the session is still valid, if not, we will login again\n try {\n await this.agent.com.atproto.server.getSession()\n } catch (err) {\n if ((err as any).status === 401) {\n await this.session.login({\n identifier: this.verifierConfig.did,\n password: this.verifierConfig.password,\n })\n }\n }\n\n return this.agent\n }\n\n async verify(verifications: VerificationInput[]) {\n const grantedVerifications: Selectable<Verification>[] = []\n const failedVerifications: {\n $type: 'tools.ozone.verification.grantVerifications#grantError'\n subject: string\n error: string\n }[] = []\n const now = new Date().toISOString()\n const agent = await this.getAgent()\n await Promise.allSettled(\n verifications.map(async ({ displayName, handle, subject, createdAt }) => {\n if (handle.toLowerCase() === HANDLE_INVALID) {\n failedVerifications.push({\n $type: 'tools.ozone.verification.grantVerifications#grantError',\n error: 'Cannot verify with invalid handle',\n subject,\n })\n return\n }\n\n try {\n const verificationRecord = {\n createdAt: createdAt || now,\n issuer: this.verifierConfig.did,\n displayName,\n handle,\n subject,\n }\n const {\n data: { uri, cid },\n } = await agent.com.atproto.repo.createRecord({\n repo: this.verifierConfig.did,\n record: verificationRecord,\n collection: 'app.bsky.graph.verification',\n })\n grantedVerifications.push({\n ...verificationRecord,\n uri,\n cid,\n revokedAt: null,\n updatedAt: now,\n revokedBy: null,\n revokeReason: null,\n })\n } catch (err) {\n failedVerifications.push({\n $type: 'tools.ozone.verification.grantVerifications#grantError',\n error: (err as Error).message,\n subject,\n })\n return\n }\n }),\n )\n\n return { grantedVerifications, failedVerifications }\n }\n\n async revoke({ uris }: { uris: string[] }) {\n const revokedVerifications: string[] = []\n const failedRevocations: Array<{ uri: string; error: string }> = []\n\n const agent = await this.getAgent()\n\n await Promise.allSettled(\n uris.map(async (uri) => {\n try {\n const atUri = new AtUri(uri)\n\n if (atUri.collection !== 'app.bsky.graph.verification') {\n throw new Error(`Only verification records can be revoked`)\n }\n\n if (atUri.host !== this.verifierConfig.did) {\n throw new Error(\n `Cannot revoke verification record ${uri} not issued by ${this.verifierConfig.did}`,\n )\n }\n\n await agent.com.atproto.repo.deleteRecord({\n collection: atUri.collection,\n repo: this.verifierConfig.did,\n rkey: atUri.rkey,\n })\n revokedVerifications.push(uri)\n } catch (err) {\n failedRevocations.push({ uri, error: (err as Error).message })\n return\n }\n }),\n )\n\n return { revokedVerifications, failedRevocations }\n }\n}\n"]}
|