@linqapp/sdk 0.32.1 → 0.33.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 +19 -0
- package/README.md +82 -112
- package/client.d.mts +41 -5
- package/client.d.mts.map +1 -1
- package/client.d.ts +41 -5
- package/client.d.ts.map +1 -1
- package/client.js +38 -2
- package/client.js.map +1 -1
- package/client.mjs +38 -2
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/available-number.d.mts +13 -1
- package/resources/available-number.d.mts.map +1 -1
- package/resources/available-number.d.ts +13 -1
- package/resources/available-number.d.ts.map +1 -1
- package/resources/available-number.js +2 -1
- package/resources/available-number.js.map +1 -1
- package/resources/available-number.mjs +2 -1
- package/resources/available-number.mjs.map +1 -1
- package/resources/chats/chats.d.mts +125 -64
- package/resources/chats/chats.d.mts.map +1 -1
- package/resources/chats/chats.d.ts +125 -64
- package/resources/chats/chats.d.ts.map +1 -1
- package/resources/chats/chats.js +59 -59
- package/resources/chats/chats.js.map +1 -1
- package/resources/chats/chats.mjs +59 -59
- 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/location.d.mts +25 -25
- package/resources/chats/location.d.mts.map +1 -1
- package/resources/chats/location.d.ts +25 -25
- package/resources/chats/location.d.ts.map +1 -1
- package/resources/chats/location.js +27 -27
- package/resources/chats/location.js.map +1 -1
- package/resources/chats/location.mjs +27 -27
- package/resources/chats/location.mjs.map +1 -1
- package/resources/chats/messages.d.mts +17 -17
- package/resources/chats/messages.d.mts.map +1 -1
- package/resources/chats/messages.d.ts +17 -17
- package/resources/chats/messages.d.ts.map +1 -1
- package/resources/chats/messages.js +16 -16
- package/resources/chats/messages.js.map +1 -1
- package/resources/chats/messages.mjs +16 -16
- package/resources/chats/messages.mjs.map +1 -1
- package/resources/contact-card.d.mts +29 -28
- package/resources/contact-card.d.mts.map +1 -1
- package/resources/contact-card.d.ts +29 -28
- package/resources/contact-card.d.ts.map +1 -1
- package/resources/contact-card.js +23 -22
- package/resources/contact-card.js.map +1 -1
- package/resources/contact-card.mjs +23 -22
- package/resources/contact-card.mjs.map +1 -1
- package/resources/experiences.d.mts +91 -0
- package/resources/experiences.d.mts.map +1 -0
- package/resources/experiences.d.ts +91 -0
- package/resources/experiences.d.ts.map +1 -0
- package/resources/experiences.js +29 -0
- package/resources/experiences.js.map +1 -0
- package/resources/experiences.mjs +25 -0
- package/resources/experiences.mjs.map +1 -0
- package/resources/index.d.mts +7 -3
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +7 -3
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +9 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +4 -0
- package/resources/index.mjs.map +1 -1
- package/resources/messages.d.mts +71 -35
- package/resources/messages.d.mts.map +1 -1
- package/resources/messages.d.ts +71 -35
- package/resources/messages.d.ts.map +1 -1
- package/resources/messages.js +41 -30
- package/resources/messages.js.map +1 -1
- package/resources/messages.mjs +41 -30
- package/resources/messages.mjs.map +1 -1
- package/resources/payment-handles.d.mts +87 -0
- package/resources/payment-handles.d.mts.map +1 -0
- package/resources/payment-handles.d.ts +87 -0
- package/resources/payment-handles.d.ts.map +1 -0
- package/resources/payment-handles.js +76 -0
- package/resources/payment-handles.js.map +1 -0
- package/resources/payment-handles.mjs +72 -0
- package/resources/payment-handles.mjs.map +1 -0
- package/resources/payment-providers.d.mts +58 -0
- package/resources/payment-providers.d.mts.map +1 -0
- package/resources/payment-providers.d.ts +58 -0
- package/resources/payment-providers.d.ts.map +1 -0
- package/resources/payment-providers.js +45 -0
- package/resources/payment-providers.js.map +1 -0
- package/resources/payment-providers.mjs +41 -0
- package/resources/payment-providers.mjs.map +1 -0
- package/resources/payment-requests.d.mts +2 -2
- package/resources/payment-requests.d.ts +2 -2
- package/resources/payment-requests.js +2 -2
- package/resources/payment-requests.mjs +2 -2
- package/resources/payments.d.mts +116 -0
- package/resources/payments.d.mts.map +1 -0
- package/resources/payments.d.ts +116 -0
- package/resources/payments.d.ts.map +1 -0
- package/resources/payments.js +70 -0
- package/resources/payments.js.map +1 -0
- package/resources/payments.mjs +66 -0
- package/resources/payments.mjs.map +1 -0
- package/resources/phone-numbers.d.mts +11 -11
- package/resources/phone-numbers.d.mts.map +1 -1
- package/resources/phone-numbers.d.ts +11 -11
- package/resources/phone-numbers.d.ts.map +1 -1
- package/resources/phone-numbers.js +13 -13
- package/resources/phone-numbers.js.map +1 -1
- package/resources/phone-numbers.mjs +13 -13
- package/resources/phone-numbers.mjs.map +1 -1
- package/resources/webhook-subscriptions.d.mts +11 -11
- package/resources/webhook-subscriptions.d.mts.map +1 -1
- package/resources/webhook-subscriptions.d.ts +11 -11
- package/resources/webhook-subscriptions.d.ts.map +1 -1
- package/resources/webhook-subscriptions.js +13 -13
- package/resources/webhook-subscriptions.js.map +1 -1
- package/resources/webhook-subscriptions.mjs +13 -13
- package/resources/webhook-subscriptions.mjs.map +1 -1
- package/resources/webhooks.d.mts +59 -0
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +59 -0
- package/resources/webhooks.d.ts.map +1 -1
- package/src/client.ts +77 -6
- package/src/resources/available-number.ts +14 -1
- package/src/resources/chats/chats.ts +142 -79
- package/src/resources/chats/index.ts +2 -2
- package/src/resources/chats/location.ts +28 -28
- package/src/resources/chats/messages.ts +28 -28
- package/src/resources/contact-card.ts +36 -35
- package/src/resources/experiences.ts +118 -0
- package/src/resources/index.ts +22 -4
- package/src/resources/messages.ts +85 -47
- package/src/resources/payment-handles.ts +114 -0
- package/src/resources/payment-providers.ts +81 -0
- package/src/resources/payment-requests.ts +2 -2
- package/src/resources/payments.ts +163 -0
- package/src/resources/phone-numbers.ts +14 -14
- package/src/resources/webhook-subscriptions.ts +14 -14
- package/src/resources/webhooks.ts +61 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
package/resources/messages.d.mts
CHANGED
|
@@ -95,6 +95,15 @@ export declare class Messages extends APIResource {
|
|
|
95
95
|
* Recipients (`to`) are an order-independent set: a single handle is a direct
|
|
96
96
|
* chat, multiple handles a group chat.
|
|
97
97
|
*
|
|
98
|
+
* ## Excluding lines
|
|
99
|
+
*
|
|
100
|
+
* `exclude_from` keeps specific lines out of **this** send's line pick. It only
|
|
101
|
+
* affects picking a line for a new chat — an existing chat is always reused on its
|
|
102
|
+
* own line, preferring a chat on a non-excluded line when the recipients have more
|
|
103
|
+
* than one. An exclusion never abandons a live chat or moves it to a new number,
|
|
104
|
+
* so if the only chat these recipients have is on an excluded line, that chat is
|
|
105
|
+
* still used. `from` tells you the line that was actually used.
|
|
106
|
+
*
|
|
98
107
|
* ## Differences from POST /v3/chats
|
|
99
108
|
*
|
|
100
109
|
* - The first message **may contain a link** (including for a newly created chat).
|
|
@@ -128,39 +137,37 @@ export declare class Messages extends APIResource {
|
|
|
128
137
|
*/
|
|
129
138
|
create(params: MessageCreateParams, options?: RequestOptions): APIPromise<MessageCreateResponse>;
|
|
130
139
|
/**
|
|
131
|
-
* Retrieve
|
|
132
|
-
*
|
|
133
|
-
*
|
|
134
|
-
* If the message is not part of a thread, returns just that single message.
|
|
135
|
-
*
|
|
136
|
-
* Supports pagination and configurable ordering.
|
|
140
|
+
* Retrieve a specific message by its ID. This endpoint returns the full message
|
|
141
|
+
* details including text, attachments, reactions, and metadata.
|
|
137
142
|
*
|
|
138
143
|
* @example
|
|
139
144
|
* ```ts
|
|
140
|
-
*
|
|
141
|
-
* for await (const message of client.messages.listMessagesThread(
|
|
145
|
+
* const message = await client.messages.retrieve(
|
|
142
146
|
* '69a37c7d-af4f-4b5e-af42-e28e98ce873a',
|
|
143
|
-
* )
|
|
144
|
-
* // ...
|
|
145
|
-
* }
|
|
147
|
+
* );
|
|
146
148
|
* ```
|
|
147
149
|
*/
|
|
148
|
-
|
|
150
|
+
retrieve(messageID: string, options?: RequestOptions): APIPromise<Message>;
|
|
149
151
|
/**
|
|
150
|
-
*
|
|
151
|
-
*
|
|
152
|
+
* Edit the text content of a specific part of a previously sent message.
|
|
153
|
+
*
|
|
154
|
+
* **Note:** A message can be edited up to 5 times, and only within 15 minutes of
|
|
155
|
+
* when it was originally sent.
|
|
152
156
|
*
|
|
153
157
|
* @example
|
|
154
158
|
* ```ts
|
|
155
|
-
* const message = await client.messages.
|
|
159
|
+
* const message = await client.messages.update(
|
|
156
160
|
* '69a37c7d-af4f-4b5e-af42-e28e98ce873a',
|
|
161
|
+
* { text: 'This is the edited message content' },
|
|
157
162
|
* );
|
|
158
163
|
* ```
|
|
159
164
|
*/
|
|
160
|
-
|
|
165
|
+
update(messageID: string, body: MessageUpdateParams, options?: RequestOptions): APIPromise<Message>;
|
|
161
166
|
/**
|
|
162
167
|
* Deletes a message from the Linq API only. This does NOT unsend or remove the
|
|
163
|
-
* message from the actual chat — recipients will still see the message.
|
|
168
|
+
* message from the actual chat — recipients will still see the message. Re-sending
|
|
169
|
+
* with a deleted message's idempotency key returns 404 — a deleted message is
|
|
170
|
+
* never resent.
|
|
164
171
|
*
|
|
165
172
|
* @example
|
|
166
173
|
* ```ts
|
|
@@ -194,20 +201,24 @@ export declare class Messages extends APIResource {
|
|
|
194
201
|
*/
|
|
195
202
|
addReaction(messageID: string, body: MessageAddReactionParams, options?: RequestOptions): APIPromise<MessageAddReactionResponse>;
|
|
196
203
|
/**
|
|
197
|
-
*
|
|
204
|
+
* Retrieve all messages in a conversation thread. Given any message ID in the
|
|
205
|
+
* thread, returns the originator message and all replies in chronological order.
|
|
198
206
|
*
|
|
199
|
-
*
|
|
200
|
-
*
|
|
207
|
+
* If the message is not part of a thread, returns just that single message.
|
|
208
|
+
*
|
|
209
|
+
* Supports pagination and configurable ordering.
|
|
201
210
|
*
|
|
202
211
|
* @example
|
|
203
212
|
* ```ts
|
|
204
|
-
*
|
|
213
|
+
* // Automatically fetches more pages as needed.
|
|
214
|
+
* for await (const message of client.messages.listMessagesThread(
|
|
205
215
|
* '69a37c7d-af4f-4b5e-af42-e28e98ce873a',
|
|
206
|
-
*
|
|
207
|
-
*
|
|
216
|
+
* )) {
|
|
217
|
+
* // ...
|
|
218
|
+
* }
|
|
208
219
|
* ```
|
|
209
220
|
*/
|
|
210
|
-
|
|
221
|
+
listMessagesThread(messageID: string, query?: MessageListMessagesThreadParams | null | undefined, options?: RequestOptions): PagePromise<MessagesListMessagesPagination, Message>;
|
|
211
222
|
/**
|
|
212
223
|
* Replaces a previously delivered `imessage_app` card on the recipient's screen
|
|
213
224
|
* with new content, instead of posting a new bubble (like a game move redrawing
|
|
@@ -312,6 +323,15 @@ export interface Message {
|
|
|
312
323
|
* When the message was read
|
|
313
324
|
*/
|
|
314
325
|
read_at?: string | null;
|
|
326
|
+
/**
|
|
327
|
+
* Present only when this message was recovered by reconciliation rather than
|
|
328
|
+
* delivered live, and set to the time of that recovery. The field is omitted
|
|
329
|
+
* entirely for normally-delivered messages, which is the overwhelming majority.
|
|
330
|
+
* When present, expect `sent_at` to be substantially earlier — the message is
|
|
331
|
+
* genuine but was ingested late, so it may not have appeared in earlier reads of
|
|
332
|
+
* this conversation.
|
|
333
|
+
*/
|
|
334
|
+
reconciled_at?: string;
|
|
315
335
|
/**
|
|
316
336
|
* Indicates this message is a threaded reply to another message
|
|
317
337
|
*/
|
|
@@ -586,6 +606,22 @@ export interface MessageCreateParams {
|
|
|
586
606
|
* sent.
|
|
587
607
|
*/
|
|
588
608
|
continuation_message?: MessageCreateParams.ContinuationMessage;
|
|
609
|
+
/**
|
|
610
|
+
* Body param: Lines (E.164) not to pick for this send. Applies for this request
|
|
611
|
+
* only — nothing is remembered between calls.
|
|
612
|
+
*
|
|
613
|
+
* **Exclusion only affects picking a line for a new chat.** If `to` already has a
|
|
614
|
+
* chat, that chat is reused on its own line, and a chat on a non-excluded line is
|
|
615
|
+
* preferred when there is more than one. If the only chat these recipients have is
|
|
616
|
+
* on an excluded line, it is still reused — an exclusion never abandons a live
|
|
617
|
+
* chat or moves it to a new number. Check `from` in the response to see the line
|
|
618
|
+
* that was actually used.
|
|
619
|
+
*
|
|
620
|
+
* Numbers that are not your lines are ignored. Every entry must be E.164 — a value
|
|
621
|
+
* like `4155551234` is rejected rather than silently skipped. Excluding every one
|
|
622
|
+
* of your available lines returns 400 when a line has to be picked.
|
|
623
|
+
*/
|
|
624
|
+
exclude_from?: Array<string>;
|
|
589
625
|
/**
|
|
590
626
|
* Header param: Optional idempotency key for the send. Reuse the same key to
|
|
591
627
|
* safely retry without sending twice. May also be supplied as
|
|
@@ -610,11 +646,15 @@ export declare namespace MessageCreateParams {
|
|
|
610
646
|
text: string;
|
|
611
647
|
}
|
|
612
648
|
}
|
|
613
|
-
export interface
|
|
649
|
+
export interface MessageUpdateParams {
|
|
614
650
|
/**
|
|
615
|
-
*
|
|
651
|
+
* New text content for the message part
|
|
616
652
|
*/
|
|
617
|
-
|
|
653
|
+
text: string;
|
|
654
|
+
/**
|
|
655
|
+
* Index of the message part to edit. Defaults to 0.
|
|
656
|
+
*/
|
|
657
|
+
part_index?: number;
|
|
618
658
|
}
|
|
619
659
|
export interface MessageAddReactionParams {
|
|
620
660
|
/**
|
|
@@ -638,15 +678,11 @@ export interface MessageAddReactionParams {
|
|
|
638
678
|
*/
|
|
639
679
|
part_index?: number;
|
|
640
680
|
}
|
|
641
|
-
export interface
|
|
642
|
-
/**
|
|
643
|
-
* New text content for the message part
|
|
644
|
-
*/
|
|
645
|
-
text: string;
|
|
681
|
+
export interface MessageListMessagesThreadParams extends ListMessagesPaginationParams {
|
|
646
682
|
/**
|
|
647
|
-
*
|
|
683
|
+
* Sort order for messages (asc = oldest first, desc = newest first)
|
|
648
684
|
*/
|
|
649
|
-
|
|
685
|
+
order?: 'asc' | 'desc';
|
|
650
686
|
}
|
|
651
687
|
export interface MessageUpdateAppCardParams {
|
|
652
688
|
/**
|
|
@@ -743,6 +779,6 @@ export declare namespace MessageUpdateAppCardParams {
|
|
|
743
779
|
}
|
|
744
780
|
}
|
|
745
781
|
export declare namespace Messages {
|
|
746
|
-
export { type Message as Message, type MessageEffect as MessageEffect, type ReplyTo as ReplyTo, type MessageCreateResponse as MessageCreateResponse, type MessageAddReactionResponse as MessageAddReactionResponse, type MessageUpdateAppCardResponse as MessageUpdateAppCardResponse, type MessagesListMessagesPagination as MessagesListMessagesPagination, type MessageCreateParams as MessageCreateParams, type
|
|
782
|
+
export { type Message as Message, type MessageEffect as MessageEffect, type ReplyTo as ReplyTo, type MessageCreateResponse as MessageCreateResponse, type MessageAddReactionResponse as MessageAddReactionResponse, type MessageUpdateAppCardResponse as MessageUpdateAppCardResponse, type MessagesListMessagesPagination as MessagesListMessagesPagination, type MessageCreateParams as MessageCreateParams, type MessageUpdateParams as MessageUpdateParams, type MessageAddReactionParams as MessageAddReactionParams, type MessageListMessagesThreadParams as MessageListMessagesThreadParams, type MessageUpdateAppCardParams as MessageUpdateAppCardParams, };
|
|
747
783
|
}
|
|
748
784
|
//# sourceMappingURL=messages.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages.d.mts","sourceRoot":"","sources":["../src/resources/messages.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAC/C,OAAO,KAAK,MAAM,qBAAiB;AACnC,OAAO,KAAK,QAAQ,0BAAsB;AAC1C,OAAO,KAAK,gBAAgB,6BAAyB;AACrD,OAAO,EAAE,UAAU,EAAE,gCAA4B;AACjD,OAAO,EAAE,sBAAsB,EAAE,KAAK,4BAA4B,EAAE,WAAW,EAAE,+BAA2B;AAE5G,OAAO,EAAE,cAAc,EAAE,wCAAoC;AAG7D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2DG;AACH,qBAAa,QAAS,SAAQ,WAAW;IACvC
|
|
1
|
+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AK,+BAA+B,IAAI,+BAA+B,EACvE,KAAK,0BAA0B,IAAI,0BAA0B,GAC9D,CAAC;CACH"}
|
package/resources/messages.d.ts
CHANGED
|
@@ -95,6 +95,15 @@ export declare class Messages extends APIResource {
|
|
|
95
95
|
* Recipients (`to`) are an order-independent set: a single handle is a direct
|
|
96
96
|
* chat, multiple handles a group chat.
|
|
97
97
|
*
|
|
98
|
+
* ## Excluding lines
|
|
99
|
+
*
|
|
100
|
+
* `exclude_from` keeps specific lines out of **this** send's line pick. It only
|
|
101
|
+
* affects picking a line for a new chat — an existing chat is always reused on its
|
|
102
|
+
* own line, preferring a chat on a non-excluded line when the recipients have more
|
|
103
|
+
* than one. An exclusion never abandons a live chat or moves it to a new number,
|
|
104
|
+
* so if the only chat these recipients have is on an excluded line, that chat is
|
|
105
|
+
* still used. `from` tells you the line that was actually used.
|
|
106
|
+
*
|
|
98
107
|
* ## Differences from POST /v3/chats
|
|
99
108
|
*
|
|
100
109
|
* - The first message **may contain a link** (including for a newly created chat).
|
|
@@ -128,39 +137,37 @@ export declare class Messages extends APIResource {
|
|
|
128
137
|
*/
|
|
129
138
|
create(params: MessageCreateParams, options?: RequestOptions): APIPromise<MessageCreateResponse>;
|
|
130
139
|
/**
|
|
131
|
-
* Retrieve
|
|
132
|
-
*
|
|
133
|
-
*
|
|
134
|
-
* If the message is not part of a thread, returns just that single message.
|
|
135
|
-
*
|
|
136
|
-
* Supports pagination and configurable ordering.
|
|
140
|
+
* Retrieve a specific message by its ID. This endpoint returns the full message
|
|
141
|
+
* details including text, attachments, reactions, and metadata.
|
|
137
142
|
*
|
|
138
143
|
* @example
|
|
139
144
|
* ```ts
|
|
140
|
-
*
|
|
141
|
-
* for await (const message of client.messages.listMessagesThread(
|
|
145
|
+
* const message = await client.messages.retrieve(
|
|
142
146
|
* '69a37c7d-af4f-4b5e-af42-e28e98ce873a',
|
|
143
|
-
* )
|
|
144
|
-
* // ...
|
|
145
|
-
* }
|
|
147
|
+
* );
|
|
146
148
|
* ```
|
|
147
149
|
*/
|
|
148
|
-
|
|
150
|
+
retrieve(messageID: string, options?: RequestOptions): APIPromise<Message>;
|
|
149
151
|
/**
|
|
150
|
-
*
|
|
151
|
-
*
|
|
152
|
+
* Edit the text content of a specific part of a previously sent message.
|
|
153
|
+
*
|
|
154
|
+
* **Note:** A message can be edited up to 5 times, and only within 15 minutes of
|
|
155
|
+
* when it was originally sent.
|
|
152
156
|
*
|
|
153
157
|
* @example
|
|
154
158
|
* ```ts
|
|
155
|
-
* const message = await client.messages.
|
|
159
|
+
* const message = await client.messages.update(
|
|
156
160
|
* '69a37c7d-af4f-4b5e-af42-e28e98ce873a',
|
|
161
|
+
* { text: 'This is the edited message content' },
|
|
157
162
|
* );
|
|
158
163
|
* ```
|
|
159
164
|
*/
|
|
160
|
-
|
|
165
|
+
update(messageID: string, body: MessageUpdateParams, options?: RequestOptions): APIPromise<Message>;
|
|
161
166
|
/**
|
|
162
167
|
* Deletes a message from the Linq API only. This does NOT unsend or remove the
|
|
163
|
-
* message from the actual chat — recipients will still see the message.
|
|
168
|
+
* message from the actual chat — recipients will still see the message. Re-sending
|
|
169
|
+
* with a deleted message's idempotency key returns 404 — a deleted message is
|
|
170
|
+
* never resent.
|
|
164
171
|
*
|
|
165
172
|
* @example
|
|
166
173
|
* ```ts
|
|
@@ -194,20 +201,24 @@ export declare class Messages extends APIResource {
|
|
|
194
201
|
*/
|
|
195
202
|
addReaction(messageID: string, body: MessageAddReactionParams, options?: RequestOptions): APIPromise<MessageAddReactionResponse>;
|
|
196
203
|
/**
|
|
197
|
-
*
|
|
204
|
+
* Retrieve all messages in a conversation thread. Given any message ID in the
|
|
205
|
+
* thread, returns the originator message and all replies in chronological order.
|
|
198
206
|
*
|
|
199
|
-
*
|
|
200
|
-
*
|
|
207
|
+
* If the message is not part of a thread, returns just that single message.
|
|
208
|
+
*
|
|
209
|
+
* Supports pagination and configurable ordering.
|
|
201
210
|
*
|
|
202
211
|
* @example
|
|
203
212
|
* ```ts
|
|
204
|
-
*
|
|
213
|
+
* // Automatically fetches more pages as needed.
|
|
214
|
+
* for await (const message of client.messages.listMessagesThread(
|
|
205
215
|
* '69a37c7d-af4f-4b5e-af42-e28e98ce873a',
|
|
206
|
-
*
|
|
207
|
-
*
|
|
216
|
+
* )) {
|
|
217
|
+
* // ...
|
|
218
|
+
* }
|
|
208
219
|
* ```
|
|
209
220
|
*/
|
|
210
|
-
|
|
221
|
+
listMessagesThread(messageID: string, query?: MessageListMessagesThreadParams | null | undefined, options?: RequestOptions): PagePromise<MessagesListMessagesPagination, Message>;
|
|
211
222
|
/**
|
|
212
223
|
* Replaces a previously delivered `imessage_app` card on the recipient's screen
|
|
213
224
|
* with new content, instead of posting a new bubble (like a game move redrawing
|
|
@@ -312,6 +323,15 @@ export interface Message {
|
|
|
312
323
|
* When the message was read
|
|
313
324
|
*/
|
|
314
325
|
read_at?: string | null;
|
|
326
|
+
/**
|
|
327
|
+
* Present only when this message was recovered by reconciliation rather than
|
|
328
|
+
* delivered live, and set to the time of that recovery. The field is omitted
|
|
329
|
+
* entirely for normally-delivered messages, which is the overwhelming majority.
|
|
330
|
+
* When present, expect `sent_at` to be substantially earlier — the message is
|
|
331
|
+
* genuine but was ingested late, so it may not have appeared in earlier reads of
|
|
332
|
+
* this conversation.
|
|
333
|
+
*/
|
|
334
|
+
reconciled_at?: string;
|
|
315
335
|
/**
|
|
316
336
|
* Indicates this message is a threaded reply to another message
|
|
317
337
|
*/
|
|
@@ -586,6 +606,22 @@ export interface MessageCreateParams {
|
|
|
586
606
|
* sent.
|
|
587
607
|
*/
|
|
588
608
|
continuation_message?: MessageCreateParams.ContinuationMessage;
|
|
609
|
+
/**
|
|
610
|
+
* Body param: Lines (E.164) not to pick for this send. Applies for this request
|
|
611
|
+
* only — nothing is remembered between calls.
|
|
612
|
+
*
|
|
613
|
+
* **Exclusion only affects picking a line for a new chat.** If `to` already has a
|
|
614
|
+
* chat, that chat is reused on its own line, and a chat on a non-excluded line is
|
|
615
|
+
* preferred when there is more than one. If the only chat these recipients have is
|
|
616
|
+
* on an excluded line, it is still reused — an exclusion never abandons a live
|
|
617
|
+
* chat or moves it to a new number. Check `from` in the response to see the line
|
|
618
|
+
* that was actually used.
|
|
619
|
+
*
|
|
620
|
+
* Numbers that are not your lines are ignored. Every entry must be E.164 — a value
|
|
621
|
+
* like `4155551234` is rejected rather than silently skipped. Excluding every one
|
|
622
|
+
* of your available lines returns 400 when a line has to be picked.
|
|
623
|
+
*/
|
|
624
|
+
exclude_from?: Array<string>;
|
|
589
625
|
/**
|
|
590
626
|
* Header param: Optional idempotency key for the send. Reuse the same key to
|
|
591
627
|
* safely retry without sending twice. May also be supplied as
|
|
@@ -610,11 +646,15 @@ export declare namespace MessageCreateParams {
|
|
|
610
646
|
text: string;
|
|
611
647
|
}
|
|
612
648
|
}
|
|
613
|
-
export interface
|
|
649
|
+
export interface MessageUpdateParams {
|
|
614
650
|
/**
|
|
615
|
-
*
|
|
651
|
+
* New text content for the message part
|
|
616
652
|
*/
|
|
617
|
-
|
|
653
|
+
text: string;
|
|
654
|
+
/**
|
|
655
|
+
* Index of the message part to edit. Defaults to 0.
|
|
656
|
+
*/
|
|
657
|
+
part_index?: number;
|
|
618
658
|
}
|
|
619
659
|
export interface MessageAddReactionParams {
|
|
620
660
|
/**
|
|
@@ -638,15 +678,11 @@ export interface MessageAddReactionParams {
|
|
|
638
678
|
*/
|
|
639
679
|
part_index?: number;
|
|
640
680
|
}
|
|
641
|
-
export interface
|
|
642
|
-
/**
|
|
643
|
-
* New text content for the message part
|
|
644
|
-
*/
|
|
645
|
-
text: string;
|
|
681
|
+
export interface MessageListMessagesThreadParams extends ListMessagesPaginationParams {
|
|
646
682
|
/**
|
|
647
|
-
*
|
|
683
|
+
* Sort order for messages (asc = oldest first, desc = newest first)
|
|
648
684
|
*/
|
|
649
|
-
|
|
685
|
+
order?: 'asc' | 'desc';
|
|
650
686
|
}
|
|
651
687
|
export interface MessageUpdateAppCardParams {
|
|
652
688
|
/**
|
|
@@ -743,6 +779,6 @@ export declare namespace MessageUpdateAppCardParams {
|
|
|
743
779
|
}
|
|
744
780
|
}
|
|
745
781
|
export declare namespace Messages {
|
|
746
|
-
export { type Message as Message, type MessageEffect as MessageEffect, type ReplyTo as ReplyTo, type MessageCreateResponse as MessageCreateResponse, type MessageAddReactionResponse as MessageAddReactionResponse, type MessageUpdateAppCardResponse as MessageUpdateAppCardResponse, type MessagesListMessagesPagination as MessagesListMessagesPagination, type MessageCreateParams as MessageCreateParams, type
|
|
782
|
+
export { type Message as Message, type MessageEffect as MessageEffect, type ReplyTo as ReplyTo, type MessageCreateResponse as MessageCreateResponse, type MessageAddReactionResponse as MessageAddReactionResponse, type MessageUpdateAppCardResponse as MessageUpdateAppCardResponse, type MessagesListMessagesPagination as MessagesListMessagesPagination, type MessageCreateParams as MessageCreateParams, type MessageUpdateParams as MessageUpdateParams, type MessageAddReactionParams as MessageAddReactionParams, type MessageListMessagesThreadParams as MessageListMessagesThreadParams, type MessageUpdateAppCardParams as MessageUpdateAppCardParams, };
|
|
747
783
|
}
|
|
748
784
|
//# sourceMappingURL=messages.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../src/resources/messages.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,4BAAyB;AAC/C,OAAO,KAAK,MAAM,oBAAiB;AACnC,OAAO,KAAK,QAAQ,yBAAsB;AAC1C,OAAO,KAAK,gBAAgB,4BAAyB;AACrD,OAAO,EAAE,UAAU,EAAE,+BAA4B;AACjD,OAAO,EAAE,sBAAsB,EAAE,KAAK,4BAA4B,EAAE,WAAW,EAAE,8BAA2B;AAE5G,OAAO,EAAE,cAAc,EAAE,uCAAoC;AAG7D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2DG;AACH,qBAAa,QAAS,SAAQ,WAAW;IACvC
|
|
1
|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KAAK,+BAA+B,IAAI,+BAA+B,EACvE,KAAK,0BAA0B,IAAI,0BAA0B,GAC9D,CAAC;CACH"}
|
package/resources/messages.js
CHANGED
|
@@ -96,6 +96,15 @@ class Messages extends resource_1.APIResource {
|
|
|
96
96
|
* Recipients (`to`) are an order-independent set: a single handle is a direct
|
|
97
97
|
* chat, multiple handles a group chat.
|
|
98
98
|
*
|
|
99
|
+
* ## Excluding lines
|
|
100
|
+
*
|
|
101
|
+
* `exclude_from` keeps specific lines out of **this** send's line pick. It only
|
|
102
|
+
* affects picking a line for a new chat — an existing chat is always reused on its
|
|
103
|
+
* own line, preferring a chat on a non-excluded line when the recipients have more
|
|
104
|
+
* than one. An exclusion never abandons a live chat or moves it to a new number,
|
|
105
|
+
* so if the only chat these recipients have is on an excluded line, that chat is
|
|
106
|
+
* still used. `from` tells you the line that was actually used.
|
|
107
|
+
*
|
|
99
108
|
* ## Differences from POST /v3/chats
|
|
100
109
|
*
|
|
101
110
|
* - The first message **may contain a link** (including for a newly created chat).
|
|
@@ -139,46 +148,41 @@ class Messages extends resource_1.APIResource {
|
|
|
139
148
|
});
|
|
140
149
|
}
|
|
141
150
|
/**
|
|
142
|
-
* Retrieve
|
|
143
|
-
*
|
|
144
|
-
*
|
|
145
|
-
* If the message is not part of a thread, returns just that single message.
|
|
146
|
-
*
|
|
147
|
-
* Supports pagination and configurable ordering.
|
|
151
|
+
* Retrieve a specific message by its ID. This endpoint returns the full message
|
|
152
|
+
* details including text, attachments, reactions, and metadata.
|
|
148
153
|
*
|
|
149
154
|
* @example
|
|
150
155
|
* ```ts
|
|
151
|
-
*
|
|
152
|
-
* for await (const message of client.messages.listMessagesThread(
|
|
156
|
+
* const message = await client.messages.retrieve(
|
|
153
157
|
* '69a37c7d-af4f-4b5e-af42-e28e98ce873a',
|
|
154
|
-
* )
|
|
155
|
-
* // ...
|
|
156
|
-
* }
|
|
158
|
+
* );
|
|
157
159
|
* ```
|
|
158
160
|
*/
|
|
159
|
-
|
|
160
|
-
return this._client.
|
|
161
|
-
query,
|
|
162
|
-
...options,
|
|
163
|
-
});
|
|
161
|
+
retrieve(messageID, options) {
|
|
162
|
+
return this._client.get((0, path_1.path) `/v3/messages/${messageID}`, options);
|
|
164
163
|
}
|
|
165
164
|
/**
|
|
166
|
-
*
|
|
167
|
-
*
|
|
165
|
+
* Edit the text content of a specific part of a previously sent message.
|
|
166
|
+
*
|
|
167
|
+
* **Note:** A message can be edited up to 5 times, and only within 15 minutes of
|
|
168
|
+
* when it was originally sent.
|
|
168
169
|
*
|
|
169
170
|
* @example
|
|
170
171
|
* ```ts
|
|
171
|
-
* const message = await client.messages.
|
|
172
|
+
* const message = await client.messages.update(
|
|
172
173
|
* '69a37c7d-af4f-4b5e-af42-e28e98ce873a',
|
|
174
|
+
* { text: 'This is the edited message content' },
|
|
173
175
|
* );
|
|
174
176
|
* ```
|
|
175
177
|
*/
|
|
176
|
-
|
|
177
|
-
return this._client.
|
|
178
|
+
update(messageID, body, options) {
|
|
179
|
+
return this._client.patch((0, path_1.path) `/v3/messages/${messageID}`, { body, ...options });
|
|
178
180
|
}
|
|
179
181
|
/**
|
|
180
182
|
* Deletes a message from the Linq API only. This does NOT unsend or remove the
|
|
181
|
-
* message from the actual chat — recipients will still see the message.
|
|
183
|
+
* message from the actual chat — recipients will still see the message. Re-sending
|
|
184
|
+
* with a deleted message's idempotency key returns 404 — a deleted message is
|
|
185
|
+
* never resent.
|
|
182
186
|
*
|
|
183
187
|
* @example
|
|
184
188
|
* ```ts
|
|
@@ -219,21 +223,28 @@ class Messages extends resource_1.APIResource {
|
|
|
219
223
|
return this._client.post((0, path_1.path) `/v3/messages/${messageID}/reactions`, { body, ...options });
|
|
220
224
|
}
|
|
221
225
|
/**
|
|
222
|
-
*
|
|
226
|
+
* Retrieve all messages in a conversation thread. Given any message ID in the
|
|
227
|
+
* thread, returns the originator message and all replies in chronological order.
|
|
223
228
|
*
|
|
224
|
-
*
|
|
225
|
-
*
|
|
229
|
+
* If the message is not part of a thread, returns just that single message.
|
|
230
|
+
*
|
|
231
|
+
* Supports pagination and configurable ordering.
|
|
226
232
|
*
|
|
227
233
|
* @example
|
|
228
234
|
* ```ts
|
|
229
|
-
*
|
|
235
|
+
* // Automatically fetches more pages as needed.
|
|
236
|
+
* for await (const message of client.messages.listMessagesThread(
|
|
230
237
|
* '69a37c7d-af4f-4b5e-af42-e28e98ce873a',
|
|
231
|
-
*
|
|
232
|
-
*
|
|
238
|
+
* )) {
|
|
239
|
+
* // ...
|
|
240
|
+
* }
|
|
233
241
|
* ```
|
|
234
242
|
*/
|
|
235
|
-
|
|
236
|
-
return this._client.
|
|
243
|
+
listMessagesThread(messageID, query = {}, options) {
|
|
244
|
+
return this._client.getAPIList((0, path_1.path) `/v3/messages/${messageID}/thread`, (pagination_1.ListMessagesPagination), {
|
|
245
|
+
query,
|
|
246
|
+
...options,
|
|
247
|
+
});
|
|
237
248
|
}
|
|
238
249
|
/**
|
|
239
250
|
* Replaces a previously delivered `imessage_app` card on the recipient's screen
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages.js","sourceRoot":"","sources":["../src/resources/messages.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAK/C,sDAA4G;AAC5G,oDAAmD;AAEnD,oDAA8C;AAE9C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2DG;AACH,MAAa,QAAS,SAAQ,sBAAW;IACvC
|
|
1
|
+
{"version":3,"file":"messages.js","sourceRoot":"","sources":["../src/resources/messages.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAK/C,sDAA4G;AAC5G,oDAAmD;AAEnD,oDAA8C;AAE9C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2DG;AACH,MAAa,QAAS,SAAQ,sBAAW;IACvC;;;;;;;;;;;;;;;;;;;;;;;;;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