@atproto/bsky 0.0.70 → 0.0.71

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atproto/bsky",
3
- "version": "0.0.70",
3
+ "version": "0.0.71",
4
4
  "license": "MIT",
5
5
  "description": "Reference implementation of app.bsky App View (Bluesky API)",
6
6
  "keywords": [
@@ -40,7 +40,7 @@
40
40
  "structured-headers": "^1.0.1",
41
41
  "typed-emitter": "^2.1.0",
42
42
  "uint8arrays": "3.0.0",
43
- "@atproto/api": "^0.12.26",
43
+ "@atproto/api": "^0.12.27",
44
44
  "@atproto/common": "^0.4.1",
45
45
  "@atproto/crypto": "^0.4.0",
46
46
  "@atproto/identity": "^0.4.0",
@@ -62,9 +62,9 @@
62
62
  "axios": "^0.27.2",
63
63
  "jest": "^28.1.2",
64
64
  "ts-node": "^10.8.2",
65
- "@atproto/api": "^0.12.26",
65
+ "@atproto/api": "^0.12.27",
66
66
  "@atproto/lex-cli": "^0.4.0",
67
- "@atproto/pds": "^0.4.43",
67
+ "@atproto/pds": "^0.4.44",
68
68
  "@atproto/xrpc": "^0.5.0"
69
69
  },
70
70
  "scripts": {
package/proto/bsky.proto CHANGED
@@ -122,6 +122,14 @@ message GetThreadGateRecordsResponse {
122
122
  repeated Record records = 1;
123
123
  }
124
124
 
125
+ message GetDetachRecordsRequest {
126
+ repeated string uris = 1;
127
+ }
128
+
129
+ message GetDetachRecordsResponse {
130
+ repeated Record records = 1;
131
+ }
132
+
125
133
  message GetLabelerRecordsRequest {
126
134
  repeated string uris = 1;
127
135
  }
@@ -1068,6 +1076,7 @@ service Service {
1068
1076
  rpc GetActorChatDeclarationRecords(GetActorChatDeclarationRecordsRequest) returns (GetActorChatDeclarationRecordsResponse);
1069
1077
  rpc GetRepostRecords(GetRepostRecordsRequest) returns (GetRepostRecordsResponse);
1070
1078
  rpc GetThreadGateRecords(GetThreadGateRecordsRequest) returns (GetThreadGateRecordsResponse);
1079
+ rpc GetDetachRecords(GetDetachRecordsRequest) returns (GetDetachRecordsResponse);
1071
1080
  rpc GetLabelerRecords(GetLabelerRecordsRequest) returns (GetLabelerRecordsResponse);
1072
1081
  rpc GetStarterPackRecords(GetStarterPackRecordsRequest) returns (GetStarterPackRecordsResponse);
1073
1082
 
@@ -5596,6 +5596,42 @@ export const schemaDict = {
5596
5596
  },
5597
5597
  },
5598
5598
  },
5599
+ AppBskyFeedDetach: {
5600
+ lexicon: 1,
5601
+ id: 'app.bsky.feed.detach',
5602
+ defs: {
5603
+ main: {
5604
+ type: 'record',
5605
+ key: 'tid',
5606
+ description:
5607
+ 'Record defining post URIs detached from a root post. The record key (rkey) of the detach record must match the record key of the root post in question, and that record must be in the same repository.',
5608
+ record: {
5609
+ type: 'object',
5610
+ required: ['post', 'targets', 'updatedAt'],
5611
+ properties: {
5612
+ post: {
5613
+ type: 'string',
5614
+ format: 'at-uri',
5615
+ description: 'Reference (AT-URI) to the post record.',
5616
+ },
5617
+ targets: {
5618
+ type: 'array',
5619
+ maxLength: 50,
5620
+ items: {
5621
+ type: 'string',
5622
+ format: 'at-uri',
5623
+ },
5624
+ description: 'List of detached post URIs.',
5625
+ },
5626
+ updatedAt: {
5627
+ type: 'string',
5628
+ format: 'datetime',
5629
+ },
5630
+ },
5631
+ },
5632
+ },
5633
+ },
5634
+ },
5599
5635
  AppBskyFeedGenerator: {
5600
5636
  lexicon: 1,
5601
5637
  id: 'app.bsky.feed.generator',
@@ -10044,6 +10080,7 @@ export const ids = {
10044
10080
  AppBskyEmbedRecordWithMedia: 'app.bsky.embed.recordWithMedia',
10045
10081
  AppBskyFeedDefs: 'app.bsky.feed.defs',
10046
10082
  AppBskyFeedDescribeFeedGenerator: 'app.bsky.feed.describeFeedGenerator',
10083
+ AppBskyFeedDetach: 'app.bsky.feed.detach',
10047
10084
  AppBskyFeedGenerator: 'app.bsky.feed.generator',
10048
10085
  AppBskyFeedGetActorFeeds: 'app.bsky.feed.getActorFeeds',
10049
10086
  AppBskyFeedGetActorLikes: 'app.bsky.feed.getActorLikes',
@@ -0,0 +1,29 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { ValidationResult, BlobRef } from '@atproto/lexicon'
5
+ import { lexicons } from '../../../../lexicons'
6
+ import { isObj, hasProp } from '../../../../util'
7
+ import { CID } from 'multiformats/cid'
8
+
9
+ export interface Record {
10
+ /** Reference (AT-URI) to the post record. */
11
+ post: string
12
+ /** List of detached post URIs. */
13
+ targets: string[]
14
+ updatedAt: string
15
+ [k: string]: unknown
16
+ }
17
+
18
+ export function isRecord(v: unknown): v is Record {
19
+ return (
20
+ isObj(v) &&
21
+ hasProp(v, '$type') &&
22
+ (v.$type === 'app.bsky.feed.detach#main' ||
23
+ v.$type === 'app.bsky.feed.detach')
24
+ )
25
+ }
26
+
27
+ export function validateRecord(v: unknown): ValidationResult {
28
+ return lexicons.validate('app.bsky.feed.detach#main', v)
29
+ }
@@ -66,6 +66,8 @@ import {
66
66
  GetBlocksResponse,
67
67
  GetCountsForUsersRequest,
68
68
  GetCountsForUsersResponse,
69
+ GetDetachRecordsRequest,
70
+ GetDetachRecordsResponse,
69
71
  GetDidsByHandlesRequest,
70
72
  GetDidsByHandlesResponse,
71
73
  GetFeedGeneratorRecordsRequest,
@@ -309,6 +311,15 @@ export const Service = {
309
311
  O: GetThreadGateRecordsResponse,
310
312
  kind: MethodKind.Unary,
311
313
  },
314
+ /**
315
+ * @generated from rpc bsky.Service.GetDetachRecords
316
+ */
317
+ getDetachRecords: {
318
+ name: 'GetDetachRecords',
319
+ I: GetDetachRecordsRequest,
320
+ O: GetDetachRecordsResponse,
321
+ kind: MethodKind.Unary,
322
+ },
312
323
  /**
313
324
  * @generated from rpc bsky.Service.GetLabelerRecords
314
325
  */
@@ -1608,6 +1608,122 @@ export class GetThreadGateRecordsResponse extends Message<GetThreadGateRecordsRe
1608
1608
  }
1609
1609
  }
1610
1610
 
1611
+ /**
1612
+ * @generated from message bsky.GetDetachRecordsRequest
1613
+ */
1614
+ export class GetDetachRecordsRequest extends Message<GetDetachRecordsRequest> {
1615
+ /**
1616
+ * @generated from field: repeated string uris = 1;
1617
+ */
1618
+ uris: string[] = []
1619
+
1620
+ constructor(data?: PartialMessage<GetDetachRecordsRequest>) {
1621
+ super()
1622
+ proto3.util.initPartial(data, this)
1623
+ }
1624
+
1625
+ static readonly runtime: typeof proto3 = proto3
1626
+ static readonly typeName = 'bsky.GetDetachRecordsRequest'
1627
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
1628
+ {
1629
+ no: 1,
1630
+ name: 'uris',
1631
+ kind: 'scalar',
1632
+ T: 9 /* ScalarType.STRING */,
1633
+ repeated: true,
1634
+ },
1635
+ ])
1636
+
1637
+ static fromBinary(
1638
+ bytes: Uint8Array,
1639
+ options?: Partial<BinaryReadOptions>,
1640
+ ): GetDetachRecordsRequest {
1641
+ return new GetDetachRecordsRequest().fromBinary(bytes, options)
1642
+ }
1643
+
1644
+ static fromJson(
1645
+ jsonValue: JsonValue,
1646
+ options?: Partial<JsonReadOptions>,
1647
+ ): GetDetachRecordsRequest {
1648
+ return new GetDetachRecordsRequest().fromJson(jsonValue, options)
1649
+ }
1650
+
1651
+ static fromJsonString(
1652
+ jsonString: string,
1653
+ options?: Partial<JsonReadOptions>,
1654
+ ): GetDetachRecordsRequest {
1655
+ return new GetDetachRecordsRequest().fromJsonString(jsonString, options)
1656
+ }
1657
+
1658
+ static equals(
1659
+ a:
1660
+ | GetDetachRecordsRequest
1661
+ | PlainMessage<GetDetachRecordsRequest>
1662
+ | undefined,
1663
+ b:
1664
+ | GetDetachRecordsRequest
1665
+ | PlainMessage<GetDetachRecordsRequest>
1666
+ | undefined,
1667
+ ): boolean {
1668
+ return proto3.util.equals(GetDetachRecordsRequest, a, b)
1669
+ }
1670
+ }
1671
+
1672
+ /**
1673
+ * @generated from message bsky.GetDetachRecordsResponse
1674
+ */
1675
+ export class GetDetachRecordsResponse extends Message<GetDetachRecordsResponse> {
1676
+ /**
1677
+ * @generated from field: repeated bsky.Record records = 1;
1678
+ */
1679
+ records: Record[] = []
1680
+
1681
+ constructor(data?: PartialMessage<GetDetachRecordsResponse>) {
1682
+ super()
1683
+ proto3.util.initPartial(data, this)
1684
+ }
1685
+
1686
+ static readonly runtime: typeof proto3 = proto3
1687
+ static readonly typeName = 'bsky.GetDetachRecordsResponse'
1688
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
1689
+ { no: 1, name: 'records', kind: 'message', T: Record, repeated: true },
1690
+ ])
1691
+
1692
+ static fromBinary(
1693
+ bytes: Uint8Array,
1694
+ options?: Partial<BinaryReadOptions>,
1695
+ ): GetDetachRecordsResponse {
1696
+ return new GetDetachRecordsResponse().fromBinary(bytes, options)
1697
+ }
1698
+
1699
+ static fromJson(
1700
+ jsonValue: JsonValue,
1701
+ options?: Partial<JsonReadOptions>,
1702
+ ): GetDetachRecordsResponse {
1703
+ return new GetDetachRecordsResponse().fromJson(jsonValue, options)
1704
+ }
1705
+
1706
+ static fromJsonString(
1707
+ jsonString: string,
1708
+ options?: Partial<JsonReadOptions>,
1709
+ ): GetDetachRecordsResponse {
1710
+ return new GetDetachRecordsResponse().fromJsonString(jsonString, options)
1711
+ }
1712
+
1713
+ static equals(
1714
+ a:
1715
+ | GetDetachRecordsResponse
1716
+ | PlainMessage<GetDetachRecordsResponse>
1717
+ | undefined,
1718
+ b:
1719
+ | GetDetachRecordsResponse
1720
+ | PlainMessage<GetDetachRecordsResponse>
1721
+ | undefined,
1722
+ ): boolean {
1723
+ return proto3.util.equals(GetDetachRecordsResponse, a, b)
1724
+ }
1725
+ }
1726
+
1611
1727
  /**
1612
1728
  * @generated from message bsky.GetLabelerRecordsRequest
1613
1729
  */