@actual-app/api 26.1.0-nightly.20251221 → 26.1.0-nightly.20251223
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.
|
@@ -55,10 +55,16 @@ export declare class RuleError extends Error {
|
|
|
55
55
|
type: string;
|
|
56
56
|
constructor(name: string, message: string);
|
|
57
57
|
}
|
|
58
|
-
export declare function APIError(msg: string, meta?:
|
|
58
|
+
export declare function APIError(msg: string, meta?: {
|
|
59
|
+
conditionErrors: string[];
|
|
60
|
+
actionErrors: string[];
|
|
61
|
+
}): {
|
|
59
62
|
type: string;
|
|
60
63
|
message: string;
|
|
61
|
-
meta:
|
|
64
|
+
meta: {
|
|
65
|
+
conditionErrors: string[];
|
|
66
|
+
actionErrors: string[];
|
|
67
|
+
};
|
|
62
68
|
};
|
|
63
69
|
export declare function FileDownloadError(reason: string, meta?: {
|
|
64
70
|
fileId?: string;
|
|
@@ -55,7 +55,9 @@ export declare function getNumberFormat({ format, hideFraction, decimalPlaces, }
|
|
|
55
55
|
value: "comma-dot" | "dot-comma" | "space-comma" | "apostrophe-dot" | "comma-dot-in";
|
|
56
56
|
thousandsSeparator: any;
|
|
57
57
|
decimalSeparator: any;
|
|
58
|
-
formatter:
|
|
58
|
+
formatter: {
|
|
59
|
+
format: (value: number) => string;
|
|
60
|
+
};
|
|
59
61
|
};
|
|
60
62
|
/**
|
|
61
63
|
* The exact amount.
|
|
@@ -73,7 +75,9 @@ export type CurrencyAmount = string;
|
|
|
73
75
|
export type IntegerAmount = number;
|
|
74
76
|
export declare function safeNumber(value: number): number;
|
|
75
77
|
export declare function toRelaxedNumber(currencyAmount: CurrencyAmount): Amount;
|
|
76
|
-
export declare function integerToCurrency(integerAmount: IntegerAmount, formatter?:
|
|
78
|
+
export declare function integerToCurrency(integerAmount: IntegerAmount, formatter?: {
|
|
79
|
+
format: (value: number) => string;
|
|
80
|
+
}, decimalPlaces?: number): string;
|
|
77
81
|
export declare function integerToCurrencyWithDecimal(integerAmount: IntegerAmount): string;
|
|
78
82
|
export declare function amountToCurrency(amount: Amount): CurrencyAmount;
|
|
79
83
|
export declare function amountToCurrencyNoDecimal(amount: Amount): CurrencyAmount;
|
package/dist/app/bundle.api.js
CHANGED
|
@@ -9345,11 +9345,18 @@ function getNumberFormat({ format: format2 = numberFormatConfig.format, hideFrac
|
|
|
9345
9345
|
minimumFractionDigits: currentHideFraction ? 0 : 2,
|
|
9346
9346
|
maximumFractionDigits: currentHideFraction ? 0 : 2
|
|
9347
9347
|
};
|
|
9348
|
+
const intlFormatter = new Intl.NumberFormat(locale, fractionDigitsOptions);
|
|
9349
|
+
const formatter = {
|
|
9350
|
+
format: (value) => {
|
|
9351
|
+
const formatted = intlFormatter.format(value);
|
|
9352
|
+
return formatted === "-0" ? "0" : formatted;
|
|
9353
|
+
}
|
|
9354
|
+
};
|
|
9348
9355
|
return {
|
|
9349
9356
|
value: currentFormat,
|
|
9350
9357
|
thousandsSeparator,
|
|
9351
9358
|
decimalSeparator,
|
|
9352
|
-
formatter
|
|
9359
|
+
formatter
|
|
9353
9360
|
};
|
|
9354
9361
|
}
|
|
9355
9362
|
const MAX_SAFE_NUMBER = 2 ** 51 - 1;
|
|
@@ -59609,12 +59616,12 @@ async function upload() {
|
|
|
59609
59616
|
res = await fetchJSON(getServer().SYNC_SERVER + "/upload-user-file", {
|
|
59610
59617
|
method: "POST",
|
|
59611
59618
|
headers: {
|
|
59612
|
-
"Content-Length": uploadContent.length,
|
|
59619
|
+
"Content-Length": String(uploadContent.length),
|
|
59613
59620
|
"Content-Type": "application/encrypted-file",
|
|
59614
59621
|
"X-ACTUAL-TOKEN": userToken,
|
|
59615
59622
|
"X-ACTUAL-FILE-ID": cloudFileId,
|
|
59616
59623
|
"X-ACTUAL-NAME": encodeURIComponent(budgetName),
|
|
59617
|
-
"X-ACTUAL-FORMAT": 2,
|
|
59624
|
+
"X-ACTUAL-FORMAT": "2",
|
|
59618
59625
|
...uploadMeta ? { "X-ACTUAL-ENCRYPT-META": JSON.stringify(uploadMeta) } : null,
|
|
59619
59626
|
...groupId ? { "X-ACTUAL-GROUP-ID": groupId } : null
|
|
59620
59627
|
// TODO: fix me
|
package/dist/package.json
CHANGED