@atproto/api 0.18.15 → 0.18.16

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.
Files changed (38) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/client/index.d.ts +18 -0
  3. package/dist/client/index.d.ts.map +1 -1
  4. package/dist/client/index.js +49 -8
  5. package/dist/client/index.js.map +1 -1
  6. package/dist/client/lexicons.d.ts +706 -0
  7. package/dist/client/lexicons.d.ts.map +1 -1
  8. package/dist/client/lexicons.js +365 -0
  9. package/dist/client/lexicons.js.map +1 -1
  10. package/dist/client/types/app/bsky/draft/createDraft.d.ts +29 -0
  11. package/dist/client/types/app/bsky/draft/createDraft.d.ts.map +1 -0
  12. package/dist/client/types/app/bsky/draft/createDraft.js +26 -0
  13. package/dist/client/types/app/bsky/draft/createDraft.js.map +1 -0
  14. package/dist/client/types/app/bsky/draft/defs.d.ts +106 -0
  15. package/dist/client/types/app/bsky/draft/defs.d.ts.map +1 -0
  16. package/dist/client/types/app/bsky/draft/defs.js +97 -0
  17. package/dist/client/types/app/bsky/draft/defs.js.map +1 -0
  18. package/dist/client/types/app/bsky/draft/deleteDraft.d.ts +20 -0
  19. package/dist/client/types/app/bsky/draft/deleteDraft.d.ts.map +1 -0
  20. package/dist/client/types/app/bsky/draft/deleteDraft.js +11 -0
  21. package/dist/client/types/app/bsky/draft/deleteDraft.js.map +1 -0
  22. package/dist/client/types/app/bsky/draft/getDrafts.d.ts +25 -0
  23. package/dist/client/types/app/bsky/draft/getDrafts.d.ts.map +1 -0
  24. package/dist/client/types/app/bsky/draft/getDrafts.js +11 -0
  25. package/dist/client/types/app/bsky/draft/getDrafts.js.map +1 -0
  26. package/dist/client/types/app/bsky/draft/updateDraft.d.ts +21 -0
  27. package/dist/client/types/app/bsky/draft/updateDraft.d.ts.map +1 -0
  28. package/dist/client/types/app/bsky/draft/updateDraft.js +11 -0
  29. package/dist/client/types/app/bsky/draft/updateDraft.js.map +1 -0
  30. package/package.json +3 -3
  31. package/src/client/index.ts +57 -0
  32. package/src/client/lexicons.ts +374 -0
  33. package/src/client/types/app/bsky/draft/createDraft.ts +55 -0
  34. package/src/client/types/app/bsky/draft/defs.ts +208 -0
  35. package/src/client/types/app/bsky/draft/deleteDraft.ts +38 -0
  36. package/src/client/types/app/bsky/draft/getDrafts.ts +43 -0
  37. package/src/client/types/app/bsky/draft/updateDraft.ts +39 -0
  38. package/tsconfig.build.tsbuildinfo +1 -1
