@atproto/ozone 0.0.11 → 0.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +17 -0
- package/dist/api/label/queryLabels.d.ts +3 -0
- package/dist/api/label/subscribeLabels.d.ts +3 -0
- package/dist/config/config.d.ts +3 -0
- package/dist/config/env.d.ts +3 -0
- package/dist/context.d.ts +3 -0
- package/dist/db/index.js +3 -1
- package/dist/db/index.js.map +2 -2
- package/dist/db/schema/label.d.ts +4 -0
- package/dist/index.js +875 -454
- package/dist/index.js.map +3 -3
- package/dist/lexicon/index.d.ts +2 -0
- package/dist/lexicon/lexicons.d.ts +27 -0
- package/dist/lexicon/types/app/bsky/actor/defs.d.ts +1 -1
- package/dist/lexicon/types/com/atproto/admin/updateAccountPassword.d.ts +26 -0
- package/dist/logger.d.ts +1 -0
- package/dist/mod-service/util.d.ts +3 -0
- package/dist/sequencer/index.d.ts +2 -0
- package/dist/sequencer/outbox.d.ts +16 -0
- package/dist/sequencer/sequencer.d.ts +33 -0
- package/package.json +10 -10
- package/src/api/admin/emitModerationEvent.ts +16 -10
- package/src/api/index.ts +4 -0
- package/src/api/label/queryLabels.ts +58 -0
- package/src/api/label/subscribeLabels.ts +25 -0
- package/src/api/temp/fetchLabels.ts +2 -4
- package/src/config/config.ts +6 -0
- package/src/config/env.ts +6 -0
- package/src/context.ts +12 -0
- package/src/db/migrations/20231219T205730722Z-init.ts +7 -1
- package/src/db/schema/label.ts +7 -0
- package/src/index.ts +2 -0
- package/src/lexicon/index.ts +12 -0
- package/src/lexicon/lexicons.ts +32 -1
- package/src/lexicon/types/app/bsky/actor/defs.ts +2 -0
- package/src/lexicon/types/com/atproto/admin/updateAccountPassword.ts +39 -0
- package/src/logger.ts +2 -0
- package/src/mod-service/index.ts +73 -72
- package/src/mod-service/status.ts +3 -0
- package/src/mod-service/util.ts +17 -0
- package/src/mod-service/views.ts +2 -5
- package/src/sequencer/index.ts +2 -0
- package/src/sequencer/outbox.ts +122 -0
- package/src/sequencer/sequencer.ts +143 -0
- package/tests/__snapshots__/moderation-events.test.ts.snap +53 -75
- package/tests/__snapshots__/moderation.test.ts.snap +4 -4
- package/tests/moderation-appeals.test.ts +19 -7
- package/tests/moderation-events.test.ts +7 -7
- package/tests/moderation-statuses.test.ts +2 -2
- package/tests/moderation.test.ts +14 -13
- package/tests/query-labels.test.ts +163 -0
- package/tests/repo-search.test.ts +0 -1
- package/tests/sequencer.test.ts +222 -0
- package/tests/server.test.ts +2 -0
package/dist/index.js
CHANGED
|
@@ -1331,7 +1331,7 @@ var require_src = __commonJS({
|
|
|
1331
1331
|
var require_destroy = __commonJS({
|
|
1332
1332
|
"../../node_modules/.pnpm/destroy@1.2.0/node_modules/destroy/index.js"(exports, module2) {
|
|
1333
1333
|
"use strict";
|
|
1334
|
-
var
|
|
1334
|
+
var EventEmitter3 = require("events").EventEmitter;
|
|
1335
1335
|
var ReadStream = require("fs").ReadStream;
|
|
1336
1336
|
var Stream2 = require("stream");
|
|
1337
1337
|
var Zlib = require("zlib");
|
|
@@ -1393,7 +1393,7 @@ var require_destroy = __commonJS({
|
|
|
1393
1393
|
return stream instanceof Stream2 && typeof stream.destroy === "function";
|
|
1394
1394
|
}
|
|
1395
1395
|
function isEventEmitter(val) {
|
|
1396
|
-
return val instanceof
|
|
1396
|
+
return val instanceof EventEmitter3;
|
|
1397
1397
|
}
|
|
1398
1398
|
function isFsReadStream(stream) {
|
|
1399
1399
|
return stream instanceof ReadStream;
|
|
@@ -21674,7 +21674,7 @@ var require_express = __commonJS({
|
|
|
21674
21674
|
"../../node_modules/.pnpm/express@4.18.2/node_modules/express/lib/express.js"(exports, module2) {
|
|
21675
21675
|
"use strict";
|
|
21676
21676
|
var bodyParser = require_body_parser();
|
|
21677
|
-
var
|
|
21677
|
+
var EventEmitter3 = require("events").EventEmitter;
|
|
21678
21678
|
var mixin = require_merge_descriptors();
|
|
21679
21679
|
var proto = require_application();
|
|
21680
21680
|
var Route = require_route();
|
|
@@ -21686,7 +21686,7 @@ var require_express = __commonJS({
|
|
|
21686
21686
|
var app = function(req2, res2, next) {
|
|
21687
21687
|
app.handle(req2, res2, next);
|
|
21688
21688
|
};
|
|
21689
|
-
mixin(app,
|
|
21689
|
+
mixin(app, EventEmitter3.prototype, false);
|
|
21690
21690
|
mixin(app, proto, false);
|
|
21691
21691
|
app.request = Object.create(req, {
|
|
21692
21692
|
app: { configurable: true, enumerable: true, writable: true, value: app }
|
|
@@ -45098,7 +45098,7 @@ var require_sonic_boom = __commonJS({
|
|
|
45098
45098
|
"../../node_modules/.pnpm/sonic-boom@3.3.0/node_modules/sonic-boom/index.js"(exports, module2) {
|
|
45099
45099
|
"use strict";
|
|
45100
45100
|
var fs = require("fs");
|
|
45101
|
-
var
|
|
45101
|
+
var EventEmitter3 = require("events");
|
|
45102
45102
|
var inherits = require("util").inherits;
|
|
45103
45103
|
var path = require("path");
|
|
45104
45104
|
var sleep = require_atomic_sleep();
|
|
@@ -45285,7 +45285,7 @@ var require_sonic_boom = __commonJS({
|
|
|
45285
45285
|
sonic._asyncDrainScheduled = false;
|
|
45286
45286
|
sonic.emit("drain");
|
|
45287
45287
|
}
|
|
45288
|
-
inherits(SonicBoom,
|
|
45288
|
+
inherits(SonicBoom, EventEmitter3);
|
|
45289
45289
|
SonicBoom.prototype.write = function(data) {
|
|
45290
45290
|
if (this.destroyed) {
|
|
45291
45291
|
throw new Error("SonicBoom destroyed");
|
|
@@ -45675,7 +45675,7 @@ var require_thread_stream = __commonJS({
|
|
|
45675
45675
|
"../../node_modules/.pnpm/thread-stream@2.4.0/node_modules/thread-stream/index.js"(exports, module2) {
|
|
45676
45676
|
"use strict";
|
|
45677
45677
|
var { version: version2 } = require_package();
|
|
45678
|
-
var { EventEmitter:
|
|
45678
|
+
var { EventEmitter: EventEmitter3 } = require("events");
|
|
45679
45679
|
var { Worker } = require("worker_threads");
|
|
45680
45680
|
var { join } = require("path");
|
|
45681
45681
|
var { pathToFileURL } = require("url");
|
|
@@ -45830,7 +45830,7 @@ var require_thread_stream = __commonJS({
|
|
|
45830
45830
|
stream.worker.off("exit", onWorkerExit);
|
|
45831
45831
|
destroy(stream, code3 !== 0 ? new Error("the worker thread exited") : null);
|
|
45832
45832
|
}
|
|
45833
|
-
var ThreadStream = class extends
|
|
45833
|
+
var ThreadStream = class extends EventEmitter3 {
|
|
45834
45834
|
constructor(opts = {}) {
|
|
45835
45835
|
super();
|
|
45836
45836
|
if (opts.bufferSize < 4) {
|
|
@@ -46694,7 +46694,7 @@ var require_meta = __commonJS({
|
|
|
46694
46694
|
var require_proto = __commonJS({
|
|
46695
46695
|
"../../node_modules/.pnpm/pino@8.15.0/node_modules/pino/lib/proto.js"(exports, module2) {
|
|
46696
46696
|
"use strict";
|
|
46697
|
-
var { EventEmitter:
|
|
46697
|
+
var { EventEmitter: EventEmitter3 } = require("events");
|
|
46698
46698
|
var {
|
|
46699
46699
|
lsCacheSym,
|
|
46700
46700
|
levelValSym,
|
|
@@ -46768,7 +46768,7 @@ var require_proto = __commonJS({
|
|
|
46768
46768
|
[getLevelSym]: getLevel,
|
|
46769
46769
|
[setLevelSym]: setLevel
|
|
46770
46770
|
};
|
|
46771
|
-
Object.setPrototypeOf(prototype,
|
|
46771
|
+
Object.setPrototypeOf(prototype, EventEmitter3.prototype);
|
|
46772
46772
|
module2.exports = function() {
|
|
46773
46773
|
return Object.create(prototype);
|
|
46774
46774
|
};
|
|
@@ -48861,7 +48861,7 @@ var require_extension = __commonJS({
|
|
|
48861
48861
|
var require_websocket = __commonJS({
|
|
48862
48862
|
"../../node_modules/.pnpm/ws@8.12.0/node_modules/ws/lib/websocket.js"(exports, module2) {
|
|
48863
48863
|
"use strict";
|
|
48864
|
-
var
|
|
48864
|
+
var EventEmitter3 = require("events");
|
|
48865
48865
|
var https = require("https");
|
|
48866
48866
|
var http = require("http");
|
|
48867
48867
|
var net = require("net");
|
|
@@ -48892,7 +48892,7 @@ var require_websocket = __commonJS({
|
|
|
48892
48892
|
var protocolVersions = [8, 13];
|
|
48893
48893
|
var readyStates = ["CONNECTING", "OPEN", "CLOSING", "CLOSED"];
|
|
48894
48894
|
var subprotocolRegex = /^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/;
|
|
48895
|
-
var WebSocket4 = class extends
|
|
48895
|
+
var WebSocket4 = class extends EventEmitter3 {
|
|
48896
48896
|
constructor(address, protocols, options) {
|
|
48897
48897
|
super();
|
|
48898
48898
|
this._binaryType = BINARY_TYPES[0];
|
|
@@ -49627,7 +49627,7 @@ var require_subprotocol = __commonJS({
|
|
|
49627
49627
|
var require_websocket_server = __commonJS({
|
|
49628
49628
|
"../../node_modules/.pnpm/ws@8.12.0/node_modules/ws/lib/websocket-server.js"(exports, module2) {
|
|
49629
49629
|
"use strict";
|
|
49630
|
-
var
|
|
49630
|
+
var EventEmitter3 = require("events");
|
|
49631
49631
|
var http = require("http");
|
|
49632
49632
|
var https = require("https");
|
|
49633
49633
|
var net = require("net");
|
|
@@ -49642,7 +49642,7 @@ var require_websocket_server = __commonJS({
|
|
|
49642
49642
|
var RUNNING = 0;
|
|
49643
49643
|
var CLOSING = 1;
|
|
49644
49644
|
var CLOSED = 2;
|
|
49645
|
-
var WebSocketServer2 = class extends
|
|
49645
|
+
var WebSocketServer2 = class extends EventEmitter3 {
|
|
49646
49646
|
constructor(options, callback) {
|
|
49647
49647
|
super();
|
|
49648
49648
|
options = {
|
|
@@ -53572,7 +53572,7 @@ var require_dist3 = __commonJS({
|
|
|
53572
53572
|
"../../node_modules/sonic-boom/index.js"(exports2, module22) {
|
|
53573
53573
|
"use strict";
|
|
53574
53574
|
var fs = require("fs");
|
|
53575
|
-
var
|
|
53575
|
+
var EventEmitter22 = require("events");
|
|
53576
53576
|
var inherits2 = require("util").inherits;
|
|
53577
53577
|
var path = require("path");
|
|
53578
53578
|
var sleep = require_atomic_sleep2();
|
|
@@ -53759,7 +53759,7 @@ var require_dist3 = __commonJS({
|
|
|
53759
53759
|
sonic._asyncDrainScheduled = false;
|
|
53760
53760
|
sonic.emit("drain");
|
|
53761
53761
|
}
|
|
53762
|
-
inherits2(SonicBoom,
|
|
53762
|
+
inherits2(SonicBoom, EventEmitter22);
|
|
53763
53763
|
SonicBoom.prototype.write = function(data) {
|
|
53764
53764
|
if (this.destroyed) {
|
|
53765
53765
|
throw new Error("SonicBoom destroyed");
|
|
@@ -54126,7 +54126,7 @@ var require_dist3 = __commonJS({
|
|
|
54126
54126
|
"../../node_modules/thread-stream/index.js"(exports2, module22) {
|
|
54127
54127
|
"use strict";
|
|
54128
54128
|
var { version: version22 } = require_package2();
|
|
54129
|
-
var { EventEmitter:
|
|
54129
|
+
var { EventEmitter: EventEmitter22 } = require("events");
|
|
54130
54130
|
var { Worker } = require("worker_threads");
|
|
54131
54131
|
var { join } = require("path");
|
|
54132
54132
|
var { pathToFileURL } = require("url");
|
|
@@ -54277,7 +54277,7 @@ var require_dist3 = __commonJS({
|
|
|
54277
54277
|
stream4.worker.off("exit", onWorkerExit);
|
|
54278
54278
|
destroy(stream4, code4 !== 0 ? new Error("the worker thread exited") : null);
|
|
54279
54279
|
}
|
|
54280
|
-
var ThreadStream = class extends
|
|
54280
|
+
var ThreadStream = class extends EventEmitter22 {
|
|
54281
54281
|
constructor(opts = {}) {
|
|
54282
54282
|
super();
|
|
54283
54283
|
if (opts.bufferSize < 4) {
|
|
@@ -55113,7 +55113,7 @@ var require_dist3 = __commonJS({
|
|
|
55113
55113
|
var require_proto2 = __commonJS2({
|
|
55114
55114
|
"../../node_modules/@atproto/common/node_modules/pino/lib/proto.js"(exports2, module22) {
|
|
55115
55115
|
"use strict";
|
|
55116
|
-
var { EventEmitter:
|
|
55116
|
+
var { EventEmitter: EventEmitter22 } = require("events");
|
|
55117
55117
|
var {
|
|
55118
55118
|
lsCacheSym,
|
|
55119
55119
|
levelValSym,
|
|
@@ -55185,7 +55185,7 @@ var require_dist3 = __commonJS({
|
|
|
55185
55185
|
[getLevelSym]: getLevel,
|
|
55186
55186
|
[setLevelSym]: setLevel
|
|
55187
55187
|
};
|
|
55188
|
-
Object.setPrototypeOf(prototype3,
|
|
55188
|
+
Object.setPrototypeOf(prototype3, EventEmitter22.prototype);
|
|
55189
55189
|
module22.exports = function() {
|
|
55190
55190
|
return Object.create(prototype3);
|
|
55191
55191
|
};
|
|
@@ -77552,7 +77552,7 @@ if (cid) {
|
|
|
77552
77552
|
}
|
|
77553
77553
|
};
|
|
77554
77554
|
var AxiosTransformStream_default = AxiosTransformStream;
|
|
77555
|
-
var
|
|
77555
|
+
var import_events3 = __toESM2(require("events"), 1);
|
|
77556
77556
|
var import_util310 = require("util");
|
|
77557
77557
|
var import_stream22 = require("stream");
|
|
77558
77558
|
var { asyncIterator } = Symbol;
|
|
@@ -77750,7 +77750,7 @@ if (cid) {
|
|
|
77750
77750
|
let isDone;
|
|
77751
77751
|
let rejected = false;
|
|
77752
77752
|
let req;
|
|
77753
|
-
const emitter = new
|
|
77753
|
+
const emitter = new import_events3.default();
|
|
77754
77754
|
const onFinished = () => {
|
|
77755
77755
|
if (config22.cancelToken) {
|
|
77756
77756
|
config22.cancelToken.unsubscribe(abort);
|
|
@@ -85284,10 +85284,10 @@ var require_result = __commonJS({
|
|
|
85284
85284
|
var require_query2 = __commonJS({
|
|
85285
85285
|
"../../node_modules/.pnpm/pg@8.10.0/node_modules/pg/lib/query.js"(exports, module2) {
|
|
85286
85286
|
"use strict";
|
|
85287
|
-
var { EventEmitter:
|
|
85287
|
+
var { EventEmitter: EventEmitter3 } = require("events");
|
|
85288
85288
|
var Result = require_result();
|
|
85289
85289
|
var utils = require_utils5();
|
|
85290
|
-
var Query = class extends
|
|
85290
|
+
var Query = class extends EventEmitter3 {
|
|
85291
85291
|
constructor(config2, values, callback) {
|
|
85292
85292
|
super();
|
|
85293
85293
|
config2 = utils.normalizeQueryConfig(config2, values, callback);
|
|
@@ -86253,12 +86253,12 @@ var require_connection = __commonJS({
|
|
|
86253
86253
|
"../../node_modules/.pnpm/pg@8.10.0/node_modules/pg/lib/connection.js"(exports, module2) {
|
|
86254
86254
|
"use strict";
|
|
86255
86255
|
var net = require("net");
|
|
86256
|
-
var
|
|
86256
|
+
var EventEmitter3 = require("events").EventEmitter;
|
|
86257
86257
|
var { parse: parse2, serialize } = require_dist4();
|
|
86258
86258
|
var flushBuffer = serialize.flush();
|
|
86259
86259
|
var syncBuffer = serialize.sync();
|
|
86260
86260
|
var endBuffer = serialize.end();
|
|
86261
|
-
var Connection = class extends
|
|
86261
|
+
var Connection = class extends EventEmitter3 {
|
|
86262
86262
|
constructor(config2) {
|
|
86263
86263
|
super();
|
|
86264
86264
|
config2 = config2 || {};
|
|
@@ -86433,7 +86433,7 @@ var require_connection = __commonJS({
|
|
|
86433
86433
|
var require_client = __commonJS({
|
|
86434
86434
|
"../../node_modules/.pnpm/pg@8.10.0/node_modules/pg/lib/client.js"(exports, module2) {
|
|
86435
86435
|
"use strict";
|
|
86436
|
-
var
|
|
86436
|
+
var EventEmitter3 = require("events").EventEmitter;
|
|
86437
86437
|
var utils = require_utils5();
|
|
86438
86438
|
var sasl = require_sasl();
|
|
86439
86439
|
var pgPass = require_lib6();
|
|
@@ -86442,7 +86442,7 @@ var require_client = __commonJS({
|
|
|
86442
86442
|
var Query = require_query2();
|
|
86443
86443
|
var defaults = require_defaults3();
|
|
86444
86444
|
var Connection = require_connection();
|
|
86445
|
-
var Client3 = class extends
|
|
86445
|
+
var Client3 = class extends EventEmitter3 {
|
|
86446
86446
|
constructor(config2) {
|
|
86447
86447
|
super();
|
|
86448
86448
|
this.connectionParameters = new ConnectionParameters(config2);
|
|
@@ -86936,7 +86936,7 @@ var require_client = __commonJS({
|
|
|
86936
86936
|
var require_pg_pool = __commonJS({
|
|
86937
86937
|
"../../node_modules/.pnpm/pg-pool@3.6.1_pg@8.10.0/node_modules/pg-pool/index.js"(exports, module2) {
|
|
86938
86938
|
"use strict";
|
|
86939
|
-
var
|
|
86939
|
+
var EventEmitter3 = require("events").EventEmitter;
|
|
86940
86940
|
var NOOP = function() {
|
|
86941
86941
|
};
|
|
86942
86942
|
var removeWhere = (list, predicate) => {
|
|
@@ -86987,7 +86987,7 @@ var require_pg_pool = __commonJS({
|
|
|
86987
86987
|
pool.emit("error", err, client);
|
|
86988
86988
|
};
|
|
86989
86989
|
}
|
|
86990
|
-
var Pool = class extends
|
|
86990
|
+
var Pool = class extends EventEmitter3 {
|
|
86991
86991
|
constructor(options, Client3) {
|
|
86992
86992
|
super();
|
|
86993
86993
|
this.options = Object.assign({}, options);
|
|
@@ -87310,11 +87310,11 @@ var require_pg_pool = __commonJS({
|
|
|
87310
87310
|
var require_query3 = __commonJS({
|
|
87311
87311
|
"../../node_modules/.pnpm/pg@8.10.0/node_modules/pg/lib/native/query.js"(exports, module2) {
|
|
87312
87312
|
"use strict";
|
|
87313
|
-
var
|
|
87313
|
+
var EventEmitter3 = require("events").EventEmitter;
|
|
87314
87314
|
var util2 = require("util");
|
|
87315
87315
|
var utils = require_utils5();
|
|
87316
87316
|
var NativeQuery = module2.exports = function(config2, values, callback) {
|
|
87317
|
-
|
|
87317
|
+
EventEmitter3.call(this);
|
|
87318
87318
|
config2 = utils.normalizeQueryConfig(config2, values, callback);
|
|
87319
87319
|
this.text = config2.text;
|
|
87320
87320
|
this.values = config2.values;
|
|
@@ -87328,7 +87328,7 @@ var require_query3 = __commonJS({
|
|
|
87328
87328
|
this._emitRowEvents = true;
|
|
87329
87329
|
}.bind(this));
|
|
87330
87330
|
};
|
|
87331
|
-
util2.inherits(NativeQuery,
|
|
87331
|
+
util2.inherits(NativeQuery, EventEmitter3);
|
|
87332
87332
|
var errorFieldMap = {
|
|
87333
87333
|
sqlState: "code",
|
|
87334
87334
|
statementPosition: "position",
|
|
@@ -87448,12 +87448,12 @@ var require_client2 = __commonJS({
|
|
|
87448
87448
|
"use strict";
|
|
87449
87449
|
var Native = require("pg-native");
|
|
87450
87450
|
var TypeOverrides = require_type_overrides();
|
|
87451
|
-
var
|
|
87451
|
+
var EventEmitter3 = require("events").EventEmitter;
|
|
87452
87452
|
var util2 = require("util");
|
|
87453
87453
|
var ConnectionParameters = require_connection_parameters();
|
|
87454
87454
|
var NativeQuery = require_query3();
|
|
87455
87455
|
var Client3 = module2.exports = function(config2) {
|
|
87456
|
-
|
|
87456
|
+
EventEmitter3.call(this);
|
|
87457
87457
|
config2 = config2 || {};
|
|
87458
87458
|
this._Promise = config2.Promise || global.Promise;
|
|
87459
87459
|
this._types = new TypeOverrides(config2.types);
|
|
@@ -87479,7 +87479,7 @@ var require_client2 = __commonJS({
|
|
|
87479
87479
|
this.namedQueries = {};
|
|
87480
87480
|
};
|
|
87481
87481
|
Client3.Query = NativeQuery;
|
|
87482
|
-
util2.inherits(Client3,
|
|
87482
|
+
util2.inherits(Client3, EventEmitter3);
|
|
87483
87483
|
Client3.prototype._errorAllQueries = function(err) {
|
|
87484
87484
|
const enqueueError = (query) => {
|
|
87485
87485
|
process.nextTick(() => {
|
|
@@ -87771,11 +87771,11 @@ var require_eventemitter3 = __commonJS({
|
|
|
87771
87771
|
else
|
|
87772
87772
|
delete emitter._events[evt];
|
|
87773
87773
|
}
|
|
87774
|
-
function
|
|
87774
|
+
function EventEmitter3() {
|
|
87775
87775
|
this._events = new Events();
|
|
87776
87776
|
this._eventsCount = 0;
|
|
87777
87777
|
}
|
|
87778
|
-
|
|
87778
|
+
EventEmitter3.prototype.eventNames = function eventNames() {
|
|
87779
87779
|
var names = [], events2, name2;
|
|
87780
87780
|
if (this._eventsCount === 0)
|
|
87781
87781
|
return names;
|
|
@@ -87788,7 +87788,7 @@ var require_eventemitter3 = __commonJS({
|
|
|
87788
87788
|
}
|
|
87789
87789
|
return names;
|
|
87790
87790
|
};
|
|
87791
|
-
|
|
87791
|
+
EventEmitter3.prototype.listeners = function listeners(event) {
|
|
87792
87792
|
var evt = prefix ? prefix + event : event, handlers = this._events[evt];
|
|
87793
87793
|
if (!handlers)
|
|
87794
87794
|
return [];
|
|
@@ -87799,7 +87799,7 @@ var require_eventemitter3 = __commonJS({
|
|
|
87799
87799
|
}
|
|
87800
87800
|
return ee;
|
|
87801
87801
|
};
|
|
87802
|
-
|
|
87802
|
+
EventEmitter3.prototype.listenerCount = function listenerCount(event) {
|
|
87803
87803
|
var evt = prefix ? prefix + event : event, listeners = this._events[evt];
|
|
87804
87804
|
if (!listeners)
|
|
87805
87805
|
return 0;
|
|
@@ -87807,7 +87807,7 @@ var require_eventemitter3 = __commonJS({
|
|
|
87807
87807
|
return 1;
|
|
87808
87808
|
return listeners.length;
|
|
87809
87809
|
};
|
|
87810
|
-
|
|
87810
|
+
EventEmitter3.prototype.emit = function emit(event, a1, a2, a3, a4, a5) {
|
|
87811
87811
|
var evt = prefix ? prefix + event : event;
|
|
87812
87812
|
if (!this._events[evt])
|
|
87813
87813
|
return false;
|
|
@@ -87862,13 +87862,13 @@ var require_eventemitter3 = __commonJS({
|
|
|
87862
87862
|
}
|
|
87863
87863
|
return true;
|
|
87864
87864
|
};
|
|
87865
|
-
|
|
87865
|
+
EventEmitter3.prototype.on = function on(event, fn, context) {
|
|
87866
87866
|
return addListener(this, event, fn, context, false);
|
|
87867
87867
|
};
|
|
87868
|
-
|
|
87868
|
+
EventEmitter3.prototype.once = function once(event, fn, context) {
|
|
87869
87869
|
return addListener(this, event, fn, context, true);
|
|
87870
87870
|
};
|
|
87871
|
-
|
|
87871
|
+
EventEmitter3.prototype.removeListener = function removeListener(event, fn, context, once) {
|
|
87872
87872
|
var evt = prefix ? prefix + event : event;
|
|
87873
87873
|
if (!this._events[evt])
|
|
87874
87874
|
return this;
|
|
@@ -87894,7 +87894,7 @@ var require_eventemitter3 = __commonJS({
|
|
|
87894
87894
|
}
|
|
87895
87895
|
return this;
|
|
87896
87896
|
};
|
|
87897
|
-
|
|
87897
|
+
EventEmitter3.prototype.removeAllListeners = function removeAllListeners(event) {
|
|
87898
87898
|
var evt;
|
|
87899
87899
|
if (event) {
|
|
87900
87900
|
evt = prefix ? prefix + event : event;
|
|
@@ -87906,12 +87906,12 @@ var require_eventemitter3 = __commonJS({
|
|
|
87906
87906
|
}
|
|
87907
87907
|
return this;
|
|
87908
87908
|
};
|
|
87909
|
-
|
|
87910
|
-
|
|
87911
|
-
|
|
87912
|
-
|
|
87909
|
+
EventEmitter3.prototype.off = EventEmitter3.prototype.removeListener;
|
|
87910
|
+
EventEmitter3.prototype.addListener = EventEmitter3.prototype.on;
|
|
87911
|
+
EventEmitter3.prefixed = prefix;
|
|
87912
|
+
EventEmitter3.EventEmitter = EventEmitter3;
|
|
87913
87913
|
if (typeof module2 !== "undefined") {
|
|
87914
|
-
module2.exports =
|
|
87914
|
+
module2.exports = EventEmitter3;
|
|
87915
87915
|
}
|
|
87916
87916
|
}
|
|
87917
87917
|
});
|
|
@@ -87983,13 +87983,13 @@ var require_dist5 = __commonJS({
|
|
|
87983
87983
|
"../../node_modules/.pnpm/p-queue@6.6.2/node_modules/p-queue/dist/index.js"(exports) {
|
|
87984
87984
|
"use strict";
|
|
87985
87985
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
87986
|
-
var
|
|
87986
|
+
var EventEmitter3 = require_eventemitter3();
|
|
87987
87987
|
var p_timeout_1 = require_p_timeout();
|
|
87988
87988
|
var priority_queue_1 = require_priority_queue();
|
|
87989
87989
|
var empty2 = () => {
|
|
87990
87990
|
};
|
|
87991
87991
|
var timeoutError = new p_timeout_1.TimeoutError();
|
|
87992
|
-
var PQueue2 = class extends
|
|
87992
|
+
var PQueue2 = class extends EventEmitter3 {
|
|
87993
87993
|
constructor(options) {
|
|
87994
87994
|
var _a, _b, _c, _d;
|
|
87995
87995
|
super();
|
|
@@ -88219,7 +88219,7 @@ __export(src_exports5, {
|
|
|
88219
88219
|
});
|
|
88220
88220
|
module.exports = __toCommonJS(src_exports5);
|
|
88221
88221
|
var import_express4 = __toESM(require_express2());
|
|
88222
|
-
var
|
|
88222
|
+
var import_events2 = __toESM(require("events"));
|
|
88223
88223
|
var import_http_terminator = __toESM(require_src3());
|
|
88224
88224
|
var import_cors = __toESM(require_lib4());
|
|
88225
88225
|
var import_compression = __toESM(require_compression());
|
|
@@ -92303,6 +92303,77 @@ var mapDefined = (arr, fn) => {
|
|
|
92303
92303
|
return output2;
|
|
92304
92304
|
};
|
|
92305
92305
|
|
|
92306
|
+
// ../common-web/src/async.ts
|
|
92307
|
+
var AsyncBuffer = class {
|
|
92308
|
+
constructor(maxSize) {
|
|
92309
|
+
this.maxSize = maxSize;
|
|
92310
|
+
this.buffer = [];
|
|
92311
|
+
this.closed = false;
|
|
92312
|
+
this.promise = Promise.resolve();
|
|
92313
|
+
this.resolve = () => null;
|
|
92314
|
+
this.resetPromise();
|
|
92315
|
+
}
|
|
92316
|
+
get curr() {
|
|
92317
|
+
return this.buffer;
|
|
92318
|
+
}
|
|
92319
|
+
get size() {
|
|
92320
|
+
return this.buffer.length;
|
|
92321
|
+
}
|
|
92322
|
+
get isClosed() {
|
|
92323
|
+
return this.closed;
|
|
92324
|
+
}
|
|
92325
|
+
resetPromise() {
|
|
92326
|
+
this.promise = new Promise((r) => this.resolve = r);
|
|
92327
|
+
}
|
|
92328
|
+
push(item) {
|
|
92329
|
+
this.buffer.push(item);
|
|
92330
|
+
this.resolve();
|
|
92331
|
+
}
|
|
92332
|
+
pushMany(items) {
|
|
92333
|
+
items.forEach((i) => this.buffer.push(i));
|
|
92334
|
+
this.resolve();
|
|
92335
|
+
}
|
|
92336
|
+
async *events() {
|
|
92337
|
+
while (true) {
|
|
92338
|
+
if (this.closed && this.buffer.length === 0) {
|
|
92339
|
+
if (this.toThrow) {
|
|
92340
|
+
throw this.toThrow;
|
|
92341
|
+
} else {
|
|
92342
|
+
return;
|
|
92343
|
+
}
|
|
92344
|
+
}
|
|
92345
|
+
await this.promise;
|
|
92346
|
+
if (this.toThrow) {
|
|
92347
|
+
throw this.toThrow;
|
|
92348
|
+
}
|
|
92349
|
+
if (this.maxSize && this.size > this.maxSize) {
|
|
92350
|
+
throw new AsyncBufferFullError(this.maxSize);
|
|
92351
|
+
}
|
|
92352
|
+
const [first, ...rest] = this.buffer;
|
|
92353
|
+
if (first) {
|
|
92354
|
+
this.buffer = rest;
|
|
92355
|
+
yield first;
|
|
92356
|
+
} else {
|
|
92357
|
+
this.resetPromise();
|
|
92358
|
+
}
|
|
92359
|
+
}
|
|
92360
|
+
}
|
|
92361
|
+
throw(err) {
|
|
92362
|
+
this.toThrow = err;
|
|
92363
|
+
this.closed = true;
|
|
92364
|
+
this.resolve();
|
|
92365
|
+
}
|
|
92366
|
+
close() {
|
|
92367
|
+
this.closed = true;
|
|
92368
|
+
this.resolve();
|
|
92369
|
+
}
|
|
92370
|
+
};
|
|
92371
|
+
var AsyncBufferFullError = class extends Error {
|
|
92372
|
+
constructor(maxSize) {
|
|
92373
|
+
super(`ReachedMaxBufferSize: ${maxSize}`);
|
|
92374
|
+
}
|
|
92375
|
+
};
|
|
92376
|
+
|
|
92306
92377
|
// ../../node_modules/.pnpm/multiformats@9.9.0/node_modules/multiformats/esm/vendor/varint.js
|
|
92307
92378
|
var encode_1 = encode;
|
|
92308
92379
|
var MSB = 128;
|
|
@@ -103728,6 +103799,32 @@ var schemaDict = {
|
|
|
103728
103799
|
}
|
|
103729
103800
|
}
|
|
103730
103801
|
},
|
|
103802
|
+
ComAtprotoAdminUpdateAccountPassword: {
|
|
103803
|
+
lexicon: 1,
|
|
103804
|
+
id: "com.atproto.admin.updateAccountPassword",
|
|
103805
|
+
defs: {
|
|
103806
|
+
main: {
|
|
103807
|
+
type: "procedure",
|
|
103808
|
+
description: "Update the password for a user account as an administrator.",
|
|
103809
|
+
input: {
|
|
103810
|
+
encoding: "application/json",
|
|
103811
|
+
schema: {
|
|
103812
|
+
type: "object",
|
|
103813
|
+
required: ["did", "password"],
|
|
103814
|
+
properties: {
|
|
103815
|
+
did: {
|
|
103816
|
+
type: "string",
|
|
103817
|
+
format: "did"
|
|
103818
|
+
},
|
|
103819
|
+
password: {
|
|
103820
|
+
type: "string"
|
|
103821
|
+
}
|
|
103822
|
+
}
|
|
103823
|
+
}
|
|
103824
|
+
}
|
|
103825
|
+
}
|
|
103826
|
+
}
|
|
103827
|
+
},
|
|
103731
103828
|
ComAtprotoAdminUpdateCommunicationTemplate: {
|
|
103732
103829
|
lexicon: 1,
|
|
103733
103830
|
id: "com.atproto.admin.updateCommunicationTemplate",
|
|
@@ -106592,7 +106689,7 @@ var schemaDict = {
|
|
|
106592
106689
|
defs: {
|
|
106593
106690
|
main: {
|
|
106594
106691
|
type: "query",
|
|
106595
|
-
description: "Fetch all labels from a labeler created after a certain date.
|
|
106692
|
+
description: "DEPRECATED: use queryLabels or subscribeLabels instead -- Fetch all labels from a labeler created after a certain date.",
|
|
106596
106693
|
parameters: {
|
|
106597
106694
|
type: "params",
|
|
106598
106695
|
properties: {
|
|
@@ -106824,7 +106921,9 @@ var schemaDict = {
|
|
|
106824
106921
|
"lex:app.bsky.actor.defs#personalDetailsPref",
|
|
106825
106922
|
"lex:app.bsky.actor.defs#feedViewPref",
|
|
106826
106923
|
"lex:app.bsky.actor.defs#threadViewPref",
|
|
106827
|
-
"lex:app.bsky.actor.defs#interestsPref"
|
|
106924
|
+
"lex:app.bsky.actor.defs#interestsPref",
|
|
106925
|
+
"lex:app.bsky.actor.defs#mutedWordsPref",
|
|
106926
|
+
"lex:app.bsky.actor.defs#hiddenPostsPref"
|
|
106828
106927
|
]
|
|
106829
106928
|
}
|
|
106830
106929
|
},
|
|
@@ -110656,6 +110755,7 @@ var RecordSubject = class {
|
|
|
110656
110755
|
// src/logger.ts
|
|
110657
110756
|
var import_pino_http = __toESM(require_logger());
|
|
110658
110757
|
var dbLogger = subsystemLogger("ozone:db");
|
|
110758
|
+
var seqLogger = subsystemLogger("ozone:sequencer");
|
|
110659
110759
|
var httpLogger = subsystemLogger("ozone");
|
|
110660
110760
|
var langLogger = subsystemLogger("ozone:lang");
|
|
110661
110761
|
var loggerMiddleware = (0, import_pino_http.default)({
|
|
@@ -110777,11 +110877,13 @@ function emitModerationEvent_default(server, ctx) {
|
|
|
110777
110877
|
const isReverseTakedownEvent = isModEventReverseTakedown(event);
|
|
110778
110878
|
const isLabelEvent = isModEventLabel(event);
|
|
110779
110879
|
const subject = subjectFromInput(input.body.subject, input.body.subjectBlobCids);
|
|
110780
|
-
if (
|
|
110781
|
-
|
|
110782
|
-
|
|
110783
|
-
|
|
110784
|
-
|
|
110880
|
+
if (isTakedownEvent || isReverseTakedownEvent) {
|
|
110881
|
+
if (!access.moderator) {
|
|
110882
|
+
throw new AuthRequiredError("Must be a full moderator to take this type of action");
|
|
110883
|
+
}
|
|
110884
|
+
if (!access.admin && subject.recordPath?.includes("app.bsky.feed.generator/")) {
|
|
110885
|
+
throw new AuthRequiredError("Must be a full admin to take this type of action on feed generators");
|
|
110886
|
+
}
|
|
110785
110887
|
}
|
|
110786
110888
|
if (!access.moderator && isLabelEvent) {
|
|
110787
110889
|
throw new AuthRequiredError("Must be a full moderator to label content");
|
|
@@ -111103,140 +111205,6 @@ function getModerationEvent_default(server, ctx) {
|
|
|
111103
111205
|
});
|
|
111104
111206
|
}
|
|
111105
111207
|
|
|
111106
|
-
// src/mod-service/types.ts
|
|
111107
|
-
var UNSPECCED_TAKEDOWN_LABEL = "!unspecced-takedown";
|
|
111108
|
-
var UNSPECCED_TAKEDOWN_BLOBS_LABEL = "!unspecced-takedown-blobs";
|
|
111109
|
-
|
|
111110
|
-
// src/api/temp/fetchLabels.ts
|
|
111111
|
-
function fetchLabels_default(server, ctx) {
|
|
111112
|
-
server.com.atproto.temp.fetchLabels({
|
|
111113
|
-
auth: ctx.authOptionalAccessOrRoleVerifier,
|
|
111114
|
-
handler: async ({ auth, params: params2 }) => {
|
|
111115
|
-
const { limit } = params2;
|
|
111116
|
-
const since = params2.since !== void 0 ? new Date(params2.since).toISOString() : "";
|
|
111117
|
-
const includeUnspeccedTakedowns = auth.credentials.type === "role" && auth.credentials.admin;
|
|
111118
|
-
const labelRes = await ctx.db.db.selectFrom("label").selectAll().orderBy("label.cts", "asc").where("cts", ">", since).if(!includeUnspeccedTakedowns, (q) => q.where("label.val", "not in", [
|
|
111119
|
-
UNSPECCED_TAKEDOWN_LABEL,
|
|
111120
|
-
UNSPECCED_TAKEDOWN_BLOBS_LABEL
|
|
111121
|
-
])).limit(limit).execute();
|
|
111122
|
-
const labels = labelRes.map((l) => ({
|
|
111123
|
-
...l,
|
|
111124
|
-
cid: l.cid === "" ? void 0 : l.cid
|
|
111125
|
-
}));
|
|
111126
|
-
return {
|
|
111127
|
-
encoding: "application/json",
|
|
111128
|
-
body: {
|
|
111129
|
-
labels
|
|
111130
|
-
}
|
|
111131
|
-
};
|
|
111132
|
-
}
|
|
111133
|
-
});
|
|
111134
|
-
}
|
|
111135
|
-
|
|
111136
|
-
// src/api/admin/createCommunicationTemplate.ts
|
|
111137
|
-
function createCommunicationTemplate_default(server, ctx) {
|
|
111138
|
-
server.com.atproto.admin.createCommunicationTemplate({
|
|
111139
|
-
auth: ctx.roleVerifier,
|
|
111140
|
-
handler: async ({ input, auth }) => {
|
|
111141
|
-
const access = auth.credentials;
|
|
111142
|
-
const db = ctx.db;
|
|
111143
|
-
const { createdBy, ...template } = input.body;
|
|
111144
|
-
if (!access.admin) {
|
|
111145
|
-
throw new AuthRequiredError("Must be an admin to create a communication template");
|
|
111146
|
-
}
|
|
111147
|
-
if (!createdBy) {
|
|
111148
|
-
throw new InvalidRequestError("createdBy field is required");
|
|
111149
|
-
}
|
|
111150
|
-
const communicationTemplate = ctx.communicationTemplateService(db);
|
|
111151
|
-
const newTemplate = await communicationTemplate.create({
|
|
111152
|
-
...template,
|
|
111153
|
-
disabled: false,
|
|
111154
|
-
lastUpdatedBy: createdBy
|
|
111155
|
-
});
|
|
111156
|
-
return {
|
|
111157
|
-
encoding: "application/json",
|
|
111158
|
-
body: communicationTemplate.view(newTemplate)
|
|
111159
|
-
};
|
|
111160
|
-
}
|
|
111161
|
-
});
|
|
111162
|
-
}
|
|
111163
|
-
|
|
111164
|
-
// src/api/admin/updateCommunicationTemplate.ts
|
|
111165
|
-
function updateCommunicationTemplate_default(server, ctx) {
|
|
111166
|
-
server.com.atproto.admin.updateCommunicationTemplate({
|
|
111167
|
-
auth: ctx.roleVerifier,
|
|
111168
|
-
handler: async ({ input, auth }) => {
|
|
111169
|
-
const access = auth.credentials;
|
|
111170
|
-
const db = ctx.db;
|
|
111171
|
-
const { id, updatedBy, ...template } = input.body;
|
|
111172
|
-
if (!access.admin) {
|
|
111173
|
-
throw new AuthRequiredError("Must be an admin to update a communication template");
|
|
111174
|
-
}
|
|
111175
|
-
if (!updatedBy) {
|
|
111176
|
-
throw new InvalidRequestError("updatedBy field is required");
|
|
111177
|
-
}
|
|
111178
|
-
if (!Object.keys(template).length) {
|
|
111179
|
-
throw new InvalidRequestError("Missing update data in request body");
|
|
111180
|
-
}
|
|
111181
|
-
const communicationTemplate = ctx.communicationTemplateService(db);
|
|
111182
|
-
const updatedTemplate = await communicationTemplate.update(Number(id), {
|
|
111183
|
-
...template,
|
|
111184
|
-
lastUpdatedBy: updatedBy
|
|
111185
|
-
});
|
|
111186
|
-
return {
|
|
111187
|
-
encoding: "application/json",
|
|
111188
|
-
body: communicationTemplate.view(updatedTemplate)
|
|
111189
|
-
};
|
|
111190
|
-
}
|
|
111191
|
-
});
|
|
111192
|
-
}
|
|
111193
|
-
|
|
111194
|
-
// src/api/admin/deleteCommunicationTemplate.ts
|
|
111195
|
-
function deleteCommunicationTemplate_default(server, ctx) {
|
|
111196
|
-
server.com.atproto.admin.deleteCommunicationTemplate({
|
|
111197
|
-
auth: ctx.roleVerifier,
|
|
111198
|
-
handler: async ({ input, auth }) => {
|
|
111199
|
-
const access = auth.credentials;
|
|
111200
|
-
const db = ctx.db;
|
|
111201
|
-
const { id } = input.body;
|
|
111202
|
-
if (!access.admin) {
|
|
111203
|
-
throw new AuthRequiredError("Must be an admin to delete a communication template");
|
|
111204
|
-
}
|
|
111205
|
-
const communicationTemplate = ctx.communicationTemplateService(db);
|
|
111206
|
-
await communicationTemplate.delete(Number(id));
|
|
111207
|
-
}
|
|
111208
|
-
});
|
|
111209
|
-
}
|
|
111210
|
-
|
|
111211
|
-
// src/api/admin/listCommunicationTemplates.ts
|
|
111212
|
-
function listCommunicationTemplates_default(server, ctx) {
|
|
111213
|
-
server.com.atproto.admin.listCommunicationTemplates({
|
|
111214
|
-
auth: ctx.roleVerifier,
|
|
111215
|
-
handler: async ({ auth }) => {
|
|
111216
|
-
const access = auth.credentials;
|
|
111217
|
-
const db = ctx.db;
|
|
111218
|
-
if (!access.moderator) {
|
|
111219
|
-
throw new AuthRequiredError("Must be a full moderator to view list of communication template");
|
|
111220
|
-
}
|
|
111221
|
-
const communicationTemplate = ctx.communicationTemplateService(db);
|
|
111222
|
-
const list = await communicationTemplate.list();
|
|
111223
|
-
return {
|
|
111224
|
-
encoding: "application/json",
|
|
111225
|
-
body: {
|
|
111226
|
-
communicationTemplates: list.map((item) => communicationTemplate.view(item))
|
|
111227
|
-
}
|
|
111228
|
-
};
|
|
111229
|
-
}
|
|
111230
|
-
});
|
|
111231
|
-
}
|
|
111232
|
-
|
|
111233
|
-
// src/api/health.ts
|
|
111234
|
-
var health_exports = {};
|
|
111235
|
-
__export(health_exports, {
|
|
111236
|
-
createRouter: () => createRouter
|
|
111237
|
-
});
|
|
111238
|
-
var import_express2 = __toESM(require_express2());
|
|
111239
|
-
|
|
111240
111208
|
// ../../node_modules/.pnpm/kysely@0.22.0/node_modules/kysely/dist/esm/util/object-utils.js
|
|
111241
111209
|
function isUndefined(obj) {
|
|
111242
111210
|
return obj === void 0;
|
|
@@ -118772,7 +118740,301 @@ var PostgresDialect = class {
|
|
|
118772
118740
|
}
|
|
118773
118741
|
};
|
|
118774
118742
|
|
|
118743
|
+
// src/mod-service/util.ts
|
|
118744
|
+
var formatLabel = (row) => {
|
|
118745
|
+
const label = {
|
|
118746
|
+
src: row.src,
|
|
118747
|
+
uri: row.uri,
|
|
118748
|
+
val: row.val,
|
|
118749
|
+
neg: row.neg,
|
|
118750
|
+
cts: row.cts
|
|
118751
|
+
};
|
|
118752
|
+
if (row.cid !== "") {
|
|
118753
|
+
label.cid = row.cid;
|
|
118754
|
+
}
|
|
118755
|
+
return label;
|
|
118756
|
+
};
|
|
118757
|
+
|
|
118758
|
+
// src/api/label/queryLabels.ts
|
|
118759
|
+
function queryLabels_default(server, ctx) {
|
|
118760
|
+
server.com.atproto.label.queryLabels(async ({ params: params2 }) => {
|
|
118761
|
+
const { uriPatterns, sources, limit, cursor } = params2;
|
|
118762
|
+
let builder = ctx.db.db.selectFrom("label").selectAll().limit(limit);
|
|
118763
|
+
if (!uriPatterns.includes("*")) {
|
|
118764
|
+
builder = builder.where((qb) => {
|
|
118765
|
+
qb = qb.where(sql`1 = 0`);
|
|
118766
|
+
for (const pattern of uriPatterns) {
|
|
118767
|
+
if (!pattern.includes("*")) {
|
|
118768
|
+
qb = qb.orWhere("uri", "=", pattern);
|
|
118769
|
+
} else {
|
|
118770
|
+
if (pattern.indexOf("*") < pattern.length - 1) {
|
|
118771
|
+
throw new InvalidRequestError(`invalid pattern: ${pattern}`);
|
|
118772
|
+
}
|
|
118773
|
+
const searchPattern = pattern.slice(0, -1).replaceAll("%", "").replaceAll("_", "\\_");
|
|
118774
|
+
qb = qb.orWhere("uri", "like", `${searchPattern}%`);
|
|
118775
|
+
}
|
|
118776
|
+
}
|
|
118777
|
+
return qb;
|
|
118778
|
+
});
|
|
118779
|
+
}
|
|
118780
|
+
if (sources && sources.length > 0) {
|
|
118781
|
+
builder = builder.where("src", "in", sources);
|
|
118782
|
+
}
|
|
118783
|
+
if (cursor) {
|
|
118784
|
+
const cursorId = parseInt(cursor, 10);
|
|
118785
|
+
if (isNaN(cursorId)) {
|
|
118786
|
+
throw new InvalidRequestError("invalid cursor");
|
|
118787
|
+
}
|
|
118788
|
+
builder = builder.where("id", ">", cursorId);
|
|
118789
|
+
}
|
|
118790
|
+
const res = await builder.execute();
|
|
118791
|
+
const labels = res.map((l) => formatLabel(l));
|
|
118792
|
+
const resCursor = res.at(-1)?.id.toString(10);
|
|
118793
|
+
return {
|
|
118794
|
+
encoding: "application/json",
|
|
118795
|
+
body: {
|
|
118796
|
+
cursor: resCursor,
|
|
118797
|
+
labels
|
|
118798
|
+
}
|
|
118799
|
+
};
|
|
118800
|
+
});
|
|
118801
|
+
}
|
|
118802
|
+
|
|
118803
|
+
// src/sequencer/outbox.ts
|
|
118804
|
+
var Outbox = class {
|
|
118805
|
+
constructor(sequencer, opts = {}) {
|
|
118806
|
+
this.sequencer = sequencer;
|
|
118807
|
+
this.caughtUp = false;
|
|
118808
|
+
this.lastSeen = -1;
|
|
118809
|
+
const { maxBufferSize = 500 } = opts;
|
|
118810
|
+
this.cutoverBuffer = [];
|
|
118811
|
+
this.outBuffer = new AsyncBuffer(maxBufferSize);
|
|
118812
|
+
}
|
|
118813
|
+
async *events(backfillCursor, signal) {
|
|
118814
|
+
if (backfillCursor !== void 0) {
|
|
118815
|
+
for await (const evt of this.getBackfill(backfillCursor)) {
|
|
118816
|
+
if (signal?.aborted)
|
|
118817
|
+
return;
|
|
118818
|
+
this.lastSeen = evt.seq;
|
|
118819
|
+
yield evt;
|
|
118820
|
+
}
|
|
118821
|
+
} else {
|
|
118822
|
+
this.caughtUp = true;
|
|
118823
|
+
}
|
|
118824
|
+
const addToBuffer = (evts) => {
|
|
118825
|
+
if (this.caughtUp) {
|
|
118826
|
+
this.outBuffer.pushMany(evts);
|
|
118827
|
+
} else {
|
|
118828
|
+
this.cutoverBuffer = [...this.cutoverBuffer, ...evts];
|
|
118829
|
+
}
|
|
118830
|
+
};
|
|
118831
|
+
if (!signal?.aborted) {
|
|
118832
|
+
this.sequencer.on("events", addToBuffer);
|
|
118833
|
+
}
|
|
118834
|
+
signal?.addEventListener("abort", () => this.sequencer.off("events", addToBuffer));
|
|
118835
|
+
const cutover = async () => {
|
|
118836
|
+
if (backfillCursor !== void 0) {
|
|
118837
|
+
const cutoverEvts = await this.sequencer.requestLabelRange({
|
|
118838
|
+
earliestId: this.lastSeen > -1 ? this.lastSeen : backfillCursor
|
|
118839
|
+
});
|
|
118840
|
+
this.outBuffer.pushMany(cutoverEvts);
|
|
118841
|
+
this.outBuffer.pushMany(this.cutoverBuffer);
|
|
118842
|
+
this.caughtUp = true;
|
|
118843
|
+
this.cutoverBuffer = [];
|
|
118844
|
+
} else {
|
|
118845
|
+
this.caughtUp = true;
|
|
118846
|
+
}
|
|
118847
|
+
};
|
|
118848
|
+
cutover();
|
|
118849
|
+
while (true) {
|
|
118850
|
+
try {
|
|
118851
|
+
for await (const evt of this.outBuffer.events()) {
|
|
118852
|
+
if (signal?.aborted)
|
|
118853
|
+
return;
|
|
118854
|
+
if (evt.seq > this.lastSeen) {
|
|
118855
|
+
this.lastSeen = evt.seq;
|
|
118856
|
+
yield evt;
|
|
118857
|
+
}
|
|
118858
|
+
}
|
|
118859
|
+
} catch (err) {
|
|
118860
|
+
if (err instanceof AsyncBufferFullError) {
|
|
118861
|
+
throw new InvalidRequestError("Stream consumer too slow", "ConsumerTooSlow");
|
|
118862
|
+
} else {
|
|
118863
|
+
throw err;
|
|
118864
|
+
}
|
|
118865
|
+
}
|
|
118866
|
+
}
|
|
118867
|
+
}
|
|
118868
|
+
async *getBackfill(backfillCursor) {
|
|
118869
|
+
const PAGE_SIZE = 500;
|
|
118870
|
+
while (true) {
|
|
118871
|
+
const evts = await this.sequencer.requestLabelRange({
|
|
118872
|
+
earliestId: this.lastSeen > -1 ? this.lastSeen : backfillCursor,
|
|
118873
|
+
limit: PAGE_SIZE
|
|
118874
|
+
});
|
|
118875
|
+
for (const evt of evts) {
|
|
118876
|
+
yield evt;
|
|
118877
|
+
}
|
|
118878
|
+
const seqCursor = this.sequencer.lastSeen ?? -1;
|
|
118879
|
+
if (seqCursor - this.lastSeen < PAGE_SIZE / 2)
|
|
118880
|
+
break;
|
|
118881
|
+
if (evts.length < 1)
|
|
118882
|
+
break;
|
|
118883
|
+
}
|
|
118884
|
+
}
|
|
118885
|
+
};
|
|
118886
|
+
var outbox_default = Outbox;
|
|
118887
|
+
|
|
118888
|
+
// src/api/label/subscribeLabels.ts
|
|
118889
|
+
function subscribeLabels_default(server, ctx) {
|
|
118890
|
+
server.com.atproto.label.subscribeLabels(async function* ({
|
|
118891
|
+
params: params2,
|
|
118892
|
+
signal
|
|
118893
|
+
}) {
|
|
118894
|
+
const { cursor } = params2;
|
|
118895
|
+
const outbox = new outbox_default(ctx.sequencer);
|
|
118896
|
+
if (cursor !== void 0) {
|
|
118897
|
+
const curr = await ctx.sequencer.curr();
|
|
118898
|
+
if (cursor > (curr ?? 0)) {
|
|
118899
|
+
throw new InvalidRequestError("Cursor in the future.", "FutureCursor");
|
|
118900
|
+
}
|
|
118901
|
+
}
|
|
118902
|
+
for await (const evt of outbox.events(cursor, signal)) {
|
|
118903
|
+
yield { $type: "com.atproto.label.subscribeLabels#labels", ...evt };
|
|
118904
|
+
}
|
|
118905
|
+
});
|
|
118906
|
+
}
|
|
118907
|
+
|
|
118908
|
+
// src/mod-service/types.ts
|
|
118909
|
+
var UNSPECCED_TAKEDOWN_LABEL = "!unspecced-takedown";
|
|
118910
|
+
var UNSPECCED_TAKEDOWN_BLOBS_LABEL = "!unspecced-takedown-blobs";
|
|
118911
|
+
|
|
118912
|
+
// src/api/temp/fetchLabels.ts
|
|
118913
|
+
function fetchLabels_default(server, ctx) {
|
|
118914
|
+
server.com.atproto.temp.fetchLabels({
|
|
118915
|
+
auth: ctx.authOptionalAccessOrRoleVerifier,
|
|
118916
|
+
handler: async ({ auth, params: params2 }) => {
|
|
118917
|
+
const { limit } = params2;
|
|
118918
|
+
const since = params2.since !== void 0 ? new Date(params2.since).toISOString() : "";
|
|
118919
|
+
const includeUnspeccedTakedowns = auth.credentials.type === "role" && auth.credentials.admin;
|
|
118920
|
+
const labelRes = await ctx.db.db.selectFrom("label").selectAll().orderBy("label.cts", "asc").where("cts", ">", since).if(!includeUnspeccedTakedowns, (q) => q.where("label.val", "not in", [
|
|
118921
|
+
UNSPECCED_TAKEDOWN_LABEL,
|
|
118922
|
+
UNSPECCED_TAKEDOWN_BLOBS_LABEL
|
|
118923
|
+
])).limit(limit).execute();
|
|
118924
|
+
const labels = labelRes.map((l) => formatLabel(l));
|
|
118925
|
+
return {
|
|
118926
|
+
encoding: "application/json",
|
|
118927
|
+
body: {
|
|
118928
|
+
labels
|
|
118929
|
+
}
|
|
118930
|
+
};
|
|
118931
|
+
}
|
|
118932
|
+
});
|
|
118933
|
+
}
|
|
118934
|
+
|
|
118935
|
+
// src/api/admin/createCommunicationTemplate.ts
|
|
118936
|
+
function createCommunicationTemplate_default(server, ctx) {
|
|
118937
|
+
server.com.atproto.admin.createCommunicationTemplate({
|
|
118938
|
+
auth: ctx.roleVerifier,
|
|
118939
|
+
handler: async ({ input, auth }) => {
|
|
118940
|
+
const access = auth.credentials;
|
|
118941
|
+
const db = ctx.db;
|
|
118942
|
+
const { createdBy, ...template } = input.body;
|
|
118943
|
+
if (!access.admin) {
|
|
118944
|
+
throw new AuthRequiredError("Must be an admin to create a communication template");
|
|
118945
|
+
}
|
|
118946
|
+
if (!createdBy) {
|
|
118947
|
+
throw new InvalidRequestError("createdBy field is required");
|
|
118948
|
+
}
|
|
118949
|
+
const communicationTemplate = ctx.communicationTemplateService(db);
|
|
118950
|
+
const newTemplate = await communicationTemplate.create({
|
|
118951
|
+
...template,
|
|
118952
|
+
disabled: false,
|
|
118953
|
+
lastUpdatedBy: createdBy
|
|
118954
|
+
});
|
|
118955
|
+
return {
|
|
118956
|
+
encoding: "application/json",
|
|
118957
|
+
body: communicationTemplate.view(newTemplate)
|
|
118958
|
+
};
|
|
118959
|
+
}
|
|
118960
|
+
});
|
|
118961
|
+
}
|
|
118962
|
+
|
|
118963
|
+
// src/api/admin/updateCommunicationTemplate.ts
|
|
118964
|
+
function updateCommunicationTemplate_default(server, ctx) {
|
|
118965
|
+
server.com.atproto.admin.updateCommunicationTemplate({
|
|
118966
|
+
auth: ctx.roleVerifier,
|
|
118967
|
+
handler: async ({ input, auth }) => {
|
|
118968
|
+
const access = auth.credentials;
|
|
118969
|
+
const db = ctx.db;
|
|
118970
|
+
const { id, updatedBy, ...template } = input.body;
|
|
118971
|
+
if (!access.admin) {
|
|
118972
|
+
throw new AuthRequiredError("Must be an admin to update a communication template");
|
|
118973
|
+
}
|
|
118974
|
+
if (!updatedBy) {
|
|
118975
|
+
throw new InvalidRequestError("updatedBy field is required");
|
|
118976
|
+
}
|
|
118977
|
+
if (!Object.keys(template).length) {
|
|
118978
|
+
throw new InvalidRequestError("Missing update data in request body");
|
|
118979
|
+
}
|
|
118980
|
+
const communicationTemplate = ctx.communicationTemplateService(db);
|
|
118981
|
+
const updatedTemplate = await communicationTemplate.update(Number(id), {
|
|
118982
|
+
...template,
|
|
118983
|
+
lastUpdatedBy: updatedBy
|
|
118984
|
+
});
|
|
118985
|
+
return {
|
|
118986
|
+
encoding: "application/json",
|
|
118987
|
+
body: communicationTemplate.view(updatedTemplate)
|
|
118988
|
+
};
|
|
118989
|
+
}
|
|
118990
|
+
});
|
|
118991
|
+
}
|
|
118992
|
+
|
|
118993
|
+
// src/api/admin/deleteCommunicationTemplate.ts
|
|
118994
|
+
function deleteCommunicationTemplate_default(server, ctx) {
|
|
118995
|
+
server.com.atproto.admin.deleteCommunicationTemplate({
|
|
118996
|
+
auth: ctx.roleVerifier,
|
|
118997
|
+
handler: async ({ input, auth }) => {
|
|
118998
|
+
const access = auth.credentials;
|
|
118999
|
+
const db = ctx.db;
|
|
119000
|
+
const { id } = input.body;
|
|
119001
|
+
if (!access.admin) {
|
|
119002
|
+
throw new AuthRequiredError("Must be an admin to delete a communication template");
|
|
119003
|
+
}
|
|
119004
|
+
const communicationTemplate = ctx.communicationTemplateService(db);
|
|
119005
|
+
await communicationTemplate.delete(Number(id));
|
|
119006
|
+
}
|
|
119007
|
+
});
|
|
119008
|
+
}
|
|
119009
|
+
|
|
119010
|
+
// src/api/admin/listCommunicationTemplates.ts
|
|
119011
|
+
function listCommunicationTemplates_default(server, ctx) {
|
|
119012
|
+
server.com.atproto.admin.listCommunicationTemplates({
|
|
119013
|
+
auth: ctx.roleVerifier,
|
|
119014
|
+
handler: async ({ auth }) => {
|
|
119015
|
+
const access = auth.credentials;
|
|
119016
|
+
const db = ctx.db;
|
|
119017
|
+
if (!access.moderator) {
|
|
119018
|
+
throw new AuthRequiredError("Must be a full moderator to view list of communication template");
|
|
119019
|
+
}
|
|
119020
|
+
const communicationTemplate = ctx.communicationTemplateService(db);
|
|
119021
|
+
const list = await communicationTemplate.list();
|
|
119022
|
+
return {
|
|
119023
|
+
encoding: "application/json",
|
|
119024
|
+
body: {
|
|
119025
|
+
communicationTemplates: list.map((item) => communicationTemplate.view(item))
|
|
119026
|
+
}
|
|
119027
|
+
};
|
|
119028
|
+
}
|
|
119029
|
+
});
|
|
119030
|
+
}
|
|
119031
|
+
|
|
118775
119032
|
// src/api/health.ts
|
|
119033
|
+
var health_exports = {};
|
|
119034
|
+
__export(health_exports, {
|
|
119035
|
+
createRouter: () => createRouter
|
|
119036
|
+
});
|
|
119037
|
+
var import_express2 = __toESM(require_express2());
|
|
118776
119038
|
var createRouter = (ctx) => {
|
|
118777
119039
|
const router = import_express2.default.Router();
|
|
118778
119040
|
router.get("/xrpc/_health", async function(req, res) {
|
|
@@ -118834,6 +119096,8 @@ function api_default(server, ctx) {
|
|
|
118834
119096
|
getModerationEvent_default(server, ctx);
|
|
118835
119097
|
queryModerationEvents_default(server, ctx);
|
|
118836
119098
|
queryModerationStatuses_default(server, ctx);
|
|
119099
|
+
queryLabels_default(server, ctx);
|
|
119100
|
+
subscribeLabels_default(server, ctx);
|
|
118837
119101
|
fetchLabels_default(server, ctx);
|
|
118838
119102
|
listCommunicationTemplates_default(server, ctx);
|
|
118839
119103
|
createCommunicationTemplate_default(server, ctx);
|
|
@@ -118970,6 +119234,10 @@ var ComAtprotoAdminNS = class {
|
|
|
118970
119234
|
const nsid2 = "com.atproto.admin.updateAccountHandle";
|
|
118971
119235
|
return this._server.xrpc.method(nsid2, cfg);
|
|
118972
119236
|
}
|
|
119237
|
+
updateAccountPassword(cfg) {
|
|
119238
|
+
const nsid2 = "com.atproto.admin.updateAccountPassword";
|
|
119239
|
+
return this._server.xrpc.method(nsid2, cfg);
|
|
119240
|
+
}
|
|
118973
119241
|
updateCommunicationTemplate(cfg) {
|
|
118974
119242
|
const nsid2 = "com.atproto.admin.updateCommunicationTemplate";
|
|
118975
119243
|
return this._server.xrpc.method(nsid2, cfg);
|
|
@@ -119495,6 +119763,9 @@ var getKey = (doc) => {
|
|
|
119495
119763
|
const key = getSigningKey(doc);
|
|
119496
119764
|
if (!key)
|
|
119497
119765
|
return void 0;
|
|
119766
|
+
return getDidKeyFromMultibase(key);
|
|
119767
|
+
};
|
|
119768
|
+
var getDidKeyFromMultibase = (key) => {
|
|
119498
119769
|
const keyBytes = multibaseToBytes(key.publicKeyMultibase);
|
|
119499
119770
|
let didKey = void 0;
|
|
119500
119771
|
if (key.type === "EcdsaSecp256r1VerificationKey2019") {
|
|
@@ -121657,6 +121928,32 @@ var schemaDict2 = {
|
|
|
121657
121928
|
}
|
|
121658
121929
|
}
|
|
121659
121930
|
},
|
|
121931
|
+
ComAtprotoAdminUpdateAccountPassword: {
|
|
121932
|
+
lexicon: 1,
|
|
121933
|
+
id: "com.atproto.admin.updateAccountPassword",
|
|
121934
|
+
defs: {
|
|
121935
|
+
main: {
|
|
121936
|
+
type: "procedure",
|
|
121937
|
+
description: "Update the password for a user account as an administrator.",
|
|
121938
|
+
input: {
|
|
121939
|
+
encoding: "application/json",
|
|
121940
|
+
schema: {
|
|
121941
|
+
type: "object",
|
|
121942
|
+
required: ["did", "password"],
|
|
121943
|
+
properties: {
|
|
121944
|
+
did: {
|
|
121945
|
+
type: "string",
|
|
121946
|
+
format: "did"
|
|
121947
|
+
},
|
|
121948
|
+
password: {
|
|
121949
|
+
type: "string"
|
|
121950
|
+
}
|
|
121951
|
+
}
|
|
121952
|
+
}
|
|
121953
|
+
}
|
|
121954
|
+
}
|
|
121955
|
+
}
|
|
121956
|
+
},
|
|
121660
121957
|
ComAtprotoAdminUpdateCommunicationTemplate: {
|
|
121661
121958
|
lexicon: 1,
|
|
121662
121959
|
id: "com.atproto.admin.updateCommunicationTemplate",
|
|
@@ -124521,7 +124818,7 @@ var schemaDict2 = {
|
|
|
124521
124818
|
defs: {
|
|
124522
124819
|
main: {
|
|
124523
124820
|
type: "query",
|
|
124524
|
-
description: "Fetch all labels from a labeler created after a certain date.
|
|
124821
|
+
description: "DEPRECATED: use queryLabels or subscribeLabels instead -- Fetch all labels from a labeler created after a certain date.",
|
|
124525
124822
|
parameters: {
|
|
124526
124823
|
type: "params",
|
|
124527
124824
|
properties: {
|
|
@@ -124753,7 +125050,9 @@ var schemaDict2 = {
|
|
|
124753
125050
|
"lex:app.bsky.actor.defs#personalDetailsPref",
|
|
124754
125051
|
"lex:app.bsky.actor.defs#feedViewPref",
|
|
124755
125052
|
"lex:app.bsky.actor.defs#threadViewPref",
|
|
124756
|
-
"lex:app.bsky.actor.defs#interestsPref"
|
|
125053
|
+
"lex:app.bsky.actor.defs#interestsPref",
|
|
125054
|
+
"lex:app.bsky.actor.defs#mutedWordsPref",
|
|
125055
|
+
"lex:app.bsky.actor.defs#hiddenPostsPref"
|
|
124757
125056
|
]
|
|
124758
125057
|
}
|
|
124759
125058
|
},
|
|
@@ -128578,83 +128877,90 @@ function toKnownErr21(e) {
|
|
|
128578
128877
|
return e;
|
|
128579
128878
|
}
|
|
128580
128879
|
|
|
128581
|
-
// ../api/src/client/types/com/atproto/admin/
|
|
128880
|
+
// ../api/src/client/types/com/atproto/admin/updateAccountPassword.ts
|
|
128582
128881
|
function toKnownErr22(e) {
|
|
128583
128882
|
if (e instanceof XRPCError) {
|
|
128584
128883
|
}
|
|
128585
128884
|
return e;
|
|
128586
128885
|
}
|
|
128587
128886
|
|
|
128588
|
-
// ../api/src/client/types/com/atproto/admin/
|
|
128887
|
+
// ../api/src/client/types/com/atproto/admin/updateCommunicationTemplate.ts
|
|
128589
128888
|
function toKnownErr23(e) {
|
|
128590
128889
|
if (e instanceof XRPCError) {
|
|
128591
128890
|
}
|
|
128592
128891
|
return e;
|
|
128593
128892
|
}
|
|
128594
128893
|
|
|
128595
|
-
// ../api/src/client/types/com/atproto/
|
|
128894
|
+
// ../api/src/client/types/com/atproto/admin/updateSubjectStatus.ts
|
|
128596
128895
|
function toKnownErr24(e) {
|
|
128597
128896
|
if (e instanceof XRPCError) {
|
|
128598
128897
|
}
|
|
128599
128898
|
return e;
|
|
128600
128899
|
}
|
|
128601
128900
|
|
|
128602
|
-
// ../api/src/client/types/com/atproto/identity/
|
|
128901
|
+
// ../api/src/client/types/com/atproto/identity/getRecommendedDidCredentials.ts
|
|
128603
128902
|
function toKnownErr25(e) {
|
|
128604
128903
|
if (e instanceof XRPCError) {
|
|
128605
128904
|
}
|
|
128606
128905
|
return e;
|
|
128607
128906
|
}
|
|
128608
128907
|
|
|
128609
|
-
// ../api/src/client/types/com/atproto/identity/
|
|
128908
|
+
// ../api/src/client/types/com/atproto/identity/requestPlcOperationSignature.ts
|
|
128610
128909
|
function toKnownErr26(e) {
|
|
128611
128910
|
if (e instanceof XRPCError) {
|
|
128612
128911
|
}
|
|
128613
128912
|
return e;
|
|
128614
128913
|
}
|
|
128615
128914
|
|
|
128616
|
-
// ../api/src/client/types/com/atproto/identity/
|
|
128915
|
+
// ../api/src/client/types/com/atproto/identity/resolveHandle.ts
|
|
128617
128916
|
function toKnownErr27(e) {
|
|
128618
128917
|
if (e instanceof XRPCError) {
|
|
128619
128918
|
}
|
|
128620
128919
|
return e;
|
|
128621
128920
|
}
|
|
128622
128921
|
|
|
128623
|
-
// ../api/src/client/types/com/atproto/identity/
|
|
128922
|
+
// ../api/src/client/types/com/atproto/identity/signPlcOperation.ts
|
|
128624
128923
|
function toKnownErr28(e) {
|
|
128625
128924
|
if (e instanceof XRPCError) {
|
|
128626
128925
|
}
|
|
128627
128926
|
return e;
|
|
128628
128927
|
}
|
|
128629
128928
|
|
|
128630
|
-
// ../api/src/client/types/com/atproto/identity/
|
|
128929
|
+
// ../api/src/client/types/com/atproto/identity/submitPlcOperation.ts
|
|
128631
128930
|
function toKnownErr29(e) {
|
|
128632
128931
|
if (e instanceof XRPCError) {
|
|
128633
128932
|
}
|
|
128634
128933
|
return e;
|
|
128635
128934
|
}
|
|
128636
128935
|
|
|
128637
|
-
// ../api/src/client/types/com/atproto/
|
|
128936
|
+
// ../api/src/client/types/com/atproto/identity/updateHandle.ts
|
|
128638
128937
|
function toKnownErr30(e) {
|
|
128639
128938
|
if (e instanceof XRPCError) {
|
|
128640
128939
|
}
|
|
128641
128940
|
return e;
|
|
128642
128941
|
}
|
|
128643
128942
|
|
|
128644
|
-
// ../api/src/client/types/com/atproto/
|
|
128943
|
+
// ../api/src/client/types/com/atproto/label/queryLabels.ts
|
|
128645
128944
|
function toKnownErr31(e) {
|
|
128646
128945
|
if (e instanceof XRPCError) {
|
|
128647
128946
|
}
|
|
128648
128947
|
return e;
|
|
128649
128948
|
}
|
|
128650
128949
|
|
|
128950
|
+
// ../api/src/client/types/com/atproto/moderation/createReport.ts
|
|
128951
|
+
function toKnownErr32(e) {
|
|
128952
|
+
if (e instanceof XRPCError) {
|
|
128953
|
+
}
|
|
128954
|
+
return e;
|
|
128955
|
+
}
|
|
128956
|
+
|
|
128651
128957
|
// ../api/src/client/types/com/atproto/repo/applyWrites.ts
|
|
128652
128958
|
var InvalidSwapError = class extends XRPCError {
|
|
128653
128959
|
constructor(src3) {
|
|
128654
128960
|
super(src3.status, src3.error, src3.message, src3.headers);
|
|
128655
128961
|
}
|
|
128656
128962
|
};
|
|
128657
|
-
function
|
|
128963
|
+
function toKnownErr33(e) {
|
|
128658
128964
|
if (e instanceof XRPCError) {
|
|
128659
128965
|
if (e.error === "InvalidSwap")
|
|
128660
128966
|
return new InvalidSwapError(e);
|
|
@@ -128668,7 +128974,7 @@ var InvalidSwapError2 = class extends XRPCError {
|
|
|
128668
128974
|
super(src3.status, src3.error, src3.message, src3.headers);
|
|
128669
128975
|
}
|
|
128670
128976
|
};
|
|
128671
|
-
function
|
|
128977
|
+
function toKnownErr34(e) {
|
|
128672
128978
|
if (e instanceof XRPCError) {
|
|
128673
128979
|
if (e.error === "InvalidSwap")
|
|
128674
128980
|
return new InvalidSwapError2(e);
|
|
@@ -128682,7 +128988,7 @@ var InvalidSwapError3 = class extends XRPCError {
|
|
|
128682
128988
|
super(src3.status, src3.error, src3.message, src3.headers);
|
|
128683
128989
|
}
|
|
128684
128990
|
};
|
|
128685
|
-
function
|
|
128991
|
+
function toKnownErr35(e) {
|
|
128686
128992
|
if (e instanceof XRPCError) {
|
|
128687
128993
|
if (e.error === "InvalidSwap")
|
|
128688
128994
|
return new InvalidSwapError3(e);
|
|
@@ -128691,35 +128997,35 @@ function toKnownErr34(e) {
|
|
|
128691
128997
|
}
|
|
128692
128998
|
|
|
128693
128999
|
// ../api/src/client/types/com/atproto/repo/describeRepo.ts
|
|
128694
|
-
function
|
|
129000
|
+
function toKnownErr36(e) {
|
|
128695
129001
|
if (e instanceof XRPCError) {
|
|
128696
129002
|
}
|
|
128697
129003
|
return e;
|
|
128698
129004
|
}
|
|
128699
129005
|
|
|
128700
129006
|
// ../api/src/client/types/com/atproto/repo/getRecord.ts
|
|
128701
|
-
function
|
|
129007
|
+
function toKnownErr37(e) {
|
|
128702
129008
|
if (e instanceof XRPCError) {
|
|
128703
129009
|
}
|
|
128704
129010
|
return e;
|
|
128705
129011
|
}
|
|
128706
129012
|
|
|
128707
129013
|
// ../api/src/client/types/com/atproto/repo/importRepo.ts
|
|
128708
|
-
function
|
|
129014
|
+
function toKnownErr38(e) {
|
|
128709
129015
|
if (e instanceof XRPCError) {
|
|
128710
129016
|
}
|
|
128711
129017
|
return e;
|
|
128712
129018
|
}
|
|
128713
129019
|
|
|
128714
129020
|
// ../api/src/client/types/com/atproto/repo/listMissingBlobs.ts
|
|
128715
|
-
function
|
|
129021
|
+
function toKnownErr39(e) {
|
|
128716
129022
|
if (e instanceof XRPCError) {
|
|
128717
129023
|
}
|
|
128718
129024
|
return e;
|
|
128719
129025
|
}
|
|
128720
129026
|
|
|
128721
129027
|
// ../api/src/client/types/com/atproto/repo/listRecords.ts
|
|
128722
|
-
function
|
|
129028
|
+
function toKnownErr40(e) {
|
|
128723
129029
|
if (e instanceof XRPCError) {
|
|
128724
129030
|
}
|
|
128725
129031
|
return e;
|
|
@@ -128731,7 +129037,7 @@ var InvalidSwapError4 = class extends XRPCError {
|
|
|
128731
129037
|
super(src3.status, src3.error, src3.message, src3.headers);
|
|
128732
129038
|
}
|
|
128733
129039
|
};
|
|
128734
|
-
function
|
|
129040
|
+
function toKnownErr41(e) {
|
|
128735
129041
|
if (e instanceof XRPCError) {
|
|
128736
129042
|
if (e.error === "InvalidSwap")
|
|
128737
129043
|
return new InvalidSwapError4(e);
|
|
@@ -128740,21 +129046,21 @@ function toKnownErr40(e) {
|
|
|
128740
129046
|
}
|
|
128741
129047
|
|
|
128742
129048
|
// ../api/src/client/types/com/atproto/repo/uploadBlob.ts
|
|
128743
|
-
function
|
|
129049
|
+
function toKnownErr42(e) {
|
|
128744
129050
|
if (e instanceof XRPCError) {
|
|
128745
129051
|
}
|
|
128746
129052
|
return e;
|
|
128747
129053
|
}
|
|
128748
129054
|
|
|
128749
129055
|
// ../api/src/client/types/com/atproto/server/activateAccount.ts
|
|
128750
|
-
function
|
|
129056
|
+
function toKnownErr43(e) {
|
|
128751
129057
|
if (e instanceof XRPCError) {
|
|
128752
129058
|
}
|
|
128753
129059
|
return e;
|
|
128754
129060
|
}
|
|
128755
129061
|
|
|
128756
129062
|
// ../api/src/client/types/com/atproto/server/checkAccountStatus.ts
|
|
128757
|
-
function
|
|
129063
|
+
function toKnownErr44(e) {
|
|
128758
129064
|
if (e instanceof XRPCError) {
|
|
128759
129065
|
}
|
|
128760
129066
|
return e;
|
|
@@ -128781,7 +129087,7 @@ var InvalidEmailError = class extends XRPCError {
|
|
|
128781
129087
|
super(src3.status, src3.error, src3.message, src3.headers);
|
|
128782
129088
|
}
|
|
128783
129089
|
};
|
|
128784
|
-
function
|
|
129090
|
+
function toKnownErr45(e) {
|
|
128785
129091
|
if (e instanceof XRPCError) {
|
|
128786
129092
|
if (e.error === "AccountNotFound")
|
|
128787
129093
|
return new AccountNotFoundError(e);
|
|
@@ -128831,7 +129137,7 @@ var IncompatibleDidDocError = class extends XRPCError {
|
|
|
128831
129137
|
super(src3.status, src3.error, src3.message, src3.headers);
|
|
128832
129138
|
}
|
|
128833
129139
|
};
|
|
128834
|
-
function
|
|
129140
|
+
function toKnownErr46(e) {
|
|
128835
129141
|
if (e instanceof XRPCError) {
|
|
128836
129142
|
if (e.error === "InvalidHandle")
|
|
128837
129143
|
return new InvalidHandleError2(e);
|
|
@@ -128857,7 +129163,7 @@ var AccountTakedownError = class extends XRPCError {
|
|
|
128857
129163
|
super(src3.status, src3.error, src3.message, src3.headers);
|
|
128858
129164
|
}
|
|
128859
129165
|
};
|
|
128860
|
-
function
|
|
129166
|
+
function toKnownErr47(e) {
|
|
128861
129167
|
if (e instanceof XRPCError) {
|
|
128862
129168
|
if (e.error === "AccountTakedown")
|
|
128863
129169
|
return new AccountTakedownError(e);
|
|
@@ -128866,14 +129172,14 @@ function toKnownErr46(e) {
|
|
|
128866
129172
|
}
|
|
128867
129173
|
|
|
128868
129174
|
// ../api/src/client/types/com/atproto/server/createInviteCode.ts
|
|
128869
|
-
function
|
|
129175
|
+
function toKnownErr48(e) {
|
|
128870
129176
|
if (e instanceof XRPCError) {
|
|
128871
129177
|
}
|
|
128872
129178
|
return e;
|
|
128873
129179
|
}
|
|
128874
129180
|
|
|
128875
129181
|
// ../api/src/client/types/com/atproto/server/createInviteCodes.ts
|
|
128876
|
-
function
|
|
129182
|
+
function toKnownErr49(e) {
|
|
128877
129183
|
if (e instanceof XRPCError) {
|
|
128878
129184
|
}
|
|
128879
129185
|
return e;
|
|
@@ -128885,7 +129191,7 @@ var AccountTakedownError2 = class extends XRPCError {
|
|
|
128885
129191
|
super(src3.status, src3.error, src3.message, src3.headers);
|
|
128886
129192
|
}
|
|
128887
129193
|
};
|
|
128888
|
-
function
|
|
129194
|
+
function toKnownErr50(e) {
|
|
128889
129195
|
if (e instanceof XRPCError) {
|
|
128890
129196
|
if (e.error === "AccountTakedown")
|
|
128891
129197
|
return new AccountTakedownError2(e);
|
|
@@ -128894,7 +129200,7 @@ function toKnownErr49(e) {
|
|
|
128894
129200
|
}
|
|
128895
129201
|
|
|
128896
129202
|
// ../api/src/client/types/com/atproto/server/deactivateAccount.ts
|
|
128897
|
-
function
|
|
129203
|
+
function toKnownErr51(e) {
|
|
128898
129204
|
if (e instanceof XRPCError) {
|
|
128899
129205
|
}
|
|
128900
129206
|
return e;
|
|
@@ -128911,7 +129217,7 @@ var InvalidTokenError2 = class extends XRPCError {
|
|
|
128911
129217
|
super(src3.status, src3.error, src3.message, src3.headers);
|
|
128912
129218
|
}
|
|
128913
129219
|
};
|
|
128914
|
-
function
|
|
129220
|
+
function toKnownErr52(e) {
|
|
128915
129221
|
if (e instanceof XRPCError) {
|
|
128916
129222
|
if (e.error === "ExpiredToken")
|
|
128917
129223
|
return new ExpiredTokenError2(e);
|
|
@@ -128922,14 +129228,14 @@ function toKnownErr51(e) {
|
|
|
128922
129228
|
}
|
|
128923
129229
|
|
|
128924
129230
|
// ../api/src/client/types/com/atproto/server/deleteSession.ts
|
|
128925
|
-
function
|
|
129231
|
+
function toKnownErr53(e) {
|
|
128926
129232
|
if (e instanceof XRPCError) {
|
|
128927
129233
|
}
|
|
128928
129234
|
return e;
|
|
128929
129235
|
}
|
|
128930
129236
|
|
|
128931
129237
|
// ../api/src/client/types/com/atproto/server/describeServer.ts
|
|
128932
|
-
function
|
|
129238
|
+
function toKnownErr54(e) {
|
|
128933
129239
|
if (e instanceof XRPCError) {
|
|
128934
129240
|
}
|
|
128935
129241
|
return e;
|
|
@@ -128941,7 +129247,7 @@ var DuplicateCreateError = class extends XRPCError {
|
|
|
128941
129247
|
super(src3.status, src3.error, src3.message, src3.headers);
|
|
128942
129248
|
}
|
|
128943
129249
|
};
|
|
128944
|
-
function
|
|
129250
|
+
function toKnownErr55(e) {
|
|
128945
129251
|
if (e instanceof XRPCError) {
|
|
128946
129252
|
if (e.error === "DuplicateCreate")
|
|
128947
129253
|
return new DuplicateCreateError(e);
|
|
@@ -128950,14 +129256,14 @@ function toKnownErr54(e) {
|
|
|
128950
129256
|
}
|
|
128951
129257
|
|
|
128952
129258
|
// ../api/src/client/types/com/atproto/server/getServiceAuth.ts
|
|
128953
|
-
function
|
|
129259
|
+
function toKnownErr56(e) {
|
|
128954
129260
|
if (e instanceof XRPCError) {
|
|
128955
129261
|
}
|
|
128956
129262
|
return e;
|
|
128957
129263
|
}
|
|
128958
129264
|
|
|
128959
129265
|
// ../api/src/client/types/com/atproto/server/getSession.ts
|
|
128960
|
-
function
|
|
129266
|
+
function toKnownErr57(e) {
|
|
128961
129267
|
if (e instanceof XRPCError) {
|
|
128962
129268
|
}
|
|
128963
129269
|
return e;
|
|
@@ -128969,7 +129275,7 @@ var AccountTakedownError3 = class extends XRPCError {
|
|
|
128969
129275
|
super(src3.status, src3.error, src3.message, src3.headers);
|
|
128970
129276
|
}
|
|
128971
129277
|
};
|
|
128972
|
-
function
|
|
129278
|
+
function toKnownErr58(e) {
|
|
128973
129279
|
if (e instanceof XRPCError) {
|
|
128974
129280
|
if (e.error === "AccountTakedown")
|
|
128975
129281
|
return new AccountTakedownError3(e);
|
|
@@ -128983,7 +129289,7 @@ var AccountTakedownError4 = class extends XRPCError {
|
|
|
128983
129289
|
super(src3.status, src3.error, src3.message, src3.headers);
|
|
128984
129290
|
}
|
|
128985
129291
|
};
|
|
128986
|
-
function
|
|
129292
|
+
function toKnownErr59(e) {
|
|
128987
129293
|
if (e instanceof XRPCError) {
|
|
128988
129294
|
if (e.error === "AccountTakedown")
|
|
128989
129295
|
return new AccountTakedownError4(e);
|
|
@@ -128992,35 +129298,35 @@ function toKnownErr58(e) {
|
|
|
128992
129298
|
}
|
|
128993
129299
|
|
|
128994
129300
|
// ../api/src/client/types/com/atproto/server/requestAccountDelete.ts
|
|
128995
|
-
function
|
|
129301
|
+
function toKnownErr60(e) {
|
|
128996
129302
|
if (e instanceof XRPCError) {
|
|
128997
129303
|
}
|
|
128998
129304
|
return e;
|
|
128999
129305
|
}
|
|
129000
129306
|
|
|
129001
129307
|
// ../api/src/client/types/com/atproto/server/requestEmailConfirmation.ts
|
|
129002
|
-
function
|
|
129308
|
+
function toKnownErr61(e) {
|
|
129003
129309
|
if (e instanceof XRPCError) {
|
|
129004
129310
|
}
|
|
129005
129311
|
return e;
|
|
129006
129312
|
}
|
|
129007
129313
|
|
|
129008
129314
|
// ../api/src/client/types/com/atproto/server/requestEmailUpdate.ts
|
|
129009
|
-
function
|
|
129315
|
+
function toKnownErr62(e) {
|
|
129010
129316
|
if (e instanceof XRPCError) {
|
|
129011
129317
|
}
|
|
129012
129318
|
return e;
|
|
129013
129319
|
}
|
|
129014
129320
|
|
|
129015
129321
|
// ../api/src/client/types/com/atproto/server/requestPasswordReset.ts
|
|
129016
|
-
function
|
|
129322
|
+
function toKnownErr63(e) {
|
|
129017
129323
|
if (e instanceof XRPCError) {
|
|
129018
129324
|
}
|
|
129019
129325
|
return e;
|
|
129020
129326
|
}
|
|
129021
129327
|
|
|
129022
129328
|
// ../api/src/client/types/com/atproto/server/reserveSigningKey.ts
|
|
129023
|
-
function
|
|
129329
|
+
function toKnownErr64(e) {
|
|
129024
129330
|
if (e instanceof XRPCError) {
|
|
129025
129331
|
}
|
|
129026
129332
|
return e;
|
|
@@ -129037,7 +129343,7 @@ var InvalidTokenError3 = class extends XRPCError {
|
|
|
129037
129343
|
super(src3.status, src3.error, src3.message, src3.headers);
|
|
129038
129344
|
}
|
|
129039
129345
|
};
|
|
129040
|
-
function
|
|
129346
|
+
function toKnownErr65(e) {
|
|
129041
129347
|
if (e instanceof XRPCError) {
|
|
129042
129348
|
if (e.error === "ExpiredToken")
|
|
129043
129349
|
return new ExpiredTokenError3(e);
|
|
@@ -129048,7 +129354,7 @@ function toKnownErr64(e) {
|
|
|
129048
129354
|
}
|
|
129049
129355
|
|
|
129050
129356
|
// ../api/src/client/types/com/atproto/server/revokeAppPassword.ts
|
|
129051
|
-
function
|
|
129357
|
+
function toKnownErr66(e) {
|
|
129052
129358
|
if (e instanceof XRPCError) {
|
|
129053
129359
|
}
|
|
129054
129360
|
return e;
|
|
@@ -129070,7 +129376,7 @@ var TokenRequiredError = class extends XRPCError {
|
|
|
129070
129376
|
super(src3.status, src3.error, src3.message, src3.headers);
|
|
129071
129377
|
}
|
|
129072
129378
|
};
|
|
129073
|
-
function
|
|
129379
|
+
function toKnownErr67(e) {
|
|
129074
129380
|
if (e instanceof XRPCError) {
|
|
129075
129381
|
if (e.error === "ExpiredToken")
|
|
129076
129382
|
return new ExpiredTokenError4(e);
|
|
@@ -129083,21 +129389,21 @@ function toKnownErr66(e) {
|
|
|
129083
129389
|
}
|
|
129084
129390
|
|
|
129085
129391
|
// ../api/src/client/types/com/atproto/sync/getBlob.ts
|
|
129086
|
-
function
|
|
129392
|
+
function toKnownErr68(e) {
|
|
129087
129393
|
if (e instanceof XRPCError) {
|
|
129088
129394
|
}
|
|
129089
129395
|
return e;
|
|
129090
129396
|
}
|
|
129091
129397
|
|
|
129092
129398
|
// ../api/src/client/types/com/atproto/sync/getBlocks.ts
|
|
129093
|
-
function
|
|
129399
|
+
function toKnownErr69(e) {
|
|
129094
129400
|
if (e instanceof XRPCError) {
|
|
129095
129401
|
}
|
|
129096
129402
|
return e;
|
|
129097
129403
|
}
|
|
129098
129404
|
|
|
129099
129405
|
// ../api/src/client/types/com/atproto/sync/getCheckout.ts
|
|
129100
|
-
function
|
|
129406
|
+
function toKnownErr70(e) {
|
|
129101
129407
|
if (e instanceof XRPCError) {
|
|
129102
129408
|
}
|
|
129103
129409
|
return e;
|
|
@@ -129109,7 +129415,7 @@ var HeadNotFoundError = class extends XRPCError {
|
|
|
129109
129415
|
super(src3.status, src3.error, src3.message, src3.headers);
|
|
129110
129416
|
}
|
|
129111
129417
|
};
|
|
129112
|
-
function
|
|
129418
|
+
function toKnownErr71(e) {
|
|
129113
129419
|
if (e instanceof XRPCError) {
|
|
129114
129420
|
if (e.error === "HeadNotFound")
|
|
129115
129421
|
return new HeadNotFoundError(e);
|
|
@@ -129123,7 +129429,7 @@ var RepoNotFoundError2 = class extends XRPCError {
|
|
|
129123
129429
|
super(src3.status, src3.error, src3.message, src3.headers);
|
|
129124
129430
|
}
|
|
129125
129431
|
};
|
|
129126
|
-
function
|
|
129432
|
+
function toKnownErr72(e) {
|
|
129127
129433
|
if (e instanceof XRPCError) {
|
|
129128
129434
|
if (e.error === "RepoNotFound")
|
|
129129
129435
|
return new RepoNotFoundError2(e);
|
|
@@ -129132,126 +129438,126 @@ function toKnownErr71(e) {
|
|
|
129132
129438
|
}
|
|
129133
129439
|
|
|
129134
129440
|
// ../api/src/client/types/com/atproto/sync/getRecord.ts
|
|
129135
|
-
function
|
|
129441
|
+
function toKnownErr73(e) {
|
|
129136
129442
|
if (e instanceof XRPCError) {
|
|
129137
129443
|
}
|
|
129138
129444
|
return e;
|
|
129139
129445
|
}
|
|
129140
129446
|
|
|
129141
129447
|
// ../api/src/client/types/com/atproto/sync/getRepo.ts
|
|
129142
|
-
function
|
|
129448
|
+
function toKnownErr74(e) {
|
|
129143
129449
|
if (e instanceof XRPCError) {
|
|
129144
129450
|
}
|
|
129145
129451
|
return e;
|
|
129146
129452
|
}
|
|
129147
129453
|
|
|
129148
129454
|
// ../api/src/client/types/com/atproto/sync/listBlobs.ts
|
|
129149
|
-
function
|
|
129455
|
+
function toKnownErr75(e) {
|
|
129150
129456
|
if (e instanceof XRPCError) {
|
|
129151
129457
|
}
|
|
129152
129458
|
return e;
|
|
129153
129459
|
}
|
|
129154
129460
|
|
|
129155
129461
|
// ../api/src/client/types/com/atproto/sync/listRepos.ts
|
|
129156
|
-
function
|
|
129462
|
+
function toKnownErr76(e) {
|
|
129157
129463
|
if (e instanceof XRPCError) {
|
|
129158
129464
|
}
|
|
129159
129465
|
return e;
|
|
129160
129466
|
}
|
|
129161
129467
|
|
|
129162
129468
|
// ../api/src/client/types/com/atproto/sync/notifyOfUpdate.ts
|
|
129163
|
-
function
|
|
129469
|
+
function toKnownErr77(e) {
|
|
129164
129470
|
if (e instanceof XRPCError) {
|
|
129165
129471
|
}
|
|
129166
129472
|
return e;
|
|
129167
129473
|
}
|
|
129168
129474
|
|
|
129169
129475
|
// ../api/src/client/types/com/atproto/sync/requestCrawl.ts
|
|
129170
|
-
function
|
|
129476
|
+
function toKnownErr78(e) {
|
|
129171
129477
|
if (e instanceof XRPCError) {
|
|
129172
129478
|
}
|
|
129173
129479
|
return e;
|
|
129174
129480
|
}
|
|
129175
129481
|
|
|
129176
129482
|
// ../api/src/client/types/com/atproto/temp/checkSignupQueue.ts
|
|
129177
|
-
function
|
|
129483
|
+
function toKnownErr79(e) {
|
|
129178
129484
|
if (e instanceof XRPCError) {
|
|
129179
129485
|
}
|
|
129180
129486
|
return e;
|
|
129181
129487
|
}
|
|
129182
129488
|
|
|
129183
129489
|
// ../api/src/client/types/com/atproto/temp/fetchLabels.ts
|
|
129184
|
-
function
|
|
129490
|
+
function toKnownErr80(e) {
|
|
129185
129491
|
if (e instanceof XRPCError) {
|
|
129186
129492
|
}
|
|
129187
129493
|
return e;
|
|
129188
129494
|
}
|
|
129189
129495
|
|
|
129190
129496
|
// ../api/src/client/types/com/atproto/temp/requestPhoneVerification.ts
|
|
129191
|
-
function
|
|
129497
|
+
function toKnownErr81(e) {
|
|
129192
129498
|
if (e instanceof XRPCError) {
|
|
129193
129499
|
}
|
|
129194
129500
|
return e;
|
|
129195
129501
|
}
|
|
129196
129502
|
|
|
129197
129503
|
// ../api/src/client/types/app/bsky/actor/getPreferences.ts
|
|
129198
|
-
function
|
|
129504
|
+
function toKnownErr82(e) {
|
|
129199
129505
|
if (e instanceof XRPCError) {
|
|
129200
129506
|
}
|
|
129201
129507
|
return e;
|
|
129202
129508
|
}
|
|
129203
129509
|
|
|
129204
129510
|
// ../api/src/client/types/app/bsky/actor/getProfile.ts
|
|
129205
|
-
function
|
|
129511
|
+
function toKnownErr83(e) {
|
|
129206
129512
|
if (e instanceof XRPCError) {
|
|
129207
129513
|
}
|
|
129208
129514
|
return e;
|
|
129209
129515
|
}
|
|
129210
129516
|
|
|
129211
129517
|
// ../api/src/client/types/app/bsky/actor/getProfiles.ts
|
|
129212
|
-
function
|
|
129518
|
+
function toKnownErr84(e) {
|
|
129213
129519
|
if (e instanceof XRPCError) {
|
|
129214
129520
|
}
|
|
129215
129521
|
return e;
|
|
129216
129522
|
}
|
|
129217
129523
|
|
|
129218
129524
|
// ../api/src/client/types/app/bsky/actor/getSuggestions.ts
|
|
129219
|
-
function
|
|
129525
|
+
function toKnownErr85(e) {
|
|
129220
129526
|
if (e instanceof XRPCError) {
|
|
129221
129527
|
}
|
|
129222
129528
|
return e;
|
|
129223
129529
|
}
|
|
129224
129530
|
|
|
129225
129531
|
// ../api/src/client/types/app/bsky/actor/putPreferences.ts
|
|
129226
|
-
function
|
|
129532
|
+
function toKnownErr86(e) {
|
|
129227
129533
|
if (e instanceof XRPCError) {
|
|
129228
129534
|
}
|
|
129229
129535
|
return e;
|
|
129230
129536
|
}
|
|
129231
129537
|
|
|
129232
129538
|
// ../api/src/client/types/app/bsky/actor/searchActors.ts
|
|
129233
|
-
function
|
|
129539
|
+
function toKnownErr87(e) {
|
|
129234
129540
|
if (e instanceof XRPCError) {
|
|
129235
129541
|
}
|
|
129236
129542
|
return e;
|
|
129237
129543
|
}
|
|
129238
129544
|
|
|
129239
129545
|
// ../api/src/client/types/app/bsky/actor/searchActorsTypeahead.ts
|
|
129240
|
-
function
|
|
129546
|
+
function toKnownErr88(e) {
|
|
129241
129547
|
if (e instanceof XRPCError) {
|
|
129242
129548
|
}
|
|
129243
129549
|
return e;
|
|
129244
129550
|
}
|
|
129245
129551
|
|
|
129246
129552
|
// ../api/src/client/types/app/bsky/feed/describeFeedGenerator.ts
|
|
129247
|
-
function
|
|
129553
|
+
function toKnownErr89(e) {
|
|
129248
129554
|
if (e instanceof XRPCError) {
|
|
129249
129555
|
}
|
|
129250
129556
|
return e;
|
|
129251
129557
|
}
|
|
129252
129558
|
|
|
129253
129559
|
// ../api/src/client/types/app/bsky/feed/getActorFeeds.ts
|
|
129254
|
-
function
|
|
129560
|
+
function toKnownErr90(e) {
|
|
129255
129561
|
if (e instanceof XRPCError) {
|
|
129256
129562
|
}
|
|
129257
129563
|
return e;
|
|
@@ -129268,7 +129574,7 @@ var BlockedByActorError = class extends XRPCError {
|
|
|
129268
129574
|
super(src3.status, src3.error, src3.message, src3.headers);
|
|
129269
129575
|
}
|
|
129270
129576
|
};
|
|
129271
|
-
function
|
|
129577
|
+
function toKnownErr91(e) {
|
|
129272
129578
|
if (e instanceof XRPCError) {
|
|
129273
129579
|
if (e.error === "BlockedActor")
|
|
129274
129580
|
return new BlockedActorError(e);
|
|
@@ -129289,7 +129595,7 @@ var BlockedByActorError2 = class extends XRPCError {
|
|
|
129289
129595
|
super(src3.status, src3.error, src3.message, src3.headers);
|
|
129290
129596
|
}
|
|
129291
129597
|
};
|
|
129292
|
-
function
|
|
129598
|
+
function toKnownErr92(e) {
|
|
129293
129599
|
if (e instanceof XRPCError) {
|
|
129294
129600
|
if (e.error === "BlockedActor")
|
|
129295
129601
|
return new BlockedActorError2(e);
|
|
@@ -129305,7 +129611,7 @@ var UnknownFeedError = class extends XRPCError {
|
|
|
129305
129611
|
super(src3.status, src3.error, src3.message, src3.headers);
|
|
129306
129612
|
}
|
|
129307
129613
|
};
|
|
129308
|
-
function
|
|
129614
|
+
function toKnownErr93(e) {
|
|
129309
129615
|
if (e instanceof XRPCError) {
|
|
129310
129616
|
if (e.error === "UnknownFeed")
|
|
129311
129617
|
return new UnknownFeedError(e);
|
|
@@ -129314,14 +129620,14 @@ function toKnownErr92(e) {
|
|
|
129314
129620
|
}
|
|
129315
129621
|
|
|
129316
129622
|
// ../api/src/client/types/app/bsky/feed/getFeedGenerator.ts
|
|
129317
|
-
function
|
|
129623
|
+
function toKnownErr94(e) {
|
|
129318
129624
|
if (e instanceof XRPCError) {
|
|
129319
129625
|
}
|
|
129320
129626
|
return e;
|
|
129321
129627
|
}
|
|
129322
129628
|
|
|
129323
129629
|
// ../api/src/client/types/app/bsky/feed/getFeedGenerators.ts
|
|
129324
|
-
function
|
|
129630
|
+
function toKnownErr95(e) {
|
|
129325
129631
|
if (e instanceof XRPCError) {
|
|
129326
129632
|
}
|
|
129327
129633
|
return e;
|
|
@@ -129333,7 +129639,7 @@ var UnknownFeedError2 = class extends XRPCError {
|
|
|
129333
129639
|
super(src3.status, src3.error, src3.message, src3.headers);
|
|
129334
129640
|
}
|
|
129335
129641
|
};
|
|
129336
|
-
function
|
|
129642
|
+
function toKnownErr96(e) {
|
|
129337
129643
|
if (e instanceof XRPCError) {
|
|
129338
129644
|
if (e.error === "UnknownFeed")
|
|
129339
129645
|
return new UnknownFeedError2(e);
|
|
@@ -129342,7 +129648,7 @@ function toKnownErr95(e) {
|
|
|
129342
129648
|
}
|
|
129343
129649
|
|
|
129344
129650
|
// ../api/src/client/types/app/bsky/feed/getLikes.ts
|
|
129345
|
-
function
|
|
129651
|
+
function toKnownErr97(e) {
|
|
129346
129652
|
if (e instanceof XRPCError) {
|
|
129347
129653
|
}
|
|
129348
129654
|
return e;
|
|
@@ -129354,7 +129660,7 @@ var UnknownListError = class extends XRPCError {
|
|
|
129354
129660
|
super(src3.status, src3.error, src3.message, src3.headers);
|
|
129355
129661
|
}
|
|
129356
129662
|
};
|
|
129357
|
-
function
|
|
129663
|
+
function toKnownErr98(e) {
|
|
129358
129664
|
if (e instanceof XRPCError) {
|
|
129359
129665
|
if (e.error === "UnknownList")
|
|
129360
129666
|
return new UnknownListError(e);
|
|
@@ -129368,7 +129674,7 @@ var NotFoundError = class extends XRPCError {
|
|
|
129368
129674
|
super(src3.status, src3.error, src3.message, src3.headers);
|
|
129369
129675
|
}
|
|
129370
129676
|
};
|
|
129371
|
-
function
|
|
129677
|
+
function toKnownErr99(e) {
|
|
129372
129678
|
if (e instanceof XRPCError) {
|
|
129373
129679
|
if (e.error === "NotFound")
|
|
129374
129680
|
return new NotFoundError(e);
|
|
@@ -129377,28 +129683,28 @@ function toKnownErr98(e) {
|
|
|
129377
129683
|
}
|
|
129378
129684
|
|
|
129379
129685
|
// ../api/src/client/types/app/bsky/feed/getPosts.ts
|
|
129380
|
-
function
|
|
129686
|
+
function toKnownErr100(e) {
|
|
129381
129687
|
if (e instanceof XRPCError) {
|
|
129382
129688
|
}
|
|
129383
129689
|
return e;
|
|
129384
129690
|
}
|
|
129385
129691
|
|
|
129386
129692
|
// ../api/src/client/types/app/bsky/feed/getRepostedBy.ts
|
|
129387
|
-
function
|
|
129693
|
+
function toKnownErr101(e) {
|
|
129388
129694
|
if (e instanceof XRPCError) {
|
|
129389
129695
|
}
|
|
129390
129696
|
return e;
|
|
129391
129697
|
}
|
|
129392
129698
|
|
|
129393
129699
|
// ../api/src/client/types/app/bsky/feed/getSuggestedFeeds.ts
|
|
129394
|
-
function
|
|
129700
|
+
function toKnownErr102(e) {
|
|
129395
129701
|
if (e instanceof XRPCError) {
|
|
129396
129702
|
}
|
|
129397
129703
|
return e;
|
|
129398
129704
|
}
|
|
129399
129705
|
|
|
129400
129706
|
// ../api/src/client/types/app/bsky/feed/getTimeline.ts
|
|
129401
|
-
function
|
|
129707
|
+
function toKnownErr103(e) {
|
|
129402
129708
|
if (e instanceof XRPCError) {
|
|
129403
129709
|
}
|
|
129404
129710
|
return e;
|
|
@@ -129410,7 +129716,7 @@ var BadQueryStringError = class extends XRPCError {
|
|
|
129410
129716
|
super(src3.status, src3.error, src3.message, src3.headers);
|
|
129411
129717
|
}
|
|
129412
129718
|
};
|
|
129413
|
-
function
|
|
129719
|
+
function toKnownErr104(e) {
|
|
129414
129720
|
if (e instanceof XRPCError) {
|
|
129415
129721
|
if (e.error === "BadQueryString")
|
|
129416
129722
|
return new BadQueryStringError(e);
|
|
@@ -129419,56 +129725,56 @@ function toKnownErr103(e) {
|
|
|
129419
129725
|
}
|
|
129420
129726
|
|
|
129421
129727
|
// ../api/src/client/types/app/bsky/graph/getBlocks.ts
|
|
129422
|
-
function
|
|
129728
|
+
function toKnownErr105(e) {
|
|
129423
129729
|
if (e instanceof XRPCError) {
|
|
129424
129730
|
}
|
|
129425
129731
|
return e;
|
|
129426
129732
|
}
|
|
129427
129733
|
|
|
129428
129734
|
// ../api/src/client/types/app/bsky/graph/getFollowers.ts
|
|
129429
|
-
function
|
|
129735
|
+
function toKnownErr106(e) {
|
|
129430
129736
|
if (e instanceof XRPCError) {
|
|
129431
129737
|
}
|
|
129432
129738
|
return e;
|
|
129433
129739
|
}
|
|
129434
129740
|
|
|
129435
129741
|
// ../api/src/client/types/app/bsky/graph/getFollows.ts
|
|
129436
|
-
function
|
|
129742
|
+
function toKnownErr107(e) {
|
|
129437
129743
|
if (e instanceof XRPCError) {
|
|
129438
129744
|
}
|
|
129439
129745
|
return e;
|
|
129440
129746
|
}
|
|
129441
129747
|
|
|
129442
129748
|
// ../api/src/client/types/app/bsky/graph/getList.ts
|
|
129443
|
-
function
|
|
129749
|
+
function toKnownErr108(e) {
|
|
129444
129750
|
if (e instanceof XRPCError) {
|
|
129445
129751
|
}
|
|
129446
129752
|
return e;
|
|
129447
129753
|
}
|
|
129448
129754
|
|
|
129449
129755
|
// ../api/src/client/types/app/bsky/graph/getListBlocks.ts
|
|
129450
|
-
function
|
|
129756
|
+
function toKnownErr109(e) {
|
|
129451
129757
|
if (e instanceof XRPCError) {
|
|
129452
129758
|
}
|
|
129453
129759
|
return e;
|
|
129454
129760
|
}
|
|
129455
129761
|
|
|
129456
129762
|
// ../api/src/client/types/app/bsky/graph/getListMutes.ts
|
|
129457
|
-
function
|
|
129763
|
+
function toKnownErr110(e) {
|
|
129458
129764
|
if (e instanceof XRPCError) {
|
|
129459
129765
|
}
|
|
129460
129766
|
return e;
|
|
129461
129767
|
}
|
|
129462
129768
|
|
|
129463
129769
|
// ../api/src/client/types/app/bsky/graph/getLists.ts
|
|
129464
|
-
function
|
|
129770
|
+
function toKnownErr111(e) {
|
|
129465
129771
|
if (e instanceof XRPCError) {
|
|
129466
129772
|
}
|
|
129467
129773
|
return e;
|
|
129468
129774
|
}
|
|
129469
129775
|
|
|
129470
129776
|
// ../api/src/client/types/app/bsky/graph/getMutes.ts
|
|
129471
|
-
function
|
|
129777
|
+
function toKnownErr112(e) {
|
|
129472
129778
|
if (e instanceof XRPCError) {
|
|
129473
129779
|
}
|
|
129474
129780
|
return e;
|
|
@@ -129480,7 +129786,7 @@ var ActorNotFoundError = class extends XRPCError {
|
|
|
129480
129786
|
super(src3.status, src3.error, src3.message, src3.headers);
|
|
129481
129787
|
}
|
|
129482
129788
|
};
|
|
129483
|
-
function
|
|
129789
|
+
function toKnownErr113(e) {
|
|
129484
129790
|
if (e instanceof XRPCError) {
|
|
129485
129791
|
if (e.error === "ActorNotFound")
|
|
129486
129792
|
return new ActorNotFoundError(e);
|
|
@@ -129489,77 +129795,77 @@ function toKnownErr112(e) {
|
|
|
129489
129795
|
}
|
|
129490
129796
|
|
|
129491
129797
|
// ../api/src/client/types/app/bsky/graph/getSuggestedFollowsByActor.ts
|
|
129492
|
-
function
|
|
129798
|
+
function toKnownErr114(e) {
|
|
129493
129799
|
if (e instanceof XRPCError) {
|
|
129494
129800
|
}
|
|
129495
129801
|
return e;
|
|
129496
129802
|
}
|
|
129497
129803
|
|
|
129498
129804
|
// ../api/src/client/types/app/bsky/graph/muteActor.ts
|
|
129499
|
-
function
|
|
129805
|
+
function toKnownErr115(e) {
|
|
129500
129806
|
if (e instanceof XRPCError) {
|
|
129501
129807
|
}
|
|
129502
129808
|
return e;
|
|
129503
129809
|
}
|
|
129504
129810
|
|
|
129505
129811
|
// ../api/src/client/types/app/bsky/graph/muteActorList.ts
|
|
129506
|
-
function
|
|
129812
|
+
function toKnownErr116(e) {
|
|
129507
129813
|
if (e instanceof XRPCError) {
|
|
129508
129814
|
}
|
|
129509
129815
|
return e;
|
|
129510
129816
|
}
|
|
129511
129817
|
|
|
129512
129818
|
// ../api/src/client/types/app/bsky/graph/unmuteActor.ts
|
|
129513
|
-
function
|
|
129819
|
+
function toKnownErr117(e) {
|
|
129514
129820
|
if (e instanceof XRPCError) {
|
|
129515
129821
|
}
|
|
129516
129822
|
return e;
|
|
129517
129823
|
}
|
|
129518
129824
|
|
|
129519
129825
|
// ../api/src/client/types/app/bsky/graph/unmuteActorList.ts
|
|
129520
|
-
function
|
|
129826
|
+
function toKnownErr118(e) {
|
|
129521
129827
|
if (e instanceof XRPCError) {
|
|
129522
129828
|
}
|
|
129523
129829
|
return e;
|
|
129524
129830
|
}
|
|
129525
129831
|
|
|
129526
129832
|
// ../api/src/client/types/app/bsky/notification/getUnreadCount.ts
|
|
129527
|
-
function
|
|
129833
|
+
function toKnownErr119(e) {
|
|
129528
129834
|
if (e instanceof XRPCError) {
|
|
129529
129835
|
}
|
|
129530
129836
|
return e;
|
|
129531
129837
|
}
|
|
129532
129838
|
|
|
129533
129839
|
// ../api/src/client/types/app/bsky/notification/listNotifications.ts
|
|
129534
|
-
function
|
|
129840
|
+
function toKnownErr120(e) {
|
|
129535
129841
|
if (e instanceof XRPCError) {
|
|
129536
129842
|
}
|
|
129537
129843
|
return e;
|
|
129538
129844
|
}
|
|
129539
129845
|
|
|
129540
129846
|
// ../api/src/client/types/app/bsky/notification/registerPush.ts
|
|
129541
|
-
function
|
|
129847
|
+
function toKnownErr121(e) {
|
|
129542
129848
|
if (e instanceof XRPCError) {
|
|
129543
129849
|
}
|
|
129544
129850
|
return e;
|
|
129545
129851
|
}
|
|
129546
129852
|
|
|
129547
129853
|
// ../api/src/client/types/app/bsky/notification/updateSeen.ts
|
|
129548
|
-
function
|
|
129854
|
+
function toKnownErr122(e) {
|
|
129549
129855
|
if (e instanceof XRPCError) {
|
|
129550
129856
|
}
|
|
129551
129857
|
return e;
|
|
129552
129858
|
}
|
|
129553
129859
|
|
|
129554
129860
|
// ../api/src/client/types/app/bsky/unspecced/getPopularFeedGenerators.ts
|
|
129555
|
-
function
|
|
129861
|
+
function toKnownErr123(e) {
|
|
129556
129862
|
if (e instanceof XRPCError) {
|
|
129557
129863
|
}
|
|
129558
129864
|
return e;
|
|
129559
129865
|
}
|
|
129560
129866
|
|
|
129561
129867
|
// ../api/src/client/types/app/bsky/unspecced/getTaggedSuggestions.ts
|
|
129562
|
-
function
|
|
129868
|
+
function toKnownErr124(e) {
|
|
129563
129869
|
if (e instanceof XRPCError) {
|
|
129564
129870
|
}
|
|
129565
129871
|
return e;
|
|
@@ -129571,7 +129877,7 @@ var BadQueryStringError2 = class extends XRPCError {
|
|
|
129571
129877
|
super(src3.status, src3.error, src3.message, src3.headers);
|
|
129572
129878
|
}
|
|
129573
129879
|
};
|
|
129574
|
-
function
|
|
129880
|
+
function toKnownErr125(e) {
|
|
129575
129881
|
if (e instanceof XRPCError) {
|
|
129576
129882
|
if (e.error === "BadQueryString")
|
|
129577
129883
|
return new BadQueryStringError2(e);
|
|
@@ -129585,7 +129891,7 @@ var BadQueryStringError3 = class extends XRPCError {
|
|
|
129585
129891
|
super(src3.status, src3.error, src3.message, src3.headers);
|
|
129586
129892
|
}
|
|
129587
129893
|
};
|
|
129588
|
-
function
|
|
129894
|
+
function toKnownErr126(e) {
|
|
129589
129895
|
if (e instanceof XRPCError) {
|
|
129590
129896
|
if (e.error === "BadQueryString")
|
|
129591
129897
|
return new BadQueryStringError3(e);
|
|
@@ -129742,14 +130048,19 @@ var ComAtprotoAdminNS2 = class {
|
|
|
129742
130048
|
throw toKnownErr21(e);
|
|
129743
130049
|
});
|
|
129744
130050
|
}
|
|
130051
|
+
updateAccountPassword(data, opts) {
|
|
130052
|
+
return this._service.xrpc.call("com.atproto.admin.updateAccountPassword", opts?.qp, data, opts).catch((e) => {
|
|
130053
|
+
throw toKnownErr22(e);
|
|
130054
|
+
});
|
|
130055
|
+
}
|
|
129745
130056
|
updateCommunicationTemplate(data, opts) {
|
|
129746
130057
|
return this._service.xrpc.call("com.atproto.admin.updateCommunicationTemplate", opts?.qp, data, opts).catch((e) => {
|
|
129747
|
-
throw
|
|
130058
|
+
throw toKnownErr23(e);
|
|
129748
130059
|
});
|
|
129749
130060
|
}
|
|
129750
130061
|
updateSubjectStatus(data, opts) {
|
|
129751
130062
|
return this._service.xrpc.call("com.atproto.admin.updateSubjectStatus", opts?.qp, data, opts).catch((e) => {
|
|
129752
|
-
throw
|
|
130063
|
+
throw toKnownErr24(e);
|
|
129753
130064
|
});
|
|
129754
130065
|
}
|
|
129755
130066
|
};
|
|
@@ -129759,32 +130070,32 @@ var ComAtprotoIdentityNS2 = class {
|
|
|
129759
130070
|
}
|
|
129760
130071
|
getRecommendedDidCredentials(params2, opts) {
|
|
129761
130072
|
return this._service.xrpc.call("com.atproto.identity.getRecommendedDidCredentials", params2, void 0, opts).catch((e) => {
|
|
129762
|
-
throw
|
|
130073
|
+
throw toKnownErr25(e);
|
|
129763
130074
|
});
|
|
129764
130075
|
}
|
|
129765
130076
|
requestPlcOperationSignature(data, opts) {
|
|
129766
130077
|
return this._service.xrpc.call("com.atproto.identity.requestPlcOperationSignature", opts?.qp, data, opts).catch((e) => {
|
|
129767
|
-
throw
|
|
130078
|
+
throw toKnownErr26(e);
|
|
129768
130079
|
});
|
|
129769
130080
|
}
|
|
129770
130081
|
resolveHandle(params2, opts) {
|
|
129771
130082
|
return this._service.xrpc.call("com.atproto.identity.resolveHandle", params2, void 0, opts).catch((e) => {
|
|
129772
|
-
throw
|
|
130083
|
+
throw toKnownErr27(e);
|
|
129773
130084
|
});
|
|
129774
130085
|
}
|
|
129775
130086
|
signPlcOperation(data, opts) {
|
|
129776
130087
|
return this._service.xrpc.call("com.atproto.identity.signPlcOperation", opts?.qp, data, opts).catch((e) => {
|
|
129777
|
-
throw
|
|
130088
|
+
throw toKnownErr28(e);
|
|
129778
130089
|
});
|
|
129779
130090
|
}
|
|
129780
130091
|
submitPlcOperation(data, opts) {
|
|
129781
130092
|
return this._service.xrpc.call("com.atproto.identity.submitPlcOperation", opts?.qp, data, opts).catch((e) => {
|
|
129782
|
-
throw
|
|
130093
|
+
throw toKnownErr29(e);
|
|
129783
130094
|
});
|
|
129784
130095
|
}
|
|
129785
130096
|
updateHandle(data, opts) {
|
|
129786
130097
|
return this._service.xrpc.call("com.atproto.identity.updateHandle", opts?.qp, data, opts).catch((e) => {
|
|
129787
|
-
throw
|
|
130098
|
+
throw toKnownErr30(e);
|
|
129788
130099
|
});
|
|
129789
130100
|
}
|
|
129790
130101
|
};
|
|
@@ -129794,7 +130105,7 @@ var ComAtprotoLabelNS2 = class {
|
|
|
129794
130105
|
}
|
|
129795
130106
|
queryLabels(params2, opts) {
|
|
129796
130107
|
return this._service.xrpc.call("com.atproto.label.queryLabels", params2, void 0, opts).catch((e) => {
|
|
129797
|
-
throw
|
|
130108
|
+
throw toKnownErr31(e);
|
|
129798
130109
|
});
|
|
129799
130110
|
}
|
|
129800
130111
|
};
|
|
@@ -129804,7 +130115,7 @@ var ComAtprotoModerationNS2 = class {
|
|
|
129804
130115
|
}
|
|
129805
130116
|
createReport(data, opts) {
|
|
129806
130117
|
return this._service.xrpc.call("com.atproto.moderation.createReport", opts?.qp, data, opts).catch((e) => {
|
|
129807
|
-
throw
|
|
130118
|
+
throw toKnownErr32(e);
|
|
129808
130119
|
});
|
|
129809
130120
|
}
|
|
129810
130121
|
};
|
|
@@ -129814,52 +130125,52 @@ var ComAtprotoRepoNS2 = class {
|
|
|
129814
130125
|
}
|
|
129815
130126
|
applyWrites(data, opts) {
|
|
129816
130127
|
return this._service.xrpc.call("com.atproto.repo.applyWrites", opts?.qp, data, opts).catch((e) => {
|
|
129817
|
-
throw
|
|
130128
|
+
throw toKnownErr33(e);
|
|
129818
130129
|
});
|
|
129819
130130
|
}
|
|
129820
130131
|
createRecord(data, opts) {
|
|
129821
130132
|
return this._service.xrpc.call("com.atproto.repo.createRecord", opts?.qp, data, opts).catch((e) => {
|
|
129822
|
-
throw
|
|
130133
|
+
throw toKnownErr34(e);
|
|
129823
130134
|
});
|
|
129824
130135
|
}
|
|
129825
130136
|
deleteRecord(data, opts) {
|
|
129826
130137
|
return this._service.xrpc.call("com.atproto.repo.deleteRecord", opts?.qp, data, opts).catch((e) => {
|
|
129827
|
-
throw
|
|
130138
|
+
throw toKnownErr35(e);
|
|
129828
130139
|
});
|
|
129829
130140
|
}
|
|
129830
130141
|
describeRepo(params2, opts) {
|
|
129831
130142
|
return this._service.xrpc.call("com.atproto.repo.describeRepo", params2, void 0, opts).catch((e) => {
|
|
129832
|
-
throw
|
|
130143
|
+
throw toKnownErr36(e);
|
|
129833
130144
|
});
|
|
129834
130145
|
}
|
|
129835
130146
|
getRecord(params2, opts) {
|
|
129836
130147
|
return this._service.xrpc.call("com.atproto.repo.getRecord", params2, void 0, opts).catch((e) => {
|
|
129837
|
-
throw
|
|
130148
|
+
throw toKnownErr37(e);
|
|
129838
130149
|
});
|
|
129839
130150
|
}
|
|
129840
130151
|
importRepo(data, opts) {
|
|
129841
130152
|
return this._service.xrpc.call("com.atproto.repo.importRepo", opts?.qp, data, opts).catch((e) => {
|
|
129842
|
-
throw
|
|
130153
|
+
throw toKnownErr38(e);
|
|
129843
130154
|
});
|
|
129844
130155
|
}
|
|
129845
130156
|
listMissingBlobs(params2, opts) {
|
|
129846
130157
|
return this._service.xrpc.call("com.atproto.repo.listMissingBlobs", params2, void 0, opts).catch((e) => {
|
|
129847
|
-
throw
|
|
130158
|
+
throw toKnownErr39(e);
|
|
129848
130159
|
});
|
|
129849
130160
|
}
|
|
129850
130161
|
listRecords(params2, opts) {
|
|
129851
130162
|
return this._service.xrpc.call("com.atproto.repo.listRecords", params2, void 0, opts).catch((e) => {
|
|
129852
|
-
throw
|
|
130163
|
+
throw toKnownErr40(e);
|
|
129853
130164
|
});
|
|
129854
130165
|
}
|
|
129855
130166
|
putRecord(data, opts) {
|
|
129856
130167
|
return this._service.xrpc.call("com.atproto.repo.putRecord", opts?.qp, data, opts).catch((e) => {
|
|
129857
|
-
throw
|
|
130168
|
+
throw toKnownErr41(e);
|
|
129858
130169
|
});
|
|
129859
130170
|
}
|
|
129860
130171
|
uploadBlob(data, opts) {
|
|
129861
130172
|
return this._service.xrpc.call("com.atproto.repo.uploadBlob", opts?.qp, data, opts).catch((e) => {
|
|
129862
|
-
throw
|
|
130173
|
+
throw toKnownErr42(e);
|
|
129863
130174
|
});
|
|
129864
130175
|
}
|
|
129865
130176
|
};
|
|
@@ -129869,127 +130180,127 @@ var ComAtprotoServerNS2 = class {
|
|
|
129869
130180
|
}
|
|
129870
130181
|
activateAccount(data, opts) {
|
|
129871
130182
|
return this._service.xrpc.call("com.atproto.server.activateAccount", opts?.qp, data, opts).catch((e) => {
|
|
129872
|
-
throw
|
|
130183
|
+
throw toKnownErr43(e);
|
|
129873
130184
|
});
|
|
129874
130185
|
}
|
|
129875
130186
|
checkAccountStatus(params2, opts) {
|
|
129876
130187
|
return this._service.xrpc.call("com.atproto.server.checkAccountStatus", params2, void 0, opts).catch((e) => {
|
|
129877
|
-
throw
|
|
130188
|
+
throw toKnownErr44(e);
|
|
129878
130189
|
});
|
|
129879
130190
|
}
|
|
129880
130191
|
confirmEmail(data, opts) {
|
|
129881
130192
|
return this._service.xrpc.call("com.atproto.server.confirmEmail", opts?.qp, data, opts).catch((e) => {
|
|
129882
|
-
throw
|
|
130193
|
+
throw toKnownErr45(e);
|
|
129883
130194
|
});
|
|
129884
130195
|
}
|
|
129885
130196
|
createAccount(data, opts) {
|
|
129886
130197
|
return this._service.xrpc.call("com.atproto.server.createAccount", opts?.qp, data, opts).catch((e) => {
|
|
129887
|
-
throw
|
|
130198
|
+
throw toKnownErr46(e);
|
|
129888
130199
|
});
|
|
129889
130200
|
}
|
|
129890
130201
|
createAppPassword(data, opts) {
|
|
129891
130202
|
return this._service.xrpc.call("com.atproto.server.createAppPassword", opts?.qp, data, opts).catch((e) => {
|
|
129892
|
-
throw
|
|
130203
|
+
throw toKnownErr47(e);
|
|
129893
130204
|
});
|
|
129894
130205
|
}
|
|
129895
130206
|
createInviteCode(data, opts) {
|
|
129896
130207
|
return this._service.xrpc.call("com.atproto.server.createInviteCode", opts?.qp, data, opts).catch((e) => {
|
|
129897
|
-
throw
|
|
130208
|
+
throw toKnownErr48(e);
|
|
129898
130209
|
});
|
|
129899
130210
|
}
|
|
129900
130211
|
createInviteCodes(data, opts) {
|
|
129901
130212
|
return this._service.xrpc.call("com.atproto.server.createInviteCodes", opts?.qp, data, opts).catch((e) => {
|
|
129902
|
-
throw
|
|
130213
|
+
throw toKnownErr49(e);
|
|
129903
130214
|
});
|
|
129904
130215
|
}
|
|
129905
130216
|
createSession(data, opts) {
|
|
129906
130217
|
return this._service.xrpc.call("com.atproto.server.createSession", opts?.qp, data, opts).catch((e) => {
|
|
129907
|
-
throw
|
|
130218
|
+
throw toKnownErr50(e);
|
|
129908
130219
|
});
|
|
129909
130220
|
}
|
|
129910
130221
|
deactivateAccount(data, opts) {
|
|
129911
130222
|
return this._service.xrpc.call("com.atproto.server.deactivateAccount", opts?.qp, data, opts).catch((e) => {
|
|
129912
|
-
throw
|
|
130223
|
+
throw toKnownErr51(e);
|
|
129913
130224
|
});
|
|
129914
130225
|
}
|
|
129915
130226
|
deleteAccount(data, opts) {
|
|
129916
130227
|
return this._service.xrpc.call("com.atproto.server.deleteAccount", opts?.qp, data, opts).catch((e) => {
|
|
129917
|
-
throw
|
|
130228
|
+
throw toKnownErr52(e);
|
|
129918
130229
|
});
|
|
129919
130230
|
}
|
|
129920
130231
|
deleteSession(data, opts) {
|
|
129921
130232
|
return this._service.xrpc.call("com.atproto.server.deleteSession", opts?.qp, data, opts).catch((e) => {
|
|
129922
|
-
throw
|
|
130233
|
+
throw toKnownErr53(e);
|
|
129923
130234
|
});
|
|
129924
130235
|
}
|
|
129925
130236
|
describeServer(params2, opts) {
|
|
129926
130237
|
return this._service.xrpc.call("com.atproto.server.describeServer", params2, void 0, opts).catch((e) => {
|
|
129927
|
-
throw
|
|
130238
|
+
throw toKnownErr54(e);
|
|
129928
130239
|
});
|
|
129929
130240
|
}
|
|
129930
130241
|
getAccountInviteCodes(params2, opts) {
|
|
129931
130242
|
return this._service.xrpc.call("com.atproto.server.getAccountInviteCodes", params2, void 0, opts).catch((e) => {
|
|
129932
|
-
throw
|
|
130243
|
+
throw toKnownErr55(e);
|
|
129933
130244
|
});
|
|
129934
130245
|
}
|
|
129935
130246
|
getServiceAuth(params2, opts) {
|
|
129936
130247
|
return this._service.xrpc.call("com.atproto.server.getServiceAuth", params2, void 0, opts).catch((e) => {
|
|
129937
|
-
throw
|
|
130248
|
+
throw toKnownErr56(e);
|
|
129938
130249
|
});
|
|
129939
130250
|
}
|
|
129940
130251
|
getSession(params2, opts) {
|
|
129941
130252
|
return this._service.xrpc.call("com.atproto.server.getSession", params2, void 0, opts).catch((e) => {
|
|
129942
|
-
throw
|
|
130253
|
+
throw toKnownErr57(e);
|
|
129943
130254
|
});
|
|
129944
130255
|
}
|
|
129945
130256
|
listAppPasswords(params2, opts) {
|
|
129946
130257
|
return this._service.xrpc.call("com.atproto.server.listAppPasswords", params2, void 0, opts).catch((e) => {
|
|
129947
|
-
throw
|
|
130258
|
+
throw toKnownErr58(e);
|
|
129948
130259
|
});
|
|
129949
130260
|
}
|
|
129950
130261
|
refreshSession(data, opts) {
|
|
129951
130262
|
return this._service.xrpc.call("com.atproto.server.refreshSession", opts?.qp, data, opts).catch((e) => {
|
|
129952
|
-
throw
|
|
130263
|
+
throw toKnownErr59(e);
|
|
129953
130264
|
});
|
|
129954
130265
|
}
|
|
129955
130266
|
requestAccountDelete(data, opts) {
|
|
129956
130267
|
return this._service.xrpc.call("com.atproto.server.requestAccountDelete", opts?.qp, data, opts).catch((e) => {
|
|
129957
|
-
throw
|
|
130268
|
+
throw toKnownErr60(e);
|
|
129958
130269
|
});
|
|
129959
130270
|
}
|
|
129960
130271
|
requestEmailConfirmation(data, opts) {
|
|
129961
130272
|
return this._service.xrpc.call("com.atproto.server.requestEmailConfirmation", opts?.qp, data, opts).catch((e) => {
|
|
129962
|
-
throw
|
|
130273
|
+
throw toKnownErr61(e);
|
|
129963
130274
|
});
|
|
129964
130275
|
}
|
|
129965
130276
|
requestEmailUpdate(data, opts) {
|
|
129966
130277
|
return this._service.xrpc.call("com.atproto.server.requestEmailUpdate", opts?.qp, data, opts).catch((e) => {
|
|
129967
|
-
throw
|
|
130278
|
+
throw toKnownErr62(e);
|
|
129968
130279
|
});
|
|
129969
130280
|
}
|
|
129970
130281
|
requestPasswordReset(data, opts) {
|
|
129971
130282
|
return this._service.xrpc.call("com.atproto.server.requestPasswordReset", opts?.qp, data, opts).catch((e) => {
|
|
129972
|
-
throw
|
|
130283
|
+
throw toKnownErr63(e);
|
|
129973
130284
|
});
|
|
129974
130285
|
}
|
|
129975
130286
|
reserveSigningKey(data, opts) {
|
|
129976
130287
|
return this._service.xrpc.call("com.atproto.server.reserveSigningKey", opts?.qp, data, opts).catch((e) => {
|
|
129977
|
-
throw
|
|
130288
|
+
throw toKnownErr64(e);
|
|
129978
130289
|
});
|
|
129979
130290
|
}
|
|
129980
130291
|
resetPassword(data, opts) {
|
|
129981
130292
|
return this._service.xrpc.call("com.atproto.server.resetPassword", opts?.qp, data, opts).catch((e) => {
|
|
129982
|
-
throw
|
|
130293
|
+
throw toKnownErr65(e);
|
|
129983
130294
|
});
|
|
129984
130295
|
}
|
|
129985
130296
|
revokeAppPassword(data, opts) {
|
|
129986
130297
|
return this._service.xrpc.call("com.atproto.server.revokeAppPassword", opts?.qp, data, opts).catch((e) => {
|
|
129987
|
-
throw
|
|
130298
|
+
throw toKnownErr66(e);
|
|
129988
130299
|
});
|
|
129989
130300
|
}
|
|
129990
130301
|
updateEmail(data, opts) {
|
|
129991
130302
|
return this._service.xrpc.call("com.atproto.server.updateEmail", opts?.qp, data, opts).catch((e) => {
|
|
129992
|
-
throw
|
|
130303
|
+
throw toKnownErr67(e);
|
|
129993
130304
|
});
|
|
129994
130305
|
}
|
|
129995
130306
|
};
|
|
@@ -129999,57 +130310,57 @@ var ComAtprotoSyncNS2 = class {
|
|
|
129999
130310
|
}
|
|
130000
130311
|
getBlob(params2, opts) {
|
|
130001
130312
|
return this._service.xrpc.call("com.atproto.sync.getBlob", params2, void 0, opts).catch((e) => {
|
|
130002
|
-
throw
|
|
130313
|
+
throw toKnownErr68(e);
|
|
130003
130314
|
});
|
|
130004
130315
|
}
|
|
130005
130316
|
getBlocks(params2, opts) {
|
|
130006
130317
|
return this._service.xrpc.call("com.atproto.sync.getBlocks", params2, void 0, opts).catch((e) => {
|
|
130007
|
-
throw
|
|
130318
|
+
throw toKnownErr69(e);
|
|
130008
130319
|
});
|
|
130009
130320
|
}
|
|
130010
130321
|
getCheckout(params2, opts) {
|
|
130011
130322
|
return this._service.xrpc.call("com.atproto.sync.getCheckout", params2, void 0, opts).catch((e) => {
|
|
130012
|
-
throw
|
|
130323
|
+
throw toKnownErr70(e);
|
|
130013
130324
|
});
|
|
130014
130325
|
}
|
|
130015
130326
|
getHead(params2, opts) {
|
|
130016
130327
|
return this._service.xrpc.call("com.atproto.sync.getHead", params2, void 0, opts).catch((e) => {
|
|
130017
|
-
throw
|
|
130328
|
+
throw toKnownErr71(e);
|
|
130018
130329
|
});
|
|
130019
130330
|
}
|
|
130020
130331
|
getLatestCommit(params2, opts) {
|
|
130021
130332
|
return this._service.xrpc.call("com.atproto.sync.getLatestCommit", params2, void 0, opts).catch((e) => {
|
|
130022
|
-
throw
|
|
130333
|
+
throw toKnownErr72(e);
|
|
130023
130334
|
});
|
|
130024
130335
|
}
|
|
130025
130336
|
getRecord(params2, opts) {
|
|
130026
130337
|
return this._service.xrpc.call("com.atproto.sync.getRecord", params2, void 0, opts).catch((e) => {
|
|
130027
|
-
throw
|
|
130338
|
+
throw toKnownErr73(e);
|
|
130028
130339
|
});
|
|
130029
130340
|
}
|
|
130030
130341
|
getRepo(params2, opts) {
|
|
130031
130342
|
return this._service.xrpc.call("com.atproto.sync.getRepo", params2, void 0, opts).catch((e) => {
|
|
130032
|
-
throw
|
|
130343
|
+
throw toKnownErr74(e);
|
|
130033
130344
|
});
|
|
130034
130345
|
}
|
|
130035
130346
|
listBlobs(params2, opts) {
|
|
130036
130347
|
return this._service.xrpc.call("com.atproto.sync.listBlobs", params2, void 0, opts).catch((e) => {
|
|
130037
|
-
throw
|
|
130348
|
+
throw toKnownErr75(e);
|
|
130038
130349
|
});
|
|
130039
130350
|
}
|
|
130040
130351
|
listRepos(params2, opts) {
|
|
130041
130352
|
return this._service.xrpc.call("com.atproto.sync.listRepos", params2, void 0, opts).catch((e) => {
|
|
130042
|
-
throw
|
|
130353
|
+
throw toKnownErr76(e);
|
|
130043
130354
|
});
|
|
130044
130355
|
}
|
|
130045
130356
|
notifyOfUpdate(data, opts) {
|
|
130046
130357
|
return this._service.xrpc.call("com.atproto.sync.notifyOfUpdate", opts?.qp, data, opts).catch((e) => {
|
|
130047
|
-
throw
|
|
130358
|
+
throw toKnownErr77(e);
|
|
130048
130359
|
});
|
|
130049
130360
|
}
|
|
130050
130361
|
requestCrawl(data, opts) {
|
|
130051
130362
|
return this._service.xrpc.call("com.atproto.sync.requestCrawl", opts?.qp, data, opts).catch((e) => {
|
|
130052
|
-
throw
|
|
130363
|
+
throw toKnownErr78(e);
|
|
130053
130364
|
});
|
|
130054
130365
|
}
|
|
130055
130366
|
};
|
|
@@ -130059,17 +130370,17 @@ var ComAtprotoTempNS2 = class {
|
|
|
130059
130370
|
}
|
|
130060
130371
|
checkSignupQueue(params2, opts) {
|
|
130061
130372
|
return this._service.xrpc.call("com.atproto.temp.checkSignupQueue", params2, void 0, opts).catch((e) => {
|
|
130062
|
-
throw
|
|
130373
|
+
throw toKnownErr79(e);
|
|
130063
130374
|
});
|
|
130064
130375
|
}
|
|
130065
130376
|
fetchLabels(params2, opts) {
|
|
130066
130377
|
return this._service.xrpc.call("com.atproto.temp.fetchLabels", params2, void 0, opts).catch((e) => {
|
|
130067
|
-
throw
|
|
130378
|
+
throw toKnownErr80(e);
|
|
130068
130379
|
});
|
|
130069
130380
|
}
|
|
130070
130381
|
requestPhoneVerification(data, opts) {
|
|
130071
130382
|
return this._service.xrpc.call("com.atproto.temp.requestPhoneVerification", opts?.qp, data, opts).catch((e) => {
|
|
130072
|
-
throw
|
|
130383
|
+
throw toKnownErr81(e);
|
|
130073
130384
|
});
|
|
130074
130385
|
}
|
|
130075
130386
|
};
|
|
@@ -130098,37 +130409,37 @@ var AppBskyActorNS2 = class {
|
|
|
130098
130409
|
}
|
|
130099
130410
|
getPreferences(params2, opts) {
|
|
130100
130411
|
return this._service.xrpc.call("app.bsky.actor.getPreferences", params2, void 0, opts).catch((e) => {
|
|
130101
|
-
throw
|
|
130412
|
+
throw toKnownErr82(e);
|
|
130102
130413
|
});
|
|
130103
130414
|
}
|
|
130104
130415
|
getProfile(params2, opts) {
|
|
130105
130416
|
return this._service.xrpc.call("app.bsky.actor.getProfile", params2, void 0, opts).catch((e) => {
|
|
130106
|
-
throw
|
|
130417
|
+
throw toKnownErr83(e);
|
|
130107
130418
|
});
|
|
130108
130419
|
}
|
|
130109
130420
|
getProfiles(params2, opts) {
|
|
130110
130421
|
return this._service.xrpc.call("app.bsky.actor.getProfiles", params2, void 0, opts).catch((e) => {
|
|
130111
|
-
throw
|
|
130422
|
+
throw toKnownErr84(e);
|
|
130112
130423
|
});
|
|
130113
130424
|
}
|
|
130114
130425
|
getSuggestions(params2, opts) {
|
|
130115
130426
|
return this._service.xrpc.call("app.bsky.actor.getSuggestions", params2, void 0, opts).catch((e) => {
|
|
130116
|
-
throw
|
|
130427
|
+
throw toKnownErr85(e);
|
|
130117
130428
|
});
|
|
130118
130429
|
}
|
|
130119
130430
|
putPreferences(data, opts) {
|
|
130120
130431
|
return this._service.xrpc.call("app.bsky.actor.putPreferences", opts?.qp, data, opts).catch((e) => {
|
|
130121
|
-
throw
|
|
130432
|
+
throw toKnownErr86(e);
|
|
130122
130433
|
});
|
|
130123
130434
|
}
|
|
130124
130435
|
searchActors(params2, opts) {
|
|
130125
130436
|
return this._service.xrpc.call("app.bsky.actor.searchActors", params2, void 0, opts).catch((e) => {
|
|
130126
|
-
throw
|
|
130437
|
+
throw toKnownErr87(e);
|
|
130127
130438
|
});
|
|
130128
130439
|
}
|
|
130129
130440
|
searchActorsTypeahead(params2, opts) {
|
|
130130
130441
|
return this._service.xrpc.call("app.bsky.actor.searchActorsTypeahead", params2, void 0, opts).catch((e) => {
|
|
130131
|
-
throw
|
|
130442
|
+
throw toKnownErr88(e);
|
|
130132
130443
|
});
|
|
130133
130444
|
}
|
|
130134
130445
|
};
|
|
@@ -130175,82 +130486,82 @@ var AppBskyFeedNS2 = class {
|
|
|
130175
130486
|
}
|
|
130176
130487
|
describeFeedGenerator(params2, opts) {
|
|
130177
130488
|
return this._service.xrpc.call("app.bsky.feed.describeFeedGenerator", params2, void 0, opts).catch((e) => {
|
|
130178
|
-
throw
|
|
130489
|
+
throw toKnownErr89(e);
|
|
130179
130490
|
});
|
|
130180
130491
|
}
|
|
130181
130492
|
getActorFeeds(params2, opts) {
|
|
130182
130493
|
return this._service.xrpc.call("app.bsky.feed.getActorFeeds", params2, void 0, opts).catch((e) => {
|
|
130183
|
-
throw
|
|
130494
|
+
throw toKnownErr90(e);
|
|
130184
130495
|
});
|
|
130185
130496
|
}
|
|
130186
130497
|
getActorLikes(params2, opts) {
|
|
130187
130498
|
return this._service.xrpc.call("app.bsky.feed.getActorLikes", params2, void 0, opts).catch((e) => {
|
|
130188
|
-
throw
|
|
130499
|
+
throw toKnownErr91(e);
|
|
130189
130500
|
});
|
|
130190
130501
|
}
|
|
130191
130502
|
getAuthorFeed(params2, opts) {
|
|
130192
130503
|
return this._service.xrpc.call("app.bsky.feed.getAuthorFeed", params2, void 0, opts).catch((e) => {
|
|
130193
|
-
throw
|
|
130504
|
+
throw toKnownErr92(e);
|
|
130194
130505
|
});
|
|
130195
130506
|
}
|
|
130196
130507
|
getFeed(params2, opts) {
|
|
130197
130508
|
return this._service.xrpc.call("app.bsky.feed.getFeed", params2, void 0, opts).catch((e) => {
|
|
130198
|
-
throw
|
|
130509
|
+
throw toKnownErr93(e);
|
|
130199
130510
|
});
|
|
130200
130511
|
}
|
|
130201
130512
|
getFeedGenerator(params2, opts) {
|
|
130202
130513
|
return this._service.xrpc.call("app.bsky.feed.getFeedGenerator", params2, void 0, opts).catch((e) => {
|
|
130203
|
-
throw
|
|
130514
|
+
throw toKnownErr94(e);
|
|
130204
130515
|
});
|
|
130205
130516
|
}
|
|
130206
130517
|
getFeedGenerators(params2, opts) {
|
|
130207
130518
|
return this._service.xrpc.call("app.bsky.feed.getFeedGenerators", params2, void 0, opts).catch((e) => {
|
|
130208
|
-
throw
|
|
130519
|
+
throw toKnownErr95(e);
|
|
130209
130520
|
});
|
|
130210
130521
|
}
|
|
130211
130522
|
getFeedSkeleton(params2, opts) {
|
|
130212
130523
|
return this._service.xrpc.call("app.bsky.feed.getFeedSkeleton", params2, void 0, opts).catch((e) => {
|
|
130213
|
-
throw
|
|
130524
|
+
throw toKnownErr96(e);
|
|
130214
130525
|
});
|
|
130215
130526
|
}
|
|
130216
130527
|
getLikes(params2, opts) {
|
|
130217
130528
|
return this._service.xrpc.call("app.bsky.feed.getLikes", params2, void 0, opts).catch((e) => {
|
|
130218
|
-
throw
|
|
130529
|
+
throw toKnownErr97(e);
|
|
130219
130530
|
});
|
|
130220
130531
|
}
|
|
130221
130532
|
getListFeed(params2, opts) {
|
|
130222
130533
|
return this._service.xrpc.call("app.bsky.feed.getListFeed", params2, void 0, opts).catch((e) => {
|
|
130223
|
-
throw
|
|
130534
|
+
throw toKnownErr98(e);
|
|
130224
130535
|
});
|
|
130225
130536
|
}
|
|
130226
130537
|
getPostThread(params2, opts) {
|
|
130227
130538
|
return this._service.xrpc.call("app.bsky.feed.getPostThread", params2, void 0, opts).catch((e) => {
|
|
130228
|
-
throw
|
|
130539
|
+
throw toKnownErr99(e);
|
|
130229
130540
|
});
|
|
130230
130541
|
}
|
|
130231
130542
|
getPosts(params2, opts) {
|
|
130232
130543
|
return this._service.xrpc.call("app.bsky.feed.getPosts", params2, void 0, opts).catch((e) => {
|
|
130233
|
-
throw
|
|
130544
|
+
throw toKnownErr100(e);
|
|
130234
130545
|
});
|
|
130235
130546
|
}
|
|
130236
130547
|
getRepostedBy(params2, opts) {
|
|
130237
130548
|
return this._service.xrpc.call("app.bsky.feed.getRepostedBy", params2, void 0, opts).catch((e) => {
|
|
130238
|
-
throw
|
|
130549
|
+
throw toKnownErr101(e);
|
|
130239
130550
|
});
|
|
130240
130551
|
}
|
|
130241
130552
|
getSuggestedFeeds(params2, opts) {
|
|
130242
130553
|
return this._service.xrpc.call("app.bsky.feed.getSuggestedFeeds", params2, void 0, opts).catch((e) => {
|
|
130243
|
-
throw
|
|
130554
|
+
throw toKnownErr102(e);
|
|
130244
130555
|
});
|
|
130245
130556
|
}
|
|
130246
130557
|
getTimeline(params2, opts) {
|
|
130247
130558
|
return this._service.xrpc.call("app.bsky.feed.getTimeline", params2, void 0, opts).catch((e) => {
|
|
130248
|
-
throw
|
|
130559
|
+
throw toKnownErr103(e);
|
|
130249
130560
|
});
|
|
130250
130561
|
}
|
|
130251
130562
|
searchPosts(params2, opts) {
|
|
130252
130563
|
return this._service.xrpc.call("app.bsky.feed.searchPosts", params2, void 0, opts).catch((e) => {
|
|
130253
|
-
throw
|
|
130564
|
+
throw toKnownErr104(e);
|
|
130254
130565
|
});
|
|
130255
130566
|
}
|
|
130256
130567
|
};
|
|
@@ -130400,72 +130711,72 @@ var AppBskyGraphNS2 = class {
|
|
|
130400
130711
|
}
|
|
130401
130712
|
getBlocks(params2, opts) {
|
|
130402
130713
|
return this._service.xrpc.call("app.bsky.graph.getBlocks", params2, void 0, opts).catch((e) => {
|
|
130403
|
-
throw
|
|
130714
|
+
throw toKnownErr105(e);
|
|
130404
130715
|
});
|
|
130405
130716
|
}
|
|
130406
130717
|
getFollowers(params2, opts) {
|
|
130407
130718
|
return this._service.xrpc.call("app.bsky.graph.getFollowers", params2, void 0, opts).catch((e) => {
|
|
130408
|
-
throw
|
|
130719
|
+
throw toKnownErr106(e);
|
|
130409
130720
|
});
|
|
130410
130721
|
}
|
|
130411
130722
|
getFollows(params2, opts) {
|
|
130412
130723
|
return this._service.xrpc.call("app.bsky.graph.getFollows", params2, void 0, opts).catch((e) => {
|
|
130413
|
-
throw
|
|
130724
|
+
throw toKnownErr107(e);
|
|
130414
130725
|
});
|
|
130415
130726
|
}
|
|
130416
130727
|
getList(params2, opts) {
|
|
130417
130728
|
return this._service.xrpc.call("app.bsky.graph.getList", params2, void 0, opts).catch((e) => {
|
|
130418
|
-
throw
|
|
130729
|
+
throw toKnownErr108(e);
|
|
130419
130730
|
});
|
|
130420
130731
|
}
|
|
130421
130732
|
getListBlocks(params2, opts) {
|
|
130422
130733
|
return this._service.xrpc.call("app.bsky.graph.getListBlocks", params2, void 0, opts).catch((e) => {
|
|
130423
|
-
throw
|
|
130734
|
+
throw toKnownErr109(e);
|
|
130424
130735
|
});
|
|
130425
130736
|
}
|
|
130426
130737
|
getListMutes(params2, opts) {
|
|
130427
130738
|
return this._service.xrpc.call("app.bsky.graph.getListMutes", params2, void 0, opts).catch((e) => {
|
|
130428
|
-
throw
|
|
130739
|
+
throw toKnownErr110(e);
|
|
130429
130740
|
});
|
|
130430
130741
|
}
|
|
130431
130742
|
getLists(params2, opts) {
|
|
130432
130743
|
return this._service.xrpc.call("app.bsky.graph.getLists", params2, void 0, opts).catch((e) => {
|
|
130433
|
-
throw
|
|
130744
|
+
throw toKnownErr111(e);
|
|
130434
130745
|
});
|
|
130435
130746
|
}
|
|
130436
130747
|
getMutes(params2, opts) {
|
|
130437
130748
|
return this._service.xrpc.call("app.bsky.graph.getMutes", params2, void 0, opts).catch((e) => {
|
|
130438
|
-
throw
|
|
130749
|
+
throw toKnownErr112(e);
|
|
130439
130750
|
});
|
|
130440
130751
|
}
|
|
130441
130752
|
getRelationships(params2, opts) {
|
|
130442
130753
|
return this._service.xrpc.call("app.bsky.graph.getRelationships", params2, void 0, opts).catch((e) => {
|
|
130443
|
-
throw
|
|
130754
|
+
throw toKnownErr113(e);
|
|
130444
130755
|
});
|
|
130445
130756
|
}
|
|
130446
130757
|
getSuggestedFollowsByActor(params2, opts) {
|
|
130447
130758
|
return this._service.xrpc.call("app.bsky.graph.getSuggestedFollowsByActor", params2, void 0, opts).catch((e) => {
|
|
130448
|
-
throw
|
|
130759
|
+
throw toKnownErr114(e);
|
|
130449
130760
|
});
|
|
130450
130761
|
}
|
|
130451
130762
|
muteActor(data, opts) {
|
|
130452
130763
|
return this._service.xrpc.call("app.bsky.graph.muteActor", opts?.qp, data, opts).catch((e) => {
|
|
130453
|
-
throw
|
|
130764
|
+
throw toKnownErr115(e);
|
|
130454
130765
|
});
|
|
130455
130766
|
}
|
|
130456
130767
|
muteActorList(data, opts) {
|
|
130457
130768
|
return this._service.xrpc.call("app.bsky.graph.muteActorList", opts?.qp, data, opts).catch((e) => {
|
|
130458
|
-
throw
|
|
130769
|
+
throw toKnownErr116(e);
|
|
130459
130770
|
});
|
|
130460
130771
|
}
|
|
130461
130772
|
unmuteActor(data, opts) {
|
|
130462
130773
|
return this._service.xrpc.call("app.bsky.graph.unmuteActor", opts?.qp, data, opts).catch((e) => {
|
|
130463
|
-
throw
|
|
130774
|
+
throw toKnownErr117(e);
|
|
130464
130775
|
});
|
|
130465
130776
|
}
|
|
130466
130777
|
unmuteActorList(data, opts) {
|
|
130467
130778
|
return this._service.xrpc.call("app.bsky.graph.unmuteActorList", opts?.qp, data, opts).catch((e) => {
|
|
130468
|
-
throw
|
|
130779
|
+
throw toKnownErr118(e);
|
|
130469
130780
|
});
|
|
130470
130781
|
}
|
|
130471
130782
|
};
|
|
@@ -130610,22 +130921,22 @@ var AppBskyNotificationNS2 = class {
|
|
|
130610
130921
|
}
|
|
130611
130922
|
getUnreadCount(params2, opts) {
|
|
130612
130923
|
return this._service.xrpc.call("app.bsky.notification.getUnreadCount", params2, void 0, opts).catch((e) => {
|
|
130613
|
-
throw
|
|
130924
|
+
throw toKnownErr119(e);
|
|
130614
130925
|
});
|
|
130615
130926
|
}
|
|
130616
130927
|
listNotifications(params2, opts) {
|
|
130617
130928
|
return this._service.xrpc.call("app.bsky.notification.listNotifications", params2, void 0, opts).catch((e) => {
|
|
130618
|
-
throw
|
|
130929
|
+
throw toKnownErr120(e);
|
|
130619
130930
|
});
|
|
130620
130931
|
}
|
|
130621
130932
|
registerPush(data, opts) {
|
|
130622
130933
|
return this._service.xrpc.call("app.bsky.notification.registerPush", opts?.qp, data, opts).catch((e) => {
|
|
130623
|
-
throw
|
|
130934
|
+
throw toKnownErr121(e);
|
|
130624
130935
|
});
|
|
130625
130936
|
}
|
|
130626
130937
|
updateSeen(data, opts) {
|
|
130627
130938
|
return this._service.xrpc.call("app.bsky.notification.updateSeen", opts?.qp, data, opts).catch((e) => {
|
|
130628
|
-
throw
|
|
130939
|
+
throw toKnownErr122(e);
|
|
130629
130940
|
});
|
|
130630
130941
|
}
|
|
130631
130942
|
};
|
|
@@ -130640,22 +130951,22 @@ var AppBskyUnspeccedNS2 = class {
|
|
|
130640
130951
|
}
|
|
130641
130952
|
getPopularFeedGenerators(params2, opts) {
|
|
130642
130953
|
return this._service.xrpc.call("app.bsky.unspecced.getPopularFeedGenerators", params2, void 0, opts).catch((e) => {
|
|
130643
|
-
throw
|
|
130954
|
+
throw toKnownErr123(e);
|
|
130644
130955
|
});
|
|
130645
130956
|
}
|
|
130646
130957
|
getTaggedSuggestions(params2, opts) {
|
|
130647
130958
|
return this._service.xrpc.call("app.bsky.unspecced.getTaggedSuggestions", params2, void 0, opts).catch((e) => {
|
|
130648
|
-
throw
|
|
130959
|
+
throw toKnownErr124(e);
|
|
130649
130960
|
});
|
|
130650
130961
|
}
|
|
130651
130962
|
searchActorsSkeleton(params2, opts) {
|
|
130652
130963
|
return this._service.xrpc.call("app.bsky.unspecced.searchActorsSkeleton", params2, void 0, opts).catch((e) => {
|
|
130653
|
-
throw
|
|
130964
|
+
throw toKnownErr125(e);
|
|
130654
130965
|
});
|
|
130655
130966
|
}
|
|
130656
130967
|
searchPostsSkeleton(params2, opts) {
|
|
130657
130968
|
return this._service.xrpc.call("app.bsky.unspecced.searchPostsSkeleton", params2, void 0, opts).catch((e) => {
|
|
130658
|
-
throw
|
|
130969
|
+
throw toKnownErr126(e);
|
|
130659
130970
|
});
|
|
130660
130971
|
}
|
|
130661
130972
|
};
|
|
@@ -131815,7 +132126,8 @@ async function up(db) {
|
|
|
131815
132126
|
await db.schema.createTable("moderation_event").addColumn("id", "serial", (col) => col.primaryKey()).addColumn("action", "varchar", (col) => col.notNull()).addColumn("subjectType", "varchar", (col) => col.notNull()).addColumn("subjectDid", "varchar", (col) => col.notNull()).addColumn("subjectUri", "varchar").addColumn("subjectCid", "varchar").addColumn("comment", "text").addColumn("meta", "jsonb").addColumn("createdAt", "varchar", (col) => col.notNull()).addColumn("createdBy", "varchar", (col) => col.notNull()).addColumn("reversedAt", "varchar").addColumn("reversedBy", "varchar").addColumn("durationInHours", "integer").addColumn("expiresAt", "varchar").addColumn("reversedReason", "text").addColumn("createLabelVals", "varchar").addColumn("negateLabelVals", "varchar").addColumn("legacyRefId", "integer").execute();
|
|
131816
132127
|
await db.schema.createTable("moderation_subject_status").addColumn("id", "serial", (col) => col.primaryKey()).addColumn("did", "varchar", (col) => col.notNull()).addColumn("recordPath", "varchar", (col) => col.notNull().defaultTo("")).addColumn("blobCids", "jsonb").addColumn("recordCid", "varchar").addColumn("reviewState", "varchar", (col) => col.notNull()).addColumn("comment", "varchar").addColumn("muteUntil", "varchar").addColumn("lastReviewedAt", "varchar").addColumn("lastReviewedBy", "varchar").addColumn("lastReportedAt", "varchar").addColumn("lastAppealedAt", "varchar").addColumn("takendown", "boolean", (col) => col.defaultTo(false).notNull()).addColumn("suspendUntil", "varchar").addColumn("appealed", "boolean").addColumn("createdAt", "varchar", (col) => col.notNull()).addColumn("updatedAt", "varchar", (col) => col.notNull()).addUniqueConstraint("moderation_status_unique_idx", ["did", "recordPath"]).execute();
|
|
131817
132128
|
await db.schema.createIndex("moderation_subject_status_blob_cids_idx").on("moderation_subject_status").using("gin").column("blobCids").execute();
|
|
131818
|
-
await db.schema.createTable("label").addColumn("
|
|
132129
|
+
await db.schema.createTable("label").addColumn("id", "bigserial", (col) => col.primaryKey()).addColumn("src", "varchar", (col) => col.notNull()).addColumn("uri", "varchar", (col) => col.notNull()).addColumn("cid", "varchar", (col) => col.notNull()).addColumn("val", "varchar", (col) => col.notNull()).addColumn("neg", "boolean", (col) => col.notNull()).addColumn("cts", "varchar", (col) => col.notNull()).execute();
|
|
132130
|
+
await db.schema.createIndex("unique_label_idx").unique().on("label").columns(["src", "uri", "cid", "val"]).execute();
|
|
131819
132131
|
await db.schema.createIndex("label_uri_index").on("label").column("uri").execute();
|
|
131820
132132
|
await db.schema.createTable("repo_push_event").addColumn("id", "serial", (col) => col.primaryKey()).addColumn("eventType", "varchar", (col) => col.notNull()).addColumn("subjectDid", "varchar", (col) => col.notNull()).addColumn("takedownRef", "varchar").addColumn("confirmedAt", "timestamptz").addColumn("lastAttempted", "timestamptz").addColumn("attempts", "integer", (col) => col.notNull().defaultTo(0)).addUniqueConstraint("repo_push_event_unique_evt", [
|
|
131821
132133
|
"subjectDid",
|
|
@@ -132330,11 +132642,7 @@ var ModerationViews = class {
|
|
|
132330
132642
|
}
|
|
132331
132643
|
async labels(subject, includeNeg) {
|
|
132332
132644
|
const res = await this.db.db.selectFrom("label").where("label.uri", "=", subject).if(!includeNeg, (qb) => qb.where("neg", "=", false)).selectAll().execute();
|
|
132333
|
-
return res.map((l) => (
|
|
132334
|
-
...l,
|
|
132335
|
-
cid: l.cid === "" ? void 0 : l.cid,
|
|
132336
|
-
neg: l.neg
|
|
132337
|
-
}));
|
|
132645
|
+
return res.map((l) => formatLabel(l));
|
|
132338
132646
|
}
|
|
132339
132647
|
async getSubjectStatus(subjects) {
|
|
132340
132648
|
const parsedSubjects = subjects.map((subject) => parseSubjectId(subject));
|
|
@@ -132557,6 +132865,8 @@ var adjustModerationSubjectStatus = async (db, moderationEvent, blobCids) => {
|
|
|
132557
132865
|
subjectStatus.appealed = true;
|
|
132558
132866
|
newStatus.lastAppealedAt = createdAt;
|
|
132559
132867
|
subjectStatus.lastAppealedAt = createdAt;
|
|
132868
|
+
subjectStatus.reviewState = REVIEWESCALATED;
|
|
132869
|
+
newStatus.reviewState = REVIEWESCALATED;
|
|
132560
132870
|
}
|
|
132561
132871
|
if (action === "com.atproto.admin.defs#modEventResolveAppeal" && subjectStatus.appealed) {
|
|
132562
132872
|
newStatus.appealed = false;
|
|
@@ -132749,6 +133059,9 @@ var paginate = (qb, opts) => {
|
|
|
132749
133059
|
return qb.if(!!limit, (q) => q.limit(limit)).if(!nullsLast, (q) => q.orderBy(keyset.primary, direction).orderBy(keyset.secondary, direction)).if(!!nullsLast, (q) => q.orderBy(direction === "asc" ? sql`${keyset.primary} asc nulls last` : sql`${keyset.primary} desc nulls last`).orderBy(direction === "asc" ? sql`${keyset.secondary} asc nulls last` : sql`${keyset.secondary} desc nulls last`)).if(!!keysetSql, (qb2) => keysetSql ? qb2.where(keysetSql) : qb2);
|
|
132750
133060
|
};
|
|
132751
133061
|
|
|
133062
|
+
// src/db/schema/label.ts
|
|
133063
|
+
var LabelChannel = "label_channel";
|
|
133064
|
+
|
|
132752
133065
|
// src/mod-service/index.ts
|
|
132753
133066
|
var ModerationService = class {
|
|
132754
133067
|
constructor(db, backgroundQueue, eventPusher, appviewAgent, appviewAuth, serverDid) {
|
|
@@ -132981,17 +133294,15 @@ var ModerationService = class {
|
|
|
132981
133294
|
subjectDid: subject.did,
|
|
132982
133295
|
takedownRef
|
|
132983
133296
|
}));
|
|
132984
|
-
const
|
|
132985
|
-
|
|
132986
|
-
|
|
132987
|
-
|
|
132988
|
-
|
|
132989
|
-
|
|
132990
|
-
|
|
132991
|
-
|
|
132992
|
-
|
|
132993
|
-
})
|
|
132994
|
-
]);
|
|
133297
|
+
const repoEvts = await this.db.db.insertInto("repo_push_event").values(values).onConflict((oc) => oc.columns(["subjectDid", "eventType"]).doUpdateSet({
|
|
133298
|
+
takedownRef,
|
|
133299
|
+
confirmedAt: null,
|
|
133300
|
+
attempts: 0,
|
|
133301
|
+
lastAttempted: null
|
|
133302
|
+
})).returning("id").execute();
|
|
133303
|
+
await this.formatAndCreateLabels(subject.did, null, {
|
|
133304
|
+
create: [UNSPECCED_TAKEDOWN_LABEL]
|
|
133305
|
+
});
|
|
132995
133306
|
this.db.onCommit(() => {
|
|
132996
133307
|
this.backgroundQueue.add(async () => {
|
|
132997
133308
|
await Promise.all(repoEvts.map((evt) => this.eventPusher.attemptRepoEvent(evt.id)));
|
|
@@ -132999,17 +133310,15 @@ var ModerationService = class {
|
|
|
132999
133310
|
});
|
|
133000
133311
|
}
|
|
133001
133312
|
async reverseTakedownRepo(subject) {
|
|
133002
|
-
const
|
|
133003
|
-
|
|
133004
|
-
|
|
133005
|
-
|
|
133006
|
-
|
|
133007
|
-
|
|
133008
|
-
|
|
133009
|
-
|
|
133010
|
-
|
|
133011
|
-
})
|
|
133012
|
-
]);
|
|
133313
|
+
const repoEvts = await this.db.db.updateTable("repo_push_event").where("eventType", "in", TAKEDOWNS).where("subjectDid", "=", subject.did).set({
|
|
133314
|
+
takedownRef: null,
|
|
133315
|
+
confirmedAt: null,
|
|
133316
|
+
attempts: 0,
|
|
133317
|
+
lastAttempted: null
|
|
133318
|
+
}).returning("id").execute();
|
|
133319
|
+
await this.formatAndCreateLabels(subject.did, null, {
|
|
133320
|
+
negate: [UNSPECCED_TAKEDOWN_LABEL]
|
|
133321
|
+
});
|
|
133013
133322
|
this.db.onCommit(() => {
|
|
133014
133323
|
this.backgroundQueue.add(async () => {
|
|
133015
133324
|
await Promise.all(repoEvts.map((evt) => this.eventPusher.attemptRepoEvent(evt.id)));
|
|
@@ -133031,15 +133340,15 @@ var ModerationService = class {
|
|
|
133031
133340
|
if (blobCids && blobCids.length > 0) {
|
|
133032
133341
|
labels.push(UNSPECCED_TAKEDOWN_BLOBS_LABEL);
|
|
133033
133342
|
}
|
|
133034
|
-
const
|
|
133035
|
-
|
|
133036
|
-
|
|
133037
|
-
|
|
133038
|
-
|
|
133039
|
-
|
|
133040
|
-
|
|
133041
|
-
|
|
133042
|
-
|
|
133343
|
+
const recordEvts = await this.db.db.insertInto("record_push_event").values(values).onConflict((oc) => oc.columns(["subjectUri", "eventType"]).doUpdateSet({
|
|
133344
|
+
takedownRef,
|
|
133345
|
+
confirmedAt: null,
|
|
133346
|
+
attempts: 0,
|
|
133347
|
+
lastAttempted: null
|
|
133348
|
+
})).returning("id").execute();
|
|
133349
|
+
await this.formatAndCreateLabels(subject.uri, subject.cid, {
|
|
133350
|
+
create: labels
|
|
133351
|
+
});
|
|
133043
133352
|
this.db.onCommit(() => {
|
|
133044
133353
|
this.backgroundQueue.add(async () => {
|
|
133045
133354
|
await Promise.all(recordEvts.map((evt) => this.eventPusher.attemptRecordEvent(evt.id)));
|
|
@@ -133077,16 +133386,15 @@ var ModerationService = class {
|
|
|
133077
133386
|
if (blobCids && blobCids.length > 0) {
|
|
133078
133387
|
labels.push(UNSPECCED_TAKEDOWN_BLOBS_LABEL);
|
|
133079
133388
|
}
|
|
133080
|
-
const
|
|
133081
|
-
|
|
133082
|
-
|
|
133083
|
-
|
|
133084
|
-
|
|
133085
|
-
|
|
133086
|
-
|
|
133087
|
-
|
|
133088
|
-
|
|
133089
|
-
this.db.onCommit(() => {
|
|
133389
|
+
const recordEvts = await this.db.db.updateTable("record_push_event").where("eventType", "in", TAKEDOWNS).where("subjectDid", "=", subject.did).where("subjectUri", "=", subject.uri).set({
|
|
133390
|
+
takedownRef: null,
|
|
133391
|
+
confirmedAt: null,
|
|
133392
|
+
attempts: 0,
|
|
133393
|
+
lastAttempted: null
|
|
133394
|
+
}).returning("id").execute();
|
|
133395
|
+
await this.formatAndCreateLabels(subject.uri, subject.cid, {
|
|
133396
|
+
negate: labels
|
|
133397
|
+
}), this.db.onCommit(() => {
|
|
133090
133398
|
this.backgroundQueue.add(async () => {
|
|
133091
133399
|
await Promise.all(recordEvts.map((evt) => this.eventPusher.attemptRecordEvent(evt.id)));
|
|
133092
133400
|
});
|
|
@@ -133241,8 +133549,10 @@ var ModerationService = class {
|
|
|
133241
133549
|
neg: !!l.neg
|
|
133242
133550
|
}));
|
|
133243
133551
|
const { ref } = this.db.db.dynamic;
|
|
133552
|
+
await sql`notify ${ref(LabelChannel)}`.execute(this.db.db);
|
|
133244
133553
|
const excluded = (col) => ref(`excluded.${col}`);
|
|
133245
133554
|
await this.db.db.insertInto("label").values(dbVals).onConflict((oc) => oc.columns(["src", "uri", "cid", "val"]).doUpdateSet({
|
|
133555
|
+
id: sql`${excluded("id")}`,
|
|
133246
133556
|
neg: sql`${excluded("neg")}`,
|
|
133247
133557
|
cts: sql`${excluded("cts")}`
|
|
133248
133558
|
})).execute();
|
|
@@ -133694,6 +134004,101 @@ var OzoneDaemon = class {
|
|
|
133694
134004
|
}
|
|
133695
134005
|
};
|
|
133696
134006
|
|
|
134007
|
+
// src/sequencer/sequencer.ts
|
|
134008
|
+
var import_events = __toESM(require("events"));
|
|
134009
|
+
var Sequencer = class extends import_events.default {
|
|
134010
|
+
constructor(db, lastSeen = 0) {
|
|
134011
|
+
super();
|
|
134012
|
+
this.db = db;
|
|
134013
|
+
this.lastSeen = lastSeen;
|
|
134014
|
+
this.destroyed = false;
|
|
134015
|
+
this.queued = false;
|
|
134016
|
+
this.setMaxListeners(100);
|
|
134017
|
+
}
|
|
134018
|
+
async start() {
|
|
134019
|
+
const curr = await this.curr();
|
|
134020
|
+
this.lastSeen = curr ?? 0;
|
|
134021
|
+
this.poll();
|
|
134022
|
+
this.conn = await this.db.pool.connect();
|
|
134023
|
+
this.conn.query(`listen ${LabelChannel}`);
|
|
134024
|
+
this.conn.on("notification", (notif) => {
|
|
134025
|
+
if (notif.channel === LabelChannel) {
|
|
134026
|
+
this.poll();
|
|
134027
|
+
}
|
|
134028
|
+
});
|
|
134029
|
+
}
|
|
134030
|
+
async destroy() {
|
|
134031
|
+
if (this.destroyed)
|
|
134032
|
+
return;
|
|
134033
|
+
this.destroyed = true;
|
|
134034
|
+
if (this.conn) {
|
|
134035
|
+
this.conn.release();
|
|
134036
|
+
this.conn = void 0;
|
|
134037
|
+
}
|
|
134038
|
+
if (this.pollPromise) {
|
|
134039
|
+
await this.pollPromise;
|
|
134040
|
+
}
|
|
134041
|
+
this.emit("close");
|
|
134042
|
+
}
|
|
134043
|
+
async curr() {
|
|
134044
|
+
const got = await this.db.db.selectFrom("label").selectAll().orderBy("id", "desc").limit(1).executeTakeFirst();
|
|
134045
|
+
return got?.id ?? null;
|
|
134046
|
+
}
|
|
134047
|
+
async next(cursor) {
|
|
134048
|
+
const got = await this.db.db.selectFrom("label").selectAll().where("id", ">", cursor).limit(1).orderBy("id", "asc").executeTakeFirst();
|
|
134049
|
+
return got || null;
|
|
134050
|
+
}
|
|
134051
|
+
async requestLabelRange(opts) {
|
|
134052
|
+
const { earliestId, limit } = opts;
|
|
134053
|
+
let seqQb = this.db.db.selectFrom("label").selectAll().orderBy("id", "asc");
|
|
134054
|
+
if (earliestId !== void 0) {
|
|
134055
|
+
seqQb = seqQb.where("id", ">", earliestId);
|
|
134056
|
+
}
|
|
134057
|
+
if (limit !== void 0) {
|
|
134058
|
+
seqQb = seqQb.limit(limit);
|
|
134059
|
+
}
|
|
134060
|
+
const rows = await seqQb.execute();
|
|
134061
|
+
if (rows.length < 1) {
|
|
134062
|
+
return [];
|
|
134063
|
+
}
|
|
134064
|
+
const evts = [];
|
|
134065
|
+
for (const row of rows) {
|
|
134066
|
+
evts.push({
|
|
134067
|
+
seq: row.id,
|
|
134068
|
+
labels: [formatLabel(row)]
|
|
134069
|
+
});
|
|
134070
|
+
}
|
|
134071
|
+
return evts;
|
|
134072
|
+
}
|
|
134073
|
+
poll() {
|
|
134074
|
+
if (this.destroyed)
|
|
134075
|
+
return;
|
|
134076
|
+
if (this.pollPromise) {
|
|
134077
|
+
this.queued = true;
|
|
134078
|
+
return;
|
|
134079
|
+
}
|
|
134080
|
+
this.queued = false;
|
|
134081
|
+
this.pollPromise = this.requestLabelRange({
|
|
134082
|
+
earliestId: this.lastSeen,
|
|
134083
|
+
limit: 500
|
|
134084
|
+
}).then((evts) => {
|
|
134085
|
+
this.emit("events", evts);
|
|
134086
|
+
this.lastSeen = evts.at(-1)?.seq ?? this.lastSeen;
|
|
134087
|
+
if (evts.length > 0) {
|
|
134088
|
+
this.queued = true;
|
|
134089
|
+
}
|
|
134090
|
+
}).catch((err) => {
|
|
134091
|
+
seqLogger.error({ err, lastSeen: this.lastSeen }, "sequencer failed to poll db");
|
|
134092
|
+
}).finally(() => {
|
|
134093
|
+
this.pollPromise = void 0;
|
|
134094
|
+
if (this.queued) {
|
|
134095
|
+
this.poll();
|
|
134096
|
+
}
|
|
134097
|
+
});
|
|
134098
|
+
}
|
|
134099
|
+
};
|
|
134100
|
+
var sequencer_default = Sequencer;
|
|
134101
|
+
|
|
133697
134102
|
// src/communication-service/template.ts
|
|
133698
134103
|
var CommunicationTemplateService = class {
|
|
133699
134104
|
constructor(db) {
|
|
@@ -133770,7 +134175,10 @@ var AppContext = class {
|
|
|
133770
134175
|
static async fromConfig(cfg, secrets, overrides) {
|
|
133771
134176
|
const db = new Database({
|
|
133772
134177
|
url: cfg.db.postgresUrl,
|
|
133773
|
-
schema: cfg.db.postgresSchema
|
|
134178
|
+
schema: cfg.db.postgresSchema,
|
|
134179
|
+
poolSize: cfg.db.poolSize,
|
|
134180
|
+
poolMaxUses: cfg.db.poolMaxUses,
|
|
134181
|
+
poolIdleTimeoutMs: cfg.db.poolIdleTimeoutMs
|
|
133774
134182
|
});
|
|
133775
134183
|
const signingKey = await Secp256k1Keypair.import(secrets.signingKeyHex);
|
|
133776
134184
|
const appviewAgent = new AtpAgent({ service: cfg.appview.url });
|
|
@@ -133791,6 +134199,7 @@ var AppContext = class {
|
|
|
133791
134199
|
const idResolver = new IdResolver({
|
|
133792
134200
|
plcUrl: cfg.identity.plcUrl
|
|
133793
134201
|
});
|
|
134202
|
+
const sequencer = new sequencer_default(db);
|
|
133794
134203
|
return new AppContext({
|
|
133795
134204
|
db,
|
|
133796
134205
|
cfg,
|
|
@@ -133801,6 +134210,7 @@ var AppContext = class {
|
|
|
133801
134210
|
signingKey,
|
|
133802
134211
|
idResolver,
|
|
133803
134212
|
backgroundQueue,
|
|
134213
|
+
sequencer,
|
|
133804
134214
|
...overrides ?? {}
|
|
133805
134215
|
}, secrets);
|
|
133806
134216
|
}
|
|
@@ -133838,6 +134248,9 @@ var AppContext = class {
|
|
|
133838
134248
|
get backgroundQueue() {
|
|
133839
134249
|
return this.opts.backgroundQueue;
|
|
133840
134250
|
}
|
|
134251
|
+
get sequencer() {
|
|
134252
|
+
return this.opts.sequencer;
|
|
134253
|
+
}
|
|
133841
134254
|
get authVerifier() {
|
|
133842
134255
|
return authVerifier(this.idResolver, { aud: this.cfg.service.did });
|
|
133843
134256
|
}
|
|
@@ -133893,7 +134306,10 @@ var envToCfg = (env) => {
|
|
|
133893
134306
|
(0, import_node_assert.default)(env.dbPostgresUrl);
|
|
133894
134307
|
const dbCfg = {
|
|
133895
134308
|
postgresUrl: env.dbPostgresUrl,
|
|
133896
|
-
postgresSchema: env.dbPostgresSchema
|
|
134309
|
+
postgresSchema: env.dbPostgresSchema,
|
|
134310
|
+
poolSize: env.dbPoolSize,
|
|
134311
|
+
poolMaxUses: env.dbPoolMaxUses,
|
|
134312
|
+
poolIdleTimeoutMs: env.dbPoolIdleTimeoutMs
|
|
133897
134313
|
};
|
|
133898
134314
|
(0, import_node_assert.default)(env.appviewUrl);
|
|
133899
134315
|
(0, import_node_assert.default)(env.appviewDid);
|
|
@@ -133934,6 +134350,9 @@ var readEnv = () => {
|
|
|
133934
134350
|
pdsDid: envStr("OZONE_PDS_DID"),
|
|
133935
134351
|
dbPostgresUrl: envStr("OZONE_DB_POSTGRES_URL"),
|
|
133936
134352
|
dbPostgresSchema: envStr("OZONE_DB_POSTGRES_SCHEMA"),
|
|
134353
|
+
dbPoolSize: envInt("OZONE_DB_POOL_SIZE"),
|
|
134354
|
+
dbPoolMaxUses: envInt("OZONE_DB_POOL_MAX_USES"),
|
|
134355
|
+
dbPoolIdleTimeoutMs: envInt("OZONE_DB_POOL_IDLE_TIMEOUT_MS"),
|
|
133937
134356
|
didPlcUrl: envStr("OZONE_DID_PLC_URL"),
|
|
133938
134357
|
adminPassword: envStr("OZONE_ADMIN_PASSWORD"),
|
|
133939
134358
|
moderatorPassword: envStr("OZONE_MODERATOR_PASSWORD"),
|
|
@@ -133998,11 +134417,12 @@ var OzoneService = class {
|
|
|
133998
134417
|
waitingCount: backgroundQueue.queue.size
|
|
133999
134418
|
}, "background queue stats");
|
|
134000
134419
|
}, 1e4);
|
|
134420
|
+
await this.ctx.sequencer.start();
|
|
134001
134421
|
const server = this.app.listen(this.ctx.cfg.service.port);
|
|
134002
134422
|
this.server = server;
|
|
134003
134423
|
server.keepAliveTimeout = 9e4;
|
|
134004
134424
|
this.terminator = (0, import_http_terminator.createHttpTerminator)({ server });
|
|
134005
|
-
await
|
|
134425
|
+
await import_events2.default.once(server, "listening");
|
|
134006
134426
|
const { port } = server.address();
|
|
134007
134427
|
this.ctx.assignPort(port);
|
|
134008
134428
|
return server;
|
|
@@ -134010,6 +134430,7 @@ var OzoneService = class {
|
|
|
134010
134430
|
async destroy() {
|
|
134011
134431
|
await this.terminator?.terminate();
|
|
134012
134432
|
await this.ctx.backgroundQueue.destroy();
|
|
134433
|
+
await this.ctx.sequencer.destroy();
|
|
134013
134434
|
await this.ctx.db.close();
|
|
134014
134435
|
clearInterval(this.dbStatsInterval);
|
|
134015
134436
|
}
|