@linqapp/sdk 0.32.1 → 0.33.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 (203) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/README.md +82 -112
  3. package/client.d.mts +42 -6
  4. package/client.d.mts.map +1 -1
  5. package/client.d.ts +42 -6
  6. package/client.d.ts.map +1 -1
  7. package/client.js +39 -3
  8. package/client.js.map +1 -1
  9. package/client.mjs +39 -3
  10. package/client.mjs.map +1 -1
  11. package/core/error.d.mts +13 -0
  12. package/core/error.d.mts.map +1 -1
  13. package/core/error.d.ts +13 -0
  14. package/core/error.d.ts.map +1 -1
  15. package/core/error.js +5 -1
  16. package/core/error.js.map +1 -1
  17. package/core/error.mjs +5 -1
  18. package/core/error.mjs.map +1 -1
  19. package/package.json +1 -1
  20. package/resources/available-number.d.mts +13 -1
  21. package/resources/available-number.d.mts.map +1 -1
  22. package/resources/available-number.d.ts +13 -1
  23. package/resources/available-number.d.ts.map +1 -1
  24. package/resources/available-number.js +2 -1
  25. package/resources/available-number.js.map +1 -1
  26. package/resources/available-number.mjs +2 -1
  27. package/resources/available-number.mjs.map +1 -1
  28. package/resources/chats/chats.d.mts +175 -70
  29. package/resources/chats/chats.d.mts.map +1 -1
  30. package/resources/chats/chats.d.ts +175 -70
  31. package/resources/chats/chats.d.ts.map +1 -1
  32. package/resources/chats/chats.js +65 -61
  33. package/resources/chats/chats.js.map +1 -1
  34. package/resources/chats/chats.mjs +65 -61
  35. package/resources/chats/chats.mjs.map +1 -1
  36. package/resources/chats/index.d.mts +3 -2
  37. package/resources/chats/index.d.mts.map +1 -1
  38. package/resources/chats/index.d.ts +3 -2
  39. package/resources/chats/index.d.ts.map +1 -1
  40. package/resources/chats/index.js +3 -1
  41. package/resources/chats/index.js.map +1 -1
  42. package/resources/chats/index.mjs +1 -0
  43. package/resources/chats/index.mjs.map +1 -1
  44. package/resources/chats/location.d.mts +25 -25
  45. package/resources/chats/location.d.mts.map +1 -1
  46. package/resources/chats/location.d.ts +25 -25
  47. package/resources/chats/location.d.ts.map +1 -1
  48. package/resources/chats/location.js +27 -27
  49. package/resources/chats/location.js.map +1 -1
  50. package/resources/chats/location.mjs +27 -27
  51. package/resources/chats/location.mjs.map +1 -1
  52. package/resources/chats/messages.d.mts +28 -21
  53. package/resources/chats/messages.d.mts.map +1 -1
  54. package/resources/chats/messages.d.ts +28 -21
  55. package/resources/chats/messages.d.ts.map +1 -1
  56. package/resources/chats/messages.js +16 -16
  57. package/resources/chats/messages.js.map +1 -1
  58. package/resources/chats/messages.mjs +16 -16
  59. package/resources/chats/messages.mjs.map +1 -1
  60. package/resources/chats/polls.d.mts +171 -0
  61. package/resources/chats/polls.d.mts.map +1 -0
  62. package/resources/chats/polls.d.ts +171 -0
  63. package/resources/chats/polls.d.ts.map +1 -0
  64. package/resources/chats/polls.js +95 -0
  65. package/resources/chats/polls.js.map +1 -0
  66. package/resources/chats/polls.mjs +91 -0
  67. package/resources/chats/polls.mjs.map +1 -0
  68. package/resources/contact-card.d.mts +29 -28
  69. package/resources/contact-card.d.mts.map +1 -1
  70. package/resources/contact-card.d.ts +29 -28
  71. package/resources/contact-card.d.ts.map +1 -1
  72. package/resources/contact-card.js +23 -22
  73. package/resources/contact-card.js.map +1 -1
  74. package/resources/contact-card.mjs +23 -22
  75. package/resources/contact-card.mjs.map +1 -1
  76. package/resources/experiences.d.mts +91 -0
  77. package/resources/experiences.d.mts.map +1 -0
  78. package/resources/experiences.d.ts +91 -0
  79. package/resources/experiences.d.ts.map +1 -0
  80. package/resources/experiences.js +29 -0
  81. package/resources/experiences.js.map +1 -0
  82. package/resources/experiences.mjs +25 -0
  83. package/resources/experiences.mjs.map +1 -0
  84. package/resources/index.d.mts +7 -3
  85. package/resources/index.d.mts.map +1 -1
  86. package/resources/index.d.ts +7 -3
  87. package/resources/index.d.ts.map +1 -1
  88. package/resources/index.js +10 -2
  89. package/resources/index.js.map +1 -1
  90. package/resources/index.mjs +5 -1
  91. package/resources/index.mjs.map +1 -1
  92. package/resources/messages/index.d.mts +3 -0
  93. package/resources/messages/index.d.mts.map +1 -0
  94. package/resources/messages/index.d.ts +3 -0
  95. package/resources/messages/index.d.ts.map +1 -0
  96. package/resources/messages/index.js +9 -0
  97. package/resources/messages/index.js.map +1 -0
  98. package/resources/messages/index.mjs +4 -0
  99. package/resources/messages/index.mjs.map +1 -0
  100. package/resources/messages/messages.d.mts +795 -0
  101. package/resources/messages/messages.d.mts.map +1 -0
  102. package/resources/messages/messages.d.ts +795 -0
  103. package/resources/messages/messages.d.ts.map +1 -0
  104. package/resources/messages/messages.js +298 -0
  105. package/resources/messages/messages.js.map +1 -0
  106. package/resources/messages/messages.mjs +293 -0
  107. package/resources/messages/messages.mjs.map +1 -0
  108. package/resources/messages/poll.d.mts +131 -0
  109. package/resources/messages/poll.d.mts.map +1 -0
  110. package/resources/messages/poll.d.ts +131 -0
  111. package/resources/messages/poll.d.ts.map +1 -0
  112. package/resources/messages/poll.js +119 -0
  113. package/resources/messages/poll.js.map +1 -0
  114. package/resources/messages/poll.mjs +115 -0
  115. package/resources/messages/poll.mjs.map +1 -0
  116. package/resources/messages.d.mts +1 -747
  117. package/resources/messages.d.mts.map +1 -1
  118. package/resources/messages.d.ts +1 -747
  119. package/resources/messages.d.ts.map +1 -1
  120. package/resources/messages.js +2 -275
  121. package/resources/messages.js.map +1 -1
  122. package/resources/messages.mjs +1 -273
  123. package/resources/messages.mjs.map +1 -1
  124. package/resources/payment-handles.d.mts +87 -0
  125. package/resources/payment-handles.d.mts.map +1 -0
  126. package/resources/payment-handles.d.ts +87 -0
  127. package/resources/payment-handles.d.ts.map +1 -0
  128. package/resources/payment-handles.js +76 -0
  129. package/resources/payment-handles.js.map +1 -0
  130. package/resources/payment-handles.mjs +72 -0
  131. package/resources/payment-handles.mjs.map +1 -0
  132. package/resources/payment-providers.d.mts +58 -0
  133. package/resources/payment-providers.d.mts.map +1 -0
  134. package/resources/payment-providers.d.ts +58 -0
  135. package/resources/payment-providers.d.ts.map +1 -0
  136. package/resources/payment-providers.js +45 -0
  137. package/resources/payment-providers.js.map +1 -0
  138. package/resources/payment-providers.mjs +41 -0
  139. package/resources/payment-providers.mjs.map +1 -0
  140. package/resources/payment-requests.d.mts +2 -2
  141. package/resources/payment-requests.d.ts +2 -2
  142. package/resources/payment-requests.js +2 -2
  143. package/resources/payment-requests.mjs +2 -2
  144. package/resources/payments.d.mts +116 -0
  145. package/resources/payments.d.mts.map +1 -0
  146. package/resources/payments.d.ts +116 -0
  147. package/resources/payments.d.ts.map +1 -0
  148. package/resources/payments.js +70 -0
  149. package/resources/payments.js.map +1 -0
  150. package/resources/payments.mjs +66 -0
  151. package/resources/payments.mjs.map +1 -0
  152. package/resources/phone-numbers.d.mts +11 -11
  153. package/resources/phone-numbers.d.mts.map +1 -1
  154. package/resources/phone-numbers.d.ts +11 -11
  155. package/resources/phone-numbers.d.ts.map +1 -1
  156. package/resources/phone-numbers.js +13 -13
  157. package/resources/phone-numbers.js.map +1 -1
  158. package/resources/phone-numbers.mjs +13 -13
  159. package/resources/phone-numbers.mjs.map +1 -1
  160. package/resources/webhook-events.d.mts +1 -1
  161. package/resources/webhook-events.d.mts.map +1 -1
  162. package/resources/webhook-events.d.ts +1 -1
  163. package/resources/webhook-events.d.ts.map +1 -1
  164. package/resources/webhook-subscriptions.d.mts +11 -11
  165. package/resources/webhook-subscriptions.d.mts.map +1 -1
  166. package/resources/webhook-subscriptions.d.ts +11 -11
  167. package/resources/webhook-subscriptions.d.ts.map +1 -1
  168. package/resources/webhook-subscriptions.js +13 -13
  169. package/resources/webhook-subscriptions.js.map +1 -1
  170. package/resources/webhook-subscriptions.mjs +13 -13
  171. package/resources/webhook-subscriptions.mjs.map +1 -1
  172. package/resources/webhooks.d.mts +72 -1
  173. package/resources/webhooks.d.mts.map +1 -1
  174. package/resources/webhooks.d.ts +72 -1
  175. package/resources/webhooks.d.ts.map +1 -1
  176. package/src/client.ts +91 -20
  177. package/src/core/error.ts +20 -1
  178. package/src/resources/available-number.ts +14 -1
  179. package/src/resources/chats/chats.ts +203 -85
  180. package/src/resources/chats/index.ts +3 -2
  181. package/src/resources/chats/location.ts +28 -28
  182. package/src/resources/chats/messages.ts +40 -32
  183. package/src/resources/chats/polls.ts +196 -0
  184. package/src/resources/contact-card.ts +36 -35
  185. package/src/resources/experiences.ts +118 -0
  186. package/src/resources/index.ts +23 -5
  187. package/src/resources/messages/index.ts +18 -0
  188. package/src/resources/messages/messages.ts +958 -0
  189. package/src/resources/messages/poll.ts +151 -0
  190. package/src/resources/messages.ts +1 -894
  191. package/src/resources/payment-handles.ts +114 -0
  192. package/src/resources/payment-providers.ts +81 -0
  193. package/src/resources/payment-requests.ts +2 -2
  194. package/src/resources/payments.ts +163 -0
  195. package/src/resources/phone-numbers.ts +14 -14
  196. package/src/resources/webhook-events.ts +9 -0
  197. package/src/resources/webhook-subscriptions.ts +14 -14
  198. package/src/resources/webhooks.ts +82 -0
  199. package/src/version.ts +1 -1
  200. package/version.d.mts +1 -1
  201. package/version.d.ts +1 -1
  202. package/version.js +1 -1
  203. package/version.mjs +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../src/resources/messages.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,4BAAyB;AAC/C,OAAO,KAAK,MAAM,oBAAiB;AACnC,OAAO,KAAK,QAAQ,yBAAsB;AAC1C,OAAO,KAAK,gBAAgB,4BAAyB;AACrD,OAAO,EAAE,UAAU,EAAE,+BAA4B;AACjD,OAAO,EAAE,sBAAsB,EAAE,KAAK,4BAA4B,EAAE,WAAW,EAAE,8BAA2B;AAE5G,OAAO,EAAE,cAAc,EAAE,uCAAoC;AAG7D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2DG;AACH,qBAAa,QAAS,SAAQ,WAAW;IACvC;;;;;;;;;;;;;;;;;;;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,MAAM,CAAC;QAEnB;;WAEG;QACH,UAAU,CAAC,EAAE,MAAM,CAAC;QAEpB;;WAEG;QACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;QAE1B;;WAEG;QACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;KAC9B;CACF;AAED,MAAM,CAAC,OAAO,WAAW,QAAQ,CAAC;IAChC,OAAO,EACL,KAAK,OAAO,IAAI,OAAO,EACvB,KAAK,aAAa,IAAI,aAAa,EACnC,KAAK,OAAO,IAAI,OAAO,EACvB,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,8BAA8B,IAAI,8BAA8B,EACrE,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,+BAA+B,IAAI,+BAA+B,EACvE,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,0BAA0B,IAAI,0BAA0B,GAC9D,CAAC;CACH"}
