@nomalism-com/types 1.3.48 → 1.3.50

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
@@ -761,10 +761,12 @@ var checkLineInPrisonOptions = [
761
761
  // src/modules/stock/productGoogleSheets/interface.ts
762
762
  var interface_exports19 = {};
763
763
  __export(interface_exports19, {
764
+ InventoryCategoryEnum: () => InventoryCategoryEnum,
764
765
  ProductStateEnum: () => ProductStateEnum,
765
766
  ProductStateLabels: () => ProductStateLabels,
766
767
  ProductTypeEnum: () => ProductTypeEnum,
767
768
  Route: () => Route62,
769
+ SaftProductTypeEnum: () => SaftProductTypeEnum,
768
770
  productState: () => productState,
769
771
  productTypes: () => productTypes
770
772
  });
@@ -789,9 +791,23 @@ var ProductTypeEnum = {
789
791
  Producao: "Producao",
790
792
  Portes: "Portes",
791
793
  RM: "RM",
792
- Montagem: "Montagem"
794
+ Montagem: "Montagem",
795
+ Adiantamento: "Adiantamento"
793
796
  };
794
797
  var productTypes = Object.keys(ProductTypeEnum);
798
+ var SaftProductTypeEnum = {
799
+ P: "P",
800
+ S: "S",
801
+ O: "O"
802
+ };
803
+ var InventoryCategoryEnum = {
804
+ M: "M",
805
+ P: "P",
806
+ A: "A",
807
+ S: "S",
808
+ T: "T",
809
+ B: "B"
810
+ };
795
811
 
796
812
  // src/modules/stock/productImage/interface.ts
797
813
  var interface_exports20 = {};
@@ -2222,7 +2238,6 @@ var IBrokerTopic = /* @__PURE__ */ ((IBrokerTopic2) => {
2222
2238
  IBrokerTopic2["express_log"] = "express_log";
2223
2239
  IBrokerTopic2["cron_log"] = "cron_log";
2224
2240
  IBrokerTopic2["server_service_log"] = "server_service_log";
2225
- IBrokerTopic2["server_backup_log"] = "server_backup_log";
2226
2241
  IBrokerTopic2["server_docker_log"] = "server_docker_log";
2227
2242
  IBrokerTopic2["server_certificate_log"] = "server_certificate_log";
2228
2243
  IBrokerTopic2["server_filesystem_log"] = "server_filesystem_log";
package/dist/index.js CHANGED
@@ -757,10 +757,12 @@ var checkLineInPrisonOptions = [
757
757
  // src/modules/stock/productGoogleSheets/interface.ts
758
758
  var interface_exports19 = {};
759
759
  __export(interface_exports19, {
760
+ InventoryCategoryEnum: () => InventoryCategoryEnum,
760
761
  ProductStateEnum: () => ProductStateEnum,
761
762
  ProductStateLabels: () => ProductStateLabels,
762
763
  ProductTypeEnum: () => ProductTypeEnum,
763
764
  Route: () => Route62,
765
+ SaftProductTypeEnum: () => SaftProductTypeEnum,
764
766
  productState: () => productState,
765
767
  productTypes: () => productTypes
766
768
  });
@@ -785,9 +787,23 @@ var ProductTypeEnum = {
785
787
  Producao: "Producao",
786
788
  Portes: "Portes",
787
789
  RM: "RM",
788
- Montagem: "Montagem"
790
+ Montagem: "Montagem",
791
+ Adiantamento: "Adiantamento"
789
792
  };
790
793
  var productTypes = Object.keys(ProductTypeEnum);
794
+ var SaftProductTypeEnum = {
795
+ P: "P",
796
+ S: "S",
797
+ O: "O"
798
+ };
799
+ var InventoryCategoryEnum = {
800
+ M: "M",
801
+ P: "P",
802
+ A: "A",
803
+ S: "S",
804
+ T: "T",
805
+ B: "B"
806
+ };
791
807
 
792
808
  // src/modules/stock/productImage/interface.ts
793
809
  var interface_exports20 = {};
@@ -2218,7 +2234,6 @@ var IBrokerTopic = /* @__PURE__ */ ((IBrokerTopic2) => {
2218
2234
  IBrokerTopic2["express_log"] = "express_log";
2219
2235
  IBrokerTopic2["cron_log"] = "cron_log";
2220
2236
  IBrokerTopic2["server_service_log"] = "server_service_log";
2221
- IBrokerTopic2["server_backup_log"] = "server_backup_log";
2222
2237
  IBrokerTopic2["server_docker_log"] = "server_docker_log";
2223
2238
  IBrokerTopic2["server_certificate_log"] = "server_certificate_log";
2224
2239
  IBrokerTopic2["server_filesystem_log"] = "server_filesystem_log";
@@ -1,6 +1,6 @@
1
1
  import { DocumentHeader } from "../../../shared/entities/stock";
2
2
  import * as IShared from "../../../shared/interface";
3
- export type Entity = Omit<DocumentHeader, "external_data">;
3
+ export type Entity = DocumentHeader;
4
4
  export declare const Route = "document_header";
5
5
  export interface IMultipleRegularizationPayments {
6
6
  value: number;
@@ -26,9 +26,40 @@ export declare const ProductTypeEnum: {
26
26
  Portes: "Portes";
27
27
  RM: "RM";
28
28
  Montagem: "Montagem";
29
+ Adiantamento: "Adiantamento";
29
30
  };
30
31
  export type IProductType = (typeof ProductTypeEnum)[keyof typeof ProductTypeEnum];
31
32
  export declare const productTypes: string[];
33
+ /**
34
+ * Indicador de produto ou serviço do SAF-T (PT) — ponto 2.4.1 (ProductType):
35
+ * P - Produtos, S - Serviços, O - Outros (ex.: portes debitados, adiantamentos
36
+ * recebidos ou alienação de ativos).
37
+ *
38
+ * É o valor de `product_sheet.saft_product_type`, coluna gerada a partir de
39
+ * `product_sheet.type` (o mapeamento vive na migração, não em código).
40
+ */
41
+ export declare const SaftProductTypeEnum: {
42
+ P: "P";
43
+ S: "S";
44
+ O: "O";
45
+ };
46
+ export type ISaftProductType = (typeof SaftProductTypeEnum)[keyof typeof SaftProductTypeEnum];
47
+ /**
48
+ * Categoria do produto na comunicação de inventários à AT
49
+ * (`product_sheet.type_of_inventory`): M - Mercadorias, P - Matérias-primas,
50
+ * A - Produtos acabados, S - Subprodutos, T - Produtos em curso, B - Ativos
51
+ * biológicos. As letras P/S NÃO têm o mesmo significado que no SAF-T de
52
+ * faturação (`ISaftProductType`).
53
+ */
54
+ export declare const InventoryCategoryEnum: {
55
+ M: "M";
56
+ P: "P";
57
+ A: "A";
58
+ S: "S";
59
+ T: "T";
60
+ B: "B";
61
+ };
62
+ export type IInventoryCategory = (typeof InventoryCategoryEnum)[keyof typeof InventoryCategoryEnum];
32
63
  export interface ICreateRequest {
33
64
  id?: string;
34
65
  reference?: string;
@@ -40,7 +71,6 @@ export interface ICreateRequest {
40
71
  short_description?: string | null;
41
72
  state?: IProductSheetState;
42
73
  type?: IProductType;
43
- type_of_inventory?: string;
44
74
  vat_tax_id?: string;
45
75
  reason_for_exemption?: string | null;
46
76
  weight?: number | null;
@@ -27,7 +27,7 @@ export interface IFindByQueryRequest {
27
27
  }
28
28
  export type IFindResponse = Omit<IFindDetailedResponse, "">;
29
29
  export type IFindWithPaginationResponse = IShared.IPaginationResponse<Omit<IFindDetailedResponse, "">>;
30
- export type ICreateMainPersona = Pick<Persona, "nif" | "name" | "email" | "telephone">;
30
+ export type ICreateMainPersona = Pick<Persona, "nif" | "name" | "email" | "telephone"> & Partial<Pick<Persona, "street" | "locality" | "postal_code" | "country_id" | "vat_taxpayer">>;
31
31
  export interface ICreateRequest {
32
32
  user_id?: string;
33
33
  main_persona: ICreateMainPersona;
@@ -96,6 +96,7 @@ export interface IFindByEmailResponse {
96
96
  }
97
97
  export interface IFindClientOrProviderRequest {
98
98
  nif?: string | null;
99
+ country_id?: string | null;
99
100
  email?: string | null;
100
101
  telephone?: string | null;
101
102
  user_type: "client" | "provider";
@@ -1,7 +1,7 @@
1
1
  import { IMotivosDeEsperaData } from "../../modules/document/order/interfaces";
2
2
  import { IConflict } from "../../modules/document/propostaSheets/interface";
3
3
  import { IEstadoEncomenda } from "../../modules/stock/conferirEncomenda/interface";
4
- import { IExpectDeliveryDates, IProductType } from "../../modules/stock/productGoogleSheets/interface";
4
+ import { IExpectDeliveryDates, IInventoryCategory, IProductType, ISaftProductType } from "../../modules/stock/productGoogleSheets/interface";
5
5
  import { IProductSheetState } from "../../modules/stock/productGoogleSheets/interface";
6
6
  import { IImageType } from "../../modules/stock/productImage/interface";
7
7
  import { IQueryParameterDatatype } from "../../modules/stock/queryParameter/interfaces";
@@ -690,7 +690,8 @@ export type ProductSheet = {
690
690
  name: string | null;
691
691
  designation: string;
692
692
  origin_id: string | null;
693
- type_of_inventory: string;
693
+ saft_product_type: ISaftProductType;
694
+ type_of_inventory: IInventoryCategory | null;
694
695
  max_discount: number;
695
696
  maintenances: string;
696
697
  compositions: string;
@@ -414,6 +414,7 @@ export type Persona = {
414
414
  postal_code: string | null;
415
415
  locality: string | null;
416
416
  country_id: string | null;
417
+ vat_taxpayer: boolean;
417
418
  reason_for_exemption_id: string | null;
418
419
  language_id: string | null;
419
420
  provider_id: string | null;
@@ -6,7 +6,7 @@ import type { IDocumentTypeUserType } from "../modules/supply/documentType/inter
6
6
  import type { IAttachment } from "../modules/supply/externalDocumentHeader/interface";
7
7
  import type { IScheduleType } from "../modules/supply/schedule/interface";
8
8
  import type { ISystemModule } from "../modules/user/systemModule/interface";
9
- import type { IChat, IEmail, IEncomenda, IMultimedia, IMultimediaSummary, IPostgresBackup, IPrint, IProjectInfo, IProposta, IServiceLogs, IServiceStatus, IStock, ITask } from "../modules/view/adminPanel/interfaces";
9
+ import type { IChat, IEmail, IEncomenda, IMultimedia, IMultimediaSummary, IPrint, IProjectInfo, IProposta, IServiceLogs, IServiceStatus, IStock, ITask } from "../modules/view/adminPanel/interfaces";
10
10
  import type * as ErrorLog from "../modules/view/errorLog/interfaces";
11
11
  import type { ChatSocketEvent, SupplyDocumentSocketEvent, TicketsSocketEvent } from "../modules/view/webSocket/interfaces";
12
12
  import type { ProjectInfo } from "./entities/integration";
@@ -164,7 +164,6 @@ export declare enum IBrokerTopic {
164
164
  express_log = "express_log",
165
165
  cron_log = "cron_log",
166
166
  server_service_log = "server_service_log",
167
- server_backup_log = "server_backup_log",
168
167
  server_docker_log = "server_docker_log",
169
168
  server_certificate_log = "server_certificate_log",
170
169
  server_filesystem_log = "server_filesystem_log",
@@ -344,7 +343,6 @@ export type IBrokerTopicPayload = {
344
343
  done: boolean;
345
344
  };
346
345
  [IBrokerTopic.server_service_log]: IServiceStatus;
347
- [IBrokerTopic.server_backup_log]: IPostgresBackup;
348
346
  [IBrokerTopic.server_docker_log]: IServiceLogs;
349
347
  [IBrokerTopic.server_certificate_log]: string;
350
348
  [IBrokerTopic.server_filesystem_log]: 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": "1.3.48",
4
+ "version": "1.3.50",
5
5
  "author": "Nomalism <it.nomalism@gmail.com> (https://nomalism.com/)",
6
6
  "license": "UNLICENSED",
7
7
  "type": "module",
@@ -35,7 +35,7 @@
35
35
  "globals": "^17.12.0",
36
36
  "husky": "^9.1.7",
37
37
  "lint-staged": "^17.5.1",
38
- "prettier": "^3.9.8",
38
+ "prettier": "^3.9.9",
39
39
  "tsup": "^8.5.1",
40
40
  "typescript-eslint": "^8.70.1"
41
41
  },