@atproto/pds 0.4.119 → 0.4.121

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.
Files changed (46) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/dist/actor-store/repo/sql-repo-reader.d.ts +3 -2
  3. package/dist/actor-store/repo/sql-repo-reader.d.ts.map +1 -1
  4. package/dist/actor-store/repo/sql-repo-reader.js +24 -27
  5. package/dist/actor-store/repo/sql-repo-reader.js.map +1 -1
  6. package/dist/api/com/atproto/repo/importRepo.d.ts.map +1 -1
  7. package/dist/api/com/atproto/repo/importRepo.js +6 -2
  8. package/dist/api/com/atproto/repo/importRepo.js.map +1 -1
  9. package/dist/api/com/atproto/sync/getRepo.d.ts.map +1 -1
  10. package/dist/api/com/atproto/sync/getRepo.js +3 -1
  11. package/dist/api/com/atproto/sync/getRepo.js.map +1 -1
  12. package/dist/lexicon/index.d.ts +8 -0
  13. package/dist/lexicon/index.d.ts.map +1 -1
  14. package/dist/lexicon/index.js +16 -0
  15. package/dist/lexicon/index.js.map +1 -1
  16. package/dist/lexicon/lexicons.d.ts +332 -0
  17. package/dist/lexicon/lexicons.d.ts.map +1 -1
  18. package/dist/lexicon/lexicons.js +170 -0
  19. package/dist/lexicon/lexicons.js.map +1 -1
  20. package/dist/lexicon/types/app/bsky/unspecced/getSuggestedFeeds.d.ts +36 -0
  21. package/dist/lexicon/types/app/bsky/unspecced/getSuggestedFeeds.d.ts.map +1 -0
  22. package/dist/lexicon/types/app/bsky/unspecced/getSuggestedFeeds.js +7 -0
  23. package/dist/lexicon/types/app/bsky/unspecced/getSuggestedFeeds.js.map +1 -0
  24. package/dist/lexicon/types/app/bsky/unspecced/getSuggestedFeedsSkeleton.d.ts +37 -0
  25. package/dist/lexicon/types/app/bsky/unspecced/getSuggestedFeedsSkeleton.d.ts.map +1 -0
  26. package/dist/lexicon/types/app/bsky/unspecced/getSuggestedFeedsSkeleton.js +7 -0
  27. package/dist/lexicon/types/app/bsky/unspecced/getSuggestedFeedsSkeleton.js.map +1 -0
  28. package/dist/lexicon/types/app/bsky/unspecced/getSuggestedUsers.d.ts +38 -0
  29. package/dist/lexicon/types/app/bsky/unspecced/getSuggestedUsers.d.ts.map +1 -0
  30. package/dist/lexicon/types/app/bsky/unspecced/getSuggestedUsers.js +7 -0
  31. package/dist/lexicon/types/app/bsky/unspecced/getSuggestedUsers.js.map +1 -0
  32. package/dist/lexicon/types/app/bsky/unspecced/getSuggestedUsersSkeleton.d.ts +39 -0
  33. package/dist/lexicon/types/app/bsky/unspecced/getSuggestedUsersSkeleton.d.ts.map +1 -0
  34. package/dist/lexicon/types/app/bsky/unspecced/getSuggestedUsersSkeleton.js +7 -0
  35. package/dist/lexicon/types/app/bsky/unspecced/getSuggestedUsersSkeleton.js.map +1 -0
  36. package/package.json +14 -14
  37. package/src/actor-store/repo/sql-repo-reader.ts +23 -26
  38. package/src/api/com/atproto/repo/importRepo.ts +7 -2
  39. package/src/api/com/atproto/sync/getRepo.ts +3 -1
  40. package/src/lexicon/index.ts +48 -0
  41. package/src/lexicon/lexicons.ts +176 -0
  42. package/src/lexicon/types/app/bsky/unspecced/getSuggestedFeeds.ts +54 -0
  43. package/src/lexicon/types/app/bsky/unspecced/getSuggestedFeedsSkeleton.ts +55 -0
  44. package/src/lexicon/types/app/bsky/unspecced/getSuggestedUsers.ts +56 -0
  45. package/src/lexicon/types/app/bsky/unspecced/getSuggestedUsersSkeleton.ts +57 -0
  46. package/tsconfig.build.tsbuildinfo +1 -1
