@linqapp/sdk 0.28.0 → 0.28.2
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 +59 -9
- package/client.d.mts.map +1 -1
- package/client.d.ts +59 -9
- package/client.d.ts.map +1 -1
- package/client.js +63 -5
- package/client.js.map +1 -1
- package/client.mjs +64 -6
- package/client.mjs.map +1 -1
- package/internal/qs/formats.d.mts +7 -0
- package/internal/qs/formats.d.mts.map +1 -0
- package/internal/qs/formats.d.ts +7 -0
- package/internal/qs/formats.d.ts.map +1 -0
- package/internal/qs/formats.js +13 -0
- package/internal/qs/formats.js.map +1 -0
- package/internal/qs/formats.mjs +9 -0
- package/internal/qs/formats.mjs.map +1 -0
- package/internal/qs/index.d.mts +10 -0
- package/internal/qs/index.d.mts.map +1 -0
- package/internal/qs/index.d.ts +10 -0
- package/internal/qs/index.d.ts.map +1 -0
- package/internal/qs/index.js +14 -0
- package/internal/qs/index.js.map +1 -0
- package/internal/qs/index.mjs +10 -0
- package/internal/qs/index.mjs.map +1 -0
- package/internal/qs/stringify.d.mts +3 -0
- package/internal/qs/stringify.d.mts.map +1 -0
- package/internal/qs/stringify.d.ts +3 -0
- package/internal/qs/stringify.d.ts.map +1 -0
- package/internal/qs/stringify.js +277 -0
- package/internal/qs/stringify.js.map +1 -0
- package/internal/qs/stringify.mjs +274 -0
- package/internal/qs/stringify.mjs.map +1 -0
- package/internal/qs/types.d.mts +57 -0
- package/internal/qs/types.d.mts.map +1 -0
- package/internal/qs/types.d.ts +57 -0
- package/internal/qs/types.d.ts.map +1 -0
- package/internal/qs/types.js +3 -0
- package/internal/qs/types.js.map +1 -0
- package/internal/qs/types.mjs +2 -0
- package/internal/qs/types.mjs.map +1 -0
- package/internal/qs/utils.d.mts +15 -0
- package/internal/qs/utils.d.mts.map +1 -0
- package/internal/qs/utils.d.ts +15 -0
- package/internal/qs/utils.d.ts.map +1 -0
- package/internal/qs/utils.js +230 -0
- package/internal/qs/utils.js.map +1 -0
- package/internal/qs/utils.mjs +217 -0
- package/internal/qs/utils.mjs.map +1 -0
- package/internal/tslib.js +17 -17
- package/internal/utils/query.d.mts +0 -3
- package/internal/utils/query.d.mts.map +1 -1
- package/internal/utils/query.d.ts +0 -3
- package/internal/utils/query.d.ts.map +1 -1
- package/internal/utils/query.js +3 -16
- package/internal/utils/query.js.map +1 -1
- package/internal/utils/query.mjs +2 -16
- package/internal/utils/query.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/attachments.d.mts +1 -1
- package/resources/attachments.d.ts +1 -1
- package/resources/attachments.js +1 -1
- package/resources/attachments.mjs +1 -1
- package/resources/available-number.d.mts +58 -0
- package/resources/available-number.d.mts.map +1 -0
- package/resources/available-number.d.ts +58 -0
- package/resources/available-number.d.ts.map +1 -0
- package/resources/available-number.js +36 -0
- package/resources/available-number.js.map +1 -0
- package/resources/available-number.mjs +32 -0
- package/resources/available-number.mjs.map +1 -0
- package/resources/chats/chats.d.mts +59 -11
- package/resources/chats/chats.d.mts.map +1 -1
- package/resources/chats/chats.d.ts +59 -11
- 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/location.d.mts +9 -8
- package/resources/chats/location.d.mts.map +1 -1
- package/resources/chats/location.d.ts +9 -8
- package/resources/chats/location.d.ts.map +1 -1
- package/resources/chats/location.js +9 -8
- package/resources/chats/location.js.map +1 -1
- package/resources/chats/location.mjs +9 -8
- package/resources/chats/location.mjs.map +1 -1
- package/resources/chats/messages.d.mts +84 -6
- package/resources/chats/messages.d.mts.map +1 -1
- package/resources/chats/messages.d.ts +84 -6
- package/resources/chats/messages.d.ts.map +1 -1
- package/resources/chats/messages.js +40 -0
- package/resources/chats/messages.js.map +1 -1
- package/resources/chats/messages.mjs +40 -0
- package/resources/chats/messages.mjs.map +1 -1
- package/resources/contact-card.d.mts +1 -2
- package/resources/contact-card.d.mts.map +1 -1
- package/resources/contact-card.d.ts +1 -2
- package/resources/contact-card.d.ts.map +1 -1
- package/resources/index.d.mts +3 -2
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +3 -2
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +3 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +2 -1
- package/resources/index.mjs.map +1 -1
- package/resources/messages.d.mts +400 -7
- package/resources/messages.d.mts.map +1 -1
- package/resources/messages.d.ts +400 -7
- package/resources/messages.d.ts.map +1 -1
- package/resources/messages.js +148 -0
- package/resources/messages.js.map +1 -1
- package/resources/messages.mjs +148 -0
- package/resources/messages.mjs.map +1 -1
- package/resources/phone-numbers.d.mts +68 -23
- package/resources/phone-numbers.d.mts.map +1 -1
- package/resources/phone-numbers.d.ts +68 -23
- package/resources/phone-numbers.d.ts.map +1 -1
- package/resources/phone-numbers.js +23 -0
- package/resources/phone-numbers.js.map +1 -1
- package/resources/phone-numbers.mjs +23 -0
- package/resources/phone-numbers.mjs.map +1 -1
- package/resources/webhooks.d.mts +14 -14
- package/resources/webhooks.d.ts +14 -14
- package/src/client.ts +94 -8
- package/src/internal/qs/LICENSE.md +13 -0
- package/src/internal/qs/README.md +3 -0
- package/src/internal/qs/formats.ts +10 -0
- package/src/internal/qs/index.ts +13 -0
- package/src/internal/qs/stringify.ts +385 -0
- package/src/internal/qs/types.ts +71 -0
- package/src/internal/qs/utils.ts +265 -0
- package/src/internal/utils/query.ts +2 -18
- package/src/resources/attachments.ts +1 -1
- package/src/resources/available-number.ts +72 -0
- package/src/resources/chats/chats.ts +64 -12
- package/src/resources/chats/location.ts +9 -8
- package/src/resources/chats/messages.ts +87 -6
- package/src/resources/contact-card.ts +1 -2
- package/src/resources/index.ts +15 -1
- package/src/resources/messages.ts +453 -6
- package/src/resources/phone-numbers.ts +85 -23
- package/src/resources/webhooks.ts +14 -14
- 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
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import { APIResource } from '../core/resource';
|
|
4
4
|
import { APIPromise } from '../core/api-promise';
|
|
5
5
|
import { RequestOptions } from '../internal/request-options';
|
|
6
|
+
import { path } from '../internal/utils/path';
|
|
6
7
|
|
|
7
8
|
/**
|
|
8
9
|
* Phone Numbers represent the phone numbers assigned to your partner account.
|
|
@@ -18,10 +19,54 @@ export class PhoneNumbers extends APIResource {
|
|
|
18
19
|
* Returns all phone numbers assigned to the authenticated partner. Use this
|
|
19
20
|
* endpoint to discover which phone numbers are available for use as the `from`
|
|
20
21
|
* field when creating a chat, listing chats, or sending a voice memo.
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```ts
|
|
25
|
+
* const phoneNumbers = await client.phoneNumbers.list();
|
|
26
|
+
* ```
|
|
21
27
|
*/
|
|
22
28
|
list(options?: RequestOptions): APIPromise<PhoneNumberListResponse> {
|
|
23
29
|
return this._client.get('/v3/phone_numbers', options);
|
|
24
30
|
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Updates the forwarding number for a phone number. The forwarding number is where
|
|
34
|
+
* inbound calls will be forwarded to.
|
|
35
|
+
*
|
|
36
|
+
* Pass an empty string to clear the forwarding number.
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* ```ts
|
|
40
|
+
* const phoneNumber = await client.phoneNumbers.update(
|
|
41
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
42
|
+
* { forwarding_number: '+12025559999' },
|
|
43
|
+
* );
|
|
44
|
+
* ```
|
|
45
|
+
*/
|
|
46
|
+
update(
|
|
47
|
+
phoneNumberID: string,
|
|
48
|
+
body: PhoneNumberUpdateParams,
|
|
49
|
+
options?: RequestOptions,
|
|
50
|
+
): APIPromise<PhoneNumberUpdateResponse> {
|
|
51
|
+
return this._client.put(path`/v3/phone_numbers/${phoneNumberID}`, { body, ...options });
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export interface PhoneNumberUpdateResponse {
|
|
56
|
+
/**
|
|
57
|
+
* Unique identifier for the phone number
|
|
58
|
+
*/
|
|
59
|
+
id: string;
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* The forwarding number after the update. Null when cleared.
|
|
63
|
+
*/
|
|
64
|
+
forwarding_number: string | null;
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Phone number in E.164 format
|
|
68
|
+
*/
|
|
69
|
+
phone_number: string;
|
|
25
70
|
}
|
|
26
71
|
|
|
27
72
|
export interface PhoneNumberListResponse {
|
|
@@ -46,8 +91,8 @@ export namespace PhoneNumberListResponse {
|
|
|
46
91
|
* Unlike chat health, line reputation does not include `opted_out` — opt-out
|
|
47
92
|
* applies to individual recipients, not the whole line.
|
|
48
93
|
*
|
|
49
|
-
* See the [Phone
|
|
50
|
-
* status means and how to react.
|
|
94
|
+
* See the [Phone Reputation guide](/guides/phone-numbers/phone-reputation) for
|
|
95
|
+
* what each status means and how to react.
|
|
51
96
|
*/
|
|
52
97
|
health_status: PhoneNumber.HealthStatus;
|
|
53
98
|
|
|
@@ -64,10 +109,16 @@ export namespace PhoneNumberListResponse {
|
|
|
64
109
|
* Unlike chat health, line reputation does not include `opted_out` — opt-out
|
|
65
110
|
* applies to individual recipients, not the whole line.
|
|
66
111
|
*
|
|
67
|
-
* See the [Phone
|
|
68
|
-
* status means and how to react.
|
|
112
|
+
* See the [Phone Reputation guide](/guides/phone-numbers/phone-reputation) for
|
|
113
|
+
* what each status means and how to react.
|
|
69
114
|
*/
|
|
70
115
|
reputation: PhoneNumber.Reputation;
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* The forwarding number associated with this phone number, in E.164 format. Null
|
|
119
|
+
* when no forwarding number is configured.
|
|
120
|
+
*/
|
|
121
|
+
forwarding_number?: string | null;
|
|
71
122
|
}
|
|
72
123
|
|
|
73
124
|
export namespace PhoneNumber {
|
|
@@ -79,23 +130,23 @@ export namespace PhoneNumberListResponse {
|
|
|
79
130
|
* Unlike chat health, line reputation does not include `opted_out` — opt-out
|
|
80
131
|
* applies to individual recipients, not the whole line.
|
|
81
132
|
*
|
|
82
|
-
* See the [Phone
|
|
83
|
-
* status means and how to react.
|
|
133
|
+
* See the [Phone Reputation guide](/guides/phone-numbers/phone-reputation) for
|
|
134
|
+
* what each status means and how to react.
|
|
84
135
|
*/
|
|
85
136
|
export interface HealthStatus {
|
|
86
137
|
/**
|
|
87
|
-
* Deep-link to the relevant section of the Phone
|
|
138
|
+
* Deep-link to the relevant section of the Phone Reputation guide for this status.
|
|
88
139
|
*/
|
|
89
140
|
doc_url: string;
|
|
90
141
|
|
|
91
142
|
/**
|
|
92
|
-
* Current reputation of this phone line
|
|
143
|
+
* Current reputation of this phone line.
|
|
93
144
|
*
|
|
94
|
-
* - `HEALTHY` —
|
|
95
|
-
* - `AT_RISK` —
|
|
96
|
-
*
|
|
97
|
-
* - `CRITICAL` —
|
|
98
|
-
*
|
|
145
|
+
* - `HEALTHY` — The line is in good standing. Send normally.
|
|
146
|
+
* - `AT_RISK` — The line's overall engagement is trending down. Slow the line's
|
|
147
|
+
* send pace and review your messaging patterns.
|
|
148
|
+
* - `CRITICAL` — Strong signals that messages from this line aren't landing well.
|
|
149
|
+
* Pause outbound on the line until it recovers.
|
|
99
150
|
*
|
|
100
151
|
* Defaults to `HEALTHY` for lines that have not yet been scored.
|
|
101
152
|
*/
|
|
@@ -110,23 +161,23 @@ export namespace PhoneNumberListResponse {
|
|
|
110
161
|
* Unlike chat health, line reputation does not include `opted_out` — opt-out
|
|
111
162
|
* applies to individual recipients, not the whole line.
|
|
112
163
|
*
|
|
113
|
-
* See the [Phone
|
|
114
|
-
* status means and how to react.
|
|
164
|
+
* See the [Phone Reputation guide](/guides/phone-numbers/phone-reputation) for
|
|
165
|
+
* what each status means and how to react.
|
|
115
166
|
*/
|
|
116
167
|
export interface Reputation {
|
|
117
168
|
/**
|
|
118
|
-
* Deep-link to the relevant section of the Phone
|
|
169
|
+
* Deep-link to the relevant section of the Phone Reputation guide for this status.
|
|
119
170
|
*/
|
|
120
171
|
doc_url: string;
|
|
121
172
|
|
|
122
173
|
/**
|
|
123
|
-
* Current reputation of this phone line
|
|
174
|
+
* Current reputation of this phone line.
|
|
124
175
|
*
|
|
125
|
-
* - `HEALTHY` —
|
|
126
|
-
* - `AT_RISK` —
|
|
127
|
-
*
|
|
128
|
-
* - `CRITICAL` —
|
|
129
|
-
*
|
|
176
|
+
* - `HEALTHY` — The line is in good standing. Send normally.
|
|
177
|
+
* - `AT_RISK` — The line's overall engagement is trending down. Slow the line's
|
|
178
|
+
* send pace and review your messaging patterns.
|
|
179
|
+
* - `CRITICAL` — Strong signals that messages from this line aren't landing well.
|
|
180
|
+
* Pause outbound on the line until it recovers.
|
|
130
181
|
*
|
|
131
182
|
* Defaults to `HEALTHY` for lines that have not yet been scored.
|
|
132
183
|
*/
|
|
@@ -135,6 +186,17 @@ export namespace PhoneNumberListResponse {
|
|
|
135
186
|
}
|
|
136
187
|
}
|
|
137
188
|
|
|
189
|
+
export interface PhoneNumberUpdateParams {
|
|
190
|
+
/**
|
|
191
|
+
* The forwarding number in E.164 format. Set to null or empty string to clear.
|
|
192
|
+
*/
|
|
193
|
+
forwarding_number: string | null;
|
|
194
|
+
}
|
|
195
|
+
|
|
138
196
|
export declare namespace PhoneNumbers {
|
|
139
|
-
export {
|
|
197
|
+
export {
|
|
198
|
+
type PhoneNumberUpdateResponse as PhoneNumberUpdateResponse,
|
|
199
|
+
type PhoneNumberListResponse as PhoneNumberListResponse,
|
|
200
|
+
type PhoneNumberUpdateParams as PhoneNumberUpdateParams,
|
|
201
|
+
};
|
|
140
202
|
}
|
|
@@ -218,7 +218,7 @@ export namespace MessageEventV2 {
|
|
|
218
218
|
type: 'imessage_app';
|
|
219
219
|
|
|
220
220
|
/**
|
|
221
|
-
* The URL
|
|
221
|
+
* The URL the recipient's app opens when the user taps the card.
|
|
222
222
|
*/
|
|
223
223
|
url: string;
|
|
224
224
|
|
|
@@ -397,7 +397,7 @@ export namespace MessagePayload {
|
|
|
397
397
|
type: 'imessage_app';
|
|
398
398
|
|
|
399
399
|
/**
|
|
400
|
-
* The URL
|
|
400
|
+
* The URL the recipient's app opens when the user taps the card.
|
|
401
401
|
*/
|
|
402
402
|
url: string;
|
|
403
403
|
|
|
@@ -2121,13 +2121,13 @@ export namespace PhoneNumberStatusUpdatedWebhookEvent {
|
|
|
2121
2121
|
changed_at: string;
|
|
2122
2122
|
|
|
2123
2123
|
/**
|
|
2124
|
-
* @deprecated Current reputation of this phone line
|
|
2124
|
+
* @deprecated Current reputation of this phone line.
|
|
2125
2125
|
*
|
|
2126
|
-
* - `HEALTHY` —
|
|
2127
|
-
* - `AT_RISK` —
|
|
2128
|
-
*
|
|
2129
|
-
* - `CRITICAL` —
|
|
2130
|
-
*
|
|
2126
|
+
* - `HEALTHY` — The line is in good standing. Send normally.
|
|
2127
|
+
* - `AT_RISK` — The line's overall engagement is trending down. Slow the line's
|
|
2128
|
+
* send pace and review your messaging patterns.
|
|
2129
|
+
* - `CRITICAL` — Strong signals that messages from this line aren't landing well.
|
|
2130
|
+
* Pause outbound on the line until it recovers.
|
|
2131
2131
|
*
|
|
2132
2132
|
* Defaults to `HEALTHY` for lines that have not yet been scored.
|
|
2133
2133
|
*/
|
|
@@ -2149,13 +2149,13 @@ export namespace PhoneNumberStatusUpdatedWebhookEvent {
|
|
|
2149
2149
|
phone_number: string;
|
|
2150
2150
|
|
|
2151
2151
|
/**
|
|
2152
|
-
* @deprecated Current reputation of this phone line
|
|
2152
|
+
* @deprecated Current reputation of this phone line.
|
|
2153
2153
|
*
|
|
2154
|
-
* - `HEALTHY` —
|
|
2155
|
-
* - `AT_RISK` —
|
|
2156
|
-
*
|
|
2157
|
-
* - `CRITICAL` —
|
|
2158
|
-
*
|
|
2154
|
+
* - `HEALTHY` — The line is in good standing. Send normally.
|
|
2155
|
+
* - `AT_RISK` — The line's overall engagement is trending down. Slow the line's
|
|
2156
|
+
* send pace and review your messaging patterns.
|
|
2157
|
+
* - `CRITICAL` — Strong signals that messages from this line aren't landing well.
|
|
2158
|
+
* Pause outbound on the line until it recovers.
|
|
2159
2159
|
*
|
|
2160
2160
|
* Defaults to `HEALTHY` for lines that have not yet been scored.
|
|
2161
2161
|
*/
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.28.
|
|
1
|
+
export const VERSION = '0.28.2'; // x-release-please-version
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.28.
|
|
1
|
+
export declare const VERSION = "0.28.2";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.28.
|
|
1
|
+
export declare const VERSION = "0.28.2";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '0.28.
|
|
1
|
+
export const VERSION = '0.28.2'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|