@linqapp/sdk 0.36.1 → 0.37.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 CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.37.0](https://github.com/linq-team/linq-node/compare/v0.36.1...v0.37.0) (2026-08-13)
4
+
5
+
6
+ ### Features
7
+
8
+ * add detailed 503 errors and response fields for capability checks ([eda6a4a](https://github.com/linq-team/linq-node/commit/eda6a4a70b0c488e0f9f802084e98c3f728e384f))
9
+
3
10
  ## [0.36.1](https://github.com/linq-team/linq-node/compare/v0.36.0...v0.36.1) (2026-08-12)
4
11
 
5
12
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@linqapp/sdk",
3
- "version": "0.36.1",
3
+ "version": "0.37.0",
4
4
  "description": "The official TypeScript library for the Linq API V3 API",
5
5
  "author": "Linq API V3 <support@linq.com>",
6
6
  "types": "./index.d.ts",
@@ -21,6 +21,13 @@ export declare class Capability extends APIResource {
21
21
  /**
22
22
  * Check whether a recipient address (phone number) supports RCS messaging.
23
23
  *
24
+ * A `200` means the check ran and the answer is about the **recipient**. A `503`
25
+ * means the check could not produce an answer because of a fault on the **sender**
26
+ * line — `4004` (RCS not turned on for the line), `4009` (line has no RCS
27
+ * account), or `4010` (the check could not run). Treat all three as "unknown",
28
+ * never as "the recipient does not support RCS", and do not cache them as a
29
+ * negative result.
30
+ *
24
31
  * @example
25
32
  * ```ts
26
33
  * const handleCheckResponse =
@@ -51,6 +58,21 @@ export interface HandleCheckResponse {
51
58
  * Whether the recipient supports the checked messaging service
52
59
  */
53
60
  available: boolean;
61
+ /**
62
+ * Why `available` is `false`. Only present on a negative result.
63
+ *
64
+ * `not_supported` is the only value returned with a `200`, and it means the check
65
+ * completed and the recipient is genuinely not reachable over this service. On
66
+ * `check_rcs`, sender-side faults do not return `200` — they return `503` with a
67
+ * specific error code. `check_imessage` does not use this mapping.
68
+ */
69
+ reason?: 'not_supported';
70
+ /**
71
+ * The service that would actually carry a message to this address right now, which
72
+ * is not always the service you checked — a recipient without RCS resolves to
73
+ * `SMS`. Absent when the check could not determine one.
74
+ */
75
+ selected_service?: string;
54
76
  }
55
77
  export interface CapabilityCheckIMessageParams {
56
78
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"capability.d.mts","sourceRoot":"","sources":["../src/resources/capability.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,gCAA4B;AACjD,OAAO,EAAE,cAAc,EAAE,wCAAoC;AAE7D;;GAEG;AACH,qBAAa,UAAW,SAAQ,WAAW;IACzC;;;;;;;;;;;OAWG;IACH,aAAa,CACX,IAAI,EAAE,6BAA6B,EACnC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,mBAAmB,CAAC;IAIlC;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,IAAI,EAAE,wBAAwB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,mBAAmB,CAAC;CAGpG;AAED,MAAM,WAAW,WAAW;IAC1B;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,mBAAmB;IAClC;;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,CAA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AI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,CAAC,OAAO,WAAW,UAAU,CAAC;IAClC,OAAO,EACL,KAAK,WAAW,IAAI,WAAW,EAC/B,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,wBAAwB,IAAI,wBAAwB,GAC1D,CAAC;CACH"}
@@ -21,6 +21,13 @@ export declare class Capability extends APIResource {
21
21
  /**
22
22
  * Check whether a recipient address (phone number) supports RCS messaging.
23
23
  *
24
+ * A `200` means the check ran and the answer is about the **recipient**. A `503`
25
+ * means the check could not produce an answer because of a fault on the **sender**
26
+ * line — `4004` (RCS not turned on for the line), `4009` (line has no RCS
27
+ * account), or `4010` (the check could not run). Treat all three as "unknown",
28
+ * never as "the recipient does not support RCS", and do not cache them as a
29
+ * negative result.
30
+ *
24
31
  * @example
25
32
  * ```ts
26
33
  * const handleCheckResponse =
@@ -51,6 +58,21 @@ export interface HandleCheckResponse {
51
58
  * Whether the recipient supports the checked messaging service
52
59
  */
53
60
  available: boolean;
61
+ /**
62
+ * Why `available` is `false`. Only present on a negative result.
63
+ *
64
+ * `not_supported` is the only value returned with a `200`, and it means the check
65
+ * completed and the recipient is genuinely not reachable over this service. On
66
+ * `check_rcs`, sender-side faults do not return `200` — they return `503` with a
67
+ * specific error code. `check_imessage` does not use this mapping.
68
+ */
69
+ reason?: 'not_supported';
70
+ /**
71
+ * The service that would actually carry a message to this address right now, which
72
+ * is not always the service you checked — a recipient without RCS resolves to
73
+ * `SMS`. Absent when the check could not determine one.
74
+ */
75
+ selected_service?: string;
54
76
  }
55
77
  export interface CapabilityCheckIMessageParams {
56
78
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"capability.d.ts","sourceRoot":"","sources":["../src/resources/capability.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,4BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,+BAA4B;AACjD,OAAO,EAAE,cAAc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AAQ,WAAW;IACzC;;;;;;;;;;;OAWG;IACH,aAAa,CACX,IAAI,EAAE,6BAA6B,EACnC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,mBAAmB,CAAC;IAIlC;;;;;;;;;;;;;;;;;OAiBG;IACH,QAAQ,CAAC,IAAI,EAAE,wBAAwB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,mBAAmB,CAAC;CAGpG;AAED,MAAM,WAAW,WAAW;IAC1B;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,SAAS,EAAE,OAAO,CAAC;IAEnB;;;;;;;OAOG;IACH,MAAM,CAAC,EAAE,eAAe,CAAC;IAEzB;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;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,WAAW,IAAI,WAAW,EAC/B,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,wBAAwB,IAAI,wBAAwB,GAC1D,CAAC;CACH"}
@@ -25,6 +25,13 @@ class Capability extends resource_1.APIResource {
25
25
  /**
26
26
  * Check whether a recipient address (phone number) supports RCS messaging.
27
27
  *
28
+ * A `200` means the check ran and the answer is about the **recipient**. A `503`
29
+ * means the check could not produce an answer because of a fault on the **sender**
30
+ * line — `4004` (RCS not turned on for the line), `4009` (line has no RCS
31
+ * account), or `4010` (the check could not run). Treat all three as "unknown",
32
+ * never as "the recipient does not support RCS", and do not cache them as a
33
+ * negative result.
34
+ *
28
35
  * @example
29
36
  * ```ts
30
37
  * const handleCheckResponse =
@@ -1 +1 @@
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;;;;;;;;;;;OAWG;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;;;;;;;;;;OAUG;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;AAlCD,gCAkCC"}
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;;;;;;;;;;;OAWG;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;;;;;;;;;;;;;;;;;OAiBG;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;AAzCD,gCAyCC"}
@@ -22,6 +22,13 @@ export class Capability extends APIResource {
22
22
  /**
23
23
  * Check whether a recipient address (phone number) supports RCS messaging.
24
24
  *
25
+ * A `200` means the check ran and the answer is about the **recipient**. A `503`
26
+ * means the check could not produce an answer because of a fault on the **sender**
27
+ * line — `4004` (RCS not turned on for the line), `4009` (line has no RCS
28
+ * account), or `4010` (the check could not run). Treat all three as "unknown",
29
+ * never as "the recipient does not support RCS", and do not cache them as a
30
+ * negative result.
31
+ *
25
32
  * @example
26
33
  * ```ts
27
34
  * const handleCheckResponse =
@@ -1 +1 @@
1
- {"version":3,"file":"capability.mjs","sourceRoot":"","sources":["../src/resources/capability.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAI/C;;GAEG;AACH,MAAM,OAAO,UAAW,SAAQ,WAAW;IACzC;;;;;;;;;;;OAWG;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;;;;;;;;;;OAUG;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;AAEtF,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAI/C;;GAEG;AACH,MAAM,OAAO,UAAW,SAAQ,WAAW;IACzC;;;;;;;;;;;OAWG;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;;;;;;;;;;;;;;;;;OAiBG;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"}
@@ -30,6 +30,13 @@ export class Capability extends APIResource {
30
30
  /**
31
31
  * Check whether a recipient address (phone number) supports RCS messaging.
32
32
  *
33
+ * A `200` means the check ran and the answer is about the **recipient**. A `503`
34
+ * means the check could not produce an answer because of a fault on the **sender**
35
+ * line — `4004` (RCS not turned on for the line), `4009` (line has no RCS
36
+ * account), or `4010` (the check could not run). Treat all three as "unknown",
37
+ * never as "the recipient does not support RCS", and do not cache them as a
38
+ * negative result.
39
+ *
33
40
  * @example
34
41
  * ```ts
35
42
  * const handleCheckResponse =
@@ -66,6 +73,23 @@ export interface HandleCheckResponse {
66
73
  * Whether the recipient supports the checked messaging service
67
74
  */
68
75
  available: boolean;
76
+
77
+ /**
78
+ * Why `available` is `false`. Only present on a negative result.
79
+ *
80
+ * `not_supported` is the only value returned with a `200`, and it means the check
81
+ * completed and the recipient is genuinely not reachable over this service. On
82
+ * `check_rcs`, sender-side faults do not return `200` — they return `503` with a
83
+ * specific error code. `check_imessage` does not use this mapping.
84
+ */
85
+ reason?: 'not_supported';
86
+
87
+ /**
88
+ * The service that would actually carry a message to this address right now, which
89
+ * is not always the service you checked — a recipient without RCS resolves to
90
+ * `SMS`. Absent when the check could not determine one.
91
+ */
92
+ selected_service?: string;
69
93
  }
70
94
 
71
95
  export interface CapabilityCheckIMessageParams {
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.36.1'; // x-release-please-version
1
+ export const VERSION = '0.37.0'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.36.1";
1
+ export declare const VERSION = "0.37.0";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.36.1";
1
+ export declare const VERSION = "0.37.0";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '0.36.1'; // x-release-please-version
4
+ exports.VERSION = '0.37.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '0.36.1'; // x-release-please-version
1
+ export const VERSION = '0.37.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map