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

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.
Files changed (32) hide show
  1. package/dist/client.d.ts.map +1 -1
  2. package/dist/client.js.map +1 -1
  3. package/dist/generated/_all.d.ts +1 -0
  4. package/dist/generated/_all.d.ts.map +1 -1
  5. package/dist/generated/_all.js +1 -0
  6. package/dist/generated/_all.js.map +1 -1
  7. package/dist/generated/_permissions.d.ts +13 -1
  8. package/dist/generated/_permissions.d.ts.map +1 -1
  9. package/dist/generated/_permissions.js +3 -0
  10. package/dist/generated/_permissions.js.map +1 -1
  11. package/dist/generated/analytics/analytics.d.ts +15 -1
  12. package/dist/generated/analytics/analytics.d.ts.map +1 -1
  13. package/dist/generated/analytics/analytics.js +21 -0
  14. package/dist/generated/analytics/analytics.js.map +1 -1
  15. package/dist/generated/billing-accounts/billing-accounts.d.ts +8 -1
  16. package/dist/generated/billing-accounts/billing-accounts.d.ts.map +1 -1
  17. package/dist/generated/billing-accounts/billing-accounts.js +0 -1
  18. package/dist/generated/billing-accounts/billing-accounts.js.map +1 -1
  19. package/dist/generated/index.schemas.d.ts +193 -1
  20. package/dist/generated/index.schemas.d.ts.map +1 -1
  21. package/dist/generated/index.schemas.js +28 -0
  22. package/dist/generated/index.schemas.js.map +1 -1
  23. package/dist/generated/invoice-auto-charge-mode/invoice-auto-charge-mode.d.ts +38 -0
  24. package/dist/generated/invoice-auto-charge-mode/invoice-auto-charge-mode.d.ts.map +1 -0
  25. package/dist/generated/invoice-auto-charge-mode/invoice-auto-charge-mode.js +41 -0
  26. package/dist/generated/invoice-auto-charge-mode/invoice-auto-charge-mode.js.map +1 -0
  27. package/dist/generated/provider-switch/provider-switch.d.ts +5 -1
  28. package/dist/generated/provider-switch/provider-switch.d.ts.map +1 -1
  29. package/dist/generated/provider-switch/provider-switch.js.map +1 -1
  30. package/dist/index.d.ts +3 -3
  31. package/dist/index.d.ts.map +1 -1
  32. package/package.json +1 -1
