@linqapp/sdk 0.68.0 → 0.69.1

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 (70) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/client.d.mts +3 -2
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +3 -2
  5. package/client.d.ts.map +1 -1
  6. package/client.js.map +1 -1
  7. package/client.mjs.map +1 -1
  8. package/package.json +1 -1
  9. package/resources/chats/chats.d.mts +92 -1
  10. package/resources/chats/chats.d.mts.map +1 -1
  11. package/resources/chats/chats.d.ts +92 -1
  12. package/resources/chats/chats.d.ts.map +1 -1
  13. package/resources/chats/chats.js +36 -0
  14. package/resources/chats/chats.js.map +1 -1
  15. package/resources/chats/chats.mjs +36 -0
  16. package/resources/chats/chats.mjs.map +1 -1
  17. package/resources/chats/index.d.mts +1 -1
  18. package/resources/chats/index.d.mts.map +1 -1
  19. package/resources/chats/index.d.ts +1 -1
  20. package/resources/chats/index.d.ts.map +1 -1
  21. package/resources/chats/index.js.map +1 -1
  22. package/resources/chats/index.mjs.map +1 -1
  23. package/resources/chats/messages.d.mts +36 -0
  24. package/resources/chats/messages.d.mts.map +1 -1
  25. package/resources/chats/messages.d.ts +36 -0
  26. package/resources/chats/messages.d.ts.map +1 -1
  27. package/resources/chats/messages.js +36 -0
  28. package/resources/chats/messages.js.map +1 -1
  29. package/resources/chats/messages.mjs +36 -0
  30. package/resources/chats/messages.mjs.map +1 -1
  31. package/resources/index.d.mts +1 -1
  32. package/resources/index.d.mts.map +1 -1
  33. package/resources/index.d.ts +1 -1
  34. package/resources/index.d.ts.map +1 -1
  35. package/resources/index.js.map +1 -1
  36. package/resources/index.mjs.map +1 -1
  37. package/resources/messages/messages.d.mts +3 -2
  38. package/resources/messages/messages.d.mts.map +1 -1
  39. package/resources/messages/messages.d.ts +3 -2
  40. package/resources/messages/messages.d.ts.map +1 -1
  41. package/resources/messages/messages.js +3 -2
  42. package/resources/messages/messages.js.map +1 -1
  43. package/resources/messages/messages.mjs +3 -2
  44. package/resources/messages/messages.mjs.map +1 -1
  45. package/resources/shared.d.mts +38 -0
  46. package/resources/shared.d.mts.map +1 -1
  47. package/resources/shared.d.ts +38 -0
  48. package/resources/shared.d.ts.map +1 -1
  49. package/resources/webhook-subscriptions.d.mts +0 -10
  50. package/resources/webhook-subscriptions.d.mts.map +1 -1
  51. package/resources/webhook-subscriptions.d.ts +0 -10
  52. package/resources/webhook-subscriptions.d.ts.map +1 -1
  53. package/resources/webhooks.d.mts +8 -0
  54. package/resources/webhooks.d.mts.map +1 -1
  55. package/resources/webhooks.d.ts +8 -0
  56. package/resources/webhooks.d.ts.map +1 -1
  57. package/src/client.ts +3 -0
  58. package/src/resources/chats/chats.ts +96 -0
  59. package/src/resources/chats/index.ts +1 -0
  60. package/src/resources/chats/messages.ts +36 -0
  61. package/src/resources/index.ts +1 -0
  62. package/src/resources/messages/messages.ts +3 -2
  63. package/src/resources/shared.ts +44 -0
  64. package/src/resources/webhook-subscriptions.ts +0 -12
  65. package/src/resources/webhooks.ts +9 -0
  66. package/src/version.ts +1 -1
  67. package/version.d.mts +1 -1
  68. package/version.d.ts +1 -1
  69. package/version.js +1 -1
  70. package/version.mjs +1 -1
