@chrt-inc/typescript-sdk 1.615.0 → 1.625.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 (44) hide show
  1. package/dist/cjs/Client.js +2 -2
  2. package/dist/cjs/api/resources/shipping/client/Client.d.ts +0 -3
  3. package/dist/cjs/api/resources/shipping/client/Client.js +16 -21
  4. package/dist/cjs/api/resources/shipping/resources/index.d.ts +0 -2
  5. package/dist/cjs/api/resources/shipping/resources/index.js +1 -3
  6. package/dist/cjs/api/types/index.d.ts +0 -1
  7. package/dist/cjs/api/types/index.js +0 -1
  8. package/dist/cjs/version.d.ts +1 -1
  9. package/dist/cjs/version.js +1 -1
  10. package/dist/esm/Client.mjs +2 -2
  11. package/dist/esm/api/resources/shipping/client/Client.d.mts +0 -3
  12. package/dist/esm/api/resources/shipping/client/Client.mjs +0 -5
  13. package/dist/esm/api/resources/shipping/resources/index.d.mts +0 -2
  14. package/dist/esm/api/resources/shipping/resources/index.mjs +0 -2
  15. package/dist/esm/api/types/index.d.mts +0 -1
  16. package/dist/esm/api/types/index.mjs +0 -1
  17. package/dist/esm/version.d.mts +1 -1
  18. package/dist/esm/version.mjs +1 -1
  19. package/package.json +1 -1
  20. package/reference.md +0 -68
  21. package/dist/cjs/api/resources/shipping/resources/docs/client/Client.d.ts +0 -40
  22. package/dist/cjs/api/resources/shipping/resources/docs/client/Client.js +0 -124
  23. package/dist/cjs/api/resources/shipping/resources/docs/client/index.d.ts +0 -2
  24. package/dist/cjs/api/resources/shipping/resources/docs/client/index.js +0 -17
  25. package/dist/cjs/api/resources/shipping/resources/docs/client/requests/GenerateShippingDocReq.d.ts +0 -15
  26. package/dist/cjs/api/resources/shipping/resources/docs/client/requests/GenerateShippingDocReq.js +0 -5
  27. package/dist/cjs/api/resources/shipping/resources/docs/client/requests/index.d.ts +0 -1
  28. package/dist/cjs/api/resources/shipping/resources/docs/client/requests/index.js +0 -2
  29. package/dist/cjs/api/resources/shipping/resources/docs/index.d.ts +0 -1
  30. package/dist/cjs/api/resources/shipping/resources/docs/index.js +0 -17
  31. package/dist/cjs/api/types/ShippingDocTemplateEnum.d.ts +0 -8
  32. package/dist/cjs/api/types/ShippingDocTemplateEnum.js +0 -10
  33. package/dist/esm/api/resources/shipping/resources/docs/client/Client.d.mts +0 -40
  34. package/dist/esm/api/resources/shipping/resources/docs/client/Client.mjs +0 -87
  35. package/dist/esm/api/resources/shipping/resources/docs/client/index.d.mts +0 -2
  36. package/dist/esm/api/resources/shipping/resources/docs/client/index.mjs +0 -1
  37. package/dist/esm/api/resources/shipping/resources/docs/client/requests/GenerateShippingDocReq.d.mts +0 -15
  38. package/dist/esm/api/resources/shipping/resources/docs/client/requests/GenerateShippingDocReq.mjs +0 -4
  39. package/dist/esm/api/resources/shipping/resources/docs/client/requests/index.d.mts +0 -1
  40. package/dist/esm/api/resources/shipping/resources/docs/client/requests/index.mjs +0 -1
  41. package/dist/esm/api/resources/shipping/resources/docs/index.d.mts +0 -1
  42. package/dist/esm/api/resources/shipping/resources/docs/index.mjs +0 -1
  43. package/dist/esm/api/types/ShippingDocTemplateEnum.d.mts +0 -8
  44. package/dist/esm/api/types/ShippingDocTemplateEnum.mjs +0 -7
