@linqapp/sdk 0.20.0 → 0.22.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.
@@ -296,6 +296,21 @@ export interface Chat {
296
296
  */
297
297
  handles: Array<Shared.ChatHandle>;
298
298
 
299
+ /**
300
+ * **[BETA]** Current health for a chat. Always present — chats start at `healthy`
301
+ * and may shift based on engagement and delivery signals on the conversation. Many
302
+ * `at_risk` or `critical` chats on a single line increase the risk of line
303
+ * flagging.
304
+ *
305
+ * Switch on `status` to gate sends or surface line health in your UI — the enum is
306
+ * the long-term contract. Each status carries a `doc_url` that deep-links to the
307
+ * relevant section of the Chat Health guide.
308
+ *
309
+ * See the [Chat Health guide](/guides/chats/chat-health) for what each status
310
+ * means and how to react.
311
+ */
312
+ health_status: Chat.HealthStatus;
313
+
299
314
  /**
300
315
  * Whether the chat is archived
301
316
  */
@@ -311,11 +326,6 @@ export interface Chat {
311
326
  */
312
327
  updated_at: string;
313
328
 
314
- /**
315
- * **[BETA]** Health assessment for a chat. Higher `score` means a healthier chat.
316
- */
317
- health_score?: Chat.HealthScore | null;
318
-
319
329
  /**
320
330
  * Messaging service type
321
331
  */
@@ -324,18 +334,35 @@ export interface Chat {
324
334
 
325
335
  export namespace Chat {
326
336
  /**
327
- * **[BETA]** Health assessment for a chat. Higher `score` means a healthier chat.
337
+ * **[BETA]** Current health for a chat. Always present chats start at `healthy`
338
+ * and may shift based on engagement and delivery signals on the conversation. Many
339
+ * `at_risk` or `critical` chats on a single line increase the risk of line
340
+ * flagging.
341
+ *
342
+ * Switch on `status` to gate sends or surface line health in your UI — the enum is
343
+ * the long-term contract. Each status carries a `doc_url` that deep-links to the
344
+ * relevant section of the Chat Health guide.
345
+ *
346
+ * See the [Chat Health guide](/guides/chats/chat-health) for what each status
347
+ * means and how to react.
328
348
  */
329
- export interface HealthScore {
349
+ export interface HealthStatus {
350
+ /**
351
+ * Deep-link to the relevant section of the Chat Health guide for this status.
352
+ */
353
+ doc_url: string;
354
+
330
355
  /**
331
- * Short summary of what's affecting the score. Empty when the score is 100.
356
+ * Current health bucket for the chat. See the
357
+ * [Chat Health guide](/guides/chats/chat-health) for what each value means and how
358
+ * to react. `doc_url` deep-links to the relevant section.
332
359
  */
333
- reason: string;
360
+ status: 'healthy' | 'at_risk' | 'critical' | 'opted_out';
334
361
 
335
362
  /**
336
- * Health score from 0 to 100. Higher is healthier.
363
+ * When this status last changed.
337
364
  */
338
- score: number;
365
+ updated_at: string;
339
366
  }
340
367
  }
341
368
 
@@ -533,6 +560,21 @@ export namespace ChatCreateResponse {
533
560
  */
534
561
  handles: Array<Shared.ChatHandle>;
535
562
 
563
+ /**
564
+ * **[BETA]** Current health for a chat. Always present — chats start at `healthy`
565
+ * and may shift based on engagement and delivery signals on the conversation. Many
566
+ * `at_risk` or `critical` chats on a single line increase the risk of line
567
+ * flagging.
568
+ *
569
+ * Switch on `status` to gate sends or surface line health in your UI — the enum is
570
+ * the long-term contract. Each status carries a `doc_url` that deep-links to the
571
+ * relevant section of the Chat Health guide.
572
+ *
573
+ * See the [Chat Health guide](/guides/chats/chat-health) for what each status
574
+ * means and how to react.
575
+ */
576
+ health_status: Chat.HealthStatus;
577
+
536
578
  /**
537
579
  * Whether this is a group chat
538
580
  */
@@ -547,27 +589,39 @@ export namespace ChatCreateResponse {
547
589
  * Messaging service type
548
590
  */
549
591
  service: Shared.ServiceType;
550
-
551
- /**
552
- * **[BETA]** Health assessment for a chat. Higher `score` means a healthier chat.
553
- */
554
- health_score?: Chat.HealthScore | null;
555
592
  }
556
593
 
557
594
  export namespace Chat {
558
595
  /**
559
- * **[BETA]** Health assessment for a chat. Higher `score` means a healthier chat.
596
+ * **[BETA]** Current health for a chat. Always present chats start at `healthy`
597
+ * and may shift based on engagement and delivery signals on the conversation. Many
598
+ * `at_risk` or `critical` chats on a single line increase the risk of line
599
+ * flagging.
600
+ *
601
+ * Switch on `status` to gate sends or surface line health in your UI — the enum is
602
+ * the long-term contract. Each status carries a `doc_url` that deep-links to the
603
+ * relevant section of the Chat Health guide.
604
+ *
605
+ * See the [Chat Health guide](/guides/chats/chat-health) for what each status
606
+ * means and how to react.
560
607
  */
561
- export interface HealthScore {
608
+ export interface HealthStatus {
609
+ /**
610
+ * Deep-link to the relevant section of the Chat Health guide for this status.
611
+ */
612
+ doc_url: string;
613
+
562
614
  /**
563
- * Short summary of what's affecting the score. Empty when the score is 100.
615
+ * Current health bucket for the chat. See the
616
+ * [Chat Health guide](/guides/chats/chat-health) for what each value means and how
617
+ * to react. `doc_url` deep-links to the relevant section.
564
618
  */
565
- reason: string;
619
+ status: 'healthy' | 'at_risk' | 'critical' | 'opted_out';
566
620
 
567
621
  /**
568
- * Health score from 0 to 100. Higher is healthier.
622
+ * When this status last changed.
569
623
  */
570
- score: number;
624
+ updated_at: string;
571
625
  }
572
626
  }
573
627
  }
@@ -28,11 +28,11 @@ export class ContactCard extends APIResource {
28
28
  * @example
29
29
  * ```ts
30
30
  * const setContactCard = await client.contactCard.create({
31
- * first_name: 'John',
31
+ * first_name: 'Acme',
32
32
  * phone_number: '+15551234567',
33
33
  * image_url:
34
34
  * 'https://cdn.linqapp.com/contact-card/example.jpg',
35
- * last_name: 'Doe',
35
+ * last_name: 'Support',
36
36
  * });
37
37
  * ```
38
38
  */
@@ -118,8 +118,6 @@ export type WebhookEventType =
118
118
  | 'message.delivered'
119
119
  | 'message.failed'
120
120
  | 'message.edited'
121
- | 'message.opt_out'
122
- | 'message.opt_in'
123
121
  | 'reaction.added'
124
122
  | 'reaction.removed'
125
123
  | 'participant.added'
@@ -108,6 +108,21 @@ export namespace MessageEventV2 {
108
108
  */
109
109
  id: string;
110
110
 
111
+ /**
112
+ * **[BETA]** Current health for a chat. Always present — chats start at `healthy`
113
+ * and may shift based on engagement and delivery signals on the conversation. Many
114
+ * `at_risk` or `critical` chats on a single line increase the risk of line
115
+ * flagging.
116
+ *
117
+ * Switch on `status` to gate sends or surface line health in your UI — the enum is
118
+ * the long-term contract. Each status carries a `doc_url` that deep-links to the
119
+ * relevant section of the Chat Health guide.
120
+ *
121
+ * See the [Chat Health guide](/guides/chats/chat-health) for what each status
122
+ * means and how to react.
123
+ */
124
+ health_status: Chat.HealthStatus;
125
+
111
126
  /**
112
127
  * Whether this is a group chat
113
128
  */
@@ -119,6 +134,40 @@ export namespace MessageEventV2 {
119
134
  owner_handle?: Shared.ChatHandle | null;
120
135
  }
121
136
 
137
+ export namespace Chat {
138
+ /**
139
+ * **[BETA]** Current health for a chat. Always present — chats start at `healthy`
140
+ * and may shift based on engagement and delivery signals on the conversation. Many
141
+ * `at_risk` or `critical` chats on a single line increase the risk of line
142
+ * flagging.
143
+ *
144
+ * Switch on `status` to gate sends or surface line health in your UI — the enum is
145
+ * the long-term contract. Each status carries a `doc_url` that deep-links to the
146
+ * relevant section of the Chat Health guide.
147
+ *
148
+ * See the [Chat Health guide](/guides/chats/chat-health) for what each status
149
+ * means and how to react.
150
+ */
151
+ export interface HealthStatus {
152
+ /**
153
+ * Deep-link to the relevant section of the Chat Health guide for this status.
154
+ */
155
+ doc_url: string;
156
+
157
+ /**
158
+ * Current health bucket for the chat. See the
159
+ * [Chat Health guide](/guides/chats/chat-health) for what each value means and how
160
+ * to react. `doc_url` deep-links to the relevant section.
161
+ */
162
+ status: 'healthy' | 'at_risk' | 'critical' | 'opted_out';
163
+
164
+ /**
165
+ * When this status last changed.
166
+ */
167
+ updated_at: string;
168
+ }
169
+ }
170
+
122
171
  /**
123
172
  * A rich link preview part
124
173
  */
@@ -874,6 +923,21 @@ export namespace MessageEditedWebhookEvent {
874
923
  */
875
924
  id: string;
876
925
 
926
+ /**
927
+ * **[BETA]** Current health for a chat. Always present — chats start at `healthy`
928
+ * and may shift based on engagement and delivery signals on the conversation. Many
929
+ * `at_risk` or `critical` chats on a single line increase the risk of line
930
+ * flagging.
931
+ *
932
+ * Switch on `status` to gate sends or surface line health in your UI — the enum is
933
+ * the long-term contract. Each status carries a `doc_url` that deep-links to the
934
+ * relevant section of the Chat Health guide.
935
+ *
936
+ * See the [Chat Health guide](/guides/chats/chat-health) for what each status
937
+ * means and how to react.
938
+ */
939
+ health_status: Chat.HealthStatus;
940
+
877
941
  /**
878
942
  * Whether this is a group chat
879
943
  */
@@ -885,6 +949,40 @@ export namespace MessageEditedWebhookEvent {
885
949
  owner_handle: Shared.ChatHandle;
886
950
  }
887
951
 
952
+ export namespace Chat {
953
+ /**
954
+ * **[BETA]** Current health for a chat. Always present — chats start at `healthy`
955
+ * and may shift based on engagement and delivery signals on the conversation. Many
956
+ * `at_risk` or `critical` chats on a single line increase the risk of line
957
+ * flagging.
958
+ *
959
+ * Switch on `status` to gate sends or surface line health in your UI — the enum is
960
+ * the long-term contract. Each status carries a `doc_url` that deep-links to the
961
+ * relevant section of the Chat Health guide.
962
+ *
963
+ * See the [Chat Health guide](/guides/chats/chat-health) for what each status
964
+ * means and how to react.
965
+ */
966
+ export interface HealthStatus {
967
+ /**
968
+ * Deep-link to the relevant section of the Chat Health guide for this status.
969
+ */
970
+ doc_url: string;
971
+
972
+ /**
973
+ * Current health bucket for the chat. See the
974
+ * [Chat Health guide](/guides/chats/chat-health) for what each value means and how
975
+ * to react. `doc_url` deep-links to the relevant section.
976
+ */
977
+ status: 'healthy' | 'at_risk' | 'critical' | 'opted_out';
978
+
979
+ /**
980
+ * When this status last changed.
981
+ */
982
+ updated_at: string;
983
+ }
984
+ }
985
+
888
986
  /**
889
987
  * The edited part
890
988
  */
@@ -1242,6 +1340,21 @@ export namespace ChatCreatedWebhookEvent {
1242
1340
  */
1243
1341
  handles: Array<Shared.ChatHandle>;
1244
1342
 
1343
+ /**
1344
+ * **[BETA]** Current health for a chat. Always present — chats start at `healthy`
1345
+ * and may shift based on engagement and delivery signals on the conversation. Many
1346
+ * `at_risk` or `critical` chats on a single line increase the risk of line
1347
+ * flagging.
1348
+ *
1349
+ * Switch on `status` to gate sends or surface line health in your UI — the enum is
1350
+ * the long-term contract. Each status carries a `doc_url` that deep-links to the
1351
+ * relevant section of the Chat Health guide.
1352
+ *
1353
+ * See the [Chat Health guide](/guides/chats/chat-health) for what each status
1354
+ * means and how to react.
1355
+ */
1356
+ health_status: Data.HealthStatus;
1357
+
1245
1358
  /**
1246
1359
  * Whether this is a group chat
1247
1360
  */
@@ -1257,6 +1370,40 @@ export namespace ChatCreatedWebhookEvent {
1257
1370
  */
1258
1371
  service?: Shared.ServiceType | null;
1259
1372
  }
1373
+
1374
+ export namespace Data {
1375
+ /**
1376
+ * **[BETA]** Current health for a chat. Always present — chats start at `healthy`
1377
+ * and may shift based on engagement and delivery signals on the conversation. Many
1378
+ * `at_risk` or `critical` chats on a single line increase the risk of line
1379
+ * flagging.
1380
+ *
1381
+ * Switch on `status` to gate sends or surface line health in your UI — the enum is
1382
+ * the long-term contract. Each status carries a `doc_url` that deep-links to the
1383
+ * relevant section of the Chat Health guide.
1384
+ *
1385
+ * See the [Chat Health guide](/guides/chats/chat-health) for what each status
1386
+ * means and how to react.
1387
+ */
1388
+ export interface HealthStatus {
1389
+ /**
1390
+ * Deep-link to the relevant section of the Chat Health guide for this status.
1391
+ */
1392
+ doc_url: string;
1393
+
1394
+ /**
1395
+ * Current health bucket for the chat. See the
1396
+ * [Chat Health guide](/guides/chats/chat-health) for what each value means and how
1397
+ * to react. `doc_url` deep-links to the relevant section.
1398
+ */
1399
+ status: 'healthy' | 'at_risk' | 'critical' | 'opted_out';
1400
+
1401
+ /**
1402
+ * When this status last changed.
1403
+ */
1404
+ updated_at: string;
1405
+ }
1406
+ }
1260
1407
  }
1261
1408
 
1262
1409
  /**
@@ -1739,8 +1886,6 @@ export interface PhoneNumberStatusUpdatedWebhookEvent {
1739
1886
  | 'message.delivered'
1740
1887
  | 'message.failed'
1741
1888
  | 'message.edited'
1742
- | 'message.opt_out'
1743
- | 'message.opt_in'
1744
1889
  | 'reaction.added'
1745
1890
  | 'reaction.removed'
1746
1891
  | 'participant.added'
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.20.0'; // x-release-please-version
1
+ export const VERSION = '0.22.0'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.20.0";
1
+ export declare const VERSION = "0.22.0";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.20.0";
1
+ export declare const VERSION = "0.22.0";
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.20.0'; // x-release-please-version
4
+ exports.VERSION = '0.22.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '0.20.0'; // x-release-please-version
1
+ export const VERSION = '0.22.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map