@atproto/bsky 0.0.11 → 0.0.12
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 +13 -0
- 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 +1381 -530
- package/dist/index.js.map +3 -3
- package/dist/lexicon/index.d.ts +8 -0
- package/dist/lexicon/lexicons.d.ts +231 -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 +2 -0
- 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 +30 -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 +13 -14
- 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 +246 -4
- 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 +2 -0
- 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 +44 -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/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",
|
|
@@ -121077,6 +121328,9 @@ var schemaDict = {
|
|
|
121077
121328
|
},
|
|
121078
121329
|
recoveryKey: {
|
|
121079
121330
|
type: "string"
|
|
121331
|
+
},
|
|
121332
|
+
plcOp: {
|
|
121333
|
+
type: "bytes"
|
|
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,29 @@ 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
|
+
output: {
|
|
121989
|
+
encoding: "application/json",
|
|
121990
|
+
schema: {
|
|
121991
|
+
type: "object",
|
|
121992
|
+
required: ["signingKey"],
|
|
121993
|
+
properties: {
|
|
121994
|
+
signingKey: {
|
|
121995
|
+
type: "string",
|
|
121996
|
+
description: "Public signing key in the form of a did:key."
|
|
121997
|
+
}
|
|
121998
|
+
}
|
|
121999
|
+
}
|
|
122000
|
+
}
|
|
122001
|
+
}
|
|
122002
|
+
}
|
|
122003
|
+
},
|
|
121718
122004
|
ComAtprotoServerResetPassword: {
|
|
121719
122005
|
lexicon: 1,
|
|
121720
122006
|
id: "com.atproto.server.resetPassword",
|
|
@@ -122132,7 +122418,7 @@ var schemaDict = {
|
|
|
122132
122418
|
},
|
|
122133
122419
|
repo: {
|
|
122134
122420
|
type: "object",
|
|
122135
|
-
required: ["did", "head"],
|
|
122421
|
+
required: ["did", "head", "rev"],
|
|
122136
122422
|
properties: {
|
|
122137
122423
|
did: {
|
|
122138
122424
|
type: "string",
|
|
@@ -122141,6 +122427,9 @@ var schemaDict = {
|
|
|
122141
122427
|
head: {
|
|
122142
122428
|
type: "string",
|
|
122143
122429
|
format: "cid"
|
|
122430
|
+
},
|
|
122431
|
+
rev: {
|
|
122432
|
+
type: "string"
|
|
122144
122433
|
}
|
|
122145
122434
|
}
|
|
122146
122435
|
}
|
|
@@ -122541,6 +122830,10 @@ var schemaDict = {
|
|
|
122541
122830
|
type: "string",
|
|
122542
122831
|
format: "at-uri"
|
|
122543
122832
|
},
|
|
122833
|
+
blockingByList: {
|
|
122834
|
+
type: "ref",
|
|
122835
|
+
ref: "lex:app.bsky.graph.defs#listViewBasic"
|
|
122836
|
+
},
|
|
122544
122837
|
following: {
|
|
122545
122838
|
type: "string",
|
|
122546
122839
|
format: "at-uri"
|
|
@@ -126065,48 +126358,55 @@ function toKnownErr3(e) {
|
|
|
126065
126358
|
return e;
|
|
126066
126359
|
}
|
|
126067
126360
|
|
|
126068
|
-
// ../api/src/client/types/com/atproto/admin/
|
|
126361
|
+
// ../api/src/client/types/com/atproto/admin/getAccountInfo.ts
|
|
126069
126362
|
function toKnownErr4(e) {
|
|
126070
126363
|
if (e instanceof XRPCError) {
|
|
126071
126364
|
}
|
|
126072
126365
|
return e;
|
|
126073
126366
|
}
|
|
126074
126367
|
|
|
126075
|
-
// ../api/src/client/types/com/atproto/admin/
|
|
126368
|
+
// ../api/src/client/types/com/atproto/admin/getInviteCodes.ts
|
|
126076
126369
|
function toKnownErr5(e) {
|
|
126077
126370
|
if (e instanceof XRPCError) {
|
|
126078
126371
|
}
|
|
126079
126372
|
return e;
|
|
126080
126373
|
}
|
|
126081
126374
|
|
|
126082
|
-
// ../api/src/client/types/com/atproto/admin/
|
|
126375
|
+
// ../api/src/client/types/com/atproto/admin/getModerationAction.ts
|
|
126083
126376
|
function toKnownErr6(e) {
|
|
126084
126377
|
if (e instanceof XRPCError) {
|
|
126085
126378
|
}
|
|
126086
126379
|
return e;
|
|
126087
126380
|
}
|
|
126088
126381
|
|
|
126089
|
-
// ../api/src/client/types/com/atproto/admin/
|
|
126382
|
+
// ../api/src/client/types/com/atproto/admin/getModerationActions.ts
|
|
126090
126383
|
function toKnownErr7(e) {
|
|
126091
126384
|
if (e instanceof XRPCError) {
|
|
126092
126385
|
}
|
|
126093
126386
|
return e;
|
|
126094
126387
|
}
|
|
126095
126388
|
|
|
126096
|
-
// ../api/src/client/types/com/atproto/admin/
|
|
126389
|
+
// ../api/src/client/types/com/atproto/admin/getModerationReport.ts
|
|
126097
126390
|
function toKnownErr8(e) {
|
|
126098
126391
|
if (e instanceof XRPCError) {
|
|
126099
126392
|
}
|
|
126100
126393
|
return e;
|
|
126101
126394
|
}
|
|
126102
126395
|
|
|
126396
|
+
// ../api/src/client/types/com/atproto/admin/getModerationReports.ts
|
|
126397
|
+
function toKnownErr9(e) {
|
|
126398
|
+
if (e instanceof XRPCError) {
|
|
126399
|
+
}
|
|
126400
|
+
return e;
|
|
126401
|
+
}
|
|
126402
|
+
|
|
126103
126403
|
// ../api/src/client/types/com/atproto/admin/getRecord.ts
|
|
126104
126404
|
var RecordNotFoundError = class extends XRPCError {
|
|
126105
126405
|
constructor(src3) {
|
|
126106
126406
|
super(src3.status, src3.error, src3.message, src3.headers);
|
|
126107
126407
|
}
|
|
126108
126408
|
};
|
|
126109
|
-
function
|
|
126409
|
+
function toKnownErr10(e) {
|
|
126110
126410
|
if (e instanceof XRPCError) {
|
|
126111
126411
|
if (e.error === "RecordNotFound")
|
|
126112
126412
|
return new RecordNotFoundError(e);
|
|
@@ -126120,7 +126420,7 @@ var RepoNotFoundError = class extends XRPCError {
|
|
|
126120
126420
|
super(src3.status, src3.error, src3.message, src3.headers);
|
|
126121
126421
|
}
|
|
126122
126422
|
};
|
|
126123
|
-
function
|
|
126423
|
+
function toKnownErr11(e) {
|
|
126124
126424
|
if (e instanceof XRPCError) {
|
|
126125
126425
|
if (e.error === "RepoNotFound")
|
|
126126
126426
|
return new RepoNotFoundError(e);
|
|
@@ -126128,29 +126428,36 @@ function toKnownErr10(e) {
|
|
|
126128
126428
|
return e;
|
|
126129
126429
|
}
|
|
126130
126430
|
|
|
126431
|
+
// ../api/src/client/types/com/atproto/admin/getSubjectStatus.ts
|
|
126432
|
+
function toKnownErr12(e) {
|
|
126433
|
+
if (e instanceof XRPCError) {
|
|
126434
|
+
}
|
|
126435
|
+
return e;
|
|
126436
|
+
}
|
|
126437
|
+
|
|
126131
126438
|
// ../api/src/client/types/com/atproto/admin/resolveModerationReports.ts
|
|
126132
|
-
function
|
|
126439
|
+
function toKnownErr13(e) {
|
|
126133
126440
|
if (e instanceof XRPCError) {
|
|
126134
126441
|
}
|
|
126135
126442
|
return e;
|
|
126136
126443
|
}
|
|
126137
126444
|
|
|
126138
126445
|
// ../api/src/client/types/com/atproto/admin/reverseModerationAction.ts
|
|
126139
|
-
function
|
|
126446
|
+
function toKnownErr14(e) {
|
|
126140
126447
|
if (e instanceof XRPCError) {
|
|
126141
126448
|
}
|
|
126142
126449
|
return e;
|
|
126143
126450
|
}
|
|
126144
126451
|
|
|
126145
126452
|
// ../api/src/client/types/com/atproto/admin/searchRepos.ts
|
|
126146
|
-
function
|
|
126453
|
+
function toKnownErr15(e) {
|
|
126147
126454
|
if (e instanceof XRPCError) {
|
|
126148
126455
|
}
|
|
126149
126456
|
return e;
|
|
126150
126457
|
}
|
|
126151
126458
|
|
|
126152
126459
|
// ../api/src/client/types/com/atproto/admin/sendEmail.ts
|
|
126153
|
-
function
|
|
126460
|
+
function toKnownErr16(e) {
|
|
126154
126461
|
if (e instanceof XRPCError) {
|
|
126155
126462
|
}
|
|
126156
126463
|
return e;
|
|
@@ -126162,7 +126469,7 @@ var SubjectHasActionError = class extends XRPCError {
|
|
|
126162
126469
|
super(src3.status, src3.error, src3.message, src3.headers);
|
|
126163
126470
|
}
|
|
126164
126471
|
};
|
|
126165
|
-
function
|
|
126472
|
+
function toKnownErr17(e) {
|
|
126166
126473
|
if (e instanceof XRPCError) {
|
|
126167
126474
|
if (e.error === "SubjectHasAction")
|
|
126168
126475
|
return new SubjectHasActionError(e);
|
|
@@ -126171,42 +126478,49 @@ function toKnownErr15(e) {
|
|
|
126171
126478
|
}
|
|
126172
126479
|
|
|
126173
126480
|
// ../api/src/client/types/com/atproto/admin/updateAccountEmail.ts
|
|
126174
|
-
function
|
|
126481
|
+
function toKnownErr18(e) {
|
|
126175
126482
|
if (e instanceof XRPCError) {
|
|
126176
126483
|
}
|
|
126177
126484
|
return e;
|
|
126178
126485
|
}
|
|
126179
126486
|
|
|
126180
126487
|
// ../api/src/client/types/com/atproto/admin/updateAccountHandle.ts
|
|
126181
|
-
function
|
|
126488
|
+
function toKnownErr19(e) {
|
|
126489
|
+
if (e instanceof XRPCError) {
|
|
126490
|
+
}
|
|
126491
|
+
return e;
|
|
126492
|
+
}
|
|
126493
|
+
|
|
126494
|
+
// ../api/src/client/types/com/atproto/admin/updateSubjectStatus.ts
|
|
126495
|
+
function toKnownErr20(e) {
|
|
126182
126496
|
if (e instanceof XRPCError) {
|
|
126183
126497
|
}
|
|
126184
126498
|
return e;
|
|
126185
126499
|
}
|
|
126186
126500
|
|
|
126187
126501
|
// ../api/src/client/types/com/atproto/identity/resolveHandle.ts
|
|
126188
|
-
function
|
|
126502
|
+
function toKnownErr21(e) {
|
|
126189
126503
|
if (e instanceof XRPCError) {
|
|
126190
126504
|
}
|
|
126191
126505
|
return e;
|
|
126192
126506
|
}
|
|
126193
126507
|
|
|
126194
126508
|
// ../api/src/client/types/com/atproto/identity/updateHandle.ts
|
|
126195
|
-
function
|
|
126509
|
+
function toKnownErr22(e) {
|
|
126196
126510
|
if (e instanceof XRPCError) {
|
|
126197
126511
|
}
|
|
126198
126512
|
return e;
|
|
126199
126513
|
}
|
|
126200
126514
|
|
|
126201
126515
|
// ../api/src/client/types/com/atproto/label/queryLabels.ts
|
|
126202
|
-
function
|
|
126516
|
+
function toKnownErr23(e) {
|
|
126203
126517
|
if (e instanceof XRPCError) {
|
|
126204
126518
|
}
|
|
126205
126519
|
return e;
|
|
126206
126520
|
}
|
|
126207
126521
|
|
|
126208
126522
|
// ../api/src/client/types/com/atproto/moderation/createReport.ts
|
|
126209
|
-
function
|
|
126523
|
+
function toKnownErr24(e) {
|
|
126210
126524
|
if (e instanceof XRPCError) {
|
|
126211
126525
|
}
|
|
126212
126526
|
return e;
|
|
@@ -126218,7 +126532,7 @@ var InvalidSwapError = class extends XRPCError {
|
|
|
126218
126532
|
super(src3.status, src3.error, src3.message, src3.headers);
|
|
126219
126533
|
}
|
|
126220
126534
|
};
|
|
126221
|
-
function
|
|
126535
|
+
function toKnownErr25(e) {
|
|
126222
126536
|
if (e instanceof XRPCError) {
|
|
126223
126537
|
if (e.error === "InvalidSwap")
|
|
126224
126538
|
return new InvalidSwapError(e);
|
|
@@ -126232,7 +126546,7 @@ var InvalidSwapError2 = class extends XRPCError {
|
|
|
126232
126546
|
super(src3.status, src3.error, src3.message, src3.headers);
|
|
126233
126547
|
}
|
|
126234
126548
|
};
|
|
126235
|
-
function
|
|
126549
|
+
function toKnownErr26(e) {
|
|
126236
126550
|
if (e instanceof XRPCError) {
|
|
126237
126551
|
if (e.error === "InvalidSwap")
|
|
126238
126552
|
return new InvalidSwapError2(e);
|
|
@@ -126246,7 +126560,7 @@ var InvalidSwapError3 = class extends XRPCError {
|
|
|
126246
126560
|
super(src3.status, src3.error, src3.message, src3.headers);
|
|
126247
126561
|
}
|
|
126248
126562
|
};
|
|
126249
|
-
function
|
|
126563
|
+
function toKnownErr27(e) {
|
|
126250
126564
|
if (e instanceof XRPCError) {
|
|
126251
126565
|
if (e.error === "InvalidSwap")
|
|
126252
126566
|
return new InvalidSwapError3(e);
|
|
@@ -126255,21 +126569,21 @@ function toKnownErr24(e) {
|
|
|
126255
126569
|
}
|
|
126256
126570
|
|
|
126257
126571
|
// ../api/src/client/types/com/atproto/repo/describeRepo.ts
|
|
126258
|
-
function
|
|
126572
|
+
function toKnownErr28(e) {
|
|
126259
126573
|
if (e instanceof XRPCError) {
|
|
126260
126574
|
}
|
|
126261
126575
|
return e;
|
|
126262
126576
|
}
|
|
126263
126577
|
|
|
126264
126578
|
// ../api/src/client/types/com/atproto/repo/getRecord.ts
|
|
126265
|
-
function
|
|
126579
|
+
function toKnownErr29(e) {
|
|
126266
126580
|
if (e instanceof XRPCError) {
|
|
126267
126581
|
}
|
|
126268
126582
|
return e;
|
|
126269
126583
|
}
|
|
126270
126584
|
|
|
126271
126585
|
// ../api/src/client/types/com/atproto/repo/listRecords.ts
|
|
126272
|
-
function
|
|
126586
|
+
function toKnownErr30(e) {
|
|
126273
126587
|
if (e instanceof XRPCError) {
|
|
126274
126588
|
}
|
|
126275
126589
|
return e;
|
|
@@ -126281,7 +126595,7 @@ var InvalidSwapError4 = class extends XRPCError {
|
|
|
126281
126595
|
super(src3.status, src3.error, src3.message, src3.headers);
|
|
126282
126596
|
}
|
|
126283
126597
|
};
|
|
126284
|
-
function
|
|
126598
|
+
function toKnownErr31(e) {
|
|
126285
126599
|
if (e instanceof XRPCError) {
|
|
126286
126600
|
if (e.error === "InvalidSwap")
|
|
126287
126601
|
return new InvalidSwapError4(e);
|
|
@@ -126290,7 +126604,7 @@ function toKnownErr28(e) {
|
|
|
126290
126604
|
}
|
|
126291
126605
|
|
|
126292
126606
|
// ../api/src/client/types/com/atproto/repo/uploadBlob.ts
|
|
126293
|
-
function
|
|
126607
|
+
function toKnownErr32(e) {
|
|
126294
126608
|
if (e instanceof XRPCError) {
|
|
126295
126609
|
}
|
|
126296
126610
|
return e;
|
|
@@ -126317,7 +126631,7 @@ var InvalidEmailError = class extends XRPCError {
|
|
|
126317
126631
|
super(src3.status, src3.error, src3.message, src3.headers);
|
|
126318
126632
|
}
|
|
126319
126633
|
};
|
|
126320
|
-
function
|
|
126634
|
+
function toKnownErr33(e) {
|
|
126321
126635
|
if (e instanceof XRPCError) {
|
|
126322
126636
|
if (e.error === "AccountNotFound")
|
|
126323
126637
|
return new AccountNotFoundError(e);
|
|
@@ -126367,7 +126681,7 @@ var IncompatibleDidDocError = class extends XRPCError {
|
|
|
126367
126681
|
super(src3.status, src3.error, src3.message, src3.headers);
|
|
126368
126682
|
}
|
|
126369
126683
|
};
|
|
126370
|
-
function
|
|
126684
|
+
function toKnownErr34(e) {
|
|
126371
126685
|
if (e instanceof XRPCError) {
|
|
126372
126686
|
if (e.error === "InvalidHandle")
|
|
126373
126687
|
return new InvalidHandleError2(e);
|
|
@@ -126393,7 +126707,7 @@ var AccountTakedownError = class extends XRPCError {
|
|
|
126393
126707
|
super(src3.status, src3.error, src3.message, src3.headers);
|
|
126394
126708
|
}
|
|
126395
126709
|
};
|
|
126396
|
-
function
|
|
126710
|
+
function toKnownErr35(e) {
|
|
126397
126711
|
if (e instanceof XRPCError) {
|
|
126398
126712
|
if (e.error === "AccountTakedown")
|
|
126399
126713
|
return new AccountTakedownError(e);
|
|
@@ -126402,14 +126716,14 @@ function toKnownErr32(e) {
|
|
|
126402
126716
|
}
|
|
126403
126717
|
|
|
126404
126718
|
// ../api/src/client/types/com/atproto/server/createInviteCode.ts
|
|
126405
|
-
function
|
|
126719
|
+
function toKnownErr36(e) {
|
|
126406
126720
|
if (e instanceof XRPCError) {
|
|
126407
126721
|
}
|
|
126408
126722
|
return e;
|
|
126409
126723
|
}
|
|
126410
126724
|
|
|
126411
126725
|
// ../api/src/client/types/com/atproto/server/createInviteCodes.ts
|
|
126412
|
-
function
|
|
126726
|
+
function toKnownErr37(e) {
|
|
126413
126727
|
if (e instanceof XRPCError) {
|
|
126414
126728
|
}
|
|
126415
126729
|
return e;
|
|
@@ -126421,7 +126735,7 @@ var AccountTakedownError2 = class extends XRPCError {
|
|
|
126421
126735
|
super(src3.status, src3.error, src3.message, src3.headers);
|
|
126422
126736
|
}
|
|
126423
126737
|
};
|
|
126424
|
-
function
|
|
126738
|
+
function toKnownErr38(e) {
|
|
126425
126739
|
if (e instanceof XRPCError) {
|
|
126426
126740
|
if (e.error === "AccountTakedown")
|
|
126427
126741
|
return new AccountTakedownError2(e);
|
|
@@ -126440,7 +126754,7 @@ var InvalidTokenError2 = class extends XRPCError {
|
|
|
126440
126754
|
super(src3.status, src3.error, src3.message, src3.headers);
|
|
126441
126755
|
}
|
|
126442
126756
|
};
|
|
126443
|
-
function
|
|
126757
|
+
function toKnownErr39(e) {
|
|
126444
126758
|
if (e instanceof XRPCError) {
|
|
126445
126759
|
if (e.error === "ExpiredToken")
|
|
126446
126760
|
return new ExpiredTokenError2(e);
|
|
@@ -126451,14 +126765,14 @@ function toKnownErr36(e) {
|
|
|
126451
126765
|
}
|
|
126452
126766
|
|
|
126453
126767
|
// ../api/src/client/types/com/atproto/server/deleteSession.ts
|
|
126454
|
-
function
|
|
126768
|
+
function toKnownErr40(e) {
|
|
126455
126769
|
if (e instanceof XRPCError) {
|
|
126456
126770
|
}
|
|
126457
126771
|
return e;
|
|
126458
126772
|
}
|
|
126459
126773
|
|
|
126460
126774
|
// ../api/src/client/types/com/atproto/server/describeServer.ts
|
|
126461
|
-
function
|
|
126775
|
+
function toKnownErr41(e) {
|
|
126462
126776
|
if (e instanceof XRPCError) {
|
|
126463
126777
|
}
|
|
126464
126778
|
return e;
|
|
@@ -126470,7 +126784,7 @@ var DuplicateCreateError = class extends XRPCError {
|
|
|
126470
126784
|
super(src3.status, src3.error, src3.message, src3.headers);
|
|
126471
126785
|
}
|
|
126472
126786
|
};
|
|
126473
|
-
function
|
|
126787
|
+
function toKnownErr42(e) {
|
|
126474
126788
|
if (e instanceof XRPCError) {
|
|
126475
126789
|
if (e.error === "DuplicateCreate")
|
|
126476
126790
|
return new DuplicateCreateError(e);
|
|
@@ -126479,7 +126793,7 @@ function toKnownErr39(e) {
|
|
|
126479
126793
|
}
|
|
126480
126794
|
|
|
126481
126795
|
// ../api/src/client/types/com/atproto/server/getSession.ts
|
|
126482
|
-
function
|
|
126796
|
+
function toKnownErr43(e) {
|
|
126483
126797
|
if (e instanceof XRPCError) {
|
|
126484
126798
|
}
|
|
126485
126799
|
return e;
|
|
@@ -126491,7 +126805,7 @@ var AccountTakedownError3 = class extends XRPCError {
|
|
|
126491
126805
|
super(src3.status, src3.error, src3.message, src3.headers);
|
|
126492
126806
|
}
|
|
126493
126807
|
};
|
|
126494
|
-
function
|
|
126808
|
+
function toKnownErr44(e) {
|
|
126495
126809
|
if (e instanceof XRPCError) {
|
|
126496
126810
|
if (e.error === "AccountTakedown")
|
|
126497
126811
|
return new AccountTakedownError3(e);
|
|
@@ -126505,7 +126819,7 @@ var AccountTakedownError4 = class extends XRPCError {
|
|
|
126505
126819
|
super(src3.status, src3.error, src3.message, src3.headers);
|
|
126506
126820
|
}
|
|
126507
126821
|
};
|
|
126508
|
-
function
|
|
126822
|
+
function toKnownErr45(e) {
|
|
126509
126823
|
if (e instanceof XRPCError) {
|
|
126510
126824
|
if (e.error === "AccountTakedown")
|
|
126511
126825
|
return new AccountTakedownError4(e);
|
|
@@ -126514,28 +126828,35 @@ function toKnownErr42(e) {
|
|
|
126514
126828
|
}
|
|
126515
126829
|
|
|
126516
126830
|
// ../api/src/client/types/com/atproto/server/requestAccountDelete.ts
|
|
126517
|
-
function
|
|
126831
|
+
function toKnownErr46(e) {
|
|
126518
126832
|
if (e instanceof XRPCError) {
|
|
126519
126833
|
}
|
|
126520
126834
|
return e;
|
|
126521
126835
|
}
|
|
126522
126836
|
|
|
126523
126837
|
// ../api/src/client/types/com/atproto/server/requestEmailConfirmation.ts
|
|
126524
|
-
function
|
|
126838
|
+
function toKnownErr47(e) {
|
|
126525
126839
|
if (e instanceof XRPCError) {
|
|
126526
126840
|
}
|
|
126527
126841
|
return e;
|
|
126528
126842
|
}
|
|
126529
126843
|
|
|
126530
126844
|
// ../api/src/client/types/com/atproto/server/requestEmailUpdate.ts
|
|
126531
|
-
function
|
|
126845
|
+
function toKnownErr48(e) {
|
|
126532
126846
|
if (e instanceof XRPCError) {
|
|
126533
126847
|
}
|
|
126534
126848
|
return e;
|
|
126535
126849
|
}
|
|
126536
126850
|
|
|
126537
126851
|
// ../api/src/client/types/com/atproto/server/requestPasswordReset.ts
|
|
126538
|
-
function
|
|
126852
|
+
function toKnownErr49(e) {
|
|
126853
|
+
if (e instanceof XRPCError) {
|
|
126854
|
+
}
|
|
126855
|
+
return e;
|
|
126856
|
+
}
|
|
126857
|
+
|
|
126858
|
+
// ../api/src/client/types/com/atproto/server/reserveSigningKey.ts
|
|
126859
|
+
function toKnownErr50(e) {
|
|
126539
126860
|
if (e instanceof XRPCError) {
|
|
126540
126861
|
}
|
|
126541
126862
|
return e;
|
|
@@ -126552,7 +126873,7 @@ var InvalidTokenError3 = class extends XRPCError {
|
|
|
126552
126873
|
super(src3.status, src3.error, src3.message, src3.headers);
|
|
126553
126874
|
}
|
|
126554
126875
|
};
|
|
126555
|
-
function
|
|
126876
|
+
function toKnownErr51(e) {
|
|
126556
126877
|
if (e instanceof XRPCError) {
|
|
126557
126878
|
if (e.error === "ExpiredToken")
|
|
126558
126879
|
return new ExpiredTokenError3(e);
|
|
@@ -126563,7 +126884,7 @@ function toKnownErr47(e) {
|
|
|
126563
126884
|
}
|
|
126564
126885
|
|
|
126565
126886
|
// ../api/src/client/types/com/atproto/server/revokeAppPassword.ts
|
|
126566
|
-
function
|
|
126887
|
+
function toKnownErr52(e) {
|
|
126567
126888
|
if (e instanceof XRPCError) {
|
|
126568
126889
|
}
|
|
126569
126890
|
return e;
|
|
@@ -126585,7 +126906,7 @@ var TokenRequiredError = class extends XRPCError {
|
|
|
126585
126906
|
super(src3.status, src3.error, src3.message, src3.headers);
|
|
126586
126907
|
}
|
|
126587
126908
|
};
|
|
126588
|
-
function
|
|
126909
|
+
function toKnownErr53(e) {
|
|
126589
126910
|
if (e instanceof XRPCError) {
|
|
126590
126911
|
if (e.error === "ExpiredToken")
|
|
126591
126912
|
return new ExpiredTokenError4(e);
|
|
@@ -126598,21 +126919,21 @@ function toKnownErr49(e) {
|
|
|
126598
126919
|
}
|
|
126599
126920
|
|
|
126600
126921
|
// ../api/src/client/types/com/atproto/sync/getBlob.ts
|
|
126601
|
-
function
|
|
126922
|
+
function toKnownErr54(e) {
|
|
126602
126923
|
if (e instanceof XRPCError) {
|
|
126603
126924
|
}
|
|
126604
126925
|
return e;
|
|
126605
126926
|
}
|
|
126606
126927
|
|
|
126607
126928
|
// ../api/src/client/types/com/atproto/sync/getBlocks.ts
|
|
126608
|
-
function
|
|
126929
|
+
function toKnownErr55(e) {
|
|
126609
126930
|
if (e instanceof XRPCError) {
|
|
126610
126931
|
}
|
|
126611
126932
|
return e;
|
|
126612
126933
|
}
|
|
126613
126934
|
|
|
126614
126935
|
// ../api/src/client/types/com/atproto/sync/getCheckout.ts
|
|
126615
|
-
function
|
|
126936
|
+
function toKnownErr56(e) {
|
|
126616
126937
|
if (e instanceof XRPCError) {
|
|
126617
126938
|
}
|
|
126618
126939
|
return e;
|
|
@@ -126624,7 +126945,7 @@ var HeadNotFoundError = class extends XRPCError {
|
|
|
126624
126945
|
super(src3.status, src3.error, src3.message, src3.headers);
|
|
126625
126946
|
}
|
|
126626
126947
|
};
|
|
126627
|
-
function
|
|
126948
|
+
function toKnownErr57(e) {
|
|
126628
126949
|
if (e instanceof XRPCError) {
|
|
126629
126950
|
if (e.error === "HeadNotFound")
|
|
126630
126951
|
return new HeadNotFoundError(e);
|
|
@@ -126636,14 +126957,14 @@ function toKnownErr53(e) {
|
|
|
126636
126957
|
var getLatestCommit_exports = {};
|
|
126637
126958
|
__export(getLatestCommit_exports, {
|
|
126638
126959
|
RepoNotFoundError: () => RepoNotFoundError2,
|
|
126639
|
-
toKnownErr: () =>
|
|
126960
|
+
toKnownErr: () => toKnownErr58
|
|
126640
126961
|
});
|
|
126641
126962
|
var RepoNotFoundError2 = class extends XRPCError {
|
|
126642
126963
|
constructor(src3) {
|
|
126643
126964
|
super(src3.status, src3.error, src3.message, src3.headers);
|
|
126644
126965
|
}
|
|
126645
126966
|
};
|
|
126646
|
-
function
|
|
126967
|
+
function toKnownErr58(e) {
|
|
126647
126968
|
if (e instanceof XRPCError) {
|
|
126648
126969
|
if (e.error === "RepoNotFound")
|
|
126649
126970
|
return new RepoNotFoundError2(e);
|
|
@@ -126652,105 +126973,105 @@ function toKnownErr54(e) {
|
|
|
126652
126973
|
}
|
|
126653
126974
|
|
|
126654
126975
|
// ../api/src/client/types/com/atproto/sync/getRecord.ts
|
|
126655
|
-
function
|
|
126976
|
+
function toKnownErr59(e) {
|
|
126656
126977
|
if (e instanceof XRPCError) {
|
|
126657
126978
|
}
|
|
126658
126979
|
return e;
|
|
126659
126980
|
}
|
|
126660
126981
|
|
|
126661
126982
|
// ../api/src/client/types/com/atproto/sync/getRepo.ts
|
|
126662
|
-
function
|
|
126983
|
+
function toKnownErr60(e) {
|
|
126663
126984
|
if (e instanceof XRPCError) {
|
|
126664
126985
|
}
|
|
126665
126986
|
return e;
|
|
126666
126987
|
}
|
|
126667
126988
|
|
|
126668
126989
|
// ../api/src/client/types/com/atproto/sync/listBlobs.ts
|
|
126669
|
-
function
|
|
126990
|
+
function toKnownErr61(e) {
|
|
126670
126991
|
if (e instanceof XRPCError) {
|
|
126671
126992
|
}
|
|
126672
126993
|
return e;
|
|
126673
126994
|
}
|
|
126674
126995
|
|
|
126675
126996
|
// ../api/src/client/types/com/atproto/sync/listRepos.ts
|
|
126676
|
-
function
|
|
126997
|
+
function toKnownErr62(e) {
|
|
126677
126998
|
if (e instanceof XRPCError) {
|
|
126678
126999
|
}
|
|
126679
127000
|
return e;
|
|
126680
127001
|
}
|
|
126681
127002
|
|
|
126682
127003
|
// ../api/src/client/types/com/atproto/sync/notifyOfUpdate.ts
|
|
126683
|
-
function
|
|
127004
|
+
function toKnownErr63(e) {
|
|
126684
127005
|
if (e instanceof XRPCError) {
|
|
126685
127006
|
}
|
|
126686
127007
|
return e;
|
|
126687
127008
|
}
|
|
126688
127009
|
|
|
126689
127010
|
// ../api/src/client/types/com/atproto/sync/requestCrawl.ts
|
|
126690
|
-
function
|
|
127011
|
+
function toKnownErr64(e) {
|
|
126691
127012
|
if (e instanceof XRPCError) {
|
|
126692
127013
|
}
|
|
126693
127014
|
return e;
|
|
126694
127015
|
}
|
|
126695
127016
|
|
|
126696
127017
|
// ../api/src/client/types/app/bsky/actor/getPreferences.ts
|
|
126697
|
-
function
|
|
127018
|
+
function toKnownErr65(e) {
|
|
126698
127019
|
if (e instanceof XRPCError) {
|
|
126699
127020
|
}
|
|
126700
127021
|
return e;
|
|
126701
127022
|
}
|
|
126702
127023
|
|
|
126703
127024
|
// ../api/src/client/types/app/bsky/actor/getProfile.ts
|
|
126704
|
-
function
|
|
127025
|
+
function toKnownErr66(e) {
|
|
126705
127026
|
if (e instanceof XRPCError) {
|
|
126706
127027
|
}
|
|
126707
127028
|
return e;
|
|
126708
127029
|
}
|
|
126709
127030
|
|
|
126710
127031
|
// ../api/src/client/types/app/bsky/actor/getProfiles.ts
|
|
126711
|
-
function
|
|
127032
|
+
function toKnownErr67(e) {
|
|
126712
127033
|
if (e instanceof XRPCError) {
|
|
126713
127034
|
}
|
|
126714
127035
|
return e;
|
|
126715
127036
|
}
|
|
126716
127037
|
|
|
126717
127038
|
// ../api/src/client/types/app/bsky/actor/getSuggestions.ts
|
|
126718
|
-
function
|
|
127039
|
+
function toKnownErr68(e) {
|
|
126719
127040
|
if (e instanceof XRPCError) {
|
|
126720
127041
|
}
|
|
126721
127042
|
return e;
|
|
126722
127043
|
}
|
|
126723
127044
|
|
|
126724
127045
|
// ../api/src/client/types/app/bsky/actor/putPreferences.ts
|
|
126725
|
-
function
|
|
127046
|
+
function toKnownErr69(e) {
|
|
126726
127047
|
if (e instanceof XRPCError) {
|
|
126727
127048
|
}
|
|
126728
127049
|
return e;
|
|
126729
127050
|
}
|
|
126730
127051
|
|
|
126731
127052
|
// ../api/src/client/types/app/bsky/actor/searchActors.ts
|
|
126732
|
-
function
|
|
127053
|
+
function toKnownErr70(e) {
|
|
126733
127054
|
if (e instanceof XRPCError) {
|
|
126734
127055
|
}
|
|
126735
127056
|
return e;
|
|
126736
127057
|
}
|
|
126737
127058
|
|
|
126738
127059
|
// ../api/src/client/types/app/bsky/actor/searchActorsTypeahead.ts
|
|
126739
|
-
function
|
|
127060
|
+
function toKnownErr71(e) {
|
|
126740
127061
|
if (e instanceof XRPCError) {
|
|
126741
127062
|
}
|
|
126742
127063
|
return e;
|
|
126743
127064
|
}
|
|
126744
127065
|
|
|
126745
127066
|
// ../api/src/client/types/app/bsky/feed/describeFeedGenerator.ts
|
|
126746
|
-
function
|
|
127067
|
+
function toKnownErr72(e) {
|
|
126747
127068
|
if (e instanceof XRPCError) {
|
|
126748
127069
|
}
|
|
126749
127070
|
return e;
|
|
126750
127071
|
}
|
|
126751
127072
|
|
|
126752
127073
|
// ../api/src/client/types/app/bsky/feed/getActorFeeds.ts
|
|
126753
|
-
function
|
|
127074
|
+
function toKnownErr73(e) {
|
|
126754
127075
|
if (e instanceof XRPCError) {
|
|
126755
127076
|
}
|
|
126756
127077
|
return e;
|
|
@@ -126767,7 +127088,7 @@ var BlockedByActorError = class extends XRPCError {
|
|
|
126767
127088
|
super(src3.status, src3.error, src3.message, src3.headers);
|
|
126768
127089
|
}
|
|
126769
127090
|
};
|
|
126770
|
-
function
|
|
127091
|
+
function toKnownErr74(e) {
|
|
126771
127092
|
if (e instanceof XRPCError) {
|
|
126772
127093
|
if (e.error === "BlockedActor")
|
|
126773
127094
|
return new BlockedActorError(e);
|
|
@@ -126788,7 +127109,7 @@ var BlockedByActorError2 = class extends XRPCError {
|
|
|
126788
127109
|
super(src3.status, src3.error, src3.message, src3.headers);
|
|
126789
127110
|
}
|
|
126790
127111
|
};
|
|
126791
|
-
function
|
|
127112
|
+
function toKnownErr75(e) {
|
|
126792
127113
|
if (e instanceof XRPCError) {
|
|
126793
127114
|
if (e.error === "BlockedActor")
|
|
126794
127115
|
return new BlockedActorError2(e);
|
|
@@ -126804,7 +127125,7 @@ var UnknownFeedError = class extends XRPCError {
|
|
|
126804
127125
|
super(src3.status, src3.error, src3.message, src3.headers);
|
|
126805
127126
|
}
|
|
126806
127127
|
};
|
|
126807
|
-
function
|
|
127128
|
+
function toKnownErr76(e) {
|
|
126808
127129
|
if (e instanceof XRPCError) {
|
|
126809
127130
|
if (e.error === "UnknownFeed")
|
|
126810
127131
|
return new UnknownFeedError(e);
|
|
@@ -126813,14 +127134,14 @@ function toKnownErr72(e) {
|
|
|
126813
127134
|
}
|
|
126814
127135
|
|
|
126815
127136
|
// ../api/src/client/types/app/bsky/feed/getFeedGenerator.ts
|
|
126816
|
-
function
|
|
127137
|
+
function toKnownErr77(e) {
|
|
126817
127138
|
if (e instanceof XRPCError) {
|
|
126818
127139
|
}
|
|
126819
127140
|
return e;
|
|
126820
127141
|
}
|
|
126821
127142
|
|
|
126822
127143
|
// ../api/src/client/types/app/bsky/feed/getFeedGenerators.ts
|
|
126823
|
-
function
|
|
127144
|
+
function toKnownErr78(e) {
|
|
126824
127145
|
if (e instanceof XRPCError) {
|
|
126825
127146
|
}
|
|
126826
127147
|
return e;
|
|
@@ -126830,14 +127151,14 @@ function toKnownErr74(e) {
|
|
|
126830
127151
|
var getFeedSkeleton_exports = {};
|
|
126831
127152
|
__export(getFeedSkeleton_exports, {
|
|
126832
127153
|
UnknownFeedError: () => UnknownFeedError2,
|
|
126833
|
-
toKnownErr: () =>
|
|
127154
|
+
toKnownErr: () => toKnownErr79
|
|
126834
127155
|
});
|
|
126835
127156
|
var UnknownFeedError2 = class extends XRPCError {
|
|
126836
127157
|
constructor(src3) {
|
|
126837
127158
|
super(src3.status, src3.error, src3.message, src3.headers);
|
|
126838
127159
|
}
|
|
126839
127160
|
};
|
|
126840
|
-
function
|
|
127161
|
+
function toKnownErr79(e) {
|
|
126841
127162
|
if (e instanceof XRPCError) {
|
|
126842
127163
|
if (e.error === "UnknownFeed")
|
|
126843
127164
|
return new UnknownFeedError2(e);
|
|
@@ -126846,7 +127167,7 @@ function toKnownErr75(e) {
|
|
|
126846
127167
|
}
|
|
126847
127168
|
|
|
126848
127169
|
// ../api/src/client/types/app/bsky/feed/getLikes.ts
|
|
126849
|
-
function
|
|
127170
|
+
function toKnownErr80(e) {
|
|
126850
127171
|
if (e instanceof XRPCError) {
|
|
126851
127172
|
}
|
|
126852
127173
|
return e;
|
|
@@ -126858,7 +127179,7 @@ var UnknownListError = class extends XRPCError {
|
|
|
126858
127179
|
super(src3.status, src3.error, src3.message, src3.headers);
|
|
126859
127180
|
}
|
|
126860
127181
|
};
|
|
126861
|
-
function
|
|
127182
|
+
function toKnownErr81(e) {
|
|
126862
127183
|
if (e instanceof XRPCError) {
|
|
126863
127184
|
if (e.error === "UnknownList")
|
|
126864
127185
|
return new UnknownListError(e);
|
|
@@ -126872,7 +127193,7 @@ var NotFoundError = class extends XRPCError {
|
|
|
126872
127193
|
super(src3.status, src3.error, src3.message, src3.headers);
|
|
126873
127194
|
}
|
|
126874
127195
|
};
|
|
126875
|
-
function
|
|
127196
|
+
function toKnownErr82(e) {
|
|
126876
127197
|
if (e instanceof XRPCError) {
|
|
126877
127198
|
if (e.error === "NotFound")
|
|
126878
127199
|
return new NotFoundError(e);
|
|
@@ -126881,28 +127202,28 @@ function toKnownErr78(e) {
|
|
|
126881
127202
|
}
|
|
126882
127203
|
|
|
126883
127204
|
// ../api/src/client/types/app/bsky/feed/getPosts.ts
|
|
126884
|
-
function
|
|
127205
|
+
function toKnownErr83(e) {
|
|
126885
127206
|
if (e instanceof XRPCError) {
|
|
126886
127207
|
}
|
|
126887
127208
|
return e;
|
|
126888
127209
|
}
|
|
126889
127210
|
|
|
126890
127211
|
// ../api/src/client/types/app/bsky/feed/getRepostedBy.ts
|
|
126891
|
-
function
|
|
127212
|
+
function toKnownErr84(e) {
|
|
126892
127213
|
if (e instanceof XRPCError) {
|
|
126893
127214
|
}
|
|
126894
127215
|
return e;
|
|
126895
127216
|
}
|
|
126896
127217
|
|
|
126897
127218
|
// ../api/src/client/types/app/bsky/feed/getSuggestedFeeds.ts
|
|
126898
|
-
function
|
|
127219
|
+
function toKnownErr85(e) {
|
|
126899
127220
|
if (e instanceof XRPCError) {
|
|
126900
127221
|
}
|
|
126901
127222
|
return e;
|
|
126902
127223
|
}
|
|
126903
127224
|
|
|
126904
127225
|
// ../api/src/client/types/app/bsky/feed/getTimeline.ts
|
|
126905
|
-
function
|
|
127226
|
+
function toKnownErr86(e) {
|
|
126906
127227
|
if (e instanceof XRPCError) {
|
|
126907
127228
|
}
|
|
126908
127229
|
return e;
|
|
@@ -126914,7 +127235,7 @@ var BadQueryStringError = class extends XRPCError {
|
|
|
126914
127235
|
super(src3.status, src3.error, src3.message, src3.headers);
|
|
126915
127236
|
}
|
|
126916
127237
|
};
|
|
126917
|
-
function
|
|
127238
|
+
function toKnownErr87(e) {
|
|
126918
127239
|
if (e instanceof XRPCError) {
|
|
126919
127240
|
if (e.error === "BadQueryString")
|
|
126920
127241
|
return new BadQueryStringError(e);
|
|
@@ -126923,133 +127244,133 @@ function toKnownErr83(e) {
|
|
|
126923
127244
|
}
|
|
126924
127245
|
|
|
126925
127246
|
// ../api/src/client/types/app/bsky/graph/getBlocks.ts
|
|
126926
|
-
function
|
|
127247
|
+
function toKnownErr88(e) {
|
|
126927
127248
|
if (e instanceof XRPCError) {
|
|
126928
127249
|
}
|
|
126929
127250
|
return e;
|
|
126930
127251
|
}
|
|
126931
127252
|
|
|
126932
127253
|
// ../api/src/client/types/app/bsky/graph/getFollowers.ts
|
|
126933
|
-
function
|
|
127254
|
+
function toKnownErr89(e) {
|
|
126934
127255
|
if (e instanceof XRPCError) {
|
|
126935
127256
|
}
|
|
126936
127257
|
return e;
|
|
126937
127258
|
}
|
|
126938
127259
|
|
|
126939
127260
|
// ../api/src/client/types/app/bsky/graph/getFollows.ts
|
|
126940
|
-
function
|
|
127261
|
+
function toKnownErr90(e) {
|
|
126941
127262
|
if (e instanceof XRPCError) {
|
|
126942
127263
|
}
|
|
126943
127264
|
return e;
|
|
126944
127265
|
}
|
|
126945
127266
|
|
|
126946
127267
|
// ../api/src/client/types/app/bsky/graph/getList.ts
|
|
126947
|
-
function
|
|
127268
|
+
function toKnownErr91(e) {
|
|
126948
127269
|
if (e instanceof XRPCError) {
|
|
126949
127270
|
}
|
|
126950
127271
|
return e;
|
|
126951
127272
|
}
|
|
126952
127273
|
|
|
126953
127274
|
// ../api/src/client/types/app/bsky/graph/getListBlocks.ts
|
|
126954
|
-
function
|
|
127275
|
+
function toKnownErr92(e) {
|
|
126955
127276
|
if (e instanceof XRPCError) {
|
|
126956
127277
|
}
|
|
126957
127278
|
return e;
|
|
126958
127279
|
}
|
|
126959
127280
|
|
|
126960
127281
|
// ../api/src/client/types/app/bsky/graph/getListMutes.ts
|
|
126961
|
-
function
|
|
127282
|
+
function toKnownErr93(e) {
|
|
126962
127283
|
if (e instanceof XRPCError) {
|
|
126963
127284
|
}
|
|
126964
127285
|
return e;
|
|
126965
127286
|
}
|
|
126966
127287
|
|
|
126967
127288
|
// ../api/src/client/types/app/bsky/graph/getLists.ts
|
|
126968
|
-
function
|
|
127289
|
+
function toKnownErr94(e) {
|
|
126969
127290
|
if (e instanceof XRPCError) {
|
|
126970
127291
|
}
|
|
126971
127292
|
return e;
|
|
126972
127293
|
}
|
|
126973
127294
|
|
|
126974
127295
|
// ../api/src/client/types/app/bsky/graph/getMutes.ts
|
|
126975
|
-
function
|
|
127296
|
+
function toKnownErr95(e) {
|
|
126976
127297
|
if (e instanceof XRPCError) {
|
|
126977
127298
|
}
|
|
126978
127299
|
return e;
|
|
126979
127300
|
}
|
|
126980
127301
|
|
|
126981
127302
|
// ../api/src/client/types/app/bsky/graph/getSuggestedFollowsByActor.ts
|
|
126982
|
-
function
|
|
127303
|
+
function toKnownErr96(e) {
|
|
126983
127304
|
if (e instanceof XRPCError) {
|
|
126984
127305
|
}
|
|
126985
127306
|
return e;
|
|
126986
127307
|
}
|
|
126987
127308
|
|
|
126988
127309
|
// ../api/src/client/types/app/bsky/graph/muteActor.ts
|
|
126989
|
-
function
|
|
127310
|
+
function toKnownErr97(e) {
|
|
126990
127311
|
if (e instanceof XRPCError) {
|
|
126991
127312
|
}
|
|
126992
127313
|
return e;
|
|
126993
127314
|
}
|
|
126994
127315
|
|
|
126995
127316
|
// ../api/src/client/types/app/bsky/graph/muteActorList.ts
|
|
126996
|
-
function
|
|
127317
|
+
function toKnownErr98(e) {
|
|
126997
127318
|
if (e instanceof XRPCError) {
|
|
126998
127319
|
}
|
|
126999
127320
|
return e;
|
|
127000
127321
|
}
|
|
127001
127322
|
|
|
127002
127323
|
// ../api/src/client/types/app/bsky/graph/unmuteActor.ts
|
|
127003
|
-
function
|
|
127324
|
+
function toKnownErr99(e) {
|
|
127004
127325
|
if (e instanceof XRPCError) {
|
|
127005
127326
|
}
|
|
127006
127327
|
return e;
|
|
127007
127328
|
}
|
|
127008
127329
|
|
|
127009
127330
|
// ../api/src/client/types/app/bsky/graph/unmuteActorList.ts
|
|
127010
|
-
function
|
|
127331
|
+
function toKnownErr100(e) {
|
|
127011
127332
|
if (e instanceof XRPCError) {
|
|
127012
127333
|
}
|
|
127013
127334
|
return e;
|
|
127014
127335
|
}
|
|
127015
127336
|
|
|
127016
127337
|
// ../api/src/client/types/app/bsky/notification/getUnreadCount.ts
|
|
127017
|
-
function
|
|
127338
|
+
function toKnownErr101(e) {
|
|
127018
127339
|
if (e instanceof XRPCError) {
|
|
127019
127340
|
}
|
|
127020
127341
|
return e;
|
|
127021
127342
|
}
|
|
127022
127343
|
|
|
127023
127344
|
// ../api/src/client/types/app/bsky/notification/listNotifications.ts
|
|
127024
|
-
function
|
|
127345
|
+
function toKnownErr102(e) {
|
|
127025
127346
|
if (e instanceof XRPCError) {
|
|
127026
127347
|
}
|
|
127027
127348
|
return e;
|
|
127028
127349
|
}
|
|
127029
127350
|
|
|
127030
127351
|
// ../api/src/client/types/app/bsky/notification/registerPush.ts
|
|
127031
|
-
function
|
|
127352
|
+
function toKnownErr103(e) {
|
|
127032
127353
|
if (e instanceof XRPCError) {
|
|
127033
127354
|
}
|
|
127034
127355
|
return e;
|
|
127035
127356
|
}
|
|
127036
127357
|
|
|
127037
127358
|
// ../api/src/client/types/app/bsky/notification/updateSeen.ts
|
|
127038
|
-
function
|
|
127359
|
+
function toKnownErr104(e) {
|
|
127039
127360
|
if (e instanceof XRPCError) {
|
|
127040
127361
|
}
|
|
127041
127362
|
return e;
|
|
127042
127363
|
}
|
|
127043
127364
|
|
|
127044
127365
|
// ../api/src/client/types/app/bsky/unspecced/getPopular.ts
|
|
127045
|
-
function
|
|
127366
|
+
function toKnownErr105(e) {
|
|
127046
127367
|
if (e instanceof XRPCError) {
|
|
127047
127368
|
}
|
|
127048
127369
|
return e;
|
|
127049
127370
|
}
|
|
127050
127371
|
|
|
127051
127372
|
// ../api/src/client/types/app/bsky/unspecced/getPopularFeedGenerators.ts
|
|
127052
|
-
function
|
|
127373
|
+
function toKnownErr106(e) {
|
|
127053
127374
|
if (e instanceof XRPCError) {
|
|
127054
127375
|
}
|
|
127055
127376
|
return e;
|
|
@@ -127061,7 +127382,7 @@ var UnknownFeedError3 = class extends XRPCError {
|
|
|
127061
127382
|
super(src3.status, src3.error, src3.message, src3.headers);
|
|
127062
127383
|
}
|
|
127063
127384
|
};
|
|
127064
|
-
function
|
|
127385
|
+
function toKnownErr107(e) {
|
|
127065
127386
|
if (e instanceof XRPCError) {
|
|
127066
127387
|
if (e.error === "UnknownFeed")
|
|
127067
127388
|
return new UnknownFeedError3(e);
|
|
@@ -127075,7 +127396,7 @@ var BadQueryStringError2 = class extends XRPCError {
|
|
|
127075
127396
|
super(src3.status, src3.error, src3.message, src3.headers);
|
|
127076
127397
|
}
|
|
127077
127398
|
};
|
|
127078
|
-
function
|
|
127399
|
+
function toKnownErr108(e) {
|
|
127079
127400
|
if (e instanceof XRPCError) {
|
|
127080
127401
|
if (e.error === "BadQueryString")
|
|
127081
127402
|
return new BadQueryStringError2(e);
|
|
@@ -127089,7 +127410,7 @@ var BadQueryStringError3 = class extends XRPCError {
|
|
|
127089
127410
|
super(src3.status, src3.error, src3.message, src3.headers);
|
|
127090
127411
|
}
|
|
127091
127412
|
};
|
|
127092
|
-
function
|
|
127413
|
+
function toKnownErr109(e) {
|
|
127093
127414
|
if (e instanceof XRPCError) {
|
|
127094
127415
|
if (e.error === "BadQueryString")
|
|
127095
127416
|
return new BadQueryStringError3(e);
|
|
@@ -127155,74 +127476,89 @@ var AdminNS = class {
|
|
|
127155
127476
|
throw toKnownErr3(e);
|
|
127156
127477
|
});
|
|
127157
127478
|
}
|
|
127479
|
+
getAccountInfo(params2, opts) {
|
|
127480
|
+
return this._service.xrpc.call("com.atproto.admin.getAccountInfo", params2, void 0, opts).catch((e) => {
|
|
127481
|
+
throw toKnownErr4(e);
|
|
127482
|
+
});
|
|
127483
|
+
}
|
|
127158
127484
|
getInviteCodes(params2, opts) {
|
|
127159
127485
|
return this._service.xrpc.call("com.atproto.admin.getInviteCodes", params2, void 0, opts).catch((e) => {
|
|
127160
|
-
throw
|
|
127486
|
+
throw toKnownErr5(e);
|
|
127161
127487
|
});
|
|
127162
127488
|
}
|
|
127163
127489
|
getModerationAction(params2, opts) {
|
|
127164
127490
|
return this._service.xrpc.call("com.atproto.admin.getModerationAction", params2, void 0, opts).catch((e) => {
|
|
127165
|
-
throw
|
|
127491
|
+
throw toKnownErr6(e);
|
|
127166
127492
|
});
|
|
127167
127493
|
}
|
|
127168
127494
|
getModerationActions(params2, opts) {
|
|
127169
127495
|
return this._service.xrpc.call("com.atproto.admin.getModerationActions", params2, void 0, opts).catch((e) => {
|
|
127170
|
-
throw
|
|
127496
|
+
throw toKnownErr7(e);
|
|
127171
127497
|
});
|
|
127172
127498
|
}
|
|
127173
127499
|
getModerationReport(params2, opts) {
|
|
127174
127500
|
return this._service.xrpc.call("com.atproto.admin.getModerationReport", params2, void 0, opts).catch((e) => {
|
|
127175
|
-
throw
|
|
127501
|
+
throw toKnownErr8(e);
|
|
127176
127502
|
});
|
|
127177
127503
|
}
|
|
127178
127504
|
getModerationReports(params2, opts) {
|
|
127179
127505
|
return this._service.xrpc.call("com.atproto.admin.getModerationReports", params2, void 0, opts).catch((e) => {
|
|
127180
|
-
throw
|
|
127506
|
+
throw toKnownErr9(e);
|
|
127181
127507
|
});
|
|
127182
127508
|
}
|
|
127183
127509
|
getRecord(params2, opts) {
|
|
127184
127510
|
return this._service.xrpc.call("com.atproto.admin.getRecord", params2, void 0, opts).catch((e) => {
|
|
127185
|
-
throw
|
|
127511
|
+
throw toKnownErr10(e);
|
|
127186
127512
|
});
|
|
127187
127513
|
}
|
|
127188
127514
|
getRepo(params2, opts) {
|
|
127189
127515
|
return this._service.xrpc.call("com.atproto.admin.getRepo", params2, void 0, opts).catch((e) => {
|
|
127190
|
-
throw
|
|
127516
|
+
throw toKnownErr11(e);
|
|
127517
|
+
});
|
|
127518
|
+
}
|
|
127519
|
+
getSubjectStatus(params2, opts) {
|
|
127520
|
+
return this._service.xrpc.call("com.atproto.admin.getSubjectStatus", params2, void 0, opts).catch((e) => {
|
|
127521
|
+
throw toKnownErr12(e);
|
|
127191
127522
|
});
|
|
127192
127523
|
}
|
|
127193
127524
|
resolveModerationReports(data, opts) {
|
|
127194
127525
|
return this._service.xrpc.call("com.atproto.admin.resolveModerationReports", opts?.qp, data, opts).catch((e) => {
|
|
127195
|
-
throw
|
|
127526
|
+
throw toKnownErr13(e);
|
|
127196
127527
|
});
|
|
127197
127528
|
}
|
|
127198
127529
|
reverseModerationAction(data, opts) {
|
|
127199
127530
|
return this._service.xrpc.call("com.atproto.admin.reverseModerationAction", opts?.qp, data, opts).catch((e) => {
|
|
127200
|
-
throw
|
|
127531
|
+
throw toKnownErr14(e);
|
|
127201
127532
|
});
|
|
127202
127533
|
}
|
|
127203
127534
|
searchRepos(params2, opts) {
|
|
127204
127535
|
return this._service.xrpc.call("com.atproto.admin.searchRepos", params2, void 0, opts).catch((e) => {
|
|
127205
|
-
throw
|
|
127536
|
+
throw toKnownErr15(e);
|
|
127206
127537
|
});
|
|
127207
127538
|
}
|
|
127208
127539
|
sendEmail(data, opts) {
|
|
127209
127540
|
return this._service.xrpc.call("com.atproto.admin.sendEmail", opts?.qp, data, opts).catch((e) => {
|
|
127210
|
-
throw
|
|
127541
|
+
throw toKnownErr16(e);
|
|
127211
127542
|
});
|
|
127212
127543
|
}
|
|
127213
127544
|
takeModerationAction(data, opts) {
|
|
127214
127545
|
return this._service.xrpc.call("com.atproto.admin.takeModerationAction", opts?.qp, data, opts).catch((e) => {
|
|
127215
|
-
throw
|
|
127546
|
+
throw toKnownErr17(e);
|
|
127216
127547
|
});
|
|
127217
127548
|
}
|
|
127218
127549
|
updateAccountEmail(data, opts) {
|
|
127219
127550
|
return this._service.xrpc.call("com.atproto.admin.updateAccountEmail", opts?.qp, data, opts).catch((e) => {
|
|
127220
|
-
throw
|
|
127551
|
+
throw toKnownErr18(e);
|
|
127221
127552
|
});
|
|
127222
127553
|
}
|
|
127223
127554
|
updateAccountHandle(data, opts) {
|
|
127224
127555
|
return this._service.xrpc.call("com.atproto.admin.updateAccountHandle", opts?.qp, data, opts).catch((e) => {
|
|
127225
|
-
throw
|
|
127556
|
+
throw toKnownErr19(e);
|
|
127557
|
+
});
|
|
127558
|
+
}
|
|
127559
|
+
updateSubjectStatus(data, opts) {
|
|
127560
|
+
return this._service.xrpc.call("com.atproto.admin.updateSubjectStatus", opts?.qp, data, opts).catch((e) => {
|
|
127561
|
+
throw toKnownErr20(e);
|
|
127226
127562
|
});
|
|
127227
127563
|
}
|
|
127228
127564
|
};
|
|
@@ -127232,12 +127568,12 @@ var IdentityNS = class {
|
|
|
127232
127568
|
}
|
|
127233
127569
|
resolveHandle(params2, opts) {
|
|
127234
127570
|
return this._service.xrpc.call("com.atproto.identity.resolveHandle", params2, void 0, opts).catch((e) => {
|
|
127235
|
-
throw
|
|
127571
|
+
throw toKnownErr21(e);
|
|
127236
127572
|
});
|
|
127237
127573
|
}
|
|
127238
127574
|
updateHandle(data, opts) {
|
|
127239
127575
|
return this._service.xrpc.call("com.atproto.identity.updateHandle", opts?.qp, data, opts).catch((e) => {
|
|
127240
|
-
throw
|
|
127576
|
+
throw toKnownErr22(e);
|
|
127241
127577
|
});
|
|
127242
127578
|
}
|
|
127243
127579
|
};
|
|
@@ -127247,7 +127583,7 @@ var LabelNS = class {
|
|
|
127247
127583
|
}
|
|
127248
127584
|
queryLabels(params2, opts) {
|
|
127249
127585
|
return this._service.xrpc.call("com.atproto.label.queryLabels", params2, void 0, opts).catch((e) => {
|
|
127250
|
-
throw
|
|
127586
|
+
throw toKnownErr23(e);
|
|
127251
127587
|
});
|
|
127252
127588
|
}
|
|
127253
127589
|
};
|
|
@@ -127257,7 +127593,7 @@ var ModerationNS = class {
|
|
|
127257
127593
|
}
|
|
127258
127594
|
createReport(data, opts) {
|
|
127259
127595
|
return this._service.xrpc.call("com.atproto.moderation.createReport", opts?.qp, data, opts).catch((e) => {
|
|
127260
|
-
throw
|
|
127596
|
+
throw toKnownErr24(e);
|
|
127261
127597
|
});
|
|
127262
127598
|
}
|
|
127263
127599
|
};
|
|
@@ -127267,42 +127603,42 @@ var RepoNS = class {
|
|
|
127267
127603
|
}
|
|
127268
127604
|
applyWrites(data, opts) {
|
|
127269
127605
|
return this._service.xrpc.call("com.atproto.repo.applyWrites", opts?.qp, data, opts).catch((e) => {
|
|
127270
|
-
throw
|
|
127606
|
+
throw toKnownErr25(e);
|
|
127271
127607
|
});
|
|
127272
127608
|
}
|
|
127273
127609
|
createRecord(data, opts) {
|
|
127274
127610
|
return this._service.xrpc.call("com.atproto.repo.createRecord", opts?.qp, data, opts).catch((e) => {
|
|
127275
|
-
throw
|
|
127611
|
+
throw toKnownErr26(e);
|
|
127276
127612
|
});
|
|
127277
127613
|
}
|
|
127278
127614
|
deleteRecord(data, opts) {
|
|
127279
127615
|
return this._service.xrpc.call("com.atproto.repo.deleteRecord", opts?.qp, data, opts).catch((e) => {
|
|
127280
|
-
throw
|
|
127616
|
+
throw toKnownErr27(e);
|
|
127281
127617
|
});
|
|
127282
127618
|
}
|
|
127283
127619
|
describeRepo(params2, opts) {
|
|
127284
127620
|
return this._service.xrpc.call("com.atproto.repo.describeRepo", params2, void 0, opts).catch((e) => {
|
|
127285
|
-
throw
|
|
127621
|
+
throw toKnownErr28(e);
|
|
127286
127622
|
});
|
|
127287
127623
|
}
|
|
127288
127624
|
getRecord(params2, opts) {
|
|
127289
127625
|
return this._service.xrpc.call("com.atproto.repo.getRecord", params2, void 0, opts).catch((e) => {
|
|
127290
|
-
throw
|
|
127626
|
+
throw toKnownErr29(e);
|
|
127291
127627
|
});
|
|
127292
127628
|
}
|
|
127293
127629
|
listRecords(params2, opts) {
|
|
127294
127630
|
return this._service.xrpc.call("com.atproto.repo.listRecords", params2, void 0, opts).catch((e) => {
|
|
127295
|
-
throw
|
|
127631
|
+
throw toKnownErr30(e);
|
|
127296
127632
|
});
|
|
127297
127633
|
}
|
|
127298
127634
|
putRecord(data, opts) {
|
|
127299
127635
|
return this._service.xrpc.call("com.atproto.repo.putRecord", opts?.qp, data, opts).catch((e) => {
|
|
127300
|
-
throw
|
|
127636
|
+
throw toKnownErr31(e);
|
|
127301
127637
|
});
|
|
127302
127638
|
}
|
|
127303
127639
|
uploadBlob(data, opts) {
|
|
127304
127640
|
return this._service.xrpc.call("com.atproto.repo.uploadBlob", opts?.qp, data, opts).catch((e) => {
|
|
127305
|
-
throw
|
|
127641
|
+
throw toKnownErr32(e);
|
|
127306
127642
|
});
|
|
127307
127643
|
}
|
|
127308
127644
|
};
|
|
@@ -127312,102 +127648,107 @@ var ServerNS = class {
|
|
|
127312
127648
|
}
|
|
127313
127649
|
confirmEmail(data, opts) {
|
|
127314
127650
|
return this._service.xrpc.call("com.atproto.server.confirmEmail", opts?.qp, data, opts).catch((e) => {
|
|
127315
|
-
throw
|
|
127651
|
+
throw toKnownErr33(e);
|
|
127316
127652
|
});
|
|
127317
127653
|
}
|
|
127318
127654
|
createAccount(data, opts) {
|
|
127319
127655
|
return this._service.xrpc.call("com.atproto.server.createAccount", opts?.qp, data, opts).catch((e) => {
|
|
127320
|
-
throw
|
|
127656
|
+
throw toKnownErr34(e);
|
|
127321
127657
|
});
|
|
127322
127658
|
}
|
|
127323
127659
|
createAppPassword(data, opts) {
|
|
127324
127660
|
return this._service.xrpc.call("com.atproto.server.createAppPassword", opts?.qp, data, opts).catch((e) => {
|
|
127325
|
-
throw
|
|
127661
|
+
throw toKnownErr35(e);
|
|
127326
127662
|
});
|
|
127327
127663
|
}
|
|
127328
127664
|
createInviteCode(data, opts) {
|
|
127329
127665
|
return this._service.xrpc.call("com.atproto.server.createInviteCode", opts?.qp, data, opts).catch((e) => {
|
|
127330
|
-
throw
|
|
127666
|
+
throw toKnownErr36(e);
|
|
127331
127667
|
});
|
|
127332
127668
|
}
|
|
127333
127669
|
createInviteCodes(data, opts) {
|
|
127334
127670
|
return this._service.xrpc.call("com.atproto.server.createInviteCodes", opts?.qp, data, opts).catch((e) => {
|
|
127335
|
-
throw
|
|
127671
|
+
throw toKnownErr37(e);
|
|
127336
127672
|
});
|
|
127337
127673
|
}
|
|
127338
127674
|
createSession(data, opts) {
|
|
127339
127675
|
return this._service.xrpc.call("com.atproto.server.createSession", opts?.qp, data, opts).catch((e) => {
|
|
127340
|
-
throw
|
|
127676
|
+
throw toKnownErr38(e);
|
|
127341
127677
|
});
|
|
127342
127678
|
}
|
|
127343
127679
|
deleteAccount(data, opts) {
|
|
127344
127680
|
return this._service.xrpc.call("com.atproto.server.deleteAccount", opts?.qp, data, opts).catch((e) => {
|
|
127345
|
-
throw
|
|
127681
|
+
throw toKnownErr39(e);
|
|
127346
127682
|
});
|
|
127347
127683
|
}
|
|
127348
127684
|
deleteSession(data, opts) {
|
|
127349
127685
|
return this._service.xrpc.call("com.atproto.server.deleteSession", opts?.qp, data, opts).catch((e) => {
|
|
127350
|
-
throw
|
|
127686
|
+
throw toKnownErr40(e);
|
|
127351
127687
|
});
|
|
127352
127688
|
}
|
|
127353
127689
|
describeServer(params2, opts) {
|
|
127354
127690
|
return this._service.xrpc.call("com.atproto.server.describeServer", params2, void 0, opts).catch((e) => {
|
|
127355
|
-
throw
|
|
127691
|
+
throw toKnownErr41(e);
|
|
127356
127692
|
});
|
|
127357
127693
|
}
|
|
127358
127694
|
getAccountInviteCodes(params2, opts) {
|
|
127359
127695
|
return this._service.xrpc.call("com.atproto.server.getAccountInviteCodes", params2, void 0, opts).catch((e) => {
|
|
127360
|
-
throw
|
|
127696
|
+
throw toKnownErr42(e);
|
|
127361
127697
|
});
|
|
127362
127698
|
}
|
|
127363
127699
|
getSession(params2, opts) {
|
|
127364
127700
|
return this._service.xrpc.call("com.atproto.server.getSession", params2, void 0, opts).catch((e) => {
|
|
127365
|
-
throw
|
|
127701
|
+
throw toKnownErr43(e);
|
|
127366
127702
|
});
|
|
127367
127703
|
}
|
|
127368
127704
|
listAppPasswords(params2, opts) {
|
|
127369
127705
|
return this._service.xrpc.call("com.atproto.server.listAppPasswords", params2, void 0, opts).catch((e) => {
|
|
127370
|
-
throw
|
|
127706
|
+
throw toKnownErr44(e);
|
|
127371
127707
|
});
|
|
127372
127708
|
}
|
|
127373
127709
|
refreshSession(data, opts) {
|
|
127374
127710
|
return this._service.xrpc.call("com.atproto.server.refreshSession", opts?.qp, data, opts).catch((e) => {
|
|
127375
|
-
throw
|
|
127711
|
+
throw toKnownErr45(e);
|
|
127376
127712
|
});
|
|
127377
127713
|
}
|
|
127378
127714
|
requestAccountDelete(data, opts) {
|
|
127379
127715
|
return this._service.xrpc.call("com.atproto.server.requestAccountDelete", opts?.qp, data, opts).catch((e) => {
|
|
127380
|
-
throw
|
|
127716
|
+
throw toKnownErr46(e);
|
|
127381
127717
|
});
|
|
127382
127718
|
}
|
|
127383
127719
|
requestEmailConfirmation(data, opts) {
|
|
127384
127720
|
return this._service.xrpc.call("com.atproto.server.requestEmailConfirmation", opts?.qp, data, opts).catch((e) => {
|
|
127385
|
-
throw
|
|
127721
|
+
throw toKnownErr47(e);
|
|
127386
127722
|
});
|
|
127387
127723
|
}
|
|
127388
127724
|
requestEmailUpdate(data, opts) {
|
|
127389
127725
|
return this._service.xrpc.call("com.atproto.server.requestEmailUpdate", opts?.qp, data, opts).catch((e) => {
|
|
127390
|
-
throw
|
|
127726
|
+
throw toKnownErr48(e);
|
|
127391
127727
|
});
|
|
127392
127728
|
}
|
|
127393
127729
|
requestPasswordReset(data, opts) {
|
|
127394
127730
|
return this._service.xrpc.call("com.atproto.server.requestPasswordReset", opts?.qp, data, opts).catch((e) => {
|
|
127395
|
-
throw
|
|
127731
|
+
throw toKnownErr49(e);
|
|
127732
|
+
});
|
|
127733
|
+
}
|
|
127734
|
+
reserveSigningKey(data, opts) {
|
|
127735
|
+
return this._service.xrpc.call("com.atproto.server.reserveSigningKey", opts?.qp, data, opts).catch((e) => {
|
|
127736
|
+
throw toKnownErr50(e);
|
|
127396
127737
|
});
|
|
127397
127738
|
}
|
|
127398
127739
|
resetPassword(data, opts) {
|
|
127399
127740
|
return this._service.xrpc.call("com.atproto.server.resetPassword", opts?.qp, data, opts).catch((e) => {
|
|
127400
|
-
throw
|
|
127741
|
+
throw toKnownErr51(e);
|
|
127401
127742
|
});
|
|
127402
127743
|
}
|
|
127403
127744
|
revokeAppPassword(data, opts) {
|
|
127404
127745
|
return this._service.xrpc.call("com.atproto.server.revokeAppPassword", opts?.qp, data, opts).catch((e) => {
|
|
127405
|
-
throw
|
|
127746
|
+
throw toKnownErr52(e);
|
|
127406
127747
|
});
|
|
127407
127748
|
}
|
|
127408
127749
|
updateEmail(data, opts) {
|
|
127409
127750
|
return this._service.xrpc.call("com.atproto.server.updateEmail", opts?.qp, data, opts).catch((e) => {
|
|
127410
|
-
throw
|
|
127751
|
+
throw toKnownErr53(e);
|
|
127411
127752
|
});
|
|
127412
127753
|
}
|
|
127413
127754
|
};
|
|
@@ -127417,57 +127758,57 @@ var SyncNS = class {
|
|
|
127417
127758
|
}
|
|
127418
127759
|
getBlob(params2, opts) {
|
|
127419
127760
|
return this._service.xrpc.call("com.atproto.sync.getBlob", params2, void 0, opts).catch((e) => {
|
|
127420
|
-
throw
|
|
127761
|
+
throw toKnownErr54(e);
|
|
127421
127762
|
});
|
|
127422
127763
|
}
|
|
127423
127764
|
getBlocks(params2, opts) {
|
|
127424
127765
|
return this._service.xrpc.call("com.atproto.sync.getBlocks", params2, void 0, opts).catch((e) => {
|
|
127425
|
-
throw
|
|
127766
|
+
throw toKnownErr55(e);
|
|
127426
127767
|
});
|
|
127427
127768
|
}
|
|
127428
127769
|
getCheckout(params2, opts) {
|
|
127429
127770
|
return this._service.xrpc.call("com.atproto.sync.getCheckout", params2, void 0, opts).catch((e) => {
|
|
127430
|
-
throw
|
|
127771
|
+
throw toKnownErr56(e);
|
|
127431
127772
|
});
|
|
127432
127773
|
}
|
|
127433
127774
|
getHead(params2, opts) {
|
|
127434
127775
|
return this._service.xrpc.call("com.atproto.sync.getHead", params2, void 0, opts).catch((e) => {
|
|
127435
|
-
throw
|
|
127776
|
+
throw toKnownErr57(e);
|
|
127436
127777
|
});
|
|
127437
127778
|
}
|
|
127438
127779
|
getLatestCommit(params2, opts) {
|
|
127439
127780
|
return this._service.xrpc.call("com.atproto.sync.getLatestCommit", params2, void 0, opts).catch((e) => {
|
|
127440
|
-
throw
|
|
127781
|
+
throw toKnownErr58(e);
|
|
127441
127782
|
});
|
|
127442
127783
|
}
|
|
127443
127784
|
getRecord(params2, opts) {
|
|
127444
127785
|
return this._service.xrpc.call("com.atproto.sync.getRecord", params2, void 0, opts).catch((e) => {
|
|
127445
|
-
throw
|
|
127786
|
+
throw toKnownErr59(e);
|
|
127446
127787
|
});
|
|
127447
127788
|
}
|
|
127448
127789
|
getRepo(params2, opts) {
|
|
127449
127790
|
return this._service.xrpc.call("com.atproto.sync.getRepo", params2, void 0, opts).catch((e) => {
|
|
127450
|
-
throw
|
|
127791
|
+
throw toKnownErr60(e);
|
|
127451
127792
|
});
|
|
127452
127793
|
}
|
|
127453
127794
|
listBlobs(params2, opts) {
|
|
127454
127795
|
return this._service.xrpc.call("com.atproto.sync.listBlobs", params2, void 0, opts).catch((e) => {
|
|
127455
|
-
throw
|
|
127796
|
+
throw toKnownErr61(e);
|
|
127456
127797
|
});
|
|
127457
127798
|
}
|
|
127458
127799
|
listRepos(params2, opts) {
|
|
127459
127800
|
return this._service.xrpc.call("com.atproto.sync.listRepos", params2, void 0, opts).catch((e) => {
|
|
127460
|
-
throw
|
|
127801
|
+
throw toKnownErr62(e);
|
|
127461
127802
|
});
|
|
127462
127803
|
}
|
|
127463
127804
|
notifyOfUpdate(data, opts) {
|
|
127464
127805
|
return this._service.xrpc.call("com.atproto.sync.notifyOfUpdate", opts?.qp, data, opts).catch((e) => {
|
|
127465
|
-
throw
|
|
127806
|
+
throw toKnownErr63(e);
|
|
127466
127807
|
});
|
|
127467
127808
|
}
|
|
127468
127809
|
requestCrawl(data, opts) {
|
|
127469
127810
|
return this._service.xrpc.call("com.atproto.sync.requestCrawl", opts?.qp, data, opts).catch((e) => {
|
|
127470
|
-
throw
|
|
127811
|
+
throw toKnownErr64(e);
|
|
127471
127812
|
});
|
|
127472
127813
|
}
|
|
127473
127814
|
};
|
|
@@ -127496,37 +127837,37 @@ var ActorNS = class {
|
|
|
127496
127837
|
}
|
|
127497
127838
|
getPreferences(params2, opts) {
|
|
127498
127839
|
return this._service.xrpc.call("app.bsky.actor.getPreferences", params2, void 0, opts).catch((e) => {
|
|
127499
|
-
throw
|
|
127840
|
+
throw toKnownErr65(e);
|
|
127500
127841
|
});
|
|
127501
127842
|
}
|
|
127502
127843
|
getProfile(params2, opts) {
|
|
127503
127844
|
return this._service.xrpc.call("app.bsky.actor.getProfile", params2, void 0, opts).catch((e) => {
|
|
127504
|
-
throw
|
|
127845
|
+
throw toKnownErr66(e);
|
|
127505
127846
|
});
|
|
127506
127847
|
}
|
|
127507
127848
|
getProfiles(params2, opts) {
|
|
127508
127849
|
return this._service.xrpc.call("app.bsky.actor.getProfiles", params2, void 0, opts).catch((e) => {
|
|
127509
|
-
throw
|
|
127850
|
+
throw toKnownErr67(e);
|
|
127510
127851
|
});
|
|
127511
127852
|
}
|
|
127512
127853
|
getSuggestions(params2, opts) {
|
|
127513
127854
|
return this._service.xrpc.call("app.bsky.actor.getSuggestions", params2, void 0, opts).catch((e) => {
|
|
127514
|
-
throw
|
|
127855
|
+
throw toKnownErr68(e);
|
|
127515
127856
|
});
|
|
127516
127857
|
}
|
|
127517
127858
|
putPreferences(data, opts) {
|
|
127518
127859
|
return this._service.xrpc.call("app.bsky.actor.putPreferences", opts?.qp, data, opts).catch((e) => {
|
|
127519
|
-
throw
|
|
127860
|
+
throw toKnownErr69(e);
|
|
127520
127861
|
});
|
|
127521
127862
|
}
|
|
127522
127863
|
searchActors(params2, opts) {
|
|
127523
127864
|
return this._service.xrpc.call("app.bsky.actor.searchActors", params2, void 0, opts).catch((e) => {
|
|
127524
|
-
throw
|
|
127865
|
+
throw toKnownErr70(e);
|
|
127525
127866
|
});
|
|
127526
127867
|
}
|
|
127527
127868
|
searchActorsTypeahead(params2, opts) {
|
|
127528
127869
|
return this._service.xrpc.call("app.bsky.actor.searchActorsTypeahead", params2, void 0, opts).catch((e) => {
|
|
127529
|
-
throw
|
|
127870
|
+
throw toKnownErr71(e);
|
|
127530
127871
|
});
|
|
127531
127872
|
}
|
|
127532
127873
|
};
|
|
@@ -127573,82 +127914,82 @@ var FeedNS = class {
|
|
|
127573
127914
|
}
|
|
127574
127915
|
describeFeedGenerator(params2, opts) {
|
|
127575
127916
|
return this._service.xrpc.call("app.bsky.feed.describeFeedGenerator", params2, void 0, opts).catch((e) => {
|
|
127576
|
-
throw
|
|
127917
|
+
throw toKnownErr72(e);
|
|
127577
127918
|
});
|
|
127578
127919
|
}
|
|
127579
127920
|
getActorFeeds(params2, opts) {
|
|
127580
127921
|
return this._service.xrpc.call("app.bsky.feed.getActorFeeds", params2, void 0, opts).catch((e) => {
|
|
127581
|
-
throw
|
|
127922
|
+
throw toKnownErr73(e);
|
|
127582
127923
|
});
|
|
127583
127924
|
}
|
|
127584
127925
|
getActorLikes(params2, opts) {
|
|
127585
127926
|
return this._service.xrpc.call("app.bsky.feed.getActorLikes", params2, void 0, opts).catch((e) => {
|
|
127586
|
-
throw
|
|
127927
|
+
throw toKnownErr74(e);
|
|
127587
127928
|
});
|
|
127588
127929
|
}
|
|
127589
127930
|
getAuthorFeed(params2, opts) {
|
|
127590
127931
|
return this._service.xrpc.call("app.bsky.feed.getAuthorFeed", params2, void 0, opts).catch((e) => {
|
|
127591
|
-
throw
|
|
127932
|
+
throw toKnownErr75(e);
|
|
127592
127933
|
});
|
|
127593
127934
|
}
|
|
127594
127935
|
getFeed(params2, opts) {
|
|
127595
127936
|
return this._service.xrpc.call("app.bsky.feed.getFeed", params2, void 0, opts).catch((e) => {
|
|
127596
|
-
throw
|
|
127937
|
+
throw toKnownErr76(e);
|
|
127597
127938
|
});
|
|
127598
127939
|
}
|
|
127599
127940
|
getFeedGenerator(params2, opts) {
|
|
127600
127941
|
return this._service.xrpc.call("app.bsky.feed.getFeedGenerator", params2, void 0, opts).catch((e) => {
|
|
127601
|
-
throw
|
|
127942
|
+
throw toKnownErr77(e);
|
|
127602
127943
|
});
|
|
127603
127944
|
}
|
|
127604
127945
|
getFeedGenerators(params2, opts) {
|
|
127605
127946
|
return this._service.xrpc.call("app.bsky.feed.getFeedGenerators", params2, void 0, opts).catch((e) => {
|
|
127606
|
-
throw
|
|
127947
|
+
throw toKnownErr78(e);
|
|
127607
127948
|
});
|
|
127608
127949
|
}
|
|
127609
127950
|
getFeedSkeleton(params2, opts) {
|
|
127610
127951
|
return this._service.xrpc.call("app.bsky.feed.getFeedSkeleton", params2, void 0, opts).catch((e) => {
|
|
127611
|
-
throw
|
|
127952
|
+
throw toKnownErr79(e);
|
|
127612
127953
|
});
|
|
127613
127954
|
}
|
|
127614
127955
|
getLikes(params2, opts) {
|
|
127615
127956
|
return this._service.xrpc.call("app.bsky.feed.getLikes", params2, void 0, opts).catch((e) => {
|
|
127616
|
-
throw
|
|
127957
|
+
throw toKnownErr80(e);
|
|
127617
127958
|
});
|
|
127618
127959
|
}
|
|
127619
127960
|
getListFeed(params2, opts) {
|
|
127620
127961
|
return this._service.xrpc.call("app.bsky.feed.getListFeed", params2, void 0, opts).catch((e) => {
|
|
127621
|
-
throw
|
|
127962
|
+
throw toKnownErr81(e);
|
|
127622
127963
|
});
|
|
127623
127964
|
}
|
|
127624
127965
|
getPostThread(params2, opts) {
|
|
127625
127966
|
return this._service.xrpc.call("app.bsky.feed.getPostThread", params2, void 0, opts).catch((e) => {
|
|
127626
|
-
throw
|
|
127967
|
+
throw toKnownErr82(e);
|
|
127627
127968
|
});
|
|
127628
127969
|
}
|
|
127629
127970
|
getPosts(params2, opts) {
|
|
127630
127971
|
return this._service.xrpc.call("app.bsky.feed.getPosts", params2, void 0, opts).catch((e) => {
|
|
127631
|
-
throw
|
|
127972
|
+
throw toKnownErr83(e);
|
|
127632
127973
|
});
|
|
127633
127974
|
}
|
|
127634
127975
|
getRepostedBy(params2, opts) {
|
|
127635
127976
|
return this._service.xrpc.call("app.bsky.feed.getRepostedBy", params2, void 0, opts).catch((e) => {
|
|
127636
|
-
throw
|
|
127977
|
+
throw toKnownErr84(e);
|
|
127637
127978
|
});
|
|
127638
127979
|
}
|
|
127639
127980
|
getSuggestedFeeds(params2, opts) {
|
|
127640
127981
|
return this._service.xrpc.call("app.bsky.feed.getSuggestedFeeds", params2, void 0, opts).catch((e) => {
|
|
127641
|
-
throw
|
|
127982
|
+
throw toKnownErr85(e);
|
|
127642
127983
|
});
|
|
127643
127984
|
}
|
|
127644
127985
|
getTimeline(params2, opts) {
|
|
127645
127986
|
return this._service.xrpc.call("app.bsky.feed.getTimeline", params2, void 0, opts).catch((e) => {
|
|
127646
|
-
throw
|
|
127987
|
+
throw toKnownErr86(e);
|
|
127647
127988
|
});
|
|
127648
127989
|
}
|
|
127649
127990
|
searchPosts(params2, opts) {
|
|
127650
127991
|
return this._service.xrpc.call("app.bsky.feed.searchPosts", params2, void 0, opts).catch((e) => {
|
|
127651
|
-
throw
|
|
127992
|
+
throw toKnownErr87(e);
|
|
127652
127993
|
});
|
|
127653
127994
|
}
|
|
127654
127995
|
};
|
|
@@ -127798,67 +128139,67 @@ var GraphNS = class {
|
|
|
127798
128139
|
}
|
|
127799
128140
|
getBlocks(params2, opts) {
|
|
127800
128141
|
return this._service.xrpc.call("app.bsky.graph.getBlocks", params2, void 0, opts).catch((e) => {
|
|
127801
|
-
throw
|
|
128142
|
+
throw toKnownErr88(e);
|
|
127802
128143
|
});
|
|
127803
128144
|
}
|
|
127804
128145
|
getFollowers(params2, opts) {
|
|
127805
128146
|
return this._service.xrpc.call("app.bsky.graph.getFollowers", params2, void 0, opts).catch((e) => {
|
|
127806
|
-
throw
|
|
128147
|
+
throw toKnownErr89(e);
|
|
127807
128148
|
});
|
|
127808
128149
|
}
|
|
127809
128150
|
getFollows(params2, opts) {
|
|
127810
128151
|
return this._service.xrpc.call("app.bsky.graph.getFollows", params2, void 0, opts).catch((e) => {
|
|
127811
|
-
throw
|
|
128152
|
+
throw toKnownErr90(e);
|
|
127812
128153
|
});
|
|
127813
128154
|
}
|
|
127814
128155
|
getList(params2, opts) {
|
|
127815
128156
|
return this._service.xrpc.call("app.bsky.graph.getList", params2, void 0, opts).catch((e) => {
|
|
127816
|
-
throw
|
|
128157
|
+
throw toKnownErr91(e);
|
|
127817
128158
|
});
|
|
127818
128159
|
}
|
|
127819
128160
|
getListBlocks(params2, opts) {
|
|
127820
128161
|
return this._service.xrpc.call("app.bsky.graph.getListBlocks", params2, void 0, opts).catch((e) => {
|
|
127821
|
-
throw
|
|
128162
|
+
throw toKnownErr92(e);
|
|
127822
128163
|
});
|
|
127823
128164
|
}
|
|
127824
128165
|
getListMutes(params2, opts) {
|
|
127825
128166
|
return this._service.xrpc.call("app.bsky.graph.getListMutes", params2, void 0, opts).catch((e) => {
|
|
127826
|
-
throw
|
|
128167
|
+
throw toKnownErr93(e);
|
|
127827
128168
|
});
|
|
127828
128169
|
}
|
|
127829
128170
|
getLists(params2, opts) {
|
|
127830
128171
|
return this._service.xrpc.call("app.bsky.graph.getLists", params2, void 0, opts).catch((e) => {
|
|
127831
|
-
throw
|
|
128172
|
+
throw toKnownErr94(e);
|
|
127832
128173
|
});
|
|
127833
128174
|
}
|
|
127834
128175
|
getMutes(params2, opts) {
|
|
127835
128176
|
return this._service.xrpc.call("app.bsky.graph.getMutes", params2, void 0, opts).catch((e) => {
|
|
127836
|
-
throw
|
|
128177
|
+
throw toKnownErr95(e);
|
|
127837
128178
|
});
|
|
127838
128179
|
}
|
|
127839
128180
|
getSuggestedFollowsByActor(params2, opts) {
|
|
127840
128181
|
return this._service.xrpc.call("app.bsky.graph.getSuggestedFollowsByActor", params2, void 0, opts).catch((e) => {
|
|
127841
|
-
throw
|
|
128182
|
+
throw toKnownErr96(e);
|
|
127842
128183
|
});
|
|
127843
128184
|
}
|
|
127844
128185
|
muteActor(data, opts) {
|
|
127845
128186
|
return this._service.xrpc.call("app.bsky.graph.muteActor", opts?.qp, data, opts).catch((e) => {
|
|
127846
|
-
throw
|
|
128187
|
+
throw toKnownErr97(e);
|
|
127847
128188
|
});
|
|
127848
128189
|
}
|
|
127849
128190
|
muteActorList(data, opts) {
|
|
127850
128191
|
return this._service.xrpc.call("app.bsky.graph.muteActorList", opts?.qp, data, opts).catch((e) => {
|
|
127851
|
-
throw
|
|
128192
|
+
throw toKnownErr98(e);
|
|
127852
128193
|
});
|
|
127853
128194
|
}
|
|
127854
128195
|
unmuteActor(data, opts) {
|
|
127855
128196
|
return this._service.xrpc.call("app.bsky.graph.unmuteActor", opts?.qp, data, opts).catch((e) => {
|
|
127856
|
-
throw
|
|
128197
|
+
throw toKnownErr99(e);
|
|
127857
128198
|
});
|
|
127858
128199
|
}
|
|
127859
128200
|
unmuteActorList(data, opts) {
|
|
127860
128201
|
return this._service.xrpc.call("app.bsky.graph.unmuteActorList", opts?.qp, data, opts).catch((e) => {
|
|
127861
|
-
throw
|
|
128202
|
+
throw toKnownErr100(e);
|
|
127862
128203
|
});
|
|
127863
128204
|
}
|
|
127864
128205
|
};
|
|
@@ -128003,22 +128344,22 @@ var NotificationNS = class {
|
|
|
128003
128344
|
}
|
|
128004
128345
|
getUnreadCount(params2, opts) {
|
|
128005
128346
|
return this._service.xrpc.call("app.bsky.notification.getUnreadCount", params2, void 0, opts).catch((e) => {
|
|
128006
|
-
throw
|
|
128347
|
+
throw toKnownErr101(e);
|
|
128007
128348
|
});
|
|
128008
128349
|
}
|
|
128009
128350
|
listNotifications(params2, opts) {
|
|
128010
128351
|
return this._service.xrpc.call("app.bsky.notification.listNotifications", params2, void 0, opts).catch((e) => {
|
|
128011
|
-
throw
|
|
128352
|
+
throw toKnownErr102(e);
|
|
128012
128353
|
});
|
|
128013
128354
|
}
|
|
128014
128355
|
registerPush(data, opts) {
|
|
128015
128356
|
return this._service.xrpc.call("app.bsky.notification.registerPush", opts?.qp, data, opts).catch((e) => {
|
|
128016
|
-
throw
|
|
128357
|
+
throw toKnownErr103(e);
|
|
128017
128358
|
});
|
|
128018
128359
|
}
|
|
128019
128360
|
updateSeen(data, opts) {
|
|
128020
128361
|
return this._service.xrpc.call("app.bsky.notification.updateSeen", opts?.qp, data, opts).catch((e) => {
|
|
128021
|
-
throw
|
|
128362
|
+
throw toKnownErr104(e);
|
|
128022
128363
|
});
|
|
128023
128364
|
}
|
|
128024
128365
|
};
|
|
@@ -128033,27 +128374,27 @@ var UnspeccedNS = class {
|
|
|
128033
128374
|
}
|
|
128034
128375
|
getPopular(params2, opts) {
|
|
128035
128376
|
return this._service.xrpc.call("app.bsky.unspecced.getPopular", params2, void 0, opts).catch((e) => {
|
|
128036
|
-
throw
|
|
128377
|
+
throw toKnownErr105(e);
|
|
128037
128378
|
});
|
|
128038
128379
|
}
|
|
128039
128380
|
getPopularFeedGenerators(params2, opts) {
|
|
128040
128381
|
return this._service.xrpc.call("app.bsky.unspecced.getPopularFeedGenerators", params2, void 0, opts).catch((e) => {
|
|
128041
|
-
throw
|
|
128382
|
+
throw toKnownErr106(e);
|
|
128042
128383
|
});
|
|
128043
128384
|
}
|
|
128044
128385
|
getTimelineSkeleton(params2, opts) {
|
|
128045
128386
|
return this._service.xrpc.call("app.bsky.unspecced.getTimelineSkeleton", params2, void 0, opts).catch((e) => {
|
|
128046
|
-
throw
|
|
128387
|
+
throw toKnownErr107(e);
|
|
128047
128388
|
});
|
|
128048
128389
|
}
|
|
128049
128390
|
searchActorsSkeleton(params2, opts) {
|
|
128050
128391
|
return this._service.xrpc.call("app.bsky.unspecced.searchActorsSkeleton", params2, void 0, opts).catch((e) => {
|
|
128051
|
-
throw
|
|
128392
|
+
throw toKnownErr108(e);
|
|
128052
128393
|
});
|
|
128053
128394
|
}
|
|
128054
128395
|
searchPostsSkeleton(params2, opts) {
|
|
128055
128396
|
return this._service.xrpc.call("app.bsky.unspecced.searchPostsSkeleton", params2, void 0, opts).catch((e) => {
|
|
128056
|
-
throw
|
|
128397
|
+
throw toKnownErr109(e);
|
|
128057
128398
|
});
|
|
128058
128399
|
}
|
|
128059
128400
|
};
|
|
@@ -128100,6 +128441,7 @@ var _AtpAgent = class {
|
|
|
128100
128441
|
email: opts.email,
|
|
128101
128442
|
emailConfirmed: false
|
|
128102
128443
|
};
|
|
128444
|
+
this._updateApiEndpoint(res.data.didDoc);
|
|
128103
128445
|
return res;
|
|
128104
128446
|
} catch (e) {
|
|
128105
128447
|
this.session = void 0;
|
|
@@ -128126,6 +128468,7 @@ var _AtpAgent = class {
|
|
|
128126
128468
|
email: res.data.email,
|
|
128127
128469
|
emailConfirmed: res.data.emailConfirmed
|
|
128128
128470
|
};
|
|
128471
|
+
this._updateApiEndpoint(res.data.didDoc);
|
|
128129
128472
|
return res;
|
|
128130
128473
|
} catch (e) {
|
|
128131
128474
|
this.session = void 0;
|
|
@@ -128199,7 +128542,7 @@ var _AtpAgent = class {
|
|
|
128199
128542
|
if (!this.session?.refreshJwt) {
|
|
128200
128543
|
return;
|
|
128201
128544
|
}
|
|
128202
|
-
const url = new URL(this.service.origin);
|
|
128545
|
+
const url = new URL((this.pdsUrl || this.service).origin);
|
|
128203
128546
|
url.pathname = `/xrpc/${REFRESH_SESSION}`;
|
|
128204
128547
|
const res = await _AtpAgent.fetch(url.toString(), "POST", {
|
|
128205
128548
|
authorization: `Bearer ${this.session.refreshJwt}`
|
|
@@ -128215,9 +128558,17 @@ var _AtpAgent = class {
|
|
|
128215
128558
|
handle: res.body.handle,
|
|
128216
128559
|
did: res.body.did
|
|
128217
128560
|
};
|
|
128561
|
+
this._updateApiEndpoint(res.body.didDoc);
|
|
128218
128562
|
this._persistSession?.("update", this.session);
|
|
128219
128563
|
}
|
|
128220
128564
|
}
|
|
128565
|
+
_updateApiEndpoint(didDoc) {
|
|
128566
|
+
if (isValidDidDoc(didDoc)) {
|
|
128567
|
+
const endpoint = getPdsEndpoint(didDoc);
|
|
128568
|
+
this.pdsUrl = endpoint ? new URL(endpoint) : void 0;
|
|
128569
|
+
}
|
|
128570
|
+
this.api.xrpc.uri = this.pdsUrl || this.service;
|
|
128571
|
+
}
|
|
128221
128572
|
};
|
|
128222
128573
|
var AtpAgent = _AtpAgent;
|
|
128223
128574
|
AtpAgent.fetch = defaultFetchHandler;
|
|
@@ -129238,7 +129589,7 @@ var skeletonFromFeedGen = async (ctx, params2) => {
|
|
|
129238
129589
|
if (!resolved) {
|
|
129239
129590
|
throw new InvalidRequestError(`could not resolve did document: ${feedDid}`);
|
|
129240
129591
|
}
|
|
129241
|
-
const fgEndpoint =
|
|
129592
|
+
const fgEndpoint = getFeedGenEndpoint(resolved);
|
|
129242
129593
|
if (!fgEndpoint) {
|
|
129243
129594
|
throw new InvalidRequestError(`invalid feed generator service details in did document: ${feedDid}`);
|
|
129244
129595
|
}
|
|
@@ -129313,7 +129664,7 @@ function getFeedGenerator_default(server, ctx) {
|
|
|
129313
129664
|
if (!resolved) {
|
|
129314
129665
|
throw new InvalidRequestError(`could not resolve did document: ${feedDid}`);
|
|
129315
129666
|
}
|
|
129316
|
-
const fgEndpoint =
|
|
129667
|
+
const fgEndpoint = getFeedGenEndpoint(resolved);
|
|
129317
129668
|
if (!fgEndpoint) {
|
|
129318
129669
|
throw new InvalidRequestError(`invalid feed generator service details in did document: ${feedDid}`);
|
|
129319
129670
|
}
|
|
@@ -129563,6 +129914,18 @@ var schemaDict2 = {
|
|
|
129563
129914
|
lexicon: 1,
|
|
129564
129915
|
id: "com.atproto.admin.defs",
|
|
129565
129916
|
defs: {
|
|
129917
|
+
statusAttr: {
|
|
129918
|
+
type: "object",
|
|
129919
|
+
required: ["applied"],
|
|
129920
|
+
properties: {
|
|
129921
|
+
applied: {
|
|
129922
|
+
type: "boolean"
|
|
129923
|
+
},
|
|
129924
|
+
ref: {
|
|
129925
|
+
type: "string"
|
|
129926
|
+
}
|
|
129927
|
+
}
|
|
129928
|
+
},
|
|
129566
129929
|
actionView: {
|
|
129567
129930
|
type: "object",
|
|
129568
129931
|
required: [
|
|
@@ -129972,6 +130335,44 @@ var schemaDict2 = {
|
|
|
129972
130335
|
}
|
|
129973
130336
|
}
|
|
129974
130337
|
},
|
|
130338
|
+
accountView: {
|
|
130339
|
+
type: "object",
|
|
130340
|
+
required: ["did", "handle", "indexedAt"],
|
|
130341
|
+
properties: {
|
|
130342
|
+
did: {
|
|
130343
|
+
type: "string",
|
|
130344
|
+
format: "did"
|
|
130345
|
+
},
|
|
130346
|
+
handle: {
|
|
130347
|
+
type: "string",
|
|
130348
|
+
format: "handle"
|
|
130349
|
+
},
|
|
130350
|
+
email: {
|
|
130351
|
+
type: "string"
|
|
130352
|
+
},
|
|
130353
|
+
indexedAt: {
|
|
130354
|
+
type: "string",
|
|
130355
|
+
format: "datetime"
|
|
130356
|
+
},
|
|
130357
|
+
invitedBy: {
|
|
130358
|
+
type: "ref",
|
|
130359
|
+
ref: "lex:com.atproto.server.defs#inviteCode"
|
|
130360
|
+
},
|
|
130361
|
+
invites: {
|
|
130362
|
+
type: "array",
|
|
130363
|
+
items: {
|
|
130364
|
+
type: "ref",
|
|
130365
|
+
ref: "lex:com.atproto.server.defs#inviteCode"
|
|
130366
|
+
}
|
|
130367
|
+
},
|
|
130368
|
+
invitesDisabled: {
|
|
130369
|
+
type: "boolean"
|
|
130370
|
+
},
|
|
130371
|
+
inviteNote: {
|
|
130372
|
+
type: "string"
|
|
130373
|
+
}
|
|
130374
|
+
}
|
|
130375
|
+
},
|
|
129975
130376
|
repoViewNotFound: {
|
|
129976
130377
|
type: "object",
|
|
129977
130378
|
required: ["did"],
|
|
@@ -129992,6 +130393,24 @@ var schemaDict2 = {
|
|
|
129992
130393
|
}
|
|
129993
130394
|
}
|
|
129994
130395
|
},
|
|
130396
|
+
repoBlobRef: {
|
|
130397
|
+
type: "object",
|
|
130398
|
+
required: ["did", "cid"],
|
|
130399
|
+
properties: {
|
|
130400
|
+
did: {
|
|
130401
|
+
type: "string",
|
|
130402
|
+
format: "did"
|
|
130403
|
+
},
|
|
130404
|
+
cid: {
|
|
130405
|
+
type: "string",
|
|
130406
|
+
format: "cid"
|
|
130407
|
+
},
|
|
130408
|
+
recordUri: {
|
|
130409
|
+
type: "string",
|
|
130410
|
+
format: "at-uri"
|
|
130411
|
+
}
|
|
130412
|
+
}
|
|
130413
|
+
},
|
|
129995
130414
|
recordView: {
|
|
129996
130415
|
type: "object",
|
|
129997
130416
|
required: [
|
|
@@ -130274,6 +130693,33 @@ var schemaDict2 = {
|
|
|
130274
130693
|
}
|
|
130275
130694
|
}
|
|
130276
130695
|
},
|
|
130696
|
+
ComAtprotoAdminGetAccountInfo: {
|
|
130697
|
+
lexicon: 1,
|
|
130698
|
+
id: "com.atproto.admin.getAccountInfo",
|
|
130699
|
+
defs: {
|
|
130700
|
+
main: {
|
|
130701
|
+
type: "query",
|
|
130702
|
+
description: "View details about an account.",
|
|
130703
|
+
parameters: {
|
|
130704
|
+
type: "params",
|
|
130705
|
+
required: ["did"],
|
|
130706
|
+
properties: {
|
|
130707
|
+
did: {
|
|
130708
|
+
type: "string",
|
|
130709
|
+
format: "did"
|
|
130710
|
+
}
|
|
130711
|
+
}
|
|
130712
|
+
},
|
|
130713
|
+
output: {
|
|
130714
|
+
encoding: "application/json",
|
|
130715
|
+
schema: {
|
|
130716
|
+
type: "ref",
|
|
130717
|
+
ref: "lex:com.atproto.admin.defs#accountView"
|
|
130718
|
+
}
|
|
130719
|
+
}
|
|
130720
|
+
}
|
|
130721
|
+
}
|
|
130722
|
+
},
|
|
130277
130723
|
ComAtprotoAdminGetInviteCodes: {
|
|
130278
130724
|
lexicon: 1,
|
|
130279
130725
|
id: "com.atproto.admin.getInviteCodes",
|
|
@@ -130568,6 +131014,54 @@ var schemaDict2 = {
|
|
|
130568
131014
|
}
|
|
130569
131015
|
}
|
|
130570
131016
|
},
|
|
131017
|
+
ComAtprotoAdminGetSubjectStatus: {
|
|
131018
|
+
lexicon: 1,
|
|
131019
|
+
id: "com.atproto.admin.getSubjectStatus",
|
|
131020
|
+
defs: {
|
|
131021
|
+
main: {
|
|
131022
|
+
type: "query",
|
|
131023
|
+
description: "Fetch the service-specific the admin status of a subject (account, record, or blob)",
|
|
131024
|
+
parameters: {
|
|
131025
|
+
type: "params",
|
|
131026
|
+
properties: {
|
|
131027
|
+
did: {
|
|
131028
|
+
type: "string",
|
|
131029
|
+
format: "did"
|
|
131030
|
+
},
|
|
131031
|
+
uri: {
|
|
131032
|
+
type: "string",
|
|
131033
|
+
format: "at-uri"
|
|
131034
|
+
},
|
|
131035
|
+
blob: {
|
|
131036
|
+
type: "string",
|
|
131037
|
+
format: "cid"
|
|
131038
|
+
}
|
|
131039
|
+
}
|
|
131040
|
+
},
|
|
131041
|
+
output: {
|
|
131042
|
+
encoding: "application/json",
|
|
131043
|
+
schema: {
|
|
131044
|
+
type: "object",
|
|
131045
|
+
required: ["subject"],
|
|
131046
|
+
properties: {
|
|
131047
|
+
subject: {
|
|
131048
|
+
type: "union",
|
|
131049
|
+
refs: [
|
|
131050
|
+
"lex:com.atproto.admin.defs#repoRef",
|
|
131051
|
+
"lex:com.atproto.repo.strongRef",
|
|
131052
|
+
"lex:com.atproto.admin.defs#repoBlobRef"
|
|
131053
|
+
]
|
|
131054
|
+
},
|
|
131055
|
+
takedown: {
|
|
131056
|
+
type: "ref",
|
|
131057
|
+
ref: "lex:com.atproto.admin.defs#statusAttr"
|
|
131058
|
+
}
|
|
131059
|
+
}
|
|
131060
|
+
}
|
|
131061
|
+
}
|
|
131062
|
+
}
|
|
131063
|
+
}
|
|
131064
|
+
},
|
|
130571
131065
|
ComAtprotoAdminResolveModerationReports: {
|
|
130572
131066
|
lexicon: 1,
|
|
130573
131067
|
id: "com.atproto.admin.resolveModerationReports",
|
|
@@ -130660,9 +131154,6 @@ var schemaDict2 = {
|
|
|
130660
131154
|
q: {
|
|
130661
131155
|
type: "string"
|
|
130662
131156
|
},
|
|
130663
|
-
invitedBy: {
|
|
130664
|
-
type: "string"
|
|
130665
|
-
},
|
|
130666
131157
|
limit: {
|
|
130667
131158
|
type: "integer",
|
|
130668
131159
|
minimum: 1,
|
|
@@ -130867,6 +131358,58 @@ var schemaDict2 = {
|
|
|
130867
131358
|
}
|
|
130868
131359
|
}
|
|
130869
131360
|
},
|
|
131361
|
+
ComAtprotoAdminUpdateSubjectStatus: {
|
|
131362
|
+
lexicon: 1,
|
|
131363
|
+
id: "com.atproto.admin.updateSubjectStatus",
|
|
131364
|
+
defs: {
|
|
131365
|
+
main: {
|
|
131366
|
+
type: "procedure",
|
|
131367
|
+
description: "Update the service-specific admin status of a subject (account, record, or blob)",
|
|
131368
|
+
input: {
|
|
131369
|
+
encoding: "application/json",
|
|
131370
|
+
schema: {
|
|
131371
|
+
type: "object",
|
|
131372
|
+
required: ["subject"],
|
|
131373
|
+
properties: {
|
|
131374
|
+
subject: {
|
|
131375
|
+
type: "union",
|
|
131376
|
+
refs: [
|
|
131377
|
+
"lex:com.atproto.admin.defs#repoRef",
|
|
131378
|
+
"lex:com.atproto.repo.strongRef",
|
|
131379
|
+
"lex:com.atproto.admin.defs#repoBlobRef"
|
|
131380
|
+
]
|
|
131381
|
+
},
|
|
131382
|
+
takedown: {
|
|
131383
|
+
type: "ref",
|
|
131384
|
+
ref: "lex:com.atproto.admin.defs#statusAttr"
|
|
131385
|
+
}
|
|
131386
|
+
}
|
|
131387
|
+
}
|
|
131388
|
+
},
|
|
131389
|
+
output: {
|
|
131390
|
+
encoding: "application/json",
|
|
131391
|
+
schema: {
|
|
131392
|
+
type: "object",
|
|
131393
|
+
required: ["subject"],
|
|
131394
|
+
properties: {
|
|
131395
|
+
subject: {
|
|
131396
|
+
type: "union",
|
|
131397
|
+
refs: [
|
|
131398
|
+
"lex:com.atproto.admin.defs#repoRef",
|
|
131399
|
+
"lex:com.atproto.repo.strongRef",
|
|
131400
|
+
"lex:com.atproto.admin.defs#repoBlobRef"
|
|
131401
|
+
]
|
|
131402
|
+
},
|
|
131403
|
+
takedown: {
|
|
131404
|
+
type: "ref",
|
|
131405
|
+
ref: "lex:com.atproto.admin.defs#statusAttr"
|
|
131406
|
+
}
|
|
131407
|
+
}
|
|
131408
|
+
}
|
|
131409
|
+
}
|
|
131410
|
+
}
|
|
131411
|
+
}
|
|
131412
|
+
},
|
|
130870
131413
|
ComAtprotoIdentityResolveHandle: {
|
|
130871
131414
|
lexicon: 1,
|
|
130872
131415
|
id: "com.atproto.identity.resolveHandle",
|
|
@@ -131164,7 +131707,9 @@ var schemaDict2 = {
|
|
|
131164
131707
|
ref: "lex:com.atproto.moderation.defs#reasonType"
|
|
131165
131708
|
},
|
|
131166
131709
|
reason: {
|
|
131167
|
-
type: "string"
|
|
131710
|
+
type: "string",
|
|
131711
|
+
maxGraphemes: 2e3,
|
|
131712
|
+
maxLength: 2e4
|
|
131168
131713
|
},
|
|
131169
131714
|
subject: {
|
|
131170
131715
|
type: "union",
|
|
@@ -131834,6 +132379,9 @@ var schemaDict2 = {
|
|
|
131834
132379
|
},
|
|
131835
132380
|
recoveryKey: {
|
|
131836
132381
|
type: "string"
|
|
132382
|
+
},
|
|
132383
|
+
plcOp: {
|
|
132384
|
+
type: "bytes"
|
|
131837
132385
|
}
|
|
131838
132386
|
}
|
|
131839
132387
|
}
|
|
@@ -131857,6 +132405,9 @@ var schemaDict2 = {
|
|
|
131857
132405
|
did: {
|
|
131858
132406
|
type: "string",
|
|
131859
132407
|
format: "did"
|
|
132408
|
+
},
|
|
132409
|
+
didDoc: {
|
|
132410
|
+
type: "unknown"
|
|
131860
132411
|
}
|
|
131861
132412
|
}
|
|
131862
132413
|
}
|
|
@@ -132082,6 +132633,9 @@ var schemaDict2 = {
|
|
|
132082
132633
|
type: "string",
|
|
132083
132634
|
format: "did"
|
|
132084
132635
|
},
|
|
132636
|
+
didDoc: {
|
|
132637
|
+
type: "unknown"
|
|
132638
|
+
},
|
|
132085
132639
|
email: {
|
|
132086
132640
|
type: "string"
|
|
132087
132641
|
},
|
|
@@ -132396,6 +132950,9 @@ var schemaDict2 = {
|
|
|
132396
132950
|
did: {
|
|
132397
132951
|
type: "string",
|
|
132398
132952
|
format: "did"
|
|
132953
|
+
},
|
|
132954
|
+
didDoc: {
|
|
132955
|
+
type: "unknown"
|
|
132399
132956
|
}
|
|
132400
132957
|
}
|
|
132401
132958
|
}
|
|
@@ -132472,6 +133029,29 @@ var schemaDict2 = {
|
|
|
132472
133029
|
}
|
|
132473
133030
|
}
|
|
132474
133031
|
},
|
|
133032
|
+
ComAtprotoServerReserveSigningKey: {
|
|
133033
|
+
lexicon: 1,
|
|
133034
|
+
id: "com.atproto.server.reserveSigningKey",
|
|
133035
|
+
defs: {
|
|
133036
|
+
main: {
|
|
133037
|
+
type: "procedure",
|
|
133038
|
+
description: "Reserve a repo signing key for account creation.",
|
|
133039
|
+
output: {
|
|
133040
|
+
encoding: "application/json",
|
|
133041
|
+
schema: {
|
|
133042
|
+
type: "object",
|
|
133043
|
+
required: ["signingKey"],
|
|
133044
|
+
properties: {
|
|
133045
|
+
signingKey: {
|
|
133046
|
+
type: "string",
|
|
133047
|
+
description: "Public signing key in the form of a did:key."
|
|
133048
|
+
}
|
|
133049
|
+
}
|
|
133050
|
+
}
|
|
133051
|
+
}
|
|
133052
|
+
}
|
|
133053
|
+
}
|
|
133054
|
+
},
|
|
132475
133055
|
ComAtprotoServerResetPassword: {
|
|
132476
133056
|
lexicon: 1,
|
|
132477
133057
|
id: "com.atproto.server.resetPassword",
|
|
@@ -132889,7 +133469,7 @@ var schemaDict2 = {
|
|
|
132889
133469
|
},
|
|
132890
133470
|
repo: {
|
|
132891
133471
|
type: "object",
|
|
132892
|
-
required: ["did", "head"],
|
|
133472
|
+
required: ["did", "head", "rev"],
|
|
132893
133473
|
properties: {
|
|
132894
133474
|
did: {
|
|
132895
133475
|
type: "string",
|
|
@@ -132898,6 +133478,9 @@ var schemaDict2 = {
|
|
|
132898
133478
|
head: {
|
|
132899
133479
|
type: "string",
|
|
132900
133480
|
format: "cid"
|
|
133481
|
+
},
|
|
133482
|
+
rev: {
|
|
133483
|
+
type: "string"
|
|
132901
133484
|
}
|
|
132902
133485
|
}
|
|
132903
133486
|
}
|
|
@@ -133298,6 +133881,10 @@ var schemaDict2 = {
|
|
|
133298
133881
|
type: "string",
|
|
133299
133882
|
format: "at-uri"
|
|
133300
133883
|
},
|
|
133884
|
+
blockingByList: {
|
|
133885
|
+
type: "ref",
|
|
133886
|
+
ref: "lex:app.bsky.graph.defs#listViewBasic"
|
|
133887
|
+
},
|
|
133301
133888
|
following: {
|
|
133302
133889
|
type: "string",
|
|
133303
133890
|
format: "at-uri"
|
|
@@ -136805,6 +137392,7 @@ var ids = {
|
|
|
136805
137392
|
ComAtprotoAdminDisableAccountInvites: "com.atproto.admin.disableAccountInvites",
|
|
136806
137393
|
ComAtprotoAdminDisableInviteCodes: "com.atproto.admin.disableInviteCodes",
|
|
136807
137394
|
ComAtprotoAdminEnableAccountInvites: "com.atproto.admin.enableAccountInvites",
|
|
137395
|
+
ComAtprotoAdminGetAccountInfo: "com.atproto.admin.getAccountInfo",
|
|
136808
137396
|
ComAtprotoAdminGetInviteCodes: "com.atproto.admin.getInviteCodes",
|
|
136809
137397
|
ComAtprotoAdminGetModerationAction: "com.atproto.admin.getModerationAction",
|
|
136810
137398
|
ComAtprotoAdminGetModerationActions: "com.atproto.admin.getModerationActions",
|
|
@@ -136812,6 +137400,7 @@ var ids = {
|
|
|
136812
137400
|
ComAtprotoAdminGetModerationReports: "com.atproto.admin.getModerationReports",
|
|
136813
137401
|
ComAtprotoAdminGetRecord: "com.atproto.admin.getRecord",
|
|
136814
137402
|
ComAtprotoAdminGetRepo: "com.atproto.admin.getRepo",
|
|
137403
|
+
ComAtprotoAdminGetSubjectStatus: "com.atproto.admin.getSubjectStatus",
|
|
136815
137404
|
ComAtprotoAdminResolveModerationReports: "com.atproto.admin.resolveModerationReports",
|
|
136816
137405
|
ComAtprotoAdminReverseModerationAction: "com.atproto.admin.reverseModerationAction",
|
|
136817
137406
|
ComAtprotoAdminSearchRepos: "com.atproto.admin.searchRepos",
|
|
@@ -136819,6 +137408,7 @@ var ids = {
|
|
|
136819
137408
|
ComAtprotoAdminTakeModerationAction: "com.atproto.admin.takeModerationAction",
|
|
136820
137409
|
ComAtprotoAdminUpdateAccountEmail: "com.atproto.admin.updateAccountEmail",
|
|
136821
137410
|
ComAtprotoAdminUpdateAccountHandle: "com.atproto.admin.updateAccountHandle",
|
|
137411
|
+
ComAtprotoAdminUpdateSubjectStatus: "com.atproto.admin.updateSubjectStatus",
|
|
136822
137412
|
ComAtprotoIdentityResolveHandle: "com.atproto.identity.resolveHandle",
|
|
136823
137413
|
ComAtprotoIdentityUpdateHandle: "com.atproto.identity.updateHandle",
|
|
136824
137414
|
ComAtprotoLabelDefs: "com.atproto.label.defs",
|
|
@@ -136853,6 +137443,7 @@ var ids = {
|
|
|
136853
137443
|
ComAtprotoServerRequestEmailConfirmation: "com.atproto.server.requestEmailConfirmation",
|
|
136854
137444
|
ComAtprotoServerRequestEmailUpdate: "com.atproto.server.requestEmailUpdate",
|
|
136855
137445
|
ComAtprotoServerRequestPasswordReset: "com.atproto.server.requestPasswordReset",
|
|
137446
|
+
ComAtprotoServerReserveSigningKey: "com.atproto.server.reserveSigningKey",
|
|
136856
137447
|
ComAtprotoServerResetPassword: "com.atproto.server.resetPassword",
|
|
136857
137448
|
ComAtprotoServerRevokeAppPassword: "com.atproto.server.revokeAppPassword",
|
|
136858
137449
|
ComAtprotoServerUpdateEmail: "com.atproto.server.updateEmail",
|
|
@@ -137057,9 +137648,9 @@ var threadgateToPostUri = (gateUri) => {
|
|
|
137057
137648
|
function getPostThread_default(server, ctx) {
|
|
137058
137649
|
const getPostThread = createPipeline(skeleton7, hydration7, noRules, presentation7);
|
|
137059
137650
|
server.app.bsky.feed.getPostThread({
|
|
137060
|
-
auth: ctx.
|
|
137651
|
+
auth: ctx.authOptionalAccessOrRoleVerifier,
|
|
137061
137652
|
handler: async ({ params: params2, auth, res }) => {
|
|
137062
|
-
const viewer = auth.credentials.did;
|
|
137653
|
+
const viewer = "did" in auth.credentials ? auth.credentials.did : null;
|
|
137063
137654
|
const db = ctx.db.getReplica("thread");
|
|
137064
137655
|
const feedService = ctx.services.feed(db);
|
|
137065
137656
|
const actorService = ctx.services.actor(db);
|
|
@@ -138468,23 +139059,20 @@ var skeleton18 = async (params2, ctx) => {
|
|
|
138468
139059
|
if (params2.seenAt) {
|
|
138469
139060
|
throw new InvalidRequestError("The seenAt parameter is unsupported");
|
|
138470
139061
|
}
|
|
138471
|
-
let notifBuilder = db.db.selectFrom("notification as notif").
|
|
139062
|
+
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([
|
|
139063
|
+
"notif.author as authorDid",
|
|
138472
139064
|
"notif.recordUri as uri",
|
|
138473
139065
|
"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
139066
|
"notif.reason as reason",
|
|
138479
139067
|
"notif.reasonSubject as reasonSubject",
|
|
138480
|
-
"notif.sortAt as indexedAt"
|
|
138481
|
-
"record.json as recordJson"
|
|
139068
|
+
"notif.sortAt as indexedAt"
|
|
138482
139069
|
]);
|
|
138483
139070
|
const keyset = new NotifsKeyset(ref("notif.sortAt"), ref("notif.recordCid"));
|
|
138484
139071
|
notifBuilder = paginate(notifBuilder, {
|
|
138485
139072
|
cursor,
|
|
138486
139073
|
limit,
|
|
138487
|
-
keyset
|
|
139074
|
+
keyset,
|
|
139075
|
+
tryIndex: true
|
|
138488
139076
|
});
|
|
138489
139077
|
const actorStateQuery = db.db.selectFrom("actor_state").selectAll().where("did", "=", viewer);
|
|
138490
139078
|
const [notifs, actorState] = await Promise.all([
|
|
@@ -138499,17 +139087,18 @@ var skeleton18 = async (params2, ctx) => {
|
|
|
138499
139087
|
};
|
|
138500
139088
|
};
|
|
138501
139089
|
var hydration18 = async (state, ctx) => {
|
|
138502
|
-
const { graphService, actorService, labelService } = ctx;
|
|
139090
|
+
const { graphService, actorService, labelService, db } = ctx;
|
|
138503
139091
|
const { params: params2, notifs } = state;
|
|
138504
139092
|
const { viewer } = params2;
|
|
138505
139093
|
const dids = notifs.map((notif) => notif.authorDid);
|
|
138506
139094
|
const uris = notifs.map((notif) => notif.uri);
|
|
138507
|
-
const [actors, labels, bam] = await Promise.all([
|
|
139095
|
+
const [actors, records, labels, bam] = await Promise.all([
|
|
138508
139096
|
actorService.views.profiles(dids, viewer),
|
|
139097
|
+
getRecordMap(db, uris),
|
|
138509
139098
|
labelService.getLabelsForUris(uris),
|
|
138510
139099
|
graphService.getBlockAndMuteState(dids.map((did2) => [viewer, did2]))
|
|
138511
139100
|
]);
|
|
138512
|
-
return { ...state, actors, labels, bam };
|
|
139101
|
+
return { ...state, actors, records, labels, bam };
|
|
138513
139102
|
};
|
|
138514
139103
|
var noBlockOrMutes = (state) => {
|
|
138515
139104
|
const { viewer } = state.params;
|
|
@@ -138517,12 +139106,12 @@ var noBlockOrMutes = (state) => {
|
|
|
138517
139106
|
return state;
|
|
138518
139107
|
};
|
|
138519
139108
|
var presentation18 = (state) => {
|
|
138520
|
-
const { notifs, cursor, actors, labels, lastSeenNotifs } = state;
|
|
139109
|
+
const { notifs, cursor, actors, records, labels, lastSeenNotifs } = state;
|
|
138521
139110
|
const notifications = mapDefined(notifs, (notif) => {
|
|
138522
139111
|
const author = actors[notif.authorDid];
|
|
138523
|
-
|
|
139112
|
+
const record = records[notif.uri];
|
|
139113
|
+
if (!author || !record)
|
|
138524
139114
|
return void 0;
|
|
138525
|
-
const record = jsonStringToLex(notif.recordJson);
|
|
138526
139115
|
const recordLabels = labels[notif.uri] ?? [];
|
|
138527
139116
|
const recordSelfLabels = getSelfLabels({
|
|
138528
139117
|
uri: notif.uri,
|
|
@@ -138543,6 +139132,16 @@ var presentation18 = (state) => {
|
|
|
138543
139132
|
});
|
|
138544
139133
|
return { notifications, cursor };
|
|
138545
139134
|
};
|
|
139135
|
+
var getRecordMap = async (db, uris) => {
|
|
139136
|
+
if (!uris.length)
|
|
139137
|
+
return {};
|
|
139138
|
+
const { ref } = db.db.dynamic;
|
|
139139
|
+
const recordRows = await db.db.selectFrom("record").select(["uri", "json"]).where("uri", "in", uris).where(notSoftDeletedClause(ref("record"))).execute();
|
|
139140
|
+
return recordRows.reduce((acc, { uri: uri2, json }) => {
|
|
139141
|
+
acc[uri2] = jsonStringToLex(json);
|
|
139142
|
+
return acc;
|
|
139143
|
+
}, {});
|
|
139144
|
+
};
|
|
138546
139145
|
var NotifsKeyset = class extends TimeCidKeyset {
|
|
138547
139146
|
labelResult(result) {
|
|
138548
139147
|
return { primary: result.indexedAt, secondary: result.cid };
|
|
@@ -138685,6 +139284,12 @@ var TAKEDOWN = "com.atproto.admin.defs#takedown";
|
|
|
138685
139284
|
var FLAG = "com.atproto.admin.defs#flag";
|
|
138686
139285
|
var ACKNOWLEDGE = "com.atproto.admin.defs#acknowledge";
|
|
138687
139286
|
var ESCALATE = "com.atproto.admin.defs#escalate";
|
|
139287
|
+
function isRepoView(v) {
|
|
139288
|
+
return isObj3(v) && hasProp3(v, "$type") && v.$type === "com.atproto.admin.defs#repoView";
|
|
139289
|
+
}
|
|
139290
|
+
function isRecordView(v) {
|
|
139291
|
+
return isObj3(v) && hasProp3(v, "$type") && v.$type === "com.atproto.admin.defs#recordView";
|
|
139292
|
+
}
|
|
138688
139293
|
|
|
138689
139294
|
// src/lexicon/types/com/atproto/moderation/defs.ts
|
|
138690
139295
|
var REASONSPAM = "com.atproto.moderation.defs#reasonSpam";
|
|
@@ -138778,6 +139383,67 @@ function resolveModerationReports_default(server, ctx) {
|
|
|
138778
139383
|
});
|
|
138779
139384
|
}
|
|
138780
139385
|
|
|
139386
|
+
// src/util/retry.ts
|
|
139387
|
+
var import_axios3 = __toESM(require_axios2());
|
|
139388
|
+
async function retry(fn, opts = {}) {
|
|
139389
|
+
const { max = 3, retryable = () => true } = opts;
|
|
139390
|
+
let retries = 0;
|
|
139391
|
+
let doneError;
|
|
139392
|
+
while (!doneError) {
|
|
139393
|
+
try {
|
|
139394
|
+
if (retries)
|
|
139395
|
+
await backoff(retries);
|
|
139396
|
+
return await fn();
|
|
139397
|
+
} catch (err) {
|
|
139398
|
+
const willRetry = retries < max && retryable(err);
|
|
139399
|
+
if (!willRetry)
|
|
139400
|
+
doneError = err;
|
|
139401
|
+
retries += 1;
|
|
139402
|
+
}
|
|
139403
|
+
}
|
|
139404
|
+
throw doneError;
|
|
139405
|
+
}
|
|
139406
|
+
async function retryHttp(fn, opts = {}) {
|
|
139407
|
+
return retry(fn, { retryable: retryableHttp, ...opts });
|
|
139408
|
+
}
|
|
139409
|
+
function retryableHttp(err) {
|
|
139410
|
+
if (err instanceof XRPCError) {
|
|
139411
|
+
if (err.status === 1 /* Unknown */)
|
|
139412
|
+
return true;
|
|
139413
|
+
return retryableHttpStatusCodes.has(err.status);
|
|
139414
|
+
}
|
|
139415
|
+
if (err instanceof import_axios3.AxiosError) {
|
|
139416
|
+
if (!err.response)
|
|
139417
|
+
return true;
|
|
139418
|
+
return retryableHttpStatusCodes.has(err.response.status);
|
|
139419
|
+
}
|
|
139420
|
+
return false;
|
|
139421
|
+
}
|
|
139422
|
+
var retryableHttpStatusCodes = /* @__PURE__ */ new Set([
|
|
139423
|
+
408,
|
|
139424
|
+
425,
|
|
139425
|
+
429,
|
|
139426
|
+
500,
|
|
139427
|
+
502,
|
|
139428
|
+
503,
|
|
139429
|
+
504,
|
|
139430
|
+
522,
|
|
139431
|
+
524
|
|
139432
|
+
]);
|
|
139433
|
+
async function backoff(n, multiplier = 50, max = 1e3) {
|
|
139434
|
+
const exponentialMs = Math.pow(2, n) * multiplier;
|
|
139435
|
+
const ms = Math.min(exponentialMs, max);
|
|
139436
|
+
await wait(jitter2(ms));
|
|
139437
|
+
}
|
|
139438
|
+
function jitter2(value) {
|
|
139439
|
+
const delta = value * 0.15;
|
|
139440
|
+
return value + randomRange(-delta, delta);
|
|
139441
|
+
}
|
|
139442
|
+
function randomRange(from3, to) {
|
|
139443
|
+
const rand = Math.random() * (to - from3);
|
|
139444
|
+
return rand + from3;
|
|
139445
|
+
}
|
|
139446
|
+
|
|
138781
139447
|
// src/api/com/atproto/admin/reverseModerationAction.ts
|
|
138782
139448
|
function reverseModerationAction_default(server, ctx) {
|
|
138783
139449
|
server.com.atproto.admin.reverseModerationAction({
|
|
@@ -138787,7 +139453,7 @@ function reverseModerationAction_default(server, ctx) {
|
|
|
138787
139453
|
const db = ctx.db.getPrimary();
|
|
138788
139454
|
const moderationService = ctx.services.moderation(db);
|
|
138789
139455
|
const { id, createdBy, reason } = input.body;
|
|
138790
|
-
const
|
|
139456
|
+
const { result, restored } = await db.transaction(async (dbTxn) => {
|
|
138791
139457
|
const moderationTxn = ctx.services.moderation(dbTxn);
|
|
138792
139458
|
const labelTxn = ctx.services.label(dbTxn);
|
|
138793
139459
|
const now = new Date();
|
|
@@ -138804,21 +139470,35 @@ function reverseModerationAction_default(server, ctx) {
|
|
|
138804
139470
|
if (!access.moderator && existing.action === TAKEDOWN && existing.subjectType === "com.atproto.admin.defs#repoRef") {
|
|
138805
139471
|
throw new AuthRequiredError("Must be a full moderator to reverse an account takedown");
|
|
138806
139472
|
}
|
|
138807
|
-
const result = await moderationTxn.revertAction({
|
|
139473
|
+
const { result: result2, restored: restored2 } = await moderationTxn.revertAction({
|
|
138808
139474
|
id,
|
|
138809
139475
|
createdAt: now,
|
|
138810
139476
|
createdBy,
|
|
138811
139477
|
reason
|
|
138812
139478
|
});
|
|
138813
|
-
const { createLabelVals, negateLabelVals } =
|
|
139479
|
+
const { createLabelVals, negateLabelVals } = result2;
|
|
138814
139480
|
const negate = createLabelVals && createLabelVals.length > 0 ? createLabelVals.split(" ") : void 0;
|
|
138815
139481
|
const create3 = negateLabelVals && negateLabelVals.length > 0 ? negateLabelVals.split(" ") : void 0;
|
|
138816
|
-
await labelTxn.formatAndCreate(ctx.cfg.labelerDid,
|
|
138817
|
-
return result;
|
|
139482
|
+
await labelTxn.formatAndCreate(ctx.cfg.labelerDid, result2.subjectUri ?? result2.subjectDid, result2.subjectCid, { create: create3, negate });
|
|
139483
|
+
return { result: result2, restored: restored2 };
|
|
138818
139484
|
});
|
|
139485
|
+
if (restored) {
|
|
139486
|
+
const { did: did2, subjects } = restored;
|
|
139487
|
+
const agent = await ctx.pdsAdminAgent(did2);
|
|
139488
|
+
const results = await Promise.allSettled(subjects.map((subject) => retryHttp(() => agent.api.com.atproto.admin.updateSubjectStatus({
|
|
139489
|
+
subject,
|
|
139490
|
+
takedown: {
|
|
139491
|
+
applied: false
|
|
139492
|
+
}
|
|
139493
|
+
}))));
|
|
139494
|
+
const hadFailure = results.some((r) => r.status === "rejected");
|
|
139495
|
+
if (hadFailure) {
|
|
139496
|
+
throw new UpstreamFailureError("failed to revert action on PDS");
|
|
139497
|
+
}
|
|
139498
|
+
}
|
|
138819
139499
|
return {
|
|
138820
139500
|
encoding: "application/json",
|
|
138821
|
-
body: await moderationService.views.action(
|
|
139501
|
+
body: await moderationService.views.action(result)
|
|
138822
139502
|
};
|
|
138823
139503
|
}
|
|
138824
139504
|
});
|
|
@@ -138852,10 +139532,10 @@ function takeModerationAction_default(server, ctx) {
|
|
|
138852
139532
|
throw new AuthRequiredError("Must be a full moderator to label content");
|
|
138853
139533
|
}
|
|
138854
139534
|
validateLabels([...createLabelVals ?? [], ...negateLabelVals ?? []]);
|
|
138855
|
-
const
|
|
139535
|
+
const { result, takenDown } = await db.transaction(async (dbTxn) => {
|
|
138856
139536
|
const moderationTxn = ctx.services.moderation(dbTxn);
|
|
138857
139537
|
const labelTxn = ctx.services.label(dbTxn);
|
|
138858
|
-
const
|
|
139538
|
+
const result2 = await moderationTxn.logAction({
|
|
138859
139539
|
action: getAction(action),
|
|
138860
139540
|
subject: getSubject(subject),
|
|
138861
139541
|
subjectBlobCids: subjectBlobCids?.map((cid2) => CID.parse(cid2)) ?? [],
|
|
@@ -138865,25 +139545,44 @@ function takeModerationAction_default(server, ctx) {
|
|
|
138865
139545
|
reason,
|
|
138866
139546
|
durationInHours
|
|
138867
139547
|
});
|
|
138868
|
-
|
|
138869
|
-
|
|
138870
|
-
|
|
138871
|
-
|
|
139548
|
+
let takenDown2;
|
|
139549
|
+
if (result2.action === TAKEDOWN && result2.subjectType === "com.atproto.admin.defs#repoRef" && result2.subjectDid) {
|
|
139550
|
+
takenDown2 = await moderationTxn.takedownRepo({
|
|
139551
|
+
takedownId: result2.id,
|
|
139552
|
+
did: result2.subjectDid
|
|
138872
139553
|
});
|
|
138873
139554
|
}
|
|
138874
|
-
if (
|
|
138875
|
-
await moderationTxn.takedownRecord({
|
|
138876
|
-
takedownId:
|
|
138877
|
-
uri: new AtUri(
|
|
139555
|
+
if (result2.action === TAKEDOWN && result2.subjectType === "com.atproto.repo.strongRef" && result2.subjectUri && result2.subjectCid) {
|
|
139556
|
+
takenDown2 = await moderationTxn.takedownRecord({
|
|
139557
|
+
takedownId: result2.id,
|
|
139558
|
+
uri: new AtUri(result2.subjectUri),
|
|
139559
|
+
cid: CID.parse(result2.subjectCid),
|
|
138878
139560
|
blobCids: subjectBlobCids?.map((cid2) => CID.parse(cid2)) ?? []
|
|
138879
139561
|
});
|
|
138880
139562
|
}
|
|
138881
|
-
await labelTxn.formatAndCreate(ctx.cfg.labelerDid,
|
|
138882
|
-
return result;
|
|
139563
|
+
await labelTxn.formatAndCreate(ctx.cfg.labelerDid, result2.subjectUri ?? result2.subjectDid, result2.subjectCid, { create: createLabelVals, negate: negateLabelVals });
|
|
139564
|
+
return { result: result2, takenDown: takenDown2 };
|
|
138883
139565
|
});
|
|
139566
|
+
if (takenDown) {
|
|
139567
|
+
const { did: did2, subjects } = takenDown;
|
|
139568
|
+
if (did2 && subjects.length > 0) {
|
|
139569
|
+
const agent = await ctx.pdsAdminAgent(did2);
|
|
139570
|
+
const results = await Promise.allSettled(subjects.map((subject2) => retryHttp(() => agent.api.com.atproto.admin.updateSubjectStatus({
|
|
139571
|
+
subject: subject2,
|
|
139572
|
+
takedown: {
|
|
139573
|
+
applied: true,
|
|
139574
|
+
ref: result.id.toString()
|
|
139575
|
+
}
|
|
139576
|
+
}))));
|
|
139577
|
+
const hadFailure = results.some((r) => r.status === "rejected");
|
|
139578
|
+
if (hadFailure) {
|
|
139579
|
+
throw new UpstreamFailureError("failed to apply action on PDS");
|
|
139580
|
+
}
|
|
139581
|
+
}
|
|
139582
|
+
}
|
|
138884
139583
|
return {
|
|
138885
139584
|
encoding: "application/json",
|
|
138886
|
-
body: await moderationService.views.action(
|
|
139585
|
+
body: await moderationService.views.action(result)
|
|
138887
139586
|
};
|
|
138888
139587
|
}
|
|
138889
139588
|
});
|
|
@@ -138906,10 +139605,7 @@ function searchRepos_default(server, ctx) {
|
|
|
138906
139605
|
handler: async ({ params: params2 }) => {
|
|
138907
139606
|
const db = ctx.db.getPrimary();
|
|
138908
139607
|
const moderationService = ctx.services.moderation(db);
|
|
138909
|
-
const {
|
|
138910
|
-
if (invitedBy) {
|
|
138911
|
-
throw new InvalidRequestError("The invitedBy parameter is unsupported");
|
|
138912
|
-
}
|
|
139608
|
+
const { limit, cursor } = params2;
|
|
138913
139609
|
const query = params2.q ?? params2.term;
|
|
138914
139610
|
const { results, cursor: resCursor } = await ctx.services.actor(db).getSearchResults({ query, limit, cursor, includeSoftDeleted: true });
|
|
138915
139611
|
return {
|
|
@@ -138923,20 +139619,59 @@ function searchRepos_default(server, ctx) {
|
|
|
138923
139619
|
});
|
|
138924
139620
|
}
|
|
138925
139621
|
|
|
139622
|
+
// src/api/com/atproto/admin/util.ts
|
|
139623
|
+
var getPdsAccountInfo = async (ctx, did2) => {
|
|
139624
|
+
try {
|
|
139625
|
+
const agent = await ctx.pdsAdminAgent(did2);
|
|
139626
|
+
const res = await agent.api.com.atproto.admin.getAccountInfo({ did: did2 });
|
|
139627
|
+
return res.data;
|
|
139628
|
+
} catch (err) {
|
|
139629
|
+
return null;
|
|
139630
|
+
}
|
|
139631
|
+
};
|
|
139632
|
+
var addAccountInfoToRepoViewDetail = (repoView, accountInfo, includeEmail = false) => {
|
|
139633
|
+
if (!accountInfo)
|
|
139634
|
+
return repoView;
|
|
139635
|
+
return {
|
|
139636
|
+
...repoView,
|
|
139637
|
+
email: includeEmail ? accountInfo.email : void 0,
|
|
139638
|
+
invitedBy: accountInfo.invitedBy,
|
|
139639
|
+
invitesDisabled: accountInfo.invitesDisabled,
|
|
139640
|
+
inviteNote: accountInfo.inviteNote,
|
|
139641
|
+
invites: accountInfo.invites
|
|
139642
|
+
};
|
|
139643
|
+
};
|
|
139644
|
+
var addAccountInfoToRepoView = (repoView, accountInfo, includeEmail = false) => {
|
|
139645
|
+
if (!accountInfo)
|
|
139646
|
+
return repoView;
|
|
139647
|
+
return {
|
|
139648
|
+
...repoView,
|
|
139649
|
+
email: includeEmail ? accountInfo.email : void 0,
|
|
139650
|
+
invitedBy: accountInfo.invitedBy,
|
|
139651
|
+
invitesDisabled: accountInfo.invitesDisabled,
|
|
139652
|
+
inviteNote: accountInfo.inviteNote
|
|
139653
|
+
};
|
|
139654
|
+
};
|
|
139655
|
+
|
|
138926
139656
|
// src/api/com/atproto/admin/getRecord.ts
|
|
138927
139657
|
function getRecord_default(server, ctx) {
|
|
138928
139658
|
server.com.atproto.admin.getRecord({
|
|
138929
139659
|
auth: ctx.roleVerifier,
|
|
138930
|
-
handler: async ({ params: params2 }) => {
|
|
139660
|
+
handler: async ({ params: params2, auth }) => {
|
|
138931
139661
|
const { uri: uri2, cid: cid2 } = params2;
|
|
138932
139662
|
const db = ctx.db.getPrimary();
|
|
138933
139663
|
const result = await db.db.selectFrom("record").selectAll().where("uri", "=", uri2).if(!!cid2, (qb) => qb.where("cid", "=", cid2 ?? "")).executeTakeFirst();
|
|
138934
139664
|
if (!result) {
|
|
138935
139665
|
throw new InvalidRequestError("Record not found", "RecordNotFound");
|
|
138936
139666
|
}
|
|
139667
|
+
const [record, accountInfo] = await Promise.all([
|
|
139668
|
+
ctx.services.moderation(db).views.recordDetail(result),
|
|
139669
|
+
getPdsAccountInfo(ctx, result.did)
|
|
139670
|
+
]);
|
|
139671
|
+
record.repo = addAccountInfoToRepoView(record.repo, accountInfo, auth.credentials.moderator);
|
|
138937
139672
|
return {
|
|
138938
139673
|
encoding: "application/json",
|
|
138939
|
-
body:
|
|
139674
|
+
body: record
|
|
138940
139675
|
};
|
|
138941
139676
|
}
|
|
138942
139677
|
});
|
|
@@ -138946,16 +139681,21 @@ function getRecord_default(server, ctx) {
|
|
|
138946
139681
|
function getRepo_default(server, ctx) {
|
|
138947
139682
|
server.com.atproto.admin.getRepo({
|
|
138948
139683
|
auth: ctx.roleVerifier,
|
|
138949
|
-
handler: async ({ params: params2 }) => {
|
|
139684
|
+
handler: async ({ params: params2, auth }) => {
|
|
138950
139685
|
const { did: did2 } = params2;
|
|
138951
139686
|
const db = ctx.db.getPrimary();
|
|
138952
139687
|
const result = await ctx.services.actor(db).getActor(did2, true);
|
|
138953
139688
|
if (!result) {
|
|
138954
139689
|
throw new InvalidRequestError("Repo not found", "RepoNotFound");
|
|
138955
139690
|
}
|
|
139691
|
+
const [partialRepo, accountInfo] = await Promise.all([
|
|
139692
|
+
ctx.services.moderation(db).views.repoDetail(result),
|
|
139693
|
+
getPdsAccountInfo(ctx, result.did)
|
|
139694
|
+
]);
|
|
139695
|
+
const repo = addAccountInfoToRepoViewDetail(partialRepo, accountInfo, auth.credentials.moderator);
|
|
138956
139696
|
return {
|
|
138957
139697
|
encoding: "application/json",
|
|
138958
|
-
body:
|
|
139698
|
+
body: repo
|
|
138959
139699
|
};
|
|
138960
139700
|
}
|
|
138961
139701
|
});
|
|
@@ -138965,14 +139705,23 @@ function getRepo_default(server, ctx) {
|
|
|
138965
139705
|
function getModerationAction_default(server, ctx) {
|
|
138966
139706
|
server.com.atproto.admin.getModerationAction({
|
|
138967
139707
|
auth: ctx.roleVerifier,
|
|
138968
|
-
handler: async ({ params: params2 }) => {
|
|
139708
|
+
handler: async ({ params: params2, auth }) => {
|
|
138969
139709
|
const { id } = params2;
|
|
138970
139710
|
const db = ctx.db.getPrimary();
|
|
138971
139711
|
const moderationService = ctx.services.moderation(db);
|
|
138972
139712
|
const result = await moderationService.getActionOrThrow(id);
|
|
139713
|
+
const [action, accountInfo] = await Promise.all([
|
|
139714
|
+
moderationService.views.actionDetail(result),
|
|
139715
|
+
getPdsAccountInfo(ctx, result.subjectDid)
|
|
139716
|
+
]);
|
|
139717
|
+
if (isRepoView(action.subject)) {
|
|
139718
|
+
action.subject = addAccountInfoToRepoView(action.subject, accountInfo, auth.credentials.moderator);
|
|
139719
|
+
} else if (isRecordView(action.subject)) {
|
|
139720
|
+
action.subject.repo = addAccountInfoToRepoView(action.subject.repo, accountInfo, auth.credentials.moderator);
|
|
139721
|
+
}
|
|
138973
139722
|
return {
|
|
138974
139723
|
encoding: "application/json",
|
|
138975
|
-
body:
|
|
139724
|
+
body: action
|
|
138976
139725
|
};
|
|
138977
139726
|
}
|
|
138978
139727
|
});
|
|
@@ -139006,14 +139755,23 @@ function getModerationActions_default(server, ctx) {
|
|
|
139006
139755
|
function getModerationReport_default(server, ctx) {
|
|
139007
139756
|
server.com.atproto.admin.getModerationReport({
|
|
139008
139757
|
auth: ctx.roleVerifier,
|
|
139009
|
-
handler: async ({ params: params2 }) => {
|
|
139758
|
+
handler: async ({ params: params2, auth }) => {
|
|
139010
139759
|
const { id } = params2;
|
|
139011
139760
|
const db = ctx.db.getPrimary();
|
|
139012
139761
|
const moderationService = ctx.services.moderation(db);
|
|
139013
139762
|
const result = await moderationService.getReportOrThrow(id);
|
|
139763
|
+
const [report, accountInfo] = await Promise.all([
|
|
139764
|
+
moderationService.views.reportDetail(result),
|
|
139765
|
+
getPdsAccountInfo(ctx, result.subjectDid)
|
|
139766
|
+
]);
|
|
139767
|
+
if (isRepoView(report.subject)) {
|
|
139768
|
+
report.subject = addAccountInfoToRepoView(report.subject, accountInfo, auth.credentials.moderator);
|
|
139769
|
+
} else if (isRecordView(report.subject)) {
|
|
139770
|
+
report.subject.repo = addAccountInfoToRepoView(report.subject.repo, accountInfo, auth.credentials.moderator);
|
|
139771
|
+
}
|
|
139014
139772
|
return {
|
|
139015
139773
|
encoding: "application/json",
|
|
139016
|
-
body:
|
|
139774
|
+
body: report
|
|
139017
139775
|
};
|
|
139018
139776
|
}
|
|
139019
139777
|
});
|
|
@@ -139152,6 +139910,14 @@ var createRouter2 = (ctx) => {
|
|
|
139152
139910
|
res.json({
|
|
139153
139911
|
"@context": ["https://www.w3.org/ns/did/v1"],
|
|
139154
139912
|
id: ctx.cfg.serverDid,
|
|
139913
|
+
verificationMethod: [
|
|
139914
|
+
{
|
|
139915
|
+
id: `${ctx.cfg.serverDid}#atproto`,
|
|
139916
|
+
type: "Multikey",
|
|
139917
|
+
controller: ctx.cfg.serverDid,
|
|
139918
|
+
publicKeyMultibase: ctx.signingKey.did().replace("did:key:", "")
|
|
139919
|
+
}
|
|
139920
|
+
],
|
|
139155
139921
|
service: [
|
|
139156
139922
|
{
|
|
139157
139923
|
id: "#bsky_notif",
|
|
@@ -139182,69 +139948,16 @@ var subLogger = subsystemLogger("bsky:sub");
|
|
|
139182
139948
|
var labelerLogger = subsystemLogger("bsky:labeler");
|
|
139183
139949
|
var httpLogger = subsystemLogger("bsky");
|
|
139184
139950
|
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;
|
|
139951
|
+
logger: httpLogger,
|
|
139952
|
+
serializers: {
|
|
139953
|
+
err: (err) => {
|
|
139954
|
+
return {
|
|
139955
|
+
code: err?.code,
|
|
139956
|
+
message: err?.message
|
|
139957
|
+
};
|
|
139204
139958
|
}
|
|
139205
139959
|
}
|
|
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
|
-
}
|
|
139960
|
+
});
|
|
139248
139961
|
|
|
139249
139962
|
// src/api/blob-resolver.ts
|
|
139250
139963
|
var createRouter3 = (ctx) => {
|
|
@@ -139435,6 +140148,10 @@ var AdminNS2 = class {
|
|
|
139435
140148
|
const nsid2 = "com.atproto.admin.enableAccountInvites";
|
|
139436
140149
|
return this._server.xrpc.method(nsid2, cfg);
|
|
139437
140150
|
}
|
|
140151
|
+
getAccountInfo(cfg) {
|
|
140152
|
+
const nsid2 = "com.atproto.admin.getAccountInfo";
|
|
140153
|
+
return this._server.xrpc.method(nsid2, cfg);
|
|
140154
|
+
}
|
|
139438
140155
|
getInviteCodes(cfg) {
|
|
139439
140156
|
const nsid2 = "com.atproto.admin.getInviteCodes";
|
|
139440
140157
|
return this._server.xrpc.method(nsid2, cfg);
|
|
@@ -139463,6 +140180,10 @@ var AdminNS2 = class {
|
|
|
139463
140180
|
const nsid2 = "com.atproto.admin.getRepo";
|
|
139464
140181
|
return this._server.xrpc.method(nsid2, cfg);
|
|
139465
140182
|
}
|
|
140183
|
+
getSubjectStatus(cfg) {
|
|
140184
|
+
const nsid2 = "com.atproto.admin.getSubjectStatus";
|
|
140185
|
+
return this._server.xrpc.method(nsid2, cfg);
|
|
140186
|
+
}
|
|
139466
140187
|
resolveModerationReports(cfg) {
|
|
139467
140188
|
const nsid2 = "com.atproto.admin.resolveModerationReports";
|
|
139468
140189
|
return this._server.xrpc.method(nsid2, cfg);
|
|
@@ -139491,6 +140212,10 @@ var AdminNS2 = class {
|
|
|
139491
140212
|
const nsid2 = "com.atproto.admin.updateAccountHandle";
|
|
139492
140213
|
return this._server.xrpc.method(nsid2, cfg);
|
|
139493
140214
|
}
|
|
140215
|
+
updateSubjectStatus(cfg) {
|
|
140216
|
+
const nsid2 = "com.atproto.admin.updateSubjectStatus";
|
|
140217
|
+
return this._server.xrpc.method(nsid2, cfg);
|
|
140218
|
+
}
|
|
139494
140219
|
};
|
|
139495
140220
|
var IdentityNS2 = class {
|
|
139496
140221
|
constructor(server) {
|
|
@@ -139636,6 +140361,10 @@ var ServerNS2 = class {
|
|
|
139636
140361
|
const nsid2 = "com.atproto.server.requestPasswordReset";
|
|
139637
140362
|
return this._server.xrpc.method(nsid2, cfg);
|
|
139638
140363
|
}
|
|
140364
|
+
reserveSigningKey(cfg) {
|
|
140365
|
+
const nsid2 = "com.atproto.server.reserveSigningKey";
|
|
140366
|
+
return this._server.xrpc.method(nsid2, cfg);
|
|
140367
|
+
}
|
|
139639
140368
|
resetPassword(cfg) {
|
|
139640
140369
|
const nsid2 = "com.atproto.server.resetPassword";
|
|
139641
140370
|
return this._server.xrpc.method(nsid2, cfg);
|
|
@@ -140342,7 +141071,7 @@ var UnexpectedObjectError = class extends Error {
|
|
|
140342
141071
|
|
|
140343
141072
|
// ../../node_modules/.pnpm/@ipld+car@3.2.3/node_modules/@ipld/car/esm/lib/reader.js
|
|
140344
141073
|
var import_fs = __toESM(require("fs"), 1);
|
|
140345
|
-
var
|
|
141074
|
+
var import_util81 = require("util");
|
|
140346
141075
|
|
|
140347
141076
|
// ../../node_modules/.pnpm/@ipld+car@3.2.3/node_modules/@ipld/car/esm/lib/decoder.js
|
|
140348
141077
|
var import_varint2 = __toESM(require_varint(), 1);
|
|
@@ -140607,7 +141336,7 @@ async function decodeReaderComplete(reader) {
|
|
|
140607
141336
|
}
|
|
140608
141337
|
|
|
140609
141338
|
// ../../node_modules/.pnpm/@ipld+car@3.2.3/node_modules/@ipld/car/esm/lib/reader.js
|
|
140610
|
-
var fsread = (0,
|
|
141339
|
+
var fsread = (0, import_util81.promisify)(import_fs.default.read);
|
|
140611
141340
|
var CarReader2 = class extends CarReader {
|
|
140612
141341
|
static async readRaw(fd, blockIndex) {
|
|
140613
141342
|
const { cid: cid2, blockLength, blockOffset } = blockIndex;
|
|
@@ -140632,7 +141361,7 @@ var CarReader2 = class extends CarReader {
|
|
|
140632
141361
|
|
|
140633
141362
|
// ../../node_modules/.pnpm/@ipld+car@3.2.3/node_modules/@ipld/car/esm/lib/writer.js
|
|
140634
141363
|
var import_fs2 = __toESM(require("fs"), 1);
|
|
140635
|
-
var
|
|
141364
|
+
var import_util82 = require("util");
|
|
140636
141365
|
|
|
140637
141366
|
// ../../node_modules/.pnpm/@ipld+car@3.2.3/node_modules/@ipld/car/esm/lib/encoder.js
|
|
140638
141367
|
var import_varint3 = __toESM(require_varint(), 1);
|
|
@@ -140652,8 +141381,8 @@ var CarWriterOut = class {
|
|
|
140652
141381
|
};
|
|
140653
141382
|
|
|
140654
141383
|
// ../../node_modules/.pnpm/@ipld+car@3.2.3/node_modules/@ipld/car/esm/lib/writer.js
|
|
140655
|
-
var fsread2 = (0,
|
|
140656
|
-
var fswrite = (0,
|
|
141384
|
+
var fsread2 = (0, import_util82.promisify)(import_fs2.default.read);
|
|
141385
|
+
var fswrite = (0, import_util82.promisify)(import_fs2.default.write);
|
|
140657
141386
|
|
|
140658
141387
|
// ../repo/src/util.ts
|
|
140659
141388
|
async function* verifyIncomingCarBlocks(car) {
|
|
@@ -140667,7 +141396,7 @@ var readCar = async (bytes3) => {
|
|
|
140667
141396
|
const roots = await car.getRoots();
|
|
140668
141397
|
const blocks = new block_map_default();
|
|
140669
141398
|
for await (const block of verifyIncomingCarBlocks(car.blocks())) {
|
|
140670
|
-
|
|
141399
|
+
blocks.set(block.cid, block.bytes);
|
|
140671
141400
|
}
|
|
140672
141401
|
return {
|
|
140673
141402
|
roots,
|
|
@@ -142180,27 +142909,43 @@ var BlockAndMuteState = class {
|
|
|
142180
142909
|
constructor(items = []) {
|
|
142181
142910
|
this.hasIdx = /* @__PURE__ */ new Map();
|
|
142182
142911
|
this.blockIdx = /* @__PURE__ */ new Map();
|
|
142912
|
+
this.blockListIdx = /* @__PURE__ */ new Map();
|
|
142183
142913
|
this.muteIdx = /* @__PURE__ */ new Map();
|
|
142184
142914
|
this.muteListIdx = /* @__PURE__ */ new Map();
|
|
142185
142915
|
items.forEach((item) => this.add(item));
|
|
142186
142916
|
}
|
|
142187
142917
|
add(item) {
|
|
142188
|
-
|
|
142189
|
-
|
|
142918
|
+
if (item.source === item.target) {
|
|
142919
|
+
return;
|
|
142920
|
+
}
|
|
142921
|
+
if (item.blocking) {
|
|
142190
142922
|
const map = this.blockIdx.get(item.source) ?? /* @__PURE__ */ new Map();
|
|
142191
|
-
map.set(item.target, blocking);
|
|
142923
|
+
map.set(item.target, item.blocking);
|
|
142192
142924
|
if (!this.blockIdx.has(item.source)) {
|
|
142193
142925
|
this.blockIdx.set(item.source, map);
|
|
142194
142926
|
}
|
|
142195
142927
|
}
|
|
142196
|
-
|
|
142197
|
-
|
|
142928
|
+
if (item.blockingViaList) {
|
|
142929
|
+
const map = this.blockListIdx.get(item.source) ?? /* @__PURE__ */ new Map();
|
|
142930
|
+
map.set(item.target, item.blockingViaList);
|
|
142931
|
+
if (!this.blockListIdx.has(item.source)) {
|
|
142932
|
+
this.blockListIdx.set(item.source, map);
|
|
142933
|
+
}
|
|
142934
|
+
}
|
|
142935
|
+
if (item.blockedBy) {
|
|
142198
142936
|
const map = this.blockIdx.get(item.target) ?? /* @__PURE__ */ new Map();
|
|
142199
|
-
map.set(item.source, blockedBy);
|
|
142937
|
+
map.set(item.source, item.blockedBy);
|
|
142200
142938
|
if (!this.blockIdx.has(item.target)) {
|
|
142201
142939
|
this.blockIdx.set(item.target, map);
|
|
142202
142940
|
}
|
|
142203
142941
|
}
|
|
142942
|
+
if (item.blockedByViaList) {
|
|
142943
|
+
const map = this.blockListIdx.get(item.target) ?? /* @__PURE__ */ new Map();
|
|
142944
|
+
map.set(item.source, item.blockedByViaList);
|
|
142945
|
+
if (!this.blockListIdx.has(item.target)) {
|
|
142946
|
+
this.blockListIdx.set(item.target, map);
|
|
142947
|
+
}
|
|
142948
|
+
}
|
|
142204
142949
|
if (item.muting) {
|
|
142205
142950
|
const set2 = this.muteIdx.get(item.source) ?? /* @__PURE__ */ new Set();
|
|
142206
142951
|
set2.add(item.target);
|
|
@@ -142225,7 +142970,7 @@ var BlockAndMuteState = class {
|
|
|
142225
142970
|
return !!this.blocking(pair) || !!this.blockedBy(pair);
|
|
142226
142971
|
}
|
|
142227
142972
|
blocking(pair) {
|
|
142228
|
-
return this.blockIdx.get(pair[0])?.get(pair[1]) ??
|
|
142973
|
+
return this.blockIdx.get(pair[0])?.get(pair[1]) ?? this.blockList(pair);
|
|
142229
142974
|
}
|
|
142230
142975
|
blockedBy(pair) {
|
|
142231
142976
|
return this.blocking([pair[1], pair[0]]);
|
|
@@ -142233,6 +142978,9 @@ var BlockAndMuteState = class {
|
|
|
142233
142978
|
mute(pair) {
|
|
142234
142979
|
return !!this.muteIdx.get(pair[0])?.has(pair[1]) || !!this.muteList(pair);
|
|
142235
142980
|
}
|
|
142981
|
+
blockList(pair) {
|
|
142982
|
+
return this.blockListIdx.get(pair[0])?.get(pair[1]) ?? null;
|
|
142983
|
+
}
|
|
142236
142984
|
muteList(pair) {
|
|
142237
142985
|
return this.muteListIdx.get(pair[0])?.get(pair[1]) ?? null;
|
|
142238
142986
|
}
|
|
@@ -142316,11 +143064,15 @@ var ActorViews = class {
|
|
|
142316
143064
|
this.services.graph.getBlockAndMuteState(viewer ? dids.map((did2) => [viewer, did2]) : [], state?.bam)
|
|
142317
143065
|
]);
|
|
142318
143066
|
const listUris = mapDefined(profiles, ({ did: did2 }) => {
|
|
142319
|
-
const
|
|
142320
|
-
|
|
142321
|
-
|
|
142322
|
-
|
|
142323
|
-
|
|
143067
|
+
const muteList = viewer && bam.muteList([viewer, did2]);
|
|
143068
|
+
const blockList = viewer && bam.blockList([viewer, did2]);
|
|
143069
|
+
const lists2 = [];
|
|
143070
|
+
if (muteList)
|
|
143071
|
+
lists2.push(muteList);
|
|
143072
|
+
if (blockList)
|
|
143073
|
+
lists2.push(blockList);
|
|
143074
|
+
return lists2;
|
|
143075
|
+
}).flat();
|
|
142324
143076
|
const lists = await this.services.graph.getListViews(listUris, viewer);
|
|
142325
143077
|
return { profilesDetailed: toMapByDid(profiles), labels, bam, lists };
|
|
142326
143078
|
}
|
|
@@ -142335,6 +143087,8 @@ var ActorViews = class {
|
|
|
142335
143087
|
const banner = prof?.bannerCid ? this.imgUriBuilder.getPresetUri("banner", prof.did, prof.bannerCid) : void 0;
|
|
142336
143088
|
const mutedByListUri = viewer && bam.muteList([viewer, did2]);
|
|
142337
143089
|
const mutedByList = mutedByListUri && lists[mutedByListUri] ? this.services.graph.formatListViewBasic(lists[mutedByListUri]) : void 0;
|
|
143090
|
+
const blockingByListUri = viewer && bam.blockList([viewer, did2]);
|
|
143091
|
+
const blockingByList = blockingByListUri && lists[blockingByListUri] ? this.services.graph.formatListViewBasic(lists[blockingByListUri]) : void 0;
|
|
142338
143092
|
const actorLabels = labels[did2] ?? [];
|
|
142339
143093
|
const selfLabels = getSelfLabels({
|
|
142340
143094
|
uri: prof.profileUri,
|
|
@@ -142357,6 +143111,7 @@ var ActorViews = class {
|
|
|
142357
143111
|
mutedByList,
|
|
142358
143112
|
blockedBy: !!bam.blockedBy([viewer, did2]),
|
|
142359
143113
|
blocking: bam.blocking([viewer, did2]) ?? void 0,
|
|
143114
|
+
blockingByList,
|
|
142360
143115
|
following: prof?.viewerFollowing && !bam.block([viewer, did2]) ? prof.viewerFollowing : void 0,
|
|
142361
143116
|
followedBy: prof?.viewerFollowedBy && !bam.block([viewer, did2]) ? prof.viewerFollowedBy : void 0
|
|
142362
143117
|
} : void 0,
|
|
@@ -142387,11 +143142,15 @@ var ActorViews = class {
|
|
|
142387
143142
|
this.services.graph.getBlockAndMuteState(viewer ? dids.map((did2) => [viewer, did2]) : [], state?.bam)
|
|
142388
143143
|
]);
|
|
142389
143144
|
const listUris = mapDefined(profiles, ({ did: did2 }) => {
|
|
142390
|
-
const
|
|
142391
|
-
|
|
142392
|
-
|
|
142393
|
-
|
|
142394
|
-
|
|
143145
|
+
const muteList = viewer && bam.muteList([viewer, did2]);
|
|
143146
|
+
const blockList = viewer && bam.blockList([viewer, did2]);
|
|
143147
|
+
const lists2 = [];
|
|
143148
|
+
if (muteList)
|
|
143149
|
+
lists2.push(muteList);
|
|
143150
|
+
if (blockList)
|
|
143151
|
+
lists2.push(blockList);
|
|
143152
|
+
return lists2;
|
|
143153
|
+
}).flat();
|
|
142395
143154
|
const lists = await this.services.graph.getListViews(listUris, viewer);
|
|
142396
143155
|
return { profiles: toMapByDid(profiles), labels, bam, lists };
|
|
142397
143156
|
}
|
|
@@ -142405,6 +143164,8 @@ var ActorViews = class {
|
|
|
142405
143164
|
const avatar = prof?.avatarCid ? this.imgUriBuilder.getPresetUri("avatar", prof.did, prof.avatarCid) : void 0;
|
|
142406
143165
|
const mutedByListUri = viewer && bam.muteList([viewer, did2]);
|
|
142407
143166
|
const mutedByList = mutedByListUri && lists[mutedByListUri] ? this.services.graph.formatListViewBasic(lists[mutedByListUri]) : void 0;
|
|
143167
|
+
const blockingByListUri = viewer && bam.blockList([viewer, did2]);
|
|
143168
|
+
const blockingByList = blockingByListUri && lists[blockingByListUri] ? this.services.graph.formatListViewBasic(lists[blockingByListUri]) : void 0;
|
|
142408
143169
|
const actorLabels = labels[did2] ?? [];
|
|
142409
143170
|
const selfLabels = getSelfLabels({
|
|
142410
143171
|
uri: prof.profileUri,
|
|
@@ -142423,6 +143184,7 @@ var ActorViews = class {
|
|
|
142423
143184
|
mutedByList,
|
|
142424
143185
|
blockedBy: !!bam.blockedBy([viewer, did2]),
|
|
142425
143186
|
blocking: bam.blocking([viewer, did2]) ?? void 0,
|
|
143187
|
+
blockingByList,
|
|
142426
143188
|
following: prof?.viewerFollowing && !bam.block([viewer, did2]) ? prof.viewerFollowing : void 0,
|
|
142427
143189
|
followedBy: prof?.viewerFollowedBy && !bam.block([viewer, did2]) ? prof.viewerFollowedBy : void 0
|
|
142428
143190
|
} : void 0,
|
|
@@ -142489,7 +143251,7 @@ var ActorService = class {
|
|
|
142489
143251
|
qb = qb.orWhere("actor.did", "in", dids);
|
|
142490
143252
|
}
|
|
142491
143253
|
if (handles.length) {
|
|
142492
|
-
qb = qb.orWhere("actor.handle", "in", handles);
|
|
143254
|
+
qb = qb.orWhere("actor.handle", "in", handles.length === 1 ? [handles[0], handles[0]] : handles);
|
|
142493
143255
|
}
|
|
142494
143256
|
return qb;
|
|
142495
143257
|
}).selectAll().execute();
|
|
@@ -143231,7 +143993,7 @@ var ModerationViews = class {
|
|
|
143231
143993
|
async recordDetail(result) {
|
|
143232
143994
|
const [record, reportResults, actionResults] = await Promise.all([
|
|
143233
143995
|
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(),
|
|
143996
|
+
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
143997
|
this.db.db.selectFrom("moderation_action").where("subjectType", "=", "com.atproto.repo.strongRef").where("subjectUri", "=", result.uri).orderBy("id", "desc").selectAll().execute()
|
|
143236
143998
|
]);
|
|
143237
143999
|
const [reports, actions, blobs, labels] = await Promise.all([
|
|
@@ -143676,17 +144438,46 @@ var ModerationService = class {
|
|
|
143676
144438
|
createdBy,
|
|
143677
144439
|
reason
|
|
143678
144440
|
});
|
|
144441
|
+
let restored;
|
|
143679
144442
|
if (result.action === TAKEDOWN && result.subjectType === "com.atproto.admin.defs#repoRef" && result.subjectDid) {
|
|
143680
144443
|
await this.reverseTakedownRepo({
|
|
143681
144444
|
did: result.subjectDid
|
|
143682
144445
|
});
|
|
144446
|
+
restored = {
|
|
144447
|
+
did: result.subjectDid,
|
|
144448
|
+
subjects: [
|
|
144449
|
+
{
|
|
144450
|
+
$type: "com.atproto.admin.defs#repoRef",
|
|
144451
|
+
did: result.subjectDid
|
|
144452
|
+
}
|
|
144453
|
+
]
|
|
144454
|
+
};
|
|
143683
144455
|
}
|
|
143684
144456
|
if (result.action === TAKEDOWN && result.subjectType === "com.atproto.repo.strongRef" && result.subjectUri) {
|
|
144457
|
+
const uri2 = new AtUri(result.subjectUri);
|
|
143685
144458
|
await this.reverseTakedownRecord({
|
|
143686
|
-
uri:
|
|
144459
|
+
uri: uri2
|
|
143687
144460
|
});
|
|
144461
|
+
const did2 = uri2.hostname;
|
|
144462
|
+
const actionBlobs = await this.db.db.selectFrom("moderation_action_subject_blob").where("actionId", "=", id).select("cid").execute();
|
|
144463
|
+
restored = {
|
|
144464
|
+
did: did2,
|
|
144465
|
+
subjects: [
|
|
144466
|
+
{
|
|
144467
|
+
$type: "com.atproto.repo.strongRef",
|
|
144468
|
+
uri: result.subjectUri,
|
|
144469
|
+
cid: result.subjectCid ?? ""
|
|
144470
|
+
},
|
|
144471
|
+
...actionBlobs.map((row) => ({
|
|
144472
|
+
$type: "com.atproto.admin.defs#repoBlobRef",
|
|
144473
|
+
did: did2,
|
|
144474
|
+
cid: row.cid,
|
|
144475
|
+
recordUri: result.subjectUri
|
|
144476
|
+
}))
|
|
144477
|
+
]
|
|
144478
|
+
};
|
|
143688
144479
|
}
|
|
143689
|
-
return result;
|
|
144480
|
+
return { result, restored };
|
|
143690
144481
|
}
|
|
143691
144482
|
async logReverseAction(info) {
|
|
143692
144483
|
const { id, createdBy, reason, createdAt = new Date() } = info;
|
|
@@ -143701,23 +144492,51 @@ var ModerationService = class {
|
|
|
143701
144492
|
return result;
|
|
143702
144493
|
}
|
|
143703
144494
|
async takedownRepo(info) {
|
|
143704
|
-
|
|
144495
|
+
const { takedownId, did: did2 } = info;
|
|
144496
|
+
await this.db.db.updateTable("actor").set({ takedownId }).where("did", "=", did2).where("takedownId", "is", null).executeTakeFirst();
|
|
144497
|
+
return {
|
|
144498
|
+
did: did2,
|
|
144499
|
+
subjects: [
|
|
144500
|
+
{
|
|
144501
|
+
$type: "com.atproto.admin.defs#repoRef",
|
|
144502
|
+
did: did2
|
|
144503
|
+
}
|
|
144504
|
+
]
|
|
144505
|
+
};
|
|
143705
144506
|
}
|
|
143706
144507
|
async reverseTakedownRepo(info) {
|
|
143707
144508
|
await this.db.db.updateTable("actor").set({ takedownId: null }).where("did", "=", info.did).execute();
|
|
143708
144509
|
}
|
|
143709
144510
|
async takedownRecord(info) {
|
|
144511
|
+
const { takedownId, uri: uri2, cid: cid2, blobCids } = info;
|
|
144512
|
+
const did2 = uri2.hostname;
|
|
143710
144513
|
this.db.assertTransaction();
|
|
143711
|
-
await this.db.db.updateTable("record").set({ takedownId
|
|
143712
|
-
if (
|
|
143713
|
-
await Promise.all(
|
|
144514
|
+
await this.db.db.updateTable("record").set({ takedownId }).where("uri", "=", uri2.toString()).where("takedownId", "is", null).executeTakeFirst();
|
|
144515
|
+
if (blobCids) {
|
|
144516
|
+
await Promise.all(blobCids.map(async (cid3) => {
|
|
143714
144517
|
const paths = ImageUriBuilder.presets.map((id) => {
|
|
143715
|
-
const
|
|
143716
|
-
return
|
|
144518
|
+
const imgUri = this.imgUriBuilder.getPresetUri(id, uri2.host, cid3);
|
|
144519
|
+
return imgUri.replace(this.imgUriBuilder.endpoint, "");
|
|
143717
144520
|
});
|
|
143718
|
-
await this.imgInvalidator.invalidate(
|
|
144521
|
+
await this.imgInvalidator.invalidate(cid3.toString(), paths);
|
|
143719
144522
|
}));
|
|
143720
144523
|
}
|
|
144524
|
+
return {
|
|
144525
|
+
did: did2,
|
|
144526
|
+
subjects: [
|
|
144527
|
+
{
|
|
144528
|
+
$type: "com.atproto.repo.strongRef",
|
|
144529
|
+
uri: uri2.toString(),
|
|
144530
|
+
cid: cid2.toString()
|
|
144531
|
+
},
|
|
144532
|
+
...(blobCids || []).map((cid3) => ({
|
|
144533
|
+
$type: "com.atproto.admin.defs#repoBlobRef",
|
|
144534
|
+
did: did2,
|
|
144535
|
+
cid: cid3.toString(),
|
|
144536
|
+
recordUri: uri2.toString()
|
|
144537
|
+
}))
|
|
144538
|
+
]
|
|
144539
|
+
};
|
|
143721
144540
|
}
|
|
143722
144541
|
async reverseTakedownRecord(info) {
|
|
143723
144542
|
this.db.assertTransaction();
|
|
@@ -143805,11 +144624,11 @@ var authVerifier = (idResolver, opts) => async (reqCtx) => {
|
|
|
143805
144624
|
if (!jwtStr) {
|
|
143806
144625
|
throw new AuthRequiredError("missing jwt", "MissingJwt");
|
|
143807
144626
|
}
|
|
143808
|
-
const
|
|
143809
|
-
const atprotoData = await idResolver.did.resolveAtprotoData(
|
|
144627
|
+
const payload = await verifyJwt(jwtStr, opts.aud, async (did2, forceRefresh) => {
|
|
144628
|
+
const atprotoData = await idResolver.did.resolveAtprotoData(did2, forceRefresh);
|
|
143810
144629
|
return atprotoData.signingKey;
|
|
143811
144630
|
});
|
|
143812
|
-
return { credentials: { did:
|
|
144631
|
+
return { credentials: { did: payload.iss }, artifacts: { aud: opts.aud } };
|
|
143813
144632
|
};
|
|
143814
144633
|
var authOptionalVerifier = (idResolver, opts) => async (reqCtx) => {
|
|
143815
144634
|
if (!reqCtx.req.headers.authorization) {
|
|
@@ -143912,6 +144731,9 @@ var AppContext = class {
|
|
|
143912
144731
|
get services() {
|
|
143913
144732
|
return this.opts.services;
|
|
143914
144733
|
}
|
|
144734
|
+
get signingKey() {
|
|
144735
|
+
return this.opts.signingKey;
|
|
144736
|
+
}
|
|
143915
144737
|
get plcClient() {
|
|
143916
144738
|
return new plc.Client(this.cfg.didPlcUrl);
|
|
143917
144739
|
}
|
|
@@ -143947,6 +144769,21 @@ var AppContext = class {
|
|
|
143947
144769
|
get roleVerifier() {
|
|
143948
144770
|
return roleVerifier(this.cfg);
|
|
143949
144771
|
}
|
|
144772
|
+
async serviceAuthJwt(aud) {
|
|
144773
|
+
const iss = this.cfg.serverDid;
|
|
144774
|
+
return createServiceJwt({
|
|
144775
|
+
iss,
|
|
144776
|
+
aud,
|
|
144777
|
+
keypair: this.signingKey
|
|
144778
|
+
});
|
|
144779
|
+
}
|
|
144780
|
+
async pdsAdminAgent(did2) {
|
|
144781
|
+
const data = await this.idResolver.did.resolveAtprotoData(did2);
|
|
144782
|
+
const agent = new AtpAgent({ service: data.pds });
|
|
144783
|
+
const jwt = await this.serviceAuthJwt(did2);
|
|
144784
|
+
agent.api.setHeader("authorization", `Bearer ${jwt}`);
|
|
144785
|
+
return agent;
|
|
144786
|
+
}
|
|
143950
144787
|
get backgroundQueue() {
|
|
143951
144788
|
return this.opts.backgroundQueue;
|
|
143952
144789
|
}
|
|
@@ -143965,15 +144802,22 @@ var DidSqlCache = class {
|
|
|
143965
144802
|
this.maxTTL = maxTTL;
|
|
143966
144803
|
this.pQueue = new import_p_queue.default();
|
|
143967
144804
|
}
|
|
143968
|
-
async cacheDid(did2, doc) {
|
|
143969
|
-
|
|
144805
|
+
async cacheDid(did2, doc, prevResult) {
|
|
144806
|
+
if (prevResult) {
|
|
144807
|
+
await this.db.db.updateTable("did_cache").set({ doc, updatedAt: Date.now() }).where("did", "=", did2).where("updatedAt", "=", prevResult.updatedAt).execute();
|
|
144808
|
+
} else {
|
|
144809
|
+
await this.db.db.insertInto("did_cache").values({ did: did2, doc, updatedAt: Date.now() }).onConflict((oc) => oc.column("did").doUpdateSet({
|
|
144810
|
+
doc: excluded(this.db.db, "doc"),
|
|
144811
|
+
updatedAt: excluded(this.db.db, "updatedAt")
|
|
144812
|
+
})).executeTakeFirst();
|
|
144813
|
+
}
|
|
143970
144814
|
}
|
|
143971
|
-
async refreshCache(did2, getDoc) {
|
|
144815
|
+
async refreshCache(did2, getDoc, prevResult) {
|
|
143972
144816
|
this.pQueue?.add(async () => {
|
|
143973
144817
|
try {
|
|
143974
144818
|
const doc = await getDoc();
|
|
143975
144819
|
if (doc) {
|
|
143976
|
-
await this.cacheDid(did2, doc);
|
|
144820
|
+
await this.cacheDid(did2, doc, prevResult);
|
|
143977
144821
|
} else {
|
|
143978
144822
|
await this.clearEntry(did2);
|
|
143979
144823
|
}
|
|
@@ -143989,15 +144833,13 @@ var DidSqlCache = class {
|
|
|
143989
144833
|
const now = Date.now();
|
|
143990
144834
|
const updatedAt = new Date(res.updatedAt).getTime();
|
|
143991
144835
|
const expired = now > updatedAt + this.maxTTL;
|
|
143992
|
-
if (expired) {
|
|
143993
|
-
return null;
|
|
143994
|
-
}
|
|
143995
144836
|
const stale = now > updatedAt + this.staleTTL;
|
|
143996
144837
|
return {
|
|
143997
144838
|
doc: res.doc,
|
|
143998
144839
|
updatedAt,
|
|
143999
144840
|
did: did2,
|
|
144000
|
-
stale
|
|
144841
|
+
stale,
|
|
144842
|
+
expired
|
|
144001
144843
|
};
|
|
144002
144844
|
}
|
|
144003
144845
|
async clearEntry(did2) {
|
|
@@ -144535,7 +145377,8 @@ __export(migrations_exports, {
|
|
|
144535
145377
|
_20230830T205507322Z: () => T205507322Z_suggested_feeds_exports,
|
|
144536
145378
|
_20230904T211011773Z: () => T211011773Z_block_lists_exports,
|
|
144537
145379
|
_20230906T222220386Z: () => T222220386Z_thread_gating_exports,
|
|
144538
|
-
_20230920T213858047Z: () => T213858047Z_add_tags_to_post_exports
|
|
145380
|
+
_20230920T213858047Z: () => T213858047Z_add_tags_to_post_exports,
|
|
145381
|
+
_20230929T192920807Z: () => T192920807Z_record_cursor_indexes_exports
|
|
144539
145382
|
});
|
|
144540
145383
|
|
|
144541
145384
|
// src/db/migrations/20230309T045948368Z-init.ts
|
|
@@ -145013,6 +145856,27 @@ async function down27(db) {
|
|
|
145013
145856
|
await db.schema.alterTable("post").dropColumn("tags").execute();
|
|
145014
145857
|
}
|
|
145015
145858
|
|
|
145859
|
+
// src/db/migrations/20230929T192920807Z-record-cursor-indexes.ts
|
|
145860
|
+
var T192920807Z_record_cursor_indexes_exports = {};
|
|
145861
|
+
__export(T192920807Z_record_cursor_indexes_exports, {
|
|
145862
|
+
down: () => down28,
|
|
145863
|
+
up: () => up28
|
|
145864
|
+
});
|
|
145865
|
+
async function up28(db) {
|
|
145866
|
+
await db.schema.createIndex("like_creator_cursor_idx").on("like").columns(["creator", "sortAt", "cid"]).execute();
|
|
145867
|
+
await db.schema.createIndex("follow_creator_cursor_idx").on("follow").columns(["creator", "sortAt", "cid"]).execute();
|
|
145868
|
+
await db.schema.createIndex("follow_subject_cursor_idx").on("follow").columns(["subjectDid", "sortAt", "cid"]).execute();
|
|
145869
|
+
await db.schema.dropIndex("like_creator_idx").execute();
|
|
145870
|
+
await db.schema.dropIndex("follow_subjectdid_idx").execute();
|
|
145871
|
+
}
|
|
145872
|
+
async function down28(db) {
|
|
145873
|
+
await db.schema.createIndex("like_creator_idx").on("like").column("creator").execute();
|
|
145874
|
+
await db.schema.createIndex("follow_subjectdid_idx").on("follow").column("subjectDid").execute();
|
|
145875
|
+
await db.schema.dropIndex("like_creator_cursor_idx").execute();
|
|
145876
|
+
await db.schema.dropIndex("follow_creator_cursor_idx").execute();
|
|
145877
|
+
await db.schema.dropIndex("follow_subject_cursor_idx").execute();
|
|
145878
|
+
}
|
|
145879
|
+
|
|
145016
145880
|
// src/db/migrations/provider.ts
|
|
145017
145881
|
var CtxMigrationProvider = class {
|
|
145018
145882
|
constructor(migrations, ctx) {
|
|
@@ -145574,9 +146438,9 @@ var handler2 = async (ctx, params2, requester) => {
|
|
|
145574
146438
|
const db = ctx.db.getReplica("feed");
|
|
145575
146439
|
const feedService = ctx.services.feed(db);
|
|
145576
146440
|
const { ref } = db.db.dynamic;
|
|
145577
|
-
const keyset = new FeedKeyset(ref("post.
|
|
146441
|
+
const keyset = new FeedKeyset(ref("post.sortAt"), ref("post.cid"));
|
|
145578
146442
|
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.
|
|
146443
|
+
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
146444
|
postsQb = paginate(postsQb, { limit, cursor, keyset, tryIndex: true });
|
|
145581
146445
|
const feedItems = await postsQb.execute();
|
|
145582
146446
|
return {
|
|
@@ -146723,11 +147587,9 @@ var IndexingService = class {
|
|
|
146723
147587
|
const atpData = await this.idResolver.did.resolveAtprotoData(did2, true);
|
|
146724
147588
|
const handleToDid = await this.idResolver.handle.resolve(atpData.handle);
|
|
146725
147589
|
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
|
-
}
|
|
147590
|
+
const actorWithHandle = handle2 !== null ? await this.db.db.selectFrom("actor").where("handle", "=", handle2).selectAll().executeTakeFirst() : null;
|
|
147591
|
+
if (handle2 && actorWithHandle && did2 !== actorWithHandle.did) {
|
|
147592
|
+
await this.db.db.updateTable("actor").where("actor.did", "=", actorWithHandle.did).set({ handle: null }).execute();
|
|
146731
147593
|
}
|
|
146732
147594
|
const actorInfo = { handle: handle2, indexedAt: timestamp };
|
|
146733
147595
|
await this.db.db.insertInto("actor").values({ did: did2, ...actorInfo }).onConflict((oc) => oc.column("did").doUpdateSet(actorInfo)).returning("did").executeTakeFirst();
|
|
@@ -146815,7 +147677,7 @@ var IndexingService = class {
|
|
|
146815
147677
|
}
|
|
146816
147678
|
async getActorIsHosted(did2) {
|
|
146817
147679
|
const doc = await this.idResolver.did.resolve(did2, true);
|
|
146818
|
-
const pds = doc &&
|
|
147680
|
+
const pds = doc && getPdsEndpoint(doc);
|
|
146819
147681
|
if (!pds)
|
|
146820
147682
|
return false;
|
|
146821
147683
|
const { api } = new AtpAgent({ service: pds });
|
|
@@ -147266,19 +148128,6 @@ function partitionId(key) {
|
|
|
147266
148128
|
function partitionKey(p) {
|
|
147267
148129
|
return `repo:${p}`;
|
|
147268
148130
|
}
|
|
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
148131
|
|
|
147283
148132
|
// src/lexicon/types/app/bsky/actor/profile.ts
|
|
147284
148133
|
function isRecord2(v) {
|
|
@@ -147830,6 +148679,7 @@ var AutoModerator = class {
|
|
|
147830
148679
|
await modSrvc.takedownRecord({
|
|
147831
148680
|
takedownId: action.id,
|
|
147832
148681
|
uri: uri2,
|
|
148682
|
+
cid: recordCid,
|
|
147833
148683
|
blobCids: takedownCids
|
|
147834
148684
|
});
|
|
147835
148685
|
});
|
|
@@ -148513,7 +149363,7 @@ var BskyAppView = class {
|
|
|
148513
149363
|
this.app = opts.app;
|
|
148514
149364
|
}
|
|
148515
149365
|
static create(opts) {
|
|
148516
|
-
const { db, config: config2, algos = {} } = opts;
|
|
149366
|
+
const { db, config: config2, signingKey, algos = {} } = opts;
|
|
148517
149367
|
let maybeImgInvalidator = opts.imgInvalidator;
|
|
148518
149368
|
const app = (0, import_express7.default)();
|
|
148519
149369
|
app.use((0, import_cors.default)());
|
|
@@ -148552,6 +149402,7 @@ var BskyAppView = class {
|
|
|
148552
149402
|
cfg: config2,
|
|
148553
149403
|
services,
|
|
148554
149404
|
imgUriBuilder,
|
|
149405
|
+
signingKey,
|
|
148555
149406
|
idResolver,
|
|
148556
149407
|
didCache,
|
|
148557
149408
|
labelCache,
|