@chrt-inc/typescript-sdk 1.1004.0 → 1.1008.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/invoiceLineItems/client/Client.d.ts +25 -5
- package/dist/cjs/api/resources/billingNew/resources/invoiceLineItems/client/Client.js +80 -8
- package/dist/cjs/api/resources/billingNew/resources/invoiceLineItems/client/requests/InvoiceLineItemsCurrencyConversionRevertForOrdersReq.d.ts +22 -0
- package/dist/cjs/api/resources/billingNew/resources/invoiceLineItems/client/requests/InvoiceLineItemsCurrencyConversionUpdateForOrdersReq.d.ts +28 -0
- package/dist/cjs/api/resources/billingNew/resources/invoiceLineItems/client/requests/InvoiceLineItemsCurrencyConversionUpdateForOrdersReq.js +5 -0
- package/dist/cjs/api/resources/billingNew/resources/invoiceLineItems/client/requests/index.d.ts +2 -1
- package/dist/cjs/api/resources/orgs/resources/offChrtOrgData/client/Client.d.ts +3 -2
- package/dist/cjs/api/resources/orgs/resources/offChrtOrgData/client/Client.js +7 -3
- package/dist/cjs/api/resources/orgs/resources/offChrtOrgData/client/requests/OffChrtOrgDataTypeaheadV1Request.d.ts +5 -1
- package/dist/cjs/api/resources/shipping/resources/drivers/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/shipping/resources/drivers/client/Client.js +1 -1
- package/dist/cjs/api/resources/tracking/resources/sessions/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/tracking/resources/sessions/client/Client.js +1 -1
- package/dist/cjs/api/types/DriverTypeaheadFieldEnum.d.ts +1 -5
- package/dist/cjs/api/types/DriverTypeaheadFieldEnum.js +0 -5
- package/dist/cjs/api/types/InvoiceLineItemsCurrencyConversionForOrdersRes.d.ts +20 -0
- package/dist/cjs/api/types/InvoiceLineItemsCurrencyConversionForOrdersRes.js +14 -0
- package/dist/cjs/api/types/SessionTypeaheadFieldEnum.d.ts +9 -0
- package/dist/cjs/api/types/SessionTypeaheadFieldEnum.js +11 -0
- package/dist/cjs/api/types/SessionTypeaheadResult.d.ts +1 -1
- package/dist/cjs/api/types/index.d.ts +2 -1
- package/dist/cjs/api/types/index.js +2 -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/billingNew/resources/invoiceLineItems/client/Client.d.mts +25 -5
- package/dist/esm/api/resources/billingNew/resources/invoiceLineItems/client/Client.mjs +80 -8
- package/dist/esm/api/resources/billingNew/resources/invoiceLineItems/client/requests/InvoiceLineItemsCurrencyConversionRevertForOrdersReq.d.mts +22 -0
- package/dist/esm/api/resources/billingNew/resources/invoiceLineItems/client/requests/InvoiceLineItemsCurrencyConversionUpdateForOrdersReq.d.mts +28 -0
- package/dist/esm/api/resources/billingNew/resources/invoiceLineItems/client/requests/InvoiceLineItemsCurrencyConversionUpdateForOrdersReq.mjs +4 -0
- package/dist/esm/api/resources/billingNew/resources/invoiceLineItems/client/requests/index.d.mts +2 -1
- package/dist/esm/api/resources/orgs/resources/offChrtOrgData/client/Client.d.mts +3 -2
- package/dist/esm/api/resources/orgs/resources/offChrtOrgData/client/Client.mjs +7 -3
- package/dist/esm/api/resources/orgs/resources/offChrtOrgData/client/requests/OffChrtOrgDataTypeaheadV1Request.d.mts +5 -1
- package/dist/esm/api/resources/shipping/resources/drivers/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/shipping/resources/drivers/client/Client.mjs +1 -1
- package/dist/esm/api/resources/tracking/resources/sessions/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/tracking/resources/sessions/client/Client.mjs +1 -1
- package/dist/esm/api/types/DriverTypeaheadFieldEnum.d.mts +1 -5
- package/dist/esm/api/types/DriverTypeaheadFieldEnum.mjs +1 -4
- package/dist/esm/api/types/InvoiceLineItemsCurrencyConversionForOrdersRes.d.mts +20 -0
- package/dist/esm/api/types/InvoiceLineItemsCurrencyConversionForOrdersRes.mjs +11 -0
- package/dist/esm/api/types/SessionTypeaheadFieldEnum.d.mts +9 -0
- package/dist/esm/api/types/SessionTypeaheadFieldEnum.mjs +8 -0
- package/dist/esm/api/types/SessionTypeaheadResult.d.mts +1 -1
- package/dist/esm/api/types/index.d.mts +2 -1
- package/dist/esm/api/types/index.mjs +2 -1
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +78 -7
- package/dist/cjs/api/resources/billingNew/resources/invoiceLineItems/client/requests/ReceivablesAcrossOrdersCurrencyConversionUpdateReq.d.ts +0 -18
- package/dist/cjs/api/types/ReceivablesAcrossOrdersCurrencyConversionOrderRes.d.ts +0 -18
- package/dist/cjs/api/types/ReceivablesAcrossOrdersCurrencyConversionOrderRes.js +0 -14
- package/dist/esm/api/resources/billingNew/resources/invoiceLineItems/client/requests/ReceivablesAcrossOrdersCurrencyConversionUpdateReq.d.mts +0 -18
- package/dist/esm/api/types/ReceivablesAcrossOrdersCurrencyConversionOrderRes.d.mts +0 -18
- package/dist/esm/api/types/ReceivablesAcrossOrdersCurrencyConversionOrderRes.mjs +0 -11
- /package/dist/cjs/api/resources/billingNew/resources/invoiceLineItems/client/requests/{ReceivablesAcrossOrdersCurrencyConversionUpdateReq.js → InvoiceLineItemsCurrencyConversionRevertForOrdersReq.js} +0 -0
- /package/dist/esm/api/resources/billingNew/resources/invoiceLineItems/client/requests/{ReceivablesAcrossOrdersCurrencyConversionUpdateReq.mjs → InvoiceLineItemsCurrencyConversionRevertForOrdersReq.mjs} +0 -0
|
@@ -815,28 +815,100 @@ export class InvoiceLineItems {
|
|
|
815
815
|
});
|
|
816
816
|
}
|
|
817
817
|
/**
|
|
818
|
-
*
|
|
818
|
+
* Restores each selected order's converted charges for one direction, counterparty, and source currency to their original amounts. | authz: allowed_org_types=[provider], min_org_role=operator | (InvoiceLineItemsCurrencyConversionRevertForOrdersReq) -> (list[InvoiceLineItemsCurrencyConversionForOrdersRes])
|
|
819
819
|
*
|
|
820
|
-
* @param {Chrt.billingNew.
|
|
820
|
+
* @param {Chrt.billingNew.InvoiceLineItemsCurrencyConversionRevertForOrdersReq} request
|
|
821
821
|
* @param {InvoiceLineItems.RequestOptions} requestOptions - Request-specific configuration.
|
|
822
822
|
*
|
|
823
823
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
824
824
|
*
|
|
825
825
|
* @example
|
|
826
|
-
* await client.billingNew.invoiceLineItems.
|
|
826
|
+
* await client.billingNew.invoiceLineItems.revertCurrencyConversionForOrdersV1({
|
|
827
|
+
* invoice_type: "accounts_receivable",
|
|
827
828
|
* order_ids: ["order_ids"],
|
|
829
|
+
* source_currency_code: "USD"
|
|
830
|
+
* })
|
|
831
|
+
*/
|
|
832
|
+
revertCurrencyConversionForOrdersV1(request, requestOptions) {
|
|
833
|
+
return core.HttpResponsePromise.fromPromise(this.__revertCurrencyConversionForOrdersV1(request, requestOptions));
|
|
834
|
+
}
|
|
835
|
+
__revertCurrencyConversionForOrdersV1(request, requestOptions) {
|
|
836
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
837
|
+
var _a, _b, _c, _d;
|
|
838
|
+
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);
|
|
839
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
840
|
+
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_new/invoice_line_items/revert_currency_conversion_for_orders/v1"),
|
|
841
|
+
method: "PATCH",
|
|
842
|
+
headers: _headers,
|
|
843
|
+
contentType: "application/json",
|
|
844
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
845
|
+
requestType: "json",
|
|
846
|
+
body: request,
|
|
847
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
848
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
849
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
850
|
+
});
|
|
851
|
+
if (_response.ok) {
|
|
852
|
+
return {
|
|
853
|
+
data: _response.body,
|
|
854
|
+
rawResponse: _response.rawResponse,
|
|
855
|
+
};
|
|
856
|
+
}
|
|
857
|
+
if (_response.error.reason === "status-code") {
|
|
858
|
+
switch (_response.error.statusCode) {
|
|
859
|
+
case 422:
|
|
860
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
861
|
+
default:
|
|
862
|
+
throw new errors.ChrtError({
|
|
863
|
+
statusCode: _response.error.statusCode,
|
|
864
|
+
body: _response.error.body,
|
|
865
|
+
rawResponse: _response.rawResponse,
|
|
866
|
+
});
|
|
867
|
+
}
|
|
868
|
+
}
|
|
869
|
+
switch (_response.error.reason) {
|
|
870
|
+
case "non-json":
|
|
871
|
+
throw new errors.ChrtError({
|
|
872
|
+
statusCode: _response.error.statusCode,
|
|
873
|
+
body: _response.error.rawBody,
|
|
874
|
+
rawResponse: _response.rawResponse,
|
|
875
|
+
});
|
|
876
|
+
case "timeout":
|
|
877
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling PATCH /billing_new/invoice_line_items/revert_currency_conversion_for_orders/v1.");
|
|
878
|
+
case "unknown":
|
|
879
|
+
throw new errors.ChrtError({
|
|
880
|
+
message: _response.error.errorMessage,
|
|
881
|
+
rawResponse: _response.rawResponse,
|
|
882
|
+
});
|
|
883
|
+
}
|
|
884
|
+
});
|
|
885
|
+
}
|
|
886
|
+
/**
|
|
887
|
+
* Converts each selected order's charges for one direction, counterparty, and source currency at one rate. | authz: allowed_org_types=[provider], min_org_role=operator | (InvoiceLineItemsCurrencyConversionUpdateForOrdersReq) -> (list[InvoiceLineItemsCurrencyConversionForOrdersRes])
|
|
888
|
+
*
|
|
889
|
+
* @param {Chrt.billingNew.InvoiceLineItemsCurrencyConversionUpdateForOrdersReq} request
|
|
890
|
+
* @param {InvoiceLineItems.RequestOptions} requestOptions - Request-specific configuration.
|
|
891
|
+
*
|
|
892
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
893
|
+
*
|
|
894
|
+
* @example
|
|
895
|
+
* await client.billingNew.invoiceLineItems.updateCurrencyConversionForOrdersV1({
|
|
896
|
+
* conversion_rate: 1.1,
|
|
897
|
+
* invoice_type: "accounts_receivable",
|
|
898
|
+
* order_ids: ["order_ids"],
|
|
899
|
+
* source_currency_code: "USD",
|
|
828
900
|
* target_currency_code: "USD"
|
|
829
901
|
* })
|
|
830
902
|
*/
|
|
831
|
-
|
|
832
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
903
|
+
updateCurrencyConversionForOrdersV1(request, requestOptions) {
|
|
904
|
+
return core.HttpResponsePromise.fromPromise(this.__updateCurrencyConversionForOrdersV1(request, requestOptions));
|
|
833
905
|
}
|
|
834
|
-
|
|
906
|
+
__updateCurrencyConversionForOrdersV1(request, requestOptions) {
|
|
835
907
|
return __awaiter(this, void 0, void 0, function* () {
|
|
836
908
|
var _a, _b, _c, _d;
|
|
837
909
|
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);
|
|
838
910
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
839
|
-
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_new/invoice_line_items/
|
|
911
|
+
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_new/invoice_line_items/update_currency_conversion_for_orders/v1"),
|
|
840
912
|
method: "PATCH",
|
|
841
913
|
headers: _headers,
|
|
842
914
|
contentType: "application/json",
|
|
@@ -873,7 +945,7 @@ export class InvoiceLineItems {
|
|
|
873
945
|
rawResponse: _response.rawResponse,
|
|
874
946
|
});
|
|
875
947
|
case "timeout":
|
|
876
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling PATCH /billing_new/invoice_line_items/
|
|
948
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling PATCH /billing_new/invoice_line_items/update_currency_conversion_for_orders/v1.");
|
|
877
949
|
case "unknown":
|
|
878
950
|
throw new errors.ChrtError({
|
|
879
951
|
message: _response.error.errorMessage,
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Chrt from "../../../../../../index.mjs";
|
|
5
|
+
/**
|
|
6
|
+
* @example
|
|
7
|
+
* {
|
|
8
|
+
* invoice_type: "accounts_receivable",
|
|
9
|
+
* order_ids: ["order_ids"],
|
|
10
|
+
* source_currency_code: "USD"
|
|
11
|
+
* }
|
|
12
|
+
*/
|
|
13
|
+
export interface InvoiceLineItemsCurrencyConversionRevertForOrdersReq {
|
|
14
|
+
counterparty_driver_id?: string | null;
|
|
15
|
+
counterparty_off_chrt_org_data_id?: string | null;
|
|
16
|
+
/** Must be a string starting with `org_` */
|
|
17
|
+
counterparty_org_id?: string | null;
|
|
18
|
+
invoice_type: Chrt.InvoiceTypeEnum1;
|
|
19
|
+
order_ids: string[];
|
|
20
|
+
/** Original currency of the charges to act on -- their currency_conversion.source_currency_code if already converted, otherwise their current currency_code. */
|
|
21
|
+
source_currency_code: Chrt.BillingCurrencyCodeEnum1;
|
|
22
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Chrt from "../../../../../../index.mjs";
|
|
5
|
+
/**
|
|
6
|
+
* @example
|
|
7
|
+
* {
|
|
8
|
+
* conversion_rate: 1.1,
|
|
9
|
+
* invoice_type: "accounts_receivable",
|
|
10
|
+
* order_ids: ["order_ids"],
|
|
11
|
+
* source_currency_code: "USD",
|
|
12
|
+
* target_currency_code: "USD"
|
|
13
|
+
* }
|
|
14
|
+
*/
|
|
15
|
+
export interface InvoiceLineItemsCurrencyConversionUpdateForOrdersReq {
|
|
16
|
+
/** Units of target_currency_code per one unit of source_currency_code. */
|
|
17
|
+
conversion_rate: number;
|
|
18
|
+
counterparty_driver_id?: string | null;
|
|
19
|
+
counterparty_off_chrt_org_data_id?: string | null;
|
|
20
|
+
/** Must be a string starting with `org_` */
|
|
21
|
+
counterparty_org_id?: string | null;
|
|
22
|
+
description?: string | null;
|
|
23
|
+
invoice_type: Chrt.InvoiceTypeEnum1;
|
|
24
|
+
order_ids: string[];
|
|
25
|
+
/** Original currency of the charges to act on -- their currency_conversion.source_currency_code if already converted, otherwise their current currency_code. */
|
|
26
|
+
source_currency_code: Chrt.BillingCurrencyCodeEnum1;
|
|
27
|
+
target_currency_code: Chrt.BillingCurrencyCodeEnum1;
|
|
28
|
+
}
|
package/dist/esm/api/resources/billingNew/resources/invoiceLineItems/client/requests/index.d.mts
CHANGED
|
@@ -3,6 +3,7 @@ export { type CreateInvoiceLineItemsFromAwbCostsReq } from "./CreateInvoiceLineI
|
|
|
3
3
|
export { type InvoiceLineItemsDeleteManyReq } from "./InvoiceLineItemsDeleteManyReq.mjs";
|
|
4
4
|
export { type InvoiceLineItemExportListReq } from "./InvoiceLineItemExportListReq.mjs";
|
|
5
5
|
export { type InvoiceLineItemsListV1Request } from "./InvoiceLineItemsListV1Request.mjs";
|
|
6
|
-
export { type
|
|
6
|
+
export { type InvoiceLineItemsCurrencyConversionRevertForOrdersReq } from "./InvoiceLineItemsCurrencyConversionRevertForOrdersReq.mjs";
|
|
7
|
+
export { type InvoiceLineItemsCurrencyConversionUpdateForOrdersReq } from "./InvoiceLineItemsCurrencyConversionUpdateForOrdersReq.mjs";
|
|
7
8
|
export { type InvoiceLineItemsCurrencyConversionUpdateManyReq } from "./InvoiceLineItemsCurrencyConversionUpdateManyReq.mjs";
|
|
8
9
|
export { type InvoiceLineItemClientUpdate1 } from "./InvoiceLineItemClientUpdate1.mjs";
|
|
@@ -71,7 +71,7 @@ export declare class OffChrtOrgData {
|
|
|
71
71
|
listV1(request?: Chrt.orgs.OffChrtOrgDataListV1Request, requestOptions?: OffChrtOrgData.RequestOptions): core.HttpResponsePromise<Chrt.OffChrtOrgDataListRes>;
|
|
72
72
|
private __listV1;
|
|
73
73
|
/**
|
|
74
|
-
* Returns matching name values and their IDs within the caller's organization. | authz: allowed_org_types=[provider] | () -> (list[OffChrtOrgDataTypeaheadResult])
|
|
74
|
+
* Returns matching name values and their IDs within the caller's organization, optionally filtered by org_type. | authz: allowed_org_types=[provider] | () -> (list[OffChrtOrgDataTypeaheadResult])
|
|
75
75
|
*
|
|
76
76
|
* @param {Chrt.orgs.OffChrtOrgDataTypeaheadV1Request} request
|
|
77
77
|
* @param {OffChrtOrgData.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -81,7 +81,8 @@ export declare class OffChrtOrgData {
|
|
|
81
81
|
* @example
|
|
82
82
|
* await client.orgs.offChrtOrgData.typeaheadV1({
|
|
83
83
|
* query: "query",
|
|
84
|
-
* limit: 1
|
|
84
|
+
* limit: 1,
|
|
85
|
+
* filter_org_type: "provider"
|
|
85
86
|
* })
|
|
86
87
|
*/
|
|
87
88
|
typeaheadV1(request: Chrt.orgs.OffChrtOrgDataTypeaheadV1Request, requestOptions?: OffChrtOrgData.RequestOptions): core.HttpResponsePromise<Chrt.OffChrtOrgDataTypeaheadResult[]>;
|
|
@@ -183,7 +183,7 @@ export class OffChrtOrgData {
|
|
|
183
183
|
});
|
|
184
184
|
}
|
|
185
185
|
/**
|
|
186
|
-
* Returns matching name values and their IDs within the caller's organization. | authz: allowed_org_types=[provider] | () -> (list[OffChrtOrgDataTypeaheadResult])
|
|
186
|
+
* Returns matching name values and their IDs within the caller's organization, optionally filtered by org_type. | authz: allowed_org_types=[provider] | () -> (list[OffChrtOrgDataTypeaheadResult])
|
|
187
187
|
*
|
|
188
188
|
* @param {Chrt.orgs.OffChrtOrgDataTypeaheadV1Request} request
|
|
189
189
|
* @param {OffChrtOrgData.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -193,7 +193,8 @@ export class OffChrtOrgData {
|
|
|
193
193
|
* @example
|
|
194
194
|
* await client.orgs.offChrtOrgData.typeaheadV1({
|
|
195
195
|
* query: "query",
|
|
196
|
-
* limit: 1
|
|
196
|
+
* limit: 1,
|
|
197
|
+
* filter_org_type: "provider"
|
|
197
198
|
* })
|
|
198
199
|
*/
|
|
199
200
|
typeaheadV1(request, requestOptions) {
|
|
@@ -202,12 +203,15 @@ export class OffChrtOrgData {
|
|
|
202
203
|
__typeaheadV1(request, requestOptions) {
|
|
203
204
|
return __awaiter(this, void 0, void 0, function* () {
|
|
204
205
|
var _a, _b, _c, _d, _e;
|
|
205
|
-
const { query, limit } = request;
|
|
206
|
+
const { query, limit, filter_org_type: filterOrgType } = request;
|
|
206
207
|
const _queryParams = {};
|
|
207
208
|
_queryParams["query"] = query;
|
|
208
209
|
if (limit !== undefined) {
|
|
209
210
|
_queryParams["limit"] = (_a = limit === null || limit === void 0 ? void 0 : limit.toString()) !== null && _a !== void 0 ? _a : null;
|
|
210
211
|
}
|
|
212
|
+
if (filterOrgType !== undefined) {
|
|
213
|
+
_queryParams["filter_org_type"] = filterOrgType;
|
|
214
|
+
}
|
|
211
215
|
let _headers = mergeHeaders((_b = this._options) === null || _b === void 0 ? void 0 : _b.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
212
216
|
const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
|
|
213
217
|
url: core.url.join((_e = (_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : (yield core.Supplier.get(this._options.environment))) !== null && _e !== void 0 ? _e : environments.ChrtEnvironment.Local, "orgs/off_chrt_org_data/typeahead/v1"),
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
+
import * as Chrt from "../../../../../../index.mjs";
|
|
4
5
|
/**
|
|
5
6
|
* @example
|
|
6
7
|
* {
|
|
7
8
|
* query: "query",
|
|
8
|
-
* limit: 1
|
|
9
|
+
* limit: 1,
|
|
10
|
+
* filter_org_type: "provider"
|
|
9
11
|
* }
|
|
10
12
|
*/
|
|
11
13
|
export interface OffChrtOrgDataTypeaheadV1Request {
|
|
@@ -13,4 +15,6 @@ export interface OffChrtOrgDataTypeaheadV1Request {
|
|
|
13
15
|
query: string;
|
|
14
16
|
/** Max results per field */
|
|
15
17
|
limit?: number | null;
|
|
18
|
+
/** Filter by organization type */
|
|
19
|
+
filter_org_type?: Chrt.OrgTypeEnum | null;
|
|
16
20
|
}
|
|
@@ -251,7 +251,7 @@ export declare class Drivers {
|
|
|
251
251
|
getStatsV1(driverId: string, request: Chrt.shipping.DriverStatsReq, requestOptions?: Drivers.RequestOptions): core.HttpResponsePromise<Chrt.DriverStatsRes>;
|
|
252
252
|
private __getStatsV1;
|
|
253
253
|
/**
|
|
254
|
-
* Returns matching first_name
|
|
254
|
+
* Returns matching full_name (first_name + last_name) values and their IDs within the caller's organization, excluding archived drivers. | () -> (list[DriverTypeaheadResult])
|
|
255
255
|
*
|
|
256
256
|
* @param {Chrt.shipping.DriversTypeaheadV1Request} request
|
|
257
257
|
* @param {Drivers.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -1010,7 +1010,7 @@ export class Drivers {
|
|
|
1010
1010
|
});
|
|
1011
1011
|
}
|
|
1012
1012
|
/**
|
|
1013
|
-
* Returns matching first_name
|
|
1013
|
+
* Returns matching full_name (first_name + last_name) values and their IDs within the caller's organization, excluding archived drivers. | () -> (list[DriverTypeaheadResult])
|
|
1014
1014
|
*
|
|
1015
1015
|
* @param {Chrt.shipping.DriversTypeaheadV1Request} request
|
|
1016
1016
|
* @param {Drivers.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -170,7 +170,7 @@ export declare class Sessions {
|
|
|
170
170
|
terminateV1(request: Chrt.tracking.SessionsTerminateV1Request, requestOptions?: Sessions.RequestOptions): core.HttpResponsePromise<boolean>;
|
|
171
171
|
private __terminateV1;
|
|
172
172
|
/**
|
|
173
|
-
* Returns distinct device_mac_address and
|
|
173
|
+
* Returns distinct device_mac_address, off_chrt_reference_id, and flight_numbers values matching the query via case-insensitive regex, searching sessions. Use org_scope to restrict to owned, shared, or both (default). | auth: api_key | authz: min_org_role=operator | () -> (list[SessionTypeaheadResult])
|
|
174
174
|
*
|
|
175
175
|
* @param {Chrt.tracking.SessionsTypeaheadV1Request} request
|
|
176
176
|
* @param {Sessions.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -593,7 +593,7 @@ export class Sessions {
|
|
|
593
593
|
});
|
|
594
594
|
}
|
|
595
595
|
/**
|
|
596
|
-
* Returns distinct device_mac_address and
|
|
596
|
+
* Returns distinct device_mac_address, off_chrt_reference_id, and flight_numbers values matching the query via case-insensitive regex, searching sessions. Use org_scope to restrict to owned, shared, or both (default). | auth: api_key | authz: min_org_role=operator | () -> (list[SessionTypeaheadResult])
|
|
597
597
|
*
|
|
598
598
|
* @param {Chrt.tracking.SessionsTypeaheadV1Request} request
|
|
599
599
|
* @param {Sessions.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -1,8 +1,4 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
-
export type DriverTypeaheadFieldEnum = "
|
|
5
|
-
export declare const DriverTypeaheadFieldEnum: {
|
|
6
|
-
readonly FirstName: "first_name";
|
|
7
|
-
readonly LastName: "last_name";
|
|
8
|
-
};
|
|
4
|
+
export type DriverTypeaheadFieldEnum = "full_name";
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Chrt from "../index.mjs";
|
|
5
|
+
export interface InvoiceLineItemsCurrencyConversionForOrdersRes {
|
|
6
|
+
converted_invoice_line_items?: Chrt.InvoiceLineItem1[];
|
|
7
|
+
failure_reason?: string | null;
|
|
8
|
+
order_id: string;
|
|
9
|
+
status: InvoiceLineItemsCurrencyConversionForOrdersRes.Status;
|
|
10
|
+
/** Order charges for another direction, counterparty, or original source currency. */
|
|
11
|
+
unmatched_invoice_line_item_ids?: string[];
|
|
12
|
+
}
|
|
13
|
+
export declare namespace InvoiceLineItemsCurrencyConversionForOrdersRes {
|
|
14
|
+
type Status = "succeeded" | "failed" | "no_matching_charges";
|
|
15
|
+
const Status: {
|
|
16
|
+
readonly Succeeded: "succeeded";
|
|
17
|
+
readonly Failed: "failed";
|
|
18
|
+
readonly NoMatchingCharges: "no_matching_charges";
|
|
19
|
+
};
|
|
20
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
export var InvoiceLineItemsCurrencyConversionForOrdersRes;
|
|
5
|
+
(function (InvoiceLineItemsCurrencyConversionForOrdersRes) {
|
|
6
|
+
InvoiceLineItemsCurrencyConversionForOrdersRes.Status = {
|
|
7
|
+
Succeeded: "succeeded",
|
|
8
|
+
Failed: "failed",
|
|
9
|
+
NoMatchingCharges: "no_matching_charges",
|
|
10
|
+
};
|
|
11
|
+
})(InvoiceLineItemsCurrencyConversionForOrdersRes || (InvoiceLineItemsCurrencyConversionForOrdersRes = {}));
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
export type SessionTypeaheadFieldEnum = "device_mac_address" | "off_chrt_reference_id" | "flight_numbers";
|
|
5
|
+
export declare const SessionTypeaheadFieldEnum: {
|
|
6
|
+
readonly DeviceMacAddress: "device_mac_address";
|
|
7
|
+
readonly OffChrtReferenceId: "off_chrt_reference_id";
|
|
8
|
+
readonly FlightNumbers: "flight_numbers";
|
|
9
|
+
};
|
|
@@ -326,6 +326,7 @@ export * from "./InvoiceLineItemStatusEnum1.mjs";
|
|
|
326
326
|
export * from "./InvoiceLineItemTypeEnum1.mjs";
|
|
327
327
|
export * from "./InvoiceLineItemUnitEnum1.mjs";
|
|
328
328
|
export * from "./InvoiceLineItemsByOrderExpandedRes.mjs";
|
|
329
|
+
export * from "./InvoiceLineItemsCurrencyConversionForOrdersRes.mjs";
|
|
329
330
|
export * from "./InvoiceLineItemsDeleteManyRes.mjs";
|
|
330
331
|
export * from "./InvoiceLineItemsFromChrtGroundProviderRateSheetsReq.mjs";
|
|
331
332
|
export * from "./InvoiceListRes.mjs";
|
|
@@ -525,7 +526,6 @@ export * from "./Position2D.mjs";
|
|
|
525
526
|
export * from "./Position3D.mjs";
|
|
526
527
|
export * from "./ProFormaLineItem1.mjs";
|
|
527
528
|
export * from "./ProFormaLineItemProvenanceEnum1.mjs";
|
|
528
|
-
export * from "./ReceivablesAcrossOrdersCurrencyConversionOrderRes.mjs";
|
|
529
529
|
export * from "./ReelablesAsset1.mjs";
|
|
530
530
|
export * from "./ReelablesAssetListRes.mjs";
|
|
531
531
|
export * from "./ReelablesAssetPausedTimeWindow1.mjs";
|
|
@@ -551,6 +551,7 @@ export * from "./SessionGeofenceClientCreate1.mjs";
|
|
|
551
551
|
export * from "./SessionGeofenceTemplate1.mjs";
|
|
552
552
|
export * from "./SessionListRes.mjs";
|
|
553
553
|
export * from "./SessionSortByEnum.mjs";
|
|
554
|
+
export * from "./SessionTypeaheadFieldEnum.mjs";
|
|
554
555
|
export * from "./SessionTypeaheadResult.mjs";
|
|
555
556
|
export * from "./SessionTypeaheadValue.mjs";
|
|
556
557
|
export * from "./ShipperCoordinatorConnection1.mjs";
|
|
@@ -326,6 +326,7 @@ export * from "./InvoiceLineItemStatusEnum1.mjs";
|
|
|
326
326
|
export * from "./InvoiceLineItemTypeEnum1.mjs";
|
|
327
327
|
export * from "./InvoiceLineItemUnitEnum1.mjs";
|
|
328
328
|
export * from "./InvoiceLineItemsByOrderExpandedRes.mjs";
|
|
329
|
+
export * from "./InvoiceLineItemsCurrencyConversionForOrdersRes.mjs";
|
|
329
330
|
export * from "./InvoiceLineItemsDeleteManyRes.mjs";
|
|
330
331
|
export * from "./InvoiceLineItemsFromChrtGroundProviderRateSheetsReq.mjs";
|
|
331
332
|
export * from "./InvoiceListRes.mjs";
|
|
@@ -525,7 +526,6 @@ export * from "./Position2D.mjs";
|
|
|
525
526
|
export * from "./Position3D.mjs";
|
|
526
527
|
export * from "./ProFormaLineItem1.mjs";
|
|
527
528
|
export * from "./ProFormaLineItemProvenanceEnum1.mjs";
|
|
528
|
-
export * from "./ReceivablesAcrossOrdersCurrencyConversionOrderRes.mjs";
|
|
529
529
|
export * from "./ReelablesAsset1.mjs";
|
|
530
530
|
export * from "./ReelablesAssetListRes.mjs";
|
|
531
531
|
export * from "./ReelablesAssetPausedTimeWindow1.mjs";
|
|
@@ -551,6 +551,7 @@ export * from "./SessionGeofenceClientCreate1.mjs";
|
|
|
551
551
|
export * from "./SessionGeofenceTemplate1.mjs";
|
|
552
552
|
export * from "./SessionListRes.mjs";
|
|
553
553
|
export * from "./SessionSortByEnum.mjs";
|
|
554
|
+
export * from "./SessionTypeaheadFieldEnum.mjs";
|
|
554
555
|
export * from "./SessionTypeaheadResult.mjs";
|
|
555
556
|
export * from "./SessionTypeaheadValue.mjs";
|
|
556
557
|
export * from "./ShipperCoordinatorConnection1.mjs";
|
package/dist/esm/version.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "1.
|
|
1
|
+
export declare const SDK_VERSION = "1.1008.0";
|
package/dist/esm/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "1.
|
|
1
|
+
export const SDK_VERSION = "1.1008.0";
|
package/package.json
CHANGED
package/reference.md
CHANGED
|
@@ -2720,7 +2720,7 @@ await client.billingNew.invoiceLineItems.listV1({
|
|
|
2720
2720
|
</dl>
|
|
2721
2721
|
</details>
|
|
2722
2722
|
|
|
2723
|
-
<details><summary><code>client.billingNew.invoiceLineItems.<a href="/src/api/resources/billingNew/resources/invoiceLineItems/client/Client.ts">
|
|
2723
|
+
<details><summary><code>client.billingNew.invoiceLineItems.<a href="/src/api/resources/billingNew/resources/invoiceLineItems/client/Client.ts">revertCurrencyConversionForOrdersV1</a>({ ...params }) -> Chrt.InvoiceLineItemsCurrencyConversionForOrdersRes[]</code></summary>
|
|
2724
2724
|
<dl>
|
|
2725
2725
|
<dd>
|
|
2726
2726
|
|
|
@@ -2732,7 +2732,7 @@ await client.billingNew.invoiceLineItems.listV1({
|
|
|
2732
2732
|
<dl>
|
|
2733
2733
|
<dd>
|
|
2734
2734
|
|
|
2735
|
-
|
|
2735
|
+
Restores each selected order's converted charges for one direction, counterparty, and source currency to their original amounts. | authz: allowed_org_types=[provider], min_org_role=operator | (InvoiceLineItemsCurrencyConversionRevertForOrdersReq) -> (list[InvoiceLineItemsCurrencyConversionForOrdersRes])
|
|
2736
2736
|
|
|
2737
2737
|
</dd>
|
|
2738
2738
|
</dl>
|
|
@@ -2748,8 +2748,78 @@ Applies one currency conversion independently to each selected order and reports
|
|
|
2748
2748
|
<dd>
|
|
2749
2749
|
|
|
2750
2750
|
```typescript
|
|
2751
|
-
await client.billingNew.invoiceLineItems.
|
|
2751
|
+
await client.billingNew.invoiceLineItems.revertCurrencyConversionForOrdersV1({
|
|
2752
|
+
invoice_type: "accounts_receivable",
|
|
2753
|
+
order_ids: ["order_ids"],
|
|
2754
|
+
source_currency_code: "USD",
|
|
2755
|
+
});
|
|
2756
|
+
```
|
|
2757
|
+
|
|
2758
|
+
</dd>
|
|
2759
|
+
</dl>
|
|
2760
|
+
</dd>
|
|
2761
|
+
</dl>
|
|
2762
|
+
|
|
2763
|
+
#### ⚙️ Parameters
|
|
2764
|
+
|
|
2765
|
+
<dl>
|
|
2766
|
+
<dd>
|
|
2767
|
+
|
|
2768
|
+
<dl>
|
|
2769
|
+
<dd>
|
|
2770
|
+
|
|
2771
|
+
**request:** `Chrt.billingNew.InvoiceLineItemsCurrencyConversionRevertForOrdersReq`
|
|
2772
|
+
|
|
2773
|
+
</dd>
|
|
2774
|
+
</dl>
|
|
2775
|
+
|
|
2776
|
+
<dl>
|
|
2777
|
+
<dd>
|
|
2778
|
+
|
|
2779
|
+
**requestOptions:** `InvoiceLineItems.RequestOptions`
|
|
2780
|
+
|
|
2781
|
+
</dd>
|
|
2782
|
+
</dl>
|
|
2783
|
+
</dd>
|
|
2784
|
+
</dl>
|
|
2785
|
+
|
|
2786
|
+
</dd>
|
|
2787
|
+
</dl>
|
|
2788
|
+
</details>
|
|
2789
|
+
|
|
2790
|
+
<details><summary><code>client.billingNew.invoiceLineItems.<a href="/src/api/resources/billingNew/resources/invoiceLineItems/client/Client.ts">updateCurrencyConversionForOrdersV1</a>({ ...params }) -> Chrt.InvoiceLineItemsCurrencyConversionForOrdersRes[]</code></summary>
|
|
2791
|
+
<dl>
|
|
2792
|
+
<dd>
|
|
2793
|
+
|
|
2794
|
+
#### 📝 Description
|
|
2795
|
+
|
|
2796
|
+
<dl>
|
|
2797
|
+
<dd>
|
|
2798
|
+
|
|
2799
|
+
<dl>
|
|
2800
|
+
<dd>
|
|
2801
|
+
|
|
2802
|
+
Converts each selected order's charges for one direction, counterparty, and source currency at one rate. | authz: allowed_org_types=[provider], min_org_role=operator | (InvoiceLineItemsCurrencyConversionUpdateForOrdersReq) -> (list[InvoiceLineItemsCurrencyConversionForOrdersRes])
|
|
2803
|
+
|
|
2804
|
+
</dd>
|
|
2805
|
+
</dl>
|
|
2806
|
+
</dd>
|
|
2807
|
+
</dl>
|
|
2808
|
+
|
|
2809
|
+
#### 🔌 Usage
|
|
2810
|
+
|
|
2811
|
+
<dl>
|
|
2812
|
+
<dd>
|
|
2813
|
+
|
|
2814
|
+
<dl>
|
|
2815
|
+
<dd>
|
|
2816
|
+
|
|
2817
|
+
```typescript
|
|
2818
|
+
await client.billingNew.invoiceLineItems.updateCurrencyConversionForOrdersV1({
|
|
2819
|
+
conversion_rate: 1.1,
|
|
2820
|
+
invoice_type: "accounts_receivable",
|
|
2752
2821
|
order_ids: ["order_ids"],
|
|
2822
|
+
source_currency_code: "USD",
|
|
2753
2823
|
target_currency_code: "USD",
|
|
2754
2824
|
});
|
|
2755
2825
|
```
|
|
@@ -2767,7 +2837,7 @@ await client.billingNew.invoiceLineItems.updateCurrencyConversionForReceivablesA
|
|
|
2767
2837
|
<dl>
|
|
2768
2838
|
<dd>
|
|
2769
2839
|
|
|
2770
|
-
**request:** `Chrt.billingNew.
|
|
2840
|
+
**request:** `Chrt.billingNew.InvoiceLineItemsCurrencyConversionUpdateForOrdersReq`
|
|
2771
2841
|
|
|
2772
2842
|
</dd>
|
|
2773
2843
|
</dl>
|
|
@@ -14557,7 +14627,7 @@ await client.orgs.offChrtOrgData.listV1({
|
|
|
14557
14627
|
<dl>
|
|
14558
14628
|
<dd>
|
|
14559
14629
|
|
|
14560
|
-
Returns matching name values and their IDs within the caller's organization. | authz: allowed_org_types=[provider] | () -> (list[OffChrtOrgDataTypeaheadResult])
|
|
14630
|
+
Returns matching name values and their IDs within the caller's organization, optionally filtered by org_type. | authz: allowed_org_types=[provider] | () -> (list[OffChrtOrgDataTypeaheadResult])
|
|
14561
14631
|
|
|
14562
14632
|
</dd>
|
|
14563
14633
|
</dl>
|
|
@@ -14576,6 +14646,7 @@ Returns matching name values and their IDs within the caller's organization. | a
|
|
|
14576
14646
|
await client.orgs.offChrtOrgData.typeaheadV1({
|
|
14577
14647
|
query: "query",
|
|
14578
14648
|
limit: 1,
|
|
14649
|
+
filter_org_type: "provider",
|
|
14579
14650
|
});
|
|
14580
14651
|
```
|
|
14581
14652
|
|
|
@@ -16555,7 +16626,7 @@ await client.shipping.drivers.getStatsV1("driver_id", {
|
|
|
16555
16626
|
<dl>
|
|
16556
16627
|
<dd>
|
|
16557
16628
|
|
|
16558
|
-
Returns matching first_name
|
|
16629
|
+
Returns matching full_name (first_name + last_name) values and their IDs within the caller's organization, excluding archived drivers. | () -> (list[DriverTypeaheadResult])
|
|
16559
16630
|
|
|
16560
16631
|
</dd>
|
|
16561
16632
|
</dl>
|
|
@@ -33037,7 +33108,7 @@ await client.tracking.sessions.terminateV1({
|
|
|
33037
33108
|
<dl>
|
|
33038
33109
|
<dd>
|
|
33039
33110
|
|
|
33040
|
-
Returns distinct device_mac_address and
|
|
33111
|
+
Returns distinct device_mac_address, off_chrt_reference_id, and flight_numbers values matching the query via case-insensitive regex, searching sessions. Use org_scope to restrict to owned, shared, or both (default). | auth: api_key | authz: min_org_role=operator | () -> (list[SessionTypeaheadResult])
|
|
33041
33112
|
|
|
33042
33113
|
</dd>
|
|
33043
33114
|
</dl>
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
4
|
-
import * as Chrt from "../../../../../../index.js";
|
|
5
|
-
/**
|
|
6
|
-
* @example
|
|
7
|
-
* {
|
|
8
|
-
* order_ids: ["order_ids"],
|
|
9
|
-
* target_currency_code: "USD"
|
|
10
|
-
* }
|
|
11
|
-
*/
|
|
12
|
-
export interface ReceivablesAcrossOrdersCurrencyConversionUpdateReq {
|
|
13
|
-
/** Units of target_currency_code per one unit of the order's sole original source currency different from the target. Target-currency items are reverted or left unchanged without applying this rate. */
|
|
14
|
-
conversion_rate?: number | null;
|
|
15
|
-
description?: string | null;
|
|
16
|
-
order_ids: string[];
|
|
17
|
-
target_currency_code: Chrt.BillingCurrencyCodeEnum1;
|
|
18
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
4
|
-
import * as Chrt from "../index.js";
|
|
5
|
-
export interface ReceivablesAcrossOrdersCurrencyConversionOrderRes {
|
|
6
|
-
converted_invoice_line_items?: Chrt.InvoiceLineItem1[];
|
|
7
|
-
failure_reason?: string | null;
|
|
8
|
-
order_id: string;
|
|
9
|
-
status: ReceivablesAcrossOrdersCurrencyConversionOrderRes.Status;
|
|
10
|
-
}
|
|
11
|
-
export declare namespace ReceivablesAcrossOrdersCurrencyConversionOrderRes {
|
|
12
|
-
type Status = "succeeded" | "failed" | "no_receivables";
|
|
13
|
-
const Status: {
|
|
14
|
-
readonly Succeeded: "succeeded";
|
|
15
|
-
readonly Failed: "failed";
|
|
16
|
-
readonly NoReceivables: "no_receivables";
|
|
17
|
-
};
|
|
18
|
-
}
|