@atproto/api 0.9.2 → 0.9.4

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 CHANGED
@@ -1,5 +1,18 @@
1
1
  # @atproto/api
2
2
 
3
+ ## 0.9.4
4
+
5
+ ### Patch Changes
6
+
7
+ - [#2086](https://github.com/bluesky-social/atproto/pull/2086) [`4171c04a`](https://github.com/bluesky-social/atproto/commit/4171c04ad81c5734a4558bc41fa1c4f3a1aba18c) Thanks [@estrattonbailey](https://github.com/estrattonbailey)! - Add `setInterestsPref` method to BskyAgent, and `interests` prop to
8
+ `getPreferences` response.
9
+
10
+ ## 0.9.3
11
+
12
+ ### Patch Changes
13
+
14
+ - [#2081](https://github.com/bluesky-social/atproto/pull/2081) [`5368245a`](https://github.com/bluesky-social/atproto/commit/5368245a6ef7095c86ad166fb04ff9bef27c3c3e) Thanks [@estrattonbailey](https://github.com/estrattonbailey)! - Add unspecced route for new onboarding `app.bsky.unspecced.getTaggedSuggestions`
15
+
3
16
  ## 0.9.2
4
17
 
5
18
  ### Patch Changes
@@ -1,6 +1,6 @@
1
1
  import { AtpAgent } from './agent';
2
2
  import { AppBskyFeedPost, AppBskyActorProfile } from './client';
3
- import { BskyPreferences, BskyLabelPreference, BskyFeedViewPreference, BskyThreadViewPreference } from './types';
3
+ import { BskyPreferences, BskyLabelPreference, BskyFeedViewPreference, BskyThreadViewPreference, BskyInterestsPreference } from './types';
4
4
  declare global {
5
5
  interface Array<T> {
6
6
  findLast(predicate: (value: T, index: number, obj: T[]) => unknown, thisArg?: any): T;
@@ -84,4 +84,5 @@ export declare class BskyAgent extends AtpAgent {
84
84
  }): Promise<void>;
85
85
  setFeedViewPrefs(feed: string, pref: Partial<BskyFeedViewPreference>): Promise<void>;
86
86
  setThreadViewPrefs(pref: Partial<BskyThreadViewPreference>): Promise<void>;
87
+ setInterestsPref(pref: Partial<BskyInterestsPreference>): Promise<void>;
87
88
  }
@@ -110,6 +110,7 @@ import * as AppBskyGraphGetListBlocks from './types/app/bsky/graph/getListBlocks
110
110
  import * as AppBskyGraphGetListMutes from './types/app/bsky/graph/getListMutes';
111
111
  import * as AppBskyGraphGetLists from './types/app/bsky/graph/getLists';
112
112
  import * as AppBskyGraphGetMutes from './types/app/bsky/graph/getMutes';
113
+ import * as AppBskyGraphGetRelationships from './types/app/bsky/graph/getRelationships';
113
114
  import * as AppBskyGraphGetSuggestedFollowsByActor from './types/app/bsky/graph/getSuggestedFollowsByActor';
114
115
  import * as AppBskyGraphList from './types/app/bsky/graph/list';
115
116
  import * as AppBskyGraphListblock from './types/app/bsky/graph/listblock';
@@ -123,6 +124,7 @@ import * as AppBskyNotificationListNotifications from './types/app/bsky/notifica
123
124
  import * as AppBskyNotificationRegisterPush from './types/app/bsky/notification/registerPush';
124
125
  import * as AppBskyNotificationUpdateSeen from './types/app/bsky/notification/updateSeen';
125
126
  import * as AppBskyUnspeccedGetPopularFeedGenerators from './types/app/bsky/unspecced/getPopularFeedGenerators';
127
+ import * as AppBskyUnspeccedGetTaggedSuggestions from './types/app/bsky/unspecced/getTaggedSuggestions';
126
128
  import * as AppBskyUnspeccedGetTimelineSkeleton from './types/app/bsky/unspecced/getTimelineSkeleton';
127
129
  import * as AppBskyUnspeccedSearchActorsSkeleton from './types/app/bsky/unspecced/searchActorsSkeleton';
128
130
  import * as AppBskyUnspeccedSearchPostsSkeleton from './types/app/bsky/unspecced/searchPostsSkeleton';
@@ -251,6 +253,7 @@ export * as AppBskyGraphGetListBlocks from './types/app/bsky/graph/getListBlocks
251
253
  export * as AppBskyGraphGetListMutes from './types/app/bsky/graph/getListMutes';
252
254
  export * as AppBskyGraphGetLists from './types/app/bsky/graph/getLists';
253
255
  export * as AppBskyGraphGetMutes from './types/app/bsky/graph/getMutes';
256
+ export * as AppBskyGraphGetRelationships from './types/app/bsky/graph/getRelationships';
254
257
  export * as AppBskyGraphGetSuggestedFollowsByActor from './types/app/bsky/graph/getSuggestedFollowsByActor';
255
258
  export * as AppBskyGraphList from './types/app/bsky/graph/list';
256
259
  export * as AppBskyGraphListblock from './types/app/bsky/graph/listblock';
@@ -266,6 +269,7 @@ export * as AppBskyNotificationUpdateSeen from './types/app/bsky/notification/up
266
269
  export * as AppBskyRichtextFacet from './types/app/bsky/richtext/facet';
267
270
  export * as AppBskyUnspeccedDefs from './types/app/bsky/unspecced/defs';
268
271
  export * as AppBskyUnspeccedGetPopularFeedGenerators from './types/app/bsky/unspecced/getPopularFeedGenerators';
272
+ export * as AppBskyUnspeccedGetTaggedSuggestions from './types/app/bsky/unspecced/getTaggedSuggestions';
269
273
  export * as AppBskyUnspeccedGetTimelineSkeleton from './types/app/bsky/unspecced/getTimelineSkeleton';
270
274
  export * as AppBskyUnspeccedSearchActorsSkeleton from './types/app/bsky/unspecced/searchActorsSkeleton';
271
275
  export * as AppBskyUnspeccedSearchPostsSkeleton from './types/app/bsky/unspecced/searchPostsSkeleton';
@@ -620,6 +624,7 @@ export declare class AppBskyGraphNS {
620
624
  getListMutes(params?: AppBskyGraphGetListMutes.QueryParams, opts?: AppBskyGraphGetListMutes.CallOptions): Promise<AppBskyGraphGetListMutes.Response>;
621
625
  getLists(params?: AppBskyGraphGetLists.QueryParams, opts?: AppBskyGraphGetLists.CallOptions): Promise<AppBskyGraphGetLists.Response>;
622
626
  getMutes(params?: AppBskyGraphGetMutes.QueryParams, opts?: AppBskyGraphGetMutes.CallOptions): Promise<AppBskyGraphGetMutes.Response>;
627
+ getRelationships(params?: AppBskyGraphGetRelationships.QueryParams, opts?: AppBskyGraphGetRelationships.CallOptions): Promise<AppBskyGraphGetRelationships.Response>;
623
628
  getSuggestedFollowsByActor(params?: AppBskyGraphGetSuggestedFollowsByActor.QueryParams, opts?: AppBskyGraphGetSuggestedFollowsByActor.CallOptions): Promise<AppBskyGraphGetSuggestedFollowsByActor.Response>;
624
629
  muteActor(data?: AppBskyGraphMuteActor.InputSchema, opts?: AppBskyGraphMuteActor.CallOptions): Promise<AppBskyGraphMuteActor.Response>;
625
630
  muteActorList(data?: AppBskyGraphMuteActorList.InputSchema, opts?: AppBskyGraphMuteActorList.CallOptions): Promise<AppBskyGraphMuteActorList.Response>;
@@ -747,6 +752,7 @@ export declare class AppBskyUnspeccedNS {
747
752
  _service: AtpServiceClient;
748
753
  constructor(service: AtpServiceClient);
749
754
  getPopularFeedGenerators(params?: AppBskyUnspeccedGetPopularFeedGenerators.QueryParams, opts?: AppBskyUnspeccedGetPopularFeedGenerators.CallOptions): Promise<AppBskyUnspeccedGetPopularFeedGenerators.Response>;
755
+ getTaggedSuggestions(params?: AppBskyUnspeccedGetTaggedSuggestions.QueryParams, opts?: AppBskyUnspeccedGetTaggedSuggestions.CallOptions): Promise<AppBskyUnspeccedGetTaggedSuggestions.Response>;
750
756
  getTimelineSkeleton(params?: AppBskyUnspeccedGetTimelineSkeleton.QueryParams, opts?: AppBskyUnspeccedGetTimelineSkeleton.CallOptions): Promise<AppBskyUnspeccedGetTimelineSkeleton.Response>;
751
757
  searchActorsSkeleton(params?: AppBskyUnspeccedSearchActorsSkeleton.QueryParams, opts?: AppBskyUnspeccedSearchActorsSkeleton.CallOptions): Promise<AppBskyUnspeccedSearchActorsSkeleton.Response>;
752
758
  searchPostsSkeleton(params?: AppBskyUnspeccedSearchPostsSkeleton.QueryParams, opts?: AppBskyUnspeccedSearchPostsSkeleton.CallOptions): Promise<AppBskyUnspeccedSearchPostsSkeleton.Response>;
@@ -4344,6 +4344,22 @@ export declare const schemaDict: {
4344
4344
  };
4345
4345
  };
4346
4346
  };
4347
+ interestsPref: {
4348
+ type: string;
4349
+ required: string[];
4350
+ properties: {
4351
+ tags: {
4352
+ type: string;
4353
+ maxLength: number;
4354
+ items: {
4355
+ type: string;
4356
+ maxLength: number;
4357
+ maxGraphemes: number;
4358
+ };
4359
+ description: string;
4360
+ };
4361
+ };
4362
+ };
4347
4363
  };
4348
4364
  };
