@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.
Files changed (189) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/README.md +31 -0
  3. package/client.d.mts +299 -7
  4. package/client.d.mts.map +1 -1
  5. package/client.d.ts +299 -7
  6. package/client.d.ts.map +1 -1
  7. package/client.js +294 -12
  8. package/client.js.map +1 -1
  9. package/client.mjs +294 -12
  10. package/client.mjs.map +1 -1
  11. package/core/pagination.d.mts +69 -0
  12. package/core/pagination.d.mts.map +1 -0
  13. package/core/pagination.d.ts +69 -0
  14. package/core/pagination.d.ts.map +1 -0
  15. package/core/pagination.js +125 -0
  16. package/core/pagination.js.map +1 -0
  17. package/core/pagination.mjs +118 -0
  18. package/core/pagination.mjs.map +1 -0
  19. package/index.d.mts +1 -0
  20. package/index.d.mts.map +1 -1
  21. package/index.d.ts +1 -0
  22. package/index.d.ts.map +1 -1
  23. package/index.js +3 -1
  24. package/index.js.map +1 -1
  25. package/index.mjs +1 -0
  26. package/index.mjs.map +1 -1
  27. package/internal/tslib.js +18 -18
  28. package/internal/utils/query.d.mts +5 -0
  29. package/internal/utils/query.d.mts.map +1 -0
  30. package/internal/utils/query.d.ts +5 -0
  31. package/internal/utils/query.d.ts.map +1 -0
  32. package/internal/utils/query.js +23 -0
  33. package/internal/utils/query.js.map +1 -0
  34. package/internal/utils/query.mjs +20 -0
  35. package/internal/utils/query.mjs.map +1 -0
  36. package/internal/utils.d.mts +1 -0
  37. package/internal/utils.d.ts +1 -0
  38. package/internal/utils.js +1 -0
  39. package/internal/utils.js.map +1 -1
  40. package/internal/utils.mjs +1 -0
  41. package/package.json +11 -1
  42. package/pagination.d.mts +2 -0
  43. package/pagination.d.mts.map +1 -0
  44. package/pagination.d.ts +2 -0
  45. package/pagination.d.ts.map +1 -0
  46. package/pagination.js +6 -0
  47. package/pagination.js.map +1 -0
  48. package/pagination.mjs +2 -0
  49. package/pagination.mjs.map +1 -0
  50. package/resources/attachments.d.mts +64 -0
  51. package/resources/attachments.d.mts.map +1 -1
  52. package/resources/attachments.d.ts +64 -0
  53. package/resources/attachments.d.ts.map +1 -1
  54. package/resources/attachments.js +64 -0
  55. package/resources/attachments.js.map +1 -1
  56. package/resources/attachments.mjs +64 -0
  57. package/resources/attachments.mjs.map +1 -1
  58. package/resources/capability.d.mts +12 -9
  59. package/resources/capability.d.mts.map +1 -1
  60. package/resources/capability.d.ts +12 -9
  61. package/resources/capability.d.ts.map +1 -1
  62. package/resources/capability.js +7 -4
  63. package/resources/capability.js.map +1 -1
  64. package/resources/capability.mjs +7 -4
  65. package/resources/capability.mjs.map +1 -1
  66. package/resources/chats/chats.d.mts +76 -97
  67. package/resources/chats/chats.d.mts.map +1 -1
  68. package/resources/chats/chats.d.ts +76 -97
  69. package/resources/chats/chats.d.ts.map +1 -1
  70. package/resources/chats/chats.js +8 -4
  71. package/resources/chats/chats.js.map +1 -1
  72. package/resources/chats/chats.mjs +9 -5
  73. package/resources/chats/chats.mjs.map +1 -1
  74. package/resources/chats/index.d.mts +2 -2
  75. package/resources/chats/index.d.mts.map +1 -1
  76. package/resources/chats/index.d.ts +2 -2
  77. package/resources/chats/index.d.ts.map +1 -1
  78. package/resources/chats/index.js.map +1 -1
  79. package/resources/chats/index.mjs.map +1 -1
  80. package/resources/chats/messages.d.mts +21 -25
  81. package/resources/chats/messages.d.mts.map +1 -1
  82. package/resources/chats/messages.d.ts +21 -25
  83. package/resources/chats/messages.d.ts.map +1 -1
  84. package/resources/chats/messages.js +16 -3
  85. package/resources/chats/messages.js.map +1 -1
  86. package/resources/chats/messages.mjs +16 -3
  87. package/resources/chats/messages.mjs.map +1 -1
  88. package/resources/chats/participants.d.mts +18 -0
  89. package/resources/chats/participants.d.mts.map +1 -1
  90. package/resources/chats/participants.d.ts +18 -0
  91. package/resources/chats/participants.d.ts.map +1 -1
  92. package/resources/chats/participants.js +18 -0
  93. package/resources/chats/participants.js.map +1 -1
  94. package/resources/chats/participants.mjs +18 -0
  95. package/resources/chats/participants.mjs.map +1 -1
  96. package/resources/chats/typing.d.mts +18 -0
  97. package/resources/chats/typing.d.mts.map +1 -1
  98. package/resources/chats/typing.d.ts +18 -0
  99. package/resources/chats/typing.d.ts.map +1 -1
  100. package/resources/chats/typing.js +18 -0
  101. package/resources/chats/typing.js.map +1 -1
  102. package/resources/chats/typing.mjs +18 -0
  103. package/resources/chats/typing.mjs.map +1 -1
  104. package/resources/index.d.mts +4 -3
  105. package/resources/index.d.mts.map +1 -1
  106. package/resources/index.d.ts +4 -3
  107. package/resources/index.d.ts.map +1 -1
  108. package/resources/index.js +3 -1
  109. package/resources/index.js.map +1 -1
  110. package/resources/index.mjs +1 -0
  111. package/resources/index.mjs.map +1 -1
  112. package/resources/messages.d.mts +37 -72
  113. package/resources/messages.d.mts.map +1 -1
  114. package/resources/messages.d.ts +37 -72
  115. package/resources/messages.d.ts.map +1 -1
  116. package/resources/messages.js +34 -4
  117. package/resources/messages.js.map +1 -1
  118. package/resources/messages.mjs +34 -4
  119. package/resources/messages.mjs.map +1 -1
  120. package/resources/phone-numbers.d.mts +9 -0
  121. package/resources/phone-numbers.d.mts.map +1 -1
  122. package/resources/phone-numbers.d.ts +9 -0
  123. package/resources/phone-numbers.d.ts.map +1 -1
  124. package/resources/phone-numbers.js +9 -0
  125. package/resources/phone-numbers.js.map +1 -1
  126. package/resources/phone-numbers.mjs +9 -0
  127. package/resources/phone-numbers.mjs.map +1 -1
  128. package/resources/phonenumbers.d.mts +9 -0
  129. package/resources/phonenumbers.d.mts.map +1 -1
  130. package/resources/phonenumbers.d.ts +9 -0
  131. package/resources/phonenumbers.d.ts.map +1 -1
  132. package/resources/phonenumbers.js +9 -0
  133. package/resources/phonenumbers.js.map +1 -1
  134. package/resources/phonenumbers.mjs +9 -0
  135. package/resources/phonenumbers.mjs.map +1 -1
  136. package/resources/shared.d.mts +51 -0
  137. package/resources/shared.d.mts.map +1 -1
  138. package/resources/shared.d.ts +51 -0
  139. package/resources/shared.d.ts.map +1 -1
  140. package/resources/webhook-events.d.mts +90 -1
  141. package/resources/webhook-events.d.mts.map +1 -1
  142. package/resources/webhook-events.d.ts +90 -1
  143. package/resources/webhook-events.d.ts.map +1 -1
  144. package/resources/webhook-events.js +89 -0
  145. package/resources/webhook-events.js.map +1 -1
  146. package/resources/webhook-events.mjs +89 -0
  147. package/resources/webhook-events.mjs.map +1 -1
  148. package/resources/webhook-subscriptions.d.mts +89 -0
  149. package/resources/webhook-subscriptions.d.mts.map +1 -1
  150. package/resources/webhook-subscriptions.d.ts +89 -0
  151. package/resources/webhook-subscriptions.d.ts.map +1 -1
  152. package/resources/webhook-subscriptions.js +89 -0
  153. package/resources/webhook-subscriptions.js.map +1 -1
  154. package/resources/webhook-subscriptions.mjs +89 -0
  155. package/resources/webhook-subscriptions.mjs.map +1 -1
  156. package/resources/webhooks.d.mts +2506 -0
  157. package/resources/webhooks.d.mts.map +1 -0
  158. package/resources/webhooks.d.ts +2506 -0
  159. package/resources/webhooks.d.ts.map +1 -0
  160. package/resources/webhooks.js +12 -0
  161. package/resources/webhooks.js.map +1 -0
  162. package/resources/webhooks.mjs +8 -0
  163. package/resources/webhooks.mjs.map +1 -0
  164. package/src/client.ts +443 -37
  165. package/src/core/pagination.ts +212 -0
  166. package/src/index.ts +1 -0
  167. package/src/internal/utils/query.ts +23 -0
  168. package/src/internal/utils.ts +1 -0
  169. package/src/pagination.ts +2 -0
  170. package/src/resources/attachments.ts +64 -0
  171. package/src/resources/capability.ts +17 -14
  172. package/src/resources/chats/chats.ts +86 -115
  173. package/src/resources/chats/index.ts +4 -3
  174. package/src/resources/chats/messages.ts +30 -30
  175. package/src/resources/chats/participants.ts +18 -0
  176. package/src/resources/chats/typing.ts +18 -0
  177. package/src/resources/index.ts +55 -10
  178. package/src/resources/messages.ts +49 -90
  179. package/src/resources/phone-numbers.ts +9 -0
  180. package/src/resources/phonenumbers.ts +9 -0
  181. package/src/resources/shared.ts +62 -0
  182. package/src/resources/webhook-events.ts +90 -0
  183. package/src/resources/webhook-subscriptions.ts +89 -0
  184. package/src/resources/webhooks.ts +3089 -0
  185. package/src/version.ts +1 -1
  186. package/version.d.mts +1 -1
  187. package/version.d.ts +1 -1
  188. package/version.js +1 -1
  189. package/version.mjs +1 -1
