@atproto/api 0.6.16 → 0.6.17

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,11 @@
1
1
  # @atproto/api
2
2
 
3
+ ## 0.6.17
4
+
5
+ ### Patch Changes
6
+
7
+ - [#1637](https://github.com/bluesky-social/atproto/pull/1637) [`d96f7d9b`](https://github.com/bluesky-social/atproto/commit/d96f7d9b84c6fbab9711059c8584a77d892dcedd) Thanks [@estrattonbailey](https://github.com/estrattonbailey)! - Introduce general support for tags on posts
8
+
3
9
  ## 0.6.16
4
10
 
5
11
  ### Patch Changes
@@ -5272,6 +5272,16 @@ export declare const schemaDict: {
5272
5272
  type: string;
5273
5273
  refs: string[];
5274
5274
  };
5275
+ tags: {
5276
+ type: string;
5277
+ maxLength: number;
5278
+ items: {
5279
+ type: string;
5280
+ maxLength: number;
5281
+ maxGraphemes: number;
5282
+ };
5283
+ description: string;
5284
+ };
5275
5285
  createdAt: {
5276
5286
  type: string;
5277
5287
  format: string;
@@ -6408,6 +6418,18 @@ export declare const schemaDict: {
6408
6418
  };
6409
6419
  };
6410
6420
  };
6421
+ tag: {
6422
+ type: string;
6423
+ description: string;
6424
+ required: string[];
6425
+ properties: {
6426
+ tag: {
6427
+ type: string;
6428
+ maxLength: number;
6429
+ maxGraphemes: number;
6430
+ };
6431
+ };
6432
+ };
6411
6433
  byteSlice: {
6412
6434
  type: string;
6413
6435
  description: string;
@@ -20,6 +20,7 @@ export interface Record {
20
20
  $type: string;
21
21
  [k: string]: unknown;
22
22
  };
23
+ tags?: string[];
23
24
  createdAt: string;
24
25
  [k: string]: unknown;
25
26
  }
@@ -1,7 +1,7 @@
1
1
  import { ValidationResult } from '@atproto/lexicon';
2
2
  export interface Main {
3
3
  index: ByteSlice;
4
- features: (Mention | Link | {
4
+ features: (Mention | Link | Tag | {
5
5
  $type: string;
6
6
  [k: string]: unknown;
7
7
  })[];
@@ -21,6 +21,12 @@ export interface Link {
21
21
  }
22
22
  export declare function isLink(v: unknown): v is Link;
23
23
  export declare function validateLink(v: unknown): ValidationResult;
24
+ export interface Tag {
25
+ tag: string;
26
+ [k: string]: unknown;
27
+ }
28
+ export declare function isTag(v: unknown): v is Tag;
29
+ export declare function validateTag(v: unknown): ValidationResult;
24
30
  export interface ByteSlice {
25
31
  byteStart: number;
26
32
  byteEnd: number;
package/dist/index.js CHANGED
@@ -21172,6 +21172,16 @@ var schemaDict = {
21172
21172
  type: "union",
21173
21173
  refs: ["lex:com.atproto.label.defs#selfLabels"]
21174
21174
  },
21175
+ tags: {
21176
+ type: "array",
21177
+ maxLength: 8,
21178
+ items: {
21179
+ type: "string",
21180
+ maxLength: 640,
21181
+ maxGraphemes: 64
21182
+ },
21183
+ description: "Additional non-inline tags describing this post."
21184
+ },
21175
21185
  createdAt: {
21176
21186
  type: "string",
21177
21187
  format: "datetime"
@@ -22305,7 +22315,8 @@ var schemaDict = {
22305
22315
  type: "union",
22306
22316
  refs: [
22307
22317
  "lex:app.bsky.richtext.facet#mention",
22308
- "lex:app.bsky.richtext.facet#link"
22318
+ "lex:app.bsky.richtext.facet#link",
22319
+ "lex:app.bsky.richtext.facet#tag"
22309
22320
  ]
22310
22321
  }
22311
22322
  }
@@ -22333,6 +22344,18 @@ var schemaDict = {
22333
22344
  }
22334
22345
  }
22335
22346
  },
22347
+ tag: {
22348
+ type: "object",
22349
+ description: "A hashtag.",
22350
+ required: ["tag"],
22351
+ properties: {
22352
+ tag: {
22353
+ type: "string",
22354
+ maxLength: 640,
22355
+ maxGraphemes: 64
22356
+ }
22357
+ }
22358
+ },
22336
22359
  byteSlice: {
22337
22360
  type: "object",
22338
22361
  description: "A text segment. Start is inclusive, end is exclusive. Indices are for utf8-encoded strings.",
@@ -24904,10 +24927,12 @@ __export(facet_exports, {
24904
24927
  isLink: () => isLink,
24905
24928
  isMain: () => isMain6,
24906
24929
  isMention: () => isMention,
24930
+ isTag: () => isTag,
24907
24931
  validateByteSlice: () => validateByteSlice,
24908
24932
  validateLink: () => validateLink,
24909
24933
  validateMain: () => validateMain6,
24910
- validateMention: () => validateMention
24934
+ validateMention: () => validateMention,
24935
+ validateTag: () => validateTag
24911
24936
  });
24912
24937
  function isMain6(v) {
24913
24938
  return isObj2(v) && hasProp2(v, "$type") && (v.$type === "app.bsky.richtext.facet#main" || v.$type === "app.bsky.richtext.facet");
@@ -24927,6 +24952,12 @@ function isLink(v) {
24927
24952
  function validateLink(v) {
24928
24953
  return lexicons.validate("app.bsky.richtext.facet#link", v);
24929
24954
  }
24955
+ function isTag(v) {
24956
+ return isObj2(v) && hasProp2(v, "$type") && v.$type === "app.bsky.richtext.facet#tag";
24957
+ }
24958
+ function validateTag(v) {
24959
+ return lexicons.validate("app.bsky.richtext.facet#tag", v);
24960
+ }
24930
24961
  function isByteSlice(v) {
24931
24962
  return isObj2(v) && hasProp2(v, "$type") && v.$type === "app.bsky.richtext.facet#byteSlice";
24932
24963
  }