rcs-js 2.0.23 → 2.0.24-rc.2

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 (94) hide show
  1. package/dist/cjs/Client.d.ts +3 -0
  2. package/dist/cjs/Client.js +21 -16
  3. package/dist/cjs/api/errors/ConflictError.d.ts +6 -0
  4. package/dist/cjs/api/errors/ConflictError.js +50 -0
  5. package/dist/cjs/api/errors/ServiceUnavailableError.d.ts +6 -0
  6. package/dist/cjs/api/errors/ServiceUnavailableError.js +50 -0
  7. package/dist/cjs/api/errors/index.d.ts +2 -0
  8. package/dist/cjs/api/errors/index.js +2 -0
  9. package/dist/cjs/api/resources/faxes/client/Client.d.ts +129 -0
  10. package/dist/cjs/api/resources/faxes/client/Client.js +438 -0
  11. package/dist/cjs/api/resources/faxes/client/index.d.ts +1 -0
  12. package/dist/cjs/api/resources/faxes/client/index.js +17 -0
  13. package/dist/cjs/api/resources/faxes/client/requests/FaxesListRequest.d.ts +13 -0
  14. package/dist/cjs/api/resources/faxes/client/requests/FaxesListRequest.js +3 -0
  15. package/dist/cjs/api/resources/faxes/client/requests/SendFaxParams.d.ts +27 -0
  16. package/dist/cjs/api/resources/faxes/client/requests/SendFaxParams.js +3 -0
  17. package/dist/cjs/api/resources/faxes/client/requests/index.d.ts +2 -0
  18. package/dist/cjs/api/resources/faxes/client/requests/index.js +2 -0
  19. package/dist/cjs/api/resources/faxes/index.d.ts +1 -0
  20. package/dist/cjs/api/resources/faxes/index.js +17 -0
  21. package/dist/cjs/api/resources/index.d.ts +2 -0
  22. package/dist/cjs/api/resources/index.js +3 -1
  23. package/dist/cjs/api/types/Fax.d.ts +27 -0
  24. package/dist/cjs/api/types/Fax.js +3 -0
  25. package/dist/cjs/api/types/FaxBillingStatusEnum.d.ts +6 -0
  26. package/dist/cjs/api/types/FaxBillingStatusEnum.js +9 -0
  27. package/dist/cjs/api/types/FaxDetail.d.ts +29 -0
  28. package/dist/cjs/api/types/FaxDetail.js +3 -0
  29. package/dist/cjs/api/types/FaxDirectionEnum.d.ts +6 -0
  30. package/dist/cjs/api/types/FaxDirectionEnum.js +9 -0
  31. package/dist/cjs/api/types/FaxEvent.d.ts +19 -0
  32. package/dist/cjs/api/types/FaxEvent.js +11 -0
  33. package/dist/cjs/api/types/FaxFailureReasonEnum.d.ts +19 -0
  34. package/dist/cjs/api/types/FaxFailureReasonEnum.js +22 -0
  35. package/dist/cjs/api/types/FaxQualityEnum.d.ts +19 -0
  36. package/dist/cjs/api/types/FaxQualityEnum.js +22 -0
  37. package/dist/cjs/api/types/FaxStatusEnum.d.ts +29 -0
  38. package/dist/cjs/api/types/FaxStatusEnum.js +32 -0
  39. package/dist/cjs/api/types/ListFaxesResponse.d.ts +6 -0
  40. package/dist/cjs/api/types/ListFaxesResponse.js +3 -0
  41. package/dist/cjs/api/types/WebhookEventEnum.d.ts +2 -0
  42. package/dist/cjs/api/types/WebhookEventEnum.js +2 -0
  43. package/dist/cjs/api/types/index.d.ts +9 -0
  44. package/dist/cjs/api/types/index.js +9 -0
  45. package/dist/cjs/version.d.ts +1 -1
  46. package/dist/cjs/version.js +1 -1
  47. package/dist/esm/Client.d.mts +3 -0
  48. package/dist/esm/Client.mjs +7 -2
  49. package/dist/esm/api/errors/ConflictError.d.mts +6 -0
  50. package/dist/esm/api/errors/ConflictError.mjs +13 -0
  51. package/dist/esm/api/errors/ServiceUnavailableError.d.mts +6 -0
  52. package/dist/esm/api/errors/ServiceUnavailableError.mjs +13 -0
  53. package/dist/esm/api/errors/index.d.mts +2 -0
  54. package/dist/esm/api/errors/index.mjs +2 -0
  55. package/dist/esm/api/resources/faxes/client/Client.d.mts +129 -0
  56. package/dist/esm/api/resources/faxes/client/Client.mjs +401 -0
  57. package/dist/esm/api/resources/faxes/client/index.d.mts +1 -0
  58. package/dist/esm/api/resources/faxes/client/index.mjs +1 -0
  59. package/dist/esm/api/resources/faxes/client/requests/FaxesListRequest.d.mts +13 -0
  60. package/dist/esm/api/resources/faxes/client/requests/FaxesListRequest.mjs +2 -0
  61. package/dist/esm/api/resources/faxes/client/requests/SendFaxParams.d.mts +27 -0
  62. package/dist/esm/api/resources/faxes/client/requests/SendFaxParams.mjs +2 -0
  63. package/dist/esm/api/resources/faxes/client/requests/index.d.mts +2 -0
  64. package/dist/esm/api/resources/faxes/client/requests/index.mjs +1 -0
  65. package/dist/esm/api/resources/faxes/index.d.mts +1 -0
  66. package/dist/esm/api/resources/faxes/index.mjs +1 -0
  67. package/dist/esm/api/resources/index.d.mts +2 -0
  68. package/dist/esm/api/resources/index.mjs +2 -0
  69. package/dist/esm/api/types/Fax.d.mts +27 -0
  70. package/dist/esm/api/types/Fax.mjs +2 -0
  71. package/dist/esm/api/types/FaxBillingStatusEnum.d.mts +6 -0
  72. package/dist/esm/api/types/FaxBillingStatusEnum.mjs +6 -0
  73. package/dist/esm/api/types/FaxDetail.d.mts +29 -0
  74. package/dist/esm/api/types/FaxDetail.mjs +2 -0
  75. package/dist/esm/api/types/FaxDirectionEnum.d.mts +6 -0
  76. package/dist/esm/api/types/FaxDirectionEnum.mjs +6 -0
  77. package/dist/esm/api/types/FaxEvent.d.mts +19 -0
  78. package/dist/esm/api/types/FaxEvent.mjs +8 -0
  79. package/dist/esm/api/types/FaxFailureReasonEnum.d.mts +19 -0
  80. package/dist/esm/api/types/FaxFailureReasonEnum.mjs +19 -0
  81. package/dist/esm/api/types/FaxQualityEnum.d.mts +19 -0
  82. package/dist/esm/api/types/FaxQualityEnum.mjs +19 -0
  83. package/dist/esm/api/types/FaxStatusEnum.d.mts +29 -0
  84. package/dist/esm/api/types/FaxStatusEnum.mjs +29 -0
  85. package/dist/esm/api/types/ListFaxesResponse.d.mts +6 -0
  86. package/dist/esm/api/types/ListFaxesResponse.mjs +2 -0
  87. package/dist/esm/api/types/WebhookEventEnum.d.mts +2 -0
  88. package/dist/esm/api/types/WebhookEventEnum.mjs +2 -0
  89. package/dist/esm/api/types/index.d.mts +9 -0
  90. package/dist/esm/api/types/index.mjs +9 -0
  91. package/dist/esm/version.d.mts +1 -1
  92. package/dist/esm/version.mjs +1 -1
  93. package/package.json +1 -1
  94. package/reference.md +295 -0
