@linqapp/sdk 0.33.0 → 0.34.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.
Files changed (114) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/client.d.mts +1 -1
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +1 -1
  5. package/client.d.ts.map +1 -1
  6. package/client.js +1 -1
  7. package/client.js.map +1 -1
  8. package/client.mjs +1 -1
  9. package/client.mjs.map +1 -1
  10. package/core/error.d.mts +13 -0
  11. package/core/error.d.mts.map +1 -1
  12. package/core/error.d.ts +13 -0
  13. package/core/error.d.ts.map +1 -1
  14. package/core/error.js +5 -1
  15. package/core/error.js.map +1 -1
  16. package/core/error.mjs +5 -1
  17. package/core/error.mjs.map +1 -1
  18. package/package.json +1 -1
  19. package/resources/chats/chats.d.mts +68 -24
  20. package/resources/chats/chats.d.mts.map +1 -1
  21. package/resources/chats/chats.d.ts +68 -24
  22. package/resources/chats/chats.d.ts.map +1 -1
  23. package/resources/chats/chats.js +6 -2
  24. package/resources/chats/chats.js.map +1 -1
  25. package/resources/chats/chats.mjs +6 -2
  26. package/resources/chats/chats.mjs.map +1 -1
  27. package/resources/chats/index.d.mts +1 -0
  28. package/resources/chats/index.d.mts.map +1 -1
  29. package/resources/chats/index.d.ts +1 -0
  30. package/resources/chats/index.d.ts.map +1 -1
  31. package/resources/chats/index.js +3 -1
  32. package/resources/chats/index.js.map +1 -1
  33. package/resources/chats/index.mjs +1 -0
  34. package/resources/chats/index.mjs.map +1 -1
  35. package/resources/chats/messages.d.mts +12 -5
  36. package/resources/chats/messages.d.mts.map +1 -1
  37. package/resources/chats/messages.d.ts +12 -5
  38. package/resources/chats/messages.d.ts.map +1 -1
  39. package/resources/chats/messages.js.map +1 -1
  40. package/resources/chats/messages.mjs.map +1 -1
  41. package/resources/chats/polls.d.mts +171 -0
  42. package/resources/chats/polls.d.mts.map +1 -0
  43. package/resources/chats/polls.d.ts +171 -0
  44. package/resources/chats/polls.d.ts.map +1 -0
  45. package/resources/chats/polls.js +95 -0
  46. package/resources/chats/polls.js.map +1 -0
  47. package/resources/chats/polls.mjs +91 -0
  48. package/resources/chats/polls.mjs.map +1 -0
  49. package/resources/index.d.mts +1 -1
  50. package/resources/index.d.mts.map +1 -1
  51. package/resources/index.d.ts +1 -1
  52. package/resources/index.d.ts.map +1 -1
  53. package/resources/index.js +1 -1
  54. package/resources/index.js.map +1 -1
  55. package/resources/index.mjs +1 -1
  56. package/resources/index.mjs.map +1 -1
  57. package/resources/messages/index.d.mts +3 -0
  58. package/resources/messages/index.d.mts.map +1 -0
  59. package/resources/messages/index.d.ts +3 -0
  60. package/resources/messages/index.d.ts.map +1 -0
  61. package/resources/messages/index.js +9 -0
  62. package/resources/messages/index.js.map +1 -0
  63. package/resources/messages/index.mjs +4 -0
  64. package/resources/messages/index.mjs.map +1 -0
  65. package/resources/messages/messages.d.mts +795 -0
  66. package/resources/messages/messages.d.mts.map +1 -0
  67. package/resources/messages/messages.d.ts +795 -0
  68. package/resources/messages/messages.d.ts.map +1 -0
  69. package/resources/messages/messages.js +298 -0
  70. package/resources/messages/messages.js.map +1 -0
  71. package/resources/messages/messages.mjs +293 -0
  72. package/resources/messages/messages.mjs.map +1 -0
  73. package/resources/messages/poll.d.mts +131 -0
  74. package/resources/messages/poll.d.mts.map +1 -0
  75. package/resources/messages/poll.d.ts +131 -0
  76. package/resources/messages/poll.d.ts.map +1 -0
  77. package/resources/messages/poll.js +119 -0
  78. package/resources/messages/poll.js.map +1 -0
  79. package/resources/messages/poll.mjs +115 -0
  80. package/resources/messages/poll.mjs.map +1 -0
  81. package/resources/messages.d.mts +1 -783
  82. package/resources/messages.d.mts.map +1 -1
  83. package/resources/messages.d.ts +1 -783
  84. package/resources/messages.d.ts.map +1 -1
  85. package/resources/messages.js +2 -286
  86. package/resources/messages.js.map +1 -1
  87. package/resources/messages.mjs +1 -284
  88. package/resources/messages.mjs.map +1 -1
  89. package/resources/webhook-events.d.mts +1 -1
  90. package/resources/webhook-events.d.mts.map +1 -1
  91. package/resources/webhook-events.d.ts +1 -1
  92. package/resources/webhook-events.d.ts.map +1 -1
  93. package/resources/webhooks.d.mts +40 -28
  94. package/resources/webhooks.d.mts.map +1 -1
  95. package/resources/webhooks.d.ts +40 -28
  96. package/resources/webhooks.d.ts.map +1 -1
  97. package/src/client.ts +15 -15
  98. package/src/core/error.ts +20 -1
  99. package/src/resources/chats/chats.ts +79 -24
  100. package/src/resources/chats/index.ts +1 -0
  101. package/src/resources/chats/messages.ts +14 -6
  102. package/src/resources/chats/polls.ts +196 -0
  103. package/src/resources/index.ts +1 -1
  104. package/src/resources/messages/index.ts +18 -0
  105. package/src/resources/messages/messages.ts +958 -0
  106. package/src/resources/messages/poll.ts +151 -0
  107. package/src/resources/messages.ts +1 -932
  108. package/src/resources/webhook-events.ts +9 -0
  109. package/src/resources/webhooks.ts +48 -27
  110. package/src/version.ts +1 -1
  111. package/version.d.mts +1 -1
  112. package/version.d.ts +1 -1
  113. package/version.js +1 -1
  114. package/version.mjs +1 -1
