aurival 0.4.0 → 0.6.0

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/dist/embeds.js CHANGED
@@ -1,5 +1,7 @@
1
1
  /**
2
- * Discord-shaped `Embed` and `Button` builders (AMENDMENT-05). Mirrors
2
+ * Discord-shaped `Embed` and `Button` builders (AMENDMENT-05, extended by
3
+ * AMENDMENT-06 with a footer icon, a button emoji and the three structured
4
+ * link targets). Mirrors
3
5
  * python's builders field for field; the wire shape and every cap sentence
4
6
  * are contractual (`caps.ts`) and must not drift between the two SDKs.
5
7
  *
@@ -15,7 +17,7 @@
15
17
  * throws — the caps are an outbound (client -> server) contract, not an
16
18
  * inbound one, and a message already stored by the server is assumed valid.
17
19
  */
18
- import { BUTTON_STYLES, CAP_BAD_BUTTON_STYLE, CAP_BUTTON_ID_TOO_LONG, CAP_DESCRIPTION_TOO_LONG, CAP_DUPLICATE_BUTTON_ID, CAP_IMAGE_URL_NOT_HTTPS, CAP_LABEL_TOO_LONG, CAP_LINK_STYLE_DEFERRED, CAP_TITLE_TOO_LONG, CAP_TOO_MANY_BUTTONS, CAP_TOO_MANY_EMBEDS, CAP_TOO_MANY_FIELDS, MAX_BUTTON_ID_LENGTH, MAX_BUTTONS, MAX_DESCRIPTION_LENGTH, MAX_EMBED_FIELDS, MAX_EMBEDS, MAX_LABEL_RUNES, MAX_TITLE_LENGTH, } from './caps.js';
20
+ import { BUTTON_STYLES, CAP_AUTHOR_URL_WITHOUT_NAME, CAP_BAD_BUTTON_STYLE, CAP_BUTTON_ID_TOO_LONG, CAP_BUTTON_MISSING_LABEL, CAP_DESCRIPTION_TOO_LONG, CAP_DUPLICATE_BUTTON_ID, CAP_EMBED_FOOTER_TEXT_REQUIRED, CAP_EMBED_URL_WITHOUT_TITLE, CAP_IMAGE_URL_NOT_HTTPS, CAP_INVALID_BUTTON_EMOJI, CAP_LABEL_TOO_LONG, CAP_LINK_BUTTON_MISSING_URL, CAP_LINK_URL_NOT_HTTPS, CAP_LINK_URL_TOO_LONG, CAP_TITLE_TOO_LONG, CAP_TOO_MANY_BUTTONS, CAP_TOO_MANY_EMBEDS, CAP_TOO_MANY_FIELDS, CAP_URL_ON_NON_LINK_BUTTON, MAX_BUTTON_EMOJI_RUNES, MAX_BUTTON_ID_LENGTH, MAX_BUTTONS, MAX_DESCRIPTION_LENGTH, MAX_EMBED_FIELDS, MAX_EMBEDS, MAX_LABEL_RUNES, MAX_LINK_URL_RUNES, MAX_TITLE_LENGTH, } from './caps.js';
19
21
  function asRecord(value) {
20
22
  return typeof value === 'object' && value !== null && !Array.isArray(value)
21
23
  ? value
@@ -27,9 +29,141 @@ function asOptionalString(value) {
27
29
  function graphemeLength(text) {
28
30
  return [...text].length;
29
31
  }
30
- function requireHttps(url) {
32
+ /**
33
+ * AMENDMENT-06 §11 asks every new url field to reuse this helper; §5 asks a
34
+ * link field to answer with the LINK sentence rather than the image one. The
35
+ * sentence is therefore a parameter: one https check, two wordings, and the
36
+ * caller picks the one that tells its author what to fix.
37
+ */
38
+ function requireHttps(url, sentence = CAP_IMAGE_URL_NOT_HTTPS) {
31
39
  if (!url.startsWith('https://'))
32
- throw new Error(CAP_IMAGE_URL_NOT_HTTPS);
40
+ throw new Error(sentence);
41
+ }
42
+ /** https, then the rune bound — runes, not UTF-16 units, matching the server. */
43
+ function requireLinkUrl(url) {
44
+ requireHttps(url, CAP_LINK_URL_NOT_HTTPS);
45
+ if (graphemeLength(url) > MAX_LINK_URL_RUNES)
46
+ throw new Error(CAP_LINK_URL_TOO_LONG);
47
+ }
48
+ const RUNE_ZWJ = 0x200d;
49
+ const RUNE_VARIATION_TEXT = 0xfe0e;
50
+ const RUNE_VARIATION_EMOJI = 0xfe0f;
51
+ const RUNE_KEYCAP = 0x20e3;
52
+ const RUNE_SKIN_TONE_LOW = 0x1f3fb;
53
+ const RUNE_SKIN_TONE_HIGH = 0x1f3ff;
54
+ const RUNE_REGIONAL_LOW = 0x1f1e6;
55
+ const RUNE_REGIONAL_HIGH = 0x1f1ff;
56
+ const RUNE_TAG_LOW = 0xe0020;
57
+ const RUNE_TAG_HIGH = 0xe007f;
58
+ const RUNE_PICTO_BLOCK_LOW = 0x1f000;
59
+ const RUNE_PICTO_BLOCK_HIGH = 0x1faff;
60
+ const RUNE_SYMBOLS_BLOCK_LOW = 0x2600;
61
+ const RUNE_SYMBOLS_BLOCK_HIGH = 0x27bf;
62
+ /**
63
+ * The unicode symbol classes as the server reads them, floored at U+0080 so
64
+ * ASCII punctuation cannot pass: `+`, `<`, `=`, `|` and `~` are all Sm, and a
65
+ * bare `+` in the emoji slot renders as a pill with a plus sign in it. The two
66
+ * block ranges come first because they carry the emoji the classes miss.
67
+ */
68
+ const SYMBOL_CLASSES = /[\p{So}\p{Sm}]/u;
69
+ function isPictographic(codePoint) {
70
+ if (codePoint < 0x80)
71
+ return false;
72
+ if (codePoint >= RUNE_SYMBOLS_BLOCK_LOW && codePoint <= RUNE_SYMBOLS_BLOCK_HIGH)
73
+ return true;
74
+ if (codePoint >= RUNE_PICTO_BLOCK_LOW && codePoint <= RUNE_PICTO_BLOCK_HIGH)
75
+ return true;
76
+ return SYMBOL_CLASSES.test(String.fromCodePoint(codePoint));
77
+ }
78
+ function isRegionalIndicator(codePoint) {
79
+ return codePoint >= RUNE_REGIONAL_LOW && codePoint <= RUNE_REGIONAL_HIGH;
80
+ }
81
+ function isSkinTone(codePoint) {
82
+ return codePoint >= RUNE_SKIN_TONE_LOW && codePoint <= RUNE_SKIN_TONE_HIGH;
83
+ }
84
+ function isTagChar(codePoint) {
85
+ return codePoint >= RUNE_TAG_LOW && codePoint <= RUNE_TAG_HIGH;
86
+ }
87
+ /** A keycap's base is a digit, `#` or `*` — the only ASCII legal in an emoji. */
88
+ function isKeycapBase(codePoint) {
89
+ return (codePoint >= 0x30 && codePoint <= 0x39) || codePoint === 0x23 || codePoint === 0x2a;
90
+ }
91
+ /**
92
+ * "Is this exactly one emoji", AMENDMENT-06 §3. This is a rule-for-rule port
93
+ * of the server's `validEmoji` (`backend-go/internal/botapi/emoji.go`), in its
94
+ * order, and the python SDK carries the same port: §3 lets an SDK be looser
95
+ * than the server, but two SDKs that disagree with each other would hand two
96
+ * bot authors two different answers to the same emoji.
97
+ *
98
+ * True grapheme segmentation is deliberately NOT used even though node has
99
+ * `Intl.Segmenter`. The server approximates segmentation from the unicode
100
+ * tables and is a little permissive on purpose; segmenting here would refuse
101
+ * sequences the server accepts, and a refusal a developer cannot act on is the
102
+ * worse failure (R-10).
103
+ *
104
+ * The empty string is refused rather than treated as absent: an absent emoji
105
+ * is the key missing from the button entirely, so a blank one is a value its
106
+ * author meant, and the honest answer to it is no.
107
+ */
108
+ function isSingleEmoji(value) {
109
+ const runes = [...value].map((char) => char.codePointAt(0) ?? 0);
110
+ const first = runes[0];
111
+ if (first === undefined)
112
+ return false;
113
+ // The outer bound before the runes are looked at individually. A flag is
114
+ // two, a keycap three, and the longest family sequence in common use is
115
+ // seven; anything past the bound is a paste, not an emoji.
116
+ if (runes.length > MAX_BUTTON_EMOJI_RUNES)
117
+ return false;
118
+ // A flag is EXACTLY TWO regional indicators and nothing else. One is half a
119
+ // flag and renders as a letter in a box; four is two flags.
120
+ if (isRegionalIndicator(first)) {
121
+ const second = runes[1];
122
+ return runes.length === 2 && second !== undefined && isRegionalIndicator(second);
123
+ }
124
+ // A keycap's base is the only place an ASCII rune is legal, and only when
125
+ // U+20E3 actually follows. A bare "1" is a digit, not an emoji.
126
+ if (isKeycapBase(first)) {
127
+ if (runes.length === 2)
128
+ return runes[1] === RUNE_KEYCAP;
129
+ if (runes.length === 3) {
130
+ return runes[1] === RUNE_VARIATION_EMOJI && runes[2] === RUNE_KEYCAP;
131
+ }
132
+ return false;
133
+ }
134
+ if (!isPictographic(first))
135
+ return false;
136
+ // EXACTLY ONE BASE. A later pictographic rune is legal only when the rune
137
+ // before it was a ZWJ, which is what makes a family one emoji and two dice
138
+ // two.
139
+ let prev = first;
140
+ for (const rune of runes.slice(1)) {
141
+ if (rune === RUNE_ZWJ || rune === RUNE_VARIATION_TEXT || rune === RUNE_VARIATION_EMOJI) {
142
+ // A joiner or a variation selector rides along freely.
143
+ }
144
+ else if (isSkinTone(rune) || isTagChar(rune)) {
145
+ // So do skin tones and the tag characters of a subdivision flag.
146
+ }
147
+ else if (isRegionalIndicator(rune)) {
148
+ // Only ever the two-rune flag handled above; glued onto a pictographic
149
+ // base it is a second emoji.
150
+ return false;
151
+ }
152
+ else if (isPictographic(rune)) {
153
+ if (prev !== RUNE_ZWJ)
154
+ return false;
155
+ }
156
+ else {
157
+ return false;
158
+ }
159
+ prev = rune;
160
+ }
161
+ // A sequence that ends on a joiner is joined to nothing.
162
+ return prev !== RUNE_ZWJ;
163
+ }
164
+ function requireEmoji(emoji) {
165
+ if (!isSingleEmoji(emoji))
166
+ throw new Error(CAP_INVALID_BUTTON_EMOJI);
33
167
  }
34
168
  /**
35
169
  * `Embed().addField(...)` builder. Every mutation is validated immediately
@@ -40,6 +174,7 @@ export class Embed {
40
174
  title;
41
175
  description;
42
176
  color;
177
+ url;
43
178
  author;
44
179
  thumbnail;
45
180
  image;
@@ -61,6 +196,13 @@ export class Embed {
61
196
  }
62
197
  if (init.color !== undefined)
63
198
  this.color = init.color;
199
+ if (init.url !== undefined) {
200
+ if (this.title === undefined || this.title === '') {
201
+ throw new Error(CAP_EMBED_URL_WITHOUT_TITLE);
202
+ }
203
+ requireLinkUrl(init.url);
204
+ this.url = init.url;
205
+ }
64
206
  }
65
207
  /** Refuses the 7th field on ONE embed — the whole-message cap (summed across embeds) is enforced by `serialiseEmbeds`. */
66
208
  addField(name, value, inline = false) {
@@ -69,14 +211,20 @@ export class Embed {
69
211
  this.fields.push({ name, value, inline });
70
212
  return this;
71
213
  }
72
- setAuthor(name, icon) {
73
- if (icon !== undefined) {
214
+ setAuthor(name, icon, url) {
215
+ if (icon !== undefined)
74
216
  requireHttps(icon);
75
- this.author = { name, icon };
76
- }
77
- else {
78
- this.author = { name };
217
+ if (url !== undefined) {
218
+ if (name === '')
219
+ throw new Error(CAP_AUTHOR_URL_WITHOUT_NAME);
220
+ requireLinkUrl(url);
79
221
  }
222
+ const author = { name };
223
+ if (icon !== undefined)
224
+ author.icon = icon;
225
+ if (url !== undefined)
226
+ author.url = url;
227
+ this.author = author;
80
228
  return this;
81
229
  }
82
230
  setThumbnail(url) {
@@ -89,8 +237,15 @@ export class Embed {
89
237
  this.image = { url };
90
238
  return this;
91
239
  }
92
- setFooter(text) {
93
- this.footer = { text };
240
+ setFooter(text, icon) {
241
+ if (text === '')
242
+ throw new Error(CAP_EMBED_FOOTER_TEXT_REQUIRED);
243
+ if (icon !== undefined)
244
+ requireHttps(icon);
245
+ const footer = { text };
246
+ if (icon !== undefined)
247
+ footer.icon = icon;
248
+ this.footer = footer;
94
249
  return this;
95
250
  }
96
251
  /** A `Date` becomes UTC RFC3339 (`Z`); a string is assumed already in that form. */
@@ -106,6 +261,8 @@ export class Embed {
106
261
  out['description'] = this.description;
107
262
  if (this.color !== undefined)
108
263
  out['color'] = this.color;
264
+ if (this.url !== undefined)
265
+ out['url'] = this.url;
109
266
  if (this.author !== undefined)
110
267
  out['author'] = this.author;
111
268
  if (this.thumbnail !== undefined)
@@ -128,7 +285,7 @@ export class Embed {
128
285
  */
129
286
  static fromJSON(data) {
130
287
  const record = asRecord(data) ?? {};
131
- const { title, description, color, author, thumbnail, image, fields, footer, timestamp, ...rest } = record;
288
+ const { title, description, color, url, author, thumbnail, image, fields, footer, timestamp, ...rest } = record;
132
289
  const embed = new Embed();
133
290
  const titleStr = asOptionalString(title);
134
291
  if (titleStr !== undefined)
@@ -139,11 +296,20 @@ export class Embed {
139
296
  const colorStr = asOptionalString(color);
140
297
  if (colorStr !== undefined)
141
298
  embed.color = colorStr;
299
+ const urlStr = asOptionalString(url);
300
+ if (urlStr !== undefined)
301
+ embed.url = urlStr;
142
302
  const authorRecord = asRecord(author);
143
303
  if (authorRecord) {
144
304
  const name = asOptionalString(authorRecord['name']) ?? '';
145
305
  const icon = asOptionalString(authorRecord['icon']);
146
- embed.author = icon !== undefined ? { name, icon } : { name };
306
+ const authorUrl = asOptionalString(authorRecord['url']);
307
+ const decoded = { name };
308
+ if (icon !== undefined)
309
+ decoded.icon = icon;
310
+ if (authorUrl !== undefined)
311
+ decoded.url = authorUrl;
312
+ embed.author = decoded;
147
313
  }
148
314
  const thumbnailRecord = asRecord(thumbnail);
149
315
  const thumbnailUrl = thumbnailRecord ? asOptionalString(thumbnailRecord['url']) : undefined;
@@ -153,10 +319,18 @@ export class Embed {
153
319
  const imageUrl = imageRecord ? asOptionalString(imageRecord['url']) : undefined;
154
320
  if (imageUrl !== undefined)
155
321
  embed.image = { url: imageUrl };
322
+ // A footer object with no text still lands, as `{ text: '' }`, so the
323
+ // footer-needs-text cap bites on the raw-object path instead of the key
324
+ // vanishing and the mistake going undiscovered.
156
325
  const footerRecord = asRecord(footer);
157
- const footerText = footerRecord ? asOptionalString(footerRecord['text']) : undefined;
158
- if (footerText !== undefined)
159
- embed.footer = { text: footerText };
326
+ if (footerRecord) {
327
+ const footerText = asOptionalString(footerRecord['text']) ?? '';
328
+ const footerIcon = asOptionalString(footerRecord['icon']);
329
+ const decoded = { text: footerText };
330
+ if (footerIcon !== undefined)
331
+ decoded.icon = footerIcon;
332
+ embed.footer = decoded;
333
+ }
160
334
  const timestampStr = asOptionalString(timestamp);
161
335
  if (timestampStr !== undefined)
162
336
  embed.timestamp = timestampStr;
@@ -184,8 +358,24 @@ function validateEmbedShape(embed) {
184
358
  if (embed.description !== undefined && embed.description.length > MAX_DESCRIPTION_LENGTH) {
185
359
  throw new Error(CAP_DESCRIPTION_TOO_LONG);
186
360
  }
187
- if (embed.author?.icon !== undefined && !embed.author.icon.startsWith('https://')) {
188
- throw new Error(CAP_IMAGE_URL_NOT_HTTPS);
361
+ if (embed.author?.icon !== undefined)
362
+ requireHttps(embed.author.icon);
363
+ if (embed.url !== undefined) {
364
+ if (embed.title === undefined || embed.title === '') {
365
+ throw new Error(CAP_EMBED_URL_WITHOUT_TITLE);
366
+ }
367
+ requireLinkUrl(embed.url);
368
+ }
369
+ if (embed.author?.url !== undefined) {
370
+ if (embed.author.name === '')
371
+ throw new Error(CAP_AUTHOR_URL_WITHOUT_NAME);
372
+ requireLinkUrl(embed.author.url);
373
+ }
374
+ if (embed.footer !== undefined) {
375
+ if (embed.footer.text === '')
376
+ throw new Error(CAP_EMBED_FOOTER_TEXT_REQUIRED);
377
+ if (embed.footer.icon !== undefined)
378
+ requireHttps(embed.footer.icon);
189
379
  }
190
380
  if (embed.thumbnail !== undefined && !embed.thumbnail.url.startsWith('https://')) {
191
381
  throw new Error(CAP_IMAGE_URL_NOT_HTTPS);
@@ -206,29 +396,70 @@ function slugify(label) {
206
396
  : slug;
207
397
  }
208
398
  function validateButtonShape(button) {
399
+ // The label goes first: an emoji-only button is a missing label, not an
400
+ // emoji problem, and saying so is what sends its author to the right fix.
401
+ if (button.label === '')
402
+ throw new Error(CAP_BUTTON_MISSING_LABEL);
209
403
  if (graphemeLength(button.label) > MAX_LABEL_RUNES)
210
404
  throw new Error(CAP_LABEL_TOO_LONG);
211
405
  if (button.id.length > MAX_BUTTON_ID_LENGTH)
212
406
  throw new Error(CAP_BUTTON_ID_TOO_LONG);
213
- if (button.style === 'link')
214
- throw new Error(CAP_LINK_STYLE_DEFERRED);
215
407
  if (!BUTTON_STYLES.includes(button.style)) {
216
408
  throw new Error(CAP_BAD_BUTTON_STYLE);
217
409
  }
410
+ if (button.style === 'link') {
411
+ if (button.url === undefined)
412
+ throw new Error(CAP_LINK_BUTTON_MISSING_URL);
413
+ }
414
+ else if (button.url !== undefined) {
415
+ throw new Error(CAP_URL_ON_NON_LINK_BUTTON);
416
+ }
417
+ if (button.url !== undefined)
418
+ requireLinkUrl(button.url);
419
+ // The emoji never counts toward the label cap (§3): it is its own field,
420
+ // and folding it in would make one cap mean two things.
421
+ if (button.emoji !== undefined)
422
+ requireEmoji(button.emoji);
218
423
  }
219
424
  /** `new Button({ label: 'Pacific' })` — `id` defaults to a slug of `label`, `style` defaults to `'primary'`. */
220
425
  export class Button {
221
426
  label;
222
427
  id;
223
428
  style;
429
+ emoji;
430
+ url;
224
431
  constructor(init) {
225
432
  this.label = init.label;
226
433
  this.style = init.style ?? 'primary';
227
434
  this.id = init.id ?? slugify(init.label);
435
+ if (init.emoji !== undefined)
436
+ this.emoji = init.emoji;
437
+ if (init.url !== undefined)
438
+ this.url = init.url;
228
439
  validateButtonShape(this);
229
440
  }
441
+ /**
442
+ * The sanctioned way to build a link pill (AMENDMENT-06 §11): a url is not
443
+ * optional here, so the shape that raises `a link button needs a url` is
444
+ * one a caller has to go out of their way to write. A tap opens the url on
445
+ * the device and stops — a link button never round-trips as `button.pressed`
446
+ * and never flips the row.
447
+ */
448
+ static link(init) {
449
+ const build = { label: init.label, style: 'link', url: init.url };
450
+ if (init.id !== undefined)
451
+ build.id = init.id;
452
+ if (init.emoji !== undefined)
453
+ build.emoji = init.emoji;
454
+ return new Button(build);
455
+ }
230
456
  toJSON() {
231
- return { id: this.id, label: this.label, style: this.style };
457
+ const out = { id: this.id, label: this.label, style: this.style };
458
+ if (this.emoji !== undefined)
459
+ out['emoji'] = this.emoji;
460
+ if (this.url !== undefined)
461
+ out['url'] = this.url;
462
+ return out;
232
463
  }
233
464
  /** Tolerant decode — never throws. See `Embed.fromJSON` for why. */
234
465
  static fromJSON(data) {
@@ -236,10 +467,16 @@ export class Button {
236
467
  const label = asOptionalString(record['label']) ?? '';
237
468
  const id = asOptionalString(record['id']);
238
469
  const style = asOptionalString(record['style']);
470
+ const emoji = asOptionalString(record['emoji']);
471
+ const url = asOptionalString(record['url']);
239
472
  const button = Object.create(Button.prototype);
240
473
  button.label = label;
241
474
  button.style = style ?? 'primary';
242
475
  button.id = id ?? slugify(label);
476
+ if (emoji !== undefined)
477
+ button.emoji = emoji;
478
+ if (url !== undefined)
479
+ button.url = url;
243
480
  return button;
244
481
  }
245
482
  }
@@ -1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C,MAAM,EAAE,CAAC,CAAC;AACnD,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,gBAAgB,CAC9B,OAA8C;IAE9C,IAAI,OAAO,KAAK,SAAS,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAC7D,IAAI,OAAO,CAAC,MAAM,GAAG,WAAW;QAAE,MAAM,IAAI,KAAK,CAAC,oBAAoB,CAAC,CAAC;IACxE,MAAM,UAAU,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CACvC,KAAK,YAAY,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,CACzD,CAAC;IACF,KAAK,MAAM,MAAM,IAAI,UAAU;QAAE,mBAAmB,CAAC,MAAM,CAAC,CAAC;IAC7D,MAAM,IAAI,GAAG,IAAI,GAAG,EAAU,CAAC;IAC/B,KAAK,MAAM,MAAM,IAAI,UAAU,EAAE,CAAC;QAChC,IAAI,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC;YAAE,MAAM,IAAI,KAAK,CAAC,uBAAuB,CAAC,CAAC;QAClE,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IACtB,CAAC;IACD,OAAO,UAAU,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC;AACrD,CAAC"}
package/dist/errors.d.ts CHANGED
@@ -105,6 +105,16 @@ export declare class AckUnknownEvent extends InvalidRequestError {
105
105
  */
106
106
  export declare class TooManyProblems extends InvalidRequestError {
107
107
  }
108
+ /**
109
+ * `nothing_to_edit` (AMENDMENT-07 §7): a PATCH body carrying none of `text`,
110
+ * `embeds` or `buttons`. This class SHIPS AHEAD of the Go row — L1 has not
111
+ * landed `errors_v1.go`'s entry yet — on AMENDMENT-07 §7's authority, which
112
+ * pins the code, the 400 status and the sentence. It follows the
113
+ * `TooManyProblems` precedent above: a real row rather than a placeholder, so
114
+ * the refusal surfaces as its own class the day the backend deploys.
115
+ */
116
+ export declare class NothingToEdit extends InvalidRequestError {
117
+ }
108
118
  /**
109
119
  * `reaction_emoji_too_long` — the emoji argument to `react()`/`unreact()`
110
120
  * exceeded the server's >32-byte length clamp (AMENDMENT-04 A-2). This is a
@@ -168,6 +178,49 @@ export declare class EmbedDescriptionTooLong extends InvalidRequestError {
168
178
  /** `embed_url_not_https` — an embed image url does not start with `https://`. */
169
179
  export declare class EmbedURLNotHTTPS extends InvalidRequestError {
170
180
  }
181
+ /**
182
+ * `link_url_not_https` — a link target does not start with `https://`.
183
+ * Separate from `EmbedURLNotHTTPS` on purpose: that one says "an image url",
184
+ * and a button target is not an image (AMENDMENT-06 §5).
185
+ */
186
+ export declare class LinkURLNotHTTPS extends InvalidRequestError {
187
+ }
188
+ /** `link_url_too_long` — a link target is longer than `MAX_LINK_URL_RUNES`. */
189
+ export declare class LinkURLTooLong extends InvalidRequestError {
190
+ }
191
+ /**
192
+ * `link_button_missing_url` — a button with style `link` carries no url, so
193
+ * there is nothing for the pill to open.
194
+ */
195
+ export declare class LinkButtonMissingURL extends InvalidRequestError {
196
+ }
197
+ /**
198
+ * `url_on_non_link_button` — only a link button carries a url. Refused rather
199
+ * than ignored, matching the contract's stance that a typo is loud.
200
+ */
201
+ export declare class URLOnNonLinkButton extends InvalidRequestError {
202
+ }
203
+ /** `invalid_button_emoji` — a button emoji is not a single unicode emoji. */
204
+ export declare class InvalidButtonEmoji extends InvalidRequestError {
205
+ }
206
+ /**
207
+ * `embed_url_without_title` — an embed carries a url with no title for the tap
208
+ * to attach to.
209
+ */
210
+ export declare class EmbedURLWithoutTitle extends InvalidRequestError {
211
+ }
212
+ /**
213
+ * `author_url_without_name` — an embed author carries a url with no name for
214
+ * the tap to attach to.
215
+ */
216
+ export declare class AuthorURLWithoutName extends InvalidRequestError {
217
+ }
218
+ /**
219
+ * `embed_footer_text_required` — a footer carries an icon but no text, which
220
+ * would render a floating glyph on a line with nothing to say.
221
+ */
222
+ export declare class EmbedFooterTextRequired extends InvalidRequestError {
223
+ }
171
224
  /**
172
225
  * `embed_empty` — an embed carries none of a title, a description, a field or
173
226
  * a footer. A colour on its own is a coloured rectangle, not a message.
@@ -1 +1 @@
1
- {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,2CAA2C;AAC3C,qBAAa,YAAa,SAAQ,KAAK;IACrC,YAAY,OAAO,EAAE,MAAM,EAG1B;CACF;AAED,4EAA4E;AAC5E,qBAAa,cAAe,SAAQ,YAAY;CAAG;AAEnD,4EAA4E;AAC5E,qBAAa,aAAc,SAAQ,YAAY;CAAG;AAElD,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACxB;AAED,2EAA2E;AAC3E,qBAAa,eAAgB,SAAQ,YAAY;IAC/C,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IACnC,QAAQ,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAE/B,YAAY,IAAI,EAAE,mBAAmB,EAQpC;CACF;AAID,4DAA4D;AAC5D,qBAAa,mBAAoB,SAAQ,eAAe;C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AACxH,qBAAa,qBAAsB,SAAQ,mBAAmB;CAAG;AAEjE;;;GAGG;AACH,qBAAa,iBAAkB,SAAQ,mBAAmB;CAAG;AAE7D,qBAAa,WAAY,SAAQ,cAAc;CAAG;AAClD,qBAAa,eAAgB,SAAQ,cAAc;CAAG;AACtD,qBAAa,eAAgB,SAAQ,cAAc;CAAG;AAEtD,qBAAa,aAAc,SAAQ,QAAQ;CAAG;AAC9C,qBAAa,gBAAiB,SAAQ,QAAQ;CAAG;AACjD,qBAAa,WAAY,SAAQ,QAAQ;CAAG;AAE5C,eAAO,MAAM,cAAc,0CAA0C,CAAC;AAEtE,MAAM,MAAM,oBAAoB,GAAG,KAAK,IAAI,EAAE,mBAAmB,KAAK,eAAe,CAAC;AAEtF,eAAO,MAAM,YAAY,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAMvE,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,oBAAoB,CAAC,CA+DvE,CAAC;AAEF,MAAM,WAAW,mBAAmB;IAClC,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B;AAYD;;;;;;GAMG;AACH,wBAAgB,YAAY,CAC1B,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAChC,OAAO,GAAE,mBAAwB,GAChC,eAAe,CAoBjB"}
package/dist/errors.js CHANGED
@@ -109,6 +109,16 @@ export class AckUnknownEvent extends InvalidRequestError {
109
109
  */
110
110
  export class TooManyProblems extends InvalidRequestError {
111
111
  }
112
+ /**
113
+ * `nothing_to_edit` (AMENDMENT-07 §7): a PATCH body carrying none of `text`,
114
+ * `embeds` or `buttons`. This class SHIPS AHEAD of the Go row — L1 has not
115
+ * landed `errors_v1.go`'s entry yet — on AMENDMENT-07 §7's authority, which
116
+ * pins the code, the 400 status and the sentence. It follows the
117
+ * `TooManyProblems` precedent above: a real row rather than a placeholder, so
118
+ * the refusal surfaces as its own class the day the backend deploys.
119
+ */
120
+ export class NothingToEdit extends InvalidRequestError {
121
+ }
112
122
  /**
113
123
  * `reaction_emoji_too_long` — the emoji argument to `react()`/`unreact()`
114
124
  * exceeded the server's >32-byte length clamp (AMENDMENT-04 A-2). This is a
@@ -175,6 +185,49 @@ export class EmbedDescriptionTooLong extends InvalidRequestError {
175
185
  /** `embed_url_not_https` — an embed image url does not start with `https://`. */
176
186
  export class EmbedURLNotHTTPS extends InvalidRequestError {
177
187
  }
188
+ /**
189
+ * `link_url_not_https` — a link target does not start with `https://`.
190
+ * Separate from `EmbedURLNotHTTPS` on purpose: that one says "an image url",
191
+ * and a button target is not an image (AMENDMENT-06 §5).
192
+ */
193
+ export class LinkURLNotHTTPS extends InvalidRequestError {
194
+ }
195
+ /** `link_url_too_long` — a link target is longer than `MAX_LINK_URL_RUNES`. */
196
+ export class LinkURLTooLong extends InvalidRequestError {
197
+ }
198
+ /**
199
+ * `link_button_missing_url` — a button with style `link` carries no url, so
200
+ * there is nothing for the pill to open.
201
+ */
202
+ export class LinkButtonMissingURL extends InvalidRequestError {
203
+ }
204
+ /**
205
+ * `url_on_non_link_button` — only a link button carries a url. Refused rather
206
+ * than ignored, matching the contract's stance that a typo is loud.
207
+ */
208
+ export class URLOnNonLinkButton extends InvalidRequestError {
209
+ }
210
+ /** `invalid_button_emoji` — a button emoji is not a single unicode emoji. */
211
+ export class InvalidButtonEmoji extends InvalidRequestError {
212
+ }
213
+ /**
214
+ * `embed_url_without_title` — an embed carries a url with no title for the tap
215
+ * to attach to.
216
+ */
217
+ export class EmbedURLWithoutTitle extends InvalidRequestError {
218
+ }
219
+ /**
220
+ * `author_url_without_name` — an embed author carries a url with no name for
221
+ * the tap to attach to.
222
+ */
223
+ export class AuthorURLWithoutName extends InvalidRequestError {
224
+ }
225
+ /**
226
+ * `embed_footer_text_required` — a footer carries an icon but no text, which
227
+ * would render a floating glyph on a line with nothing to say.
228
+ */
229
+ export class EmbedFooterTextRequired extends InvalidRequestError {
230
+ }
178
231
  /**
179
232
  * `embed_empty` — an embed carries none of a title, a description, a field or
180
233
  * a footer. A colour on its own is a coloured rectangle, not a message.
@@ -225,6 +278,14 @@ export const CODE_CLASSES = {
225
278
  empty_text: EmptyText,
226
279
  text_too_long: TextTooLong,
227
280
  bot_link_not_allowed: BotLinkNotAllowed,
281
+ link_url_not_https: LinkURLNotHTTPS,
282
+ link_url_too_long: LinkURLTooLong,
283
+ link_button_missing_url: LinkButtonMissingURL,
284
+ url_on_non_link_button: URLOnNonLinkButton,
285
+ invalid_button_emoji: InvalidButtonEmoji,
286
+ embed_url_without_title: EmbedURLWithoutTitle,
287
+ author_url_without_name: AuthorURLWithoutName,
288
+ embed_footer_text_required: EmbedFooterTextRequired,
228
289
  invalid_json: InvalidJSON,
229
290
  parameter_missing: ParameterMissing,
230
291
  parameter_invalid: ParameterInvalid,
@@ -245,6 +306,7 @@ export const CODE_CLASSES = {
245
306
  unknown_operation: UnknownOperation,
246
307
  ack_unknown_event: AckUnknownEvent,
247
308
  too_many_problems: TooManyProblems,
309
+ nothing_to_edit: NothingToEdit,
248
310
  reaction_emoji_too_long: ReactionEmojiTooLong,
249
311
  mention_not_member: MentionNotMember,
250
312
  mention_token_missing: MentionTokenMissing,