@nomalism-com/types 0.40.41 → 0.40.42

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/index.cjs CHANGED
@@ -1528,7 +1528,8 @@ var createFromHeaderBodyKeys = {
1528
1528
  provider_ref: joi10.string().optional(),
1529
1529
  global_discount: joi10.number().min(0).max(100).optional(),
1530
1530
  current_account: joi10.boolean().optional(),
1531
- store_operator_id: joi10.string().uuid().allow(null).optional()
1531
+ store_operator_id: joi10.string().uuid().allow(null).optional(),
1532
+ account_code: joi10.number().integer().positive().max(999999999).allow(null).optional()
1532
1533
  };
1533
1534
  var createFromHeaderBody = joi10.object().keys(createFromHeaderBodyKeys).messages(messages);
1534
1535
  var findQueryKeys6 = {
@@ -1803,6 +1804,7 @@ var valueByVatTaxKeys = {
1803
1804
  var createProviderFinancialCreditNoteBodyKeys = {
1804
1805
  emission_date: joi16.date().required(),
1805
1806
  external_document_name: joi16.string().required(),
1807
+ account_code: joi16.number().integer().positive().max(999999999).allow(null).optional(),
1806
1808
  provider_id: joi16.string().uuid().required(),
1807
1809
  parent_document_header_id: joi16.string().uuid().optional().allow(null, ""),
1808
1810
  observations: joi16.string().allow(null, "").required(),
@@ -1827,6 +1829,7 @@ var createProviderServiceInvoiceBodyKeys = {
1827
1829
  provider_id: joi17.string().uuid().required(),
1828
1830
  emission_date: joi17.date().required(),
1829
1831
  external_document_name: joi17.string().required(),
1832
+ account_code: joi17.number().integer().positive().max(999999999).allow(null).optional(),
1830
1833
  observations: joi17.string().allow(null, "").required(),
1831
1834
  values: joi17.array().unique("taxPercentage").items(joi17.object().keys(valueByVatTaxKeys2).required()).required()
1832
1835
  };
@@ -2811,6 +2814,7 @@ var createBodyKeys28 = {
2811
2814
  inactive: joi40.boolean().default(false).optional(),
2812
2815
  default_discount: joi40.number().positive().allow(0).default(0).max(100).optional(),
2813
2816
  exemption_reason_id: joi40.string().uuid().allow(null).optional(),
2817
+ default_account_code: joi40.number().integer().positive().max(999999999).allow(null).optional(),
2814
2818
  main_persona: joi40.object().keys(createMainPersonaKeys3).required(),
2815
2819
  provider_type_id: joi40.string().uuid().allow(null).optional(),
2816
2820
  country_id: joi40.string().uuid().allow(null).optional(),
@@ -2828,6 +2832,8 @@ var updateBodyKeys24 = {
2828
2832
  manufacturer: joi40.boolean().optional(),
2829
2833
  inactive: joi40.boolean().optional(),
2830
2834
  default_discount: joi40.number().positive().allow(0).max(100).optional(),
2835
+ exemption_reason_id: joi40.string().uuid().allow(null).optional(),
2836
+ default_account_code: joi40.number().integer().positive().max(999999999).allow(null).optional(),
2831
2837
  provider_type_id: joi40.string().uuid().allow(null).optional(),
2832
2838
  country_id: joi40.string().uuid().allow(null).optional(),
2833
2839
  language_id: joi40.string().uuid().allow(null).optional(),
package/dist/index.js CHANGED
@@ -1528,7 +1528,8 @@ var createFromHeaderBodyKeys = {
1528
1528
  provider_ref: joi10.string().optional(),
1529
1529
  global_discount: joi10.number().min(0).max(100).optional(),
1530
1530
  current_account: joi10.boolean().optional(),
1531
- store_operator_id: joi10.string().uuid().allow(null).optional()
1531
+ store_operator_id: joi10.string().uuid().allow(null).optional(),
1532
+ account_code: joi10.number().integer().positive().max(999999999).allow(null).optional()
1532
1533
  };
1533
1534
  var createFromHeaderBody = joi10.object().keys(createFromHeaderBodyKeys).messages(messages);
1534
1535
  var findQueryKeys6 = {
@@ -1803,6 +1804,7 @@ var valueByVatTaxKeys = {
1803
1804
  var createProviderFinancialCreditNoteBodyKeys = {
1804
1805
  emission_date: joi16.date().required(),
1805
1806
  external_document_name: joi16.string().required(),
1807
+ account_code: joi16.number().integer().positive().max(999999999).allow(null).optional(),
1806
1808
  provider_id: joi16.string().uuid().required(),
1807
1809
  parent_document_header_id: joi16.string().uuid().optional().allow(null, ""),
1808
1810
  observations: joi16.string().allow(null, "").required(),
@@ -1827,6 +1829,7 @@ var createProviderServiceInvoiceBodyKeys = {
1827
1829
  provider_id: joi17.string().uuid().required(),
1828
1830
  emission_date: joi17.date().required(),
1829
1831
  external_document_name: joi17.string().required(),
1832
+ account_code: joi17.number().integer().positive().max(999999999).allow(null).optional(),
1830
1833
  observations: joi17.string().allow(null, "").required(),
1831
1834
  values: joi17.array().unique("taxPercentage").items(joi17.object().keys(valueByVatTaxKeys2).required()).required()
1832
1835
  };
@@ -2811,6 +2814,7 @@ var createBodyKeys28 = {
2811
2814
  inactive: joi40.boolean().default(false).optional(),
2812
2815
  default_discount: joi40.number().positive().allow(0).default(0).max(100).optional(),
2813
2816
  exemption_reason_id: joi40.string().uuid().allow(null).optional(),
2817
+ default_account_code: joi40.number().integer().positive().max(999999999).allow(null).optional(),
2814
2818
  main_persona: joi40.object().keys(createMainPersonaKeys3).required(),
2815
2819
  provider_type_id: joi40.string().uuid().allow(null).optional(),
2816
2820
  country_id: joi40.string().uuid().allow(null).optional(),
@@ -2828,6 +2832,8 @@ var updateBodyKeys24 = {
2828
2832
  manufacturer: joi40.boolean().optional(),
2829
2833
  inactive: joi40.boolean().optional(),
2830
2834
  default_discount: joi40.number().positive().allow(0).max(100).optional(),
2835
+ exemption_reason_id: joi40.string().uuid().allow(null).optional(),
2836
+ default_account_code: joi40.number().integer().positive().max(999999999).allow(null).optional(),
2831
2837
  provider_type_id: joi40.string().uuid().allow(null).optional(),
2832
2838
  country_id: joi40.string().uuid().allow(null).optional(),
2833
2839
  language_id: joi40.string().uuid().allow(null).optional(),
@@ -16,6 +16,7 @@ export interface ICreateProviderFinancialCreditNoteRequest {
16
16
  external_document_name: string;
17
17
  provider_id: string;
18
18
  parent_document_header_id: string | null;
19
+ account_code?: number | null;
19
20
  emission_date: Date;
20
21
  observations: string;
21
22
  values: IValueByVatTax[];
@@ -6,6 +6,7 @@ export interface IValueByVatTax {
6
6
  export interface ICreateProviderServiceInvoiceRequest {
7
7
  provider_id: string;
8
8
  external_document_name: string;
9
+ account_code?: number | null;
9
10
  emission_date: Date;
10
11
  observations: string;
11
12
  values: IValueByVatTax[];
@@ -117,6 +117,7 @@ export interface IDeliveryAdresses {
117
117
  export interface ICreateFromHeaderRequest {
118
118
  document_type_id: number;
119
119
  emission_date?: Date;
120
+ account_code?: number | null;
120
121
  from_header: string[];
121
122
  from_lines: string[];
122
123
  payments: (IPayment.ICreateRequest | IPayment.ICreateForThisDocumentHeaderRequest)[];
@@ -40,6 +40,7 @@ export interface ICreateRequest {
40
40
  inactive?: boolean;
41
41
  default_discount?: number;
42
42
  exemption_reason_id?: string | null;
43
+ default_account_code?: number | null;
43
44
  main_persona: ICreateMainPersona;
44
45
  provider_type_id?: string | null;
45
46
  country_id?: string | null;
@@ -66,6 +67,8 @@ export interface IUpdateRequest {
66
67
  default_maturity_date_id?: string;
67
68
  default_delivery_method_id?: string;
68
69
  default_vehicle_id?: string | null;
70
+ exemption_reason_id?: string | null;
71
+ default_account_code?: number | null;
69
72
  }
70
73
  export interface IFindByNumberRequest {
71
74
  number: number;
@@ -269,6 +269,7 @@ export type DocumentHeader = {
269
269
  owner_id: string;
270
270
  owner_number: number;
271
271
  owner_name: string | null;
272
+ account_code: number | null;
272
273
  billing_persona_id: string | null;
273
274
  billing_persona_nif: string | null;
274
275
  billing_persona_name: string | null;
@@ -103,6 +103,7 @@ export type Providers = {
103
103
  default_delivery_method_id: string | null;
104
104
  default_vehicle_id: string | null;
105
105
  default_discount: number;
106
+ default_account_code: number | null;
106
107
  created_at: Date;
107
108
  updated_at: Date;
108
109
  created_by: string;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@nomalism-com/types",
3
3
  "description": "A nomalism package with all necessary types and validations for developing APIs",
4
- "version": "0.40.41",
4
+ "version": "0.40.42",
5
5
  "author": "Nomalism <it.nomalism@gmail.com> (https://nomalism.com/)",
6
6
  "license": "UNLICENSED",
7
7
  "type": "module",
@@ -30,9 +30,9 @@
30
30
  },
31
31
  "devDependencies": {
32
32
  "@swc/core": "^1.15.3",
33
- "@types/node": "^24.10.1",
34
- "@typescript-eslint/eslint-plugin": "^8.48.1",
35
- "@typescript-eslint/parser": "^8.48.1",
33
+ "@types/node": "^24.10.2",
34
+ "@typescript-eslint/eslint-plugin": "^8.49.0",
35
+ "@typescript-eslint/parser": "^8.49.0",
36
36
  "eslint": "^9.39.1",
37
37
  "eslint-config-prettier": "^10.1.8",
38
38
  "eslint-import-resolver-typescript": "^4.4.4",