@atproto/api 0.3.2 → 0.3.3

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.
@@ -55,10 +55,12 @@ import * as ComAtprotoSyncListBlobs from './types/com/atproto/sync/listBlobs';
55
55
  import * as ComAtprotoSyncListRepos from './types/com/atproto/sync/listRepos';
56
56
  import * as ComAtprotoSyncNotifyOfUpdate from './types/com/atproto/sync/notifyOfUpdate';
57
57
  import * as ComAtprotoSyncRequestCrawl from './types/com/atproto/sync/requestCrawl';
58
+ import * as AppBskyActorGetPreferences from './types/app/bsky/actor/getPreferences';
58
59
  import * as AppBskyActorGetProfile from './types/app/bsky/actor/getProfile';
59
60
  import * as AppBskyActorGetProfiles from './types/app/bsky/actor/getProfiles';
60
61
  import * as AppBskyActorGetSuggestions from './types/app/bsky/actor/getSuggestions';
61
62
  import * as AppBskyActorProfile from './types/app/bsky/actor/profile';
63
+ import * as AppBskyActorPutPreferences from './types/app/bsky/actor/putPreferences';
62
64
  import * as AppBskyActorSearchActors from './types/app/bsky/actor/searchActors';
63
65
  import * as AppBskyActorSearchActorsTypeahead from './types/app/bsky/actor/searchActorsTypeahead';
64
66
  import * as AppBskyFeedGetAuthorFeed from './types/app/bsky/feed/getAuthorFeed';
@@ -153,10 +155,12 @@ export * as ComAtprotoSyncNotifyOfUpdate from './types/com/atproto/sync/notifyOf
153
155
  export * as ComAtprotoSyncRequestCrawl from './types/com/atproto/sync/requestCrawl';
154
156
  export * as ComAtprotoSyncSubscribeRepos from './types/com/atproto/sync/subscribeRepos';
155
157
  export * as AppBskyActorDefs from './types/app/bsky/actor/defs';
158
+ export * as AppBskyActorGetPreferences from './types/app/bsky/actor/getPreferences';
156
159
  export * as AppBskyActorGetProfile from './types/app/bsky/actor/getProfile';
157
160
  export * as AppBskyActorGetProfiles from './types/app/bsky/actor/getProfiles';
158
161
  export * as AppBskyActorGetSuggestions from './types/app/bsky/actor/getSuggestions';
159
162
  export * as AppBskyActorProfile from './types/app/bsky/actor/profile';
163
+ export * as AppBskyActorPutPreferences from './types/app/bsky/actor/putPreferences';
160
164
  export * as AppBskyActorSearchActors from './types/app/bsky/actor/searchActors';
161
165
  export * as AppBskyActorSearchActorsTypeahead from './types/app/bsky/actor/searchActorsTypeahead';
162
166
  export * as AppBskyEmbedExternal from './types/app/bsky/embed/external';
@@ -344,9 +348,11 @@ export declare class ActorNS {
344
348
  _service: AtpServiceClient;
345
349
  profile: ProfileRecord;
346
350
  constructor(service: AtpServiceClient);
351
+ getPreferences(params?: AppBskyActorGetPreferences.QueryParams, opts?: AppBskyActorGetPreferences.CallOptions): Promise<AppBskyActorGetPreferences.Response>;
347
352
  getProfile(params?: AppBskyActorGetProfile.QueryParams, opts?: AppBskyActorGetProfile.CallOptions): Promise<AppBskyActorGetProfile.Response>;
348
353
  getProfiles(params?: AppBskyActorGetProfiles.QueryParams, opts?: AppBskyActorGetProfiles.CallOptions): Promise<AppBskyActorGetProfiles.Response>;
349
354
  getSuggestions(params?: AppBskyActorGetSuggestions.QueryParams, opts?: AppBskyActorGetSuggestions.CallOptions): Promise<AppBskyActorGetSuggestions.Response>;
355
+ putPreferences(data?: AppBskyActorPutPreferences.InputSchema, opts?: AppBskyActorPutPreferences.CallOptions): Promise<AppBskyActorPutPreferences.Response>;
350
356
  searchActors(params?: AppBskyActorSearchActors.QueryParams, opts?: AppBskyActorSearchActors.CallOptions): Promise<AppBskyActorSearchActors.Response>;
351
357
  searchActorsTypeahead(params?: AppBskyActorSearchActorsTypeahead.QueryParams, opts?: AppBskyActorSearchActorsTypeahead.CallOptions): Promise<AppBskyActorSearchActorsTypeahead.Response>;
352
358
  }
@@ -3278,6 +3278,63 @@ export declare const schemaDict: {
3278
3278
  };
3279
3279
  };
3280
3280
  };