@@ -0,0 +1,29 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { HeadersMap, XRPCError } from '@atproto/xrpc';
5
+ import type * as AppBskyDraftDefs from './defs.js';
6
+ export type QueryParams = {};
7
+ export interface InputSchema {
8
+ draft: AppBskyDraftDefs.Draft;
9
+ }
10
+ export interface OutputSchema {
11
+ /** The ID of the created draft. */
12
+ id: string;
13
+ }
14
+ export interface CallOptions {
15
+ signal?: AbortSignal;
16
+ headers?: HeadersMap;
17
+ qp?: QueryParams;
18
+ encoding?: 'application/json';
19
+ }
20
+ export interface Response {
21
+ success: boolean;
22
+ headers: HeadersMap;
23
+ data: OutputSchema;
24
+ }
25
+ export declare class DraftLimitReachedError extends XRPCError {
26
+ constructor(src: XRPCError);
27
+ }
28
+ export declare function toKnownErr(e: any): any;
29
+ //# sourceMappingURL=createDraft.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createDraft.d.ts","sourceRoot":"","sources":["../../../../../../src/client/types/app/bsky/draft/createDraft.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AASrD,OAAO,KAAK,KAAK,gBAAgB,MAAM,WAAW,CAAA;AAMlD,MAAM,MAAM,WAAW,GAAG,EAAE,CAAA;AAE5B,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,gBAAgB,CAAC,KAAK,CAAA;CAC9B;AAED,MAAM,WAAW,YAAY;IAC3B,mCAAmC;IACnC,EAAE,EAAE,MAAM,CAAA;CACX;AAED,MAAM,WAAW,WAAW;IAC1B,MAAM,CAAC,EAAE,WAAW,CAAA;IACpB,OAAO,CAAC,EAAE,UAAU,CAAA;IACpB,EAAE,CAAC,EAAE,WAAW,CAAA;IAChB,QAAQ,CAAC,EAAE,kBAAkB,CAAA;CAC9B;AAED,MAAM,WAAW,QAAQ;IACvB,OAAO,EAAE,OAAO,CAAA;IAChB,OAAO,EAAE,UAAU,CAAA;IACnB,IAAI,EAAE,YAAY,CAAA;CACnB;AAED,qBAAa,sBAAuB,SAAQ,SAAS;gBACvC,GAAG,EAAE,SAAS;CAG3B;AAED,wBAAgB,UAAU,CAAC,CAAC,EAAE,GAAG,OAMhC"}
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DraftLimitReachedError = void 0;
4
+ exports.toKnownErr = toKnownErr;
5
+ /**
6
+ * GENERATED CODE - DO NOT MODIFY
7
+ */
8
+ const xrpc_1 = require("@atproto/xrpc");
9
+ const lexicons_1 = require("../../../../lexicons");
10
+ const util_1 = require("../../../../util");
11
+ const is$typed = util_1.is$typed, validate = lexicons_1.validate;
12
+ const id = 'app.bsky.draft.createDraft';
13
+ class DraftLimitReachedError extends xrpc_1.XRPCError {
14
+ constructor(src) {
15
+ super(src.status, src.error, src.message, src.headers, { cause: src });
16
+ }
17
+ }
18
+ exports.DraftLimitReachedError = DraftLimitReachedError;
19
+ function toKnownErr(e) {
20
+ if (e instanceof xrpc_1.XRPCError) {
21
+ if (e.error === 'DraftLimitReached')
22
+ return new DraftLimitReachedError(e);
23
+ }
24
+ return e;
25
+ }
26
+ //# sourceMappingURL=createDraft.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createDraft.js","sourceRoot":"","sources":["../../../../../../src/client/types/app/bsky/draft/createDraft.ts"],"names":[],"mappings":";;;AAgDA,gCAMC;AAtDD;;GAEG;AACH,wCAAqD;AAGrD,mDAA4D;AAC5D,2CAIyB;AAGzB,MAAM,QAAQ,GAAG,eAAS,EACxB,QAAQ,GAAG,mBAAS,CAAA;AACtB,MAAM,EAAE,GAAG,4BAA4B,CAAA;AA0BvC,MAAa,sBAAuB,SAAQ,gBAAS;IACnD,YAAY,GAAc;QACxB,KAAK,CAAC,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,EAAE,GAAG,CAAC,OAAO,EAAE,GAAG,CAAC,OAAO,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,CAAA;IACxE,CAAC;CACF;AAJD,wDAIC;AAED,SAAgB,UAAU,CAAC,CAAM;IAC/B,IAAI,CAAC,YAAY,gBAAS,EAAE,CAAC;QAC3B,IAAI,CAAC,CAAC,KAAK,KAAK,mBAAmB;YAAE,OAAO,IAAI,sBAAsB,CAAC,CAAC,CAAC,CAAA;IAC3E,CAAC;IAED,OAAO,CAAC,CAAA;AACV,CAAC","sourcesContent":["/**\n * GENERATED CODE - DO NOT MODIFY\n */\nimport { HeadersMap, XRPCError } from '@atproto/xrpc'\nimport { type ValidationResult, BlobRef } from '@atproto/lexicon'\nimport { CID } from 'multiformats/cid'\nimport { validate as _validate } from '../../../../lexicons'\nimport {\n type $Typed,\n is$typed as _is$typed,\n type OmitKey,\n} from '../../../../util'\nimport type * as AppBskyDraftDefs from './defs.js'\n\nconst is$typed = _is$typed,\n validate = _validate\nconst id = 'app.bsky.draft.createDraft'\n\nexport type QueryParams = {}\n\nexport interface InputSchema {\n draft: AppBskyDraftDefs.Draft\n}\n\nexport interface OutputSchema {\n /** The ID of the created draft. */\n id: string\n}\n\nexport interface CallOptions {\n signal?: AbortSignal\n headers?: HeadersMap\n qp?: QueryParams\n encoding?: 'application/json'\n}\n\nexport interface Response {\n success: boolean\n headers: HeadersMap\n data: OutputSchema\n}\n\nexport class DraftLimitReachedError extends XRPCError {\n constructor(src: XRPCError) {\n super(src.status, src.error, src.message, src.headers, { cause: src })\n }\n}\n\nexport function toKnownErr(e: any) {\n if (e instanceof XRPCError) {\n if (e.error === 'DraftLimitReached') return new DraftLimitReachedError(e)\n }\n\n return e\n}\n"]}
@@ -0,0 +1,106 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { type ValidationResult } from '@atproto/lexicon';
5
+ import { type $Typed } from '../../../../util';
6
+ import type * as AppBskyFeedPostgate from '../feed/postgate.js';
7
+ import type * as AppBskyFeedThreadgate from '../feed/threadgate.js';
8
+ import type * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs.js';
9
+ import type * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef.js';
10
+ /** A draft with an identifier, used to store drafts in private storage (stash). */
11
+ export interface DraftWithId {
12
+ $type?: 'app.bsky.draft.defs#draftWithId';
13
+ /** A TID to be used as a draft identifier. */
14
+ id: string;
15
+ draft: Draft;
16
+ }
17
+ export declare function isDraftWithId<V>(v: V): v is import("../../../../util").$TypedObject<V, "app.bsky.draft.defs", "draftWithId">;
18
+ export declare function validateDraftWithId<V>(v: V): ValidationResult<DraftWithId & V>;
19
+ /** A draft containing an array of draft posts. */
20
+ export interface Draft {
21
+ $type?: 'app.bsky.draft.defs#draft';
22
+ /** Array of draft posts that compose this draft. */
23
+ posts: DraftPost[];
24
+ /** Indicates human language of posts primary text content. */
25
+ langs?: string[];
26
+ /** Embedding rules for the postgates to be created when this draft is published. */
27
+ postgateEmbeddingRules?: ($Typed<AppBskyFeedPostgate.DisableRule> | {
28
+ $type: string;
29
+ })[];
30
+ /** Allow-rules for the threadgate to be created when this draft is published. */
31
+ threadgateAllow?: ($Typed<AppBskyFeedThreadgate.MentionRule> | $Typed<AppBskyFeedThreadgate.FollowerRule> | $Typed<AppBskyFeedThreadgate.FollowingRule> | $Typed<AppBskyFeedThreadgate.ListRule> | {
32
+ $type: string;
33
+ })[];
34
+ }
35
+ export declare function isDraft<V>(v: V): v is import("../../../../util").$TypedObject<V, "app.bsky.draft.defs", "draft">;
36
+ export declare function validateDraft<V>(v: V): ValidationResult<Draft & V>;
37
+ /** One of the posts that compose a draft. */
38
+ export interface DraftPost {
39
+ $type?: 'app.bsky.draft.defs#draftPost';
40
+ /** The primary post content. */
41
+ text: string;
42
+ labels?: $Typed<ComAtprotoLabelDefs.SelfLabels> | {
43
+ $type: string;
44
+ };
45
+ embedImages?: DraftEmbedImage[];
46
+ embedVideos?: DraftEmbedVideo[];
47
+ embedExternals?: DraftEmbedExternal[];
48
+ embedRecords?: DraftEmbedRecord[];
49
+ }
50
+ export declare function isDraftPost<V>(v: V): v is import("../../../../util").$TypedObject<V, "app.bsky.draft.defs", "draftPost">;
51
+ export declare function validateDraftPost<V>(v: V): ValidationResult<DraftPost & V>;
52
+ /** View to present drafts data to users. */
53
+ export interface DraftView {
54
+ $type?: 'app.bsky.draft.defs#draftView';
55
+ /** A TID to be used as a draft identifier. */
56
+ id: string;
57
+ draft: Draft;
58
+ /** The time the draft was created. */
59
+ createdAt: string;
60
+ /** The time the draft was last updated. */
61
+ updatedAt: string;
62
+ }
63
+ export declare function isDraftView<V>(v: V): v is import("../../../../util").$TypedObject<V, "app.bsky.draft.defs", "draftView">;
64
+ export declare function validateDraftView<V>(v: V): ValidationResult<DraftView & V>;
65
+ export interface DraftEmbedLocalRef {
66
+ $type?: 'app.bsky.draft.defs#draftEmbedLocalRef';
67
+ /** Local, on-device ref to file to be embedded. Embeds are currently device-bound for drafts. */
68
+ path: string;
69
+ }
70
+ export declare function isDraftEmbedLocalRef<V>(v: V): v is import("../../../../util").$TypedObject<V, "app.bsky.draft.defs", "draftEmbedLocalRef">;
71
+ export declare function validateDraftEmbedLocalRef<V>(v: V): ValidationResult<DraftEmbedLocalRef & V>;
72
+ export interface DraftEmbedCaption {
73
+ $type?: 'app.bsky.draft.defs#draftEmbedCaption';
74
+ lang: string;
75
+ content: string;
76
+ }
77
+ export declare function isDraftEmbedCaption<V>(v: V): v is import("../../../../util").$TypedObject<V, "app.bsky.draft.defs", "draftEmbedCaption">;
78
+ export declare function validateDraftEmbedCaption<V>(v: V): ValidationResult<DraftEmbedCaption & V>;
79
+ export interface DraftEmbedImage {
80
+ $type?: 'app.bsky.draft.defs#draftEmbedImage';
81
+ localRef: DraftEmbedLocalRef;
82
+ alt?: string;
83
+ }
84
+ export declare function isDraftEmbedImage<V>(v: V): v is import("../../../../util").$TypedObject<V, "app.bsky.draft.defs", "draftEmbedImage">;
85
+ export declare function validateDraftEmbedImage<V>(v: V): ValidationResult<DraftEmbedImage & V>;
86
+ export interface DraftEmbedVideo {
87
+ $type?: 'app.bsky.draft.defs#draftEmbedVideo';
88
+ localRef: DraftEmbedLocalRef;
89
+ alt?: string;
90
+ captions?: DraftEmbedCaption[];
91
+ }
92
+ export declare function isDraftEmbedVideo<V>(v: V): v is import("../../../../util").$TypedObject<V, "app.bsky.draft.defs", "draftEmbedVideo">;
93
+ export declare function validateDraftEmbedVideo<V>(v: V): ValidationResult<DraftEmbedVideo & V>;
94
+ export interface DraftEmbedExternal {
95
+ $type?: 'app.bsky.draft.defs#draftEmbedExternal';
96
+ uri: string;
97
+ }
98
+ export declare function isDraftEmbedExternal<V>(v: V): v is import("../../../../util").$TypedObject<V, "app.bsky.draft.defs", "draftEmbedExternal">;
99
+ export declare function validateDraftEmbedExternal<V>(v: V): ValidationResult<DraftEmbedExternal & V>;
100
+ export interface DraftEmbedRecord {
101
+ $type?: 'app.bsky.draft.defs#draftEmbedRecord';
102
+ record: ComAtprotoRepoStrongRef.Main;
103
+ }
104
+ export declare function isDraftEmbedRecord<V>(v: V): v is import("../../../../util").$TypedObject<V, "app.bsky.draft.defs", "draftEmbedRecord">;
105
+ export declare function validateDraftEmbedRecord<V>(v: V): ValidationResult<DraftEmbedRecord & V>;
106
+ //# sourceMappingURL=defs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"defs.d.ts","sourceRoot":"","sources":["../../../../../../src/client/types/app/bsky/draft/defs.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,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AAA;CACrC;AAID,wBAAgB,kBAAkB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,8FAEzC;AAED,wBAAgB,wBAAwB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,0CAE/C"}
@@ -0,0 +1,97 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isDraftWithId = isDraftWithId;
4
+ exports.validateDraftWithId = validateDraftWithId;
5
+ exports.isDraft = isDraft;
6
+ exports.validateDraft = validateDraft;
7
+ exports.isDraftPost = isDraftPost;
8
+ exports.validateDraftPost = validateDraftPost;
9
+ exports.isDraftView = isDraftView;
10
+ exports.validateDraftView = validateDraftView;
11
+ exports.isDraftEmbedLocalRef = isDraftEmbedLocalRef;
12
+ exports.validateDraftEmbedLocalRef = validateDraftEmbedLocalRef;
13
+ exports.isDraftEmbedCaption = isDraftEmbedCaption;
14
+ exports.validateDraftEmbedCaption = validateDraftEmbedCaption;
15
+ exports.isDraftEmbedImage = isDraftEmbedImage;
16
+ exports.validateDraftEmbedImage = validateDraftEmbedImage;
17
+ exports.isDraftEmbedVideo = isDraftEmbedVideo;
18
+ exports.validateDraftEmbedVideo = validateDraftEmbedVideo;
19
+ exports.isDraftEmbedExternal = isDraftEmbedExternal;
20
+ exports.validateDraftEmbedExternal = validateDraftEmbedExternal;
21
+ exports.isDraftEmbedRecord = isDraftEmbedRecord;
22
+ exports.validateDraftEmbedRecord = validateDraftEmbedRecord;
23
+ const lexicons_1 = require("../../../../lexicons");
24
+ const util_1 = require("../../../../util");
25
+ const is$typed = util_1.is$typed, validate = lexicons_1.validate;
26
+ const id = 'app.bsky.draft.defs';
27
+ const hashDraftWithId = 'draftWithId';
28
+ function isDraftWithId(v) {
29
+ return is$typed(v, id, hashDraftWithId);
30
+ }
31
+ function validateDraftWithId(v) {
32
+ return validate(v, id, hashDraftWithId);
33
+ }
34
+ const hashDraft = 'draft';
35
+ function isDraft(v) {
36
+ return is$typed(v, id, hashDraft);
37
+ }
38
+ function validateDraft(v) {
39
+ return validate(v, id, hashDraft);
40
+ }
41
+ const hashDraftPost = 'draftPost';
42
+ function isDraftPost(v) {
43
+ return is$typed(v, id, hashDraftPost);
44
+ }
45
+ function validateDraftPost(v) {
46
+ return validate(v, id, hashDraftPost);
47
+ }
48
+ const hashDraftView = 'draftView';
49
+ function isDraftView(v) {
50
+ return is$typed(v, id, hashDraftView);
51
+ }
52
+ function validateDraftView(v) {
53
+ return validate(v, id, hashDraftView);
54
+ }
55
+ const hashDraftEmbedLocalRef = 'draftEmbedLocalRef';
56
+ function isDraftEmbedLocalRef(v) {
57
+ return is$typed(v, id, hashDraftEmbedLocalRef);
58
+ }
59
+ function validateDraftEmbedLocalRef(v) {
60
+ return validate(v, id, hashDraftEmbedLocalRef);
61
+ }
62
+ const hashDraftEmbedCaption = 'draftEmbedCaption';
63
+ function isDraftEmbedCaption(v) {
64
+ return is$typed(v, id, hashDraftEmbedCaption);
65
+ }
66
+ function validateDraftEmbedCaption(v) {
67
+ return validate(v, id, hashDraftEmbedCaption);
68
+ }
69
+ const hashDraftEmbedImage = 'draftEmbedImage';
70
+ function isDraftEmbedImage(v) {
71
+ return is$typed(v, id, hashDraftEmbedImage);
72
+ }
73
+ function validateDraftEmbedImage(v) {
74
+ return validate(v, id, hashDraftEmbedImage);
75
+ }
76
+ const hashDraftEmbedVideo = 'draftEmbedVideo';
77
+ function isDraftEmbedVideo(v) {
78
+ return is$typed(v, id, hashDraftEmbedVideo);
79
+ }
80
+ function validateDraftEmbedVideo(v) {
81
+ return validate(v, id, hashDraftEmbedVideo);
82
+ }
83
+ const hashDraftEmbedExternal = 'draftEmbedExternal';
84
+ function isDraftEmbedExternal(v) {
85
+ return is$typed(v, id, hashDraftEmbedExternal);
86
+ }
87
+ function validateDraftEmbedExternal(v) {
88
+ return validate(v, id, hashDraftEmbedExternal);
89
+ }
90
+ const hashDraftEmbedRecord = 'draftEmbedRecord';
91
+ function isDraftEmbedRecord(v) {
92
+ return is$typed(v, id, hashDraftEmbedRecord);
93
+ }
94
+ function validateDraftEmbedRecord(v) {
95
+ return validate(v, id, hashDraftEmbedRecord);
96
+ }
97
+ //# sourceMappingURL=defs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"defs.js","sourceRoot":"","sources":["../../../../../../src/client/types/app/bsky/draft/defs.ts"],"names":[],"mappings":";;AA8BA,sCAEC;AAED,kDAEC;AA0BD,0BAEC;AAED,sCAEC;AAgBD,kCAEC;AAED,8CAEC;AAgBD,kCAEC;AAED,8CAEC;AAUD,oDAEC;AAED,gEAEC;AAUD,kDAEC;AAED,8DAEC;AAUD,8CAEC;AAED,0DAEC;AAWD,8CAEC;AAED,0DAEC;AASD,oDAEC;AAED,gEAEC;AASD,gDAEC;AAED,4DAEC;AA1MD,mDAA4D;AAC5D,2CAIyB;AAMzB,MAAM,QAAQ,GAAG,eAAS,EACxB,QAAQ,GAAG,mBAAS,CAAA;AACtB,MAAM,EAAE,GAAG,qBAAqB,CAAA;AAUhC,MAAM,eAAe,GAAG,aAAa,CAAA;AAErC,SAAgB,aAAa,CAAI,CAAI;IACnC,OAAO,QAAQ,CAAC,CAAC,EAAE,EAAE,EAAE,eAAe,CAAC,CAAA;AACzC,CAAC;AAED,SAAgB,mBAAmB,CAAI,CAAI;IACzC,OAAO,QAAQ,CAAkB,CAAC,EAAE,EAAE,EAAE,eAAe,CAAC,CAAA;AAC1D,CAAC;AAwBD,MAAM,SAAS,GAAG,OAAO,CAAA;AAEzB,SAAgB,OAAO,CAAI,CAAI;IAC7B,OAAO,QAAQ,CAAC,CAAC,EAAE,EAAE,EAAE,SAAS,CAAC,CAAA;AACnC,CAAC;AAED,SAAgB,aAAa,CAAI,CAAI;IACnC,OAAO,QAAQ,CAAY,CAAC,EAAE,EAAE,EAAE,SAAS,CAAC,CAAA;AAC9C,CAAC;AAcD,MAAM,aAAa,GAAG,WAAW,CAAA;AAEjC,SAAgB,WAAW,CAAI,CAAI;IACjC,OAAO,QAAQ,CAAC,CAA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CAAA;AAClE,CAAC;AASD,MAAM,mBAAmB,GAAG,iBAAiB,CAAA;AAE7C,SAAgB,iBAAiB,CAAI,CAAI;IACvC,OAAO,QAAQ,CAAC,CAAC,EAAE,EAAE,EAAE,mBAAmB,CAAC,CAAA;AAC7C,CAAC;AAED,SAAgB,uBAAuB,CAAI,CAAI;IAC7C,OAAO,QAAQ,CAAsB,CAAC,EAAE,EAAE,EAAE,mBAAmB,CAAC,CAAA;AAClE,CAAC;AAOD,MAAM,sBAAsB,GAAG,oBAAoB,CAAA;AAEnD,SAAgB,oBAAoB,CAAI,CAAI;IAC1C,OAAO,QAAQ,CAAC,CAAC,EAAE,EAAE,EAAE,sBAAsB,CAAC,CAAA;AAChD,CAAC;AAED,SAAgB,0BAA0B,CAAI,CAAI;IAChD,OAAO,QAAQ,CAAyB,CAAC,EAAE,EAAE,EAAE,sBAAsB,CAAC,CAAA;AACxE,CAAC;AAOD,MAAM,oBAAoB,GAAG,kBAAkB,CAAA;AAE/C,SAAgB,kBAAkB,CAAI,CAAI;IACxC,OAAO,QAAQ,CAAC,CAAC,EAAE,EAAE,EAAE,oBAAoB,CAAC,CAAA;AAC9C,CAAC;AAED,SAAgB,wBAAwB,CAAI,CAAI;IAC9C,OAAO,QAAQ,CAAuB,CAAC,EAAE,EAAE,EAAE,oBAAoB,CAAC,CAAA;AACpE,CAAC","sourcesContent":["/**\n * GENERATED CODE - DO NOT MODIFY\n */\nimport { type ValidationResult, BlobRef } from '@atproto/lexicon'\nimport { CID } from 'multiformats/cid'\nimport { validate as _validate } from '../../../../lexicons'\nimport {\n type $Typed,\n is$typed as _is$typed,\n type OmitKey,\n} from '../../../../util'\nimport type * as AppBskyFeedPostgate from '../feed/postgate.js'\nimport type * as AppBskyFeedThreadgate from '../feed/threadgate.js'\nimport type * as ComAtprotoLabelDefs from '../../../com/atproto/label/defs.js'\nimport type * as ComAtprotoRepoStrongRef from '../../../com/atproto/repo/strongRef.js'\n\nconst is$typed = _is$typed,\n validate = _validate\nconst id = 'app.bsky.draft.defs'\n\n/** A draft with an identifier, used to store drafts in private storage (stash). */\nexport interface DraftWithId {\n $type?: 'app.bsky.draft.defs#draftWithId'\n /** A TID to be used as a draft identifier. */\n id: string\n draft: Draft\n}\n\nconst hashDraftWithId = 'draftWithId'\n\nexport function isDraftWithId<V>(v: V) {\n return is$typed(v, id, hashDraftWithId)\n}\n\nexport function validateDraftWithId<V>(v: V) {\n return validate<DraftWithId & V>(v, id, hashDraftWithId)\n}\n\n/** A draft containing an array of draft posts. */\nexport interface Draft {\n $type?: 'app.bsky.draft.defs#draft'\n /** Array of draft posts that compose this draft. */\n posts: DraftPost[]\n /** Indicates human language of posts primary text content. */\n langs?: string[]\n /** Embedding rules for the postgates to be created when this draft is published. */\n postgateEmbeddingRules?: (\n | $Typed<AppBskyFeedPostgate.DisableRule>\n | { $type: string }\n )[]\n /** Allow-rules for the threadgate to be created when this draft is published. */\n threadgateAllow?: (\n | $Typed<AppBskyFeedThreadgate.MentionRule>\n | $Typed<AppBskyFeedThreadgate.FollowerRule>\n | $Typed<AppBskyFeedThreadgate.FollowingRule>\n | $Typed<AppBskyFeedThreadgate.ListRule>\n | { $type: string }\n )[]\n}\n\nconst hashDraft = 'draft'\n\nexport function isDraft<V>(v: V) {\n return is$typed(v, id, hashDraft)\n}\n\nexport function validateDraft<V>(v: V) {\n return validate<Draft & V>(v, id, hashDraft)\n}\n\n/** One of the posts that compose a draft. */\nexport interface DraftPost {\n $type?: 'app.bsky.draft.defs#draftPost'\n /** The primary post content. */\n text: string\n labels?: $Typed<ComAtprotoLabelDefs.SelfLabels> | { $type: string }\n embedImages?: DraftEmbedImage[]\n embedVideos?: DraftEmbedVideo[]\n embedExternals?: DraftEmbedExternal[]\n embedRecords?: DraftEmbedRecord[]\n}\n\nconst hashDraftPost = 'draftPost'\n\nexport function isDraftPost<V>(v: V) {\n return is$typed(v, id, hashDraftPost)\n}\n\nexport function validateDraftPost<V>(v: V) {\n return validate<DraftPost & V>(v, id, hashDraftPost)\n}\n\n/** View to present drafts data to users. */\nexport interface DraftView {\n $type?: 'app.bsky.draft.defs#draftView'\n /** A TID to be used as a draft identifier. */\n id: string\n draft: Draft\n /** The time the draft was created. */\n createdAt: string\n /** The time the draft was last updated. */\n updatedAt: string\n}\n\nconst hashDraftView = 'draftView'\n\nexport function isDraftView<V>(v: V) {\n return is$typed(v, id, hashDraftView)\n}\n\nexport function validateDraftView<V>(v: V) {\n return validate<DraftView & V>(v, id, hashDraftView)\n}\n\nexport interface DraftEmbedLocalRef {\n $type?: 'app.bsky.draft.defs#draftEmbedLocalRef'\n /** Local, on-device ref to file to be embedded. Embeds are currently device-bound for drafts. */\n path: string\n}\n\nconst hashDraftEmbedLocalRef = 'draftEmbedLocalRef'\n\nexport function isDraftEmbedLocalRef<V>(v: V) {\n return is$typed(v, id, hashDraftEmbedLocalRef)\n}\n\nexport function validateDraftEmbedLocalRef<V>(v: V) {\n return validate<DraftEmbedLocalRef & V>(v, id, hashDraftEmbedLocalRef)\n}\n\nexport interface DraftEmbedCaption {\n $type?: 'app.bsky.draft.defs#draftEmbedCaption'\n lang: string\n content: string\n}\n\nconst hashDraftEmbedCaption = 'draftEmbedCaption'\n\nexport function isDraftEmbedCaption<V>(v: V) {\n return is$typed(v, id, hashDraftEmbedCaption)\n}\n\nexport function validateDraftEmbedCaption<V>(v: V) {\n return validate<DraftEmbedCaption & V>(v, id, hashDraftEmbedCaption)\n}\n\nexport interface DraftEmbedImage {\n $type?: 'app.bsky.draft.defs#draftEmbedImage'\n localRef: DraftEmbedLocalRef\n alt?: string\n}\n\nconst hashDraftEmbedImage = 'draftEmbedImage'\n\nexport function isDraftEmbedImage<V>(v: V) {\n return is$typed(v, id, hashDraftEmbedImage)\n}\n\nexport function validateDraftEmbedImage<V>(v: V) {\n return validate<DraftEmbedImage & V>(v, id, hashDraftEmbedImage)\n}\n\nexport interface DraftEmbedVideo {\n $type?: 'app.bsky.draft.defs#draftEmbedVideo'\n localRef: DraftEmbedLocalRef\n alt?: string\n captions?: DraftEmbedCaption[]\n}\n\nconst hashDraftEmbedVideo = 'draftEmbedVideo'\n\nexport function isDraftEmbedVideo<V>(v: V) {\n return is$typed(v, id, hashDraftEmbedVideo)\n}\n\nexport function validateDraftEmbedVideo<V>(v: V) {\n return validate<DraftEmbedVideo & V>(v, id, hashDraftEmbedVideo)\n}\n\nexport interface DraftEmbedExternal {\n $type?: 'app.bsky.draft.defs#draftEmbedExternal'\n uri: string\n}\n\nconst hashDraftEmbedExternal = 'draftEmbedExternal'\n\nexport function isDraftEmbedExternal<V>(v: V) {\n return is$typed(v, id, hashDraftEmbedExternal)\n}\n\nexport function validateDraftEmbedExternal<V>(v: V) {\n return validate<DraftEmbedExternal & V>(v, id, hashDraftEmbedExternal)\n}\n\nexport interface DraftEmbedRecord {\n $type?: 'app.bsky.draft.defs#draftEmbedRecord'\n record: ComAtprotoRepoStrongRef.Main\n}\n\nconst hashDraftEmbedRecord = 'draftEmbedRecord'\n\nexport function isDraftEmbedRecord<V>(v: V) {\n return is$typed(v, id, hashDraftEmbedRecord)\n}\n\nexport function validateDraftEmbedRecord<V>(v: V) {\n return validate<DraftEmbedRecord & V>(v, id, hashDraftEmbedRecord)\n}\n"]}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { HeadersMap } from '@atproto/xrpc';
5
+ export type QueryParams = {};
6
+ export interface InputSchema {
7
+ id: string;
8
+ }
9
+ export interface CallOptions {
10
+ signal?: AbortSignal;
11
+ headers?: HeadersMap;
12
+ qp?: QueryParams;
13
+ encoding?: 'application/json';
14
+ }
15
+ export interface Response {
16
+ success: boolean;
17
+ headers: HeadersMap;
18
+ }
19
+ export declare function toKnownErr(e: any): any;
20
+ //# sourceMappingURL=deleteDraft.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deleteDraft.d.ts","sourceRoot":"","sources":["../../../../../../src/client/types/app/bsky/draft/deleteDraft.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,UAAU,EAAa,MAAM,eAAe,CAAA;AAcrD,MAAM,MAAM,WAAW,GAAG,EAAE,CAAA;AAE5B,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAA;CACX;AAED,MAAM,WAAW,WAAW;IAC1B,MAAM,CAAC,EAAE,WAAW,CAAA;IACpB,OAAO,CAAC,EAAE,UAAU,CAAA;IACpB,EAAE,CAAC,EAAE,WAAW,CAAA;IAChB,QAAQ,CAAC,EAAE,kBAAkB,CAAA;CAC9B;AAED,MAAM,WAAW,QAAQ;IACvB,OAAO,EAAE,OAAO,CAAA;IAChB,OAAO,EAAE,UAAU,CAAA;CACpB;AAED,wBAAgB,UAAU,CAAC,CAAC,EAAE,GAAG,OAEhC"}
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.toKnownErr = toKnownErr;
4
+ const lexicons_1 = require("../../../../lexicons");
5
+ const util_1 = require("../../../../util");
6
+ const is$typed = util_1.is$typed, validate = lexicons_1.validate;
7
+ const id = 'app.bsky.draft.deleteDraft';
8
+ function toKnownErr(e) {
9
+ return e;
10
+ }
11
+ //# sourceMappingURL=deleteDraft.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deleteDraft.js","sourceRoot":"","sources":["../../../../../../src/client/types/app/bsky/draft/deleteDraft.ts"],"names":[],"mappings":";;AAmCA,gCAEC;AA/BD,mDAA4D;AAC5D,2CAIyB;AAEzB,MAAM,QAAQ,GAAG,eAAS,EACxB,QAAQ,GAAG,mBAAS,CAAA;AACtB,MAAM,EAAE,GAAG,4BAA4B,CAAA;AAoBvC,SAAgB,UAAU,CAAC,CAAM;IAC/B,OAAO,CAAC,CAAA;AACV,CAAC","sourcesContent":["/**\n * GENERATED CODE - DO NOT MODIFY\n */\nimport { HeadersMap, XRPCError } from '@atproto/xrpc'\nimport { type ValidationResult, BlobRef } from '@atproto/lexicon'\nimport { CID } from 'multiformats/cid'\nimport { validate as _validate } from '../../../../lexicons'\nimport {\n type $Typed,\n is$typed as _is$typed,\n type OmitKey,\n} from '../../../../util'\n\nconst is$typed = _is$typed,\n validate = _validate\nconst id = 'app.bsky.draft.deleteDraft'\n\nexport type QueryParams = {}\n\nexport interface InputSchema {\n id: string\n}\n\nexport interface CallOptions {\n signal?: AbortSignal\n headers?: HeadersMap\n qp?: QueryParams\n encoding?: 'application/json'\n}\n\nexport interface Response {\n success: boolean\n headers: HeadersMap\n}\n\nexport function toKnownErr(e: any) {\n return e\n}\n"]}
@@ -0,0 +1,25 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { HeadersMap } from '@atproto/xrpc';
5
+ import type * as AppBskyDraftDefs from './defs.js';
6
+ export type QueryParams = {
7
+ limit?: number;
8
+ cursor?: string;
9
+ };
10
+ export type InputSchema = undefined;
11
+ export interface OutputSchema {
12
+ cursor?: string;
13
+ drafts: AppBskyDraftDefs.DraftView[];
14
+ }
15
+ export interface CallOptions {
16
+ signal?: AbortSignal;
17
+ headers?: HeadersMap;
18
+ }
19
+ export interface Response {
20
+ success: boolean;
21
+ headers: HeadersMap;
22
+ data: OutputSchema;
23
+ }
24
+ export declare function toKnownErr(e: any): any;
25
+ //# sourceMappingURL=getDrafts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getDrafts.d.ts","sourceRoot":"","sources":["../../../../../../src/client/types/app/bsky/draft/getDrafts.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,UAAU,EAAa,MAAM,eAAe,CAAA;AASrD,OAAO,KAAK,KAAK,gBAAgB,MAAM,WAAW,CAAA;AAMlD,MAAM,MAAM,WAAW,GAAG;IACxB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB,CAAA;AACD,MAAM,MAAM,WAAW,GAAG,SAAS,CAAA;AAEnC,MAAM,WAAW,YAAY;IAC3B,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,MAAM,EAAE,gBAAgB,CAAC,SAAS,EAAE,CAAA;CACrC;AAED,MAAM,WAAW,WAAW;IAC1B,MAAM,CAAC,EAAE,WAAW,CAAA;IACpB,OAAO,CAAC,EAAE,UAAU,CAAA;CACrB;AAED,MAAM,WAAW,QAAQ;IACvB,OAAO,EAAE,OAAO,CAAA;IAChB,OAAO,EAAE,UAAU,CAAA;IACnB,IAAI,EAAE,YAAY,CAAA;CACnB;AAED,wBAAgB,UAAU,CAAC,CAAC,EAAE,GAAG,OAEhC"}
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.toKnownErr = toKnownErr;
4
+ const lexicons_1 = require("../../../../lexicons");
5
+ const util_1 = require("../../../../util");
6
+ const is$typed = util_1.is$typed, validate = lexicons_1.validate;
7
+ const id = 'app.bsky.draft.getDrafts';
8
+ function toKnownErr(e) {
9
+ return e;
10
+ }
11
+ //# sourceMappingURL=getDrafts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getDrafts.js","sourceRoot":"","sources":["../../../../../../src/client/types/app/bsky/draft/getDrafts.ts"],"names":[],"mappings":";;AAwCA,gCAEC;AApCD,mDAA4D;AAC5D,2CAIyB;AAGzB,MAAM,QAAQ,GAAG,eAAS,EACxB,QAAQ,GAAG,mBAAS,CAAA;AACtB,MAAM,EAAE,GAAG,0BAA0B,CAAA;AAwBrC,SAAgB,UAAU,CAAC,CAAM;IAC/B,OAAO,CAAC,CAAA;AACV,CAAC","sourcesContent":["/**\n * GENERATED CODE - DO NOT MODIFY\n */\nimport { HeadersMap, XRPCError } from '@atproto/xrpc'\nimport { type ValidationResult, BlobRef } from '@atproto/lexicon'\nimport { CID } from 'multiformats/cid'\nimport { validate as _validate } from '../../../../lexicons'\nimport {\n type $Typed,\n is$typed as _is$typed,\n type OmitKey,\n} from '../../../../util'\nimport type * as AppBskyDraftDefs from './defs.js'\n\nconst is$typed = _is$typed,\n validate = _validate\nconst id = 'app.bsky.draft.getDrafts'\n\nexport type QueryParams = {\n limit?: number\n cursor?: string\n}\nexport type InputSchema = undefined\n\nexport interface OutputSchema {\n cursor?: string\n drafts: AppBskyDraftDefs.DraftView[]\n}\n\nexport interface CallOptions {\n signal?: AbortSignal\n headers?: HeadersMap\n}\n\nexport interface Response {\n success: boolean\n headers: HeadersMap\n data: OutputSchema\n}\n\nexport function toKnownErr(e: any) {\n return e\n}\n"]}
@@ -0,0 +1,21 @@
1
+ /**
2
+ * GENERATED CODE - DO NOT MODIFY
3
+ */
4
+ import { HeadersMap } from '@atproto/xrpc';
5
+ import type * as AppBskyDraftDefs from './defs.js';
6
+ export type QueryParams = {};
7
+ export interface InputSchema {
8
+ draft: AppBskyDraftDefs.DraftWithId;
9
+ }
10
+ export interface CallOptions {
11
+ signal?: AbortSignal;
12
+ headers?: HeadersMap;
13
+ qp?: QueryParams;
14
+ encoding?: 'application/json';
15
+ }
16
+ export interface Response {
17
+ success: boolean;
18
+ headers: HeadersMap;
19
+ }
20
+ export declare function toKnownErr(e: any): any;
21
+ //# sourceMappingURL=updateDraft.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"updateDraft.d.ts","sourceRoot":"","sources":["../../../../../../src/client/types/app/bsky/draft/updateDraft.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,UAAU,EAAa,MAAM,eAAe,CAAA;AASrD,OAAO,KAAK,KAAK,gBAAgB,MAAM,WAAW,CAAA;AAMlD,MAAM,MAAM,WAAW,GAAG,EAAE,CAAA;AAE5B,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,gBAAgB,CAAC,WAAW,CAAA;CACpC;AAED,MAAM,WAAW,WAAW;IAC1B,MAAM,CAAC,EAAE,WAAW,CAAA;IACpB,OAAO,CAAC,EAAE,UAAU,CAAA;IACpB,EAAE,CAAC,EAAE,WAAW,CAAA;IAChB,QAAQ,CAAC,EAAE,kBAAkB,CAAA;CAC9B;AAED,MAAM,WAAW,QAAQ;IACvB,OAAO,EAAE,OAAO,CAAA;IAChB,OAAO,EAAE,UAAU,CAAA;CACpB;AAED,wBAAgB,UAAU,CAAC,CAAC,EAAE,GAAG,OAEhC"}
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.toKnownErr = toKnownErr;
4
+ const lexicons_1 = require("../../../../lexicons");
5
+ const util_1 = require("../../../../util");
6
+ const is$typed = util_1.is$typed, validate = lexicons_1.validate;
7
+ const id = 'app.bsky.draft.updateDraft';
8
+ function toKnownErr(e) {
9
+ return e;
10
+ }
11
+ //# sourceMappingURL=updateDraft.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"updateDraft.js","sourceRoot":"","sources":["../../../../../../src/client/types/app/bsky/draft/updateDraft.ts"],"names":[],"mappings":";;AAoCA,gCAEC;AAhCD,mDAA4D;AAC5D,2CAIyB;AAGzB,MAAM,QAAQ,GAAG,eAAS,EACxB,QAAQ,GAAG,mBAAS,CAAA;AACtB,MAAM,EAAE,GAAG,4BAA4B,CAAA;AAoBvC,SAAgB,UAAU,CAAC,CAAM;IAC/B,OAAO,CAAC,CAAA;AACV,CAAC","sourcesContent":["/**\n * GENERATED CODE - DO NOT MODIFY\n */\nimport { HeadersMap, XRPCError } from '@atproto/xrpc'\nimport { type ValidationResult, BlobRef } from '@atproto/lexicon'\nimport { CID } from 'multiformats/cid'\nimport { validate as _validate } from '../../../../lexicons'\nimport {\n type $Typed,\n is$typed as _is$typed,\n type OmitKey,\n} from '../../../../util'\nimport type * as AppBskyDraftDefs from './defs.js'\n\nconst is$typed = _is$typed,\n validate = _validate\nconst id = 'app.bsky.draft.updateDraft'\n\nexport type QueryParams = {}\n\nexport interface InputSchema {\n draft: AppBskyDraftDefs.DraftWithId\n}\n\nexport interface CallOptions {\n signal?: AbortSignal\n headers?: HeadersMap\n qp?: QueryParams\n encoding?: 'application/json'\n}\n\nexport interface Response {\n success: boolean\n headers: HeadersMap\n}\n\nexport function toKnownErr(e: any) {\n return e\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atproto/api",
3
- "version": "0.18.15",
3
+ "version": "0.18.16",
4
4
  "license": "MIT",