1
+ {"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../src/resources/messages.ts"],"names":[],"mappings":"AAEA,oCAAiC"}
@@ -1,279 +1,6 @@
1
1
  "use strict";
2
2
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.Messages = void 0;
5
- const resource_1 = require("../core/resource.js");
6
- const pagination_1 = require("../core/pagination.js");
7
- const headers_1 = require("../internal/headers.js");
8
- const path_1 = require("../internal/utils/path.js");
9
- /**
10
- * Messages are individual communications within a chat thread.
11
- *
12
- * Messages can include text, media attachments, rich link previews, special effects
13
- * (like confetti or fireworks), and reactions. All messages are associated with a
14
- * specific chat and sent from a phone number you own.
15
- *
16
- * Messages support delivery status tracking, read receipts, and editing capabilities.
17
- *
18
- * ## Rich Link Previews
19
- *
20
- * Send a URL as a `link` part to deliver it with a rich preview card showing the
21
- * page's title, description, and image (when available). A `link` part must be the
22
- * **only** part in the message — it cannot be combined with text or media parts.
23
- * To send a URL without a preview card, include it in a `text` part instead.
24
- *
25
- * **Limitations:**
26
- * - A `link` part cannot be combined with other parts in the same message.
27
- * - Maximum URL length: 2,048 characters.
28
- *
29
- * ## Ephemeral Messages (Privacy Tier)
30
- *
31
- * For regulated or sensitive conversations, opt in to the **ephemeral messages** tier by contacting your Linq support contact. When enabled, every message on the covered phone numbers is automatically given a fixed **24-hour retention window** — after that window the platform permanently deletes the message from Linq storage. There is no per-message flag; ephemerality is applied automatically based on your configuration.
32
- *
33
- * You can request it at two scopes:
34
- *
35
- * | Scope | Effect |
36
- * |---|---|
37
- * | **Partner-wide** | Every outbound and inbound message on every phone number under your account is retained for 24 hours, then deleted. |
38
- * | **Per phone number** | Only the specified phone numbers have their messages auto-deleted. The rest follow the standard message-retention policy. |
39
- *
40
- * **Behavioral differences vs the standard default:**
41
- *
42
- * | Aspect | Standard | Ephemeral |
43
- * |---|---|---|
44
- * | Retention | Retained per the standard message-retention policy | **Hard backstop: 24 hours** from when the message is created |
45
- * | After expiry | Message stays retrievable | Message is permanently deleted — `GET /v3/messages/{messageId}` returns `404` and it no longer appears in `GET /v3/chats/{chatId}/messages` |
46
- * | Content on expiry | N/A | Text, formatting, and attachment references are scrubbed; the message is gone, not blanked out |
47
- * | Cross-partner isolation | Enforced | Enforced |
48
- *
49
- * **How the 24-hour window works:**
50
- *
51
- * - The window is fixed at **24 hours from message creation** (`created_at`) and cannot be configured per message.
52
- * - It mirrors the ephemeral *attachments* 1-day backstop, so a message and any media it carries expire together.
53
- * - Expiry is delivery-independent — the clock starts when the message is created, not when it is delivered or read.
54
- *
55
- * **What you observe:**
56
- *
57
- * - **No expiry timestamp is exposed.** API responses and webhook payloads do not include the deletion time. If you need it, compute `created_at + 24h` yourself.
58
- * - **No deletion webhook is sent.** There is no `message.deleted` event — a message simply stops being retrievable once its window passes.
59
- * - **Delivery is unaffected.** Ephemeral messages send, deliver, and fire the usual `message.sent` / `message.received` and status webhooks exactly like standard messages. Only retention changes.
60
- *
61
- * **When to choose ephemeral:**
62
- *
63
- * - You have a compliance requirement that the platform must not retain message content beyond a short window.
64
- * - The conversation is high-sensitivity (PHI, financial, identity verification) and you do not want it sitting in storage long-term.
65
- * - Your application is the system of record — you capture what you need from the delivery webhook in real time and do not rely on reading message history back from Linq later.
66
- *
67
- * **Important:** ephemeral applies in *both directions* — messages you send **and** messages received by the phone numbers in that scope. Because Linq can no longer return the message after 24 hours, persist anything you need to keep from the webhook payload at the time it is delivered.
68
- */
69
- class Messages extends resource_1.APIResource {
70
- /**
71
- * Send a message to one or more recipients **without supplying a `from` number**.
72
- * Linq resolves both the sending line and the target chat for you, then returns
73
- * exactly which line was used, which chat the message landed in, whether a new
74
- * chat was created, and every resulting message id.
75
- *
76
- * This fuses "create chat" and "send message" behind a single message-centric
77
- * resource. Provide only the recipients (`to`) and the `message`; the platform
78
- * decides the rest.
79
- *
80
- * ## How the from-number and chat are chosen
81
- *
82
- * - **Reuse** — if a chat with exactly these recipients already exists on a line
83
- * that can still send, the message is sent into that chat on its existing line
84
- * (`from_selection.reason = reused_active_chat`). The most-recently-active such
85
- * chat wins; chats stranded on flagged lines (e.g. by an earlier failover) are
86
- * skipped.
87
- * - **New** — if no such chat exists, a new chat is created on the best available
88
- * line (`from_selection.reason = new_best_number`).
89
- * - **Failover** — if matching chats exist but none is on a line that can send, a
90
- * **new** chat is created on a fresh best line and the flagged chat is abandoned
91
- * (`from_selection.reason = failover_flagged`, `previous_chat_id` set). If you
92
- * supply `continuation_message`, that text is sent as the single message INSTEAD
93
- * of `message` (useful as a fresh-number-appropriate opener). Exactly one
94
- * message is sent either way.
95
- *
96
- * Recipients (`to`) are an order-independent set: a single handle is a direct
97
- * chat, multiple handles a group chat.
98
- *
99
- * ## Differences from POST /v3/chats
100
- *
101
- * - The first message **may contain a link** (including for a newly created chat).
102
- * Note: sending a link as the very first message on a freshly selected line can
103
- * elevate that line's flagging risk — it is allowed, not recommended.
104
- * - Voice memos are **not** supported here. To send an iMessage voice-memo bubble,
105
- * use `POST /v3/chats/{chatId}/voicememo` with a known chat id.
106
- *
107
- * ## Service preference, effects, decorations
108
- *
109
- * Set `message.preferred_service` (`iMessage` | `RCS` | `SMS`), `message.effect`,
110
- * and per-part `text_decorations` exactly as on the other send endpoints.
111
- *
112
- * Always responds `202 Accepted` — chat creation is incidental to the send.
113
- *
114
- * @example
115
- * ```ts
116
- * const message = await client.messages.create({
117
- * message: {
118
- * parts: [
119
- * {
120
- * type: 'text',
121
- * value:
122
- * 'Hi! Thanks for reaching out — how can we help?',
123
- * },
124
- * ],
125
- * },
126
- * to: ['+14155559876'],
127
- * });
128
- * ```
129
- */
130
- create(params, options) {
131
- const { 'Idempotency-Key': idempotencyKey, ...body } = params;
132
- return this._client.post('/v3/messages', {
133
- body,
134
- ...options,
135
- headers: (0, headers_1.buildHeaders)([
136
- { ...(idempotencyKey != null ? { 'Idempotency-Key': idempotencyKey } : undefined) },
137
- options?.headers,
138
- ]),
139
- });
140
- }
141
- /**
142
- * Retrieve all messages in a conversation thread. Given any message ID in the
143
- * thread, returns the originator message and all replies in chronological order.
144
- *
145
- * If the message is not part of a thread, returns just that single message.
146
- *
147
- * Supports pagination and configurable ordering.
148
- *
149
- * @example
150
- * ```ts
151
- * // Automatically fetches more pages as needed.
152
- * for await (const message of client.messages.listMessagesThread(
153
- * '69a37c7d-af4f-4b5e-af42-e28e98ce873a',
154
- * )) {
155
- * // ...
156
- * }
157
- * ```
158
- */
159
- listMessagesThread(messageID, query = {}, options) {
160
- return this._client.getAPIList((0, path_1.path) `/v3/messages/${messageID}/thread`, (pagination_1.ListMessagesPagination), {
161
- query,
162
- ...options,
163
- });
164
- }
165
- /**
166
- * Retrieve a specific message by its ID. This endpoint returns the full message
167
- * details including text, attachments, reactions, and metadata.
168
- *
169
- * @example
170
- * ```ts
171
- * const message = await client.messages.retrieve(
172
- * '69a37c7d-af4f-4b5e-af42-e28e98ce873a',
173
- * );
174
- * ```
175
- */
176
- retrieve(messageID, options) {
177
- return this._client.get((0, path_1.path) `/v3/messages/${messageID}`, options);
178
- }
179
- /**
180
- * Deletes a message from the Linq API only. This does NOT unsend or remove the
181
- * message from the actual chat — recipients will still see the message.
182
- *
183
- * @example
184
- * ```ts
185
- * await client.messages.delete(
186
- * '69a37c7d-af4f-4b5e-af42-e28e98ce873a',
187
- * );
188
- * ```
189
- */
190
- delete(messageID, options) {
191
- return this._client.delete((0, path_1.path) `/v3/messages/${messageID}`, {
192
- ...options,
193
- headers: (0, headers_1.buildHeaders)([{ Accept: '*/*' }, options?.headers]),
194
- });
195
- }
196
- /**
197
- * Add or remove emoji reactions to messages. Reactions let users express their
198
- * response to a message without sending a new message.
199
- *
200
- * **Supported Reactions:**
201
- *
202
- * - love ❤️
203
- * - like 👍
204
- * - dislike 👎
205
- * - laugh 😂
206
- * - emphasize ‼️
207
- * - question ❓
208
- * - custom - any emoji (use `custom_emoji` field to specify)
209
- *
210
- * @example
211
- * ```ts
212
- * const response = await client.messages.addReaction(
213
- * '69a37c7d-af4f-4b5e-af42-e28e98ce873a',
214
- * { operation: 'add', type: 'love' },
215
- * );
216
- * ```
217
- */
218
- addReaction(messageID, body, options) {
219
- return this._client.post((0, path_1.path) `/v3/messages/${messageID}/reactions`, { body, ...options });
220
- }
221
- /**
222
- * Edit the text content of a specific part of a previously sent message.
223
- *
224
- * **Note:** A message can be edited up to 5 times, and only within 15 minutes of
225
- * when it was originally sent.
226
- *
227
- * @example
228
- * ```ts
229
- * const message = await client.messages.update(
230
- * '69a37c7d-af4f-4b5e-af42-e28e98ce873a',
231
- * { text: 'This is the edited message content' },
232
- * );
233
- * ```
234
- */
235
- update(messageID, body, options) {
236
- return this._client.patch((0, path_1.path) `/v3/messages/${messageID}`, { body, ...options });
237
- }
238
- /**
239
- * Replaces a previously delivered `imessage_app` card on the recipient's screen
240
- * with new content, instead of posting a new bubble (like a game move redrawing
241
- * the board).
242
- *
243
- * The update is delivered as a **new message** with its own id and delivery
244
- * lifecycle (`message.sent` / `message.delivered` / `message.failed` webhooks fire
245
- * for the new id). To update the card again, reference the message id returned by
246
- * this call.
247
- *
248
- * Constraints:
249
- *
250
- * - The referenced message must be an `imessage_app` card sent by you (`400`
251
- * otherwise — inbound cards cannot be updated).
252
- * - The referenced card must already be delivered (`409` otherwise — retry after
253
- * the `message.delivered` webhook for it).
254
- * - The app identity (`team_id`, `bundle_id`, name) is inherited from the original
255
- * card and cannot change; only `url`, `fallback_text`, and `layout` are
256
- * replaced.
257
- * - iMessage-only, like all app cards.
258
- * - Concurrent updates against the same card are not serialized server-side; the
259
- * last one delivered wins on the recipient's screen. Serialize updates by always
260
- * referencing the message id returned by the previous call.
261
- *
262
- * @example
263
- * ```ts
264
- * const response = await client.messages.updateAppCard(
265
- * '69a37c7d-af4f-4b5e-af42-e28e98ce873a',
266
- * {
267
- * layout: { caption: 'Score: 2 – 1' },
268
- * fallback_text: 'Score update',
269
- * url: 'https://app.example.com/card?game=7f3a&move=2',
270
- * },
271
- * );
272
- * ```
273
- */
274
- updateAppCard(messageID, body, options) {
275
- return this._client.post((0, path_1.path) `/v3/messages/${messageID}/update`, { body, ...options });
276
- }
277
- }
278
- exports.Messages = Messages;
4
+ const tslib_1 = require("../internal/tslib.js");
5
+ tslib_1.__exportStar(require("./messages/index.js"), exports);
279
6
  //# sourceMappingURL=messages.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"messages.js","sourceRoot":"","sources":["../src/resources/messages.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAK/C,sDAA4G;AAC5G,oDAAmD;AAEnD,oDAA8C;AAE9C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2DG;AACH,MAAa,QAAS,SAAQ,sBAAW;IACvC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2DG;IACH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;IACH,WAAW,CACT,SAAiB,EACjB,IAA8B,EAC9B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,gBAAgB,SAAS,YAAY,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC5F,CAAC;IAED;;;;;;;;;;;;;OAaG;IACH,MAAM,CAAC,SAAiB,EAAE,IAAyB,EAAE,OAAwB;QAC3E,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAA,WAAI,EAAA,gBAAgB,SAAS,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACnF,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAmCG;IACH,aAAa,CACX,SAAiB,EACjB,IAAgC,EAChC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,gBAAgB,SAAS,SAAS,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACzF,CAAC;CACF;AAlOD,4BAkOC"}
