@linqapp/sdk 0.27.0 → 0.27.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 (42) hide show
  1. package/CHANGELOG.md +4 -3
  2. package/client.d.mts +2 -2
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +2 -2
  5. package/client.d.ts.map +1 -1
  6. package/package.json +1 -1
  7. package/resources/capability.d.mts +4 -4
  8. package/resources/capability.d.ts +4 -4
  9. package/resources/capability.js +2 -2
  10. package/resources/capability.mjs +2 -2
  11. package/resources/chats/chats.d.mts +100 -1
  12. package/resources/chats/chats.d.mts.map +1 -1
  13. package/resources/chats/chats.d.ts +100 -1
  14. package/resources/chats/chats.d.ts.map +1 -1
  15. package/resources/chats/chats.js.map +1 -1
  16. package/resources/chats/chats.mjs.map +1 -1
  17. package/resources/chats/messages.d.mts +98 -1
  18. package/resources/chats/messages.d.mts.map +1 -1
  19. package/resources/chats/messages.d.ts +98 -1
  20. package/resources/chats/messages.d.ts.map +1 -1
  21. package/resources/index.d.mts +1 -1
  22. package/resources/index.d.ts +1 -1
  23. package/resources/messages.d.mts +98 -1
  24. package/resources/messages.d.mts.map +1 -1
  25. package/resources/messages.d.ts +98 -1
  26. package/resources/messages.d.ts.map +1 -1
  27. package/resources/webhooks.d.mts +172 -2
  28. package/resources/webhooks.d.mts.map +1 -1
  29. package/resources/webhooks.d.ts +172 -2
  30. package/resources/webhooks.d.ts.map +1 -1
  31. package/src/client.ts +2 -2
  32. package/src/resources/capability.ts +5 -5
  33. package/src/resources/chats/chats.ts +117 -1
  34. package/src/resources/chats/messages.ts +121 -1
  35. package/src/resources/index.ts +1 -1
  36. package/src/resources/messages.ts +121 -1
  37. package/src/resources/webhooks.ts +216 -2
  38. package/src/version.ts +1 -1
  39. package/version.d.mts +1 -1
  40. package/version.d.ts +1 -1
  41. package/version.js +1 -1
  42. package/version.mjs +1 -1