@@ -54,8 +54,8 @@ class ChrtClient {
54
54
  this._options = Object.assign(Object.assign({}, _options), { headers: (0, headers_js_1.mergeHeaders)({
55
55
  "X-Fern-Language": "JavaScript",
56
56
  "X-Fern-SDK-Name": "@chrt-inc/typescript-sdk",
57
- "X-Fern-SDK-Version": "1.615.0",
58
- "User-Agent": "@chrt-inc/typescript-sdk/1.615.0",
57
+ "X-Fern-SDK-Version": "1.625.0",
58
+ "User-Agent": "@chrt-inc/typescript-sdk/1.625.0",
59
59
  "X-Fern-Runtime": core.RUNTIME.type,
60
60
  "X-Fern-Runtime-Version": core.RUNTIME.version,
61
61
  }, _options === null || _options === void 0 ? void 0 : _options.headers) });
@@ -3,7 +3,6 @@
3
3
  */
4
4
  import * as environments from "../../../../environments.js";
5
5
  import * as core from "../../../../core/index.js";
6
- import { Docs } from "../resources/docs/client/Client.js";
7
6
  import { Drivers } from "../resources/drivers/client/Client.js";
8
7
  import { Cargos } from "../resources/cargos/client/Client.js";
9
8
  import { Flights } from "../resources/flights/client/Client.js";
@@ -25,7 +24,6 @@ export declare namespace Shipping {
25
24
  }
26
25
  export declare class Shipping {
27
26
  protected readonly _options: Shipping.Options;
28
- protected _docs: Docs | undefined;
29
27
  protected _drivers: Drivers | undefined;
30
28
  protected _cargos: Cargos | undefined;
31
29
  protected _flights: Flights | undefined;
@@ -35,7 +33,6 @@ export declare class Shipping {
35
33
  protected _taskGroups: TaskGroups | undefined;
36
34
  protected _tasks: Tasks | undefined;
37
35
  constructor(_options?: Shipping.Options);
38
- get docs(): Docs;
39
36
  get drivers(): Drivers;
40
37
  get cargos(): Cargos;
41
38
  get flights(): Flights;
@@ -4,54 +4,49 @@
4
4
  */
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.Shipping = void 0;
7
- const Client_js_1 = require("../resources/docs/client/Client.js");
8
- const Client_js_2 = require("../resources/drivers/client/Client.js");
9
- const Client_js_3 = require("../resources/cargos/client/Client.js");
10
- const Client_js_4 = require("../resources/flights/client/Client.js");
11
- const Client_js_5 = require("../resources/taskArtifacts/client/Client.js");
12
- const Client_js_6 = require("../resources/orders/client/Client.js");
13
- const Client_js_7 = require("../resources/orderDrafts/client/Client.js");
14
- const Client_js_8 = require("../resources/taskGroups/client/Client.js");
15
- const Client_js_9 = require("../resources/tasks/client/Client.js");
7
+ const Client_js_1 = require("../resources/drivers/client/Client.js");
8
+ const Client_js_2 = require("../resources/cargos/client/Client.js");
9
+ const Client_js_3 = require("../resources/flights/client/Client.js");
10
+ const Client_js_4 = require("../resources/taskArtifacts/client/Client.js");
11
+ const Client_js_5 = require("../resources/orders/client/Client.js");
12
+ const Client_js_6 = require("../resources/orderDrafts/client/Client.js");
13
+ const Client_js_7 = require("../resources/taskGroups/client/Client.js");
14
+ const Client_js_8 = require("../resources/tasks/client/Client.js");
16
15
  class Shipping {
17
16
  constructor(_options = {}) {
18
17
  this._options = _options;
19
18
  }
20
- get docs() {
21
- var _a;
22
- return ((_a = this._docs) !== null && _a !== void 0 ? _a : (this._docs = new Client_js_1.Docs(this._options)));
23
- }
24
19
  get drivers() {
25
20
  var _a;
26
- return ((_a = this._drivers) !== null && _a !== void 0 ? _a : (this._drivers = new Client_js_2.Drivers(this._options)));
21
+ return ((_a = this._drivers) !== null && _a !== void 0 ? _a : (this._drivers = new Client_js_1.Drivers(this._options)));
27
22
  }
28
23
  get cargos() {
29
24
  var _a;
30
- return ((_a = this._cargos) !== null && _a !== void 0 ? _a : (this._cargos = new Client_js_3.Cargos(this._options)));
25
+ return ((_a = this._cargos) !== null && _a !== void 0 ? _a : (this._cargos = new Client_js_2.Cargos(this._options)));
31
26
  }
32
27
  get flights() {
33
28
  var _a;
34
- return ((_a = this._flights) !== null && _a !== void 0 ? _a : (this._flights = new Client_js_4.Flights(this._options)));
29
+ return ((_a = this._flights) !== null && _a !== void 0 ? _a : (this._flights = new Client_js_3.Flights(this._options)));
35
30
  }
36
31
  get taskArtifacts() {
37
32
  var _a;
38
- return ((_a = this._taskArtifacts) !== null && _a !== void 0 ? _a : (this._taskArtifacts = new Client_js_5.TaskArtifacts(this._options)));
33
+ return ((_a = this._taskArtifacts) !== null && _a !== void 0 ? _a : (this._taskArtifacts = new Client_js_4.TaskArtifacts(this._options)));
39
34
  }
40
35
  get orders() {
41
36
  var _a;
42
- return ((_a = this._orders) !== null && _a !== void 0 ? _a : (this._orders = new Client_js_6.Orders(this._options)));
37
+ return ((_a = this._orders) !== null && _a !== void 0 ? _a : (this._orders = new Client_js_5.Orders(this._options)));
43
38
  }
44
39
  get orderDrafts() {
45
40
  var _a;
46
- return ((_a = this._orderDrafts) !== null && _a !== void 0 ? _a : (this._orderDrafts = new Client_js_7.OrderDrafts(this._options)));
41
+ return ((_a = this._orderDrafts) !== null && _a !== void 0 ? _a : (this._orderDrafts = new Client_js_6.OrderDrafts(this._options)));
47
42
  }
48
43
  get taskGroups() {
49
44
  var _a;
50
- return ((_a = this._taskGroups) !== null && _a !== void 0 ? _a : (this._taskGroups = new Client_js_8.TaskGroups(this._options)));
45
+ return ((_a = this._taskGroups) !== null && _a !== void 0 ? _a : (this._taskGroups = new Client_js_7.TaskGroups(this._options)));
51
46
  }
52
47
  get tasks() {
53
48
  var _a;
54
- return ((_a = this._tasks) !== null && _a !== void 0 ? _a : (this._tasks = new Client_js_9.Tasks(this._options)));
49
+ return ((_a = this._tasks) !== null && _a !== void 0 ? _a : (this._tasks = new Client_js_8.Tasks(this._options)));
55
50
  }
56
51
  }
57
52
  exports.Shipping = Shipping;
@@ -1,4 +1,3 @@
1
- export * as docs from "./docs/index.js";
2
1
  export * as drivers from "./drivers/index.js";
3
2
  export * as cargos from "./cargos/index.js";
4
3
  export * as flights from "./flights/index.js";
@@ -7,7 +6,6 @@ export * as orders from "./orders/index.js";
7
6
  export * as orderDrafts from "./orderDrafts/index.js";
8
7
  export * as taskGroups from "./taskGroups/index.js";
9
8
  export * as tasks from "./tasks/index.js";
10
- export * from "./docs/client/requests/index.js";
11
9
  export * from "./drivers/client/requests/index.js";
12
10
  export * from "./taskArtifacts/client/requests/index.js";
13
11
  export * from "./orders/client/requests/index.js";
@@ -36,8 +36,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
36
36
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
37
37
  };
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.tasks = exports.taskGroups = exports.orderDrafts = exports.orders = exports.taskArtifacts = exports.flights = exports.cargos = exports.drivers = exports.docs = void 0;
40
- exports.docs = __importStar(require("./docs/index.js"));
39
+ exports.tasks = exports.taskGroups = exports.orderDrafts = exports.orders = exports.taskArtifacts = exports.flights = exports.cargos = exports.drivers = void 0;
41
40
  exports.drivers = __importStar(require("./drivers/index.js"));
42
41
  exports.cargos = __importStar(require("./cargos/index.js"));
43
42
  exports.flights = __importStar(require("./flights/index.js"));
@@ -46,7 +45,6 @@ exports.orders = __importStar(require("./orders/index.js"));
46
45
  exports.orderDrafts = __importStar(require("./orderDrafts/index.js"));
47
46
  exports.taskGroups = __importStar(require("./taskGroups/index.js"));
48
47
  exports.tasks = __importStar(require("./tasks/index.js"));
49
- __exportStar(require("./docs/client/requests/index.js"), exports);
50
48
  __exportStar(require("./drivers/client/requests/index.js"), exports);
51
49
  __exportStar(require("./taskArtifacts/client/requests/index.js"), exports);
52
50
  __exportStar(require("./orders/client/requests/index.js"), exports);
@@ -195,7 +195,6 @@ export * from "./ShipperConnectionRes.js";
195
195
  export * from "./ShipperCourierConnection1.js";
196
196
  export * from "./ShipperForwarderConnection1.js";
197
197
  export * from "./ShipperOrgInfoForConnections1.js";
198
- export * from "./ShippingDocTemplateEnum.js";
199
198
  export * from "./ShippingOrderCancelledWebhookPayload.js";
200
199
  export * from "./ShippingOrderCompletedWebhookPayload.js";
201
200
  export * from "./ShippingOrderStagedWebhookPayload.js";
@@ -211,7 +211,6 @@ __exportStar(require("./ShipperConnectionRes.js"), exports);
211
211
  __exportStar(require("./ShipperCourierConnection1.js"), exports);
212
212
  __exportStar(require("./ShipperForwarderConnection1.js"), exports);
213
213
  __exportStar(require("./ShipperOrgInfoForConnections1.js"), exports);
214
- __exportStar(require("./ShippingDocTemplateEnum.js"), exports);
215
214
  __exportStar(require("./ShippingOrderCancelledWebhookPayload.js"), exports);
216
215
  __exportStar(require("./ShippingOrderCompletedWebhookPayload.js"), exports);
217
216
  __exportStar(require("./ShippingOrderStagedWebhookPayload.js"), exports);
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "1.615.0";
1
+ export declare const SDK_VERSION = "1.625.0";
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SDK_VERSION = void 0;
4
- exports.SDK_VERSION = "1.615.0";
4
+ exports.SDK_VERSION = "1.625.0";
@@ -18,8 +18,8 @@ export class ChrtClient {
18
18
  this._options = Object.assign(Object.assign({}, _options), { headers: mergeHeaders({
19
19
  "X-Fern-Language": "JavaScript",
20
20
  "X-Fern-SDK-Name": "@chrt-inc/typescript-sdk",
21
- "X-Fern-SDK-Version": "1.615.0",
22
- "User-Agent": "@chrt-inc/typescript-sdk/1.615.0",
21
+ "X-Fern-SDK-Version": "1.625.0",
22
+ "User-Agent": "@chrt-inc/typescript-sdk/1.625.0",
23
23
  "X-Fern-Runtime": core.RUNTIME.type,
24
24
  "X-Fern-Runtime-Version": core.RUNTIME.version,
25
25
  }, _options === null || _options === void 0 ? void 0 : _options.headers) });
@@ -3,7 +3,6 @@
3
3
  */
4
4
  import * as environments from "../../../../environments.mjs";
5
5
  import * as core from "../../../../core/index.mjs";
6
- import { Docs } from "../resources/docs/client/Client.mjs";
7
6
  import { Drivers } from "../resources/drivers/client/Client.mjs";
8
7
  import { Cargos } from "../resources/cargos/client/Client.mjs";
9
8
  import { Flights } from "../resources/flights/client/Client.mjs";
@@ -25,7 +24,6 @@ export declare namespace Shipping {
25
24
  }
26
25
  export declare class Shipping {
27
26
  protected readonly _options: Shipping.Options;
28
- protected _docs: Docs | undefined;
29
27
  protected _drivers: Drivers | undefined;
30
28
  protected _cargos: Cargos | undefined;
31
29
  protected _flights: Flights | undefined;
@@ -35,7 +33,6 @@ export declare class Shipping {
35
33
  protected _taskGroups: TaskGroups | undefined;
36
34
  protected _tasks: Tasks | undefined;
37
35
  constructor(_options?: Shipping.Options);
38
- get docs(): Docs;
39
36
  get drivers(): Drivers;
40
37
  get cargos(): Cargos;
41
38
  get flights(): Flights;
@@ -1,7 +1,6 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
- import { Docs } from "../resources/docs/client/Client.mjs";
5
4
  import { Drivers } from "../resources/drivers/client/Client.mjs";
6
5
  import { Cargos } from "../resources/cargos/client/Client.mjs";
7
6
  import { Flights } from "../resources/flights/client/Client.mjs";
@@ -14,10 +13,6 @@ export class Shipping {
14
13
  constructor(_options = {}) {
15
14
  this._options = _options;
16
15
  }
17
- get docs() {
18
- var _a;
19
- return ((_a = this._docs) !== null && _a !== void 0 ? _a : (this._docs = new Docs(this._options)));
20
- }
21
16
  get drivers() {
22
17
  var _a;
23
18
  return ((_a = this._drivers) !== null && _a !== void 0 ? _a : (this._drivers = new Drivers(this._options)));
@@ -1,4 +1,3 @@
1
- export * as docs from "./docs/index.mjs";
2
1
  export * as drivers from "./drivers/index.mjs";
3
2
  export * as cargos from "./cargos/index.mjs";
4
3
  export * as flights from "./flights/index.mjs";
@@ -7,7 +6,6 @@ export * as orders from "./orders/index.mjs";
7
6
  export * as orderDrafts from "./orderDrafts/index.mjs";
8
7
  export * as taskGroups from "./taskGroups/index.mjs";
9
8
  export * as tasks from "./tasks/index.mjs";
10
- export * from "./docs/client/requests/index.mjs";
11
9
  export * from "./drivers/client/requests/index.mjs";
12
10
  export * from "./taskArtifacts/client/requests/index.mjs";
13
11
  export * from "./orders/client/requests/index.mjs";
@@ -1,4 +1,3 @@
1
- export * as docs from "./docs/index.mjs";
2
1
  export * as drivers from "./drivers/index.mjs";
3
2
  export * as cargos from "./cargos/index.mjs";
4
3
  export * as flights from "./flights/index.mjs";
@@ -7,7 +6,6 @@ export * as orders from "./orders/index.mjs";
7
6
  export * as orderDrafts from "./orderDrafts/index.mjs";
8
7
  export * as taskGroups from "./taskGroups/index.mjs";
9
8
  export * as tasks from "./tasks/index.mjs";
10
- export * from "./docs/client/requests/index.mjs";
11
9
  export * from "./drivers/client/requests/index.mjs";
12
10
  export * from "./taskArtifacts/client/requests/index.mjs";
13
11
  export * from "./orders/client/requests/index.mjs";
@@ -195,7 +195,6 @@ export * from "./ShipperConnectionRes.mjs";
195
195
  export * from "./ShipperCourierConnection1.mjs";
196
196
  export * from "./ShipperForwarderConnection1.mjs";
197
197
  export * from "./ShipperOrgInfoForConnections1.mjs";
198
- export * from "./ShippingDocTemplateEnum.mjs";
199
198
  export * from "./ShippingOrderCancelledWebhookPayload.mjs";
200
199
  export * from "./ShippingOrderCompletedWebhookPayload.mjs";
201
200
  export * from "./ShippingOrderStagedWebhookPayload.mjs";
@@ -195,7 +195,6 @@ export * from "./ShipperConnectionRes.mjs";
195
195
  export * from "./ShipperCourierConnection1.mjs";
196
196
  export * from "./ShipperForwarderConnection1.mjs";
197
197
  export * from "./ShipperOrgInfoForConnections1.mjs";
198
- export * from "./ShippingDocTemplateEnum.mjs";
199
198
  export * from "./ShippingOrderCancelledWebhookPayload.mjs";
200
199
  export * from "./ShippingOrderCompletedWebhookPayload.mjs";
201
200
  export * from "./ShippingOrderStagedWebhookPayload.mjs";
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "1.615.0";
1
+ export declare const SDK_VERSION = "1.625.0";
@@ -1 +1 @@
1
- export const SDK_VERSION = "1.615.0";
1
+ export const SDK_VERSION = "1.625.0";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chrt-inc/typescript-sdk",
3
- "version": "1.615.0",
3
+ "version": "1.625.0",
4
4
  "private": false,
5
5
  "repository": "github:chrt-inc/typescript-sdk",
6
6
  "type": "commonjs",
package/reference.md CHANGED
@@ -7615,74 +7615,6 @@ await client.orgs.orgInfoForConnections.forwarder.updateV1();
7615
7615
  </dl>
7616
7616
  </details>
7617
7617
 
7618
- ## Shipping Docs
7619
-
7620
- <details><summary><code>client.shipping.docs.<a href="/src/api/resources/shipping/resources/docs/client/Client.ts">postGenerateV1</a>({ ...params }) -> core.BinaryResponse</code></summary>
7621
- <dl>
7622
- <dd>
7623
-
7624
- #### 📝 Description
7625
-
7626
- <dl>
7627
- <dd>
7628
-
7629
- <dl>
7630
- <dd>
7631
-
7632
- Generates a shipping document (BOL or POD) as a PDF for the given order. | authz_personas=[order_creator_org_operators] | (GenerateShippingDocReq) -> (PDF binary)
7633
-
7634
- </dd>
7635
- </dl>
7636
- </dd>
7637
- </dl>
7638
-
7639
- #### 🔌 Usage
7640
-
7641
- <dl>
7642
- <dd>
7643
-
7644
- <dl>
7645
- <dd>
7646
-
7647
- ```typescript
7648
- await client.shipping.docs.postGenerateV1({
7649
- order_ref: "order_ref",
7650
- template: "pod",
7651
- });
7652
- ```
7653
-
7654
- </dd>
7655
- </dl>
7656
- </dd>
7657
- </dl>
7658
-
7659
- #### ⚙️ Parameters
7660
-
7661
- <dl>
7662
- <dd>
7663
-
7664
- <dl>
7665
- <dd>
7666
-
7667
- **request:** `Chrt.shipping.GenerateShippingDocReq`
7668
-
7669
- </dd>
7670
- </dl>
7671
-
7672
- <dl>
7673
- <dd>
7674
-
7675
- **requestOptions:** `Docs.RequestOptions`
7676
-
7677
- </dd>
7678
- </dl>
7679
- </dd>
7680
- </dl>
7681
-
7682
- </dd>
7683
- </dl>
7684
- </details>
7685
-
7686
7618
  ## Shipping Drivers
7687
7619
 
7688
7620
  <details><summary><code>client.shipping.drivers.<a href="/src/api/resources/shipping/resources/drivers/client/Client.ts">getForCallerV1</a>() -> Chrt.Driver1</code></summary>
@@ -1,40 +0,0 @@
1
- /**
2
- * This file was auto-generated by Fern from our API Definition.
3
- */
4
- import * as environments from "../../../../../../environments.js";
5
- import * as core from "../../../../../../core/index.js";
6
- import * as Chrt from "../../../../../index.js";
7
- export declare namespace Docs {
8
- interface Options {
9
- environment?: core.Supplier<environments.ChrtEnvironment | string>;
10
- /** Specify a custom URL to connect the client to. */
11
- baseUrl?: core.Supplier<string>;
12
- token?: core.Supplier<core.BearerToken | undefined>;
13
- /** Additional headers to include in requests. */
14
- headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
15
- fetcher?: core.FetchFunction;
16
- }
17
- interface RequestOptions {
18
- /** The maximum time to wait for a response in seconds. */
19
- timeoutInSeconds?: number;
20
- /** The number of times to retry the request. Defaults to 2. */
21
- maxRetries?: number;
22
- /** A hook to abort the request. */
23
- abortSignal?: AbortSignal;
24
- /** Additional query string parameters to include in the request. */
25
- queryParams?: Record<string, unknown>;
26
- /** Additional headers to include in the request. */
27
- headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
28
- }
29
- }
30
- export declare class Docs {
31
- protected readonly _options: Docs.Options;
32
- constructor(_options?: Docs.Options);
33
- /**
34
- * Generates a shipping document (BOL or POD) as a PDF for the given order. | authz_personas=[order_creator_org_operators] | (GenerateShippingDocReq) -> (PDF binary)
35
- * @throws {@link Chrt.UnprocessableEntityError}
36
- */
37
- postGenerateV1(request: Chrt.shipping.GenerateShippingDocReq, requestOptions?: Docs.RequestOptions): core.HttpResponsePromise<core.BinaryResponse>;
38
- private __postGenerateV1;
39
- protected _getAuthorizationHeader(): Promise<string | undefined>;
40
- }
@@ -1,124 +0,0 @@
1
- "use strict";
2
- /**
3
- * This file was auto-generated by Fern from our API Definition.
4
- */
5
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
- if (k2 === undefined) k2 = k;
7
- var desc = Object.getOwnPropertyDescriptor(m, k);
8
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
- desc = { enumerable: true, get: function() { return m[k]; } };
10
- }
11
- Object.defineProperty(o, k2, desc);
12
- }) : (function(o, m, k, k2) {
13
- if (k2 === undefined) k2 = k;
14
- o[k2] = m[k];
15
- }));
16
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
- Object.defineProperty(o, "default", { enumerable: true, value: v });
18
- }) : function(o, v) {
19
- o["default"] = v;
20
- });
21
- var __importStar = (this && this.__importStar) || (function () {
22
- var ownKeys = function(o) {
23
- ownKeys = Object.getOwnPropertyNames || function (o) {
24
- var ar = [];
25
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
- return ar;
27
- };
28
- return ownKeys(o);
29
- };
30
- return function (mod) {
31
- if (mod && mod.__esModule) return mod;
32
- var result = {};
33
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
- __setModuleDefault(result, mod);
35
- return result;
36
- };
37
- })();
38
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
39
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
40
- return new (P || (P = Promise))(function (resolve, reject) {
41
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
42
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
43
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
44
- step((generator = generator.apply(thisArg, _arguments || [])).next());
45
- });
46
- };
47
- Object.defineProperty(exports, "__esModule", { value: true });
48
- exports.Docs = void 0;
49
- const environments = __importStar(require("../../../../../../environments.js"));
50
- const core = __importStar(require("../../../../../../core/index.js"));
51
- const Chrt = __importStar(require("../../../../../index.js"));
52
- const headers_js_1 = require("../../../../../../core/headers.js");
53
- const errors = __importStar(require("../../../../../../errors/index.js"));
54
- class Docs {
55
- constructor(_options = {}) {
56
- this._options = _options;
57
- }
58
- /**
59
- * Generates a shipping document (BOL or POD) as a PDF for the given order. | authz_personas=[order_creator_org_operators] | (GenerateShippingDocReq) -> (PDF binary)
60
- * @throws {@link Chrt.UnprocessableEntityError}
61
- */
62
- postGenerateV1(request, requestOptions) {
63
- return core.HttpResponsePromise.fromPromise(this.__postGenerateV1(request, requestOptions));
64
- }
65
- __postGenerateV1(request, requestOptions) {
66
- return __awaiter(this, void 0, void 0, function* () {
67
- var _a, _b, _c, _d;
68
- let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
69
- const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
70
- url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, "shipping/docs/v1"),
71
- method: "POST",
72
- headers: _headers,
73
- contentType: "application/json",
74
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
75
- requestType: "json",
76
- body: request,
77
- responseType: "binary-response",
78
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
79
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
80
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
81
- });
82
- if (_response.ok) {
83
- return { data: _response.body, rawResponse: _response.rawResponse };
84
- }
85
- if (_response.error.reason === "status-code") {
86
- switch (_response.error.statusCode) {
87
- case 422:
88
- throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
89
- default:
90
- throw new errors.ChrtError({
91
- statusCode: _response.error.statusCode,
92
- body: _response.error.body,
93
- rawResponse: _response.rawResponse,
94
- });
95
- }
96
- }
97
- switch (_response.error.reason) {
98
- case "non-json":
99
- throw new errors.ChrtError({
100
- statusCode: _response.error.statusCode,
101
- body: _response.error.rawBody,
102
- rawResponse: _response.rawResponse,
103
- });
104
- case "timeout":
105
- throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /shipping/docs/v1.");
106
- case "unknown":
107
- throw new errors.ChrtError({
108
- message: _response.error.errorMessage,
109
- rawResponse: _response.rawResponse,
110
- });
111
- }
112
- });
113
- }
114
- _getAuthorizationHeader() {
115
- return __awaiter(this, void 0, void 0, function* () {
116
- const bearer = yield core.Supplier.get(this._options.token);
117
- if (bearer != null) {
118
- return `Bearer ${bearer}`;
119
- }
120
- return undefined;
121
- });
122
- }
123
- }
124
- exports.Docs = Docs;
@@ -1,2 +0,0 @@
1
- export {};
2
- export * from "./requests/index.js";
@@ -1,17 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./requests/index.js"), exports);
@@ -1,15 +0,0 @@
1
- /**
2
- * This file was auto-generated by Fern from our API Definition.
3
- */
4
- import * as Chrt from "../../../../../../index.js";
5
- /**
6
- * @example
7
- * {
8
- * order_ref: "order_ref",
9
- * template: "pod"
10
- * }
11
- */
12
- export interface GenerateShippingDocReq {
13
- order_ref: string;
14
- template: Chrt.ShippingDocTemplateEnum;
15
- }
@@ -1,5 +0,0 @@
1
- "use strict";
2
- /**
3
- * This file was auto-generated by Fern from our API Definition.
4
- */
5
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1 +0,0 @@
1
- export { type GenerateShippingDocReq } from "./GenerateShippingDocReq.js";
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1 +0,0 @@
1
- export * from "./client/index.js";
@@ -1,17 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./client/index.js"), exports);
@@ -1,8 +0,0 @@
1
- /**
2
- * This file was auto-generated by Fern from our API Definition.
3
- */
4
- export type ShippingDocTemplateEnum = "pod" | "bol";
5
- export declare const ShippingDocTemplateEnum: {
6
- readonly Pod: "pod";
7
- readonly Bol: "bol";
8
- };
@@ -1,10 +0,0 @@
1
- "use strict";
2
- /**
3
- * This file was auto-generated by Fern from our API Definition.
4
- */
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.ShippingDocTemplateEnum = void 0;
7
- exports.ShippingDocTemplateEnum = {
8
- Pod: "pod",
9
- Bol: "bol",
10
- };
@@ -1,40 +0,0 @@
1
- /**
2
- * This file was auto-generated by Fern from our API Definition.
3
- */
4
- import * as environments from "../../../../../../environments.mjs";
5
- import * as core from "../../../../../../core/index.mjs";
6
- import * as Chrt from "../../../../../index.mjs";
7
- export declare namespace Docs {
8
- interface Options {
9
- environment?: core.Supplier<environments.ChrtEnvironment | string>;
10
- /** Specify a custom URL to connect the client to. */
11
- baseUrl?: core.Supplier<string>;
12
- token?: core.Supplier<core.BearerToken | undefined>;
13
- /** Additional headers to include in requests. */
14
- headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
15
- fetcher?: core.FetchFunction;
16
- }
17
- interface RequestOptions {
18
- /** The maximum time to wait for a response in seconds. */
19
- timeoutInSeconds?: number;
20
- /** The number of times to retry the request. Defaults to 2. */
21
- maxRetries?: number;
22
- /** A hook to abort the request. */
23
- abortSignal?: AbortSignal;
24
- /** Additional query string parameters to include in the request. */
25
- queryParams?: Record<string, unknown>;
26
- /** Additional headers to include in the request. */
27
- headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
28
- }
29
- }
30
- export declare class Docs {
31
- protected readonly _options: Docs.Options;
32
- constructor(_options?: Docs.Options);
33
- /**
34
- * Generates a shipping document (BOL or POD) as a PDF for the given order. | authz_personas=[order_creator_org_operators] | (GenerateShippingDocReq) -> (PDF binary)
35
- * @throws {@link Chrt.UnprocessableEntityError}
36
- */
37
- postGenerateV1(request: Chrt.shipping.GenerateShippingDocReq, requestOptions?: Docs.RequestOptions): core.HttpResponsePromise<core.BinaryResponse>;
38
- private __postGenerateV1;
39
- protected _getAuthorizationHeader(): Promise<string | undefined>;
40
- }
@@ -1,87 +0,0 @@
1
- /**
2
- * This file was auto-generated by Fern from our API Definition.
3
- */
4
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
5
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
6
- return new (P || (P = Promise))(function (resolve, reject) {
7
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
8
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
9
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
10
- step((generator = generator.apply(thisArg, _arguments || [])).next());
11
- });
12
- };
13
- import * as environments from "../../../../../../environments.mjs";
14
- import * as core from "../../../../../../core/index.mjs";
15
- import * as Chrt from "../../../../../index.mjs";
16
- import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../core/headers.mjs";
17
- import * as errors from "../../../../../../errors/index.mjs";
18
- export class Docs {
19
- constructor(_options = {}) {
20
- this._options = _options;
21
- }
22
- /**
23
- * Generates a shipping document (BOL or POD) as a PDF for the given order. | authz_personas=[order_creator_org_operators] | (GenerateShippingDocReq) -> (PDF binary)
24
- * @throws {@link Chrt.UnprocessableEntityError}
25
- */
26
- postGenerateV1(request, requestOptions) {
27
- return core.HttpResponsePromise.fromPromise(this.__postGenerateV1(request, requestOptions));
28
- }
29
- __postGenerateV1(request, requestOptions) {
30
- return __awaiter(this, void 0, void 0, function* () {
31
- var _a, _b, _c, _d;
32
- let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
33
- const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
34
- url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, "shipping/docs/v1"),
35
- method: "POST",
36
- headers: _headers,
37
- contentType: "application/json",
38
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
39
- requestType: "json",
40
- body: request,
41
- responseType: "binary-response",
42
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
43
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
44
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
45
- });
46
- if (_response.ok) {
47
- return { data: _response.body, rawResponse: _response.rawResponse };
48
- }
49
- if (_response.error.reason === "status-code") {
50
- switch (_response.error.statusCode) {
51
- case 422:
52
- throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
53
- default:
54
- throw new errors.ChrtError({
55
- statusCode: _response.error.statusCode,
56
- body: _response.error.body,
57
- rawResponse: _response.rawResponse,
58
- });
59
- }
60
- }
61
- switch (_response.error.reason) {
62
- case "non-json":
63
- throw new errors.ChrtError({
64
- statusCode: _response.error.statusCode,
65
- body: _response.error.rawBody,
66
- rawResponse: _response.rawResponse,
67
- });
68
- case "timeout":
69
- throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /shipping/docs/v1.");
70
- case "unknown":
71
- throw new errors.ChrtError({
72
- message: _response.error.errorMessage,
73
- rawResponse: _response.rawResponse,
74
- });
75
- }
76
- });
77
- }
78
- _getAuthorizationHeader() {
79
- return __awaiter(this, void 0, void 0, function* () {
80
- const bearer = yield core.Supplier.get(this._options.token);
81
- if (bearer != null) {
82
- return `Bearer ${bearer}`;
83
- }
84
- return undefined;
85
- });
86
- }
87
- }
@@ -1,2 +0,0 @@
1
- export {};
2
- export * from "./requests/index.mjs";
@@ -1 +0,0 @@
1
- export * from "./requests/index.mjs";
@@ -1,15 +0,0 @@
1
- /**
2
- * This file was auto-generated by Fern from our API Definition.
3
- */
4
- import * as Chrt from "../../../../../../index.mjs";
5
- /**
6
- * @example
7
- * {
8
- * order_ref: "order_ref",
9
- * template: "pod"
10
- * }
11
- */
12
- export interface GenerateShippingDocReq {
13
- order_ref: string;
14
- template: Chrt.ShippingDocTemplateEnum;
15
- }
@@ -1,4 +0,0 @@
1
- /**
2
- * This file was auto-generated by Fern from our API Definition.
3
- */
4
- export {};
@@ -1 +0,0 @@
1
- export { type GenerateShippingDocReq } from "./GenerateShippingDocReq.mjs";
@@ -1 +0,0 @@
1
- export * from "./client/index.mjs";
@@ -1 +0,0 @@
1
- export * from "./client/index.mjs";
@@ -1,8 +0,0 @@
1
- /**
2
- * This file was auto-generated by Fern from our API Definition.
3
- */
4
- export type ShippingDocTemplateEnum = "pod" | "bol";
5
- export declare const ShippingDocTemplateEnum: {
6
- readonly Pod: "pod";
7
- readonly Bol: "bol";
8
- };
@@ -1,7 +0,0 @@
1
- /**
2
- * This file was auto-generated by Fern from our API Definition.
3
- */
4
- export const ShippingDocTemplateEnum = {
5
- Pod: "pod",
6
- Bol: "bol",
7
- };