@atproto/bsky 0.0.11 → 0.0.13
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 +29 -0
- package/LICENSE.txt +7 -0
- package/README.md +6 -1
- package/dist/api/com/atproto/admin/util.d.ts +5 -0
- package/dist/context.d.ts +6 -1
- package/dist/db/index.js +51 -2
- package/dist/db/index.js.map +3 -3
- package/dist/db/migrations/20230929T192920807Z-record-cursor-indexes.d.ts +3 -0
- package/dist/db/migrations/index.d.ts +1 -0
- package/dist/did-cache.d.ts +2 -2
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1630 -755
- package/dist/index.js.map +3 -3
- package/dist/lexicon/index.d.ts +8 -0
- package/dist/lexicon/lexicons.d.ts +243 -3
- package/dist/lexicon/types/app/bsky/actor/defs.d.ts +1 -0
- package/dist/lexicon/types/com/atproto/admin/defs.d.ts +28 -0
- package/dist/lexicon/types/com/atproto/admin/getAccountInfo.d.ts +29 -0
- package/dist/lexicon/types/com/atproto/admin/getSubjectStatus.d.ts +39 -0
- package/dist/lexicon/types/com/atproto/admin/searchRepos.d.ts +0 -1
- package/dist/lexicon/types/com/atproto/admin/updateSubjectStatus.d.ts +46 -0
- package/dist/lexicon/types/com/atproto/server/createAccount.d.ts +4 -2
- package/dist/lexicon/types/com/atproto/server/createSession.d.ts +1 -0
- package/dist/lexicon/types/com/atproto/server/refreshSession.d.ts +1 -0
- package/dist/lexicon/types/com/atproto/server/reserveSigningKey.d.ts +36 -0
- package/dist/lexicon/types/com/atproto/sync/listRepos.d.ts +1 -0
- package/dist/services/actor/types.d.ts +1 -0
- package/dist/services/graph/index.d.ts +2 -0
- package/dist/services/moderation/index.d.ts +13 -3
- package/package.json +14 -15
- package/src/api/app/bsky/feed/getAuthorFeed.ts +2 -2
- package/src/api/app/bsky/feed/getPostThread.ts +2 -2
- package/src/api/app/bsky/notification/listNotifications.ts +33 -22
- package/src/api/com/atproto/admin/getModerationAction.ts +28 -2
- package/src/api/com/atproto/admin/getModerationReport.ts +27 -2
- package/src/api/com/atproto/admin/getRecord.ts +14 -2
- package/src/api/com/atproto/admin/getRepo.ts +13 -2
- package/src/api/com/atproto/admin/reverseModerationAction.ts +31 -5
- package/src/api/com/atproto/admin/searchRepos.ts +2 -5
- package/src/api/com/atproto/admin/takeModerationAction.ts +41 -7
- package/src/api/com/atproto/admin/util.ts +50 -0
- package/src/api/well-known.ts +8 -0
- package/src/auth.ts +12 -5
- package/src/auto-moderator/index.ts +1 -0
- package/src/context.ts +25 -1
- package/src/db/migrations/20230929T192920807Z-record-cursor-indexes.ts +40 -0
- package/src/db/migrations/index.ts +1 -0
- package/src/did-cache.ts +29 -14
- package/src/feed-gen/with-friends.ts +2 -2
- package/src/index.ts +4 -1
- package/src/indexer/subscription.ts +1 -21
- package/src/lexicon/index.ts +48 -0
- package/src/lexicon/lexicons.ts +259 -5
- package/src/lexicon/types/app/bsky/actor/defs.ts +1 -0
- package/src/lexicon/types/com/atproto/admin/defs.ts +61 -0
- package/src/lexicon/types/com/atproto/admin/getAccountInfo.ts +41 -0
- package/src/lexicon/types/com/atproto/admin/getSubjectStatus.ts +54 -0
- package/src/lexicon/types/com/atproto/admin/searchRepos.ts +0 -1
- package/src/lexicon/types/com/atproto/admin/updateSubjectStatus.ts +61 -0
- package/src/lexicon/types/com/atproto/server/createAccount.ts +4 -2
- package/src/lexicon/types/com/atproto/server/createSession.ts +1 -0
- package/src/lexicon/types/com/atproto/server/refreshSession.ts +1 -0
- package/src/lexicon/types/com/atproto/server/reserveSigningKey.ts +51 -0
- package/src/lexicon/types/com/atproto/sync/listRepos.ts +1 -0
- package/src/logger.ts +8 -0
- package/src/services/actor/index.ts +7 -1
- package/src/services/actor/types.ts +1 -0
- package/src/services/actor/views.ts +26 -8
- package/src/services/graph/index.ts +26 -7
- package/src/services/indexing/index.ts +15 -17
- package/src/services/moderation/index.ts +94 -14
- package/src/services/moderation/views.ts +1 -0
- package/tests/__snapshots__/feed-generation.test.ts.snap +12 -12
- package/tests/__snapshots__/indexing.test.ts.snap +4 -4
- package/tests/admin/__snapshots__/get-moderation-action.test.ts.snap +172 -0
- package/tests/admin/__snapshots__/get-moderation-actions.test.ts.snap +178 -0
- package/tests/admin/__snapshots__/get-moderation-report.test.ts.snap +177 -0
- package/tests/admin/__snapshots__/get-moderation-reports.test.ts.snap +307 -0
- package/tests/admin/__snapshots__/get-record.test.ts.snap +275 -0
- package/tests/admin/__snapshots__/get-repo.test.ts.snap +103 -0
- package/tests/admin/get-moderation-action.test.ts +100 -0
- package/tests/admin/get-moderation-actions.test.ts +164 -0
- package/tests/admin/get-moderation-report.test.ts +100 -0
- package/tests/admin/get-moderation-reports.test.ts +332 -0
- package/tests/admin/get-record.test.ts +115 -0
- package/tests/admin/get-repo.test.ts +101 -0
- package/tests/{moderation.test.ts → admin/moderation.test.ts} +107 -9
- package/tests/admin/repo-search.test.ts +124 -0
- package/tests/algos/hot-classic.test.ts +3 -5
- package/tests/algos/whats-hot.test.ts +3 -5
- package/tests/algos/with-friends.test.ts +2 -4
- package/tests/auth.test.ts +64 -0
- package/tests/auto-moderator/fuzzy-matcher.test.ts +2 -3
- package/tests/auto-moderator/labeler.test.ts +5 -7
- package/tests/auto-moderator/takedowns.test.ts +11 -12
- package/tests/blob-resolver.test.ts +1 -3
- package/tests/did-cache.test.ts +2 -5
- package/tests/feed-generation.test.ts +8 -6
- package/tests/handle-invalidation.test.ts +2 -3
- package/tests/image/server.test.ts +1 -4
- package/tests/image/sharp.test.ts +1 -1
- package/tests/indexing.test.ts +4 -4
- package/tests/notification-server.test.ts +2 -3
- package/tests/pipeline/backpressure.test.ts +2 -3
- package/tests/pipeline/reingest.test.ts +7 -4
- package/tests/pipeline/repartition.test.ts +2 -3
- package/tests/reprocessing.test.ts +2 -6
- package/tests/seeds/basic.ts +4 -4
- package/tests/seeds/follows.ts +1 -1
- package/tests/seeds/likes.ts +1 -1
- package/tests/seeds/reposts.ts +1 -1
- package/tests/seeds/users-bulk.ts +1 -1
- package/tests/seeds/users.ts +1 -1
- package/tests/server.test.ts +1 -3
- package/tests/subscription/repo.test.ts +2 -4
- package/tests/views/__snapshots__/author-feed.test.ts.snap +24 -24
- package/tests/views/__snapshots__/block-lists.test.ts.snap +42 -7
- package/tests/views/__snapshots__/blocks.test.ts.snap +2 -2
- package/tests/views/__snapshots__/list-feed.test.ts.snap +6 -6
- package/tests/views/__snapshots__/mute-lists.test.ts.snap +15 -4
- package/tests/views/__snapshots__/mutes.test.ts.snap +2 -2
- package/tests/views/__snapshots__/notifications.test.ts.snap +2 -2
- package/tests/views/__snapshots__/posts.test.ts.snap +8 -8
- package/tests/views/__snapshots__/thread.test.ts.snap +10 -10
- package/tests/views/__snapshots__/timeline.test.ts.snap +58 -58
- package/tests/views/actor-likes.test.ts +2 -3
- package/tests/views/actor-search.test.ts +5 -5
- package/tests/views/admin/repo-search.test.ts +2 -4
- package/tests/views/author-feed.test.ts +2 -4
- package/tests/views/block-lists.test.ts +34 -7
- package/tests/views/blocks.test.ts +6 -3
- package/tests/views/follows.test.ts +2 -4
- package/tests/views/likes.test.ts +2 -5
- package/tests/views/list-feed.test.ts +2 -4
- package/tests/views/mute-lists.test.ts +23 -5
- package/tests/views/mutes.test.ts +2 -5
- package/tests/views/notifications.test.ts +2 -4
- package/tests/views/posts.test.ts +2 -5
- package/tests/views/profile.test.ts +4 -5
- package/tests/views/reposts.test.ts +2 -4
- package/tests/views/suggested-follows.test.ts +2 -3
- package/tests/views/suggestions.test.ts +2 -4
- package/tests/views/thread.test.ts +2 -4
- package/tests/views/threadgating.test.ts +2 -3
- package/tests/views/timeline.test.ts +2 -4
- package/LICENSE +0 -21
- package/dist/env.d.ts +0 -1
- package/example.dev.env +0 -5
- package/src/env.ts +0 -9
- package/tests/seeds/client.ts +0 -466
- /package/tests/{__snapshots__ → admin/__snapshots__}/moderation.test.ts.snap +0 -0
- /package/tests/{image/fixtures → sample-img}/at.png +0 -0
- /package/tests/{image/fixtures → sample-img}/hd-key.jpg +0 -0
- /package/tests/{image/fixtures → sample-img}/key-alt.jpg +0 -0
- /package/tests/{image/fixtures → sample-img}/key-landscape-large.jpg +0 -0
- /package/tests/{image/fixtures → sample-img}/key-landscape-small.jpg +0 -0
- /package/tests/{image/fixtures → sample-img}/key-portrait-large.jpg +0 -0
- /package/tests/{image/fixtures → sample-img}/key-portrait-small.jpg +0 -0
package/dist/index.js
CHANGED
|
@@ -27864,16 +27864,16 @@ var require_validate = __commonJS({
|
|
|
27864
27864
|
const matches = RELATIVE_JSON_POINTER.exec($data);
|
|
27865
27865
|
if (!matches)
|
|
27866
27866
|
throw new Error(`Invalid JSON-pointer: ${$data}`);
|
|
27867
|
-
const
|
|
27867
|
+
const up29 = +matches[1];
|
|
27868
27868
|
jsonPointer = matches[2];
|
|
27869
27869
|
if (jsonPointer === "#") {
|
|
27870
|
-
if (
|
|
27871
|
-
throw new Error(errorMsg("property/index",
|
|
27872
|
-
return dataPathArr[dataLevel -
|
|
27870
|
+
if (up29 >= dataLevel)
|
|
27871
|
+
throw new Error(errorMsg("property/index", up29));
|
|
27872
|
+
return dataPathArr[dataLevel - up29];
|
|
27873
27873
|
}
|
|
27874
|
-
if (
|
|
27875
|
-
throw new Error(errorMsg("data",
|
|
27876
|
-
data = dataNames[dataLevel -
|
|
27874
|
+
if (up29 > dataLevel)
|
|
27875
|
+
throw new Error(errorMsg("data", up29));
|
|
27876
|
+
data = dataNames[dataLevel - up29];
|
|
27877
27877
|
if (!jsonPointer)
|
|
27878
27878
|
return data;
|
|
27879
27879
|
}
|
|
@@ -27886,8 +27886,8 @@ var require_validate = __commonJS({
|
|
|
27886
27886
|
}
|
|
27887
27887
|
}
|
|
27888
27888
|
return expr;
|
|
27889
|
-
function errorMsg(pointerType,
|
|
27890
|
-
return `Cannot access ${pointerType} ${
|
|
27889
|
+
function errorMsg(pointerType, up29) {
|
|
27890
|
+
return `Cannot access ${pointerType} ${up29} levels up, current level is ${dataLevel}`;
|
|
27891
27891
|
}
|
|
27892
27892
|
}
|
|
27893
27893
|
exports.getData = getData;
|
|
@@ -99623,16 +99623,18 @@ var decompressPubkey2 = (compressed) => {
|
|
|
99623
99623
|
};
|
|
99624
99624
|
|
|
99625
99625
|
// ../crypto/src/p256/operations.ts
|
|
99626
|
-
var verifyDidSig = async (did2, data, sig) => {
|
|
99626
|
+
var verifyDidSig = async (did2, data, sig, opts) => {
|
|
99627
99627
|
const { jwtAlg, keyBytes } = parseDidKey(did2);
|
|
99628
99628
|
if (jwtAlg !== P256_JWT_ALG) {
|
|
99629
99629
|
throw new Error(`Not a P-256 did:key: ${did2}`);
|
|
99630
99630
|
}
|
|
99631
|
-
return verifySig(keyBytes, data, sig);
|
|
99631
|
+
return verifySig(keyBytes, data, sig, opts);
|
|
99632
99632
|
};
|
|
99633
|
-
var verifySig = async (publicKey, data, sig) => {
|
|
99633
|
+
var verifySig = async (publicKey, data, sig, opts) => {
|
|
99634
99634
|
const msgHash = await sha2562(data);
|
|
99635
|
-
return p256.verify(sig, msgHash, publicKey, {
|
|
99635
|
+
return p256.verify(sig, msgHash, publicKey, {
|
|
99636
|
+
lowS: opts?.lowS ?? true
|
|
99637
|
+
});
|
|
99636
99638
|
};
|
|
99637
99639
|
|
|
99638
99640
|
// ../crypto/src/p256/plugin.ts
|
|
@@ -99644,16 +99646,18 @@ var p256Plugin = {
|
|
|
99644
99646
|
var plugin_default = p256Plugin;
|
|
99645
99647
|
|
|
99646
99648
|
// ../crypto/src/secp256k1/operations.ts
|
|
99647
|
-
var verifyDidSig2 = async (did2, data, sig) => {
|
|
99649
|
+
var verifyDidSig2 = async (did2, data, sig, opts) => {
|
|
99648
99650
|
const { jwtAlg, keyBytes } = parseDidKey(did2);
|
|
99649
99651
|
if (jwtAlg !== SECP256K1_JWT_ALG) {
|
|
99650
99652
|
throw new Error(`Not a secp256k1 did:key: ${did2}`);
|
|
99651
99653
|
}
|
|
99652
|
-
return verifySig2(keyBytes, data, sig);
|
|
99654
|
+
return verifySig2(keyBytes, data, sig, opts);
|
|
99653
99655
|
};
|
|
99654
|
-
var verifySig2 = async (publicKey, data, sig) => {
|
|
99656
|
+
var verifySig2 = async (publicKey, data, sig, opts) => {
|
|
99655
99657
|
const msgHash = await sha2562(data);
|
|
99656
|
-
return secp256k1.verify(sig, msgHash, publicKey, {
|
|
99658
|
+
return secp256k1.verify(sig, msgHash, publicKey, {
|
|
99659
|
+
lowS: opts?.lowS ?? true
|
|
99660
|
+
});
|
|
99657
99661
|
};
|
|
99658
99662
|
|
|
99659
99663
|
// ../crypto/src/secp256k1/plugin.ts
|
|
@@ -99757,13 +99761,13 @@ var randomIntFromSeed = async (seed, high, low = 0) => {
|
|
|
99757
99761
|
};
|
|
99758
99762
|
|
|
99759
99763
|
// ../crypto/src/verify.ts
|
|
99760
|
-
var verifySignature = (didKey, data, sig) => {
|
|
99764
|
+
var verifySignature = (didKey, data, sig, opts) => {
|
|
99761
99765
|
const parsed = parseDidKey(didKey);
|
|
99762
99766
|
const plugin = plugins_default.find((p) => p.jwtAlg === parsed.jwtAlg);
|
|
99763
99767
|
if (!plugin) {
|
|
99764
|
-
throw new Error(`Unsupported signature alg:
|
|
99768
|
+
throw new Error(`Unsupported signature alg: ${parsed.jwtAlg}`);
|
|
99765
99769
|
}
|
|
99766
|
-
return plugin.verifySignature(didKey, data, sig);
|
|
99770
|
+
return plugin.verifySignature(didKey, data, sig, opts);
|
|
99767
99771
|
};
|
|
99768
99772
|
|
|
99769
99773
|
// ../common-web/src/check.ts
|
|
@@ -99848,6 +99852,19 @@ var createDeferrable = () => {
|
|
|
99848
99852
|
});
|
|
99849
99853
|
return { resolve, complete: promise };
|
|
99850
99854
|
};
|
|
99855
|
+
var handleAllSettledErrors = (results) => {
|
|
99856
|
+
const errors = results.filter(isRejected).map((res) => res.reason);
|
|
99857
|
+
if (errors.length === 0) {
|
|
99858
|
+
return;
|
|
99859
|
+
}
|
|
99860
|
+
if (errors.length === 1) {
|
|
99861
|
+
throw errors[0];
|
|
99862
|
+
}
|
|
99863
|
+
throw new AggregateError(errors, "Multiple errors: " + errors.map((err) => err?.message).join("\n"));
|
|
99864
|
+
};
|
|
99865
|
+
var isRejected = (result) => {
|
|
99866
|
+
return result.status === "rejected";
|
|
99867
|
+
};
|
|
99851
99868
|
|
|
99852
99869
|
// ../common-web/src/tid.ts
|
|
99853
99870
|
var TID_LEN = 13;
|
|
@@ -103609,6 +103626,9 @@ var graphemeLen = (str) => {
|
|
|
103609
103626
|
const splitter = new import_graphemer.default();
|
|
103610
103627
|
return splitter.countGraphemes(str);
|
|
103611
103628
|
};
|
|
103629
|
+
var utf8ToB64Url = (utf8) => {
|
|
103630
|
+
return toString2(fromString2(utf8, "utf8"), "base64url");
|
|
103631
|
+
};
|
|
103612
103632
|
var b64UrlToUtf8 = (b64) => {
|
|
103613
103633
|
return toString2(fromString2(b64, "base64url"), "utf8");
|
|
103614
103634
|
};
|
|
@@ -103617,26 +103637,10 @@ var validateLanguage = (langTag) => {
|
|
|
103617
103637
|
};
|
|
103618
103638
|
var bcp47Regexp = /^((?<grandfathered>(en-GB-oed|i-ami|i-bnn|i-default|i-enochian|i-hak|i-klingon|i-lux|i-mingo|i-navajo|i-pwn|i-tao|i-tay|i-tsu|sgn-BE-FR|sgn-BE-NL|sgn-CH-DE)|(art-lojban|cel-gaulish|no-bok|no-nyn|zh-guoyu|zh-hakka|zh-min|zh-min-nan|zh-xiang))|((?<language>([A-Za-z]{2,3}(-(?<extlang>[A-Za-z]{3}(-[A-Za-z]{3}){0,2}))?)|[A-Za-z]{4}|[A-Za-z]{5,8})(-(?<script>[A-Za-z]{4}))?(-(?<region>[A-Za-z]{2}|[0-9]{3}))?(-(?<variant>[A-Za-z0-9]{5,8}|[0-9][A-Za-z0-9]{3}))*(-(?<extension>[0-9A-WY-Za-wy-z](-[A-Za-z0-9]{2,8})+))*(-(?<privateUseA>x(-[A-Za-z0-9]{1,8})+))?)|(?<privateUseB>x(-[A-Za-z0-9]{1,8})+))$/;
|
|
103619
103639
|
|
|
103620
|
-
// ../
|
|
103621
|
-
var
|
|
103622
|
-
|
|
103623
|
-
|
|
103624
|
-
controller: stringType(),
|
|
103625
|
-
publicKeyMultibase: stringType().optional()
|
|
103626
|
-
});
|
|
103627
|
-
var service = objectType({
|
|
103628
|
-
id: stringType(),
|
|
103629
|
-
type: stringType(),
|
|
103630
|
-
serviceEndpoint: unionType([stringType(), recordType(unknownType())])
|
|
103631
|
-
});
|
|
103632
|
-
var didDocument = objectType({
|
|
103633
|
-
id: stringType(),
|
|
103634
|
-
alsoKnownAs: arrayType(stringType()).optional(),
|
|
103635
|
-
verificationMethod: arrayType(verificationMethod).optional(),
|
|
103636
|
-
service: arrayType(service).optional()
|
|
103637
|
-
});
|
|
103638
|
-
|
|
103639
|
-
// ../identity/src/did/atproto-data.ts
|
|
103640
|
+
// ../common-web/src/did-doc.ts
|
|
103641
|
+
var isValidDidDoc = (doc) => {
|
|
103642
|
+
return didDocument.safeParse(doc).success;
|
|
103643
|
+
};
|
|
103640
103644
|
var getDid = (doc) => {
|
|
103641
103645
|
const id = doc.id;
|
|
103642
103646
|
if (typeof id !== "string") {
|
|
@@ -103644,7 +103648,16 @@ var getDid = (doc) => {
|
|
|
103644
103648
|
}
|
|
103645
103649
|
return id;
|
|
103646
103650
|
};
|
|
103647
|
-
var
|
|
103651
|
+
var getHandle = (doc) => {
|
|
103652
|
+
const aka = doc.alsoKnownAs;
|
|
103653
|
+
if (!aka)
|
|
103654
|
+
return void 0;
|
|
103655
|
+
const found = aka.find((name3) => name3.startsWith("at://"));
|
|
103656
|
+
if (!found)
|
|
103657
|
+
return void 0;
|
|
103658
|
+
return found.slice(5);
|
|
103659
|
+
};
|
|
103660
|
+
var getSigningKey = (doc) => {
|
|
103648
103661
|
const did2 = getDid(doc);
|
|
103649
103662
|
let keys = doc.verificationMethod;
|
|
103650
103663
|
if (!keys)
|
|
@@ -103655,50 +103668,103 @@ var getKey = (doc) => {
|
|
|
103655
103668
|
keys = [keys];
|
|
103656
103669
|
}
|
|
103657
103670
|
const found = keys.find((key) => key.id === "#atproto" || key.id === `${did2}#atproto`);
|
|
103658
|
-
if (!found)
|
|
103671
|
+
if (!found?.publicKeyMultibase)
|
|
103659
103672
|
return void 0;
|
|
103660
|
-
|
|
103661
|
-
|
|
103662
|
-
|
|
103663
|
-
|
|
103664
|
-
if (found.type === "EcdsaSecp256r1VerificationKey2019") {
|
|
103665
|
-
didKey = formatDidKey(P256_JWT_ALG, keyBytes);
|
|
103666
|
-
} else if (found.type === "EcdsaSecp256k1VerificationKey2019") {
|
|
103667
|
-
didKey = formatDidKey(SECP256K1_JWT_ALG, keyBytes);
|
|
103668
|
-
} else if (found.type === "Multikey") {
|
|
103669
|
-
const parsed = parseMultikey(found.publicKeyMultibase);
|
|
103670
|
-
didKey = formatDidKey(parsed.jwtAlg, parsed.keyBytes);
|
|
103671
|
-
}
|
|
103672
|
-
return didKey;
|
|
103673
|
-
};
|
|
103674
|
-
var getHandle = (doc) => {
|
|
103675
|
-
const aka = doc.alsoKnownAs;
|
|
103676
|
-
if (!aka)
|
|
103677
|
-
return void 0;
|
|
103678
|
-
const found = aka.find((name3) => name3.startsWith("at://"));
|
|
103679
|
-
if (!found)
|
|
103680
|
-
return void 0;
|
|
103681
|
-
return found.slice(5);
|
|
103673
|
+
return {
|
|
103674
|
+
type: found.type,
|
|
103675
|
+
publicKeyMultibase: found.publicKeyMultibase
|
|
103676
|
+
};
|
|
103682
103677
|
};
|
|
103683
|
-
var
|
|
103678
|
+
var getPdsEndpoint = (doc) => {
|
|
103684
103679
|
return getServiceEndpoint(doc, {
|
|
103685
103680
|
id: "#atproto_pds",
|
|
103686
103681
|
type: "AtprotoPersonalDataServer"
|
|
103687
103682
|
});
|
|
103688
103683
|
};
|
|
103689
|
-
var
|
|
103684
|
+
var getFeedGenEndpoint = (doc) => {
|
|
103690
103685
|
return getServiceEndpoint(doc, {
|
|
103691
103686
|
id: "#bsky_fg",
|
|
103692
103687
|
type: "BskyFeedGenerator"
|
|
103693
103688
|
});
|
|
103694
103689
|
};
|
|
103690
|
+
var getServiceEndpoint = (doc, opts) => {
|
|
103691
|
+
const did2 = getDid(doc);
|
|
103692
|
+
let services = doc.service;
|
|
103693
|
+
if (!services)
|
|
103694
|
+
return void 0;
|
|
103695
|
+
if (typeof services !== "object")
|
|
103696
|
+
return void 0;
|
|
103697
|
+
if (!Array.isArray(services)) {
|
|
103698
|
+
services = [services];
|
|
103699
|
+
}
|
|
103700
|
+
const found = services.find((service2) => service2.id === opts.id || service2.id === `${did2}${opts.id}`);
|
|
103701
|
+
if (!found)
|
|
103702
|
+
return void 0;
|
|
103703
|
+
if (found.type !== opts.type) {
|
|
103704
|
+
return void 0;
|
|
103705
|
+
}
|
|
103706
|
+
if (typeof found.serviceEndpoint !== "string") {
|
|
103707
|
+
return void 0;
|
|
103708
|
+
}
|
|
103709
|
+
return validateUrl(found.serviceEndpoint);
|
|
103710
|
+
};
|
|
103711
|
+
var validateUrl = (urlStr) => {
|
|
103712
|
+
let url;
|
|
103713
|
+
try {
|
|
103714
|
+
url = new URL(urlStr);
|
|
103715
|
+
} catch {
|
|
103716
|
+
return void 0;
|
|
103717
|
+
}
|
|
103718
|
+
if (!["http:", "https:"].includes(url.protocol)) {
|
|
103719
|
+
return void 0;
|
|
103720
|
+
} else if (!url.hostname) {
|
|
103721
|
+
return void 0;
|
|
103722
|
+
} else {
|
|
103723
|
+
return urlStr;
|
|
103724
|
+
}
|
|
103725
|
+
};
|
|
103726
|
+
var verificationMethod = z.object({
|
|
103727
|
+
id: z.string(),
|
|
103728
|
+
type: z.string(),
|
|
103729
|
+
controller: z.string(),
|
|
103730
|
+
publicKeyMultibase: z.string().optional()
|
|
103731
|
+
});
|
|
103732
|
+
var service = z.object({
|
|
103733
|
+
id: z.string(),
|
|
103734
|
+
type: z.string(),
|
|
103735
|
+
serviceEndpoint: z.union([z.string(), z.record(z.unknown())])
|
|
103736
|
+
});
|
|
103737
|
+
var didDocument = z.object({
|
|
103738
|
+
id: z.string(),
|
|
103739
|
+
alsoKnownAs: z.array(z.string()).optional(),
|
|
103740
|
+
verificationMethod: z.array(verificationMethod).optional(),
|
|
103741
|
+
service: z.array(service).optional()
|
|
103742
|
+
});
|
|
103743
|
+
|
|
103744
|
+
// ../identity/src/did/atproto-data.ts
|
|
103745
|
+
var getKey = (doc) => {
|
|
103746
|
+
const key = getSigningKey(doc);
|
|
103747
|
+
if (!key)
|
|
103748
|
+
return void 0;
|
|
103749
|
+
const keyBytes = multibaseToBytes(key.publicKeyMultibase);
|
|
103750
|
+
let didKey = void 0;
|
|
103751
|
+
if (key.type === "EcdsaSecp256r1VerificationKey2019") {
|
|
103752
|
+
didKey = formatDidKey(P256_JWT_ALG, keyBytes);
|
|
103753
|
+
} else if (key.type === "EcdsaSecp256k1VerificationKey2019") {
|
|
103754
|
+
didKey = formatDidKey(SECP256K1_JWT_ALG, keyBytes);
|
|
103755
|
+
} else if (key.type === "Multikey") {
|
|
103756
|
+
const parsed = parseMultikey(key.publicKeyMultibase);
|
|
103757
|
+
didKey = formatDidKey(parsed.jwtAlg, parsed.keyBytes);
|
|
103758
|
+
}
|
|
103759
|
+
return didKey;
|
|
103760
|
+
};
|
|
103695
103761
|
var parseToAtprotoDocument = (doc) => {
|
|
103696
103762
|
const did2 = getDid(doc);
|
|
103697
103763
|
return {
|
|
103698
103764
|
did: did2,
|
|
103699
103765
|
signingKey: getKey(doc),
|
|
103700
103766
|
handle: getHandle(doc),
|
|
103701
|
-
pds:
|
|
103767
|
+
pds: getPdsEndpoint(doc)
|
|
103702
103768
|
};
|
|
103703
103769
|
};
|
|
103704
103770
|
var ensureAtpDocument = (doc) => {
|
|
@@ -103717,36 +103783,12 @@ var ensureAtpDocument = (doc) => {
|
|
|
103717
103783
|
}
|
|
103718
103784
|
return { did: did2, signingKey, handle: handle2, pds };
|
|
103719
103785
|
};
|
|
103720
|
-
var
|
|
103721
|
-
const {
|
|
103722
|
-
if (!
|
|
103723
|
-
throw new Error(
|
|
103724
|
-
}
|
|
103725
|
-
if (!hostname) {
|
|
103726
|
-
throw new Error("Invalid pds hostname");
|
|
103727
|
-
}
|
|
103728
|
-
};
|
|
103729
|
-
var getServiceEndpoint = (doc, opts) => {
|
|
103730
|
-
const did2 = getDid(doc);
|
|
103731
|
-
let services = doc.service;
|
|
103732
|
-
if (!services)
|
|
103733
|
-
return void 0;
|
|
103734
|
-
if (typeof services !== "object")
|
|
103735
|
-
return void 0;
|
|
103736
|
-
if (!Array.isArray(services)) {
|
|
103737
|
-
services = [services];
|
|
103738
|
-
}
|
|
103739
|
-
const found = services.find((service2) => service2.id === opts.id || service2.id === `${did2}${opts.id}`);
|
|
103740
|
-
if (!found)
|
|
103741
|
-
return void 0;
|
|
103742
|
-
if (found.type !== opts.type) {
|
|
103743
|
-
return void 0;
|
|
103744
|
-
}
|
|
103745
|
-
if (typeof found.serviceEndpoint !== "string") {
|
|
103746
|
-
return void 0;
|
|
103786
|
+
var ensureAtprotoKey = (doc) => {
|
|
103787
|
+
const { signingKey } = parseToAtprotoDocument(doc);
|
|
103788
|
+
if (!signingKey) {
|
|
103789
|
+
throw new Error(`Could not parse signingKey from doc: ${doc}`);
|
|
103747
103790
|
}
|
|
103748
|
-
|
|
103749
|
-
return found.serviceEndpoint;
|
|
103791
|
+
return signingKey;
|
|
103750
103792
|
};
|
|
103751
103793
|
|
|
103752
103794
|
// ../identity/src/errors.ts
|
|
@@ -103802,16 +103844,17 @@ var BaseResolver = class {
|
|
|
103802
103844
|
return null;
|
|
103803
103845
|
return this.validateDidDoc(did2, got);
|
|
103804
103846
|
}
|
|
103805
|
-
async refreshCache(did2) {
|
|
103806
|
-
await this.cache?.refreshCache(did2, () => this.resolveNoCache(did2));
|
|
103847
|
+
async refreshCache(did2, prevResult) {
|
|
103848
|
+
await this.cache?.refreshCache(did2, () => this.resolveNoCache(did2), prevResult);
|
|
103807
103849
|
}
|
|
103808
103850
|
async resolve(did2, forceRefresh = false) {
|
|
103851
|
+
let fromCache = null;
|
|
103809
103852
|
if (this.cache && !forceRefresh) {
|
|
103810
|
-
|
|
103811
|
-
if (fromCache
|
|
103812
|
-
|
|
103813
|
-
|
|
103814
|
-
|
|
103853
|
+
fromCache = await this.cache.checkCache(did2);
|
|
103854
|
+
if (fromCache && !fromCache.expired) {
|
|
103855
|
+
if (fromCache?.stale) {
|
|
103856
|
+
await this.refreshCache(did2, fromCache);
|
|
103857
|
+
}
|
|
103815
103858
|
return fromCache.doc;
|
|
103816
103859
|
}
|
|
103817
103860
|
}
|
|
@@ -103820,7 +103863,7 @@ var BaseResolver = class {
|
|
|
103820
103863
|
await this.cache?.clearEntry(did2);
|
|
103821
103864
|
return null;
|
|
103822
103865
|
}
|
|
103823
|
-
await this.cache?.cacheDid(did2, got);
|
|
103866
|
+
await this.cache?.cacheDid(did2, got, fromCache ?? void 0);
|
|
103824
103867
|
return got;
|
|
103825
103868
|
}
|
|
103826
103869
|
async ensureResolve(did2, forceRefresh = false) {
|
|
@@ -103838,8 +103881,8 @@ var BaseResolver = class {
|
|
|
103838
103881
|
if (did2.startsWith("did:key:")) {
|
|
103839
103882
|
return did2;
|
|
103840
103883
|
} else {
|
|
103841
|
-
const
|
|
103842
|
-
return
|
|
103884
|
+
const didDocument2 = await this.ensureResolve(did2, forceRefresh);
|
|
103885
|
+
return ensureAtprotoKey(didDocument2);
|
|
103843
103886
|
}
|
|
103844
103887
|
}
|
|
103845
103888
|
async verifySignature(did2, data, sig, forceRefresh = false) {
|
|
@@ -103972,7 +104015,7 @@ var HandleResolver = class {
|
|
|
103972
104015
|
const url = new URL("/.well-known/atproto-did", `https://${handle2}`);
|
|
103973
104016
|
try {
|
|
103974
104017
|
const res = await fetch(url, { signal });
|
|
103975
|
-
const did2 = await res.text();
|
|
104018
|
+
const did2 = (await res.text()).split("\n")[0].trim();
|
|
103976
104019
|
if (typeof did2 === "string" && did2.startsWith("did:")) {
|
|
103977
104020
|
return did2;
|
|
103978
104021
|
}
|
|
@@ -105260,15 +105303,6 @@ var discriminatedObject = z.object({ $type: z.string() });
|
|
|
105260
105303
|
function isDiscriminatedObject(value) {
|
|
105261
105304
|
return discriminatedObject.safeParse(value).success;
|
|
105262
105305
|
}
|
|
105263
|
-
var LexiconDocMalformedError = class extends Error {
|
|
105264
|
-
constructor(message, schemaDef, issues) {
|
|
105265
|
-
super(message);
|
|
105266
|
-
this.schemaDef = schemaDef;
|
|
105267
|
-
this.issues = issues;
|
|
105268
|
-
this.schemaDef = schemaDef;
|
|
105269
|
-
this.issues = issues;
|
|
105270
|
-
}
|
|
105271
|
-
};
|
|
105272
105306
|
var ValidationError = class extends Error {
|
|
105273
105307
|
};
|
|
105274
105308
|
var InvalidLexiconError = class extends Error {
|
|
@@ -105349,23 +105383,13 @@ var Lexicons = class {
|
|
|
105349
105383
|
}
|
|
105350
105384
|
}
|
|
105351
105385
|
add(doc) {
|
|
105352
|
-
|
|
105353
|
-
lexiconDoc.parse(doc);
|
|
105354
|
-
} catch (e) {
|
|
105355
|
-
if (e instanceof ZodError) {
|
|
105356
|
-
throw new LexiconDocMalformedError(`Failed to parse schema definition ${doc.id}`, doc, e.issues);
|
|
105357
|
-
} else {
|
|
105358
|
-
throw e;
|
|
105359
|
-
}
|
|
105360
|
-
}
|
|
105361
|
-
const validatedDoc = doc;
|
|
105362
|
-
const uri2 = toLexUri(validatedDoc.id);
|
|
105386
|
+
const uri2 = toLexUri(doc.id);
|
|
105363
105387
|
if (this.docs.has(uri2)) {
|
|
105364
105388
|
throw new Error(`${uri2} has already been registered`);
|
|
105365
105389
|
}
|
|
105366
|
-
resolveRefUris(
|
|
105367
|
-
this.docs.set(uri2,
|
|
105368
|
-
for (const [defUri, def3] of iterDefs(
|
|
105390
|
+
resolveRefUris(doc, uri2);
|
|
105391
|
+
this.docs.set(uri2, doc);
|
|
105392
|
+
for (const [defUri, def3] of iterDefs(doc)) {
|
|
105369
105393
|
this.defs.set(defUri, def3);
|
|
105370
105394
|
}
|
|
105371
105395
|
}
|
|
@@ -109920,7 +109944,27 @@ function ui8ToBuffer(bytes3) {
|
|
|
109920
109944
|
}
|
|
109921
109945
|
|
|
109922
109946
|
// ../xrpc-server/src/auth.ts
|
|
109923
|
-
var
|
|
109947
|
+
var createServiceJwt = async (params2) => {
|
|
109948
|
+
const { iss, aud, keypair } = params2;
|
|
109949
|
+
const exp = params2.exp ?? Math.floor((Date.now() + MINUTE) / 1e3);
|
|
109950
|
+
const header = {
|
|
109951
|
+
typ: "JWT",
|
|
109952
|
+
alg: keypair.jwtAlg
|
|
109953
|
+
};
|
|
109954
|
+
const payload = {
|
|
109955
|
+
iss,
|
|
109956
|
+
aud,
|
|
109957
|
+
exp
|
|
109958
|
+
};
|
|
109959
|
+
const toSignStr = `${jsonToB64Url(header)}.${jsonToB64Url(payload)}`;
|
|
109960
|
+
const toSign = fromString2(toSignStr, "utf8");
|
|
109961
|
+
const sig = await keypair.sign(toSign);
|
|
109962
|
+
return `${toSignStr}.${toString2(sig, "base64url")}`;
|
|
109963
|
+
};
|
|
109964
|
+
var jsonToB64Url = (json) => {
|
|
109965
|
+
return utf8ToB64Url(JSON.stringify(json));
|
|
109966
|
+
};
|
|
109967
|
+
var verifyJwt = async (jwtStr, ownDid, getSigningKey2) => {
|
|
109924
109968
|
const parts = jwtStr.split(".");
|
|
109925
109969
|
if (parts.length !== 3) {
|
|
109926
109970
|
throw new AuthRequiredError("poorly formatted jwt", "BadJwt");
|
|
@@ -109935,17 +109979,30 @@ var verifyJwt = async (jwtStr, ownDid, getSigningKey) => {
|
|
|
109935
109979
|
}
|
|
109936
109980
|
const msgBytes = fromString2(parts.slice(0, 2).join("."), "utf8");
|
|
109937
109981
|
const sigBytes = fromString2(sig, "base64url");
|
|
109938
|
-
const
|
|
109982
|
+
const verifySignatureWithKey = (key) => {
|
|
109983
|
+
return verifySignature(key, msgBytes, sigBytes, {
|
|
109984
|
+
lowS: false
|
|
109985
|
+
});
|
|
109986
|
+
};
|
|
109987
|
+
const signingKey = await getSigningKey2(payload.iss, false);
|
|
109939
109988
|
let validSig;
|
|
109940
109989
|
try {
|
|
109941
|
-
validSig = await
|
|
109990
|
+
validSig = await verifySignatureWithKey(signingKey);
|
|
109942
109991
|
} catch (err) {
|
|
109943
109992
|
throw new AuthRequiredError("could not verify jwt signature", "BadJwtSignature");
|
|
109944
109993
|
}
|
|
109994
|
+
if (!validSig) {
|
|
109995
|
+
const freshSigningKey = await getSigningKey2(payload.iss, true);
|
|
109996
|
+
try {
|
|
109997
|
+
validSig = freshSigningKey !== signingKey ? await verifySignatureWithKey(freshSigningKey) : false;
|
|
109998
|
+
} catch (err) {
|
|
109999
|
+
throw new AuthRequiredError("could not verify jwt signature", "BadJwtSignature");
|
|
110000
|
+
}
|
|
110001
|
+
}
|
|
109945
110002
|
if (!validSig) {
|
|
109946
110003
|
throw new AuthRequiredError("jwt signature does not match jwt issuer", "BadJwtSignature");
|
|
109947
110004
|
}
|
|
109948
|
-
return payload
|
|
110005
|
+
return payload;
|
|
109949
110006
|
};
|
|
109950
110007
|
var parseB64UrlToJson = (b64) => {
|
|
109951
110008
|
return JSON.parse(b64UrlToUtf8(b64));
|
|
@@ -118755,7 +118812,7 @@ var skeleton2 = async (params2, ctx) => {
|
|
|
118755
118812
|
}
|
|
118756
118813
|
let feedItemsQb = feedService.selectFeedItemQb().where("originatorDid", "=", actorDid);
|
|
118757
118814
|
if (filter === "posts_with_media") {
|
|
118758
|
-
feedItemsQb = feedItemsQb.where("
|
|
118815
|
+
feedItemsQb = feedItemsQb.where("type", "=", "post").whereExists((qb) => qb.selectFrom("post_embed_image").select("post_embed_image.postUri").whereRef("post_embed_image.postUri", "=", "feed_item.postUri"));
|
|
118759
118816
|
} else if (filter === "posts_no_replies") {
|
|
118760
118817
|
feedItemsQb = feedItemsQb.where((qb) => qb.where("post.replyParent", "is", null).orWhere("type", "=", "repost"));
|
|
118761
118818
|
}
|
|
@@ -118806,6 +118863,18 @@ var schemaDict = {
|
|
|
118806
118863
|
lexicon: 1,
|
|
118807
118864
|
id: "com.atproto.admin.defs",
|
|
118808
118865
|
defs: {
|
|
118866
|
+
statusAttr: {
|
|
118867
|
+
type: "object",
|
|
118868
|
+
required: ["applied"],
|
|
118869
|
+
properties: {
|
|
118870
|
+
applied: {
|
|
118871
|
+
type: "boolean"
|
|
118872
|
+
},
|
|
118873
|
+
ref: {
|
|
118874
|
+
type: "string"
|
|
118875
|
+
}
|
|
118876
|
+
}
|
|
118877
|
+
},
|
|
118809
118878
|
actionView: {
|
|
118810
118879
|
type: "object",
|
|
118811
118880
|
required: [
|
|
@@ -119215,6 +119284,44 @@ var schemaDict = {
|
|
|
119215
119284
|
}
|
|
119216
119285
|
}
|
|
119217
119286
|
},
|
|
119287
|
+
accountView: {
|
|
119288
|
+
type: "object",
|
|
119289
|
+
required: ["did", "handle", "indexedAt"],
|
|
119290
|
+
properties: {
|
|
119291
|
+
did: {
|
|
119292
|
+
type: "string",
|
|
119293
|
+
format: "did"
|
|
119294
|
+
},
|
|
119295
|
+
handle: {
|
|
119296
|
+
type: "string",
|
|
119297
|
+
format: "handle"
|
|
119298
|
+
},
|
|
119299
|
+
email: {
|
|
119300
|
+
type: "string"
|
|
119301
|
+
},
|
|
119302
|
+
indexedAt: {
|
|
119303
|
+
type: "string",
|
|
119304
|
+
format: "datetime"
|
|
119305
|
+
},
|
|
119306
|
+
invitedBy: {
|
|
119307
|
+
type: "ref",
|
|
119308
|
+
ref: "lex:com.atproto.server.defs#inviteCode"
|
|
119309
|
+
},
|
|
119310
|
+
invites: {
|
|
119311
|
+
type: "array",
|
|
119312
|
+
items: {
|
|
119313
|
+
type: "ref",
|
|
119314
|
+
ref: "lex:com.atproto.server.defs#inviteCode"
|
|
119315
|
+
}
|
|
119316
|
+
},
|
|
119317
|
+
invitesDisabled: {
|
|
119318
|
+
type: "boolean"
|
|
119319
|
+
},
|
|
119320
|
+
inviteNote: {
|
|
119321
|
+
type: "string"
|
|
119322
|
+
}
|
|
119323
|
+
}
|
|
119324
|
+
},
|
|
119218
119325
|
repoViewNotFound: {
|
|
119219
119326
|
type: "object",
|
|
119220
119327
|
required: ["did"],
|
|
@@ -119235,6 +119342,24 @@ var schemaDict = {
|
|
|
119235
119342
|
}
|
|
119236
119343
|
}
|
|
119237
119344
|
},
|
|
119345
|
+
repoBlobRef: {
|
|
119346
|
+
type: "object",
|
|
119347
|
+
required: ["did", "cid"],
|
|
119348
|
+
properties: {
|
|
119349
|
+
did: {
|
|
119350
|
+
type: "string",
|
|
119351
|
+
format: "did"
|
|
119352
|
+
},
|
|
119353
|
+
cid: {
|
|
119354
|
+
type: "string",
|
|
119355
|
+
format: "cid"
|
|
119356
|
+
},
|
|
119357
|
+
recordUri: {
|
|
119358
|
+
type: "string",
|
|
119359
|
+
format: "at-uri"
|
|
119360
|
+
}
|
|
119361
|
+
}
|
|
119362
|
+
},
|
|
119238
119363
|
recordView: {
|
|
119239
119364
|
type: "object",
|
|
119240
119365
|
required: [
|
|
@@ -119517,6 +119642,33 @@ var schemaDict = {
|
|
|
119517
119642
|
}
|
|
119518
119643
|
}
|
|
119519
119644
|
},
|
|
119645
|
+
ComAtprotoAdminGetAccountInfo: {
|
|
119646
|
+
lexicon: 1,
|
|
119647
|
+
id: "com.atproto.admin.getAccountInfo",
|
|
119648
|
+
defs: {
|
|
119649
|
+
main: {
|
|
119650
|
+
type: "query",
|
|
119651
|
+
description: "View details about an account.",
|
|
119652
|
+
parameters: {
|
|
119653
|
+
type: "params",
|
|
119654
|
+
required: ["did"],
|
|
119655
|
+
properties: {
|
|
119656
|
+
did: {
|
|
119657
|
+
type: "string",
|
|
119658
|
+
format: "did"
|
|
119659
|
+
}
|
|
119660
|
+
}
|
|
119661
|
+
},
|
|
119662
|
+
output: {
|
|
119663
|
+
encoding: "application/json",
|
|
119664
|
+
schema: {
|
|
119665
|
+
type: "ref",
|
|
119666
|
+
ref: "lex:com.atproto.admin.defs#accountView"
|
|
119667
|
+
}
|
|
119668
|
+
}
|
|
119669
|
+
}
|
|
119670
|
+
}
|
|
119671
|
+
},
|
|
119520
119672
|
ComAtprotoAdminGetInviteCodes: {
|
|
119521
119673
|
lexicon: 1,
|
|
119522
119674
|
id: "com.atproto.admin.getInviteCodes",
|
|
@@ -119811,6 +119963,54 @@ var schemaDict = {
|
|
|
119811
119963
|
}
|
|
119812
119964
|
}
|
|
119813
119965
|
},
|
|
119966
|
+
ComAtprotoAdminGetSubjectStatus: {
|
|
119967
|
+
lexicon: 1,
|
|
119968
|
+
id: "com.atproto.admin.getSubjectStatus",
|
|
119969
|
+
defs: {
|
|
119970
|
+
main: {
|
|
119971
|
+
type: "query",
|
|
119972
|
+
description: "Fetch the service-specific the admin status of a subject (account, record, or blob)",
|
|
119973
|
+
parameters: {
|
|
119974
|
+
type: "params",
|
|
119975
|
+
properties: {
|
|
119976
|
+
did: {
|
|
119977
|
+
type: "string",
|
|
119978
|
+
format: "did"
|
|
119979
|
+
},
|
|
119980
|
+
uri: {
|
|
119981
|
+
type: "string",
|
|
119982
|
+
format: "at-uri"
|
|
119983
|
+
},
|
|
119984
|
+
blob: {
|
|
119985
|
+
type: "string",
|
|
119986
|
+
format: "cid"
|
|
119987
|
+
}
|
|
119988
|
+
}
|
|
119989
|
+
},
|
|
119990
|
+
output: {
|
|
119991
|
+
encoding: "application/json",
|
|
119992
|
+
schema: {
|
|
119993
|
+
type: "object",
|
|
119994
|
+
required: ["subject"],
|
|
119995
|
+
properties: {
|
|
119996
|
+
subject: {
|
|
119997
|
+
type: "union",
|
|
119998
|
+
refs: [
|
|
119999
|
+
"lex:com.atproto.admin.defs#repoRef",
|
|
120000
|
+
"lex:com.atproto.repo.strongRef",
|
|
120001
|
+
"lex:com.atproto.admin.defs#repoBlobRef"
|
|
120002
|
+
]
|
|
120003
|
+
},
|
|
120004
|
+
takedown: {
|
|
120005
|
+
type: "ref",
|
|
120006
|
+
ref: "lex:com.atproto.admin.defs#statusAttr"
|
|
120007
|
+
}
|
|
120008
|
+
}
|
|
120009
|
+
}
|
|
120010
|
+
}
|
|
120011
|
+
}
|
|
120012
|
+
}
|
|
120013
|
+
},
|
|
119814
120014
|
ComAtprotoAdminResolveModerationReports: {
|
|
119815
120015
|
lexicon: 1,
|
|
119816
120016
|
id: "com.atproto.admin.resolveModerationReports",
|
|
@@ -119903,9 +120103,6 @@ var schemaDict = {
|
|
|
119903
120103
|
q: {
|
|
119904
120104
|
type: "string"
|
|
119905
120105
|
},
|
|
119906
|
-
invitedBy: {
|
|
119907
|
-
type: "string"
|
|
119908
|
-
},
|
|
119909
120106
|
limit: {
|
|
119910
120107
|
type: "integer",
|
|
119911
120108
|
minimum: 1,
|
|
@@ -120110,6 +120307,58 @@ var schemaDict = {
|
|
|
120110
120307
|
}
|
|
120111
120308
|
}
|
|
120112
120309
|
},
|
|
120310
|
+
ComAtprotoAdminUpdateSubjectStatus: {
|
|
120311
|
+
lexicon: 1,
|
|
120312
|
+
id: "com.atproto.admin.updateSubjectStatus",
|
|
120313
|
+
defs: {
|
|
120314
|
+
main: {
|
|
120315
|
+
type: "procedure",
|
|
120316
|
+
description: "Update the service-specific admin status of a subject (account, record, or blob)",
|
|
120317
|
+
input: {
|
|
120318
|
+
encoding: "application/json",
|
|
120319
|
+
schema: {
|
|
120320
|
+
type: "object",
|
|
120321
|
+
required: ["subject"],
|
|
120322
|
+
properties: {
|
|
120323
|
+
subject: {
|
|
120324
|
+
type: "union",
|
|
120325
|
+
refs: [
|
|
120326
|
+
"lex:com.atproto.admin.defs#repoRef",
|
|
120327
|
+
"lex:com.atproto.repo.strongRef",
|
|
120328
|
+
"lex:com.atproto.admin.defs#repoBlobRef"
|
|
120329
|
+
]
|
|
120330
|
+
},
|
|
120331
|
+
takedown: {
|
|
120332
|
+
type: "ref",
|
|
120333
|
+
ref: "lex:com.atproto.admin.defs#statusAttr"
|
|
120334
|
+
}
|
|
120335
|
+
}
|
|
120336
|
+
}
|
|
120337
|
+
},
|
|
120338
|
+
output: {
|
|
120339
|
+
encoding: "application/json",
|
|
120340
|
+
schema: {
|
|
120341
|
+
type: "object",
|
|
120342
|
+
required: ["subject"],
|
|
120343
|
+
properties: {
|
|
120344
|
+
subject: {
|
|
120345
|
+
type: "union",
|
|
120346
|
+
refs: [
|
|
120347
|
+
"lex:com.atproto.admin.defs#repoRef",
|
|
120348
|
+
"lex:com.atproto.repo.strongRef",
|
|
120349
|
+
"lex:com.atproto.admin.defs#repoBlobRef"
|
|
120350
|
+
]
|
|
120351
|
+
},
|
|
120352
|
+
takedown: {
|
|
120353
|
+
type: "ref",
|
|
120354
|
+
ref: "lex:com.atproto.admin.defs#statusAttr"
|
|
120355
|
+
}
|
|
120356
|
+
}
|
|
120357
|
+
}
|
|
120358
|
+
}
|
|
120359
|
+
}
|
|
120360
|
+
}
|
|
120361
|
+
},
|
|
120113
120362
|
ComAtprotoIdentityResolveHandle: {
|
|
120114
120363
|
lexicon: 1,
|
|
120115
120364
|
id: "com.atproto.identity.resolveHandle",
|
|
@@ -120407,7 +120656,9 @@ var schemaDict = {
|
|
|
120407
120656
|
ref: "lex:com.atproto.moderation.defs#reasonType"
|
|
120408
120657
|
},
|
|
120409
120658
|
reason: {
|
|
120410
|
-
type: "string"
|
|
120659
|
+
type: "string",
|
|
120660
|
+
maxGraphemes: 2e3,
|
|
120661
|
+
maxLength: 2e4
|
|
120411
120662
|
},
|
|
120412
120663
|
subject: {
|
|
120413
120664
|
type: "union",
|
|
@@ -121056,7 +121307,7 @@ var schemaDict = {
|
|
|
121056
121307
|
encoding: "application/json",
|
|
121057
121308
|
schema: {
|
|
121058
121309
|
type: "object",
|
|
121059
|
-
required: ["handle"
|
|
121310
|
+
required: ["handle"],
|
|
121060
121311
|
properties: {
|
|
121061
121312
|
email: {
|
|
121062
121313
|
type: "string"
|
|
@@ -121077,6 +121328,9 @@ var schemaDict = {
|
|
|
121077
121328
|
},
|
|
121078
121329
|
recoveryKey: {
|
|
121079
121330
|
type: "string"
|
|
121331
|
+
},
|
|
121332
|
+
plcOp: {
|
|
121333
|
+
type: "unknown"
|
|
121080
121334
|
}
|
|
121081
121335
|
}
|
|
121082
121336
|
}
|
|
@@ -121100,6 +121354,9 @@ var schemaDict = {
|
|
|
121100
121354
|
did: {
|
|
121101
121355
|
type: "string",
|
|
121102
121356
|
format: "did"
|
|
121357
|
+
},
|
|
121358
|
+
didDoc: {
|
|
121359
|
+
type: "unknown"
|
|
121103
121360
|
}
|
|
121104
121361
|
}
|
|
121105
121362
|
}
|
|
@@ -121325,6 +121582,9 @@ var schemaDict = {
|
|
|
121325
121582
|
type: "string",
|
|
121326
121583
|
format: "did"
|
|
121327
121584
|
},
|
|
121585
|
+
didDoc: {
|
|
121586
|
+
type: "unknown"
|
|
121587
|
+
},
|
|
121328
121588
|
email: {
|
|
121329
121589
|
type: "string"
|
|
121330
121590
|
},
|
|
@@ -121639,6 +121899,9 @@ var schemaDict = {
|
|
|
121639
121899
|
did: {
|
|
121640
121900
|
type: "string",
|
|
121641
121901
|
format: "did"
|
|
121902
|
+
},
|
|
121903
|
+
didDoc: {
|
|
121904
|
+
type: "unknown"
|
|
121642
121905
|
}
|
|
121643
121906
|
}
|
|
121644
121907
|
}
|
|
@@ -121715,6 +121978,41 @@ var schemaDict = {
|
|
|
121715
121978
|
}
|
|
121716
121979
|
}
|
|
121717
121980
|
},
|
|
121981
|
+
ComAtprotoServerReserveSigningKey: {
|
|
121982
|
+
lexicon: 1,
|
|
121983
|
+
id: "com.atproto.server.reserveSigningKey",
|
|
121984
|
+
defs: {
|
|
121985
|
+
main: {
|
|
121986
|
+
type: "procedure",
|
|
121987
|
+
description: "Reserve a repo signing key for account creation.",
|
|
121988
|
+
input: {
|
|
121989
|
+
encoding: "application/json",
|
|
121990
|
+
schema: {
|
|
121991
|
+
type: "object",
|
|
121992
|
+
properties: {
|
|
121993
|
+
did: {
|
|
121994
|
+
type: "string",
|
|
121995
|
+
description: "The did to reserve a new did:key for"
|
|
121996
|
+
}
|
|
121997
|
+
}
|
|
121998
|
+
}
|
|
121999
|
+
},
|
|
122000
|
+
output: {
|
|
122001
|
+
encoding: "application/json",
|
|
122002
|
+
schema: {
|
|
122003
|
+
type: "object",
|
|
122004
|
+
required: ["signingKey"],
|
|
122005
|
+
properties: {
|
|
122006
|
+
signingKey: {
|
|
122007
|
+
type: "string",
|
|
122008
|
+
description: "Public signing key in the form of a did:key."
|
|
122009
|
+
}
|
|
122010
|
+
}
|
|
122011
|
+
}
|
|
122012
|
+
}
|
|
122013
|
+
}
|
|
122014
|
+
}
|
|
122015
|
+
},
|
|
121718
122016
|
ComAtprotoServerResetPassword: {
|
|
121719
122017
|
lexicon: 1,
|
|
121720
122018
|
id: "com.atproto.server.resetPassword",
|
|
@@ -122132,7 +122430,7 @@ var schemaDict = {
|
|
|
122132
122430
|
},
|
|
122133
122431
|
repo: {
|
|
122134
122432
|
type: "object",
|
|
122135
|
-
required: ["did", "head"],
|
|
122433
|
+
required: ["did", "head", "rev"],
|
|
122136
122434
|
properties: {
|
|
122137
122435
|
did: {
|
|
122138
122436
|
type: "string",
|
|
@@ -122141,6 +122439,9 @@ var schemaDict = {
|
|
|
122141
122439
|
head: {
|
|
122142
122440
|
type: "string",
|
|
122143
122441
|
format: "cid"
|
|
122442
|
+
},
|
|
122443
|
+
rev: {
|
|
122444
|
+
type: "string"
|
|
122144
122445
|
}
|
|
122145
122446
|
}
|
|
122146
122447
|
}
|
|
@@ -122541,6 +122842,10 @@ var schemaDict = {
|
|
|
122541
122842
|
type: "string",
|
|
122542
122843
|
format: "at-uri"
|
|
122543
122844
|
},
|
|
122845
|
+
blockingByList: {
|
|
122846
|
+
type: "ref",
|
|
122847
|
+
ref: "lex:app.bsky.graph.defs#listViewBasic"
|
|
122848
|
+
},
|
|
122544
122849
|
following: {
|
|
122545
122850
|
type: "string",
|
|
122546
122851
|
format: "at-uri"
|
|
@@ -126065,48 +126370,55 @@ function toKnownErr3(e) {
|
|
|
126065
126370
|
return e;
|
|
126066
126371
|
}
|
|
126067
126372
|
|
|
126068
|
-
// ../api/src/client/types/com/atproto/admin/
|
|
126373
|
+
// ../api/src/client/types/com/atproto/admin/getAccountInfo.ts
|
|
126069
126374
|
function toKnownErr4(e) {
|
|
126070
126375
|
if (e instanceof XRPCError) {
|
|
126071
126376
|
}
|
|
126072
126377
|
return e;
|
|
126073
126378
|
}
|
|
126074
126379
|
|
|
126075
|
-
// ../api/src/client/types/com/atproto/admin/
|
|
126380
|
+
// ../api/src/client/types/com/atproto/admin/getInviteCodes.ts
|
|
126076
126381
|
function toKnownErr5(e) {
|
|
126077
126382
|
if (e instanceof XRPCError) {
|
|
126078
126383
|
}
|
|
126079
126384
|
return e;
|
|
126080
126385
|
}
|
|
126081
126386
|
|
|
126082
|
-
// ../api/src/client/types/com/atproto/admin/
|
|
126387
|
+
// ../api/src/client/types/com/atproto/admin/getModerationAction.ts
|
|
126083
126388
|
function toKnownErr6(e) {
|
|
126084
126389
|
if (e instanceof XRPCError) {
|
|
126085
126390
|
}
|
|
126086
126391
|
return e;
|
|
126087
126392
|
}
|
|
126088
126393
|
|
|
126089
|
-
// ../api/src/client/types/com/atproto/admin/
|
|
126394
|
+
// ../api/src/client/types/com/atproto/admin/getModerationActions.ts
|
|
126090
126395
|
function toKnownErr7(e) {
|
|
126091
126396
|
if (e instanceof XRPCError) {
|
|
126092
126397
|
}
|
|
126093
126398
|
return e;
|
|
126094
126399
|
}
|
|
126095
126400
|
|
|
126096
|
-
// ../api/src/client/types/com/atproto/admin/
|
|
126401
|
+
// ../api/src/client/types/com/atproto/admin/getModerationReport.ts
|
|
126097
126402
|
function toKnownErr8(e) {
|
|
126098
126403
|
if (e instanceof XRPCError) {
|
|
126099
126404
|
}
|
|
126100
126405
|
return e;
|
|
126101
126406
|
}
|
|
126102
126407
|
|
|
126408
|
+
// ../api/src/client/types/com/atproto/admin/getModerationReports.ts
|
|
126409
|
+
function toKnownErr9(e) {
|
|
126410
|
+
if (e instanceof XRPCError) {
|
|
126411
|
+
}
|
|
126412
|
+
return e;
|
|
126413
|
+
}
|
|
126414
|
+
|
|
126103
126415
|
// ../api/src/client/types/com/atproto/admin/getRecord.ts
|
|
126104
126416
|
var RecordNotFoundError = class extends XRPCError {
|
|
126105
126417
|
constructor(src3) {
|
|
126106
126418
|
super(src3.status, src3.error, src3.message, src3.headers);
|
|
126107
126419
|
}
|
|
126108
126420
|
};
|
|
126109
|
-
function
|
|
126421
|
+
function toKnownErr10(e) {
|
|
126110
126422
|
if (e instanceof XRPCError) {
|
|
126111
126423
|
if (e.error === "RecordNotFound")
|
|
126112
126424
|
return new RecordNotFoundError(e);
|
|
@@ -126120,7 +126432,7 @@ var RepoNotFoundError = class extends XRPCError {
|
|
|
126120
126432
|
super(src3.status, src3.error, src3.message, src3.headers);
|
|
126121
126433
|
}
|
|
126122
126434
|
};
|
|
126123
|
-
function
|
|
126435
|
+
function toKnownErr11(e) {
|
|
126124
126436
|
if (e instanceof XRPCError) {
|
|
126125
126437
|
if (e.error === "RepoNotFound")
|
|
126126
126438
|
return new RepoNotFoundError(e);
|
|
@@ -126128,29 +126440,36 @@ function toKnownErr10(e) {
|
|
|
126128
126440
|
return e;
|
|
126129
126441
|
}
|
|
126130
126442
|
|
|
126443
|
+
// ../api/src/client/types/com/atproto/admin/getSubjectStatus.ts
|
|
126444
|
+
function toKnownErr12(e) {
|
|
126445
|
+
if (e instanceof XRPCError) {
|
|
126446
|
+
}
|
|
126447
|
+
return e;
|
|
126448
|
+
}
|
|
126449
|
+
|
|
126131
126450
|
// ../api/src/client/types/com/atproto/admin/resolveModerationReports.ts
|
|
126132
|
-
function
|
|
126451
|
+
function toKnownErr13(e) {
|
|
126133
126452
|
if (e instanceof XRPCError) {
|
|
126134
126453
|
}
|
|
126135
126454
|
return e;
|
|
126136
126455
|
}
|
|
126137
126456
|
|
|
126138
126457
|
// ../api/src/client/types/com/atproto/admin/reverseModerationAction.ts
|
|
126139
|
-
function
|
|
126458
|
+
function toKnownErr14(e) {
|
|
126140
126459
|
if (e instanceof XRPCError) {
|
|
126141
126460
|
}
|
|
126142
126461
|
return e;
|
|
126143
126462
|
}
|
|
126144
126463
|
|
|
126145
126464
|
// ../api/src/client/types/com/atproto/admin/searchRepos.ts
|
|
126146
|
-
function
|
|
126465
|
+
function toKnownErr15(e) {
|
|
126147
126466
|
if (e instanceof XRPCError) {
|
|
126148
126467
|
}
|
|
126149
126468
|
return e;
|
|
126150
126469
|
}
|
|
126151
126470
|
|
|
126152
126471
|
// ../api/src/client/types/com/atproto/admin/sendEmail.ts
|
|
126153
|
-
function
|
|
126472
|
+
function toKnownErr16(e) {
|
|
126154
126473
|
if (e instanceof XRPCError) {
|
|
126155
126474
|
}
|
|
126156
126475
|
return e;
|
|
@@ -126162,7 +126481,7 @@ var SubjectHasActionError = class extends XRPCError {
|
|
|
126162
126481
|
super(src3.status, src3.error, src3.message, src3.headers);
|
|
126163
126482
|
}
|
|
126164
126483
|
};
|
|
126165
|
-
function
|
|
126484
|
+
function toKnownErr17(e) {
|
|
126166
126485
|
if (e instanceof XRPCError) {
|
|
126167
126486
|
if (e.error === "SubjectHasAction")
|
|
126168
126487
|
return new SubjectHasActionError(e);
|
|
@@ -126171,42 +126490,49 @@ function toKnownErr15(e) {
|
|
|
126171
126490
|
}
|
|
126172
126491
|
|
|
126173
126492
|
// ../api/src/client/types/com/atproto/admin/updateAccountEmail.ts
|
|
126174
|
-
function
|
|
126493
|
+
function toKnownErr18(e) {
|
|
126175
126494
|
if (e instanceof XRPCError) {
|
|
126176
126495
|
}
|
|
126177
126496
|
return e;
|
|
126178
126497
|
}
|
|
126179
126498
|
|
|
126180
126499
|
// ../api/src/client/types/com/atproto/admin/updateAccountHandle.ts
|
|
126181
|
-
function
|
|
126500
|
+
function toKnownErr19(e) {
|
|
126501
|
+
if (e instanceof XRPCError) {
|
|
126502
|
+
}
|
|
126503
|
+
return e;
|
|
126504
|
+
}
|
|
126505
|
+
|
|
126506
|
+
// ../api/src/client/types/com/atproto/admin/updateSubjectStatus.ts
|
|
126507
|
+
function toKnownErr20(e) {
|
|
126182
126508
|
if (e instanceof XRPCError) {
|
|
126183
126509
|
}
|
|
126184
126510
|
return e;
|
|
126185
126511
|
}
|
|
126186
126512
|
|
|
126187
126513
|
// ../api/src/client/types/com/atproto/identity/resolveHandle.ts
|
|
126188
|
-
function
|
|
126514
|
+
function toKnownErr21(e) {
|
|
126189
126515
|
if (e instanceof XRPCError) {
|
|
126190
126516
|
}
|
|
126191
126517
|
return e;
|
|
126192
126518
|
}
|
|
126193
126519
|
|
|
126194
126520
|
// ../api/src/client/types/com/atproto/identity/updateHandle.ts
|
|
126195
|
-
function
|
|
126521
|
+
function toKnownErr22(e) {
|
|
126196
126522
|
if (e instanceof XRPCError) {
|
|
126197
126523
|
}
|
|
126198
126524
|
return e;
|
|
126199
126525
|
}
|
|
126200
126526
|
|
|
126201
126527
|
// ../api/src/client/types/com/atproto/label/queryLabels.ts
|
|
126202
|
-
function
|
|
126528
|
+
function toKnownErr23(e) {
|
|
126203
126529
|
if (e instanceof XRPCError) {
|
|
126204
126530
|
}
|
|
126205
126531
|
return e;
|
|
126206
126532
|
}
|
|
126207
126533
|
|
|
126208
126534
|
// ../api/src/client/types/com/atproto/moderation/createReport.ts
|
|
126209
|
-
function
|
|
126535
|
+
function toKnownErr24(e) {
|
|
126210
126536
|
if (e instanceof XRPCError) {
|
|
126211
126537
|
}
|
|
126212
126538
|
return e;
|
|
@@ -126218,7 +126544,7 @@ var InvalidSwapError = class extends XRPCError {
|
|
|
126218
126544
|
super(src3.status, src3.error, src3.message, src3.headers);
|
|
126219
126545
|
}
|
|
126220
126546
|
};
|
|
126221
|
-
function
|
|
126547
|
+
function toKnownErr25(e) {
|
|
126222
126548
|
if (e instanceof XRPCError) {
|
|
126223
126549
|
if (e.error === "InvalidSwap")
|
|
126224
126550
|
return new InvalidSwapError(e);
|
|
@@ -126232,7 +126558,7 @@ var InvalidSwapError2 = class extends XRPCError {
|
|
|
126232
126558
|
super(src3.status, src3.error, src3.message, src3.headers);
|
|
126233
126559
|
}
|
|
126234
126560
|
};
|
|
126235
|
-
function
|
|
126561
|
+
function toKnownErr26(e) {
|
|
126236
126562
|
if (e instanceof XRPCError) {
|
|
126237
126563
|
if (e.error === "InvalidSwap")
|
|
126238
126564
|
return new InvalidSwapError2(e);
|
|
@@ -126246,7 +126572,7 @@ var InvalidSwapError3 = class extends XRPCError {
|
|
|
126246
126572
|
super(src3.status, src3.error, src3.message, src3.headers);
|
|
126247
126573
|
}
|
|
126248
126574
|
};
|
|
126249
|
-
function
|
|
126575
|
+
function toKnownErr27(e) {
|
|
126250
126576
|
if (e instanceof XRPCError) {
|
|
126251
126577
|
if (e.error === "InvalidSwap")
|
|
126252
126578
|
return new InvalidSwapError3(e);
|
|
@@ -126255,21 +126581,21 @@ function toKnownErr24(e) {
|
|
|
126255
126581
|
}
|
|
126256
126582
|
|
|
126257
126583
|
// ../api/src/client/types/com/atproto/repo/describeRepo.ts
|
|
126258
|
-
function
|
|
126584
|
+
function toKnownErr28(e) {
|
|
126259
126585
|
if (e instanceof XRPCError) {
|
|
126260
126586
|
}
|
|
126261
126587
|
return e;
|
|
126262
126588
|
}
|
|
126263
126589
|
|
|
126264
126590
|
// ../api/src/client/types/com/atproto/repo/getRecord.ts
|
|
126265
|
-
function
|
|
126591
|
+
function toKnownErr29(e) {
|
|
126266
126592
|
if (e instanceof XRPCError) {
|
|
126267
126593
|
}
|
|
126268
126594
|
return e;
|
|
126269
126595
|
}
|
|
126270
126596
|
|
|
126271
126597
|
// ../api/src/client/types/com/atproto/repo/listRecords.ts
|
|
126272
|
-
function
|
|
126598
|
+
function toKnownErr30(e) {
|
|
126273
126599
|
if (e instanceof XRPCError) {
|
|
126274
126600
|
}
|
|
126275
126601
|
return e;
|
|
@@ -126281,7 +126607,7 @@ var InvalidSwapError4 = class extends XRPCError {
|
|
|
126281
126607
|
super(src3.status, src3.error, src3.message, src3.headers);
|
|
126282
126608
|
}
|
|
126283
126609
|
};
|
|
126284
|
-
function
|
|
126610
|
+
function toKnownErr31(e) {
|
|
126285
126611
|
if (e instanceof XRPCError) {
|
|
126286
126612
|
if (e.error === "InvalidSwap")
|
|
126287
126613
|
return new InvalidSwapError4(e);
|
|
@@ -126290,7 +126616,7 @@ function toKnownErr28(e) {
|
|
|
126290
126616
|
}
|
|
126291
126617
|
|
|
126292
126618
|
// ../api/src/client/types/com/atproto/repo/uploadBlob.ts
|
|
126293
|
-
function
|
|
126619
|
+
function toKnownErr32(e) {
|
|
126294
126620
|
if (e instanceof XRPCError) {
|
|
126295
126621
|
}
|
|
126296
126622
|
return e;
|
|
@@ -126317,7 +126643,7 @@ var InvalidEmailError = class extends XRPCError {
|
|
|
126317
126643
|
super(src3.status, src3.error, src3.message, src3.headers);
|
|
126318
126644
|
}
|
|
126319
126645
|
};
|
|
126320
|
-
function
|
|
126646
|
+
function toKnownErr33(e) {
|
|
126321
126647
|
if (e instanceof XRPCError) {
|
|
126322
126648
|
if (e.error === "AccountNotFound")
|
|
126323
126649
|
return new AccountNotFoundError(e);
|
|
@@ -126367,7 +126693,7 @@ var IncompatibleDidDocError = class extends XRPCError {
|
|
|
126367
126693
|
super(src3.status, src3.error, src3.message, src3.headers);
|
|
126368
126694
|
}
|
|
126369
126695
|
};
|
|
126370
|
-
function
|
|
126696
|
+
function toKnownErr34(e) {
|
|
126371
126697
|
if (e instanceof XRPCError) {
|
|
126372
126698
|
if (e.error === "InvalidHandle")
|
|
126373
126699
|
return new InvalidHandleError2(e);
|
|
@@ -126393,7 +126719,7 @@ var AccountTakedownError = class extends XRPCError {
|
|
|
126393
126719
|
super(src3.status, src3.error, src3.message, src3.headers);
|
|
126394
126720
|
}
|
|
126395
126721
|
};
|
|
126396
|
-
function
|
|
126722
|
+
function toKnownErr35(e) {
|
|
126397
126723
|
if (e instanceof XRPCError) {
|
|
126398
126724
|
if (e.error === "AccountTakedown")
|
|
126399
126725
|
return new AccountTakedownError(e);
|
|
@@ -126402,14 +126728,14 @@ function toKnownErr32(e) {
|
|
|
126402
126728
|
}
|
|
126403
126729
|
|
|
126404
126730
|
// ../api/src/client/types/com/atproto/server/createInviteCode.ts
|
|
126405
|
-
function
|
|
126731
|
+
function toKnownErr36(e) {
|
|
126406
126732
|
if (e instanceof XRPCError) {
|
|
126407
126733
|
}
|
|
126408
126734
|
return e;
|
|
126409
126735
|
}
|
|
126410
126736
|
|
|
126411
126737
|
// ../api/src/client/types/com/atproto/server/createInviteCodes.ts
|
|
126412
|
-
function
|
|
126738
|
+
function toKnownErr37(e) {
|
|
126413
126739
|
if (e instanceof XRPCError) {
|
|
126414
126740
|
}
|
|
126415
126741
|
return e;
|
|
@@ -126421,7 +126747,7 @@ var AccountTakedownError2 = class extends XRPCError {
|
|
|
126421
126747
|
super(src3.status, src3.error, src3.message, src3.headers);
|
|
126422
126748
|
}
|
|
126423
126749
|
};
|
|
126424
|
-
function
|
|
126750
|
+
function toKnownErr38(e) {
|
|
126425
126751
|
if (e instanceof XRPCError) {
|
|
126426
126752
|
if (e.error === "AccountTakedown")
|
|
126427
126753
|
return new AccountTakedownError2(e);
|
|
@@ -126440,7 +126766,7 @@ var InvalidTokenError2 = class extends XRPCError {
|
|
|
126440
126766
|
super(src3.status, src3.error, src3.message, src3.headers);
|
|
126441
126767
|
}
|
|
126442
126768
|
};
|
|
126443
|
-
function
|
|
126769
|
+
function toKnownErr39(e) {
|
|
126444
126770
|
if (e instanceof XRPCError) {
|
|
126445
126771
|
if (e.error === "ExpiredToken")
|
|
126446
126772
|
return new ExpiredTokenError2(e);
|
|
@@ -126451,14 +126777,14 @@ function toKnownErr36(e) {
|
|
|
126451
126777
|
}
|
|
126452
126778
|
|
|
126453
126779
|
// ../api/src/client/types/com/atproto/server/deleteSession.ts
|
|
126454
|
-
function
|
|
126780
|
+
function toKnownErr40(e) {
|
|
126455
126781
|
if (e instanceof XRPCError) {
|
|
126456
126782
|
}
|
|
126457
126783
|
return e;
|
|
126458
126784
|
}
|
|
126459
126785
|
|
|
126460
126786
|
// ../api/src/client/types/com/atproto/server/describeServer.ts
|
|
126461
|
-
function
|
|
126787
|
+
function toKnownErr41(e) {
|
|
126462
126788
|
if (e instanceof XRPCError) {
|
|
126463
126789
|
}
|
|
126464
126790
|
return e;
|
|
@@ -126470,7 +126796,7 @@ var DuplicateCreateError = class extends XRPCError {
|
|
|
126470
126796
|
super(src3.status, src3.error, src3.message, src3.headers);
|
|
126471
126797
|
}
|
|
126472
126798
|
};
|
|
126473
|
-
function
|
|
126799
|
+
function toKnownErr42(e) {
|
|
126474
126800
|
if (e instanceof XRPCError) {
|
|
126475
126801
|
if (e.error === "DuplicateCreate")
|
|
126476
126802
|
return new DuplicateCreateError(e);
|
|
@@ -126479,7 +126805,7 @@ function toKnownErr39(e) {
|
|
|
126479
126805
|
}
|
|
126480
126806
|
|
|
126481
126807
|
// ../api/src/client/types/com/atproto/server/getSession.ts
|
|
126482
|
-
function
|
|
126808
|
+
function toKnownErr43(e) {
|
|
126483
126809
|
if (e instanceof XRPCError) {
|
|
126484
126810
|
}
|
|
126485
126811
|
return e;
|
|
@@ -126491,7 +126817,7 @@ var AccountTakedownError3 = class extends XRPCError {
|
|
|
126491
126817
|
super(src3.status, src3.error, src3.message, src3.headers);
|
|
126492
126818
|
}
|
|
126493
126819
|
};
|
|
126494
|
-
function
|
|
126820
|
+
function toKnownErr44(e) {
|
|
126495
126821
|
if (e instanceof XRPCError) {
|
|
126496
126822
|
if (e.error === "AccountTakedown")
|
|
126497
126823
|
return new AccountTakedownError3(e);
|
|
@@ -126505,7 +126831,7 @@ var AccountTakedownError4 = class extends XRPCError {
|
|
|
126505
126831
|
super(src3.status, src3.error, src3.message, src3.headers);
|
|
126506
126832
|
}
|
|
126507
126833
|
};
|
|
126508
|
-
function
|
|
126834
|
+
function toKnownErr45(e) {
|
|
126509
126835
|
if (e instanceof XRPCError) {
|
|
126510
126836
|
if (e.error === "AccountTakedown")
|
|
126511
126837
|
return new AccountTakedownError4(e);
|
|
@@ -126514,28 +126840,35 @@ function toKnownErr42(e) {
|
|
|
126514
126840
|
}
|
|
126515
126841
|
|
|
126516
126842
|
// ../api/src/client/types/com/atproto/server/requestAccountDelete.ts
|
|
126517
|
-
function
|
|
126843
|
+
function toKnownErr46(e) {
|
|
126518
126844
|
if (e instanceof XRPCError) {
|
|
126519
126845
|
}
|
|
126520
126846
|
return e;
|
|
126521
126847
|
}
|
|
126522
126848
|
|
|
126523
126849
|
// ../api/src/client/types/com/atproto/server/requestEmailConfirmation.ts
|
|
126524
|
-
function
|
|
126850
|
+
function toKnownErr47(e) {
|
|
126525
126851
|
if (e instanceof XRPCError) {
|
|
126526
126852
|
}
|
|
126527
126853
|
return e;
|
|
126528
126854
|
}
|
|
126529
126855
|
|
|
126530
126856
|
// ../api/src/client/types/com/atproto/server/requestEmailUpdate.ts
|
|
126531
|
-
function
|
|
126857
|
+
function toKnownErr48(e) {
|
|
126532
126858
|
if (e instanceof XRPCError) {
|
|
126533
126859
|
}
|
|
126534
126860
|
return e;
|
|
126535
126861
|
}
|
|
126536
126862
|
|
|
126537
126863
|
// ../api/src/client/types/com/atproto/server/requestPasswordReset.ts
|
|
126538
|
-
function
|
|
126864
|
+
function toKnownErr49(e) {
|
|
126865
|
+
if (e instanceof XRPCError) {
|
|
126866
|
+
}
|
|
126867
|
+
return e;
|
|
126868
|
+
}
|
|
126869
|
+
|
|
126870
|
+
// ../api/src/client/types/com/atproto/server/reserveSigningKey.ts
|
|
126871
|
+
function toKnownErr50(e) {
|
|
126539
126872
|
if (e instanceof XRPCError) {
|
|
126540
126873
|
}
|
|
126541
126874
|
return e;
|
|
@@ -126552,7 +126885,7 @@ var InvalidTokenError3 = class extends XRPCError {
|
|
|
126552
126885
|
super(src3.status, src3.error, src3.message, src3.headers);
|
|
126553
126886
|
}
|
|
126554
126887
|
};
|
|
126555
|
-
function
|
|
126888
|
+
function toKnownErr51(e) {
|
|
126556
126889
|
if (e instanceof XRPCError) {
|
|
126557
126890
|
if (e.error === "ExpiredToken")
|
|
126558
126891
|
return new ExpiredTokenError3(e);
|
|
@@ -126563,7 +126896,7 @@ function toKnownErr47(e) {
|
|
|
126563
126896
|
}
|
|
126564
126897
|
|
|
126565
126898
|
// ../api/src/client/types/com/atproto/server/revokeAppPassword.ts
|
|
126566
|
-
function
|
|
126899
|
+
function toKnownErr52(e) {
|
|
126567
126900
|
if (e instanceof XRPCError) {
|
|
126568
126901
|
}
|
|
126569
126902
|
return e;
|
|
@@ -126585,7 +126918,7 @@ var TokenRequiredError = class extends XRPCError {
|
|
|
126585
126918
|
super(src3.status, src3.error, src3.message, src3.headers);
|
|
126586
126919
|
}
|
|
126587
126920
|
};
|
|
126588
|
-
function
|
|
126921
|
+
function toKnownErr53(e) {
|
|
126589
126922
|
if (e instanceof XRPCError) {
|
|
126590
126923
|
if (e.error === "ExpiredToken")
|
|
126591
126924
|
return new ExpiredTokenError4(e);
|
|
@@ -126598,21 +126931,21 @@ function toKnownErr49(e) {
|
|
|
126598
126931
|
}
|
|
126599
126932
|
|
|
126600
126933
|
// ../api/src/client/types/com/atproto/sync/getBlob.ts
|
|
126601
|
-
function
|
|
126934
|
+
function toKnownErr54(e) {
|
|
126602
126935
|
if (e instanceof XRPCError) {
|
|
126603
126936
|
}
|
|
126604
126937
|
return e;
|
|
126605
126938
|
}
|
|
126606
126939
|
|
|
126607
126940
|
// ../api/src/client/types/com/atproto/sync/getBlocks.ts
|
|
126608
|
-
function
|
|
126941
|
+
function toKnownErr55(e) {
|
|
126609
126942
|
if (e instanceof XRPCError) {
|
|
126610
126943
|
}
|
|
126611
126944
|
return e;
|
|
126612
126945
|
}
|
|
126613
126946
|
|
|
126614
126947
|
// ../api/src/client/types/com/atproto/sync/getCheckout.ts
|
|
126615
|
-
function
|
|
126948
|
+
function toKnownErr56(e) {
|
|
126616
126949
|
if (e instanceof XRPCError) {
|
|
126617
126950
|
}
|
|
126618
126951
|
return e;
|
|
@@ -126624,7 +126957,7 @@ var HeadNotFoundError = class extends XRPCError {
|
|
|
126624
126957
|
super(src3.status, src3.error, src3.message, src3.headers);
|
|
126625
126958
|
}
|
|
126626
126959
|
};
|
|
126627
|
-
function
|
|
126960
|
+
function toKnownErr57(e) {
|
|
126628
126961
|
if (e instanceof XRPCError) {
|
|
126629
126962
|
if (e.error === "HeadNotFound")
|
|
126630
126963
|
return new HeadNotFoundError(e);
|
|
@@ -126636,14 +126969,14 @@ function toKnownErr53(e) {
|
|
|
126636
126969
|
var getLatestCommit_exports = {};
|
|
126637
126970
|
__export(getLatestCommit_exports, {
|
|
126638
126971
|
RepoNotFoundError: () => RepoNotFoundError2,
|
|
126639
|
-
toKnownErr: () =>
|
|
126972
|
+
toKnownErr: () => toKnownErr58
|
|
126640
126973
|
});
|
|
126641
126974
|
var RepoNotFoundError2 = class extends XRPCError {
|
|
126642
126975
|
constructor(src3) {
|
|
126643
126976
|
super(src3.status, src3.error, src3.message, src3.headers);
|
|
126644
126977
|
}
|
|
126645
126978
|
};
|
|
126646
|
-
function
|
|
126979
|
+
function toKnownErr58(e) {
|
|
126647
126980
|
if (e instanceof XRPCError) {
|
|
126648
126981
|
if (e.error === "RepoNotFound")
|
|
126649
126982
|
return new RepoNotFoundError2(e);
|
|
@@ -126652,105 +126985,105 @@ function toKnownErr54(e) {
|
|
|
126652
126985
|
}
|
|
126653
126986
|
|
|
126654
126987
|
// ../api/src/client/types/com/atproto/sync/getRecord.ts
|
|
126655
|
-
function
|
|
126988
|
+
function toKnownErr59(e) {
|
|
126656
126989
|
if (e instanceof XRPCError) {
|
|
126657
126990
|
}
|
|
126658
126991
|
return e;
|
|
126659
126992
|
}
|
|
126660
126993
|
|
|
126661
126994
|
// ../api/src/client/types/com/atproto/sync/getRepo.ts
|
|
126662
|
-
function
|
|
126995
|
+
function toKnownErr60(e) {
|
|
126663
126996
|
if (e instanceof XRPCError) {
|
|
126664
126997
|
}
|
|
126665
126998
|
return e;
|
|
126666
126999
|
}
|
|
126667
127000
|
|
|
126668
127001
|
// ../api/src/client/types/com/atproto/sync/listBlobs.ts
|
|
126669
|
-
function
|
|
127002
|
+
function toKnownErr61(e) {
|
|
126670
127003
|
if (e instanceof XRPCError) {
|
|
126671
127004
|
}
|
|
126672
127005
|
return e;
|
|
126673
127006
|
}
|
|
126674
127007
|
|
|
126675
127008
|
// ../api/src/client/types/com/atproto/sync/listRepos.ts
|
|
126676
|
-
function
|
|
127009
|
+
function toKnownErr62(e) {
|
|
126677
127010
|
if (e instanceof XRPCError) {
|
|
126678
127011
|
}
|
|
126679
127012
|
return e;
|
|
126680
127013
|
}
|
|
126681
127014
|
|
|
126682
127015
|
// ../api/src/client/types/com/atproto/sync/notifyOfUpdate.ts
|
|
126683
|
-
function
|
|
127016
|
+
function toKnownErr63(e) {
|
|
126684
127017
|
if (e instanceof XRPCError) {
|
|
126685
127018
|
}
|
|
126686
127019
|
return e;
|
|
126687
127020
|
}
|
|
126688
127021
|
|
|
126689
127022
|
// ../api/src/client/types/com/atproto/sync/requestCrawl.ts
|
|
126690
|
-
function
|
|
127023
|
+
function toKnownErr64(e) {
|
|
126691
127024
|
if (e instanceof XRPCError) {
|
|
126692
127025
|
}
|
|
126693
127026
|
return e;
|
|
126694
127027
|
}
|
|
126695
127028
|
|
|
126696
127029
|
// ../api/src/client/types/app/bsky/actor/getPreferences.ts
|
|
126697
|
-
function
|
|
127030
|
+
function toKnownErr65(e) {
|
|
126698
127031
|
if (e instanceof XRPCError) {
|
|
126699
127032
|
}
|
|
126700
127033
|
return e;
|
|
126701
127034
|
}
|
|
126702
127035
|
|
|
126703
127036
|
// ../api/src/client/types/app/bsky/actor/getProfile.ts
|
|
126704
|
-
function
|
|
127037
|
+
function toKnownErr66(e) {
|
|
126705
127038
|
if (e instanceof XRPCError) {
|
|
126706
127039
|
}
|
|
126707
127040
|
return e;
|
|
126708
127041
|
}
|
|
126709
127042
|
|
|
126710
127043
|
// ../api/src/client/types/app/bsky/actor/getProfiles.ts
|
|
126711
|
-
function
|
|
127044
|
+
function toKnownErr67(e) {
|
|
126712
127045
|
if (e instanceof XRPCError) {
|
|
126713
127046
|
}
|
|
126714
127047
|
return e;
|
|
126715
127048
|
}
|
|
126716
127049
|
|
|
126717
127050
|
// ../api/src/client/types/app/bsky/actor/getSuggestions.ts
|
|
126718
|
-
function
|
|
127051
|
+
function toKnownErr68(e) {
|
|
126719
127052
|
if (e instanceof XRPCError) {
|
|
126720
127053
|
}
|
|
126721
127054
|
return e;
|
|
126722
127055
|
}
|
|
126723
127056
|
|
|
126724
127057
|
// ../api/src/client/types/app/bsky/actor/putPreferences.ts
|
|
126725
|
-
function
|
|
127058
|
+
function toKnownErr69(e) {
|
|
126726
127059
|
if (e instanceof XRPCError) {
|
|
126727
127060
|
}
|
|
126728
127061
|
return e;
|
|
126729
127062
|
}
|
|
126730
127063
|
|
|
126731
127064
|
// ../api/src/client/types/app/bsky/actor/searchActors.ts
|
|
126732
|
-
function
|
|
127065
|
+
function toKnownErr70(e) {
|
|
126733
127066
|
if (e instanceof XRPCError) {
|
|
126734
127067
|
}
|
|
126735
127068
|
return e;
|
|
126736
127069
|
}
|
|
126737
127070
|
|
|
126738
127071
|
// ../api/src/client/types/app/bsky/actor/searchActorsTypeahead.ts
|
|
126739
|
-
function
|
|
127072
|
+
function toKnownErr71(e) {
|
|
126740
127073
|
if (e instanceof XRPCError) {
|
|
126741
127074
|
}
|
|
126742
127075
|
return e;
|
|
126743
127076
|
}
|
|
126744
127077
|
|
|
126745
127078
|
// ../api/src/client/types/app/bsky/feed/describeFeedGenerator.ts
|
|
126746
|
-
function
|
|
127079
|
+
function toKnownErr72(e) {
|
|
126747
127080
|
if (e instanceof XRPCError) {
|
|
126748
127081
|
}
|
|
126749
127082
|
return e;
|
|
126750
127083
|
}
|
|
126751
127084
|
|
|
126752
127085
|
// ../api/src/client/types/app/bsky/feed/getActorFeeds.ts
|
|
126753
|
-
function
|
|
127086
|
+
function toKnownErr73(e) {
|
|
126754
127087
|
if (e instanceof XRPCError) {
|
|
126755
127088
|
}
|
|
126756
127089
|
return e;
|
|
@@ -126767,7 +127100,7 @@ var BlockedByActorError = class extends XRPCError {
|
|
|
126767
127100
|
super(src3.status, src3.error, src3.message, src3.headers);
|
|
126768
127101
|
}
|
|
126769
127102
|
};
|
|
126770
|
-
function
|
|
127103
|
+
function toKnownErr74(e) {
|
|
126771
127104
|
if (e instanceof XRPCError) {
|
|
126772
127105
|
if (e.error === "BlockedActor")
|
|
126773
127106
|
return new BlockedActorError(e);
|
|
@@ -126788,7 +127121,7 @@ var BlockedByActorError2 = class extends XRPCError {
|
|
|
126788
127121
|
super(src3.status, src3.error, src3.message, src3.headers);
|
|
126789
127122
|
}
|
|
126790
127123
|
};
|
|
126791
|
-
function
|
|
127124
|
+
function toKnownErr75(e) {
|
|
126792
127125
|
if (e instanceof XRPCError) {
|
|
126793
127126
|
if (e.error === "BlockedActor")
|
|
126794
127127
|
return new BlockedActorError2(e);
|
|
@@ -126804,7 +127137,7 @@ var UnknownFeedError = class extends XRPCError {
|
|
|
126804
127137
|
super(src3.status, src3.error, src3.message, src3.headers);
|
|
126805
127138
|
}
|
|
126806
127139
|
};
|
|
126807
|
-
function
|
|
127140
|
+
function toKnownErr76(e) {
|
|
126808
127141
|
if (e instanceof XRPCError) {
|
|
126809
127142
|
if (e.error === "UnknownFeed")
|
|
126810
127143
|
return new UnknownFeedError(e);
|
|
@@ -126813,14 +127146,14 @@ function toKnownErr72(e) {
|
|
|
126813
127146
|
}
|
|
126814
127147
|
|
|
126815
127148
|
// ../api/src/client/types/app/bsky/feed/getFeedGenerator.ts
|
|
126816
|
-
function
|
|
127149
|
+
function toKnownErr77(e) {
|
|
126817
127150
|
if (e instanceof XRPCError) {
|
|
126818
127151
|
}
|
|
126819
127152
|
return e;
|
|
126820
127153
|
}
|
|
126821
127154
|
|
|
126822
127155
|
// ../api/src/client/types/app/bsky/feed/getFeedGenerators.ts
|
|
126823
|
-
function
|
|
127156
|
+
function toKnownErr78(e) {
|
|
126824
127157
|
if (e instanceof XRPCError) {
|
|
126825
127158
|
}
|
|
126826
127159
|
return e;
|
|
@@ -126830,14 +127163,14 @@ function toKnownErr74(e) {
|
|
|
126830
127163
|
var getFeedSkeleton_exports = {};
|
|
126831
127164
|
__export(getFeedSkeleton_exports, {
|
|
126832
127165
|
UnknownFeedError: () => UnknownFeedError2,
|
|
126833
|
-
toKnownErr: () =>
|
|
127166
|
+
toKnownErr: () => toKnownErr79
|
|
126834
127167
|
});
|
|
126835
127168
|
var UnknownFeedError2 = class extends XRPCError {
|
|
126836
127169
|
constructor(src3) {
|
|
126837
127170
|
super(src3.status, src3.error, src3.message, src3.headers);
|
|
126838
127171
|
}
|
|
126839
127172
|
};
|
|
126840
|
-
function
|
|
127173
|
+
function toKnownErr79(e) {
|
|
126841
127174
|
if (e instanceof XRPCError) {
|
|
126842
127175
|
if (e.error === "UnknownFeed")
|
|
126843
127176
|
return new UnknownFeedError2(e);
|
|
@@ -126846,7 +127179,7 @@ function toKnownErr75(e) {
|
|
|
126846
127179
|
}
|
|
126847
127180
|
|
|
126848
127181
|
// ../api/src/client/types/app/bsky/feed/getLikes.ts
|
|
126849
|
-
function
|
|
127182
|
+
function toKnownErr80(e) {
|
|
126850
127183
|
if (e instanceof XRPCError) {
|
|
126851
127184
|
}
|
|
126852
127185
|
return e;
|
|
@@ -126858,7 +127191,7 @@ var UnknownListError = class extends XRPCError {
|
|
|
126858
127191
|
super(src3.status, src3.error, src3.message, src3.headers);
|
|
126859
127192
|
}
|
|
126860
127193
|
};
|
|
126861
|
-
function
|
|
127194
|
+
function toKnownErr81(e) {
|
|
126862
127195
|
if (e instanceof XRPCError) {
|
|
126863
127196
|
if (e.error === "UnknownList")
|
|
126864
127197
|
return new UnknownListError(e);
|
|
@@ -126872,7 +127205,7 @@ var NotFoundError = class extends XRPCError {
|
|
|
126872
127205
|
super(src3.status, src3.error, src3.message, src3.headers);
|
|
126873
127206
|
}
|
|
126874
127207
|
};
|
|
126875
|
-
function
|
|
127208
|
+
function toKnownErr82(e) {
|
|
126876
127209
|
if (e instanceof XRPCError) {
|
|
126877
127210
|
if (e.error === "NotFound")
|
|
126878
127211
|
return new NotFoundError(e);
|
|
@@ -126881,28 +127214,28 @@ function toKnownErr78(e) {
|
|
|
126881
127214
|
}
|
|
126882
127215
|
|
|
126883
127216
|
// ../api/src/client/types/app/bsky/feed/getPosts.ts
|
|
126884
|
-
function
|
|
127217
|
+
function toKnownErr83(e) {
|
|
126885
127218
|
if (e instanceof XRPCError) {
|
|
126886
127219
|
}
|
|
126887
127220
|
return e;
|
|
126888
127221
|
}
|
|
126889
127222
|
|
|
126890
127223
|
// ../api/src/client/types/app/bsky/feed/getRepostedBy.ts
|
|
126891
|
-
function
|
|
127224
|
+
function toKnownErr84(e) {
|
|
126892
127225
|
if (e instanceof XRPCError) {
|
|
126893
127226
|
}
|
|
126894
127227
|
return e;
|
|
126895
127228
|
}
|
|
126896
127229
|
|
|
126897
127230
|
// ../api/src/client/types/app/bsky/feed/getSuggestedFeeds.ts
|
|
126898
|
-
function
|
|
127231
|
+
function toKnownErr85(e) {
|
|
126899
127232
|
if (e instanceof XRPCError) {
|
|
126900
127233
|
}
|
|
126901
127234
|
return e;
|
|
126902
127235
|
}
|
|
126903
127236
|
|
|
126904
127237
|
// ../api/src/client/types/app/bsky/feed/getTimeline.ts
|
|
126905
|
-
function
|
|
127238
|
+
function toKnownErr86(e) {
|
|
126906
127239
|
if (e instanceof XRPCError) {
|
|
126907
127240
|
}
|
|
126908
127241
|
return e;
|
|
@@ -126914,7 +127247,7 @@ var BadQueryStringError = class extends XRPCError {
|
|
|
126914
127247
|
super(src3.status, src3.error, src3.message, src3.headers);
|
|
126915
127248
|
}
|
|
126916
127249
|
};
|
|
126917
|
-
function
|
|
127250
|
+
function toKnownErr87(e) {
|
|
126918
127251
|
if (e instanceof XRPCError) {
|
|
126919
127252
|
if (e.error === "BadQueryString")
|
|
126920
127253
|
return new BadQueryStringError(e);
|
|
@@ -126923,133 +127256,133 @@ function toKnownErr83(e) {
|
|
|
126923
127256
|
}
|
|
126924
127257
|
|
|
126925
127258
|
// ../api/src/client/types/app/bsky/graph/getBlocks.ts
|
|
126926
|
-
function
|
|
127259
|
+
function toKnownErr88(e) {
|
|
126927
127260
|
if (e instanceof XRPCError) {
|
|
126928
127261
|
}
|
|
126929
127262
|
return e;
|
|
126930
127263
|
}
|
|
126931
127264
|
|
|
126932
127265
|
// ../api/src/client/types/app/bsky/graph/getFollowers.ts
|
|
126933
|
-
function
|
|
127266
|
+
function toKnownErr89(e) {
|
|
126934
127267
|
if (e instanceof XRPCError) {
|
|
126935
127268
|
}
|
|
126936
127269
|
return e;
|
|
126937
127270
|
}
|
|
126938
127271
|
|
|
126939
127272
|
// ../api/src/client/types/app/bsky/graph/getFollows.ts
|
|
126940
|
-
function
|
|
127273
|
+
function toKnownErr90(e) {
|
|
126941
127274
|
if (e instanceof XRPCError) {
|
|
126942
127275
|
}
|
|
126943
127276
|
return e;
|
|
126944
127277
|
}
|
|
126945
127278
|
|
|
126946
127279
|
// ../api/src/client/types/app/bsky/graph/getList.ts
|
|
126947
|
-
function
|
|
127280
|
+
function toKnownErr91(e) {
|
|
126948
127281
|
if (e instanceof XRPCError) {
|
|
126949
127282
|
}
|
|
126950
127283
|
return e;
|
|
126951
127284
|
}
|
|
126952
127285
|
|
|
126953
127286
|
// ../api/src/client/types/app/bsky/graph/getListBlocks.ts
|
|
126954
|
-
function
|
|
127287
|
+
function toKnownErr92(e) {
|
|
126955
127288
|
if (e instanceof XRPCError) {
|
|
126956
127289
|
}
|
|
126957
127290
|
return e;
|
|
126958
127291
|
}
|
|
126959
127292
|
|
|
126960
127293
|
// ../api/src/client/types/app/bsky/graph/getListMutes.ts
|
|
126961
|
-
function
|
|
127294
|
+
function toKnownErr93(e) {
|
|
126962
127295
|
if (e instanceof XRPCError) {
|
|
126963
127296
|
}
|
|
126964
127297
|
return e;
|
|
126965
127298
|
}
|
|
126966
127299
|
|
|
126967
127300
|
// ../api/src/client/types/app/bsky/graph/getLists.ts
|
|
126968
|
-
function
|
|
127301
|
+
function toKnownErr94(e) {
|
|
126969
127302
|
if (e instanceof XRPCError) {
|
|
126970
127303
|
}
|
|
126971
127304
|
return e;
|
|
126972
127305
|
}
|
|
126973
127306
|
|
|
126974
127307
|
// ../api/src/client/types/app/bsky/graph/getMutes.ts
|
|
126975
|
-
function
|
|
127308
|
+
function toKnownErr95(e) {
|
|
126976
127309
|
if (e instanceof XRPCError) {
|
|
126977
127310
|
}
|
|
126978
127311
|
return e;
|
|
126979
127312
|
}
|
|
126980
127313
|
|
|
126981
127314
|
// ../api/src/client/types/app/bsky/graph/getSuggestedFollowsByActor.ts
|
|
126982
|
-
function
|
|
127315
|
+
function toKnownErr96(e) {
|
|
126983
127316
|
if (e instanceof XRPCError) {
|
|
126984
127317
|
}
|
|
126985
127318
|
return e;
|
|
126986
127319
|
}
|
|
126987
127320
|
|
|
126988
127321
|
// ../api/src/client/types/app/bsky/graph/muteActor.ts
|
|
126989
|
-
function
|
|
127322
|
+
function toKnownErr97(e) {
|
|
126990
127323
|
if (e instanceof XRPCError) {
|
|
126991
127324
|
}
|
|
126992
127325
|
return e;
|
|
126993
127326
|
}
|
|
126994
127327
|
|
|
126995
127328
|
// ../api/src/client/types/app/bsky/graph/muteActorList.ts
|
|
126996
|
-
function
|
|
127329
|
+
function toKnownErr98(e) {
|
|
126997
127330
|
if (e instanceof XRPCError) {
|
|
126998
127331
|
}
|
|
126999
127332
|
return e;
|
|
127000
127333
|
}
|
|
127001
127334
|
|
|
127002
127335
|
// ../api/src/client/types/app/bsky/graph/unmuteActor.ts
|
|
127003
|
-
function
|
|
127336
|
+
function toKnownErr99(e) {
|
|
127004
127337
|
if (e instanceof XRPCError) {
|
|
127005
127338
|
}
|
|
127006
127339
|
return e;
|
|
127007
127340
|
}
|
|
127008
127341
|
|
|
127009
127342
|
// ../api/src/client/types/app/bsky/graph/unmuteActorList.ts
|
|
127010
|
-
function
|
|
127343
|
+
function toKnownErr100(e) {
|
|
127011
127344
|
if (e instanceof XRPCError) {
|
|
127012
127345
|
}
|
|
127013
127346
|
return e;
|
|
127014
127347
|
}
|
|
127015
127348
|
|
|
127016
127349
|
// ../api/src/client/types/app/bsky/notification/getUnreadCount.ts
|
|
127017
|
-
function
|
|
127350
|
+
function toKnownErr101(e) {
|
|
127018
127351
|
if (e instanceof XRPCError) {
|
|
127019
127352
|
}
|
|
127020
127353
|
return e;
|
|
127021
127354
|
}
|
|
127022
127355
|
|
|
127023
127356
|
// ../api/src/client/types/app/bsky/notification/listNotifications.ts
|
|
127024
|
-
function
|
|
127357
|
+
function toKnownErr102(e) {
|
|
127025
127358
|
if (e instanceof XRPCError) {
|
|
127026
127359
|
}
|
|
127027
127360
|
return e;
|
|
127028
127361
|
}
|
|
127029
127362
|
|
|
127030
127363
|
// ../api/src/client/types/app/bsky/notification/registerPush.ts
|
|
127031
|
-
function
|
|
127364
|
+
function toKnownErr103(e) {
|
|
127032
127365
|
if (e instanceof XRPCError) {
|
|
127033
127366
|
}
|
|
127034
127367
|
return e;
|
|
127035
127368
|
}
|
|
127036
127369
|
|
|
127037
127370
|
// ../api/src/client/types/app/bsky/notification/updateSeen.ts
|
|
127038
|
-
function
|
|
127371
|
+
function toKnownErr104(e) {
|
|
127039
127372
|
if (e instanceof XRPCError) {
|
|
127040
127373
|
}
|
|
127041
127374
|
return e;
|
|
127042
127375
|
}
|
|
127043
127376
|
|
|
127044
127377
|
// ../api/src/client/types/app/bsky/unspecced/getPopular.ts
|
|
127045
|
-
function
|
|
127378
|
+
function toKnownErr105(e) {
|
|
127046
127379
|
if (e instanceof XRPCError) {
|
|
127047
127380
|
}
|
|
127048
127381
|
return e;
|
|
127049
127382
|
}
|
|
127050
127383
|
|
|
127051
127384
|
// ../api/src/client/types/app/bsky/unspecced/getPopularFeedGenerators.ts
|
|
127052
|
-
function
|
|
127385
|
+
function toKnownErr106(e) {
|
|
127053
127386
|
if (e instanceof XRPCError) {
|
|
127054
127387
|
}
|
|
127055
127388
|
return e;
|
|
@@ -127061,7 +127394,7 @@ var UnknownFeedError3 = class extends XRPCError {
|
|
|
127061
127394
|
super(src3.status, src3.error, src3.message, src3.headers);
|
|
127062
127395
|
}
|
|
127063
127396
|
};
|
|
127064
|
-
function
|
|
127397
|
+
function toKnownErr107(e) {
|
|
127065
127398
|
if (e instanceof XRPCError) {
|
|
127066
127399
|
if (e.error === "UnknownFeed")
|
|
127067
127400
|
return new UnknownFeedError3(e);
|
|
@@ -127075,7 +127408,7 @@ var BadQueryStringError2 = class extends XRPCError {
|
|
|
127075
127408
|
super(src3.status, src3.error, src3.message, src3.headers);
|
|
127076
127409
|
}
|
|
127077
127410
|
};
|
|
127078
|
-
function
|
|
127411
|
+
function toKnownErr108(e) {
|
|
127079
127412
|
if (e instanceof XRPCError) {
|
|
127080
127413
|
if (e.error === "BadQueryString")
|
|
127081
127414
|
return new BadQueryStringError2(e);
|
|
@@ -127089,7 +127422,7 @@ var BadQueryStringError3 = class extends XRPCError {
|
|
|
127089
127422
|
super(src3.status, src3.error, src3.message, src3.headers);
|
|
127090
127423
|
}
|
|
127091
127424
|
};
|
|
127092
|
-
function
|
|
127425
|
+
function toKnownErr109(e) {
|
|
127093
127426
|
if (e instanceof XRPCError) {
|
|
127094
127427
|
if (e.error === "BadQueryString")
|
|
127095
127428
|
return new BadQueryStringError3(e);
|
|
@@ -127155,74 +127488,89 @@ var AdminNS = class {
|
|
|
127155
127488
|
throw toKnownErr3(e);
|
|
127156
127489
|
});
|
|
127157
127490
|
}
|
|
127491
|
+
getAccountInfo(params2, opts) {
|
|
127492
|
+
return this._service.xrpc.call("com.atproto.admin.getAccountInfo", params2, void 0, opts).catch((e) => {
|
|
127493
|
+
throw toKnownErr4(e);
|
|
127494
|
+
});
|
|
127495
|
+
}
|
|
127158
127496
|
getInviteCodes(params2, opts) {
|
|
127159
127497
|
return this._service.xrpc.call("com.atproto.admin.getInviteCodes", params2, void 0, opts).catch((e) => {
|
|
127160
|
-
throw
|
|
127498
|
+
throw toKnownErr5(e);
|
|
127161
127499
|
});
|
|
127162
127500
|
}
|
|
127163
127501
|
getModerationAction(params2, opts) {
|
|
127164
127502
|
return this._service.xrpc.call("com.atproto.admin.getModerationAction", params2, void 0, opts).catch((e) => {
|
|
127165
|
-
throw
|
|
127503
|
+
throw toKnownErr6(e);
|
|
127166
127504
|
});
|
|
127167
127505
|
}
|
|
127168
127506
|
getModerationActions(params2, opts) {
|
|
127169
127507
|
return this._service.xrpc.call("com.atproto.admin.getModerationActions", params2, void 0, opts).catch((e) => {
|
|
127170
|
-
throw
|
|
127508
|
+
throw toKnownErr7(e);
|
|
127171
127509
|
});
|
|
127172
127510
|
}
|
|
127173
127511
|
getModerationReport(params2, opts) {
|
|
127174
127512
|
return this._service.xrpc.call("com.atproto.admin.getModerationReport", params2, void 0, opts).catch((e) => {
|
|
127175
|
-
throw
|
|
127513
|
+
throw toKnownErr8(e);
|
|
127176
127514
|
});
|
|
127177
127515
|
}
|
|
127178
127516
|
getModerationReports(params2, opts) {
|
|
127179
127517
|
return this._service.xrpc.call("com.atproto.admin.getModerationReports", params2, void 0, opts).catch((e) => {
|
|
127180
|
-
throw
|
|
127518
|
+
throw toKnownErr9(e);
|
|
127181
127519
|
});
|
|
127182
127520
|
}
|
|
127183
127521
|
getRecord(params2, opts) {
|
|
127184
127522
|
return this._service.xrpc.call("com.atproto.admin.getRecord", params2, void 0, opts).catch((e) => {
|
|
127185
|
-
throw
|
|
127523
|
+
throw toKnownErr10(e);
|
|
127186
127524
|
});
|
|
127187
127525
|
}
|
|
127188
127526
|
getRepo(params2, opts) {
|
|
127189
127527
|
return this._service.xrpc.call("com.atproto.admin.getRepo", params2, void 0, opts).catch((e) => {
|
|
127190
|
-
throw
|
|
127528
|
+
throw toKnownErr11(e);
|
|
127529
|
+
});
|
|
127530
|
+
}
|
|
127531
|
+
getSubjectStatus(params2, opts) {
|
|
127532
|
+
return this._service.xrpc.call("com.atproto.admin.getSubjectStatus", params2, void 0, opts).catch((e) => {
|
|
127533
|
+
throw toKnownErr12(e);
|
|
127191
127534
|
});
|
|
127192
127535
|
}
|
|
127193
127536
|
resolveModerationReports(data, opts) {
|
|
127194
127537
|
return this._service.xrpc.call("com.atproto.admin.resolveModerationReports", opts?.qp, data, opts).catch((e) => {
|
|
127195
|
-
throw
|
|
127538
|
+
throw toKnownErr13(e);
|
|
127196
127539
|
});
|
|
127197
127540
|
}
|
|
127198
127541
|
reverseModerationAction(data, opts) {
|
|
127199
127542
|
return this._service.xrpc.call("com.atproto.admin.reverseModerationAction", opts?.qp, data, opts).catch((e) => {
|
|
127200
|
-
throw
|
|
127543
|
+
throw toKnownErr14(e);
|
|
127201
127544
|
});
|
|
127202
127545
|
}
|
|
127203
127546
|
searchRepos(params2, opts) {
|
|
127204
127547
|
return this._service.xrpc.call("com.atproto.admin.searchRepos", params2, void 0, opts).catch((e) => {
|
|
127205
|
-
throw
|
|
127548
|
+
throw toKnownErr15(e);
|
|
127206
127549
|
});
|
|
127207
127550
|
}
|
|
127208
127551
|
sendEmail(data, opts) {
|
|
127209
127552
|
return this._service.xrpc.call("com.atproto.admin.sendEmail", opts?.qp, data, opts).catch((e) => {
|
|
127210
|
-
throw
|
|
127553
|
+
throw toKnownErr16(e);
|
|
127211
127554
|
});
|
|
127212
127555
|
}
|
|
127213
127556
|
takeModerationAction(data, opts) {
|
|
127214
127557
|
return this._service.xrpc.call("com.atproto.admin.takeModerationAction", opts?.qp, data, opts).catch((e) => {
|
|
127215
|
-
throw
|
|
127558
|
+
throw toKnownErr17(e);
|
|
127216
127559
|
});
|
|
127217
127560
|
}
|
|
127218
127561
|
updateAccountEmail(data, opts) {
|
|
127219
127562
|
return this._service.xrpc.call("com.atproto.admin.updateAccountEmail", opts?.qp, data, opts).catch((e) => {
|
|
127220
|
-
throw
|
|
127563
|
+
throw toKnownErr18(e);
|
|
127221
127564
|
});
|
|
127222
127565
|
}
|
|
127223
127566
|
updateAccountHandle(data, opts) {
|
|
127224
127567
|
return this._service.xrpc.call("com.atproto.admin.updateAccountHandle", opts?.qp, data, opts).catch((e) => {
|
|
127225
|
-
throw
|
|
127568
|
+
throw toKnownErr19(e);
|
|
127569
|
+
});
|
|
127570
|
+
}
|
|
127571
|
+
updateSubjectStatus(data, opts) {
|
|
127572
|
+
return this._service.xrpc.call("com.atproto.admin.updateSubjectStatus", opts?.qp, data, opts).catch((e) => {
|
|
127573
|
+
throw toKnownErr20(e);
|
|
127226
127574
|
});
|
|
127227
127575
|
}
|
|
127228
127576
|
};
|
|
@@ -127232,12 +127580,12 @@ var IdentityNS = class {
|
|
|
127232
127580
|
}
|
|
127233
127581
|
resolveHandle(params2, opts) {
|
|
127234
127582
|
return this._service.xrpc.call("com.atproto.identity.resolveHandle", params2, void 0, opts).catch((e) => {
|
|
127235
|
-
throw
|
|
127583
|
+
throw toKnownErr21(e);
|
|
127236
127584
|
});
|
|
127237
127585
|
}
|
|
127238
127586
|
updateHandle(data, opts) {
|
|
127239
127587
|
return this._service.xrpc.call("com.atproto.identity.updateHandle", opts?.qp, data, opts).catch((e) => {
|
|
127240
|
-
throw
|
|
127588
|
+
throw toKnownErr22(e);
|
|
127241
127589
|
});
|
|
127242
127590
|
}
|
|
127243
127591
|
};
|
|
@@ -127247,7 +127595,7 @@ var LabelNS = class {
|
|
|
127247
127595
|
}
|
|
127248
127596
|
queryLabels(params2, opts) {
|
|
127249
127597
|
return this._service.xrpc.call("com.atproto.label.queryLabels", params2, void 0, opts).catch((e) => {
|
|
127250
|
-
throw
|
|
127598
|
+
throw toKnownErr23(e);
|
|
127251
127599
|
});
|
|
127252
127600
|
}
|
|
127253
127601
|
};
|
|
@@ -127257,7 +127605,7 @@ var ModerationNS = class {
|
|
|
127257
127605
|
}
|
|
127258
127606
|
createReport(data, opts) {
|
|
127259
127607
|
return this._service.xrpc.call("com.atproto.moderation.createReport", opts?.qp, data, opts).catch((e) => {
|
|
127260
|
-
throw
|
|
127608
|
+
throw toKnownErr24(e);
|
|
127261
127609
|
});
|
|
127262
127610
|
}
|
|
127263
127611
|
};
|
|
@@ -127267,42 +127615,42 @@ var RepoNS = class {
|
|
|
127267
127615
|
}
|
|
127268
127616
|
applyWrites(data, opts) {
|
|
127269
127617
|
return this._service.xrpc.call("com.atproto.repo.applyWrites", opts?.qp, data, opts).catch((e) => {
|
|
127270
|
-
throw
|
|
127618
|
+
throw toKnownErr25(e);
|
|
127271
127619
|
});
|
|
127272
127620
|
}
|
|
127273
127621
|
createRecord(data, opts) {
|
|
127274
127622
|
return this._service.xrpc.call("com.atproto.repo.createRecord", opts?.qp, data, opts).catch((e) => {
|
|
127275
|
-
throw
|
|
127623
|
+
throw toKnownErr26(e);
|
|
127276
127624
|
});
|
|
127277
127625
|
}
|
|
127278
127626
|
deleteRecord(data, opts) {
|
|
127279
127627
|
return this._service.xrpc.call("com.atproto.repo.deleteRecord", opts?.qp, data, opts).catch((e) => {
|
|
127280
|
-
throw
|
|
127628
|
+
throw toKnownErr27(e);
|
|
127281
127629
|
});
|
|
127282
127630
|
}
|
|
127283
127631
|
describeRepo(params2, opts) {
|
|
127284
127632
|
return this._service.xrpc.call("com.atproto.repo.describeRepo", params2, void 0, opts).catch((e) => {
|
|
127285
|
-
throw
|
|
127633
|
+
throw toKnownErr28(e);
|
|
127286
127634
|
});
|
|
127287
127635
|
}
|
|
127288
127636
|
getRecord(params2, opts) {
|
|
127289
127637
|
return this._service.xrpc.call("com.atproto.repo.getRecord", params2, void 0, opts).catch((e) => {
|
|
127290
|
-
throw
|
|
127638
|
+
throw toKnownErr29(e);
|
|
127291
127639
|
});
|
|
127292
127640
|
}
|
|
127293
127641
|
listRecords(params2, opts) {
|
|
127294
127642
|
return this._service.xrpc.call("com.atproto.repo.listRecords", params2, void 0, opts).catch((e) => {
|
|
127295
|
-
throw
|
|
127643
|
+
throw toKnownErr30(e);
|
|
127296
127644
|
});
|
|
127297
127645
|
}
|
|
127298
127646
|
putRecord(data, opts) {
|
|
127299
127647
|
return this._service.xrpc.call("com.atproto.repo.putRecord", opts?.qp, data, opts).catch((e) => {
|
|
127300
|
-
throw
|
|
127648
|
+
throw toKnownErr31(e);
|
|
127301
127649
|
});
|
|
127302
127650
|
}
|
|
127303
127651
|
uploadBlob(data, opts) {
|
|
127304
127652
|
return this._service.xrpc.call("com.atproto.repo.uploadBlob", opts?.qp, data, opts).catch((e) => {
|
|
127305
|
-
throw
|
|
127653
|
+
throw toKnownErr32(e);
|
|
127306
127654
|
});
|
|
127307
127655
|
}
|
|
127308
127656
|
};
|
|
@@ -127312,102 +127660,107 @@ var ServerNS = class {
|
|
|
127312
127660
|
}
|
|
127313
127661
|
confirmEmail(data, opts) {
|
|
127314
127662
|
return this._service.xrpc.call("com.atproto.server.confirmEmail", opts?.qp, data, opts).catch((e) => {
|
|
127315
|
-
throw
|
|
127663
|
+
throw toKnownErr33(e);
|
|
127316
127664
|
});
|
|
127317
127665
|
}
|
|
127318
127666
|
createAccount(data, opts) {
|
|
127319
127667
|
return this._service.xrpc.call("com.atproto.server.createAccount", opts?.qp, data, opts).catch((e) => {
|
|
127320
|
-
throw
|
|
127668
|
+
throw toKnownErr34(e);
|
|
127321
127669
|
});
|
|
127322
127670
|
}
|
|
127323
127671
|
createAppPassword(data, opts) {
|
|
127324
127672
|
return this._service.xrpc.call("com.atproto.server.createAppPassword", opts?.qp, data, opts).catch((e) => {
|
|
127325
|
-
throw
|
|
127673
|
+
throw toKnownErr35(e);
|
|
127326
127674
|
});
|
|
127327
127675
|
}
|
|
127328
127676
|
createInviteCode(data, opts) {
|
|
127329
127677
|
return this._service.xrpc.call("com.atproto.server.createInviteCode", opts?.qp, data, opts).catch((e) => {
|
|
127330
|
-
throw
|
|
127678
|
+
throw toKnownErr36(e);
|
|
127331
127679
|
});
|
|
127332
127680
|
}
|
|
127333
127681
|
createInviteCodes(data, opts) {
|
|
127334
127682
|
return this._service.xrpc.call("com.atproto.server.createInviteCodes", opts?.qp, data, opts).catch((e) => {
|
|
127335
|
-
throw
|
|
127683
|
+
throw toKnownErr37(e);
|
|
127336
127684
|
});
|
|
127337
127685
|
}
|
|
127338
127686
|
createSession(data, opts) {
|
|
127339
127687
|
return this._service.xrpc.call("com.atproto.server.createSession", opts?.qp, data, opts).catch((e) => {
|
|
127340
|
-
throw
|
|
127688
|
+
throw toKnownErr38(e);
|
|
127341
127689
|
});
|
|
127342
127690
|
}
|
|
127343
127691
|
deleteAccount(data, opts) {
|
|
127344
127692
|
return this._service.xrpc.call("com.atproto.server.deleteAccount", opts?.qp, data, opts).catch((e) => {
|
|
127345
|
-
throw
|
|
127693
|
+
throw toKnownErr39(e);
|
|
127346
127694
|
});
|
|
127347
127695
|
}
|
|
127348
127696
|
deleteSession(data, opts) {
|
|
127349
127697
|
return this._service.xrpc.call("com.atproto.server.deleteSession", opts?.qp, data, opts).catch((e) => {
|
|
127350
|
-
throw
|
|
127698
|
+
throw toKnownErr40(e);
|
|
127351
127699
|
});
|
|
127352
127700
|
}
|
|
127353
127701
|
describeServer(params2, opts) {
|
|
127354
127702
|
return this._service.xrpc.call("com.atproto.server.describeServer", params2, void 0, opts).catch((e) => {
|
|
127355
|
-
throw
|
|
127703
|
+
throw toKnownErr41(e);
|
|
127356
127704
|
});
|
|
127357
127705
|
}
|
|
127358
127706
|
getAccountInviteCodes(params2, opts) {
|
|
127359
127707
|
return this._service.xrpc.call("com.atproto.server.getAccountInviteCodes", params2, void 0, opts).catch((e) => {
|
|
127360
|
-
throw
|
|
127708
|
+
throw toKnownErr42(e);
|
|
127361
127709
|
});
|
|
127362
127710
|
}
|
|
127363
127711
|
getSession(params2, opts) {
|
|
127364
127712
|
return this._service.xrpc.call("com.atproto.server.getSession", params2, void 0, opts).catch((e) => {
|
|
127365
|
-
throw
|
|
127713
|
+
throw toKnownErr43(e);
|
|
127366
127714
|
});
|
|
127367
127715
|
}
|
|
127368
127716
|
listAppPasswords(params2, opts) {
|
|
127369
127717
|
return this._service.xrpc.call("com.atproto.server.listAppPasswords", params2, void 0, opts).catch((e) => {
|
|
127370
|
-
throw
|
|
127718
|
+
throw toKnownErr44(e);
|
|
127371
127719
|
});
|
|
127372
127720
|
}
|
|
127373
127721
|
refreshSession(data, opts) {
|
|
127374
127722
|
return this._service.xrpc.call("com.atproto.server.refreshSession", opts?.qp, data, opts).catch((e) => {
|
|
127375
|
-
throw
|
|
127723
|
+
throw toKnownErr45(e);
|
|
127376
127724
|
});
|
|
127377
127725
|
}
|
|
127378
127726
|
requestAccountDelete(data, opts) {
|
|
127379
127727
|
return this._service.xrpc.call("com.atproto.server.requestAccountDelete", opts?.qp, data, opts).catch((e) => {
|
|
127380
|
-
throw
|
|
127728
|
+
throw toKnownErr46(e);
|
|
127381
127729
|
});
|
|
127382
127730
|
}
|
|
127383
127731
|
requestEmailConfirmation(data, opts) {
|
|
127384
127732
|
return this._service.xrpc.call("com.atproto.server.requestEmailConfirmation", opts?.qp, data, opts).catch((e) => {
|
|
127385
|
-
throw
|
|
127733
|
+
throw toKnownErr47(e);
|
|
127386
127734
|
});
|
|
127387
127735
|
}
|
|
127388
127736
|
requestEmailUpdate(data, opts) {
|
|
127389
127737
|
return this._service.xrpc.call("com.atproto.server.requestEmailUpdate", opts?.qp, data, opts).catch((e) => {
|
|
127390
|
-
throw
|
|
127738
|
+
throw toKnownErr48(e);
|
|
127391
127739
|
});
|
|
127392
127740
|
}
|
|
127393
127741
|
requestPasswordReset(data, opts) {
|
|
127394
127742
|
return this._service.xrpc.call("com.atproto.server.requestPasswordReset", opts?.qp, data, opts).catch((e) => {
|
|
127395
|
-
throw
|
|
127743
|
+
throw toKnownErr49(e);
|
|
127744
|
+
});
|
|
127745
|
+
}
|
|
127746
|
+
reserveSigningKey(data, opts) {
|
|
127747
|
+
return this._service.xrpc.call("com.atproto.server.reserveSigningKey", opts?.qp, data, opts).catch((e) => {
|
|
127748
|
+
throw toKnownErr50(e);
|
|
127396
127749
|
});
|
|
127397
127750
|
}
|
|
127398
127751
|
resetPassword(data, opts) {
|
|
127399
127752
|
return this._service.xrpc.call("com.atproto.server.resetPassword", opts?.qp, data, opts).catch((e) => {
|
|
127400
|
-
throw
|
|
127753
|
+
throw toKnownErr51(e);
|
|
127401
127754
|
});
|
|
127402
127755
|
}
|
|
127403
127756
|
revokeAppPassword(data, opts) {
|
|
127404
127757
|
return this._service.xrpc.call("com.atproto.server.revokeAppPassword", opts?.qp, data, opts).catch((e) => {
|
|
127405
|
-
throw
|
|
127758
|
+
throw toKnownErr52(e);
|
|
127406
127759
|
});
|
|
127407
127760
|
}
|
|
127408
127761
|
updateEmail(data, opts) {
|
|
127409
127762
|
return this._service.xrpc.call("com.atproto.server.updateEmail", opts?.qp, data, opts).catch((e) => {
|
|
127410
|
-
throw
|
|
127763
|
+
throw toKnownErr53(e);
|
|
127411
127764
|
});
|
|
127412
127765
|
}
|
|
127413
127766
|
};
|
|
@@ -127417,57 +127770,57 @@ var SyncNS = class {
|
|
|
127417
127770
|
}
|
|
127418
127771
|
getBlob(params2, opts) {
|
|
127419
127772
|
return this._service.xrpc.call("com.atproto.sync.getBlob", params2, void 0, opts).catch((e) => {
|
|
127420
|
-
throw
|
|
127773
|
+
throw toKnownErr54(e);
|
|
127421
127774
|
});
|
|
127422
127775
|
}
|
|
127423
127776
|
getBlocks(params2, opts) {
|
|
127424
127777
|
return this._service.xrpc.call("com.atproto.sync.getBlocks", params2, void 0, opts).catch((e) => {
|
|
127425
|
-
throw
|
|
127778
|
+
throw toKnownErr55(e);
|
|
127426
127779
|
});
|
|
127427
127780
|
}
|
|
127428
127781
|
getCheckout(params2, opts) {
|
|
127429
127782
|
return this._service.xrpc.call("com.atproto.sync.getCheckout", params2, void 0, opts).catch((e) => {
|
|
127430
|
-
throw
|
|
127783
|
+
throw toKnownErr56(e);
|
|
127431
127784
|
});
|
|
127432
127785
|
}
|
|
127433
127786
|
getHead(params2, opts) {
|
|
127434
127787
|
return this._service.xrpc.call("com.atproto.sync.getHead", params2, void 0, opts).catch((e) => {
|
|
127435
|
-
throw
|
|
127788
|
+
throw toKnownErr57(e);
|
|
127436
127789
|
});
|
|
127437
127790
|
}
|
|
127438
127791
|
getLatestCommit(params2, opts) {
|
|
127439
127792
|
return this._service.xrpc.call("com.atproto.sync.getLatestCommit", params2, void 0, opts).catch((e) => {
|
|
127440
|
-
throw
|
|
127793
|
+
throw toKnownErr58(e);
|
|
127441
127794
|
});
|
|
127442
127795
|
}
|
|
127443
127796
|
getRecord(params2, opts) {
|
|
127444
127797
|
return this._service.xrpc.call("com.atproto.sync.getRecord", params2, void 0, opts).catch((e) => {
|
|
127445
|
-
throw
|
|
127798
|
+
throw toKnownErr59(e);
|
|
127446
127799
|
});
|
|
127447
127800
|
}
|
|
127448
127801
|
getRepo(params2, opts) {
|
|
127449
127802
|
return this._service.xrpc.call("com.atproto.sync.getRepo", params2, void 0, opts).catch((e) => {
|
|
127450
|
-
throw
|
|
127803
|
+
throw toKnownErr60(e);
|
|
127451
127804
|
});
|
|
127452
127805
|
}
|
|
127453
127806
|
listBlobs(params2, opts) {
|
|
127454
127807
|
return this._service.xrpc.call("com.atproto.sync.listBlobs", params2, void 0, opts).catch((e) => {
|
|
127455
|
-
throw
|
|
127808
|
+
throw toKnownErr61(e);
|
|
127456
127809
|
});
|
|
127457
127810
|
}
|
|
127458
127811
|
listRepos(params2, opts) {
|
|
127459
127812
|
return this._service.xrpc.call("com.atproto.sync.listRepos", params2, void 0, opts).catch((e) => {
|
|
127460
|
-
throw
|
|
127813
|
+
throw toKnownErr62(e);
|
|
127461
127814
|
});
|
|
127462
127815
|
}
|
|
127463
127816
|
notifyOfUpdate(data, opts) {
|
|
127464
127817
|
return this._service.xrpc.call("com.atproto.sync.notifyOfUpdate", opts?.qp, data, opts).catch((e) => {
|
|
127465
|
-
throw
|
|
127818
|
+
throw toKnownErr63(e);
|
|
127466
127819
|
});
|
|
127467
127820
|
}
|
|
127468
127821
|
requestCrawl(data, opts) {
|
|
127469
127822
|
return this._service.xrpc.call("com.atproto.sync.requestCrawl", opts?.qp, data, opts).catch((e) => {
|
|
127470
|
-
throw
|
|
127823
|
+
throw toKnownErr64(e);
|
|
127471
127824
|
});
|
|
127472
127825
|
}
|
|
127473
127826
|
};
|
|
@@ -127496,37 +127849,37 @@ var ActorNS = class {
|
|
|
127496
127849
|
}
|
|
127497
127850
|
getPreferences(params2, opts) {
|
|
127498
127851
|
return this._service.xrpc.call("app.bsky.actor.getPreferences", params2, void 0, opts).catch((e) => {
|
|
127499
|
-
throw
|
|
127852
|
+
throw toKnownErr65(e);
|
|
127500
127853
|
});
|
|
127501
127854
|
}
|
|
127502
127855
|
getProfile(params2, opts) {
|
|
127503
127856
|
return this._service.xrpc.call("app.bsky.actor.getProfile", params2, void 0, opts).catch((e) => {
|
|
127504
|
-
throw
|
|
127857
|
+
throw toKnownErr66(e);
|
|
127505
127858
|
});
|
|
127506
127859
|
}
|
|
127507
127860
|
getProfiles(params2, opts) {
|
|
127508
127861
|
return this._service.xrpc.call("app.bsky.actor.getProfiles", params2, void 0, opts).catch((e) => {
|
|
127509
|
-
throw
|
|
127862
|
+
throw toKnownErr67(e);
|
|
127510
127863
|
});
|
|
127511
127864
|
}
|
|
127512
127865
|
getSuggestions(params2, opts) {
|
|
127513
127866
|
return this._service.xrpc.call("app.bsky.actor.getSuggestions", params2, void 0, opts).catch((e) => {
|
|
127514
|
-
throw
|
|
127867
|
+
throw toKnownErr68(e);
|
|
127515
127868
|
});
|
|
127516
127869
|
}
|
|
127517
127870
|
putPreferences(data, opts) {
|
|
127518
127871
|
return this._service.xrpc.call("app.bsky.actor.putPreferences", opts?.qp, data, opts).catch((e) => {
|
|
127519
|
-
throw
|
|
127872
|
+
throw toKnownErr69(e);
|
|
127520
127873
|
});
|
|
127521
127874
|
}
|
|
127522
127875
|
searchActors(params2, opts) {
|
|
127523
127876
|
return this._service.xrpc.call("app.bsky.actor.searchActors", params2, void 0, opts).catch((e) => {
|
|
127524
|
-
throw
|
|
127877
|
+
throw toKnownErr70(e);
|
|
127525
127878
|
});
|
|
127526
127879
|
}
|
|
127527
127880
|
searchActorsTypeahead(params2, opts) {
|
|
127528
127881
|
return this._service.xrpc.call("app.bsky.actor.searchActorsTypeahead", params2, void 0, opts).catch((e) => {
|
|
127529
|
-
throw
|
|
127882
|
+
throw toKnownErr71(e);
|
|
127530
127883
|
});
|
|
127531
127884
|
}
|
|
127532
127885
|
};
|
|
@@ -127573,82 +127926,82 @@ var FeedNS = class {
|
|
|
127573
127926
|
}
|
|
127574
127927
|
describeFeedGenerator(params2, opts) {
|
|
127575
127928
|
return this._service.xrpc.call("app.bsky.feed.describeFeedGenerator", params2, void 0, opts).catch((e) => {
|
|
127576
|
-
throw
|
|
127929
|
+
throw toKnownErr72(e);
|
|
127577
127930
|
});
|
|
127578
127931
|
}
|
|
127579
127932
|
getActorFeeds(params2, opts) {
|
|
127580
127933
|
return this._service.xrpc.call("app.bsky.feed.getActorFeeds", params2, void 0, opts).catch((e) => {
|
|
127581
|
-
throw
|
|
127934
|
+
throw toKnownErr73(e);
|
|
127582
127935
|
});
|
|
127583
127936
|
}
|
|
127584
127937
|
getActorLikes(params2, opts) {
|
|
127585
127938
|
return this._service.xrpc.call("app.bsky.feed.getActorLikes", params2, void 0, opts).catch((e) => {
|
|
127586
|
-
throw
|
|
127939
|
+
throw toKnownErr74(e);
|
|
127587
127940
|
});
|
|
127588
127941
|
}
|
|
127589
127942
|
getAuthorFeed(params2, opts) {
|
|
127590
127943
|
return this._service.xrpc.call("app.bsky.feed.getAuthorFeed", params2, void 0, opts).catch((e) => {
|
|
127591
|
-
throw
|
|
127944
|
+
throw toKnownErr75(e);
|
|
127592
127945
|
});
|
|
127593
127946
|
}
|
|
127594
127947
|
getFeed(params2, opts) {
|
|
127595
127948
|
return this._service.xrpc.call("app.bsky.feed.getFeed", params2, void 0, opts).catch((e) => {
|
|
127596
|
-
throw
|
|
127949
|
+
throw toKnownErr76(e);
|
|
127597
127950
|
});
|
|
127598
127951
|
}
|
|
127599
127952
|
getFeedGenerator(params2, opts) {
|
|
127600
127953
|
return this._service.xrpc.call("app.bsky.feed.getFeedGenerator", params2, void 0, opts).catch((e) => {
|
|
127601
|
-
throw
|
|
127954
|
+
throw toKnownErr77(e);
|
|
127602
127955
|
});
|
|
127603
127956
|
}
|
|
127604
127957
|
getFeedGenerators(params2, opts) {
|
|
127605
127958
|
return this._service.xrpc.call("app.bsky.feed.getFeedGenerators", params2, void 0, opts).catch((e) => {
|
|
127606
|
-
throw
|
|
127959
|
+
throw toKnownErr78(e);
|
|
127607
127960
|
});
|
|
127608
127961
|
}
|
|
127609
127962
|
getFeedSkeleton(params2, opts) {
|
|
127610
127963
|
return this._service.xrpc.call("app.bsky.feed.getFeedSkeleton", params2, void 0, opts).catch((e) => {
|
|
127611
|
-
throw
|
|
127964
|
+
throw toKnownErr79(e);
|
|
127612
127965
|
});
|
|
127613
127966
|
}
|
|
127614
127967
|
getLikes(params2, opts) {
|
|
127615
127968
|
return this._service.xrpc.call("app.bsky.feed.getLikes", params2, void 0, opts).catch((e) => {
|
|
127616
|
-
throw
|
|
127969
|
+
throw toKnownErr80(e);
|
|
127617
127970
|
});
|
|
127618
127971
|
}
|
|
127619
127972
|
getListFeed(params2, opts) {
|
|
127620
127973
|
return this._service.xrpc.call("app.bsky.feed.getListFeed", params2, void 0, opts).catch((e) => {
|
|
127621
|
-
throw
|
|
127974
|
+
throw toKnownErr81(e);
|
|
127622
127975
|
});
|
|
127623
127976
|
}
|
|
127624
127977
|
getPostThread(params2, opts) {
|
|
127625
127978
|
return this._service.xrpc.call("app.bsky.feed.getPostThread", params2, void 0, opts).catch((e) => {
|
|
127626
|
-
throw
|
|
127979
|
+
throw toKnownErr82(e);
|
|
127627
127980
|
});
|
|
127628
127981
|
}
|
|
127629
127982
|
getPosts(params2, opts) {
|
|
127630
127983
|
return this._service.xrpc.call("app.bsky.feed.getPosts", params2, void 0, opts).catch((e) => {
|
|
127631
|
-
throw
|
|
127984
|
+
throw toKnownErr83(e);
|
|
127632
127985
|
});
|
|
127633
127986
|
}
|
|
127634
127987
|
getRepostedBy(params2, opts) {
|
|
127635
127988
|
return this._service.xrpc.call("app.bsky.feed.getRepostedBy", params2, void 0, opts).catch((e) => {
|
|
127636
|
-
throw
|
|
127989
|
+
throw toKnownErr84(e);
|
|
127637
127990
|
});
|
|
127638
127991
|
}
|
|
127639
127992
|
getSuggestedFeeds(params2, opts) {
|
|
127640
127993
|
return this._service.xrpc.call("app.bsky.feed.getSuggestedFeeds", params2, void 0, opts).catch((e) => {
|
|
127641
|
-
throw
|
|
127994
|
+
throw toKnownErr85(e);
|
|
127642
127995
|
});
|
|
127643
127996
|
}
|
|
127644
127997
|
getTimeline(params2, opts) {
|
|
127645
127998
|
return this._service.xrpc.call("app.bsky.feed.getTimeline", params2, void 0, opts).catch((e) => {
|
|
127646
|
-
throw
|
|
127999
|
+
throw toKnownErr86(e);
|
|
127647
128000
|
});
|
|
127648
128001
|
}
|
|
127649
128002
|
searchPosts(params2, opts) {
|
|
127650
128003
|
return this._service.xrpc.call("app.bsky.feed.searchPosts", params2, void 0, opts).catch((e) => {
|
|
127651
|
-
throw
|
|
128004
|
+
throw toKnownErr87(e);
|
|
127652
128005
|
});
|
|
127653
128006
|
}
|
|
127654
128007
|
};
|
|
@@ -127798,67 +128151,67 @@ var GraphNS = class {
|
|
|
127798
128151
|
}
|
|
127799
128152
|
getBlocks(params2, opts) {
|
|
127800
128153
|
return this._service.xrpc.call("app.bsky.graph.getBlocks", params2, void 0, opts).catch((e) => {
|
|
127801
|
-
throw
|
|
128154
|
+
throw toKnownErr88(e);
|
|
127802
128155
|
});
|
|
127803
128156
|
}
|
|
127804
128157
|
getFollowers(params2, opts) {
|
|
127805
128158
|
return this._service.xrpc.call("app.bsky.graph.getFollowers", params2, void 0, opts).catch((e) => {
|
|
127806
|
-
throw
|
|
128159
|
+
throw toKnownErr89(e);
|
|
127807
128160
|
});
|
|
127808
128161
|
}
|
|
127809
128162
|
getFollows(params2, opts) {
|
|
127810
128163
|
return this._service.xrpc.call("app.bsky.graph.getFollows", params2, void 0, opts).catch((e) => {
|
|
127811
|
-
throw
|
|
128164
|
+
throw toKnownErr90(e);
|
|
127812
128165
|
});
|
|
127813
128166
|
}
|
|
127814
128167
|
getList(params2, opts) {
|
|
127815
128168
|
return this._service.xrpc.call("app.bsky.graph.getList", params2, void 0, opts).catch((e) => {
|
|
127816
|
-
throw
|
|
128169
|
+
throw toKnownErr91(e);
|
|
127817
128170
|
});
|
|
127818
128171
|
}
|
|
127819
128172
|
getListBlocks(params2, opts) {
|
|
127820
128173
|
return this._service.xrpc.call("app.bsky.graph.getListBlocks", params2, void 0, opts).catch((e) => {
|
|
127821
|
-
throw
|
|
128174
|
+
throw toKnownErr92(e);
|
|
127822
128175
|
});
|
|
127823
128176
|
}
|
|
127824
128177
|
getListMutes(params2, opts) {
|
|
127825
128178
|
return this._service.xrpc.call("app.bsky.graph.getListMutes", params2, void 0, opts).catch((e) => {
|
|
127826
|
-
throw
|
|
128179
|
+
throw toKnownErr93(e);
|
|
127827
128180
|
});
|
|
127828
128181
|
}
|
|
127829
128182
|
getLists(params2, opts) {
|
|
127830
128183
|
return this._service.xrpc.call("app.bsky.graph.getLists", params2, void 0, opts).catch((e) => {
|
|
127831
|
-
throw
|
|
128184
|
+
throw toKnownErr94(e);
|
|
127832
128185
|
});
|
|
127833
128186
|
}
|
|
127834
128187
|
getMutes(params2, opts) {
|
|
127835
128188
|
return this._service.xrpc.call("app.bsky.graph.getMutes", params2, void 0, opts).catch((e) => {
|
|
127836
|
-
throw
|
|
128189
|
+
throw toKnownErr95(e);
|
|
127837
128190
|
});
|
|
127838
128191
|
}
|
|
127839
128192
|
getSuggestedFollowsByActor(params2, opts) {
|
|
127840
128193
|
return this._service.xrpc.call("app.bsky.graph.getSuggestedFollowsByActor", params2, void 0, opts).catch((e) => {
|
|
127841
|
-
throw
|
|
128194
|
+
throw toKnownErr96(e);
|
|
127842
128195
|
});
|
|
127843
128196
|
}
|
|
127844
128197
|
muteActor(data, opts) {
|
|
127845
128198
|
return this._service.xrpc.call("app.bsky.graph.muteActor", opts?.qp, data, opts).catch((e) => {
|
|
127846
|
-
throw
|
|
128199
|
+
throw toKnownErr97(e);
|
|
127847
128200
|
});
|
|
127848
128201
|
}
|
|
127849
128202
|
muteActorList(data, opts) {
|
|
127850
128203
|
return this._service.xrpc.call("app.bsky.graph.muteActorList", opts?.qp, data, opts).catch((e) => {
|
|
127851
|
-
throw
|
|
128204
|
+
throw toKnownErr98(e);
|
|
127852
128205
|
});
|
|
127853
128206
|
}
|
|
127854
128207
|
unmuteActor(data, opts) {
|
|
127855
128208
|
return this._service.xrpc.call("app.bsky.graph.unmuteActor", opts?.qp, data, opts).catch((e) => {
|
|
127856
|
-
throw
|
|
128209
|
+
throw toKnownErr99(e);
|
|
127857
128210
|
});
|
|
127858
128211
|
}
|
|
127859
128212
|
unmuteActorList(data, opts) {
|
|
127860
128213
|
return this._service.xrpc.call("app.bsky.graph.unmuteActorList", opts?.qp, data, opts).catch((e) => {
|
|
127861
|
-
throw
|
|
128214
|
+
throw toKnownErr100(e);
|
|
127862
128215
|
});
|
|
127863
128216
|
}
|
|
127864
128217
|
};
|
|
@@ -128003,22 +128356,22 @@ var NotificationNS = class {
|
|
|
128003
128356
|
}
|
|
128004
128357
|
getUnreadCount(params2, opts) {
|
|
128005
128358
|
return this._service.xrpc.call("app.bsky.notification.getUnreadCount", params2, void 0, opts).catch((e) => {
|
|
128006
|
-
throw
|
|
128359
|
+
throw toKnownErr101(e);
|
|
128007
128360
|
});
|
|
128008
128361
|
}
|
|
128009
128362
|
listNotifications(params2, opts) {
|
|
128010
128363
|
return this._service.xrpc.call("app.bsky.notification.listNotifications", params2, void 0, opts).catch((e) => {
|
|
128011
|
-
throw
|
|
128364
|
+
throw toKnownErr102(e);
|
|
128012
128365
|
});
|
|
128013
128366
|
}
|
|
128014
128367
|
registerPush(data, opts) {
|
|
128015
128368
|
return this._service.xrpc.call("app.bsky.notification.registerPush", opts?.qp, data, opts).catch((e) => {
|
|
128016
|
-
throw
|
|
128369
|
+
throw toKnownErr103(e);
|
|
128017
128370
|
});
|
|
128018
128371
|
}
|
|
128019
128372
|
updateSeen(data, opts) {
|
|
128020
128373
|
return this._service.xrpc.call("app.bsky.notification.updateSeen", opts?.qp, data, opts).catch((e) => {
|
|
128021
|
-
throw
|
|
128374
|
+
throw toKnownErr104(e);
|
|
128022
128375
|
});
|
|
128023
128376
|
}
|
|
128024
128377
|
};
|
|
@@ -128033,27 +128386,27 @@ var UnspeccedNS = class {
|
|
|
128033
128386
|
}
|
|
128034
128387
|
getPopular(params2, opts) {
|
|
128035
128388
|
return this._service.xrpc.call("app.bsky.unspecced.getPopular", params2, void 0, opts).catch((e) => {
|
|
128036
|
-
throw
|
|
128389
|
+
throw toKnownErr105(e);
|
|
128037
128390
|
});
|
|
128038
128391
|
}
|
|
128039
128392
|
getPopularFeedGenerators(params2, opts) {
|
|
128040
128393
|
return this._service.xrpc.call("app.bsky.unspecced.getPopularFeedGenerators", params2, void 0, opts).catch((e) => {
|
|
128041
|
-
throw
|
|
128394
|
+
throw toKnownErr106(e);
|
|
128042
128395
|
});
|
|
128043
128396
|
}
|
|
128044
128397
|
getTimelineSkeleton(params2, opts) {
|
|
128045
128398
|
return this._service.xrpc.call("app.bsky.unspecced.getTimelineSkeleton", params2, void 0, opts).catch((e) => {
|
|
128046
|
-
throw
|
|
128399
|
+
throw toKnownErr107(e);
|
|
128047
128400
|
});
|
|
128048
128401
|
}
|
|
128049
128402
|
searchActorsSkeleton(params2, opts) {
|
|
128050
128403
|
return this._service.xrpc.call("app.bsky.unspecced.searchActorsSkeleton", params2, void 0, opts).catch((e) => {
|
|
128051
|
-
throw
|
|
128404
|
+
throw toKnownErr108(e);
|
|
128052
128405
|
});
|
|
128053
128406
|
}
|
|
128054
128407
|
searchPostsSkeleton(params2, opts) {
|
|
128055
128408
|
return this._service.xrpc.call("app.bsky.unspecced.searchPostsSkeleton", params2, void 0, opts).catch((e) => {
|
|
128056
|
-
throw
|
|
128409
|
+
throw toKnownErr109(e);
|
|
128057
128410
|
});
|
|
128058
128411
|
}
|
|
128059
128412
|
};
|
|
@@ -128100,6 +128453,7 @@ var _AtpAgent = class {
|
|
|
128100
128453
|
email: opts.email,
|
|
128101
128454
|
emailConfirmed: false
|
|
128102
128455
|
};
|
|
128456
|
+
this._updateApiEndpoint(res.data.didDoc);
|
|
128103
128457
|
return res;
|
|
128104
128458
|
} catch (e) {
|
|
128105
128459
|
this.session = void 0;
|
|
@@ -128126,6 +128480,7 @@ var _AtpAgent = class {
|
|
|
128126
128480
|
email: res.data.email,
|
|
128127
128481
|
emailConfirmed: res.data.emailConfirmed
|
|
128128
128482
|
};
|
|
128483
|
+
this._updateApiEndpoint(res.data.didDoc);
|
|
128129
128484
|
return res;
|
|
128130
128485
|
} catch (e) {
|
|
128131
128486
|
this.session = void 0;
|
|
@@ -128199,7 +128554,7 @@ var _AtpAgent = class {
|
|
|
128199
128554
|
if (!this.session?.refreshJwt) {
|
|
128200
128555
|
return;
|
|
128201
128556
|
}
|
|
128202
|
-
const url = new URL(this.service.origin);
|
|
128557
|
+
const url = new URL((this.pdsUrl || this.service).origin);
|
|
128203
128558
|
url.pathname = `/xrpc/${REFRESH_SESSION}`;
|
|
128204
128559
|
const res = await _AtpAgent.fetch(url.toString(), "POST", {
|
|
128205
128560
|
authorization: `Bearer ${this.session.refreshJwt}`
|
|
@@ -128215,9 +128570,17 @@ var _AtpAgent = class {
|
|
|
128215
128570
|
handle: res.body.handle,
|
|
128216
128571
|
did: res.body.did
|
|
128217
128572
|
};
|
|
128573
|
+
this._updateApiEndpoint(res.body.didDoc);
|
|
128218
128574
|
this._persistSession?.("update", this.session);
|
|
128219
128575
|
}
|
|
128220
128576
|
}
|
|
128577
|
+
_updateApiEndpoint(didDoc) {
|
|
128578
|
+
if (isValidDidDoc(didDoc)) {
|
|
128579
|
+
const endpoint = getPdsEndpoint(didDoc);
|
|
128580
|
+
this.pdsUrl = endpoint ? new URL(endpoint) : void 0;
|
|
128581
|
+
}
|
|
128582
|
+
this.api.xrpc.uri = this.pdsUrl || this.service;
|
|
128583
|
+
}
|
|
128221
128584
|
};
|
|
128222
128585
|
var AtpAgent = _AtpAgent;
|
|
128223
128586
|
AtpAgent.fetch = defaultFetchHandler;
|
|
@@ -129238,7 +129601,7 @@ var skeletonFromFeedGen = async (ctx, params2) => {
|
|
|
129238
129601
|
if (!resolved) {
|
|
129239
129602
|
throw new InvalidRequestError(`could not resolve did document: ${feedDid}`);
|
|
129240
129603
|
}
|
|
129241
|
-
const fgEndpoint =
|
|
129604
|
+
const fgEndpoint = getFeedGenEndpoint(resolved);
|
|
129242
129605
|
if (!fgEndpoint) {
|
|
129243
129606
|
throw new InvalidRequestError(`invalid feed generator service details in did document: ${feedDid}`);
|
|
129244
129607
|
}
|
|
@@ -129313,7 +129676,7 @@ function getFeedGenerator_default(server, ctx) {
|
|
|
129313
129676
|
if (!resolved) {
|
|
129314
129677
|
throw new InvalidRequestError(`could not resolve did document: ${feedDid}`);
|
|
129315
129678
|
}
|
|
129316
|
-
const fgEndpoint =
|
|
129679
|
+
const fgEndpoint = getFeedGenEndpoint(resolved);
|
|
129317
129680
|
if (!fgEndpoint) {
|
|
129318
129681
|
throw new InvalidRequestError(`invalid feed generator service details in did document: ${feedDid}`);
|
|
129319
129682
|
}
|
|
@@ -129563,6 +129926,18 @@ var schemaDict2 = {
|
|
|
129563
129926
|
lexicon: 1,
|
|
129564
129927
|
id: "com.atproto.admin.defs",
|
|
129565
129928
|
defs: {
|
|
129929
|
+
statusAttr: {
|
|
129930
|
+
type: "object",
|
|
129931
|
+
required: ["applied"],
|
|
129932
|
+
properties: {
|
|
129933
|
+
applied: {
|
|
129934
|
+
type: "boolean"
|
|
129935
|
+
},
|
|
129936
|
+
ref: {
|
|
129937
|
+
type: "string"
|
|
129938
|
+
}
|
|
129939
|
+
}
|
|
129940
|
+
},
|
|
129566
129941
|
actionView: {
|
|
129567
129942
|
type: "object",
|
|
129568
129943
|
required: [
|
|
@@ -129972,6 +130347,44 @@ var schemaDict2 = {
|
|
|
129972
130347
|
}
|
|
129973
130348
|
}
|
|
129974
130349
|
},
|
|
130350
|
+
accountView: {
|
|
130351
|
+
type: "object",
|
|
130352
|
+
required: ["did", "handle", "indexedAt"],
|
|
130353
|
+
properties: {
|
|
130354
|
+
did: {
|
|
130355
|
+
type: "string",
|
|
130356
|
+
format: "did"
|
|
130357
|
+
},
|
|
130358
|
+
handle: {
|
|
130359
|
+
type: "string",
|
|
130360
|
+
format: "handle"
|
|
130361
|
+
},
|
|
130362
|
+
email: {
|
|
130363
|
+
type: "string"
|
|
130364
|
+
},
|
|
130365
|
+
indexedAt: {
|
|
130366
|
+
type: "string",
|
|
130367
|
+
format: "datetime"
|
|
130368
|
+
},
|
|
130369
|
+
invitedBy: {
|
|
130370
|
+
type: "ref",
|
|
130371
|
+
ref: "lex:com.atproto.server.defs#inviteCode"
|
|
130372
|
+
},
|
|
130373
|
+
invites: {
|
|
130374
|
+
type: "array",
|
|
130375
|
+
items: {
|
|
130376
|
+
type: "ref",
|
|
130377
|
+
ref: "lex:com.atproto.server.defs#inviteCode"
|
|
130378
|
+
}
|
|
130379
|
+
},
|
|
130380
|
+
invitesDisabled: {
|
|
130381
|
+
type: "boolean"
|
|
130382
|
+
},
|
|
130383
|
+
inviteNote: {
|
|
130384
|
+
type: "string"
|
|
130385
|
+
}
|
|
130386
|
+
}
|
|
130387
|
+
},
|
|
129975
130388
|
repoViewNotFound: {
|
|
129976
130389
|
type: "object",
|
|
129977
130390
|
required: ["did"],
|
|
@@ -129992,6 +130405,24 @@ var schemaDict2 = {
|
|
|
129992
130405
|
}
|
|
129993
130406
|
}
|
|
129994
130407
|
},
|
|
130408
|
+
repoBlobRef: {
|
|
130409
|
+
type: "object",
|
|
130410
|
+
required: ["did", "cid"],
|
|
130411
|
+
properties: {
|
|
130412
|
+
did: {
|
|
130413
|
+
type: "string",
|
|
130414
|
+
format: "did"
|
|
130415
|
+
},
|
|
130416
|
+
cid: {
|
|
130417
|
+
type: "string",
|
|
130418
|
+
format: "cid"
|
|
130419
|
+
},
|
|
130420
|
+
recordUri: {
|
|
130421
|
+
type: "string",
|
|
130422
|
+
format: "at-uri"
|
|
130423
|
+
}
|
|
130424
|
+
}
|
|
130425
|
+
},
|
|
129995
130426
|
recordView: {
|
|
129996
130427
|
type: "object",
|
|
129997
130428
|
required: [
|
|
@@ -130274,6 +130705,33 @@ var schemaDict2 = {
|
|
|
130274
130705
|
}
|
|
130275
130706
|
}
|
|
130276
130707
|
},
|
|
130708
|
+
ComAtprotoAdminGetAccountInfo: {
|
|
130709
|
+
lexicon: 1,
|
|
130710
|
+
id: "com.atproto.admin.getAccountInfo",
|
|
130711
|
+
defs: {
|
|
130712
|
+
main: {
|
|
130713
|
+
type: "query",
|
|
130714
|
+
description: "View details about an account.",
|
|
130715
|
+
parameters: {
|
|
130716
|
+
type: "params",
|
|
130717
|
+
required: ["did"],
|
|
130718
|
+
properties: {
|
|
130719
|
+
did: {
|
|
130720
|
+
type: "string",
|
|
130721
|
+
format: "did"
|
|
130722
|
+
}
|
|
130723
|
+
}
|
|
130724
|
+
},
|
|
130725
|
+
output: {
|
|
130726
|
+
encoding: "application/json",
|
|
130727
|
+
schema: {
|
|
130728
|
+
type: "ref",
|
|
130729
|
+
ref: "lex:com.atproto.admin.defs#accountView"
|
|
130730
|
+
}
|
|
130731
|
+
}
|
|
130732
|
+
}
|
|
130733
|
+
}
|
|
130734
|
+
},
|
|
130277
130735
|
ComAtprotoAdminGetInviteCodes: {
|
|
130278
130736
|
lexicon: 1,
|
|
130279
130737
|
id: "com.atproto.admin.getInviteCodes",
|
|
@@ -130568,6 +131026,54 @@ var schemaDict2 = {
|
|
|
130568
131026
|
}
|
|
130569
131027
|
}
|
|
130570
131028
|
},
|
|
131029
|
+
ComAtprotoAdminGetSubjectStatus: {
|
|
131030
|
+
lexicon: 1,
|
|
131031
|
+
id: "com.atproto.admin.getSubjectStatus",
|
|
131032
|
+
defs: {
|
|
131033
|
+
main: {
|
|
131034
|
+
type: "query",
|
|
131035
|
+
description: "Fetch the service-specific the admin status of a subject (account, record, or blob)",
|
|
131036
|
+
parameters: {
|
|
131037
|
+
type: "params",
|
|
131038
|
+
properties: {
|
|
131039
|
+
did: {
|
|
131040
|
+
type: "string",
|
|
131041
|
+
format: "did"
|
|
131042
|
+
},
|
|
131043
|
+
uri: {
|
|
131044
|
+
type: "string",
|
|
131045
|
+
format: "at-uri"
|
|
131046
|
+
},
|
|
131047
|
+
blob: {
|
|
131048
|
+
type: "string",
|
|
131049
|
+
format: "cid"
|
|
131050
|
+
}
|
|
131051
|
+
}
|
|
131052
|
+
},
|
|
131053
|
+
output: {
|
|
131054
|
+
encoding: "application/json",
|
|
131055
|
+
schema: {
|
|
131056
|
+
type: "object",
|
|
131057
|
+
required: ["subject"],
|
|
131058
|
+
properties: {
|
|
131059
|
+
subject: {
|
|
131060
|
+
type: "union",
|
|
131061
|
+
refs: [
|
|
131062
|
+
"lex:com.atproto.admin.defs#repoRef",
|
|
131063
|
+
"lex:com.atproto.repo.strongRef",
|
|
131064
|
+
"lex:com.atproto.admin.defs#repoBlobRef"
|
|
131065
|
+
]
|
|
131066
|
+
},
|
|
131067
|
+
takedown: {
|
|
131068
|
+
type: "ref",
|
|
131069
|
+
ref: "lex:com.atproto.admin.defs#statusAttr"
|
|
131070
|
+
}
|
|
131071
|
+
}
|
|
131072
|
+
}
|
|
131073
|
+
}
|
|
131074
|
+
}
|
|
131075
|
+
}
|
|
131076
|
+
},
|
|
130571
131077
|
ComAtprotoAdminResolveModerationReports: {
|
|
130572
131078
|
lexicon: 1,
|
|
130573
131079
|
id: "com.atproto.admin.resolveModerationReports",
|
|
@@ -130660,9 +131166,6 @@ var schemaDict2 = {
|
|
|
130660
131166
|
q: {
|
|
130661
131167
|
type: "string"
|
|
130662
131168
|
},
|
|
130663
|
-
invitedBy: {
|
|
130664
|
-
type: "string"
|
|
130665
|
-
},
|
|
130666
131169
|
limit: {
|
|
130667
131170
|
type: "integer",
|
|
130668
131171
|
minimum: 1,
|
|
@@ -130867,6 +131370,58 @@ var schemaDict2 = {
|
|
|
130867
131370
|
}
|
|
130868
131371
|
}
|
|
130869
131372
|
},
|
|
131373
|
+
ComAtprotoAdminUpdateSubjectStatus: {
|
|
131374
|
+
lexicon: 1,
|
|
131375
|
+
id: "com.atproto.admin.updateSubjectStatus",
|
|
131376
|
+
defs: {
|
|
131377
|
+
main: {
|
|
131378
|
+
type: "procedure",
|
|
131379
|
+
description: "Update the service-specific admin status of a subject (account, record, or blob)",
|
|
131380
|
+
input: {
|
|
131381
|
+
encoding: "application/json",
|
|
131382
|
+
schema: {
|
|
131383
|
+
type: "object",
|
|
131384
|
+
required: ["subject"],
|
|
131385
|
+
properties: {
|
|
131386
|
+
subject: {
|
|
131387
|
+
type: "union",
|
|
131388
|
+
refs: [
|
|
131389
|
+
"lex:com.atproto.admin.defs#repoRef",
|
|
131390
|
+
"lex:com.atproto.repo.strongRef",
|
|
131391
|
+
"lex:com.atproto.admin.defs#repoBlobRef"
|
|
131392
|
+
]
|
|
131393
|
+
},
|
|
131394
|
+
takedown: {
|
|
131395
|
+
type: "ref",
|
|
131396
|
+
ref: "lex:com.atproto.admin.defs#statusAttr"
|
|
131397
|
+
}
|
|
131398
|
+
}
|
|
131399
|
+
}
|
|
131400
|
+
},
|
|
131401
|
+
output: {
|
|
131402
|
+
encoding: "application/json",
|
|
131403
|
+
schema: {
|
|
131404
|
+
type: "object",
|
|
131405
|
+
required: ["subject"],
|
|
131406
|
+
properties: {
|
|
131407
|
+
subject: {
|
|
131408
|
+
type: "union",
|
|
131409
|
+
refs: [
|
|
131410
|
+
"lex:com.atproto.admin.defs#repoRef",
|
|
131411
|
+
"lex:com.atproto.repo.strongRef",
|
|
131412
|
+
"lex:com.atproto.admin.defs#repoBlobRef"
|
|
131413
|
+
]
|
|
131414
|
+
},
|
|
131415
|
+
takedown: {
|
|
131416
|
+
type: "ref",
|
|
131417
|
+
ref: "lex:com.atproto.admin.defs#statusAttr"
|
|
131418
|
+
}
|
|
131419
|
+
}
|
|
131420
|
+
}
|
|
131421
|
+
}
|
|
131422
|
+
}
|
|
131423
|
+
}
|
|
131424
|
+
},
|
|
130870
131425
|
ComAtprotoIdentityResolveHandle: {
|
|
130871
131426
|
lexicon: 1,
|
|
130872
131427
|
id: "com.atproto.identity.resolveHandle",
|
|
@@ -131164,7 +131719,9 @@ var schemaDict2 = {
|
|
|
131164
131719
|
ref: "lex:com.atproto.moderation.defs#reasonType"
|
|
131165
131720
|
},
|
|
131166
131721
|
reason: {
|
|
131167
|
-
type: "string"
|
|
131722
|
+
type: "string",
|
|
131723
|
+
maxGraphemes: 2e3,
|
|
131724
|
+
maxLength: 2e4
|
|
131168
131725
|
},
|
|
131169
131726
|
subject: {
|
|
131170
131727
|
type: "union",
|
|
@@ -131813,7 +132370,7 @@ var schemaDict2 = {
|
|
|
131813
132370
|
encoding: "application/json",
|
|
131814
132371
|
schema: {
|
|
131815
132372
|
type: "object",
|
|
131816
|
-
required: ["handle"
|
|
132373
|
+
required: ["handle"],
|
|
131817
132374
|
properties: {
|
|
131818
132375
|
email: {
|
|
131819
132376
|
type: "string"
|
|
@@ -131834,6 +132391,236 @@ var schemaDict2 = {
|
|
|
131834
132391
|
},
|
|
131835
132392
|
recoveryKey: {
|
|
131836
132393
|
type: "string"
|
|
132394
|
+
},
|
|
132395
|
+
plcOp: {
|
|
132396
|
+
type: "unknown"
|
|
132397
|
+
}
|
|
132398
|
+
}
|
|
132399
|
+
}
|
|
132400
|
+
},
|
|
132401
|
+
output: {
|
|
132402
|
+
encoding: "application/json",
|
|
132403
|
+
schema: {
|
|
132404
|
+
type: "object",
|
|
132405
|
+
required: ["accessJwt", "refreshJwt", "handle", "did"],
|
|
132406
|
+
properties: {
|
|
132407
|
+
accessJwt: {
|
|
132408
|
+
type: "string"
|
|
132409
|
+
},
|
|
132410
|
+
refreshJwt: {
|
|
132411
|
+
type: "string"
|
|
132412
|
+
},
|
|
132413
|
+
handle: {
|
|
132414
|
+
type: "string",
|
|
132415
|
+
format: "handle"
|
|
132416
|
+
},
|
|
132417
|
+
did: {
|
|
132418
|
+
type: "string",
|
|
132419
|
+
format: "did"
|
|
132420
|
+
},
|
|
132421
|
+
didDoc: {
|
|
132422
|
+
type: "unknown"
|
|
132423
|
+
}
|
|
132424
|
+
}
|
|
132425
|
+
}
|
|
132426
|
+
},
|
|
132427
|
+
errors: [
|
|
132428
|
+
{
|
|
132429
|
+
name: "InvalidHandle"
|
|
132430
|
+
},
|
|
132431
|
+
{
|
|
132432
|
+
name: "InvalidPassword"
|
|
132433
|
+
},
|
|
132434
|
+
{
|
|
132435
|
+
name: "InvalidInviteCode"
|
|
132436
|
+
},
|
|
132437
|
+
{
|
|
132438
|
+
name: "HandleNotAvailable"
|
|
132439
|
+
},
|
|
132440
|
+
{
|
|
132441
|
+
name: "UnsupportedDomain"
|
|
132442
|
+
},
|
|
132443
|
+
{
|
|
132444
|
+
name: "UnresolvableDid"
|
|
132445
|
+
},
|
|
132446
|
+
{
|
|
132447
|
+
name: "IncompatibleDidDoc"
|
|
132448
|
+
}
|
|
132449
|
+
]
|
|
132450
|
+
}
|
|
132451
|
+
}
|
|
132452
|
+
},
|
|
132453
|
+
ComAtprotoServerCreateAppPassword: {
|
|
132454
|
+
lexicon: 1,
|
|
132455
|
+
id: "com.atproto.server.createAppPassword",
|
|
132456
|
+
defs: {
|
|
132457
|
+
main: {
|
|
132458
|
+
type: "procedure",
|
|
132459
|
+
description: "Create an app-specific password.",
|
|
132460
|
+
input: {
|
|
132461
|
+
encoding: "application/json",
|
|
132462
|
+
schema: {
|
|
132463
|
+
type: "object",
|
|
132464
|
+
required: ["name"],
|
|
132465
|
+
properties: {
|
|
132466
|
+
name: {
|
|
132467
|
+
type: "string"
|
|
132468
|
+
}
|
|
132469
|
+
}
|
|
132470
|
+
}
|
|
132471
|
+
},
|
|
132472
|
+
output: {
|
|
132473
|
+
encoding: "application/json",
|
|
132474
|
+
schema: {
|
|
132475
|
+
type: "ref",
|
|
132476
|
+
ref: "lex:com.atproto.server.createAppPassword#appPassword"
|
|
132477
|
+
}
|
|
132478
|
+
},
|
|
132479
|
+
errors: [
|
|
132480
|
+
{
|
|
132481
|
+
name: "AccountTakedown"
|
|
132482
|
+
}
|
|
132483
|
+
]
|
|
132484
|
+
},
|
|
132485
|
+
appPassword: {
|
|
132486
|
+
type: "object",
|
|
132487
|
+
required: ["name", "password", "createdAt"],
|
|
132488
|
+
properties: {
|
|
132489
|
+
name: {
|
|
132490
|
+
type: "string"
|
|
132491
|
+
},
|
|
132492
|
+
password: {
|
|
132493
|
+
type: "string"
|
|
132494
|
+
},
|
|
132495
|
+
createdAt: {
|
|
132496
|
+
type: "string",
|
|
132497
|
+
format: "datetime"
|
|
132498
|
+
}
|
|
132499
|
+
}
|
|
132500
|
+
}
|
|
132501
|
+
}
|
|
132502
|
+
},
|
|
132503
|
+
ComAtprotoServerCreateInviteCode: {
|
|
132504
|
+
lexicon: 1,
|
|
132505
|
+
id: "com.atproto.server.createInviteCode",
|
|
132506
|
+
defs: {
|
|
132507
|
+
main: {
|
|
132508
|
+
type: "procedure",
|
|
132509
|
+
description: "Create an invite code.",
|
|
132510
|
+
input: {
|
|
132511
|
+
encoding: "application/json",
|
|
132512
|
+
schema: {
|
|
132513
|
+
type: "object",
|
|
132514
|
+
required: ["useCount"],
|
|
132515
|
+
properties: {
|
|
132516
|
+
useCount: {
|
|
132517
|
+
type: "integer"
|
|
132518
|
+
},
|
|
132519
|
+
forAccount: {
|
|
132520
|
+
type: "string",
|
|
132521
|
+
format: "did"
|
|
132522
|
+
}
|
|
132523
|
+
}
|
|
132524
|
+
}
|
|
132525
|
+
},
|
|
132526
|
+
output: {
|
|
132527
|
+
encoding: "application/json",
|
|
132528
|
+
schema: {
|
|
132529
|
+
type: "object",
|
|
132530
|
+
required: ["code"],
|
|
132531
|
+
properties: {
|
|
132532
|
+
code: {
|
|
132533
|
+
type: "string"
|
|
132534
|
+
}
|
|
132535
|
+
}
|
|
132536
|
+
}
|
|
132537
|
+
}
|
|
132538
|
+
}
|
|
132539
|
+
}
|
|
132540
|
+
},
|
|
132541
|
+
ComAtprotoServerCreateInviteCodes: {
|
|
132542
|
+
lexicon: 1,
|
|
132543
|
+
id: "com.atproto.server.createInviteCodes",
|
|
132544
|
+
defs: {
|
|
132545
|
+
main: {
|
|
132546
|
+
type: "procedure",
|
|
132547
|
+
description: "Create an invite code.",
|
|
132548
|
+
input: {
|
|
132549
|
+
encoding: "application/json",
|
|
132550
|
+
schema: {
|
|
132551
|
+
type: "object",
|
|
132552
|
+
required: ["codeCount", "useCount"],
|
|
132553
|
+
properties: {
|
|
132554
|
+
codeCount: {
|
|
132555
|
+
type: "integer",
|
|
132556
|
+
default: 1
|
|
132557
|
+
},
|
|
132558
|
+
useCount: {
|
|
132559
|
+
type: "integer"
|
|
132560
|
+
},
|
|
132561
|
+
forAccounts: {
|
|
132562
|
+
type: "array",
|
|
132563
|
+
items: {
|
|
132564
|
+
type: "string",
|
|
132565
|
+
format: "did"
|
|
132566
|
+
}
|
|
132567
|
+
}
|
|
132568
|
+
}
|
|
132569
|
+
}
|
|
132570
|
+
},
|
|
132571
|
+
output: {
|
|
132572
|
+
encoding: "application/json",
|
|
132573
|
+
schema: {
|
|
132574
|
+
type: "object",
|
|
132575
|
+
required: ["codes"],
|
|
132576
|
+
properties: {
|
|
132577
|
+
codes: {
|
|
132578
|
+
type: "array",
|
|
132579
|
+
items: {
|
|
132580
|
+
type: "ref",
|
|
132581
|
+
ref: "lex:com.atproto.server.createInviteCodes#accountCodes"
|
|
132582
|
+
}
|
|
132583
|
+
}
|
|
132584
|
+
}
|
|
132585
|
+
}
|
|
132586
|
+
}
|
|
132587
|
+
},
|
|
132588
|
+
accountCodes: {
|
|
132589
|
+
type: "object",
|
|
132590
|
+
required: ["account", "codes"],
|
|
132591
|
+
properties: {
|
|
132592
|
+
account: {
|
|
132593
|
+
type: "string"
|
|
132594
|
+
},
|
|
132595
|
+
codes: {
|
|
132596
|
+
type: "array",
|
|
132597
|
+
items: {
|
|
132598
|
+
type: "string"
|
|
132599
|
+
}
|
|
132600
|
+
}
|
|
132601
|
+
}
|
|
132602
|
+
}
|
|
132603
|
+
}
|
|
132604
|
+
},
|
|
132605
|
+
ComAtprotoServerCreateSession: {
|
|
132606
|
+
lexicon: 1,
|
|
132607
|
+
id: "com.atproto.server.createSession",
|
|
132608
|
+
defs: {
|
|
132609
|
+
main: {
|
|
132610
|
+
type: "procedure",
|
|
132611
|
+
description: "Create an authentication session.",
|
|
132612
|
+
input: {
|
|
132613
|
+
encoding: "application/json",
|
|
132614
|
+
schema: {
|
|
132615
|
+
type: "object",
|
|
132616
|
+
required: ["identifier", "password"],
|
|
132617
|
+
properties: {
|
|
132618
|
+
identifier: {
|
|
132619
|
+
type: "string",
|
|
132620
|
+
description: "Handle or other identifier supported by the server for the authenticating user."
|
|
132621
|
+
},
|
|
132622
|
+
password: {
|
|
132623
|
+
type: "string"
|
|
131837
132624
|
}
|
|
131838
132625
|
}
|
|
131839
132626
|
}
|
|
@@ -131857,230 +132644,9 @@ var schemaDict2 = {
|
|
|
131857
132644
|
did: {
|
|
131858
132645
|
type: "string",
|
|
131859
132646
|
format: "did"
|
|
131860
|
-
}
|
|
131861
|
-
}
|
|
131862
|
-
}
|
|
131863
|
-
},
|
|
131864
|
-
errors: [
|
|
131865
|
-
{
|
|
131866
|
-
name: "InvalidHandle"
|
|
131867
|
-
},
|
|
131868
|
-
{
|
|
131869
|
-
name: "InvalidPassword"
|
|
131870
|
-
},
|
|
131871
|
-
{
|
|
131872
|
-
name: "InvalidInviteCode"
|
|
131873
|
-
},
|
|
131874
|
-
{
|
|
131875
|
-
name: "HandleNotAvailable"
|
|
131876
|
-
},
|
|
131877
|
-
{
|
|
131878
|
-
name: "UnsupportedDomain"
|
|
131879
|
-
},
|
|
131880
|
-
{
|
|
131881
|
-
name: "UnresolvableDid"
|
|
131882
|
-
},
|
|
131883
|
-
{
|
|
131884
|
-
name: "IncompatibleDidDoc"
|
|
131885
|
-
}
|
|
131886
|
-
]
|
|
131887
|
-
}
|
|
131888
|
-
}
|
|
131889
|
-
},
|
|
131890
|
-
ComAtprotoServerCreateAppPassword: {
|
|
131891
|
-
lexicon: 1,
|
|
131892
|
-
id: "com.atproto.server.createAppPassword",
|
|
131893
|
-
defs: {
|
|
131894
|
-
main: {
|
|
131895
|
-
type: "procedure",
|
|
131896
|
-
description: "Create an app-specific password.",
|
|
131897
|
-
input: {
|
|
131898
|
-
encoding: "application/json",
|
|
131899
|
-
schema: {
|
|
131900
|
-
type: "object",
|
|
131901
|
-
required: ["name"],
|
|
131902
|
-
properties: {
|
|
131903
|
-
name: {
|
|
131904
|
-
type: "string"
|
|
131905
|
-
}
|
|
131906
|
-
}
|
|
131907
|
-
}
|
|
131908
|
-
},
|
|
131909
|
-
output: {
|
|
131910
|
-
encoding: "application/json",
|
|
131911
|
-
schema: {
|
|
131912
|
-
type: "ref",
|
|
131913
|
-
ref: "lex:com.atproto.server.createAppPassword#appPassword"
|
|
131914
|
-
}
|
|
131915
|
-
},
|
|
131916
|
-
errors: [
|
|
131917
|
-
{
|
|
131918
|
-
name: "AccountTakedown"
|
|
131919
|
-
}
|
|
131920
|
-
]
|
|
131921
|
-
},
|
|
131922
|
-
appPassword: {
|
|
131923
|
-
type: "object",
|
|
131924
|
-
required: ["name", "password", "createdAt"],
|
|
131925
|
-
properties: {
|
|
131926
|
-
name: {
|
|
131927
|
-
type: "string"
|
|
131928
|
-
},
|
|
131929
|
-
password: {
|
|
131930
|
-
type: "string"
|
|
131931
|
-
},
|
|
131932
|
-
createdAt: {
|
|
131933
|
-
type: "string",
|
|
131934
|
-
format: "datetime"
|
|
131935
|
-
}
|
|
131936
|
-
}
|
|
131937
|
-
}
|
|
131938
|
-
}
|
|
131939
|
-
},
|
|
131940
|
-
ComAtprotoServerCreateInviteCode: {
|
|
131941
|
-
lexicon: 1,
|
|
131942
|
-
id: "com.atproto.server.createInviteCode",
|
|
131943
|
-
defs: {
|
|
131944
|
-
main: {
|
|
131945
|
-
type: "procedure",
|
|
131946
|
-
description: "Create an invite code.",
|
|
131947
|
-
input: {
|
|
131948
|
-
encoding: "application/json",
|
|
131949
|
-
schema: {
|
|
131950
|
-
type: "object",
|
|
131951
|
-
required: ["useCount"],
|
|
131952
|
-
properties: {
|
|
131953
|
-
useCount: {
|
|
131954
|
-
type: "integer"
|
|
131955
|
-
},
|
|
131956
|
-
forAccount: {
|
|
131957
|
-
type: "string",
|
|
131958
|
-
format: "did"
|
|
131959
|
-
}
|
|
131960
|
-
}
|
|
131961
|
-
}
|
|
131962
|
-
},
|
|
131963
|
-
output: {
|
|
131964
|
-
encoding: "application/json",
|
|
131965
|
-
schema: {
|
|
131966
|
-
type: "object",
|
|
131967
|
-
required: ["code"],
|
|
131968
|
-
properties: {
|
|
131969
|
-
code: {
|
|
131970
|
-
type: "string"
|
|
131971
|
-
}
|
|
131972
|
-
}
|
|
131973
|
-
}
|
|
131974
|
-
}
|
|
131975
|
-
}
|
|
131976
|
-
}
|
|
131977
|
-
},
|
|
131978
|
-
ComAtprotoServerCreateInviteCodes: {
|
|
131979
|
-
lexicon: 1,
|
|
131980
|
-
id: "com.atproto.server.createInviteCodes",
|
|
131981
|
-
defs: {
|
|
131982
|
-
main: {
|
|
131983
|
-
type: "procedure",
|
|
131984
|
-
description: "Create an invite code.",
|
|
131985
|
-
input: {
|
|
131986
|
-
encoding: "application/json",
|
|
131987
|
-
schema: {
|
|
131988
|
-
type: "object",
|
|
131989
|
-
required: ["codeCount", "useCount"],
|
|
131990
|
-
properties: {
|
|
131991
|
-
codeCount: {
|
|
131992
|
-
type: "integer",
|
|
131993
|
-
default: 1
|
|
131994
132647
|
},
|
|
131995
|
-
|
|
131996
|
-
type: "
|
|
131997
|
-
},
|
|
131998
|
-
forAccounts: {
|
|
131999
|
-
type: "array",
|
|
132000
|
-
items: {
|
|
132001
|
-
type: "string",
|
|
132002
|
-
format: "did"
|
|
132003
|
-
}
|
|
132004
|
-
}
|
|
132005
|
-
}
|
|
132006
|
-
}
|
|
132007
|
-
},
|
|
132008
|
-
output: {
|
|
132009
|
-
encoding: "application/json",
|
|
132010
|
-
schema: {
|
|
132011
|
-
type: "object",
|
|
132012
|
-
required: ["codes"],
|
|
132013
|
-
properties: {
|
|
132014
|
-
codes: {
|
|
132015
|
-
type: "array",
|
|
132016
|
-
items: {
|
|
132017
|
-
type: "ref",
|
|
132018
|
-
ref: "lex:com.atproto.server.createInviteCodes#accountCodes"
|
|
132019
|
-
}
|
|
132020
|
-
}
|
|
132021
|
-
}
|
|
132022
|
-
}
|
|
132023
|
-
}
|
|
132024
|
-
},
|
|
132025
|
-
accountCodes: {
|
|
132026
|
-
type: "object",
|
|
132027
|
-
required: ["account", "codes"],
|
|
132028
|
-
properties: {
|
|
132029
|
-
account: {
|
|
132030
|
-
type: "string"
|
|
132031
|
-
},
|
|
132032
|
-
codes: {
|
|
132033
|
-
type: "array",
|
|
132034
|
-
items: {
|
|
132035
|
-
type: "string"
|
|
132036
|
-
}
|
|
132037
|
-
}
|
|
132038
|
-
}
|
|
132039
|
-
}
|
|
132040
|
-
}
|
|
132041
|
-
},
|
|
132042
|
-
ComAtprotoServerCreateSession: {
|
|
132043
|
-
lexicon: 1,
|
|
132044
|
-
id: "com.atproto.server.createSession",
|
|
132045
|
-
defs: {
|
|
132046
|
-
main: {
|
|
132047
|
-
type: "procedure",
|
|
132048
|
-
description: "Create an authentication session.",
|
|
132049
|
-
input: {
|
|
132050
|
-
encoding: "application/json",
|
|
132051
|
-
schema: {
|
|
132052
|
-
type: "object",
|
|
132053
|
-
required: ["identifier", "password"],
|
|
132054
|
-
properties: {
|
|
132055
|
-
identifier: {
|
|
132056
|
-
type: "string",
|
|
132057
|
-
description: "Handle or other identifier supported by the server for the authenticating user."
|
|
132058
|
-
},
|
|
132059
|
-
password: {
|
|
132060
|
-
type: "string"
|
|
132061
|
-
}
|
|
132062
|
-
}
|
|
132063
|
-
}
|
|
132064
|
-
},
|
|
132065
|
-
output: {
|
|
132066
|
-
encoding: "application/json",
|
|
132067
|
-
schema: {
|
|
132068
|
-
type: "object",
|
|
132069
|
-
required: ["accessJwt", "refreshJwt", "handle", "did"],
|
|
132070
|
-
properties: {
|
|
132071
|
-
accessJwt: {
|
|
132072
|
-
type: "string"
|
|
132073
|
-
},
|
|
132074
|
-
refreshJwt: {
|
|
132075
|
-
type: "string"
|
|
132076
|
-
},
|
|
132077
|
-
handle: {
|
|
132078
|
-
type: "string",
|
|
132079
|
-
format: "handle"
|
|
132080
|
-
},
|
|
132081
|
-
did: {
|
|
132082
|
-
type: "string",
|
|
132083
|
-
format: "did"
|
|
132648
|
+
didDoc: {
|
|
132649
|
+
type: "unknown"
|
|
132084
132650
|
},
|
|
132085
132651
|
email: {
|
|
132086
132652
|
type: "string"
|
|
@@ -132396,6 +132962,9 @@ var schemaDict2 = {
|
|
|
132396
132962
|
did: {
|
|
132397
132963
|
type: "string",
|
|
132398
132964
|
format: "did"
|
|
132965
|
+
},
|
|
132966
|
+
didDoc: {
|
|
132967
|
+
type: "unknown"
|
|
132399
132968
|
}
|
|
132400
132969
|
}
|
|
132401
132970
|
}
|
|
@@ -132472,6 +133041,41 @@ var schemaDict2 = {
|
|
|
132472
133041
|
}
|
|
132473
133042
|
}
|
|
132474
133043
|
},
|
|
133044
|
+
ComAtprotoServerReserveSigningKey: {
|
|
133045
|
+
lexicon: 1,
|
|
133046
|
+
id: "com.atproto.server.reserveSigningKey",
|
|
133047
|
+
defs: {
|
|
133048
|
+
main: {
|
|
133049
|
+
type: "procedure",
|
|
133050
|
+
description: "Reserve a repo signing key for account creation.",
|
|
133051
|
+
input: {
|
|
133052
|
+
encoding: "application/json",
|
|
133053
|
+
schema: {
|
|
133054
|
+
type: "object",
|
|
133055
|
+
properties: {
|
|
133056
|
+
did: {
|
|
133057
|
+
type: "string",
|
|
133058
|
+
description: "The did to reserve a new did:key for"
|
|
133059
|
+
}
|
|
133060
|
+
}
|
|
133061
|
+
}
|
|
133062
|
+
},
|
|
133063
|
+
output: {
|
|
133064
|
+
encoding: "application/json",
|
|
133065
|
+
schema: {
|
|
133066
|
+
type: "object",
|
|
133067
|
+
required: ["signingKey"],
|
|
133068
|
+
properties: {
|
|
133069
|
+
signingKey: {
|
|
133070
|
+
type: "string",
|
|
133071
|
+
description: "Public signing key in the form of a did:key."
|
|
133072
|
+
}
|
|
133073
|
+
}
|
|
133074
|
+
}
|
|
133075
|
+
}
|
|
133076
|
+
}
|
|
133077
|
+
}
|
|
133078
|
+
},
|
|
132475
133079
|
ComAtprotoServerResetPassword: {
|
|
132476
133080
|
lexicon: 1,
|
|
132477
133081
|
id: "com.atproto.server.resetPassword",
|
|
@@ -132889,7 +133493,7 @@ var schemaDict2 = {
|
|
|
132889
133493
|
},
|
|
132890
133494
|
repo: {
|
|
132891
133495
|
type: "object",
|
|
132892
|
-
required: ["did", "head"],
|
|
133496
|
+
required: ["did", "head", "rev"],
|
|
132893
133497
|
properties: {
|
|
132894
133498
|
did: {
|
|
132895
133499
|
type: "string",
|
|
@@ -132898,6 +133502,9 @@ var schemaDict2 = {
|
|
|
132898
133502
|
head: {
|
|
132899
133503
|
type: "string",
|
|
132900
133504
|
format: "cid"
|
|
133505
|
+
},
|
|
133506
|
+
rev: {
|
|
133507
|
+
type: "string"
|
|
132901
133508
|
}
|
|
132902
133509
|
}
|
|
132903
133510
|
}
|
|
@@ -133298,6 +133905,10 @@ var schemaDict2 = {
|
|
|
133298
133905
|
type: "string",
|
|
133299
133906
|
format: "at-uri"
|
|
133300
133907
|
},
|
|
133908
|
+
blockingByList: {
|
|
133909
|
+
type: "ref",
|
|
133910
|
+
ref: "lex:app.bsky.graph.defs#listViewBasic"
|
|
133911
|
+
},
|
|
133301
133912
|
following: {
|
|
133302
133913
|
type: "string",
|
|
133303
133914
|
format: "at-uri"
|
|
@@ -136805,6 +137416,7 @@ var ids = {
|
|
|
136805
137416
|
ComAtprotoAdminDisableAccountInvites: "com.atproto.admin.disableAccountInvites",
|
|
136806
137417
|
ComAtprotoAdminDisableInviteCodes: "com.atproto.admin.disableInviteCodes",
|
|
136807
137418
|
ComAtprotoAdminEnableAccountInvites: "com.atproto.admin.enableAccountInvites",
|
|
137419
|
+
ComAtprotoAdminGetAccountInfo: "com.atproto.admin.getAccountInfo",
|
|
136808
137420
|
ComAtprotoAdminGetInviteCodes: "com.atproto.admin.getInviteCodes",
|
|
136809
137421
|
ComAtprotoAdminGetModerationAction: "com.atproto.admin.getModerationAction",
|
|
136810
137422
|
ComAtprotoAdminGetModerationActions: "com.atproto.admin.getModerationActions",
|
|
@@ -136812,6 +137424,7 @@ var ids = {
|
|
|
136812
137424
|
ComAtprotoAdminGetModerationReports: "com.atproto.admin.getModerationReports",
|
|
136813
137425
|
ComAtprotoAdminGetRecord: "com.atproto.admin.getRecord",
|
|
136814
137426
|
ComAtprotoAdminGetRepo: "com.atproto.admin.getRepo",
|
|
137427
|
+
ComAtprotoAdminGetSubjectStatus: "com.atproto.admin.getSubjectStatus",
|
|
136815
137428
|
ComAtprotoAdminResolveModerationReports: "com.atproto.admin.resolveModerationReports",
|
|
136816
137429
|
ComAtprotoAdminReverseModerationAction: "com.atproto.admin.reverseModerationAction",
|
|
136817
137430
|
ComAtprotoAdminSearchRepos: "com.atproto.admin.searchRepos",
|
|
@@ -136819,6 +137432,7 @@ var ids = {
|
|
|
136819
137432
|
ComAtprotoAdminTakeModerationAction: "com.atproto.admin.takeModerationAction",
|
|
136820
137433
|
ComAtprotoAdminUpdateAccountEmail: "com.atproto.admin.updateAccountEmail",
|
|
136821
137434
|
ComAtprotoAdminUpdateAccountHandle: "com.atproto.admin.updateAccountHandle",
|
|
137435
|
+
ComAtprotoAdminUpdateSubjectStatus: "com.atproto.admin.updateSubjectStatus",
|
|
136822
137436
|
ComAtprotoIdentityResolveHandle: "com.atproto.identity.resolveHandle",
|
|
136823
137437
|
ComAtprotoIdentityUpdateHandle: "com.atproto.identity.updateHandle",
|
|
136824
137438
|
ComAtprotoLabelDefs: "com.atproto.label.defs",
|
|
@@ -136853,6 +137467,7 @@ var ids = {
|
|
|
136853
137467
|
ComAtprotoServerRequestEmailConfirmation: "com.atproto.server.requestEmailConfirmation",
|
|
136854
137468
|
ComAtprotoServerRequestEmailUpdate: "com.atproto.server.requestEmailUpdate",
|
|
136855
137469
|
ComAtprotoServerRequestPasswordReset: "com.atproto.server.requestPasswordReset",
|
|
137470
|
+
ComAtprotoServerReserveSigningKey: "com.atproto.server.reserveSigningKey",
|
|
136856
137471
|
ComAtprotoServerResetPassword: "com.atproto.server.resetPassword",
|
|
136857
137472
|
ComAtprotoServerRevokeAppPassword: "com.atproto.server.revokeAppPassword",
|
|
136858
137473
|
ComAtprotoServerUpdateEmail: "com.atproto.server.updateEmail",
|
|
@@ -137057,9 +137672,9 @@ var threadgateToPostUri = (gateUri) => {
|
|
|
137057
137672
|
function getPostThread_default(server, ctx) {
|
|
137058
137673
|
const getPostThread = createPipeline(skeleton7, hydration7, noRules, presentation7);
|
|
137059
137674
|
server.app.bsky.feed.getPostThread({
|
|
137060
|
-
auth: ctx.
|
|
137675
|
+
auth: ctx.authOptionalAccessOrRoleVerifier,
|
|
137061
137676
|
handler: async ({ params: params2, auth, res }) => {
|
|
137062
|
-
const viewer = auth.credentials.did;
|
|
137677
|
+
const viewer = "did" in auth.credentials ? auth.credentials.did : null;
|
|
137063
137678
|
const db = ctx.db.getReplica("thread");
|
|
137064
137679
|
const feedService = ctx.services.feed(db);
|
|
137065
137680
|
const actorService = ctx.services.actor(db);
|
|
@@ -138468,23 +139083,20 @@ var skeleton18 = async (params2, ctx) => {
|
|
|
138468
139083
|
if (params2.seenAt) {
|
|
138469
139084
|
throw new InvalidRequestError("The seenAt parameter is unsupported");
|
|
138470
139085
|
}
|
|
138471
|
-
let notifBuilder = db.db.selectFrom("notification as notif").
|
|
139086
|
+
let notifBuilder = db.db.selectFrom("notification as notif").where("notif.did", "=", viewer).where((clause) => clause.where("reasonSubject", "is", null).orWhereExists(db.db.selectFrom("record as subject").selectAll().whereRef("subject.uri", "=", ref("notif.reasonSubject")))).select([
|
|
139087
|
+
"notif.author as authorDid",
|
|
138472
139088
|
"notif.recordUri as uri",
|
|
138473
139089
|
"notif.recordCid as cid",
|
|
138474
|
-
"author.did as authorDid",
|
|
138475
|
-
"author.handle as authorHandle",
|
|
138476
|
-
"author.indexedAt as authorIndexedAt",
|
|
138477
|
-
"author.takedownId as authorTakedownId",
|
|
138478
139090
|
"notif.reason as reason",
|
|
138479
139091
|
"notif.reasonSubject as reasonSubject",
|
|
138480
|
-
"notif.sortAt as indexedAt"
|
|
138481
|
-
"record.json as recordJson"
|
|
139092
|
+
"notif.sortAt as indexedAt"
|
|
138482
139093
|
]);
|
|
138483
139094
|
const keyset = new NotifsKeyset(ref("notif.sortAt"), ref("notif.recordCid"));
|
|
138484
139095
|
notifBuilder = paginate(notifBuilder, {
|
|
138485
139096
|
cursor,
|
|
138486
139097
|
limit,
|
|
138487
|
-
keyset
|
|
139098
|
+
keyset,
|
|
139099
|
+
tryIndex: true
|
|
138488
139100
|
});
|
|
138489
139101
|
const actorStateQuery = db.db.selectFrom("actor_state").selectAll().where("did", "=", viewer);
|
|
138490
139102
|
const [notifs, actorState] = await Promise.all([
|
|
@@ -138499,17 +139111,18 @@ var skeleton18 = async (params2, ctx) => {
|
|
|
138499
139111
|
};
|
|
138500
139112
|
};
|
|
138501
139113
|
var hydration18 = async (state, ctx) => {
|
|
138502
|
-
const { graphService, actorService, labelService } = ctx;
|
|
139114
|
+
const { graphService, actorService, labelService, db } = ctx;
|
|
138503
139115
|
const { params: params2, notifs } = state;
|
|
138504
139116
|
const { viewer } = params2;
|
|
138505
139117
|
const dids = notifs.map((notif) => notif.authorDid);
|
|
138506
139118
|
const uris = notifs.map((notif) => notif.uri);
|
|
138507
|
-
const [actors, labels, bam] = await Promise.all([
|
|
139119
|
+
const [actors, records, labels, bam] = await Promise.all([
|
|
138508
139120
|
actorService.views.profiles(dids, viewer),
|
|
139121
|
+
getRecordMap(db, uris),
|
|
138509
139122
|
labelService.getLabelsForUris(uris),
|
|
138510
139123
|
graphService.getBlockAndMuteState(dids.map((did2) => [viewer, did2]))
|
|
138511
139124
|
]);
|
|
138512
|
-
return { ...state, actors, labels, bam };
|
|
139125
|
+
return { ...state, actors, records, labels, bam };
|
|
138513
139126
|
};
|
|
138514
139127
|
var noBlockOrMutes = (state) => {
|
|
138515
139128
|
const { viewer } = state.params;
|
|
@@ -138517,12 +139130,12 @@ var noBlockOrMutes = (state) => {
|
|
|
138517
139130
|
return state;
|
|
138518
139131
|
};
|
|
138519
139132
|
var presentation18 = (state) => {
|
|
138520
|
-
const { notifs, cursor, actors, labels, lastSeenNotifs } = state;
|
|
139133
|
+
const { notifs, cursor, actors, records, labels, lastSeenNotifs } = state;
|
|
138521
139134
|
const notifications = mapDefined(notifs, (notif) => {
|
|
138522
139135
|
const author = actors[notif.authorDid];
|
|
138523
|
-
|
|
139136
|
+
const record = records[notif.uri];
|
|
139137
|
+
if (!author || !record)
|
|
138524
139138
|
return void 0;
|
|
138525
|
-
const record = jsonStringToLex(notif.recordJson);
|
|
138526
139139
|
const recordLabels = labels[notif.uri] ?? [];
|
|
138527
139140
|
const recordSelfLabels = getSelfLabels({
|
|
138528
139141
|
uri: notif.uri,
|
|
@@ -138543,6 +139156,16 @@ var presentation18 = (state) => {
|
|
|
138543
139156
|
});
|
|
138544
139157
|
return { notifications, cursor };
|
|
138545
139158
|
};
|
|
139159
|
+
var getRecordMap = async (db, uris) => {
|
|
139160
|
+
if (!uris.length)
|
|
139161
|
+
return {};
|
|
139162
|
+
const { ref } = db.db.dynamic;
|
|
139163
|
+
const recordRows = await db.db.selectFrom("record").select(["uri", "json"]).where("uri", "in", uris).where(notSoftDeletedClause(ref("record"))).execute();
|
|
139164
|
+
return recordRows.reduce((acc, { uri: uri2, json }) => {
|
|
139165
|
+
acc[uri2] = jsonStringToLex(json);
|
|
139166
|
+
return acc;
|
|
139167
|
+
}, {});
|
|
139168
|
+
};
|
|
138546
139169
|
var NotifsKeyset = class extends TimeCidKeyset {
|
|
138547
139170
|
labelResult(result) {
|
|
138548
139171
|
return { primary: result.indexedAt, secondary: result.cid };
|
|
@@ -138685,6 +139308,12 @@ var TAKEDOWN = "com.atproto.admin.defs#takedown";
|
|
|
138685
139308
|
var FLAG = "com.atproto.admin.defs#flag";
|
|
138686
139309
|
var ACKNOWLEDGE = "com.atproto.admin.defs#acknowledge";
|
|
138687
139310
|
var ESCALATE = "com.atproto.admin.defs#escalate";
|
|
139311
|
+
function isRepoView(v) {
|
|
139312
|
+
return isObj3(v) && hasProp3(v, "$type") && v.$type === "com.atproto.admin.defs#repoView";
|
|
139313
|
+
}
|
|
139314
|
+
function isRecordView(v) {
|
|
139315
|
+
return isObj3(v) && hasProp3(v, "$type") && v.$type === "com.atproto.admin.defs#recordView";
|
|
139316
|
+
}
|
|
138688
139317
|
|
|
138689
139318
|
// src/lexicon/types/com/atproto/moderation/defs.ts
|
|
138690
139319
|
var REASONSPAM = "com.atproto.moderation.defs#reasonSpam";
|
|
@@ -138778,6 +139407,67 @@ function resolveModerationReports_default(server, ctx) {
|
|
|
138778
139407
|
});
|
|
138779
139408
|
}
|
|
138780
139409
|
|
|
139410
|
+
// src/util/retry.ts
|
|
139411
|
+
var import_axios3 = __toESM(require_axios2());
|
|
139412
|
+
async function retry(fn, opts = {}) {
|
|
139413
|
+
const { max = 3, retryable = () => true } = opts;
|
|
139414
|
+
let retries = 0;
|
|
139415
|
+
let doneError;
|
|
139416
|
+
while (!doneError) {
|
|
139417
|
+
try {
|
|
139418
|
+
if (retries)
|
|
139419
|
+
await backoff(retries);
|
|
139420
|
+
return await fn();
|
|
139421
|
+
} catch (err) {
|
|
139422
|
+
const willRetry = retries < max && retryable(err);
|
|
139423
|
+
if (!willRetry)
|
|
139424
|
+
doneError = err;
|
|
139425
|
+
retries += 1;
|
|
139426
|
+
}
|
|
139427
|
+
}
|
|
139428
|
+
throw doneError;
|
|
139429
|
+
}
|
|
139430
|
+
async function retryHttp(fn, opts = {}) {
|
|
139431
|
+
return retry(fn, { retryable: retryableHttp, ...opts });
|
|
139432
|
+
}
|
|
139433
|
+
function retryableHttp(err) {
|
|
139434
|
+
if (err instanceof XRPCError) {
|
|
139435
|
+
if (err.status === 1 /* Unknown */)
|
|
139436
|
+
return true;
|
|
139437
|
+
return retryableHttpStatusCodes.has(err.status);
|
|
139438
|
+
}
|
|
139439
|
+
if (err instanceof import_axios3.AxiosError) {
|
|
139440
|
+
if (!err.response)
|
|
139441
|
+
return true;
|
|
139442
|
+
return retryableHttpStatusCodes.has(err.response.status);
|
|
139443
|
+
}
|
|
139444
|
+
return false;
|
|
139445
|
+
}
|
|
139446
|
+
var retryableHttpStatusCodes = /* @__PURE__ */ new Set([
|
|
139447
|
+
408,
|
|
139448
|
+
425,
|
|
139449
|
+
429,
|
|
139450
|
+
500,
|
|
139451
|
+
502,
|
|
139452
|
+
503,
|
|
139453
|
+
504,
|
|
139454
|
+
522,
|
|
139455
|
+
524
|
|
139456
|
+
]);
|
|
139457
|
+
async function backoff(n, multiplier = 50, max = 1e3) {
|
|
139458
|
+
const exponentialMs = Math.pow(2, n) * multiplier;
|
|
139459
|
+
const ms = Math.min(exponentialMs, max);
|
|
139460
|
+
await wait(jitter2(ms));
|
|
139461
|
+
}
|
|
139462
|
+
function jitter2(value) {
|
|
139463
|
+
const delta = value * 0.15;
|
|
139464
|
+
return value + randomRange(-delta, delta);
|
|
139465
|
+
}
|
|
139466
|
+
function randomRange(from3, to) {
|
|
139467
|
+
const rand = Math.random() * (to - from3);
|
|
139468
|
+
return rand + from3;
|
|
139469
|
+
}
|
|
139470
|
+
|
|
138781
139471
|
// src/api/com/atproto/admin/reverseModerationAction.ts
|
|
138782
139472
|
function reverseModerationAction_default(server, ctx) {
|
|
138783
139473
|
server.com.atproto.admin.reverseModerationAction({
|
|
@@ -138787,7 +139477,7 @@ function reverseModerationAction_default(server, ctx) {
|
|
|
138787
139477
|
const db = ctx.db.getPrimary();
|
|
138788
139478
|
const moderationService = ctx.services.moderation(db);
|
|
138789
139479
|
const { id, createdBy, reason } = input.body;
|
|
138790
|
-
const
|
|
139480
|
+
const { result, restored } = await db.transaction(async (dbTxn) => {
|
|
138791
139481
|
const moderationTxn = ctx.services.moderation(dbTxn);
|
|
138792
139482
|
const labelTxn = ctx.services.label(dbTxn);
|
|
138793
139483
|
const now = new Date();
|
|
@@ -138804,21 +139494,35 @@ function reverseModerationAction_default(server, ctx) {
|
|
|
138804
139494
|
if (!access.moderator && existing.action === TAKEDOWN && existing.subjectType === "com.atproto.admin.defs#repoRef") {
|
|
138805
139495
|
throw new AuthRequiredError("Must be a full moderator to reverse an account takedown");
|
|
138806
139496
|
}
|
|
138807
|
-
const result = await moderationTxn.revertAction({
|
|
139497
|
+
const { result: result2, restored: restored2 } = await moderationTxn.revertAction({
|
|
138808
139498
|
id,
|
|
138809
139499
|
createdAt: now,
|
|
138810
139500
|
createdBy,
|
|
138811
139501
|
reason
|
|
138812
139502
|
});
|
|
138813
|
-
const { createLabelVals, negateLabelVals } =
|
|
139503
|
+
const { createLabelVals, negateLabelVals } = result2;
|
|
138814
139504
|
const negate = createLabelVals && createLabelVals.length > 0 ? createLabelVals.split(" ") : void 0;
|
|
138815
139505
|
const create3 = negateLabelVals && negateLabelVals.length > 0 ? negateLabelVals.split(" ") : void 0;
|
|
138816
|
-
await labelTxn.formatAndCreate(ctx.cfg.labelerDid,
|
|
138817
|
-
return result;
|
|
139506
|
+
await labelTxn.formatAndCreate(ctx.cfg.labelerDid, result2.subjectUri ?? result2.subjectDid, result2.subjectCid, { create: create3, negate });
|
|
139507
|
+
return { result: result2, restored: restored2 };
|
|
138818
139508
|
});
|
|
139509
|
+
if (restored) {
|
|
139510
|
+
const { did: did2, subjects } = restored;
|
|
139511
|
+
const agent = await ctx.pdsAdminAgent(did2);
|
|
139512
|
+
const results = await Promise.allSettled(subjects.map((subject) => retryHttp(() => agent.api.com.atproto.admin.updateSubjectStatus({
|
|
139513
|
+
subject,
|
|
139514
|
+
takedown: {
|
|
139515
|
+
applied: false
|
|
139516
|
+
}
|
|
139517
|
+
}))));
|
|
139518
|
+
const hadFailure = results.some((r) => r.status === "rejected");
|
|
139519
|
+
if (hadFailure) {
|
|
139520
|
+
throw new UpstreamFailureError("failed to revert action on PDS");
|
|
139521
|
+
}
|
|
139522
|
+
}
|
|
138819
139523
|
return {
|
|
138820
139524
|
encoding: "application/json",
|
|
138821
|
-
body: await moderationService.views.action(
|
|
139525
|
+
body: await moderationService.views.action(result)
|
|
138822
139526
|
};
|
|
138823
139527
|
}
|
|
138824
139528
|
});
|
|
@@ -138852,10 +139556,10 @@ function takeModerationAction_default(server, ctx) {
|
|
|
138852
139556
|
throw new AuthRequiredError("Must be a full moderator to label content");
|
|
138853
139557
|
}
|
|
138854
139558
|
validateLabels([...createLabelVals ?? [], ...negateLabelVals ?? []]);
|
|
138855
|
-
const
|
|
139559
|
+
const { result, takenDown } = await db.transaction(async (dbTxn) => {
|
|
138856
139560
|
const moderationTxn = ctx.services.moderation(dbTxn);
|
|
138857
139561
|
const labelTxn = ctx.services.label(dbTxn);
|
|
138858
|
-
const
|
|
139562
|
+
const result2 = await moderationTxn.logAction({
|
|
138859
139563
|
action: getAction(action),
|
|
138860
139564
|
subject: getSubject(subject),
|
|
138861
139565
|
subjectBlobCids: subjectBlobCids?.map((cid2) => CID.parse(cid2)) ?? [],
|
|
@@ -138865,25 +139569,44 @@ function takeModerationAction_default(server, ctx) {
|
|
|
138865
139569
|
reason,
|
|
138866
139570
|
durationInHours
|
|
138867
139571
|
});
|
|
138868
|
-
|
|
138869
|
-
|
|
138870
|
-
|
|
138871
|
-
|
|
139572
|
+
let takenDown2;
|
|
139573
|
+
if (result2.action === TAKEDOWN && result2.subjectType === "com.atproto.admin.defs#repoRef" && result2.subjectDid) {
|
|
139574
|
+
takenDown2 = await moderationTxn.takedownRepo({
|
|
139575
|
+
takedownId: result2.id,
|
|
139576
|
+
did: result2.subjectDid
|
|
138872
139577
|
});
|
|
138873
139578
|
}
|
|
138874
|
-
if (
|
|
138875
|
-
await moderationTxn.takedownRecord({
|
|
138876
|
-
takedownId:
|
|
138877
|
-
uri: new AtUri(
|
|
139579
|
+
if (result2.action === TAKEDOWN && result2.subjectType === "com.atproto.repo.strongRef" && result2.subjectUri && result2.subjectCid) {
|
|
139580
|
+
takenDown2 = await moderationTxn.takedownRecord({
|
|
139581
|
+
takedownId: result2.id,
|
|
139582
|
+
uri: new AtUri(result2.subjectUri),
|
|
139583
|
+
cid: CID.parse(result2.subjectCid),
|
|
138878
139584
|
blobCids: subjectBlobCids?.map((cid2) => CID.parse(cid2)) ?? []
|
|
138879
139585
|
});
|
|
138880
139586
|
}
|
|
138881
|
-
await labelTxn.formatAndCreate(ctx.cfg.labelerDid,
|
|
138882
|
-
return result;
|
|
139587
|
+
await labelTxn.formatAndCreate(ctx.cfg.labelerDid, result2.subjectUri ?? result2.subjectDid, result2.subjectCid, { create: createLabelVals, negate: negateLabelVals });
|
|
139588
|
+
return { result: result2, takenDown: takenDown2 };
|
|
138883
139589
|
});
|
|
139590
|
+
if (takenDown) {
|
|
139591
|
+
const { did: did2, subjects } = takenDown;
|
|
139592
|
+
if (did2 && subjects.length > 0) {
|
|
139593
|
+
const agent = await ctx.pdsAdminAgent(did2);
|
|
139594
|
+
const results = await Promise.allSettled(subjects.map((subject2) => retryHttp(() => agent.api.com.atproto.admin.updateSubjectStatus({
|
|
139595
|
+
subject: subject2,
|
|
139596
|
+
takedown: {
|
|
139597
|
+
applied: true,
|
|
139598
|
+
ref: result.id.toString()
|
|
139599
|
+
}
|
|
139600
|
+
}))));
|
|
139601
|
+
const hadFailure = results.some((r) => r.status === "rejected");
|
|
139602
|
+
if (hadFailure) {
|
|
139603
|
+
throw new UpstreamFailureError("failed to apply action on PDS");
|
|
139604
|
+
}
|
|
139605
|
+
}
|
|
139606
|
+
}
|
|
138884
139607
|
return {
|
|
138885
139608
|
encoding: "application/json",
|
|
138886
|
-
body: await moderationService.views.action(
|
|
139609
|
+
body: await moderationService.views.action(result)
|
|
138887
139610
|
};
|
|
138888
139611
|
}
|
|
138889
139612
|
});
|
|
@@ -138906,10 +139629,7 @@ function searchRepos_default(server, ctx) {
|
|
|
138906
139629
|
handler: async ({ params: params2 }) => {
|
|
138907
139630
|
const db = ctx.db.getPrimary();
|
|
138908
139631
|
const moderationService = ctx.services.moderation(db);
|
|
138909
|
-
const {
|
|
138910
|
-
if (invitedBy) {
|
|
138911
|
-
throw new InvalidRequestError("The invitedBy parameter is unsupported");
|
|
138912
|
-
}
|
|
139632
|
+
const { limit, cursor } = params2;
|
|
138913
139633
|
const query = params2.q ?? params2.term;
|
|
138914
139634
|
const { results, cursor: resCursor } = await ctx.services.actor(db).getSearchResults({ query, limit, cursor, includeSoftDeleted: true });
|
|
138915
139635
|
return {
|
|
@@ -138923,20 +139643,59 @@ function searchRepos_default(server, ctx) {
|
|
|
138923
139643
|
});
|
|
138924
139644
|
}
|
|
138925
139645
|
|
|
139646
|
+
// src/api/com/atproto/admin/util.ts
|
|
139647
|
+
var getPdsAccountInfo = async (ctx, did2) => {
|
|
139648
|
+
try {
|
|
139649
|
+
const agent = await ctx.pdsAdminAgent(did2);
|
|
139650
|
+
const res = await agent.api.com.atproto.admin.getAccountInfo({ did: did2 });
|
|
139651
|
+
return res.data;
|
|
139652
|
+
} catch (err) {
|
|
139653
|
+
return null;
|
|
139654
|
+
}
|
|
139655
|
+
};
|
|
139656
|
+
var addAccountInfoToRepoViewDetail = (repoView, accountInfo, includeEmail = false) => {
|
|
139657
|
+
if (!accountInfo)
|
|
139658
|
+
return repoView;
|
|
139659
|
+
return {
|
|
139660
|
+
...repoView,
|
|
139661
|
+
email: includeEmail ? accountInfo.email : void 0,
|
|
139662
|
+
invitedBy: accountInfo.invitedBy,
|
|
139663
|
+
invitesDisabled: accountInfo.invitesDisabled,
|
|
139664
|
+
inviteNote: accountInfo.inviteNote,
|
|
139665
|
+
invites: accountInfo.invites
|
|
139666
|
+
};
|
|
139667
|
+
};
|
|
139668
|
+
var addAccountInfoToRepoView = (repoView, accountInfo, includeEmail = false) => {
|
|
139669
|
+
if (!accountInfo)
|
|
139670
|
+
return repoView;
|
|
139671
|
+
return {
|
|
139672
|
+
...repoView,
|
|
139673
|
+
email: includeEmail ? accountInfo.email : void 0,
|
|
139674
|
+
invitedBy: accountInfo.invitedBy,
|
|
139675
|
+
invitesDisabled: accountInfo.invitesDisabled,
|
|
139676
|
+
inviteNote: accountInfo.inviteNote
|
|
139677
|
+
};
|
|
139678
|
+
};
|
|
139679
|
+
|
|
138926
139680
|
// src/api/com/atproto/admin/getRecord.ts
|
|
138927
139681
|
function getRecord_default(server, ctx) {
|
|
138928
139682
|
server.com.atproto.admin.getRecord({
|
|
138929
139683
|
auth: ctx.roleVerifier,
|
|
138930
|
-
handler: async ({ params: params2 }) => {
|
|
139684
|
+
handler: async ({ params: params2, auth }) => {
|
|
138931
139685
|
const { uri: uri2, cid: cid2 } = params2;
|
|
138932
139686
|
const db = ctx.db.getPrimary();
|
|
138933
139687
|
const result = await db.db.selectFrom("record").selectAll().where("uri", "=", uri2).if(!!cid2, (qb) => qb.where("cid", "=", cid2 ?? "")).executeTakeFirst();
|
|
138934
139688
|
if (!result) {
|
|
138935
139689
|
throw new InvalidRequestError("Record not found", "RecordNotFound");
|
|
138936
139690
|
}
|
|
139691
|
+
const [record, accountInfo] = await Promise.all([
|
|
139692
|
+
ctx.services.moderation(db).views.recordDetail(result),
|
|
139693
|
+
getPdsAccountInfo(ctx, result.did)
|
|
139694
|
+
]);
|
|
139695
|
+
record.repo = addAccountInfoToRepoView(record.repo, accountInfo, auth.credentials.moderator);
|
|
138937
139696
|
return {
|
|
138938
139697
|
encoding: "application/json",
|
|
138939
|
-
body:
|
|
139698
|
+
body: record
|
|
138940
139699
|
};
|
|
138941
139700
|
}
|
|
138942
139701
|
});
|
|
@@ -138946,16 +139705,21 @@ function getRecord_default(server, ctx) {
|
|
|
138946
139705
|
function getRepo_default(server, ctx) {
|
|
138947
139706
|
server.com.atproto.admin.getRepo({
|
|
138948
139707
|
auth: ctx.roleVerifier,
|
|
138949
|
-
handler: async ({ params: params2 }) => {
|
|
139708
|
+
handler: async ({ params: params2, auth }) => {
|
|
138950
139709
|
const { did: did2 } = params2;
|
|
138951
139710
|
const db = ctx.db.getPrimary();
|
|
138952
139711
|
const result = await ctx.services.actor(db).getActor(did2, true);
|
|
138953
139712
|
if (!result) {
|
|
138954
139713
|
throw new InvalidRequestError("Repo not found", "RepoNotFound");
|
|
138955
139714
|
}
|
|
139715
|
+
const [partialRepo, accountInfo] = await Promise.all([
|
|
139716
|
+
ctx.services.moderation(db).views.repoDetail(result),
|
|
139717
|
+
getPdsAccountInfo(ctx, result.did)
|
|
139718
|
+
]);
|
|
139719
|
+
const repo = addAccountInfoToRepoViewDetail(partialRepo, accountInfo, auth.credentials.moderator);
|
|
138956
139720
|
return {
|
|
138957
139721
|
encoding: "application/json",
|
|
138958
|
-
body:
|
|
139722
|
+
body: repo
|
|
138959
139723
|
};
|
|
138960
139724
|
}
|
|
138961
139725
|
});
|
|
@@ -138965,14 +139729,23 @@ function getRepo_default(server, ctx) {
|
|
|
138965
139729
|
function getModerationAction_default(server, ctx) {
|
|
138966
139730
|
server.com.atproto.admin.getModerationAction({
|
|
138967
139731
|
auth: ctx.roleVerifier,
|
|
138968
|
-
handler: async ({ params: params2 }) => {
|
|
139732
|
+
handler: async ({ params: params2, auth }) => {
|
|
138969
139733
|
const { id } = params2;
|
|
138970
139734
|
const db = ctx.db.getPrimary();
|
|
138971
139735
|
const moderationService = ctx.services.moderation(db);
|
|
138972
139736
|
const result = await moderationService.getActionOrThrow(id);
|
|
139737
|
+
const [action, accountInfo] = await Promise.all([
|
|
139738
|
+
moderationService.views.actionDetail(result),
|
|
139739
|
+
getPdsAccountInfo(ctx, result.subjectDid)
|
|
139740
|
+
]);
|
|
139741
|
+
if (isRepoView(action.subject)) {
|
|
139742
|
+
action.subject = addAccountInfoToRepoView(action.subject, accountInfo, auth.credentials.moderator);
|
|
139743
|
+
} else if (isRecordView(action.subject)) {
|
|
139744
|
+
action.subject.repo = addAccountInfoToRepoView(action.subject.repo, accountInfo, auth.credentials.moderator);
|
|
139745
|
+
}
|
|
138973
139746
|
return {
|
|
138974
139747
|
encoding: "application/json",
|
|
138975
|
-
body:
|
|
139748
|
+
body: action
|
|
138976
139749
|
};
|
|
138977
139750
|
}
|
|
138978
139751
|
});
|
|
@@ -139006,14 +139779,23 @@ function getModerationActions_default(server, ctx) {
|
|
|
139006
139779
|
function getModerationReport_default(server, ctx) {
|
|
139007
139780
|
server.com.atproto.admin.getModerationReport({
|
|
139008
139781
|
auth: ctx.roleVerifier,
|
|
139009
|
-
handler: async ({ params: params2 }) => {
|
|
139782
|
+
handler: async ({ params: params2, auth }) => {
|
|
139010
139783
|
const { id } = params2;
|
|
139011
139784
|
const db = ctx.db.getPrimary();
|
|
139012
139785
|
const moderationService = ctx.services.moderation(db);
|
|
139013
139786
|
const result = await moderationService.getReportOrThrow(id);
|
|
139787
|
+
const [report, accountInfo] = await Promise.all([
|
|
139788
|
+
moderationService.views.reportDetail(result),
|
|
139789
|
+
getPdsAccountInfo(ctx, result.subjectDid)
|
|
139790
|
+
]);
|
|
139791
|
+
if (isRepoView(report.subject)) {
|
|
139792
|
+
report.subject = addAccountInfoToRepoView(report.subject, accountInfo, auth.credentials.moderator);
|
|
139793
|
+
} else if (isRecordView(report.subject)) {
|
|
139794
|
+
report.subject.repo = addAccountInfoToRepoView(report.subject.repo, accountInfo, auth.credentials.moderator);
|
|
139795
|
+
}
|
|
139014
139796
|
return {
|
|
139015
139797
|
encoding: "application/json",
|
|
139016
|
-
body:
|
|
139798
|
+
body: report
|
|
139017
139799
|
};
|
|
139018
139800
|
}
|
|
139019
139801
|
});
|
|
@@ -139152,6 +139934,14 @@ var createRouter2 = (ctx) => {
|
|
|
139152
139934
|
res.json({
|
|
139153
139935
|
"@context": ["https://www.w3.org/ns/did/v1"],
|
|
139154
139936
|
id: ctx.cfg.serverDid,
|
|
139937
|
+
verificationMethod: [
|
|
139938
|
+
{
|
|
139939
|
+
id: `${ctx.cfg.serverDid}#atproto`,
|
|
139940
|
+
type: "Multikey",
|
|
139941
|
+
controller: ctx.cfg.serverDid,
|
|
139942
|
+
publicKeyMultibase: ctx.signingKey.did().replace("did:key:", "")
|
|
139943
|
+
}
|
|
139944
|
+
],
|
|
139155
139945
|
service: [
|
|
139156
139946
|
{
|
|
139157
139947
|
id: "#bsky_notif",
|
|
@@ -139182,69 +139972,16 @@ var subLogger = subsystemLogger("bsky:sub");
|
|
|
139182
139972
|
var labelerLogger = subsystemLogger("bsky:labeler");
|
|
139183
139973
|
var httpLogger = subsystemLogger("bsky");
|
|
139184
139974
|
var loggerMiddleware = (0, import_pino_http.default)({
|
|
139185
|
-
logger: httpLogger
|
|
139186
|
-
|
|
139187
|
-
|
|
139188
|
-
|
|
139189
|
-
|
|
139190
|
-
|
|
139191
|
-
|
|
139192
|
-
let retries = 0;
|
|
139193
|
-
let doneError;
|
|
139194
|
-
while (!doneError) {
|
|
139195
|
-
try {
|
|
139196
|
-
if (retries)
|
|
139197
|
-
await backoff(retries);
|
|
139198
|
-
return await fn();
|
|
139199
|
-
} catch (err) {
|
|
139200
|
-
const willRetry = retries < max && retryable(err);
|
|
139201
|
-
if (!willRetry)
|
|
139202
|
-
doneError = err;
|
|
139203
|
-
retries += 1;
|
|
139975
|
+
logger: httpLogger,
|
|
139976
|
+
serializers: {
|
|
139977
|
+
err: (err) => {
|
|
139978
|
+
return {
|
|
139979
|
+
code: err?.code,
|
|
139980
|
+
message: err?.message
|
|
139981
|
+
};
|
|
139204
139982
|
}
|
|
139205
139983
|
}
|
|
139206
|
-
|
|
139207
|
-
}
|
|
139208
|
-
async function retryHttp(fn, opts = {}) {
|
|
139209
|
-
return retry(fn, { retryable: retryableHttp, ...opts });
|
|
139210
|
-
}
|
|
139211
|
-
function retryableHttp(err) {
|
|
139212
|
-
if (err instanceof XRPCError) {
|
|
139213
|
-
if (err.status === 1 /* Unknown */)
|
|
139214
|
-
return true;
|
|
139215
|
-
return retryableHttpStatusCodes.has(err.status);
|
|
139216
|
-
}
|
|
139217
|
-
if (err instanceof import_axios3.AxiosError) {
|
|
139218
|
-
if (!err.response)
|
|
139219
|
-
return true;
|
|
139220
|
-
return retryableHttpStatusCodes.has(err.response.status);
|
|
139221
|
-
}
|
|
139222
|
-
return false;
|
|
139223
|
-
}
|
|
139224
|
-
var retryableHttpStatusCodes = /* @__PURE__ */ new Set([
|
|
139225
|
-
408,
|
|
139226
|
-
425,
|
|
139227
|
-
429,
|
|
139228
|
-
500,
|
|
139229
|
-
502,
|
|
139230
|
-
503,
|
|
139231
|
-
504,
|
|
139232
|
-
522,
|
|
139233
|
-
524
|
|
139234
|
-
]);
|
|
139235
|
-
async function backoff(n, multiplier = 50, max = 1e3) {
|
|
139236
|
-
const exponentialMs = Math.pow(2, n) * multiplier;
|
|
139237
|
-
const ms = Math.min(exponentialMs, max);
|
|
139238
|
-
await wait(jitter2(ms));
|
|
139239
|
-
}
|
|
139240
|
-
function jitter2(value) {
|
|
139241
|
-
const delta = value * 0.15;
|
|
139242
|
-
return value + randomRange(-delta, delta);
|
|
139243
|
-
}
|
|
139244
|
-
function randomRange(from3, to) {
|
|
139245
|
-
const rand = Math.random() * (to - from3);
|
|
139246
|
-
return rand + from3;
|
|
139247
|
-
}
|
|
139984
|
+
});
|
|
139248
139985
|
|
|
139249
139986
|
// src/api/blob-resolver.ts
|
|
139250
139987
|
var createRouter3 = (ctx) => {
|
|
@@ -139435,6 +140172,10 @@ var AdminNS2 = class {
|
|
|
139435
140172
|
const nsid2 = "com.atproto.admin.enableAccountInvites";
|
|
139436
140173
|
return this._server.xrpc.method(nsid2, cfg);
|
|
139437
140174
|
}
|
|
140175
|
+
getAccountInfo(cfg) {
|
|
140176
|
+
const nsid2 = "com.atproto.admin.getAccountInfo";
|
|
140177
|
+
return this._server.xrpc.method(nsid2, cfg);
|
|
140178
|
+
}
|
|
139438
140179
|
getInviteCodes(cfg) {
|
|
139439
140180
|
const nsid2 = "com.atproto.admin.getInviteCodes";
|
|
139440
140181
|
return this._server.xrpc.method(nsid2, cfg);
|
|
@@ -139463,6 +140204,10 @@ var AdminNS2 = class {
|
|
|
139463
140204
|
const nsid2 = "com.atproto.admin.getRepo";
|
|
139464
140205
|
return this._server.xrpc.method(nsid2, cfg);
|
|
139465
140206
|
}
|
|
140207
|
+
getSubjectStatus(cfg) {
|
|
140208
|
+
const nsid2 = "com.atproto.admin.getSubjectStatus";
|
|
140209
|
+
return this._server.xrpc.method(nsid2, cfg);
|
|
140210
|
+
}
|
|
139466
140211
|
resolveModerationReports(cfg) {
|
|
139467
140212
|
const nsid2 = "com.atproto.admin.resolveModerationReports";
|
|
139468
140213
|
return this._server.xrpc.method(nsid2, cfg);
|
|
@@ -139491,6 +140236,10 @@ var AdminNS2 = class {
|
|
|
139491
140236
|
const nsid2 = "com.atproto.admin.updateAccountHandle";
|
|
139492
140237
|
return this._server.xrpc.method(nsid2, cfg);
|
|
139493
140238
|
}
|
|
140239
|
+
updateSubjectStatus(cfg) {
|
|
140240
|
+
const nsid2 = "com.atproto.admin.updateSubjectStatus";
|
|
140241
|
+
return this._server.xrpc.method(nsid2, cfg);
|
|
140242
|
+
}
|
|
139494
140243
|
};
|
|
139495
140244
|
var IdentityNS2 = class {
|
|
139496
140245
|
constructor(server) {
|
|
@@ -139636,6 +140385,10 @@ var ServerNS2 = class {
|
|
|
139636
140385
|
const nsid2 = "com.atproto.server.requestPasswordReset";
|
|
139637
140386
|
return this._server.xrpc.method(nsid2, cfg);
|
|
139638
140387
|
}
|
|
140388
|
+
reserveSigningKey(cfg) {
|
|
140389
|
+
const nsid2 = "com.atproto.server.reserveSigningKey";
|
|
140390
|
+
return this._server.xrpc.method(nsid2, cfg);
|
|
140391
|
+
}
|
|
139639
140392
|
resetPassword(cfg) {
|
|
139640
140393
|
const nsid2 = "com.atproto.server.resetPassword";
|
|
139641
140394
|
return this._server.xrpc.method(nsid2, cfg);
|
|
@@ -140342,7 +141095,7 @@ var UnexpectedObjectError = class extends Error {
|
|
|
140342
141095
|
|
|
140343
141096
|
// ../../node_modules/.pnpm/@ipld+car@3.2.3/node_modules/@ipld/car/esm/lib/reader.js
|
|
140344
141097
|
var import_fs = __toESM(require("fs"), 1);
|
|
140345
|
-
var
|
|
141098
|
+
var import_util81 = require("util");
|
|
140346
141099
|
|
|
140347
141100
|
// ../../node_modules/.pnpm/@ipld+car@3.2.3/node_modules/@ipld/car/esm/lib/decoder.js
|
|
140348
141101
|
var import_varint2 = __toESM(require_varint(), 1);
|
|
@@ -140607,7 +141360,7 @@ async function decodeReaderComplete(reader) {
|
|
|
140607
141360
|
}
|
|
140608
141361
|
|
|
140609
141362
|
// ../../node_modules/.pnpm/@ipld+car@3.2.3/node_modules/@ipld/car/esm/lib/reader.js
|
|
140610
|
-
var fsread = (0,
|
|
141363
|
+
var fsread = (0, import_util81.promisify)(import_fs.default.read);
|
|
140611
141364
|
var CarReader2 = class extends CarReader {
|
|
140612
141365
|
static async readRaw(fd, blockIndex) {
|
|
140613
141366
|
const { cid: cid2, blockLength, blockOffset } = blockIndex;
|
|
@@ -140632,7 +141385,7 @@ var CarReader2 = class extends CarReader {
|
|
|
140632
141385
|
|
|
140633
141386
|
// ../../node_modules/.pnpm/@ipld+car@3.2.3/node_modules/@ipld/car/esm/lib/writer.js
|
|
140634
141387
|
var import_fs2 = __toESM(require("fs"), 1);
|
|
140635
|
-
var
|
|
141388
|
+
var import_util82 = require("util");
|
|
140636
141389
|
|
|
140637
141390
|
// ../../node_modules/.pnpm/@ipld+car@3.2.3/node_modules/@ipld/car/esm/lib/encoder.js
|
|
140638
141391
|
var import_varint3 = __toESM(require_varint(), 1);
|
|
@@ -140652,8 +141405,8 @@ var CarWriterOut = class {
|
|
|
140652
141405
|
};
|
|
140653
141406
|
|
|
140654
141407
|
// ../../node_modules/.pnpm/@ipld+car@3.2.3/node_modules/@ipld/car/esm/lib/writer.js
|
|
140655
|
-
var fsread2 = (0,
|
|
140656
|
-
var fswrite = (0,
|
|
141408
|
+
var fsread2 = (0, import_util82.promisify)(import_fs2.default.read);
|
|
141409
|
+
var fswrite = (0, import_util82.promisify)(import_fs2.default.write);
|
|
140657
141410
|
|
|
140658
141411
|
// ../repo/src/util.ts
|
|
140659
141412
|
async function* verifyIncomingCarBlocks(car) {
|
|
@@ -140667,7 +141420,7 @@ var readCar = async (bytes3) => {
|
|
|
140667
141420
|
const roots = await car.getRoots();
|
|
140668
141421
|
const blocks = new block_map_default();
|
|
140669
141422
|
for await (const block of verifyIncomingCarBlocks(car.blocks())) {
|
|
140670
|
-
|
|
141423
|
+
blocks.set(block.cid, block.bytes);
|
|
140671
141424
|
}
|
|
140672
141425
|
return {
|
|
140673
141426
|
roots,
|
|
@@ -142180,27 +142933,43 @@ var BlockAndMuteState = class {
|
|
|
142180
142933
|
constructor(items = []) {
|
|
142181
142934
|
this.hasIdx = /* @__PURE__ */ new Map();
|
|
142182
142935
|
this.blockIdx = /* @__PURE__ */ new Map();
|
|
142936
|
+
this.blockListIdx = /* @__PURE__ */ new Map();
|
|
142183
142937
|
this.muteIdx = /* @__PURE__ */ new Map();
|
|
142184
142938
|
this.muteListIdx = /* @__PURE__ */ new Map();
|
|
142185
142939
|
items.forEach((item) => this.add(item));
|
|
142186
142940
|
}
|
|
142187
142941
|
add(item) {
|
|
142188
|
-
|
|
142189
|
-
|
|
142942
|
+
if (item.source === item.target) {
|
|
142943
|
+
return;
|
|
142944
|
+
}
|
|
142945
|
+
if (item.blocking) {
|
|
142190
142946
|
const map = this.blockIdx.get(item.source) ?? /* @__PURE__ */ new Map();
|
|
142191
|
-
map.set(item.target, blocking);
|
|
142947
|
+
map.set(item.target, item.blocking);
|
|
142192
142948
|
if (!this.blockIdx.has(item.source)) {
|
|
142193
142949
|
this.blockIdx.set(item.source, map);
|
|
142194
142950
|
}
|
|
142195
142951
|
}
|
|
142196
|
-
|
|
142197
|
-
|
|
142952
|
+
if (item.blockingViaList) {
|
|
142953
|
+
const map = this.blockListIdx.get(item.source) ?? /* @__PURE__ */ new Map();
|
|
142954
|
+
map.set(item.target, item.blockingViaList);
|
|
142955
|
+
if (!this.blockListIdx.has(item.source)) {
|
|
142956
|
+
this.blockListIdx.set(item.source, map);
|
|
142957
|
+
}
|
|
142958
|
+
}
|
|
142959
|
+
if (item.blockedBy) {
|
|
142198
142960
|
const map = this.blockIdx.get(item.target) ?? /* @__PURE__ */ new Map();
|
|
142199
|
-
map.set(item.source, blockedBy);
|
|
142961
|
+
map.set(item.source, item.blockedBy);
|
|
142200
142962
|
if (!this.blockIdx.has(item.target)) {
|
|
142201
142963
|
this.blockIdx.set(item.target, map);
|
|
142202
142964
|
}
|
|
142203
142965
|
}
|
|
142966
|
+
if (item.blockedByViaList) {
|
|
142967
|
+
const map = this.blockListIdx.get(item.target) ?? /* @__PURE__ */ new Map();
|
|
142968
|
+
map.set(item.source, item.blockedByViaList);
|
|
142969
|
+
if (!this.blockListIdx.has(item.target)) {
|
|
142970
|
+
this.blockListIdx.set(item.target, map);
|
|
142971
|
+
}
|
|
142972
|
+
}
|
|
142204
142973
|
if (item.muting) {
|
|
142205
142974
|
const set2 = this.muteIdx.get(item.source) ?? /* @__PURE__ */ new Set();
|
|
142206
142975
|
set2.add(item.target);
|
|
@@ -142225,7 +142994,7 @@ var BlockAndMuteState = class {
|
|
|
142225
142994
|
return !!this.blocking(pair) || !!this.blockedBy(pair);
|
|
142226
142995
|
}
|
|
142227
142996
|
blocking(pair) {
|
|
142228
|
-
return this.blockIdx.get(pair[0])?.get(pair[1]) ??
|
|
142997
|
+
return this.blockIdx.get(pair[0])?.get(pair[1]) ?? this.blockList(pair);
|
|
142229
142998
|
}
|
|
142230
142999
|
blockedBy(pair) {
|
|
142231
143000
|
return this.blocking([pair[1], pair[0]]);
|
|
@@ -142233,6 +143002,9 @@ var BlockAndMuteState = class {
|
|
|
142233
143002
|
mute(pair) {
|
|
142234
143003
|
return !!this.muteIdx.get(pair[0])?.has(pair[1]) || !!this.muteList(pair);
|
|
142235
143004
|
}
|
|
143005
|
+
blockList(pair) {
|
|
143006
|
+
return this.blockListIdx.get(pair[0])?.get(pair[1]) ?? null;
|
|
143007
|
+
}
|
|
142236
143008
|
muteList(pair) {
|
|
142237
143009
|
return this.muteListIdx.get(pair[0])?.get(pair[1]) ?? null;
|
|
142238
143010
|
}
|
|
@@ -142316,11 +143088,15 @@ var ActorViews = class {
|
|
|
142316
143088
|
this.services.graph.getBlockAndMuteState(viewer ? dids.map((did2) => [viewer, did2]) : [], state?.bam)
|
|
142317
143089
|
]);
|
|
142318
143090
|
const listUris = mapDefined(profiles, ({ did: did2 }) => {
|
|
142319
|
-
const
|
|
142320
|
-
|
|
142321
|
-
|
|
142322
|
-
|
|
142323
|
-
|
|
143091
|
+
const muteList = viewer && bam.muteList([viewer, did2]);
|
|
143092
|
+
const blockList = viewer && bam.blockList([viewer, did2]);
|
|
143093
|
+
const lists2 = [];
|
|
143094
|
+
if (muteList)
|
|
143095
|
+
lists2.push(muteList);
|
|
143096
|
+
if (blockList)
|
|
143097
|
+
lists2.push(blockList);
|
|
143098
|
+
return lists2;
|
|
143099
|
+
}).flat();
|
|
142324
143100
|
const lists = await this.services.graph.getListViews(listUris, viewer);
|
|
142325
143101
|
return { profilesDetailed: toMapByDid(profiles), labels, bam, lists };
|
|
142326
143102
|
}
|
|
@@ -142335,6 +143111,8 @@ var ActorViews = class {
|
|
|
142335
143111
|
const banner = prof?.bannerCid ? this.imgUriBuilder.getPresetUri("banner", prof.did, prof.bannerCid) : void 0;
|
|
142336
143112
|
const mutedByListUri = viewer && bam.muteList([viewer, did2]);
|
|
142337
143113
|
const mutedByList = mutedByListUri && lists[mutedByListUri] ? this.services.graph.formatListViewBasic(lists[mutedByListUri]) : void 0;
|
|
143114
|
+
const blockingByListUri = viewer && bam.blockList([viewer, did2]);
|
|
143115
|
+
const blockingByList = blockingByListUri && lists[blockingByListUri] ? this.services.graph.formatListViewBasic(lists[blockingByListUri]) : void 0;
|
|
142338
143116
|
const actorLabels = labels[did2] ?? [];
|
|
142339
143117
|
const selfLabels = getSelfLabels({
|
|
142340
143118
|
uri: prof.profileUri,
|
|
@@ -142357,6 +143135,7 @@ var ActorViews = class {
|
|
|
142357
143135
|
mutedByList,
|
|
142358
143136
|
blockedBy: !!bam.blockedBy([viewer, did2]),
|
|
142359
143137
|
blocking: bam.blocking([viewer, did2]) ?? void 0,
|
|
143138
|
+
blockingByList,
|
|
142360
143139
|
following: prof?.viewerFollowing && !bam.block([viewer, did2]) ? prof.viewerFollowing : void 0,
|
|
142361
143140
|
followedBy: prof?.viewerFollowedBy && !bam.block([viewer, did2]) ? prof.viewerFollowedBy : void 0
|
|
142362
143141
|
} : void 0,
|
|
@@ -142387,11 +143166,15 @@ var ActorViews = class {
|
|
|
142387
143166
|
this.services.graph.getBlockAndMuteState(viewer ? dids.map((did2) => [viewer, did2]) : [], state?.bam)
|
|
142388
143167
|
]);
|
|
142389
143168
|
const listUris = mapDefined(profiles, ({ did: did2 }) => {
|
|
142390
|
-
const
|
|
142391
|
-
|
|
142392
|
-
|
|
142393
|
-
|
|
142394
|
-
|
|
143169
|
+
const muteList = viewer && bam.muteList([viewer, did2]);
|
|
143170
|
+
const blockList = viewer && bam.blockList([viewer, did2]);
|
|
143171
|
+
const lists2 = [];
|
|
143172
|
+
if (muteList)
|
|
143173
|
+
lists2.push(muteList);
|
|
143174
|
+
if (blockList)
|
|
143175
|
+
lists2.push(blockList);
|
|
143176
|
+
return lists2;
|
|
143177
|
+
}).flat();
|
|
142395
143178
|
const lists = await this.services.graph.getListViews(listUris, viewer);
|
|
142396
143179
|
return { profiles: toMapByDid(profiles), labels, bam, lists };
|
|
142397
143180
|
}
|
|
@@ -142405,6 +143188,8 @@ var ActorViews = class {
|
|
|
142405
143188
|
const avatar = prof?.avatarCid ? this.imgUriBuilder.getPresetUri("avatar", prof.did, prof.avatarCid) : void 0;
|
|
142406
143189
|
const mutedByListUri = viewer && bam.muteList([viewer, did2]);
|
|
142407
143190
|
const mutedByList = mutedByListUri && lists[mutedByListUri] ? this.services.graph.formatListViewBasic(lists[mutedByListUri]) : void 0;
|
|
143191
|
+
const blockingByListUri = viewer && bam.blockList([viewer, did2]);
|
|
143192
|
+
const blockingByList = blockingByListUri && lists[blockingByListUri] ? this.services.graph.formatListViewBasic(lists[blockingByListUri]) : void 0;
|
|
142408
143193
|
const actorLabels = labels[did2] ?? [];
|
|
142409
143194
|
const selfLabels = getSelfLabels({
|
|
142410
143195
|
uri: prof.profileUri,
|
|
@@ -142423,6 +143208,7 @@ var ActorViews = class {
|
|
|
142423
143208
|
mutedByList,
|
|
142424
143209
|
blockedBy: !!bam.blockedBy([viewer, did2]),
|
|
142425
143210
|
blocking: bam.blocking([viewer, did2]) ?? void 0,
|
|
143211
|
+
blockingByList,
|
|
142426
143212
|
following: prof?.viewerFollowing && !bam.block([viewer, did2]) ? prof.viewerFollowing : void 0,
|
|
142427
143213
|
followedBy: prof?.viewerFollowedBy && !bam.block([viewer, did2]) ? prof.viewerFollowedBy : void 0
|
|
142428
143214
|
} : void 0,
|
|
@@ -142489,7 +143275,7 @@ var ActorService = class {
|
|
|
142489
143275
|
qb = qb.orWhere("actor.did", "in", dids);
|
|
142490
143276
|
}
|
|
142491
143277
|
if (handles.length) {
|
|
142492
|
-
qb = qb.orWhere("actor.handle", "in", handles);
|
|
143278
|
+
qb = qb.orWhere("actor.handle", "in", handles.length === 1 ? [handles[0], handles[0]] : handles);
|
|
142493
143279
|
}
|
|
142494
143280
|
return qb;
|
|
142495
143281
|
}).selectAll().execute();
|
|
@@ -143231,7 +144017,7 @@ var ModerationViews = class {
|
|
|
143231
144017
|
async recordDetail(result) {
|
|
143232
144018
|
const [record, reportResults, actionResults] = await Promise.all([
|
|
143233
144019
|
this.record(result),
|
|
143234
|
-
this.db.db.selectFrom("moderation_report").where("subjectType", "=", "com.atproto.repo.strongRef").where("subjectUri", "=", result.uri).orderBy("id", "desc").selectAll().execute(),
|
|
144020
|
+
this.db.db.selectFrom("moderation_report").where("subjectType", "=", "com.atproto.repo.strongRef").where("subjectUri", "=", result.uri).leftJoin("actor", "actor.did", "moderation_report.subjectDid").orderBy("id", "desc").selectAll().execute(),
|
|
143235
144021
|
this.db.db.selectFrom("moderation_action").where("subjectType", "=", "com.atproto.repo.strongRef").where("subjectUri", "=", result.uri).orderBy("id", "desc").selectAll().execute()
|
|
143236
144022
|
]);
|
|
143237
144023
|
const [reports, actions, blobs, labels] = await Promise.all([
|
|
@@ -143676,17 +144462,46 @@ var ModerationService = class {
|
|
|
143676
144462
|
createdBy,
|
|
143677
144463
|
reason
|
|
143678
144464
|
});
|
|
144465
|
+
let restored;
|
|
143679
144466
|
if (result.action === TAKEDOWN && result.subjectType === "com.atproto.admin.defs#repoRef" && result.subjectDid) {
|
|
143680
144467
|
await this.reverseTakedownRepo({
|
|
143681
144468
|
did: result.subjectDid
|
|
143682
144469
|
});
|
|
144470
|
+
restored = {
|
|
144471
|
+
did: result.subjectDid,
|
|
144472
|
+
subjects: [
|
|
144473
|
+
{
|
|
144474
|
+
$type: "com.atproto.admin.defs#repoRef",
|
|
144475
|
+
did: result.subjectDid
|
|
144476
|
+
}
|
|
144477
|
+
]
|
|
144478
|
+
};
|
|
143683
144479
|
}
|
|
143684
144480
|
if (result.action === TAKEDOWN && result.subjectType === "com.atproto.repo.strongRef" && result.subjectUri) {
|
|
144481
|
+
const uri2 = new AtUri(result.subjectUri);
|
|
143685
144482
|
await this.reverseTakedownRecord({
|
|
143686
|
-
uri:
|
|
144483
|
+
uri: uri2
|
|
143687
144484
|
});
|
|
144485
|
+
const did2 = uri2.hostname;
|
|
144486
|
+
const actionBlobs = await this.db.db.selectFrom("moderation_action_subject_blob").where("actionId", "=", id).select("cid").execute();
|
|
144487
|
+
restored = {
|
|
144488
|
+
did: did2,
|
|
144489
|
+
subjects: [
|
|
144490
|
+
{
|
|
144491
|
+
$type: "com.atproto.repo.strongRef",
|
|
144492
|
+
uri: result.subjectUri,
|
|
144493
|
+
cid: result.subjectCid ?? ""
|
|
144494
|
+
},
|
|
144495
|
+
...actionBlobs.map((row) => ({
|
|
144496
|
+
$type: "com.atproto.admin.defs#repoBlobRef",
|
|
144497
|
+
did: did2,
|
|
144498
|
+
cid: row.cid,
|
|
144499
|
+
recordUri: result.subjectUri
|
|
144500
|
+
}))
|
|
144501
|
+
]
|
|
144502
|
+
};
|
|
143688
144503
|
}
|
|
143689
|
-
return result;
|
|
144504
|
+
return { result, restored };
|
|
143690
144505
|
}
|
|
143691
144506
|
async logReverseAction(info) {
|
|
143692
144507
|
const { id, createdBy, reason, createdAt = new Date() } = info;
|
|
@@ -143701,23 +144516,51 @@ var ModerationService = class {
|
|
|
143701
144516
|
return result;
|
|
143702
144517
|
}
|
|
143703
144518
|
async takedownRepo(info) {
|
|
143704
|
-
|
|
144519
|
+
const { takedownId, did: did2 } = info;
|
|
144520
|
+
await this.db.db.updateTable("actor").set({ takedownId }).where("did", "=", did2).where("takedownId", "is", null).executeTakeFirst();
|
|
144521
|
+
return {
|
|
144522
|
+
did: did2,
|
|
144523
|
+
subjects: [
|
|
144524
|
+
{
|
|
144525
|
+
$type: "com.atproto.admin.defs#repoRef",
|
|
144526
|
+
did: did2
|
|
144527
|
+
}
|
|
144528
|
+
]
|
|
144529
|
+
};
|
|
143705
144530
|
}
|
|
143706
144531
|
async reverseTakedownRepo(info) {
|
|
143707
144532
|
await this.db.db.updateTable("actor").set({ takedownId: null }).where("did", "=", info.did).execute();
|
|
143708
144533
|
}
|
|
143709
144534
|
async takedownRecord(info) {
|
|
144535
|
+
const { takedownId, uri: uri2, cid: cid2, blobCids } = info;
|
|
144536
|
+
const did2 = uri2.hostname;
|
|
143710
144537
|
this.db.assertTransaction();
|
|
143711
|
-
await this.db.db.updateTable("record").set({ takedownId
|
|
143712
|
-
if (
|
|
143713
|
-
await Promise.all(
|
|
144538
|
+
await this.db.db.updateTable("record").set({ takedownId }).where("uri", "=", uri2.toString()).where("takedownId", "is", null).executeTakeFirst();
|
|
144539
|
+
if (blobCids) {
|
|
144540
|
+
await Promise.all(blobCids.map(async (cid3) => {
|
|
143714
144541
|
const paths = ImageUriBuilder.presets.map((id) => {
|
|
143715
|
-
const
|
|
143716
|
-
return
|
|
144542
|
+
const imgUri = this.imgUriBuilder.getPresetUri(id, uri2.host, cid3);
|
|
144543
|
+
return imgUri.replace(this.imgUriBuilder.endpoint, "");
|
|
143717
144544
|
});
|
|
143718
|
-
await this.imgInvalidator.invalidate(
|
|
144545
|
+
await this.imgInvalidator.invalidate(cid3.toString(), paths);
|
|
143719
144546
|
}));
|
|
143720
144547
|
}
|
|
144548
|
+
return {
|
|
144549
|
+
did: did2,
|
|
144550
|
+
subjects: [
|
|
144551
|
+
{
|
|
144552
|
+
$type: "com.atproto.repo.strongRef",
|
|
144553
|
+
uri: uri2.toString(),
|
|
144554
|
+
cid: cid2.toString()
|
|
144555
|
+
},
|
|
144556
|
+
...(blobCids || []).map((cid3) => ({
|
|
144557
|
+
$type: "com.atproto.admin.defs#repoBlobRef",
|
|
144558
|
+
did: did2,
|
|
144559
|
+
cid: cid3.toString(),
|
|
144560
|
+
recordUri: uri2.toString()
|
|
144561
|
+
}))
|
|
144562
|
+
]
|
|
144563
|
+
};
|
|
143721
144564
|
}
|
|
143722
144565
|
async reverseTakedownRecord(info) {
|
|
143723
144566
|
this.db.assertTransaction();
|
|
@@ -143805,11 +144648,11 @@ var authVerifier = (idResolver, opts) => async (reqCtx) => {
|
|
|
143805
144648
|
if (!jwtStr) {
|
|
143806
144649
|
throw new AuthRequiredError("missing jwt", "MissingJwt");
|
|
143807
144650
|
}
|
|
143808
|
-
const
|
|
143809
|
-
const atprotoData = await idResolver.did.resolveAtprotoData(
|
|
144651
|
+
const payload = await verifyJwt(jwtStr, opts.aud, async (did2, forceRefresh) => {
|
|
144652
|
+
const atprotoData = await idResolver.did.resolveAtprotoData(did2, forceRefresh);
|
|
143810
144653
|
return atprotoData.signingKey;
|
|
143811
144654
|
});
|
|
143812
|
-
return { credentials: { did:
|
|
144655
|
+
return { credentials: { did: payload.iss }, artifacts: { aud: opts.aud } };
|
|
143813
144656
|
};
|
|
143814
144657
|
var authOptionalVerifier = (idResolver, opts) => async (reqCtx) => {
|
|
143815
144658
|
if (!reqCtx.req.headers.authorization) {
|
|
@@ -143912,6 +144755,9 @@ var AppContext = class {
|
|
|
143912
144755
|
get services() {
|
|
143913
144756
|
return this.opts.services;
|
|
143914
144757
|
}
|
|
144758
|
+
get signingKey() {
|
|
144759
|
+
return this.opts.signingKey;
|
|
144760
|
+
}
|
|
143915
144761
|
get plcClient() {
|
|
143916
144762
|
return new plc.Client(this.cfg.didPlcUrl);
|
|
143917
144763
|
}
|
|
@@ -143947,6 +144793,21 @@ var AppContext = class {
|
|
|
143947
144793
|
get roleVerifier() {
|
|
143948
144794
|
return roleVerifier(this.cfg);
|
|
143949
144795
|
}
|
|
144796
|
+
async serviceAuthJwt(aud) {
|
|
144797
|
+
const iss = this.cfg.serverDid;
|
|
144798
|
+
return createServiceJwt({
|
|
144799
|
+
iss,
|
|
144800
|
+
aud,
|
|
144801
|
+
keypair: this.signingKey
|
|
144802
|
+
});
|
|
144803
|
+
}
|
|
144804
|
+
async pdsAdminAgent(did2) {
|
|
144805
|
+
const data = await this.idResolver.did.resolveAtprotoData(did2);
|
|
144806
|
+
const agent = new AtpAgent({ service: data.pds });
|
|
144807
|
+
const jwt = await this.serviceAuthJwt(did2);
|
|
144808
|
+
agent.api.setHeader("authorization", `Bearer ${jwt}`);
|
|
144809
|
+
return agent;
|
|
144810
|
+
}
|
|
143950
144811
|
get backgroundQueue() {
|
|
143951
144812
|
return this.opts.backgroundQueue;
|
|
143952
144813
|
}
|
|
@@ -143965,15 +144826,22 @@ var DidSqlCache = class {
|
|
|
143965
144826
|
this.maxTTL = maxTTL;
|
|
143966
144827
|
this.pQueue = new import_p_queue.default();
|
|
143967
144828
|
}
|
|
143968
|
-
async cacheDid(did2, doc) {
|
|
143969
|
-
|
|
144829
|
+
async cacheDid(did2, doc, prevResult) {
|
|
144830
|
+
if (prevResult) {
|
|
144831
|
+
await this.db.db.updateTable("did_cache").set({ doc, updatedAt: Date.now() }).where("did", "=", did2).where("updatedAt", "=", prevResult.updatedAt).execute();
|
|
144832
|
+
} else {
|
|
144833
|
+
await this.db.db.insertInto("did_cache").values({ did: did2, doc, updatedAt: Date.now() }).onConflict((oc) => oc.column("did").doUpdateSet({
|
|
144834
|
+
doc: excluded(this.db.db, "doc"),
|
|
144835
|
+
updatedAt: excluded(this.db.db, "updatedAt")
|
|
144836
|
+
})).executeTakeFirst();
|
|
144837
|
+
}
|
|
143970
144838
|
}
|
|
143971
|
-
async refreshCache(did2, getDoc) {
|
|
144839
|
+
async refreshCache(did2, getDoc, prevResult) {
|
|
143972
144840
|
this.pQueue?.add(async () => {
|
|
143973
144841
|
try {
|
|
143974
144842
|
const doc = await getDoc();
|
|
143975
144843
|
if (doc) {
|
|
143976
|
-
await this.cacheDid(did2, doc);
|
|
144844
|
+
await this.cacheDid(did2, doc, prevResult);
|
|
143977
144845
|
} else {
|
|
143978
144846
|
await this.clearEntry(did2);
|
|
143979
144847
|
}
|
|
@@ -143989,15 +144857,13 @@ var DidSqlCache = class {
|
|
|
143989
144857
|
const now = Date.now();
|
|
143990
144858
|
const updatedAt = new Date(res.updatedAt).getTime();
|
|
143991
144859
|
const expired = now > updatedAt + this.maxTTL;
|
|
143992
|
-
if (expired) {
|
|
143993
|
-
return null;
|
|
143994
|
-
}
|
|
143995
144860
|
const stale = now > updatedAt + this.staleTTL;
|
|
143996
144861
|
return {
|
|
143997
144862
|
doc: res.doc,
|
|
143998
144863
|
updatedAt,
|
|
143999
144864
|
did: did2,
|
|
144000
|
-
stale
|
|
144865
|
+
stale,
|
|
144866
|
+
expired
|
|
144001
144867
|
};
|
|
144002
144868
|
}
|
|
144003
144869
|
async clearEntry(did2) {
|
|
@@ -144535,7 +145401,8 @@ __export(migrations_exports, {
|
|
|
144535
145401
|
_20230830T205507322Z: () => T205507322Z_suggested_feeds_exports,
|
|
144536
145402
|
_20230904T211011773Z: () => T211011773Z_block_lists_exports,
|
|
144537
145403
|
_20230906T222220386Z: () => T222220386Z_thread_gating_exports,
|
|
144538
|
-
_20230920T213858047Z: () => T213858047Z_add_tags_to_post_exports
|
|
145404
|
+
_20230920T213858047Z: () => T213858047Z_add_tags_to_post_exports,
|
|
145405
|
+
_20230929T192920807Z: () => T192920807Z_record_cursor_indexes_exports
|
|
144539
145406
|
});
|
|
144540
145407
|
|
|
144541
145408
|
// src/db/migrations/20230309T045948368Z-init.ts
|
|
@@ -145013,6 +145880,27 @@ async function down27(db) {
|
|
|
145013
145880
|
await db.schema.alterTable("post").dropColumn("tags").execute();
|
|
145014
145881
|
}
|
|
145015
145882
|
|
|
145883
|
+
// src/db/migrations/20230929T192920807Z-record-cursor-indexes.ts
|
|
145884
|
+
var T192920807Z_record_cursor_indexes_exports = {};
|
|
145885
|
+
__export(T192920807Z_record_cursor_indexes_exports, {
|
|
145886
|
+
down: () => down28,
|
|
145887
|
+
up: () => up28
|
|
145888
|
+
});
|
|
145889
|
+
async function up28(db) {
|
|
145890
|
+
await db.schema.createIndex("like_creator_cursor_idx").on("like").columns(["creator", "sortAt", "cid"]).execute();
|
|
145891
|
+
await db.schema.createIndex("follow_creator_cursor_idx").on("follow").columns(["creator", "sortAt", "cid"]).execute();
|
|
145892
|
+
await db.schema.createIndex("follow_subject_cursor_idx").on("follow").columns(["subjectDid", "sortAt", "cid"]).execute();
|
|
145893
|
+
await db.schema.dropIndex("like_creator_idx").execute();
|
|
145894
|
+
await db.schema.dropIndex("follow_subjectdid_idx").execute();
|
|
145895
|
+
}
|
|
145896
|
+
async function down28(db) {
|
|
145897
|
+
await db.schema.createIndex("like_creator_idx").on("like").column("creator").execute();
|
|
145898
|
+
await db.schema.createIndex("follow_subjectdid_idx").on("follow").column("subjectDid").execute();
|
|
145899
|
+
await db.schema.dropIndex("like_creator_cursor_idx").execute();
|
|
145900
|
+
await db.schema.dropIndex("follow_creator_cursor_idx").execute();
|
|
145901
|
+
await db.schema.dropIndex("follow_subject_cursor_idx").execute();
|
|
145902
|
+
}
|
|
145903
|
+
|
|
145016
145904
|
// src/db/migrations/provider.ts
|
|
145017
145905
|
var CtxMigrationProvider = class {
|
|
145018
145906
|
constructor(migrations, ctx) {
|
|
@@ -145574,9 +146462,9 @@ var handler2 = async (ctx, params2, requester) => {
|
|
|
145574
146462
|
const db = ctx.db.getReplica("feed");
|
|
145575
146463
|
const feedService = ctx.services.feed(db);
|
|
145576
146464
|
const { ref } = db.db.dynamic;
|
|
145577
|
-
const keyset = new FeedKeyset(ref("post.
|
|
146465
|
+
const keyset = new FeedKeyset(ref("post.sortAt"), ref("post.cid"));
|
|
145578
146466
|
const sortFrom = keyset.unpack(cursor)?.primary;
|
|
145579
|
-
let postsQb = feedService.selectPostQb().innerJoin("follow", "follow.subjectDid", "post.creator").innerJoin("post_agg", "post_agg.uri", "post.uri").where("post_agg.likeCount", ">=", 5).where("follow.creator", "=", requester).where("post.
|
|
146467
|
+
let postsQb = feedService.selectPostQb().innerJoin("follow", "follow.subjectDid", "post.creator").innerJoin("post_agg", "post_agg.uri", "post.uri").where("post_agg.likeCount", ">=", 5).where("follow.creator", "=", requester).where("post.sortAt", ">", getFeedDateThreshold(sortFrom));
|
|
145580
146468
|
postsQb = paginate(postsQb, { limit, cursor, keyset, tryIndex: true });
|
|
145581
146469
|
const feedItems = await postsQb.execute();
|
|
145582
146470
|
return {
|
|
@@ -146723,11 +147611,9 @@ var IndexingService = class {
|
|
|
146723
147611
|
const atpData = await this.idResolver.did.resolveAtprotoData(did2, true);
|
|
146724
147612
|
const handleToDid = await this.idResolver.handle.resolve(atpData.handle);
|
|
146725
147613
|
const handle2 = did2 === handleToDid ? atpData.handle.toLowerCase() : null;
|
|
146726
|
-
|
|
146727
|
-
|
|
146728
|
-
|
|
146729
|
-
await this.db.db.updateTable("actor").where("actor.did", "=", actorWithHandle.did).set({ handle: null }).execute();
|
|
146730
|
-
}
|
|
147614
|
+
const actorWithHandle = handle2 !== null ? await this.db.db.selectFrom("actor").where("handle", "=", handle2).selectAll().executeTakeFirst() : null;
|
|
147615
|
+
if (handle2 && actorWithHandle && did2 !== actorWithHandle.did) {
|
|
147616
|
+
await this.db.db.updateTable("actor").where("actor.did", "=", actorWithHandle.did).set({ handle: null }).execute();
|
|
146731
147617
|
}
|
|
146732
147618
|
const actorInfo = { handle: handle2, indexedAt: timestamp };
|
|
146733
147619
|
await this.db.db.insertInto("actor").values({ did: did2, ...actorInfo }).onConflict((oc) => oc.column("did").doUpdateSet(actorInfo)).returning("did").executeTakeFirst();
|
|
@@ -146815,7 +147701,7 @@ var IndexingService = class {
|
|
|
146815
147701
|
}
|
|
146816
147702
|
async getActorIsHosted(did2) {
|
|
146817
147703
|
const doc = await this.idResolver.did.resolve(did2, true);
|
|
146818
|
-
const pds = doc &&
|
|
147704
|
+
const pds = doc && getPdsEndpoint(doc);
|
|
146819
147705
|
if (!pds)
|
|
146820
147706
|
return false;
|
|
146821
147707
|
const { api } = new AtpAgent({ service: pds });
|
|
@@ -147266,19 +148152,6 @@ function partitionId(key) {
|
|
|
147266
148152
|
function partitionKey(p) {
|
|
147267
148153
|
return `repo:${p}`;
|
|
147268
148154
|
}
|
|
147269
|
-
function handleAllSettledErrors(results) {
|
|
147270
|
-
const errors = results.filter(isRejected).map((res) => res.reason);
|
|
147271
|
-
if (errors.length === 0) {
|
|
147272
|
-
return;
|
|
147273
|
-
}
|
|
147274
|
-
if (errors.length === 1) {
|
|
147275
|
-
throw errors[0];
|
|
147276
|
-
}
|
|
147277
|
-
throw new AggregateError(errors, "Multiple errors: " + errors.map((err) => err?.message).join("\n"));
|
|
147278
|
-
}
|
|
147279
|
-
function isRejected(result) {
|
|
147280
|
-
return result.status === "rejected";
|
|
147281
|
-
}
|
|
147282
148155
|
|
|
147283
148156
|
// src/lexicon/types/app/bsky/actor/profile.ts
|
|
147284
148157
|
function isRecord2(v) {
|
|
@@ -147830,6 +148703,7 @@ var AutoModerator = class {
|
|
|
147830
148703
|
await modSrvc.takedownRecord({
|
|
147831
148704
|
takedownId: action.id,
|
|
147832
148705
|
uri: uri2,
|
|
148706
|
+
cid: recordCid,
|
|
147833
148707
|
blobCids: takedownCids
|
|
147834
148708
|
});
|
|
147835
148709
|
});
|
|
@@ -148513,7 +149387,7 @@ var BskyAppView = class {
|
|
|
148513
149387
|
this.app = opts.app;
|
|
148514
149388
|
}
|
|
148515
149389
|
static create(opts) {
|
|
148516
|
-
const { db, config: config2, algos = {} } = opts;
|
|
149390
|
+
const { db, config: config2, signingKey, algos = {} } = opts;
|
|
148517
149391
|
let maybeImgInvalidator = opts.imgInvalidator;
|
|
148518
149392
|
const app = (0, import_express7.default)();
|
|
148519
149393
|
app.use((0, import_cors.default)());
|
|
@@ -148552,6 +149426,7 @@ var BskyAppView = class {
|
|
|
148552
149426
|
cfg: config2,
|
|
148553
149427
|
services,
|
|
148554
149428
|
imgUriBuilder,
|
|
149429
|
+
signingKey,
|
|
148555
149430
|
idResolver,
|
|
148556
149431
|
didCache,
|
|
148557
149432
|
labelCache,
|