4349
4365
  AppBskyActorGetPreferences: {
@@ -6461,6 +6477,42 @@ export declare const schemaDict: {
6461
6477
  };
6462
6478
  };
6463
6479
  };
6480
+ notFoundActor: {
6481
+ type: string;
6482
+ description: string;
6483
+ required: string[];
6484
+ properties: {
6485
+ actor: {
6486
+ type: string;
6487
+ format: string;
6488
+ };
6489
+ notFound: {
6490
+ type: string;
6491
+ const: boolean;
6492
+ };
6493
+ };
6494
+ };
6495
+ relationship: {
6496
+ type: string;
6497
+ description: string;
6498
+ required: string[];
6499
+ properties: {
6500
+ did: {
6501
+ type: string;
6502
+ format: string;
6503
+ };
6504
+ following: {
6505
+ type: string;
6506
+ format: string;
6507
+ description: string;
6508
+ };
6509
+ followedBy: {
6510
+ type: string;
6511
+ format: string;
6512
+ description: string;
6513
+ };
6514
+ };
6515
+ };
6464
6516
  };
6465
6517
  };
6466
6518
  AppBskyGraphFollow: {
@@ -6864,6 +6916,58 @@ export declare const schemaDict: {
6864
6916
  };
6865
6917
  };
6866
6918
  };
