@chrt-inc/typescript-sdk 1.962.0 → 1.967.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 (64) hide show
  1. package/dist/cjs/Client.js +2 -2
  2. package/dist/cjs/api/resources/billingNew/resources/invoices/client/Client.d.ts +3 -0
  3. package/dist/cjs/api/resources/billingNew/resources/invoices/client/Client.js +5 -0
  4. package/dist/cjs/api/resources/billingNew/resources/invoices/index.d.ts +1 -0
  5. package/dist/cjs/api/resources/billingNew/resources/invoices/index.js +1 -0
  6. package/dist/cjs/api/resources/billingNew/resources/invoices/resources/export/client/Client.d.ts +51 -0
  7. package/dist/cjs/api/resources/billingNew/resources/invoices/resources/export/client/Client.js +139 -0
  8. package/dist/cjs/api/resources/billingNew/resources/invoices/resources/export/client/index.d.ts +2 -0
  9. package/dist/cjs/api/resources/billingNew/resources/invoices/resources/export/client/index.js +17 -0
  10. package/dist/cjs/api/resources/billingNew/resources/invoices/resources/export/client/requests/ExportListV1Request.d.ts +14 -0
  11. package/dist/cjs/api/resources/billingNew/resources/invoices/resources/export/client/requests/ExportListV1Request.js +5 -0
  12. package/dist/cjs/api/resources/billingNew/resources/invoices/resources/export/client/requests/index.d.ts +1 -0
  13. package/dist/cjs/api/resources/billingNew/resources/invoices/resources/export/client/requests/index.js +2 -0
  14. package/dist/cjs/api/resources/billingNew/resources/invoices/resources/export/index.d.ts +1 -0
  15. package/dist/cjs/api/resources/billingNew/resources/invoices/resources/export/index.js +17 -0
  16. package/dist/cjs/api/resources/billingNew/resources/invoices/resources/index.d.ts +2 -0
  17. package/dist/cjs/api/resources/billingNew/resources/invoices/resources/index.js +41 -0
  18. package/dist/cjs/api/resources/trackingIntegrations/resources/reelables/resources/assets/client/Client.d.ts +26 -0
  19. package/dist/cjs/api/resources/trackingIntegrations/resources/reelables/resources/assets/client/Client.js +118 -0
  20. package/dist/cjs/api/types/InvoiceExportListItem.d.ts +46 -0
  21. package/dist/cjs/api/types/InvoiceExportListItem.js +5 -0
  22. package/dist/cjs/api/types/InvoiceExportListRes.d.ts +8 -0
  23. package/dist/cjs/api/types/InvoiceExportListRes.js +5 -0
  24. package/dist/cjs/api/types/ReelablesAsset1.d.ts +3 -0
  25. package/dist/cjs/api/types/ReelablesAssetPausedTimeWindow1.d.ts +7 -0
  26. package/dist/cjs/api/types/ReelablesAssetPausedTimeWindow1.js +5 -0
  27. package/dist/cjs/api/types/ReelablesDataPointMetadata1.d.ts +1 -0
  28. package/dist/cjs/api/types/index.d.ts +3 -0
  29. package/dist/cjs/api/types/index.js +3 -0
  30. package/dist/cjs/version.d.ts +1 -1
  31. package/dist/cjs/version.js +1 -1
  32. package/dist/esm/Client.mjs +2 -2
  33. package/dist/esm/api/resources/billingNew/resources/invoices/client/Client.d.mts +3 -0
  34. package/dist/esm/api/resources/billingNew/resources/invoices/client/Client.mjs +5 -0
  35. package/dist/esm/api/resources/billingNew/resources/invoices/index.d.mts +1 -0
  36. package/dist/esm/api/resources/billingNew/resources/invoices/index.mjs +1 -0
  37. package/dist/esm/api/resources/billingNew/resources/invoices/resources/export/client/Client.d.mts +51 -0
  38. package/dist/esm/api/resources/billingNew/resources/invoices/resources/export/client/Client.mjs +102 -0
  39. package/dist/esm/api/resources/billingNew/resources/invoices/resources/export/client/index.d.mts +2 -0
  40. package/dist/esm/api/resources/billingNew/resources/invoices/resources/export/client/index.mjs +1 -0
  41. package/dist/esm/api/resources/billingNew/resources/invoices/resources/export/client/requests/ExportListV1Request.d.mts +14 -0
  42. package/dist/esm/api/resources/billingNew/resources/invoices/resources/export/client/requests/ExportListV1Request.mjs +4 -0
  43. package/dist/esm/api/resources/billingNew/resources/invoices/resources/export/client/requests/index.d.mts +1 -0
  44. package/dist/esm/api/resources/billingNew/resources/invoices/resources/export/client/requests/index.mjs +1 -0
  45. package/dist/esm/api/resources/billingNew/resources/invoices/resources/export/index.d.mts +1 -0
  46. package/dist/esm/api/resources/billingNew/resources/invoices/resources/export/index.mjs +1 -0
  47. package/dist/esm/api/resources/billingNew/resources/invoices/resources/index.d.mts +2 -0
  48. package/dist/esm/api/resources/billingNew/resources/invoices/resources/index.mjs +2 -0
  49. package/dist/esm/api/resources/trackingIntegrations/resources/reelables/resources/assets/client/Client.d.mts +26 -0
  50. package/dist/esm/api/resources/trackingIntegrations/resources/reelables/resources/assets/client/Client.mjs +118 -0
  51. package/dist/esm/api/types/InvoiceExportListItem.d.mts +46 -0
  52. package/dist/esm/api/types/InvoiceExportListItem.mjs +4 -0
  53. package/dist/esm/api/types/InvoiceExportListRes.d.mts +8 -0
  54. package/dist/esm/api/types/InvoiceExportListRes.mjs +4 -0
  55. package/dist/esm/api/types/ReelablesAsset1.d.mts +3 -0
  56. package/dist/esm/api/types/ReelablesAssetPausedTimeWindow1.d.mts +7 -0
  57. package/dist/esm/api/types/ReelablesAssetPausedTimeWindow1.mjs +4 -0
  58. package/dist/esm/api/types/ReelablesDataPointMetadata1.d.mts +1 -0
  59. package/dist/esm/api/types/index.d.mts +3 -0
  60. package/dist/esm/api/types/index.mjs +3 -0
  61. package/dist/esm/version.d.mts +1 -1
  62. package/dist/esm/version.mjs +1 -1
  63. package/package.json +1 -1
  64. package/reference.md +202 -0