@@ -0,0 +1,36 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import express from 'express';
5
+ import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server';
6
+ import type * as AppBskyFeedDefs from '../feed/defs.js';
7
+ export interface QueryParams {
8
+ limit: number;
9
+ }
10
+ export type InputSchema = undefined;
11
+ export interface OutputSchema {
12
+ feeds: AppBskyFeedDefs.GeneratorView[];
13
+ }
14
+ export type HandlerInput = undefined;
15
+ export interface HandlerSuccess {
16
+ encoding: 'application/json';
17
+ body: OutputSchema;
18
+ headers?: {
19
+ [key: string]: string;
20
+ };
21
+ }
22
+ export interface HandlerError {
23
+ status: number;
24
+ message?: string;
25
+ }
26
+ export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough;
27
+ export type HandlerReqCtx<HA extends HandlerAuth = never> = {
28
+ auth: HA;
29
+ params: QueryParams;
30
+ input: HandlerInput;
31
+ req: express.Request;
32
+ res: express.Response;
33
+ resetRouteRateLimits: () => Promise<void>;
34
+ };
35
+ export type Handler<HA extends HandlerAuth = never> = (ctx: HandlerReqCtx<HA>) => Promise<HandlerOutput> | HandlerOutput;
36
+ //# sourceMappingURL=getSuggestedFeeds.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getSuggestedFeeds.d.ts","sourceRoot":"","sources":["../../../../../../src/lexicon/types/app/bsky/unspecced/getSuggestedFeeds.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,OAAO,MAAM,SAAS,CAAA;AAS7B,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AACtE,OAAO,KAAK,KAAK,eAAe,MAAM,iBAAiB,CAAA;AAMvD,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAA;CACd;AAED,MAAM,MAAM,WAAW,GAAG,SAAS,CAAA;AAEnC,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,eAAe,CAAC,aAAa,EAAE,CAAA;CACvC;AAED,MAAM,MAAM,YAAY,GAAG,SAAS,CAAA;AAEpC,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,kBAAkB,CAAA;IAC5B,IAAI,EAAE,YAAY,CAAA;IAClB,OAAO,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAA;CACpC;AAED,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAED,MAAM,MAAM,aAAa,GAAG,YAAY,GAAG,cAAc,GAAG,kBAAkB,CAAA;AAC9E,MAAM,MAAM,aAAa,CAAC,EAAE,SAAS,WAAW,GAAG,KAAK,IAAI;IAC1D,IAAI,EAAE,EAAE,CAAA;IACR,MAAM,EAAE,WAAW,CAAA;IACnB,KAAK,EAAE,YAAY,CAAA;IACnB,GAAG,EAAE,OAAO,CAAC,OAAO,CAAA;IACpB,GAAG,EAAE,OAAO,CAAC,QAAQ,CAAA;IACrB,oBAAoB,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;CAC1C,CAAA;AACD,MAAM,MAAM,OAAO,CAAC,EAAE,SAAS,WAAW,GAAG,KAAK,IAAI,CACpD,GAAG,EAAE,aAAa,CAAC,EAAE,CAAC,KACnB,OAAO,CAAC,aAAa,CAAC,GAAG,aAAa,CAAA"}
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const lexicons_1 = require("../../../../lexicons");
4
+ const util_1 = require("../../../../util");
5
+ const is$typed = util_1.is$typed, validate = lexicons_1.validate;
6
+ const id = 'app.bsky.unspecced.getSuggestedFeeds';
7
+ //# sourceMappingURL=getSuggestedFeeds.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getSuggestedFeeds.js","sourceRoot":"","sources":["../../../../../../src/lexicon/types/app/bsky/unspecced/getSuggestedFeeds.ts"],"names":[],"mappings":";;AAMA,mDAA4D;AAC5D,2CAIyB;AAIzB,MAAM,QAAQ,GAAG,eAAS,EACxB,QAAQ,GAAG,mBAAS,CAAA;AACtB,MAAM,EAAE,GAAG,sCAAsC,CAAA"}
@@ -0,0 +1,37 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import express from 'express';
5
+ import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server';
6
+ export interface QueryParams {
7
+ /** DID of the account making the request (not included for public/unauthenticated queries). */
8
+ viewer?: string;
9
+ limit: number;
10
+ }
11
+ export type InputSchema = undefined;
12
+ export interface OutputSchema {
13
+ feeds: string[];
14
+ }
15
+ export type HandlerInput = undefined;
16
+ export interface HandlerSuccess {
17
+ encoding: 'application/json';
18
+ body: OutputSchema;
19
+ headers?: {
20
+ [key: string]: string;
21
+ };
22
+ }
23
+ export interface HandlerError {
24
+ status: number;
25
+ message?: string;
26
+ }
27
+ export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough;
28
+ export type HandlerReqCtx<HA extends HandlerAuth = never> = {
29
+ auth: HA;
30
+ params: QueryParams;
31
+ input: HandlerInput;
32
+ req: express.Request;
33
+ res: express.Response;
34
+ resetRouteRateLimits: () => Promise<void>;
35
+ };
36
+ export type Handler<HA extends HandlerAuth = never> = (ctx: HandlerReqCtx<HA>) => Promise<HandlerOutput> | HandlerOutput;
37
+ //# sourceMappingURL=getSuggestedFeedsSkeleton.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getSuggestedFeedsSkeleton.d.ts","sourceRoot":"","sources":["../../../../../../src/lexicon/types/app/bsky/unspecced/getSuggestedFeedsSkeleton.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,OAAO,MAAM,SAAS,CAAA;AAS7B,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AAMtE,MAAM,WAAW,WAAW;IAC1B,+FAA+F;IAC/F,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,MAAM,CAAA;CACd;AAED,MAAM,MAAM,WAAW,GAAG,SAAS,CAAA;AAEnC,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,EAAE,CAAA;CAChB;AAED,MAAM,MAAM,YAAY,GAAG,SAAS,CAAA;AAEpC,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,kBAAkB,CAAA;IAC5B,IAAI,EAAE,YAAY,CAAA;IAClB,OAAO,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAA;CACpC;AAED,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAED,MAAM,MAAM,aAAa,GAAG,YAAY,GAAG,cAAc,GAAG,kBAAkB,CAAA;AAC9E,MAAM,MAAM,aAAa,CAAC,EAAE,SAAS,WAAW,GAAG,KAAK,IAAI;IAC1D,IAAI,EAAE,EAAE,CAAA;IACR,MAAM,EAAE,WAAW,CAAA;IACnB,KAAK,EAAE,YAAY,CAAA;IACnB,GAAG,EAAE,OAAO,CAAC,OAAO,CAAA;IACpB,GAAG,EAAE,OAAO,CAAC,QAAQ,CAAA;IACrB,oBAAoB,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;CAC1C,CAAA;AACD,MAAM,MAAM,OAAO,CAAC,EAAE,SAAS,WAAW,GAAG,KAAK,IAAI,CACpD,GAAG,EAAE,aAAa,CAAC,EAAE,CAAC,KACnB,OAAO,CAAC,aAAa,CAAC,GAAG,aAAa,CAAA"}
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const lexicons_1 = require("../../../../lexicons");
4
+ const util_1 = require("../../../../util");
5
+ const is$typed = util_1.is$typed, validate = lexicons_1.validate;
6
+ const id = 'app.bsky.unspecced.getSuggestedFeedsSkeleton';
7
+ //# sourceMappingURL=getSuggestedFeedsSkeleton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getSuggestedFeedsSkeleton.js","sourceRoot":"","sources":["../../../../../../src/lexicon/types/app/bsky/unspecced/getSuggestedFeedsSkeleton.ts"],"names":[],"mappings":";;AAMA,mDAA4D;AAC5D,2CAIyB;AAGzB,MAAM,QAAQ,GAAG,eAAS,EACxB,QAAQ,GAAG,mBAAS,CAAA;AACtB,MAAM,EAAE,GAAG,8CAA8C,CAAA"}
@@ -0,0 +1,38 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import express from 'express';
5
+ import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server';
6
+ import type * as AppBskyActorDefs from '../actor/defs.js';
7
+ export interface QueryParams {
8
+ /** Category of users to get suggestions for. */
9
+ category?: string;
10
+ limit: number;
11
+ }
12
+ export type InputSchema = undefined;
13
+ export interface OutputSchema {
14
+ actors: AppBskyActorDefs.ProfileViewBasic[];
15
+ }
16
+ export type HandlerInput = undefined;
17
+ export interface HandlerSuccess {
18
+ encoding: 'application/json';
19
+ body: OutputSchema;
20
+ headers?: {
21
+ [key: string]: string;
22
+ };
23
+ }
24
+ export interface HandlerError {
25
+ status: number;
26
+ message?: string;
27
+ }
28
+ export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough;
29
+ export type HandlerReqCtx<HA extends HandlerAuth = never> = {
30
+ auth: HA;
31
+ params: QueryParams;
32
+ input: HandlerInput;
33
+ req: express.Request;
34
+ res: express.Response;
35
+ resetRouteRateLimits: () => Promise<void>;
36
+ };
37
+ export type Handler<HA extends HandlerAuth = never> = (ctx: HandlerReqCtx<HA>) => Promise<HandlerOutput> | HandlerOutput;
38
+ //# sourceMappingURL=getSuggestedUsers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getSuggestedUsers.d.ts","sourceRoot":"","sources":["../../../../../../src/lexicon/types/app/bsky/unspecced/getSuggestedUsers.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,OAAO,MAAM,SAAS,CAAA;AAS7B,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AACtE,OAAO,KAAK,KAAK,gBAAgB,MAAM,kBAAkB,CAAA;AAMzD,MAAM,WAAW,WAAW;IAC1B,gDAAgD;IAChD,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,KAAK,EAAE,MAAM,CAAA;CACd;AAED,MAAM,MAAM,WAAW,GAAG,SAAS,CAAA;AAEnC,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,gBAAgB,CAAC,gBAAgB,EAAE,CAAA;CAC5C;AAED,MAAM,MAAM,YAAY,GAAG,SAAS,CAAA;AAEpC,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,kBAAkB,CAAA;IAC5B,IAAI,EAAE,YAAY,CAAA;IAClB,OAAO,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAA;CACpC;AAED,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAED,MAAM,MAAM,aAAa,GAAG,YAAY,GAAG,cAAc,GAAG,kBAAkB,CAAA;AAC9E,MAAM,MAAM,aAAa,CAAC,EAAE,SAAS,WAAW,GAAG,KAAK,IAAI;IAC1D,IAAI,EAAE,EAAE,CAAA;IACR,MAAM,EAAE,WAAW,CAAA;IACnB,KAAK,EAAE,YAAY,CAAA;IACnB,GAAG,EAAE,OAAO,CAAC,OAAO,CAAA;IACpB,GAAG,EAAE,OAAO,CAAC,QAAQ,CAAA;IACrB,oBAAoB,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;CAC1C,CAAA;AACD,MAAM,MAAM,OAAO,CAAC,EAAE,SAAS,WAAW,GAAG,KAAK,IAAI,CACpD,GAAG,EAAE,aAAa,CAAC,EAAE,CAAC,KACnB,OAAO,CAAC,aAAa,CAAC,GAAG,aAAa,CAAA"}
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const lexicons_1 = require("../../../../lexicons");
4
+ const util_1 = require("../../../../util");
5
+ const is$typed = util_1.is$typed, validate = lexicons_1.validate;
6
+ const id = 'app.bsky.unspecced.getSuggestedUsers';
7
+ //# sourceMappingURL=getSuggestedUsers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getSuggestedUsers.js","sourceRoot":"","sources":["../../../../../../src/lexicon/types/app/bsky/unspecced/getSuggestedUsers.ts"],"names":[],"mappings":";;AAMA,mDAA4D;AAC5D,2CAIyB;AAIzB,MAAM,QAAQ,GAAG,eAAS,EACxB,QAAQ,GAAG,mBAAS,CAAA;AACtB,MAAM,EAAE,GAAG,sCAAsC,CAAA"}
@@ -0,0 +1,39 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import express from 'express';
5
+ import { HandlerAuth, HandlerPipeThrough } from '@atproto/xrpc-server';
6
+ export interface QueryParams {
7
+ /** DID of the account making the request (not included for public/unauthenticated queries). */
8
+ viewer?: string;
9
+ /** Category of users to get suggestions for. */
10
+ category?: string;
11
+ limit: number;
12
+ }
13
+ export type InputSchema = undefined;
14
+ export interface OutputSchema {
15
+ dids: string[];
16
+ }
17
+ export type HandlerInput = undefined;
18
+ export interface HandlerSuccess {
19
+ encoding: 'application/json';
20
+ body: OutputSchema;
21
+ headers?: {
22
+ [key: string]: string;
23
+ };
24
+ }
25
+ export interface HandlerError {
26
+ status: number;
27
+ message?: string;
28
+ }
29
+ export type HandlerOutput = HandlerError | HandlerSuccess | HandlerPipeThrough;
30
+ export type HandlerReqCtx<HA extends HandlerAuth = never> = {
31
+ auth: HA;
32
+ params: QueryParams;
33
+ input: HandlerInput;
34
+ req: express.Request;
35
+ res: express.Response;
36
+ resetRouteRateLimits: () => Promise<void>;
37
+ };
38
+ export type Handler<HA extends HandlerAuth = never> = (ctx: HandlerReqCtx<HA>) => Promise<HandlerOutput> | HandlerOutput;
39
+ //# sourceMappingURL=getSuggestedUsersSkeleton.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getSuggestedUsersSkeleton.d.ts","sourceRoot":"","sources":["../../../../../../src/lexicon/types/app/bsky/unspecced/getSuggestedUsersSkeleton.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,OAAO,MAAM,SAAS,CAAA;AAS7B,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AAMtE,MAAM,WAAW,WAAW;IAC1B,+FAA+F;IAC/F,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,gDAAgD;IAChD,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,KAAK,EAAE,MAAM,CAAA;CACd;AAED,MAAM,MAAM,WAAW,GAAG,SAAS,CAAA;AAEnC,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,EAAE,CAAA;CACf;AAED,MAAM,MAAM,YAAY,GAAG,SAAS,CAAA;AAEpC,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,kBAAkB,CAAA;IAC5B,IAAI,EAAE,YAAY,CAAA;IAClB,OAAO,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAA;CACpC;AAED,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAED,MAAM,MAAM,aAAa,GAAG,YAAY,GAAG,cAAc,GAAG,kBAAkB,CAAA;AAC9E,MAAM,MAAM,aAAa,CAAC,EAAE,SAAS,WAAW,GAAG,KAAK,IAAI;IAC1D,IAAI,EAAE,EAAE,CAAA;IACR,MAAM,EAAE,WAAW,CAAA;IACnB,KAAK,EAAE,YAAY,CAAA;IACnB,GAAG,EAAE,OAAO,CAAC,OAAO,CAAA;IACpB,GAAG,EAAE,OAAO,CAAC,QAAQ,CAAA;IACrB,oBAAoB,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;CAC1C,CAAA;AACD,MAAM,MAAM,OAAO,CAAC,EAAE,SAAS,WAAW,GAAG,KAAK,IAAI,CACpD,GAAG,EAAE,aAAa,CAAC,EAAE,CAAC,KACnB,OAAO,CAAC,aAAa,CAAC,GAAG,aAAa,CAAA"}
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const lexicons_1 = require("../../../../lexicons");
4
+ const util_1 = require("../../../../util");
5
+ const is$typed = util_1.is$typed, validate = lexicons_1.validate;
6
+ const id = 'app.bsky.unspecced.getSuggestedUsersSkeleton';
7
+ //# sourceMappingURL=getSuggestedUsersSkeleton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getSuggestedUsersSkeleton.js","sourceRoot":"","sources":["../../../../../../src/lexicon/types/app/bsky/unspecced/getSuggestedUsersSkeleton.ts"],"names":[],"mappings":";;AAMA,mDAA4D;AAC5D,2CAIyB;AAGzB,MAAM,QAAQ,GAAG,eAAS,EACxB,QAAQ,GAAG,mBAAS,CAAA;AACtB,MAAM,EAAE,GAAG,8CAA8C,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atproto/pds",
3
- "version": "0.4.119",
3
+ "version": "0.4.121",
4
4
  "license": "MIT",
