@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.
- package/CHANGELOG.md +26 -0
- package/README.md +82 -112
- package/client.d.mts +42 -6
- package/client.d.mts.map +1 -1
- package/client.d.ts +42 -6
- package/client.d.ts.map +1 -1
- package/client.js +39 -3
- package/client.js.map +1 -1
- package/client.mjs +39 -3
- package/client.mjs.map +1 -1
- package/core/error.d.mts +13 -0
- package/core/error.d.mts.map +1 -1
- package/core/error.d.ts +13 -0
- package/core/error.d.ts.map +1 -1
- package/core/error.js +5 -1
- package/core/error.js.map +1 -1
- package/core/error.mjs +5 -1
- package/core/error.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/available-number.d.mts +13 -1
- package/resources/available-number.d.mts.map +1 -1
- package/resources/available-number.d.ts +13 -1
- package/resources/available-number.d.ts.map +1 -1
- package/resources/available-number.js +2 -1
- package/resources/available-number.js.map +1 -1
- package/resources/available-number.mjs +2 -1
- package/resources/available-number.mjs.map +1 -1
- package/resources/chats/chats.d.mts +175 -70
- package/resources/chats/chats.d.mts.map +1 -1
- package/resources/chats/chats.d.ts +175 -70
- package/resources/chats/chats.d.ts.map +1 -1
- package/resources/chats/chats.js +65 -61
- package/resources/chats/chats.js.map +1 -1
- package/resources/chats/chats.mjs +65 -61
- package/resources/chats/chats.mjs.map +1 -1
- package/resources/chats/index.d.mts +3 -2
- package/resources/chats/index.d.mts.map +1 -1
- package/resources/chats/index.d.ts +3 -2
- package/resources/chats/index.d.ts.map +1 -1
- package/resources/chats/index.js +3 -1
- package/resources/chats/index.js.map +1 -1
- package/resources/chats/index.mjs +1 -0
- package/resources/chats/index.mjs.map +1 -1
- package/resources/chats/location.d.mts +25 -25
- package/resources/chats/location.d.mts.map +1 -1
- package/resources/chats/location.d.ts +25 -25
- package/resources/chats/location.d.ts.map +1 -1
- package/resources/chats/location.js +27 -27
- package/resources/chats/location.js.map +1 -1
- package/resources/chats/location.mjs +27 -27
- package/resources/chats/location.mjs.map +1 -1
- package/resources/chats/messages.d.mts +28 -21
- package/resources/chats/messages.d.mts.map +1 -1
- package/resources/chats/messages.d.ts +28 -21
- package/resources/chats/messages.d.ts.map +1 -1
- package/resources/chats/messages.js +16 -16
- package/resources/chats/messages.js.map +1 -1
- package/resources/chats/messages.mjs +16 -16
- package/resources/chats/messages.mjs.map +1 -1
- package/resources/chats/polls.d.mts +171 -0
- package/resources/chats/polls.d.mts.map +1 -0
- package/resources/chats/polls.d.ts +171 -0
- package/resources/chats/polls.d.ts.map +1 -0
- package/resources/chats/polls.js +95 -0
- package/resources/chats/polls.js.map +1 -0
- package/resources/chats/polls.mjs +91 -0
- package/resources/chats/polls.mjs.map +1 -0
- package/resources/contact-card.d.mts +29 -28
- package/resources/contact-card.d.mts.map +1 -1
- package/resources/contact-card.d.ts +29 -28
- package/resources/contact-card.d.ts.map +1 -1
- package/resources/contact-card.js +23 -22
- package/resources/contact-card.js.map +1 -1
- package/resources/contact-card.mjs +23 -22
- package/resources/contact-card.mjs.map +1 -1
- package/resources/experiences.d.mts +91 -0
- package/resources/experiences.d.mts.map +1 -0
- package/resources/experiences.d.ts +91 -0
- package/resources/experiences.d.ts.map +1 -0
- package/resources/experiences.js +29 -0
- package/resources/experiences.js.map +1 -0
- package/resources/experiences.mjs +25 -0
- package/resources/experiences.mjs.map +1 -0
- package/resources/index.d.mts +7 -3
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +7 -3
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +10 -2
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +5 -1
- package/resources/index.mjs.map +1 -1
- package/resources/messages/index.d.mts +3 -0
- package/resources/messages/index.d.mts.map +1 -0
- package/resources/messages/index.d.ts +3 -0
- package/resources/messages/index.d.ts.map +1 -0
- package/resources/messages/index.js +9 -0
- package/resources/messages/index.js.map +1 -0
- package/resources/messages/index.mjs +4 -0
- package/resources/messages/index.mjs.map +1 -0
- package/resources/messages/messages.d.mts +795 -0
- package/resources/messages/messages.d.mts.map +1 -0
- package/resources/messages/messages.d.ts +795 -0
- package/resources/messages/messages.d.ts.map +1 -0
- package/resources/messages/messages.js +298 -0
- package/resources/messages/messages.js.map +1 -0
- package/resources/messages/messages.mjs +293 -0
- package/resources/messages/messages.mjs.map +1 -0
- package/resources/messages/poll.d.mts +131 -0
- package/resources/messages/poll.d.mts.map +1 -0
- package/resources/messages/poll.d.ts +131 -0
- package/resources/messages/poll.d.ts.map +1 -0
- package/resources/messages/poll.js +119 -0
- package/resources/messages/poll.js.map +1 -0
- package/resources/messages/poll.mjs +115 -0
- package/resources/messages/poll.mjs.map +1 -0
- package/resources/messages.d.mts +1 -747
- package/resources/messages.d.mts.map +1 -1
- package/resources/messages.d.ts +1 -747
- package/resources/messages.d.ts.map +1 -1
- package/resources/messages.js +2 -275
- package/resources/messages.js.map +1 -1
- package/resources/messages.mjs +1 -273
- package/resources/messages.mjs.map +1 -1
- package/resources/payment-handles.d.mts +87 -0
- package/resources/payment-handles.d.mts.map +1 -0
- package/resources/payment-handles.d.ts +87 -0
- package/resources/payment-handles.d.ts.map +1 -0
- package/resources/payment-handles.js +76 -0
- package/resources/payment-handles.js.map +1 -0
- package/resources/payment-handles.mjs +72 -0
- package/resources/payment-handles.mjs.map +1 -0
- package/resources/payment-providers.d.mts +58 -0
- package/resources/payment-providers.d.mts.map +1 -0
- package/resources/payment-providers.d.ts +58 -0
- package/resources/payment-providers.d.ts.map +1 -0
- package/resources/payment-providers.js +45 -0
- package/resources/payment-providers.js.map +1 -0
- package/resources/payment-providers.mjs +41 -0
- package/resources/payment-providers.mjs.map +1 -0
- 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/payments.d.mts +116 -0
- package/resources/payments.d.mts.map +1 -0
- package/resources/payments.d.ts +116 -0
- package/resources/payments.d.ts.map +1 -0
- package/resources/payments.js +70 -0
- package/resources/payments.js.map +1 -0
- package/resources/payments.mjs +66 -0
- package/resources/payments.mjs.map +1 -0
- package/resources/phone-numbers.d.mts +11 -11
- package/resources/phone-numbers.d.mts.map +1 -1
- package/resources/phone-numbers.d.ts +11 -11
- package/resources/phone-numbers.d.ts.map +1 -1
- package/resources/phone-numbers.js +13 -13
- package/resources/phone-numbers.js.map +1 -1
- package/resources/phone-numbers.mjs +13 -13
- package/resources/phone-numbers.mjs.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 +11 -11
- package/resources/webhook-subscriptions.d.mts.map +1 -1
- package/resources/webhook-subscriptions.d.ts +11 -11
- package/resources/webhook-subscriptions.d.ts.map +1 -1
- package/resources/webhook-subscriptions.js +13 -13
- package/resources/webhook-subscriptions.js.map +1 -1
- package/resources/webhook-subscriptions.mjs +13 -13
- package/resources/webhook-subscriptions.mjs.map +1 -1
- package/resources/webhooks.d.mts +72 -1
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +72 -1
- package/resources/webhooks.d.ts.map +1 -1
- package/src/client.ts +91 -20
- package/src/core/error.ts +20 -1
- package/src/resources/available-number.ts +14 -1
- package/src/resources/chats/chats.ts +203 -85
- package/src/resources/chats/index.ts +3 -2
- package/src/resources/chats/location.ts +28 -28
- package/src/resources/chats/messages.ts +40 -32
- package/src/resources/chats/polls.ts +196 -0
- package/src/resources/contact-card.ts +36 -35
- package/src/resources/experiences.ts +118 -0
- package/src/resources/index.ts +23 -5
- package/src/resources/messages/index.ts +18 -0
- package/src/resources/messages/messages.ts +958 -0
- package/src/resources/messages/poll.ts +151 -0
- package/src/resources/messages.ts +1 -894
- package/src/resources/payment-handles.ts +114 -0
- package/src/resources/payment-providers.ts +81 -0
- package/src/resources/payment-requests.ts +2 -2
- package/src/resources/payments.ts +163 -0
- package/src/resources/phone-numbers.ts +14 -14
- package/src/resources/webhook-events.ts +9 -0
- package/src/resources/webhook-subscriptions.ts +14 -14
- package/src/resources/webhooks.ts +82 -0
- 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
package/src/client.ts
CHANGED
|
@@ -52,21 +52,18 @@ import {
|
|
|
52
52
|
ContactCardUpdateParams,
|
|
53
53
|
SetContactCard,
|
|
54
54
|
} from './resources/contact-card';
|
|
55
|
+
import { ExperienceListResponse, ExperienceRetrieveResponse, Experiences } from './resources/experiences';
|
|
55
56
|
import {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
Messages,
|
|
67
|
-
MessagesListMessagesPagination,
|
|
68
|
-
ReplyTo,
|
|
69
|
-
} from './resources/messages';
|
|
57
|
+
PaymentHandleConnection,
|
|
58
|
+
PaymentHandleVerifyParams,
|
|
59
|
+
PaymentHandles,
|
|
60
|
+
} from './resources/payment-handles';
|
|
61
|
+
import {
|
|
62
|
+
PaymentProvider,
|
|
63
|
+
PaymentProviderConnectParams,
|
|
64
|
+
PaymentProviderConnectResponse,
|
|
65
|
+
PaymentProviders,
|
|
66
|
+
} from './resources/payment-providers';
|
|
70
67
|
import {
|
|
71
68
|
PaymentRequest,
|
|
72
69
|
PaymentRequestCreateParams,
|
|
@@ -74,6 +71,7 @@ import {
|
|
|
74
71
|
PaymentRequestListResponse,
|
|
75
72
|
PaymentRequests,
|
|
76
73
|
} from './resources/payment-requests';
|
|
74
|
+
import { Payment, PaymentCreateParams, PaymentCredentialsResponse, Payments } from './resources/payments';
|
|
77
75
|
import {
|
|
78
76
|
PhoneNumberListResponse,
|
|
79
77
|
PhoneNumberUpdateParams,
|
|
@@ -135,6 +133,21 @@ import {
|
|
|
135
133
|
MessageContent,
|
|
136
134
|
TextPart,
|
|
137
135
|
} from './resources/chats/chats';
|
|
136
|
+
import {
|
|
137
|
+
Message,
|
|
138
|
+
MessageAddReactionParams,
|
|
139
|
+
MessageAddReactionResponse,
|
|
140
|
+
MessageCreateParams,
|
|
141
|
+
MessageCreateResponse,
|
|
142
|
+
MessageEffect,
|
|
143
|
+
MessageListMessagesThreadParams,
|
|
144
|
+
MessageUpdateAppCardParams,
|
|
145
|
+
MessageUpdateAppCardResponse,
|
|
146
|
+
MessageUpdateParams,
|
|
147
|
+
Messages,
|
|
148
|
+
MessagesListMessagesPagination,
|
|
149
|
+
ReplyTo,
|
|
150
|
+
} from './resources/messages/messages';
|
|
138
151
|
import { type Fetch } from './internal/builtin-types';
|
|
139
152
|
import { HeadersLike, NullableHeaders, buildHeaders } from './internal/headers';
|
|
140
153
|
import { FinalRequestOptions, RequestOptions } from './internal/request-options';
|
|
@@ -1192,7 +1205,7 @@ export class LinqAPIV3 {
|
|
|
1192
1205
|
*
|
|
1193
1206
|
* ## Connected accounts (Stripe Standard, direct charges)
|
|
1194
1207
|
*
|
|
1195
|
-
*
|
|
1208
|
+
* Payments run on **Stripe Connect Standard accounts** using **direct
|
|
1196
1209
|
* charges**: the charge is created on *your* connected account and **you are
|
|
1197
1210
|
* the merchant of record**. That means the money, the payout schedule, the
|
|
1198
1211
|
* customer relationship, and the compliance surface are all yours — Linq
|
|
@@ -1275,7 +1288,7 @@ export class LinqAPIV3 {
|
|
|
1275
1288
|
* no-install checkout sheet. Everywhere else (Android, desktop, iPhones
|
|
1276
1289
|
* without the App Clip yet) the same URL opens the web checkout, so the link
|
|
1277
1290
|
* always works. The App Clip experience for your payment links is registered
|
|
1278
|
-
* automatically by Linq and refreshed whenever you update your
|
|
1291
|
+
* automatically by Linq and refreshed whenever you update your payments
|
|
1279
1292
|
* branding; a newly registered experience can take up to ~24 hours to
|
|
1280
1293
|
* activate on Apple's side, during which links open the web checkout.
|
|
1281
1294
|
*
|
|
@@ -1288,6 +1301,34 @@ export class LinqAPIV3 {
|
|
|
1288
1301
|
*
|
|
1289
1302
|
*/
|
|
1290
1303
|
paymentRequests: API.PaymentRequests = new API.PaymentRequests(this);
|
|
1304
|
+
/**
|
|
1305
|
+
* Let an agent pay on a customer's behalf with a single-use virtual card.
|
|
1306
|
+
* Connect a customer once, then create a payment — a virtual card is minted
|
|
1307
|
+
* scoped to that purchase and the card details are handed back for checkout.
|
|
1308
|
+
*
|
|
1309
|
+
*/
|
|
1310
|
+
paymentProviders: API.PaymentProviders = new API.PaymentProviders(this);
|
|
1311
|
+
/**
|
|
1312
|
+
* Let an agent pay on a customer's behalf with a single-use virtual card.
|
|
1313
|
+
* Connect a customer once, then create a payment — a virtual card is minted
|
|
1314
|
+
* scoped to that purchase and the card details are handed back for checkout.
|
|
1315
|
+
*
|
|
1316
|
+
*/
|
|
1317
|
+
paymentHandles: API.PaymentHandles = new API.PaymentHandles(this);
|
|
1318
|
+
/**
|
|
1319
|
+
* Let an agent pay on a customer's behalf with a single-use virtual card.
|
|
1320
|
+
* Connect a customer once, then create a payment — a virtual card is minted
|
|
1321
|
+
* scoped to that purchase and the card details are handed back for checkout.
|
|
1322
|
+
*
|
|
1323
|
+
*/
|
|
1324
|
+
payments: API.Payments = new API.Payments(this);
|
|
1325
|
+
/**
|
|
1326
|
+
* Let an agent pay on a customer's behalf with a single-use virtual card.
|
|
1327
|
+
* Connect a customer once, then create a payment — a virtual card is minted
|
|
1328
|
+
* scoped to that purchase and the card details are handed back for checkout.
|
|
1329
|
+
*
|
|
1330
|
+
*/
|
|
1331
|
+
experiences: API.Experiences = new API.Experiences(this);
|
|
1291
1332
|
/**
|
|
1292
1333
|
* Webhook Subscriptions allow you to receive real-time notifications when events
|
|
1293
1334
|
* occur on your account.
|
|
@@ -1574,6 +1615,10 @@ LinqAPIV3.Phonenumbers = Phonenumbers;
|
|
|
1574
1615
|
LinqAPIV3.PhoneNumbers = PhoneNumbers;
|
|
1575
1616
|
LinqAPIV3.AvailableNumber = AvailableNumber;
|
|
1576
1617
|
LinqAPIV3.PaymentRequests = PaymentRequests;
|
|
1618
|
+
LinqAPIV3.PaymentProviders = PaymentProviders;
|
|
1619
|
+
LinqAPIV3.PaymentHandles = PaymentHandles;
|
|
1620
|
+
LinqAPIV3.Payments = Payments;
|
|
1621
|
+
LinqAPIV3.Experiences = Experiences;
|
|
1577
1622
|
LinqAPIV3.WebhookEvents = WebhookEvents;
|
|
1578
1623
|
LinqAPIV3.WebhookSubscriptions = WebhookSubscriptions;
|
|
1579
1624
|
LinqAPIV3.Capability = Capability;
|
|
@@ -1608,8 +1653,8 @@ export declare namespace LinqAPIV3 {
|
|
|
1608
1653
|
type ChatSendVoicememoResponse as ChatSendVoicememoResponse,
|
|
1609
1654
|
type ChatsListChatsPagination as ChatsListChatsPagination,
|
|
1610
1655
|
type ChatCreateParams as ChatCreateParams,
|
|
1611
|
-
type ChatListChatsParams as ChatListChatsParams,
|
|
1612
1656
|
type ChatUpdateParams as ChatUpdateParams,
|
|
1657
|
+
type ChatListChatsParams as ChatListChatsParams,
|
|
1613
1658
|
type ChatSendVoicememoParams as ChatSendVoicememoParams,
|
|
1614
1659
|
};
|
|
1615
1660
|
|
|
@@ -1623,9 +1668,9 @@ export declare namespace LinqAPIV3 {
|
|
|
1623
1668
|
type MessageUpdateAppCardResponse as MessageUpdateAppCardResponse,
|
|
1624
1669
|
type MessagesListMessagesPagination as MessagesListMessagesPagination,
|
|
1625
1670
|
type MessageCreateParams as MessageCreateParams,
|
|
1626
|
-
type MessageListMessagesThreadParams as MessageListMessagesThreadParams,
|
|
1627
|
-
type MessageAddReactionParams as MessageAddReactionParams,
|
|
1628
1671
|
type MessageUpdateParams as MessageUpdateParams,
|
|
1672
|
+
type MessageAddReactionParams as MessageAddReactionParams,
|
|
1673
|
+
type MessageListMessagesThreadParams as MessageListMessagesThreadParams,
|
|
1629
1674
|
type MessageUpdateAppCardParams as MessageUpdateAppCardParams,
|
|
1630
1675
|
};
|
|
1631
1676
|
|
|
@@ -1660,6 +1705,32 @@ export declare namespace LinqAPIV3 {
|
|
|
1660
1705
|
type PaymentRequestListParams as PaymentRequestListParams,
|
|
1661
1706
|
};
|
|
1662
1707
|
|
|
1708
|
+
export {
|
|
1709
|
+
PaymentProviders as PaymentProviders,
|
|
1710
|
+
type PaymentProvider as PaymentProvider,
|
|
1711
|
+
type PaymentProviderConnectResponse as PaymentProviderConnectResponse,
|
|
1712
|
+
type PaymentProviderConnectParams as PaymentProviderConnectParams,
|
|
1713
|
+
};
|
|
1714
|
+
|
|
1715
|
+
export {
|
|
1716
|
+
PaymentHandles as PaymentHandles,
|
|
1717
|
+
type PaymentHandleConnection as PaymentHandleConnection,
|
|
1718
|
+
type PaymentHandleVerifyParams as PaymentHandleVerifyParams,
|
|
1719
|
+
};
|
|
1720
|
+
|
|
1721
|
+
export {
|
|
1722
|
+
Payments as Payments,
|
|
1723
|
+
type Payment as Payment,
|
|
1724
|
+
type PaymentCredentialsResponse as PaymentCredentialsResponse,
|
|
1725
|
+
type PaymentCreateParams as PaymentCreateParams,
|
|
1726
|
+
};
|
|
1727
|
+
|
|
1728
|
+
export {
|
|
1729
|
+
Experiences as Experiences,
|
|
1730
|
+
type ExperienceRetrieveResponse as ExperienceRetrieveResponse,
|
|
1731
|
+
type ExperienceListResponse as ExperienceListResponse,
|
|
1732
|
+
};
|
|
1733
|
+
|
|
1663
1734
|
export {
|
|
1664
1735
|
WebhookEvents as WebhookEvents,
|
|
1665
1736
|
type WebhookEventType as WebhookEventType,
|
|
@@ -1716,8 +1787,8 @@ export declare namespace LinqAPIV3 {
|
|
|
1716
1787
|
ContactCard as ContactCard,
|
|
1717
1788
|
type SetContactCard as SetContactCard,
|
|
1718
1789
|
type ContactCardRetrieveResponse as ContactCardRetrieveResponse,
|
|
1719
|
-
type ContactCardRetrieveParams as ContactCardRetrieveParams,
|
|
1720
1790
|
type ContactCardCreateParams as ContactCardCreateParams,
|
|
1791
|
+
type ContactCardRetrieveParams as ContactCardRetrieveParams,
|
|
1721
1792
|
type ContactCardUpdateParams as ContactCardUpdateParams,
|
|
1722
1793
|
};
|
|
1723
1794
|
|
package/src/core/error.ts
CHANGED
|
@@ -16,11 +16,30 @@ export class APIError<
|
|
|
16
16
|
/** JSON body of the response that caused the error */
|
|
17
17
|
readonly error: TError;
|
|
18
18
|
|
|
19
|
+
/**
|
|
20
|
+
* Linq API error code.
|
|
21
|
+
*/
|
|
22
|
+
readonly code: number | undefined;
|
|
23
|
+
/**
|
|
24
|
+
* Link to documentation for this error code
|
|
25
|
+
*/
|
|
26
|
+
readonly doc_url: string | undefined;
|
|
27
|
+
/**
|
|
28
|
+
* Number of seconds to wait before retrying. Only present on 429 rate limit
|
|
29
|
+
* errors.
|
|
30
|
+
*/
|
|
31
|
+
readonly retry_after?: number | undefined;
|
|
32
|
+
|
|
19
33
|
constructor(status: TStatus, error: TError, message: string | undefined, headers: THeaders) {
|
|
20
34
|
super(`${APIError.makeMessage(status, error, message)}`);
|
|
21
35
|
this.status = status;
|
|
22
36
|
this.headers = headers;
|
|
23
37
|
this.error = error;
|
|
38
|
+
|
|
39
|
+
const data = error as Record<string, any>;
|
|
40
|
+
this.code = data?.['code'];
|
|
41
|
+
this.doc_url = data?.['doc_url'];
|
|
42
|
+
this.retry_after = data?.['retry_after'];
|
|
24
43
|
}
|
|
25
44
|
|
|
26
45
|
private static makeMessage(status: number | undefined, error: any, message: string | undefined) {
|
|
@@ -54,7 +73,7 @@ export class APIError<
|
|
|
54
73
|
return new APIConnectionError({ message, cause: castToError(errorResponse) });
|
|
55
74
|
}
|
|
56
75
|
|
|
57
|
-
const error = errorResponse as Record<string, any
|
|
76
|
+
const error = (errorResponse as Record<string, any>)?.['error'];
|
|
58
77
|
|
|
59
78
|
if (status === 400) {
|
|
60
79
|
return new BadRequestError(status, error, message, headers);
|
|
@@ -30,7 +30,8 @@ export class AvailableNumber extends APIResource {
|
|
|
30
30
|
* Also returns `vcf_url`: a time-limited link to a vCard (`.vcf`) for the chosen
|
|
31
31
|
* line, carrying its contact card (name/photo) with the chosen number as the
|
|
32
32
|
* primary `TEL` and the partner's other available lines as backups. Share it with
|
|
33
|
-
* recipients so they can save the line as a contact.
|
|
33
|
+
* recipients so they can save the line as a contact. Lines you pass in
|
|
34
|
+
* `exclude_from` are left out of the vCard too.
|
|
34
35
|
*/
|
|
35
36
|
retrieve(
|
|
36
37
|
query: AvailableNumberRetrieveParams | null | undefined = {},
|
|
@@ -59,6 +60,18 @@ export interface AvailableNumberRetrieveResponse {
|
|
|
59
60
|
}
|
|
60
61
|
|
|
61
62
|
export interface AvailableNumberRetrieveParams {
|
|
63
|
+
/**
|
|
64
|
+
* Lines (E.164) to leave out of this selection. Applies to the returned
|
|
65
|
+
* `phone_number`, to the sticky choice when `to` is given, and to the vCard's
|
|
66
|
+
* backup numbers. Repeat the parameter for multiple lines; use `%2B` for the
|
|
67
|
+
* leading `+`.
|
|
68
|
+
*
|
|
69
|
+
* Numbers that are not your lines are ignored. Every entry must be E.164 — a value
|
|
70
|
+
* like `4155551234` is rejected rather than silently skipped. Excluding every one
|
|
71
|
+
* of your available lines returns 400.
|
|
72
|
+
*/
|
|
73
|
+
exclude_from?: Array<string>;
|
|
74
|
+
|
|
62
75
|
/**
|
|
63
76
|
* Recipient handles (E.164 or email) the message is destined for. When provided,
|
|
64
77
|
* an existing chat with these recipients makes the choice sticky. Repeat the
|