@@ -256,6 +256,8 @@ export * from "./InternalDelegationJwtRes.js";
256
256
  export * from "./Invoice1.js";
257
257
  export * from "./InvoiceExpandedListItem.js";
258
258
  export * from "./InvoiceExpandedRes.js";
259
+ export * from "./InvoiceExportListItem.js";
260
+ export * from "./InvoiceExportListRes.js";
259
261
  export * from "./InvoiceLineItem1.js";
260
262
  export * from "./InvoiceLineItemAmountTransformation1.js";
261
263
  export * from "./InvoiceLineItemAmountTransformationTypeEnum1.js";
@@ -442,6 +444,7 @@ export * from "./ProFormaLineItem1.js";
442
444
  export * from "./ProFormaLineItemProvenanceEnum1.js";
443
445
  export * from "./ReelablesAsset1.js";
444
446
  export * from "./ReelablesAssetListRes.js";
447
+ export * from "./ReelablesAssetPausedTimeWindow1.js";
445
448
  export * from "./ReelablesAssetSortByEnum.js";
446
449
  export * from "./ReelablesDataPoint1.js";
447
450
  export * from "./ReelablesDataPointMetadata1.js";
@@ -272,6 +272,8 @@ __exportStar(require("./InternalDelegationJwtRes.js"), exports);
272
272
  __exportStar(require("./Invoice1.js"), exports);
