@linqapp/sdk 0.1.5 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (189) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/README.md +31 -0
  3. package/client.d.mts +299 -7
  4. package/client.d.mts.map +1 -1
  5. package/client.d.ts +299 -7
  6. package/client.d.ts.map +1 -1
  7. package/client.js +294 -12
  8. package/client.js.map +1 -1
  9. package/client.mjs +294 -12
  10. package/client.mjs.map +1 -1
  11. package/core/pagination.d.mts +69 -0
  12. package/core/pagination.d.mts.map +1 -0
  13. package/core/pagination.d.ts +69 -0
  14. package/core/pagination.d.ts.map +1 -0
  15. package/core/pagination.js +125 -0
  16. package/core/pagination.js.map +1 -0
  17. package/core/pagination.mjs +118 -0
  18. package/core/pagination.mjs.map +1 -0
  19. package/index.d.mts +1 -0
  20. package/index.d.mts.map +1 -1
  21. package/index.d.ts +1 -0
  22. package/index.d.ts.map +1 -1
  23. package/index.js +3 -1
  24. package/index.js.map +1 -1
  25. package/index.mjs +1 -0
  26. package/index.mjs.map +1 -1
  27. package/internal/tslib.js +18 -18
  28. package/internal/utils/query.d.mts +5 -0
  29. package/internal/utils/query.d.mts.map +1 -0
  30. package/internal/utils/query.d.ts +5 -0
  31. package/internal/utils/query.d.ts.map +1 -0
  32. package/internal/utils/query.js +23 -0
  33. package/internal/utils/query.js.map +1 -0
  34. package/internal/utils/query.mjs +20 -0
  35. package/internal/utils/query.mjs.map +1 -0
  36. package/internal/utils.d.mts +1 -0
  37. package/internal/utils.d.ts +1 -0
  38. package/internal/utils.js +1 -0
  39. package/internal/utils.js.map +1 -1
  40. package/internal/utils.mjs +1 -0
  41. package/package.json +11 -1
  42. package/pagination.d.mts +2 -0
  43. package/pagination.d.mts.map +1 -0
  44. package/pagination.d.ts +2 -0
  45. package/pagination.d.ts.map +1 -0
  46. package/pagination.js +6 -0
  47. package/pagination.js.map +1 -0
  48. package/pagination.mjs +2 -0
  49. package/pagination.mjs.map +1 -0
  50. package/resources/attachments.d.mts +64 -0
  51. package/resources/attachments.d.mts.map +1 -1
  52. package/resources/attachments.d.ts +64 -0
  53. package/resources/attachments.d.ts.map +1 -1
  54. package/resources/attachments.js +64 -0
  55. package/resources/attachments.js.map +1 -1
  56. package/resources/attachments.mjs +64 -0
  57. package/resources/attachments.mjs.map +1 -1
  58. package/resources/capability.d.mts +12 -9
  59. package/resources/capability.d.mts.map +1 -1
  60. package/resources/capability.d.ts +12 -9
  61. package/resources/capability.d.ts.map +1 -1
  62. package/resources/capability.js +7 -4
  63. package/resources/capability.js.map +1 -1
  64. package/resources/capability.mjs +7 -4
  65. package/resources/capability.mjs.map +1 -1
  66. package/resources/chats/chats.d.mts +76 -97
  67. package/resources/chats/chats.d.mts.map +1 -1
  68. package/resources/chats/chats.d.ts +76 -97
  69. package/resources/chats/chats.d.ts.map +1 -1
  70. package/resources/chats/chats.js +8 -4
  71. package/resources/chats/chats.js.map +1 -1
  72. package/resources/chats/chats.mjs +9 -5
  73. package/resources/chats/chats.mjs.map +1 -1
  74. package/resources/chats/index.d.mts +2 -2
  75. package/resources/chats/index.d.mts.map +1 -1
  76. package/resources/chats/index.d.ts +2 -2
  77. package/resources/chats/index.d.ts.map +1 -1
  78. package/resources/chats/index.js.map +1 -1
  79. package/resources/chats/index.mjs.map +1 -1
  80. package/resources/chats/messages.d.mts +21 -25
  81. package/resources/chats/messages.d.mts.map +1 -1
  82. package/resources/chats/messages.d.ts +21 -25
  83. package/resources/chats/messages.d.ts.map +1 -1
  84. package/resources/chats/messages.js +16 -3
  85. package/resources/chats/messages.js.map +1 -1
  86. package/resources/chats/messages.mjs +16 -3
  87. package/resources/chats/messages.mjs.map +1 -1
  88. package/resources/chats/participants.d.mts +18 -0
  89. package/resources/chats/participants.d.mts.map +1 -1
  90. package/resources/chats/participants.d.ts +18 -0
  91. package/resources/chats/participants.d.ts.map +1 -1
  92. package/resources/chats/participants.js +18 -0
  93. package/resources/chats/participants.js.map +1 -1
  94. package/resources/chats/participants.mjs +18 -0
  95. package/resources/chats/participants.mjs.map +1 -1
  96. package/resources/chats/typing.d.mts +18 -0
  97. package/resources/chats/typing.d.mts.map +1 -1
  98. package/resources/chats/typing.d.ts +18 -0
  99. package/resources/chats/typing.d.ts.map +1 -1
  100. package/resources/chats/typing.js +18 -0
  101. package/resources/chats/typing.js.map +1 -1
  102. package/resources/chats/typing.mjs +18 -0
  103. package/resources/chats/typing.mjs.map +1 -1
  104. package/resources/index.d.mts +4 -3
  105. package/resources/index.d.mts.map +1 -1
  106. package/resources/index.d.ts +4 -3
  107. package/resources/index.d.ts.map +1 -1
  108. package/resources/index.js +3 -1
  109. package/resources/index.js.map +1 -1
  110. package/resources/index.mjs +1 -0
  111. package/resources/index.mjs.map +1 -1
  112. package/resources/messages.d.mts +37 -72
  113. package/resources/messages.d.mts.map +1 -1
  114. package/resources/messages.d.ts +37 -72
  115. package/resources/messages.d.ts.map +1 -1
  116. package/resources/messages.js +34 -4
  117. package/resources/messages.js.map +1 -1
  118. package/resources/messages.mjs +34 -4
  119. package/resources/messages.mjs.map +1 -1
  120. package/resources/phone-numbers.d.mts +9 -0
  121. package/resources/phone-numbers.d.mts.map +1 -1
  122. package/resources/phone-numbers.d.ts +9 -0
  123. package/resources/phone-numbers.d.ts.map +1 -1
  124. package/resources/phone-numbers.js +9 -0
  125. package/resources/phone-numbers.js.map +1 -1
  126. package/resources/phone-numbers.mjs +9 -0
  127. package/resources/phone-numbers.mjs.map +1 -1
  128. package/resources/phonenumbers.d.mts +9 -0
  129. package/resources/phonenumbers.d.mts.map +1 -1
  130. package/resources/phonenumbers.d.ts +9 -0
  131. package/resources/phonenumbers.d.ts.map +1 -1
  132. package/resources/phonenumbers.js +9 -0
  133. package/resources/phonenumbers.js.map +1 -1
  134. package/resources/phonenumbers.mjs +9 -0
  135. package/resources/phonenumbers.mjs.map +1 -1
  136. package/resources/shared.d.mts +51 -0
  137. package/resources/shared.d.mts.map +1 -1
  138. package/resources/shared.d.ts +51 -0
  139. package/resources/shared.d.ts.map +1 -1
  140. package/resources/webhook-events.d.mts +90 -1
  141. package/resources/webhook-events.d.mts.map +1 -1
  142. package/resources/webhook-events.d.ts +90 -1
  143. package/resources/webhook-events.d.ts.map +1 -1
  144. package/resources/webhook-events.js +89 -0
  145. package/resources/webhook-events.js.map +1 -1
  146. package/resources/webhook-events.mjs +89 -0
  147. package/resources/webhook-events.mjs.map +1 -1
  148. package/resources/webhook-subscriptions.d.mts +89 -0
  149. package/resources/webhook-subscriptions.d.mts.map +1 -1
  150. package/resources/webhook-subscriptions.d.ts +89 -0
  151. package/resources/webhook-subscriptions.d.ts.map +1 -1
  152. package/resources/webhook-subscriptions.js +89 -0
  153. package/resources/webhook-subscriptions.js.map +1 -1
  154. package/resources/webhook-subscriptions.mjs +89 -0
  155. package/resources/webhook-subscriptions.mjs.map +1 -1
  156. package/resources/webhooks.d.mts +2506 -0
  157. package/resources/webhooks.d.mts.map +1 -0
  158. package/resources/webhooks.d.ts +2506 -0
  159. package/resources/webhooks.d.ts.map +1 -0
  160. package/resources/webhooks.js +12 -0
  161. package/resources/webhooks.js.map +1 -0
  162. package/resources/webhooks.mjs +8 -0
  163. package/resources/webhooks.mjs.map +1 -0
  164. package/src/client.ts +443 -37
  165. package/src/core/pagination.ts +212 -0
  166. package/src/index.ts +1 -0
  167. package/src/internal/utils/query.ts +23 -0
  168. package/src/internal/utils.ts +1 -0
  169. package/src/pagination.ts +2 -0
  170. package/src/resources/attachments.ts +64 -0
  171. package/src/resources/capability.ts +17 -14
  172. package/src/resources/chats/chats.ts +86 -115
  173. package/src/resources/chats/index.ts +4 -3
  174. package/src/resources/chats/messages.ts +30 -30
  175. package/src/resources/chats/participants.ts +18 -0
  176. package/src/resources/chats/typing.ts +18 -0
  177. package/src/resources/index.ts +55 -10
  178. package/src/resources/messages.ts +49 -90
  179. package/src/resources/phone-numbers.ts +9 -0
  180. package/src/resources/phonenumbers.ts +9 -0
  181. package/src/resources/shared.ts +62 -0
  182. package/src/resources/webhook-events.ts +90 -0
  183. package/src/resources/webhook-subscriptions.ts +89 -0
  184. package/src/resources/webhooks.ts +3089 -0
  185. package/src/version.ts +1 -1
  186. package/version.d.mts +1 -1
  187. package/version.d.ts +1 -1
  188. package/version.js +1 -1
  189. package/version.mjs +1 -1
