sendblue 3.6.1 → 3.8.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 (129) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/client.d.mts +6 -0
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +6 -0
  5. package/client.d.ts.map +1 -1
  6. package/client.js +6 -0
  7. package/client.js.map +1 -1
  8. package/client.mjs +6 -0
  9. package/client.mjs.map +1 -1
  10. package/internal/utils/env.js +2 -2
  11. package/internal/utils/env.js.map +1 -1
  12. package/internal/utils/env.mjs +2 -2
  13. package/internal/utils/env.mjs.map +1 -1
  14. package/package.json +1 -1
  15. package/resources/index.d.mts +2 -0
  16. package/resources/index.d.mts.map +1 -1
  17. package/resources/index.d.ts +2 -0
  18. package/resources/index.d.ts.map +1 -1
  19. package/resources/index.js +5 -1
  20. package/resources/index.js.map +1 -1
  21. package/resources/index.mjs +2 -0
  22. package/resources/index.mjs.map +1 -1
  23. package/resources/lines/call-forwarding.d.mts +94 -0
  24. package/resources/lines/call-forwarding.d.mts.map +1 -0
  25. package/resources/lines/call-forwarding.d.ts +94 -0
  26. package/resources/lines/call-forwarding.d.ts.map +1 -0
  27. package/resources/lines/call-forwarding.js +65 -0
  28. package/resources/lines/call-forwarding.js.map +1 -0
  29. package/resources/lines/call-forwarding.mjs +61 -0
  30. package/resources/lines/call-forwarding.mjs.map +1 -0
  31. package/resources/lines/index.d.mts +3 -0
  32. package/resources/lines/index.d.mts.map +1 -0
  33. package/resources/lines/index.d.ts +3 -0
  34. package/resources/lines/index.d.ts.map +1 -0
  35. package/resources/lines/index.js +9 -0
  36. package/resources/lines/index.js.map +1 -0
  37. package/resources/lines/index.mjs +4 -0
  38. package/resources/lines/index.mjs.map +1 -0
  39. package/resources/lines/lines.d.mts +10 -0
  40. package/resources/lines/lines.d.mts.map +1 -0
  41. package/resources/lines/lines.d.ts +10 -0
  42. package/resources/lines/lines.d.ts.map +1 -0
  43. package/resources/lines/lines.js +17 -0
  44. package/resources/lines/lines.js.map +1 -0
  45. package/resources/lines/lines.mjs +12 -0
  46. package/resources/lines/lines.mjs.map +1 -0
  47. package/resources/lines.d.mts +2 -0
  48. package/resources/lines.d.mts.map +1 -0
  49. package/resources/lines.d.ts +2 -0
  50. package/resources/lines.d.ts.map +1 -0
  51. package/resources/lines.js +6 -0
  52. package/resources/lines.js.map +1 -0
  53. package/resources/lines.mjs +3 -0
  54. package/resources/lines.mjs.map +1 -0
  55. package/resources/v2/index.d.mts +3 -0
  56. package/resources/v2/index.d.mts.map +1 -0
  57. package/resources/v2/index.d.ts +3 -0
  58. package/resources/v2/index.d.ts.map +1 -0
  59. package/resources/v2/index.js +9 -0
  60. package/resources/v2/index.js.map +1 -0
  61. package/resources/v2/index.mjs +4 -0
  62. package/resources/v2/index.mjs.map +1 -0
  63. package/resources/v2/totp/index.d.mts +3 -0
  64. package/resources/v2/totp/index.d.mts.map +1 -0
  65. package/resources/v2/totp/index.d.ts +3 -0
  66. package/resources/v2/totp/index.d.ts.map +1 -0
  67. package/resources/v2/totp/index.js +9 -0
  68. package/resources/v2/totp/index.js.map +1 -0
  69. package/resources/v2/totp/index.mjs +4 -0
  70. package/resources/v2/totp/index.mjs.map +1 -0
  71. package/resources/v2/totp/secrets.d.mts +159 -0
  72. package/resources/v2/totp/secrets.d.mts.map +1 -0
  73. package/resources/v2/totp/secrets.d.ts +159 -0
  74. package/resources/v2/totp/secrets.d.ts.map +1 -0
  75. package/resources/v2/totp/secrets.js +57 -0
  76. package/resources/v2/totp/secrets.js.map +1 -0
  77. package/resources/v2/totp/secrets.mjs +53 -0
  78. package/resources/v2/totp/secrets.mjs.map +1 -0
  79. package/resources/v2/totp/totp.d.mts +39 -0
  80. package/resources/v2/totp/totp.d.mts.map +1 -0
  81. package/resources/v2/totp/totp.d.ts +39 -0
  82. package/resources/v2/totp/totp.d.ts.map +1 -0
  83. package/resources/v2/totp/totp.js +35 -0
  84. package/resources/v2/totp/totp.js.map +1 -0
  85. package/resources/v2/totp/totp.mjs +30 -0
  86. package/resources/v2/totp/totp.mjs.map +1 -0
  87. package/resources/v2/totp.d.mts +2 -0
  88. package/resources/v2/totp.d.mts.map +1 -0
  89. package/resources/v2/totp.d.ts +2 -0
  90. package/resources/v2/totp.d.ts.map +1 -0
  91. package/resources/v2/totp.js +6 -0
  92. package/resources/v2/totp.js.map +1 -0
  93. package/resources/v2/totp.mjs +3 -0
  94. package/resources/v2/totp.mjs.map +1 -0
  95. package/resources/v2/v2.d.mts +10 -0
  96. package/resources/v2/v2.d.mts.map +1 -0
  97. package/resources/v2/v2.d.ts +10 -0
  98. package/resources/v2/v2.d.ts.map +1 -0
  99. package/resources/v2/v2.js +17 -0
  100. package/resources/v2/v2.js.map +1 -0
  101. package/resources/v2/v2.mjs +12 -0
  102. package/resources/v2/v2.mjs.map +1 -0
  103. package/resources/v2.d.mts +2 -0
  104. package/resources/v2.d.mts.map +1 -0
  105. package/resources/v2.d.ts +2 -0
  106. package/resources/v2.d.ts.map +1 -0
  107. package/resources/v2.js +6 -0
  108. package/resources/v2.js.map +1 -0
  109. package/resources/v2.mjs +3 -0
  110. package/resources/v2.mjs.map +1 -0
  111. package/src/client.ts +10 -0
  112. package/src/internal/utils/env.ts +2 -2
  113. package/src/resources/index.ts +2 -0
  114. package/src/resources/lines/call-forwarding.ts +122 -0
  115. package/src/resources/lines/index.ts +10 -0
  116. package/src/resources/lines/lines.ts +27 -0
  117. package/src/resources/lines.ts +3 -0
  118. package/src/resources/v2/index.ts +4 -0
  119. package/src/resources/v2/totp/index.ts +10 -0
  120. package/src/resources/v2/totp/secrets.ts +204 -0
  121. package/src/resources/v2/totp/totp.ts +64 -0
  122. package/src/resources/v2/totp.ts +3 -0
  123. package/src/resources/v2/v2.ts +15 -0
  124. package/src/resources/v2.ts +3 -0
  125. package/src/version.ts +1 -1
  126. package/version.d.mts +1 -1
  127. package/version.d.ts +1 -1
  128. package/version.js +1 -1
  129. package/version.mjs +1 -1