@@ -3,6 +3,7 @@ import { Brands } from "./api/resources/brands/client/Client.js";
3
3
  import { Campaigns } from "./api/resources/campaigns/client/Client.js";
4
4
  import { Contacts } from "./api/resources/contacts/client/Client.js";
5
5
  import { Conversations } from "./api/resources/conversations/client/Client.js";
6
+ import { Faxes } from "./api/resources/faxes/client/Client.js";
6
7
  import { Forms } from "./api/resources/forms/client/Client.js";
7
8
  import { Messages } from "./api/resources/messages/client/Client.js";
8
9
  import { PhoneNumbers } from "./api/resources/phoneNumbers/client/Client.js";
@@ -27,6 +28,7 @@ export declare class PinnacleClient {
27
28
  protected _phoneNumbers: PhoneNumbers | undefined;
28
29
  protected _rcs: Rcs | undefined;
29
30
  protected _webhooks: Webhooks | undefined;
31
+ protected _faxes: Faxes | undefined;
30
32
  protected _forms: Forms | undefined;
31
33
  protected _campaigns: Campaigns | undefined;
32
34
  protected _status: Status | undefined;
@@ -40,6 +42,7 @@ export declare class PinnacleClient {
40
42
  get phoneNumbers(): PhoneNumbers;
41
43
  get rcs(): Rcs;
42
44
  get webhooks(): Webhooks;
45
+ get faxes(): Faxes;
43
46
  get forms(): Forms;
44
47
  get campaigns(): Campaigns;
45
48
  get status(): Status;
@@ -40,13 +40,14 @@ const Client_js_2 = require("./api/resources/brands/client/Client.js");
40
40
  const Client_js_3 = require("./api/resources/campaigns/client/Client.js");
41
41
  const Client_js_4 = require("./api/resources/contacts/client/Client.js");
42
42
  const Client_js_5 = require("./api/resources/conversations/client/Client.js");
43
- const Client_js_6 = require("./api/resources/forms/client/Client.js");
44
- const Client_js_7 = require("./api/resources/messages/client/Client.js");
45
- const Client_js_8 = require("./api/resources/phoneNumbers/client/Client.js");
46
- const Client_js_9 = require("./api/resources/rcs/client/Client.js");
47
- const Client_js_10 = require("./api/resources/status/client/Client.js");
48
- const Client_js_11 = require("./api/resources/tools/client/Client.js");
49
- const Client_js_12 = require("./api/resources/webhooks/client/Client.js");
43
+ const Client_js_6 = require("./api/resources/faxes/client/Client.js");
44
+ const Client_js_7 = require("./api/resources/forms/client/Client.js");
45
+ const Client_js_8 = require("./api/resources/messages/client/Client.js");
46
+ const Client_js_9 = require("./api/resources/phoneNumbers/client/Client.js");
47
+ const Client_js_10 = require("./api/resources/rcs/client/Client.js");
48
+ const Client_js_11 = require("./api/resources/status/client/Client.js");
49
+ const Client_js_12 = require("./api/resources/tools/client/Client.js");
50
+ const Client_js_13 = require("./api/resources/webhooks/client/Client.js");
50
51
  const headers_js_1 = require("./core/headers.js");
51
52
  const core = __importStar(require("./core/index.js"));
52
53
  class PinnacleClient {
@@ -54,8 +55,8 @@ class PinnacleClient {
54
55
  this._options = Object.assign(Object.assign({}, _options), { logging: core.logging.createLogger(_options === null || _options === void 0 ? void 0 : _options.logging), headers: (0, headers_js_1.mergeHeaders)({
55
56
  "X-Fern-Language": "JavaScript",
56
57
  "X-Fern-SDK-Name": "rcs-js",
57
- "X-Fern-SDK-Version": "2.0.23",
58
- "User-Agent": "rcs-js/2.0.23",
58
+ "X-Fern-SDK-Version": "2.0.24-rc.2",
59
+ "User-Agent": "rcs-js/2.0.24-rc.2",
59
60
  "X-Fern-Runtime": core.RUNTIME.type,
60
61
  "X-Fern-Runtime-Version": core.RUNTIME.version,
61
62
  }, _options === null || _options === void 0 ? void 0 : _options.headers) });
@@ -78,23 +79,27 @@ class PinnacleClient {
78
79
  }
79
80
  get messages() {
80
81
  var _a;
81
- return ((_a = this._messages) !== null && _a !== void 0 ? _a : (this._messages = new Client_js_7.Messages(this._options)));
82
+ return ((_a = this._messages) !== null && _a !== void 0 ? _a : (this._messages = new Client_js_8.Messages(this._options)));
82
83
  }
83
84
  get phoneNumbers() {
84
85
  var _a;
85
- return ((_a = this._phoneNumbers) !== null && _a !== void 0 ? _a : (this._phoneNumbers = new Client_js_8.PhoneNumbers(this._options)));
86
+ return ((_a = this._phoneNumbers) !== null && _a !== void 0 ? _a : (this._phoneNumbers = new Client_js_9.PhoneNumbers(this._options)));
86
87
  }
87
88
  get rcs() {
88
89
  var _a;
89
- return ((_a = this._rcs) !== null && _a !== void 0 ? _a : (this._rcs = new Client_js_9.Rcs(this._options)));
90
+ return ((_a = this._rcs) !== null && _a !== void 0 ? _a : (this._rcs = new Client_js_10.Rcs(this._options)));
90
91
  }
91
92
  get webhooks() {
92
93
  var _a;
93
- return ((_a = this._webhooks) !== null && _a !== void 0 ? _a : (this._webhooks = new Client_js_12.Webhooks(this._options)));
94
+ return ((_a = this._webhooks) !== null && _a !== void 0 ? _a : (this._webhooks = new Client_js_13.Webhooks(this._options)));
95
+ }
96
+ get faxes() {
97
+ var _a;
98
+ return ((_a = this._faxes) !== null && _a !== void 0 ? _a : (this._faxes = new Client_js_6.Faxes(this._options)));
94
99
  }
95
100
  get forms() {
96
101
  var _a;
97
- return ((_a = this._forms) !== null && _a !== void 0 ? _a : (this._forms = new Client_js_6.Forms(this._options)));
102
+ return ((_a = this._forms) !== null && _a !== void 0 ? _a : (this._forms = new Client_js_7.Forms(this._options)));
98
103
  }
99
104
  get campaigns() {
100
105
  var _a;
@@ -102,11 +107,11 @@ class PinnacleClient {
102
107
  }
103
108
  get status() {
104
109
  var _a;
105
- return ((_a = this._status) !== null && _a !== void 0 ? _a : (this._status = new Client_js_10.Status(this._options)));
110
+ return ((_a = this._status) !== null && _a !== void 0 ? _a : (this._status = new Client_js_11.Status(this._options)));
106
111
  }
107
112
  get tools() {
108
113
  var _a;
109
- return ((_a = this._tools) !== null && _a !== void 0 ? _a : (this._tools = new Client_js_11.Tools(this._options)));
114
+ return ((_a = this._tools) !== null && _a !== void 0 ? _a : (this._tools = new Client_js_12.Tools(this._options)));
110
115
  }
111
116
  }
112
117
  exports.PinnacleClient = PinnacleClient;
@@ -0,0 +1,6 @@
1
+ import type * as core from "../../core/index.js";
2
+ import * as errors from "../../errors/index.js";
3
+ import type * as Pinnacle from "../index.js";
4
+ export declare class ConflictError extends errors.PinnacleError {
5
+ constructor(body: Pinnacle.Error_, rawResponse?: core.RawResponse);
6
+ }
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
16
+ }) : function(o, v) {
17
+ o["default"] = v;
18
+ });
19
+ var __importStar = (this && this.__importStar) || (function () {
20
+ var ownKeys = function(o) {
21
+ ownKeys = Object.getOwnPropertyNames || function (o) {
22
+ var ar = [];
23
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
24
+ return ar;
25
+ };
26
+ return ownKeys(o);
27
+ };
28
+ return function (mod) {
29
+ if (mod && mod.__esModule) return mod;
30
+ var result = {};
31
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32
+ __setModuleDefault(result, mod);
33
+ return result;
34
+ };
35
+ })();
36
+ Object.defineProperty(exports, "__esModule", { value: true });
37
+ exports.ConflictError = void 0;
38
+ const errors = __importStar(require("../../errors/index.js"));
39
+ class ConflictError extends errors.PinnacleError {
40
+ constructor(body, rawResponse) {
41
+ super({
42
+ message: "ConflictError",
43
+ statusCode: 409,
44
+ body: body,
45
+ rawResponse: rawResponse,
46
+ });
47
+ Object.setPrototypeOf(this, ConflictError.prototype);
48
+ }
49
+ }
50
+ exports.ConflictError = ConflictError;
@@ -0,0 +1,6 @@
1
+ import type * as core from "../../core/index.js";
2
+ import * as errors from "../../errors/index.js";
3
+ import type * as Pinnacle from "../index.js";
4
+ export declare class ServiceUnavailableError extends errors.PinnacleError {
5
+ constructor(body: Pinnacle.Error_, rawResponse?: core.RawResponse);
6
+ }
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
16
+ }) : function(o, v) {
17
+ o["default"] = v;
18
+ });
19
+ var __importStar = (this && this.__importStar) || (function () {
20
+ var ownKeys = function(o) {
21
+ ownKeys = Object.getOwnPropertyNames || function (o) {
22
+ var ar = [];
23
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
24
+ return ar;
25
+ };
26
+ return ownKeys(o);
27
+ };
28
+ return function (mod) {
29
+ if (mod && mod.__esModule) return mod;
30
+ var result = {};
31
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32
+ __setModuleDefault(result, mod);
33
+ return result;
34
+ };
35
+ })();
36
+ Object.defineProperty(exports, "__esModule", { value: true });
37
+ exports.ServiceUnavailableError = void 0;
38
+ const errors = __importStar(require("../../errors/index.js"));
39
+ class ServiceUnavailableError extends errors.PinnacleError {
40
+ constructor(body, rawResponse) {
41
+ super({
42
+ message: "ServiceUnavailableError",
43
+ statusCode: 503,
44
+ body: body,
45
+ rawResponse: rawResponse,
46
+ });
47
+ Object.setPrototypeOf(this, ServiceUnavailableError.prototype);
48
+ }
49
+ }
50
+ exports.ServiceUnavailableError = ServiceUnavailableError;
@@ -1,7 +1,9 @@
1
1
  export * from "./BadRequestError.js";