6919
+ AppBskyGraphGetRelationships: {
6920
+ lexicon: number;
6921
+ id: string;
6922
+ defs: {
6923
+ main: {
6924
+ type: string;
6925
+ description: string;
6926
+ parameters: {
6927
+ type: string;
6928
+ required: string[];
6929
+ properties: {
6930
+ actor: {
6931
+ type: string;
6932
+ format: string;
6933
+ };
6934
+ others: {
6935
+ type: string;
6936
+ maxLength: number;
6937
+ items: {
6938
+ type: string;
6939
+ format: string;
6940
+ };
6941
+ };
6942
+ };
6943
+ };
6944
+ output: {
6945
+ encoding: string;
6946
+ schema: {
6947
+ type: string;
6948
+ required: string[];
6949
+ properties: {
6950
+ actor: {
6951
+ type: string;
6952
+ format: string;
6953
+ };
6954
+ relationships: {
6955
+ type: string;
6956
+ items: {
6957
+ type: string;
6958
+ refs: string[];
6959
+ };
6960
+ };
6961
+ };
6962
+ };
6963
+ };
6964
+ errors: {
6965
+ name: string;
6966
+ description: string;
6967
+ }[];
6968
+ };
6969
+ };
6970
+ };
6867
6971
  AppBskyGraphGetSuggestedFollowsByActor: {
6868
6972
  lexicon: number;
6869
6973
  id: string;
@@ -7423,6 +7527,53 @@ export declare const schemaDict: {
7423
7527
  };
7424
7528
  };
