@chrt-inc/typescript-sdk 1.616.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 (86) hide show
  1. package/dist/cjs/Client.js +2 -2
  2. package/dist/cjs/api/resources/billing/resources/lineItemGroups/client/Client.d.ts +0 -1
  3. package/dist/cjs/api/resources/billing/resources/lineItemGroups/client/Client.js +0 -1
  4. package/dist/cjs/api/resources/billing/resources/lineItemGroups/client/requests/LineItemGroupsListForCourierOrgV1Request.d.ts +0 -1
  5. package/dist/cjs/api/resources/billing/resources/statements/client/Client.d.ts +0 -2
  6. package/dist/cjs/api/resources/billing/resources/statements/client/Client.js +0 -2
  7. package/dist/cjs/api/resources/billing/resources/statements/client/requests/StatementsExpandedListV1Request.d.ts +0 -1
  8. package/dist/cjs/api/resources/billing/resources/statements/client/requests/StatementsListV1Request.d.ts +0 -1
  9. package/dist/cjs/api/resources/orgs/client/Client.d.ts +0 -1
  10. package/dist/cjs/api/resources/orgs/client/Client.js +0 -1
  11. package/dist/cjs/api/resources/orgs/client/requests/OrgsListMembersV1Request.d.ts +0 -1
  12. package/dist/cjs/api/resources/shipping/client/Client.d.ts +0 -3
  13. package/dist/cjs/api/resources/shipping/client/Client.js +16 -21
  14. package/dist/cjs/api/resources/shipping/resources/drivers/client/Client.d.ts +0 -1
  15. package/dist/cjs/api/resources/shipping/resources/drivers/client/Client.js +0 -1
  16. package/dist/cjs/api/resources/shipping/resources/drivers/client/requests/DriversListOrgMembersAndDriversV1Request.d.ts +0 -1
  17. package/dist/cjs/api/resources/shipping/resources/index.d.ts +0 -2
  18. package/dist/cjs/api/resources/shipping/resources/index.js +1 -3
  19. package/dist/cjs/api/resources/shipping/resources/orders/resources/expanded/client/Client.d.ts +0 -2
  20. package/dist/cjs/api/resources/shipping/resources/orders/resources/expanded/client/Client.js +0 -2
  21. package/dist/cjs/api/resources/shipping/resources/orders/resources/expanded/client/requests/ExpandedListForForwarderOperatorsV1Request.d.ts +0 -1
  22. package/dist/cjs/api/resources/shipping/resources/orders/resources/expanded/client/requests/ExpandedListForShipperOperatorsV1Request.d.ts +0 -1
  23. package/dist/cjs/api/resources/shipping/resources/taskGroups/resources/expanded/client/Client.d.ts +0 -2
  24. package/dist/cjs/api/resources/shipping/resources/taskGroups/resources/expanded/client/Client.js +0 -2
  25. package/dist/cjs/api/resources/shipping/resources/taskGroups/resources/expanded/client/requests/ExpandedListForCourierDriverV1Request.d.ts +0 -1
  26. package/dist/cjs/api/resources/shipping/resources/taskGroups/resources/expanded/client/requests/ExpandedListForCourierOperatorsV1Request.d.ts +0 -1
  27. package/dist/cjs/api/types/index.d.ts +0 -1
  28. package/dist/cjs/api/types/index.js +0 -1
  29. package/dist/cjs/version.d.ts +1 -1
  30. package/dist/cjs/version.js +1 -1
  31. package/dist/esm/Client.mjs +2 -2
  32. package/dist/esm/api/resources/billing/resources/lineItemGroups/client/Client.d.mts +0 -1
  33. package/dist/esm/api/resources/billing/resources/lineItemGroups/client/Client.mjs +0 -1
  34. package/dist/esm/api/resources/billing/resources/lineItemGroups/client/requests/LineItemGroupsListForCourierOrgV1Request.d.mts +0 -1
  35. package/dist/esm/api/resources/billing/resources/statements/client/Client.d.mts +0 -2
  36. package/dist/esm/api/resources/billing/resources/statements/client/Client.mjs +0 -2
  37. package/dist/esm/api/resources/billing/resources/statements/client/requests/StatementsExpandedListV1Request.d.mts +0 -1
  38. package/dist/esm/api/resources/billing/resources/statements/client/requests/StatementsListV1Request.d.mts +0 -1
  39. package/dist/esm/api/resources/orgs/client/Client.d.mts +0 -1
  40. package/dist/esm/api/resources/orgs/client/Client.mjs +0 -1
  41. package/dist/esm/api/resources/orgs/client/requests/OrgsListMembersV1Request.d.mts +0 -1
  42. package/dist/esm/api/resources/shipping/client/Client.d.mts +0 -3
  43. package/dist/esm/api/resources/shipping/client/Client.mjs +0 -5
  44. package/dist/esm/api/resources/shipping/resources/drivers/client/Client.d.mts +0 -1
  45. package/dist/esm/api/resources/shipping/resources/drivers/client/Client.mjs +0 -1
  46. package/dist/esm/api/resources/shipping/resources/drivers/client/requests/DriversListOrgMembersAndDriversV1Request.d.mts +0 -1
  47. package/dist/esm/api/resources/shipping/resources/index.d.mts +0 -2
  48. package/dist/esm/api/resources/shipping/resources/index.mjs +0 -2
  49. package/dist/esm/api/resources/shipping/resources/orders/resources/expanded/client/Client.d.mts +0 -2
  50. package/dist/esm/api/resources/shipping/resources/orders/resources/expanded/client/Client.mjs +0 -2
  51. package/dist/esm/api/resources/shipping/resources/orders/resources/expanded/client/requests/ExpandedListForForwarderOperatorsV1Request.d.mts +0 -1
  52. package/dist/esm/api/resources/shipping/resources/orders/resources/expanded/client/requests/ExpandedListForShipperOperatorsV1Request.d.mts +0 -1
  53. package/dist/esm/api/resources/shipping/resources/taskGroups/resources/expanded/client/Client.d.mts +0 -2
  54. package/dist/esm/api/resources/shipping/resources/taskGroups/resources/expanded/client/Client.mjs +0 -2
  55. package/dist/esm/api/resources/shipping/resources/taskGroups/resources/expanded/client/requests/ExpandedListForCourierDriverV1Request.d.mts +0 -1
  56. package/dist/esm/api/resources/shipping/resources/taskGroups/resources/expanded/client/requests/ExpandedListForCourierOperatorsV1Request.d.mts +0 -1
  57. package/dist/esm/api/types/index.d.mts +0 -1
  58. package/dist/esm/api/types/index.mjs +0 -1
  59. package/dist/esm/version.d.mts +1 -1
  60. package/dist/esm/version.mjs +1 -1
  61. package/package.json +1 -1
  62. package/reference.md +0 -77
  63. package/dist/cjs/api/resources/shipping/resources/docs/client/Client.d.ts +0 -40
  64. package/dist/cjs/api/resources/shipping/resources/docs/client/Client.js +0 -124
  65. package/dist/cjs/api/resources/shipping/resources/docs/client/index.d.ts +0 -2
  66. package/dist/cjs/api/resources/shipping/resources/docs/client/index.js +0 -17
  67. package/dist/cjs/api/resources/shipping/resources/docs/client/requests/GenerateShippingDocReq.d.ts +0 -15
  68. package/dist/cjs/api/resources/shipping/resources/docs/client/requests/GenerateShippingDocReq.js +0 -5
  69. package/dist/cjs/api/resources/shipping/resources/docs/client/requests/index.d.ts +0 -1
  70. package/dist/cjs/api/resources/shipping/resources/docs/client/requests/index.js +0 -2
  71. package/dist/cjs/api/resources/shipping/resources/docs/index.d.ts +0 -1
  72. package/dist/cjs/api/resources/shipping/resources/docs/index.js +0 -17
  73. package/dist/cjs/api/types/ShippingDocTemplateEnum.d.ts +0 -8
  74. package/dist/cjs/api/types/ShippingDocTemplateEnum.js +0 -10
  75. package/dist/esm/api/resources/shipping/resources/docs/client/Client.d.mts +0 -40
  76. package/dist/esm/api/resources/shipping/resources/docs/client/Client.mjs +0 -87
  77. package/dist/esm/api/resources/shipping/resources/docs/client/index.d.mts +0 -2
  78. package/dist/esm/api/resources/shipping/resources/docs/client/index.mjs +0 -1
  79. package/dist/esm/api/resources/shipping/resources/docs/client/requests/GenerateShippingDocReq.d.mts +0 -15
  80. package/dist/esm/api/resources/shipping/resources/docs/client/requests/GenerateShippingDocReq.mjs +0 -4
  81. package/dist/esm/api/resources/shipping/resources/docs/client/requests/index.d.mts +0 -1
  82. package/dist/esm/api/resources/shipping/resources/docs/client/requests/index.mjs +0 -1
  83. package/dist/esm/api/resources/shipping/resources/docs/index.d.mts +0 -1
  84. package/dist/esm/api/resources/shipping/resources/docs/index.mjs +0 -1
  85. package/dist/esm/api/types/ShippingDocTemplateEnum.d.mts +0 -8
  86. package/dist/esm/api/types/ShippingDocTemplateEnum.mjs +0 -7
@@ -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
- };