@linqapp/sdk 0.24.2 → 0.26.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 +2 -506
- package/client.d.mts +165 -87
- package/client.d.mts.map +1 -1
- package/client.d.ts +165 -87
- package/client.d.ts.map +1 -1
- package/client.js +162 -84
- package/client.js.map +1 -1
- package/client.mjs +162 -84
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/chats/chats.d.mts +67 -63
- package/resources/chats/chats.d.mts.map +1 -1
- package/resources/chats/chats.d.ts +67 -63
- package/resources/chats/chats.d.ts.map +1 -1
- package/resources/chats/chats.js +63 -59
- package/resources/chats/chats.js.map +1 -1
- package/resources/chats/chats.mjs +63 -59
- package/resources/chats/chats.mjs.map +1 -1
- package/resources/chats/index.d.mts +3 -2
- package/resources/chats/index.d.mts.map +1 -1
- package/resources/chats/index.d.ts +3 -2
- package/resources/chats/index.d.ts.map +1 -1
- package/resources/chats/index.js +3 -1
- package/resources/chats/index.js.map +1 -1
- package/resources/chats/index.mjs +1 -0
- package/resources/chats/index.mjs.map +1 -1
- package/resources/chats/location.d.mts +107 -0
- package/resources/chats/location.d.mts.map +1 -0
- package/resources/chats/location.d.ts +107 -0
- package/resources/chats/location.d.ts.map +1 -0
- package/resources/chats/location.js +68 -0
- package/resources/chats/location.js.map +1 -0
- package/resources/chats/location.mjs +64 -0
- package/resources/chats/location.mjs.map +1 -0
- 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 +18 -18
- package/resources/contact-card.d.mts.map +1 -1
- package/resources/contact-card.d.ts +18 -18
- package/resources/contact-card.d.ts.map +1 -1
- package/resources/contact-card.js +12 -12
- package/resources/contact-card.js.map +1 -1
- package/resources/contact-card.mjs +12 -12
- package/resources/contact-card.mjs.map +1 -1
- package/resources/index.d.mts +3 -3
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +3 -3
- package/resources/index.d.ts.map +1 -1
- package/resources/messages.d.mts +34 -34
- package/resources/messages.d.mts.map +1 -1
- package/resources/messages.d.ts +34 -34
- package/resources/messages.d.ts.map +1 -1
- package/resources/messages.js +29 -29
- package/resources/messages.js.map +1 -1
- package/resources/messages.mjs +29 -29
- package/resources/messages.mjs.map +1 -1
- package/resources/webhook-events.d.mts +83 -44
- package/resources/webhook-events.d.mts.map +1 -1
- package/resources/webhook-events.d.ts +83 -44
- package/resources/webhook-events.d.ts.map +1 -1
- package/resources/webhook-events.js +81 -42
- package/resources/webhook-events.js.map +1 -1
- package/resources/webhook-events.mjs +81 -42
- package/resources/webhook-events.mjs.map +1 -1
- package/resources/webhook-subscriptions.d.mts +100 -55
- package/resources/webhook-subscriptions.d.mts.map +1 -1
- package/resources/webhook-subscriptions.d.ts +100 -55
- package/resources/webhook-subscriptions.d.ts.map +1 -1
- package/resources/webhook-subscriptions.js +103 -58
- package/resources/webhook-subscriptions.js.map +1 -1
- package/resources/webhook-subscriptions.mjs +103 -58
- package/resources/webhook-subscriptions.mjs.map +1 -1
- package/resources/webhooks.d.mts +4 -4
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +4 -4
- package/resources/webhooks.d.ts.map +1 -1
- package/src/client.ts +166 -88
- package/src/resources/chats/chats.ts +88 -78
- package/src/resources/chats/index.ts +3 -2
- package/src/resources/chats/location.ts +138 -0
- package/src/resources/chats/messages.ts +28 -28
- package/src/resources/contact-card.ts +25 -25
- package/src/resources/index.ts +4 -4
- package/src/resources/messages.ts +46 -46
- package/src/resources/webhook-events.ts +85 -44
- package/src/resources/webhook-subscriptions.ts +103 -58
- package/src/resources/webhooks.ts +6 -4
- 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
|
@@ -23,22 +23,6 @@ import { path } from "../../internal/utils/path.mjs";
|
|
|
23
23
|
* - Maximum URL length: 2,048 characters.
|
|
24
24
|
*/
|
|
25
25
|
export class Messages extends APIResource {
|
|
26
|
-
/**
|
|
27
|
-
* Retrieve messages from a specific chat with pagination support.
|
|
28
|
-
*
|
|
29
|
-
* @example
|
|
30
|
-
* ```ts
|
|
31
|
-
* // Automatically fetches more pages as needed.
|
|
32
|
-
* for await (const message of client.chats.messages.list(
|
|
33
|
-
* '550e8400-e29b-41d4-a716-446655440000',
|
|
34
|
-
* )) {
|
|
35
|
-
* // ...
|
|
36
|
-
* }
|
|
37
|
-
* ```
|
|
38
|
-
*/
|
|
39
|
-
list(chatID, query = {}, options) {
|
|
40
|
-
return this._client.getAPIList(path `/v3/chats/${chatID}/messages`, (ListMessagesPagination), { query, ...options });
|
|
41
|
-
}
|
|
42
26
|
/**
|
|
43
27
|
* Send a message to an existing chat. Use this endpoint when you already have a
|
|
44
28
|
* chat ID and want to send additional messages to it.
|
|
@@ -98,5 +82,21 @@ export class Messages extends APIResource {
|
|
|
98
82
|
send(chatID, body, options) {
|
|
99
83
|
return this._client.post(path `/v3/chats/${chatID}/messages`, { body, ...options });
|
|
100
84
|
}
|
|
85
|
+
/**
|
|
86
|
+
* Retrieve messages from a specific chat with pagination support.
|
|
87
|
+
*
|
|
88
|
+
* @example
|
|
89
|
+
* ```ts
|
|
90
|
+
* // Automatically fetches more pages as needed.
|
|
91
|
+
* for await (const message of client.chats.messages.list(
|
|
92
|
+
* '550e8400-e29b-41d4-a716-446655440000',
|
|
93
|
+
* )) {
|
|
94
|
+
* // ...
|
|
95
|
+
* }
|
|
96
|
+
* ```
|
|
97
|
+
*/
|
|
98
|
+
list(chatID, query = {}, options) {
|
|
99
|
+
return this._client.getAPIList(path `/v3/chats/${chatID}/messages`, (ListMessagesPagination), { query, ...options });
|
|
100
|
+
}
|
|
101
101
|
}
|
|
102
102
|
//# sourceMappingURL=messages.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages.mjs","sourceRoot":"","sources":["../../src/resources/chats/messages.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAMlD,OAAO,EACL,sBAAsB,GAGvB,kCAA8B;AAE/B,OAAO,EAAE,IAAI,EAAE,sCAAkC;AAEjD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,OAAO,QAAS,SAAQ,WAAW;IACvC
|
|
1
|
+
{"version":3,"file":"messages.mjs","sourceRoot":"","sources":["../../src/resources/chats/messages.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAMlD,OAAO,EACL,sBAAsB,GAGvB,kCAA8B;AAE/B,OAAO,EAAE,IAAI,EAAE,sCAAkC;AAEjD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,OAAO,QAAS,SAAQ,WAAW;IACvC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAuDG;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;IAED;;;;;;;;;;;;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;CACF"}
|
|
@@ -11,6 +11,16 @@ import { RequestOptions } from "../internal/request-options.mjs";
|
|
|
11
11
|
* **Sharing behavior:** Sharing may not take effect in every chat due to limitations outside our control. We recommend calling the share endpoint once per day, after the first outbound activity.
|
|
12
12
|
*/
|
|
13
13
|
export declare class ContactCard extends APIResource {
|
|
14
|
+
/**
|
|
15
|
+
* Returns the contact card for a specific phone number, or all contact cards for
|
|
16
|
+
* the authenticated partner if no `phone_number` is provided.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```ts
|
|
20
|
+
* const contactCard = await client.contactCard.retrieve();
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
retrieve(query?: ContactCardRetrieveParams | null | undefined, options?: RequestOptions): APIPromise<ContactCardRetrieveResponse>;
|
|
14
24
|
/**
|
|
15
25
|
* Creates a contact card for a phone number. This endpoint is intended for
|
|
16
26
|
* initial, one-time setup only.
|
|
@@ -34,16 +44,6 @@ export declare class ContactCard extends APIResource {
|
|
|
34
44
|
* ```
|
|
35
45
|
*/
|
|
36
46
|
create(body: ContactCardCreateParams, options?: RequestOptions): APIPromise<SetContactCard>;
|
|
37
|
-
/**
|
|
38
|
-
* Returns the contact card for a specific phone number, or all contact cards for
|
|
39
|
-
* the authenticated partner if no `phone_number` is provided.
|
|
40
|
-
*
|
|
41
|
-
* @example
|
|
42
|
-
* ```ts
|
|
43
|
-
* const contactCard = await client.contactCard.retrieve();
|
|
44
|
-
* ```
|
|
45
|
-
*/
|
|
46
|
-
retrieve(query?: ContactCardRetrieveParams | null | undefined, options?: RequestOptions): APIPromise<ContactCardRetrieveResponse>;
|
|
47
47
|
/**
|
|
48
48
|
* Partially updates an existing active contact card for a phone number.
|
|
49
49
|
*
|
|
@@ -100,6 +100,13 @@ export declare namespace ContactCardRetrieveResponse {
|
|
|
100
100
|
last_name?: string;
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
|
+
export interface ContactCardRetrieveParams {
|
|
104
|
+
/**
|
|
105
|
+
* E.164 phone number to filter by. If omitted, all my cards for the partner are
|
|
106
|
+
* returned.
|
|
107
|
+
*/
|
|
108
|
+
phone_number?: string;
|
|
109
|
+
}
|
|
103
110
|
export interface ContactCardCreateParams {
|
|
104
111
|
/**
|
|
105
112
|
* First name for the contact card. Required.
|
|
@@ -119,13 +126,6 @@ export interface ContactCardCreateParams {
|
|
|
119
126
|
*/
|
|
120
127
|
last_name?: string;
|
|
121
128
|
}
|
|
122
|
-
export interface ContactCardRetrieveParams {
|
|
123
|
-
/**
|
|
124
|
-
* E.164 phone number to filter by. If omitted, all my cards for the partner are
|
|
125
|
-
* returned.
|
|
126
|
-
*/
|
|
127
|
-
phone_number?: string;
|
|
128
|
-
}
|
|
129
129
|
export interface ContactCardUpdateParams {
|
|
130
130
|
/**
|
|
131
131
|
* Query param: E.164 phone number of the contact card to update
|
|
@@ -145,6 +145,6 @@ export interface ContactCardUpdateParams {
|
|
|
145
145
|
last_name?: string;
|
|
146
146
|
}
|
|
147
147
|
export declare namespace ContactCard {
|
|
148
|
-
export { type SetContactCard as SetContactCard, type ContactCardRetrieveResponse as ContactCardRetrieveResponse, type
|
|
148
|
+
export { type SetContactCard as SetContactCard, type ContactCardRetrieveResponse as ContactCardRetrieveResponse, type ContactCardRetrieveParams as ContactCardRetrieveParams, type ContactCardCreateParams as ContactCardCreateParams, type ContactCardUpdateParams as ContactCardUpdateParams, };
|
|
149
149
|
}
|
|
150
150
|
//# sourceMappingURL=contact-card.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contact-card.d.mts","sourceRoot":"","sources":["../src/resources/contact-card.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,gCAA4B;AACjD,OAAO,EAAE,cAAc,EAAE,wCAAoC;AAE7D;;;;;;;;GAQG;AACH,qBAAa,WAAY,SAAQ,WAAW;IAC1C
|
|
1
|
+
{"version":3,"file":"contact-card.d.mts","sourceRoot":"","sources":["../src/resources/contact-card.ts"],"names":[],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C,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,uBAAuB;IACtC;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IAErB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,uBAAuB;IACtC;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,CAAC,OAAO,WAAW,WAAW,CAAC;IACnC,OAAO,EACL,KAAK,cAAc,IAAI,cAAc,EACrC,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,uBAAuB,IAAI,uBAAuB,GACxD,CAAC;CACH"}
|
|
@@ -11,6 +11,16 @@ import { RequestOptions } from "../internal/request-options.js";
|
|
|
11
11
|
* **Sharing behavior:** Sharing may not take effect in every chat due to limitations outside our control. We recommend calling the share endpoint once per day, after the first outbound activity.
|
|
12
12
|
*/
|
|
13
13
|
export declare class ContactCard extends APIResource {
|
|
14
|
+
/**
|
|
15
|
+
* Returns the contact card for a specific phone number, or all contact cards for
|
|
16
|
+
* the authenticated partner if no `phone_number` is provided.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```ts
|
|
20
|
+
* const contactCard = await client.contactCard.retrieve();
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
retrieve(query?: ContactCardRetrieveParams | null | undefined, options?: RequestOptions): APIPromise<ContactCardRetrieveResponse>;
|
|
14
24
|
/**
|
|
15
25
|
* Creates a contact card for a phone number. This endpoint is intended for
|
|
16
26
|
* initial, one-time setup only.
|
|
@@ -34,16 +44,6 @@ export declare class ContactCard extends APIResource {
|
|
|
34
44
|
* ```
|
|
35
45
|
*/
|
|
36
46
|
create(body: ContactCardCreateParams, options?: RequestOptions): APIPromise<SetContactCard>;
|
|
37
|
-
/**
|
|
38
|
-
* Returns the contact card for a specific phone number, or all contact cards for
|
|
39
|
-
* the authenticated partner if no `phone_number` is provided.
|
|
40
|
-
*
|
|
41
|
-
* @example
|
|
42
|
-
* ```ts
|
|
43
|
-
* const contactCard = await client.contactCard.retrieve();
|
|
44
|
-
* ```
|
|
45
|
-
*/
|
|
46
|
-
retrieve(query?: ContactCardRetrieveParams | null | undefined, options?: RequestOptions): APIPromise<ContactCardRetrieveResponse>;
|
|
47
47
|
/**
|
|
48
48
|
* Partially updates an existing active contact card for a phone number.
|
|
49
49
|
*
|
|
@@ -100,6 +100,13 @@ export declare namespace ContactCardRetrieveResponse {
|
|
|
100
100
|
last_name?: string;
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
|
+
export interface ContactCardRetrieveParams {
|
|
104
|
+
/**
|
|
105
|
+
* E.164 phone number to filter by. If omitted, all my cards for the partner are
|
|
106
|
+
* returned.
|
|
107
|
+
*/
|
|
108
|
+
phone_number?: string;
|
|
109
|
+
}
|
|
103
110
|
export interface ContactCardCreateParams {
|
|
104
111
|
/**
|
|
105
112
|
* First name for the contact card. Required.
|
|
@@ -119,13 +126,6 @@ export interface ContactCardCreateParams {
|
|
|
119
126
|
*/
|
|
120
127
|
last_name?: string;
|
|
121
128
|
}
|
|
122
|
-
export interface ContactCardRetrieveParams {
|
|
123
|
-
/**
|
|
124
|
-
* E.164 phone number to filter by. If omitted, all my cards for the partner are
|
|
125
|
-
* returned.
|
|
126
|
-
*/
|
|
127
|
-
phone_number?: string;
|
|
128
|
-
}
|
|
129
129
|
export interface ContactCardUpdateParams {
|
|
130
130
|
/**
|
|
131
131
|
* Query param: E.164 phone number of the contact card to update
|
|
@@ -145,6 +145,6 @@ export interface ContactCardUpdateParams {
|
|
|
145
145
|
last_name?: string;
|
|
146
146
|
}
|
|
147
147
|
export declare namespace ContactCard {
|
|
148
|
-
export { type SetContactCard as SetContactCard, type ContactCardRetrieveResponse as ContactCardRetrieveResponse, type
|
|
148
|
+
export { type SetContactCard as SetContactCard, type ContactCardRetrieveResponse as ContactCardRetrieveResponse, type ContactCardRetrieveParams as ContactCardRetrieveParams, type ContactCardCreateParams as ContactCardCreateParams, type ContactCardUpdateParams as ContactCardUpdateParams, };
|
|
149
149
|
}
|
|
150
150
|
//# sourceMappingURL=contact-card.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contact-card.d.ts","sourceRoot":"","sources":["../src/resources/contact-card.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,4BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,+BAA4B;AACjD,OAAO,EAAE,cAAc,EAAE,uCAAoC;AAE7D;;;;;;;;GAQG;AACH,qBAAa,WAAY,SAAQ,WAAW;IAC1C
|
|
1
|
+
{"version":3,"file":"contact-card.d.ts","sourceRoot":"","sources":["../src/resources/contact-card.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,4BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,+BAA4B;AACjD,OAAO,EAAE,cAAc,EAAE,uCAAoC;AAE7D;;;;;;;;GAQG;AACH,qBAAa,WAAY,SAAQ,WAAW;IAC1C;;;;;;;;OAQG;IACH,QAAQ,CACN,KAAK,GAAE,yBAAyB,GAAG,IAAI,GAAG,SAAc,EACxD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,2BAA2B,CAAC;IAI1C;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,MAAM,CAAC,IAAI,EAAE,uBAAuB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,cAAc,CAAC;IAI3F;;;;;;;;;;;;;;;;;;;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AW,WAAW,CAAC;IACnC,OAAO,EACL,KAAK,cAAc,IAAI,cAAc,EACrC,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,uBAAuB,IAAI,uBAAuB,GACxD,CAAC;CACH"}
|
|
@@ -13,6 +13,18 @@ const resource_1 = require("../core/resource.js");
|
|
|
13
13
|
* **Sharing behavior:** Sharing may not take effect in every chat due to limitations outside our control. We recommend calling the share endpoint once per day, after the first outbound activity.
|
|
14
14
|
*/
|
|
15
15
|
class ContactCard extends resource_1.APIResource {
|
|
16
|
+
/**
|
|
17
|
+
* Returns the contact card for a specific phone number, or all contact cards for
|
|
18
|
+
* the authenticated partner if no `phone_number` is provided.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```ts
|
|
22
|
+
* const contactCard = await client.contactCard.retrieve();
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
retrieve(query = {}, options) {
|
|
26
|
+
return this._client.get('/v3/contact_card', { query, ...options });
|
|
27
|
+
}
|
|
16
28
|
/**
|
|
17
29
|
* Creates a contact card for a phone number. This endpoint is intended for
|
|
18
30
|
* initial, one-time setup only.
|
|
@@ -38,18 +50,6 @@ class ContactCard extends resource_1.APIResource {
|
|
|
38
50
|
create(body, options) {
|
|
39
51
|
return this._client.post('/v3/contact_card', { body, ...options });
|
|
40
52
|
}
|
|
41
|
-
/**
|
|
42
|
-
* Returns the contact card for a specific phone number, or all contact cards for
|
|
43
|
-
* the authenticated partner if no `phone_number` is provided.
|
|
44
|
-
*
|
|
45
|
-
* @example
|
|
46
|
-
* ```ts
|
|
47
|
-
* const contactCard = await client.contactCard.retrieve();
|
|
48
|
-
* ```
|
|
49
|
-
*/
|
|
50
|
-
retrieve(query = {}, options) {
|
|
51
|
-
return this._client.get('/v3/contact_card', { query, ...options });
|
|
52
|
-
}
|
|
53
53
|
/**
|
|
54
54
|
* Partially updates an existing active contact card for a phone number.
|
|
55
55
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contact-card.js","sourceRoot":"","sources":["../src/resources/contact-card.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAI/C;;;;;;;;GAQG;AACH,MAAa,WAAY,SAAQ,sBAAW;IAC1C
|
|
1
|
+
{"version":3,"file":"contact-card.js","sourceRoot":"","sources":["../src/resources/contact-card.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAI/C;;;;;;;;GAQG;AACH,MAAa,WAAY,SAAQ,sBAAW;IAC1C;;;;;;;;OAQG;IACH,QAAQ,CACN,QAAsD,EAAE,EACxD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,kBAAkB,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrE,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,MAAM,CAAC,IAA6B,EAAE,OAAwB;QAC5D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,kBAAkB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrE,CAAC;IAED;;;;;;;;;;;;;;;;;;;OAmBG;IACH,MAAM,CAAC,MAA+B,EAAE,OAAwB;QAC9D,MAAM,EAAE,YAAY,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QACzC,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,kBAAkB,EAAE,EAAE,KAAK,EAAE,EAAE,YAAY,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC/F,CAAC;CACF;AAnED,kCAmEC"}
|
|
@@ -10,6 +10,18 @@ import { APIResource } from "../core/resource.mjs";
|
|
|
10
10
|
* **Sharing behavior:** Sharing may not take effect in every chat due to limitations outside our control. We recommend calling the share endpoint once per day, after the first outbound activity.
|
|
11
11
|
*/
|
|
12
12
|
export class ContactCard extends APIResource {
|
|
13
|
+
/**
|
|
14
|
+
* Returns the contact card for a specific phone number, or all contact cards for
|
|
15
|
+
* the authenticated partner if no `phone_number` is provided.
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* ```ts
|
|
19
|
+
* const contactCard = await client.contactCard.retrieve();
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
retrieve(query = {}, options) {
|
|
23
|
+
return this._client.get('/v3/contact_card', { query, ...options });
|
|
24
|
+
}
|
|
13
25
|
/**
|
|
14
26
|
* Creates a contact card for a phone number. This endpoint is intended for
|
|
15
27
|
* initial, one-time setup only.
|
|
@@ -35,18 +47,6 @@ export class ContactCard extends APIResource {
|
|
|
35
47
|
create(body, options) {
|
|
36
48
|
return this._client.post('/v3/contact_card', { body, ...options });
|
|
37
49
|
}
|
|
38
|
-
/**
|
|
39
|
-
* Returns the contact card for a specific phone number, or all contact cards for
|
|
40
|
-
* the authenticated partner if no `phone_number` is provided.
|
|
41
|
-
*
|
|
42
|
-
* @example
|
|
43
|
-
* ```ts
|
|
44
|
-
* const contactCard = await client.contactCard.retrieve();
|
|
45
|
-
* ```
|
|
46
|
-
*/
|
|
47
|
-
retrieve(query = {}, options) {
|
|
48
|
-
return this._client.get('/v3/contact_card', { query, ...options });
|
|
49
|
-
}
|
|
50
50
|
/**
|
|
51
51
|
* Partially updates an existing active contact card for a phone number.
|
|
52
52
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contact-card.mjs","sourceRoot":"","sources":["../src/resources/contact-card.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAI/C;;;;;;;;GAQG;AACH,MAAM,OAAO,WAAY,SAAQ,WAAW;IAC1C
|
|
1
|
+
{"version":3,"file":"contact-card.mjs","sourceRoot":"","sources":["../src/resources/contact-card.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAI/C;;;;;;;;GAQG;AACH,MAAM,OAAO,WAAY,SAAQ,WAAW;IAC1C;;;;;;;;OAQG;IACH,QAAQ,CACN,QAAsD,EAAE,EACxD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,kBAAkB,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrE,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,MAAM,CAAC,IAA6B,EAAE,OAAwB;QAC5D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,kBAAkB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrE,CAAC;IAED;;;;;;;;;;;;;;;;;;;OAmBG;IACH,MAAM,CAAC,MAA+B,EAAE,OAAwB;QAC9D,MAAM,EAAE,YAAY,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QACzC,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,kBAAkB,EAAE,EAAE,KAAK,EAAE,EAAE,YAAY,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC/F,CAAC;CACF"}
|
package/resources/index.d.mts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export * from "./shared.mjs";
|
|
2
2
|
export { Attachments, type SupportedContentType, type AttachmentCreateResponse, type AttachmentRetrieveResponse, type AttachmentCreateParams, } from "./attachments.mjs";
|
|
3
3
|
export { Capability, type HandleCheck, type HandleCheckResponse, type CapabilityCheckiMessageParams, type CapabilityCheckRCSParams, } from "./capability.mjs";
|
|
4
|
-
export { Chats, type Chat, type LinkPart, type MediaPart, type MessageContent, type TextPart, type ChatCreateResponse, type ChatUpdateResponse, type ChatLeaveChatResponse, type ChatSendVoicememoResponse, type ChatCreateParams, type
|
|
5
|
-
export { ContactCard, type SetContactCard, type ContactCardRetrieveResponse, type
|
|
6
|
-
export { Messages, type Message, type MessageEffect, type ReplyTo, type MessageAddReactionResponse, type
|
|
4
|
+
export { Chats, type Chat, type LinkPart, type MediaPart, type MessageContent, type TextPart, type ChatCreateResponse, type ChatUpdateResponse, type ChatLeaveChatResponse, type ChatSendVoicememoResponse, type ChatCreateParams, type ChatListChatsParams, type ChatUpdateParams, type ChatSendVoicememoParams, type ChatsListChatsPagination, } from "./chats/chats.mjs";
|
|
5
|
+
export { ContactCard, type SetContactCard, type ContactCardRetrieveResponse, type ContactCardRetrieveParams, type ContactCardCreateParams, type ContactCardUpdateParams, } from "./contact-card.mjs";
|
|
6
|
+
export { Messages, type Message, type MessageEffect, type ReplyTo, type MessageAddReactionResponse, type MessageListMessagesThreadParams, type MessageAddReactionParams, type MessageUpdateParams, type MessagesListMessagesPagination, } from "./messages.mjs";
|
|
7
7
|
export { PhoneNumbers, type PhoneNumberListResponse } from "./phone-numbers.mjs";
|
|
8
8
|
export { Phonenumbers, type PhonenumberListResponse } from "./phonenumbers.mjs";
|
|
9
9
|
export { WebhookEvents, type WebhookEventType, type WebhookEventListResponse } from "./webhook-events.mjs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"AAEA,6BAAyB;AACzB,OAAO,EACL,WAAW,EACX,KAAK,oBAAoB,EACzB,KAAK,wBAAwB,EAC7B,KAAK,0BAA0B,EAC/B,KAAK,sBAAsB,GAC5B,0BAAsB;AACvB,OAAO,EACL,UAAU,EACV,KAAK,WAAW,EAChB,KAAK,mBAAmB,EACxB,KAAK,6BAA6B,EAClC,KAAK,wBAAwB,GAC9B,yBAAqB;AACtB,OAAO,EACL,KAAK,EACL,KAAK,IAAI,EACT,KAAK,QAAQ,EACb,KAAK,SAAS,EACd,KAAK,cAAc,EACnB,KAAK,QAAQ,EACb,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,qBA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AAyB;AACvG,OAAO,EACL,oBAAoB,EACpB,KAAK,mBAAmB,EACxB,KAAK,iCAAiC,EACtC,KAAK,+BAA+B,EACpC,KAAK,+BAA+B,EACpC,KAAK,+BAA+B,GACrC,oCAAgC;AACjC,OAAO,EACL,QAAQ,EACR,KAAK,cAAc,EACnB,KAAK,cAAc,EACnB,KAAK,iBAAiB,EACtB,KAAK,wBAAwB,EAC7B,KAAK,oBAAoB,EACzB,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,EAC5B,KAAK,2BAA2B,EAChC,KAAK,uBAAuB,EAC5B,KAAK,4BAA4B,EACjC,KAAK,yBAAyB,EAC9B,KAAK,yBAAyB,EAC9B,KAAK,yBAAyB,EAC9B,KAAK,2BAA2B,EAChC,KAAK,4BAA4B,EACjC,KAAK,8BAA8B,EACnC,KAAK,uBAAuB,EAC5B,KAAK,gCAAgC,EACrC,KAAK,gCAAgC,EACrC,KAAK,qCAAqC,EAC1C,KAAK,qCAAqC,EAC1C,KAAK,sCAAsC,EAC3C,KAAK,sCAAsC,EAC3C,KAAK,oCAAoC,EACzC,KAAK,kBAAkB,GACxB,uBAAmB"}
|
package/resources/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export * from "./shared.js";
|
|
2
2
|
export { Attachments, type SupportedContentType, type AttachmentCreateResponse, type AttachmentRetrieveResponse, type AttachmentCreateParams, } from "./attachments.js";
|
|
3
3
|
export { Capability, type HandleCheck, type HandleCheckResponse, type CapabilityCheckiMessageParams, type CapabilityCheckRCSParams, } from "./capability.js";
|
|
4
|
-
export { Chats, type Chat, type LinkPart, type MediaPart, type MessageContent, type TextPart, type ChatCreateResponse, type ChatUpdateResponse, type ChatLeaveChatResponse, type ChatSendVoicememoResponse, type ChatCreateParams, type
|
|
5
|
-
export { ContactCard, type SetContactCard, type ContactCardRetrieveResponse, type
|
|
6
|
-
export { Messages, type Message, type MessageEffect, type ReplyTo, type MessageAddReactionResponse, type
|
|
4
|
+
export { Chats, type Chat, type LinkPart, type MediaPart, type MessageContent, type TextPart, type ChatCreateResponse, type ChatUpdateResponse, type ChatLeaveChatResponse, type ChatSendVoicememoResponse, type ChatCreateParams, type ChatListChatsParams, type ChatUpdateParams, type ChatSendVoicememoParams, type ChatsListChatsPagination, } from "./chats/chats.js";
|
|
5
|
+
export { ContactCard, type SetContactCard, type ContactCardRetrieveResponse, type ContactCardRetrieveParams, type ContactCardCreateParams, type ContactCardUpdateParams, } from "./contact-card.js";
|
|
6
|
+
export { Messages, type Message, type MessageEffect, type ReplyTo, type MessageAddReactionResponse, type MessageListMessagesThreadParams, type MessageAddReactionParams, type MessageUpdateParams, type MessagesListMessagesPagination, } from "./messages.js";
|
|
7
7
|
export { PhoneNumbers, type PhoneNumberListResponse } from "./phone-numbers.js";
|
|
8
8
|
export { Phonenumbers, type PhonenumberListResponse } from "./phonenumbers.js";
|
|
9
9
|
export { WebhookEvents, type WebhookEventType, type WebhookEventListResponse } from "./webhook-events.js";
|
package/resources/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"AAEA,4BAAyB;AACzB,OAAO,EACL,WAAW,EACX,KAAK,oBAAoB,EACzB,KAAK,wBAAwB,EAC7B,KAAK,0BAA0B,EAC/B,KAAK,sBAAsB,GAC5B,yBAAsB;AACvB,OAAO,EACL,UAAU,EACV,KAAK,WAAW,EAChB,KAAK,mBAAmB,EACxB,KAAK,6BAA6B,EAClC,KAAK,wBAAwB,GAC9B,wBAAqB;AACtB,OAAO,EACL,KAAK,EACL,KAAK,IAAI,EACT,KAAK,QAAQ,EACb,KAAK,SAAS,EACd,KAAK,cAAc,EACnB,KAAK,QAAQ,EACb,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,qBAAqB,EAC1B,KAAK,yBAAyB,EAC9B,KAAK,gBAAgB,EACrB,KAAK,
|
|
1
|
+
{"version":3,"file":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+BAA+B,EACpC,KAAK,+BAA+B,EACpC,KAAK,+BAA+B,GACrC,mCAAgC;AACjC,OAAO,EACL,QAAQ,EACR,KAAK,cAAc,EACnB,KAAK,cAAc,EACnB,KAAK,iBAAiB,EACtB,KAAK,wBAAwB,EAC7B,KAAK,oBAAoB,EACzB,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,EAC5B,KAAK,2BAA2B,EAChC,KAAK,uBAAuB,EAC5B,KAAK,4BAA4B,EACjC,KAAK,yBAAyB,EAC9B,KAAK,yBAAyB,EAC9B,KAAK,yBAAyB,EAC9B,KAAK,2BAA2B,EAChC,KAAK,4BAA4B,EACjC,KAAK,8BAA8B,EACnC,KAAK,uBAAuB,EAC5B,KAAK,gCAAgC,EACrC,KAAK,gCAAgC,EACrC,KAAK,qCAAqC,EAC1C,KAAK,qCAAqC,EAC1C,KAAK,sCAAsC,EAC3C,KAAK,sCAAsC,EAC3C,KAAK,oCAAoC,EACzC,KAAK,kBAAkB,GACxB,sBAAmB"}
|
package/resources/messages.d.mts
CHANGED
|
@@ -25,32 +25,36 @@ import { RequestOptions } from "../internal/request-options.mjs";
|
|
|
25
25
|
*/
|
|
26
26
|
export declare class Messages extends APIResource {
|
|
27
27
|
/**
|
|
28
|
-
* Retrieve
|
|
29
|
-
*
|
|
28
|
+
* Retrieve all messages in a conversation thread. Given any message ID in the
|
|
29
|
+
* thread, returns the originator message and all replies in chronological order.
|
|
30
|
+
*
|
|
31
|
+
* If the message is not part of a thread, returns just that single message.
|
|
32
|
+
*
|
|
33
|
+
* Supports pagination and configurable ordering.
|
|
30
34
|
*
|
|
31
35
|
* @example
|
|
32
36
|
* ```ts
|
|
33
|
-
*
|
|
37
|
+
* // Automatically fetches more pages as needed.
|
|
38
|
+
* for await (const message of client.messages.listMessagesThread(
|
|
34
39
|
* '69a37c7d-af4f-4b5e-af42-e28e98ce873a',
|
|
35
|
-
* )
|
|
40
|
+
* )) {
|
|
41
|
+
* // ...
|
|
42
|
+
* }
|
|
36
43
|
* ```
|
|
37
44
|
*/
|
|
38
|
-
|
|
45
|
+
listMessagesThread(messageID: string, query?: MessageListMessagesThreadParams | null | undefined, options?: RequestOptions): PagePromise<MessagesListMessagesPagination, Message>;
|
|
39
46
|
/**
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
* **Note:** A message can be edited up to 5 times, and only within 15 minutes of
|
|
43
|
-
* when it was originally sent.
|
|
47
|
+
* Retrieve a specific message by its ID. This endpoint returns the full message
|
|
48
|
+
* details including text, attachments, reactions, and metadata.
|
|
44
49
|
*
|
|
45
50
|
* @example
|
|
46
51
|
* ```ts
|
|
47
|
-
* const message = await client.messages.
|
|
52
|
+
* const message = await client.messages.retrieve(
|
|
48
53
|
* '69a37c7d-af4f-4b5e-af42-e28e98ce873a',
|
|
49
|
-
* { text: 'This is the edited message content' },
|
|
50
54
|
* );
|
|
51
55
|
* ```
|
|
52
56
|
*/
|
|
53
|
-
|
|
57
|
+
retrieve(messageID: string, options?: RequestOptions): APIPromise<Message>;
|
|
54
58
|
/**
|
|
55
59
|
* Deletes a message from the Linq API only. This does NOT unsend or remove the
|
|
56
60
|
* message from the actual chat — recipients will still see the message.
|
|
@@ -87,24 +91,20 @@ export declare class Messages extends APIResource {
|
|
|
87
91
|
*/
|
|
88
92
|
addReaction(messageID: string, body: MessageAddReactionParams, options?: RequestOptions): APIPromise<MessageAddReactionResponse>;
|
|
89
93
|
/**
|
|
90
|
-
*
|
|
91
|
-
* thread, returns the originator message and all replies in chronological order.
|
|
92
|
-
*
|
|
93
|
-
* If the message is not part of a thread, returns just that single message.
|
|
94
|
+
* Edit the text content of a specific part of a previously sent message.
|
|
94
95
|
*
|
|
95
|
-
*
|
|
96
|
+
* **Note:** A message can be edited up to 5 times, and only within 15 minutes of
|
|
97
|
+
* when it was originally sent.
|
|
96
98
|
*
|
|
97
99
|
* @example
|
|
98
100
|
* ```ts
|
|
99
|
-
*
|
|
100
|
-
* for await (const message of client.messages.listMessagesThread(
|
|
101
|
+
* const message = await client.messages.update(
|
|
101
102
|
* '69a37c7d-af4f-4b5e-af42-e28e98ce873a',
|
|
102
|
-
*
|
|
103
|
-
*
|
|
104
|
-
* }
|
|
103
|
+
* { text: 'This is the edited message content' },
|
|
104
|
+
* );
|
|
105
105
|
* ```
|
|
106
106
|
*/
|
|
107
|
-
|
|
107
|
+
update(messageID: string, body: MessageUpdateParams, options?: RequestOptions): APIPromise<Message>;
|
|
108
108
|
}
|
|
109
109
|
export type MessagesListMessagesPagination = ListMessagesPagination<Message>;
|
|
110
110
|
export interface Message {
|
|
@@ -215,15 +215,11 @@ export interface MessageAddReactionResponse {
|
|
|
215
215
|
status?: string;
|
|
216
216
|
trace_id?: string;
|
|
217
217
|
}
|
|
218
|
-
export interface
|
|
219
|
-
/**
|
|
220
|
-
* New text content for the message part
|
|
221
|
-
*/
|
|
222
|
-
text: string;
|
|
218
|
+
export interface MessageListMessagesThreadParams extends ListMessagesPaginationParams {
|
|
223
219
|
/**
|
|
224
|
-
*
|
|
220
|
+
* Sort order for messages (asc = oldest first, desc = newest first)
|
|
225
221
|
*/
|
|
226
|
-
|
|
222
|
+
order?: 'asc' | 'desc';
|
|
227
223
|
}
|
|
228
224
|
export interface MessageAddReactionParams {
|
|
229
225
|
/**
|
|
@@ -247,13 +243,17 @@ export interface MessageAddReactionParams {
|
|
|
247
243
|
*/
|
|
248
244
|
part_index?: number;
|
|
249
245
|
}
|
|
250
|
-
export interface
|
|
246
|
+
export interface MessageUpdateParams {
|
|
251
247
|
/**
|
|
252
|
-
*
|
|
248
|
+
* New text content for the message part
|
|
253
249
|
*/
|
|
254
|
-
|
|
250
|
+
text: string;
|
|
251
|
+
/**
|
|
252
|
+
* Index of the message part to edit. Defaults to 0.
|
|
253
|
+
*/
|
|
254
|
+
part_index?: number;
|
|
255
255
|
}
|
|
256
256
|
export declare namespace Messages {
|
|
257
|
-
export { type Message as Message, type MessageEffect as MessageEffect, type ReplyTo as ReplyTo, type MessageAddReactionResponse as MessageAddReactionResponse, type MessagesListMessagesPagination as MessagesListMessagesPagination, type
|
|
257
|
+
export { type Message as Message, type MessageEffect as MessageEffect, type ReplyTo as ReplyTo, type MessageAddReactionResponse as MessageAddReactionResponse, type MessagesListMessagesPagination as MessagesListMessagesPagination, type MessageListMessagesThreadParams as MessageListMessagesThreadParams, type MessageAddReactionParams as MessageAddReactionParams, type MessageUpdateParams as MessageUpdateParams, };
|
|
258
258
|
}
|
|
259
259
|
//# 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,EAAE,UAAU,EAAE,gCAA4B;AACjD,OAAO,EAAE,sBAAsB,EAAE,KAAK,4BAA4B,EAAE,WAAW,EAAE,+BAA2B;AAE5G,OAAO,EAAE,cAAc,EAAE,wCAAoC;AAG7D;;;;;;;;;;;;;;;;;;;GAmBG;AACH,qBAAa,QAAS,SAAQ,WAAW;IACvC
|
|
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,EAAE,UAAU,EAAE,gCAA4B;AACjD,OAAO,EAAE,sBAAsB,EAAE,KAAK,4BAA4B,EAAE,WAAW,EAAE,+BAA2B;AAE5G,OAAO,EAAE,cAAc,EAAE,wCAAoC;AAG7D;;;;;;;;;;;;;;;;;;;GAmBG;AACH,qBAAa,QAAS,SAAQ,WAAW;IACvC;;;;;;;;;;;;;;;;;OAiBG;IACH,kBAAkB,CAChB,SAAS,EAAE,MAAM,EACjB,KAAK,GAAE,+BAA+B,GAAG,IAAI,GAAG,SAAc,EAC9D,OAAO,CAAC,EAAE,cAAc,GACvB,WAA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;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,CAAC,OAAO,WAAW,QAAQ,CAAC;IAChC,OAAO,EACL,KAAK,OAAO,IAAI,OAAO,EACvB,KAAK,aAAa,IAAI,aAAa,EACnC,KAAK,OAAO,IAAI,OAAO,EACvB,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,8BAA8B,IAAI,8BAA8B,EACrE,KAAK,+BAA+B,IAAI,+BAA+B,EACvE,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,mBAAmB,IAAI,mBAAmB,GAChD,CAAC;CACH"}
|
package/resources/messages.d.ts
CHANGED
|
@@ -25,32 +25,36 @@ import { RequestOptions } from "../internal/request-options.js";
|
|
|
25
25
|
*/
|
|
26
26
|
export declare class Messages extends APIResource {
|
|
27
27
|
/**
|
|
28
|
-
* Retrieve
|
|
29
|
-
*
|
|
28
|
+
* Retrieve all messages in a conversation thread. Given any message ID in the
|
|
29
|
+
* thread, returns the originator message and all replies in chronological order.
|
|
30
|
+
*
|
|
31
|
+
* If the message is not part of a thread, returns just that single message.
|
|
32
|
+
*
|
|
33
|
+
* Supports pagination and configurable ordering.
|
|
30
34
|
*
|
|
31
35
|
* @example
|
|
32
36
|
* ```ts
|
|
33
|
-
*
|
|
37
|
+
* // Automatically fetches more pages as needed.
|
|
38
|
+
* for await (const message of client.messages.listMessagesThread(
|
|
34
39
|
* '69a37c7d-af4f-4b5e-af42-e28e98ce873a',
|
|
35
|
-
* )
|
|
40
|
+
* )) {
|
|
41
|
+
* // ...
|
|
42
|
+
* }
|
|
36
43
|
* ```
|
|
37
44
|
*/
|
|
38
|
-
|
|
45
|
+
listMessagesThread(messageID: string, query?: MessageListMessagesThreadParams | null | undefined, options?: RequestOptions): PagePromise<MessagesListMessagesPagination, Message>;
|
|
39
46
|
/**
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
* **Note:** A message can be edited up to 5 times, and only within 15 minutes of
|
|
43
|
-
* when it was originally sent.
|
|
47
|
+
* Retrieve a specific message by its ID. This endpoint returns the full message
|
|
48
|
+
* details including text, attachments, reactions, and metadata.
|
|
44
49
|
*
|
|
45
50
|
* @example
|
|
46
51
|
* ```ts
|
|
47
|
-
* const message = await client.messages.
|
|
52
|
+
* const message = await client.messages.retrieve(
|
|
48
53
|
* '69a37c7d-af4f-4b5e-af42-e28e98ce873a',
|
|
49
|
-
* { text: 'This is the edited message content' },
|
|
50
54
|
* );
|
|
51
55
|
* ```
|
|
52
56
|
*/
|
|
53
|
-
|
|
57
|
+
retrieve(messageID: string, options?: RequestOptions): APIPromise<Message>;
|
|
54
58
|
/**
|
|
55
59
|
* Deletes a message from the Linq API only. This does NOT unsend or remove the
|
|
56
60
|
* message from the actual chat — recipients will still see the message.
|
|
@@ -87,24 +91,20 @@ export declare class Messages extends APIResource {
|
|
|
87
91
|
*/
|
|
88
92
|
addReaction(messageID: string, body: MessageAddReactionParams, options?: RequestOptions): APIPromise<MessageAddReactionResponse>;
|
|
89
93
|
/**
|
|
90
|
-
*
|
|
91
|
-
* thread, returns the originator message and all replies in chronological order.
|
|
92
|
-
*
|
|
93
|
-
* If the message is not part of a thread, returns just that single message.
|
|
94
|
+
* Edit the text content of a specific part of a previously sent message.
|
|
94
95
|
*
|
|
95
|
-
*
|
|
96
|
+
* **Note:** A message can be edited up to 5 times, and only within 15 minutes of
|
|
97
|
+
* when it was originally sent.
|
|
96
98
|
*
|
|
97
99
|
* @example
|
|
98
100
|
* ```ts
|
|
99
|
-
*
|
|
100
|
-
* for await (const message of client.messages.listMessagesThread(
|
|
101
|
+
* const message = await client.messages.update(
|
|
101
102
|
* '69a37c7d-af4f-4b5e-af42-e28e98ce873a',
|
|
102
|
-
*
|
|
103
|
-
*
|
|
104
|
-
* }
|
|
103
|
+
* { text: 'This is the edited message content' },
|
|
104
|
+
* );
|
|
105
105
|
* ```
|
|
106
106
|
*/
|
|
107
|
-
|
|
107
|
+
update(messageID: string, body: MessageUpdateParams, options?: RequestOptions): APIPromise<Message>;
|
|
108
108
|
}
|
|
109
109
|
export type MessagesListMessagesPagination = ListMessagesPagination<Message>;
|
|
110
110
|
export interface Message {
|
|
@@ -215,15 +215,11 @@ export interface MessageAddReactionResponse {
|
|
|
215
215
|
status?: string;
|
|
216
216
|
trace_id?: string;
|
|
217
217
|
}
|
|
218
|
-
export interface
|
|
219
|
-
/**
|
|
220
|
-
* New text content for the message part
|
|
221
|
-
*/
|
|
222
|
-
text: string;
|
|
218
|
+
export interface MessageListMessagesThreadParams extends ListMessagesPaginationParams {
|
|
223
219
|
/**
|
|
224
|
-
*
|
|
220
|
+
* Sort order for messages (asc = oldest first, desc = newest first)
|
|
225
221
|
*/
|
|
226
|
-
|
|
222
|
+
order?: 'asc' | 'desc';
|
|
227
223
|
}
|
|
228
224
|
export interface MessageAddReactionParams {
|
|
229
225
|
/**
|
|
@@ -247,13 +243,17 @@ export interface MessageAddReactionParams {
|
|
|
247
243
|
*/
|
|
248
244
|
part_index?: number;
|
|
249
245
|
}
|
|
250
|
-
export interface
|
|
246
|
+
export interface MessageUpdateParams {
|
|
251
247
|
/**
|
|
252
|
-
*
|
|
248
|
+
* New text content for the message part
|
|
253
249
|
*/
|
|
254
|
-
|
|
250
|
+
text: string;
|
|
251
|
+
/**
|
|
252
|
+
* Index of the message part to edit. Defaults to 0.
|
|
253
|
+
*/
|
|
254
|
+
part_index?: number;
|
|
255
255
|
}
|
|
256
256
|
export declare namespace Messages {
|
|
257
|
-
export { type Message as Message, type MessageEffect as MessageEffect, type ReplyTo as ReplyTo, type MessageAddReactionResponse as MessageAddReactionResponse, type MessagesListMessagesPagination as MessagesListMessagesPagination, type
|
|
257
|
+
export { type Message as Message, type MessageEffect as MessageEffect, type ReplyTo as ReplyTo, type MessageAddReactionResponse as MessageAddReactionResponse, type MessagesListMessagesPagination as MessagesListMessagesPagination, type MessageListMessagesThreadParams as MessageListMessagesThreadParams, type MessageAddReactionParams as MessageAddReactionParams, type MessageUpdateParams as MessageUpdateParams, };
|
|
258
258
|
}
|
|
259
259
|
//# sourceMappingURL=messages.d.ts.map
|