@linqapp/sdk 0.53.0 → 0.54.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.
- package/CHANGELOG.md +14 -0
- package/client.d.mts +4 -4
- package/client.d.mts.map +1 -1
- package/client.d.ts +4 -4
- package/client.d.ts.map +1 -1
- package/client.js +2 -2
- package/client.js.map +1 -1
- package/client.mjs +2 -2
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/chats/chats.d.mts +12 -12
- package/resources/chats/chats.d.ts +12 -12
- package/resources/index.d.mts +1 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/payment-requests.d.mts +2 -2
- package/resources/payment-requests.d.ts +2 -2
- package/resources/payment-requests.js +2 -2
- package/resources/payment-requests.mjs +2 -2
- package/resources/phone-numbers.d.mts +6 -4
- package/resources/phone-numbers.d.mts.map +1 -1
- package/resources/phone-numbers.d.ts +6 -4
- package/resources/phone-numbers.d.ts.map +1 -1
- package/resources/webhook-events.d.mts +1 -1
- package/resources/webhook-events.d.mts.map +1 -1
- package/resources/webhook-events.d.ts +1 -1
- package/resources/webhook-events.d.ts.map +1 -1
- package/resources/webhook-subscriptions.d.mts +1 -1
- package/resources/webhook-subscriptions.d.ts +1 -1
- package/resources/webhook-subscriptions.js +1 -1
- package/resources/webhook-subscriptions.mjs +1 -1
- package/resources/webhooks.d.mts +108 -20
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +108 -20
- package/resources/webhooks.d.ts.map +1 -1
- package/src/client.ts +4 -2
- package/src/resources/chats/chats.ts +12 -12
- package/src/resources/index.ts +1 -0
- package/src/resources/payment-requests.ts +2 -2
- package/src/resources/phone-numbers.ts +6 -4
- package/src/resources/webhook-events.ts +1 -1
- package/src/resources/webhook-subscriptions.ts +1 -1
- package/src/resources/webhooks.ts +121 -18
- 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
|
@@ -141,7 +141,7 @@ import { path } from '../internal/utils/path';
|
|
|
141
141
|
* `POST /v3/chats/{chatId}/messages` — it renders as a rich card with your
|
|
142
142
|
* branding (title, amount, image) instead of a bare URL, which converts far
|
|
143
143
|
* better. A `link` part must be the only part in the message. See
|
|
144
|
-
* [Rich Link Previews](/guides/messaging/sending-messages).
|
|
144
|
+
* [Rich Link Previews](/channel/imessage/guides/messaging/sending-messages).
|
|
145
145
|
*
|
|
146
146
|
* On a supported iPhone the link opens an **Apple Pay App Clip** — a native,
|
|
147
147
|
* no-install checkout sheet. Everywhere else (Android, desktop, iPhones
|
|
@@ -191,7 +191,7 @@ import { path } from '../internal/utils/path';
|
|
|
191
191
|
* Subscribe to payment lifecycle events to reconcile server-side rather than
|
|
192
192
|
* polling: `payment.succeeded`, `payment.canceled`, and `payment.expired`.
|
|
193
193
|
* Each event carries the payment request id, amount, currency, and your
|
|
194
|
-
* `metadata`. See [Webhooks](/guides/webhooks).
|
|
194
|
+
* `metadata`. See [Webhooks](/channel/imessage/guides/webhooks).
|
|
195
195
|
*/
|
|
196
196
|
export class PaymentRequests extends APIResource {
|
|
197
197
|
/**
|
|
@@ -383,8 +383,9 @@ export namespace PhoneNumberListResponse {
|
|
|
383
383
|
* Unlike chat health, line reputation does not include `opted_out` — opt-out
|
|
384
384
|
* applies to individual recipients, not the whole line.
|
|
385
385
|
*
|
|
386
|
-
* See the
|
|
387
|
-
*
|
|
386
|
+
* See the
|
|
387
|
+
* [Phone Reputation guide](/channel/imessage/guides/phone-numbers/phone-reputation)
|
|
388
|
+
* for what each status means and how to react.
|
|
388
389
|
*/
|
|
389
390
|
reputation: PhoneNumber.Reputation;
|
|
390
391
|
|
|
@@ -404,8 +405,9 @@ export namespace PhoneNumberListResponse {
|
|
|
404
405
|
* Unlike chat health, line reputation does not include `opted_out` — opt-out
|
|
405
406
|
* applies to individual recipients, not the whole line.
|
|
406
407
|
*
|
|
407
|
-
* See the
|
|
408
|
-
*
|
|
408
|
+
* See the
|
|
409
|
+
* [Phone Reputation guide](/channel/imessage/guides/phone-numbers/phone-reputation)
|
|
410
|
+
* for what each status means and how to react.
|
|
409
411
|
*/
|
|
410
412
|
export interface Reputation {
|
|
411
413
|
/**
|
|
@@ -202,7 +202,7 @@ export interface WebhookEventListResponse {
|
|
|
202
202
|
/**
|
|
203
203
|
* URL to the webhook events documentation
|
|
204
204
|
*/
|
|
205
|
-
doc_url: 'https://docs.linqapp.com/guides/webhooks/events';
|
|
205
|
+
doc_url: 'https://docs.linqapp.com/channel/imessage/guides/webhooks/events';
|
|
206
206
|
|
|
207
207
|
/**
|
|
208
208
|
* List of all available webhook event types
|
|
@@ -161,7 +161,7 @@ export class WebhookSubscriptions extends APIResource {
|
|
|
161
161
|
* - Legacy `X-Webhook-*` headers are also sent for backwards compatibility
|
|
162
162
|
* (deprecated)
|
|
163
163
|
* - See
|
|
164
|
-
* [Verifying Webhook Signatures](https://docs.linqapp.com/guides/webhooks#verifying-webhook-signatures)
|
|
164
|
+
* [Verifying Webhook Signatures](https://docs.linqapp.com/channel/imessage/guides/webhooks#verifying-webhook-signatures)
|
|
165
165
|
* for verification details
|
|
166
166
|
* - Failed deliveries (5xx, 429, network errors) are retried up to 10 times over
|
|
167
167
|
* ~25 minutes with exponential backoff
|
|
@@ -146,8 +146,8 @@ export namespace MessageEventV2 {
|
|
|
146
146
|
* relevant section of the Chat Health guide. To gate a send, act on the response
|
|
147
147
|
* rather than the status: a `403` is the authoritative answer.
|
|
148
148
|
*
|
|
149
|
-
* See the [Chat Health guide](/guides/chats/chat-health) for what
|
|
150
|
-
* means and how to react.
|
|
149
|
+
* See the [Chat Health guide](/channel/imessage/guides/chats/chat-health) for what
|
|
150
|
+
* each status means and how to react.
|
|
151
151
|
*/
|
|
152
152
|
health_status: Chat.HealthStatus;
|
|
153
153
|
|
|
@@ -174,8 +174,8 @@ export namespace MessageEventV2 {
|
|
|
174
174
|
* relevant section of the Chat Health guide. To gate a send, act on the response
|
|
175
175
|
* rather than the status: a `403` is the authoritative answer.
|
|
176
176
|
*
|
|
177
|
-
* See the [Chat Health guide](/guides/chats/chat-health) for what
|
|
178
|
-
* means and how to react.
|
|
177
|
+
* See the [Chat Health guide](/channel/imessage/guides/chats/chat-health) for what
|
|
178
|
+
* each status means and how to react.
|
|
179
179
|
*/
|
|
180
180
|
export interface HealthStatus {
|
|
181
181
|
/**
|
|
@@ -185,8 +185,8 @@ export namespace MessageEventV2 {
|
|
|
185
185
|
|
|
186
186
|
/**
|
|
187
187
|
* Current health bucket for the chat. See the
|
|
188
|
-
* [Chat Health guide](/guides/chats/chat-health) for what each
|
|
189
|
-
* to react. `doc_url` deep-links to the relevant section.
|
|
188
|
+
* [Chat Health guide](/channel/imessage/guides/chats/chat-health) for what each
|
|
189
|
+
* value means and how to react. `doc_url` deep-links to the relevant section.
|
|
190
190
|
*
|
|
191
191
|
* `OPTED_OUT` — the recipient sent `STOP`, `UNSUBSCRIBE`, `OPTOUT`, `CANCEL`,
|
|
192
192
|
* `END`, or `QUIT`. The keyword must be the whole trimmed message, never part of a
|
|
@@ -1308,8 +1308,8 @@ export namespace MessageEditedWebhookEvent {
|
|
|
1308
1308
|
* relevant section of the Chat Health guide. To gate a send, act on the response
|
|
1309
1309
|
* rather than the status: a `403` is the authoritative answer.
|
|
1310
1310
|
*
|
|
1311
|
-
* See the [Chat Health guide](/guides/chats/chat-health) for what
|
|
1312
|
-
* means and how to react.
|
|
1311
|
+
* See the [Chat Health guide](/channel/imessage/guides/chats/chat-health) for what
|
|
1312
|
+
* each status means and how to react.
|
|
1313
1313
|
*/
|
|
1314
1314
|
health_status: Chat.HealthStatus;
|
|
1315
1315
|
|
|
@@ -1336,8 +1336,8 @@ export namespace MessageEditedWebhookEvent {
|
|
|
1336
1336
|
* relevant section of the Chat Health guide. To gate a send, act on the response
|
|
1337
1337
|
* rather than the status: a `403` is the authoritative answer.
|
|
1338
1338
|
*
|
|
1339
|
-
* See the [Chat Health guide](/guides/chats/chat-health) for what
|
|
1340
|
-
* means and how to react.
|
|
1339
|
+
* See the [Chat Health guide](/channel/imessage/guides/chats/chat-health) for what
|
|
1340
|
+
* each status means and how to react.
|
|
1341
1341
|
*/
|
|
1342
1342
|
export interface HealthStatus {
|
|
1343
1343
|
/**
|
|
@@ -1347,8 +1347,8 @@ export namespace MessageEditedWebhookEvent {
|
|
|
1347
1347
|
|
|
1348
1348
|
/**
|
|
1349
1349
|
* Current health bucket for the chat. See the
|
|
1350
|
-
* [Chat Health guide](/guides/chats/chat-health) for what each
|
|
1351
|
-
* to react. `doc_url` deep-links to the relevant section.
|
|
1350
|
+
* [Chat Health guide](/channel/imessage/guides/chats/chat-health) for what each
|
|
1351
|
+
* value means and how to react. `doc_url` deep-links to the relevant section.
|
|
1352
1352
|
*
|
|
1353
1353
|
* `OPTED_OUT` — the recipient sent `STOP`, `UNSUBSCRIBE`, `OPTOUT`, `CANCEL`,
|
|
1354
1354
|
* `END`, or `QUIT`. The keyword must be the whole trimmed message, never part of a
|
|
@@ -2798,8 +2798,8 @@ export namespace ChatCreatedWebhookEvent {
|
|
|
2798
2798
|
* relevant section of the Chat Health guide. To gate a send, act on the response
|
|
2799
2799
|
* rather than the status: a `403` is the authoritative answer.
|
|
2800
2800
|
*
|
|
2801
|
-
* See the [Chat Health guide](/guides/chats/chat-health) for what
|
|
2802
|
-
* means and how to react.
|
|
2801
|
+
* See the [Chat Health guide](/channel/imessage/guides/chats/chat-health) for what
|
|
2802
|
+
* each status means and how to react.
|
|
2803
2803
|
*/
|
|
2804
2804
|
health_status: Data.HealthStatus;
|
|
2805
2805
|
|
|
@@ -2831,8 +2831,8 @@ export namespace ChatCreatedWebhookEvent {
|
|
|
2831
2831
|
* relevant section of the Chat Health guide. To gate a send, act on the response
|
|
2832
2832
|
* rather than the status: a `403` is the authoritative answer.
|
|
2833
2833
|
*
|
|
2834
|
-
* See the [Chat Health guide](/guides/chats/chat-health) for what
|
|
2835
|
-
* means and how to react.
|
|
2834
|
+
* See the [Chat Health guide](/channel/imessage/guides/chats/chat-health) for what
|
|
2835
|
+
* each status means and how to react.
|
|
2836
2836
|
*/
|
|
2837
2837
|
export interface HealthStatus {
|
|
2838
2838
|
/**
|
|
@@ -2842,8 +2842,8 @@ export namespace ChatCreatedWebhookEvent {
|
|
|
2842
2842
|
|
|
2843
2843
|
/**
|
|
2844
2844
|
* Current health bucket for the chat. See the
|
|
2845
|
-
* [Chat Health guide](/guides/chats/chat-health) for what each
|
|
2846
|
-
* to react. `doc_url` deep-links to the relevant section.
|
|
2845
|
+
* [Chat Health guide](/channel/imessage/guides/chats/chat-health) for what each
|
|
2846
|
+
* value means and how to react. `doc_url` deep-links to the relevant section.
|
|
2847
2847
|
*
|
|
2848
2848
|
* `OPTED_OUT` — the recipient sent `STOP`, `UNSUBSCRIBE`, `OPTOUT`, `CANCEL`,
|
|
2849
2849
|
* `END`, or `QUIT`. The keyword must be the whole trimmed message, never part of a
|
|
@@ -3539,6 +3539,107 @@ export namespace ChatBackgroundUpdateFailedWebhookEvent {
|
|
|
3539
3539
|
}
|
|
3540
3540
|
}
|
|
3541
3541
|
|
|
3542
|
+
/**
|
|
3543
|
+
* Complete webhook payload for contact_card.received events
|
|
3544
|
+
*/
|
|
3545
|
+
export interface ContactCardReceivedWebhookEvent {
|
|
3546
|
+
/**
|
|
3547
|
+
* API version for the webhook payload format
|
|
3548
|
+
*/
|
|
3549
|
+
api_version: string;
|
|
3550
|
+
|
|
3551
|
+
/**
|
|
3552
|
+
* When the event was created
|
|
3553
|
+
*/
|
|
3554
|
+
created_at: string;
|
|
3555
|
+
|
|
3556
|
+
/**
|
|
3557
|
+
* Payload for contact_card.received webhook events.
|
|
3558
|
+
*
|
|
3559
|
+
* A contact belongs to a line, not to an individual chat. You receive one event
|
|
3560
|
+
* per person who shares their contact, regardless of how many chats they have in
|
|
3561
|
+
* common with your line.
|
|
3562
|
+
*
|
|
3563
|
+
* The event fires again whenever the shared contact's name or media changes.
|
|
3564
|
+
*/
|
|
3565
|
+
data: ContactCardReceivedWebhookEvent.Data;
|
|
3566
|
+
|
|
3567
|
+
/**
|
|
3568
|
+
* Unique identifier for this event (for deduplication)
|
|
3569
|
+
*/
|
|
3570
|
+
event_id: string;
|
|
3571
|
+
|
|
3572
|
+
/**
|
|
3573
|
+
* Valid webhook event types that can be subscribed to.
|
|
3574
|
+
*
|
|
3575
|
+
* **Note:** `message.edited` is only delivered to subscriptions using
|
|
3576
|
+
* `webhook_version: "2026-02-03"`. Subscribing to this event on a v2025
|
|
3577
|
+
* subscription will not produce any deliveries.
|
|
3578
|
+
*/
|
|
3579
|
+
event_type: WebhookEventsAPI.WebhookEventType;
|
|
3580
|
+
|
|
3581
|
+
/**
|
|
3582
|
+
* Partner identifier. Present on all webhooks for cross-referencing.
|
|
3583
|
+
*/
|
|
3584
|
+
partner_id: string;
|
|
3585
|
+
|
|
3586
|
+
/**
|
|
3587
|
+
* Trace ID for debugging and correlation across systems.
|
|
3588
|
+
*/
|
|
3589
|
+
trace_id: string;
|
|
3590
|
+
|
|
3591
|
+
/**
|
|
3592
|
+
* Date-based webhook payload version. Determined by the `?version=` query
|
|
3593
|
+
* parameter in your webhook subscription URL. If no version parameter is
|
|
3594
|
+
* specified, defaults based on subscription creation date.
|
|
3595
|
+
*/
|
|
3596
|
+
webhook_version: string;
|
|
3597
|
+
}
|
|
3598
|
+
|
|
3599
|
+
export namespace ContactCardReceivedWebhookEvent {
|
|
3600
|
+
/**
|
|
3601
|
+
* Payload for contact_card.received webhook events.
|
|
3602
|
+
*
|
|
3603
|
+
* A contact belongs to a line, not to an individual chat. You receive one event
|
|
3604
|
+
* per person who shares their contact, regardless of how many chats they have in
|
|
3605
|
+
* common with your line.
|
|
3606
|
+
*
|
|
3607
|
+
* The event fires again whenever the shared contact's name or media changes.
|
|
3608
|
+
*/
|
|
3609
|
+
export interface Data {
|
|
3610
|
+
/**
|
|
3611
|
+
* First name from the shared contact card
|
|
3612
|
+
*/
|
|
3613
|
+
first_name: string;
|
|
3614
|
+
|
|
3615
|
+
/**
|
|
3616
|
+
* Last name from the shared contact card (may be empty)
|
|
3617
|
+
*/
|
|
3618
|
+
last_name: string;
|
|
3619
|
+
|
|
3620
|
+
/**
|
|
3621
|
+
* Which of your lines they shared it with.
|
|
3622
|
+
*/
|
|
3623
|
+
owner_handle: string;
|
|
3624
|
+
|
|
3625
|
+
/**
|
|
3626
|
+
* The person who shared their card — a phone number or email address.
|
|
3627
|
+
*/
|
|
3628
|
+
sender_handle: string;
|
|
3629
|
+
|
|
3630
|
+
/**
|
|
3631
|
+
* URL of the contact's media, served from `cdn.linqapp.com`. `null` when the
|
|
3632
|
+
* contact shared no media, and also when media was shared but could not be
|
|
3633
|
+
* retrieved — this field does not distinguish the two.
|
|
3634
|
+
*
|
|
3635
|
+
* Download the media and store it yourself. The URL may be signed and expire, in
|
|
3636
|
+
* as little as 45 minutes, and altering its query string invalidates it
|
|
3637
|
+
* immediately.
|
|
3638
|
+
*/
|
|
3639
|
+
media_url?: string | null;
|
|
3640
|
+
}
|
|
3641
|
+
}
|
|
3642
|
+
|
|
3542
3643
|
/**
|
|
3543
3644
|
* Complete webhook payload for phone_number.status_updated events
|
|
3544
3645
|
*/
|
|
@@ -3701,6 +3802,7 @@ export type UnwrapWebhookEvent =
|
|
|
3701
3802
|
| ChatTypingIndicatorStoppedWebhookEvent
|
|
3702
3803
|
| ChatBackgroundUpdatedWebhookEvent
|
|
3703
3804
|
| ChatBackgroundUpdateFailedWebhookEvent
|
|
3805
|
+
| ContactCardReceivedWebhookEvent
|
|
3704
3806
|
| PhoneNumberStatusUpdatedWebhookEvent;
|
|
3705
3807
|
|
|
3706
3808
|
export declare namespace Webhooks {
|
|
@@ -3739,6 +3841,7 @@ export declare namespace Webhooks {
|
|
|
3739
3841
|
type ChatTypingIndicatorStoppedWebhookEvent as ChatTypingIndicatorStoppedWebhookEvent,
|
|
3740
3842
|
type ChatBackgroundUpdatedWebhookEvent as ChatBackgroundUpdatedWebhookEvent,
|
|
3741
3843
|
type ChatBackgroundUpdateFailedWebhookEvent as ChatBackgroundUpdateFailedWebhookEvent,
|
|
3844
|
+
type ContactCardReceivedWebhookEvent as ContactCardReceivedWebhookEvent,
|
|
3742
3845
|
type PhoneNumberStatusUpdatedWebhookEvent as PhoneNumberStatusUpdatedWebhookEvent,
|
|
3743
3846
|
type UnwrapWebhookEvent as UnwrapWebhookEvent,
|
|
3744
3847
|
};
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.54.0'; // 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.54.0";
|
|
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.54.0";
|
|
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.54.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|