@@ -159,6 +159,15 @@ export type WebhookEventType =
159
159
  | 'message.edited'
160
160
  | 'reaction.added'
161
161
  | 'reaction.removed'
162
+ | 'poll.received'
163
+ | 'poll.failed'
164
+ | 'poll.sent'
165
+ | 'poll.delivered'
166
+ | 'poll.read'
167
+ | 'poll.updated'
168
+ | 'poll.vote.added'
169
+ | 'poll.vote.removed'
170
+ | 'poll.reaction.added'
162
171
  | 'participant.added'
163
172
  | 'participant.removed'
164
173
  | 'chat.created'
@@ -186,15 +186,19 @@ export namespace MessageEventV2 {
186
186
  * to react. `doc_url` deep-links to the relevant section.
187
187
  *
188
188
  * `OPTED_OUT` is terminal — the recipient sent `STOP`, `UNSUBSCRIBE`, `OPTOUT`,
189
- * `CANCEL`, `END`, or `QUIT`, and you should send nothing further on this chat.
190
- * The keyword must be the whole trimmed message, never part of a longer one:
191
- * `STOP` counts, `please stop` does not. Most keywords must match exactly,
192
- * including case. `OPT OUT` is the exception it matches in any casing, with or
193
- * without the space or a hyphen, so `opt out`, `Opt-Out` and `optout` all count.
194
- * It clears if they later send `START`, `OPTIN`, or `UNSTOP`, or if they keep
195
- * replying on the chat sustained two-way conversation is treated as a sign the
196
- * stop keyword was a false positive. Suppressing sends to opted-out recipients is
197
- * your responsibility Linq surfaces the status but does not block the send.
189
+ * `CANCEL`, `END`, or `QUIT`. The keyword must be the whole trimmed message, never
190
+ * part of a longer one: `STOP` counts, `please stop` does not. Most keywords must
191
+ * match exactly, including case. `OPT OUT` is the exception it matches in any
192
+ * casing, with or without the space or a hyphen, so `opt out`, `Opt-Out` and
193
+ * `optout` all count. It clears if they later send `START`, `OPTIN`, or `UNSTOP`,
194
+ * or if they keep replying on the chat sustained two-way conversation is treated
195
+ * as a sign the stop keyword was a false positive.
196
+ *
197
+ * Linq enforces this: while a recipient is opted out, every send to them is
198
+ * rejected with `403` (error code `2024`) before the message is queued, across
199
+ * every chat and every line on your account. Nothing is delivered, including a
200
+ * final courtesy message — to send one, set `override_optout: true` on that single
201
+ * request.
198
202
  */
199
203
  status: 'HEALTHY' | 'AT_RISK' | 'CRITICAL' | 'OPTED_OUT';
200
204
 
@@ -1198,15 +1202,19 @@ export namespace MessageEditedWebhookEvent {
1198
1202
  * to react. `doc_url` deep-links to the relevant section.
1199
1203
  *
1200
1204
  * `OPTED_OUT` is terminal — the recipient sent `STOP`, `UNSUBSCRIBE`, `OPTOUT`,
1201
- * `CANCEL`, `END`, or `QUIT`, and you should send nothing further on this chat.
1202
- * The keyword must be the whole trimmed message, never part of a longer one:
1203
- * `STOP` counts, `please stop` does not. Most keywords must match exactly,
1204
- * including case. `OPT OUT` is the exception it matches in any casing, with or
1205
- * without the space or a hyphen, so `opt out`, `Opt-Out` and `optout` all count.
1206
- * It clears if they later send `START`, `OPTIN`, or `UNSTOP`, or if they keep
1207
- * replying on the chat sustained two-way conversation is treated as a sign the
1208
- * stop keyword was a false positive. Suppressing sends to opted-out recipients is
1209
- * your responsibility Linq surfaces the status but does not block the send.
1205
+ * `CANCEL`, `END`, or `QUIT`. The keyword must be the whole trimmed message, never
1206
+ * part of a longer one: `STOP` counts, `please stop` does not. Most keywords must
1207
+ * match exactly, including case. `OPT OUT` is the exception it matches in any
1208
+ * casing, with or without the space or a hyphen, so `opt out`, `Opt-Out` and
1209
+ * `optout` all count. It clears if they later send `START`, `OPTIN`, or `UNSTOP`,
1210
+ * or if they keep replying on the chat sustained two-way conversation is treated
1211
+ * as a sign the stop keyword was a false positive.
1212
+ *
1213
+ * Linq enforces this: while a recipient is opted out, every send to them is
1214
+ * rejected with `403` (error code `2024`) before the message is queued, across
1215
+ * every chat and every line on your account. Nothing is delivered, including a
1216
+ * final courtesy message — to send one, set `override_optout: true` on that single
1217
+ * request.
1210
1218
  */
1211
1219
  status: 'HEALTHY' | 'AT_RISK' | 'CRITICAL' | 'OPTED_OUT';
1212
1220
 
@@ -1631,15 +1639,19 @@ export namespace ChatCreatedWebhookEvent {
1631
1639
  * to react. `doc_url` deep-links to the relevant section.
1632
1640
  *
1633
1641
  * `OPTED_OUT` is terminal — the recipient sent `STOP`, `UNSUBSCRIBE`, `OPTOUT`,
1634
- * `CANCEL`, `END`, or `QUIT`, and you should send nothing further on this chat.
1635
- * The keyword must be the whole trimmed message, never part of a longer one:
1636
- * `STOP` counts, `please stop` does not. Most keywords must match exactly,
1637
- * including case. `OPT OUT` is the exception it matches in any casing, with or
1638
- * without the space or a hyphen, so `opt out`, `Opt-Out` and `optout` all count.
1639
- * It clears if they later send `START`, `OPTIN`, or `UNSTOP`, or if they keep
1640
- * replying on the chat sustained two-way conversation is treated as a sign the
1641
- * stop keyword was a false positive. Suppressing sends to opted-out recipients is
1642
- * your responsibility Linq surfaces the status but does not block the send.
1642
+ * `CANCEL`, `END`, or `QUIT`. The keyword must be the whole trimmed message, never
1643
+ * part of a longer one: `STOP` counts, `please stop` does not. Most keywords must
1644
+ * match exactly, including case. `OPT OUT` is the exception it matches in any
1645
+ * casing, with or without the space or a hyphen, so `opt out`, `Opt-Out` and
1646
+ * `optout` all count. It clears if they later send `START`, `OPTIN`, or `UNSTOP`,
1647
+ * or if they keep replying on the chat sustained two-way conversation is treated
1648
+ * as a sign the stop keyword was a false positive.
1649
+ *
1650
+ * Linq enforces this: while a recipient is opted out, every send to them is
1651
+ * rejected with `403` (error code `2024`) before the message is queued, across
1652
+ * every chat and every line on your account. Nothing is delivered, including a
1653
+ * final courtesy message — to send one, set `override_optout: true` on that single
1654
+ * request.
1643
1655
  */
1644
1656
  status: 'HEALTHY' | 'AT_RISK' | 'CRITICAL' | 'OPTED_OUT';
1645
1657
 
@@ -2133,6 +2145,15 @@ export interface PhoneNumberStatusUpdatedWebhookEvent {
2133
2145
  | 'message.edited'
2134
2146
  | 'reaction.added'
2135
2147
  | 'reaction.removed'
2148
+ | 'poll.received'
2149
+ | 'poll.failed'
2150
+ | 'poll.sent'
2151
+ | 'poll.delivered'
2152
+ | 'poll.read'
2153
+ | 'poll.updated'
2154
+ | 'poll.vote.added'
2155
+ | 'poll.vote.removed'
2156
+ | 'poll.reaction.added'
2136
2157
  | 'participant.added'
2137
2158
  | 'participant.removed'
2138
2159
  | 'chat.created'
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.33.0'; // x-release-please-version
1
+ export const VERSION = '0.34.0'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.33.0";
1
+ export declare const VERSION = "0.34.0";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.33.0";
1
+ export declare const VERSION = "0.34.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.33.0'; // x-release-please-version
4
+ exports.VERSION = '0.34.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '0.33.0'; // x-release-please-version
1
+ export const VERSION = '0.34.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map