@@ -0,0 +1,94 @@
1
+ import { APIResource } from "../../core/resource.mjs";
2
+ import { APIPromise } from "../../core/api-promise.mjs";
3
+ import { RequestOptions } from "../../internal/request-options.mjs";
4
+ export declare class CallForwarding extends APIResource {
5
+ /**
6
+ * Returns the current call forwarding number for a dedicated phone line.
7
+ *
8
+ * Per-line forwarding takes priority over the company default forwarding number
9
+ * but is overridden by seat-level forwarding when a seat has a forwarding number
10
+ * set.
11
+ *
12
+ * **Priority order:** seat forwarding → per-line forwarding → company default
13
+ * forwarding
14
+ *
15
+ * @example
16
+ * ```ts
17
+ * const callForwarding =
18
+ * await client.lines.callForwarding.retrieve(
19
+ * '+12125550101',
20
+ * );
21
+ * ```
22
+ */
23
+ retrieve(sendblueNumber: string, options?: RequestOptions): APIPromise<CallForwardingRetrieveResponse>;
24
+ /**
25
+ * Sets a call forwarding number for a specific dedicated phone line. Inbound calls
26
+ * to this line will be forwarded to the specified number.
27
+ *
28
+ * The `forwarding_number` is normalized to E.164 format before storage. US numbers
29
+ * can be supplied in local format (e.g. `2125550199`).
30
+ *
31
+ * @example
32
+ * ```ts
33
+ * const callForwarding =
34
+ * await client.lines.callForwarding.update('+12125550101', {
35
+ * forwarding_number: '+16692138010',
36
+ * });
37
+ * ```
38
+ */
39
+ update(sendblueNumber: string, body: CallForwardingUpdateParams, options?: RequestOptions): APIPromise<CallForwardingUpdateResponse>;
40
+ /**
41
+ * Removes the per-line call forwarding number. After clearing, inbound calls will
42
+ * fall back to the company default forwarding number (if configured).
43
+ *
44
+ * This operation is idempotent — calling it on a line with no forwarding set
45
+ * returns 200 with `forwarding_number: null`.
46
+ *
47
+ * @example
48
+ * ```ts
49
+ * const callForwarding =
50
+ * await client.lines.callForwarding.delete('+12125550101');
51
+ * ```
52
+ */
53
+ delete(sendblueNumber: string, options?: RequestOptions): APIPromise<CallForwardingDeleteResponse>;
54
+ }
55
+ export interface CallForwardingRetrieveResponse {
56
+ /**
57
+ * The number calls are forwarded to, or null if not set
58
+ */
59
+ forwarding_number: string | null;
60
+ /**
61
+ * The Sendblue phone number (E.164)
62
+ */
63
+ sendblue_number: string;
64
+ }
65
+ export interface CallForwardingUpdateResponse {
66
+ /**
67
+ * The number calls are forwarded to, or null if not set
68
+ */
69
+ forwarding_number: string | null;
70
+ /**
71
+ * The Sendblue phone number (E.164)
72
+ */
73
+ sendblue_number: string;
74
+ }
75
+ export interface CallForwardingDeleteResponse {
76
+ /**
77
+ * The number calls are forwarded to, or null if not set
78
+ */
79
+ forwarding_number: string | null;
80
+ /**
81
+ * The Sendblue phone number (E.164)
82
+ */
83
+ sendblue_number: string;
84
+ }
85
+ export interface CallForwardingUpdateParams {
86
+ /**
87
+ * Phone number to forward calls to (E.164 or US local format)
88
+ */
89
+ forwarding_number: string;
90
+ }
91
+ export declare namespace CallForwarding {
92
+ export { type CallForwardingRetrieveResponse as CallForwardingRetrieveResponse, type CallForwardingUpdateResponse as CallForwardingUpdateResponse, type CallForwardingDeleteResponse as CallForwardingDeleteResponse, type CallForwardingUpdateParams as CallForwardingUpdateParams, };
93
+ }
94
+ //# sourceMappingURL=call-forwarding.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"call-forwarding.d.mts","sourceRoot":"","sources":["../../src/resources/lines/call-forwarding.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB,qBAAa,cAAe,SAAQ,WAAW;IAC7C;;;;;;;;;;;;;;;;;OAiBG;IACH,QAAQ,CAAC,cAAc,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,8BAA8B,CAAC;IAItG;;;;;;;;;;;;;;OAcG;IACH,MAAM,CACJ,cAAc,EAAE,MAAM,EACtB,IAAI,EAAE,0BAA0B,EAChC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,4BAA4B,CAAC;IAI3C;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,cAAc,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,4BAA4B,CAAC;CAGnG;AAED,MAAM,WAAW,8BAA8B;IAC7C;;OAEG;IACH,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IAEjC;;OAEG;IACH,eAAe,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,4BAA4B;IAC3C;;OAEG;IACH,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IAEjC;;OAEG;IACH,eAAe,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,4BAA4B;IAC3C;;OAEG;IACH,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IAEjC;;OAEG;IACH,eAAe,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,0BAA0B;IACzC;;OAEG;IACH,iBAAiB,EAAE,MAAM,CAAC;CAC3B;AAED,MAAM,CAAC,OAAO,WAAW,cAAc,CAAC;IACtC,OAAO,EACL,KAAK,8BAA8B,IAAI,8BAA8B,EACrE,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,0BAA0B,IAAI,0BAA0B,GAC9D,CAAC;CACH"}
@@ -0,0 +1,94 @@
1
+ import { APIResource } from "../../core/resource.js";
2
+ import { APIPromise } from "../../core/api-promise.js";
3
+ import { RequestOptions } from "../../internal/request-options.js";
4
+ export declare class CallForwarding extends APIResource {
5
+ /**
6
+ * Returns the current call forwarding number for a dedicated phone line.
7
+ *
8
+ * Per-line forwarding takes priority over the company default forwarding number
9
+ * but is overridden by seat-level forwarding when a seat has a forwarding number
10
+ * set.
11
+ *
12
+ * **Priority order:** seat forwarding → per-line forwarding → company default
13
+ * forwarding
14
+ *
15
+ * @example
16
+ * ```ts
17
+ * const callForwarding =
18
+ * await client.lines.callForwarding.retrieve(
19
+ * '+12125550101',
20
+ * );
21
+ * ```
22
+ */
23
+ retrieve(sendblueNumber: string, options?: RequestOptions): APIPromise<CallForwardingRetrieveResponse>;
24
+ /**
25
+ * Sets a call forwarding number for a specific dedicated phone line. Inbound calls
26
+ * to this line will be forwarded to the specified number.
27
+ *
28
+ * The `forwarding_number` is normalized to E.164 format before storage. US numbers
29
+ * can be supplied in local format (e.g. `2125550199`).
30
+ *
31
+ * @example
32
+ * ```ts
33
+ * const callForwarding =
34
+ * await client.lines.callForwarding.update('+12125550101', {
35
+ * forwarding_number: '+16692138010',
36
+ * });
37
+ * ```
38
+ */
39
+ update(sendblueNumber: string, body: CallForwardingUpdateParams, options?: RequestOptions): APIPromise<CallForwardingUpdateResponse>;
40
+ /**
41
+ * Removes the per-line call forwarding number. After clearing, inbound calls will
42
+ * fall back to the company default forwarding number (if configured).
43
+ *
44
+ * This operation is idempotent — calling it on a line with no forwarding set
45
+ * returns 200 with `forwarding_number: null`.
46
+ *
47
+ * @example
48
+ * ```ts
49
+ * const callForwarding =
50
+ * await client.lines.callForwarding.delete('+12125550101');
51
+ * ```
52
+ */
53
+ delete(sendblueNumber: string, options?: RequestOptions): APIPromise<CallForwardingDeleteResponse>;
54
+ }
55
+ export interface CallForwardingRetrieveResponse {
56
+ /**
57
+ * The number calls are forwarded to, or null if not set
58
+ */
59
+ forwarding_number: string | null;
60
+ /**
61
+ * The Sendblue phone number (E.164)
62
+ */
63
+ sendblue_number: string;
64
+ }
65
+ export interface CallForwardingUpdateResponse {
66
+ /**
67
+ * The number calls are forwarded to, or null if not set
68
+ */
69
+ forwarding_number: string | null;
70
+ /**
71
+ * The Sendblue phone number (E.164)
72
+ */
73
+ sendblue_number: string;
74
+ }
75
+ export interface CallForwardingDeleteResponse {
76
+ /**
77
+ * The number calls are forwarded to, or null if not set
78
+ */
79
+ forwarding_number: string | null;
80
+ /**
81
+ * The Sendblue phone number (E.164)
82
+ */
83
+ sendblue_number: string;
84
+ }
85
+ export interface CallForwardingUpdateParams {
86
+ /**
87
+ * Phone number to forward calls to (E.164 or US local format)
88
+ */
89
+ forwarding_number: string;
90
+ }
91
+ export declare namespace CallForwarding {
92
+ export { type CallForwardingRetrieveResponse as CallForwardingRetrieveResponse, type CallForwardingUpdateResponse as CallForwardingUpdateResponse, type CallForwardingDeleteResponse as CallForwardingDeleteResponse, type CallForwardingUpdateParams as CallForwardingUpdateParams, };
93
+ }
94
+ //# sourceMappingURL=call-forwarding.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"call-forwarding.d.ts","sourceRoot":"","sources":["../../src/resources/lines/call-forwarding.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB,qBAAa,cAAe,SAAQ,WAAW;IAC7C;;;;;;;;;;;;;;;;;OAiBG;IACH,QAAQ,CAAC,cAAc,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,8BAA8B,CAAC;IAItG;;;;;;;;;;;;;;OAcG;IACH,MAAM,CACJ,cAAc,EAAE,MAAM,EACtB,IAAI,EAAE,0BAA0B,EAChC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,4BAA4B,CAAC;IAI3C;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,cAAc,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,4BAA4B,CAAC;CAGnG;AAED,MAAM,WAAW,8BAA8B;IAC7C;;OAEG;IACH,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IAEjC;;OAEG;IACH,eAAe,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,4BAA4B;IAC3C;;OAEG;IACH,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IAEjC;;OAEG;IACH,eAAe,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,4BAA4B;IAC3C;;OAEG;IACH,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IAEjC;;OAEG;IACH,eAAe,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,0BAA0B;IACzC;;OAEG;IACH,iBAAiB,EAAE,MAAM,CAAC;CAC3B;AAED,MAAM,CAAC,OAAO,WAAW,cAAc,CAAC;IACtC,OAAO,EACL,KAAK,8BAA8B,IAAI,8BAA8B,EACrE,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,0BAA0B,IAAI,0BAA0B,GAC9D,CAAC;CACH"}
@@ -0,0 +1,65 @@
1
+ "use strict";
2
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.CallForwarding = void 0;
5
+ const resource_1 = require("../../core/resource.js");
6
+ const path_1 = require("../../internal/utils/path.js");
7
+ class CallForwarding extends resource_1.APIResource {
8
+ /**
9
+ * Returns the current call forwarding number for a dedicated phone line.
10
+ *
11
+ * Per-line forwarding takes priority over the company default forwarding number
12
+ * but is overridden by seat-level forwarding when a seat has a forwarding number
13
+ * set.
14
+ *
15
+ * **Priority order:** seat forwarding → per-line forwarding → company default
16
+ * forwarding
17
+ *
18
+ * @example
19
+ * ```ts
20
+ * const callForwarding =
21
+ * await client.lines.callForwarding.retrieve(
22
+ * '+12125550101',
23
+ * );
24
+ * ```
25
+ */
26
+ retrieve(sendblueNumber, options) {
27
+ return this._client.get((0, path_1.path) `/api/lines/${sendblueNumber}/call-forwarding`, options);
28
+ }
29
+ /**
30
+ * Sets a call forwarding number for a specific dedicated phone line. Inbound calls
31
+ * to this line will be forwarded to the specified number.
32
+ *
33
+ * The `forwarding_number` is normalized to E.164 format before storage. US numbers
34
+ * can be supplied in local format (e.g. `2125550199`).
35
+ *
36
+ * @example
37
+ * ```ts
38
+ * const callForwarding =
39
+ * await client.lines.callForwarding.update('+12125550101', {
40
+ * forwarding_number: '+16692138010',
41
+ * });
42
+ * ```
43
+ */
44
+ update(sendblueNumber, body, options) {
45
+ return this._client.put((0, path_1.path) `/api/lines/${sendblueNumber}/call-forwarding`, { body, ...options });
46
+ }
47
+ /**
48
+ * Removes the per-line call forwarding number. After clearing, inbound calls will
49
+ * fall back to the company default forwarding number (if configured).
50
+ *
51
+ * This operation is idempotent — calling it on a line with no forwarding set
52
+ * returns 200 with `forwarding_number: null`.
53
+ *
54
+ * @example
55
+ * ```ts
56
+ * const callForwarding =
57
+ * await client.lines.callForwarding.delete('+12125550101');
58
+ * ```
59
+ */
60
+ delete(sendblueNumber, options) {
61
+ return this._client.delete((0, path_1.path) `/api/lines/${sendblueNumber}/call-forwarding`, options);
62
+ }
63
+ }
64
+ exports.CallForwarding = CallForwarding;
65
+ //# sourceMappingURL=call-forwarding.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"call-forwarding.js","sourceRoot":"","sources":["../../src/resources/lines/call-forwarding.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAGlD,uDAAiD;AAEjD,MAAa,cAAe,SAAQ,sBAAW;IAC7C;;;;;;;;;;;;;;;;;OAiBG;IACH,QAAQ,CAAC,cAAsB,EAAE,OAAwB;QACvD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,cAAc,cAAc,kBAAkB,EAAE,OAAO,CAAC,CAAC;IACvF,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACH,MAAM,CACJ,cAAsB,EACtB,IAAgC,EAChC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,cAAc,cAAc,kBAAkB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACpG,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,cAAsB,EAAE,OAAwB;QACrD,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAA,WAAI,EAAA,cAAc,cAAc,kBAAkB,EAAE,OAAO,CAAC,CAAC;IAC1F,CAAC;CACF;AA9DD,wCA8DC"}
@@ -0,0 +1,61 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ import { APIResource } from "../../core/resource.mjs";
3
+ import { path } from "../../internal/utils/path.mjs";
4
+ export class CallForwarding extends APIResource {
5
+ /**
6
+ * Returns the current call forwarding number for a dedicated phone line.
7
+ *
8
+ * Per-line forwarding takes priority over the company default forwarding number
9
+ * but is overridden by seat-level forwarding when a seat has a forwarding number
10
+ * set.
11
+ *
12
+ * **Priority order:** seat forwarding → per-line forwarding → company default
13
+ * forwarding
14
+ *
15
+ * @example
16
+ * ```ts
17
+ * const callForwarding =
18
+ * await client.lines.callForwarding.retrieve(
19
+ * '+12125550101',
20
+ * );
21
+ * ```
22
+ */
23
+ retrieve(sendblueNumber, options) {
24
+ return this._client.get(path `/api/lines/${sendblueNumber}/call-forwarding`, options);
25
+ }
26
+ /**
27
+ * Sets a call forwarding number for a specific dedicated phone line. Inbound calls
28
+ * to this line will be forwarded to the specified number.
29
+ *
30
+ * The `forwarding_number` is normalized to E.164 format before storage. US numbers
31
+ * can be supplied in local format (e.g. `2125550199`).
32
+ *
33
+ * @example
34
+ * ```ts
35
+ * const callForwarding =
36
+ * await client.lines.callForwarding.update('+12125550101', {
37
+ * forwarding_number: '+16692138010',
38
+ * });
39
+ * ```
40
+ */
41
+ update(sendblueNumber, body, options) {
42
+ return this._client.put(path `/api/lines/${sendblueNumber}/call-forwarding`, { body, ...options });
43
+ }
44
+ /**
45
+ * Removes the per-line call forwarding number. After clearing, inbound calls will
46
+ * fall back to the company default forwarding number (if configured).
47
+ *
48
+ * This operation is idempotent — calling it on a line with no forwarding set
49
+ * returns 200 with `forwarding_number: null`.
50
+ *
51
+ * @example
52
+ * ```ts
53
+ * const callForwarding =
54
+ * await client.lines.callForwarding.delete('+12125550101');
55
+ * ```
56
+ */
57
+ delete(sendblueNumber, options) {
58
+ return this._client.delete(path `/api/lines/${sendblueNumber}/call-forwarding`, options);
59
+ }
60
+ }
61
+ //# sourceMappingURL=call-forwarding.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"call-forwarding.mjs","sourceRoot":"","sources":["../../src/resources/lines/call-forwarding.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAGf,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,cAAe,SAAQ,WAAW;IAC7C;;;;;;;;;;;;;;;;;OAiBG;IACH,QAAQ,CAAC,cAAsB,EAAE,OAAwB;QACvD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,cAAc,cAAc,kBAAkB,EAAE,OAAO,CAAC,CAAC;IACvF,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACH,MAAM,CACJ,cAAsB,EACtB,IAAgC,EAChC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,cAAc,cAAc,kBAAkB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACpG,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,cAAsB,EAAE,OAAwB;QACrD,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAA,cAAc,cAAc,kBAAkB,EAAE,OAAO,CAAC,CAAC;IAC1F,CAAC;CACF"}
@@ -0,0 +1,3 @@
1
+ export { CallForwarding, type CallForwardingRetrieveResponse, type CallForwardingUpdateResponse, type CallForwardingDeleteResponse, type CallForwardingUpdateParams, } from "./call-forwarding.mjs";
2
+ export { Lines } from "./lines.mjs";
3
+ //# sourceMappingURL=index.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../src/resources/lines/index.ts"],"names":[],"mappings":"OAEO,EACL,cAAc,EACd,KAAK,8BAA8B,EACnC,KAAK,4BAA4B,EACjC,KAAK,4BAA4B,EACjC,KAAK,0BAA0B,GAChC;OACM,EAAE,KAAK,EAAE"}
@@ -0,0 +1,3 @@
1
+ export { CallForwarding, type CallForwardingRetrieveResponse, type CallForwardingUpdateResponse, type CallForwardingDeleteResponse, type CallForwardingUpdateParams, } from "./call-forwarding.js";
2
+ export { Lines } from "./lines.js";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/lines/index.ts"],"names":[],"mappings":"OAEO,EACL,cAAc,EACd,KAAK,8BAA8B,EACnC,KAAK,4BAA4B,EACjC,KAAK,4BAA4B,EACjC,KAAK,0BAA0B,GAChC;OACM,EAAE,KAAK,EAAE"}
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.Lines = exports.CallForwarding = void 0;
5
+ var call_forwarding_1 = require("./call-forwarding.js");
6
+ Object.defineProperty(exports, "CallForwarding", { enumerable: true, get: function () { return call_forwarding_1.CallForwarding; } });
7
+ var lines_1 = require("./lines.js");
8
+ Object.defineProperty(exports, "Lines", { enumerable: true, get: function () { return lines_1.Lines; } });
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/lines/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wDAM2B;AALzB,iHAAA,cAAc,OAAA;AAMhB,oCAAgC;AAAvB,8FAAA,KAAK,OAAA"}
@@ -0,0 +1,4 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ export { CallForwarding, } from "./call-forwarding.mjs";
3
+ export { Lines } from "./lines.mjs";
4
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/resources/lines/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EACL,cAAc,GAKf;OACM,EAAE,KAAK,EAAE"}
@@ -0,0 +1,10 @@
1
+ import { APIResource } from "../../core/resource.mjs";
2
+ import * as CallForwardingAPI from "./call-forwarding.mjs";
3
+ import { CallForwarding, CallForwardingDeleteResponse, CallForwardingRetrieveResponse, CallForwardingUpdateParams, CallForwardingUpdateResponse } from "./call-forwarding.mjs";
4
+ export declare class Lines extends APIResource {
5
+ callForwarding: CallForwardingAPI.CallForwarding;
6
+ }
7
+ export declare namespace Lines {
8
+ export { CallForwarding as CallForwarding, type CallForwardingRetrieveResponse as CallForwardingRetrieveResponse, type CallForwardingUpdateResponse as CallForwardingUpdateResponse, type CallForwardingDeleteResponse as CallForwardingDeleteResponse, type CallForwardingUpdateParams as CallForwardingUpdateParams, };
9
+ }
10
+ //# sourceMappingURL=lines.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lines.d.mts","sourceRoot":"","sources":["../../src/resources/lines/lines.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,iBAAiB;OACtB,EACL,cAAc,EACd,4BAA4B,EAC5B,8BAA8B,EAC9B,0BAA0B,EAC1B,4BAA4B,EAC7B;AAED,qBAAa,KAAM,SAAQ,WAAW;IACpC,cAAc,EAAE,iBAAiB,CAAC,cAAc,CAAsD;CACvG;AAID,MAAM,CAAC,OAAO,WAAW,KAAK,CAAC;IAC7B,OAAO,EACL,cAAc,IAAI,cAAc,EAChC,KAAK,8BAA8B,IAAI,8BAA8B,EACrE,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,0BAA0B,IAAI,0BAA0B,GAC9D,CAAC;CACH"}
@@ -0,0 +1,10 @@
1
+ import { APIResource } from "../../core/resource.js";
2
+ import * as CallForwardingAPI from "./call-forwarding.js";
3
+ import { CallForwarding, CallForwardingDeleteResponse, CallForwardingRetrieveResponse, CallForwardingUpdateParams, CallForwardingUpdateResponse } from "./call-forwarding.js";
4
+ export declare class Lines extends APIResource {
5
+ callForwarding: CallForwardingAPI.CallForwarding;
6
+ }
7
+ export declare namespace Lines {
8
+ export { CallForwarding as CallForwarding, type CallForwardingRetrieveResponse as CallForwardingRetrieveResponse, type CallForwardingUpdateResponse as CallForwardingUpdateResponse, type CallForwardingDeleteResponse as CallForwardingDeleteResponse, type CallForwardingUpdateParams as CallForwardingUpdateParams, };
9
+ }
10
+ //# sourceMappingURL=lines.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lines.d.ts","sourceRoot":"","sources":["../../src/resources/lines/lines.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,iBAAiB;OACtB,EACL,cAAc,EACd,4BAA4B,EAC5B,8BAA8B,EAC9B,0BAA0B,EAC1B,4BAA4B,EAC7B;AAED,qBAAa,KAAM,SAAQ,WAAW;IACpC,cAAc,EAAE,iBAAiB,CAAC,cAAc,CAAsD;CACvG;AAID,MAAM,CAAC,OAAO,WAAW,KAAK,CAAC;IAC7B,OAAO,EACL,cAAc,IAAI,cAAc,EAChC,KAAK,8BAA8B,IAAI,8BAA8B,EACrE,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,0BAA0B,IAAI,0BAA0B,GAC9D,CAAC;CACH"}
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.Lines = void 0;
5
+ const tslib_1 = require("../../internal/tslib.js");
6
+ const resource_1 = require("../../core/resource.js");
7
+ const CallForwardingAPI = tslib_1.__importStar(require("./call-forwarding.js"));
8
+ const call_forwarding_1 = require("./call-forwarding.js");
9
+ class Lines extends resource_1.APIResource {
10
+ constructor() {
11
+ super(...arguments);
12
+ this.callForwarding = new CallForwardingAPI.CallForwarding(this._client);
13
+ }
14
+ }
15
+ exports.Lines = Lines;
16
+ Lines.CallForwarding = call_forwarding_1.CallForwarding;
17
+ //# sourceMappingURL=lines.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lines.js","sourceRoot":"","sources":["../../src/resources/lines/lines.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,qDAAkD;AAClD,gFAAuD;AACvD,0DAM2B;AAE3B,MAAa,KAAM,SAAQ,sBAAW;IAAtC;;QACE,mBAAc,GAAqC,IAAI,iBAAiB,CAAC,cAAc,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACxG,CAAC;CAAA;AAFD,sBAEC;AAED,KAAK,CAAC,cAAc,GAAG,gCAAc,CAAC"}
@@ -0,0 +1,12 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ import { APIResource } from "../../core/resource.mjs";
3
+ import * as CallForwardingAPI from "./call-forwarding.mjs";
4
+ import { CallForwarding, } from "./call-forwarding.mjs";
5
+ export class Lines extends APIResource {
6
+ constructor() {
7
+ super(...arguments);
8
+ this.callForwarding = new CallForwardingAPI.CallForwarding(this._client);
9
+ }
10
+ }
11
+ Lines.CallForwarding = CallForwarding;
12
+ //# sourceMappingURL=lines.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lines.mjs","sourceRoot":"","sources":["../../src/resources/lines/lines.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,KAAK,iBAAiB;OACtB,EACL,cAAc,GAKf;AAED,MAAM,OAAO,KAAM,SAAQ,WAAW;IAAtC;;QACE,mBAAc,GAAqC,IAAI,iBAAiB,CAAC,cAAc,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACxG,CAAC;CAAA;AAED,KAAK,CAAC,cAAc,GAAG,cAAc,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from "./lines/index.mjs";
2
+ //# sourceMappingURL=lines.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lines.d.mts","sourceRoot":"","sources":["../src/resources/lines.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export * from "./lines/index.js";
2
+ //# sourceMappingURL=lines.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lines.d.ts","sourceRoot":"","sources":["../src/resources/lines.ts"],"names":[],"mappings":""}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ const tslib_1 = require("../internal/tslib.js");
5
+ tslib_1.__exportStar(require("./lines/index.js"), exports);
6
+ //# sourceMappingURL=lines.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lines.js","sourceRoot":"","sources":["../src/resources/lines.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,2DAA8B"}
@@ -0,0 +1,3 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ export * from "./lines/index.mjs";
3
+ //# sourceMappingURL=lines.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lines.mjs","sourceRoot":"","sources":["../src/resources/lines.ts"],"names":[],"mappings":"AAAA,sFAAsF"}
@@ -0,0 +1,3 @@
1
+ export { Totp, type TotpGetCodeResponse } from "./totp/index.mjs";
2
+ export { V2 } from "./v2.mjs";
3
+ //# sourceMappingURL=index.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../src/resources/v2/index.ts"],"names":[],"mappings":"OAEO,EAAE,IAAI,EAAE,KAAK,mBAAmB,EAAE;OAClC,EAAE,EAAE,EAAE"}
@@ -0,0 +1,3 @@
1
+ export { Totp, type TotpGetCodeResponse } from "./totp/index.js";
2
+ export { V2 } from "./v2.js";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/v2/index.ts"],"names":[],"mappings":"OAEO,EAAE,IAAI,EAAE,KAAK,mBAAmB,EAAE;OAClC,EAAE,EAAE,EAAE"}
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.V2 = exports.Totp = void 0;
5
+ var index_1 = require("./totp/index.js");
6
+ Object.defineProperty(exports, "Totp", { enumerable: true, get: function () { return index_1.Totp; } });
7
+ var v2_1 = require("./v2.js");
8
+ Object.defineProperty(exports, "V2", { enumerable: true, get: function () { return v2_1.V2; } });
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/v2/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,yCAA8D;AAArD,6FAAA,IAAI,OAAA;AACb,8BAA0B;AAAjB,wFAAA,EAAE,OAAA"}
@@ -0,0 +1,4 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ export { Totp } from "./totp/index.mjs";
3
+ export { V2 } from "./v2.mjs";
4
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/resources/v2/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,IAAI,EAA4B;OAClC,EAAE,EAAE,EAAE"}
@@ -0,0 +1,3 @@
1
+ export { Secrets, type SecretCreateResponse, type SecretListResponse, type SecretDeleteResponse, type SecretCreateParams, } from "./secrets.mjs";
2
+ export { Totp, type TotpGetCodeResponse } from "./totp.mjs";
3
+ //# sourceMappingURL=index.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/resources/v2/totp/index.ts"],"names":[],"mappings":"OAEO,EACL,OAAO,EACP,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,GACxB;OACM,EAAE,IAAI,EAAE,KAAK,mBAAmB,EAAE"}
@@ -0,0 +1,3 @@
1
+ export { Secrets, type SecretCreateResponse, type SecretListResponse, type SecretDeleteResponse, type SecretCreateParams, } from "./secrets.js";
2
+ export { Totp, type TotpGetCodeResponse } from "./totp.js";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/resources/v2/totp/index.ts"],"names":[],"mappings":"OAEO,EACL,OAAO,EACP,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,GACxB;OACM,EAAE,IAAI,EAAE,KAAK,mBAAmB,EAAE"}
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.Totp = exports.Secrets = void 0;
5
+ var secrets_1 = require("./secrets.js");
6
+ Object.defineProperty(exports, "Secrets", { enumerable: true, get: function () { return secrets_1.Secrets; } });
7
+ var totp_1 = require("./totp.js");
8
+ Object.defineProperty(exports, "Totp", { enumerable: true, get: function () { return totp_1.Totp; } });
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/resources/v2/totp/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wCAMmB;AALjB,kGAAA,OAAO,OAAA;AAMT,kCAAwD;AAA/C,4FAAA,IAAI,OAAA"}
@@ -0,0 +1,4 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ export { Secrets, } from "./secrets.mjs";
3
+ export { Totp } from "./totp.mjs";
4
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/resources/v2/totp/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EACL,OAAO,GAKR;OACM,EAAE,IAAI,EAA4B"}