5
5
  "description": "Reference implementation of atproto Personal Data Server (PDS)",
6
6
  "keywords": [
@@ -49,18 +49,18 @@
49
49
  "undici": "^6.19.8",
50
50
  "zod": "^3.23.8",
51
51
  "@atproto-labs/fetch-node": "0.1.8",
52
- "@atproto-labs/xrpc-utils": "0.0.10",
53
- "@atproto/api": "^0.14.18",
54
- "@atproto/aws": "^0.2.19",
55
- "@atproto/common": "^0.4.9",
52
+ "@atproto-labs/xrpc-utils": "0.0.11",
53
+ "@atproto/api": "^0.14.20",
54
+ "@atproto/aws": "^0.2.20",
55
+ "@atproto/common": "^0.4.10",
56
56
  "@atproto/crypto": "^0.4.4",
57
- "@atproto/identity": "^0.4.6",
58
- "@atproto/lexicon": "^0.4.9",
59
- "@atproto/oauth-provider": "^0.6.5",
60
- "@atproto/repo": "^0.7.3",
57
+ "@atproto/identity": "^0.4.7",
58
+ "@atproto/lexicon": "^0.4.10",
59
+ "@atproto/oauth-provider": "^0.6.6",
60
+ "@atproto/repo": "^0.8.0",
61
61
  "@atproto/syntax": "^0.4.0",
62
- "@atproto/xrpc-server": "^0.7.14",
63
- "@atproto/xrpc": "^0.6.11"
62
+ "@atproto/xrpc": "^0.6.12",
63
+ "@atproto/xrpc-server": "^0.7.15"
64
64
  },