@@ -87,6 +87,42 @@ export class Chats extends APIResource {
87
87
  * participants, iMessage recipients see the decorations and SMS/RCS recipients
88
88
  * receive the same message as plain text.
89
89
  *
90
+ * ## Inline Stickers (iMessage only)
91
+ *
92
+ * Use the `inline_stickers` array on a text part to place stickers inside the
93
+ * text. Each sticker replaces the characters in its `range: [start, end)` and
94
+ * takes its image from exactly one of `url` or `attachment_id` — an image uploaded
95
+ * with `POST /v3/attachments`.
96
+ *
97
+ * ```json
98
+ * {
99
+ * "type": "text",
100
+ * "value": "Happy birthday 🎂! 🎉🎉",
101
+ * "inline_stickers": [
102
+ * {
103
+ * "range": [15, 17],
104
+ * "attachment_id": "550e8400-e29b-41d4-a716-446655440000"
105
+ * },
106
+ * {
107
+ * "range": [19, 21],
108
+ * "attachment_id": "7c9e6679-7425-40de-944b-e07fc1f90ae7"
109
+ * },
110
+ * {
111
+ * "range": [21, 23],
112
+ * "attachment_id": "7c9e6679-7425-40de-944b-e07fc1f90ae7"
113
+ * }
114
+ * ]
115
+ * }
116
+ * ```
117
+ *
118
+ * **Note:** A sticker takes the place of the characters it covers, so they are
119
+ * hidden on iMessage: `"Sip cup"` with a sticker on `cup` reads "Sip [sticker]".
120
+ * Those characters are what SMS and RCS recipients receive (the stickers are
121
+ * dropped and `value` is sent as written) and what VoiceOver reads. To keep a word
122
+ * visible, give the sticker its own placeholder: `"Sip cup 🥤"` with the range on
123
+ * `🥤`. Up to 100 stickers and 10 different images per part; copies of one image
124
+ * count as one.
125
+ *
90
126
  * ## First-Message Link Restriction
91
127
  *
92
128
  * To protect sender deliverability, the **first outbound message** of a new chat
@@ -431,6 +467,38 @@ export namespace Chat {
431
467
  }
432
468
  }
433
469
 
