@spaceinvoices/js-sdk 14.13.0 → 14.15.0

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 (31) hide show
  1. package/dist/generated/items/items.d.cts +8 -1
  2. package/dist/generated/items/items.d.ts +8 -1
  3. package/dist/generated/model/createItemBody.d.cts +6 -0
  4. package/dist/generated/model/createItemBody.d.ts +6 -0
  5. package/dist/generated/model/createItemBodyUsage.d.cts +16 -0
  6. package/dist/generated/model/createItemBodyUsage.d.ts +16 -0
  7. package/dist/generated/model/getItemsParams.d.cts +6 -1
  8. package/dist/generated/model/getItemsParams.d.ts +6 -1
  9. package/dist/generated/model/getItemsUsage.d.cts +12 -0
  10. package/dist/generated/model/getItemsUsage.d.ts +12 -0
  11. package/dist/generated/model/index.d.cts +4 -0
  12. package/dist/generated/model/index.d.ts +4 -0
  13. package/dist/generated/model/item.d.cts +6 -0
  14. package/dist/generated/model/item.d.ts +6 -0
  15. package/dist/generated/model/itemUsage.d.cts +16 -0
  16. package/dist/generated/model/itemUsage.d.ts +16 -0
  17. package/dist/generated/model/transactionTypeCheckRequest.d.cts +5 -0
  18. package/dist/generated/model/transactionTypeCheckRequest.d.ts +5 -0
  19. package/dist/generated/model/updateItemBody.d.cts +6 -0
  20. package/dist/generated/model/updateItemBody.d.ts +6 -0
  21. package/dist/generated/model/updateItemBodyUsage.d.cts +16 -0
  22. package/dist/generated/model/updateItemBodyUsage.d.ts +16 -0
  23. package/dist/generated-zod/items/items.d.cts +14 -2
  24. package/dist/generated-zod/items/items.d.ts +14 -2
  25. package/dist/generated-zod/transaction-type/transaction-type.d.cts +1 -0
  26. package/dist/generated-zod/transaction-type/transaction-type.d.ts +1 -0
  27. package/dist/generated-zod/vies/vies.d.cts +1 -0
  28. package/dist/generated-zod/vies/vies.d.ts +1 -0
  29. package/dist/index.cjs +6 -6
  30. package/dist/index.js +6 -6
  31. package/package.json +1 -1
@@ -71,6 +71,10 @@ export type getItemsResponse404 = {
71
71
  data: Error;
72
72
  status: 404;
73
73
  };