273
273
  __exportStar(require("./InvoiceExpandedListItem.js"), exports);
274
274
  __exportStar(require("./InvoiceExpandedRes.js"), exports);
275
+ __exportStar(require("./InvoiceExportListItem.js"), exports);
276
+ __exportStar(require("./InvoiceExportListRes.js"), exports);
275
277
  __exportStar(require("./InvoiceLineItem1.js"), exports);
276
278
  __exportStar(require("./InvoiceLineItemAmountTransformation1.js"), exports);
277
279
  __exportStar(require("./InvoiceLineItemAmountTransformationTypeEnum1.js"), exports);
@@ -458,6 +460,7 @@ __exportStar(require("./ProFormaLineItem1.js"), exports);
458
460
  __exportStar(require("./ProFormaLineItemProvenanceEnum1.js"), exports);
459
461
  __exportStar(require("./ReelablesAsset1.js"), exports);
460
462
  __exportStar(require("./ReelablesAssetListRes.js"), exports);
463
+ __exportStar(require("./ReelablesAssetPausedTimeWindow1.js"), exports);
461
464
  __exportStar(require("./ReelablesAssetSortByEnum.js"), exports);
462
465
  __exportStar(require("./ReelablesDataPoint1.js"), exports);
463
466
  __exportStar(require("./ReelablesDataPointMetadata1.js"), exports);
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "1.962.0";
1
+ export declare const SDK_VERSION = "1.967.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.962.0";
4
+ exports.SDK_VERSION = "1.967.0";
@@ -24,8 +24,8 @@ export class ChrtClient {
24
24
  this._options = Object.assign(Object.assign({}, _options), { headers: mergeHeaders({
25
25
  "X-Fern-Language": "JavaScript",
26
26
  "X-Fern-SDK-Name": "@chrt-inc/typescript-sdk",
27
- "X-Fern-SDK-Version": "1.962.0",
28
- "User-Agent": "@chrt-inc/typescript-sdk/1.962.0",
27
+ "X-Fern-SDK-Version": "1.967.0",
28
+ "User-Agent": "@chrt-inc/typescript-sdk/1.967.0",
29
29
  "X-Fern-Runtime": core.RUNTIME.type,
30
30
  "X-Fern-Runtime-Version": core.RUNTIME.version,
31
31
  }, _options === null || _options === void 0 ? void 0 : _options.headers) });
@@ -4,6 +4,7 @@
4
4
  import * as environments from "../../../../../../environments.mjs";
5
5
  import * as core from "../../../../../../core/index.mjs";
6
6
  import * as Chrt from "../../../../../index.mjs";
7
+ import { Export } from "../resources/export/client/Client.mjs";
7
8
  export declare namespace Invoices {
8
9
  interface Options {
9
10
  environment?: core.Supplier<environments.ChrtEnvironment | string>;
@@ -29,7 +30,9 @@ export declare namespace Invoices {
29
30
  }
30
31
  export declare class Invoices {
31
32
  protected readonly _options: Invoices.Options;
33
+ protected _export: Export | undefined;
32
34
  constructor(_options?: Invoices.Options);
35
+ get export(): Export;
33
36
  /**
34
37
  * Approves a draft invoice owned by the caller's organization. | authz: allowed_org_types=[provider], min_org_role=operator | () -> (Invoice1)
35
38
  *
@@ -15,10 +15,15 @@ import * as core from "../../../../../../core/index.mjs";
15
15
  import * as Chrt from "../../../../../index.mjs";
16
16
  import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../core/headers.mjs";
17
17
  import * as errors from "../../../../../../errors/index.mjs";
18
+ import { Export } from "../resources/export/client/Client.mjs";
18
19
  export class Invoices {
19
20
  constructor(_options = {}) {
20
21
  this._options = _options;
21
22
  }
23
+ get export() {
24
+ var _a;
25
+ return ((_a = this._export) !== null && _a !== void 0 ? _a : (this._export = new Export(this._options)));
26
+ }
22
27
  /**
23
28
  * Approves a draft invoice owned by the caller's organization. | authz: allowed_org_types=[provider], min_org_role=operator | () -> (Invoice1)
24
29
  *
@@ -1 +1,2 @@
1
1
  export * from "./client/index.mjs";
2
+ export * from "./resources/index.mjs";
@@ -1 +1,2 @@
1
1
  export * from "./client/index.mjs";
2
+ export * from "./resources/index.mjs";
@@ -0,0 +1,51 @@
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 Export {
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 Export {
31
+ protected readonly _options: Export.Options;
32
+ constructor(_options?: Export.Options);
33
+ /**
34
+ * Lists up to 1,000 shipment-level export rows for one approved accounts-receivable invoice owned by the caller's organization. | authz: allowed_org_types=[provider], min_org_role=operator | () -> (InvoiceExportListRes)
35
+ *
36
+ * @param {string} invoiceId
37
+ * @param {Chrt.billingNew.invoices.ExportListV1Request} request
38
+ * @param {Export.RequestOptions} requestOptions - Request-specific configuration.
39
+ *
40
+ * @throws {@link Chrt.UnprocessableEntityError}
41
+ *
42
+ * @example
43
+ * await client.billingNew.invoices.export.listV1("invoice_id", {
44
+ * page: 1,
45
+ * page_size: 1
46
+ * })
47
+ */
48
+ listV1(invoiceId: string, request?: Chrt.billingNew.invoices.ExportListV1Request, requestOptions?: Export.RequestOptions): core.HttpResponsePromise<Chrt.InvoiceExportListRes>;
49
+ private __listV1;
50
+ protected _getAuthorizationHeader(): Promise<string | undefined>;
51
+ }
@@ -0,0 +1,102 @@
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 Export {
19
+ constructor(_options = {}) {
20
+ this._options = _options;
21
+ }
22
+ /**
23
+ * Lists up to 1,000 shipment-level export rows for one approved accounts-receivable invoice owned by the caller's organization. | authz: allowed_org_types=[provider], min_org_role=operator | () -> (InvoiceExportListRes)
24
+ *
25
+ * @param {string} invoiceId
26
+ * @param {Chrt.billingNew.invoices.ExportListV1Request} request
27
+ * @param {Export.RequestOptions} requestOptions - Request-specific configuration.
28
+ *
29
+ * @throws {@link Chrt.UnprocessableEntityError}
30
+ *
31
+ * @example
32
+ * await client.billingNew.invoices.export.listV1("invoice_id", {
33
+ * page: 1,
34
+ * page_size: 1
35
+ * })
36
+ */
37
+ listV1(invoiceId, request = {}, requestOptions) {
38
+ return core.HttpResponsePromise.fromPromise(this.__listV1(invoiceId, request, requestOptions));
39
+ }
40
+ __listV1(invoiceId_1) {
41
+ return __awaiter(this, arguments, void 0, function* (invoiceId, request = {}, requestOptions) {
42
+ var _a, _b, _c, _d, _e, _f;
43
+ const { page, page_size: pageSize } = request;
44
+ const _queryParams = {};
45
+ if (page !== undefined) {
46
+ _queryParams["page"] = (_a = page === null || page === void 0 ? void 0 : page.toString()) !== null && _a !== void 0 ? _a : null;
47
+ }
48
+ if (pageSize !== undefined) {
49
+ _queryParams["page_size"] = (_b = pageSize === null || pageSize === void 0 ? void 0 : pageSize.toString()) !== null && _b !== void 0 ? _b : null;
50
+ }
51
+ let _headers = mergeHeaders((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
52
+ const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
53
+ url: core.url.join((_f = (_e = (yield core.Supplier.get(this._options.baseUrl))) !== null && _e !== void 0 ? _e : (yield core.Supplier.get(this._options.environment))) !== null && _f !== void 0 ? _f : environments.ChrtEnvironment.Local, `billing_new/invoices/export/list/v1/${encodeURIComponent(invoiceId)}`),
54
+ method: "GET",
55
+ headers: _headers,
56
+ queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
57
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
58
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
59
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
60
+ });
61
+ if (_response.ok) {
62
+ return { data: _response.body, rawResponse: _response.rawResponse };
63
+ }
64
+ if (_response.error.reason === "status-code") {
65
+ switch (_response.error.statusCode) {
66
+ case 422:
67
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
68
+ default:
69
+ throw new errors.ChrtError({
70
+ statusCode: _response.error.statusCode,
71
+ body: _response.error.body,
72
+ rawResponse: _response.rawResponse,
73
+ });
74
+ }
75
+ }
76
+ switch (_response.error.reason) {
77
+ case "non-json":
78
+ throw new errors.ChrtError({
79
+ statusCode: _response.error.statusCode,
80
+ body: _response.error.rawBody,
81
+ rawResponse: _response.rawResponse,
82
+ });
83
+ case "timeout":
84
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /billing_new/invoices/export/list/v1/{invoice_id}.");
85
+ case "unknown":
86
+ throw new errors.ChrtError({
87
+ message: _response.error.errorMessage,
88
+ rawResponse: _response.rawResponse,
89
+ });
90
+ }
91
+ });
92
+ }
93
+ _getAuthorizationHeader() {
94
+ return __awaiter(this, void 0, void 0, function* () {
95
+ const bearer = yield core.Supplier.get(this._options.token);
96
+ if (bearer != null) {
97
+ return `Bearer ${bearer}`;
98
+ }
99
+ return undefined;
100
+ });
101
+ }
102
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ export * from "./requests/index.mjs";
@@ -0,0 +1 @@
1
+ export * from "./requests/index.mjs";
@@ -0,0 +1,14 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * @example
6
+ * {
7
+ * page: 1,
8
+ * page_size: 1
9
+ * }
10
+ */
11
+ export interface ExportListV1Request {
12
+ page?: number | null;
13
+ page_size?: number | null;
14
+ }
@@ -0,0 +1,4 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export {};
@@ -0,0 +1 @@
1
+ export { type ExportListV1Request } from "./ExportListV1Request.mjs";
@@ -0,0 +1 @@
1
+ export * from "./client/index.mjs";
@@ -0,0 +1 @@
1
+ export * from "./client/index.mjs";
@@ -0,0 +1,2 @@
1
+ export * as export_ from "./export/index.mjs";
2
+ export * from "./export/client/requests/index.mjs";
@@ -0,0 +1,2 @@
1
+ export * as export_ from "./export/index.mjs";
2
+ export * from "./export/client/requests/index.mjs";
@@ -107,6 +107,32 @@ export declare class Assets {
107
107
  */
108
108
  listV1(request?: Chrt.trackingIntegrations.reelables.AssetsListV1Request, requestOptions?: Assets.RequestOptions): core.HttpResponsePromise<Chrt.ReelablesAssetListRes>;
109
109
  private __listV1;
110
+ /**
111
+ * Pauses a Reelables asset and opens a new pause time window. | authz: min_org_role=operator | () -> (bool)
112
+ *
113
+ * @param {string} assetId
114
+ * @param {Assets.RequestOptions} requestOptions - Request-specific configuration.
115
+ *
116
+ * @throws {@link Chrt.UnprocessableEntityError}
117
+ *
118
+ * @example
119
+ * await client.trackingIntegrations.reelables.assets.pauseV1("asset_id")
120
+ */
121
+ pauseV1(assetId: string, requestOptions?: Assets.RequestOptions): core.HttpResponsePromise<boolean>;
122
+ private __pauseV1;
123
+ /**
124
+ * Unpauses a Reelables asset and closes the open pause time window. | authz: min_org_role=operator | () -> (bool)
125
+ *
126
+ * @param {string} assetId
127
+ * @param {Assets.RequestOptions} requestOptions - Request-specific configuration.
128
+ *
129
+ * @throws {@link Chrt.UnprocessableEntityError}
130
+ *
131
+ * @example
132
+ * await client.trackingIntegrations.reelables.assets.unpauseV1("asset_id")
133
+ */
134
+ unpauseV1(assetId: string, requestOptions?: Assets.RequestOptions): core.HttpResponsePromise<boolean>;
135
+ private __unpauseV1;
110
136
  /**
111
137
  * Updates a Reelables asset, applying name changes upstream before updating CHRT. | authz: min_org_role=operator | (ReelablesAssetClientUpdate1) -> (ReelablesAsset1)
112
138
  *
@@ -346,6 +346,124 @@ export class Assets {
346
346
  }
347
347
  });
348
348
  }
349
+ /**
350
+ * Pauses a Reelables asset and opens a new pause time window. | authz: min_org_role=operator | () -> (bool)
351
+ *
352
+ * @param {string} assetId
353
+ * @param {Assets.RequestOptions} requestOptions - Request-specific configuration.
354
+ *
355
+ * @throws {@link Chrt.UnprocessableEntityError}
356
+ *
357
+ * @example
358
+ * await client.trackingIntegrations.reelables.assets.pauseV1("asset_id")
359
+ */
360
+ pauseV1(assetId, requestOptions) {
361
+ return core.HttpResponsePromise.fromPromise(this.__pauseV1(assetId, requestOptions));
362
+ }
363
+ __pauseV1(assetId, requestOptions) {
364
+ return __awaiter(this, void 0, void 0, function* () {
365
+ var _a, _b, _c, _d;
366
+ 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);
367
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
368
+ 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, `tracking_integrations/reelables/assets/pause/v1/${encodeURIComponent(assetId)}`),
369
+ method: "POST",
370
+ headers: _headers,
371
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
372
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
373
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
374
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
375
+ });
376
+ if (_response.ok) {
377
+ return { data: _response.body, rawResponse: _response.rawResponse };
378
+ }
379
+ if (_response.error.reason === "status-code") {
380
+ switch (_response.error.statusCode) {
381
+ case 422:
382
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
383
+ default:
384
+ throw new errors.ChrtError({
385
+ statusCode: _response.error.statusCode,
386
+ body: _response.error.body,
387
+ rawResponse: _response.rawResponse,
388
+ });
389
+ }
390
+ }
391
+ switch (_response.error.reason) {
392
+ case "non-json":
393
+ throw new errors.ChrtError({
394
+ statusCode: _response.error.statusCode,
395
+ body: _response.error.rawBody,
396
+ rawResponse: _response.rawResponse,
397
+ });
398
+ case "timeout":
399
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /tracking_integrations/reelables/assets/pause/v1/{asset_id}.");
400
+ case "unknown":
401
+ throw new errors.ChrtError({
402
+ message: _response.error.errorMessage,
403
+ rawResponse: _response.rawResponse,
404
+ });
405
+ }
406
+ });
407
+ }
408
+ /**
409
+ * Unpauses a Reelables asset and closes the open pause time window. | authz: min_org_role=operator | () -> (bool)
410
+ *
411
+ * @param {string} assetId
412
+ * @param {Assets.RequestOptions} requestOptions - Request-specific configuration.
413
+ *
414
+ * @throws {@link Chrt.UnprocessableEntityError}
415
+ *
416
+ * @example
417
+ * await client.trackingIntegrations.reelables.assets.unpauseV1("asset_id")
418
+ */
419
+ unpauseV1(assetId, requestOptions) {
420
+ return core.HttpResponsePromise.fromPromise(this.__unpauseV1(assetId, requestOptions));
421
+ }
422
+ __unpauseV1(assetId, requestOptions) {
423
+ return __awaiter(this, void 0, void 0, function* () {
424
+ var _a, _b, _c, _d;
425
+ 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);
426
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
427
+ 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, `tracking_integrations/reelables/assets/unpause/v1/${encodeURIComponent(assetId)}`),
428
+ method: "POST",
429
+ headers: _headers,
430
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
431
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
432
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
433
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
434
+ });
435
+ if (_response.ok) {
436
+ return { data: _response.body, rawResponse: _response.rawResponse };
437
+ }
438
+ if (_response.error.reason === "status-code") {
439
+ switch (_response.error.statusCode) {
440
+ case 422:
441
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
442
+ default:
443
+ throw new errors.ChrtError({
444
+ statusCode: _response.error.statusCode,
445
+ body: _response.error.body,
446
+ rawResponse: _response.rawResponse,
447
+ });
448
+ }
449
+ }
450
+ switch (_response.error.reason) {
451
+ case "non-json":
452
+ throw new errors.ChrtError({
453
+ statusCode: _response.error.statusCode,
454
+ body: _response.error.rawBody,
455
+ rawResponse: _response.rawResponse,
456
+ });
457
+ case "timeout":
458
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /tracking_integrations/reelables/assets/unpause/v1/{asset_id}.");
459
+ case "unknown":
460
+ throw new errors.ChrtError({
461
+ message: _response.error.errorMessage,
462
+ rawResponse: _response.rawResponse,
463
+ });
464
+ }
465
+ });
466
+ }
349
467
  /**
350
468
  * Updates a Reelables asset, applying name changes upstream before updating CHRT. | authz: min_org_role=operator | (ReelablesAssetClientUpdate1) -> (ReelablesAsset1)
351
469
  *
@@ -0,0 +1,46 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Chrt from "../index.mjs";
5
+ export interface InvoiceExportListItem {
6
+ account_name?: string | null;
7
+ airbill_charge: number;
8
+ airlines?: string[];
9
+ awb_numbers?: string[];
10
+ base_rate: number;
11
+ billing_period_end_at_timestamp: string;
12
+ billing_period_start_at_timestamp: string;
13
+ cargo_types?: string[];
14
+ charge_per_quantity?: number | null;
15
+ charges_subtotal: number;
16
+ currency_code: Chrt.BillingCurrencyCodeEnum1;
17
+ delivery_address?: string | null;
18
+ delivery_location_name?: string | null;
19
+ delivery_status?: string | null;
20
+ delivery_stop_number?: number | null;
21
+ delivery_stops_on_order?: number | null;
22
+ destination_iata?: string | null;
23
+ flight_numbers?: string[];
24
+ invoice_approval_timestamp: string;
25
+ invoice_number: string;
26
+ mileage_estimated?: number | null;
27
+ net_billing: number;
28
+ off_chrt_reference_id?: string | null;
29
+ order_placer_comments?: string | null;
30
+ order_short_id?: string | null;
31
+ origin_iata?: string | null;
32
+ other_charges: number;
33
+ other_charges_detail?: string[];
34
+ pod_date?: string | null;
35
+ pod_name?: string | null;
36
+ pod_time?: string | null;
37
+ quantity?: number | null;
38
+ tax_1_amount?: number | null;
39
+ tax_1_description?: string | null;
40
+ tax_2_amount?: number | null;
41
+ tax_2_description?: string | null;
42
+ tax_3_amount?: number | null;
43
+ tax_3_description?: string | null;
44
+ total_tax: number;
45
+ weight_pounds?: number | null;
46
+ }
@@ -0,0 +1,4 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export {};
@@ -0,0 +1,8 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Chrt from "../index.mjs";
5
+ export interface InvoiceExportListRes {
6
+ items: Chrt.InvoiceExportListItem[];
7
+ total_count: number;
8
+ }
@@ -0,0 +1,4 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export {};
@@ -9,6 +9,7 @@ export interface ReelablesAsset1 {
9
9
  destination_geofence_location?: Chrt.LocationFeature | null;
10
10
  destination_geofence_radius_miles?: number;
11
11
  label?: Chrt.ReelablesLabel1 | null;
12
+ label_activated_at_timestamp?: string | null;
12
13
  last_seen_at_location?: Chrt.LocationFeature | null;
13
14
  last_seen_at_location_city?: string | null;
14
15
  last_seen_at_location_large_city?: string | null;
@@ -16,6 +17,8 @@ export interface ReelablesAsset1 {
16
17
  name: string;
17
18
  /** Must be a string starting with `org_` */