3281
+ preferences: {
3282
+ type: string;
3283
+ items: {
3284
+ type: string;
3285
+ refs: string[];
3286
+ };
3287
+ };
3288
+ adultContentPref: {
3289
+ type: string;
3290
+ required: string[];
3291
+ properties: {
3292
+ enabled: {
3293
+ type: string;
3294
+ default: boolean;
3295
+ };
3296
+ };
3297
+ };
3298
+ contentLabelPref: {
3299
+ type: string;
3300
+ required: string[];
3301
+ properties: {
3302
+ label: {
3303
+ type: string;
3304
+ };
3305
+ visibility: {
3306
+ type: string;
3307
+ knownValues: string[];
3308
+ };
3309
+ };
3310
+ };
3311
+ };
3312
+ };
3313
+ AppBskyActorGetPreferences: {
3314
+ lexicon: number;
3315
+ id: string;
3316
+ defs: {
3317
+ main: {
3318
+ type: string;
3319
+ description: string;
3320
+ parameters: {
3321
+ type: string;
3322
+ properties: {};
3323
+ };
3324
+ output: {
3325
+ encoding: string;
3326
+ schema: {
3327
+ type: string;
3328
+ required: string[];
3329
+ properties: {
3330
+ preferences: {
3331
+ type: string;
3332
+ ref: string;
3333
+ };
3334
+ };
3335
+ };
3336
+ };
3337
+ };
3281
3338
  };
3282
3339
  };
3283
3340
  AppBskyActorGetProfile: {
@@ -3423,6 +3480,29 @@ export declare const schemaDict: {
3423
3480
  };
3424
3481
  };
3425
3482
  };
3483
+ AppBskyActorPutPreferences: {
3484
+ lexicon: number;
3485
+ id: string;
3486
+ defs: {
3487
+ main: {
3488
+ type: string;
3489
+ description: string;
3490
+ input: {
3491
+ encoding: string;
3492
+ schema: {
3493
+ type: string;
3494
+ required: string[];
3495
+ properties: {
3496
+ preferences: {
3497
+ type: string;
3498
+ ref: string;
3499
+ };
3500
+ };
3501
+ };
3502
+ };
3503
+ };
3504
+ };
3505
+ };
3426
3506
  AppBskyActorSearchActors: {
3427
3507
  lexicon: number;
3428
3508
  id: string;
@@ -5355,10 +5435,12 @@ export declare const ids: {
5355
5435
  ComAtprotoSyncRequestCrawl: string;
5356
5436
  ComAtprotoSyncSubscribeRepos: string;
5357
5437
  AppBskyActorDefs: string;
5438
+ AppBskyActorGetPreferences: string;
5358
5439
  AppBskyActorGetProfile: string;
5359
5440
  AppBskyActorGetProfiles: string;
5360
5441
  AppBskyActorGetSuggestions: string;
5361
5442
  AppBskyActorProfile: string;
5443
+ AppBskyActorPutPreferences: string;
5362
5444
  AppBskyActorSearchActors: string;
5363
5445
  AppBskyActorSearchActorsTypeahead: string;
5364
5446
  AppBskyEmbedExternal: string;
@@ -53,3 +53,20 @@ export interface ViewerState {
53
53
  }
54
54
  export declare function isViewerState(v: unknown): v is ViewerState;
55
55
  export declare function validateViewerState(v: unknown): ValidationResult;
56
+ export declare type Preferences = (AdultContentPref | ContentLabelPref | {
57
+ $type: string;
58
+ [k: string]: unknown;
59
+ })[];
60
+ export interface AdultContentPref {
61
+ enabled: boolean;
62
+ [k: string]: unknown;
63
+ }
64
+ export declare function isAdultContentPref(v: unknown): v is AdultContentPref;
65
+ export declare function validateAdultContentPref(v: unknown): ValidationResult;
66
+ export interface ContentLabelPref {
67
+ label: string;
68
+ visibility: 'show' | 'warn' | 'hide' | (string & {});
69
+ [k: string]: unknown;
70
+ }
71
+ export declare function isContentLabelPref(v: unknown): v is ContentLabelPref;
72
+ export declare function validateContentLabelPref(v: unknown): ValidationResult;
@@ -0,0 +1,18 @@
1
+ import { Headers } from '@atproto/xrpc';
2
+ import * as AppBskyActorDefs from './defs';
3
+ export interface QueryParams {
4
+ }
5
+ export declare type InputSchema = undefined;
6
+ export interface OutputSchema {
7
+ preferences: AppBskyActorDefs.Preferences;
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;
@@ -0,0 +1,18 @@
1
+ import { Headers } from '@atproto/xrpc';
2
+ import * as AppBskyActorDefs from './defs';
3
+ export interface QueryParams {
4
+ }
5
+ export interface InputSchema {
6
+ preferences: AppBskyActorDefs.Preferences;
7
+ [k: string]: unknown;
8
+ }
9
+ export interface CallOptions {
10
+ headers?: Headers;
11
+ qp?: QueryParams;
12
+ encoding: 'application/json';
13
+ }
14
+ export interface Response {
15
+ success: boolean;
16
+ headers: Headers;
17
+ }
18
+ export declare function toKnownErr(e: any): any;