@@ -478,7 +478,7 @@ export interface MessageContent {
478
478
  * sub-limit. For bulk media sends exceeding 40 files, pre-upload via
479
479
  * `POST /v3/attachments` and reference by `attachment_id` or `download_url`.
480
480
  */
481
- parts: Array<TextPart | MediaPart | LinkPart>;
481
+ parts: Array<TextPart | MediaPart | LinkPart | MessageContent.IMessageAppPart>;
482
482
 
483
483
  /**
484
484
  * iMessage effect to apply to this message (screen or bubble effect)
@@ -502,6 +502,122 @@ export interface MessageContent {
502
502
  reply_to?: MessagesAPI.ReplyTo;
503
503
  }
504
504
 
505
+ export namespace MessageContent {
506
+ /**
507
+ * An iMessage app card, backed by a Messages app extension. iMessage only — an
508
+ * `imessage_app` part must be the **only** part in the message and is never
509
+ * delivered over SMS/RCS. See the IMessageAppServiceUnsupported (2018) and
510
+ * RecipientUnsupportedMessageType (4005) error codes.
511
+ */
512
+ export interface IMessageAppPart {
513
+ /**
514
+ * Identifies the iMessage app (Messages app extension) that backs the card.
515
+ */
516
+ app: IMessageAppPart.App;
517
+
518
+ /**
519
+ * Visible layout of the card. At least one of `caption`, `subcaption`,
520
+ * `trailing_caption`, `trailing_subcaption`, or `image_url` must be set, otherwise
521
+ * the card renders as an empty bubble.
522
+ */
523
+ layout: IMessageAppPart.Layout;
524
+
525
+ /**
526
+ * Indicates this is an iMessage app card part.
527
+ */
528
+ type: 'imessage_app';
529
+
530
+ /**
531
+ * Absolute HTTPS URL delivered to the recipient's installed iMessage app when they
532
+ * tap the card. Opaque to Messages.
533
+ */
534
+ url: string;
535
+
536
+ /**
537
+ * Text shown on surfaces that cannot render the card (notifications, lock screen).
538
+ * Defaults to the caption when omitted.
539
+ */
540
+ fallback_text?: string;
541
+
542
+ /**
543
+ * Optional client-supplied identifier to correlate updatable/collaborative app
544
+ * sessions (advanced). Not interpreted by Synapse.
545
+ */
546
+ session_id?: string;
547
+ }
548
+
549
+ export namespace IMessageAppPart {
550
+ /**
551
+ * Identifies the iMessage app (Messages app extension) that backs the card.
552
+ */
553
+ export interface App {
554
+ /**
555
+ * Bundle identifier of the Messages app extension. Must not contain `:`.
556
+ */
557
+ bundle_id: string;
558
+
559
+ /**
560
+ * Display name of the app, shown by Messages' fallback UI.
561
+ */
562
+ name: string;
563
+
564
+ /**
565
+ * The app's 10-character uppercase alphanumeric team identifier.
566
+ */
567
+ team_id: string;
568
+
569
+ /**
570
+ * The owning app's App Store id (optional). When set, recipients without the
571
+ * iMessage app installed see a "Get the app" affordance.
572
+ */
573
+ app_store_id?: number;
574
+ }
575
+
576
+ /**
577
+ * Visible layout of the card. At least one of `caption`, `subcaption`,
578
+ * `trailing_caption`, `trailing_subcaption`, or `image_url` must be set, otherwise
579
+ * the card renders as an empty bubble.
580
+ */
581
+ export interface Layout {
582
+ /**
583
+ * Primary label, top-left and bold.
584
+ */
585
+ caption?: string;
586
+
587
+ /**
588
+ * Overlay text shown below `image_title`. Requires `image_url`.
589
+ */
590
+ image_subtitle?: string;
591
+
592
+ /**
593
+ * Overlay text shown above the image. Requires `image_url`.
594
+ */
595
+ image_title?: string;
596
+
597
+ /**
598
+ * Optional HTTPS URL of a preview image. The server downloads it and embeds it in
599
+ * the card as JPEG (10MB max, same fetch rules as media parts).
600
+ */
601
+ image_url?: string;
602
+
603
+ /**
604
+ * Secondary label, below `caption` on the left.
605
+ */
606
+ subcaption?: string;
607
+
608
+ /**
609
+ * Label shown top-right.
610
+ */
611
+ trailing_caption?: string;
612
+
613
+ /**
614
+ * Label shown below `trailing_caption`, on the right.
615
+ */
616
+ trailing_subcaption?: string;
617
+ }
618
+ }
619
+ }
620
+
505
621
  export interface TextPart {
506
622
  /**
507
623
  * Indicates this is a text message part
@@ -149,7 +149,12 @@ export interface SentMessage {
149
149
  /**
150
150
  * Message parts in order (text, media, and link)
151
151
  */
152
- parts: Array<Shared.TextPartResponse | Shared.MediaPartResponse | Shared.LinkPartResponse>;
152
+ parts: Array<
153
+ | Shared.TextPartResponse
154
+ | Shared.MediaPartResponse
155
+ | Shared.LinkPartResponse
156
+ | SentMessage.IMessageAppPartResponse
157
+ >;
153
158
 
154
159
  /**
155
160
  * When the message was actually sent (null if still queued)
@@ -187,6 +192,121 @@ export interface SentMessage {
187
192
  service?: Shared.ServiceType | null;
188
193
  }
189
194
 
195
+ export namespace SentMessage {
196
+ /**
197
+ * An iMessage app card part.
198
+ */
199
+ export interface IMessageAppPartResponse {
200
+ /**
201
+ * Identifies the iMessage app (Messages app extension) that backs the card.
202
+ */
203
+ app: IMessageAppPartResponse.App;
204
+
205
+ /**
206
+ * Visible layout of the card. At least one of `caption`, `subcaption`,
207
+ * `trailing_caption`, `trailing_subcaption`, or `image_url` must be set, otherwise
208
+ * the card renders as an empty bubble.
209
+ */
210
+ layout: IMessageAppPartResponse.Layout;
211
+
212
+ /**
213
+ * Reactions on this message part
214
+ */
215
+ reactions: Array<Shared.Reaction> | null;
216
+
217
+ /**
218
+ * Indicates this is an iMessage app card part.
219
+ */
220
+ type: 'imessage_app';
221
+
222
+ /**
223
+ * The URL delivered to the iMessage app on tap.
224
+ */
225
+ url: string;
226
+
227
+ /**
228
+ * Fallback text for surfaces that cannot render the card.
229
+ */
230
+ fallback_text?: string | null;
231
+
232
+ /**
233
+ * Client-supplied session identifier, echoed back when provided.
234
+ */
235
+ session_id?: string | null;
236
+ }
237
+
238
+ export namespace IMessageAppPartResponse {
239
+ /**
240
+ * Identifies the iMessage app (Messages app extension) that backs the card.
241
+ */
242
+ export interface App {
243
+ /**
244
+ * Bundle identifier of the Messages app extension. Must not contain `:`.
245
+ */
246
+ bundle_id: string;
247
+
248
+ /**
249
+ * Display name of the app, shown by Messages' fallback UI.
250
+ */
251
+ name: string;
252
+
253
+ /**
254
+ * The app's 10-character uppercase alphanumeric team identifier.
255
+ */
256
+ team_id: string;
257
+
258
+ /**
259
+ * The owning app's App Store id (optional). When set, recipients without the
260
+ * iMessage app installed see a "Get the app" affordance.
261
+ */
262
+ app_store_id?: number;
263
+ }
264
+
265
+ /**
266
+ * Visible layout of the card. At least one of `caption`, `subcaption`,
267
+ * `trailing_caption`, `trailing_subcaption`, or `image_url` must be set, otherwise
268
+ * the card renders as an empty bubble.
269
+ */
270
+ export interface Layout {
271
+ /**
272
+ * Primary label, top-left and bold.
273
+ */
274
+ caption?: string;
275
+
276
+ /**
277
+ * Overlay text shown below `image_title`. Requires `image_url`.
278
+ */
279
+ image_subtitle?: string;
280
+
281
+ /**
282
+ * Overlay text shown above the image. Requires `image_url`.
283
+ */
284
+ image_title?: string;
285
+
286
+ /**
287
+ * Optional HTTPS URL of a preview image. The server downloads it and embeds it in
288
+ * the card as JPEG (10MB max, same fetch rules as media parts).
289
+ */
290
+ image_url?: string;
291
+
292
+ /**
293
+ * Secondary label, below `caption` on the left.
294
+ */
295
+ subcaption?: string;
296
+
297
+ /**
298
+ * Label shown top-right.
299
+ */
300
+ trailing_caption?: string;
301
+
302
+ /**
303
+ * Label shown below `trailing_caption`, on the right.
304
+ */
305
+ trailing_subcaption?: string;
306
+ }
307
+ }
308
+ }
309
+
190
310
  /**
191
311
  * Response for sending a message to a chat
192
312
  */