18
19
  org_id: string;
20
+ pause_windows?: Chrt.ReelablesAssetPausedTimeWindow1[];
21
+ paused?: boolean;
19
22
  schema_version: number;
20
23
  synced_at_timestamp?: string | null;
21
24
  workspace_id: string;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export interface ReelablesAssetPausedTimeWindow1 {
5
+ end_timestamp?: string | null;
6
+ start_timestamp: string;
7
+ }
@@ -0,0 +1,4 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export {};
@@ -3,4 +3,5 @@
3
3
  */
4
4
  export interface ReelablesDataPointMetadata1 {
5
5
  asset_id: string;
6
+ paused?: boolean;
6
7
  }
@@ -256,6 +256,8 @@ export * from "./InternalDelegationJwtRes.mjs";
256
256
  export * from "./Invoice1.mjs";
257
257
  export * from "./InvoiceExpandedListItem.mjs";
258
258
  export * from "./InvoiceExpandedRes.mjs";
259
+ export * from "./InvoiceExportListItem.mjs";
260
+ export * from "./InvoiceExportListRes.mjs";
259
261
  export * from "./InvoiceLineItem1.mjs";
260
262
  export * from "./InvoiceLineItemAmountTransformation1.mjs";
261
263
  export * from "./InvoiceLineItemAmountTransformationTypeEnum1.mjs";
