@vindentech/api-client 2.0.0-next.4 → 2.0.0-next.5
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/generated/analytics/analytics.d.ts +1 -1
- package/dist/generated/analytics/analytics.js +1 -1
- package/dist/generated/index.schemas.d.ts +22 -1
- package/dist/generated/index.schemas.d.ts.map +1 -1
- package/dist/generated/index.schemas.js +5 -0
- package/dist/generated/index.schemas.js.map +1 -1
- package/package.json +1 -1
|
@@ -17,7 +17,7 @@ export type analyticsControllerOverviewV1ResponseSuccess = (analyticsControllerO
|
|
|
17
17
|
export type analyticsControllerOverviewV1Response = (analyticsControllerOverviewV1ResponseSuccess);
|
|
18
18
|
export declare const getAnalyticsControllerOverviewV1Url: (params?: AnalyticsControllerOverviewV1Params) => string;
|
|
19
19
|
/**
|
|
20
|
-
* Point-in-time figures (`pointInTime`) are read at `asOf`, at the end of the month before, and on the same day a month earlier (clamped: 31 Oct → 30 Sep). Figures that add up over a period (`periods`) are read month-to-date, over the same days of last month, over the last full month and over the month before. Every month is a calendar month in the tenant's billing calendar, and money is per currency, never summed across currencies. Measured volume reads low until a provider-run warehouse reports its measurements, which is why estimated volume is given beside it. Figures for a past night are as known now: the nightly build fills in nights it missed. `averagePricePerM3Trend` prices each of the twelve service months before asOf's once it is fully invoiced and flags the rest, never estimating them. `estimatedInvoicesThisMonth` is an estimate from live billing rows. 400 as_of_not_built for an asOf after the latest night built; 400 invalid_date for a day that does not exist or falls outside 2000–2999
|
|
20
|
+
* Point-in-time figures (`pointInTime`) are read at `asOf`, at the end of the month before, and on the same day a month earlier (clamped: 31 Oct → 30 Sep). Figures that add up over a period (`periods`) are read month-to-date, over the same days of last month, over the last full month and over the month before. Every month is a calendar month in the tenant's billing calendar, and money is per currency, never summed across currencies. Measured volume reads low until a provider-run warehouse reports its measurements, which is why estimated volume is given beside it. Figures for a past night are as known now: the nightly build fills in nights it missed. `averagePricePerM3Trend` prices each of the twelve service months before asOf's once it is fully invoiced and flags the rest, never estimating them. `estimatedInvoicesThisMonth` is an estimate from live billing rows. Article names are in `locale` where the article has a name in it, else its default name; categories are codes for the client to label. 400 as_of_not_built for an asOf after the latest night built; 400 invalid_date for a day that does not exist or falls outside 2000–2999; 400 for an unsupported `locale`. 503 analytics_busy when this replica is already serving its share of analytics requests, and 503 analytics_timeout when a figure takes too long to compute; both are retryable. 🔒 Requires permission: analytics:read. Gate UI with hasRequiredPermissions() from @vindentech/api-client.
|
|
21
21
|
* @summary Every dashboard figure, each with its two comparisons
|
|
22
22
|
*/
|
|
23
23
|
export declare const analyticsControllerOverviewV1: (params?: AnalyticsControllerOverviewV1Params, options?: Parameters<typeof customFetch>[1]) => Promise<analyticsControllerOverviewV1Response>;
|
|
@@ -11,7 +11,7 @@ export const getAnalyticsControllerOverviewV1Url = (params) => {
|
|
|
11
11
|
return stringifiedParams.length > 0 ? `/v1/analytics/overview?${stringifiedParams}` : `/v1/analytics/overview`;
|
|
12
12
|
};
|
|
13
13
|
/**
|
|
14
|
-
* Point-in-time figures (`pointInTime`) are read at `asOf`, at the end of the month before, and on the same day a month earlier (clamped: 31 Oct → 30 Sep). Figures that add up over a period (`periods`) are read month-to-date, over the same days of last month, over the last full month and over the month before. Every month is a calendar month in the tenant's billing calendar, and money is per currency, never summed across currencies. Measured volume reads low until a provider-run warehouse reports its measurements, which is why estimated volume is given beside it. Figures for a past night are as known now: the nightly build fills in nights it missed. `averagePricePerM3Trend` prices each of the twelve service months before asOf's once it is fully invoiced and flags the rest, never estimating them. `estimatedInvoicesThisMonth` is an estimate from live billing rows. 400 as_of_not_built for an asOf after the latest night built; 400 invalid_date for a day that does not exist or falls outside 2000–2999
|
|
14
|
+
* Point-in-time figures (`pointInTime`) are read at `asOf`, at the end of the month before, and on the same day a month earlier (clamped: 31 Oct → 30 Sep). Figures that add up over a period (`periods`) are read month-to-date, over the same days of last month, over the last full month and over the month before. Every month is a calendar month in the tenant's billing calendar, and money is per currency, never summed across currencies. Measured volume reads low until a provider-run warehouse reports its measurements, which is why estimated volume is given beside it. Figures for a past night are as known now: the nightly build fills in nights it missed. `averagePricePerM3Trend` prices each of the twelve service months before asOf's once it is fully invoiced and flags the rest, never estimating them. `estimatedInvoicesThisMonth` is an estimate from live billing rows. Article names are in `locale` where the article has a name in it, else its default name; categories are codes for the client to label. 400 as_of_not_built for an asOf after the latest night built; 400 invalid_date for a day that does not exist or falls outside 2000–2999; 400 for an unsupported `locale`. 503 analytics_busy when this replica is already serving its share of analytics requests, and 503 analytics_timeout when a figure takes too long to compute; both are retryable. 🔒 Requires permission: analytics:read. Gate UI with hasRequiredPermissions() from @vindentech/api-client.
|
|
15
15
|
* @summary Every dashboard figure, each with its two comparisons
|
|
16
16
|
*/
|
|
17
17
|
export const analyticsControllerOverviewV1 = async (params, options) => {
|
|
@@ -8630,6 +8630,8 @@ export interface InvoiceRowDto {
|
|
|
8630
8630
|
descriptionOverride: string | null;
|
|
8631
8631
|
/** The line the customer sees for this row on the invoice: descriptionOverride when set, otherwise the article name followed by freeText, in the invoice's language. Show this rather than rebuilding it. */
|
|
8632
8632
|
description: string;
|
|
8633
|
+
/** Whether the copy of the invoice the customer receives (the Stripe or the Fortnox invoice) carries this row. False only for a row priced at nothing on an article with hideOnInvoiceWhenZero on, and never for every row of an invoice. Read from the article now, so it says what a push now would send: an invoice already pushed keeps the lines it was sent with. Every row stays on the invoice and counts towards its totals; a client showing the customer's invoice leaves out rows where this is false. */
|
|
8634
|
+
shownToCustomer: boolean;
|
|
8633
8635
|
/** Coupon benefits that reduced this row. Empty when none did. */
|
|
8634
8636
|
appliedCoupons: AppliedCouponSummaryDto[];
|
|
8635
8637
|
/** What kind of row this is: charge = an ordinary charge; carried = a correction of an earlier month; clawback = a campaign benefit charged back; manual = a row staff added by hand, billed as entered. A credit note row has the kind of the row it credits. */
|
|
@@ -8879,6 +8881,8 @@ export interface ArticleDto {
|
|
|
8879
8881
|
vatInclusiveDefault: boolean;
|
|
8880
8882
|
rutEligible: boolean;
|
|
8881
8883
|
isActive: boolean;
|
|
8884
|
+
/** Leave this article's rows off the customer's copy of an invoice (the Stripe or the Fortnox invoice) when they were priced at nothing: zero in both amounts, not reduced by a campaign, a code or a discount rule, not added or reworded by staff, carrying no labour hours, and with another line of the invoice still printed. The invoice itself keeps every row, so totals do not change, and its rows say which ones the customer gets (`shownToCustomer`). Read when an invoice is pushed: a change reaches every invoice not yet pushed, and one already pushed keeps its lines. */
|
|
8885
|
+
hideOnInvoiceWhenZero: boolean;
|
|
8882
8886
|
createdAt: string;
|
|
8883
8887
|
updatedAt: string;
|
|
8884
8888
|
}
|
|
@@ -8913,6 +8917,8 @@ export interface CreateArticleDto {
|
|
|
8913
8917
|
vatInclusiveDefault?: boolean;
|
|
8914
8918
|
rutEligible?: boolean;
|
|
8915
8919
|
isActive?: boolean;
|
|
8920
|
+
/** Leave this article's rows off the customer's copy of an invoice (the Stripe or the Fortnox invoice) when they were priced at nothing: zero in both amounts, not reduced by a campaign, a code or a discount rule, not added or reworded by staff, carrying no labour hours, and with another line of the invoice still printed. The invoice itself keeps every row, so totals do not change, and its rows say which ones the customer gets (`shownToCustomer`). Read when an invoice is pushed: a change reaches every invoice not yet pushed, and one already pushed keeps its lines. Omitted stores false. */
|
|
8921
|
+
hideOnInvoiceWhenZero?: boolean;
|
|
8916
8922
|
/** Default VAT rate, a percentage (numeric column → string): 25.0000 for 25 %, 25.5000 for 25.5 %. Invoice rows priced on this article take their VAT from it. */
|
|
8917
8923
|
vatRateDefault: string;
|
|
8918
8924
|
}
|
|
@@ -8932,6 +8938,8 @@ export interface UpdateArticleDto {
|
|
|
8932
8938
|
vatInclusiveDefault?: boolean;
|
|
8933
8939
|
rutEligible?: boolean;
|
|
8934
8940
|
isActive?: boolean;
|
|
8941
|
+
/** Leave this article's rows off the customer's copy of an invoice (the Stripe or the Fortnox invoice) when they were priced at nothing: zero in both amounts, not reduced by a campaign, a code or a discount rule, not added or reworded by staff, carrying no labour hours, and with another line of the invoice still printed. The invoice itself keeps every row, so totals do not change, and its rows say which ones the customer gets (`shownToCustomer`). Read when an invoice is pushed: a change reaches every invoice not yet pushed, and one already pushed keeps its lines. Omitted leaves it as it is. */
|
|
8942
|
+
hideOnInvoiceWhenZero?: boolean;
|
|
8935
8943
|
/** Default VAT rate (numeric column → string, e.g. 25.0000). */
|
|
8936
8944
|
vatRateDefault?: string;
|
|
8937
8945
|
}
|
|
@@ -13836,7 +13844,10 @@ export interface AnalyticsRevenueArticleDto {
|
|
|
13836
13844
|
articleId: string | null;
|
|
13837
13845
|
/** @nullable */
|
|
13838
13846
|
code: string | null;
|
|
13839
|
-
/**
|
|
13847
|
+
/**
|
|
13848
|
+
* The article's name in the requested `locale`, else its default name. Null for a row with no article.
|
|
13849
|
+
* @nullable
|
|
13850
|
+
*/
|
|
13840
13851
|
name: string | null;
|
|
13841
13852
|
/** @nullable */
|
|
13842
13853
|
category: string | null;
|
|
@@ -15989,6 +16000,16 @@ export type AnalyticsControllerOverviewV1Params = {
|
|
|
15989
16000
|
* The night the figures describe (YYYY-MM-DD), in the tenant's billing calendar. Defaults to the latest night the nightly analytics build covers, normally last night. A later night is 400 as_of_not_built.
|
|
15990
16001
|
*/
|
|
15991
16002
|
asOf?: string;
|
|
16003
|
+
/**
|
|
16004
|
+
* Language of the article names in `byArticle`: the page's language. Each name is the article's name in this locale, or its default name when it has none. Omit it to get every article's default name.
|
|
16005
|
+
*/
|
|
16006
|
+
locale?: AnalyticsControllerOverviewV1Locale;
|
|
16007
|
+
};
|
|
16008
|
+
export type AnalyticsControllerOverviewV1Locale = typeof AnalyticsControllerOverviewV1Locale[keyof typeof AnalyticsControllerOverviewV1Locale];
|
|
16009
|
+
export declare const AnalyticsControllerOverviewV1Locale: {
|
|
16010
|
+
readonly 'sv-SE': "sv-SE";
|
|
16011
|
+
readonly 'en-GB': "en-GB";
|
|
16012
|
+
readonly 'fi-FI': "fi-FI";
|
|
15992
16013
|
};
|
|
15993
16014
|
export type AnalyticsControllerDailyV1Params = {
|
|
15994
16015
|
/**
|