@linqapp/sdk 0.1.5 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +36 -0
- package/README.md +31 -0
- package/client.d.mts +299 -7
- package/client.d.mts.map +1 -1
- package/client.d.ts +299 -7
- package/client.d.ts.map +1 -1
- package/client.js +294 -12
- package/client.js.map +1 -1
- package/client.mjs +294 -12
- package/client.mjs.map +1 -1
- package/core/pagination.d.mts +69 -0
- package/core/pagination.d.mts.map +1 -0
- package/core/pagination.d.ts +69 -0
- package/core/pagination.d.ts.map +1 -0
- package/core/pagination.js +125 -0
- package/core/pagination.js.map +1 -0
- package/core/pagination.mjs +118 -0
- package/core/pagination.mjs.map +1 -0
- package/index.d.mts +1 -0
- package/index.d.mts.map +1 -1
- package/index.d.ts +1 -0
- package/index.d.ts.map +1 -1
- package/index.js +3 -1
- package/index.js.map +1 -1
- package/index.mjs +1 -0
- package/index.mjs.map +1 -1
- package/internal/tslib.js +18 -18
- package/internal/utils/query.d.mts +5 -0
- package/internal/utils/query.d.mts.map +1 -0
- package/internal/utils/query.d.ts +5 -0
- package/internal/utils/query.d.ts.map +1 -0
- package/internal/utils/query.js +23 -0
- package/internal/utils/query.js.map +1 -0
- package/internal/utils/query.mjs +20 -0
- package/internal/utils/query.mjs.map +1 -0
- package/internal/utils.d.mts +1 -0
- package/internal/utils.d.ts +1 -0
- package/internal/utils.js +1 -0
- package/internal/utils.js.map +1 -1
- package/internal/utils.mjs +1 -0
- package/package.json +11 -1
- package/pagination.d.mts +2 -0
- package/pagination.d.mts.map +1 -0
- package/pagination.d.ts +2 -0
- package/pagination.d.ts.map +1 -0
- package/pagination.js +6 -0
- package/pagination.js.map +1 -0
- package/pagination.mjs +2 -0
- package/pagination.mjs.map +1 -0
- package/resources/attachments.d.mts +64 -0
- package/resources/attachments.d.mts.map +1 -1
- package/resources/attachments.d.ts +64 -0
- package/resources/attachments.d.ts.map +1 -1
- package/resources/attachments.js +64 -0
- package/resources/attachments.js.map +1 -1
- package/resources/attachments.mjs +64 -0
- package/resources/attachments.mjs.map +1 -1
- package/resources/capability.d.mts +12 -9
- package/resources/capability.d.mts.map +1 -1
- package/resources/capability.d.ts +12 -9
- package/resources/capability.d.ts.map +1 -1
- package/resources/capability.js +7 -4
- package/resources/capability.js.map +1 -1
- package/resources/capability.mjs +7 -4
- package/resources/capability.mjs.map +1 -1
- package/resources/chats/chats.d.mts +76 -97
- package/resources/chats/chats.d.mts.map +1 -1
- package/resources/chats/chats.d.ts +76 -97
- package/resources/chats/chats.d.ts.map +1 -1
- package/resources/chats/chats.js +8 -4
- package/resources/chats/chats.js.map +1 -1
- package/resources/chats/chats.mjs +9 -5
- package/resources/chats/chats.mjs.map +1 -1
- package/resources/chats/index.d.mts +2 -2
- package/resources/chats/index.d.mts.map +1 -1
- package/resources/chats/index.d.ts +2 -2
- package/resources/chats/index.d.ts.map +1 -1
- package/resources/chats/index.js.map +1 -1
- package/resources/chats/index.mjs.map +1 -1
- package/resources/chats/messages.d.mts +21 -25
- package/resources/chats/messages.d.mts.map +1 -1
- package/resources/chats/messages.d.ts +21 -25
- package/resources/chats/messages.d.ts.map +1 -1
- package/resources/chats/messages.js +16 -3
- package/resources/chats/messages.js.map +1 -1
- package/resources/chats/messages.mjs +16 -3
- package/resources/chats/messages.mjs.map +1 -1
- package/resources/chats/participants.d.mts +18 -0
- package/resources/chats/participants.d.mts.map +1 -1
- package/resources/chats/participants.d.ts +18 -0
- package/resources/chats/participants.d.ts.map +1 -1
- package/resources/chats/participants.js +18 -0
- package/resources/chats/participants.js.map +1 -1
- package/resources/chats/participants.mjs +18 -0
- package/resources/chats/participants.mjs.map +1 -1
- package/resources/chats/typing.d.mts +18 -0
- package/resources/chats/typing.d.mts.map +1 -1
- package/resources/chats/typing.d.ts +18 -0
- package/resources/chats/typing.d.ts.map +1 -1
- package/resources/chats/typing.js +18 -0
- package/resources/chats/typing.js.map +1 -1
- package/resources/chats/typing.mjs +18 -0
- package/resources/chats/typing.mjs.map +1 -1
- package/resources/index.d.mts +4 -3
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +4 -3
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +3 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -0
- package/resources/index.mjs.map +1 -1
- package/resources/messages.d.mts +37 -72
- package/resources/messages.d.mts.map +1 -1
- package/resources/messages.d.ts +37 -72
- package/resources/messages.d.ts.map +1 -1
- package/resources/messages.js +34 -4
- package/resources/messages.js.map +1 -1
- package/resources/messages.mjs +34 -4
- package/resources/messages.mjs.map +1 -1
- package/resources/phone-numbers.d.mts +9 -0
- package/resources/phone-numbers.d.mts.map +1 -1
- package/resources/phone-numbers.d.ts +9 -0
- package/resources/phone-numbers.d.ts.map +1 -1
- package/resources/phone-numbers.js +9 -0
- package/resources/phone-numbers.js.map +1 -1
- package/resources/phone-numbers.mjs +9 -0
- package/resources/phone-numbers.mjs.map +1 -1
- package/resources/phonenumbers.d.mts +9 -0
- package/resources/phonenumbers.d.mts.map +1 -1
- package/resources/phonenumbers.d.ts +9 -0
- package/resources/phonenumbers.d.ts.map +1 -1
- package/resources/phonenumbers.js +9 -0
- package/resources/phonenumbers.js.map +1 -1
- package/resources/phonenumbers.mjs +9 -0
- package/resources/phonenumbers.mjs.map +1 -1
- package/resources/shared.d.mts +51 -0
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +51 -0
- package/resources/shared.d.ts.map +1 -1
- package/resources/webhook-events.d.mts +90 -1
- package/resources/webhook-events.d.mts.map +1 -1
- package/resources/webhook-events.d.ts +90 -1
- package/resources/webhook-events.d.ts.map +1 -1
- package/resources/webhook-events.js +89 -0
- package/resources/webhook-events.js.map +1 -1
- package/resources/webhook-events.mjs +89 -0
- package/resources/webhook-events.mjs.map +1 -1
- package/resources/webhook-subscriptions.d.mts +89 -0
- package/resources/webhook-subscriptions.d.mts.map +1 -1
- package/resources/webhook-subscriptions.d.ts +89 -0
- package/resources/webhook-subscriptions.d.ts.map +1 -1
- package/resources/webhook-subscriptions.js +89 -0
- package/resources/webhook-subscriptions.js.map +1 -1
- package/resources/webhook-subscriptions.mjs +89 -0
- package/resources/webhook-subscriptions.mjs.map +1 -1
- package/resources/webhooks.d.mts +2506 -0
- package/resources/webhooks.d.mts.map +1 -0
- package/resources/webhooks.d.ts +2506 -0
- package/resources/webhooks.d.ts.map +1 -0
- package/resources/webhooks.js +12 -0
- package/resources/webhooks.js.map +1 -0
- package/resources/webhooks.mjs +8 -0
- package/resources/webhooks.mjs.map +1 -0
- package/src/client.ts +443 -37
- package/src/core/pagination.ts +212 -0
- package/src/index.ts +1 -0
- package/src/internal/utils/query.ts +23 -0
- package/src/internal/utils.ts +1 -0
- package/src/pagination.ts +2 -0
- package/src/resources/attachments.ts +64 -0
- package/src/resources/capability.ts +17 -14
- package/src/resources/chats/chats.ts +86 -115
- package/src/resources/chats/index.ts +4 -3
- package/src/resources/chats/messages.ts +30 -30
- package/src/resources/chats/participants.ts +18 -0
- package/src/resources/chats/typing.ts +18 -0
- package/src/resources/index.ts +55 -10
- package/src/resources/messages.ts +49 -90
- package/src/resources/phone-numbers.ts +9 -0
- package/src/resources/phonenumbers.ts +9 -0
- package/src/resources/shared.ts +62 -0
- package/src/resources/webhook-events.ts +90 -0
- package/src/resources/webhook-subscriptions.ts +89 -0
- package/src/resources/webhooks.ts +3089 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -1,6 +1,70 @@
|
|
|
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
|
+
* Send files (images, videos, documents, audio) with messages by providing a URL in a media part.
|
|
6
|
+
* Pre-uploading via `POST /v3/attachments` is **optional** and only needed for specific optimization scenarios.
|
|
7
|
+
*
|
|
8
|
+
* ## Sending Media via URL (up to 10MB)
|
|
9
|
+
*
|
|
10
|
+
* Provide a publicly accessible HTTPS URL with a [supported media type](#supported-file-types) in the `url` field of a media part.
|
|
11
|
+
*
|
|
12
|
+
* ```json
|
|
13
|
+
* {
|
|
14
|
+
* "parts": [
|
|
15
|
+
* { "type": "media", "url": "https://your-cdn.com/images/photo.jpg" }
|
|
16
|
+
* ]
|
|
17
|
+
* }
|
|
18
|
+
* ```
|
|
19
|
+
*
|
|
20
|
+
* This works with any URL you already host — no pre-upload step required. **Maximum file size: 10MB.**
|
|
21
|
+
*
|
|
22
|
+
* ## Pre-Upload (required for files over 10MB)
|
|
23
|
+
*
|
|
24
|
+
* Use `POST /v3/attachments` when you want to:
|
|
25
|
+
* - **Send files larger than 10MB** (up to 100MB) — URL-based downloads are limited to 10MB
|
|
26
|
+
* - **Send the same file to many recipients** — upload once, reuse the `attachment_id` without re-downloading each time
|
|
27
|
+
* - **Reduce message send latency** — the file is already stored, so sending is faster
|
|
28
|
+
*
|
|
29
|
+
* **How it works:**
|
|
30
|
+
* 1. `POST /v3/attachments` with file metadata → returns a presigned `upload_url` (valid for **15 minutes**) and a permanent `attachment_id`
|
|
31
|
+
* 2. PUT the raw file bytes to the `upload_url` with the `required_headers` (no JSON or multipart — just the binary content)
|
|
32
|
+
* 3. Reference the `attachment_id` in your media part when sending messages (no expiration)
|
|
33
|
+
*
|
|
34
|
+
* **Key difference:** When you provide an external `url`, we download and process the file on every send.
|
|
35
|
+
* When you use a pre-uploaded `attachment_id`, the file is already stored — so repeated sends skip the download step entirely.
|
|
36
|
+
*
|
|
37
|
+
* ## Domain Allowlisting
|
|
38
|
+
*
|
|
39
|
+
* Attachment URLs in API responses are served from `cdn.linqapp.com`. This includes:
|
|
40
|
+
* - `url` fields in media and voice memo message parts
|
|
41
|
+
* - `download_url` fields in attachment and upload response objects
|
|
42
|
+
*
|
|
43
|
+
* If your application enforces domain allowlists (e.g., for SSRF protection), add:
|
|
44
|
+
*
|
|
45
|
+
* ```
|
|
46
|
+
* cdn.linqapp.com
|
|
47
|
+
* ```
|
|
48
|
+
*
|
|
49
|
+
* ## Supported File Types
|
|
50
|
+
*
|
|
51
|
+
* - **Images:** JPEG, PNG, GIF, HEIC, HEIF, TIFF, BMP
|
|
52
|
+
* - **Videos:** MP4, MOV, M4V
|
|
53
|
+
* - **Audio:** M4A, AAC, MP3, WAV, AIFF, CAF, AMR
|
|
54
|
+
* - **Documents:** PDF, TXT, RTF, CSV, Office formats, ZIP
|
|
55
|
+
* - **Contact & Calendar:** VCF, ICS
|
|
56
|
+
*
|
|
57
|
+
* ## Audio: Attachment vs Voice Memo
|
|
58
|
+
*
|
|
59
|
+
* Audio files sent as media parts appear as **downloadable file attachments** in iMessage.
|
|
60
|
+
* To send audio as an **iMessage voice memo bubble** (with native inline playback UI),
|
|
61
|
+
* use the dedicated `POST /v3/chats/{chatId}/voicememo` endpoint instead.
|
|
62
|
+
*
|
|
63
|
+
* ## File Size Limits
|
|
64
|
+
*
|
|
65
|
+
* - **URL-based (`url` field):** 10MB maximum
|
|
66
|
+
* - **Pre-upload (`attachment_id`):** 100MB maximum
|
|
67
|
+
*/
|
|
4
68
|
export declare class Attachments extends APIResource {
|
|
5
69
|
/**
|
|
6
70
|
* **This endpoint is optional.** You can send media by simply providing a URL in
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"attachments.d.ts","sourceRoot":"","sources":["../src/resources/attachments.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB,qBAAa,WAAY,SAAQ,WAAW;IAC1C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA0EG;IACH,MAAM,CAAC,IAAI,EAAE,sBAAsB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,wBAAw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B;IACzC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACH,YAAY,EAAE,oBAAoB,CAAC;IAEnC;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,MAAM,EAAE,SAAS,GAAG,UAAU,GAAG,QAAQ,CAAC;IAE1C;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,sBAAsB;IACrC;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACH,YAAY,EAAE,oBAAoB,CAAC;IAEnC;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,CAAC,OAAO,WAAW,WAAW,CAAC;IACnC,OAAO,EACL,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,sBAAsB,IAAI,sBAAsB,GACtD,CAAC;CACH"}
|
package/resources/attachments.js
CHANGED
|
@@ -4,6 +4,70 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
4
4
|
exports.Attachments = void 0;
|
|
5
5
|
const resource_1 = require("../core/resource.js");
|
|
6
6
|
const path_1 = require("../internal/utils/path.js");
|
|
7
|
+
/**
|
|
8
|
+
* Send files (images, videos, documents, audio) with messages by providing a URL in a media part.
|
|
9
|
+
* Pre-uploading via `POST /v3/attachments` is **optional** and only needed for specific optimization scenarios.
|
|
10
|
+
*
|
|
11
|
+
* ## Sending Media via URL (up to 10MB)
|
|
12
|
+
*
|
|
13
|
+
* Provide a publicly accessible HTTPS URL with a [supported media type](#supported-file-types) in the `url` field of a media part.
|
|
14
|
+
*
|
|
15
|
+
* ```json
|
|
16
|
+
* {
|
|
17
|
+
* "parts": [
|
|
18
|
+
* { "type": "media", "url": "https://your-cdn.com/images/photo.jpg" }
|
|
19
|
+
* ]
|
|
20
|
+
* }
|
|
21
|
+
* ```
|
|
22
|
+
*
|
|
23
|
+
* This works with any URL you already host — no pre-upload step required. **Maximum file size: 10MB.**
|
|
24
|
+
*
|
|
25
|
+
* ## Pre-Upload (required for files over 10MB)
|
|
26
|
+
*
|
|
27
|
+
* Use `POST /v3/attachments` when you want to:
|
|
28
|
+
* - **Send files larger than 10MB** (up to 100MB) — URL-based downloads are limited to 10MB
|
|
29
|
+
* - **Send the same file to many recipients** — upload once, reuse the `attachment_id` without re-downloading each time
|
|
30
|
+
* - **Reduce message send latency** — the file is already stored, so sending is faster
|
|
31
|
+
*
|
|
32
|
+
* **How it works:**
|
|
33
|
+
* 1. `POST /v3/attachments` with file metadata → returns a presigned `upload_url` (valid for **15 minutes**) and a permanent `attachment_id`
|
|
34
|
+
* 2. PUT the raw file bytes to the `upload_url` with the `required_headers` (no JSON or multipart — just the binary content)
|
|
35
|
+
* 3. Reference the `attachment_id` in your media part when sending messages (no expiration)
|
|
36
|
+
*
|
|
37
|
+
* **Key difference:** When you provide an external `url`, we download and process the file on every send.
|
|
38
|
+
* When you use a pre-uploaded `attachment_id`, the file is already stored — so repeated sends skip the download step entirely.
|
|
39
|
+
*
|
|
40
|
+
* ## Domain Allowlisting
|
|
41
|
+
*
|
|
42
|
+
* Attachment URLs in API responses are served from `cdn.linqapp.com`. This includes:
|
|
43
|
+
* - `url` fields in media and voice memo message parts
|
|
44
|
+
* - `download_url` fields in attachment and upload response objects
|
|
45
|
+
*
|
|
46
|
+
* If your application enforces domain allowlists (e.g., for SSRF protection), add:
|
|
47
|
+
*
|
|
48
|
+
* ```
|
|
49
|
+
* cdn.linqapp.com
|
|
50
|
+
* ```
|
|
51
|
+
*
|
|
52
|
+
* ## Supported File Types
|
|
53
|
+
*
|
|
54
|
+
* - **Images:** JPEG, PNG, GIF, HEIC, HEIF, TIFF, BMP
|
|
55
|
+
* - **Videos:** MP4, MOV, M4V
|
|
56
|
+
* - **Audio:** M4A, AAC, MP3, WAV, AIFF, CAF, AMR
|
|
57
|
+
* - **Documents:** PDF, TXT, RTF, CSV, Office formats, ZIP
|
|
58
|
+
* - **Contact & Calendar:** VCF, ICS
|
|
59
|
+
*
|
|
60
|
+
* ## Audio: Attachment vs Voice Memo
|
|
61
|
+
*
|
|
62
|
+
* Audio files sent as media parts appear as **downloadable file attachments** in iMessage.
|
|
63
|
+
* To send audio as an **iMessage voice memo bubble** (with native inline playback UI),
|
|
64
|
+
* use the dedicated `POST /v3/chats/{chatId}/voicememo` endpoint instead.
|
|
65
|
+
*
|
|
66
|
+
* ## File Size Limits
|
|
67
|
+
*
|
|
68
|
+
* - **URL-based (`url` field):** 10MB maximum
|
|
69
|
+
* - **Pre-upload (`attachment_id`):** 100MB maximum
|
|
70
|
+
*/
|
|
7
71
|
class Attachments extends resource_1.APIResource {
|
|
8
72
|
/**
|
|
9
73
|
* **This endpoint is optional.** You can send media by simply providing a URL in
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"attachments.js","sourceRoot":"","sources":["../src/resources/attachments.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAG/C,oDAA8C;AAE9C,MAAa,WAAY,SAAQ,sBAAW;IAC1C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA0EG;IACH,MAAM,CAAC,IAA4B,EAAE,OAAwB;QAC3D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,iBAAiB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACpE,CAAC;IAED;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,YAAoB,EAAE,OAAwB;QACrD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,mBAAmB,YAAY,EAAE,EAAE,OAAO,CAAC,CAAC;IAC1E,CAAC;CACF;AA9FD,kCA8FC"}
|
|
1
|
+
{"version":3,"file":"attachments.js","sourceRoot":"","sources":["../src/resources/attachments.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAG/C,oDAA8C;AAE9C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+DG;AACH,MAAa,WAAY,SAAQ,sBAAW;IAC1C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA0EG;IACH,MAAM,CAAC,IAA4B,EAAE,OAAwB;QAC3D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,iBAAiB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACpE,CAAC;IAED;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,YAAoB,EAAE,OAAwB;QACrD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,mBAAmB,YAAY,EAAE,EAAE,OAAO,CAAC,CAAC;IAC1E,CAAC;CACF;AA9FD,kCA8FC"}
|
|
@@ -1,6 +1,70 @@
|
|
|
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
|
+
* Send files (images, videos, documents, audio) with messages by providing a URL in a media part.
|
|
6
|
+
* Pre-uploading via `POST /v3/attachments` is **optional** and only needed for specific optimization scenarios.
|
|
7
|
+
*
|
|
8
|
+
* ## Sending Media via URL (up to 10MB)
|
|
9
|
+
*
|
|
10
|
+
* Provide a publicly accessible HTTPS URL with a [supported media type](#supported-file-types) in the `url` field of a media part.
|
|
11
|
+
*
|
|
12
|
+
* ```json
|
|
13
|
+
* {
|
|
14
|
+
* "parts": [
|
|
15
|
+
* { "type": "media", "url": "https://your-cdn.com/images/photo.jpg" }
|
|
16
|
+
* ]
|
|
17
|
+
* }
|
|
18
|
+
* ```
|
|
19
|
+
*
|
|
20
|
+
* This works with any URL you already host — no pre-upload step required. **Maximum file size: 10MB.**
|
|
21
|
+
*
|
|
22
|
+
* ## Pre-Upload (required for files over 10MB)
|
|
23
|
+
*
|
|
24
|
+
* Use `POST /v3/attachments` when you want to:
|
|
25
|
+
* - **Send files larger than 10MB** (up to 100MB) — URL-based downloads are limited to 10MB
|
|
26
|
+
* - **Send the same file to many recipients** — upload once, reuse the `attachment_id` without re-downloading each time
|
|
27
|
+
* - **Reduce message send latency** — the file is already stored, so sending is faster
|
|
28
|
+
*
|
|
29
|
+
* **How it works:**
|
|
30
|
+
* 1. `POST /v3/attachments` with file metadata → returns a presigned `upload_url` (valid for **15 minutes**) and a permanent `attachment_id`
|
|
31
|
+
* 2. PUT the raw file bytes to the `upload_url` with the `required_headers` (no JSON or multipart — just the binary content)
|
|
32
|
+
* 3. Reference the `attachment_id` in your media part when sending messages (no expiration)
|
|
33
|
+
*
|
|
34
|
+
* **Key difference:** When you provide an external `url`, we download and process the file on every send.
|
|
35
|
+
* When you use a pre-uploaded `attachment_id`, the file is already stored — so repeated sends skip the download step entirely.
|
|
36
|
+
*
|
|
37
|
+
* ## Domain Allowlisting
|
|
38
|
+
*
|
|
39
|
+
* Attachment URLs in API responses are served from `cdn.linqapp.com`. This includes:
|
|
40
|
+
* - `url` fields in media and voice memo message parts
|
|
41
|
+
* - `download_url` fields in attachment and upload response objects
|
|
42
|
+
*
|
|
43
|
+
* If your application enforces domain allowlists (e.g., for SSRF protection), add:
|
|
44
|
+
*
|
|
45
|
+
* ```
|
|
46
|
+
* cdn.linqapp.com
|
|
47
|
+
* ```
|
|
48
|
+
*
|
|
49
|
+
* ## Supported File Types
|
|
50
|
+
*
|
|
51
|
+
* - **Images:** JPEG, PNG, GIF, HEIC, HEIF, TIFF, BMP
|
|
52
|
+
* - **Videos:** MP4, MOV, M4V
|
|
53
|
+
* - **Audio:** M4A, AAC, MP3, WAV, AIFF, CAF, AMR
|
|
54
|
+
* - **Documents:** PDF, TXT, RTF, CSV, Office formats, ZIP
|
|
55
|
+
* - **Contact & Calendar:** VCF, ICS
|
|
56
|
+
*
|
|
57
|
+
* ## Audio: Attachment vs Voice Memo
|
|
58
|
+
*
|
|
59
|
+
* Audio files sent as media parts appear as **downloadable file attachments** in iMessage.
|
|
60
|
+
* To send audio as an **iMessage voice memo bubble** (with native inline playback UI),
|
|
61
|
+
* use the dedicated `POST /v3/chats/{chatId}/voicememo` endpoint instead.
|
|
62
|
+
*
|
|
63
|
+
* ## File Size Limits
|
|
64
|
+
*
|
|
65
|
+
* - **URL-based (`url` field):** 10MB maximum
|
|
66
|
+
* - **Pre-upload (`attachment_id`):** 100MB maximum
|
|
67
|
+
*/
|
|
4
68
|
export class Attachments extends APIResource {
|
|
5
69
|
/**
|
|
6
70
|
* **This endpoint is optional.** You can send media by simply providing a URL in
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"attachments.mjs","sourceRoot":"","sources":["../src/resources/attachments.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAGf,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,WAAY,SAAQ,WAAW;IAC1C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA0EG;IACH,MAAM,CAAC,IAA4B,EAAE,OAAwB;QAC3D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,iBAAiB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACpE,CAAC;IAED;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,YAAoB,EAAE,OAAwB;QACrD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,mBAAmB,YAAY,EAAE,EAAE,OAAO,CAAC,CAAC;IAC1E,CAAC;CACF"}
|
|
1
|
+
{"version":3,"file":"attachments.mjs","sourceRoot":"","sources":["../src/resources/attachments.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAGf,EAAE,IAAI,EAAE;AAEf;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+DG;AACH,MAAM,OAAO,WAAY,SAAQ,WAAW;IAC1C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA0EG;IACH,MAAM,CAAC,IAA4B,EAAE,OAAwB;QAC3D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,iBAAiB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACpE,CAAC;IAED;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,YAAoB,EAAE,OAAwB;QACrD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,mBAAmB,YAAY,EAAE,EAAE,OAAO,CAAC,CAAC;IAC1E,CAAC;CACF"}
|
|
@@ -1,6 +1,9 @@
|
|
|
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
|
+
* Check whether a recipient address supports iMessage or RCS before sending a message.
|
|
6
|
+
*/
|
|
4
7
|
export declare class Capability extends APIResource {
|
|
5
8
|
/**
|
|
6
9
|
* Check whether a recipient address (phone number or email) is reachable via
|
|
@@ -8,25 +11,25 @@ export declare class Capability extends APIResource {
|
|
|
8
11
|
*
|
|
9
12
|
* @example
|
|
10
13
|
* ```ts
|
|
11
|
-
* const response = await client.capability.
|
|
14
|
+
* const response = await client.capability.checkiMessage({
|
|
12
15
|
* address: '+15551234567',
|
|
13
16
|
* });
|
|
14
17
|
* ```
|
|
15
18
|
*/
|
|
16
|
-
|
|
19
|
+
checkiMessage(body: CapabilityCheckiMessageParams, options?: RequestOptions): APIPromise<CapabilityCheckiMessageResponse>;
|
|
17
20
|
/**
|
|
18
21
|
* Check whether a recipient address (phone number) supports RCS messaging.
|
|
19
22
|
*
|
|
20
23
|
* @example
|
|
21
24
|
* ```ts
|
|
22
|
-
* const response = await client.capability.
|
|
25
|
+
* const response = await client.capability.checkRCS({
|
|
23
26
|
* address: '+15551234567',
|
|
24
27
|
* });
|
|
25
28
|
* ```
|
|
26
29
|
*/
|
|
27
|
-
|
|
30
|
+
checkRCS(body: CapabilityCheckRCSParams, options?: RequestOptions): APIPromise<CapabilityCheckRCSResponse>;
|
|
28
31
|
}
|
|
29
|
-
export interface
|
|
32
|
+
export interface CapabilityCheckiMessageResponse {
|
|
30
33
|
/**
|
|
31
34
|
* The recipient address that was checked
|
|
32
35
|
*/
|
|
@@ -36,7 +39,7 @@ export interface CapabilityCheckImessageResponse {
|
|
|
36
39
|
*/
|
|
37
40
|
available: boolean;
|
|
38
41
|
}
|
|
39
|
-
export interface
|
|
42
|
+
export interface CapabilityCheckRCSResponse {
|
|
40
43
|
/**
|
|
41
44
|
* The recipient address that was checked
|
|
42
45
|
*/
|
|
@@ -46,7 +49,7 @@ export interface CapabilityCheckRcsResponse {
|
|
|
46
49
|
*/
|
|
47
50
|
available: boolean;
|
|
48
51
|
}
|
|
49
|
-
export interface
|
|
52
|
+
export interface CapabilityCheckiMessageParams {
|
|
50
53
|
/**
|
|
51
54
|
* The recipient phone number or email address to check
|
|
52
55
|
*/
|
|
@@ -57,7 +60,7 @@ export interface CapabilityCheckImessageParams {
|
|
|
57
60
|
*/
|
|
58
61
|
from?: string;
|
|
59
62
|
}
|
|
60
|
-
export interface
|
|
63
|
+
export interface CapabilityCheckRCSParams {
|
|
61
64
|
/**
|
|
62
65
|
* The recipient phone number or email address to check
|
|
63
66
|
*/
|
|
@@ -69,6 +72,6 @@ export interface CapabilityCheckRcsParams {
|
|
|
69
72
|
from?: string;
|
|
70
73
|
}
|
|
71
74
|
export declare namespace Capability {
|
|
72
|
-
export { type
|
|
75
|
+
export { type CapabilityCheckiMessageResponse as CapabilityCheckiMessageResponse, type CapabilityCheckRCSResponse as CapabilityCheckRCSResponse, type CapabilityCheckiMessageParams as CapabilityCheckiMessageParams, type CapabilityCheckRCSParams as CapabilityCheckRCSParams, };
|
|
73
76
|
}
|
|
74
77
|
//# sourceMappingURL=capability.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capability.d.mts","sourceRoot":"","sources":["../src/resources/capability.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,UAAW,SAAQ,WAAW;IACzC;;;;;;;;;;OAUG;IACH,aAAa,CACX,IAAI,EAAE,6BAA6B,EACnC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,+BAA+B,CAAC;IAI9C;;;;;;;;;OASG;IACH,QAAQ,CAAC,IAAI,EAAE,wBAAwB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,0BAA0B,CAAC;CAG3G;AAED,MAAM,WAAW,+BAA+B;IAC9C;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,SAAS,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,0BAA0B;IACzC;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,SAAS,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,6BAA6B;IAC5C;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,CAAC,OAAO,WAAW,UAAU,CAAC;IAClC,OAAO,EACL,KAAK,+BAA+B,IAAI,+BAA+B,EACvE,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,wBAAwB,IAAI,wBAAwB,GAC1D,CAAC;CACH"}
|
|
1
|
+
{"version":3,"file":"capability.d.mts","sourceRoot":"","sources":["../src/resources/capability.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB;;GAEG;AACH,qBAAa,UAAW,SAAQ,WAAW;IACzC;;;;;;;;;;OAUG;IACH,aAAa,CACX,IAAI,EAAE,6BAA6B,EACnC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,+BAA+B,CAAC;IAI9C;;;;;;;;;OASG;IACH,QAAQ,CAAC,IAAI,EAAE,wBAAwB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,0BAA0B,CAAC;CAG3G;AAED,MAAM,WAAW,+BAA+B;IAC9C;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,SAAS,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,0BAA0B;IACzC;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,SAAS,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,6BAA6B;IAC5C;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,CAAC,OAAO,WAAW,UAAU,CAAC;IAClC,OAAO,EACL,KAAK,+BAA+B,IAAI,+BAA+B,EACvE,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,wBAAwB,IAAI,wBAAwB,GAC1D,CAAC;CACH"}
|
|
@@ -1,6 +1,9 @@
|
|
|
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
|
+
* Check whether a recipient address supports iMessage or RCS before sending a message.
|
|
6
|
+
*/
|
|
4
7
|
export declare class Capability extends APIResource {
|
|
5
8
|
/**
|
|
6
9
|
* Check whether a recipient address (phone number or email) is reachable via
|
|
@@ -8,25 +11,25 @@ export declare class Capability extends APIResource {
|
|
|
8
11
|
*
|
|
9
12
|
* @example
|
|
10
13
|
* ```ts
|
|
11
|
-
* const response = await client.capability.
|
|
14
|
+
* const response = await client.capability.checkiMessage({
|
|
12
15
|
* address: '+15551234567',
|
|
13
16
|
* });
|
|
14
17
|
* ```
|
|
15
18
|
*/
|
|
16
|
-
|
|
19
|
+
checkiMessage(body: CapabilityCheckiMessageParams, options?: RequestOptions): APIPromise<CapabilityCheckiMessageResponse>;
|
|
17
20
|
/**
|
|
18
21
|
* Check whether a recipient address (phone number) supports RCS messaging.
|
|
19
22
|
*
|
|
20
23
|
* @example
|
|
21
24
|
* ```ts
|
|
22
|
-
* const response = await client.capability.
|
|
25
|
+
* const response = await client.capability.checkRCS({
|
|
23
26
|
* address: '+15551234567',
|
|
24
27
|
* });
|
|
25
28
|
* ```
|
|
26
29
|
*/
|
|
27
|
-
|
|
30
|
+
checkRCS(body: CapabilityCheckRCSParams, options?: RequestOptions): APIPromise<CapabilityCheckRCSResponse>;
|
|
28
31
|
}
|
|
29
|
-
export interface
|
|
32
|
+
export interface CapabilityCheckiMessageResponse {
|
|
30
33
|
/**
|
|
31
34
|
* The recipient address that was checked
|
|
32
35
|
*/
|
|
@@ -36,7 +39,7 @@ export interface CapabilityCheckImessageResponse {
|
|
|
36
39
|
*/
|
|
37
40
|
available: boolean;
|
|
38
41
|
}
|
|
39
|
-
export interface
|
|
42
|
+
export interface CapabilityCheckRCSResponse {
|
|
40
43
|
/**
|
|
41
44
|
* The recipient address that was checked
|
|
42
45
|
*/
|
|
@@ -46,7 +49,7 @@ export interface CapabilityCheckRcsResponse {
|
|
|
46
49
|
*/
|
|
47
50
|
available: boolean;
|
|
48
51
|
}
|
|
49
|
-
export interface
|
|
52
|
+
export interface CapabilityCheckiMessageParams {
|
|
50
53
|
/**
|
|
51
54
|
* The recipient phone number or email address to check
|
|
52
55
|
*/
|
|
@@ -57,7 +60,7 @@ export interface CapabilityCheckImessageParams {
|
|
|
57
60
|
*/
|
|
58
61
|
from?: string;
|
|
59
62
|
}
|
|
60
|
-
export interface
|
|
63
|
+
export interface CapabilityCheckRCSParams {
|
|
61
64
|
/**
|
|
62
65
|
* The recipient phone number or email address to check
|
|
63
66
|
*/
|
|
@@ -69,6 +72,6 @@ export interface CapabilityCheckRcsParams {
|
|
|
69
72
|
from?: string;
|
|
70
73
|
}
|
|
71
74
|
export declare namespace Capability {
|
|
72
|
-
export { type
|
|
75
|
+
export { type CapabilityCheckiMessageResponse as CapabilityCheckiMessageResponse, type CapabilityCheckRCSResponse as CapabilityCheckRCSResponse, type CapabilityCheckiMessageParams as CapabilityCheckiMessageParams, type CapabilityCheckRCSParams as CapabilityCheckRCSParams, };
|
|
73
76
|
}
|
|
74
77
|
//# sourceMappingURL=capability.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capability.d.ts","sourceRoot":"","sources":["../src/resources/capability.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,UAA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EAAE,cAAc,GACvB,UAAU,CAAC,+BAA+B,CAAC;IAI9C;;;;;;;;;OASG;IACH,QAAQ,CAAC,IAAI,EAAE,wBAAwB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,0BAA0B,CAAC;CAG3G;AAED,MAAM,WAAW,+BAA+B;IAC9C;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,SAAS,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,0BAA0B;IACzC;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,SAAS,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,6BAA6B;IAC5C;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,CAAC,OAAO,WAAW,UAAU,CAAC;IAClC,OAAO,EACL,KAAK,+BAA+B,IAAI,+BAA+B,EACvE,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,wBAAwB,IAAI,wBAAwB,GAC1D,CAAC;CACH"}
|
package/resources/capability.js
CHANGED
|
@@ -3,6 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.Capability = void 0;
|
|
5
5
|
const resource_1 = require("../core/resource.js");
|
|
6
|
+
/**
|
|
7
|
+
* Check whether a recipient address supports iMessage or RCS before sending a message.
|
|
8
|
+
*/
|
|
6
9
|
class Capability extends resource_1.APIResource {
|
|
7
10
|
/**
|
|
8
11
|
* Check whether a recipient address (phone number or email) is reachable via
|
|
@@ -10,12 +13,12 @@ class Capability extends resource_1.APIResource {
|
|
|
10
13
|
*
|
|
11
14
|
* @example
|
|
12
15
|
* ```ts
|
|
13
|
-
* const response = await client.capability.
|
|
16
|
+
* const response = await client.capability.checkiMessage({
|
|
14
17
|
* address: '+15551234567',
|
|
15
18
|
* });
|
|
16
19
|
* ```
|
|
17
20
|
*/
|
|
18
|
-
|
|
21
|
+
checkiMessage(body, options) {
|
|
19
22
|
return this._client.post('/v3/capability/check_imessage', { body, ...options });
|
|
20
23
|
}
|
|
21
24
|
/**
|
|
@@ -23,12 +26,12 @@ class Capability extends resource_1.APIResource {
|
|
|
23
26
|
*
|
|
24
27
|
* @example
|
|
25
28
|
* ```ts
|
|
26
|
-
* const response = await client.capability.
|
|
29
|
+
* const response = await client.capability.checkRCS({
|
|
27
30
|
* address: '+15551234567',
|
|
28
31
|
* });
|
|
29
32
|
* ```
|
|
30
33
|
*/
|
|
31
|
-
|
|
34
|
+
checkRCS(body, options) {
|
|
32
35
|
return this._client.post('/v3/capability/check_rcs', { body, ...options });
|
|
33
36
|
}
|
|
34
37
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capability.js","sourceRoot":"","sources":["../src/resources/capability.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAI/C,MAAa,UAAW,SAAQ,sBAAW;IACzC;;;;;;;;;;OAUG;IACH,aAAa,CACX,IAAmC,EACnC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,+BAA+B,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAClF,CAAC;IAED;;;;;;;;;OASG;IACH,QAAQ,CAAC,IAA8B,EAAE,OAAwB;QAC/D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,0BAA0B,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC7E,CAAC;CACF;AAhCD,gCAgCC"}
|
|
1
|
+
{"version":3,"file":"capability.js","sourceRoot":"","sources":["../src/resources/capability.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAI/C;;GAEG;AACH,MAAa,UAAW,SAAQ,sBAAW;IACzC;;;;;;;;;;OAUG;IACH,aAAa,CACX,IAAmC,EACnC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,+BAA+B,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAClF,CAAC;IAED;;;;;;;;;OASG;IACH,QAAQ,CAAC,IAA8B,EAAE,OAAwB;QAC/D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,0BAA0B,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC7E,CAAC;CACF;AAhCD,gCAgCC"}
|
package/resources/capability.mjs
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
import { APIResource } from "../core/resource.mjs";
|
|
3
|
+
/**
|
|
4
|
+
* Check whether a recipient address supports iMessage or RCS before sending a message.
|
|
5
|
+
*/
|
|
3
6
|
export class Capability extends APIResource {
|
|
4
7
|
/**
|
|
5
8
|
* Check whether a recipient address (phone number or email) is reachable via
|
|
@@ -7,12 +10,12 @@ export class Capability extends APIResource {
|
|
|
7
10
|
*
|
|
8
11
|
* @example
|
|
9
12
|
* ```ts
|
|
10
|
-
* const response = await client.capability.
|
|
13
|
+
* const response = await client.capability.checkiMessage({
|
|
11
14
|
* address: '+15551234567',
|
|
12
15
|
* });
|
|
13
16
|
* ```
|
|
14
17
|
*/
|
|
15
|
-
|
|
18
|
+
checkiMessage(body, options) {
|
|
16
19
|
return this._client.post('/v3/capability/check_imessage', { body, ...options });
|
|
17
20
|
}
|
|
18
21
|
/**
|
|
@@ -20,12 +23,12 @@ export class Capability extends APIResource {
|
|
|
20
23
|
*
|
|
21
24
|
* @example
|
|
22
25
|
* ```ts
|
|
23
|
-
* const response = await client.capability.
|
|
26
|
+
* const response = await client.capability.checkRCS({
|
|
24
27
|
* address: '+15551234567',
|
|
25
28
|
* });
|
|
26
29
|
* ```
|
|
27
30
|
*/
|
|
28
|
-
|
|
31
|
+
checkRCS(body, options) {
|
|
29
32
|
return this._client.post('/v3/capability/check_rcs', { body, ...options });
|
|
30
33
|
}
|
|
31
34
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capability.mjs","sourceRoot":"","sources":["../src/resources/capability.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAItB,MAAM,OAAO,UAAW,SAAQ,WAAW;IACzC;;;;;;;;;;OAUG;IACH,aAAa,CACX,IAAmC,EACnC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,+BAA+B,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAClF,CAAC;IAED;;;;;;;;;OASG;IACH,QAAQ,CAAC,IAA8B,EAAE,OAAwB;QAC/D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,0BAA0B,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC7E,CAAC;CACF"}
|
|
1
|
+
{"version":3,"file":"capability.mjs","sourceRoot":"","sources":["../src/resources/capability.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAItB;;GAEG;AACH,MAAM,OAAO,UAAW,SAAQ,WAAW;IACzC;;;;;;;;;;OAUG;IACH,aAAa,CACX,IAAmC,EACnC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,+BAA+B,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAClF,CAAC;IAED;;;;;;;;;OASG;IACH,QAAQ,CAAC,IAA8B,EAAE,OAAwB;QAC/D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,0BAA0B,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC7E,CAAC;CACF"}
|