@@ -1,5 +1,5 @@
1
- export { Chats, type Chat, type MessageContent, type ChatCreateResponse, type ChatListResponse, type ChatSendVoicememoResponse, type ChatCreateParams, type ChatUpdateParams, type ChatListParams, type ChatSendVoicememoParams, } from "./chats.mjs";
2
- export { Messages, type SentMessage, type MessageListResponse, type MessageSendResponse, type MessageListParams, type MessageSendParams, } from "./messages.mjs";
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,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,yBAAyB,EAC9B,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,KAAK,uBAAuB,GAC7B;OACM,EACL,QAAQ,EACR,KAAK,WAAW,EAChB,KAAK,mBAAmB,EACxB,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
+ {"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 ChatCreateResponse, type ChatListResponse, type ChatSendVoicememoResponse, type ChatCreateParams, type ChatUpdateParams, type ChatListParams, type ChatSendVoicememoParams, } from "./chats.js";
2
- export { Messages, type SentMessage, type MessageListResponse, type MessageSendResponse, type MessageListParams, type MessageSendParams, } from "./messages.js";
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,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,yBAAyB,EAC9B,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,KAAK,uBAAuB,GAC7B;OACM,EACL,QAAQ,EACR,KAAK,WAAW,EAChB,KAAK,mBAAmB,EACxB,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
+ {"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,oCAWiB;AAVf,8FAAA,KAAK,OAAA;AAWP,0CAOoB;AANlB,oGAAA,QAAQ,OAAA;AAOV,kDAMwB;AALtB,4GAAA,YAAY,OAAA;AAMd,sCAAkC;AAAzB,gGAAA,MAAM,OAAA"}
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,GAUN;OACM,EACL,QAAQ,GAMT;OACM,EACL,YAAY,GAKb;OACM,EAAE,MAAM,EAAE"}
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
- * const messages = await client.chats.messages.list(
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): APIPromise<MessageListResponse>;
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<MessagesAPI.TextPart | MessagesAPI.MediaPart>;
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 MessageListResponse as MessageListResponse, type MessageSendResponse as MessageSendResponse, type MessageListParams as MessageListParams, type MessageSendParams as MessageSendParams, };
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;;;;;;;;;OASG;IACH,IAAI,CACF,MAAM,EAAE,MAAM,EACd,KAAK,GAAE,iBAAiB,GAAG,IAAI,GAAG,SAAc,EAChD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,mBAAmB,CAAC;IAIlC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,WAAW,CAAC,QAAQ,GAAG,WAAW,CAAC,SAAS,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AAW,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
- * const messages = await client.chats.messages.list(
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): APIPromise<MessageListResponse>;
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<MessagesAPI.TextPart | MessagesAPI.MediaPart>;
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 MessageListResponse as MessageListResponse, type MessageSendResponse as MessageSendResponse, type MessageListParams as MessageListParams, type MessageSendParams as MessageSendParams, };
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;;;;;;;;;OASG;IACH,IAAI,CACF,MAAM,EAAE,MAAM,EACd,KAAK,GAAE,iBAAiB,GAAG,IAAI,GAAG,SAAc,EAChD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,mBAAmB,CAAC;IAIlC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,WAAW,CAAC,QAA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,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
- * const messages = await client.chats.messages.list(
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.get((0, path_1.path) `/v3/chats/${chatID}/messages`, { query, ...options });
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;;;;;;;;;OASG;IACH,IAAI,CACF,MAAc,EACd,QAA8C,EAAE,EAChD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,aAAa,MAAM,WAAW,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrF,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;AApDD,4BAoDC"}
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
- * const messages = await client.chats.messages.list(
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.get(path `/v3/chats/${chatID}/messages`, { query, ...options });
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;;;;;;;;;OASG;IACH,IAAI,CACF,MAAc,EACd,QAA8C,EAAE,EAChD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,aAAa,MAAM,WAAW,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrF,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
+ {"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"}
@@ -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 CapabilityCheckImessageResponse, type CapabilityCheckRcsResponse, type CapabilityCheckImessageParams, type CapabilityCheckRcsParams, } from "./capability.mjs";
4
- export { Chats, type Chat, type MessageContent, type ChatCreateResponse, type ChatListResponse, type ChatSendVoicememoResponse, type ChatCreateParams, type ChatUpdateParams, type ChatListParams, type ChatSendVoicememoParams, } from "./chats/chats.mjs";
5
- export { Messages, type ChatHandle, type MediaPart, type Message, type MessageEffect, type Reaction, type ReactionType, type ReplyTo, type TextPart, type MessageAddReactionResponse, type MessageRetrieveThreadResponse, type MessageDeleteParams, type MessageAddReactionParams, type MessageRetrieveThreadParams, } from "./messages.mjs";
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