@linqapp/sdk 0.2.0 → 0.4.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 +16 -0
- package/README.md +31 -0
- package/client.d.mts +19 -6
- package/client.d.mts.map +1 -1
- package/client.d.ts +19 -6
- package/client.d.ts.map +1 -1
- package/client.js +13 -0
- package/client.js.map +1 -1
- package/client.mjs +13 -0
- package/client.mjs.map +1 -1
- package/core/pagination.d.mts +69 -0
- package/core/pagination.d.mts.map +1 -0
- package/core/pagination.d.ts +69 -0
- package/core/pagination.d.ts.map +1 -0
- package/core/pagination.js +125 -0
- package/core/pagination.js.map +1 -0
- package/core/pagination.mjs +118 -0
- package/core/pagination.mjs.map +1 -0
- package/index.d.mts +1 -0
- package/index.d.mts.map +1 -1
- package/index.d.ts +1 -0
- package/index.d.ts.map +1 -1
- package/index.js +3 -1
- package/index.js.map +1 -1
- package/index.mjs +1 -0
- package/index.mjs.map +1 -1
- package/internal/tslib.js +18 -18
- package/package.json +11 -1
- package/pagination.d.mts +2 -0
- package/pagination.d.mts.map +1 -0
- package/pagination.d.ts +2 -0
- package/pagination.d.ts.map +1 -0
- package/pagination.js +6 -0
- package/pagination.js.map +1 -0
- package/pagination.mjs +2 -0
- package/pagination.mjs.map +1 -0
- package/resources/capability.d.mts +9 -9
- package/resources/capability.d.ts +9 -9
- package/resources/capability.js +4 -4
- package/resources/capability.mjs +4 -4
- package/resources/chats/chats.d.mts +67 -84
- package/resources/chats/chats.d.mts.map +1 -1
- package/resources/chats/chats.d.ts +67 -84
- package/resources/chats/chats.d.ts.map +1 -1
- package/resources/chats/chats.js +8 -4
- package/resources/chats/chats.js.map +1 -1
- package/resources/chats/chats.mjs +9 -5
- package/resources/chats/chats.mjs.map +1 -1
- package/resources/chats/index.d.mts +2 -2
- package/resources/chats/index.d.mts.map +1 -1
- package/resources/chats/index.d.ts +2 -2
- package/resources/chats/index.d.ts.map +1 -1
- package/resources/chats/index.js.map +1 -1
- package/resources/chats/index.mjs.map +1 -1
- package/resources/chats/messages.d.mts +12 -25
- package/resources/chats/messages.d.mts.map +1 -1
- package/resources/chats/messages.d.ts +12 -25
- package/resources/chats/messages.d.ts.map +1 -1
- package/resources/chats/messages.js +7 -3
- package/resources/chats/messages.js.map +1 -1
- package/resources/chats/messages.mjs +7 -3
- package/resources/chats/messages.mjs.map +1 -1
- package/resources/index.d.mts +4 -3
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +4 -3
- 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 +1 -0
- package/resources/index.mjs.map +1 -1
- package/resources/messages.d.mts +28 -72
- package/resources/messages.d.mts.map +1 -1
- package/resources/messages.d.ts +28 -72
- package/resources/messages.d.ts.map +1 -1
- package/resources/messages.js +25 -4
- package/resources/messages.js.map +1 -1
- package/resources/messages.mjs +25 -4
- package/resources/messages.mjs.map +1 -1
- package/resources/shared.d.mts +51 -0
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +51 -0
- package/resources/shared.d.ts.map +1 -1
- package/resources/webhooks.d.mts +2506 -0
- package/resources/webhooks.d.mts.map +1 -0
- package/resources/webhooks.d.ts +2506 -0
- package/resources/webhooks.d.ts.map +1 -0
- package/resources/webhooks.js +12 -0
- package/resources/webhooks.js.map +1 -0
- package/resources/webhooks.mjs +8 -0
- package/resources/webhooks.mjs.map +1 -0
- package/src/client.ts +159 -20
- package/src/core/pagination.ts +212 -0
- package/src/index.ts +1 -0
- package/src/pagination.ts +2 -0
- package/src/resources/capability.ts +14 -14
- package/src/resources/chats/chats.ts +77 -100
- package/src/resources/chats/index.ts +4 -3
- package/src/resources/chats/messages.ts +21 -30
- package/src/resources/index.ts +55 -10
- package/src/resources/messages.ts +40 -90
- package/src/resources/shared.ts +62 -0
- package/src/resources/webhooks.ts +3089 -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
|
@@ -11,25 +11,25 @@ export declare class Capability extends APIResource {
|
|
|
11
11
|
*
|
|
12
12
|
* @example
|
|
13
13
|
* ```ts
|
|
14
|
-
* const response = await client.capability.
|
|
14
|
+
* const response = await client.capability.checkiMessage({
|
|
15
15
|
* address: '+15551234567',
|
|
16
16
|
* });
|
|
17
17
|
* ```
|
|
18
18
|
*/
|
|
19
|
-
|
|
19
|
+
checkiMessage(body: CapabilityCheckiMessageParams, options?: RequestOptions): APIPromise<CapabilityCheckiMessageResponse>;
|
|
20
20
|
/**
|
|
21
21
|
* Check whether a recipient address (phone number) supports RCS messaging.
|
|
22
22
|
*
|
|
23
23
|
* @example
|
|
24
24
|
* ```ts
|
|
25
|
-
* const response = await client.capability.
|
|
25
|
+
* const response = await client.capability.checkRCS({
|
|
26
26
|
* address: '+15551234567',
|
|
27
27
|
* });
|
|
28
28
|
* ```
|
|
29
29
|
*/
|
|
30
|
-
|
|
30
|
+
checkRCS(body: CapabilityCheckRCSParams, options?: RequestOptions): APIPromise<CapabilityCheckRCSResponse>;
|
|
31
31
|
}
|
|
32
|
-
export interface
|
|
32
|
+
export interface CapabilityCheckiMessageResponse {
|
|
33
33
|
/**
|
|
34
34
|
* The recipient address that was checked
|
|
35
35
|
*/
|
|
@@ -39,7 +39,7 @@ export interface CapabilityCheckImessageResponse {
|
|
|
39
39
|
*/
|
|
40
40
|
available: boolean;
|
|
41
41
|
}
|
|
42
|
-
export interface
|
|
42
|
+
export interface CapabilityCheckRCSResponse {
|
|
43
43
|
/**
|
|
44
44
|
* The recipient address that was checked
|
|
45
45
|
*/
|
|
@@ -49,7 +49,7 @@ export interface CapabilityCheckRcsResponse {
|
|
|
49
49
|
*/
|
|
50
50
|
available: boolean;
|
|
51
51
|
}
|
|
52
|
-
export interface
|
|
52
|
+
export interface CapabilityCheckiMessageParams {
|
|
53
53
|
/**
|
|
54
54
|
* The recipient phone number or email address to check
|
|
55
55
|
*/
|
|
@@ -60,7 +60,7 @@ export interface CapabilityCheckImessageParams {
|
|
|
60
60
|
*/
|
|
61
61
|
from?: string;
|
|
62
62
|
}
|
|
63
|
-
export interface
|
|
63
|
+
export interface CapabilityCheckRCSParams {
|
|
64
64
|
/**
|
|
65
65
|
* The recipient phone number or email address to check
|
|
66
66
|
*/
|
|
@@ -72,6 +72,6 @@ export interface CapabilityCheckRcsParams {
|
|
|
72
72
|
from?: string;
|
|
73
73
|
}
|
|
74
74
|
export declare namespace Capability {
|
|
75
|
-
export { type
|
|
75
|
+
export { type CapabilityCheckiMessageResponse as CapabilityCheckiMessageResponse, type CapabilityCheckRCSResponse as CapabilityCheckRCSResponse, type CapabilityCheckiMessageParams as CapabilityCheckiMessageParams, type CapabilityCheckRCSParams as CapabilityCheckRCSParams, };
|
|
76
76
|
}
|
|
77
77
|
//# sourceMappingURL=capability.d.mts.map
|
|
@@ -11,25 +11,25 @@ export declare class Capability extends APIResource {
|
|
|
11
11
|
*
|
|
12
12
|
* @example
|
|
13
13
|
* ```ts
|
|
14
|
-
* const response = await client.capability.
|
|
14
|
+
* const response = await client.capability.checkiMessage({
|
|
15
15
|
* address: '+15551234567',
|
|
16
16
|
* });
|
|
17
17
|
* ```
|
|
18
18
|
*/
|
|
19
|
-
|
|
19
|
+
checkiMessage(body: CapabilityCheckiMessageParams, options?: RequestOptions): APIPromise<CapabilityCheckiMessageResponse>;
|
|
20
20
|
/**
|
|
21
21
|
* Check whether a recipient address (phone number) supports RCS messaging.
|
|
22
22
|
*
|
|
23
23
|
* @example
|
|
24
24
|
* ```ts
|
|
25
|
-
* const response = await client.capability.
|
|
25
|
+
* const response = await client.capability.checkRCS({
|
|
26
26
|
* address: '+15551234567',
|
|
27
27
|
* });
|
|
28
28
|
* ```
|
|
29
29
|
*/
|
|
30
|
-
|
|
30
|
+
checkRCS(body: CapabilityCheckRCSParams, options?: RequestOptions): APIPromise<CapabilityCheckRCSResponse>;
|
|
31
31
|
}
|
|
32
|
-
export interface
|
|
32
|
+
export interface CapabilityCheckiMessageResponse {
|
|
33
33
|
/**
|
|
34
34
|
* The recipient address that was checked
|
|
35
35
|
*/
|
|
@@ -39,7 +39,7 @@ export interface CapabilityCheckImessageResponse {
|
|
|
39
39
|
*/
|
|
40
40
|
available: boolean;
|
|
41
41
|
}
|
|
42
|
-
export interface
|
|
42
|
+
export interface CapabilityCheckRCSResponse {
|
|
43
43
|
/**
|
|
44
44
|
* The recipient address that was checked
|
|
45
45
|
*/
|
|
@@ -49,7 +49,7 @@ export interface CapabilityCheckRcsResponse {
|
|
|
49
49
|
*/
|
|
50
50
|
available: boolean;
|
|
51
51
|
}
|
|
52
|
-
export interface
|
|
52
|
+
export interface CapabilityCheckiMessageParams {
|
|
53
53
|
/**
|
|
54
54
|
* The recipient phone number or email address to check
|
|
55
55
|
*/
|
|
@@ -60,7 +60,7 @@ export interface CapabilityCheckImessageParams {
|
|
|
60
60
|
*/
|
|
61
61
|
from?: string;
|
|
62
62
|
}
|
|
63
|
-
export interface
|
|
63
|
+
export interface CapabilityCheckRCSParams {
|
|
64
64
|
/**
|
|
65
65
|
* The recipient phone number or email address to check
|
|
66
66
|
*/
|
|
@@ -72,6 +72,6 @@ export interface CapabilityCheckRcsParams {
|
|
|
72
72
|
from?: string;
|
|
73
73
|
}
|
|
74
74
|
export declare namespace Capability {
|
|
75
|
-
export { type
|
|
75
|
+
export { type CapabilityCheckiMessageResponse as CapabilityCheckiMessageResponse, type CapabilityCheckRCSResponse as CapabilityCheckRCSResponse, type CapabilityCheckiMessageParams as CapabilityCheckiMessageParams, type CapabilityCheckRCSParams as CapabilityCheckRCSParams, };
|
|
76
76
|
}
|
|
77
77
|
//# sourceMappingURL=capability.d.ts.map
|
package/resources/capability.js
CHANGED
|
@@ -13,12 +13,12 @@ class Capability extends resource_1.APIResource {
|
|
|
13
13
|
*
|
|
14
14
|
* @example
|
|
15
15
|
* ```ts
|
|
16
|
-
* const response = await client.capability.
|
|
16
|
+
* const response = await client.capability.checkiMessage({
|
|
17
17
|
* address: '+15551234567',
|
|
18
18
|
* });
|
|
19
19
|
* ```
|
|
20
20
|
*/
|
|
21
|
-
|
|
21
|
+
checkiMessage(body, options) {
|
|
22
22
|
return this._client.post('/v3/capability/check_imessage', { body, ...options });
|
|
23
23
|
}
|
|
24
24
|
/**
|
|
@@ -26,12 +26,12 @@ class Capability extends resource_1.APIResource {
|
|
|
26
26
|
*
|
|
27
27
|
* @example
|
|
28
28
|
* ```ts
|
|
29
|
-
* const response = await client.capability.
|
|
29
|
+
* const response = await client.capability.checkRCS({
|
|
30
30
|
* address: '+15551234567',
|
|
31
31
|
* });
|
|
32
32
|
* ```
|
|
33
33
|
*/
|
|
34
|
-
|
|
34
|
+
checkRCS(body, options) {
|
|
35
35
|
return this._client.post('/v3/capability/check_rcs', { body, ...options });
|
|
36
36
|
}
|
|
37
37
|
}
|
package/resources/capability.mjs
CHANGED
|
@@ -10,12 +10,12 @@ export class Capability extends APIResource {
|
|
|
10
10
|
*
|
|
11
11
|
* @example
|
|
12
12
|
* ```ts
|
|
13
|
-
* const response = await client.capability.
|
|
13
|
+
* const response = await client.capability.checkiMessage({
|
|
14
14
|
* address: '+15551234567',
|
|
15
15
|
* });
|
|
16
16
|
* ```
|
|
17
17
|
*/
|
|
18
|
-
|
|
18
|
+
checkiMessage(body, options) {
|
|
19
19
|
return this._client.post('/v3/capability/check_imessage', { body, ...options });
|
|
20
20
|
}
|
|
21
21
|
/**
|
|
@@ -23,12 +23,12 @@ export class Capability extends APIResource {
|
|
|
23
23
|
*
|
|
24
24
|
* @example
|
|
25
25
|
* ```ts
|
|
26
|
-
* const response = await client.capability.
|
|
26
|
+
* const response = await client.capability.checkRCS({
|
|
27
27
|
* address: '+15551234567',
|
|
28
28
|
* });
|
|
29
29
|
* ```
|
|
30
30
|
*/
|
|
31
|
-
|
|
31
|
+
checkRCS(body, options) {
|
|
32
32
|
return this._client.post('/v3/capability/check_rcs', { body, ...options });
|
|
33
33
|
}
|
|
34
34
|
}
|
|
@@ -2,12 +2,13 @@ import { APIResource } from "../../core/resource.mjs";
|
|
|
2
2
|
import * as MessagesAPI from "../messages.mjs";
|
|
3
3
|
import * as Shared from "../shared.mjs";
|
|
4
4
|
import * as ChatsMessagesAPI from "./messages.mjs";
|
|
5
|
-
import { MessageListParams,
|
|
5
|
+
import { MessageListParams, MessageSendParams, MessageSendResponse, Messages, SentMessage } from "./messages.mjs";
|
|
6
6
|
import * as ParticipantsAPI from "./participants.mjs";
|
|
7
7
|
import { ParticipantAddParams, ParticipantAddResponse, ParticipantRemoveParams, ParticipantRemoveResponse, Participants } from "./participants.mjs";
|
|
8
8
|
import * as TypingAPI from "./typing.mjs";
|
|
9
9
|
import { Typing } from "./typing.mjs";
|
|
10
10
|
import { APIPromise } from "../../core/api-promise.mjs";
|
|
11
|
+
import { ListChatsPagination, type ListChatsPaginationParams, PagePromise } from "../../core/pagination.mjs";
|
|
11
12
|
import { RequestOptions } from "../../internal/request-options.mjs";
|
|
12
13
|
export declare class Chats extends APIResource {
|
|
13
14
|
participants: ParticipantsAPI.Participants;
|
|
@@ -92,12 +93,15 @@ export declare class Chats extends APIResource {
|
|
|
92
93
|
*
|
|
93
94
|
* @example
|
|
94
95
|
* ```ts
|
|
95
|
-
*
|
|
96
|
+
* // Automatically fetches more pages as needed.
|
|
97
|
+
* for await (const chat of client.chats.listChats({
|
|
96
98
|
* from: '+13343284472',
|
|
97
|
-
* })
|
|
99
|
+
* })) {
|
|
100
|
+
* // ...
|
|
101
|
+
* }
|
|
98
102
|
* ```
|
|
99
103
|
*/
|
|
100
|
-
|
|
104
|
+
listChats(query: ChatListChatsParams, options?: RequestOptions): PagePromise<ChatsListChatsPagination, Chat>;
|
|
101
105
|
/**
|
|
102
106
|
* Mark all messages in a chat as read.
|
|
103
107
|
*
|
|
@@ -153,6 +157,7 @@ export declare class Chats extends APIResource {
|
|
|
153
157
|
*/
|
|
154
158
|
shareContactCard(chatID: string, options?: RequestOptions): APIPromise<void>;
|
|
155
159
|
}
|
|
160
|
+
export type ChatsListChatsPagination = ListChatsPagination<Chat>;
|
|
156
161
|
export interface Chat {
|
|
157
162
|
/**
|
|
158
163
|
* Unique identifier for the chat
|
|
@@ -189,6 +194,51 @@ export interface Chat {
|
|
|
189
194
|
*/
|
|
190
195
|
service?: Shared.ServiceType | null;
|
|
191
196
|
}
|
|
197
|
+
export interface MediaPart {
|
|
198
|
+
/**
|
|
199
|
+
* Indicates this is a media attachment part
|
|
200
|
+
*/
|
|
201
|
+
type: 'media';
|
|
202
|
+
/**
|
|
203
|
+
* Reference to a file pre-uploaded via `POST /v3/attachments` (optional). The file
|
|
204
|
+
* is already stored, so sends using this ID skip the download step — useful when
|
|
205
|
+
* sending the same file to many recipients.
|
|
206
|
+
*
|
|
207
|
+
* Either `url` or `attachment_id` must be provided, but not both.
|
|
208
|
+
*/
|
|
209
|
+
attachment_id?: string;
|
|
210
|
+
/**
|
|
211
|
+
* Any publicly accessible HTTPS URL to the media file. The server downloads and
|
|
212
|
+
* sends the file automatically — no pre-upload step required.
|
|
213
|
+
*
|
|
214
|
+
* **Size limit:** 10MB maximum for URL-based downloads. For larger files (up to
|
|
215
|
+
* 100MB), use the pre-upload flow: `POST /v3/attachments` to get a presigned URL,
|
|
216
|
+
* upload directly, then reference by `attachment_id`.
|
|
217
|
+
*
|
|
218
|
+
* **Requirements:**
|
|
219
|
+
*
|
|
220
|
+
* - URL must use HTTPS
|
|
221
|
+
* - File content must be a supported format (the server validates the actual file
|
|
222
|
+
* content)
|
|
223
|
+
*
|
|
224
|
+
* **Supported formats:**
|
|
225
|
+
*
|
|
226
|
+
* - Images: .jpg, .jpeg, .png, .gif, .heic, .heif, .tif, .tiff, .bmp
|
|
227
|
+
* - Videos: .mp4, .mov, .m4v, .mpeg, .mpg, .3gp
|
|
228
|
+
* - Audio: .m4a, .mp3, .aac, .caf, .wav, .aiff, .amr
|
|
229
|
+
* - Documents: .pdf, .txt, .rtf, .csv, .doc, .docx, .xls, .xlsx, .ppt, .pptx,
|
|
230
|
+
* .pages, .numbers, .key, .epub, .zip, .html, .htm
|
|
231
|
+
* - Contact & Calendar: .vcf, .ics
|
|
232
|
+
*
|
|
233
|
+
* **Tip:** Audio sent here appears as a regular file attachment. To send audio as
|
|
234
|
+
* an iMessage voice memo bubble (with inline playback), use
|
|
235
|
+
* `/v3/chats/{chatId}/voicememo`. For repeated sends of the same file, use
|
|
236
|
+
* `attachment_id` to avoid redundant downloads.
|
|
237
|
+
*
|
|
238
|
+
* Either `url` or `attachment_id` must be provided, but not both.
|
|
239
|
+
*/
|
|
240
|
+
url?: string;
|
|
241
|
+
}
|
|
192
242
|
/**
|
|
193
243
|
* Message content container. Groups all message-related fields together,
|
|
194
244
|
* separating the "what" (message content) from the "where" (routing fields like
|
|
@@ -225,7 +275,7 @@ export interface MessageContent {
|
|
|
225
275
|
* sub-limit. For bulk media sends exceeding 40 files, pre-upload via
|
|
226
276
|
* `POST /v3/attachments` and reference by `attachment_id` or `download_url`.
|
|
227
277
|
*/
|
|
228
|
-
parts: Array<
|
|
278
|
+
parts: Array<TextPart | MediaPart>;
|
|
229
279
|
/**
|
|
230
280
|
* iMessage effect to apply to this message (screen or bubble effect)
|
|
231
281
|
*/
|
|
@@ -244,62 +294,15 @@ export interface MessageContent {
|
|
|
244
294
|
*/
|
|
245
295
|
reply_to?: MessagesAPI.ReplyTo;
|
|
246
296
|
}
|
|
247
|
-
export
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
value: string;
|
|
257
|
-
}
|
|
258
|
-
interface MediaPart {
|
|
259
|
-
/**
|
|
260
|
-
* Indicates this is a media attachment part
|
|
261
|
-
*/
|
|
262
|
-
type: 'media';
|
|
263
|
-
/**
|
|
264
|
-
* Reference to a file pre-uploaded via `POST /v3/attachments` (optional). The file
|
|
265
|
-
* is already stored, so sends using this ID skip the download step — useful when
|
|
266
|
-
* sending the same file to many recipients.
|
|
267
|
-
*
|
|
268
|
-
* Either `url` or `attachment_id` must be provided, but not both.
|
|
269
|
-
*/
|
|
270
|
-
attachment_id?: string;
|
|
271
|
-
/**
|
|
272
|
-
* Any publicly accessible HTTPS URL to the media file. The server downloads and
|
|
273
|
-
* sends the file automatically — no pre-upload step required.
|
|
274
|
-
*
|
|
275
|
-
* **Size limit:** 10MB maximum for URL-based downloads. For larger files (up to
|
|
276
|
-
* 100MB), use the pre-upload flow: `POST /v3/attachments` to get a presigned URL,
|
|
277
|
-
* upload directly, then reference by `attachment_id`.
|
|
278
|
-
*
|
|
279
|
-
* **Requirements:**
|
|
280
|
-
*
|
|
281
|
-
* - URL must use HTTPS
|
|
282
|
-
* - File content must be a supported format (the server validates the actual file
|
|
283
|
-
* content)
|
|
284
|
-
*
|
|
285
|
-
* **Supported formats:**
|
|
286
|
-
*
|
|
287
|
-
* - Images: .jpg, .jpeg, .png, .gif, .heic, .heif, .tif, .tiff, .bmp
|
|
288
|
-
* - Videos: .mp4, .mov, .m4v, .mpeg, .mpg, .3gp
|
|
289
|
-
* - Audio: .m4a, .mp3, .aac, .caf, .wav, .aiff, .amr
|
|
290
|
-
* - Documents: .pdf, .txt, .rtf, .csv, .doc, .docx, .xls, .xlsx, .ppt, .pptx,
|
|
291
|
-
* .pages, .numbers, .key, .epub, .zip, .html, .htm
|
|
292
|
-
* - Contact & Calendar: .vcf, .ics
|
|
293
|
-
*
|
|
294
|
-
* **Tip:** Audio sent here appears as a regular file attachment. To send audio as
|
|
295
|
-
* an iMessage voice memo bubble (with inline playback), use
|
|
296
|
-
* `/v3/chats/{chatId}/voicememo`. For repeated sends of the same file, use
|
|
297
|
-
* `attachment_id` to avoid redundant downloads.
|
|
298
|
-
*
|
|
299
|
-
* Either `url` or `attachment_id` must be provided, but not both.
|
|
300
|
-
*/
|
|
301
|
-
url?: string;
|
|
302
|
-
}
|
|
297
|
+
export interface TextPart {
|
|
298
|
+
/**
|
|
299
|
+
* Indicates this is a text message part
|
|
300
|
+
*/
|
|
301
|
+
type: 'text';
|
|
302
|
+
/**
|
|
303
|
+
* The text content
|
|
304
|
+
*/
|
|
305
|
+
value: string;
|
|
303
306
|
}
|
|
304
307
|
/**
|
|
305
308
|
* Response for creating a new chat with an initial message
|
|
@@ -337,17 +340,6 @@ export declare namespace ChatCreateResponse {
|
|
|
337
340
|
service: Shared.ServiceType;
|
|
338
341
|
}
|
|
339
342
|
}
|
|
340
|
-
export interface ChatListResponse {
|
|
341
|
-
/**
|
|
342
|
-
* List of chats
|
|
343
|
-
*/
|
|
344
|
-
chats: Array<Chat>;
|
|
345
|
-
/**
|
|
346
|
-
* Cursor for fetching the next page of results. Null if there are no more results
|
|
347
|
-
* to fetch. Pass this value as the `cursor` parameter in the next request.
|
|
348
|
-
*/
|
|
349
|
-
next_cursor?: string | null;
|
|
350
|
-
}
|
|
351
343
|
/**
|
|
352
344
|
* Response for sending a voice memo to a chat
|
|
353
345
|
*/
|
|
@@ -462,22 +454,13 @@ export interface ChatUpdateParams {
|
|
|
462
454
|
*/
|
|
463
455
|
group_chat_icon?: string;
|
|
464
456
|
}
|
|
465
|
-
export interface
|
|
457
|
+
export interface ChatListChatsParams extends ListChatsPaginationParams {
|
|
466
458
|
/**
|
|
467
459
|
* Phone number to filter chats by. Returns all chats made from this phone number.
|
|
468
460
|
* Must be in E.164 format (e.g., `+13343284472`). The `+` is automatically
|
|
469
461
|
* URL-encoded by HTTP clients.
|
|
470
462
|
*/
|
|
471
463
|
from: string;
|
|
472
|
-
/**
|
|
473
|
-
* Pagination cursor from the previous response's `next_cursor` field. Omit this
|
|
474
|
-
* parameter for the first page of results.
|
|
475
|
-
*/
|
|
476
|
-
cursor?: string;
|
|
477
|
-
/**
|
|
478
|
-
* Maximum number of chats to return per page
|
|
479
|
-
*/
|
|
480
|
-
limit?: number;
|
|
481
464
|
}
|
|
482
465
|
export interface ChatSendVoicememoParams {
|
|
483
466
|
/**
|
|
@@ -490,9 +473,9 @@ export interface ChatSendVoicememoParams {
|
|
|
490
473
|
voice_memo_url: string;
|
|
491
474
|
}
|
|
492
475
|
export declare namespace Chats {
|
|
493
|
-
export { type Chat as Chat, type MessageContent as MessageContent, type
|
|
476
|
+
export { type Chat as Chat, type MediaPart as MediaPart, type MessageContent as MessageContent, type TextPart as TextPart, type ChatCreateResponse as ChatCreateResponse, type ChatSendVoicememoResponse as ChatSendVoicememoResponse, type ChatsListChatsPagination as ChatsListChatsPagination, type ChatCreateParams as ChatCreateParams, type ChatUpdateParams as ChatUpdateParams, type ChatListChatsParams as ChatListChatsParams, type ChatSendVoicememoParams as ChatSendVoicememoParams, };
|
|
494
477
|
export { Participants as Participants, type ParticipantAddResponse as ParticipantAddResponse, type ParticipantRemoveResponse as ParticipantRemoveResponse, type ParticipantAddParams as ParticipantAddParams, type ParticipantRemoveParams as ParticipantRemoveParams, };
|
|
495
478
|
export { Typing as Typing };
|
|
496
|
-
export { Messages as Messages, type SentMessage as SentMessage, type
|
|
479
|
+
export { Messages as Messages, type SentMessage as SentMessage, type MessageSendResponse as MessageSendResponse, type MessageListParams as MessageListParams, type MessageSendParams as MessageSendParams, };
|
|
497
480
|
}
|
|
498
481
|
//# sourceMappingURL=chats.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chats.d.mts","sourceRoot":"","sources":["../../src/resources/chats/chats.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,WAAW;OAChB,KAAK,MAAM;OACX,KAAK,gBAAgB;OACrB,
|
|
1
|
+
{"version":3,"file":"chats.d.mts","sourceRoot":"","sources":["../../src/resources/chats/chats.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,WAAW;OAChB,KAAK,MAAM;OACX,KAAK,gBAAgB;OACrB,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,QAAQ,EAAE,WAAW,EAAE;OACpF,KAAK,eAAe;OACpB,EACL,oBAAoB,EACpB,s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