65
65
  "devDependencies": {
66
66
  "@atproto/pds-entryway": "npm:@atproto/pds@0.3.0-entryway.3",
@@ -78,9 +78,9 @@
78
78
  "ts-node": "^10.8.2",
79
79
  "typescript": "^5.6.3",
80
80
  "ws": "^8.12.0",
81
- "@atproto/api": "^0.14.18",
82
- "@atproto/bsky": "^0.0.135",
83
- "@atproto/lex-cli": "^0.7.1",
81
+ "@atproto/api": "^0.14.20",
82
+ "@atproto/bsky": "^0.0.137",
83
+ "@atproto/lex-cli": "^0.7.2",
84
84
  "@atproto/oauth-client-browser-example": "0.0.2"
85
85
  },
86
86
  "scripts": {
@@ -1,8 +1,9 @@
1
1
  import { sql } from 'kysely'
2
2
  import { CID } from 'multiformats/cid'
3
- import { chunkArray, wait } from '@atproto/common'
3
+ import { chunkArray } from '@atproto/common'
4
4
  import {
5
5
  BlockMap,
6
+ CarBlock,
6
7
  CidSet,
7
8
  ReadableBlockstore,
8
9
  writeCarStream,
@@ -82,34 +83,30 @@ export class SqlRepoReader extends ReadableBlockstore {
82
83
  if (!root) {
83
84
  throw new RepoRootNotFoundError()
84
85
  }
85
- return writeCarStream(root, async (car) => {
86
- let cursor: RevCursor | undefined = undefined
87
- const writeRows = async (
88
- rows: { cid: string; content: Uint8Array }[],
89
- ) => {
90
- for (const row of rows) {
91
- await car.put({
92
- cid: CID.parse(row.cid),
93
- bytes: row.content,
94
- })
86
+ return writeCarStream(root, this.iterateCarBlocks(since))
87
+ }
88
+
89
+ async *iterateCarBlocks(since?: string): AsyncIterable<CarBlock> {
90
+ let cursor: RevCursor | undefined = undefined
91
+ // allow us to write to car while fetching the next page
92
+ do {
93
+ const res = await this.getBlockRange(since, cursor)
94
+ for (const row of res) {
95
+ yield {
96
+ cid: CID.parse(row.cid),
97
+ bytes: row.content,
95
98
  }
96
99
  }
97
- // allow us to write to car while fetching the next page
98
- do {
99
- const res = await this.getBlockRange(since, cursor)
100
- await writeRows(res)
101
- const lastRow = res.at(-1)
102
- if (lastRow && lastRow.repoRev) {
103
- await wait(100) // @NOTE temporary measure to prevent over-writing to buffer. can remove once we refactor car writer to give back pressure on streams
104
- cursor = {
105
- cid: CID.parse(lastRow.cid),
106
- rev: lastRow.repoRev,
107
- }
108
- } else {
109
- cursor = undefined
100
+ const lastRow = res.at(-1)
101
+ if (lastRow && lastRow.repoRev) {
102
+ cursor = {
103
+ cid: CID.parse(lastRow.cid),
104
+ rev: lastRow.repoRev,
110
105
  }
111
- } while (cursor)
112
- })
106
+ } else {
107
+ cursor = undefined
108
+ }
109
+ } while (cursor)
113
110
  }
114
111
 
115
112
  async getBlockRange(since?: string, cursor?: RevCursor) {
@@ -3,6 +3,7 @@ import PQueue from 'p-queue'
3
3
  import { TID } from '@atproto/common'
4
4
  import { BlobRef, LexValue, RepoRecord } from '@atproto/lexicon'
5
5
  import {
6
+ BlockMap,
6
7
  WriteOpAction,
7
8
  getAndParseRecord,
8
9
  readCarStream,
@@ -43,10 +44,14 @@ const importRepo = async (
43
44
  if (roots.length !== 1) {
44
45
  throw new InvalidRequestError('expected one root')
45
46
  }
47
+ const blockMap = new BlockMap()
48
+ for await (const block of blocks) {
49
+ blockMap.set(block.cid, block.bytes)
50
+ }
46
51
  const currRepo = await actorStore.repo.maybeLoadRepo()
47
52
  const diff = await verifyDiff(
48
53
  currRepo,
49
- blocks,
54
+ blockMap,
50
55
  roots[0],
51
56
  undefined,
52
57
  undefined,
@@ -66,7 +71,7 @@ const importRepo = async (
66
71
  } else {
67
72
  let parsedRecord: RepoRecord
68
73
  try {
69
- const parsed = await getAndParseRecord(blocks, write.cid)
74
+ const parsed = await getAndParseRecord(blockMap, write.cid)
70
75
  parsedRecord = parsed.record
71
76
  } catch {
72
77
  throw new InvalidRequestError(
@@ -1,4 +1,5 @@
1
1
  import stream from 'node:stream'
2
+ import { byteIterableToStream } from '@atproto/common'
2
3
  import { InvalidRequestError } from '@atproto/xrpc-server'
3
4
  import {
4
5
  RepoRootNotFoundError,
@@ -41,7 +42,8 @@ export const getCarStream = async (
41
42
  let carStream: stream.Readable
42
43
  try {
43
44
  const storage = new SqlRepoReader(actorDb)
44
- carStream = await storage.getCarStream(since)
45
+ const carIter = await storage.getCarStream(since)
46
+ carStream = byteIterableToStream(carIter)
45
47
  } catch (err) {
46
48
  await actorDb.close()
47
49
  if (err instanceof RepoRootNotFoundError) {
@@ -143,8 +143,12 @@ import * as AppBskyNotificationRegisterPush from './types/app/bsky/notification/
143
143
  import * as AppBskyNotificationUpdateSeen from './types/app/bsky/notification/updateSeen.js'
144
144
  import * as AppBskyUnspeccedGetConfig from './types/app/bsky/unspecced/getConfig.js'
145
145
  import * as AppBskyUnspeccedGetPopularFeedGenerators from './types/app/bsky/unspecced/getPopularFeedGenerators.js'
146
+ import * as AppBskyUnspeccedGetSuggestedFeeds from './types/app/bsky/unspecced/getSuggestedFeeds.js'
147
+ import * as AppBskyUnspeccedGetSuggestedFeedsSkeleton from './types/app/bsky/unspecced/getSuggestedFeedsSkeleton.js'
146
148
  import * as AppBskyUnspeccedGetSuggestedStarterPacks from './types/app/bsky/unspecced/getSuggestedStarterPacks.js'
147
149
  import * as AppBskyUnspeccedGetSuggestedStarterPacksSkeleton from './types/app/bsky/unspecced/getSuggestedStarterPacksSkeleton.js'
150
+ import * as AppBskyUnspeccedGetSuggestedUsers from './types/app/bsky/unspecced/getSuggestedUsers.js'
151
+ import * as AppBskyUnspeccedGetSuggestedUsersSkeleton from './types/app/bsky/unspecced/getSuggestedUsersSkeleton.js'
148
152
  import * as AppBskyUnspeccedGetSuggestionsSkeleton from './types/app/bsky/unspecced/getSuggestionsSkeleton.js'
149
153
  import * as AppBskyUnspeccedGetTaggedSuggestions from './types/app/bsky/unspecced/getTaggedSuggestions.js'
150
154
  import * as AppBskyUnspeccedGetTrendingTopics from './types/app/bsky/unspecced/getTrendingTopics.js'
@@ -1958,6 +1962,28 @@ export class AppBskyUnspeccedNS {
1958
1962
  return this._server.xrpc.method(nsid, cfg)
1959
1963
  }
1960
1964
 
1965
+ getSuggestedFeeds<AV extends AuthVerifier>(
1966
+ cfg: ConfigOf<
1967
+ AV,
1968
+ AppBskyUnspeccedGetSuggestedFeeds.Handler<ExtractAuth<AV>>,
1969
+ AppBskyUnspeccedGetSuggestedFeeds.HandlerReqCtx<ExtractAuth<AV>>
1970
+ >,
1971
+ ) {
1972
+ const nsid = 'app.bsky.unspecced.getSuggestedFeeds' // @ts-ignore
1973
+ return this._server.xrpc.method(nsid, cfg)
1974
+ }
1975
+
1976
+ getSuggestedFeedsSkeleton<AV extends AuthVerifier>(
1977
+ cfg: ConfigOf<
1978
+ AV,
1979
+ AppBskyUnspeccedGetSuggestedFeedsSkeleton.Handler<ExtractAuth<AV>>,
1980
+ AppBskyUnspeccedGetSuggestedFeedsSkeleton.HandlerReqCtx<ExtractAuth<AV>>
1981
+ >,
1982
+ ) {
1983
+ const nsid = 'app.bsky.unspecced.getSuggestedFeedsSkeleton' // @ts-ignore
1984
+ return this._server.xrpc.method(nsid, cfg)
1985
+ }
1986
+
1961
1987
  getSuggestedStarterPacks<AV extends AuthVerifier>(
1962
1988
  cfg: ConfigOf<
1963
1989
  AV,
@@ -1982,6 +2008,28 @@ export class AppBskyUnspeccedNS {
1982
2008
  return this._server.xrpc.method(nsid, cfg)
1983
2009
  }
1984
2010
 
2011
+ getSuggestedUsers<AV extends AuthVerifier>(
2012
+ cfg: ConfigOf<
2013
+ AV,
2014
+ AppBskyUnspeccedGetSuggestedUsers.Handler<ExtractAuth<AV>>,
2015
+ AppBskyUnspeccedGetSuggestedUsers.HandlerReqCtx<ExtractAuth<AV>>
2016
+ >,
2017
+ ) {
2018
+ const nsid = 'app.bsky.unspecced.getSuggestedUsers' // @ts-ignore
2019
+ return this._server.xrpc.method(nsid, cfg)
2020
+ }
2021
+
2022
+ getSuggestedUsersSkeleton<AV extends AuthVerifier>(
2023
+ cfg: ConfigOf<
2024
+ AV,
2025
+ AppBskyUnspeccedGetSuggestedUsersSkeleton.Handler<ExtractAuth<AV>>,
2026
+ AppBskyUnspeccedGetSuggestedUsersSkeleton.HandlerReqCtx<ExtractAuth<AV>>
2027
+ >,
2028
+ ) {
2029
+ const nsid = 'app.bsky.unspecced.getSuggestedUsersSkeleton' // @ts-ignore
2030
+ return this._server.xrpc.method(nsid, cfg)
2031
+ }
2032
+
1985
2033
  getSuggestionsSkeleton<AV extends AuthVerifier>(
1986
2034
  cfg: ConfigOf<
1987
2035
  AV,
@@ -9884,6 +9884,87 @@ export const schemaDict = {
9884
9884
  },
9885
9885
  },
9886
9886
  },
9887
+ AppBskyUnspeccedGetSuggestedFeeds: {
9888
+ lexicon: 1,
9889
+ id: 'app.bsky.unspecced.getSuggestedFeeds',
9890
+ defs: {
9891
+ main: {
9892
+ type: 'query',
9893
+ description: 'Get a list of suggested feeds',
9894
+ parameters: {
9895
+ type: 'params',
9896
+ properties: {
9897
+ limit: {
9898
+ type: 'integer',
9899
+ minimum: 1,
9900
+ maximum: 25,
9901
+ default: 10,
9902
+ },
9903
+ },
9904
+ },
9905
+ output: {
9906
+ encoding: 'application/json',
9907
+ schema: {
9908
+ type: 'object',
9909
+ required: ['feeds'],
9910
+ properties: {
9911
+ feeds: {
9912
+ type: 'array',
9913
+ items: {
9914
+ type: 'ref',
9915
+ ref: 'lex:app.bsky.feed.defs#generatorView',
9916
+ },
9917
+ },
9918
+ },
9919
+ },
9920
+ },
9921
+ },
9922
+ },
9923
+ },
9924
+ AppBskyUnspeccedGetSuggestedFeedsSkeleton: {
9925
+ lexicon: 1,
9926
+ id: 'app.bsky.unspecced.getSuggestedFeedsSkeleton',
9927
+ defs: {
9928
+ main: {
9929
+ type: 'query',
9930
+ description:
9931
+ 'Get a skeleton of suggested feeds. Intended to be called and hydrated by app.bsky.unspecced.getSuggestedFeeds',
9932
+ parameters: {
9933
+ type: 'params',
9934
+ properties: {
9935
+ viewer: {
9936
+ type: 'string',
9937
+ format: 'did',
9938
+ description:
9939
+ 'DID of the account making the request (not included for public/unauthenticated queries).',
9940
+ },
9941
+ limit: {
9942
+ type: 'integer',
9943
+ minimum: 1,
9944
+ maximum: 25,
9945
+ default: 10,
9946
+ },
9947
+ },
9948
+ },
9949
+ output: {
9950
+ encoding: 'application/json',
9951
+ schema: {
9952
+ type: 'object',
9953
+ required: ['feeds'],
9954
+ properties: {
9955
+ feeds: {
9956
+ type: 'array',
9957
+ items: {
9958
+ type: 'string',
9959
+ format: 'at-uri',
9960
+ },
9961
+ },
9962
+ },
9963
+ },
9964
+ },
9965
+ },
9966
+ },
9967
+ },
9887
9968
  AppBskyUnspeccedGetSuggestedStarterPacks: {
9888
9969
  lexicon: 1,
9889
9970
  id: 'app.bsky.unspecced.getSuggestedStarterPacks',
@@ -9965,6 +10046,95 @@ export const schemaDict = {
9965
10046
  },
9966
10047
  },
9967
10048
  },
10049
+ AppBskyUnspeccedGetSuggestedUsers: {
10050
+ lexicon: 1,
10051
+ id: 'app.bsky.unspecced.getSuggestedUsers',
10052
+ defs: {
10053
+ main: {
10054
+ type: 'query',
10055
+ description: 'Get a list of suggested users',
10056
+ parameters: {
10057
+ type: 'params',
10058
+ properties: {
10059
+ category: {
10060
+ type: 'string',
10061
+ description: 'Category of users to get suggestions for.',
10062
+ },
10063
+ limit: {
10064
+ type: 'integer',
10065
+ minimum: 1,
10066
+ maximum: 50,
10067
+ default: 25,
10068
+ },
10069
+ },
10070
+ },
10071
+ output: {
10072
+ encoding: 'application/json',
10073
+ schema: {
10074
+ type: 'object',
10075
+ required: ['actors'],
10076
+ properties: {
10077
+ actors: {
10078
+ type: 'array',
10079
+ items: {
10080
+ type: 'ref',
10081
+ ref: 'lex:app.bsky.actor.defs#profileViewBasic',
10082
+ },
10083
+ },
10084
+ },
10085
+ },
10086
+ },
10087
+ },
10088
+ },
10089
+ },
10090
+ AppBskyUnspeccedGetSuggestedUsersSkeleton: {
10091
+ lexicon: 1,
10092
+ id: 'app.bsky.unspecced.getSuggestedUsersSkeleton',
10093
+ defs: {
10094
+ main: {
10095
+ type: 'query',
10096
+ description:
10097
+ 'Get a skeleton of suggested users. Intended to be called and hydrated by app.bsky.unspecced.getSuggestedUsers',
10098
+ parameters: {
10099
+ type: 'params',
10100
+ properties: {
10101
+ viewer: {
10102
+ type: 'string',
10103
+ format: 'did',
10104
+ description:
10105
+ 'DID of the account making the request (not included for public/unauthenticated queries).',
10106
+ },
10107
+ category: {
10108
+ type: 'string',
10109
+ description: 'Category of users to get suggestions for.',
10110
+ },
10111
+ limit: {
10112
+ type: 'integer',
10113
+ minimum: 1,
10114
+ maximum: 50,
10115
+ default: 25,
10116
+ },
10117
+ },
10118
+ },
10119
+ output: {
10120
+ encoding: 'application/json',
10121
+ schema: {
10122
+ type: 'object',
10123
+ required: ['dids'],
10124
+ properties: {
10125
+ dids: {
10126
+ type: 'array',
10127
+ items: {
10128
+ type: 'string',
10129
+ format: 'did',
10130
+ },
10131
+ },
10132
+ },
10133
+ },
10134
+ },
10135
+ },
10136
+ },
10137
+ },
9968
10138
  AppBskyUnspeccedGetSuggestionsSkeleton: {
9969
10139
  lexicon: 1,
9970
10140
  id: 'app.bsky.unspecced.getSuggestionsSkeleton',
@@ -15247,10 +15417,16 @@ export const ids = {
15247
15417
  AppBskyUnspeccedGetConfig: 'app.bsky.unspecced.getConfig',
15248
15418
  AppBskyUnspeccedGetPopularFeedGenerators:
15249
15419
  'app.bsky.unspecced.getPopularFeedGenerators',
15420
+ AppBskyUnspeccedGetSuggestedFeeds: 'app.bsky.unspecced.getSuggestedFeeds',
15421
+ AppBskyUnspeccedGetSuggestedFeedsSkeleton:
15422
+ 'app.bsky.unspecced.getSuggestedFeedsSkeleton',
15250
15423
  AppBskyUnspeccedGetSuggestedStarterPacks:
15251
15424
  'app.bsky.unspecced.getSuggestedStarterPacks',
15252
15425
  AppBskyUnspeccedGetSuggestedStarterPacksSkeleton:
15253
15426
  'app.bsky.unspecced.getSuggestedStarterPacksSkeleton',
15427
+ AppBskyUnspeccedGetSuggestedUsers: 'app.bsky.unspecced.getSuggestedUsers',
15428
+ AppBskyUnspeccedGetSuggestedUsersSkeleton:
15429
+ 'app.bsky.unspecced.getSuggestedUsersSkeleton',
15254
15430
  AppBskyUnspeccedGetSuggestionsSkeleton:
15255
15431
  'app.bsky.unspecced.getSuggestionsSkeleton',
15256
15432
  AppBskyUnspeccedGetTaggedSuggestions: