@atproto/api 0.12.27 → 0.12.28

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/api",
3
- "version": "0.12.27",
3
+ "version": "0.12.28",
4
4
  "license": "MIT",
5
5
  "description": "Client library for atproto and Bluesky",
6
6
  "keywords": [
@@ -101,7 +101,6 @@ import * as AppBskyEmbedRecord from './types/app/bsky/embed/record'
101
101
  import * as AppBskyEmbedRecordWithMedia from './types/app/bsky/embed/recordWithMedia'
102
102
  import * as AppBskyFeedDefs from './types/app/bsky/feed/defs'
103
103
  import * as AppBskyFeedDescribeFeedGenerator from './types/app/bsky/feed/describeFeedGenerator'
104
- import * as AppBskyFeedDetach from './types/app/bsky/feed/detach'
105
104
  import * as AppBskyFeedGenerator from './types/app/bsky/feed/generator'
106
105
  import * as AppBskyFeedGetActorFeeds from './types/app/bsky/feed/getActorFeeds'
107
106
  import * as AppBskyFeedGetActorLikes from './types/app/bsky/feed/getActorLikes'
@@ -299,7 +298,6 @@ export * as AppBskyEmbedRecord from './types/app/bsky/embed/record'
299
298
  export * as AppBskyEmbedRecordWithMedia from './types/app/bsky/embed/recordWithMedia'
300
299
  export * as AppBskyFeedDefs from './types/app/bsky/feed/defs'
301
300
  export * as AppBskyFeedDescribeFeedGenerator from './types/app/bsky/feed/describeFeedGenerator'
302
- export * as AppBskyFeedDetach from './types/app/bsky/feed/detach'
303
301
  export * as AppBskyFeedGenerator from './types/app/bsky/feed/generator'
304
302
  export * as AppBskyFeedGetActorFeeds from './types/app/bsky/feed/getActorFeeds'
305
303
  export * as AppBskyFeedGetActorLikes from './types/app/bsky/feed/getActorLikes'
@@ -1569,7 +1567,6 @@ export class AppBskyEmbedNS {
1569
1567
 
1570
1568
  export class AppBskyFeedNS {
1571
1569
  _service: AtpServiceClient
1572
- detach: DetachRecord
1573
1570
  generator: GeneratorRecord
1574
1571
  like: LikeRecord
1575
1572
  post: PostRecord
@@ -1578,7 +1575,6 @@ export class AppBskyFeedNS {
1578
1575
 
1579
1576
  constructor(service: AtpServiceClient) {
1580
1577
  this._service = service
1581
- this.detach = new DetachRecord(service)
1582
1578
  this.generator = new GeneratorRecord(service)
1583
1579
  this.like = new LikeRecord(service)
1584
1580
  this.post = new PostRecord(service)
@@ -1774,67 +1770,6 @@ export class AppBskyFeedNS {
1774
1770
  }
1775
1771
  }
1776
1772
 
1777
- export class DetachRecord {
1778
- _service: AtpServiceClient
1779
-
1780
- constructor(service: AtpServiceClient) {
1781
- this._service = service
1782
- }
1783
-
1784
- async list(
1785
- params: Omit<ComAtprotoRepoListRecords.QueryParams, 'collection'>,
1786
- ): Promise<{
1787
- cursor?: string
1788
- records: { uri: string; value: AppBskyFeedDetach.Record }[]
1789
- }> {
1790
- const res = await this._service.xrpc.call('com.atproto.repo.listRecords', {
1791
- collection: 'app.bsky.feed.detach',
1792
- ...params,
1793
- })
1794
- return res.data
1795
- }
1796
-
1797
- async get(
1798
- params: Omit<ComAtprotoRepoGetRecord.QueryParams, 'collection'>,
1799
- ): Promise<{ uri: string; cid: string; value: AppBskyFeedDetach.Record }> {
1800
- const res = await this._service.xrpc.call('com.atproto.repo.getRecord', {
1801
- collection: 'app.bsky.feed.detach',
1802
- ...params,
1803
- })
1804
- return res.data
1805
- }
1806
-
1807
- async create(
1808
- params: Omit<
1809
- ComAtprotoRepoCreateRecord.InputSchema,
1810
- 'collection' | 'record'
1811
- >,
1812
- record: AppBskyFeedDetach.Record,
1813
- headers?: Record<string, string>,
1814
- ): Promise<{ uri: string; cid: string }> {
1815
- record.$type = 'app.bsky.feed.detach'
1816
- const res = await this._service.xrpc.call(
1817
- 'com.atproto.repo.createRecord',
1818
- undefined,
1819
- { collection: 'app.bsky.feed.detach', ...params, record },
1820
- { encoding: 'application/json', headers },
1821
- )
1822
- return res.data
1823
- }
1824
-
1825
- async delete(
1826
- params: Omit<ComAtprotoRepoDeleteRecord.InputSchema, 'collection'>,
1827
- headers?: Record<string, string>,
1828
- ): Promise<void> {
1829
- await this._service.xrpc.call(
1830
- 'com.atproto.repo.deleteRecord',
1831
- undefined,
1832
- { collection: 'app.bsky.feed.detach', ...params },
1833
- { headers },
1834
- )
1835
- }
1836
- }
1837
-
1838
1773
  export class GeneratorRecord {
1839
1774
  _service: AtpServiceClient
1840
1775
 
@@ -5596,42 +5596,6 @@ 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
- },
5635
5599
  AppBskyFeedGenerator: {
5636
5600
  lexicon: 1,
5637
5601
  id: 'app.bsky.feed.generator',
@@ -11798,7 +11762,6 @@ export const ids = {
11798
11762
  AppBskyEmbedRecordWithMedia: 'app.bsky.embed.recordWithMedia',
11799
11763
  AppBskyFeedDefs: 'app.bsky.feed.defs',
11800
11764
  AppBskyFeedDescribeFeedGenerator: 'app.bsky.feed.describeFeedGenerator',
11801
- AppBskyFeedDetach: 'app.bsky.feed.detach',
11802
11765
  AppBskyFeedGenerator: 'app.bsky.feed.generator',
11803
11766
  AppBskyFeedGetActorFeeds: 'app.bsky.feed.getActorFeeds',
11804
11767
  AppBskyFeedGetActorLikes: 'app.bsky.feed.getActorLikes',
@@ -1,15 +0,0 @@
1
- /**
2
- * GENERATED CODE - DO NOT MODIFY
3
- */
4
- import { ValidationResult } from '@atproto/lexicon';
5
- export interface Record {
6
- /** Reference (AT-URI) to the post record. */
7
- post: string;
8
- /** List of detached post URIs. */
9
- targets: string[];
10
- updatedAt: string;
11
- [k: string]: unknown;
12
- }
13
- export declare function isRecord(v: unknown): v is Record;
14
- export declare function validateRecord(v: unknown): ValidationResult;
15
- //# sourceMappingURL=detach.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"detach.d.ts","sourceRoot":"","sources":["../../../../../../src/client/types/app/bsky/feed/detach.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,gBAAgB,EAAW,MAAM,kBAAkB,CAAA;AAK5D,MAAM,WAAW,MAAM;IACrB,6CAA6C;IAC7C,IAAI,EAAE,MAAM,CAAA;IACZ,kCAAkC;IAClC,OAAO,EAAE,MAAM,EAAE,CAAA;IACjB,SAAS,EAAE,MAAM,CAAA;IACjB,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;CACrB;AAED,wBAAgB,QAAQ,CAAC,CAAC,EAAE,OAAO,GAAG,CAAC,IAAI,MAAM,CAOhD;AAED,wBAAgB,cAAc,CAAC,CAAC,EAAE,OAAO,GAAG,gBAAgB,CAE3D"}
@@ -1,17 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.validateRecord = exports.isRecord = void 0;
4
- const util_1 = require("../../../../util");
5
- const lexicons_1 = require("../../../../lexicons");
6
- function isRecord(v) {
7
- return ((0, util_1.isObj)(v) &&
8
- (0, util_1.hasProp)(v, '$type') &&
9
- (v.$type === 'app.bsky.feed.detach#main' ||
10
- v.$type === 'app.bsky.feed.detach'));
11
- }
12
- exports.isRecord = isRecord;
13
- function validateRecord(v) {
14
- return lexicons_1.lexicons.validate('app.bsky.feed.detach#main', v);
15
- }
16
- exports.validateRecord = validateRecord;
17
- //# sourceMappingURL=detach.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"detach.js","sourceRoot":"","sources":["../../../../../../src/client/types/app/bsky/feed/detach.ts"],"names":[],"mappings":";;;AAIA,2CAAiD;AACjD,mDAA+C;AAY/C,SAAgB,QAAQ,CAAC,CAAU;IACjC,OAAO,CACL,IAAA,YAAK,EAAC,CAAC,CAAC;QACR,IAAA,cAAO,EAAC,CAAC,EAAE,OAAO,CAAC;QACnB,CAAC,CAAC,CAAC,KAAK,KAAK,2BAA2B;YACtC,CAAC,CAAC,KAAK,KAAK,sBAAsB,CAAC,CACtC,CAAA;AACH,CAAC;AAPD,4BAOC;AAED,SAAgB,cAAc,CAAC,CAAU;IACvC,OAAO,mBAAQ,CAAC,QAAQ,CAAC,2BAA2B,EAAE,CAAC,CAAC,CAAA;AAC1D,CAAC;AAFD,wCAEC"}
@@ -1,29 +0,0 @@
1
- /**
2
- * GENERATED CODE - DO NOT MODIFY
3
- */
4
- import { ValidationResult, BlobRef } from '@atproto/lexicon'
5
- import { isObj, hasProp } from '../../../../util'
6
- import { lexicons } from '../../../../lexicons'
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
- }