@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.
- package/dist/cjs/Client.js +2 -2
- package/dist/cjs/api/resources/billingNew/resources/invoices/client/Client.d.ts +3 -0
- package/dist/cjs/api/resources/billingNew/resources/invoices/client/Client.js +5 -0
- package/dist/cjs/api/resources/billingNew/resources/invoices/index.d.ts +1 -0
- package/dist/cjs/api/resources/billingNew/resources/invoices/index.js +1 -0
- package/dist/cjs/api/resources/billingNew/resources/invoices/resources/export/client/Client.d.ts +51 -0
- package/dist/cjs/api/resources/billingNew/resources/invoices/resources/export/client/Client.js +139 -0
- package/dist/cjs/api/resources/billingNew/resources/invoices/resources/export/client/index.d.ts +2 -0
- package/dist/cjs/api/resources/billingNew/resources/invoices/resources/export/client/index.js +17 -0
- package/dist/cjs/api/resources/billingNew/resources/invoices/resources/export/client/requests/ExportListV1Request.d.ts +14 -0
- package/dist/cjs/api/resources/billingNew/resources/invoices/resources/export/client/requests/ExportListV1Request.js +5 -0
- package/dist/cjs/api/resources/billingNew/resources/invoices/resources/export/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/billingNew/resources/invoices/resources/export/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/billingNew/resources/invoices/resources/export/index.d.ts +1 -0
- package/dist/cjs/api/resources/billingNew/resources/invoices/resources/export/index.js +17 -0
- package/dist/cjs/api/resources/billingNew/resources/invoices/resources/index.d.ts +2 -0
- package/dist/cjs/api/resources/billingNew/resources/invoices/resources/index.js +41 -0
- package/dist/cjs/api/resources/trackingIntegrations/resources/reelables/resources/assets/client/Client.d.ts +26 -0
- package/dist/cjs/api/resources/trackingIntegrations/resources/reelables/resources/assets/client/Client.js +118 -0
- package/dist/cjs/api/types/InvoiceExportListItem.d.ts +46 -0
- package/dist/cjs/api/types/InvoiceExportListItem.js +5 -0
- package/dist/cjs/api/types/InvoiceExportListRes.d.ts +8 -0
- package/dist/cjs/api/types/InvoiceExportListRes.js +5 -0
- package/dist/cjs/api/types/ReelablesAsset1.d.ts +3 -0
- package/dist/cjs/api/types/ReelablesAssetPausedTimeWindow1.d.ts +7 -0
- package/dist/cjs/api/types/ReelablesAssetPausedTimeWindow1.js +5 -0
- package/dist/cjs/api/types/ReelablesDataPointMetadata1.d.ts +1 -0
- package/dist/cjs/api/types/index.d.ts +3 -0
- package/dist/cjs/api/types/index.js +3 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/Client.mjs +2 -2
- package/dist/esm/api/resources/billingNew/resources/invoices/client/Client.d.mts +3 -0
- package/dist/esm/api/resources/billingNew/resources/invoices/client/Client.mjs +5 -0
- package/dist/esm/api/resources/billingNew/resources/invoices/index.d.mts +1 -0
- package/dist/esm/api/resources/billingNew/resources/invoices/index.mjs +1 -0
- package/dist/esm/api/resources/billingNew/resources/invoices/resources/export/client/Client.d.mts +51 -0
- package/dist/esm/api/resources/billingNew/resources/invoices/resources/export/client/Client.mjs +102 -0
- package/dist/esm/api/resources/billingNew/resources/invoices/resources/export/client/index.d.mts +2 -0
- package/dist/esm/api/resources/billingNew/resources/invoices/resources/export/client/index.mjs +1 -0
- package/dist/esm/api/resources/billingNew/resources/invoices/resources/export/client/requests/ExportListV1Request.d.mts +14 -0
- package/dist/esm/api/resources/billingNew/resources/invoices/resources/export/client/requests/ExportListV1Request.mjs +4 -0
- package/dist/esm/api/resources/billingNew/resources/invoices/resources/export/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/billingNew/resources/invoices/resources/export/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/billingNew/resources/invoices/resources/export/index.d.mts +1 -0
- package/dist/esm/api/resources/billingNew/resources/invoices/resources/export/index.mjs +1 -0
- package/dist/esm/api/resources/billingNew/resources/invoices/resources/index.d.mts +2 -0
- package/dist/esm/api/resources/billingNew/resources/invoices/resources/index.mjs +2 -0
- package/dist/esm/api/resources/trackingIntegrations/resources/reelables/resources/assets/client/Client.d.mts +26 -0
- package/dist/esm/api/resources/trackingIntegrations/resources/reelables/resources/assets/client/Client.mjs +118 -0
- package/dist/esm/api/types/InvoiceExportListItem.d.mts +46 -0
- package/dist/esm/api/types/InvoiceExportListItem.mjs +4 -0
- package/dist/esm/api/types/InvoiceExportListRes.d.mts +8 -0
- package/dist/esm/api/types/InvoiceExportListRes.mjs +4 -0
- package/dist/esm/api/types/ReelablesAsset1.d.mts +3 -0
- package/dist/esm/api/types/ReelablesAssetPausedTimeWindow1.d.mts +7 -0
- package/dist/esm/api/types/ReelablesAssetPausedTimeWindow1.mjs +4 -0
- package/dist/esm/api/types/ReelablesDataPointMetadata1.d.mts +1 -0
- package/dist/esm/api/types/index.d.mts +3 -0
- package/dist/esm/api/types/index.mjs +3 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +202 -0
package/dist/cjs/Client.js
CHANGED
|
@@ -60,8 +60,8 @@ class ChrtClient {
|
|
|
60
60
|
this._options = Object.assign(Object.assign({}, _options), { headers: (0, headers_js_1.mergeHeaders)({
|
|
61
61
|
"X-Fern-Language": "JavaScript",
|
|
62
62
|
"X-Fern-SDK-Name": "@chrt-inc/typescript-sdk",
|
|
63
|
-
"X-Fern-SDK-Version": "1.
|
|
64
|
-
"User-Agent": "@chrt-inc/typescript-sdk/1.
|
|
63
|
+
"X-Fern-SDK-Version": "1.967.0",
|
|
64
|
+
"User-Agent": "@chrt-inc/typescript-sdk/1.967.0",
|
|
65
65
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
66
66
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
67
67
|
}, _options === null || _options === void 0 ? void 0 : _options.headers) });
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
import * as environments from "../../../../../../environments.js";
|
|
5
5
|
import * as core from "../../../../../../core/index.js";
|
|
6
6
|
import * as Chrt from "../../../../../index.js";
|
|
7
|
+
import { Export } from "../resources/export/client/Client.js";
|
|
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
|
*
|
|
@@ -51,10 +51,15 @@ const core = __importStar(require("../../../../../../core/index.js"));
|
|
|
51
51
|
const Chrt = __importStar(require("../../../../../index.js"));
|
|
52
52
|
const headers_js_1 = require("../../../../../../core/headers.js");
|
|
53
53
|
const errors = __importStar(require("../../../../../../errors/index.js"));
|
|
54
|
+
const Client_js_1 = require("../resources/export/client/Client.js");
|
|
54
55
|
class Invoices {
|
|
55
56
|
constructor(_options = {}) {
|
|
56
57
|
this._options = _options;
|
|
57
58
|
}
|
|
59
|
+
get export() {
|
|
60
|
+
var _a;
|
|
61
|
+
return ((_a = this._export) !== null && _a !== void 0 ? _a : (this._export = new Client_js_1.Export(this._options)));
|
|
62
|
+
}
|
|
58
63
|
/**
|
|
59
64
|
* Approves a draft invoice owned by the caller's organization. | authz: allowed_org_types=[provider], min_org_role=operator | () -> (Invoice1)
|
|
60
65
|
*
|
package/dist/cjs/api/resources/billingNew/resources/invoices/resources/export/client/Client.d.ts
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
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 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
|
+
}
|
package/dist/cjs/api/resources/billingNew/resources/invoices/resources/export/client/Client.js
ADDED
|
@@ -0,0 +1,139 @@
|
|
|
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.Export = 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 Export {
|
|
55
|
+
constructor(_options = {}) {
|
|
56
|
+
this._options = _options;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* 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)
|
|
60
|
+
*
|
|
61
|
+
* @param {string} invoiceId
|
|
62
|
+
* @param {Chrt.billingNew.invoices.ExportListV1Request} request
|
|
63
|
+
* @param {Export.RequestOptions} requestOptions - Request-specific configuration.
|
|
64
|
+
*
|
|
65
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
66
|
+
*
|
|
67
|
+
* @example
|
|
68
|
+
* await client.billingNew.invoices.export.listV1("invoice_id", {
|
|
69
|
+
* page: 1,
|
|
70
|
+
* page_size: 1
|
|
71
|
+
* })
|
|
72
|
+
*/
|
|
73
|
+
listV1(invoiceId, request = {}, requestOptions) {
|
|
74
|
+
return core.HttpResponsePromise.fromPromise(this.__listV1(invoiceId, request, requestOptions));
|
|
75
|
+
}
|
|
76
|
+
__listV1(invoiceId_1) {
|
|
77
|
+
return __awaiter(this, arguments, void 0, function* (invoiceId, request = {}, requestOptions) {
|
|
78
|
+
var _a, _b, _c, _d, _e, _f;
|
|
79
|
+
const { page, page_size: pageSize } = request;
|
|
80
|
+
const _queryParams = {};
|
|
81
|
+
if (page !== undefined) {
|
|
82
|
+
_queryParams["page"] = (_a = page === null || page === void 0 ? void 0 : page.toString()) !== null && _a !== void 0 ? _a : null;
|
|
83
|
+
}
|
|
84
|
+
if (pageSize !== undefined) {
|
|
85
|
+
_queryParams["page_size"] = (_b = pageSize === null || pageSize === void 0 ? void 0 : pageSize.toString()) !== null && _b !== void 0 ? _b : null;
|
|
86
|
+
}
|
|
87
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_c = this._options) === null || _c === void 0 ? void 0 : _c.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
88
|
+
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
89
|
+
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)}`),
|
|
90
|
+
method: "GET",
|
|
91
|
+
headers: _headers,
|
|
92
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
93
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
94
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
95
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
96
|
+
});
|
|
97
|
+
if (_response.ok) {
|
|
98
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
99
|
+
}
|
|
100
|
+
if (_response.error.reason === "status-code") {
|
|
101
|
+
switch (_response.error.statusCode) {
|
|
102
|
+
case 422:
|
|
103
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
104
|
+
default:
|
|
105
|
+
throw new errors.ChrtError({
|
|
106
|
+
statusCode: _response.error.statusCode,
|
|
107
|
+
body: _response.error.body,
|
|
108
|
+
rawResponse: _response.rawResponse,
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
switch (_response.error.reason) {
|
|
113
|
+
case "non-json":
|
|
114
|
+
throw new errors.ChrtError({
|
|
115
|
+
statusCode: _response.error.statusCode,
|
|
116
|
+
body: _response.error.rawBody,
|
|
117
|
+
rawResponse: _response.rawResponse,
|
|
118
|
+
});
|
|
119
|
+
case "timeout":
|
|
120
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /billing_new/invoices/export/list/v1/{invoice_id}.");
|
|
121
|
+
case "unknown":
|
|
122
|
+
throw new errors.ChrtError({
|
|
123
|
+
message: _response.error.errorMessage,
|
|
124
|
+
rawResponse: _response.rawResponse,
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
_getAuthorizationHeader() {
|
|
130
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
131
|
+
const bearer = yield core.Supplier.get(this._options.token);
|
|
132
|
+
if (bearer != null) {
|
|
133
|
+
return `Bearer ${bearer}`;
|
|
134
|
+
}
|
|
135
|
+
return undefined;
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
exports.Export = Export;
|
|
@@ -0,0 +1,17 @@
|
|
|
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);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { type ExportListV1Request } from "./ExportListV1Request.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./client/index.js";
|
|
@@ -0,0 +1,17 @@
|
|
|
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);
|
|
@@ -0,0 +1,41 @@
|
|
|
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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
36
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.export_ = void 0;
|
|
40
|
+
exports.export_ = __importStar(require("./export/index.js"));
|
|
41
|
+
__exportStar(require("./export/client/requests/index.js"), exports);
|
|
@@ -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
|
*
|
|
@@ -382,6 +382,124 @@ class Assets {
|
|
|
382
382
|
}
|
|
383
383
|
});
|
|
384
384
|
}
|
|
385
|
+
/**
|
|
386
|
+
* Pauses a Reelables asset and opens a new pause time window. | authz: min_org_role=operator | () -> (bool)
|
|
387
|
+
*
|
|
388
|
+
* @param {string} assetId
|
|
389
|
+
* @param {Assets.RequestOptions} requestOptions - Request-specific configuration.
|
|
390
|
+
*
|
|
391
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
392
|
+
*
|
|
393
|
+
* @example
|
|
394
|
+
* await client.trackingIntegrations.reelables.assets.pauseV1("asset_id")
|
|
395
|
+
*/
|
|
396
|
+
pauseV1(assetId, requestOptions) {
|
|
397
|
+
return core.HttpResponsePromise.fromPromise(this.__pauseV1(assetId, requestOptions));
|
|
398
|
+
}
|
|
399
|
+
__pauseV1(assetId, requestOptions) {
|
|
400
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
401
|
+
var _a, _b, _c, _d;
|
|
402
|
+
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);
|
|
403
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
404
|
+
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)}`),
|
|
405
|
+
method: "POST",
|
|
406
|
+
headers: _headers,
|
|
407
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
408
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
409
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
410
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
411
|
+
});
|
|
412
|
+
if (_response.ok) {
|
|
413
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
414
|
+
}
|
|
415
|
+
if (_response.error.reason === "status-code") {
|
|
416
|
+
switch (_response.error.statusCode) {
|
|
417
|
+
case 422:
|
|
418
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
419
|
+
default:
|
|
420
|
+
throw new errors.ChrtError({
|
|
421
|
+
statusCode: _response.error.statusCode,
|
|
422
|
+
body: _response.error.body,
|
|
423
|
+
rawResponse: _response.rawResponse,
|
|
424
|
+
});
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
switch (_response.error.reason) {
|
|
428
|
+
case "non-json":
|
|
429
|
+
throw new errors.ChrtError({
|
|
430
|
+
statusCode: _response.error.statusCode,
|
|
431
|
+
body: _response.error.rawBody,
|
|
432
|
+
rawResponse: _response.rawResponse,
|
|
433
|
+
});
|
|
434
|
+
case "timeout":
|
|
435
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /tracking_integrations/reelables/assets/pause/v1/{asset_id}.");
|
|
436
|
+
case "unknown":
|
|
437
|
+
throw new errors.ChrtError({
|
|
438
|
+
message: _response.error.errorMessage,
|
|
439
|
+
rawResponse: _response.rawResponse,
|
|
440
|
+
});
|
|
441
|
+
}
|
|
442
|
+
});
|
|
443
|
+
}
|
|
444
|
+
/**
|
|
445
|
+
* Unpauses a Reelables asset and closes the open pause time window. | authz: min_org_role=operator | () -> (bool)
|
|
446
|
+
*
|
|
447
|
+
* @param {string} assetId
|
|
448
|
+
* @param {Assets.RequestOptions} requestOptions - Request-specific configuration.
|
|
449
|
+
*
|
|
450
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
451
|
+
*
|
|
452
|
+
* @example
|
|
453
|
+
* await client.trackingIntegrations.reelables.assets.unpauseV1("asset_id")
|
|
454
|
+
*/
|
|
455
|
+
unpauseV1(assetId, requestOptions) {
|
|
456
|
+
return core.HttpResponsePromise.fromPromise(this.__unpauseV1(assetId, requestOptions));
|
|
457
|
+
}
|
|
458
|
+
__unpauseV1(assetId, requestOptions) {
|
|
459
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
460
|
+
var _a, _b, _c, _d;
|
|
461
|
+
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);
|
|
462
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
463
|
+
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)}`),
|
|
464
|
+
method: "POST",
|
|
465
|
+
headers: _headers,
|
|
466
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
467
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
468
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
469
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
470
|
+
});
|
|
471
|
+
if (_response.ok) {
|
|
472
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
473
|
+
}
|
|
474
|
+
if (_response.error.reason === "status-code") {
|
|
475
|
+
switch (_response.error.statusCode) {
|
|
476
|
+
case 422:
|
|
477
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
478
|
+
default:
|
|
479
|
+
throw new errors.ChrtError({
|
|
480
|
+
statusCode: _response.error.statusCode,
|
|
481
|
+
body: _response.error.body,
|
|
482
|
+
rawResponse: _response.rawResponse,
|
|
483
|
+
});
|
|
484
|
+
}
|
|
485
|
+
}
|
|
486
|
+
switch (_response.error.reason) {
|
|
487
|
+
case "non-json":
|
|
488
|
+
throw new errors.ChrtError({
|
|
489
|
+
statusCode: _response.error.statusCode,
|
|
490
|
+
body: _response.error.rawBody,
|
|
491
|
+
rawResponse: _response.rawResponse,
|
|
492
|
+
});
|
|
493
|
+
case "timeout":
|
|
494
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /tracking_integrations/reelables/assets/unpause/v1/{asset_id}.");
|
|
495
|
+
case "unknown":
|
|
496
|
+
throw new errors.ChrtError({
|
|
497
|
+
message: _response.error.errorMessage,
|
|
498
|
+
rawResponse: _response.rawResponse,
|
|
499
|
+
});
|
|
500
|
+
}
|
|
501
|
+
});
|
|
502
|
+
}
|
|
385
503
|
/**
|
|
386
504
|
* Updates a Reelables asset, applying name changes upstream before updating CHRT. | authz: min_org_role=operator | (ReelablesAssetClientUpdate1) -> (ReelablesAsset1)
|
|
387
505
|
*
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Chrt from "../index.js";
|
|
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
|
+
}
|
|
@@ -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;
|