@vindentech/api-client 1.8.0 → 2.0.0-next.1
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/articles/articles.d.ts +1 -1
- package/dist/generated/articles/articles.js +1 -1
- package/dist/generated/index.schemas.d.ts +105 -36
- package/dist/generated/index.schemas.d.ts.map +1 -1
- package/dist/generated/index.schemas.js +5 -1
- package/dist/generated/index.schemas.js.map +1 -1
- package/package.json +1 -1
|
@@ -59,7 +59,7 @@ export type articlesControllerUpdateArticleV1ResponseSuccess = (articlesControll
|
|
|
59
59
|
export type articlesControllerUpdateArticleV1Response = (articlesControllerUpdateArticleV1ResponseSuccess);
|
|
60
60
|
export declare const getArticlesControllerUpdateArticleV1Url: (id: string) => string;
|
|
61
61
|
/**
|
|
62
|
-
* 🔒 Requires permission: article:write. Gate UI with hasRequiredPermissions() from @vindentech/api-client.
|
|
62
|
+
* Only the fields given are written; `translations` is replaced whole. An invoice row takes the article's name, in the invoice's language, when the invoice is sent to Stripe or Fortnox: a change reaches every invoice not yet sent, drafts included, and does not rewrite one already sent. 🔒 Requires permission: article:write. Gate UI with hasRequiredPermissions() from @vindentech/api-client.
|
|
63
63
|
* @summary Update a tenant article
|
|
64
64
|
*/
|
|
65
65
|
export declare const articlesControllerUpdateArticleV1: (id: string, updateArticleDto: UpdateArticleDto, options?: Parameters<typeof customFetch>[1]) => Promise<articlesControllerUpdateArticleV1Response>;
|
|
@@ -64,7 +64,7 @@ export const getArticlesControllerUpdateArticleV1Url = (id) => {
|
|
|
64
64
|
return `/v1/billing/articles/${id}`;
|
|
65
65
|
};
|
|
66
66
|
/**
|
|
67
|
-
* 🔒 Requires permission: article:write. Gate UI with hasRequiredPermissions() from @vindentech/api-client.
|
|
67
|
+
* Only the fields given are written; `translations` is replaced whole. An invoice row takes the article's name, in the invoice's language, when the invoice is sent to Stripe or Fortnox: a change reaches every invoice not yet sent, drafts included, and does not rewrite one already sent. 🔒 Requires permission: article:write. Gate UI with hasRequiredPermissions() from @vindentech/api-client.
|
|
68
68
|
* @summary Update a tenant article
|
|
69
69
|
*/
|
|
70
70
|
export const articlesControllerUpdateArticleV1 = async (id, updateArticleDto, options) => {
|
|
@@ -1534,20 +1534,36 @@ export interface UpdateOrgContactDto {
|
|
|
1534
1534
|
companyName?: string;
|
|
1535
1535
|
notes?: string;
|
|
1536
1536
|
}
|
|
1537
|
-
export
|
|
1538
|
-
|
|
1537
|
+
export interface OrganizationOwnerDto {
|
|
1538
|
+
/** The member's user id (Keycloak subject). */
|
|
1539
|
+
sub: string;
|
|
1540
|
+
/** The member's role in the organization, e.g. `owner` or `org-admin`. */
|
|
1541
|
+
role: string;
|
|
1542
|
+
/** @nullable */
|
|
1543
|
+
displayName: string | null;
|
|
1544
|
+
/** @nullable */
|
|
1545
|
+
firstName: string | null;
|
|
1546
|
+
/** @nullable */
|
|
1547
|
+
lastName: string | null;
|
|
1548
|
+
/** @nullable */
|
|
1549
|
+
email: string | null;
|
|
1550
|
+
/** @nullable */
|
|
1551
|
+
phone: string | null;
|
|
1552
|
+
}
|
|
1553
|
+
export type OrganizationListItemDtoType = typeof OrganizationListItemDtoType[keyof typeof OrganizationListItemDtoType];
|
|
1554
|
+
export declare const OrganizationListItemDtoType: {
|
|
1539
1555
|
readonly business: "business";
|
|
1540
1556
|
readonly personal: "personal";
|
|
1541
1557
|
};
|
|
1542
1558
|
/**
|
|
1543
1559
|
* @nullable
|
|
1544
1560
|
*/
|
|
1545
|
-
export type
|
|
1561
|
+
export type OrganizationListItemDtoMetadata = {
|
|
1546
1562
|
[key: string]: unknown;
|
|
1547
1563
|
} | null;
|
|
1548
|
-
export interface
|
|
1564
|
+
export interface OrganizationListItemDto {
|
|
1549
1565
|
organizationId: string;
|
|
1550
|
-
type:
|
|
1566
|
+
type: OrganizationListItemDtoType;
|
|
1551
1567
|
name: string;
|
|
1552
1568
|
slug: string;
|
|
1553
1569
|
/** @nullable */
|
|
@@ -1560,13 +1576,18 @@ export interface OrganizationDto {
|
|
|
1560
1576
|
*/
|
|
1561
1577
|
preferredLocale: string | null;
|
|
1562
1578
|
/** @nullable */
|
|
1563
|
-
metadata:
|
|
1579
|
+
metadata: OrganizationListItemDtoMetadata;
|
|
1564
1580
|
createdAt: string;
|
|
1565
1581
|
updatedAt: string;
|
|
1582
|
+
/**
|
|
1583
|
+
* Who the organization belongs to, so an account nobody has named can be told apart without reading its members. null when the organization has no live member, and always null for a caller without `member:read` (the org-user roles org-orders, org-billing, org-viewer and member).
|
|
1584
|
+
* @nullable
|
|
1585
|
+
*/
|
|
1586
|
+
owner: OrganizationOwnerDto | null;
|
|
1566
1587
|
}
|
|
1567
1588
|
export interface PaginatedOrganizationsDto {
|
|
1568
1589
|
/** The page of rows. */
|
|
1569
|
-
items:
|
|
1590
|
+
items: OrganizationListItemDto[];
|
|
1570
1591
|
/** Exact count of all rows matching the filter, pre-pagination (RLS-scoped). */
|
|
1571
1592
|
total: number;
|
|
1572
1593
|
/** Effective max rows applied (after defaults/clamp). */
|
|
@@ -1590,6 +1611,36 @@ export interface OrganizationStatsDto {
|
|
|
1590
1611
|
/** Matching organizations grouped by type. A type with no matching organization is absent rather than zero. */
|
|
1591
1612
|
byType: OrganizationTypeCountDto[];
|
|
1592
1613
|
}
|
|
1614
|
+
export type OrganizationDtoType = typeof OrganizationDtoType[keyof typeof OrganizationDtoType];
|
|
1615
|
+
export declare const OrganizationDtoType: {
|
|
1616
|
+
readonly business: "business";
|
|
1617
|
+
readonly personal: "personal";
|
|
1618
|
+
};
|
|
1619
|
+
/**
|
|
1620
|
+
* @nullable
|
|
1621
|
+
*/
|
|
1622
|
+
export type OrganizationDtoMetadata = {
|
|
1623
|
+
[key: string]: unknown;
|
|
1624
|
+
} | null;
|
|
1625
|
+
export interface OrganizationDto {
|
|
1626
|
+
organizationId: string;
|
|
1627
|
+
type: OrganizationDtoType;
|
|
1628
|
+
name: string;
|
|
1629
|
+
slug: string;
|
|
1630
|
+
/** @nullable */
|
|
1631
|
+
corporateIdentityNumber: string | null;
|
|
1632
|
+
/** @nullable */
|
|
1633
|
+
preferredWarehouseId: string | null;
|
|
1634
|
+
/**
|
|
1635
|
+
* The language this customer's messages are written in (order confirmations, storage notices). null = not stated: the language follows the country of the customer's billing account (SE → sv-SE, FI → fi-FI, otherwise en-GB). A language with no authored template falls back to en-GB, then sv-SE.
|
|
1636
|
+
* @nullable
|
|
1637
|
+
*/
|
|
1638
|
+
preferredLocale: string | null;
|
|
1639
|
+
/** @nullable */
|
|
1640
|
+
metadata: OrganizationDtoMetadata;
|
|
1641
|
+
createdAt: string;
|
|
1642
|
+
updatedAt: string;
|
|
1643
|
+
}
|
|
1593
1644
|
export type CreateOrganizationDtoType = typeof CreateOrganizationDtoType[keyof typeof CreateOrganizationDtoType];
|
|
1594
1645
|
export declare const CreateOrganizationDtoType: {
|
|
1595
1646
|
readonly business: "business";
|
|
@@ -5509,6 +5560,7 @@ export interface CreateProductDto {
|
|
|
5509
5560
|
* @maxLength 255
|
|
5510
5561
|
*/
|
|
5511
5562
|
name: string;
|
|
5563
|
+
/** The product's category (GET /v1/categories). Staff only: an organization user who sends one gets 403. */
|
|
5512
5564
|
categoryId?: number;
|
|
5513
5565
|
/** Place the product in this folder of the same organization; omit for the root. */
|
|
5514
5566
|
folderId?: string;
|
|
@@ -5541,7 +5593,11 @@ export interface UpdateProductDto {
|
|
|
5541
5593
|
* @nullable
|
|
5542
5594
|
*/
|
|
5543
5595
|
name?: string | null;
|
|
5544
|
-
|
|
5596
|
+
/**
|
|
5597
|
+
* Move the product to this category (GET /v1/categories); explicit null clears it. Staff only: an organization user whose patch carries the field, null included, gets 403.
|
|
5598
|
+
* @nullable
|
|
5599
|
+
*/
|
|
5600
|
+
categoryId?: number | null;
|
|
5545
5601
|
/**
|
|
5546
5602
|
* Move the item into this folder (same organization). Explicit null moves it back to the storage root; omit to leave the folder unchanged.
|
|
5547
5603
|
* @nullable
|
|
@@ -8752,12 +8808,24 @@ export interface SendInvoiceResponseDto {
|
|
|
8752
8808
|
/** The routing token enqueued for the Worker's InvoiceSendProcessor — derived from paymentProvider (manual → fortnox-email, stripe → stripe-payment). */
|
|
8753
8809
|
rail: SendInvoiceResponseDtoRail;
|
|
8754
8810
|
}
|
|
8811
|
+
export interface ArticleTranslationDto {
|
|
8812
|
+
/** @maxLength 80 */
|
|
8813
|
+
name: string;
|
|
8814
|
+
}
|
|
8815
|
+
export interface ArticleTranslationsDto {
|
|
8816
|
+
'sv-SE'?: ArticleTranslationDto;
|
|
8817
|
+
'en-GB'?: ArticleTranslationDto;
|
|
8818
|
+
'fi-FI'?: ArticleTranslationDto;
|
|
8819
|
+
}
|
|
8755
8820
|
export interface ArticleDto {
|
|
8756
8821
|
articleId: string;
|
|
8757
8822
|
/** @nullable */
|
|
8758
8823
|
tenantId: string | null;
|
|
8759
8824
|
code: string;
|
|
8825
|
+
/** The article's default name, and the text an invoice row starts with for a locale with no entry in `translations`. */
|
|
8760
8826
|
name: string;
|
|
8827
|
+
/** The article's name per locale, keyed by BCP-47 tag (sv-SE, en-GB, fi-FI). `name` is the default: show `translations[locale]?.name ?? name`. The invoice pushes write the name in the invoice's language when the invoice is sent to Stripe or Fortnox, so a change reaches every invoice not yet sent and does not rewrite one already sent. `{}` when the article has no translations. */
|
|
8828
|
+
translations: ArticleTranslationsDto;
|
|
8761
8829
|
/** @nullable */
|
|
8762
8830
|
description: string | null;
|
|
8763
8831
|
/** @nullable */
|
|
@@ -8773,9 +8841,30 @@ export interface ArticleDto {
|
|
|
8773
8841
|
createdAt: string;
|
|
8774
8842
|
updatedAt: string;
|
|
8775
8843
|
}
|
|
8844
|
+
export interface ArticleTranslationInputDto {
|
|
8845
|
+
/**
|
|
8846
|
+
* The article's name in this locale.
|
|
8847
|
+
* @maxLength 80
|
|
8848
|
+
*/
|
|
8849
|
+
name: string;
|
|
8850
|
+
}
|
|
8851
|
+
export interface ArticleTranslationsInputDto {
|
|
8852
|
+
/** @nullable */
|
|
8853
|
+
'sv-SE'?: ArticleTranslationInputDto | null;
|
|
8854
|
+
/** @nullable */
|
|
8855
|
+
'en-GB'?: ArticleTranslationInputDto | null;
|
|
8856
|
+
/** @nullable */
|
|
8857
|
+
'fi-FI'?: ArticleTranslationInputDto | null;
|
|
8858
|
+
}
|
|
8776
8859
|
export interface CreateArticleDto {
|
|
8777
8860
|
code: string;
|
|
8861
|
+
/**
|
|
8862
|
+
* The default name, shown on an invoice row for a locale with no entry in `translations`.
|
|
8863
|
+
* @maxLength 80
|
|
8864
|
+
*/
|
|
8778
8865
|
name: string;
|
|
8866
|
+
/** The name per locale. A locale left out shows `name`. Omitted stores none. */
|
|
8867
|
+
translations?: ArticleTranslationsInputDto;
|
|
8779
8868
|
description?: string;
|
|
8780
8869
|
unit?: string;
|
|
8781
8870
|
articleCategory?: string;
|
|
@@ -8788,7 +8877,13 @@ export interface CreateArticleDto {
|
|
|
8788
8877
|
}
|
|
8789
8878
|
export interface UpdateArticleDto {
|
|
8790
8879
|
code?: string;
|
|
8880
|
+
/**
|
|
8881
|
+
* The default name, shown on an invoice row for a locale with no entry in `translations`.
|
|
8882
|
+
* @maxLength 80
|
|
8883
|
+
*/
|
|
8791
8884
|
name?: string;
|
|
8885
|
+
/** Replaces the article's per-locale names WHOLE: a locale left out loses its entry, and `{}` removes them all. Omitted leaves them alone. */
|
|
8886
|
+
translations?: ArticleTranslationsInputDto;
|
|
8792
8887
|
description?: string;
|
|
8793
8888
|
unit?: string;
|
|
8794
8889
|
articleCategory?: string;
|
|
@@ -8829,11 +8924,6 @@ export interface TenantBillingConfigDto {
|
|
|
8829
8924
|
defaultPaymentTermId: string | null;
|
|
8830
8925
|
/** @nullable */
|
|
8831
8926
|
defaultBillingFrequencyId: string | null;
|
|
8832
|
-
/**
|
|
8833
|
-
* Not read. Whether a saved card is charged on an invoice's due date is decided by the payment method (`defaultPaymentMethodId`, or the account's own) and its `isAutoChargeable`.
|
|
8834
|
-
* @deprecated
|
|
8835
|
-
*/
|
|
8836
|
-
autoChargeEnabled: boolean;
|
|
8837
8927
|
requiresPricingApproval: boolean;
|
|
8838
8928
|
/**
|
|
8839
8929
|
* The tenant's own legal-entity registration number (e.g. Swedish orgnummer).
|
|
@@ -8860,11 +8950,6 @@ export interface UpdateTenantBillingConfigDto {
|
|
|
8860
8950
|
defaultPaymentMethodId?: string;
|
|
8861
8951
|
defaultPaymentTermId?: string;
|
|
8862
8952
|
defaultBillingFrequencyId?: string;
|
|
8863
|
-
/**
|
|
8864
|
-
* Not read. Whether a saved card is charged on an invoice's due date is decided by the payment method (`defaultPaymentMethodId`, or the account's own) and its `isAutoChargeable`.
|
|
8865
|
-
* @deprecated
|
|
8866
|
-
*/
|
|
8867
|
-
autoChargeEnabled?: boolean;
|
|
8868
8953
|
requiresPricingApproval?: boolean;
|
|
8869
8954
|
/** The tenant's own legal-entity registration number (e.g. Swedish orgnummer). */
|
|
8870
8955
|
corporateIdentityNumber?: string;
|
|
@@ -8891,12 +8976,6 @@ export interface CustomerSubscriptionConfigDto {
|
|
|
8891
8976
|
billingAccountId: string;
|
|
8892
8977
|
/** @nullable */
|
|
8893
8978
|
billingFrequencyId: string | null;
|
|
8894
|
-
/**
|
|
8895
|
-
* Not read. Whether a saved card is charged on an invoice's due date is decided by the billing account's payment method (`paymentMethodId` on the account, else the tenant default) and its `isAutoChargeable`.
|
|
8896
|
-
* @deprecated
|
|
8897
|
-
* @nullable
|
|
8898
|
-
*/
|
|
8899
|
-
autoChargeEnabled: boolean | null;
|
|
8900
8979
|
/** @nullable */
|
|
8901
8980
|
bindingPlanId: string | null;
|
|
8902
8981
|
/**
|
|
@@ -8930,11 +9009,6 @@ export interface CreateCustomerSubscriptionConfigDto {
|
|
|
8930
9009
|
billingAccountId: string;
|
|
8931
9010
|
billingFrequencyId?: string;
|
|
8932
9011
|
bindingPlanId?: string;
|
|
8933
|
-
/**
|
|
8934
|
-
* Not read. Whether a saved card is charged on an invoice's due date is decided by the billing account's payment method (`paymentMethodId` on the account, else the tenant default) and its `isAutoChargeable`.
|
|
8935
|
-
* @deprecated
|
|
8936
|
-
*/
|
|
8937
|
-
autoChargeEnabled?: boolean;
|
|
8938
9012
|
/** Bigint volume (>= 0). */
|
|
8939
9013
|
volume?: number;
|
|
8940
9014
|
/** Bigint billable volume (>= 0). */
|
|
@@ -8949,11 +9023,6 @@ export interface CreateCustomerSubscriptionConfigDto {
|
|
|
8949
9023
|
export interface UpdateCustomerSubscriptionConfigDto {
|
|
8950
9024
|
billingFrequencyId?: string;
|
|
8951
9025
|
bindingPlanId?: string;
|
|
8952
|
-
/**
|
|
8953
|
-
* Not read. Whether a saved card is charged on an invoice's due date is decided by the billing account's payment method (`paymentMethodId` on the account, else the tenant default) and its `isAutoChargeable`.
|
|
8954
|
-
* @deprecated
|
|
8955
|
-
*/
|
|
8956
|
-
autoChargeEnabled?: boolean;
|
|
8957
9026
|
/** Bigint volume (>= 0). */
|
|
8958
9027
|
volume?: number;
|
|
8959
9028
|
/** Bigint billable volume (>= 0). */
|
|
@@ -14059,7 +14128,7 @@ export type OrganizationsControllerListV1Params = {
|
|
|
14059
14128
|
*/
|
|
14060
14129
|
type?: OrganizationsControllerListV1Type;
|
|
14061
14130
|
/**
|
|
14062
|
-
* Case-insensitive substring search
|
|
14131
|
+
* Case-insensitive substring search. Always matches the organization name, its corporate identity number (orgnr) and, given a whole id, the organization id. For tenant staff with `member:read`, and platform-admin, it also matches any live member's email, display name, first name, last name, "first last", and phone, and the billing account's invoice email; the member matched need not be the one shown as `owner`. Other callers, org users included, are not matched on those fields.
|
|
14063
14132
|
* @maxLength 200
|
|
14064
14133
|
*/
|
|
14065
14134
|
search?: string;
|
|
@@ -14079,7 +14148,7 @@ export type OrganizationsControllerStatsV1Params = {
|
|
|
14079
14148
|
*/
|
|
14080
14149
|
type?: OrganizationsControllerStatsV1Type;
|
|
14081
14150
|
/**
|
|
14082
|
-
* Case-insensitive substring search
|
|
14151
|
+
* Case-insensitive substring search. Always matches the organization name, its corporate identity number (orgnr) and, given a whole id, the organization id. For tenant staff with `member:read`, and platform-admin, it also matches any live member's email, display name, first name, last name, "first last", and phone, and the billing account's invoice email; the member matched need not be the one shown as `owner`. Other callers, org users included, are not matched on those fields. Matches exactly what GET /v1/organizations matches for the same caller.
|
|
14083
14152
|
* @maxLength 200
|
|
14084
14153
|
*/
|
|
14085
14154
|
search?: string;
|