@@ -12,7 +12,7 @@ export {
12
12
  Capability,
13
13
  type HandleCheck,
14
14
  type HandleCheckResponse,
15
- type CapabilityCheckiMessageParams,
15
+ type CapabilityCheckIMessageParams,
16
16
  type CapabilityCheckRCSParams,
17
17
  } from './capability';
18
18
  export {
@@ -210,7 +210,12 @@ export interface Message {
210
210
  /**
211
211
  * Message parts in order (text, media, and link)
212
212
  */
213
- parts?: Array<Shared.TextPartResponse | Shared.MediaPartResponse | Shared.LinkPartResponse> | null;
213
+ parts?: Array<
214
+ | Shared.TextPartResponse
215
+ | Shared.MediaPartResponse
216
+ | Shared.LinkPartResponse
217
+ | Message.IMessageAppPartResponse
218
+ > | null;
214
219
 
215
220
  /**
216
221
  * Messaging service type
@@ -238,6 +243,121 @@ export interface Message {
238
243
  service?: Shared.ServiceType | null;
239
244
  }
240
245
 
246
+ export namespace Message {
247
+ /**
248
+ * An iMessage app card part.
249
+ */
250
+ export interface IMessageAppPartResponse {
251
+ /**
252
+ * Identifies the iMessage app (Messages app extension) that backs the card.
253
+ */
254
+ app: IMessageAppPartResponse.App;
255
+
256
+ /**
257
+ * Visible layout of the card. At least one of `caption`, `subcaption`,
258
+ * `trailing_caption`, `trailing_subcaption`, or `image_url` must be set, otherwise
259
+ * the card renders as an empty bubble.
260
+ */
261
+ layout: IMessageAppPartResponse.Layout;
262
+
263
+ /**
264
+ * Reactions on this message part
265
+ */
266
+ reactions: Array<Shared.Reaction> | null;
267
+
268
+ /**
269
+ * Indicates this is an iMessage app card part.
270
+ */
271
+ type: 'imessage_app';
272
+
273
+ /**
274
+ * The URL delivered to the iMessage app on tap.
275
+ */
276
+ url: string;
277
+
278
+ /**
279
+ * Fallback text for surfaces that cannot render the card.
280
+ */
281
+ fallback_text?: string | null;
282
+
283
+ /**
284
+ * Client-supplied session identifier, echoed back when provided.
285
+ */
286
+ session_id?: string | null;
287
+ }
288
+
289
+ export namespace IMessageAppPartResponse {
290
+ /**
291
+ * Identifies the iMessage app (Messages app extension) that backs the card.
292
+ */
293
+ export interface App {
294
+ /**
295
+ * Bundle identifier of the Messages app extension. Must not contain `:`.
296
+ */
297
+ bundle_id: string;
298
+
299
+ /**
300
+ * Display name of the app, shown by Messages' fallback UI.
301
+ */
302
+ name: string;
303
+
304
+ /**
305
+ * The app's 10-character uppercase alphanumeric team identifier.
306
+ */
307
+ team_id: string;
308
+
309
+ /**
310
+ * The owning app's App Store id (optional). When set, recipients without the
311
+ * iMessage app installed see a "Get the app" affordance.
312
+ */
313
+ app_store_id?: number;
314
+ }
315
+
316
+ /**
317
+ * Visible layout of the card. At least one of `caption`, `subcaption`,
318
+ * `trailing_caption`, `trailing_subcaption`, or `image_url` must be set, otherwise
319
+ * the card renders as an empty bubble.
320
+ */
321
+ export interface Layout {
322
+ /**
323
+ * Primary label, top-left and bold.
324
+ */
325
+ caption?: string;
326
+
327
+ /**
328
+ * Overlay text shown below `image_title`. Requires `image_url`.
329
+ */
330
+ image_subtitle?: string;
331
+
332
+ /**
333
+ * Overlay text shown above the image. Requires `image_url`.
334
+ */
335
+ image_title?: string;
336
+
337
+ /**
338
+ * Optional HTTPS URL of a preview image. The server downloads it and embeds it in
339
+ * the card as JPEG (10MB max, same fetch rules as media parts).
340
+ */
341
+ image_url?: string;
342
+
343
+ /**
344
+ * Secondary label, below `caption` on the left.
345
+ */
346
+ subcaption?: string;
347
+
348
+ /**
349
+ * Label shown top-right.
350
+ */
351
+ trailing_caption?: string;
352
+
353
+ /**
354
+ * Label shown below `trailing_caption`, on the right.
355
+ */
356
+ trailing_subcaption?: string;
357
+ }
358
+ }
359
+ }
360
+
241
361
  /**
242
362
  * iMessage effect applied to a message (screen or bubble effect)
243
363
  */
@@ -60,7 +60,12 @@ export interface MessageEventV2 {
60
60
  /**
61
61
  * Message parts (text and/or media)
62
62
  */
63
- parts: Array<SchemasTextPartResponse | SchemasMediaPartResponse | MessageEventV2.SchemasLinkPartResponse>;
63
+ parts: Array<
64
+ | SchemasTextPartResponse
65
+ | SchemasMediaPartResponse
66
+ | MessageEventV2.SchemasLinkPartResponse
67
+ | MessageEventV2.SchemasIMessageAppPartResponse
68
+ >;
64
69
 
65
70
  /**
66
71
  * The handle that sent this message
@@ -193,6 +198,108 @@ export namespace MessageEventV2 {
193
198
  value: string;
194
199
  }
195
200
 
201
+ /**
202
+ * An iMessage app card part.
203
+ */
204
+ export interface SchemasIMessageAppPartResponse {
205
+ /**
206
+ * Identifies the iMessage app (Messages app extension) that backs the card.
207
+ */
208
+ app: SchemasIMessageAppPartResponse.App;
209
+
210
+ /**
211
+ * Visible layout of the card.
212
+ */
213
+ layout: SchemasIMessageAppPartResponse.Layout;
214
+
215
+ /**
216
+ * Indicates this is an iMessage app card part.
217
+ */
218
+ type: 'imessage_app';
219
+
220
+ /**
221
+ * The URL delivered to the iMessage app on tap.
222
+ */
223
+ url: string;
224
+
225
+ /**
226
+ * Fallback text for surfaces that cannot render the card.
227
+ */
228
+ fallback_text?: string | null;
229
+
230
+ /**
231
+ * Client-supplied session identifier, echoed back when provided.
232
+ */
233
+ session_id?: string | null;
234
+ }
235
+
236
+ export namespace SchemasIMessageAppPartResponse {
237
+ /**
238
+ * Identifies the iMessage app (Messages app extension) that backs the card.
239
+ */
240
+ export interface App {
241
+ /**
242
+ * Bundle identifier of the Messages app extension.
243
+ */
244
+ bundle_id: string;
245
+
246
+ /**
247
+ * Display name of the app.
248
+ */
249
+ name: string;
250
+
251
+ /**
252
+ * The app's 10-character team identifier.
253
+ */
254
+ team_id: string;
255
+
256
+ /**
257
+ * The owning app's App Store id, when known.
258
+ */
259
+ app_store_id?: number | null;
260
+ }
261
+
262
+ /**
263
+ * Visible layout of the card.
264
+ */
265
+ export interface Layout {
266
+ /**
267
+ * Primary label, top-left and bold.
268
+ */
269
+ caption?: string | null;
270
+
271
+ /**
272
+ * Overlay text shown below image_title.
273
+ */
274
+ image_subtitle?: string | null;
275
+
276
+ /**
277
+ * Overlay text shown above the image.
278
+ */
279
+ image_title?: string | null;
280
+
281
+ /**
282
+ * Presigned URL of the card preview image, when present.
283
+ */
284
+ image_url?: string | null;
285
+
286
+ /**
287
+ * Secondary label, below caption on the left.
288
+ */
289
+ subcaption?: string | null;
290
+
291
+ /**
292
+ * Label shown top-right.
293
+ */
294
+ trailing_caption?: string | null;
295
+
296
+ /**
297
+ * Label shown below trailing_caption.
298
+ */
299
+ trailing_subcaption?: string | null;
300
+ }
301
+ }
302
+
196
303
  /**
197
304
  * Reference to the message this is replying to (for threaded replies)
198
305
  */
@@ -246,7 +353,12 @@ export interface MessagePayload {
246
353
  /**
247
354
  * Message content parts (text and/or media)
248
355
  */
249
- parts?: Array<SchemasTextPartResponse | SchemasMediaPartResponse | MessagePayload.SchemasLinkPartResponse>;
356
+ parts?: Array<
357
+ | SchemasTextPartResponse
358
+ | SchemasMediaPartResponse
359
+ | MessagePayload.SchemasLinkPartResponse
360
+ | MessagePayload.SchemasIMessageAppPartResponse
361
+ >;
250
362
 
251
363
  /**
252
364
  * When the message was read
@@ -285,6 +397,108 @@ export namespace MessagePayload {
285
397
  value: string;
286
398
  }
287
399
 
400
+ /**
401
+ * An iMessage app card part.
402
+ */
403
+ export interface SchemasIMessageAppPartResponse {
404
+ /**
405
+ * Identifies the iMessage app (Messages app extension) that backs the card.
406
+ */
407
+ app: SchemasIMessageAppPartResponse.App;
408
+
409
+ /**
410
+ * Visible layout of the card.
411
+ */
412
+ layout: SchemasIMessageAppPartResponse.Layout;
413
+
414
+ /**
415
+ * Indicates this is an iMessage app card part.
416
+ */
417
+ type: 'imessage_app';
418
+
419
+ /**
420
+ * The URL delivered to the iMessage app on tap.
421
+ */
422
+ url: string;
423
+
424
+ /**
425
+ * Fallback text for surfaces that cannot render the card.
426
+ */
427
+ fallback_text?: string | null;
428
+
429
+ /**
430
+ * Client-supplied session identifier, echoed back when provided.
431
+ */
432
+ session_id?: string | null;
433
+ }
434
+
435
+ export namespace SchemasIMessageAppPartResponse {
436
+ /**
437
+ * Identifies the iMessage app (Messages app extension) that backs the card.
438
+ */
439
+ export interface App {
440
+ /**
441
+ * Bundle identifier of the Messages app extension.
442
+ */
443
+ bundle_id: string;
444
+
445
+ /**
446
+ * Display name of the app.
447
+ */
448
+ name: string;
449
+
450
+ /**
451
+ * The app's 10-character team identifier.
452
+ */
453
+ team_id: string;
454
+
455
+ /**
456
+ * The owning app's App Store id, when known.
457
+ */
458
+ app_store_id?: number | null;
459
+ }
460
+
461
+ /**
462
+ * Visible layout of the card.
463
+ */
464
+ export interface Layout {
465
+ /**
466
+ * Primary label, top-left and bold.
467
+ */
468
+ caption?: string | null;
469
+
470
+ /**
471
+ * Overlay text shown below image_title.
472
+ */
473
+ image_subtitle?: string | null;
474
+
475
+ /**
476
+ * Overlay text shown above the image.
477
+ */
478
+ image_title?: string | null;
479
+
480
+ /**
481
+ * Presigned URL of the card preview image, when present.
482
+ */
483
+ image_url?: string | null;
484
+
485
+ /**
486
+ * Secondary label, below caption on the left.
487
+ */
488
+ subcaption?: string | null;
489
+
490
+ /**
491
+ * Label shown top-right.
492
+ */
493
+ trailing_caption?: string | null;
494
+
495
+ /**
496
+ * Label shown below trailing_caption.
497
+ */
498
+ trailing_subcaption?: string | null;
499
+ }
500
+ }
501
+
288
502
  /**
289
503
  * Reference to the message this is replying to
290
504
  */
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.27.0'; // x-release-please-version
1
+ export const VERSION = '0.27.1'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.27.0";
1
+ export declare const VERSION = "0.27.1";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.27.0";
1
+ export declare const VERSION = "0.27.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.27.0'; // x-release-please-version
4
+ exports.VERSION = '0.27.1'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '0.27.0'; // x-release-please-version
1
+ export const VERSION = '0.27.1'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map