@linqapp/sdk 0.1.5 → 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 +36 -0
- package/README.md +31 -0
- package/client.d.mts +299 -7
- package/client.d.mts.map +1 -1
- package/client.d.ts +299 -7
- package/client.d.ts.map +1 -1
- package/client.js +294 -12
- package/client.js.map +1 -1
- package/client.mjs +294 -12
- 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/internal/utils/query.d.mts +5 -0
- package/internal/utils/query.d.mts.map +1 -0
- package/internal/utils/query.d.ts +5 -0
- package/internal/utils/query.d.ts.map +1 -0
- package/internal/utils/query.js +23 -0
- package/internal/utils/query.js.map +1 -0
- package/internal/utils/query.mjs +20 -0
- package/internal/utils/query.mjs.map +1 -0
- package/internal/utils.d.mts +1 -0
- package/internal/utils.d.ts +1 -0
- package/internal/utils.js +1 -0
- package/internal/utils.js.map +1 -1
- package/internal/utils.mjs +1 -0
- 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/attachments.d.mts +64 -0
- package/resources/attachments.d.mts.map +1 -1
- package/resources/attachments.d.ts +64 -0
- package/resources/attachments.d.ts.map +1 -1
- package/resources/attachments.js +64 -0
- package/resources/attachments.js.map +1 -1
- package/resources/attachments.mjs +64 -0
- package/resources/attachments.mjs.map +1 -1
- package/resources/capability.d.mts +12 -9
- package/resources/capability.d.mts.map +1 -1
- package/resources/capability.d.ts +12 -9
- package/resources/capability.d.ts.map +1 -1
- package/resources/capability.js +7 -4
- package/resources/capability.js.map +1 -1
- package/resources/capability.mjs +7 -4
- package/resources/capability.mjs.map +1 -1
- package/resources/chats/chats.d.mts +76 -97
- package/resources/chats/chats.d.mts.map +1 -1
- package/resources/chats/chats.d.ts +76 -97
- 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 +21 -25
- package/resources/chats/messages.d.mts.map +1 -1
- package/resources/chats/messages.d.ts +21 -25
- package/resources/chats/messages.d.ts.map +1 -1
- package/resources/chats/messages.js +16 -3
- package/resources/chats/messages.js.map +1 -1
- package/resources/chats/messages.mjs +16 -3
- package/resources/chats/messages.mjs.map +1 -1
- package/resources/chats/participants.d.mts +18 -0
- package/resources/chats/participants.d.mts.map +1 -1
- package/resources/chats/participants.d.ts +18 -0
- package/resources/chats/participants.d.ts.map +1 -1
- package/resources/chats/participants.js +18 -0
- package/resources/chats/participants.js.map +1 -1
- package/resources/chats/participants.mjs +18 -0
- package/resources/chats/participants.mjs.map +1 -1
- package/resources/chats/typing.d.mts +18 -0
- package/resources/chats/typing.d.mts.map +1 -1
- package/resources/chats/typing.d.ts +18 -0
- package/resources/chats/typing.d.ts.map +1 -1
- package/resources/chats/typing.js +18 -0
- package/resources/chats/typing.js.map +1 -1
- package/resources/chats/typing.mjs +18 -0
- package/resources/chats/typing.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 +37 -72
- package/resources/messages.d.mts.map +1 -1
- package/resources/messages.d.ts +37 -72
- package/resources/messages.d.ts.map +1 -1
- package/resources/messages.js +34 -4
- package/resources/messages.js.map +1 -1
- package/resources/messages.mjs +34 -4
- package/resources/messages.mjs.map +1 -1
- package/resources/phone-numbers.d.mts +9 -0
- package/resources/phone-numbers.d.mts.map +1 -1
- package/resources/phone-numbers.d.ts +9 -0
- package/resources/phone-numbers.d.ts.map +1 -1
- package/resources/phone-numbers.js +9 -0
- package/resources/phone-numbers.js.map +1 -1
- package/resources/phone-numbers.mjs +9 -0
- package/resources/phone-numbers.mjs.map +1 -1
- package/resources/phonenumbers.d.mts +9 -0
- package/resources/phonenumbers.d.mts.map +1 -1
- package/resources/phonenumbers.d.ts +9 -0
- package/resources/phonenumbers.d.ts.map +1 -1
- package/resources/phonenumbers.js +9 -0
- package/resources/phonenumbers.js.map +1 -1
- package/resources/phonenumbers.mjs +9 -0
- package/resources/phonenumbers.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/webhook-events.d.mts +90 -1
- package/resources/webhook-events.d.mts.map +1 -1
- package/resources/webhook-events.d.ts +90 -1
- package/resources/webhook-events.d.ts.map +1 -1
- package/resources/webhook-events.js +89 -0
- package/resources/webhook-events.js.map +1 -1
- package/resources/webhook-events.mjs +89 -0
- package/resources/webhook-events.mjs.map +1 -1
- package/resources/webhook-subscriptions.d.mts +89 -0
- package/resources/webhook-subscriptions.d.mts.map +1 -1
- package/resources/webhook-subscriptions.d.ts +89 -0
- package/resources/webhook-subscriptions.d.ts.map +1 -1
- package/resources/webhook-subscriptions.js +89 -0
- package/resources/webhook-subscriptions.js.map +1 -1
- package/resources/webhook-subscriptions.mjs +89 -0
- package/resources/webhook-subscriptions.mjs.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 +443 -37
- package/src/core/pagination.ts +212 -0
- package/src/index.ts +1 -0
- package/src/internal/utils/query.ts +23 -0
- package/src/internal/utils.ts +1 -0
- package/src/pagination.ts +2 -0
- package/src/resources/attachments.ts +64 -0
- package/src/resources/capability.ts +17 -14
- package/src/resources/chats/chats.ts +86 -115
- package/src/resources/chats/index.ts +4 -3
- package/src/resources/chats/messages.ts +30 -30
- package/src/resources/chats/participants.ts +18 -0
- package/src/resources/chats/typing.ts +18 -0
- package/src/resources/index.ts +55 -10
- package/src/resources/messages.ts +49 -90
- package/src/resources/phone-numbers.ts +9 -0
- package/src/resources/phonenumbers.ts +9 -0
- package/src/resources/shared.ts +62 -0
- package/src/resources/webhook-events.ts +90 -0
- package/src/resources/webhook-subscriptions.ts +89 -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
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { Chats, type Chat, type MessageContent, type
|
|
2
|
-
export { Messages, type SentMessage, type
|
|
1
|
+
export { Chats, type Chat, type MediaPart, type MessageContent, type TextPart, type ChatCreateResponse, type ChatSendVoicememoResponse, type ChatCreateParams, type ChatUpdateParams, type ChatListChatsParams, type ChatSendVoicememoParams, type ChatsListChatsPagination, } from "./chats.mjs";
|
|
2
|
+
export { Messages, type SentMessage, type MessageSendResponse, type MessageListParams, type MessageSendParams, } from "./messages.mjs";
|
|
3
3
|
export { Participants, type ParticipantAddResponse, type ParticipantRemoveResponse, type ParticipantAddParams, type ParticipantRemoveParams, } from "./participants.mjs";
|
|
4
4
|
export { Typing } from "./typing.mjs";
|
|
5
5
|
//# sourceMappingURL=index.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../src/resources/chats/index.ts"],"names":[],"mappings":"OAEO,EACL,KAAK,EACL,KAAK,IAAI,EACT,KAAK,cAAc,EACnB,KAAK,
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../src/resources/chats/index.ts"],"names":[],"mappings":"OAEO,EACL,KAAK,EACL,KAAK,IAAI,EACT,KAAK,SAAS,EACd,KAAK,cAAc,EACnB,KAAK,QAAQ,EACb,KAAK,kBAAkB,EACvB,KAAK,yBAAyB,EAC9B,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,EACxB,KAAK,uBAAuB,EAC5B,KAAK,wBAAwB,GAC9B;OACM,EACL,QAAQ,EACR,KAAK,WAAW,EAChB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,GACvB;OACM,EACL,YAAY,EACZ,KAAK,sBAAsB,EAC3B,KAAK,yBAAyB,EAC9B,KAAK,oBAAoB,EACzB,KAAK,uBAAuB,GAC7B;OACM,EAAE,MAAM,EAAE"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { Chats, type Chat, type MessageContent, type
|
|
2
|
-
export { Messages, type SentMessage, type
|
|
1
|
+
export { Chats, type Chat, type MediaPart, type MessageContent, type TextPart, type ChatCreateResponse, type ChatSendVoicememoResponse, type ChatCreateParams, type ChatUpdateParams, type ChatListChatsParams, type ChatSendVoicememoParams, type ChatsListChatsPagination, } from "./chats.js";
|
|
2
|
+
export { Messages, type SentMessage, type MessageSendResponse, type MessageListParams, type MessageSendParams, } from "./messages.js";
|
|
3
3
|
export { Participants, type ParticipantAddResponse, type ParticipantRemoveResponse, type ParticipantAddParams, type ParticipantRemoveParams, } from "./participants.js";
|
|
4
4
|
export { Typing } from "./typing.js";
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/chats/index.ts"],"names":[],"mappings":"OAEO,EACL,KAAK,EACL,KAAK,IAAI,EACT,KAAK,cAAc,EACnB,KAAK,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/chats/index.ts"],"names":[],"mappings":"OAEO,EACL,KAAK,EACL,KAAK,IAAI,EACT,KAAK,SAAS,EACd,KAAK,cAAc,EACnB,KAAK,QAAQ,EACb,KAAK,kBAAkB,EACvB,KAAK,yBAAyB,EAC9B,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,EACxB,KAAK,uBAAuB,EAC5B,KAAK,wBAAwB,GAC9B;OACM,EACL,QAAQ,EACR,KAAK,WAAW,EAChB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,GACvB;OACM,EACL,YAAY,EACZ,KAAK,sBAAsB,EAC3B,KAAK,yBAAyB,EAC9B,KAAK,oBAAoB,EACzB,KAAK,uBAAuB,GAC7B;OACM,EAAE,MAAM,EAAE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/chats/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/chats/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,oCAaiB;AAZf,8FAAA,KAAK,OAAA;AAaP,0CAMoB;AALlB,oGAAA,QAAQ,OAAA;AAMV,kDAMwB;AALtB,4GAAA,YAAY,OAAA;AAMd,sCAAkC;AAAzB,gGAAA,MAAM,OAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/resources/chats/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EACL,KAAK,
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/resources/chats/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EACL,KAAK,GAYN;OACM,EACL,QAAQ,GAKT;OACM,EACL,YAAY,GAKb;OACM,EAAE,MAAM,EAAE"}
|
|
@@ -1,21 +1,35 @@
|
|
|
1
1
|
import { APIResource } from "../../core/resource.mjs";
|
|
2
2
|
import * as MessagesAPI from "../messages.mjs";
|
|
3
|
+
import { MessagesListMessagesPagination } from "../messages.mjs";
|
|
3
4
|
import * as Shared from "../shared.mjs";
|
|
4
5
|
import * as ChatsAPI from "./chats.mjs";
|
|
5
6
|
import { APIPromise } from "../../core/api-promise.mjs";
|
|
7
|
+
import { type ListMessagesPaginationParams, PagePromise } from "../../core/pagination.mjs";
|
|
6
8
|
import { RequestOptions } from "../../internal/request-options.mjs";
|
|
9
|
+
/**
|
|
10
|
+
* Messages are individual text or multimedia communications within a chat thread.
|
|
11
|
+
*
|
|
12
|
+
* Messages can include text, attachments, special effects (like confetti or fireworks),
|
|
13
|
+
* and reactions. All messages are associated with a specific chat and sent from a
|
|
14
|
+
* phone number you own.
|
|
15
|
+
*
|
|
16
|
+
* Messages support delivery status tracking, read receipts, and editing capabilities.
|
|
17
|
+
*/
|
|
7
18
|
export declare class Messages extends APIResource {
|
|
8
19
|
/**
|
|
9
20
|
* Retrieve messages from a specific chat with pagination support.
|
|
10
21
|
*
|
|
11
22
|
* @example
|
|
12
23
|
* ```ts
|
|
13
|
-
*
|
|
24
|
+
* // Automatically fetches more pages as needed.
|
|
25
|
+
* for await (const message of client.chats.messages.list(
|
|
14
26
|
* '550e8400-e29b-41d4-a716-446655440000',
|
|
15
|
-
* )
|
|
27
|
+
* )) {
|
|
28
|
+
* // ...
|
|
29
|
+
* }
|
|
16
30
|
* ```
|
|
17
31
|
*/
|
|
18
|
-
list(chatID: string, query?: MessageListParams | null | undefined, options?: RequestOptions):
|
|
32
|
+
list(chatID: string, query?: MessageListParams | null | undefined, options?: RequestOptions): PagePromise<MessagesListMessagesPagination, MessagesAPI.Message>;
|
|
19
33
|
/**
|
|
20
34
|
* Send a message to an existing chat. Use this endpoint when you already have a
|
|
21
35
|
* chat ID and want to send additional messages to it.
|
|
@@ -67,7 +81,7 @@ export interface SentMessage {
|
|
|
67
81
|
/**
|
|
68
82
|
* Message parts in order (text and media)
|
|
69
83
|
*/
|
|
70
|
-
parts: Array<
|
|
84
|
+
parts: Array<Shared.TextPartResponse | Shared.MediaPartResponse>;
|
|
71
85
|
/**
|
|
72
86
|
* When the message was sent
|
|
73
87
|
*/
|
|
@@ -97,17 +111,6 @@ export interface SentMessage {
|
|
|
97
111
|
*/
|
|
98
112
|
service?: Shared.ServiceType | null;
|
|
99
113
|
}
|
|
100
|
-
export interface MessageListResponse {
|
|
101
|
-
/**
|
|
102
|
-
* List of messages
|
|
103
|
-
*/
|
|
104
|
-
messages: Array<MessagesAPI.Message>;
|
|
105
|
-
/**
|
|
106
|
-
* Cursor for fetching the next page of results. Null if there are no more results
|
|
107
|
-
* to fetch. Pass this value as the `cursor` parameter in the next request.
|
|
108
|
-
*/
|
|
109
|
-
next_cursor?: string | null;
|
|
110
|
-
}
|
|
111
114
|
/**
|
|
112
115
|
* Response for sending a message to a chat
|
|
113
116
|
*/
|
|
@@ -121,15 +124,7 @@ export interface MessageSendResponse {
|
|
|
121
124
|
*/
|
|
122
125
|
message: SentMessage;
|
|
123
126
|
}
|
|
124
|
-
export interface MessageListParams {
|
|
125
|
-
/**
|
|
126
|
-
* Pagination cursor from previous next_cursor response
|
|
127
|
-
*/
|
|
128
|
-
cursor?: string;
|
|
129
|
-
/**
|
|
130
|
-
* Maximum number of messages to return
|
|
131
|
-
*/
|
|
132
|
-
limit?: number;
|
|
127
|
+
export interface MessageListParams extends ListMessagesPaginationParams {
|
|
133
128
|
}
|
|
134
129
|
export interface MessageSendParams {
|
|
135
130
|
/**
|
|
@@ -140,6 +135,7 @@ export interface MessageSendParams {
|
|
|
140
135
|
message: ChatsAPI.MessageContent;
|
|
141
136
|
}
|
|
142
137
|
export declare namespace Messages {
|
|
143
|
-
export { type SentMessage as SentMessage, type
|
|
138
|
+
export { type SentMessage as SentMessage, type MessageSendResponse as MessageSendResponse, type MessageListParams as MessageListParams, type MessageSendParams as MessageSendParams, };
|
|
144
139
|
}
|
|
140
|
+
export { type MessagesListMessagesPagination };
|
|
145
141
|
//# sourceMappingURL=messages.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages.d.mts","sourceRoot":"","sources":["../../src/resources/chats/messages.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,WAAW;OAChB,KAAK,MAAM;OACX,KAAK,QAAQ;OACb,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB,qBAAa,QAAS,SAAQ,WAAW;IACvC
|
|
1
|
+
{"version":3,"file":"messages.d.mts","sourceRoot":"","sources":["../../src/resources/chats/messages.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,WAAW;OAChB,EAAE,8BAA8B,EAAE;OAClC,KAAK,MAAM;OACX,KAAK,QAAQ;OACb,EAAE,UAAU,EAAE;OACd,EAEL,KAAK,4BAA4B,EACjC,WAAW,EACZ;OACM,EAAE,cAAc,EAAE;AAGzB;;;;;;;;GAQG;AACH,qBAAa,QAAS,SAAQ,WAAW;IACvC;;;;;;;;;;;;OAYG;IACH,IAAI,CACF,MAAM,EAAE,MAAM,EACd,KAAK,GAAE,iBAAiB,GAAG,IAAI,GAAG,SAAc,EAChD,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,8BAA8B,EAAE,WAAW,CAAC,OAAO,CAAC;IAQnE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA6BG;IACH,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,iBAAiB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,mBAAmB,CAAC;CAGzG;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,eAAe,EAAE,SAAS,GAAG,QAAQ,GAAG,MAAM,GAAG,WAAW,GAAG,QAAQ,CAAC;IAExE;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;IAEjB;;OAEG;IACH,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,gBAAgB,GAAG,MAAM,CAAC,iBAAiB,CAAC,CAAC;IAEjE;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE7B;;OAEG;IACH,MAAM,CAAC,EAAE,WAAW,CAAC,aAAa,GAAG,IAAI,CAAC;IAE1C;;OAEG;IACH,WAAW,CAAC,EAAE,WAAW,CAAC,UAAU,GAAG,IAAI,CAAC;IAE5C;;OAEG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC,WAAW,GAAG,IAAI,CAAC;IAE9C;;OAEG;IACH,QAAQ,CAAC,EAAE,WAAW,CAAC,OAAO,GAAG,IAAI,CAAC;IAEtC;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC,WAAW,GAAG,IAAI,CAAC;CACrC;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,OAAO,EAAE,WAAW,CAAC;CACtB;AAED,MAAM,WAAW,iBAAkB,SAAQ,4BAA4B;CAAG;AAE1E,MAAM,WAAW,iBAAiB;IAChC;;;;OAIG;IACH,OAAO,EAAE,QAAQ,CAAC,cAAc,CAAC;CAClC;AAED,MAAM,CAAC,OAAO,WAAW,QAAQ,CAAC;IAChC,OAAO,EACL,KAAK,WAAW,IAAI,WAAW,EAC/B,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,iBAAiB,IAAI,iBAAiB,GAC5C,CAAC;CACH;AAED,OAAO,EAAE,KAAK,8BAA8B,EAAE,CAAC"}
|
|
@@ -1,21 +1,35 @@
|
|
|
1
1
|
import { APIResource } from "../../core/resource.js";
|
|
2
2
|
import * as MessagesAPI from "../messages.js";
|
|
3
|
+
import { MessagesListMessagesPagination } from "../messages.js";
|
|
3
4
|
import * as Shared from "../shared.js";
|
|
4
5
|
import * as ChatsAPI from "./chats.js";
|
|
5
6
|
import { APIPromise } from "../../core/api-promise.js";
|
|
7
|
+
import { type ListMessagesPaginationParams, PagePromise } from "../../core/pagination.js";
|
|
6
8
|
import { RequestOptions } from "../../internal/request-options.js";
|
|
9
|
+
/**
|
|
10
|
+
* Messages are individual text or multimedia communications within a chat thread.
|
|
11
|
+
*
|
|
12
|
+
* Messages can include text, attachments, special effects (like confetti or fireworks),
|
|
13
|
+
* and reactions. All messages are associated with a specific chat and sent from a
|
|
14
|
+
* phone number you own.
|
|
15
|
+
*
|
|
16
|
+
* Messages support delivery status tracking, read receipts, and editing capabilities.
|
|
17
|
+
*/
|
|
7
18
|
export declare class Messages extends APIResource {
|
|
8
19
|
/**
|
|
9
20
|
* Retrieve messages from a specific chat with pagination support.
|
|
10
21
|
*
|
|
11
22
|
* @example
|
|
12
23
|
* ```ts
|
|
13
|
-
*
|
|
24
|
+
* // Automatically fetches more pages as needed.
|
|
25
|
+
* for await (const message of client.chats.messages.list(
|
|
14
26
|
* '550e8400-e29b-41d4-a716-446655440000',
|
|
15
|
-
* )
|
|
27
|
+
* )) {
|
|
28
|
+
* // ...
|
|
29
|
+
* }
|
|
16
30
|
* ```
|
|
17
31
|
*/
|
|
18
|
-
list(chatID: string, query?: MessageListParams | null | undefined, options?: RequestOptions):
|
|
32
|
+
list(chatID: string, query?: MessageListParams | null | undefined, options?: RequestOptions): PagePromise<MessagesListMessagesPagination, MessagesAPI.Message>;
|
|
19
33
|
/**
|
|
20
34
|
* Send a message to an existing chat. Use this endpoint when you already have a
|
|
21
35
|
* chat ID and want to send additional messages to it.
|
|
@@ -67,7 +81,7 @@ export interface SentMessage {
|
|
|
67
81
|
/**
|
|
68
82
|
* Message parts in order (text and media)
|
|
69
83
|
*/
|
|
70
|
-
parts: Array<
|
|
84
|
+
parts: Array<Shared.TextPartResponse | Shared.MediaPartResponse>;
|
|
71
85
|
/**
|
|
72
86
|
* When the message was sent
|
|
73
87
|
*/
|
|
@@ -97,17 +111,6 @@ export interface SentMessage {
|
|
|
97
111
|
*/
|
|
98
112
|
service?: Shared.ServiceType | null;
|
|
99
113
|
}
|
|
100
|
-
export interface MessageListResponse {
|
|
101
|
-
/**
|
|
102
|
-
* List of messages
|
|
103
|
-
*/
|
|
104
|
-
messages: Array<MessagesAPI.Message>;
|
|
105
|
-
/**
|
|
106
|
-
* Cursor for fetching the next page of results. Null if there are no more results
|
|
107
|
-
* to fetch. Pass this value as the `cursor` parameter in the next request.
|
|
108
|
-
*/
|
|
109
|
-
next_cursor?: string | null;
|
|
110
|
-
}
|
|
111
114
|
/**
|
|
112
115
|
* Response for sending a message to a chat
|
|
113
116
|
*/
|
|
@@ -121,15 +124,7 @@ export interface MessageSendResponse {
|
|
|
121
124
|
*/
|
|
122
125
|
message: SentMessage;
|
|
123
126
|
}
|
|
124
|
-
export interface MessageListParams {
|
|
125
|
-
/**
|
|
126
|
-
* Pagination cursor from previous next_cursor response
|
|
127
|
-
*/
|
|
128
|
-
cursor?: string;
|
|
129
|
-
/**
|
|
130
|
-
* Maximum number of messages to return
|
|
131
|
-
*/
|
|
132
|
-
limit?: number;
|
|
127
|
+
export interface MessageListParams extends ListMessagesPaginationParams {
|
|
133
128
|
}
|
|
134
129
|
export interface MessageSendParams {
|
|
135
130
|
/**
|
|
@@ -140,6 +135,7 @@ export interface MessageSendParams {
|
|
|
140
135
|
message: ChatsAPI.MessageContent;
|
|
141
136
|
}
|
|
142
137
|
export declare namespace Messages {
|
|
143
|
-
export { type SentMessage as SentMessage, type
|
|
138
|
+
export { type SentMessage as SentMessage, type MessageSendResponse as MessageSendResponse, type MessageListParams as MessageListParams, type MessageSendParams as MessageSendParams, };
|
|
144
139
|
}
|
|
140
|
+
export { type MessagesListMessagesPagination };
|
|
145
141
|
//# sourceMappingURL=messages.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../src/resources/chats/messages.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,WAAW;OAChB,KAAK,MAAM;OACX,KAAK,QAAQ;OACb,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB,qBAAa,QAAS,SAAQ,WAAW;IACvC
|
|
1
|
+
{"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../src/resources/chats/messages.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,WAAW;OAChB,EAAE,8BAA8B,EAAE;OAClC,KAAK,MAAM;OACX,KAAK,QAAQ;OACb,EAAE,UAAU,EAAE;OACd,EAEL,KAAK,4BAA4B,EACjC,WAAW,EACZ;OACM,EAAE,cAAc,EAAE;AAGzB;;;;;;;;GAQG;AACH,qBAAa,QAAS,SAAQ,WAAW;IACvC;;;;;;;;;;;;OAYG;IACH,IAAI,CACF,MAAM,EAAE,MAAM,EACd,KAAK,GAAE,iBAAiB,GAAG,IAAI,GAAG,SAAc,EAChD,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,8BAA8B,EAAE,WAAW,CAAC,OAAO,CAAC;IAQnE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA6BG;IACH,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,iBAAiB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,mBAAmB,CAAC;CAGzG;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,eAAe,EAAE,SAAS,GAAG,QAAQ,GAAG,MAAM,GAAG,WAAW,GAAG,QAAQ,CAAC;IAExE;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;IAEjB;;OAEG;IACH,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,gBAAgB,GAAG,MAAM,CAAC,iBAAiB,CAAC,CAAC;IAEjE;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE7B;;OAEG;IACH,MAAM,CAAC,EAAE,WAAW,CAAC,aAAa,GAAG,IAAI,CAAC;IAE1C;;OAEG;IACH,WAAW,CAAC,EAAE,WAAW,CAAC,UAAU,GAAG,IAAI,CAAC;IAE5C;;OAEG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC,WAAW,GAAG,IAAI,CAAC;IAE9C;;OAEG;IACH,QAAQ,CAAC,EAAE,WAAW,CAAC,OAAO,GAAG,IAAI,CAAC;IAEtC;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC,WAAW,GAAG,IAAI,CAAC;CACrC;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,OAAO,EAAE,WAAW,CAAC;CACtB;AAED,MAAM,WAAW,iBAAkB,SAAQ,4BAA4B;CAAG;AAE1E,MAAM,WAAW,iBAAiB;IAChC;;;;OAIG;IACH,OAAO,EAAE,QAAQ,CAAC,cAAc,CAAC;CAClC;AAED,MAAM,CAAC,OAAO,WAAW,QAAQ,CAAC;IAChC,OAAO,EACL,KAAK,WAAW,IAAI,WAAW,EAC/B,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,iBAAiB,IAAI,iBAAiB,GAC5C,CAAC;CACH;AAED,OAAO,EAAE,KAAK,8BAA8B,EAAE,CAAC"}
|
|
@@ -3,20 +3,33 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.Messages = void 0;
|
|
5
5
|
const resource_1 = require("../../core/resource.js");
|
|
6
|
+
const pagination_1 = require("../../core/pagination.js");
|
|
6
7
|
const path_1 = require("../../internal/utils/path.js");
|
|
8
|
+
/**
|
|
9
|
+
* Messages are individual text or multimedia communications within a chat thread.
|
|
10
|
+
*
|
|
11
|
+
* Messages can include text, attachments, special effects (like confetti or fireworks),
|
|
12
|
+
* and reactions. All messages are associated with a specific chat and sent from a
|
|
13
|
+
* phone number you own.
|
|
14
|
+
*
|
|
15
|
+
* Messages support delivery status tracking, read receipts, and editing capabilities.
|
|
16
|
+
*/
|
|
7
17
|
class Messages extends resource_1.APIResource {
|
|
8
18
|
/**
|
|
9
19
|
* Retrieve messages from a specific chat with pagination support.
|
|
10
20
|
*
|
|
11
21
|
* @example
|
|
12
22
|
* ```ts
|
|
13
|
-
*
|
|
23
|
+
* // Automatically fetches more pages as needed.
|
|
24
|
+
* for await (const message of client.chats.messages.list(
|
|
14
25
|
* '550e8400-e29b-41d4-a716-446655440000',
|
|
15
|
-
* )
|
|
26
|
+
* )) {
|
|
27
|
+
* // ...
|
|
28
|
+
* }
|
|
16
29
|
* ```
|
|
17
30
|
*/
|
|
18
31
|
list(chatID, query = {}, options) {
|
|
19
|
-
return this._client.
|
|
32
|
+
return this._client.getAPIList((0, path_1.path) `/v3/chats/${chatID}/messages`, (pagination_1.ListMessagesPagination), { query, ...options });
|
|
20
33
|
}
|
|
21
34
|
/**
|
|
22
35
|
* Send a message to an existing chat. Use this endpoint when you already have a
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages.js","sourceRoot":"","sources":["../../src/resources/chats/messages.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAMlD,uDAAiD;AAEjD,MAAa,QAAS,SAAQ,sBAAW;IACvC
|
|
1
|
+
{"version":3,"file":"messages.js","sourceRoot":"","sources":["../../src/resources/chats/messages.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAMlD,yDAI+B;AAE/B,uDAAiD;AAEjD;;;;;;;;GAQG;AACH,MAAa,QAAS,SAAQ,sBAAW;IACvC;;;;;;;;;;;;OAYG;IACH,IAAI,CACF,MAAc,EACd,QAA8C,EAAE,EAChD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAC5B,IAAA,WAAI,EAAA,aAAa,MAAM,WAAW,EAClC,CAAA,mCAA2C,CAAA,EAC3C,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CACtB,CAAC;IACJ,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA6BG;IACH,IAAI,CAAC,MAAc,EAAE,IAAuB,EAAE,OAAwB;QACpE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,aAAa,MAAM,WAAW,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrF,CAAC;CACF;AA3DD,4BA2DC"}
|
|
@@ -1,19 +1,32 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
import { APIResource } from "../../core/resource.mjs";
|
|
3
|
+
import { ListMessagesPagination, } from "../../core/pagination.mjs";
|
|
3
4
|
import { path } from "../../internal/utils/path.mjs";
|
|
5
|
+
/**
|
|
6
|
+
* Messages are individual text or multimedia communications within a chat thread.
|
|
7
|
+
*
|
|
8
|
+
* Messages can include text, attachments, special effects (like confetti or fireworks),
|
|
9
|
+
* and reactions. All messages are associated with a specific chat and sent from a
|
|
10
|
+
* phone number you own.
|
|
11
|
+
*
|
|
12
|
+
* Messages support delivery status tracking, read receipts, and editing capabilities.
|
|
13
|
+
*/
|
|
4
14
|
export class Messages extends APIResource {
|
|
5
15
|
/**
|
|
6
16
|
* Retrieve messages from a specific chat with pagination support.
|
|
7
17
|
*
|
|
8
18
|
* @example
|
|
9
19
|
* ```ts
|
|
10
|
-
*
|
|
20
|
+
* // Automatically fetches more pages as needed.
|
|
21
|
+
* for await (const message of client.chats.messages.list(
|
|
11
22
|
* '550e8400-e29b-41d4-a716-446655440000',
|
|
12
|
-
* )
|
|
23
|
+
* )) {
|
|
24
|
+
* // ...
|
|
25
|
+
* }
|
|
13
26
|
* ```
|
|
14
27
|
*/
|
|
15
28
|
list(chatID, query = {}, options) {
|
|
16
|
-
return this._client.
|
|
29
|
+
return this._client.getAPIList(path `/v3/chats/${chatID}/messages`, (ListMessagesPagination), { query, ...options });
|
|
17
30
|
}
|
|
18
31
|
/**
|
|
19
32
|
* Send a message to an existing chat. Use this endpoint when you already have a
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages.mjs","sourceRoot":"","sources":["../../src/resources/chats/messages.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAMf,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,QAAS,SAAQ,WAAW;IACvC
|
|
1
|
+
{"version":3,"file":"messages.mjs","sourceRoot":"","sources":["../../src/resources/chats/messages.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAMf,EACL,sBAAsB,GAGvB;OAEM,EAAE,IAAI,EAAE;AAEf;;;;;;;;GAQG;AACH,MAAM,OAAO,QAAS,SAAQ,WAAW;IACvC;;;;;;;;;;;;OAYG;IACH,IAAI,CACF,MAAc,EACd,QAA8C,EAAE,EAChD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAC5B,IAAI,CAAA,aAAa,MAAM,WAAW,EAClC,CAAA,sBAA2C,CAAA,EAC3C,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CACtB,CAAC;IACJ,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA6BG;IACH,IAAI,CAAC,MAAc,EAAE,IAAuB,EAAE,OAAwB;QACpE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,aAAa,MAAM,WAAW,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrF,CAAC;CACF"}
|
|
@@ -1,6 +1,24 @@
|
|
|
1
1
|
import { APIResource } from "../../core/resource.mjs";
|
|
2
2
|
import { APIPromise } from "../../core/api-promise.mjs";
|
|
3
3
|
import { RequestOptions } from "../../internal/request-options.mjs";
|
|
4
|
+
/**
|
|
5
|
+
* A Chat is a conversation thread with one or more participants.
|
|
6
|
+
*
|
|
7
|
+
* To begin a chat, you must create a Chat with at least one recipient handle.
|
|
8
|
+
* Including multiple handles creates a group chat.
|
|
9
|
+
*
|
|
10
|
+
* When creating a chat, the `from` field specifies which of your
|
|
11
|
+
* authorized phone numbers the message originates from. Your authentication token grants
|
|
12
|
+
* access to one or more phone numbers, but the `from` field determines the actual sender.
|
|
13
|
+
*
|
|
14
|
+
* **Handle Format:**
|
|
15
|
+
* - Handles can be phone numbers or email addresses
|
|
16
|
+
* - Phone numbers MUST be in E.164 format (starting with +)
|
|
17
|
+
* - Phone format: `+[country code][subscriber number]`
|
|
18
|
+
* - Example phone: `+12223334444` (US), `+442071234567` (UK), `+81312345678` (Japan)
|
|
19
|
+
* - Example email: `user@example.com`
|
|
20
|
+
* - No spaces, dashes, or parentheses in phone numbers
|
|
21
|
+
*/
|
|
4
22
|
export declare class Participants extends APIResource {
|
|
5
23
|
/**
|
|
6
24
|
* Add a new participant to an existing group chat.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"participants.d.mts","sourceRoot":"","sources":["../../src/resources/chats/participants.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB,qBAAa,YAAa,SAAQ,WAAW;IAC3C;;;;;;;;;;;;;;;;;;OAkBG;IACH,GAAG,CACD,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,oBAAoB,EAC1B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,sBAAsB,CAAC;IAIrC;;;;;;;;;;;;;;;OAeG;IACH,MAAM,CACJ,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,uBAAuB,EAC7B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,yBAAyB,CAAC;CAGzC;AAED,MAAM,WAAW,sBAAsB;IACrC,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,yBAAyB;IACxC,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,oBAAoB;IACnC;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,uBAAuB;IACtC;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,CAAC,OAAO,WAAW,YAAY,CAAC;IACpC,OAAO,EACL,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,uBAAuB,IAAI,uBAAuB,GACxD,CAAC;CACH"}
|
|
1
|
+
{"version":3,"file":"participants.d.mts","sourceRoot":"","sources":["../../src/resources/chats/participants.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB;;;;;;;;;;;;;;;;;GAiBG;AACH,qBAAa,YAAa,SAAQ,WAAW;IAC3C;;;;;;;;;;;;;;;;;;OAkBG;IACH,GAAG,CACD,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,oBAAoB,EAC1B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,sBAAsB,CAAC;IAIrC;;;;;;;;;;;;;;;OAeG;IACH,MAAM,CACJ,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,uBAAuB,EAC7B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,yBAAyB,CAAC;CAGzC;AAED,MAAM,WAAW,sBAAsB;IACrC,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,yBAAyB;IACxC,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,oBAAoB;IACnC;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,uBAAuB;IACtC;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,CAAC,OAAO,WAAW,YAAY,CAAC;IACpC,OAAO,EACL,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,uBAAuB,IAAI,uBAAuB,GACxD,CAAC;CACH"}
|
|
@@ -1,6 +1,24 @@
|
|
|
1
1
|
import { APIResource } from "../../core/resource.js";
|
|
2
2
|
import { APIPromise } from "../../core/api-promise.js";
|
|
3
3
|
import { RequestOptions } from "../../internal/request-options.js";
|
|
4
|
+
/**
|
|
5
|
+
* A Chat is a conversation thread with one or more participants.
|
|
6
|
+
*
|
|
7
|
+
* To begin a chat, you must create a Chat with at least one recipient handle.
|
|
8
|
+
* Including multiple handles creates a group chat.
|
|
9
|
+
*
|
|
10
|
+
* When creating a chat, the `from` field specifies which of your
|
|
11
|
+
* authorized phone numbers the message originates from. Your authentication token grants
|
|
12
|
+
* access to one or more phone numbers, but the `from` field determines the actual sender.
|
|
13
|
+
*
|
|
14
|
+
* **Handle Format:**
|
|
15
|
+
* - Handles can be phone numbers or email addresses
|
|
16
|
+
* - Phone numbers MUST be in E.164 format (starting with +)
|
|
17
|
+
* - Phone format: `+[country code][subscriber number]`
|
|
18
|
+
* - Example phone: `+12223334444` (US), `+442071234567` (UK), `+81312345678` (Japan)
|
|
19
|
+
* - Example email: `user@example.com`
|
|
20
|
+
* - No spaces, dashes, or parentheses in phone numbers
|
|
21
|
+
*/
|
|
4
22
|
export declare class Participants extends APIResource {
|
|
5
23
|
/**
|
|
6
24
|
* Add a new participant to an existing group chat.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"participants.d.ts","sourceRoot":"","sources":["../../src/resources/chats/participants.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB,qBAAa,YAAa,SAAQ,WAAW;IAC3C;;;;;;;;;;;;;;;;;;OAkBG;IACH,GAAG,CACD,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,oBAAoB,EAC1B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,sBAAsB,CAAC;IAIrC;;;;;;;;;;;;;;;OAeG;IACH,MAAM,CACJ,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,uBAAuB,EAC7B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,yBAAyB,CAAC;CAGzC;AAED,MAAM,WAAW,sBAAsB;IACrC,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,yBAAyB;IACxC,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,oBAAoB;IACnC;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,uBAAuB;IACtC;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,CAAC,OAAO,WAAW,YAAY,CAAC;IACpC,OAAO,EACL,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,uBAAuB,IAAI,uBAAuB,GACxD,CAAC;CACH"}
|
|
1
|
+
{"version":3,"file":"participants.d.ts","sourceRoot":"","sources":["../../src/resources/chats/participants.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB;;;;;;;;;;;;;;;;;GAiBG;AACH,qBAAa,YAAa,SAAQ,WAAW;IAC3C;;;;;;;;;;;;;;;;;;OAkBG;IACH,GAAG,CACD,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,oBAAoB,EAC1B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,sBAAsB,CAAC;IAIrC;;;;;;;;;;;;;;;OAeG;IACH,MAAM,CACJ,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,uBAAuB,EAC7B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,yBAAyB,CAAC;CAGzC;AAED,MAAM,WAAW,sBAAsB;IACrC,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,yBAAyB;IACxC,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,oBAAoB;IACnC;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,uBAAuB;IACtC;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,CAAC,OAAO,WAAW,YAAY,CAAC;IACpC,OAAO,EACL,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,uBAAuB,IAAI,uBAAuB,GACxD,CAAC;CACH"}
|
|
@@ -4,6 +4,24 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
4
4
|
exports.Participants = void 0;
|
|
5
5
|
const resource_1 = require("../../core/resource.js");
|
|
6
6
|
const path_1 = require("../../internal/utils/path.js");
|
|
7
|
+
/**
|
|
8
|
+
* A Chat is a conversation thread with one or more participants.
|
|
9
|
+
*
|
|
10
|
+
* To begin a chat, you must create a Chat with at least one recipient handle.
|
|
11
|
+
* Including multiple handles creates a group chat.
|
|
12
|
+
*
|
|
13
|
+
* When creating a chat, the `from` field specifies which of your
|
|
14
|
+
* authorized phone numbers the message originates from. Your authentication token grants
|
|
15
|
+
* access to one or more phone numbers, but the `from` field determines the actual sender.
|
|
16
|
+
*
|
|
17
|
+
* **Handle Format:**
|
|
18
|
+
* - Handles can be phone numbers or email addresses
|
|
19
|
+
* - Phone numbers MUST be in E.164 format (starting with +)
|
|
20
|
+
* - Phone format: `+[country code][subscriber number]`
|
|
21
|
+
* - Example phone: `+12223334444` (US), `+442071234567` (UK), `+81312345678` (Japan)
|
|
22
|
+
* - Example email: `user@example.com`
|
|
23
|
+
* - No spaces, dashes, or parentheses in phone numbers
|
|
24
|
+
*/
|
|
7
25
|
class Participants extends resource_1.APIResource {
|
|
8
26
|
/**
|
|
9
27
|
* Add a new participant to an existing group chat.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"participants.js","sourceRoot":"","sources":["../../src/resources/chats/participants.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAGlD,uDAAiD;AAEjD,MAAa,YAAa,SAAQ,sBAAW;IAC3C;;;;;;;;;;;;;;;;;;OAkBG;IACH,GAAG,CACD,MAAc,EACd,IAA0B,EAC1B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,aAAa,MAAM,eAAe,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACzF,CAAC;IAED;;;;;;;;;;;;;;;OAeG;IACH,MAAM,CACJ,MAAc,EACd,IAA6B,EAC7B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAA,WAAI,EAAA,aAAa,MAAM,eAAe,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC3F,CAAC;CACF;AAnDD,oCAmDC"}
|
|
1
|
+
{"version":3,"file":"participants.js","sourceRoot":"","sources":["../../src/resources/chats/participants.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAGlD,uDAAiD;AAEjD;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAa,YAAa,SAAQ,sBAAW;IAC3C;;;;;;;;;;;;;;;;;;OAkBG;IACH,GAAG,CACD,MAAc,EACd,IAA0B,EAC1B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,aAAa,MAAM,eAAe,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACzF,CAAC;IAED;;;;;;;;;;;;;;;OAeG;IACH,MAAM,CACJ,MAAc,EACd,IAA6B,EAC7B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAA,WAAI,EAAA,aAAa,MAAM,eAAe,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC3F,CAAC;CACF;AAnDD,oCAmDC"}
|
|
@@ -1,6 +1,24 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
import { APIResource } from "../../core/resource.mjs";
|
|
3
3
|
import { path } from "../../internal/utils/path.mjs";
|
|
4
|
+
/**
|
|
5
|
+
* A Chat is a conversation thread with one or more participants.
|
|
6
|
+
*
|
|
7
|
+
* To begin a chat, you must create a Chat with at least one recipient handle.
|
|
8
|
+
* Including multiple handles creates a group chat.
|
|
9
|
+
*
|
|
10
|
+
* When creating a chat, the `from` field specifies which of your
|
|
11
|
+
* authorized phone numbers the message originates from. Your authentication token grants
|
|
12
|
+
* access to one or more phone numbers, but the `from` field determines the actual sender.
|
|
13
|
+
*
|
|
14
|
+
* **Handle Format:**
|
|
15
|
+
* - Handles can be phone numbers or email addresses
|
|
16
|
+
* - Phone numbers MUST be in E.164 format (starting with +)
|
|
17
|
+
* - Phone format: `+[country code][subscriber number]`
|
|
18
|
+
* - Example phone: `+12223334444` (US), `+442071234567` (UK), `+81312345678` (Japan)
|
|
19
|
+
* - Example email: `user@example.com`
|
|
20
|
+
* - No spaces, dashes, or parentheses in phone numbers
|
|
21
|
+
*/
|
|
4
22
|
export class Participants extends APIResource {
|
|
5
23
|
/**
|
|
6
24
|
* Add a new participant to an existing group chat.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"participants.mjs","sourceRoot":"","sources":["../../src/resources/chats/participants.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAGf,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,YAAa,SAAQ,WAAW;IAC3C;;;;;;;;;;;;;;;;;;OAkBG;IACH,GAAG,CACD,MAAc,EACd,IAA0B,EAC1B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,aAAa,MAAM,eAAe,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACzF,CAAC;IAED;;;;;;;;;;;;;;;OAeG;IACH,MAAM,CACJ,MAAc,EACd,IAA6B,EAC7B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAA,aAAa,MAAM,eAAe,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC3F,CAAC;CACF"}
|
|
1
|
+
{"version":3,"file":"participants.mjs","sourceRoot":"","sources":["../../src/resources/chats/participants.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAGf,EAAE,IAAI,EAAE;AAEf;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,OAAO,YAAa,SAAQ,WAAW;IAC3C;;;;;;;;;;;;;;;;;;OAkBG;IACH,GAAG,CACD,MAAc,EACd,IAA0B,EAC1B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,aAAa,MAAM,eAAe,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACzF,CAAC;IAED;;;;;;;;;;;;;;;OAeG;IACH,MAAM,CACJ,MAAc,EACd,IAA6B,EAC7B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAA,aAAa,MAAM,eAAe,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC3F,CAAC;CACF"}
|
|
@@ -1,6 +1,24 @@
|
|
|
1
1
|
import { APIResource } from "../../core/resource.mjs";
|
|
2
2
|
import { APIPromise } from "../../core/api-promise.mjs";
|
|
3
3
|
import { RequestOptions } from "../../internal/request-options.mjs";
|
|
4
|
+
/**
|
|
5
|
+
* A Chat is a conversation thread with one or more participants.
|
|
6
|
+
*
|
|
7
|
+
* To begin a chat, you must create a Chat with at least one recipient handle.
|
|
8
|
+
* Including multiple handles creates a group chat.
|
|
9
|
+
*
|
|
10
|
+
* When creating a chat, the `from` field specifies which of your
|
|
11
|
+
* authorized phone numbers the message originates from. Your authentication token grants
|
|
12
|
+
* access to one or more phone numbers, but the `from` field determines the actual sender.
|
|
13
|
+
*
|
|
14
|
+
* **Handle Format:**
|
|
15
|
+
* - Handles can be phone numbers or email addresses
|
|
16
|
+
* - Phone numbers MUST be in E.164 format (starting with +)
|
|
17
|
+
* - Phone format: `+[country code][subscriber number]`
|
|
18
|
+
* - Example phone: `+12223334444` (US), `+442071234567` (UK), `+81312345678` (Japan)
|
|
19
|
+
* - Example email: `user@example.com`
|
|
20
|
+
* - No spaces, dashes, or parentheses in phone numbers
|
|
21
|
+
*/
|
|
4
22
|
export declare class Typing extends APIResource {
|
|
5
23
|
/**
|
|
6
24
|
* Send a typing indicator to show that someone is typing in the chat.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typing.d.mts","sourceRoot":"","sources":["../../src/resources/chats/typing.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OAEd,EAAE,cAAc,EAAE;AAGzB,qBAAa,MAAO,SAAQ,WAAW;IACrC;;;;;;;;;;;OAWG;IACH,KAAK,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,IAAI,CAAC;IAOjE;;;;;;;;;;;;;;OAcG;IACH,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,IAAI,CAAC;CAMjE"}
|
|
1
|
+
{"version":3,"file":"typing.d.mts","sourceRoot":"","sources":["../../src/resources/chats/typing.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OAEd,EAAE,cAAc,EAAE;AAGzB;;;;;;;;;;;;;;;;;GAiBG;AACH,qBAAa,MAAO,SAAQ,WAAW;IACrC;;;;;;;;;;;OAWG;IACH,KAAK,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,IAAI,CAAC;IAOjE;;;;;;;;;;;;;;OAcG;IACH,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,IAAI,CAAC;CAMjE"}
|
|
@@ -1,6 +1,24 @@
|
|
|
1
1
|
import { APIResource } from "../../core/resource.js";
|
|
2
2
|
import { APIPromise } from "../../core/api-promise.js";
|
|
3
3
|
import { RequestOptions } from "../../internal/request-options.js";
|
|
4
|
+
/**
|
|
5
|
+
* A Chat is a conversation thread with one or more participants.
|
|
6
|
+
*
|
|
7
|
+
* To begin a chat, you must create a Chat with at least one recipient handle.
|
|
8
|
+
* Including multiple handles creates a group chat.
|
|
9
|
+
*
|
|
10
|
+
* When creating a chat, the `from` field specifies which of your
|
|
11
|
+
* authorized phone numbers the message originates from. Your authentication token grants
|
|
12
|
+
* access to one or more phone numbers, but the `from` field determines the actual sender.
|
|
13
|
+
*
|
|
14
|
+
* **Handle Format:**
|
|
15
|
+
* - Handles can be phone numbers or email addresses
|
|
16
|
+
* - Phone numbers MUST be in E.164 format (starting with +)
|
|
17
|
+
* - Phone format: `+[country code][subscriber number]`
|
|
18
|
+
* - Example phone: `+12223334444` (US), `+442071234567` (UK), `+81312345678` (Japan)
|
|
19
|
+
* - Example email: `user@example.com`
|
|
20
|
+
* - No spaces, dashes, or parentheses in phone numbers
|
|
21
|
+
*/
|
|
4
22
|
export declare class Typing extends APIResource {
|
|
5
23
|
/**
|
|
6
24
|
* Send a typing indicator to show that someone is typing in the chat.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typing.d.ts","sourceRoot":"","sources":["../../src/resources/chats/typing.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OAEd,EAAE,cAAc,EAAE;AAGzB,qBAAa,MAAO,SAAQ,WAAW;IACrC;;;;;;;;;;;OAWG;IACH,KAAK,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,IAAI,CAAC;IAOjE;;;;;;;;;;;;;;OAcG;IACH,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,IAAI,CAAC;CAMjE"}
|
|
1
|
+
{"version":3,"file":"typing.d.ts","sourceRoot":"","sources":["../../src/resources/chats/typing.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OAEd,EAAE,cAAc,EAAE;AAGzB;;;;;;;;;;;;;;;;;GAiBG;AACH,qBAAa,MAAO,SAAQ,WAAW;IACrC;;;;;;;;;;;OAWG;IACH,KAAK,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,IAAI,CAAC;IAOjE;;;;;;;;;;;;;;OAcG;IACH,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,IAAI,CAAC;CAMjE"}
|
|
@@ -5,6 +5,24 @@ exports.Typing = void 0;
|
|
|
5
5
|
const resource_1 = require("../../core/resource.js");
|
|
6
6
|
const headers_1 = require("../../internal/headers.js");
|
|
7
7
|
const path_1 = require("../../internal/utils/path.js");
|
|
8
|
+
/**
|
|
9
|
+
* A Chat is a conversation thread with one or more participants.
|
|
10
|
+
*
|
|
11
|
+
* To begin a chat, you must create a Chat with at least one recipient handle.
|
|
12
|
+
* Including multiple handles creates a group chat.
|
|
13
|
+
*
|
|
14
|
+
* When creating a chat, the `from` field specifies which of your
|
|
15
|
+
* authorized phone numbers the message originates from. Your authentication token grants
|
|
16
|
+
* access to one or more phone numbers, but the `from` field determines the actual sender.
|
|
17
|
+
*
|
|
18
|
+
* **Handle Format:**
|
|
19
|
+
* - Handles can be phone numbers or email addresses
|
|
20
|
+
* - Phone numbers MUST be in E.164 format (starting with +)
|
|
21
|
+
* - Phone format: `+[country code][subscriber number]`
|
|
22
|
+
* - Example phone: `+12223334444` (US), `+442071234567` (UK), `+81312345678` (Japan)
|
|
23
|
+
* - Example email: `user@example.com`
|
|
24
|
+
* - No spaces, dashes, or parentheses in phone numbers
|
|
25
|
+
*/
|
|
8
26
|
class Typing extends resource_1.APIResource {
|
|
9
27
|
/**
|
|
10
28
|
* Send a typing indicator to show that someone is typing in the chat.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typing.js","sourceRoot":"","sources":["../../src/resources/chats/typing.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAElD,uDAAsD;AAEtD,uDAAiD;AAEjD,MAAa,MAAO,SAAQ,sBAAW;IACrC;;;;;;;;;;;OAWG;IACH,KAAK,CAAC,MAAc,EAAE,OAAwB;QAC5C,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,aAAa,MAAM,SAAS,EAAE;YACzD,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACH,IAAI,CAAC,MAAc,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAA,WAAI,EAAA,aAAa,MAAM,SAAS,EAAE;YAC3D,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;CACF;AAzCD,wBAyCC"}
|
|
1
|
+
{"version":3,"file":"typing.js","sourceRoot":"","sources":["../../src/resources/chats/typing.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAElD,uDAAsD;AAEtD,uDAAiD;AAEjD;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAa,MAAO,SAAQ,sBAAW;IACrC;;;;;;;;;;;OAWG;IACH,KAAK,CAAC,MAAc,EAAE,OAAwB;QAC5C,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,aAAa,MAAM,SAAS,EAAE;YACzD,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACH,IAAI,CAAC,MAAc,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAA,WAAI,EAAA,aAAa,MAAM,SAAS,EAAE;YAC3D,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;CACF;AAzCD,wBAyCC"}
|
|
@@ -2,6 +2,24 @@
|
|
|
2
2
|
import { APIResource } from "../../core/resource.mjs";
|
|
3
3
|
import { buildHeaders } from "../../internal/headers.mjs";
|
|
4
4
|
import { path } from "../../internal/utils/path.mjs";
|
|
5
|
+
/**
|
|
6
|
+
* A Chat is a conversation thread with one or more participants.
|
|
7
|
+
*
|
|
8
|
+
* To begin a chat, you must create a Chat with at least one recipient handle.
|
|
9
|
+
* Including multiple handles creates a group chat.
|
|
10
|
+
*
|
|
11
|
+
* When creating a chat, the `from` field specifies which of your
|
|
12
|
+
* authorized phone numbers the message originates from. Your authentication token grants
|
|
13
|
+
* access to one or more phone numbers, but the `from` field determines the actual sender.
|
|
14
|
+
*
|
|
15
|
+
* **Handle Format:**
|
|
16
|
+
* - Handles can be phone numbers or email addresses
|
|
17
|
+
* - Phone numbers MUST be in E.164 format (starting with +)
|
|
18
|
+
* - Phone format: `+[country code][subscriber number]`
|
|
19
|
+
* - Example phone: `+12223334444` (US), `+442071234567` (UK), `+81312345678` (Japan)
|
|
20
|
+
* - Example email: `user@example.com`
|
|
21
|
+
* - No spaces, dashes, or parentheses in phone numbers
|
|
22
|
+
*/
|
|
5
23
|
export class Typing extends APIResource {
|
|
6
24
|
/**
|
|
7
25
|
* Send a typing indicator to show that someone is typing in the chat.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typing.mjs","sourceRoot":"","sources":["../../src/resources/chats/typing.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAEf,EAAE,YAAY,EAAE;OAEhB,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,MAAO,SAAQ,WAAW;IACrC;;;;;;;;;;;OAWG;IACH,KAAK,CAAC,MAAc,EAAE,OAAwB;QAC5C,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,aAAa,MAAM,SAAS,EAAE;YACzD,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACH,IAAI,CAAC,MAAc,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAA,aAAa,MAAM,SAAS,EAAE;YAC3D,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
1
|
+
{"version":3,"file":"typing.mjs","sourceRoot":"","sources":["../../src/resources/chats/typing.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAEf,EAAE,YAAY,EAAE;OAEhB,EAAE,IAAI,EAAE;AAEf;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,OAAO,MAAO,SAAQ,WAAW;IACrC;;;;;;;;;;;OAWG;IACH,KAAK,CAAC,MAAc,EAAE,OAAwB;QAC5C,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,aAAa,MAAM,SAAS,EAAE;YACzD,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACH,IAAI,CAAC,MAAc,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAA,aAAa,MAAM,SAAS,EAAE;YAC3D,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;CACF"}
|
package/resources/index.d.mts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
export * from "./shared.mjs";
|
|
2
2
|
export { Attachments, type SupportedContentType, type AttachmentCreateResponse, type AttachmentRetrieveResponse, type AttachmentCreateParams, } from "./attachments.mjs";
|
|
3
|
-
export { Capability, type
|
|
4
|
-
export { Chats, type Chat, type MessageContent, type
|
|
5
|
-
export { Messages, type ChatHandle, type
|
|
3
|
+
export { Capability, type CapabilityCheckiMessageResponse, type CapabilityCheckRCSResponse, type CapabilityCheckiMessageParams, type CapabilityCheckRCSParams, } from "./capability.mjs";
|
|
4
|
+
export { Chats, type Chat, type MediaPart, type MessageContent, type TextPart, type ChatCreateResponse, type ChatSendVoicememoResponse, type ChatCreateParams, type ChatUpdateParams, type ChatListChatsParams, type ChatSendVoicememoParams, type ChatsListChatsPagination, } from "./chats/chats.mjs";
|
|
5
|
+
export { Messages, type ChatHandle, type Message, type MessageEffect, type Reaction, type ReactionType, type ReplyTo, type MessageAddReactionResponse, type MessageUpdateParams, type MessageDeleteParams, type MessageAddReactionParams, type MessageListMessagesThreadParams, type MessagesListMessagesPagination, } from "./messages.mjs";
|
|
6
6
|
export { PhoneNumbers, type PhoneNumberListResponse } from "./phone-numbers.mjs";
|
|
7
7
|
export { Phonenumbers, type PhonenumberListResponse } from "./phonenumbers.mjs";
|
|
8
8
|
export { WebhookEvents, type WebhookEventType, type WebhookEventListResponse } from "./webhook-events.mjs";
|
|
9
9
|
export { WebhookSubscriptions, type WebhookSubscription, type WebhookSubscriptionCreateResponse, type WebhookSubscriptionListResponse, type WebhookSubscriptionCreateParams, type WebhookSubscriptionUpdateParams, } from "./webhook-subscriptions.mjs";
|
|
10
|
+
export { Webhooks, type MessageEventV2, type MessagePayload, type ReactionEventBase, type SchemasMediaPartResponse, type SchemasMessageEffect, type SchemasTextPartResponse, type MessageSentV2026WebhookEvent, type MessageReceivedV2026WebhookEvent, type MessageReadV2026WebhookEvent, type MessageDeliveredV2026WebhookEvent, type MessageFailedV2026WebhookEvent, type ReactionAddedV2026WebhookEvent, type ReactionRemovedV2026WebhookEvent, type ParticipantAddedV2026WebhookEvent, type ParticipantRemovedV2026WebhookEvent, type ChatGroupNameUpdatedV2026WebhookEvent, type ChatGroupIconUpdatedV2026WebhookEvent, type ChatGroupNameUpdateFailedV2026WebhookEvent, type ChatGroupIconUpdateFailedV2026WebhookEvent, type ChatCreatedV2026WebhookEvent, type ChatTypingIndicatorStartedV2026WebhookEvent, type ChatTypingIndicatorStoppedV2026WebhookEvent, type PhoneNumberStatusUpdatedV2026WebhookEvent, type MessageSentV2025WebhookEvent, type MessageReceivedV2025WebhookEvent, type MessageReadV2025WebhookEvent, type MessageDeliveredV2025WebhookEvent, type MessageFailedV2025WebhookEvent, type ReactionAddedV2025WebhookEvent, type ReactionRemovedV2025WebhookEvent, type ParticipantAddedV2025WebhookEvent, type ParticipantRemovedV2025WebhookEvent, type ChatGroupNameUpdatedV2025WebhookEvent, type ChatGroupIconUpdatedV2025WebhookEvent, type ChatGroupNameUpdateFailedV2025WebhookEvent, type ChatGroupIconUpdateFailedV2025WebhookEvent, type ChatCreatedV2025WebhookEvent, type ChatTypingIndicatorStartedV2025WebhookEvent, type ChatTypingIndicatorStoppedV2025WebhookEvent, type PhoneNumberStatusUpdatedV2025WebhookEvent, type EventsWebhookEvent, } from "./webhooks.mjs";
|
|
10
11
|
//# sourceMappingURL=index.d.mts.map
|