@@ -442,6 +444,7 @@ export * from "./ProFormaLineItem1.mjs";
442
444
  export * from "./ProFormaLineItemProvenanceEnum1.mjs";
443
445
  export * from "./ReelablesAsset1.mjs";
444
446
  export * from "./ReelablesAssetListRes.mjs";
447
+ export * from "./ReelablesAssetPausedTimeWindow1.mjs";
445
448
  export * from "./ReelablesAssetSortByEnum.mjs";
446
449
  export * from "./ReelablesDataPoint1.mjs";
447
450
  export * from "./ReelablesDataPointMetadata1.mjs";
@@ -256,6 +256,8 @@ export * from "./InternalDelegationJwtRes.mjs";
256
256
  export * from "./Invoice1.mjs";
257
257
  export * from "./InvoiceExpandedListItem.mjs";
258
258
  export * from "./InvoiceExpandedRes.mjs";
259
+ export * from "./InvoiceExportListItem.mjs";
260
+ export * from "./InvoiceExportListRes.mjs";
259
261
  export * from "./InvoiceLineItem1.mjs";
260
262
  export * from "./InvoiceLineItemAmountTransformation1.mjs";
261
263
  export * from "./InvoiceLineItemAmountTransformationTypeEnum1.mjs";
@@ -442,6 +444,7 @@ export * from "./ProFormaLineItem1.mjs";
442
444
  export * from "./ProFormaLineItemProvenanceEnum1.mjs";
443
445
  export * from "./ReelablesAsset1.mjs";
444
446
  export * from "./ReelablesAssetListRes.mjs";
447
+ export * from "./ReelablesAssetPausedTimeWindow1.mjs";
445
448
  export * from "./ReelablesAssetSortByEnum.mjs";
446
449
  export * from "./ReelablesDataPoint1.mjs";
447
450
  export * from "./ReelablesDataPointMetadata1.mjs";
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "1.962.0";
1
+ export declare const SDK_VERSION = "1.967.0";
@@ -1 +1 @@
1
- export const SDK_VERSION = "1.962.0";
1
+ export const SDK_VERSION = "1.967.0";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chrt-inc/typescript-sdk",
3
- "version": "1.962.0",
3
+ "version": "1.967.0",
4
4
  "private": false,
5
5
  "repository": "github:chrt-inc/typescript-sdk",
6
6
  "type": "commonjs",