@@ -8495,7 +8495,7 @@ export interface UpdateBillingAccountDto {
8495
8495
  /** ISO 4217 currency code. */
8496
8496
  currencyCode?: string;
8497
8497
  /**
8498
- * Pin the account to one of the tenant's payment methods. `null` clears it, so the account uses the tenant default. An invoice keeps the method it was sent with; a Stripe-collected invoice's saved card is charged on its due date when that method is auto-chargeable.
8498
+ * Pin the account to one of the tenant's payment methods. `null` clears it, so the account uses the tenant default. A new pin must be an active, undeleted method of the account's own payment provider, or the request is a 400 naming why; sending the method already pinned is not re-checked. An invoice keeps the method it was sent with; a Stripe-collected invoice's saved card is charged on its due date when that method is auto-chargeable.
8499
8499
  * @nullable
8500
8500
  */
8501
8501
  paymentMethodId?: string | null;
@@ -9128,6 +9128,98 @@ export interface ReplaceInvoiceTextsDto {
9128
9128
  /** The tenant's text for each label and locale, replacing every text it had. A label or locale left out, or null, reads the platform's text in that locale; `{}` resets every label. */
9129
9129
  texts: InvoiceTextsInputDto;
9130
9130
  }
9131
+ /**
9132
+ * The mode in force. `off` — the job does nothing for the tenant: no charge, no move to OVERDUE. Invoices keep their schedule and are acted on, late, once the mode is `live` again. `shadow` (the default) — it logs what it would do and calls nothing in Stripe and writes nothing. `live` — it charges the saved card on the due date and moves an invoice still unpaid afterwards to OVERDUE.
9133
+ */
9134
+ export type InvoiceAutoChargeModeDtoMode = typeof InvoiceAutoChargeModeDtoMode[keyof typeof InvoiceAutoChargeModeDtoMode];
9135
+ export declare const InvoiceAutoChargeModeDtoMode: {
9136
+ readonly off: "off";
9137
+ readonly shadow: "shadow";
9138
+ readonly live: "live";
9139
+ };
9140
+ export interface InvoiceAutoChargeModeDto {
9141
+ /** The mode in force. `off` — the job does nothing for the tenant: no charge, no move to OVERDUE. Invoices keep their schedule and are acted on, late, once the mode is `live` again. `shadow` (the default) — it logs what it would do and calls nothing in Stripe and writes nothing. `live` — it charges the saved card on the due date and moves an invoice still unpaid afterwards to OVERDUE. */
9142
+ mode: InvoiceAutoChargeModeDtoMode;
9143
+ /** Whether the tenant has a stored mode. False means `mode` is the `shadow` default, which nobody has chosen. */
9144
+ configured: boolean;
9145
+ /**
9146
+ * Keycloak `sub` of whoever set the stored mode through this API. Null when nothing is stored, and when the stored mode is not the one the newest change through this API set: it was then set directly in the database, which records no actor.
9147
+ * @nullable
9148
+ */
9149
+ changedByUserSub: string | null;
9150
+ /**
9151
+ * When that change was made. Null whenever `changedByUserSub` is.
9152
+ * @nullable
9153
+ */
9154
+ changedAt: string | null;
9155
+ /**
9156
+ * The reason recorded with that change. Null whenever `changedByUserSub` is.
9157
+ * @nullable
9158
+ */
9159
+ changeReason: string | null;
9160
+ }
9161
+ /**
9162
+ * `off` — the job does nothing for the tenant: no charge, no move to OVERDUE. Invoices keep their schedule and are acted on, late, once the mode is `live` again. `shadow` (the default) — it logs what it would do and calls nothing in Stripe and writes nothing. `live` — it charges the saved card on the due date and moves an invoice still unpaid afterwards to OVERDUE.
9163
+ */
9164
+ export type SetInvoiceAutoChargeModeDtoMode = typeof SetInvoiceAutoChargeModeDtoMode[keyof typeof SetInvoiceAutoChargeModeDtoMode];
9165
+ export declare const SetInvoiceAutoChargeModeDtoMode: {
9166
+ readonly off: "off";
9167
+ readonly shadow: "shadow";
9168
+ readonly live: "live";
9169
+ };
9170
+ export interface SetInvoiceAutoChargeModeDto {
9171
+ /** `off` — the job does nothing for the tenant: no charge, no move to OVERDUE. Invoices keep their schedule and are acted on, late, once the mode is `live` again. `shadow` (the default) — it logs what it would do and calls nothing in Stripe and writes nothing. `live` — it charges the saved card on the due date and moves an invoice still unpaid afterwards to OVERDUE. */
9172
+ mode: SetInvoiceAutoChargeModeDtoMode;
9173
+ /** Why the mode is changing. Recorded in the admin action. */
9174
+ reason: string;
9175
+ }
9176
+ /**
9177
+ * The mode in force. `off` — the job does nothing for the tenant: no charge, no move to OVERDUE. Invoices keep their schedule and are acted on, late, once the mode is `live` again. `shadow` (the default) — it logs what it would do and calls nothing in Stripe and writes nothing. `live` — it charges the saved card on the due date and moves an invoice still unpaid afterwards to OVERDUE.
9178
+ */
9179
+ export type SetInvoiceAutoChargeModeResultDtoMode = typeof SetInvoiceAutoChargeModeResultDtoMode[keyof typeof SetInvoiceAutoChargeModeResultDtoMode];
9180
+ export declare const SetInvoiceAutoChargeModeResultDtoMode: {
9181
+ readonly off: "off";
9182
+ readonly shadow: "shadow";
9183
+ readonly live: "live";
9184
+ };
9185
+ /**
9186
+ * The mode this call replaced. Null when the tenant had no stored mode, i.e. it was on the `shadow` default.
9187
+ * @nullable
9188
+ */
9189
+ export type SetInvoiceAutoChargeModeResultDtoPreviousMode = typeof SetInvoiceAutoChargeModeResultDtoPreviousMode[keyof typeof SetInvoiceAutoChargeModeResultDtoPreviousMode] | null;
9190
+ export declare const SetInvoiceAutoChargeModeResultDtoPreviousMode: {
9191
+ readonly off: "off";
9192
+ readonly shadow: "shadow";
9193
+ readonly live: "live";
9194
+ };
9195
+ export interface SetInvoiceAutoChargeModeResultDto {
9196
+ /** The mode in force. `off` — the job does nothing for the tenant: no charge, no move to OVERDUE. Invoices keep their schedule and are acted on, late, once the mode is `live` again. `shadow` (the default) — it logs what it would do and calls nothing in Stripe and writes nothing. `live` — it charges the saved card on the due date and moves an invoice still unpaid afterwards to OVERDUE. */
9197
+ mode: SetInvoiceAutoChargeModeResultDtoMode;
9198
+ /** Whether the tenant has a stored mode. False means `mode` is the `shadow` default, which nobody has chosen. */
9199
+ configured: boolean;
9200
+ /**
9201
+ * Keycloak `sub` of whoever set the stored mode through this API. Null when nothing is stored, and when the stored mode is not the one the newest change through this API set: it was then set directly in the database, which records no actor.
9202
+ * @nullable
9203
+ */
9204
+ changedByUserSub: string | null;
9205
+ /**
9206
+ * When that change was made. Null whenever `changedByUserSub` is.
9207
+ * @nullable
9208
+ */
9209
+ changedAt: string | null;
9210
+ /**
9211
+ * The reason recorded with that change. Null whenever `changedByUserSub` is.
9212
+ * @nullable
9213
+ */
9214
+ changeReason: string | null;
9215
+ /**
9216
+ * The mode this call replaced. Null when the tenant had no stored mode, i.e. it was on the `shadow` default.
9217
+ * @nullable
9218
+ */
9219
+ previousMode: SetInvoiceAutoChargeModeResultDtoPreviousMode;
9220
+ /** True when this call replayed a prior result for the same Idempotency-Key and wrote nothing. */
9221
+ idempotent: boolean;
9222
+ }
9131
9223
  export interface CustomerSubscriptionConfigDto {
9132
9224
  customerSubscriptionConfigId: string;
9133
9225
  tenantId: string;
@@ -14027,6 +14119,57 @@ export interface AnalyticsEstimateCurrencyDto {
14027
14119
  lastMonthActualMinor: number;
14028
14120
  byCategory: AnalyticsEstimateCategoryDto[];
14029
14121
  }
14122
+ /**
14123
+ * `cold_start` when fewer than `minPods` pods were measured in the window, so the ratio is 1 and no correction was applied.
14124
+ */
14125
+ export type AnalyticsForecastRatioDtoSource = typeof AnalyticsForecastRatioDtoSource[keyof typeof AnalyticsForecastRatioDtoSource];
14126
+ export declare const AnalyticsForecastRatioDtoSource: {
14127
+ readonly measured: "measured";
14128
+ readonly cold_start: "cold_start";
14129
+ };
14130
+ export interface AnalyticsForecastRatioDto {
14131
+ /** What an estimated volume is multiplied by to read as the warehouse will measure it: measured volume over estimated volume of the pods measured in the window, four decimals. Not clamped: above 1 means estimates run short. Exactly 1 when `source` is `cold_start`. */
14132
+ value: number;
14133
+ /** `cold_start` when fewer than `minPods` pods were measured in the window, so the ratio is 1 and no correction was applied. */
14134
+ source: AnalyticsForecastRatioDtoSource;
14135
+ /** Pods measured in the window that carry both a measurement and an estimate. */
14136
+ measuredPods: number;
14137
+ /** The fewest measured pods the ratio is computed from. */
14138
+ minPods: number;
14139
+ /** Days of measurements the ratio reads, ending at `windowTo`. */
14140
+ windowDays: number;
14141
+ windowFrom: string;
14142
+ windowTo: string;
14143
+ }
14144
+ export interface AnalyticsInvoiceForecastCategoryDto {
14145
+ /** @nullable */
14146
+ category: string | null;
14147
+ /** Net ex-VAT of the booked pickups' charges in this category, minor units, after campaigns, binding discounts and codes. */
14148
+ bookedPickupsMinor: number;
14149
+ }
14150
+ export interface AnalyticsInvoiceForecastCurrencyDto {
14151
+ currencyCode: string;
14152
+ /** Net ex-VAT of what the booked pickups add to the window's invoices, minor units: the sum of the categories'. Not part of `estimateMinor`. */
14153
+ bookedPickupsMinor: number;
14154
+ /** Pickups priced into this currency. */
14155
+ pickupsPriced: number;
14156
+ byCategory: AnalyticsInvoiceForecastCategoryDto[];
14157
+ }
14158
+ export interface AnalyticsInvoiceForecastDto {
14159
+ /** Always true: what live pickups booked for the rest of the window will add if they go ahead, priced through the pricing engine as their checkout quote was. Separate from the accrued figures and never added to them. */
14160
+ isForecast: boolean;
14161
+ ratio: AnalyticsForecastRatioDto;
14162
+ /** Live pickups planned in the window after `asOf`, not yet at the warehouse. A pickup planned earlier and still open counts from the day after `asOf`. */
14163
+ pickupsBooked: number;
14164
+ /** How many of them are priced into `currencies`. */
14165
+ pickupsPriced: number;
14166
+ /** Booked pickups left out because nothing could price them: no currency, a price book with no base rule for them, or the limit on how many are priced in one request (`truncated`). */
14167
+ pickupsUnpriced: number;
14168
+ /** True when pricing stopped at the limit on pickups or on time, so `currencies` is short by the pickups it did not reach. */
14169
+ truncated: boolean;
14170
+ /** One entry per currency. */
14171
+ currencies: AnalyticsInvoiceForecastCurrencyDto[];
14172
+ }
14030
14173
  export interface AnalyticsInvoiceEstimateDto {
14031
14174
  /** Always true: these are projections, not invoices. */
14032
14175
  isEstimate: boolean;
@@ -14044,6 +14187,8 @@ export interface AnalyticsInvoiceEstimateDto {
14044
14187
  lastMonthComplete: boolean;
14045
14188
  /** One entry per currency. */
14046
14189
  currencies: AnalyticsEstimateCurrencyDto[];
14190
+ /** What live pickups booked for the rest of the window add on top of this estimate, priced through the pricing engine. Never part of `estimateMinor` or any figure above: the client shows it beside them, or adds it up. */
14191
+ forecast: AnalyticsInvoiceForecastDto;
14047
14192
  }
14048
14193
  export interface AnalyticsOverviewDto {
14049
14194
  /** The night the figures describe: the range's last night, `to`. */
@@ -14066,6 +14211,45 @@ export interface AnalyticsOverviewDto {
14066
14211
  averagePricePerM3Trend: AnalyticsPricePerM3TrendDto[];
14067
14212
  estimatedInvoicesThisMonth: AnalyticsInvoiceEstimateDto;
14068
14213
  }
14214
+ export interface AnalyticsStorageForecastDayDto {
14215
+ date: string;
14216
+ /** m³ in storage when the day ends: the day before's, plus what booked pickups bring on the day, less what booked deliveries take out. Never below 0. */
14217
+ projectedM3: number;
14218
+ /** m³ the pickups planned on the day bring in, estimated volume times the correction ratio. */
14219
+ incomingM3: number;
14220
+ /** m³ the deliveries planned on the day take out. */
14221
+ outgoingM3: number;
14222
+ /** Pickups planned on the day. */
14223
+ bookedPickups: number;
14224
+ /** Deliveries planned on the day. */
14225
+ bookedDeliveries: number;
14226
+ }
14227
+ /**
14228
+ * Which volume `startM3` is: the estimated volume the dashboard charts, or the measured volume when no night carries an estimate.
14229
+ */
14230
+ export type AnalyticsStorageForecastDtoStartBasis = typeof AnalyticsStorageForecastDtoStartBasis[keyof typeof AnalyticsStorageForecastDtoStartBasis];
14231
+ export declare const AnalyticsStorageForecastDtoStartBasis: {
14232
+ readonly estimated: "estimated";
14233
+ readonly measured: "measured";
14234
+ };
14235
+ export interface AnalyticsStorageForecastDto {
14236
+ /** The latest night built: the forecast starts from how it ended. */
14237
+ asOf: string;
14238
+ /**
14239
+ * When the nightly analytics build these figures read was computed; null before the first.
14240
+ * @nullable
14241
+ */
14242
+ computedAt: string | null;
14243
+ /** Days forecast, from the day after `asOf`. */
14244
+ horizonDays: number;
14245
+ /** m³ in storage when `asOf` ended, the figure the forecast continues from. */
14246
+ startM3: number;
14247
+ /** Which volume `startM3` is: the estimated volume the dashboard charts, or the measured volume when no night carries an estimate. */
14248
+ startBasis: AnalyticsStorageForecastDtoStartBasis;
14249
+ ratio: AnalyticsForecastRatioDto;
14250
+ /** One entry per day, in date order, every day listed. */
14251
+ days: AnalyticsStorageForecastDayDto[];
14252
+ }
14069
14253
  export interface AnalyticsDailyRowDto {
14070
14254
  date: string;
14071
14255
  /** Customers with goods in storage that night. */
@@ -16063,6 +16247,14 @@ export declare const AnalyticsControllerOverviewV1Locale: {
16063
16247
  readonly 'en-GB': "en-GB";
16064
16248
  readonly 'fi-FI': "fi-FI";
16065
16249
  };
16250
+ export type AnalyticsControllerStorageForecastV1Params = {
16251
+ /**
16252
+ * Days to forecast, from the day after the latest night built (1–60).
16253
+ * @minimum 1
16254
+ * @maximum 60
16255
+ */
16256
+ days?: number;
16257
+ };
16066
16258
  export type AnalyticsControllerDailyV1Params = {
16067
16259
  /**
16068
16260
  * The `nextCursor` of the previous page. Omit for the first page.