@chrt-inc/typescript-sdk 1.967.0 → 1.970.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 +20 -4
- package/dist/cjs/api/resources/billingNew/resources/invoiceLineItems/client/Client.js +72 -7
- package/dist/cjs/api/resources/billingNew/resources/invoiceLineItems/client/requests/InvoiceLineItemClientUpdate1.d.ts +2 -2
- package/dist/cjs/api/resources/billingNew/resources/invoiceLineItems/client/requests/InvoiceLineItemsCurrencyConversionUpdateManyReq.d.ts +18 -0
- package/dist/cjs/api/resources/billingNew/resources/invoiceLineItems/client/requests/InvoiceLineItemsCurrencyConversionUpdateManyReq.js +5 -0
- package/dist/cjs/api/resources/billingNew/resources/invoiceLineItems/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/types/InvoiceLineItem1.d.ts +1 -0
- package/dist/cjs/api/types/InvoiceLineItemCurrencyConversion1.d.ts +11 -0
- package/dist/cjs/api/types/InvoiceLineItemCurrencyConversion1.js +5 -0
- package/dist/cjs/api/types/InvoiceLineItemServerCreate1.d.ts +1 -0
- package/dist/cjs/api/types/ShippingIntegrationOrderExpanded1.d.ts +3 -1
- package/dist/cjs/api/types/ShippingIntegrationOrderStatusTimestampProvenanceEnum1.d.ts +8 -0
- package/dist/cjs/api/types/{ShippingIntegrationOrderCompletedAtProvenanceEnum1.js → ShippingIntegrationOrderStatusTimestampProvenanceEnum1.js} +2 -2
- 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 +20 -4
- package/dist/esm/api/resources/billingNew/resources/invoiceLineItems/client/Client.mjs +72 -7
- package/dist/esm/api/resources/billingNew/resources/invoiceLineItems/client/requests/InvoiceLineItemClientUpdate1.d.mts +2 -2
- package/dist/esm/api/resources/billingNew/resources/invoiceLineItems/client/requests/InvoiceLineItemsCurrencyConversionUpdateManyReq.d.mts +18 -0
- package/dist/esm/api/resources/billingNew/resources/invoiceLineItems/client/requests/InvoiceLineItemsCurrencyConversionUpdateManyReq.mjs +4 -0
- package/dist/esm/api/resources/billingNew/resources/invoiceLineItems/client/requests/index.d.mts +1 -0
- package/dist/esm/api/types/InvoiceLineItem1.d.mts +1 -0
- package/dist/esm/api/types/InvoiceLineItemCurrencyConversion1.d.mts +11 -0
- package/dist/esm/api/types/InvoiceLineItemCurrencyConversion1.mjs +4 -0
- package/dist/esm/api/types/InvoiceLineItemServerCreate1.d.mts +1 -0
- package/dist/esm/api/types/ShippingIntegrationOrderExpanded1.d.mts +3 -1
- package/dist/esm/api/types/ShippingIntegrationOrderStatusTimestampProvenanceEnum1.d.mts +8 -0
- package/dist/esm/api/types/{ShippingIntegrationOrderCompletedAtProvenanceEnum1.mjs → ShippingIntegrationOrderStatusTimestampProvenanceEnum1.mjs} +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 +69 -3
- package/dist/cjs/api/types/ShippingIntegrationOrderCompletedAtProvenanceEnum1.d.ts +0 -8
- package/dist/esm/api/types/ShippingIntegrationOrderCompletedAtProvenanceEnum1.d.mts +0 -8
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.970.0",
|
|
64
|
+
"User-Agent": "@chrt-inc/typescript-sdk/1.970.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) });
|
|
@@ -285,7 +285,23 @@ export declare class InvoiceLineItems {
|
|
|
285
285
|
recalculateTaxesV1(request: Chrt.billingNew.RecalculateOrderTaxInvoiceLineItemsReq, requestOptions?: InvoiceLineItems.RequestOptions): core.HttpResponsePromise<Chrt.InvoiceLineItem1[]>;
|
|
286
286
|
private __recalculateTaxesV1;
|
|
287
287
|
/**
|
|
288
|
-
*
|
|
288
|
+
* Applies or reverts one currency conversion on line items from their original source values and moves attached items to the matching target-currency draft invoice. | authz: allowed_org_types=[provider], min_org_role=operator | (InvoiceLineItemsCurrencyConversionUpdateManyReq) -> (list[InvoiceLineItem1])
|
|
289
|
+
*
|
|
290
|
+
* @param {Chrt.billingNew.InvoiceLineItemsCurrencyConversionUpdateManyReq} request
|
|
291
|
+
* @param {InvoiceLineItems.RequestOptions} requestOptions - Request-specific configuration.
|
|
292
|
+
*
|
|
293
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
294
|
+
*
|
|
295
|
+
* @example
|
|
296
|
+
* await client.billingNew.invoiceLineItems.updateCurrencyConversionManyV1({
|
|
297
|
+
* invoice_line_item_ids: ["invoice_line_item_ids"],
|
|
298
|
+
* target_currency_code: "USD"
|
|
299
|
+
* })
|
|
300
|
+
*/
|
|
301
|
+
updateCurrencyConversionManyV1(request: Chrt.billingNew.InvoiceLineItemsCurrencyConversionUpdateManyReq, requestOptions?: InvoiceLineItems.RequestOptions): core.HttpResponsePromise<Chrt.InvoiceLineItem1[]>;
|
|
302
|
+
private __updateCurrencyConversionManyV1;
|
|
303
|
+
/**
|
|
304
|
+
* Updates an owner-scoped line item's source fields, reapplies any existing currency conversion, and rebuilds its draft invoice when attached. | authz: allowed_org_types=[provider], min_org_role=operator | (InvoiceLineItemClientUpdate1) -> (InvoiceLineItem1)
|
|
289
305
|
*
|
|
290
306
|
* @param {string} invoiceLineItemId
|
|
291
307
|
* @param {Chrt.billingNew.InvoiceLineItemClientUpdate1} request
|
|
@@ -294,9 +310,9 @@ export declare class InvoiceLineItems {
|
|
|
294
310
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
295
311
|
*
|
|
296
312
|
* @example
|
|
297
|
-
* await client.billingNew.invoiceLineItems.
|
|
313
|
+
* await client.billingNew.invoiceLineItems.updateSourceV1("invoice_line_item_id")
|
|
298
314
|
*/
|
|
299
|
-
|
|
300
|
-
private
|
|
315
|
+
updateSourceV1(invoiceLineItemId: string, request?: Chrt.billingNew.InvoiceLineItemClientUpdate1, requestOptions?: InvoiceLineItems.RequestOptions): core.HttpResponsePromise<Chrt.InvoiceLineItem1>;
|
|
316
|
+
private __updateSourceV1;
|
|
301
317
|
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
302
318
|
}
|
|
@@ -989,7 +989,72 @@ class InvoiceLineItems {
|
|
|
989
989
|
});
|
|
990
990
|
}
|
|
991
991
|
/**
|
|
992
|
-
*
|
|
992
|
+
* Applies or reverts one currency conversion on line items from their original source values and moves attached items to the matching target-currency draft invoice. | authz: allowed_org_types=[provider], min_org_role=operator | (InvoiceLineItemsCurrencyConversionUpdateManyReq) -> (list[InvoiceLineItem1])
|
|
993
|
+
*
|
|
994
|
+
* @param {Chrt.billingNew.InvoiceLineItemsCurrencyConversionUpdateManyReq} request
|
|
995
|
+
* @param {InvoiceLineItems.RequestOptions} requestOptions - Request-specific configuration.
|
|
996
|
+
*
|
|
997
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
998
|
+
*
|
|
999
|
+
* @example
|
|
1000
|
+
* await client.billingNew.invoiceLineItems.updateCurrencyConversionManyV1({
|
|
1001
|
+
* invoice_line_item_ids: ["invoice_line_item_ids"],
|
|
1002
|
+
* target_currency_code: "USD"
|
|
1003
|
+
* })
|
|
1004
|
+
*/
|
|
1005
|
+
updateCurrencyConversionManyV1(request, requestOptions) {
|
|
1006
|
+
return core.HttpResponsePromise.fromPromise(this.__updateCurrencyConversionManyV1(request, requestOptions));
|
|
1007
|
+
}
|
|
1008
|
+
__updateCurrencyConversionManyV1(request, requestOptions) {
|
|
1009
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1010
|
+
var _a, _b, _c, _d;
|
|
1011
|
+
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);
|
|
1012
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
1013
|
+
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_many/v1"),
|
|
1014
|
+
method: "PATCH",
|
|
1015
|
+
headers: _headers,
|
|
1016
|
+
contentType: "application/json",
|
|
1017
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
1018
|
+
requestType: "json",
|
|
1019
|
+
body: request,
|
|
1020
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
1021
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
1022
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
1023
|
+
});
|
|
1024
|
+
if (_response.ok) {
|
|
1025
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
1026
|
+
}
|
|
1027
|
+
if (_response.error.reason === "status-code") {
|
|
1028
|
+
switch (_response.error.statusCode) {
|
|
1029
|
+
case 422:
|
|
1030
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
1031
|
+
default:
|
|
1032
|
+
throw new errors.ChrtError({
|
|
1033
|
+
statusCode: _response.error.statusCode,
|
|
1034
|
+
body: _response.error.body,
|
|
1035
|
+
rawResponse: _response.rawResponse,
|
|
1036
|
+
});
|
|
1037
|
+
}
|
|
1038
|
+
}
|
|
1039
|
+
switch (_response.error.reason) {
|
|
1040
|
+
case "non-json":
|
|
1041
|
+
throw new errors.ChrtError({
|
|
1042
|
+
statusCode: _response.error.statusCode,
|
|
1043
|
+
body: _response.error.rawBody,
|
|
1044
|
+
rawResponse: _response.rawResponse,
|
|
1045
|
+
});
|
|
1046
|
+
case "timeout":
|
|
1047
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling PATCH /billing_new/invoice_line_items/update_currency_conversion_many/v1.");
|
|
1048
|
+
case "unknown":
|
|
1049
|
+
throw new errors.ChrtError({
|
|
1050
|
+
message: _response.error.errorMessage,
|
|
1051
|
+
rawResponse: _response.rawResponse,
|
|
1052
|
+
});
|
|
1053
|
+
}
|
|
1054
|
+
});
|
|
1055
|
+
}
|
|
1056
|
+
/**
|
|
1057
|
+
* Updates an owner-scoped line item's source fields, reapplies any existing currency conversion, and rebuilds its draft invoice when attached. | authz: allowed_org_types=[provider], min_org_role=operator | (InvoiceLineItemClientUpdate1) -> (InvoiceLineItem1)
|
|
993
1058
|
*
|
|
994
1059
|
* @param {string} invoiceLineItemId
|
|
995
1060
|
* @param {Chrt.billingNew.InvoiceLineItemClientUpdate1} request
|
|
@@ -998,17 +1063,17 @@ class InvoiceLineItems {
|
|
|
998
1063
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
999
1064
|
*
|
|
1000
1065
|
* @example
|
|
1001
|
-
* await client.billingNew.invoiceLineItems.
|
|
1066
|
+
* await client.billingNew.invoiceLineItems.updateSourceV1("invoice_line_item_id")
|
|
1002
1067
|
*/
|
|
1003
|
-
|
|
1004
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
1068
|
+
updateSourceV1(invoiceLineItemId, request = {}, requestOptions) {
|
|
1069
|
+
return core.HttpResponsePromise.fromPromise(this.__updateSourceV1(invoiceLineItemId, request, requestOptions));
|
|
1005
1070
|
}
|
|
1006
|
-
|
|
1071
|
+
__updateSourceV1(invoiceLineItemId_1) {
|
|
1007
1072
|
return __awaiter(this, arguments, void 0, function* (invoiceLineItemId, request = {}, requestOptions) {
|
|
1008
1073
|
var _a, _b, _c, _d;
|
|
1009
1074
|
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);
|
|
1010
1075
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
1011
|
-
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/
|
|
1076
|
+
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_source/v1/${encodeURIComponent(invoiceLineItemId)}`),
|
|
1012
1077
|
method: "PATCH",
|
|
1013
1078
|
headers: _headers,
|
|
1014
1079
|
contentType: "application/json",
|
|
@@ -1042,7 +1107,7 @@ class InvoiceLineItems {
|
|
|
1042
1107
|
rawResponse: _response.rawResponse,
|
|
1043
1108
|
});
|
|
1044
1109
|
case "timeout":
|
|
1045
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling PATCH /billing_new/invoice_line_items/
|
|
1110
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling PATCH /billing_new/invoice_line_items/update_source/v1/{invoice_line_item_id}.");
|
|
1046
1111
|
case "unknown":
|
|
1047
1112
|
throw new errors.ChrtError({
|
|
1048
1113
|
message: _response.error.errorMessage,
|
|
@@ -7,13 +7,13 @@ import * as Chrt from "../../../../../../index.js";
|
|
|
7
7
|
* {}
|
|
8
8
|
*/
|
|
9
9
|
export interface InvoiceLineItemClientUpdate1 {
|
|
10
|
-
currency_code?: Chrt.BillingCurrencyCodeEnum1 | null;
|
|
11
10
|
description?: string | null;
|
|
12
11
|
export_ref__sage__item_id?: string | null;
|
|
13
12
|
export_ref__sage__item_id__set_to_None?: boolean;
|
|
14
13
|
invoice_type?: Chrt.InvoiceTypeEnum1 | null;
|
|
15
14
|
quantity?: number | null;
|
|
15
|
+
source_currency_code?: Chrt.BillingCurrencyCodeEnum1 | null;
|
|
16
|
+
source_unit_price?: number | null;
|
|
16
17
|
unit?: Chrt.InvoiceLineItemUnitEnum1 | null;
|
|
17
18
|
unit__set_to_None?: boolean;
|
|
18
|
-
unit_price?: number | null;
|
|
19
19
|
}
|
|
@@ -0,0 +1,18 @@
|
|
|
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
|
+
* invoice_line_item_ids: ["invoice_line_item_ids"],
|
|
9
|
+
* target_currency_code: "USD"
|
|
10
|
+
* }
|
|
11
|
+
*/
|
|
12
|
+
export interface InvoiceLineItemsCurrencyConversionUpdateManyReq {
|
|
13
|
+
/** Units of target_currency_code per one unit of the line items' original source currency -- their currency_conversion.source_currency_code if already converted, otherwise their current currency_code. Always relative to that original source, never to an intermediate converted currency, so conversions never compound. Omitted when target_currency_code is the original source currency, which reverts the conversion. */
|
|
14
|
+
conversion_rate?: number | null;
|
|
15
|
+
description?: string | null;
|
|
16
|
+
invoice_line_item_ids: string[];
|
|
17
|
+
target_currency_code: Chrt.BillingCurrencyCodeEnum1;
|
|
18
|
+
}
|
package/dist/cjs/api/resources/billingNew/resources/invoiceLineItems/client/requests/index.d.ts
CHANGED
|
@@ -5,4 +5,5 @@ export { type CreateInvoiceLineItemsFromLineItemsReq } from "./CreateInvoiceLine
|
|
|
5
5
|
export { type InvoiceLineItemsDeleteManyReq } from "./InvoiceLineItemsDeleteManyReq.js";
|
|
6
6
|
export { type InvoiceLineItemsListV1Request } from "./InvoiceLineItemsListV1Request.js";
|
|
7
7
|
export { type RecalculateOrderTaxInvoiceLineItemsReq } from "./RecalculateOrderTaxInvoiceLineItemsReq.js";
|
|
8
|
+
export { type InvoiceLineItemsCurrencyConversionUpdateManyReq } from "./InvoiceLineItemsCurrencyConversionUpdateManyReq.js";
|
|
8
9
|
export { type InvoiceLineItemClientUpdate1 } from "./InvoiceLineItemClientUpdate1.js";
|
|
@@ -15,6 +15,7 @@ export interface InvoiceLineItem1 {
|
|
|
15
15
|
/** Must be a string starting with `user_` */
|
|
16
16
|
created_by_user_id: string;
|
|
17
17
|
currency_code: Chrt.BillingCurrencyCodeEnum1;
|
|
18
|
+
currency_conversion?: Chrt.InvoiceLineItemCurrencyConversion1 | null;
|
|
18
19
|
description: string;
|
|
19
20
|
export_ref__sage__item_id?: string | null;
|
|
20
21
|
invoice_id?: string | null;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Chrt from "../index.js";
|
|
5
|
+
export interface InvoiceLineItemCurrencyConversion1 {
|
|
6
|
+
/** Units of the target currency per one unit of source_currency_code. unit_price = source_unit_price * conversion_rate. */
|
|
7
|
+
conversion_rate: number;
|
|
8
|
+
description?: string | null;
|
|
9
|
+
source_currency_code: Chrt.BillingCurrencyCodeEnum1;
|
|
10
|
+
source_unit_price: number;
|
|
11
|
+
}
|
|
@@ -14,6 +14,7 @@ export interface InvoiceLineItemServerCreate1 {
|
|
|
14
14
|
/** Must be a string starting with `user_` */
|
|
15
15
|
created_by_user_id: string;
|
|
16
16
|
currency_code: Chrt.BillingCurrencyCodeEnum1;
|
|
17
|
+
currency_conversion?: Chrt.InvoiceLineItemCurrencyConversion1 | null;
|
|
17
18
|
description: string;
|
|
18
19
|
export_ref__sage__item_id?: string | null;
|
|
19
20
|
invoice_id?: string | null;
|
|
@@ -4,10 +4,12 @@
|
|
|
4
4
|
import * as Chrt from "../index.js";
|
|
5
5
|
export interface ShippingIntegrationOrderExpanded1 {
|
|
6
6
|
_id: string;
|
|
7
|
-
completed_at_provenance?: Chrt.
|
|
7
|
+
completed_at_provenance?: Chrt.ShippingIntegrationOrderStatusTimestampProvenanceEnum1 | null;
|
|
8
8
|
completed_at_timestamp?: string | null;
|
|
9
9
|
destination?: Chrt.ShippingIntegrationOrderPlace1 | null;
|
|
10
10
|
first_mirrored_at_timestamp: string;
|
|
11
|
+
in_progress_at_provenance?: Chrt.ShippingIntegrationOrderStatusTimestampProvenanceEnum1 | null;
|
|
12
|
+
in_progress_at_timestamp?: string | null;
|
|
11
13
|
integration_order_id: string;
|
|
12
14
|
last_mirrored_at_timestamp: string;
|
|
13
15
|
ordered_at_timestamp?: string | null;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
export type ShippingIntegrationOrderStatusTimestampProvenanceEnum1 = "reported" | "derived";
|
|
5
|
+
export declare const ShippingIntegrationOrderStatusTimestampProvenanceEnum1: {
|
|
6
|
+
readonly Reported: "reported";
|
|
7
|
+
readonly Derived: "derived";
|
|
8
|
+
};
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
* This file was auto-generated by Fern from our API Definition.
|
|
4
4
|
*/
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
7
|
-
exports.
|
|
6
|
+
exports.ShippingIntegrationOrderStatusTimestampProvenanceEnum1 = void 0;
|
|
7
|
+
exports.ShippingIntegrationOrderStatusTimestampProvenanceEnum1 = {
|
|
8
8
|
Reported: "reported",
|
|
9
9
|
Derived: "derived",
|
|
10
10
|
};
|
|
@@ -262,6 +262,7 @@ export * from "./InvoiceLineItem1.js";
|
|
|
262
262
|
export * from "./InvoiceLineItemAmountTransformation1.js";
|
|
263
263
|
export * from "./InvoiceLineItemAmountTransformationTypeEnum1.js";
|
|
264
264
|
export * from "./InvoiceLineItemClientCreate1.js";
|
|
265
|
+
export * from "./InvoiceLineItemCurrencyConversion1.js";
|
|
265
266
|
export * from "./InvoiceLineItemExpandedListItem.js";
|
|
266
267
|
export * from "./InvoiceLineItemExpandedRes.js";
|
|
267
268
|
export * from "./InvoiceLineItemListRes.js";
|
|
@@ -476,7 +477,6 @@ export * from "./ShippingIntegrationConnection.js";
|
|
|
476
477
|
export * from "./ShippingIntegrationConnectionListRes.js";
|
|
477
478
|
export * from "./ShippingIntegrationIntegrationExecutor.js";
|
|
478
479
|
export * from "./ShippingIntegrationIntegrationExecutorListRes.js";
|
|
479
|
-
export * from "./ShippingIntegrationOrderCompletedAtProvenanceEnum1.js";
|
|
480
480
|
export * from "./ShippingIntegrationOrderExpanded1.js";
|
|
481
481
|
export * from "./ShippingIntegrationOrderListRes.js";
|
|
482
482
|
export * from "./ShippingIntegrationOrderPlace1.js";
|
|
@@ -487,6 +487,7 @@ export * from "./ShippingIntegrationOrderStatusChangedRes.js";
|
|
|
487
487
|
export * from "./ShippingIntegrationOrderStatusChangedWebhookPayload.js";
|
|
488
488
|
export * from "./ShippingIntegrationOrderStatusEnum1.js";
|
|
489
489
|
export * from "./ShippingIntegrationOrderStatusSummaryRes.js";
|
|
490
|
+
export * from "./ShippingIntegrationOrderStatusTimestampProvenanceEnum1.js";
|
|
490
491
|
export * from "./ShippingIntegrationOrderTypeaheadFieldEnum.js";
|
|
491
492
|
export * from "./ShippingIntegrationOrderTypeaheadResult.js";
|
|
492
493
|
export * from "./ShippingOrderCancelledWebhookPayload.js";
|
|
@@ -278,6 +278,7 @@ __exportStar(require("./InvoiceLineItem1.js"), exports);
|
|
|
278
278
|
__exportStar(require("./InvoiceLineItemAmountTransformation1.js"), exports);
|
|
279
279
|
__exportStar(require("./InvoiceLineItemAmountTransformationTypeEnum1.js"), exports);
|
|
280
280
|
__exportStar(require("./InvoiceLineItemClientCreate1.js"), exports);
|
|
281
|
+
__exportStar(require("./InvoiceLineItemCurrencyConversion1.js"), exports);
|
|
281
282
|
__exportStar(require("./InvoiceLineItemExpandedListItem.js"), exports);
|
|
282
283
|
__exportStar(require("./InvoiceLineItemExpandedRes.js"), exports);
|
|
283
284
|
__exportStar(require("./InvoiceLineItemListRes.js"), exports);
|
|
@@ -492,7 +493,6 @@ __exportStar(require("./ShippingIntegrationConnection.js"), exports);
|
|
|
492
493
|
__exportStar(require("./ShippingIntegrationConnectionListRes.js"), exports);
|
|
493
494
|
__exportStar(require("./ShippingIntegrationIntegrationExecutor.js"), exports);
|
|
494
495
|
__exportStar(require("./ShippingIntegrationIntegrationExecutorListRes.js"), exports);
|
|
495
|
-
__exportStar(require("./ShippingIntegrationOrderCompletedAtProvenanceEnum1.js"), exports);
|
|
496
496
|
__exportStar(require("./ShippingIntegrationOrderExpanded1.js"), exports);
|
|
497
497
|
__exportStar(require("./ShippingIntegrationOrderListRes.js"), exports);
|
|
498
498
|
__exportStar(require("./ShippingIntegrationOrderPlace1.js"), exports);
|
|
@@ -503,6 +503,7 @@ __exportStar(require("./ShippingIntegrationOrderStatusChangedRes.js"), exports);
|
|
|
503
503
|
__exportStar(require("./ShippingIntegrationOrderStatusChangedWebhookPayload.js"), exports);
|
|
504
504
|
__exportStar(require("./ShippingIntegrationOrderStatusEnum1.js"), exports);
|
|
505
505
|
__exportStar(require("./ShippingIntegrationOrderStatusSummaryRes.js"), exports);
|
|
506
|
+
__exportStar(require("./ShippingIntegrationOrderStatusTimestampProvenanceEnum1.js"), exports);
|
|
506
507
|
__exportStar(require("./ShippingIntegrationOrderTypeaheadFieldEnum.js"), exports);
|
|
507
508
|
__exportStar(require("./ShippingIntegrationOrderTypeaheadResult.js"), exports);
|
|
508
509
|
__exportStar(require("./ShippingOrderCancelledWebhookPayload.js"), exports);
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "1.
|
|
1
|
+
export declare const SDK_VERSION = "1.970.0";
|
package/dist/cjs/version.js
CHANGED
package/dist/esm/Client.mjs
CHANGED
|
@@ -24,8 +24,8 @@ export class ChrtClient {
|
|
|
24
24
|
this._options = Object.assign(Object.assign({}, _options), { headers: mergeHeaders({
|
|
25
25
|
"X-Fern-Language": "JavaScript",
|
|
26
26
|
"X-Fern-SDK-Name": "@chrt-inc/typescript-sdk",
|
|
27
|
-
"X-Fern-SDK-Version": "1.
|
|
28
|
-
"User-Agent": "@chrt-inc/typescript-sdk/1.
|
|
27
|
+
"X-Fern-SDK-Version": "1.970.0",
|
|
28
|
+
"User-Agent": "@chrt-inc/typescript-sdk/1.970.0",
|
|
29
29
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
30
30
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
31
31
|
}, _options === null || _options === void 0 ? void 0 : _options.headers) });
|
|
@@ -285,7 +285,23 @@ export declare class InvoiceLineItems {
|
|
|
285
285
|
recalculateTaxesV1(request: Chrt.billingNew.RecalculateOrderTaxInvoiceLineItemsReq, requestOptions?: InvoiceLineItems.RequestOptions): core.HttpResponsePromise<Chrt.InvoiceLineItem1[]>;
|
|
286
286
|
private __recalculateTaxesV1;
|
|
287
287
|
/**
|
|
288
|
-
*
|
|
288
|
+
* Applies or reverts one currency conversion on line items from their original source values and moves attached items to the matching target-currency draft invoice. | authz: allowed_org_types=[provider], min_org_role=operator | (InvoiceLineItemsCurrencyConversionUpdateManyReq) -> (list[InvoiceLineItem1])
|
|
289
|
+
*
|
|
290
|
+
* @param {Chrt.billingNew.InvoiceLineItemsCurrencyConversionUpdateManyReq} request
|
|
291
|
+
* @param {InvoiceLineItems.RequestOptions} requestOptions - Request-specific configuration.
|
|
292
|
+
*
|
|
293
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
294
|
+
*
|
|
295
|
+
* @example
|
|
296
|
+
* await client.billingNew.invoiceLineItems.updateCurrencyConversionManyV1({
|
|
297
|
+
* invoice_line_item_ids: ["invoice_line_item_ids"],
|
|
298
|
+
* target_currency_code: "USD"
|
|
299
|
+
* })
|
|
300
|
+
*/
|
|
301
|
+
updateCurrencyConversionManyV1(request: Chrt.billingNew.InvoiceLineItemsCurrencyConversionUpdateManyReq, requestOptions?: InvoiceLineItems.RequestOptions): core.HttpResponsePromise<Chrt.InvoiceLineItem1[]>;
|
|
302
|
+
private __updateCurrencyConversionManyV1;
|
|
303
|
+
/**
|
|
304
|
+
* Updates an owner-scoped line item's source fields, reapplies any existing currency conversion, and rebuilds its draft invoice when attached. | authz: allowed_org_types=[provider], min_org_role=operator | (InvoiceLineItemClientUpdate1) -> (InvoiceLineItem1)
|
|
289
305
|
*
|
|
290
306
|
* @param {string} invoiceLineItemId
|
|
291
307
|
* @param {Chrt.billingNew.InvoiceLineItemClientUpdate1} request
|
|
@@ -294,9 +310,9 @@ export declare class InvoiceLineItems {
|
|
|
294
310
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
295
311
|
*
|
|
296
312
|
* @example
|
|
297
|
-
* await client.billingNew.invoiceLineItems.
|
|
313
|
+
* await client.billingNew.invoiceLineItems.updateSourceV1("invoice_line_item_id")
|
|
298
314
|
*/
|
|
299
|
-
|
|
300
|
-
private
|
|
315
|
+
updateSourceV1(invoiceLineItemId: string, request?: Chrt.billingNew.InvoiceLineItemClientUpdate1, requestOptions?: InvoiceLineItems.RequestOptions): core.HttpResponsePromise<Chrt.InvoiceLineItem1>;
|
|
316
|
+
private __updateSourceV1;
|
|
301
317
|
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
302
318
|
}
|
|
@@ -953,7 +953,72 @@ export class InvoiceLineItems {
|
|
|
953
953
|
});
|
|
954
954
|
}
|
|
955
955
|
/**
|
|
956
|
-
*
|
|
956
|
+
* Applies or reverts one currency conversion on line items from their original source values and moves attached items to the matching target-currency draft invoice. | authz: allowed_org_types=[provider], min_org_role=operator | (InvoiceLineItemsCurrencyConversionUpdateManyReq) -> (list[InvoiceLineItem1])
|
|
957
|
+
*
|
|
958
|
+
* @param {Chrt.billingNew.InvoiceLineItemsCurrencyConversionUpdateManyReq} request
|
|
959
|
+
* @param {InvoiceLineItems.RequestOptions} requestOptions - Request-specific configuration.
|
|
960
|
+
*
|
|
961
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
962
|
+
*
|
|
963
|
+
* @example
|
|
964
|
+
* await client.billingNew.invoiceLineItems.updateCurrencyConversionManyV1({
|
|
965
|
+
* invoice_line_item_ids: ["invoice_line_item_ids"],
|
|
966
|
+
* target_currency_code: "USD"
|
|
967
|
+
* })
|
|
968
|
+
*/
|
|
969
|
+
updateCurrencyConversionManyV1(request, requestOptions) {
|
|
970
|
+
return core.HttpResponsePromise.fromPromise(this.__updateCurrencyConversionManyV1(request, requestOptions));
|
|
971
|
+
}
|
|
972
|
+
__updateCurrencyConversionManyV1(request, requestOptions) {
|
|
973
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
974
|
+
var _a, _b, _c, _d;
|
|
975
|
+
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);
|
|
976
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
977
|
+
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_many/v1"),
|
|
978
|
+
method: "PATCH",
|
|
979
|
+
headers: _headers,
|
|
980
|
+
contentType: "application/json",
|
|
981
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
982
|
+
requestType: "json",
|
|
983
|
+
body: request,
|
|
984
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
985
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
986
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
987
|
+
});
|
|
988
|
+
if (_response.ok) {
|
|
989
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
990
|
+
}
|
|
991
|
+
if (_response.error.reason === "status-code") {
|
|
992
|
+
switch (_response.error.statusCode) {
|
|
993
|
+
case 422:
|
|
994
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
995
|
+
default:
|
|
996
|
+
throw new errors.ChrtError({
|
|
997
|
+
statusCode: _response.error.statusCode,
|
|
998
|
+
body: _response.error.body,
|
|
999
|
+
rawResponse: _response.rawResponse,
|
|
1000
|
+
});
|
|
1001
|
+
}
|
|
1002
|
+
}
|
|
1003
|
+
switch (_response.error.reason) {
|
|
1004
|
+
case "non-json":
|
|
1005
|
+
throw new errors.ChrtError({
|
|
1006
|
+
statusCode: _response.error.statusCode,
|
|
1007
|
+
body: _response.error.rawBody,
|
|
1008
|
+
rawResponse: _response.rawResponse,
|
|
1009
|
+
});
|
|
1010
|
+
case "timeout":
|
|
1011
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling PATCH /billing_new/invoice_line_items/update_currency_conversion_many/v1.");
|
|
1012
|
+
case "unknown":
|
|
1013
|
+
throw new errors.ChrtError({
|
|
1014
|
+
message: _response.error.errorMessage,
|
|
1015
|
+
rawResponse: _response.rawResponse,
|
|
1016
|
+
});
|
|
1017
|
+
}
|
|
1018
|
+
});
|
|
1019
|
+
}
|
|
1020
|
+
/**
|
|
1021
|
+
* Updates an owner-scoped line item's source fields, reapplies any existing currency conversion, and rebuilds its draft invoice when attached. | authz: allowed_org_types=[provider], min_org_role=operator | (InvoiceLineItemClientUpdate1) -> (InvoiceLineItem1)
|
|
957
1022
|
*
|
|
958
1023
|
* @param {string} invoiceLineItemId
|
|
959
1024
|
* @param {Chrt.billingNew.InvoiceLineItemClientUpdate1} request
|
|
@@ -962,17 +1027,17 @@ export class InvoiceLineItems {
|
|
|
962
1027
|
* @throws {@link Chrt.UnprocessableEntityError}
|
|
963
1028
|
*
|
|
964
1029
|
* @example
|
|
965
|
-
* await client.billingNew.invoiceLineItems.
|
|
1030
|
+
* await client.billingNew.invoiceLineItems.updateSourceV1("invoice_line_item_id")
|
|
966
1031
|
*/
|
|
967
|
-
|
|
968
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
1032
|
+
updateSourceV1(invoiceLineItemId, request = {}, requestOptions) {
|
|
1033
|
+
return core.HttpResponsePromise.fromPromise(this.__updateSourceV1(invoiceLineItemId, request, requestOptions));
|
|
969
1034
|
}
|
|
970
|
-
|
|
1035
|
+
__updateSourceV1(invoiceLineItemId_1) {
|
|
971
1036
|
return __awaiter(this, arguments, void 0, function* (invoiceLineItemId, request = {}, requestOptions) {
|
|
972
1037
|
var _a, _b, _c, _d;
|
|
973
1038
|
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);
|
|
974
1039
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
975
|
-
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/
|
|
1040
|
+
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_source/v1/${encodeURIComponent(invoiceLineItemId)}`),
|
|
976
1041
|
method: "PATCH",
|
|
977
1042
|
headers: _headers,
|
|
978
1043
|
contentType: "application/json",
|
|
@@ -1006,7 +1071,7 @@ export class InvoiceLineItems {
|
|
|
1006
1071
|
rawResponse: _response.rawResponse,
|
|
1007
1072
|
});
|
|
1008
1073
|
case "timeout":
|
|
1009
|
-
throw new errors.ChrtTimeoutError("Timeout exceeded when calling PATCH /billing_new/invoice_line_items/
|
|
1074
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling PATCH /billing_new/invoice_line_items/update_source/v1/{invoice_line_item_id}.");
|
|
1010
1075
|
case "unknown":
|
|
1011
1076
|
throw new errors.ChrtError({
|
|
1012
1077
|
message: _response.error.errorMessage,
|
|
@@ -7,13 +7,13 @@ import * as Chrt from "../../../../../../index.mjs";
|
|
|
7
7
|
* {}
|
|
8
8
|
*/
|
|
9
9
|
export interface InvoiceLineItemClientUpdate1 {
|
|
10
|
-
currency_code?: Chrt.BillingCurrencyCodeEnum1 | null;
|
|
11
10
|
description?: string | null;
|
|
12
11
|
export_ref__sage__item_id?: string | null;
|
|
13
12
|
export_ref__sage__item_id__set_to_None?: boolean;
|
|
14
13
|
invoice_type?: Chrt.InvoiceTypeEnum1 | null;
|
|
15
14
|
quantity?: number | null;
|
|
15
|
+
source_currency_code?: Chrt.BillingCurrencyCodeEnum1 | null;
|
|
16
|
+
source_unit_price?: number | null;
|
|
16
17
|
unit?: Chrt.InvoiceLineItemUnitEnum1 | null;
|
|
17
18
|
unit__set_to_None?: boolean;
|
|
18
|
-
unit_price?: number | null;
|
|
19
19
|
}
|
|
@@ -0,0 +1,18 @@
|
|
|
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_line_item_ids: ["invoice_line_item_ids"],
|
|
9
|
+
* target_currency_code: "USD"
|
|
10
|
+
* }
|
|
11
|
+
*/
|
|
12
|
+
export interface InvoiceLineItemsCurrencyConversionUpdateManyReq {
|
|
13
|
+
/** Units of target_currency_code per one unit of the line items' original source currency -- their currency_conversion.source_currency_code if already converted, otherwise their current currency_code. Always relative to that original source, never to an intermediate converted currency, so conversions never compound. Omitted when target_currency_code is the original source currency, which reverts the conversion. */
|
|
14
|
+
conversion_rate?: number | null;
|
|
15
|
+
description?: string | null;
|
|
16
|
+
invoice_line_item_ids: string[];
|
|
17
|
+
target_currency_code: Chrt.BillingCurrencyCodeEnum1;
|
|
18
|
+
}
|
package/dist/esm/api/resources/billingNew/resources/invoiceLineItems/client/requests/index.d.mts
CHANGED
|
@@ -5,4 +5,5 @@ export { type CreateInvoiceLineItemsFromLineItemsReq } from "./CreateInvoiceLine
|
|
|
5
5
|
export { type InvoiceLineItemsDeleteManyReq } from "./InvoiceLineItemsDeleteManyReq.mjs";
|
|
6
6
|
export { type InvoiceLineItemsListV1Request } from "./InvoiceLineItemsListV1Request.mjs";
|
|
7
7
|
export { type RecalculateOrderTaxInvoiceLineItemsReq } from "./RecalculateOrderTaxInvoiceLineItemsReq.mjs";
|
|
8
|
+
export { type InvoiceLineItemsCurrencyConversionUpdateManyReq } from "./InvoiceLineItemsCurrencyConversionUpdateManyReq.mjs";
|
|
8
9
|
export { type InvoiceLineItemClientUpdate1 } from "./InvoiceLineItemClientUpdate1.mjs";
|
|
@@ -15,6 +15,7 @@ export interface InvoiceLineItem1 {
|
|
|
15
15
|
/** Must be a string starting with `user_` */
|
|
16
16
|
created_by_user_id: string;
|
|
17
17
|
currency_code: Chrt.BillingCurrencyCodeEnum1;
|
|
18
|
+
currency_conversion?: Chrt.InvoiceLineItemCurrencyConversion1 | null;
|
|
18
19
|
description: string;
|
|
19
20
|
export_ref__sage__item_id?: string | null;
|
|
20
21
|
invoice_id?: string | null;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Chrt from "../index.mjs";
|
|
5
|
+
export interface InvoiceLineItemCurrencyConversion1 {
|
|
6
|
+
/** Units of the target currency per one unit of source_currency_code. unit_price = source_unit_price * conversion_rate. */
|
|
7
|
+
conversion_rate: number;
|
|
8
|
+
description?: string | null;
|
|
9
|
+
source_currency_code: Chrt.BillingCurrencyCodeEnum1;
|
|
10
|
+
source_unit_price: number;
|
|
11
|
+
}
|
|
@@ -14,6 +14,7 @@ export interface InvoiceLineItemServerCreate1 {
|
|
|
14
14
|
/** Must be a string starting with `user_` */
|
|
15
15
|
created_by_user_id: string;
|
|
16
16
|
currency_code: Chrt.BillingCurrencyCodeEnum1;
|
|
17
|
+
currency_conversion?: Chrt.InvoiceLineItemCurrencyConversion1 | null;
|
|
17
18
|
description: string;
|
|
18
19
|
export_ref__sage__item_id?: string | null;
|
|
19
20
|
invoice_id?: string | null;
|
|
@@ -4,10 +4,12 @@
|
|
|
4
4
|
import * as Chrt from "../index.mjs";
|
|
5
5
|
export interface ShippingIntegrationOrderExpanded1 {
|
|
6
6
|
_id: string;
|
|
7
|
-
completed_at_provenance?: Chrt.
|
|
7
|
+
completed_at_provenance?: Chrt.ShippingIntegrationOrderStatusTimestampProvenanceEnum1 | null;
|
|
8
8
|
completed_at_timestamp?: string | null;
|
|
9
9
|
destination?: Chrt.ShippingIntegrationOrderPlace1 | null;
|
|
10
10
|
first_mirrored_at_timestamp: string;
|
|
11
|
+
in_progress_at_provenance?: Chrt.ShippingIntegrationOrderStatusTimestampProvenanceEnum1 | null;
|
|
12
|
+
in_progress_at_timestamp?: string | null;
|
|
11
13
|
integration_order_id: string;
|
|
12
14
|
last_mirrored_at_timestamp: string;
|
|
13
15
|
ordered_at_timestamp?: string | null;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
export type ShippingIntegrationOrderStatusTimestampProvenanceEnum1 = "reported" | "derived";
|
|
5
|
+
export declare const ShippingIntegrationOrderStatusTimestampProvenanceEnum1: {
|
|
6
|
+
readonly Reported: "reported";
|
|
7
|
+
readonly Derived: "derived";
|
|
8
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
-
export const
|
|
4
|
+
export const ShippingIntegrationOrderStatusTimestampProvenanceEnum1 = {
|
|
5
5
|
Reported: "reported",
|
|
6
6
|
Derived: "derived",
|
|
7
7
|
};
|
|
@@ -262,6 +262,7 @@ export * from "./InvoiceLineItem1.mjs";
|
|
|
262
262
|
export * from "./InvoiceLineItemAmountTransformation1.mjs";
|
|
263
263
|
export * from "./InvoiceLineItemAmountTransformationTypeEnum1.mjs";
|
|
264
264
|
export * from "./InvoiceLineItemClientCreate1.mjs";
|
|
265
|
+
export * from "./InvoiceLineItemCurrencyConversion1.mjs";
|
|
265
266
|
export * from "./InvoiceLineItemExpandedListItem.mjs";
|
|
266
267
|
export * from "./InvoiceLineItemExpandedRes.mjs";
|
|
267
268
|
export * from "./InvoiceLineItemListRes.mjs";
|
|
@@ -476,7 +477,6 @@ export * from "./ShippingIntegrationConnection.mjs";
|
|
|
476
477
|
export * from "./ShippingIntegrationConnectionListRes.mjs";
|
|
477
478
|
export * from "./ShippingIntegrationIntegrationExecutor.mjs";
|
|
478
479
|
export * from "./ShippingIntegrationIntegrationExecutorListRes.mjs";
|
|
479
|
-
export * from "./ShippingIntegrationOrderCompletedAtProvenanceEnum1.mjs";
|
|
480
480
|
export * from "./ShippingIntegrationOrderExpanded1.mjs";
|
|
481
481
|
export * from "./ShippingIntegrationOrderListRes.mjs";
|
|
482
482
|
export * from "./ShippingIntegrationOrderPlace1.mjs";
|
|
@@ -487,6 +487,7 @@ export * from "./ShippingIntegrationOrderStatusChangedRes.mjs";
|
|
|
487
487
|
export * from "./ShippingIntegrationOrderStatusChangedWebhookPayload.mjs";
|
|
488
488
|
export * from "./ShippingIntegrationOrderStatusEnum1.mjs";
|
|
489
489
|
export * from "./ShippingIntegrationOrderStatusSummaryRes.mjs";
|
|
490
|
+
export * from "./ShippingIntegrationOrderStatusTimestampProvenanceEnum1.mjs";
|
|
490
491
|
export * from "./ShippingIntegrationOrderTypeaheadFieldEnum.mjs";
|
|
491
492
|
export * from "./ShippingIntegrationOrderTypeaheadResult.mjs";
|
|
492
493
|
export * from "./ShippingOrderCancelledWebhookPayload.mjs";
|
|
@@ -262,6 +262,7 @@ export * from "./InvoiceLineItem1.mjs";
|
|
|
262
262
|
export * from "./InvoiceLineItemAmountTransformation1.mjs";
|
|
263
263
|
export * from "./InvoiceLineItemAmountTransformationTypeEnum1.mjs";
|
|
264
264
|
export * from "./InvoiceLineItemClientCreate1.mjs";
|
|
265
|
+
export * from "./InvoiceLineItemCurrencyConversion1.mjs";
|
|
265
266
|
export * from "./InvoiceLineItemExpandedListItem.mjs";
|
|
266
267
|
export * from "./InvoiceLineItemExpandedRes.mjs";
|
|
267
268
|
export * from "./InvoiceLineItemListRes.mjs";
|
|
@@ -476,7 +477,6 @@ export * from "./ShippingIntegrationConnection.mjs";
|
|
|
476
477
|
export * from "./ShippingIntegrationConnectionListRes.mjs";
|
|
477
478
|
export * from "./ShippingIntegrationIntegrationExecutor.mjs";
|
|
478
479
|
export * from "./ShippingIntegrationIntegrationExecutorListRes.mjs";
|
|
479
|
-
export * from "./ShippingIntegrationOrderCompletedAtProvenanceEnum1.mjs";
|
|
480
480
|
export * from "./ShippingIntegrationOrderExpanded1.mjs";
|
|
481
481
|
export * from "./ShippingIntegrationOrderListRes.mjs";
|
|
482
482
|
export * from "./ShippingIntegrationOrderPlace1.mjs";
|
|
@@ -487,6 +487,7 @@ export * from "./ShippingIntegrationOrderStatusChangedRes.mjs";
|
|
|
487
487
|
export * from "./ShippingIntegrationOrderStatusChangedWebhookPayload.mjs";
|
|
488
488
|
export * from "./ShippingIntegrationOrderStatusEnum1.mjs";
|
|
489
489
|
export * from "./ShippingIntegrationOrderStatusSummaryRes.mjs";
|
|
490
|
+
export * from "./ShippingIntegrationOrderStatusTimestampProvenanceEnum1.mjs";
|
|
490
491
|
export * from "./ShippingIntegrationOrderTypeaheadFieldEnum.mjs";
|
|
491
492
|
export * from "./ShippingIntegrationOrderTypeaheadResult.mjs";
|
|
492
493
|
export * from "./ShippingOrderCancelledWebhookPayload.mjs";
|
package/dist/esm/version.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "1.
|
|
1
|
+
export declare const SDK_VERSION = "1.970.0";
|
package/dist/esm/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "1.
|
|
1
|
+
export const SDK_VERSION = "1.970.0";
|
package/package.json
CHANGED
package/reference.md
CHANGED
|
@@ -2741,7 +2741,7 @@ await client.billingNew.invoiceLineItems.recalculateTaxesV1({
|
|
|
2741
2741
|
</dl>
|
|
2742
2742
|
</details>
|
|
2743
2743
|
|
|
2744
|
-
<details><summary><code>client.billingNew.invoiceLineItems.<a href="/src/api/resources/billingNew/resources/invoiceLineItems/client/Client.ts">
|
|
2744
|
+
<details><summary><code>client.billingNew.invoiceLineItems.<a href="/src/api/resources/billingNew/resources/invoiceLineItems/client/Client.ts">updateCurrencyConversionManyV1</a>({ ...params }) -> Chrt.InvoiceLineItem1[]</code></summary>
|
|
2745
2745
|
<dl>
|
|
2746
2746
|
<dd>
|
|
2747
2747
|
|
|
@@ -2753,7 +2753,7 @@ await client.billingNew.invoiceLineItems.recalculateTaxesV1({
|
|
|
2753
2753
|
<dl>
|
|
2754
2754
|
<dd>
|
|
2755
2755
|
|
|
2756
|
-
|
|
2756
|
+
Applies or reverts one currency conversion on line items from their original source values and moves attached items to the matching target-currency draft invoice. | authz: allowed_org_types=[provider], min_org_role=operator | (InvoiceLineItemsCurrencyConversionUpdateManyReq) -> (list[InvoiceLineItem1])
|
|
2757
2757
|
|
|
2758
2758
|
</dd>
|
|
2759
2759
|
</dl>
|
|
@@ -2769,7 +2769,73 @@ Updates an owner-scoped line item and rebuilds its draft invoice when attached.
|
|
|
2769
2769
|
<dd>
|
|
2770
2770
|
|
|
2771
2771
|
```typescript
|
|
2772
|
-
await client.billingNew.invoiceLineItems.
|
|
2772
|
+
await client.billingNew.invoiceLineItems.updateCurrencyConversionManyV1({
|
|
2773
|
+
invoice_line_item_ids: ["invoice_line_item_ids"],
|
|
2774
|
+
target_currency_code: "USD",
|
|
2775
|
+
});
|
|
2776
|
+
```
|
|
2777
|
+
|
|
2778
|
+
</dd>
|
|
2779
|
+
</dl>
|
|
2780
|
+
</dd>
|
|
2781
|
+
</dl>
|
|
2782
|
+
|
|
2783
|
+
#### ⚙️ Parameters
|
|
2784
|
+
|
|
2785
|
+
<dl>
|
|
2786
|
+
<dd>
|
|
2787
|
+
|
|
2788
|
+
<dl>
|
|
2789
|
+
<dd>
|
|
2790
|
+
|
|
2791
|
+
**request:** `Chrt.billingNew.InvoiceLineItemsCurrencyConversionUpdateManyReq`
|
|
2792
|
+
|
|
2793
|
+
</dd>
|
|
2794
|
+
</dl>
|
|
2795
|
+
|
|
2796
|
+
<dl>
|
|
2797
|
+
<dd>
|
|
2798
|
+
|
|
2799
|
+
**requestOptions:** `InvoiceLineItems.RequestOptions`
|
|
2800
|
+
|
|
2801
|
+
</dd>
|
|
2802
|
+
</dl>
|
|
2803
|
+
</dd>
|
|
2804
|
+
</dl>
|
|
2805
|
+
|
|
2806
|
+
</dd>
|
|
2807
|
+
</dl>
|
|
2808
|
+
</details>
|
|
2809
|
+
|
|
2810
|
+
<details><summary><code>client.billingNew.invoiceLineItems.<a href="/src/api/resources/billingNew/resources/invoiceLineItems/client/Client.ts">updateSourceV1</a>(invoiceLineItemId, { ...params }) -> Chrt.InvoiceLineItem1</code></summary>
|
|
2811
|
+
<dl>
|
|
2812
|
+
<dd>
|
|
2813
|
+
|
|
2814
|
+
#### 📝 Description
|
|
2815
|
+
|
|
2816
|
+
<dl>
|
|
2817
|
+
<dd>
|
|
2818
|
+
|
|
2819
|
+
<dl>
|
|
2820
|
+
<dd>
|
|
2821
|
+
|
|
2822
|
+
Updates an owner-scoped line item's source fields, reapplies any existing currency conversion, and rebuilds its draft invoice when attached. | authz: allowed_org_types=[provider], min_org_role=operator | (InvoiceLineItemClientUpdate1) -> (InvoiceLineItem1)
|
|
2823
|
+
|
|
2824
|
+
</dd>
|
|
2825
|
+
</dl>
|
|
2826
|
+
</dd>
|
|
2827
|
+
</dl>
|
|
2828
|
+
|
|
2829
|
+
#### 🔌 Usage
|
|
2830
|
+
|
|
2831
|
+
<dl>
|
|
2832
|
+
<dd>
|
|
2833
|
+
|
|
2834
|
+
<dl>
|
|
2835
|
+
<dd>
|
|
2836
|
+
|
|
2837
|
+
```typescript
|
|
2838
|
+
await client.billingNew.invoiceLineItems.updateSourceV1("invoice_line_item_id");
|
|
2773
2839
|
```
|
|
2774
2840
|
|
|
2775
2841
|
</dd>
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
4
|
-
export type ShippingIntegrationOrderCompletedAtProvenanceEnum1 = "reported" | "derived";
|
|
5
|
-
export declare const ShippingIntegrationOrderCompletedAtProvenanceEnum1: {
|
|
6
|
-
readonly Reported: "reported";
|
|
7
|
-
readonly Derived: "derived";
|
|
8
|
-
};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
4
|
-
export type ShippingIntegrationOrderCompletedAtProvenanceEnum1 = "reported" | "derived";
|
|
5
|
-
export declare const ShippingIntegrationOrderCompletedAtProvenanceEnum1: {
|
|
6
|
-
readonly Reported: "reported";
|
|
7
|
-
readonly Derived: "derived";
|
|
8
|
-
};
|