@vindentech/api-client 2.0.0-next.5 → 2.0.0-next.7

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.
@@ -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. 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.
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. `range` carries the same figures over `from`–`to` and over the range it is compared with, each with the average lifetime value to date of its acquisition cohort: the customers whose first stored night falls in it. `to` is `asOf` by its newer name and both default to the latest night built; `from` defaults to the 1st of its month. A range starting on a 1st compares with the same span as many calendar months earlier as it spans (October with September, 1–10 Nov with 1–10 Oct); any other range with as many days immediately before it. `pointInTime.previousRangeEnd` is read at the last night of the range compared with. 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, and date_range_not_built for a `to`, after the latest night built; as_of_and_to_exclusive when both are given; date_range_required when `from` is after `to`; date_range_too_wide past 25 calendar months; 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. 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.
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. `range` carries the same figures over `from`–`to` and over the range it is compared with, each with the average lifetime value to date of its acquisition cohort: the customers whose first stored night falls in it. `to` is `asOf` by its newer name and both default to the latest night built; `from` defaults to the 1st of its month. A range starting on a 1st compares with the same span as many calendar months earlier as it spans (October with September, 1–10 Nov with 1–10 Oct); any other range with as many days immediately before it. `pointInTime.previousRangeEnd` is read at the last night of the range compared with. 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, and date_range_not_built for a `to`, after the latest night built; as_of_and_to_exclusive when both are given; date_range_required when `from` is after `to`; date_range_too_wide past 25 calendar months; 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) => {
@@ -8783,7 +8783,7 @@ export interface SetInvoiceRowDescriptionDto {
8783
8783
  }
8784
8784
  export interface CreditNoteRowDto {
8785
8785
  invoiceRowId: string;
8786
- /** Amount (excl. VAT, minor units, POSITIVE magnitude) to refund off this row. The service writes it as a negative credit-note row. */
8786
+ /** Amount (minor units, POSITIVE magnitude) to refund off this row, in the row's price basis: excl. VAT, unless the row was priced including VAT, when it includes VAT. The service writes it as a negative credit-note row. */
8787
8787
  refundAmountMinor: number;
8788
8788
  }
8789
8789
  export interface IssueCreditNoteDto {
@@ -13826,6 +13826,8 @@ export interface AnalyticsPointInTimeSetDto {
13826
13826
  previousMonthEnd: AnalyticsPointInTimeDto;
13827
13827
  /** asOf a month earlier, clamped to that month's last day (31 Oct → 30 Sep). */
13828
13828
  sameDayLastMonth: AnalyticsPointInTimeDto;
13829
+ /** The last night of the range the requested one is compared with, `range.previous.to`: the night to compare a point-in-time figure with, range against range. */
13830
+ previousRangeEnd: AnalyticsPointInTimeDto;
13829
13831
  }
13830
13832
  export interface AnalyticsRevenueCategoryDto {
13831
13833
  /**
@@ -13882,6 +13884,46 @@ export interface AnalyticsPeriodSetDto {
13882
13884
  /** The month before that. */
13883
13885
  monthBefore: AnalyticsPeriodDto;
13884
13886
  }
13887
+ export interface AnalyticsCohortLifetimeValueDto {
13888
+ /**
13889
+ * The tenant's default currency, which lifetime revenue is counted in; revenue in any other currency is not in it. Null before the first build or for a tenant with no default currency.
13890
+ * @nullable
13891
+ */
13892
+ currencyCode: string | null;
13893
+ /**
13894
+ * Average invoiced revenue ex VAT to date, minor units, of the cohort's customers whose latest stay is stored as of the latest nightly build. Revenue invoiced after the range counts, so an earlier range's cohort has had longer to earn. Null when none is.
13895
+ * @nullable
13896
+ */
13897
+ activeCustomersMinor: number | null;
13898
+ /**
13899
+ * The same over the cohort's customers whose latest stay has ended.
13900
+ * @nullable
13901
+ */
13902
+ endedCustomersMinor: number | null;
13903
+ /**
13904
+ * The same over the whole cohort, including customers between stays. Null when the cohort is empty.
13905
+ * @nullable
13906
+ */
13907
+ storingCustomersMinor: number | null;
13908
+ }
13909
+ export interface AnalyticsRangePeriodDto {
13910
+ from: string;
13911
+ /** Included. */
13912
+ to: string;
13913
+ /** Customers registered in the window. */
13914
+ newRegisteredCustomers: number;
13915
+ /** Customers whose first stay started in the window. */
13916
+ newStoringCustomers: number;
13917
+ /** Invoiced revenue by invoice date, one entry per currency, never summed across currencies. Invoices sent, paid, overdue or written off; credit notes net against them. */
13918
+ revenue: AnalyticsRevenueDto[];
13919
+ cohortLifetimeValue: AnalyticsCohortLifetimeValueDto;
13920
+ }
13921
+ export interface AnalyticsRangeSetDto {
13922
+ /** The range asked for, `from` through `to`. */
13923
+ current: AnalyticsRangePeriodDto;
13924
+ /** The range it is compared with. A range starting on a 1st compares with the same span as many calendar months earlier as it spans, ending on a month's last day when it does: October with September, a quarter with the quarter before, 1–10 Nov with 1–10 Oct. Any other range compares with as many days immediately before it. */
13925
+ previous: AnalyticsRangePeriodDto;
13926
+ }
13885
13927
  export interface AnalyticsRevenueTotalDto {
13886
13928
  currencyCode: string;
13887
13929
  /** Revenue ex VAT, minor units. */
@@ -14004,7 +14046,7 @@ export interface AnalyticsInvoiceEstimateDto {
14004
14046
  currencies: AnalyticsEstimateCurrencyDto[];
14005
14047
  }
14006
14048
  export interface AnalyticsOverviewDto {
14007
- /** The night the figures describe. */
14049
+ /** The night the figures describe: the range's last night, `to`. */
14008
14050
  asOf: string;
14009
14051
  /**
14010
14052
  * When the nightly analytics build these figures read was computed; null before the first.
@@ -14015,6 +14057,8 @@ export interface AnalyticsOverviewDto {
14015
14057
  stayGapNights: number;
14016
14058
  pointInTime: AnalyticsPointInTimeSetDto;
14017
14059
  periods: AnalyticsPeriodSetDto;
14060
+ /** The period figures over the requested range and the range it is compared with, each with the lifetime value of its acquisition cohort. */
14061
+ range: AnalyticsRangeSetDto;
14018
14062
  revenueYearToDate: AnalyticsRevenueYearToDateDto;
14019
14063
  /** One entry per currency with a fully invoiced storage month. */
14020
14064
  averagePricePerM3: AnalyticsPricePerM3Dto[];
@@ -15997,9 +16041,17 @@ export type TransportOptionsControllerListV1Params = {
15997
16041
  };
15998
16042
  export type AnalyticsControllerOverviewV1Params = {
15999
16043
  /**
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.
16044
+ * The night the figures describe (YYYY-MM-DD), in the tenant's billing calendar: the range's last night, `to` by its older name, so give one or the other (400 as_of_and_to_exclusive). Defaults to the latest night the nightly analytics build covers, normally last night. A later night is 400 as_of_not_built.
16001
16045
  */
16002
16046
  asOf?: string;
16047
+ /**
16048
+ * First day of the range (YYYY-MM-DD), in the billing calendar. Defaults to the 1st of `to`'s month, so the range is the month to date. 400 date_range_required when it is after `to`; the range may span at most 25 calendar months (400 date_range_too_wide).
16049
+ */
16050
+ from?: string;
16051
+ /**
16052
+ * Last day of the range, included, and the night the point-in-time figures are read at. Defaults to, and may not be after, the latest night the nightly build covers (400 date_range_not_built).
16053
+ */
16054
+ to?: string;
16003
16055
  /**
16004
16056
  * 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
16057
  */