@chrt-inc/typescript-sdk 1.344.1 → 1.353.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/billing/resources/statements/client/Client.d.ts +7 -9
- package/dist/cjs/api/resources/billing/resources/statements/client/Client.js +10 -18
- package/dist/cjs/api/resources/billing/resources/statements/client/requests/StatementsListV1Request.d.ts +1 -7
- package/dist/cjs/api/resources/orgs/client/Client.d.ts +10 -0
- package/dist/cjs/api/resources/orgs/client/Client.js +51 -0
- package/dist/cjs/api/resources/taskGroups/client/Client.d.ts +14 -0
- package/dist/cjs/api/resources/taskGroups/client/Client.js +60 -0
- package/dist/cjs/api/resources/tracking/resources/sharingSettings/client/Client.d.ts +13 -13
- package/dist/cjs/api/resources/tracking/resources/sharingSettings/client/Client.js +48 -48
- package/dist/cjs/api/types/LineItemGroupStatusEnum1.d.ts +1 -2
- package/dist/cjs/api/types/LineItemGroupStatusEnum1.js +0 -1
- package/dist/cjs/api/types/OrgPrivateData1.d.ts +20 -0
- package/dist/cjs/api/types/Statement1.d.ts +0 -3
- package/dist/cjs/api/types/StatementSortByEnum.d.ts +1 -2
- package/dist/cjs/api/types/StatementSortByEnum.js +0 -1
- package/dist/cjs/api/types/StatementStatusEnum1.d.ts +1 -2
- package/dist/cjs/api/types/StatementStatusEnum1.js +0 -1
- package/dist/cjs/api/types/index.d.ts +1 -1
- package/dist/cjs/api/types/index.js +1 -1
- 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/billing/resources/statements/client/Client.d.mts +7 -9
- package/dist/esm/api/resources/billing/resources/statements/client/Client.mjs +10 -18
- package/dist/esm/api/resources/billing/resources/statements/client/requests/StatementsListV1Request.d.mts +1 -7
- package/dist/esm/api/resources/orgs/client/Client.d.mts +10 -0
- package/dist/esm/api/resources/orgs/client/Client.mjs +51 -0
- package/dist/esm/api/resources/taskGroups/client/Client.d.mts +14 -0
- package/dist/esm/api/resources/taskGroups/client/Client.mjs +60 -0
- package/dist/esm/api/resources/tracking/resources/sharingSettings/client/Client.d.mts +13 -13
- package/dist/esm/api/resources/tracking/resources/sharingSettings/client/Client.mjs +48 -48
- package/dist/esm/api/types/LineItemGroupStatusEnum1.d.mts +1 -2
- package/dist/esm/api/types/LineItemGroupStatusEnum1.mjs +0 -1
- package/dist/esm/api/types/OrgPrivateData1.d.mts +20 -0
- package/dist/esm/api/types/Statement1.d.mts +0 -3
- package/dist/esm/api/types/StatementSortByEnum.d.mts +1 -2
- package/dist/esm/api/types/StatementSortByEnum.mjs +0 -1
- package/dist/esm/api/types/StatementStatusEnum1.d.mts +1 -2
- package/dist/esm/api/types/StatementStatusEnum1.mjs +0 -1
- package/dist/esm/api/types/index.d.mts +1 -1
- package/dist/esm/api/types/index.mjs +1 -1
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +153 -29
- package/dist/cjs/api/types/SyncInvoiceRes.d.ts +0 -10
- package/dist/esm/api/types/SyncInvoiceRes.d.mts +0 -10
- /package/dist/cjs/api/types/{SyncInvoiceRes.js → OrgPrivateData1.js} +0 -0
- /package/dist/esm/api/types/{SyncInvoiceRes.mjs → OrgPrivateData1.mjs} +0 -0
package/dist/cjs/Client.js
CHANGED
|
@@ -67,8 +67,8 @@ class ChrtClient {
|
|
|
67
67
|
this._options = Object.assign(Object.assign({}, _options), { headers: (0, headers_js_1.mergeHeaders)({
|
|
68
68
|
"X-Fern-Language": "JavaScript",
|
|
69
69
|
"X-Fern-SDK-Name": "@chrt-inc/typescript-sdk",
|
|
70
|
-
"X-Fern-SDK-Version": "1.
|
|
71
|
-
"User-Agent": "@chrt-inc/typescript-sdk/1.
|
|
70
|
+
"X-Fern-SDK-Version": "1.353.0",
|
|
71
|
+
"User-Agent": "@chrt-inc/typescript-sdk/1.353.0",
|
|
72
72
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
73
73
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
74
74
|
}, _options === null || _options === void 0 ? void 0 : _options.headers) });
|
|
@@ -94,9 +94,7 @@ export declare class Statements {
|
|
|
94
94
|
* filter_opened_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
95
95
|
* filter_opened_at_timestamp_lte: "2024-01-15T09:30:00Z",
|
|
96
96
|
* filter_paid_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
97
|
-
* filter_paid_at_timestamp_lte: "2024-01-15T09:30:00Z"
|
|
98
|
-
* filter_voided_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
99
|
-
* filter_voided_at_timestamp_lte: "2024-01-15T09:30:00Z"
|
|
97
|
+
* filter_paid_at_timestamp_lte: "2024-01-15T09:30:00Z"
|
|
100
98
|
* })
|
|
101
99
|
*/
|
|
102
100
|
listV1(request?: Chrt.billing.StatementsListV1Request, requestOptions?: Statements.RequestOptions): core.HttpResponsePromise<Chrt.StatementsListRes>;
|
|
@@ -177,7 +175,7 @@ export declare class Statements {
|
|
|
177
175
|
openInvoiceV1(statementId: string, request?: Chrt.billing.OpenInvoiceReq, requestOptions?: Statements.RequestOptions): core.HttpResponsePromise<Chrt.Statement1>;
|
|
178
176
|
private __openInvoiceV1;
|
|
179
177
|
/**
|
|
180
|
-
* Syncs invoice state from Stripe to the Statement and LineItemGroups. The webhook usually keeps invoices up to date, but users can manually trigger a sync. | authz: min_org_role=operator | () -> (
|
|
178
|
+
* Syncs invoice state from Stripe Connect to the Statement and LineItemGroups. The webhook usually keeps invoices up to date, but users can manually trigger a sync. | authz: org_type=[courier, forwarder, shipper], min_org_role=operator, authz_personas=[statement_org_operators] | () -> (Statement1)
|
|
181
179
|
*
|
|
182
180
|
* @param {string} statementId
|
|
183
181
|
* @param {Statements.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -187,10 +185,10 @@ export declare class Statements {
|
|
|
187
185
|
* @example
|
|
188
186
|
* await client.billing.statements.syncInvoiceV1("statement_id")
|
|
189
187
|
*/
|
|
190
|
-
syncInvoiceV1(statementId: string, requestOptions?: Statements.RequestOptions): core.HttpResponsePromise<Chrt.
|
|
188
|
+
syncInvoiceV1(statementId: string, requestOptions?: Statements.RequestOptions): core.HttpResponsePromise<Chrt.Statement1>;
|
|
191
189
|
private __syncInvoiceV1;
|
|
192
190
|
/**
|
|
193
|
-
*
|
|
191
|
+
* Voids a Stripe Connect invoice. Statement reverts to STAGED and LIGs revert to FINALIZED. | authz: org_type=[courier, forwarder], min_org_role=operator, authz_personas=[statement_owner_operators], statement_status=OPEN | () -> (Statement1)
|
|
194
192
|
*
|
|
195
193
|
* @param {string} statementId
|
|
196
194
|
* @param {Statements.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -198,9 +196,9 @@ export declare class Statements {
|
|
|
198
196
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
199
197
|
*
|
|
200
198
|
* @example
|
|
201
|
-
* await client.billing.statements.
|
|
199
|
+
* await client.billing.statements.voidInvoiceV1("statement_id")
|
|
202
200
|
*/
|
|
203
|
-
|
|
204
|
-
private
|
|
201
|
+
voidInvoiceV1(statementId: string, requestOptions?: Statements.RequestOptions): core.HttpResponsePromise<Chrt.Statement1>;
|
|
202
|
+
private __voidInvoiceV1;
|
|
205
203
|
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
206
204
|
}
|
|
@@ -260,9 +260,7 @@ class Statements {
|
|
|
260
260
|
* filter_opened_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
261
261
|
* filter_opened_at_timestamp_lte: "2024-01-15T09:30:00Z",
|
|
262
262
|
* filter_paid_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
263
|
-
* filter_paid_at_timestamp_lte: "2024-01-15T09:30:00Z"
|
|
264
|
-
* filter_voided_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
265
|
-
* filter_voided_at_timestamp_lte: "2024-01-15T09:30:00Z"
|
|
263
|
+
* filter_paid_at_timestamp_lte: "2024-01-15T09:30:00Z"
|
|
266
264
|
* })
|
|
267
265
|
*/
|
|
268
266
|
listV1(request = {}, requestOptions) {
|
|
@@ -271,7 +269,7 @@ class Statements {
|
|
|
271
269
|
__listV1() {
|
|
272
270
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
273
271
|
var _a, _b, _c, _d, _e, _f;
|
|
274
|
-
const { sort_by: sortBy, sort_order: sortOrder, page, page_size: pageSize, filter_status: filterStatus, filter_settlement_type: filterSettlementType, filter_payment_origin_org_id: filterPaymentOriginOrgId, filter_payment_destination_org_id: filterPaymentDestinationOrgId, filter_owned_by_org_id: filterOwnedByOrgId, filter_staged_at_timestamp_gte: filterStagedAtTimestampGte, filter_staged_at_timestamp_lte: filterStagedAtTimestampLte, filter_opened_at_timestamp_gte: filterOpenedAtTimestampGte, filter_opened_at_timestamp_lte: filterOpenedAtTimestampLte, filter_paid_at_timestamp_gte: filterPaidAtTimestampGte, filter_paid_at_timestamp_lte: filterPaidAtTimestampLte,
|
|
272
|
+
const { sort_by: sortBy, sort_order: sortOrder, page, page_size: pageSize, filter_status: filterStatus, filter_settlement_type: filterSettlementType, filter_payment_origin_org_id: filterPaymentOriginOrgId, filter_payment_destination_org_id: filterPaymentDestinationOrgId, filter_owned_by_org_id: filterOwnedByOrgId, filter_staged_at_timestamp_gte: filterStagedAtTimestampGte, filter_staged_at_timestamp_lte: filterStagedAtTimestampLte, filter_opened_at_timestamp_gte: filterOpenedAtTimestampGte, filter_opened_at_timestamp_lte: filterOpenedAtTimestampLte, filter_paid_at_timestamp_gte: filterPaidAtTimestampGte, filter_paid_at_timestamp_lte: filterPaidAtTimestampLte, } = request;
|
|
275
273
|
const _queryParams = {};
|
|
276
274
|
if (sortBy !== undefined) {
|
|
277
275
|
_queryParams["sort_by"] = sortBy;
|
|
@@ -323,12 +321,6 @@ class Statements {
|
|
|
323
321
|
if (filterPaidAtTimestampLte !== undefined) {
|
|
324
322
|
_queryParams["filter_paid_at_timestamp_lte"] = filterPaidAtTimestampLte;
|
|
325
323
|
}
|
|
326
|
-
if (filterVoidedAtTimestampGte !== undefined) {
|
|
327
|
-
_queryParams["filter_voided_at_timestamp_gte"] = filterVoidedAtTimestampGte;
|
|
328
|
-
}
|
|
329
|
-
if (filterVoidedAtTimestampLte !== undefined) {
|
|
330
|
-
_queryParams["filter_voided_at_timestamp_lte"] = filterVoidedAtTimestampLte;
|
|
331
|
-
}
|
|
332
324
|
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);
|
|
333
325
|
const _response = yield ((_d = this._options.fetcher) !== null && _d !== void 0 ? _d : core.fetcher)({
|
|
334
326
|
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/list/v1"),
|
|
@@ -689,7 +681,7 @@ class Statements {
|
|
|
689
681
|
});
|
|
690
682
|
}
|
|
691
683
|
/**
|
|
692
|
-
* Syncs invoice state from Stripe to the Statement and LineItemGroups. The webhook usually keeps invoices up to date, but users can manually trigger a sync. | authz: min_org_role=operator | () -> (
|
|
684
|
+
* Syncs invoice state from Stripe Connect to the Statement and LineItemGroups. The webhook usually keeps invoices up to date, but users can manually trigger a sync. | authz: org_type=[courier, forwarder, shipper], min_org_role=operator, authz_personas=[statement_org_operators] | () -> (Statement1)
|
|
693
685
|
*
|
|
694
686
|
* @param {string} statementId
|
|
695
687
|
* @param {Statements.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -748,7 +740,7 @@ class Statements {
|
|
|
748
740
|
});
|
|
749
741
|
}
|
|
750
742
|
/**
|
|
751
|
-
*
|
|
743
|
+
* Voids a Stripe Connect invoice. Statement reverts to STAGED and LIGs revert to FINALIZED. | authz: org_type=[courier, forwarder], min_org_role=operator, authz_personas=[statement_owner_operators], statement_status=OPEN | () -> (Statement1)
|
|
752
744
|
*
|
|
753
745
|
* @param {string} statementId
|
|
754
746
|
* @param {Statements.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -756,17 +748,17 @@ class Statements {
|
|
|
756
748
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
757
749
|
*
|
|
758
750
|
* @example
|
|
759
|
-
* await client.billing.statements.
|
|
751
|
+
* await client.billing.statements.voidInvoiceV1("statement_id")
|
|
760
752
|
*/
|
|
761
|
-
|
|
762
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
753
|
+
voidInvoiceV1(statementId, requestOptions) {
|
|
754
|
+
return core.HttpResponsePromise.fromPromise(this.__voidInvoiceV1(statementId, requestOptions));
|
|
763
755
|
}
|
|
764
|
-
|
|
756
|
+
__voidInvoiceV1(statementId, requestOptions) {
|
|
765
757
|
return __awaiter(this, void 0, void 0, function* () {
|
|
766
758
|
var _a, _b, _c, _d;
|
|
767
759
|
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);
|
|
768
760
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
769
|
-
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, `billing/
|
|
761
|
+
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, `billing/void_invoice/v1/${encodeURIComponent(statementId)}`),
|
|
770
762
|
method: "POST",
|
|
771
763
|
headers: _headers,
|
|
772
764
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
@@ -797,7 +789,7 @@ class Statements {
|
|
|
797
789
|
rawResponse: _response.rawResponse,
|
|
798
790
|
});
|
|
799
791
|
case "timeout":
|
|
800
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /billing/
|
|
792
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /billing/void_invoice/v1/{statement_id}.");
|
|
801
793
|
case "unknown":
|
|
802
794
|
throw new errors.ChrtError({
|
|
803
795
|
message: _response.error.errorMessage,
|
|
@@ -18,9 +18,7 @@ import * as Chrt from "../../../../../../index.js";
|
|
|
18
18
|
* filter_opened_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
19
19
|
* filter_opened_at_timestamp_lte: "2024-01-15T09:30:00Z",
|
|
20
20
|
* filter_paid_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
21
|
-
* filter_paid_at_timestamp_lte: "2024-01-15T09:30:00Z"
|
|
22
|
-
* filter_voided_at_timestamp_gte: "2024-01-15T09:30:00Z",
|
|
23
|
-
* filter_voided_at_timestamp_lte: "2024-01-15T09:30:00Z"
|
|
21
|
+
* filter_paid_at_timestamp_lte: "2024-01-15T09:30:00Z"
|
|
24
22
|
* }
|
|
25
23
|
*/
|
|
26
24
|
export interface StatementsListV1Request {
|
|
@@ -52,8 +50,4 @@ export interface StatementsListV1Request {
|
|
|
52
50
|
filter_paid_at_timestamp_gte?: string | null;
|
|
53
51
|
/** Filter by paid_at_timestamp <= value */
|
|
54
52
|
filter_paid_at_timestamp_lte?: string | null;
|
|
55
|
-
/** Filter by voided_at_timestamp >= value */
|
|
56
|
-
filter_voided_at_timestamp_gte?: string | null;
|
|
57
|
-
/** Filter by voided_at_timestamp <= value */
|
|
58
|
-
filter_voided_at_timestamp_lte?: string | null;
|
|
59
53
|
}
|
|
@@ -50,6 +50,16 @@ export declare class Orgs {
|
|
|
50
50
|
*/
|
|
51
51
|
listMembersV1(requestOptions?: Orgs.RequestOptions): core.HttpResponsePromise<Chrt.OrgMemberDetails[]>;
|
|
52
52
|
private __listMembersV1;
|
|
53
|
+
/**
|
|
54
|
+
* Retrieves private organization data for the caller's organization. | authz: min_org_role=operator | () -> (OrgPrivateData1)
|
|
55
|
+
*
|
|
56
|
+
* @param {Orgs.RequestOptions} requestOptions - Request-specific configuration.
|
|
57
|
+
*
|
|
58
|
+
* @example
|
|
59
|
+
* await client.orgs.getOrgPrivateDataV1()
|
|
60
|
+
*/
|
|
61
|
+
getOrgPrivateDataV1(requestOptions?: Orgs.RequestOptions): core.HttpResponsePromise<Chrt.OrgPrivateData1>;
|
|
62
|
+
private __getOrgPrivateDataV1;
|
|
53
63
|
/**
|
|
54
64
|
* Retrieves public organization data for the caller's organization. | () -> (OrgPublicData1)
|
|
55
65
|
*
|
|
@@ -157,6 +157,57 @@ class Orgs {
|
|
|
157
157
|
}
|
|
158
158
|
});
|
|
159
159
|
}
|
|
160
|
+
/**
|
|
161
|
+
* Retrieves private organization data for the caller's organization. | authz: min_org_role=operator | () -> (OrgPrivateData1)
|
|
162
|
+
*
|
|
163
|
+
* @param {Orgs.RequestOptions} requestOptions - Request-specific configuration.
|
|
164
|
+
*
|
|
165
|
+
* @example
|
|
166
|
+
* await client.orgs.getOrgPrivateDataV1()
|
|
167
|
+
*/
|
|
168
|
+
getOrgPrivateDataV1(requestOptions) {
|
|
169
|
+
return core.HttpResponsePromise.fromPromise(this.__getOrgPrivateDataV1(requestOptions));
|
|
170
|
+
}
|
|
171
|
+
__getOrgPrivateDataV1(requestOptions) {
|
|
172
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
173
|
+
var _a, _b, _c, _d;
|
|
174
|
+
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);
|
|
175
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
176
|
+
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, "orgs/org_private_data/v1"),
|
|
177
|
+
method: "GET",
|
|
178
|
+
headers: _headers,
|
|
179
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
180
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
181
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
182
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
183
|
+
});
|
|
184
|
+
if (_response.ok) {
|
|
185
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
186
|
+
}
|
|
187
|
+
if (_response.error.reason === "status-code") {
|
|
188
|
+
throw new errors.ChrtError({
|
|
189
|
+
statusCode: _response.error.statusCode,
|
|
190
|
+
body: _response.error.body,
|
|
191
|
+
rawResponse: _response.rawResponse,
|
|
192
|
+
});
|
|
193
|
+
}
|
|
194
|
+
switch (_response.error.reason) {
|
|
195
|
+
case "non-json":
|
|
196
|
+
throw new errors.ChrtError({
|
|
197
|
+
statusCode: _response.error.statusCode,
|
|
198
|
+
body: _response.error.rawBody,
|
|
199
|
+
rawResponse: _response.rawResponse,
|
|
200
|
+
});
|
|
201
|
+
case "timeout":
|
|
202
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /orgs/org_private_data/v1.");
|
|
203
|
+
case "unknown":
|
|
204
|
+
throw new errors.ChrtError({
|
|
205
|
+
message: _response.error.errorMessage,
|
|
206
|
+
rawResponse: _response.rawResponse,
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
});
|
|
210
|
+
}
|
|
160
211
|
/**
|
|
161
212
|
* Retrieves public organization data for the caller's organization. | () -> (OrgPublicData1)
|
|
162
213
|
*
|
|
@@ -113,6 +113,20 @@ export declare class TaskGroups {
|
|
|
113
113
|
*/
|
|
114
114
|
updateCourierOrgV1(taskGroupId: string, request: Chrt.UpdateCourierOrgReq, requestOptions?: TaskGroups.RequestOptions): core.HttpResponsePromise<boolean>;
|
|
115
115
|
private __updateCourierOrgV1;
|
|
116
|
+
/**
|
|
117
|
+
* Assigns a rate sheet to a task group. Syncs the corresponding LineItemGroup and recalculates LineItems. | authz_personas=[lig_owner_operators] | () -> (bool)
|
|
118
|
+
*
|
|
119
|
+
* @param {string} rateSheetId
|
|
120
|
+
* @param {string} taskGroupId
|
|
121
|
+
* @param {TaskGroups.RequestOptions} requestOptions - Request-specific configuration.
|
|
122
|
+
*
|
|
123
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
124
|
+
*
|
|
125
|
+
* @example
|
|
126
|
+
* await client.taskGroups.assignRateSheetV1("rate_sheet_id", "task_group_id")
|
|
127
|
+
*/
|
|
128
|
+
assignRateSheetV1(rateSheetId: string, taskGroupId: string, requestOptions?: TaskGroups.RequestOptions): core.HttpResponsePromise<boolean>;
|
|
129
|
+
private __assignRateSheetV1;
|
|
116
130
|
/**
|
|
117
131
|
* Sets the flight number and/or fa_flight_ids on a task group. | authz_personas=[lig_owner_operators] | (SetFlightInfoReq) -> (bool)
|
|
118
132
|
*
|
|
@@ -383,6 +383,66 @@ class TaskGroups {
|
|
|
383
383
|
}
|
|
384
384
|
});
|
|
385
385
|
}
|
|
386
|
+
/**
|
|
387
|
+
* Assigns a rate sheet to a task group. Syncs the corresponding LineItemGroup and recalculates LineItems. | authz_personas=[lig_owner_operators] | () -> (bool)
|
|
388
|
+
*
|
|
389
|
+
* @param {string} rateSheetId
|
|
390
|
+
* @param {string} taskGroupId
|
|
391
|
+
* @param {TaskGroups.RequestOptions} requestOptions - Request-specific configuration.
|
|
392
|
+
*
|
|
393
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
394
|
+
*
|
|
395
|
+
* @example
|
|
396
|
+
* await client.taskGroups.assignRateSheetV1("rate_sheet_id", "task_group_id")
|
|
397
|
+
*/
|
|
398
|
+
assignRateSheetV1(rateSheetId, taskGroupId, requestOptions) {
|
|
399
|
+
return core.HttpResponsePromise.fromPromise(this.__assignRateSheetV1(rateSheetId, taskGroupId, requestOptions));
|
|
400
|
+
}
|
|
401
|
+
__assignRateSheetV1(rateSheetId, taskGroupId, requestOptions) {
|
|
402
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
403
|
+
var _a, _b, _c, _d;
|
|
404
|
+
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);
|
|
405
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
406
|
+
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, `oort/task_groups/assign_rate_sheet/v1/${encodeURIComponent(rateSheetId)}/${encodeURIComponent(taskGroupId)}`),
|
|
407
|
+
method: "PATCH",
|
|
408
|
+
headers: _headers,
|
|
409
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
410
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
411
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
412
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
413
|
+
});
|
|
414
|
+
if (_response.ok) {
|
|
415
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
416
|
+
}
|
|
417
|
+
if (_response.error.reason === "status-code") {
|
|
418
|
+
switch (_response.error.statusCode) {
|
|
419
|
+
case 422:
|
|
420
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
421
|
+
default:
|
|
422
|
+
throw new errors.ChrtError({
|
|
423
|
+
statusCode: _response.error.statusCode,
|
|
424
|
+
body: _response.error.body,
|
|
425
|
+
rawResponse: _response.rawResponse,
|
|
426
|
+
});
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
switch (_response.error.reason) {
|
|
430
|
+
case "non-json":
|
|
431
|
+
throw new errors.ChrtError({
|
|
432
|
+
statusCode: _response.error.statusCode,
|
|
433
|
+
body: _response.error.rawBody,
|
|
434
|
+
rawResponse: _response.rawResponse,
|
|
435
|
+
});
|
|
436
|
+
case "timeout":
|
|
437
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling PATCH /oort/task_groups/assign_rate_sheet/v1/{rate_sheet_id}/{task_group_id}.");
|
|
438
|
+
case "unknown":
|
|
439
|
+
throw new errors.ChrtError({
|
|
440
|
+
message: _response.error.errorMessage,
|
|
441
|
+
rawResponse: _response.rawResponse,
|
|
442
|
+
});
|
|
443
|
+
}
|
|
444
|
+
});
|
|
445
|
+
}
|
|
386
446
|
/**
|
|
387
447
|
* Sets the flight number and/or fa_flight_ids on a task group. | authz_personas=[lig_owner_operators] | (SetFlightInfoReq) -> (bool)
|
|
388
448
|
*
|
|
@@ -30,19 +30,6 @@ export declare namespace SharingSettings {
|
|
|
30
30
|
export declare class SharingSettings {
|
|
31
31
|
protected readonly _options: SharingSettings.Options;
|
|
32
32
|
constructor(_options?: SharingSettings.Options);
|
|
33
|
-
/**
|
|
34
|
-
* Get all tracking datasets and their sharing settings for a given order. | authz_personas=[shipper_org_operators, forwarder_org_operators, courier_org_operators] | () -> (list[TrackingSharingSettingsRes])
|
|
35
|
-
*
|
|
36
|
-
* @param {string} orderIdOrShortId
|
|
37
|
-
* @param {SharingSettings.RequestOptions} requestOptions - Request-specific configuration.
|
|
38
|
-
*
|
|
39
|
-
* @throws {@link Chrt.UnprocessableEntityError}
|
|
40
|
-
*
|
|
41
|
-
* @example
|
|
42
|
-
* await client.tracking.sharingSettings.getSettingsV1("order_id_or_short_id")
|
|
43
|
-
*/
|
|
44
|
-
getSettingsV1(orderIdOrShortId: string, requestOptions?: SharingSettings.RequestOptions): core.HttpResponsePromise<Chrt.TrackingSharingSettingsRes[]>;
|
|
45
|
-
private __getSettingsV1;
|
|
46
33
|
/**
|
|
47
34
|
* Updates the sharing settings for a task group by driver tracking dataset. | authz_personas=[forwarder_org_operators, shipper_org_operators, courier_org_operators, courier_driver] | (TaskGroupByDriverSharingSettingsUpdateReq) -> (TaskGroupByDriverSharingSettings1)
|
|
48
35
|
*
|
|
@@ -96,5 +83,18 @@ export declare class SharingSettings {
|
|
|
96
83
|
*/
|
|
97
84
|
cargoByDeviceSettingsV1(request: Chrt.tracking.CargoByDeviceSharingSettingsUpdateReq, requestOptions?: SharingSettings.RequestOptions): core.HttpResponsePromise<Chrt.CargoByDeviceSharingSettings1>;
|
|
98
85
|
private __cargoByDeviceSettingsV1;
|
|
86
|
+
/**
|
|
87
|
+
* Get all tracking datasets and their sharing settings for a given order. If authenticated, returns datasets the user has direct access to plus public datasets. If unauthenticated, returns only datasets with public=True. | () -> (list[TrackingSharingSettingsRes])
|
|
88
|
+
*
|
|
89
|
+
* @param {string} orderIdOrShortId
|
|
90
|
+
* @param {SharingSettings.RequestOptions} requestOptions - Request-specific configuration.
|
|
91
|
+
*
|
|
92
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
93
|
+
*
|
|
94
|
+
* @example
|
|
95
|
+
* await client.tracking.sharingSettings.getSettingsV1("order_id_or_short_id")
|
|
96
|
+
*/
|
|
97
|
+
getSettingsV1(orderIdOrShortId: string, requestOptions?: SharingSettings.RequestOptions): core.HttpResponsePromise<Chrt.TrackingSharingSettingsRes[]>;
|
|
98
|
+
private __getSettingsV1;
|
|
99
99
|
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
100
100
|
}
|
|
@@ -56,34 +56,44 @@ class SharingSettings {
|
|
|
56
56
|
this._options = _options;
|
|
57
57
|
}
|
|
58
58
|
/**
|
|
59
|
-
*
|
|
59
|
+
* Updates the sharing settings for a task group by driver tracking dataset. | authz_personas=[forwarder_org_operators, shipper_org_operators, courier_org_operators, courier_driver] | (TaskGroupByDriverSharingSettingsUpdateReq) -> (TaskGroupByDriverSharingSettings1)
|
|
60
60
|
*
|
|
61
|
-
* @param {
|
|
61
|
+
* @param {Chrt.tracking.TaskGroupByDriverSharingSettingsUpdateReq} request
|
|
62
62
|
* @param {SharingSettings.RequestOptions} requestOptions - Request-specific configuration.
|
|
63
63
|
*
|
|
64
64
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
65
65
|
*
|
|
66
66
|
* @example
|
|
67
|
-
* await client.tracking.sharingSettings.
|
|
67
|
+
* await client.tracking.sharingSettings.taskGroupByDriverSharingSettingsV1({
|
|
68
|
+
* task_group_id: "task_group_id",
|
|
69
|
+
* driver_id: "driver_id",
|
|
70
|
+
* "public": true
|
|
71
|
+
* })
|
|
68
72
|
*/
|
|
69
|
-
|
|
70
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
73
|
+
taskGroupByDriverSharingSettingsV1(request, requestOptions) {
|
|
74
|
+
return core.HttpResponsePromise.fromPromise(this.__taskGroupByDriverSharingSettingsV1(request, requestOptions));
|
|
71
75
|
}
|
|
72
|
-
|
|
76
|
+
__taskGroupByDriverSharingSettingsV1(request, requestOptions) {
|
|
73
77
|
return __awaiter(this, void 0, void 0, function* () {
|
|
74
78
|
var _a, _b, _c, _d;
|
|
75
79
|
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);
|
|
76
80
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
77
|
-
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,
|
|
78
|
-
method: "
|
|
81
|
+
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/sharing_settings/task_group_by_driver/v1"),
|
|
82
|
+
method: "POST",
|
|
79
83
|
headers: _headers,
|
|
84
|
+
contentType: "application/json",
|
|
80
85
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
86
|
+
requestType: "json",
|
|
87
|
+
body: request,
|
|
81
88
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
82
89
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
83
90
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
84
91
|
});
|
|
85
92
|
if (_response.ok) {
|
|
86
|
-
return {
|
|
93
|
+
return {
|
|
94
|
+
data: _response.body,
|
|
95
|
+
rawResponse: _response.rawResponse,
|
|
96
|
+
};
|
|
87
97
|
}
|
|
88
98
|
if (_response.error.reason === "status-code") {
|
|
89
99
|
switch (_response.error.statusCode) {
|
|
@@ -105,7 +115,7 @@ class SharingSettings {
|
|
|
105
115
|
rawResponse: _response.rawResponse,
|
|
106
116
|
});
|
|
107
117
|
case "timeout":
|
|
108
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling
|
|
118
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /tracking/sharing_settings/task_group_by_driver/v1.");
|
|
109
119
|
case "unknown":
|
|
110
120
|
throw new errors.ChrtError({
|
|
111
121
|
message: _response.error.errorMessage,
|
|
@@ -115,29 +125,30 @@ class SharingSettings {
|
|
|
115
125
|
});
|
|
116
126
|
}
|
|
117
127
|
/**
|
|
118
|
-
* Updates the sharing settings for a
|
|
128
|
+
* Updates the sharing settings for a cargo by driver tracking dataset. | authz_personas=[forwarder_org_operators, shipper_org_operators, courier_org_operators, courier_driver] | (CargoByDriverSharingSettingsUpdateReq) -> (CargoByDriverSharingSettings1)
|
|
119
129
|
*
|
|
120
|
-
* @param {Chrt.tracking.
|
|
130
|
+
* @param {Chrt.tracking.CargoByDriverSharingSettingsUpdateReq} request
|
|
121
131
|
* @param {SharingSettings.RequestOptions} requestOptions - Request-specific configuration.
|
|
122
132
|
*
|
|
123
133
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
124
134
|
*
|
|
125
135
|
* @example
|
|
126
|
-
* await client.tracking.sharingSettings.
|
|
136
|
+
* await client.tracking.sharingSettings.cargoByDriverSettingsV1({
|
|
127
137
|
* task_group_id: "task_group_id",
|
|
138
|
+
* cargo_id: "cargo_id",
|
|
128
139
|
* driver_id: "driver_id",
|
|
129
140
|
* "public": true
|
|
130
141
|
* })
|
|
131
142
|
*/
|
|
132
|
-
|
|
133
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
143
|
+
cargoByDriverSettingsV1(request, requestOptions) {
|
|
144
|
+
return core.HttpResponsePromise.fromPromise(this.__cargoByDriverSettingsV1(request, requestOptions));
|
|
134
145
|
}
|
|
135
|
-
|
|
146
|
+
__cargoByDriverSettingsV1(request, requestOptions) {
|
|
136
147
|
return __awaiter(this, void 0, void 0, function* () {
|
|
137
148
|
var _a, _b, _c, _d;
|
|
138
149
|
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);
|
|
139
150
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
140
|
-
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/sharing_settings/
|
|
151
|
+
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/sharing_settings/cargo_by_driver/v1"),
|
|
141
152
|
method: "POST",
|
|
142
153
|
headers: _headers,
|
|
143
154
|
contentType: "application/json",
|
|
@@ -149,10 +160,7 @@ class SharingSettings {
|
|
|
149
160
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
150
161
|
});
|
|
151
162
|
if (_response.ok) {
|
|
152
|
-
return {
|
|
153
|
-
data: _response.body,
|
|
154
|
-
rawResponse: _response.rawResponse,
|
|
155
|
-
};
|
|
163
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
156
164
|
}
|
|
157
165
|
if (_response.error.reason === "status-code") {
|
|
158
166
|
switch (_response.error.statusCode) {
|
|
@@ -174,7 +182,7 @@ class SharingSettings {
|
|
|
174
182
|
rawResponse: _response.rawResponse,
|
|
175
183
|
});
|
|
176
184
|
case "timeout":
|
|
177
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /tracking/sharing_settings/
|
|
185
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /tracking/sharing_settings/cargo_by_driver/v1.");
|
|
178
186
|
case "unknown":
|
|
179
187
|
throw new errors.ChrtError({
|
|
180
188
|
message: _response.error.errorMessage,
|
|
@@ -184,30 +192,30 @@ class SharingSettings {
|
|
|
184
192
|
});
|
|
185
193
|
}
|
|
186
194
|
/**
|
|
187
|
-
* Updates the sharing settings for a cargo by
|
|
195
|
+
* Updates the sharing settings for a cargo by device tracking dataset. | authz_personas=[forwarder_org_operators, shipper_org_operators, order_creator_org_operators] | (CargoByDeviceSharingSettingsUpdateReq) -> (CargoByDeviceSharingSettings1)
|
|
188
196
|
*
|
|
189
|
-
* @param {Chrt.tracking.
|
|
197
|
+
* @param {Chrt.tracking.CargoByDeviceSharingSettingsUpdateReq} request
|
|
190
198
|
* @param {SharingSettings.RequestOptions} requestOptions - Request-specific configuration.
|
|
191
199
|
*
|
|
192
200
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
193
201
|
*
|
|
194
202
|
* @example
|
|
195
|
-
* await client.tracking.sharingSettings.
|
|
203
|
+
* await client.tracking.sharingSettings.cargoByDeviceSettingsV1({
|
|
196
204
|
* task_group_id: "task_group_id",
|
|
197
205
|
* cargo_id: "cargo_id",
|
|
198
|
-
*
|
|
206
|
+
* device_id: "device_id",
|
|
199
207
|
* "public": true
|
|
200
208
|
* })
|
|
201
209
|
*/
|
|
202
|
-
|
|
203
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
210
|
+
cargoByDeviceSettingsV1(request, requestOptions) {
|
|
211
|
+
return core.HttpResponsePromise.fromPromise(this.__cargoByDeviceSettingsV1(request, requestOptions));
|
|
204
212
|
}
|
|
205
|
-
|
|
213
|
+
__cargoByDeviceSettingsV1(request, requestOptions) {
|
|
206
214
|
return __awaiter(this, void 0, void 0, function* () {
|
|
207
215
|
var _a, _b, _c, _d;
|
|
208
216
|
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);
|
|
209
217
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
210
|
-
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/sharing_settings/
|
|
218
|
+
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/sharing_settings/cargo_by_device/v1"),
|
|
211
219
|
method: "POST",
|
|
212
220
|
headers: _headers,
|
|
213
221
|
contentType: "application/json",
|
|
@@ -241,7 +249,7 @@ class SharingSettings {
|
|
|
241
249
|
rawResponse: _response.rawResponse,
|
|
242
250
|
});
|
|
243
251
|
case "timeout":
|
|
244
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /tracking/sharing_settings/
|
|
252
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /tracking/sharing_settings/cargo_by_device/v1.");
|
|
245
253
|
case "unknown":
|
|
246
254
|
throw new errors.ChrtError({
|
|
247
255
|
message: _response.error.errorMessage,
|
|
@@ -251,36 +259,28 @@ class SharingSettings {
|
|
|
251
259
|
});
|
|
252
260
|
}
|
|
253
261
|
/**
|
|
254
|
-
*
|
|
262
|
+
* Get all tracking datasets and their sharing settings for a given order. If authenticated, returns datasets the user has direct access to plus public datasets. If unauthenticated, returns only datasets with public=True. | () -> (list[TrackingSharingSettingsRes])
|
|
255
263
|
*
|
|
256
|
-
* @param {
|
|
264
|
+
* @param {string} orderIdOrShortId
|
|
257
265
|
* @param {SharingSettings.RequestOptions} requestOptions - Request-specific configuration.
|
|
258
266
|
*
|
|
259
267
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
260
268
|
*
|
|
261
269
|
* @example
|
|
262
|
-
* await client.tracking.sharingSettings.
|
|
263
|
-
* task_group_id: "task_group_id",
|
|
264
|
-
* cargo_id: "cargo_id",
|
|
265
|
-
* device_id: "device_id",
|
|
266
|
-
* "public": true
|
|
267
|
-
* })
|
|
270
|
+
* await client.tracking.sharingSettings.getSettingsV1("order_id_or_short_id")
|
|
268
271
|
*/
|
|
269
|
-
|
|
270
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
272
|
+
getSettingsV1(orderIdOrShortId, requestOptions) {
|
|
273
|
+
return core.HttpResponsePromise.fromPromise(this.__getSettingsV1(orderIdOrShortId, requestOptions));
|
|
271
274
|
}
|
|
272
|
-
|
|
275
|
+
__getSettingsV1(orderIdOrShortId, requestOptions) {
|
|
273
276
|
return __awaiter(this, void 0, void 0, function* () {
|
|
274
277
|
var _a, _b, _c, _d;
|
|
275
278
|
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);
|
|
276
279
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
277
|
-
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,
|
|
278
|
-
method: "
|
|
280
|
+
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/sharing_settings/by_order/v1/${encodeURIComponent(orderIdOrShortId)}`),
|
|
281
|
+
method: "GET",
|
|
279
282
|
headers: _headers,
|
|
280
|
-
contentType: "application/json",
|
|
281
283
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
282
|
-
requestType: "json",
|
|
283
|
-
body: request,
|
|
284
284
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
285
285
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
286
286
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -308,7 +308,7 @@ class SharingSettings {
|
|
|
308
308
|
rawResponse: _response.rawResponse,
|
|
309
309
|
});
|
|
310
310
|
case "timeout":
|
|
311
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling
|
|
311
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /tracking/sharing_settings/by_order/v1/{order_id_or_short_id}.");
|
|
312
312
|
case "unknown":
|
|
313
313
|
throw new errors.ChrtError({
|
|
314
314
|
message: _response.error.errorMessage,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
-
export type LineItemGroupStatusEnum1 = "staged" | "pending_rates" | "pending_calculation" | "adjustable" | "finalized" | "open" | "paid" | "uncollectible"
|
|
4
|
+
export type LineItemGroupStatusEnum1 = "staged" | "pending_rates" | "pending_calculation" | "adjustable" | "finalized" | "open" | "paid" | "uncollectible";
|
|
5
5
|
export declare const LineItemGroupStatusEnum1: {
|
|
6
6
|
readonly Staged: "staged";
|
|
7
7
|
readonly PendingRates: "pending_rates";
|
|
@@ -11,5 +11,4 @@ export declare const LineItemGroupStatusEnum1: {
|
|
|
11
11
|
readonly Open: "open";
|
|
12
12
|
readonly Paid: "paid";
|
|
13
13
|
readonly Uncollectible: "uncollectible";
|
|
14
|
-
readonly Void: "void";
|
|
15
14
|
};
|