@linqapp/sdk 0.11.0 → 0.12.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.
- package/CHANGELOG.md +21 -0
- package/README.md +14 -0
- package/client.d.mts +15 -4
- package/client.d.mts.map +1 -1
- package/client.d.ts +15 -4
- package/client.d.ts.map +1 -1
- package/client.js +15 -4
- package/client.js.map +1 -1
- package/client.mjs +15 -4
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/chats/chats.d.mts +11 -2
- package/resources/chats/chats.d.mts.map +1 -1
- package/resources/chats/chats.d.ts +11 -2
- package/resources/chats/chats.d.ts.map +1 -1
- package/resources/chats/chats.js.map +1 -1
- package/resources/chats/chats.mjs.map +1 -1
- package/resources/chats/messages.d.mts +36 -6
- package/resources/chats/messages.d.mts.map +1 -1
- package/resources/chats/messages.d.ts +36 -6
- package/resources/chats/messages.d.ts.map +1 -1
- package/resources/chats/messages.js +15 -4
- package/resources/chats/messages.js.map +1 -1
- package/resources/chats/messages.mjs +15 -4
- package/resources/chats/messages.mjs.map +1 -1
- package/resources/messages.d.mts +36 -6
- package/resources/messages.d.mts.map +1 -1
- package/resources/messages.d.ts +36 -6
- package/resources/messages.d.ts.map +1 -1
- package/resources/messages.js +15 -4
- package/resources/messages.js.map +1 -1
- package/resources/messages.mjs +15 -4
- package/resources/messages.mjs.map +1 -1
- package/resources/webhook-subscriptions.d.mts +34 -0
- package/resources/webhook-subscriptions.d.mts.map +1 -1
- package/resources/webhook-subscriptions.d.ts +34 -0
- package/resources/webhook-subscriptions.d.ts.map +1 -1
- package/resources/webhook-subscriptions.js +10 -0
- package/resources/webhook-subscriptions.js.map +1 -1
- package/resources/webhook-subscriptions.mjs +10 -0
- package/resources/webhook-subscriptions.mjs.map +1 -1
- package/resources/webhooks.d.mts +28 -2
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +28 -2
- package/resources/webhooks.d.ts.map +1 -1
- package/src/client.ts +15 -4
- package/src/resources/chats/chats.ts +11 -2
- package/src/resources/chats/messages.ts +39 -6
- package/src/resources/messages.ts +39 -6
- package/src/resources/webhook-subscriptions.ts +38 -0
- package/src/resources/webhooks.ts +32 -2
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -102,6 +102,16 @@ export class WebhookSubscriptions extends APIResource {
|
|
|
102
102
|
* creation, a signing secret is generated for verifying webhook authenticity.
|
|
103
103
|
* **Store this secret securely — it cannot be retrieved later.**
|
|
104
104
|
*
|
|
105
|
+
* **Phone Number Filtering:**
|
|
106
|
+
*
|
|
107
|
+
* - Optionally specify `phone_numbers` to only receive events for specific lines
|
|
108
|
+
* - If omitted, events from all phone numbers are delivered (default behavior)
|
|
109
|
+
* - Use multiple subscriptions with different `phone_numbers` to route different
|
|
110
|
+
* lines to different endpoints
|
|
111
|
+
* - Each `target_url` can only be used once per account. To route different lines
|
|
112
|
+
* to different destinations, use a unique URL per subscription (e.g., append a
|
|
113
|
+
* query parameter: `https://example.com/webhook?line=1`)
|
|
114
|
+
*
|
|
105
115
|
* **Webhook Delivery:**
|
|
106
116
|
*
|
|
107
117
|
* - Events are sent via HTTP POST to the target URL
|
|
@@ -236,6 +246,12 @@ export interface WebhookSubscription {
|
|
|
236
246
|
* When the subscription was last updated
|
|
237
247
|
*/
|
|
238
248
|
updated_at: string;
|
|
249
|
+
|
|
250
|
+
/**
|
|
251
|
+
* Phone numbers this subscription filters for. If null or empty, events from all
|
|
252
|
+
* phone numbers are delivered.
|
|
253
|
+
*/
|
|
254
|
+
phone_numbers?: Array<string> | null;
|
|
239
255
|
}
|
|
240
256
|
|
|
241
257
|
/**
|
|
@@ -278,6 +294,12 @@ export interface WebhookSubscriptionCreateResponse {
|
|
|
278
294
|
* When the subscription was last updated
|
|
279
295
|
*/
|
|
280
296
|
updated_at: string;
|
|
297
|
+
|
|
298
|
+
/**
|
|
299
|
+
* Phone numbers this subscription filters for. If null or empty, events from all
|
|
300
|
+
* phone numbers are delivered.
|
|
301
|
+
*/
|
|
302
|
+
phone_numbers?: Array<string> | null;
|
|
281
303
|
}
|
|
282
304
|
|
|
283
305
|
export interface WebhookSubscriptionListResponse {
|
|
@@ -297,6 +319,14 @@ export interface WebhookSubscriptionCreateParams {
|
|
|
297
319
|
* URL where webhook events will be sent. Must be HTTPS.
|
|
298
320
|
*/
|
|
299
321
|
target_url: string;
|
|
322
|
+
|
|
323
|
+
/**
|
|
324
|
+
* Optional list of phone numbers to filter events for. Only events originating
|
|
325
|
+
* from these phone numbers will be delivered to this subscription. If omitted or
|
|
326
|
+
* empty, events from all phone numbers are delivered. Phone numbers must be in
|
|
327
|
+
* E.164 format.
|
|
328
|
+
*/
|
|
329
|
+
phone_numbers?: Array<string>;
|
|
300
330
|
}
|
|
301
331
|
|
|
302
332
|
export interface WebhookSubscriptionUpdateParams {
|
|
@@ -305,6 +335,14 @@ export interface WebhookSubscriptionUpdateParams {
|
|
|
305
335
|
*/
|
|
306
336
|
is_active?: boolean;
|
|
307
337
|
|
|
338
|
+
/**
|
|
339
|
+
* Updated list of phone numbers to filter events for. Set to a non-empty array to
|
|
340
|
+
* filter events to specific phone numbers. Set to an empty array or null to remove
|
|
341
|
+
* the filter and receive events from all phone numbers. Phone numbers must be in
|
|
342
|
+
* E.164 format.
|
|
343
|
+
*/
|
|
344
|
+
phone_numbers?: Array<string> | null;
|
|
345
|
+
|
|
308
346
|
/**
|
|
309
347
|
* Updated list of event types to subscribe to
|
|
310
348
|
*/
|
|
@@ -51,7 +51,7 @@ export interface MessageEventV2 {
|
|
|
51
51
|
/**
|
|
52
52
|
* Message parts (text and/or media)
|
|
53
53
|
*/
|
|
54
|
-
parts: Array<SchemasTextPartResponse | SchemasMediaPartResponse>;
|
|
54
|
+
parts: Array<SchemasTextPartResponse | SchemasMediaPartResponse | MessageEventV2.SchemasLinkPartResponse>;
|
|
55
55
|
|
|
56
56
|
/**
|
|
57
57
|
* The handle that sent this message
|
|
@@ -120,6 +120,21 @@ export namespace MessageEventV2 {
|
|
|
120
120
|
owner_handle?: Shared.ChatHandle | null;
|
|
121
121
|
}
|
|
122
122
|
|
|
123
|
+
/**
|
|
124
|
+
* A rich link preview part
|
|
125
|
+
*/
|
|
126
|
+
export interface SchemasLinkPartResponse {
|
|
127
|
+
/**
|
|
128
|
+
* Indicates this is a rich link preview part
|
|
129
|
+
*/
|
|
130
|
+
type: 'link';
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* The URL
|
|
134
|
+
*/
|
|
135
|
+
value: string;
|
|
136
|
+
}
|
|
137
|
+
|
|
123
138
|
/**
|
|
124
139
|
* Reference to the message this is replying to (for threaded replies)
|
|
125
140
|
*/
|
|
@@ -173,7 +188,7 @@ export interface MessagePayload {
|
|
|
173
188
|
/**
|
|
174
189
|
* Message content parts (text and/or media)
|
|
175
190
|
*/
|
|
176
|
-
parts?: Array<SchemasTextPartResponse | SchemasMediaPartResponse>;
|
|
191
|
+
parts?: Array<SchemasTextPartResponse | SchemasMediaPartResponse | MessagePayload.SchemasLinkPartResponse>;
|
|
177
192
|
|
|
178
193
|
/**
|
|
179
194
|
* When the message was read
|
|
@@ -197,6 +212,21 @@ export interface MessagePayload {
|
|
|
197
212
|
}
|
|
198
213
|
|
|
199
214
|
export namespace MessagePayload {
|
|
215
|
+
/**
|
|
216
|
+
* A rich link preview part
|
|
217
|
+
*/
|
|
218
|
+
export interface SchemasLinkPartResponse {
|
|
219
|
+
/**
|
|
220
|
+
* Indicates this is a rich link preview part
|
|
221
|
+
*/
|
|
222
|
+
type: 'link';
|
|
223
|
+
|
|
224
|
+
/**
|
|
225
|
+
* The URL
|
|
226
|
+
*/
|
|
227
|
+
value: string;
|
|
228
|
+
}
|
|
229
|
+
|
|
200
230
|
/**
|
|
201
231
|
* Reference to the message this is replying to
|
|
202
232
|
*/
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.12.1'; // x-release-please-version
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.12.1";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.12.1";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.12.1'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|