@vindentech/api-client 2.0.0-next.20 → 2.0.0-next.22

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.
@@ -2303,7 +2303,7 @@ export interface UpdateCarrierMethodDto {
2303
2303
  export interface MembershipDto {
2304
2304
  organizationId: string;
2305
2305
  role: string;
2306
- /** Fine-grained permissions (resource:action) granted by this org role — drives component visibility when this org is active */
2306
+ /** Permissions (resource:action) of this membership's stored `role`, for display, such as labelling the user's role in an organization. Permission checks never read this list; they use the top-level `capabilities`, which come from the token. The stored role can differ from the token's roles: `GET /v1/me` stores a single role picked from the token (its highest-priority organization role, when it has one) only when it creates the membership and never refreshes it, and a role set by onboarding or the organization-member endpoints reaches the token only once Keycloak is updated and the token is refreshed. */
2307
2307
  capabilities: string[];
2308
2308
  }
2309
2309
  export interface AssignmentDto {
@@ -2448,7 +2448,7 @@ export interface MeResponseDto {
2448
2448
  */
2449
2449
  preferences: MeResponseDtoPreferences;
2450
2450
  memberships: MembershipDto[];
2451
- /** Cross-cutting permissions (resource:action) from platform/tenant-wide/warehouse/carrier roles for the active context — drives client-side component visibility. Org-scoped permissions are on each membership. */
2451
+ /** Permissions (resource:action) of every role on the caller's token — realm roles and the API client's roles, organization roles (`org-billing`, `owner`, …) included. This is the set the server checks each operation's required permissions against: drive UI visibility off it (for example `hasRequiredPermissions(me.capabilities, operation)`), not off `memberships[].capabilities` or role names. An organization role's permissions apply to the token's organization. Holding a permission does not guarantee success: data stays scoped to the caller's organization, warehouses or carrier, and some operations check more (see their 403 responses). */
2452
2452
  capabilities: string[];
2453
2453
  /** Warehouses the caller can act for (JWT warehouse_ids claim; [] if none) — matches what RLS scopes operational reads to. */
2454
2454
  warehouseIds: string[];
@@ -2719,7 +2719,7 @@ export interface CreateCartDto {
2719
2719
  customerType?: CreateCartDtoCustomerType;
2720
2720
  /** ISO 3166-1 alpha-2. Fallback only: overridden by the target organization's active billing account, if it has one. */
2721
2721
  countryCode: string;
2722
- /** ISO 4217. Fallback only: overridden by the target organization's active billing account, if it has one. */
2722
+ /** ISO 4217. Fallback only: overridden by the target organization's active billing account, if it has one. When it is used (a guest, or an organization with no active billing account), it must be one of the tenant's active enabled currencies. Any other code is refused with 400 `currency_not_enabled`, and no cart is created. */
2723
2723
  currencyCode: string;
2724
2724
  /** Staff create-on-behalf target organization. Ignored for org users (own org). */
2725
2725
  organizationId?: string;
@@ -8735,6 +8735,24 @@ export interface InvoiceNowDto {
8735
8735
  */
8736
8736
  reason: string;
8737
8737
  }
8738
+ /**
8739
+ * Where this invoice is bookkept: `manual` until POST /sync queues its Fortnox push, `fortnox` from then on. An imported invoice carries the provider it was imported with, so `fortnox` can come with syncStatus `not_required`. The invoice's own value, not the billing account's. Whether to offer Bookkeep is still decided by syncStatus.
8740
+ */
8741
+ export type InvoiceDtoAccountingProvider = typeof InvoiceDtoAccountingProvider[keyof typeof InvoiceDtoAccountingProvider];
8742
+ export declare const InvoiceDtoAccountingProvider: {
8743
+ readonly manual: "manual";
8744
+ readonly fortnox: "fortnox";
8745
+ readonly stripe: "stripe";
8746
+ };
8747
+ /**
8748
+ * The rail the invoice is sent on, frozen from the billing account when POST /send accepts it (so already set while sendStatus is `pending` or `failed`): manual = bank transfer, emailed by Fortnox; stripe = card, collected through Stripe. Null until then, except on an imported invoice, which carries its rail from the import. A later change to the billing account does not change it.
8749
+ * @nullable
8750
+ */
8751
+ export type InvoiceDtoPaymentProvider = typeof InvoiceDtoPaymentProvider[keyof typeof InvoiceDtoPaymentProvider] | null;
8752
+ export declare const InvoiceDtoPaymentProvider: {
8753
+ readonly manual: "manual";
8754
+ readonly stripe: "stripe";
8755
+ };
8738
8756
  export interface InvoiceDto {
8739
8757
  invoiceId: string;
8740
8758
  tenantId: string;
@@ -8775,6 +8793,18 @@ export interface InvoiceDto {
8775
8793
  * @nullable
8776
8794
  */
8777
8795
  paymentLinkUrl: string | null;
8796
+ /** Where this invoice is bookkept: `manual` until POST /sync queues its Fortnox push, `fortnox` from then on. An imported invoice carries the provider it was imported with, so `fortnox` can come with syncStatus `not_required`. The invoice's own value, not the billing account's. Whether to offer Bookkeep is still decided by syncStatus. */
8797
+ accountingProvider: InvoiceDtoAccountingProvider;
8798
+ /**
8799
+ * The rail the invoice is sent on, frozen from the billing account when POST /send accepts it (so already set while sendStatus is `pending` or `failed`): manual = bank transfer, emailed by Fortnox; stripe = card, collected through Stripe. Null until then, except on an imported invoice, which carries its rail from the import. A later change to the billing account does not change it.
8800
+ * @nullable
8801
+ */
8802
+ paymentProvider: InvoiceDtoPaymentProvider;
8803
+ /**
8804
+ * The payment method a card-rail invoice is collected with, frozen by POST /send: the billing account's own paymentMethodId, else the tenant's default. Null on the bank rail, before POST /send, and on an imported invoice. Look it up in GET /v1/billing/payment-methods (needs billingconfig:read): its isAutoChargeable decides whether the due-date charge charges a saved card, which also takes a default saved card and the tenant's auto-charge mode `live`.
8805
+ * @nullable
8806
+ */
8807
+ paymentMethodId: string | null;
8778
8808
  /** @nullable */
8779
8809
  snapshotCompanyName: string | null;
8780
8810
  /** @nullable */
@@ -8941,6 +8971,24 @@ export interface InvoiceDisplayTotalsDto {
8941
8971
  /** Sum of `displayLines[].amountIncVatMinor`, minor units: what the rows the customer's copy shows add up to including VAT, the stored rows' amounts and VAT exactly. */
8942
8972
  incVatMinor: number;
8943
8973
  }
8974
+ /**
8975
+ * Where this invoice is bookkept: `manual` until POST /sync queues its Fortnox push, `fortnox` from then on. An imported invoice carries the provider it was imported with, so `fortnox` can come with syncStatus `not_required`. The invoice's own value, not the billing account's. Whether to offer Bookkeep is still decided by syncStatus.
8976
+ */
8977
+ export type InvoiceDetailDtoAccountingProvider = typeof InvoiceDetailDtoAccountingProvider[keyof typeof InvoiceDetailDtoAccountingProvider];
8978
+ export declare const InvoiceDetailDtoAccountingProvider: {
8979
+ readonly manual: "manual";
8980
+ readonly fortnox: "fortnox";
8981
+ readonly stripe: "stripe";
8982
+ };
8983
+ /**
8984
+ * The rail the invoice is sent on, frozen from the billing account when POST /send accepts it (so already set while sendStatus is `pending` or `failed`): manual = bank transfer, emailed by Fortnox; stripe = card, collected through Stripe. Null until then, except on an imported invoice, which carries its rail from the import. A later change to the billing account does not change it.
8985
+ * @nullable
8986
+ */
8987
+ export type InvoiceDetailDtoPaymentProvider = typeof InvoiceDetailDtoPaymentProvider[keyof typeof InvoiceDetailDtoPaymentProvider] | null;
8988
+ export declare const InvoiceDetailDtoPaymentProvider: {
8989
+ readonly manual: "manual";
8990
+ readonly stripe: "stripe";
8991
+ };
8944
8992
  /**
8945
8993
  * How the customer's copy of the invoice presents its prices, which decides `displayLines`. Frozen when the invoice is sent: the tenant's price presentation setting for an invoice sent as a Stripe invoice, `detailed` otherwise. An invoice not yet sent shows what sending it now would freeze; one sent before the setting reached invoices, a credit note, an adjustment and a voided invoice are `detailed`. `detailed`: show `rows` (those with `shownToCustomer`); `displayLines` is empty. `category_with_discounts`: one row per price category before its reductions, then a discount row per category one reduced. `category_net`: one row per category after them.
8946
8994
  */
@@ -8990,6 +9038,18 @@ export interface InvoiceDetailDto {
8990
9038
  * @nullable
8991
9039
  */
8992
9040
  paymentLinkUrl: string | null;
9041
+ /** Where this invoice is bookkept: `manual` until POST /sync queues its Fortnox push, `fortnox` from then on. An imported invoice carries the provider it was imported with, so `fortnox` can come with syncStatus `not_required`. The invoice's own value, not the billing account's. Whether to offer Bookkeep is still decided by syncStatus. */
9042
+ accountingProvider: InvoiceDetailDtoAccountingProvider;
9043
+ /**
9044
+ * The rail the invoice is sent on, frozen from the billing account when POST /send accepts it (so already set while sendStatus is `pending` or `failed`): manual = bank transfer, emailed by Fortnox; stripe = card, collected through Stripe. Null until then, except on an imported invoice, which carries its rail from the import. A later change to the billing account does not change it.
9045
+ * @nullable
9046
+ */
9047
+ paymentProvider: InvoiceDetailDtoPaymentProvider;
9048
+ /**
9049
+ * The payment method a card-rail invoice is collected with, frozen by POST /send: the billing account's own paymentMethodId, else the tenant's default. Null on the bank rail, before POST /send, and on an imported invoice. Look it up in GET /v1/billing/payment-methods (needs billingconfig:read): its isAutoChargeable decides whether the due-date charge charges a saved card, which also takes a default saved card and the tenant's auto-charge mode `live`.
9050
+ * @nullable
9051
+ */
9052
+ paymentMethodId: string | null;
8993
9053
  /** @nullable */
8994
9054
  snapshotCompanyName: string | null;
8995
9055
  /** @nullable */