1
+ {"version":3,"file":"messages.js","sourceRoot":"","sources":["../src/resources/messages.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,8DAAiC"}
@@ -1,275 +1,3 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
- import { APIResource } from "../core/resource.mjs";
3
- import { ListMessagesPagination } from "../core/pagination.mjs";
4
- import { buildHeaders } from "../internal/headers.mjs";
5
- import { path } from "../internal/utils/path.mjs";
6
- /**
7
- * Messages are individual communications within a chat thread.
8
- *
9
- * Messages can include text, media attachments, rich link previews, special effects
10
- * (like confetti or fireworks), and reactions. All messages are associated with a
11
- * specific chat and sent from a phone number you own.
12
- *
13
- * Messages support delivery status tracking, read receipts, and editing capabilities.
14
- *
15
- * ## Rich Link Previews
16
- *
17
- * Send a URL as a `link` part to deliver it with a rich preview card showing the
18
- * page's title, description, and image (when available). A `link` part must be the
19
- * **only** part in the message — it cannot be combined with text or media parts.
20
- * To send a URL without a preview card, include it in a `text` part instead.
21
- *
22
- * **Limitations:**
23
- * - A `link` part cannot be combined with other parts in the same message.
24
- * - Maximum URL length: 2,048 characters.
25
- *
26
- * ## Ephemeral Messages (Privacy Tier)
27
- *
28
- * For regulated or sensitive conversations, opt in to the **ephemeral messages** tier by contacting your Linq support contact. When enabled, every message on the covered phone numbers is automatically given a fixed **24-hour retention window** — after that window the platform permanently deletes the message from Linq storage. There is no per-message flag; ephemerality is applied automatically based on your configuration.
29
- *
30
- * You can request it at two scopes:
31
- *
32
- * | Scope | Effect |
33
- * |---|---|
34
- * | **Partner-wide** | Every outbound and inbound message on every phone number under your account is retained for 24 hours, then deleted. |
35
- * | **Per phone number** | Only the specified phone numbers have their messages auto-deleted. The rest follow the standard message-retention policy. |
36
- *
37
- * **Behavioral differences vs the standard default:**
38
- *
39
- * | Aspect | Standard | Ephemeral |
40
- * |---|---|---|
41
- * | Retention | Retained per the standard message-retention policy | **Hard backstop: 24 hours** from when the message is created |
42
- * | After expiry | Message stays retrievable | Message is permanently deleted — `GET /v3/messages/{messageId}` returns `404` and it no longer appears in `GET /v3/chats/{chatId}/messages` |
43
- * | Content on expiry | N/A | Text, formatting, and attachment references are scrubbed; the message is gone, not blanked out |
44
- * | Cross-partner isolation | Enforced | Enforced |
45
- *
46
- * **How the 24-hour window works:**
47
- *
48
- * - The window is fixed at **24 hours from message creation** (`created_at`) and cannot be configured per message.
49
- * - It mirrors the ephemeral *attachments* 1-day backstop, so a message and any media it carries expire together.
50
- * - Expiry is delivery-independent — the clock starts when the message is created, not when it is delivered or read.
51
- *
52
- * **What you observe:**
53
- *
54
- * - **No expiry timestamp is exposed.** API responses and webhook payloads do not include the deletion time. If you need it, compute `created_at + 24h` yourself.
55
- * - **No deletion webhook is sent.** There is no `message.deleted` event — a message simply stops being retrievable once its window passes.
56
- * - **Delivery is unaffected.** Ephemeral messages send, deliver, and fire the usual `message.sent` / `message.received` and status webhooks exactly like standard messages. Only retention changes.
57
- *
58
- * **When to choose ephemeral:**
59
- *
60
- * - You have a compliance requirement that the platform must not retain message content beyond a short window.
61
- * - The conversation is high-sensitivity (PHI, financial, identity verification) and you do not want it sitting in storage long-term.
62
- * - Your application is the system of record — you capture what you need from the delivery webhook in real time and do not rely on reading message history back from Linq later.
63
- *
64
- * **Important:** ephemeral applies in *both directions* — messages you send **and** messages received by the phone numbers in that scope. Because Linq can no longer return the message after 24 hours, persist anything you need to keep from the webhook payload at the time it is delivered.
65
- */
66
- export class Messages extends APIResource {
67
- /**
68
- * Send a message to one or more recipients **without supplying a `from` number**.
69
- * Linq resolves both the sending line and the target chat for you, then returns
70
- * exactly which line was used, which chat the message landed in, whether a new
71
- * chat was created, and every resulting message id.
72
- *
73
- * This fuses "create chat" and "send message" behind a single message-centric
74
- * resource. Provide only the recipients (`to`) and the `message`; the platform
75
- * decides the rest.
76
- *
77
- * ## How the from-number and chat are chosen
78
- *
79
- * - **Reuse** — if a chat with exactly these recipients already exists on a line
80
- * that can still send, the message is sent into that chat on its existing line
81
- * (`from_selection.reason = reused_active_chat`). The most-recently-active such
82
- * chat wins; chats stranded on flagged lines (e.g. by an earlier failover) are
83
- * skipped.
84
- * - **New** — if no such chat exists, a new chat is created on the best available
85
- * line (`from_selection.reason = new_best_number`).
86
- * - **Failover** — if matching chats exist but none is on a line that can send, a
87
- * **new** chat is created on a fresh best line and the flagged chat is abandoned
88
- * (`from_selection.reason = failover_flagged`, `previous_chat_id` set). If you
89
- * supply `continuation_message`, that text is sent as the single message INSTEAD
90
- * of `message` (useful as a fresh-number-appropriate opener). Exactly one
91
- * message is sent either way.
92
- *
93
- * Recipients (`to`) are an order-independent set: a single handle is a direct
94
- * chat, multiple handles a group chat.
95
- *
96
- * ## Differences from POST /v3/chats
97
- *
98
- * - The first message **may contain a link** (including for a newly created chat).
99
- * Note: sending a link as the very first message on a freshly selected line can
100
- * elevate that line's flagging risk — it is allowed, not recommended.
101
- * - Voice memos are **not** supported here. To send an iMessage voice-memo bubble,
102
- * use `POST /v3/chats/{chatId}/voicememo` with a known chat id.
103
- *
104
- * ## Service preference, effects, decorations
105
- *
106
- * Set `message.preferred_service` (`iMessage` | `RCS` | `SMS`), `message.effect`,
107
- * and per-part `text_decorations` exactly as on the other send endpoints.
108
- *
109
- * Always responds `202 Accepted` — chat creation is incidental to the send.
110
- *
111
- * @example
112
- * ```ts
113
- * const message = await client.messages.create({
114
- * message: {
115
- * parts: [
116
- * {
117
- * type: 'text',
118
- * value:
119
- * 'Hi! Thanks for reaching out — how can we help?',
120
- * },
121
- * ],
122
- * },
123
- * to: ['+14155559876'],
124
- * });
125
- * ```
126
- */
127
- create(params, options) {
128
- const { 'Idempotency-Key': idempotencyKey, ...body } = params;
129
- return this._client.post('/v3/messages', {
130
- body,
131
- ...options,
132
- headers: buildHeaders([
133
- { ...(idempotencyKey != null ? { 'Idempotency-Key': idempotencyKey } : undefined) },
134
- options?.headers,
135
- ]),
136
- });
137
- }
138
- /**
139
- * Retrieve all messages in a conversation thread. Given any message ID in the
140
- * thread, returns the originator message and all replies in chronological order.
141
- *
142
- * If the message is not part of a thread, returns just that single message.
143
- *
144
- * Supports pagination and configurable ordering.
145
- *
146
- * @example
147
- * ```ts
148
- * // Automatically fetches more pages as needed.
149
- * for await (const message of client.messages.listMessagesThread(
150
- * '69a37c7d-af4f-4b5e-af42-e28e98ce873a',
151
- * )) {
152
- * // ...
153
- * }
154
- * ```
155
- */
156
- listMessagesThread(messageID, query = {}, options) {
157
- return this._client.getAPIList(path `/v3/messages/${messageID}/thread`, (ListMessagesPagination), {
158
- query,
159
- ...options,
160
- });
161
- }
162
- /**
163
- * Retrieve a specific message by its ID. This endpoint returns the full message
164
- * details including text, attachments, reactions, and metadata.
165
- *
166
- * @example
167
- * ```ts
168
- * const message = await client.messages.retrieve(
169
- * '69a37c7d-af4f-4b5e-af42-e28e98ce873a',
170
- * );
171
- * ```
172
- */
173
- retrieve(messageID, options) {
174
- return this._client.get(path `/v3/messages/${messageID}`, options);
175
- }
176
- /**
177
- * Deletes a message from the Linq API only. This does NOT unsend or remove the
178
- * message from the actual chat — recipients will still see the message.
179
- *
180
- * @example
181
- * ```ts
182
- * await client.messages.delete(
183
- * '69a37c7d-af4f-4b5e-af42-e28e98ce873a',
184
- * );
185
- * ```
186
- */
187
- delete(messageID, options) {
188
- return this._client.delete(path `/v3/messages/${messageID}`, {
189
- ...options,
190
- headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
191
- });
192
- }
193
- /**
194
- * Add or remove emoji reactions to messages. Reactions let users express their
195
- * response to a message without sending a new message.
196
- *
197
- * **Supported Reactions:**
198
- *
199
- * - love ❤️
200
- * - like 👍
201
- * - dislike 👎
202
- * - laugh 😂
203
- * - emphasize ‼️
204
- * - question ❓
205
- * - custom - any emoji (use `custom_emoji` field to specify)
206
- *
207
- * @example
208
- * ```ts
209
- * const response = await client.messages.addReaction(
210
- * '69a37c7d-af4f-4b5e-af42-e28e98ce873a',
211
- * { operation: 'add', type: 'love' },
212
- * );
213
- * ```
214
- */
215
- addReaction(messageID, body, options) {
216
- return this._client.post(path `/v3/messages/${messageID}/reactions`, { body, ...options });
217
- }
218
- /**
219
- * Edit the text content of a specific part of a previously sent message.
220
- *
221
- * **Note:** A message can be edited up to 5 times, and only within 15 minutes of
222
- * when it was originally sent.
223
- *
224
- * @example
225
- * ```ts
226
- * const message = await client.messages.update(
227
- * '69a37c7d-af4f-4b5e-af42-e28e98ce873a',
228
- * { text: 'This is the edited message content' },
229
- * );
230
- * ```
231
- */
232
- update(messageID, body, options) {
233
- return this._client.patch(path `/v3/messages/${messageID}`, { body, ...options });
234
- }
235
- /**
236
- * Replaces a previously delivered `imessage_app` card on the recipient's screen
237
- * with new content, instead of posting a new bubble (like a game move redrawing
238
- * the board).
239
- *
240
- * The update is delivered as a **new message** with its own id and delivery
241
- * lifecycle (`message.sent` / `message.delivered` / `message.failed` webhooks fire
242
- * for the new id). To update the card again, reference the message id returned by
243
- * this call.
244
- *
245
- * Constraints:
246
- *
247
- * - The referenced message must be an `imessage_app` card sent by you (`400`
248
- * otherwise — inbound cards cannot be updated).
249
- * - The referenced card must already be delivered (`409` otherwise — retry after
250
- * the `message.delivered` webhook for it).
251
- * - The app identity (`team_id`, `bundle_id`, name) is inherited from the original
252
- * card and cannot change; only `url`, `fallback_text`, and `layout` are
253
- * replaced.
254
- * - iMessage-only, like all app cards.
255
- * - Concurrent updates against the same card are not serialized server-side; the
256
- * last one delivered wins on the recipient's screen. Serialize updates by always
257
- * referencing the message id returned by the previous call.
258
- *
259
- * @example
260
- * ```ts
261
- * const response = await client.messages.updateAppCard(
262
- * '69a37c7d-af4f-4b5e-af42-e28e98ce873a',
263
- * {
264
- * layout: { caption: 'Score: 2 – 1' },
265
- * fallback_text: 'Score update',
266
- * url: 'https://app.example.com/card?game=7f3a&move=2',
267
- * },
268
- * );
269
- * ```
270
- */
271
- updateAppCard(messageID, body, options) {
272
- return this._client.post(path `/v3/messages/${messageID}/update`, { body, ...options });
273
- }
274
- }
2
+ export * from "./messages/index.mjs";
275
3
  //# sourceMappingURL=messages.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"messages.mjs","sourceRoot":"","sources":["../src/resources/messages.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAK/C,OAAO,EAAE,sBAAsB,EAAkD,+BAA2B;AAC5G,OAAO,EAAE,YAAY,EAAE,gCAA4B;AAEnD,OAAO,EAAE,IAAI,EAAE,mCAA+B;AAE9C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2DG;AACH,MAAM,OAAO,QAAS,SAAQ,WAAW;IACvC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2DG;IACH,MAAM,CAAC,MAA2B,EA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B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,gBAAgB,SAAS,YAAY,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC5F,CAAC;IAED;;;;;;;;;;;;;OAaG;IACH,MAAM,CAAC,SAAiB,EAAE,IAAyB,EAAE,OAAwB;QAC3E,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAA,gBAAgB,SAAS,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACnF,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAmCG;IACH,aAAa,CACX,SAAiB,EACjB,IAAgC,EAChC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,gBAAgB,SAAS,SAAS,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACzF,CAAC;CACF"}
1
+ {"version":3,"file":"messages.mjs","sourceRoot":"","sources":["../src/resources/messages.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,qCAAiC"}
@@ -0,0 +1,87 @@
1
+ import { APIResource } from "../core/resource.mjs";
2
+ import { APIPromise } from "../core/api-promise.mjs";
3
+ import { RequestOptions } from "../internal/request-options.mjs";
4
+ /**
5
+ * Let an agent pay on a customer's behalf with a single-use virtual card.
6
+ * Connect a customer once, then create a payment — a virtual card is minted
7
+ * scoped to that purchase and the card details are handed back for checkout.
8
+ */
9
+ export declare class PaymentHandles extends APIResource {
10
+ /**
11
+ * Starts connecting a customer (by phone/email) so an agent can pay on their
12
+ * behalf. Linq drives the OTP + consent ceremony through the messaging channel;
13
+ * this returns `pending` and a `connection.created` webhook fires once the
14
+ * customer completes it.
15
+ *
16
+ * @example
17
+ * ```ts
18
+ * const paymentHandleConnection =
19
+ * await client.paymentHandles.connect('handle');
20
+ * ```
21
+ */
22
+ connect(handle: string, options?: RequestOptions): APIPromise<PaymentHandleConnection>;
23
+ /**
24
+ * Get a handle's connection status
25
+ *
26
+ * @example
27
+ * ```ts
28
+ * const paymentHandleConnection =
29
+ * await client.paymentHandles.connection('handle');
30
+ * ```
31
+ */
32
+ connection(handle: string, options?: RequestOptions): APIPromise<PaymentHandleConnection>;
33
+ /**
34
+ * Revokes this partner's grant for the customer. Only your grant is removed; the
35
+ * customer's wallet at the provider is untouched.
36
+ *
37
+ * @example
38
+ * ```ts
39
+ * const paymentHandleConnection =
40
+ * await client.paymentHandles.revoke('handle');
41
+ * ```
42
+ */
43
+ revoke(handle: string, options?: RequestOptions): APIPromise<PaymentHandleConnection>;
44
+ /**
45
+ * Completes the ceremony `connect` started: verifies the code, records the
46
+ * customer's consent, and stores the connection. Returns `connected` on success,
47
+ * after which payments for this handle no longer need the customer present.
48
+ *
49
+ * The code reaches you however your channel works — typically the customer replies
50
+ * with it in the thread. Codes are single-use and short-lived; if one has expired,
51
+ * call `connect` again for a fresh `connect_id`.
52
+ *
53
+ * @example
54
+ * ```ts
55
+ * const paymentHandleConnection =
56
+ * await client.paymentHandles.verify('handle', {
57
+ * code: '482913',
58
+ * connect_id: 'cs_01HZY8',
59
+ * });
60
+ * ```
61
+ */
62
+ verify(handle: string, body: PaymentHandleVerifyParams, options?: RequestOptions): APIPromise<PaymentHandleConnection>;
63
+ }
64
+ export interface PaymentHandleConnection {
65
+ /**
66
+ * Returned only by `connect`, and only while the ceremony is pending. Nothing on
67
+ * our side persists it — it comes back from the provider and is required again to
68
+ * verify — so hold it until you submit the code.
69
+ */
70
+ connect_id?: string;
71
+ handle?: string;
72
+ status?: 'not_connected' | 'pending' | 'connected' | 'revoked';
73
+ }
74
+ export interface PaymentHandleVerifyParams {
75
+ /**
76
+ * The one-time code the customer received.
77
+ */
78
+ code: string;
79
+ /**
80
+ * The id returned by `connect`.
81
+ */
82
+ connect_id: string;
83
+ }
84
+ export declare namespace PaymentHandles {
85
+ export { type PaymentHandleConnection as PaymentHandleConnection, type PaymentHandleVerifyParams as PaymentHandleVerifyParams, };
86
+ }
87
+ //# sourceMappingURL=payment-handles.d.mts.map