2
+ export * from "./ConflictError.js";
2
3
  export * from "./ForbiddenError.js";
3
4
  export * from "./InternalServerError.js";
4
5
  export * from "./NotFoundError.js";
5
6
  export * from "./NotImplementedError.js";
6
7
  export * from "./PaymentRequiredError.js";
8
+ export * from "./ServiceUnavailableError.js";
7
9
  export * from "./UnauthorizedError.js";
@@ -15,9 +15,11 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./BadRequestError.js"), exports);
18
+ __exportStar(require("./ConflictError.js"), exports);
18
19
  __exportStar(require("./ForbiddenError.js"), exports);
19
20
  __exportStar(require("./InternalServerError.js"), exports);
20
21
  __exportStar(require("./NotFoundError.js"), exports);
21
22
  __exportStar(require("./NotImplementedError.js"), exports);
22
23
  __exportStar(require("./PaymentRequiredError.js"), exports);
24
+ __exportStar(require("./ServiceUnavailableError.js"), exports);
23
25
  __exportStar(require("./UnauthorizedError.js"), exports);
@@ -0,0 +1,129 @@
1
+ import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js";
2
+ import * as core from "../../../../core/index.js";
3
+ import * as Pinnacle from "../../../index.js";
4
+ export declare namespace Faxes {
5
+ interface Options extends BaseClientOptions {
6
+ }
7
+ interface RequestOptions extends BaseRequestOptions {
8
+ }
9
+ }
10
+ export declare class Faxes {
11
+ protected readonly _options: Faxes.Options;
12
+ constructor(_options: Faxes.Options);
13
+ /**
14
+ * List your team's fax history, newest first.
15
+ *
16
+ * **HIPAA only:** this endpoint exists only in Pinnacle's HIPAA cell and is unavailable at `https://api.pinnacle.sh`.
17
+ *
18
+ * Results contain complete faxes only. Use `nextOffset` until it is null. The maximum page size is 100 records and the maximum offset is 100,000.
19
+ *
20
+ * @param {Pinnacle.FaxesListRequest} request
21
+ * @param {Faxes.RequestOptions} requestOptions - Request-specific configuration.
22
+ *
23
+ * @throws {@link Pinnacle.BadRequestError}
24
+ * @throws {@link Pinnacle.UnauthorizedError}
25
+ * @throws {@link Pinnacle.ForbiddenError}
26
+ * @throws {@link Pinnacle.InternalServerError}
27
+ * @throws {@link Pinnacle.ServiceUnavailableError}
28
+ *
29
+ * @example
30
+ * await client.faxes.list()
31
+ */
32
+ list(request?: Pinnacle.FaxesListRequest, requestOptions?: Faxes.RequestOptions): core.HttpResponsePromise<Pinnacle.ListFaxesResponse>;
33
+ private __list;
34
+ /**
35
+ * Send one PDF, TIFF, JPEG, PNG, DOC, DOCX, RTF, or TXT document from a configured fax number.
36
+ *
37
+ * **HIPAA only:** this endpoint exists only in Pinnacle's HIPAA cell. Complete HIPAA onboarding and use the connection details provided by Pinnacle. It is not available at `https://api.pinnacle.sh`.
38
+ *
39
+ * **Availability:** `from` must be an enabled fax number owned by your team. Fax sending is unavailable for development-mode teams and sandbox numbers. Each request accepts exactly one document; cover pages and per-request webhook URLs are not supported.
40
+ *
41
+ * **Source URL:** `mediaUrl` must be a publicly reachable HTTPS URL on port 443. Signed query parameters are supported. URLs with credentials, redirects, private or local network addresses, and non-200 responses are rejected. Downloads must complete within 30 seconds.
42
+ *
43
+ * **Document limits:** the document must contain 1–3,500 pages and be no larger than 50 MB. Documents over 350 pages are split automatically and remain one fax in the API. File extensions and response headers do not override file validation.
44
+ *
45
+ * **Document safety:** encrypted files, macros, ActiveX controls, embedded objects, symbolic links, unsafe archive paths, and malformed documents are rejected.
46
+ *
47
+ * **Quality:** `HIGH` is the default and recommended choice for most documents. Use `NORMAL` when speed matters more than detail, `VERY_HIGH` for small text and fine lines, `ULTRA_LIGHT` for image-heavy documents, or `ULTRA_DARK` for text-heavy documents.
48
+ *
49
+ * **Asynchronous processing:** the request returns 202 after preparation is queued. Downloading, validation, conversion, splitting, and archival happen afterward. A 202 response does not mean the document is valid or delivered. Watch `FAX.STATUS` webhooks or retrieve the fax for the final result. The initial status is `PREPARING`, `reservedCost` is zero, and `hasMedia` is false.
50
+ *
51
+ * **Multipart delivery:** the original `id` identifies the complete fax across list, detail, cancellation, billing, media, and webhooks. Parts are sent in order. If a part fails, later parts are not sent. The fax becomes `FAILED`, and `partialContent` is true if any earlier pages were transmitted.
52
+ *
53
+ * **Pricing:** sent and received faxes cost $0.025 per transmitted page. Quality does not change the rate. Pinnacle reserves the estimated cost after preparation, charges only for transmitted pages, and returns unused reserved credits. If your balance is too low, the fax becomes `FAILED` with `failureReason: INSUFFICIENT_CREDITS`.
54
+ *
55
+ * **Delivery uncertainty:** Pinnacle does not automatically retry a fax after transmission may have started, which prevents duplicate delivery and charges. If transmission cannot be confirmed, status becomes `SUBMISSION_UNKNOWN` while Pinnacle reconciles the fax.
56
+ *
57
+ * **Idempotency:** `Idempotency-Key` is optional. Without it, each request creates a new fax, including retries. For retry-safe sending, generate a UUID for each intended fax and retain it until the outcome is known. After a client timeout, retry with the same key and identical body. The key is scoped to your team and covers `from`, `to`, `mediaUrl`, and `quality`. Reusing it with an identical body returns the existing fax; changing any of those fields returns 409.
58
+ *
59
+ * @param {Pinnacle.SendFaxParams} request
60
+ * @param {Faxes.RequestOptions} requestOptions - Request-specific configuration.
61
+ *
62
+ * @throws {@link Pinnacle.BadRequestError}
63
+ * @throws {@link Pinnacle.UnauthorizedError}
64
+ * @throws {@link Pinnacle.ForbiddenError}
65
+ * @throws {@link Pinnacle.NotFoundError}
66
+ * @throws {@link Pinnacle.ConflictError}
67
+ * @throws {@link Pinnacle.InternalServerError}
68
+ * @throws {@link Pinnacle.ServiceUnavailableError}
69
+ *
70
+ * @example
71
+ * await client.faxes.send({
72
+ * from: "from",
73
+ * to: "to",
74
+ * mediaUrl: "mediaUrl"
75
+ * })
76
+ */
77
+ send(request: Pinnacle.SendFaxParams, requestOptions?: Faxes.RequestOptions): core.HttpResponsePromise<Pinnacle.Fax>;
78
+ private __send;
79
+ /**
80
+ * Retrieve a fax and a one-hour signed document URL when its media is available.
81
+ *
82
+ * **HIPAA only:** this endpoint exists only in Pinnacle's HIPAA cell and is unavailable at `https://api.pinnacle.sh`.
83
+ *
84
+ * Only faxes owned by your team are accessible. Unknown IDs and records removed by your team's HIPAA retention policy return 404. `mediaUrl` is null until archival completes and expires one hour after retrieval; request the fax again for a new URL.
85
+ *
86
+ * @param {string} id - Fax ID returned by send, list, or a fax webhook.
87
+ * @param {Faxes.RequestOptions} requestOptions - Request-specific configuration.
88
+ *
89
+ * @throws {@link Pinnacle.BadRequestError}
90
+ * @throws {@link Pinnacle.UnauthorizedError}
91
+ * @throws {@link Pinnacle.ForbiddenError}
92
+ * @throws {@link Pinnacle.NotFoundError}
93
+ * @throws {@link Pinnacle.InternalServerError}
94
+ * @throws {@link Pinnacle.ServiceUnavailableError}
95
+ *
96
+ * @example
97
+ * await client.faxes.get("id")
98
+ */
99
+ get(id: string, requestOptions?: Faxes.RequestOptions): core.HttpResponsePromise<Pinnacle.FaxDetail>;
100
+ private __get;
101
+ /**
102
+ * Cancel an outbound fax before transmission starts.
103
+ *
104
+ * Cancellation stops queued preparation and every unsent part, releases the credit reservation, and changes the status to `CANCELLED`. Repeating a successful cancellation returns the same fax.
105
+ *
106
+ * Cancellation is unavailable for inbound faxes, completed faxes, and `SUBMISSION_UNKNOWN` faxes. Pinnacle returns 409 once transmission may have started, even when later parts remain unsent.
107
+ *
108
+ * **HIPAA only:** this endpoint exists only in Pinnacle's HIPAA cell and is unavailable at `https://api.pinnacle.sh`.
109
+ *
110
+ * Only a fax ID owned by your team is accepted. Unknown IDs return 404.
111
+ *
112
+ * @param {string} id - Fax ID returned by send, list, or a fax webhook.
113
+ * @param {Faxes.RequestOptions} requestOptions - Request-specific configuration.
114
+ *
115
+ * @throws {@link Pinnacle.BadRequestError}
116
+ * @throws {@link Pinnacle.UnauthorizedError}
117
+ * @throws {@link Pinnacle.ForbiddenError}
118
+ * @throws {@link Pinnacle.NotFoundError}
119
+ * @throws {@link Pinnacle.ConflictError}
120
+ * @throws {@link Pinnacle.InternalServerError}
121
+ * @throws {@link Pinnacle.ServiceUnavailableError}
122
+ *
123
+ * @example
124
+ * await client.faxes.cancel("id")
125
+ */
126
+ cancel(id: string, requestOptions?: Faxes.RequestOptions): core.HttpResponsePromise<Pinnacle.Fax>;
127
+ private __cancel;
128
+ protected _getCustomAuthorizationHeaders(): Promise<Record<string, string | undefined>>;
129
+ }