74
+ export type getItemsResponse422 = {
75
+ data: ValidationError;
76
+ status: 422;
77
+ };
74
78
  export type getItemsResponse500 = {
75
79
  data: Error;
76
80
  status: 500;
@@ -78,7 +82,7 @@ export type getItemsResponse500 = {
78
82
  export type getItemsResponseSuccess = (getItemsResponse200) & {
79
83
  headers: Headers;
80
84
  };
81
- export type getItemsResponseError = (getItemsResponse400 | getItemsResponse401 | getItemsResponse403 | getItemsResponse404 | getItemsResponse500) & {
85
+ export type getItemsResponseError = (getItemsResponse400 | getItemsResponse401 | getItemsResponse403 | getItemsResponse404 | getItemsResponse422 | getItemsResponse500) & {
82
86
  headers: Headers;
83
87
  };
84
88
  export type getItemsResponse = (getItemsResponseSuccess | getItemsResponseError);
@@ -126,6 +130,7 @@ export declare const getItemCategories: (options?: RequestInit) => Promise<getIt
126
130
 
127
131
  Preset fields:
128
132
  - classification: one of product, service, advance
133
+ - usage: sale, purchase or both (sales and purchases); when updating, leave empty to keep the current value
129
134
  - track_inventory: yes or no
130
135
  - price / gross_price: fill exactly one, not both
131
136
  - tax_rate: must equal an existing tax rate of the entity (e.g. 22)
@@ -181,6 +186,7 @@ export declare const getItemsImportTemplate: (params: GetItemsImportTemplatePara
181
186
 
182
187
  Preset fields:
183
188
  - classification: one of product, service, advance
189
+ - usage: sale, purchase or both (sales and purchases); when updating, leave empty to keep the current value
184
190
  - track_inventory: yes or no
185
191
  - price / gross_price: fill exactly one, not both
186
192
  - tax_rate: must equal an existing tax rate of the entity (e.g. 22)
@@ -236,6 +242,7 @@ export declare const previewItemsImport: (previewItemsImportBody: PreviewItemsIm
236
242
 
237
243
  Preset fields:
238
244
  - classification: one of product, service, advance
245
+ - usage: sale, purchase or both (sales and purchases); when updating, leave empty to keep the current value
239
246
  - track_inventory: yes or no
240
247
  - price / gross_price: fill exactly one, not both
241
248
  - tax_rate: must equal an existing tax rate of the entity (e.g. 22)
@@ -71,6 +71,10 @@ export type getItemsResponse404 = {
71
71
  data: Error;
72
72
  status: 404;
73
73
  };
74
+ export type getItemsResponse422 = {
75
+ data: ValidationError;
76
+ status: 422;
77
+ };
74
78
  export type getItemsResponse500 = {
75
79
  data: Error;
76
80
  status: 500;
@@ -78,7 +82,7 @@ export type getItemsResponse500 = {
78
82
  export type getItemsResponseSuccess = (getItemsResponse200) & {
79
83
  headers: Headers;
80
84
  };
81
- export type getItemsResponseError = (getItemsResponse400 | getItemsResponse401 | getItemsResponse403 | getItemsResponse404 | getItemsResponse500) & {
85
+ export type getItemsResponseError = (getItemsResponse400 | getItemsResponse401 | getItemsResponse403 | getItemsResponse404 | getItemsResponse422 | getItemsResponse500) & {
82
86
  headers: Headers;
83
87
  };
84
88
  export type getItemsResponse = (getItemsResponseSuccess | getItemsResponseError);
@@ -126,6 +130,7 @@ export declare const getItemCategories: (options?: RequestInit) => Promise<getIt
126
130
 
127
131
  Preset fields:
128
132
  - classification: one of product, service, advance
133
+ - usage: sale, purchase or both (sales and purchases); when updating, leave empty to keep the current value
129
134
  - track_inventory: yes or no
130
135
  - price / gross_price: fill exactly one, not both
131
136
  - tax_rate: must equal an existing tax rate of the entity (e.g. 22)
@@ -181,6 +186,7 @@ export declare const getItemsImportTemplate: (params: GetItemsImportTemplatePara
181
186
 
182
187
  Preset fields:
183
188
  - classification: one of product, service, advance
189
+ - usage: sale, purchase or both (sales and purchases); when updating, leave empty to keep the current value
184
190
  - track_inventory: yes or no
185
191
  - price / gross_price: fill exactly one, not both
186
192
  - tax_rate: must equal an existing tax rate of the entity (e.g. 22)
@@ -236,6 +242,7 @@ export declare const previewItemsImport: (previewItemsImportBody: PreviewItemsIm
236
242
 
237
243
  Preset fields:
238
244
  - classification: one of product, service, advance
245
+ - usage: sale, purchase or both (sales and purchases); when updating, leave empty to keep the current value
239
246
  - track_inventory: yes or no
240
247
  - price / gross_price: fill exactly one, not both
241
248
  - tax_rate: must equal an existing tax rate of the entity (e.g. 22)
@@ -8,6 +8,7 @@
8
8
  import type { CreateItemBodyClassification } from './createItemBodyClassification.cjs';
9
9
  import type { CreateItemBodyMetadata } from './createItemBodyMetadata.cjs';
10
10
  import type { CreateItemBodyTaxesItem } from './createItemBodyTaxesItem.cjs';
11
+ import type { CreateItemBodyUsage } from './createItemBodyUsage.cjs';
11
12
  import type { DocumentItemEInvoicingData } from './documentItemEInvoicingData.cjs';
12
13
  import type { DocumentItemTranslationsInput } from './documentItemTranslationsInput.cjs';
13
14
  export type CreateItemBody = {
@@ -51,6 +52,11 @@ export type CreateItemBody = {
51
52
  * @nullable
52
53
  */
53
54
  sku?: string | null;
55
+ /**
56
+ * What the item is used for: `sale` (shown when picking items for sales documents), `purchase` (shown when picking items for expenses and purchase orders). Omit or send null for both.
57
+ * @nullable
58
+ */
59
+ usage?: CreateItemBodyUsage;
54
60
  /**
55
61
  * GTIN/EAN/UPC barcode. Omit or send null for none.
56
62
  * @maxLength 50
@@ -8,6 +8,7 @@
8
8
  import type { CreateItemBodyClassification } from './createItemBodyClassification.js';
9
9
  import type { CreateItemBodyMetadata } from './createItemBodyMetadata.js';
10
10
  import type { CreateItemBodyTaxesItem } from './createItemBodyTaxesItem.js';
11
+ import type { CreateItemBodyUsage } from './createItemBodyUsage.js';
11
12
  import type { DocumentItemEInvoicingData } from './documentItemEInvoicingData.js';
12
13
  import type { DocumentItemTranslationsInput } from './documentItemTranslationsInput.js';
13
14
  export type CreateItemBody = {
@@ -51,6 +52,11 @@ export type CreateItemBody = {
51
52
  * @nullable
52
53
  */
53
54
  sku?: string | null;
55
+ /**
56
+ * What the item is used for: `sale` (shown when picking items for sales documents), `purchase` (shown when picking items for expenses and purchase orders). Omit or send null for both.
57
+ * @nullable
58
+ */
59
+ usage?: CreateItemBodyUsage;
54
60
  /**
55
61
  * GTIN/EAN/UPC barcode. Omit or send null for none.
56
62
  * @maxLength 50
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Generated by orval v8.5.3 🍺
3
+ * Do not edit manually.
4
+ * Space Invoices API
5
+ * REST API for invoice management, customer management, and accounting operations. Features include cursor-based pagination for efficient data navigation, flexible JSON querying with MongoDB-style operators, full-text search across multiple fields, and comprehensive metadata support for custom tracking.
6
+ * OpenAPI spec version: 1.0.0
7
+ */
8
+ /**
9
+ * What the item is used for: `sale` (shown when picking items for sales documents), `purchase` (shown when picking items for expenses and purchase orders). Omit or send null for both.
10
+ * @nullable
11
+ */
12
+ export type CreateItemBodyUsage = typeof CreateItemBodyUsage[keyof typeof CreateItemBodyUsage] | null;
13
+ export declare const CreateItemBodyUsage: {
14
+ readonly sale: "sale";
15
+ readonly purchase: "purchase";
16
+ };
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Generated by orval v8.5.3 🍺
3
+ * Do not edit manually.
4
+ * Space Invoices API
5
+ * REST API for invoice management, customer management, and accounting operations. Features include cursor-based pagination for efficient data navigation, flexible JSON querying with MongoDB-style operators, full-text search across multiple fields, and comprehensive metadata support for custom tracking.
6
+ * OpenAPI spec version: 1.0.0
7
+ */
8
+ /**
9
+ * What the item is used for: `sale` (shown when picking items for sales documents), `purchase` (shown when picking items for expenses and purchase orders). Omit or send null for both.
10
+ * @nullable
11
+ */
12
+ export type CreateItemBodyUsage = typeof CreateItemBodyUsage[keyof typeof CreateItemBodyUsage] | null;
13
+ export declare const CreateItemBodyUsage: {
14
+ readonly sale: "sale";
15
+ readonly purchase: "purchase";
16
+ };
@@ -5,6 +5,7 @@
5
5
  * REST API for invoice management, customer management, and accounting operations. Features include cursor-based pagination for efficient data navigation, flexible JSON querying with MongoDB-style operators, full-text search across multiple fields, and comprehensive metadata support for custom tracking.
6
6
  * OpenAPI spec version: 1.0.0
7
7
  */
8
+ import type { GetItemsUsage } from './getItemsUsage.cjs';
8
9
  export type GetItemsParams = {
9
10
  /**
10
11
  * Number of results per request.
@@ -48,7 +49,7 @@ export type GetItemsParams = {
48
49
  - `endsWith` - String ends with
49
50
  - `between` - Value between two numbers/dates [min, max]
50
51
 
51
- **Allowed fields:** id, name, description, price, unit, categories, track_inventory, created_at, updated_at
52
+ **Allowed fields:** id, name, description, price, unit, categories, track_inventory, usage, created_at, updated_at
52
53
 
53
54
  **Examples:**
54
55
  - `{"total": {"gte": 1000}}` - Invoices over 1000
@@ -70,4 +71,8 @@ export type GetItemsParams = {
70
71
  * Comma-separated categories. Returns items in *any* of them, which is what a point-of-sale category chip filters by. Shorthand for the equivalent `query` operator form, kept because a filter row should not have to build JSON.
71
72
  */
72
73
  categories?: string;
74
+ /**
75
+ * Items for this side: items with this usage, items without a usage, and inventory-tracked items. Use `sale` for pickers on sales documents and `purchase` for pickers on expenses and purchase orders. Omit to list every item.
76
+ */
77
+ usage?: GetItemsUsage;
73
78
  };
@@ -5,6 +5,7 @@
5
5
  * REST API for invoice management, customer management, and accounting operations. Features include cursor-based pagination for efficient data navigation, flexible JSON querying with MongoDB-style operators, full-text search across multiple fields, and comprehensive metadata support for custom tracking.
6
6
  * OpenAPI spec version: 1.0.0
7
7
  */
8
+ import type { GetItemsUsage } from './getItemsUsage.js';
8
9
  export type GetItemsParams = {
9
10
  /**
10
11
  * Number of results per request.
@@ -48,7 +49,7 @@ export type GetItemsParams = {
48
49
  - `endsWith` - String ends with
49
50
  - `between` - Value between two numbers/dates [min, max]
50
51
 
51
- **Allowed fields:** id, name, description, price, unit, categories, track_inventory, created_at, updated_at
52
+ **Allowed fields:** id, name, description, price, unit, categories, track_inventory, usage, created_at, updated_at
52
53
 
53
54
  **Examples:**
54
55
  - `{"total": {"gte": 1000}}` - Invoices over 1000
@@ -70,4 +71,8 @@ export type GetItemsParams = {
70
71
  * Comma-separated categories. Returns items in *any* of them, which is what a point-of-sale category chip filters by. Shorthand for the equivalent `query` operator form, kept because a filter row should not have to build JSON.
71
72
  */
72
73
  categories?: string;
74
+ /**
75
+ * Items for this side: items with this usage, items without a usage, and inventory-tracked items. Use `sale` for pickers on sales documents and `purchase` for pickers on expenses and purchase orders. Omit to list every item.
76
+ */
77
+ usage?: GetItemsUsage;
73
78
  };
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Generated by orval v8.5.3 🍺
3
+ * Do not edit manually.
4
+ * Space Invoices API
5
+ * REST API for invoice management, customer management, and accounting operations. Features include cursor-based pagination for efficient data navigation, flexible JSON querying with MongoDB-style operators, full-text search across multiple fields, and comprehensive metadata support for custom tracking.
6
+ * OpenAPI spec version: 1.0.0
7
+ */
8
+ export type GetItemsUsage = typeof GetItemsUsage[keyof typeof GetItemsUsage];
9
+ export declare const GetItemsUsage: {
10
+ readonly sale: "sale";
11
+ readonly purchase: "purchase";
12
+ };
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Generated by orval v8.5.3 🍺
3
+ * Do not edit manually.
4
+ * Space Invoices API
5
+ * REST API for invoice management, customer management, and accounting operations. Features include cursor-based pagination for efficient data navigation, flexible JSON querying with MongoDB-style operators, full-text search across multiple fields, and comprehensive metadata support for custom tracking.
6
+ * OpenAPI spec version: 1.0.0
7
+ */
8
+ export type GetItemsUsage = typeof GetItemsUsage[keyof typeof GetItemsUsage];
9
+ export declare const GetItemsUsage: {
10
+ readonly sale: "sale";
11
+ readonly purchase: "purchase";
12
+ };
@@ -259,6 +259,7 @@ export * from './createItemBodyEInvoicing.cjs';
259
259
  export * from './createItemBodyMetadata.cjs';
260
260
  export * from './createItemBodyTaxesItem.cjs';
261
261
  export * from './createItemBodyTranslations.cjs';
262
+ export * from './createItemBodyUsage.cjs';
262
263
  export * from './createItemInventoryMovementBody.cjs';
263
264
  export * from './createItemInventoryMovementBodyType.cjs';
264
265
  export * from './createMigrationJobRequest.cjs';
@@ -892,6 +893,7 @@ export * from './getItemsImportTemplateFormat.cjs';
892
893
  export * from './getItemsImportTemplateLanguage.cjs';
893
894
  export * from './getItemsImportTemplateParams.cjs';
894
895
  export * from './getItemsParams.cjs';
896
+ export * from './getItemsUsage.cjs';
895
897
  export * from './getLegacyMigrationOrganization200.cjs';
896
898
  export * from './getLegacyMigrationOrganization200SubscriptionReview.cjs';
897
899
  export * from './getLegacyMigrationOrganization200UnsupportedItem.cjs';
@@ -1029,6 +1031,7 @@ export * from './itemsImportReport.cjs';
1029
1031
  export * from './itemsImportReportRowsItem.cjs';
1030
1032
  export * from './itemsImportReportRowsItemAction.cjs';
1031
1033
  export * from './itemsImportReportRowsItemStock.cjs';
1034
+ export * from './itemUsage.cjs';
1032
1035
  export * from './ksefDocumentData.cjs';
1033
1036
  export * from './ksefDocumentDataStatus.cjs';
1034
1037
  export * from './ksefEntitySettings.cjs';
@@ -1809,6 +1812,7 @@ export * from './updateItemBodyEInvoicing.cjs';
1809
1812
  export * from './updateItemBodyMetadata.cjs';
1810
1813
  export * from './updateItemBodyTaxesItem.cjs';
1811
1814
  export * from './updateItemBodyTranslations.cjs';
1815
+ export * from './updateItemBodyUsage.cjs';
1812
1816
  export * from './updateKsefSettings.cjs';
1813
1817
  export * from './updateKsefSettingsObligation.cjs';
1814
1818
  export * from './updateNavSettings.cjs';
@@ -259,6 +259,7 @@ export * from './createItemBodyEInvoicing.js';
259
259
  export * from './createItemBodyMetadata.js';
260
260
  export * from './createItemBodyTaxesItem.js';
261
261
  export * from './createItemBodyTranslations.js';
262
+ export * from './createItemBodyUsage.js';
262
263
  export * from './createItemInventoryMovementBody.js';
263
264
  export * from './createItemInventoryMovementBodyType.js';
264
265
  export * from './createMigrationJobRequest.js';
@@ -892,6 +893,7 @@ export * from './getItemsImportTemplateFormat.js';
892
893
  export * from './getItemsImportTemplateLanguage.js';
893
894
  export * from './getItemsImportTemplateParams.js';
894
895
  export * from './getItemsParams.js';
896
+ export * from './getItemsUsage.js';
895
897
  export * from './getLegacyMigrationOrganization200.js';
896
898
  export * from './getLegacyMigrationOrganization200SubscriptionReview.js';
897
899
  export * from './getLegacyMigrationOrganization200UnsupportedItem.js';
@@ -1029,6 +1031,7 @@ export * from './itemsImportReport.js';
1029
1031
  export * from './itemsImportReportRowsItem.js';
1030
1032
  export * from './itemsImportReportRowsItemAction.js';
1031
1033
  export * from './itemsImportReportRowsItemStock.js';
1034
+ export * from './itemUsage.js';
1032
1035
  export * from './ksefDocumentData.js';
1033
1036
  export * from './ksefDocumentDataStatus.js';
1034
1037
  export * from './ksefEntitySettings.js';
@@ -1809,6 +1812,7 @@ export * from './updateItemBodyEInvoicing.js';
1809
1812
  export * from './updateItemBodyMetadata.js';
1810
1813
  export * from './updateItemBodyTaxesItem.js';
1811
1814
  export * from './updateItemBodyTranslations.js';
1815
+ export * from './updateItemBodyUsage.js';
1812
1816
  export * from './updateKsefSettings.js';
1813
1817
  export * from './updateKsefSettingsObligation.js';
1814
1818
  export * from './updateNavSettings.js';
@@ -9,6 +9,7 @@ import type { DocumentItemEInvoicingData } from './documentItemEInvoicingData.cj
9
9
  import type { DocumentItemTranslations } from './documentItemTranslations.cjs';
10
10
  import type { ItemClassification } from './itemClassification.cjs';
11
11
  import type { ItemMetadata } from './itemMetadata.cjs';
12
+ import type { ItemUsage } from './itemUsage.cjs';
12
13
  /**
13
14
  * Product or service item
14
15
  */
@@ -53,6 +54,11 @@ export interface Item {
53
54
  * @nullable
54
55
  */
55
56
  sku?: string | null;
57
+ /**
58
+ * What the item is used for: `sale` (shown when picking items for sales documents), `purchase` (shown when picking items for expenses and purchase orders), or null for both.
59
+ * @nullable
60
+ */
61
+ usage?: ItemUsage;
56
62
  /**
57
63
  * GTIN/EAN/UPC barcode
58
64
  * @nullable
@@ -9,6 +9,7 @@ import type { DocumentItemEInvoicingData } from './documentItemEInvoicingData.js
9
9
  import type { DocumentItemTranslations } from './documentItemTranslations.js';
10
10
  import type { ItemClassification } from './itemClassification.js';
11
11
  import type { ItemMetadata } from './itemMetadata.js';
12
+ import type { ItemUsage } from './itemUsage.js';
12
13
  /**
13
14
  * Product or service item
14
15
  */
@@ -53,6 +54,11 @@ export interface Item {
53
54
  * @nullable
54
55
  */
55
56
  sku?: string | null;
57
+ /**
58
+ * What the item is used for: `sale` (shown when picking items for sales documents), `purchase` (shown when picking items for expenses and purchase orders), or null for both.
59
+ * @nullable
60
+ */
61
+ usage?: ItemUsage;
56
62
  /**
57
63
  * GTIN/EAN/UPC barcode
58
64
  * @nullable
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Generated by orval v8.5.3 🍺
3
+ * Do not edit manually.
4
+ * Space Invoices API
5
+ * REST API for invoice management, customer management, and accounting operations. Features include cursor-based pagination for efficient data navigation, flexible JSON querying with MongoDB-style operators, full-text search across multiple fields, and comprehensive metadata support for custom tracking.
6
+ * OpenAPI spec version: 1.0.0
7
+ */
8
+ /**
9
+ * What the item is used for: `sale` (shown when picking items for sales documents), `purchase` (shown when picking items for expenses and purchase orders), or null for both.
10
+ * @nullable
11
+ */
12
+ export type ItemUsage = typeof ItemUsage[keyof typeof ItemUsage] | null;
13
+ export declare const ItemUsage: {
14
+ readonly sale: "sale";
15
+ readonly purchase: "purchase";
16
+ };
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Generated by orval v8.5.3 🍺
3
+ * Do not edit manually.
4
+ * Space Invoices API
5
+ * REST API for invoice management, customer management, and accounting operations. Features include cursor-based pagination for efficient data navigation, flexible JSON querying with MongoDB-style operators, full-text search across multiple fields, and comprehensive metadata support for custom tracking.
6
+ * OpenAPI spec version: 1.0.0
7
+ */
8
+ /**
9
+ * What the item is used for: `sale` (shown when picking items for sales documents), `purchase` (shown when picking items for expenses and purchase orders), or null for both.
10
+ * @nullable
11
+ */
12
+ export type ItemUsage = typeof ItemUsage[keyof typeof ItemUsage] | null;
13
+ export declare const ItemUsage: {
14
+ readonly sale: "sale";
15
+ readonly purchase: "purchase";
16
+ };
@@ -24,4 +24,9 @@ export interface TransactionTypeCheckRequest {
24
24
  * @nullable
25
25
  */
26
26
  items?: TransactionTypeCheckRequestItemsItem[] | null;
27
+ /**
28
+ * Set true to check the customer's VAT number in VIES again instead of reusing a recent failed lookup. A stored valid or invalid result is still used.
29
+ * @nullable
30
+ */
31
+ refresh?: boolean | null;
27
32
  }
@@ -24,4 +24,9 @@ export interface TransactionTypeCheckRequest {
24
24
  * @nullable
25
25
  */
26
26
  items?: TransactionTypeCheckRequestItemsItem[] | null;
27
+ /**
28
+ * Set true to check the customer's VAT number in VIES again instead of reusing a recent failed lookup. A stored valid or invalid result is still used.
29
+ * @nullable
30
+ */
31
+ refresh?: boolean | null;
27
32
  }
@@ -10,6 +10,7 @@ import type { DocumentItemTranslationsInput } from './documentItemTranslationsIn
10
10
  import type { UpdateItemBodyClassification } from './updateItemBodyClassification.cjs';
11
11
  import type { UpdateItemBodyMetadata } from './updateItemBodyMetadata.cjs';
12
12
  import type { UpdateItemBodyTaxesItem } from './updateItemBodyTaxesItem.cjs';
13
+ import type { UpdateItemBodyUsage } from './updateItemBodyUsage.cjs';
13
14
  export type UpdateItemBody = {
14
15
  /** @minLength 1 */
15
16
  name?: string;
@@ -51,6 +52,11 @@ export type UpdateItemBody = {
51
52
  * @nullable
52
53
  */
53
54
  sku?: string | null;
55
+ /**
56
+ * What the item is used for: `sale` (shown when picking items for sales documents), `purchase` (shown when picking items for expenses and purchase orders). Omit to keep the current value; send null to clear it so the item is used for both.
57
+ * @nullable
58
+ */
59
+ usage?: UpdateItemBodyUsage;
54
60
  /**
55
61
  * GTIN/EAN/UPC barcode. Omit or send null for none.
56
62
  * @maxLength 50
@@ -10,6 +10,7 @@ import type { DocumentItemTranslationsInput } from './documentItemTranslationsIn
10
10
  import type { UpdateItemBodyClassification } from './updateItemBodyClassification.js';
11
11
  import type { UpdateItemBodyMetadata } from './updateItemBodyMetadata.js';
12
12
  import type { UpdateItemBodyTaxesItem } from './updateItemBodyTaxesItem.js';
13
+ import type { UpdateItemBodyUsage } from './updateItemBodyUsage.js';
13
14
  export type UpdateItemBody = {
14
15
  /** @minLength 1 */
15
16
  name?: string;
@@ -51,6 +52,11 @@ export type UpdateItemBody = {
51
52
  * @nullable
52
53
  */
53
54
  sku?: string | null;
55
+ /**
56
+ * What the item is used for: `sale` (shown when picking items for sales documents), `purchase` (shown when picking items for expenses and purchase orders). Omit to keep the current value; send null to clear it so the item is used for both.
57
+ * @nullable
58
+ */
59
+ usage?: UpdateItemBodyUsage;
54
60
  /**
55
61
  * GTIN/EAN/UPC barcode. Omit or send null for none.
56
62
  * @maxLength 50
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Generated by orval v8.5.3 🍺
3
+ * Do not edit manually.
4
+ * Space Invoices API
5
+ * REST API for invoice management, customer management, and accounting operations. Features include cursor-based pagination for efficient data navigation, flexible JSON querying with MongoDB-style operators, full-text search across multiple fields, and comprehensive metadata support for custom tracking.
6
+ * OpenAPI spec version: 1.0.0
7
+ */
8
+ /**
9
+ * What the item is used for: `sale` (shown when picking items for sales documents), `purchase` (shown when picking items for expenses and purchase orders). Omit to keep the current value; send null to clear it so the item is used for both.
10
+ * @nullable
11
+ */
12
+ export type UpdateItemBodyUsage = typeof UpdateItemBodyUsage[keyof typeof UpdateItemBodyUsage] | null;
13
+ export declare const UpdateItemBodyUsage: {
14
+ readonly sale: "sale";
15
+ readonly purchase: "purchase";
16
+ };
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Generated by orval v8.5.3 🍺
3
+ * Do not edit manually.
4
+ * Space Invoices API
5
+ * REST API for invoice management, customer management, and accounting operations. Features include cursor-based pagination for efficient data navigation, flexible JSON querying with MongoDB-style operators, full-text search across multiple fields, and comprehensive metadata support for custom tracking.
6
+ * OpenAPI spec version: 1.0.0
7
+ */
8
+ /**
9
+ * What the item is used for: `sale` (shown when picking items for sales documents), `purchase` (shown when picking items for expenses and purchase orders). Omit to keep the current value; send null to clear it so the item is used for both.
10
+ * @nullable
11
+ */
12
+ export type UpdateItemBodyUsage = typeof UpdateItemBodyUsage[keyof typeof UpdateItemBodyUsage] | null;
13
+ export declare const UpdateItemBodyUsage: {
14
+ readonly sale: "sale";
15
+ readonly purchase: "purchase";
16
+ };
@@ -138,6 +138,7 @@ export declare const CreateItemBody: zod.ZodObject<{
138
138
  categories: zod.ZodOptional<zod.ZodNullable<zod.ZodArray<zod.ZodString>>>;
139
139
  track_inventory: zod.ZodOptional<zod.ZodNullable<zod.ZodBoolean>>;
140
140
  sku: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
141
+ usage: zod.ZodOptional<zod.ZodNullable<zod.ZodUnion<readonly [zod.ZodLiteral<"sale">, zod.ZodLiteral<"purchase">, zod.ZodLiteral<null>]>>>;
141
142
  barcode: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
142
143
  purchase_price: zod.ZodOptional<zod.ZodNullable<zod.ZodNumber>>;
143
144
  financial_category_id: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
@@ -230,6 +231,10 @@ export declare const GetItemsQueryParams: zod.ZodObject<{
230
231
  search: zod.ZodOptional<zod.ZodString>;
231
232
  deleted: zod.ZodOptional<zod.ZodBoolean>;
232
233
  categories: zod.ZodOptional<zod.ZodString>;
234
+ usage: zod.ZodOptional<zod.ZodEnum<{
235
+ sale: "sale";
236
+ purchase: "purchase";
237
+ }>>;
233
238
  }, zod.z.core.$strip>;
234
239
  export declare const GetItemsHeader: zod.ZodObject<{
235
240
  "x-entity-id": zod.ZodOptional<zod.ZodString>;
@@ -359,6 +364,7 @@ export declare const GetItemsResponse: zod.ZodObject<{
359
364
  categories: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
360
365
  track_inventory: zod.ZodOptional<zod.ZodBoolean>;
361
366
  sku: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
367
+ usage: zod.ZodOptional<zod.ZodNullable<zod.ZodUnion<readonly [zod.ZodLiteral<"sale">, zod.ZodLiteral<"purchase">, zod.ZodLiteral<null>]>>>;
362
368
  barcode: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
363
369
  purchase_price: zod.ZodOptional<zod.ZodNullable<zod.ZodNumber>>;
364
370
  total_tax: zod.ZodNumber;
@@ -435,6 +441,7 @@ export declare const GetItemCategoriesResponse: zod.ZodObject<{
435
441
 
436
442
  Preset fields:
437
443
  - classification: one of product, service, advance
444
+ - usage: sale, purchase or both (sales and purchases); when updating, leave empty to keep the current value
438
445
  - track_inventory: yes or no
439
446
  - price / gross_price: fill exactly one, not both
440
447
  - tax_rate: must equal an existing tax rate of the entity (e.g. 22)
@@ -459,6 +466,7 @@ export declare const GetItemsImportTemplateHeader: zod.ZodObject<{
459
466
 
460
467
  Preset fields:
461
468
  - classification: one of product, service, advance
469
+ - usage: sale, purchase or both (sales and purchases); when updating, leave empty to keep the current value
462
470
  - track_inventory: yes or no
463
471
  - price / gross_price: fill exactly one, not both
464
472
  - tax_rate: must equal an existing tax rate of the entity (e.g. 22)
@@ -505,6 +513,7 @@ export declare const PreviewItemsImportResponse: zod.ZodObject<{
505
513
 
506
514
  Preset fields:
507
515
  - classification: one of product, service, advance
516
+ - usage: sale, purchase or both (sales and purchases); when updating, leave empty to keep the current value
508
517
  - track_inventory: yes or no
509
518
  - price / gross_price: fill exactly one, not both
510
519
  - tax_rate: must equal an existing tax rate of the entity (e.g. 22)
@@ -682,6 +691,7 @@ export declare const UpdateItemBody: zod.ZodObject<{
682
691
  categories: zod.ZodOptional<zod.ZodNullable<zod.ZodArray<zod.ZodString>>>;
683
692
  track_inventory: zod.ZodOptional<zod.ZodNullable<zod.ZodBoolean>>;
684
693
  sku: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
694
+ usage: zod.ZodOptional<zod.ZodNullable<zod.ZodUnion<readonly [zod.ZodLiteral<"sale">, zod.ZodLiteral<"purchase">, zod.ZodLiteral<null>]>>>;
685
695
  barcode: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
686
696
  purchase_price: zod.ZodOptional<zod.ZodNullable<zod.ZodNumber>>;
687
697
  financial_category_id: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
@@ -860,6 +870,7 @@ export declare const UpdateItemResponse: zod.ZodIntersection<zod.ZodObject<{
860
870
  categories: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
861
871
  track_inventory: zod.ZodOptional<zod.ZodBoolean>;
862
872
  sku: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
873
+ usage: zod.ZodOptional<zod.ZodNullable<zod.ZodUnion<readonly [zod.ZodLiteral<"sale">, zod.ZodLiteral<"purchase">, zod.ZodLiteral<null>]>>>;
863
874
  barcode: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
864
875
  purchase_price: zod.ZodOptional<zod.ZodNullable<zod.ZodNumber>>;
865
876
  total_tax: zod.ZodNumber;
@@ -1060,6 +1071,7 @@ export declare const RestoreItemResponse: zod.ZodIntersection<zod.ZodObject<{
1060
1071
  categories: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
1061
1072
  track_inventory: zod.ZodOptional<zod.ZodBoolean>;
1062
1073
  sku: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
1074
+ usage: zod.ZodOptional<zod.ZodNullable<zod.ZodUnion<readonly [zod.ZodLiteral<"sale">, zod.ZodLiteral<"purchase">, zod.ZodLiteral<null>]>>>;
1063
1075
  barcode: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
1064
1076
  purchase_price: zod.ZodOptional<zod.ZodNullable<zod.ZodNumber>>;
1065
1077
  total_tax: zod.ZodNumber;
@@ -1180,12 +1192,12 @@ export declare const GetItemInventoryMovementsResponse: zod.ZodObject<{
1180
1192
  id: zod.ZodString;
1181
1193
  item_id: zod.ZodString;
1182
1194
  type: zod.ZodEnum<{
1195
+ sale: "sale";
1196
+ purchase: "purchase";
1183
1197
  adjustment_in: "adjustment_in";
1184
1198
  adjustment_out: "adjustment_out";
1185
1199
  write_off: "write_off";
1186
1200
  transfer: "transfer";
1187
- purchase: "purchase";
1188
- sale: "sale";
1189
1201
  sale_return: "sale_return";
1190
1202
  }>;
1191
1203
  quantity: zod.ZodNumber;