470
+ /**
471
+ * A sticker image placed inside the text of a part, replacing the characters in
472
+ * `range`. Provide exactly one of `url` or `attachment_id`.
473
+ */
474
+ export interface InlineSticker {
475
+ /**
476
+ * Character range `[start, end)` in the `value` string that the sticker replaces.
477
+ * `start` is inclusive, `end` is exclusive. Those characters are hidden on
478
+ * iMessage and sent as written on SMS and RCS. _Characters are measured as UTF-16
479
+ * code units. Most characters count as 1; some emoji count as 2._
480
+ */
481
+ range: Array<number>;
482
+
483
+ /**
484
+ * Reference to a sticker image pre-uploaded via `POST /v3/attachments`.
485
+ *
486
+ * Exactly one of `url` or `attachment_id` is required.
487
+ */
488
+ attachment_id?: string;
489
+
490
+ /**
491
+ * Linq attachment URL of the sticker image — the `download_url` returned by
492
+ * `POST /v3/attachments`.
493
+ *
494
+ * The image must already be stored with us. To use an image from elsewhere, upload
495
+ * it with `POST /v3/attachments` first and pass `attachment_id`.
496
+ *
497
+ * Exactly one of `url` or `attachment_id` is required.
498
+ */
499
+ url?: string;
500
+ }
501
+
434
502
  export interface LinkPart {
435
503
  /**
436
504
  * Indicates this is a rich link preview part
@@ -843,6 +911,33 @@ export interface TextPart {
843
911
  */
844
912
  value: string;
845
913
 
914
+ /**
915
+ * Optional stickers placed inside the text, in the line with the words (iMessage
916
+ * only).
917
+ *
918
+ * Each sticker replaces the characters in its `range` `[start, end)` of `value`,
919
+ * and takes its image from exactly one of `url` or `attachment_id` — an image
920
+ * uploaded with `POST /v3/attachments`. The characters a sticker covers are hidden
921
+ * on iMessage and are what SMS and RCS recipients receive and VoiceOver reads, so
922
+ * cover something that stands in for the sticker (`"🎂"`, `"[cake]"`). To keep a
923
+ * word visible, give the sticker its own placeholder: `"Sip cup 🥤"` with the
924
+ * range on `🥤`.
925
+ *
926
+ * Up to 100 stickers and 10 different images per part. Copies of one image count
927
+ * as one: twenty copies of one sticker use one of the 10. An animated image
928
+ * arrives as a still.
929
+ *
930
+ * Stickers cannot overlap each other or a `text_decorations` range, cannot split a
931
+ * character, and cannot be combined with `mention`.
932
+ *
933
+ * _Characters are measured as UTF-16 code units. Most characters count as 1; some
934
+ * emoji count as 2._
935
+ *
936
+ * **Note:** on SMS and RCS the stickers are dropped and `value` is sent as plain
937
+ * text.
938
+ */
939
+ inline_stickers?: Array<InlineSticker>;
940
+
846
941
  /**
847
942
  * Mention a chat participant. Group chats only — sending a mention to a direct
848
943
  * chat is rejected with `409` / `2023`. The chat's service is not a constraint: a
@@ -1235,6 +1330,7 @@ Chats.Background = Background;
1235
1330
  export declare namespace Chats {
1236
1331
  export {
1237
1332
  type Chat as Chat,
1333
+ type InlineSticker as InlineSticker,
1238
1334
  type LinkPart as LinkPart,
1239
1335
  type MediaPart as MediaPart,
1240
1336
  type MessageContent as MessageContent,
@@ -4,6 +4,7 @@ export { Background, type BackgroundSetParams } from './background';
4
4
  export {
5
5
  Chats,
6
6
  type Chat,
7
+ type InlineSticker,
7
8
  type LinkPart,
8
9
  type MediaPart,
9
10
  type MessageContent,
@@ -159,6 +159,42 @@ export class Messages extends APIResource {
159
159
  * participants, iMessage recipients see the decorations and SMS/RCS recipients
160
160
  * receive the same message as plain text.
161
161
  *
162
+ * ## Inline Stickers (iMessage only)
163
+ *
164
+ * Use the `inline_stickers` array on a text part to place stickers inside the
165
+ * text. Each sticker replaces the characters in its `range: [start, end)` and
166
+ * takes its image from exactly one of `url` or `attachment_id` — an image uploaded
167
+ * with `POST /v3/attachments`.
168
+ *
169
+ * ```json
170
+ * {
171
+ * "type": "text",
172
+ * "value": "Happy birthday 🎂! 🎉🎉",
173
+ * "inline_stickers": [
174
+ * {
175
+ * "range": [15, 17],
176
+ * "attachment_id": "550e8400-e29b-41d4-a716-446655440000"
177
+ * },
178
+ * {
179
+ * "range": [19, 21],
180
+ * "attachment_id": "7c9e6679-7425-40de-944b-e07fc1f90ae7"
181
+ * },
182
+ * {
183
+ * "range": [21, 23],
184
+ * "attachment_id": "7c9e6679-7425-40de-944b-e07fc1f90ae7"
185
+ * }
186
+ * ]
187
+ * }
188
+ * ```
189
+ *
190
+ * **Note:** A sticker takes the place of the characters it covers, so they are
191
+ * hidden on iMessage: `"Sip cup"` with a sticker on `cup` reads "Sip [sticker]".
192
+ * Those characters are what SMS and RCS recipients receive (the stickers are
193
+ * dropped and `value` is sent as written) and what VoiceOver reads. To keep a word
194
+ * visible, give the sticker its own placeholder: `"Sip cup 🥤"` with the range on
195
+ * `🥤`. Up to 100 stickers and 10 different images per part; copies of one image
196
+ * count as one.
197
+ *
162
198
  * @example
163
199
  * ```ts
164
200
  * const response = await client.chats.messages.send(
@@ -31,6 +31,7 @@ export {
31
31
  export {
32
32
  Chats,
33
33
  type Chat,
34
+ type InlineSticker,
34
35
  type LinkPart,
35
36
  type MediaPart,
36
37
  type MessageContent,
@@ -138,10 +138,11 @@ export class Messages extends APIResource {
138
138
  * - Voice memos are **not** supported here. To send an iMessage voice-memo bubble,
139
139
  * use `POST /v3/chats/{chatId}/voicememo` with a known chat id.
140
140
  *
141
- * ## Service preference, effects, decorations
141
+ * ## Service preference, effects, decorations, inline stickers
142
142
  *
143
143
  * Set `message.preferred_service` (`iMessage` | `RCS` | `SMS`), `message.effect`,
144
- * and per-part `text_decorations` exactly as on the other send endpoints.
144
+ * and per-part `text_decorations` and `inline_stickers` exactly as on the other
145
+ * send endpoints.
145
146
  *
146
147
  * Always responds `202 Accepted` — chat creation is incidental to the send.
147
148
  *
@@ -39,6 +39,41 @@ export interface ChatHandle {
39
39
  status?: 'active' | 'left' | 'removed' | null;
40
40
  }
41
41
 
42
+ /**
43
+ * One sticker image placed inside the text of a part: `id`, `url` and the image
44
+ * details.
45
+ */
46
+ export interface InlineStickerResponse {
47
+ /**
48
+ * Character range `[start, end)` in `value` that the sticker replaces. Those
49
+ * characters are hidden on iMessage and sent as written on SMS and RCS.
50
+ * _Characters are measured as UTF-16 code units. Most characters count as 1; some
51
+ * emoji count as 2._
52
+ */
53
+ range: Array<number>;
54
+
55
+ /**
56
+ * Attachment ID of the sticker image.
57
+ */
58
+ id?: string | null;
59
+
60
+ /**
61
+ * Filename of the sticker
62
+ */
63
+ file_name?: string | null;
64
+
65
+ /**
66
+ * MIME type of the sticker image
67
+ */
68
+ mime_type?: string | null;
69
+
70
+ /**
71
+ * URL for downloading the sticker image. Permanent for a normal upload; a
72
+ * time-limited signed URL when the image is an ephemeral attachment.
73
+ */
74
+ url?: string | null;
75
+ }
76
+
42
77
  /**
43
78
  * A rich link preview part
44
79
  */
@@ -231,6 +266,15 @@ export interface TextPartResponse {
231
266
  */
232
267
  value: string;
233
268
 
269
+ /**
270
+ * Stickers placed inside the text, in the order they appear in `value`. `null`
271
+ * when the part has none.
272
+ *
273
+ * Set on messages sent with `inline_stickers`. An inline sticker received over
274
+ * iMessage currently arrives as a separate media part.
275
+ */
276
+ inline_stickers?: Array<InlineStickerResponse> | null;
277
+
234
278
  /**
235
279
  * @deprecated DEPRECATED: Use `mentions` instead. Handle (E.164 phone number or
236
280
  * Apple ID email) of the **first** mention on this part. A part may carry several
@@ -292,12 +292,6 @@ export interface WebhookSubscription {
292
292
  */
293
293
  updated_at: string;
294
294
 
295
- /**
296
- * Environment this subscription belongs to. Null means production. Only events
297
- * from lines in the same environment are delivered.
298
- */
299
- environment_id?: string | null;
300
-
301
295
  /**
302
296
  * Phone numbers this subscription filters for. If null or empty, events from all
303
297
  * phone numbers are delivered.
@@ -346,12 +340,6 @@ export interface WebhookSubscriptionCreateResponse {
346
340
  */
347
341
  updated_at: string;
348
342
 
349
- /**
350
- * Environment this subscription belongs to. Null means production. Only events
351
- * from lines in the same environment are delivered.
352
- */
353
- environment_id?: string | null;
354
-
355
343
  /**
356
344
  * Phone numbers this subscription filters for. If null or empty, events from all
357
345
  * phone numbers are delivered.
@@ -767,6 +767,15 @@ export interface SchemasTextPartResponse {
767
767
  */
768
768
  value: string;
769
769
 
770
+ /**
771
+ * Stickers placed inside the text, in the order they appear in `value`. `null`
772
+ * when the part has none.
773
+ *
774
+ * Set on messages sent with `inline_stickers`. An inline sticker received over
775
+ * iMessage currently arrives as a separate media part.
776
+ */
777
+ inline_stickers?: Array<Shared.InlineStickerResponse> | null;
778
+
770
779
  /**
771
780
  * @deprecated DEPRECATED: Use `mentions` instead. Handle (E.164 phone number or
772
781
  * Apple ID email) of the **first** mention on this part. A part may carry several
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.68.0'; // x-release-please-version
1
+ export const VERSION = '0.69.1'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.68.0";
1
+ export declare const VERSION = "0.69.1";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.68.0";
1
+ export declare const VERSION = "0.69.1";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '0.68.0'; // x-release-please-version
4
+ exports.VERSION = '0.69.1'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '0.68.0'; // x-release-please-version
1
+ export const VERSION = '0.69.1'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map