@atproto/api 0.18.18 → 0.18.19

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.
@@ -19,6 +19,10 @@ export declare function validateDraftWithId<V>(v: V): ValidationResult<DraftWith
19
19
  /** A draft containing an array of draft posts. */
20
20
  export interface Draft {
21
21
  $type?: 'app.bsky.draft.defs#draft';
22
+ /** UUIDv4 identifier of the device that created this draft. */
23
+ deviceId?: string;
24
+ /** Platform on which the draft was created. */
25
+ platform?: 'web' | 'ios' | 'android' | (string & {});
22
26
  /** Array of draft posts that compose this draft. */
23
27
  posts: DraftPost[];
24
28
  /** Indicates human language of posts primary text content. */
@@ -1 +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,KAAK,gBAAgB,EAAW,MAAM,kBAAkB,CAAA;AAGjE,OAAO,EACL,KAAK,MAAM,EAGZ,MAAM,kBAAkB,CAAA;AACzB,OAAO,KAAK,KAAK,mBAAmB,MAAM,qBAAqB,CAAA;AAC/D,OAAO,KAAK,KAAK,qBAAqB,MAAM,uBAAuB,CAAA;AACnE,OAAO,KAAK,KAAK,mBAAmB,MAAM,oCAAoC,CAAA;AAC9E,OAAO,KAAK,KAAK,uBAAuB,MAAM,wCAAwC,CAAA;AAMtF,mFAAmF;AACnF,MAAM,WAAW,WAAW;IAC1B,KAAK,CAAC,EAAE,iCAAiC,CAAA;IACzC,8CAA8C;IAC9C,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,KAAK,CAAA;CACb;AAID,wBAAgB,aAAa,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,yFAEpC;AAED,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,qCAE1C;AAED,kDAAkD;AAClD,MAAM,WAAW,KAAK;IACpB,KAAK,CAAC,EAAE,2BAA2B,CAAA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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"]}
1
+ {"version":3,"file":"defs.js","sourceRoot":"","sources":["../../../../../../src/client/types/app/bsky/draft/defs.ts"],"names":[],"mappings":";;AA8BA,sCAEC;AAED,kDAEC;AA8BD,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;AA9MD,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,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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 /** UUIDv4 identifier of the device that created this draft. */\n deviceId?: string\n /** Platform on which the draft was created. */\n platform?: 'web' | 'ios' | 'android' | (string & {})\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"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atproto/api",
3
- "version": "0.18.18",
3
+ "version": "0.18.19",
4
4
  "license": "MIT",
5
5
  "description": "Client library for atproto and Bluesky",
6
6
  "keywords": [
@@ -21,7 +21,7 @@
21
21
  "multiformats": "^9.9.0",
22
22
  "tlds": "^1.234.0",
23
23
  "zod": "^3.23.8",
24
- "@atproto/common-web": "^0.4.14",
24
+ "@atproto/common-web": "^0.4.15",
25
25
  "@atproto/lexicon": "^0.6.1",
26
26
  "@atproto/syntax": "^0.4.3",
27
27
  "@atproto/xrpc": "^0.7.7"
@@ -2326,6 +2326,16 @@ export const schemaDict = {
2326
2326
  type: 'object',
2327
2327
  required: ['posts'],
2328
2328
  properties: {
2329
+ deviceId: {
2330
+ type: 'string',
2331
+ description:
2332
+ 'UUIDv4 identifier of the device that created this draft.',
2333
+ },
2334
+ platform: {
2335
+ type: 'string',
2336
+ knownValues: ['web', 'ios', 'android'],
2337
+ description: 'Platform on which the draft was created.',
2338
+ },
2329
2339
  posts: {
2330
2340
  description: 'Array of draft posts that compose this draft.',
2331
2341
  type: 'array',
@@ -39,6 +39,10 @@ export function validateDraftWithId<V>(v: V) {
39
39
  /** A draft containing an array of draft posts. */
40
40
  export interface Draft {
41
41
  $type?: 'app.bsky.draft.defs#draft'
42
+ /** UUIDv4 identifier of the device that created this draft. */
43
+ deviceId?: string
44
+ /** Platform on which the draft was created. */
45
+ platform?: 'web' | 'ios' | 'android' | (string & {})
42
46
  /** Array of draft posts that compose this draft. */
43
47
  posts: DraftPost[]
44
48
  /** Indicates human language of posts primary text content. */