@atproto/bsky 0.0.240 → 0.0.241
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 +9 -0
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/index.js +3 -0
- package/dist/api/index.js.map +1 -1
- package/dist/api/internal/bsky/actor/getProfiles.d.ts +4 -0
- package/dist/api/internal/bsky/actor/getProfiles.d.ts.map +1 -0
- package/dist/api/internal/bsky/actor/getProfiles.js +39 -0
- package/dist/api/internal/bsky/actor/getProfiles.js.map +1 -0
- package/dist/hydration/hydrator.d.ts +3 -1
- package/dist/hydration/hydrator.d.ts.map +1 -1
- package/dist/hydration/hydrator.js +20 -18
- package/dist/hydration/hydrator.js.map +1 -1
- package/dist/lexicons/chat/bsky/convo/getUnreadCounts.d.ts +3 -0
- package/dist/lexicons/chat/bsky/convo/getUnreadCounts.d.ts.map +1 -0
- package/dist/lexicons/chat/bsky/convo/getUnreadCounts.defs.d.ts +19 -0
- package/dist/lexicons/chat/bsky/convo/getUnreadCounts.defs.d.ts.map +1 -0
- package/dist/lexicons/chat/bsky/convo/getUnreadCounts.defs.js +16 -0
- package/dist/lexicons/chat/bsky/convo/getUnreadCounts.defs.js.map +1 -0
- package/dist/lexicons/chat/bsky/convo/getUnreadCounts.js +6 -0
- package/dist/lexicons/chat/bsky/convo/getUnreadCounts.js.map +1 -0
- package/dist/lexicons/chat/bsky/convo.d.ts +1 -0
- package/dist/lexicons/chat/bsky/convo.d.ts.map +1 -1
- package/dist/lexicons/chat/bsky/convo.js +1 -0
- package/dist/lexicons/chat/bsky/convo.js.map +1 -1
- package/dist/lexicons/chat/bsky/group/createGroup.defs.d.ts +1 -1
- package/dist/lexicons/chat/bsky/group/createGroup.defs.js +1 -1
- package/dist/lexicons/chat/bsky/group/createGroup.defs.js.map +1 -1
- package/dist/lexicons/index.d.ts +1 -0
- package/dist/lexicons/index.d.ts.map +1 -1
- package/dist/lexicons/index.js +1 -0
- package/dist/lexicons/index.js.map +1 -1
- package/dist/lexicons/internal/bsky/actor/getProfiles.d.ts +3 -0
- package/dist/lexicons/internal/bsky/actor/getProfiles.d.ts.map +1 -0
- package/dist/lexicons/internal/bsky/actor/getProfiles.defs.d.ts +38 -0
- package/dist/lexicons/internal/bsky/actor/getProfiles.defs.d.ts.map +1 -0
- package/dist/lexicons/internal/bsky/actor/getProfiles.defs.js +26 -0
- package/dist/lexicons/internal/bsky/actor/getProfiles.defs.js.map +1 -0
- package/dist/lexicons/internal/bsky/actor/getProfiles.js +6 -0
- package/dist/lexicons/internal/bsky/actor/getProfiles.js.map +1 -0
- package/dist/lexicons/internal/bsky/actor.d.ts +2 -0
- package/dist/lexicons/internal/bsky/actor.d.ts.map +1 -0
- package/dist/lexicons/internal/bsky/actor.js +5 -0
- package/dist/lexicons/internal/bsky/actor.js.map +1 -0
- package/dist/lexicons/internal/bsky.d.ts +2 -0
- package/dist/lexicons/internal/bsky.d.ts.map +1 -0
- package/dist/lexicons/internal/bsky.js +5 -0
- package/dist/lexicons/internal/bsky.js.map +1 -0
- package/dist/lexicons/internal.d.ts +2 -0
- package/dist/lexicons/internal.d.ts.map +1 -0
- package/dist/lexicons/internal.js +5 -0
- package/dist/lexicons/internal.js.map +1 -0
- package/package.json +3 -3
- package/src/api/index.ts +3 -0
- package/src/api/internal/bsky/actor/getProfiles.ts +87 -0
- package/src/hydration/hydrator.ts +29 -28
- package/tests/views/internal-actor.test.ts +129 -0
- package/tsconfig.build.tsbuildinfo +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getUnreadCounts.js","sourceRoot":"","sources":["../../../../../src/lexicons/chat/bsky/convo/getUnreadCounts.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,2BAA2B,CAAA;AACzC,OAAO,EAAE,IAAI,IAAI,OAAO,EAAE,MAAM,2BAA2B,CAAA","sourcesContent":["/*\n * THIS FILE WAS GENERATED BY \"@atproto/lex\". DO NOT EDIT.\n */\n\nexport * from './getUnreadCounts.defs.js'\nexport { main as default } from './getUnreadCounts.defs.js'\n"]}
|
|
@@ -8,6 +8,7 @@ export * as getConvoForMembers from './convo/getConvoForMembers.js';
|
|
|
8
8
|
export * as getConvoMembers from './convo/getConvoMembers.js';
|
|
9
9
|
export * as getLog from './convo/getLog.js';
|
|
10
10
|
export * as getMessages from './convo/getMessages.js';
|
|
11
|
+
export * as getUnreadCounts from './convo/getUnreadCounts.js';
|
|
11
12
|
export * as leaveConvo from './convo/leaveConvo.js';
|
|
12
13
|
export * as listConvoRequests from './convo/listConvoRequests.js';
|
|
13
14
|
export * as listConvos from './convo/listConvos.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"convo.d.ts","sourceRoot":"","sources":["../../../../src/lexicons/chat/bsky/convo.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,WAAW,MAAM,wBAAwB,CAAA;AACrD,OAAO,KAAK,WAAW,MAAM,wBAAwB,CAAA;AACrD,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAA;AACvC,OAAO,KAAK,oBAAoB,MAAM,iCAAiC,CAAA;AACvE,OAAO,KAAK,QAAQ,MAAM,qBAAqB,CAAA;AAC/C,OAAO,KAAK,oBAAoB,MAAM,iCAAiC,CAAA;AACvE,OAAO,KAAK,kBAAkB,MAAM,+BAA+B,CAAA;AACnE,OAAO,KAAK,eAAe,MAAM,4BAA4B,CAAA;AAC7D,OAAO,KAAK,MAAM,MAAM,mBAAmB,CAAA;AAC3C,OAAO,KAAK,WAAW,MAAM,wBAAwB,CAAA;AACrD,OAAO,KAAK,UAAU,MAAM,uBAAuB,CAAA;AACnD,OAAO,KAAK,iBAAiB,MAAM,8BAA8B,CAAA;AACjE,OAAO,KAAK,UAAU,MAAM,uBAAuB,CAAA;AACnD,OAAO,KAAK,SAAS,MAAM,sBAAsB,CAAA;AACjD,OAAO,KAAK,SAAS,MAAM,sBAAsB,CAAA;AACjD,OAAO,KAAK,cAAc,MAAM,2BAA2B,CAAA;AAC3D,OAAO,KAAK,WAAW,MAAM,wBAAwB,CAAA;AACrD,OAAO,KAAK,gBAAgB,MAAM,6BAA6B,CAAA;AAC/D,OAAO,KAAK,WAAW,MAAM,wBAAwB,CAAA;AACrD,OAAO,KAAK,WAAW,MAAM,wBAAwB,CAAA;AACrD,OAAO,KAAK,aAAa,MAAM,0BAA0B,CAAA;AACzD,OAAO,KAAK,UAAU,MAAM,uBAAuB,CAAA"}
|
|
1
|
+
{"version":3,"file":"convo.d.ts","sourceRoot":"","sources":["../../../../src/lexicons/chat/bsky/convo.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,WAAW,MAAM,wBAAwB,CAAA;AACrD,OAAO,KAAK,WAAW,MAAM,wBAAwB,CAAA;AACrD,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAA;AACvC,OAAO,KAAK,oBAAoB,MAAM,iCAAiC,CAAA;AACvE,OAAO,KAAK,QAAQ,MAAM,qBAAqB,CAAA;AAC/C,OAAO,KAAK,oBAAoB,MAAM,iCAAiC,CAAA;AACvE,OAAO,KAAK,kBAAkB,MAAM,+BAA+B,CAAA;AACnE,OAAO,KAAK,eAAe,MAAM,4BAA4B,CAAA;AAC7D,OAAO,KAAK,MAAM,MAAM,mBAAmB,CAAA;AAC3C,OAAO,KAAK,WAAW,MAAM,wBAAwB,CAAA;AACrD,OAAO,KAAK,eAAe,MAAM,4BAA4B,CAAA;AAC7D,OAAO,KAAK,UAAU,MAAM,uBAAuB,CAAA;AACnD,OAAO,KAAK,iBAAiB,MAAM,8BAA8B,CAAA;AACjE,OAAO,KAAK,UAAU,MAAM,uBAAuB,CAAA;AACnD,OAAO,KAAK,SAAS,MAAM,sBAAsB,CAAA;AACjD,OAAO,KAAK,SAAS,MAAM,sBAAsB,CAAA;AACjD,OAAO,KAAK,cAAc,MAAM,2BAA2B,CAAA;AAC3D,OAAO,KAAK,WAAW,MAAM,wBAAwB,CAAA;AACrD,OAAO,KAAK,gBAAgB,MAAM,6BAA6B,CAAA;AAC/D,OAAO,KAAK,WAAW,MAAM,wBAAwB,CAAA;AACrD,OAAO,KAAK,WAAW,MAAM,wBAAwB,CAAA;AACrD,OAAO,KAAK,aAAa,MAAM,0BAA0B,CAAA;AACzD,OAAO,KAAK,UAAU,MAAM,uBAAuB,CAAA"}
|
|
@@ -11,6 +11,7 @@ export * as getConvoForMembers from './convo/getConvoForMembers.js';
|
|
|
11
11
|
export * as getConvoMembers from './convo/getConvoMembers.js';
|
|
12
12
|
export * as getLog from './convo/getLog.js';
|
|
13
13
|
export * as getMessages from './convo/getMessages.js';
|
|
14
|
+
export * as getUnreadCounts from './convo/getUnreadCounts.js';
|
|
14
15
|
export * as leaveConvo from './convo/leaveConvo.js';
|
|
15
16
|
export * as listConvoRequests from './convo/listConvoRequests.js';
|
|
16
17
|
export * as listConvos from './convo/listConvos.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"convo.js","sourceRoot":"","sources":["../../../../src/lexicons/chat/bsky/convo.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,WAAW,MAAM,wBAAwB,CAAA;AACrD,OAAO,KAAK,WAAW,MAAM,wBAAwB,CAAA;AACrD,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAA;AACvC,OAAO,KAAK,oBAAoB,MAAM,iCAAiC,CAAA;AACvE,OAAO,KAAK,QAAQ,MAAM,qBAAqB,CAAA;AAC/C,OAAO,KAAK,oBAAoB,MAAM,iCAAiC,CAAA;AACvE,OAAO,KAAK,kBAAkB,MAAM,+BAA+B,CAAA;AACnE,OAAO,KAAK,eAAe,MAAM,4BAA4B,CAAA;AAC7D,OAAO,KAAK,MAAM,MAAM,mBAAmB,CAAA;AAC3C,OAAO,KAAK,WAAW,MAAM,wBAAwB,CAAA;AACrD,OAAO,KAAK,UAAU,MAAM,uBAAuB,CAAA;AACnD,OAAO,KAAK,iBAAiB,MAAM,8BAA8B,CAAA;AACjE,OAAO,KAAK,UAAU,MAAM,uBAAuB,CAAA;AACnD,OAAO,KAAK,SAAS,MAAM,sBAAsB,CAAA;AACjD,OAAO,KAAK,SAAS,MAAM,sBAAsB,CAAA;AACjD,OAAO,KAAK,cAAc,MAAM,2BAA2B,CAAA;AAC3D,OAAO,KAAK,WAAW,MAAM,wBAAwB,CAAA;AACrD,OAAO,KAAK,gBAAgB,MAAM,6BAA6B,CAAA;AAC/D,OAAO,KAAK,WAAW,MAAM,wBAAwB,CAAA;AACrD,OAAO,KAAK,WAAW,MAAM,wBAAwB,CAAA;AACrD,OAAO,KAAK,aAAa,MAAM,0BAA0B,CAAA;AACzD,OAAO,KAAK,UAAU,MAAM,uBAAuB,CAAA","sourcesContent":["/*\n * THIS FILE WAS GENERATED BY \"@atproto/lex\". DO NOT EDIT.\n */\n\nexport * as acceptConvo from './convo/acceptConvo.js'\nexport * as addReaction from './convo/addReaction.js'\nexport * as defs from './convo/defs.js'\nexport * as deleteMessageForSelf from './convo/deleteMessageForSelf.js'\nexport * as getConvo from './convo/getConvo.js'\nexport * as getConvoAvailability from './convo/getConvoAvailability.js'\nexport * as getConvoForMembers from './convo/getConvoForMembers.js'\nexport * as getConvoMembers from './convo/getConvoMembers.js'\nexport * as getLog from './convo/getLog.js'\nexport * as getMessages from './convo/getMessages.js'\nexport * as leaveConvo from './convo/leaveConvo.js'\nexport * as listConvoRequests from './convo/listConvoRequests.js'\nexport * as listConvos from './convo/listConvos.js'\nexport * as lockConvo from './convo/lockConvo.js'\nexport * as muteConvo from './convo/muteConvo.js'\nexport * as removeReaction from './convo/removeReaction.js'\nexport * as sendMessage from './convo/sendMessage.js'\nexport * as sendMessageBatch from './convo/sendMessageBatch.js'\nexport * as unlockConvo from './convo/unlockConvo.js'\nexport * as unmuteConvo from './convo/unmuteConvo.js'\nexport * as updateAllRead from './convo/updateAllRead.js'\nexport * as updateRead from './convo/updateRead.js'\n"]}
|
|
1
|
+
{"version":3,"file":"convo.js","sourceRoot":"","sources":["../../../../src/lexicons/chat/bsky/convo.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,WAAW,MAAM,wBAAwB,CAAA;AACrD,OAAO,KAAK,WAAW,MAAM,wBAAwB,CAAA;AACrD,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAA;AACvC,OAAO,KAAK,oBAAoB,MAAM,iCAAiC,CAAA;AACvE,OAAO,KAAK,QAAQ,MAAM,qBAAqB,CAAA;AAC/C,OAAO,KAAK,oBAAoB,MAAM,iCAAiC,CAAA;AACvE,OAAO,KAAK,kBAAkB,MAAM,+BAA+B,CAAA;AACnE,OAAO,KAAK,eAAe,MAAM,4BAA4B,CAAA;AAC7D,OAAO,KAAK,MAAM,MAAM,mBAAmB,CAAA;AAC3C,OAAO,KAAK,WAAW,MAAM,wBAAwB,CAAA;AACrD,OAAO,KAAK,eAAe,MAAM,4BAA4B,CAAA;AAC7D,OAAO,KAAK,UAAU,MAAM,uBAAuB,CAAA;AACnD,OAAO,KAAK,iBAAiB,MAAM,8BAA8B,CAAA;AACjE,OAAO,KAAK,UAAU,MAAM,uBAAuB,CAAA;AACnD,OAAO,KAAK,SAAS,MAAM,sBAAsB,CAAA;AACjD,OAAO,KAAK,SAAS,MAAM,sBAAsB,CAAA;AACjD,OAAO,KAAK,cAAc,MAAM,2BAA2B,CAAA;AAC3D,OAAO,KAAK,WAAW,MAAM,wBAAwB,CAAA;AACrD,OAAO,KAAK,gBAAgB,MAAM,6BAA6B,CAAA;AAC/D,OAAO,KAAK,WAAW,MAAM,wBAAwB,CAAA;AACrD,OAAO,KAAK,WAAW,MAAM,wBAAwB,CAAA;AACrD,OAAO,KAAK,aAAa,MAAM,0BAA0B,CAAA;AACzD,OAAO,KAAK,UAAU,MAAM,uBAAuB,CAAA","sourcesContent":["/*\n * THIS FILE WAS GENERATED BY \"@atproto/lex\". DO NOT EDIT.\n */\n\nexport * as acceptConvo from './convo/acceptConvo.js'\nexport * as addReaction from './convo/addReaction.js'\nexport * as defs from './convo/defs.js'\nexport * as deleteMessageForSelf from './convo/deleteMessageForSelf.js'\nexport * as getConvo from './convo/getConvo.js'\nexport * as getConvoAvailability from './convo/getConvoAvailability.js'\nexport * as getConvoForMembers from './convo/getConvoForMembers.js'\nexport * as getConvoMembers from './convo/getConvoMembers.js'\nexport * as getLog from './convo/getLog.js'\nexport * as getMessages from './convo/getMessages.js'\nexport * as getUnreadCounts from './convo/getUnreadCounts.js'\nexport * as leaveConvo from './convo/leaveConvo.js'\nexport * as listConvoRequests from './convo/listConvoRequests.js'\nexport * as listConvos from './convo/listConvos.js'\nexport * as lockConvo from './convo/lockConvo.js'\nexport * as muteConvo from './convo/muteConvo.js'\nexport * as removeReaction from './convo/removeReaction.js'\nexport * as sendMessage from './convo/sendMessage.js'\nexport * as sendMessageBatch from './convo/sendMessageBatch.js'\nexport * as unlockConvo from './convo/unlockConvo.js'\nexport * as unmuteConvo from './convo/unmuteConvo.js'\nexport * as updateAllRead from './convo/updateAllRead.js'\nexport * as updateRead from './convo/updateRead.js'\n"]}
|
|
@@ -21,7 +21,7 @@ export declare const $output: l.Payload<"application/json", l.ObjectSchema<{
|
|
|
21
21
|
}>>;
|
|
22
22
|
export type $Output<B = l.BinaryData> = l.InferPayload<typeof $output, B>;
|
|
23
23
|
export type $OutputBody<B = l.BinaryData> = l.InferPayloadBody<typeof $output, B>;
|
|
24
|
-
/** [NOTE: This is under active development and should be considered unstable while this note is here]. Creates a group convo, specifying the members to be added to it. Unlike getConvoForMembers, this isn't idempotent. It will create new groups even if the membership is identical to pre-existing groups. Will create '
|
|
24
|
+
/** [NOTE: This is under active development and should be considered unstable while this note is here]. Creates a group convo, specifying the members to be added to it. Unlike getConvoForMembers, this isn't idempotent. It will create new groups even if the membership is identical to pre-existing groups. Will create 'request' membership for all members, except the owner who is 'accepted'. */
|
|
25
25
|
declare const main: l.Procedure<"chat.bsky.group.createGroup", l.ParamsSchema<{}>, l.Payload<"application/json", l.ObjectSchema<{
|
|
26
26
|
members: l.ArraySchema<l.StringSchema<{
|
|
27
27
|
readonly format: "did";
|
|
@@ -19,7 +19,7 @@ export const $input = /*#__PURE__*/ l.jsonPayload({
|
|
|
19
19
|
export const $output = /*#__PURE__*/ l.jsonPayload({
|
|
20
20
|
convo: /*#__PURE__*/ l.ref((() => ConvoDefs.convoView)),
|
|
21
21
|
});
|
|
22
|
-
/** [NOTE: This is under active development and should be considered unstable while this note is here]. Creates a group convo, specifying the members to be added to it. Unlike getConvoForMembers, this isn't idempotent. It will create new groups even if the membership is identical to pre-existing groups. Will create '
|
|
22
|
+
/** [NOTE: This is under active development and should be considered unstable while this note is here]. Creates a group convo, specifying the members to be added to it. Unlike getConvoForMembers, this isn't idempotent. It will create new groups even if the membership is identical to pre-existing groups. Will create 'request' membership for all members, except the owner who is 'accepted'. */
|
|
23
23
|
const main = /*#__PURE__*/ l.procedure($nsid, $params, $input, $output, [
|
|
24
24
|
'AccountSuspended',
|
|
25
25
|
'BlockedActor',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createGroup.defs.js","sourceRoot":"","sources":["../../../../../src/lexicons/chat/bsky/group/createGroup.defs.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,cAAc,CAAA;AAChC,OAAO,KAAK,SAAS,MAAM,uBAAuB,CAAA;AAElD,MAAM,KAAK,GAAG,6BAA6B,CAAA;AAE3C,OAAO,EAAE,KAAK,EAAE,CAAA;AAEhB,MAAM,CAAC,MAAM,OAAO,GAAG,aAAa,CAAC,CAAC,CAAC,MAAM,EAAE,CAAA;AAI/C,MAAM,CAAC,MAAM,MAAM,GAAG,aAAa,CAAC,CAAC,CAAC,WAAW,CAAC;IAChD,OAAO,EAAE,aAAa,CAAC,CAAC,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,EAAE;QACxE,SAAS,EAAE,EAAE;KACd,CAAC;IACF,IAAI,EAAE,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC;QAC3B,SAAS,EAAE,CAAC;QACZ,YAAY,EAAE,EAAE;QAChB,SAAS,EAAE,GAAG;KACf,CAAC;CACH,CAAC,CAAA;AAKF,MAAM,CAAC,MAAM,OAAO,GAAG,aAAa,CAAC,CAAC,CAAC,WAAW,CAAC;IACjD,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,GAAG,CACxB,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,SAAS,CAAQ,CACnC;CACF,CAAC,CAAA;AAQF,yYAAyY;AACzY,MAAM,IAAI,GAAG,aAAa,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE;IACtE,kBAAkB;IAClB,cAAc;IACd,gBAAgB;IAChB,6BAA6B;IAC7B,qBAAqB;IACrB,mBAAmB;IACnB,mBAAmB;CACpB,CAAC,CAAA;AAEF,OAAO,EAAE,IAAI,EAAE,CAAA;AAEf,MAAM,CAAC,MAAM,IAAI,GAAG,KAAK,CAAA","sourcesContent":["/*\n * THIS FILE WAS GENERATED BY \"@atproto/lex\". DO NOT EDIT.\n */\n\nimport { l } from '@atproto/lex'\nimport * as ConvoDefs from '../convo/defs.defs.js'\n\nconst $nsid = 'chat.bsky.group.createGroup'\n\nexport { $nsid }\n\nexport const $params = /*#__PURE__*/ l.params()\n\nexport type $Params = l.InferOutput<typeof $params>\n\nexport const $input = /*#__PURE__*/ l.jsonPayload({\n members: /*#__PURE__*/ l.array(/*#__PURE__*/ l.string({ format: 'did' }), {\n maxLength: 49,\n }),\n name: /*#__PURE__*/ l.string({\n minLength: 1,\n maxGraphemes: 50,\n maxLength: 500,\n }),\n})\n\nexport type $Input<B = l.BinaryData> = l.InferPayload<typeof $input, B>\nexport type $InputBody<B = l.BinaryData> = l.InferPayloadBody<typeof $input, B>\n\nexport const $output = /*#__PURE__*/ l.jsonPayload({\n convo: /*#__PURE__*/ l.ref<ConvoDefs.ConvoView>(\n (() => ConvoDefs.convoView) as any,\n ),\n})\n\nexport type $Output<B = l.BinaryData> = l.InferPayload<typeof $output, B>\nexport type $OutputBody<B = l.BinaryData> = l.InferPayloadBody<\n typeof $output,\n B\n>\n\n/** [NOTE: This is under active development and should be considered unstable while this note is here]. Creates a group convo, specifying the members to be added to it. Unlike getConvoForMembers, this isn't idempotent. It will create new groups even if the membership is identical to pre-existing groups. Will create '
|
|
1
|
+
{"version":3,"file":"createGroup.defs.js","sourceRoot":"","sources":["../../../../../src/lexicons/chat/bsky/group/createGroup.defs.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,cAAc,CAAA;AAChC,OAAO,KAAK,SAAS,MAAM,uBAAuB,CAAA;AAElD,MAAM,KAAK,GAAG,6BAA6B,CAAA;AAE3C,OAAO,EAAE,KAAK,EAAE,CAAA;AAEhB,MAAM,CAAC,MAAM,OAAO,GAAG,aAAa,CAAC,CAAC,CAAC,MAAM,EAAE,CAAA;AAI/C,MAAM,CAAC,MAAM,MAAM,GAAG,aAAa,CAAC,CAAC,CAAC,WAAW,CAAC;IAChD,OAAO,EAAE,aAAa,CAAC,CAAC,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,EAAE;QACxE,SAAS,EAAE,EAAE;KACd,CAAC;IACF,IAAI,EAAE,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC;QAC3B,SAAS,EAAE,CAAC;QACZ,YAAY,EAAE,EAAE;QAChB,SAAS,EAAE,GAAG;KACf,CAAC;CACH,CAAC,CAAA;AAKF,MAAM,CAAC,MAAM,OAAO,GAAG,aAAa,CAAC,CAAC,CAAC,WAAW,CAAC;IACjD,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,GAAG,CACxB,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,SAAS,CAAQ,CACnC;CACF,CAAC,CAAA;AAQF,yYAAyY;AACzY,MAAM,IAAI,GAAG,aAAa,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE;IACtE,kBAAkB;IAClB,cAAc;IACd,gBAAgB;IAChB,6BAA6B;IAC7B,qBAAqB;IACrB,mBAAmB;IACnB,mBAAmB;CACpB,CAAC,CAAA;AAEF,OAAO,EAAE,IAAI,EAAE,CAAA;AAEf,MAAM,CAAC,MAAM,IAAI,GAAG,KAAK,CAAA","sourcesContent":["/*\n * THIS FILE WAS GENERATED BY \"@atproto/lex\". DO NOT EDIT.\n */\n\nimport { l } from '@atproto/lex'\nimport * as ConvoDefs from '../convo/defs.defs.js'\n\nconst $nsid = 'chat.bsky.group.createGroup'\n\nexport { $nsid }\n\nexport const $params = /*#__PURE__*/ l.params()\n\nexport type $Params = l.InferOutput<typeof $params>\n\nexport const $input = /*#__PURE__*/ l.jsonPayload({\n members: /*#__PURE__*/ l.array(/*#__PURE__*/ l.string({ format: 'did' }), {\n maxLength: 49,\n }),\n name: /*#__PURE__*/ l.string({\n minLength: 1,\n maxGraphemes: 50,\n maxLength: 500,\n }),\n})\n\nexport type $Input<B = l.BinaryData> = l.InferPayload<typeof $input, B>\nexport type $InputBody<B = l.BinaryData> = l.InferPayloadBody<typeof $input, B>\n\nexport const $output = /*#__PURE__*/ l.jsonPayload({\n convo: /*#__PURE__*/ l.ref<ConvoDefs.ConvoView>(\n (() => ConvoDefs.convoView) as any,\n ),\n})\n\nexport type $Output<B = l.BinaryData> = l.InferPayload<typeof $output, B>\nexport type $OutputBody<B = l.BinaryData> = l.InferPayloadBody<\n typeof $output,\n B\n>\n\n/** [NOTE: This is under active development and should be considered unstable while this note is here]. Creates a group convo, specifying the members to be added to it. Unlike getConvoForMembers, this isn't idempotent. It will create new groups even if the membership is identical to pre-existing groups. Will create 'request' membership for all members, except the owner who is 'accepted'. */\nconst main = /*#__PURE__*/ l.procedure($nsid, $params, $input, $output, [\n 'AccountSuspended',\n 'BlockedActor',\n 'BlockedSubject',\n 'NewAccountCannotCreateGroup',\n 'NotFollowedBySender',\n 'RecipientNotFound',\n 'UserForbidsGroups',\n])\n\nexport { main }\n\nexport const $lxm = $nsid\n"]}
|
package/dist/lexicons/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/lexicons/index.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,GAAG,MAAM,UAAU,CAAA;AAC/B,OAAO,KAAK,GAAG,MAAM,UAAU,CAAA;AAC/B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAA;AACjC,OAAO,KAAK,KAAK,MAAM,YAAY,CAAA;AACnC,OAAO,KAAK,IAAI,MAAM,WAAW,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/lexicons/index.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,GAAG,MAAM,UAAU,CAAA;AAC/B,OAAO,KAAK,GAAG,MAAM,UAAU,CAAA;AAC/B,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAA;AACzC,OAAO,KAAK,IAAI,MAAM,WAAW,CAAA;AACjC,OAAO,KAAK,KAAK,MAAM,YAAY,CAAA;AACnC,OAAO,KAAK,IAAI,MAAM,WAAW,CAAA"}
|
package/dist/lexicons/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/lexicons/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,GAAG,MAAM,UAAU,CAAA;AAC/B,OAAO,KAAK,GAAG,MAAM,UAAU,CAAA;AAC/B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAA;AACjC,OAAO,KAAK,KAAK,MAAM,YAAY,CAAA;AACnC,OAAO,KAAK,IAAI,MAAM,WAAW,CAAA","sourcesContent":["/*\n * THIS FILE WAS GENERATED BY \"@atproto/lex\". DO NOT EDIT.\n */\n\nexport * as app from './app.js'\nexport * as com from './com.js'\nexport * as site from './site.js'\nexport * as tools from './tools.js'\nexport * as chat from './chat.js'\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/lexicons/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,GAAG,MAAM,UAAU,CAAA;AAC/B,OAAO,KAAK,GAAG,MAAM,UAAU,CAAA;AAC/B,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAA;AACzC,OAAO,KAAK,IAAI,MAAM,WAAW,CAAA;AACjC,OAAO,KAAK,KAAK,MAAM,YAAY,CAAA;AACnC,OAAO,KAAK,IAAI,MAAM,WAAW,CAAA","sourcesContent":["/*\n * THIS FILE WAS GENERATED BY \"@atproto/lex\". DO NOT EDIT.\n */\n\nexport * as app from './app.js'\nexport * as com from './com.js'\nexport * as internal from './internal.js'\nexport * as site from './site.js'\nexport * as tools from './tools.js'\nexport * as chat from './chat.js'\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getProfiles.d.ts","sourceRoot":"","sources":["../../../../../src/lexicons/internal/bsky/actor/getProfiles.ts"],"names":[],"mappings":"AAIA,cAAc,uBAAuB,CAAA;AACrC,OAAO,EAAE,IAAI,IAAI,OAAO,EAAE,MAAM,uBAAuB,CAAA"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { l } from '@atproto/lex';
|
|
2
|
+
import * as ActorDefs from '../../../app/bsky/actor/defs.defs.js';
|
|
3
|
+
declare const $nsid = "internal.bsky.actor.getProfiles";
|
|
4
|
+
export { $nsid };
|
|
5
|
+
export declare const $params: l.ParamsSchema<{
|
|
6
|
+
readonly dids: l.ArraySchema<l.StringSchema<{
|
|
7
|
+
readonly format: "did";
|
|
8
|
+
}>>;
|
|
9
|
+
readonly viewer: l.OptionalSchema<l.StringSchema<{
|
|
10
|
+
readonly format: "did";
|
|
11
|
+
}>>;
|
|
12
|
+
readonly socialProof: l.OptionalSchema<l.ArraySchema<l.StringSchema<{
|
|
13
|
+
readonly format: "did";
|
|
14
|
+
}>>>;
|
|
15
|
+
}>;
|
|
16
|
+
export type $Params = l.InferOutput<typeof $params>;
|
|
17
|
+
export declare const $output: l.Payload<"application/json", l.ObjectSchema<{
|
|
18
|
+
profiles: l.ArraySchema<l.RefSchema<l.Validator<ActorDefs.ProfileViewDetailed, ActorDefs.ProfileViewDetailed>>>;
|
|
19
|
+
}>>;
|
|
20
|
+
export type $Output<B = l.BinaryData> = l.InferPayload<typeof $output, B>;
|
|
21
|
+
export type $OutputBody<B = l.BinaryData> = l.InferPayloadBody<typeof $output, B>;
|
|
22
|
+
/** Get detailed profile views of multiple actors, hydrating social proof (known followers) only for a subset of them. Intended for internal service-to-service use. */
|
|
23
|
+
declare const main: l.Query<"internal.bsky.actor.getProfiles", l.ParamsSchema<{
|
|
24
|
+
readonly dids: l.ArraySchema<l.StringSchema<{
|
|
25
|
+
readonly format: "did";
|
|
26
|
+
}>>;
|
|
27
|
+
readonly viewer: l.OptionalSchema<l.StringSchema<{
|
|
28
|
+
readonly format: "did";
|
|
29
|
+
}>>;
|
|
30
|
+
readonly socialProof: l.OptionalSchema<l.ArraySchema<l.StringSchema<{
|
|
31
|
+
readonly format: "did";
|
|
32
|
+
}>>>;
|
|
33
|
+
}>, l.Payload<"application/json", l.ObjectSchema<{
|
|
34
|
+
profiles: l.ArraySchema<l.RefSchema<l.Validator<ActorDefs.ProfileViewDetailed, ActorDefs.ProfileViewDetailed>>>;
|
|
35
|
+
}>>, undefined>;
|
|
36
|
+
export { main };
|
|
37
|
+
export declare const $lxm = "internal.bsky.actor.getProfiles";
|
|
38
|
+
//# sourceMappingURL=getProfiles.defs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getProfiles.defs.d.ts","sourceRoot":"","sources":["../../../../../src/lexicons/internal/bsky/actor/getProfiles.defs.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,CAAC,EAAE,MAAM,cAAc,CAAA;AAChC,OAAO,KAAK,SAAS,MAAM,sCAAsC,CAAA;AAEjE,QAAA,MAAM,KAAK,oCAAoC,CAAA;AAE/C,OAAO,EAAE,KAAK,EAAE,CAAA;AAEhB,eAAO,MAAM,OAAO;;;;;;;;;;EAUlB,CAAA;AAEF,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,OAAO,CAAC,CAAA;AAEnD,eAAO,MAAM,OAAO;;GAMlB,CAAA;AAEF,MAAM,MAAM,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,UAAU,IAAI,CAAC,CAAC,YAAY,CAAC,OAAO,OAAO,EAAE,CAAC,CAAC,CAAA;AACzE,MAAM,MAAM,WAAW,CAAC,CAAC,GAAG,CAAC,CAAC,UAAU,IAAI,CAAC,CAAC,gBAAgB,CAC5D,OAAO,OAAO,EACd,CAAC,CACF,CAAA;AAED,uKAAuK;AACvK,QAAA,MAAM,IAAI;;;;;;;;;;;;eAAiD,CAAA;AAE3D,OAAO,EAAE,IAAI,EAAE,CAAA;AAEf,eAAO,MAAM,IAAI,oCAAQ,CAAA"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* THIS FILE WAS GENERATED BY "@atproto/lex". DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
import { l } from '@atproto/lex';
|
|
5
|
+
import * as ActorDefs from '../../../app/bsky/actor/defs.defs.js';
|
|
6
|
+
const $nsid = 'internal.bsky.actor.getProfiles';
|
|
7
|
+
export { $nsid };
|
|
8
|
+
export const $params = /*#__PURE__*/ l.params({
|
|
9
|
+
dids: /*#__PURE__*/ l.array(/*#__PURE__*/ l.string({ format: 'did' }), {
|
|
10
|
+
maxLength: 200,
|
|
11
|
+
}),
|
|
12
|
+
viewer: /*#__PURE__*/ l.optional(/*#__PURE__*/ l.string({ format: 'did' })),
|
|
13
|
+
socialProof: /*#__PURE__*/ l.optional(
|
|
14
|
+
/*#__PURE__*/ l.array(/*#__PURE__*/ l.string({ format: 'did' }), {
|
|
15
|
+
maxLength: 200,
|
|
16
|
+
})),
|
|
17
|
+
});
|
|
18
|
+
export const $output = /*#__PURE__*/ l.jsonPayload({
|
|
19
|
+
profiles: /*#__PURE__*/ l.array(
|
|
20
|
+
/*#__PURE__*/ l.ref((() => ActorDefs.profileViewDetailed))),
|
|
21
|
+
});
|
|
22
|
+
/** Get detailed profile views of multiple actors, hydrating social proof (known followers) only for a subset of them. Intended for internal service-to-service use. */
|
|
23
|
+
const main = /*#__PURE__*/ l.query($nsid, $params, $output);
|
|
24
|
+
export { main };
|
|
25
|
+
export const $lxm = $nsid;
|
|
26
|
+
//# sourceMappingURL=getProfiles.defs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getProfiles.defs.js","sourceRoot":"","sources":["../../../../../src/lexicons/internal/bsky/actor/getProfiles.defs.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,cAAc,CAAA;AAChC,OAAO,KAAK,SAAS,MAAM,sCAAsC,CAAA;AAEjE,MAAM,KAAK,GAAG,iCAAiC,CAAA;AAE/C,OAAO,EAAE,KAAK,EAAE,CAAA;AAEhB,MAAM,CAAC,MAAM,OAAO,GAAG,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC;IAC5C,IAAI,EAAE,aAAa,CAAC,CAAC,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,EAAE;QACrE,SAAS,EAAE,GAAG;KACf,CAAC;IACF,MAAM,EAAE,aAAa,CAAC,CAAC,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC;IAC3E,WAAW,EAAE,aAAa,CAAC,CAAC,CAAC,QAAQ;IACnC,aAAa,CAAC,CAAC,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,EAAE;QAC/D,SAAS,EAAE,GAAG;KACf,CAAC,CACH;CACF,CAAC,CAAA;AAIF,MAAM,CAAC,MAAM,OAAO,GAAG,aAAa,CAAC,CAAC,CAAC,WAAW,CAAC;IACjD,QAAQ,EAAE,aAAa,CAAC,CAAC,CAAC,KAAK;IAC7B,aAAa,CAAC,CAAC,CAAC,GAAG,CACjB,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,mBAAmB,CAAQ,CAC7C,CACF;CACF,CAAC,CAAA;AAQF,uKAAuK;AACvK,MAAM,IAAI,GAAG,aAAa,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,CAAC,CAAA;AAE3D,OAAO,EAAE,IAAI,EAAE,CAAA;AAEf,MAAM,CAAC,MAAM,IAAI,GAAG,KAAK,CAAA","sourcesContent":["/*\n * THIS FILE WAS GENERATED BY \"@atproto/lex\". DO NOT EDIT.\n */\n\nimport { l } from '@atproto/lex'\nimport * as ActorDefs from '../../../app/bsky/actor/defs.defs.js'\n\nconst $nsid = 'internal.bsky.actor.getProfiles'\n\nexport { $nsid }\n\nexport const $params = /*#__PURE__*/ l.params({\n dids: /*#__PURE__*/ l.array(/*#__PURE__*/ l.string({ format: 'did' }), {\n maxLength: 200,\n }),\n viewer: /*#__PURE__*/ l.optional(/*#__PURE__*/ l.string({ format: 'did' })),\n socialProof: /*#__PURE__*/ l.optional(\n /*#__PURE__*/ l.array(/*#__PURE__*/ l.string({ format: 'did' }), {\n maxLength: 200,\n }),\n ),\n})\n\nexport type $Params = l.InferOutput<typeof $params>\n\nexport const $output = /*#__PURE__*/ l.jsonPayload({\n profiles: /*#__PURE__*/ l.array(\n /*#__PURE__*/ l.ref<ActorDefs.ProfileViewDetailed>(\n (() => ActorDefs.profileViewDetailed) as any,\n ),\n ),\n})\n\nexport type $Output<B = l.BinaryData> = l.InferPayload<typeof $output, B>\nexport type $OutputBody<B = l.BinaryData> = l.InferPayloadBody<\n typeof $output,\n B\n>\n\n/** Get detailed profile views of multiple actors, hydrating social proof (known followers) only for a subset of them. Intended for internal service-to-service use. */\nconst main = /*#__PURE__*/ l.query($nsid, $params, $output)\n\nexport { main }\n\nexport const $lxm = $nsid\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getProfiles.js","sourceRoot":"","sources":["../../../../../src/lexicons/internal/bsky/actor/getProfiles.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,uBAAuB,CAAA;AACrC,OAAO,EAAE,IAAI,IAAI,OAAO,EAAE,MAAM,uBAAuB,CAAA","sourcesContent":["/*\n * THIS FILE WAS GENERATED BY \"@atproto/lex\". DO NOT EDIT.\n */\n\nexport * from './getProfiles.defs.js'\nexport { main as default } from './getProfiles.defs.js'\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"actor.d.ts","sourceRoot":"","sources":["../../../../src/lexicons/internal/bsky/actor.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,WAAW,MAAM,wBAAwB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"actor.js","sourceRoot":"","sources":["../../../../src/lexicons/internal/bsky/actor.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,WAAW,MAAM,wBAAwB,CAAA","sourcesContent":["/*\n * THIS FILE WAS GENERATED BY \"@atproto/lex\". DO NOT EDIT.\n */\n\nexport * as getProfiles from './actor/getProfiles.js'\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bsky.d.ts","sourceRoot":"","sources":["../../../src/lexicons/internal/bsky.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,MAAM,iBAAiB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bsky.js","sourceRoot":"","sources":["../../../src/lexicons/internal/bsky.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,iBAAiB,CAAA","sourcesContent":["/*\n * THIS FILE WAS GENERATED BY \"@atproto/lex\". DO NOT EDIT.\n */\n\nexport * as actor from './bsky/actor.js'\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../src/lexicons/internal.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,IAAI,MAAM,oBAAoB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"internal.js","sourceRoot":"","sources":["../../src/lexicons/internal.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,IAAI,MAAM,oBAAoB,CAAA","sourcesContent":["/*\n * THIS FILE WAS GENERATED BY \"@atproto/lex\". DO NOT EDIT.\n */\n\nexport * as bsky from './internal/bsky.js'\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atproto/bsky",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.241",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Reference implementation of app.bsky App View (Bluesky API)",
|
|
6
6
|
"keywords": [
|
|
@@ -48,11 +48,11 @@
|
|
|
48
48
|
"uint8arrays": "^5.0.0",
|
|
49
49
|
"undici": "^6.19.8",
|
|
50
50
|
"zod": "3.23.8",
|
|
51
|
-
"@atproto-labs/fetch-node": "^0.3.0",
|
|
52
51
|
"@atproto-labs/xrpc-utils": "^0.1.0",
|
|
53
|
-
"@atproto/
|
|
52
|
+
"@atproto-labs/fetch-node": "^0.3.0",
|
|
54
53
|
"@atproto/common": "^0.6.1",
|
|
55
54
|
"@atproto/crypto": "^0.5.0",
|
|
55
|
+
"@atproto/api": "^0.20.13",
|
|
56
56
|
"@atproto/did": "^0.5.0",
|
|
57
57
|
"@atproto/identity": "^0.5.0",
|
|
58
58
|
"@atproto/lex": "^0.1.3",
|
package/src/api/index.ts
CHANGED
|
@@ -97,6 +97,7 @@ import resolveHandle from './com/atproto/identity/resolveHandle.js'
|
|
|
97
97
|
import queryLabels from './com/atproto/label/queryLabels.js'
|
|
98
98
|
import getRecord from './com/atproto/repo/getRecord.js'
|
|
99
99
|
import fetchLabels from './com/atproto/temp/fetchLabels.js'
|
|
100
|
+
import internalGetProfiles from './internal/bsky/actor/getProfiles.js'
|
|
100
101
|
|
|
101
102
|
export * as health from './health.js'
|
|
102
103
|
|
|
@@ -208,4 +209,6 @@ export default function (server: Server, ctx: AppContext) {
|
|
|
208
209
|
getRecord(server, ctx)
|
|
209
210
|
fetchLabels(server, ctx)
|
|
210
211
|
queryLabels(server, ctx)
|
|
212
|
+
// internal.bsky
|
|
213
|
+
internalGetProfiles(server, ctx)
|
|
211
214
|
}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { mapDefined } from '@atproto/common'
|
|
2
|
+
import { DidString } from '@atproto/syntax'
|
|
3
|
+
import { Server } from '@atproto/xrpc-server'
|
|
4
|
+
import { AppContext } from '../../../../context.js'
|
|
5
|
+
import {
|
|
6
|
+
HydrateCtx,
|
|
7
|
+
HydrationState,
|
|
8
|
+
Hydrator,
|
|
9
|
+
} from '../../../../hydration/hydrator.js'
|
|
10
|
+
import { internal } from '../../../../lexicons/index.js'
|
|
11
|
+
import { createPipeline, noRules } from '../../../../pipeline.js'
|
|
12
|
+
import { Views } from '../../../../views/index.js'
|
|
13
|
+
|
|
14
|
+
export default function (server: Server, ctx: AppContext) {
|
|
15
|
+
const getProfiles = createPipeline(skeleton, hydration, noRules, presentation)
|
|
16
|
+
server.add(internal.bsky.actor.getProfiles, {
|
|
17
|
+
auth: ctx.authVerifier.role,
|
|
18
|
+
handler: async ({ params, req }) => {
|
|
19
|
+
const labelers = ctx.reqLabelers(req)
|
|
20
|
+
const hydrateCtx = await ctx.hydrator.createContext({
|
|
21
|
+
viewer: params.viewer ?? null,
|
|
22
|
+
labelers,
|
|
23
|
+
})
|
|
24
|
+
|
|
25
|
+
const result = await getProfiles({ ...params, hydrateCtx }, ctx)
|
|
26
|
+
|
|
27
|
+
return {
|
|
28
|
+
encoding: 'application/json',
|
|
29
|
+
body: result,
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
})
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
const skeleton = async (input: {
|
|
36
|
+
ctx: Context
|
|
37
|
+
params: Params
|
|
38
|
+
}): Promise<SkeletonState> => {
|
|
39
|
+
const { params } = input
|
|
40
|
+
const dids = params.dids
|
|
41
|
+
const didSet = new Set(dids)
|
|
42
|
+
// social proof is only hydrated for dids present in both inputs
|
|
43
|
+
const socialProofDids = (params.socialProof ?? []).filter((did) =>
|
|
44
|
+
didSet.has(did),
|
|
45
|
+
)
|
|
46
|
+
return { dids, socialProofDids }
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
const hydration = async (input: {
|
|
50
|
+
ctx: Context
|
|
51
|
+
params: Params
|
|
52
|
+
skeleton: SkeletonState
|
|
53
|
+
}) => {
|
|
54
|
+
const { ctx, params, skeleton } = input
|
|
55
|
+
return ctx.hydrator.hydrateProfilesDetailed(
|
|
56
|
+
skeleton.dids,
|
|
57
|
+
params.hydrateCtx,
|
|
58
|
+
{ knownFollowersDids: skeleton.socialProofDids },
|
|
59
|
+
)
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
const presentation = (input: {
|
|
63
|
+
ctx: Context
|
|
64
|
+
params: Params
|
|
65
|
+
skeleton: SkeletonState
|
|
66
|
+
hydration: HydrationState
|
|
67
|
+
}) => {
|
|
68
|
+
const { ctx, skeleton, hydration } = input
|
|
69
|
+
const profiles = mapDefined(skeleton.dids, (did) =>
|
|
70
|
+
ctx.views.profileDetailed(did, hydration),
|
|
71
|
+
)
|
|
72
|
+
return { profiles }
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
type Context = {
|
|
76
|
+
hydrator: Hydrator
|
|
77
|
+
views: Views
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
type Params = internal.bsky.actor.getProfiles.$Params & {
|
|
81
|
+
hydrateCtx: HydrateCtx
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
type SkeletonState = {
|
|
85
|
+
dids: DidString[]
|
|
86
|
+
socialProofDids: DidString[]
|
|
87
|
+
}
|
|
@@ -334,29 +334,31 @@ export class Hydrator {
|
|
|
334
334
|
async hydrateProfilesDetailed(
|
|
335
335
|
dids: DidString[],
|
|
336
336
|
ctx: HydrateCtx,
|
|
337
|
+
opts?: {
|
|
338
|
+
// when set, restricts known followers hydration to this subset of dids
|
|
339
|
+
knownFollowersDids?: DidString[]
|
|
340
|
+
},
|
|
337
341
|
): Promise<HydrationState> {
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
)
|
|
359
|
-
}
|
|
342
|
+
const [knownFollowers, activitySubscriptions] = await Promise.all([
|
|
343
|
+
this.actor
|
|
344
|
+
.getKnownFollowers(opts?.knownFollowersDids ?? dids, ctx.viewer)
|
|
345
|
+
.catch((err): KnownFollowersStates => {
|
|
346
|
+
hydrationLogger.error(
|
|
347
|
+
{ err },
|
|
348
|
+
'Failed to get known followers for profiles',
|
|
349
|
+
)
|
|
350
|
+
return new HydrationMap()
|
|
351
|
+
}),
|
|
352
|
+
this.actor
|
|
353
|
+
.getActivitySubscriptions(dids, ctx.viewer)
|
|
354
|
+
.catch((err): ActivitySubscriptionStates => {
|
|
355
|
+
hydrationLogger.error(
|
|
356
|
+
{ err },
|
|
357
|
+
'Failed to get activity subscriptions state for profiles',
|
|
358
|
+
)
|
|
359
|
+
return new HydrationMap()
|
|
360
|
+
}),
|
|
361
|
+
])
|
|
360
362
|
|
|
361
363
|
const subjectsToKnownFollowersMap = new Map<DidString, DidString[]>()
|
|
362
364
|
|
|
@@ -1051,12 +1053,11 @@ export class Hydrator {
|
|
|
1051
1053
|
)
|
|
1052
1054
|
},
|
|
1053
1055
|
)
|
|
1054
|
-
const blocks = await
|
|
1055
|
-
pairsToMap(listCreatorMemberPairs),
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
const listMemberAggs = await this.actor.getProfileAggregates(listMemberDids)
|
|
1056
|
+
const [blocks, listMemberAggs] = await Promise.all([
|
|
1057
|
+
this.hydrateBidirectionalBlocks(pairsToMap(listCreatorMemberPairs), ctx),
|
|
1058
|
+
// sample top list items per starter pack based on their follows
|
|
1059
|
+
this.actor.getProfileAggregates(listMemberDids),
|
|
1060
|
+
])
|
|
1060
1061
|
const listItemUris: AtUriString[] = []
|
|
1061
1062
|
uris.forEach((uri) => {
|
|
1062
1063
|
const sp = starterPackState.starterPacks?.get(uri)
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import { afterAll, beforeAll, describe, expect, it } from 'vitest'
|
|
2
|
+
import { AppBskyActorDefs, AtpAgent } from '@atproto/api'
|
|
3
|
+
import { SeedClient, TestNetwork } from '@atproto/dev-env'
|
|
4
|
+
import { knownFollowersSeed } from '../seed/known-followers.js'
|
|
5
|
+
|
|
6
|
+
describe('internal actor views', () => {
|
|
7
|
+
let network: TestNetwork
|
|
8
|
+
let pdsAgent: AtpAgent
|
|
9
|
+
let seedClient: SeedClient
|
|
10
|
+
|
|
11
|
+
let dids: Record<string, string>
|
|
12
|
+
|
|
13
|
+
beforeAll(async () => {
|
|
14
|
+
network = await TestNetwork.create({
|
|
15
|
+
dbPostgresSchema: 'bsky_internal_actor',
|
|
16
|
+
})
|
|
17
|
+
pdsAgent = network.pds.getAgent()
|
|
18
|
+
seedClient = network.getSeedClient()
|
|
19
|
+
|
|
20
|
+
await knownFollowersSeed(seedClient)
|
|
21
|
+
|
|
22
|
+
dids = seedClient.dids
|
|
23
|
+
|
|
24
|
+
/*
|
|
25
|
+
* Mix of blocks and non, mirroring the known-followers test setup so the
|
|
26
|
+
* social proof results exercise block filtering too.
|
|
27
|
+
*/
|
|
28
|
+
await pdsAgent.api.app.bsky.graph.block.create(
|
|
29
|
+
{ repo: dids.mix_view },
|
|
30
|
+
{ createdAt: new Date().toISOString(), subject: dids.mix_fp_block_res },
|
|
31
|
+
seedClient.getHeaders(dids.mix_view),
|
|
32
|
+
)
|
|
33
|
+
await pdsAgent.api.app.bsky.graph.block.create(
|
|
34
|
+
{ repo: dids.mix_sub_1 },
|
|
35
|
+
{ createdAt: new Date().toISOString(), subject: dids.mix_sp_block_res },
|
|
36
|
+
seedClient.getHeaders(dids.mix_sub_1),
|
|
37
|
+
)
|
|
38
|
+
|
|
39
|
+
await network.processAll()
|
|
40
|
+
})
|
|
41
|
+
|
|
42
|
+
afterAll(async () => {
|
|
43
|
+
await network.close()
|
|
44
|
+
})
|
|
45
|
+
|
|
46
|
+
describe('getProfiles', () => {
|
|
47
|
+
const getProfiles = async (
|
|
48
|
+
params: { dids: string[]; socialProof?: string[]; viewer?: string },
|
|
49
|
+
headers: Record<string, string> = network.bsky.adminAuthHeaders(),
|
|
50
|
+
) => {
|
|
51
|
+
const search = new URLSearchParams()
|
|
52
|
+
params.dids.forEach((did) => search.append('dids', did))
|
|
53
|
+
params.socialProof?.forEach((did) => search.append('socialProof', did))
|
|
54
|
+
if (params.viewer) search.append('viewer', params.viewer)
|
|
55
|
+
const res = await fetch(
|
|
56
|
+
`${network.bsky.url}/xrpc/internal.bsky.actor.getProfiles?${search.toString()}`,
|
|
57
|
+
{ headers },
|
|
58
|
+
)
|
|
59
|
+
return {
|
|
60
|
+
status: res.status,
|
|
61
|
+
body: (await res.json()) as {
|
|
62
|
+
profiles: AppBskyActorDefs.ProfileViewDetailed[]
|
|
63
|
+
},
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
it('requires role auth, rejecting standard user auth', async () => {
|
|
68
|
+
const userHeaders = await network.serviceHeaders(
|
|
69
|
+
dids.mix_view,
|
|
70
|
+
'internal.bsky.actor.getProfiles',
|
|
71
|
+
)
|
|
72
|
+
const { status } = await getProfiles(
|
|
73
|
+
{ dids: [dids.mix_sub_1] },
|
|
74
|
+
userHeaders,
|
|
75
|
+
)
|
|
76
|
+
expect(status).toBe(401)
|
|
77
|
+
})
|
|
78
|
+
|
|
79
|
+
it('returns all profiles, with social proof only for the requested subset', async () => {
|
|
80
|
+
const { status, body } = await getProfiles({
|
|
81
|
+
dids: [dids.mix_sub_1, dids.mix_sub_2, dids.mix_sub_3],
|
|
82
|
+
socialProof: [dids.mix_sub_1],
|
|
83
|
+
viewer: dids.mix_view,
|
|
84
|
+
})
|
|
85
|
+
expect(status).toBe(200)
|
|
86
|
+
expect(body.profiles).toHaveLength(3)
|
|
87
|
+
|
|
88
|
+
const [sub_1, sub_2, sub_3] = body.profiles
|
|
89
|
+
expect(sub_1.viewer?.knownFollowers?.count).toBe(3)
|
|
90
|
+
expect(sub_1.viewer?.knownFollowers?.followers).toHaveLength(1)
|
|
91
|
+
expect(sub_2.viewer?.knownFollowers).toBeUndefined()
|
|
92
|
+
expect(sub_3.viewer?.knownFollowers).toBeUndefined()
|
|
93
|
+
})
|
|
94
|
+
|
|
95
|
+
it('ignores socialProof dids that are not in dids', async () => {
|
|
96
|
+
const { status, body } = await getProfiles({
|
|
97
|
+
dids: [dids.mix_sub_1],
|
|
98
|
+
socialProof: [dids.mix_sub_1, dids.mix_sub_2],
|
|
99
|
+
viewer: dids.mix_view,
|
|
100
|
+
})
|
|
101
|
+
expect(status).toBe(200)
|
|
102
|
+
expect(body.profiles).toHaveLength(1)
|
|
103
|
+
expect(body.profiles[0].did).toBe(dids.mix_sub_1)
|
|
104
|
+
expect(body.profiles[0].viewer?.knownFollowers?.count).toBe(3)
|
|
105
|
+
})
|
|
106
|
+
|
|
107
|
+
it('returns no social proof when socialProof is omitted', async () => {
|
|
108
|
+
const { status, body } = await getProfiles({
|
|
109
|
+
dids: [dids.mix_sub_1, dids.mix_sub_2],
|
|
110
|
+
viewer: dids.mix_view,
|
|
111
|
+
})
|
|
112
|
+
expect(status).toBe(200)
|
|
113
|
+
expect(body.profiles).toHaveLength(2)
|
|
114
|
+
for (const profile of body.profiles) {
|
|
115
|
+
expect(profile.viewer?.knownFollowers).toBeUndefined()
|
|
116
|
+
}
|
|
117
|
+
})
|
|
118
|
+
|
|
119
|
+
it('returns no viewer state when viewer is omitted', async () => {
|
|
120
|
+
const { status, body } = await getProfiles({
|
|
121
|
+
dids: [dids.mix_sub_1],
|
|
122
|
+
socialProof: [dids.mix_sub_1],
|
|
123
|
+
})
|
|
124
|
+
expect(status).toBe(200)
|
|
125
|
+
expect(body.profiles).toHaveLength(1)
|
|
126
|
+
expect(body.profiles[0].viewer).toBeUndefined()
|
|
127
|
+
})
|
|
128
|
+
})
|
|
129
|
+
})
|