@@ -1,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,wBAAwB,CAAC;IAIpG;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,Y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;;;;;;;;;;;;;;;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"}
@@ -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.checkImessage({
14
+ * const response = await client.capability.checkiMessage({
12
15
  * address: '+15551234567',
13
16
  * });
14
17
  * ```
15
18
  */
16
- checkImessage(body: CapabilityCheckImessageParams, options?: RequestOptions): APIPromise<CapabilityCheckImessageResponse>;
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.checkRcs({
25
+ * const response = await client.capability.checkRCS({
23
26
  * address: '+15551234567',
24
27
  * });
25
28
  * ```
26
29
  */
27
- checkRcs(body: CapabilityCheckRcsParams, options?: RequestOptions): APIPromise<CapabilityCheckRcsResponse>;
30
+ checkRCS(body: CapabilityCheckRCSParams, options?: RequestOptions): APIPromise<CapabilityCheckRCSResponse>;
28
31
  }
29
- export interface CapabilityCheckImessageResponse {
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 CapabilityCheckRcsResponse {
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 CapabilityCheckImessageParams {
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 CapabilityCheckRcsParams {
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 CapabilityCheckImessageResponse as CapabilityCheckImessageResponse, type CapabilityCheckRcsResponse as CapabilityCheckRcsResponse, type CapabilityCheckImessageParams as CapabilityCheckImessageParams, type CapabilityCheckRcsParams as CapabilityCheckRcsParams, };
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.checkImessage({
14
+ * const response = await client.capability.checkiMessage({
12
15
  * address: '+15551234567',
13
16
  * });
14
17
  * ```
15
18
  */
16
- checkImessage(body: CapabilityCheckImessageParams, options?: RequestOptions): APIPromise<CapabilityCheckImessageResponse>;
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.checkRcs({
25
+ * const response = await client.capability.checkRCS({
23
26
  * address: '+15551234567',
24
27
  * });
25
28
  * ```
26
29
  */
27
- checkRcs(body: CapabilityCheckRcsParams, options?: RequestOptions): APIPromise<CapabilityCheckRcsResponse>;
30
+ checkRCS(body: CapabilityCheckRCSParams, options?: RequestOptions): APIPromise<CapabilityCheckRCSResponse>;
28
31
  }
29
- export interface CapabilityCheckImessageResponse {
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 CapabilityCheckRcsResponse {
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 CapabilityCheckImessageParams {
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 CapabilityCheckRcsParams {
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 CapabilityCheckImessageResponse as CapabilityCheckImessageResponse, type CapabilityCheckRcsResponse as CapabilityCheckRcsResponse, type CapabilityCheckImessageParams as CapabilityCheckImessageParams, type CapabilityCheckRcsParams as CapabilityCheckRcsParams, };
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,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,0B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G;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"}
@@ -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.checkImessage({
16
+ * const response = await client.capability.checkiMessage({
14
17
  * address: '+15551234567',
15
18
  * });
16
19
  * ```
17
20
  */
18
- checkImessage(body, options) {
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.checkRcs({
29
+ * const response = await client.capability.checkRCS({
27
30
  * address: '+15551234567',
28
31
  * });
29
32
  * ```
30
33
  */
31
- checkRcs(body, options) {
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"}
@@ -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.checkImessage({
13
+ * const response = await client.capability.checkiMessage({
11
14
  * address: '+15551234567',
12
15
  * });
13
16
  * ```
14
17
  */
15
- checkImessage(body, options) {
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.checkRcs({
26
+ * const response = await client.capability.checkRCS({
24
27
  * address: '+15551234567',
25
28
  * });
26
29
  * ```
27
30
  */
28
- checkRcs(body, options) {
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"}