5
5
  "description": "Client library for atproto and Bluesky",
6
6
  "keywords": [
@@ -23,8 +23,8 @@
23
23
  "zod": "^3.23.8",
24
24
  "@atproto/common-web": "^0.4.12",
25
25
  "@atproto/lexicon": "^0.6.0",
26
- "@atproto/syntax": "^0.4.2",
27
- "@atproto/xrpc": "^0.7.7"
26
+ "@atproto/xrpc": "^0.7.7",
27
+ "@atproto/syntax": "^0.4.2"
28
28
  },
29
29
  "devDependencies": {
30
30
  "@jest/globals": "^28.1.3",
@@ -36,6 +36,11 @@ import * as AppBskyContactRemoveData from './types/app/bsky/contact/removeData.j
36
36
  import * as AppBskyContactSendNotification from './types/app/bsky/contact/sendNotification.js'
37
37
  import * as AppBskyContactStartPhoneVerification from './types/app/bsky/contact/startPhoneVerification.js'
38
38
  import * as AppBskyContactVerifyPhone from './types/app/bsky/contact/verifyPhone.js'
39
+ import * as AppBskyDraftCreateDraft from './types/app/bsky/draft/createDraft.js'
40
+ import * as AppBskyDraftDefs from './types/app/bsky/draft/defs.js'
41
+ import * as AppBskyDraftDeleteDraft from './types/app/bsky/draft/deleteDraft.js'
42
+ import * as AppBskyDraftGetDrafts from './types/app/bsky/draft/getDrafts.js'
43
+ import * as AppBskyDraftUpdateDraft from './types/app/bsky/draft/updateDraft.js'
39
44
  import * as AppBskyEmbedDefs from './types/app/bsky/embed/defs.js'
40
45
  import * as AppBskyEmbedExternal from './types/app/bsky/embed/external.js'
41
46
  import * as AppBskyEmbedImages from './types/app/bsky/embed/images.js'
@@ -343,6 +348,11 @@ export * as AppBskyContactRemoveData from './types/app/bsky/contact/removeData.j
343
348
  export * as AppBskyContactSendNotification from './types/app/bsky/contact/sendNotification.js'
344
349
  export * as AppBskyContactStartPhoneVerification from './types/app/bsky/contact/startPhoneVerification.js'
345
350
  export * as AppBskyContactVerifyPhone from './types/app/bsky/contact/verifyPhone.js'
351
+ export * as AppBskyDraftCreateDraft from './types/app/bsky/draft/createDraft.js'
352
+ export * as AppBskyDraftDefs from './types/app/bsky/draft/defs.js'
353
+ export * as AppBskyDraftDeleteDraft from './types/app/bsky/draft/deleteDraft.js'
354
+ export * as AppBskyDraftGetDrafts from './types/app/bsky/draft/getDrafts.js'
355
+ export * as AppBskyDraftUpdateDraft from './types/app/bsky/draft/updateDraft.js'
346
356
  export * as AppBskyEmbedDefs from './types/app/bsky/embed/defs.js'
347
357
  export * as AppBskyEmbedExternal from './types/app/bsky/embed/external.js'
348
358
  export * as AppBskyEmbedImages from './types/app/bsky/embed/images.js'
@@ -767,6 +777,7 @@ export class AppBskyNS {
767
777
  ageassurance: AppBskyAgeassuranceNS
768
778
  bookmark: AppBskyBookmarkNS
769
779
  contact: AppBskyContactNS
780
+ draft: AppBskyDraftNS
770
781
  embed: AppBskyEmbedNS
771
782
  feed: AppBskyFeedNS
772
783
  graph: AppBskyGraphNS
@@ -782,6 +793,7 @@ export class AppBskyNS {
782
793
  this.ageassurance = new AppBskyAgeassuranceNS(client)
783
794
  this.bookmark = new AppBskyBookmarkNS(client)
784
795
  this.contact = new AppBskyContactNS(client)
796
+ this.draft = new AppBskyDraftNS(client)
785
797
  this.embed = new AppBskyEmbedNS(client)
786
798
  this.feed = new AppBskyFeedNS(client)
787
799
  this.graph = new AppBskyGraphNS(client)
@@ -1239,6 +1251,51 @@ export class AppBskyContactNS {
1239
1251
  }
1240
1252
  }
1241
1253
 
1254
+ export class AppBskyDraftNS {
1255
+ _client: XrpcClient
1256
+
1257
+ constructor(client: XrpcClient) {
1258
+ this._client = client
1259
+ }
1260
+
1261
+ createDraft(
1262
+ data?: AppBskyDraftCreateDraft.InputSchema,
1263
+ opts?: AppBskyDraftCreateDraft.CallOptions,
1264
+ ): Promise<AppBskyDraftCreateDraft.Response> {
1265
+ return this._client
1266
+ .call('app.bsky.draft.createDraft', opts?.qp, data, opts)
1267
+ .catch((e) => {
1268
+ throw AppBskyDraftCreateDraft.toKnownErr(e)
1269
+ })
1270
+ }
1271
+
1272
+ deleteDraft(
1273
+ data?: AppBskyDraftDeleteDraft.InputSchema,
1274
+ opts?: AppBskyDraftDeleteDraft.CallOptions,
1275
+ ): Promise<AppBskyDraftDeleteDraft.Response> {
1276
+ return this._client.call('app.bsky.draft.deleteDraft', opts?.qp, data, opts)
1277
+ }
1278
+
1279
+ getDrafts(
1280
+ params?: AppBskyDraftGetDrafts.QueryParams,
1281
+ opts?: AppBskyDraftGetDrafts.CallOptions,
1282
+ ): Promise<AppBskyDraftGetDrafts.Response> {
1283
+ return this._client.call(
1284
+ 'app.bsky.draft.getDrafts',
1285
+ params,
1286
+ undefined,
1287
+ opts,
1288
+ )
1289
+ }
1290
+
1291
+ updateDraft(
1292
+ data?: AppBskyDraftUpdateDraft.InputSchema,
1293
+ opts?: AppBskyDraftUpdateDraft.CallOptions,
1294
+ ): Promise<AppBskyDraftUpdateDraft.Response> {
1295
+ return this._client.call('app.bsky.draft.updateDraft', opts?.qp, data, opts)
1296
+ }
1297
+ }
1298
+
1242
1299
  export class AppBskyEmbedNS {
1243
1300
  _client: XrpcClient
1244
1301