7425
7529
  };
7530
+ AppBskyUnspeccedGetTaggedSuggestions: {
7531
+ lexicon: number;
7532
+ id: string;
7533
+ defs: {
7534
+ main: {
7535
+ type: string;
7536
+ description: string;
7537
+ parameters: {
7538
+ type: string;
7539
+ properties: {};
7540
+ };
7541
+ output: {
7542
+ encoding: string;
7543
+ schema: {
7544
+ type: string;
7545
+ required: string[];
7546
+ properties: {
7547
+ suggestions: {
7548
+ type: string;
7549
+ items: {
7550
+ type: string;
7551
+ ref: string;
7552
+ };
7553
+ };
7554
+ };
7555
+ };
7556
+ };
7557
+ };
7558
+ suggestion: {
7559
+ type: string;
7560
+ required: string[];
7561
+ properties: {
7562
+ tag: {
7563
+ type: string;
7564
+ };
7565
+ subjectType: {
7566
+ type: string;
7567
+ knownValues: string[];
7568
+ };
7569
+ subject: {
7570
+ type: string;
7571
+ format: string;
7572
+ };
7573
+ };
7574
+ };
7575
+ };
7576
+ };
7426
7577
  AppBskyUnspeccedGetTimelineSkeleton: {
7427
7578
  lexicon: number;
7428
7579
  id: string;
@@ -7714,6 +7865,7 @@ export declare const ids: {
7714
7865
  AppBskyGraphGetListMutes: string;
7715
7866
  AppBskyGraphGetLists: string;
7716
7867
  AppBskyGraphGetMutes: string;
7868
+ AppBskyGraphGetRelationships: string;
7717
7869
  AppBskyGraphGetSuggestedFollowsByActor: string;
7718
7870
  AppBskyGraphList: string;
7719
7871
  AppBskyGraphListblock: string;
@@ -7729,6 +7881,7 @@ export declare const ids: {
7729
7881
  AppBskyRichtextFacet: string;
7730
7882
  AppBskyUnspeccedDefs: string;
7731
7883
  AppBskyUnspeccedGetPopularFeedGenerators: string;
7884
+ AppBskyUnspeccedGetTaggedSuggestions: string;
7732
7885
  AppBskyUnspeccedGetTimelineSkeleton: string;
7733
7886
  AppBskyUnspeccedSearchActorsSkeleton: string;
7734
7887
  AppBskyUnspeccedSearchPostsSkeleton: string;
@@ -54,7 +54,7 @@ export interface ViewerState {
54
54
  }
55
55
  export declare function isViewerState(v: unknown): v is ViewerState;
56
56
  export declare function validateViewerState(v: unknown): ValidationResult;
57
- export type Preferences = (AdultContentPref | ContentLabelPref | SavedFeedsPref | PersonalDetailsPref | FeedViewPref | ThreadViewPref | {
57
+ export type Preferences = (AdultContentPref | ContentLabelPref | SavedFeedsPref | PersonalDetailsPref | FeedViewPref | ThreadViewPref | InterestsPref | {
58
58
  $type: string;
59
59
  [k: string]: unknown;
60
60
  })[];
@@ -102,3 +102,9 @@ export interface ThreadViewPref {
102
102
  }
103
103
  export declare function isThreadViewPref(v: unknown): v is ThreadViewPref;
104
104
  export declare function validateThreadViewPref(v: unknown): ValidationResult;
105
+ export interface InterestsPref {
106
+ tags: string[];
107
+ [k: string]: unknown;
108
+ }
109
+ export declare function isInterestsPref(v: unknown): v is InterestsPref;
110
+ export declare function validateInterestsPref(v: unknown): ValidationResult;
@@ -45,3 +45,18 @@ export interface ListViewerState {
45
45
  }
46
46
  export declare function isListViewerState(v: unknown): v is ListViewerState;
47
47
  export declare function validateListViewerState(v: unknown): ValidationResult;
48
+ export interface NotFoundActor {
49
+ actor: string;
50
+ notFound: true;
51
+ [k: string]: unknown;
52
+ }
53
+ export declare function isNotFoundActor(v: unknown): v is NotFoundActor;
54
+ export declare function validateNotFoundActor(v: unknown): ValidationResult;
55
+ export interface Relationship {
56
+ did: string;
57
+ following?: string;
58
+ followedBy?: string;
59
+ [k: string]: unknown;
60
+ }
61
+ export declare function isRelationship(v: unknown): v is Relationship;
62
+ export declare function validateRelationship(v: unknown): ValidationResult;
@@ -0,0 +1,27 @@
1
+ import { Headers, XRPCError } from '@atproto/xrpc';
2
+ import * as AppBskyGraphDefs from './defs';
3
+ export interface QueryParams {
4
+ actor: string;
5
+ others?: string[];
6
+ }
7
+ export type InputSchema = undefined;
8
+ export interface OutputSchema {
9
+ actor?: string;
10
+ relationships: (AppBskyGraphDefs.Relationship | AppBskyGraphDefs.NotFoundActor | {
11
+ $type: string;
12
+ [k: string]: unknown;
13
+ })[];
14
+ [k: string]: unknown;
15
+ }
16
+ export interface CallOptions {
17
+ headers?: Headers;
18
+ }
19
+ export interface Response {
20
+ success: boolean;
21
+ headers: Headers;
22
+ data: OutputSchema;
23
+ }
24
+ export declare class ActorNotFoundError extends XRPCError {
25
+ constructor(src: XRPCError);
26
+ }
27
+ export declare function toKnownErr(e: any): any;
@@ -0,0 +1,26 @@
1
+ import { Headers } from '@atproto/xrpc';
2
+ import { ValidationResult } from '@atproto/lexicon';
3
+ export interface QueryParams {
4
+ }
5
+ export type InputSchema = undefined;
6
+ export interface OutputSchema {
7
+ suggestions: Suggestion[];
8
+ [k: string]: unknown;
9
+ }
10
+ export interface CallOptions {
11
+ headers?: Headers;
12
+ }
13
+ export interface Response {
14
+ success: boolean;
15
+ headers: Headers;
16
+ data: OutputSchema;
17
+ }
18
+ export declare function toKnownErr(e: any): any;
19
+ export interface Suggestion {
20
+ tag: string;
21
+ subjectType: 'actor' | 'feed' | (string & {});
22
+ subject: string;
23
+ [k: string]: unknown;
24
+ }
25
+ export declare function isSuggestion(v: unknown): v is Suggestion;
26
+ export declare function validateSuggestion(v: unknown): ValidationResult;