@nomalism-com/types 0.13.1 → 0.14.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.
@@ -3,8 +3,12 @@ import * as IShared from '../../../shared/interface';
3
3
  export declare const Route = "google";
4
4
  export declare const UpperName = "Google";
5
5
  export declare const LowerName: string;
6
- export interface IGetUserData extends Pick<DocumentHeader, 'document_number' | 'emission_date' | 'owner_number' | 'contact_persona_name' | 'contact_persona_email' | 'contact_persona_telephone' | 'billing_persona_nif' | 'billing_persona_name' | 'billing_persona_email' | 'billing_persona_telephone' | 'billing_persona_address_street' | 'billing_persona_address_locality' | 'billing_persona_address_postal_code' | 'billing_persona_address_country_name' | 'delivery_persona_name' | 'delivery_persona_email' | 'delivery_persona_telephone' | 'delivery_persona_address_street' | 'delivery_persona_address_locality' | 'delivery_persona_address_postal_code' | 'delivery_persona_address_country_name'> {
7
- created_by: string;
6
+ export interface IGetUserData extends Pick<DocumentHeader, 'document_number' | 'owner_number' | 'contact_persona_name' | 'contact_persona_email' | 'contact_persona_telephone' | 'billing_persona_nif' | 'billing_persona_name' | 'billing_persona_email' | 'billing_persona_telephone' | 'billing_persona_address_street' | 'billing_persona_address_locality' | 'billing_persona_address_postal_code' | 'billing_persona_address_country_name' | 'delivery_persona_name' | 'delivery_persona_email' | 'delivery_persona_telephone' | 'delivery_persona_address_street' | 'delivery_persona_address_locality' | 'delivery_persona_address_postal_code' | 'delivery_persona_address_country_name'> {
7
+ emission_date: string;
8
+ store_operator_id: string | null;
9
+ store_operator_name: string | null;
10
+ store_operator_number: number | null;
11
+ reason_for_exemption_name: string | null;
8
12
  }
9
13
  export interface IUpdateRequest {
10
14
  document_name: string;
@@ -16,7 +20,7 @@ export interface ICloneRequest {
16
20
  export interface ICloneResponse {
17
21
  spreadsheetId: string;
18
22
  }
19
- export type IGetProductGroup = 'cortinado' | 'tapete' | 'estore' | 'outros';
23
+ export type IGetProductGroup = 'cortinado' | 'tapete' | 'estore' | 'estofo' | 'outros';
20
24
  export type IGetProductType = 'confecção' | 'calha' | 'tecido 1' | 'tecido 2' | 'livre';
21
25
  export type IReferenceType = 'noma' | 'sheets' | undefined;
22
26
  export interface IGetProduct {
@@ -29,6 +33,7 @@ export interface IGetProduct {
29
33
  designation: string;
30
34
  discount: number;
31
35
  price_sale: number;
36
+ price_cost: number;
32
37
  reference_type?: IReferenceType;
33
38
  }
34
39
  export interface IGetDataResponse {
@@ -19,7 +19,6 @@ exports.exportQuery = joi_1.default
19
19
  .keys(exportQueryKeys)
20
20
  .messages(messages_1.messages);
21
21
  var userData = {
22
- created_by: joi_1.default.string().optional(),
23
22
  document_number: joi_1.default.number().optional(),
24
23
  emission_date: joi_1.default.date().optional(),
25
24
  owner_number: joi_1.default.number().optional(),
@@ -49,6 +48,10 @@ var userData = {
49
48
  .lowercase()
50
49
  .optional(),
51
50
  delivery_persona_address_country_name: joi_1.default.string().optional(),
51
+ reason_for_exemption_name: joi_1.default.string().required().allow(null),
52
+ store_operator_id: joi_1.default.string().required().allow(null),
53
+ store_operator_name: joi_1.default.string().required().allow(null),
54
+ store_operator_number: joi_1.default.number().required().allow(null),
52
55
  };
53
56
  var updateQueryKeys = {
54
57
  document_name: joi_1.default.string().required(),
@@ -23,9 +23,13 @@ export interface IConflictFindByOwnerIdResponse extends Entity {
23
23
  export interface ICreateSheetFromDocumentResponse {
24
24
  google_sheet_id: string;
25
25
  }
26
+ export interface IIsProcessingResponse {
27
+ is_processing: boolean;
28
+ last_error: string | null;
29
+ }
26
30
  export interface IRepository {
27
31
  importFromSheet(params: IShared.IFindByIdRequest): Promise<IFindByGooglesheetIdResponse>;
28
- isProcessing(params: IShared.IFindByIdRequest): Promise<boolean>;
32
+ isProcessing(params: IShared.IFindByIdRequest): Promise<IIsProcessingResponse>;
29
33
  conflictAccept(params: IShared.IFindByIdRequest): Promise<void>;
30
34
  conflictDelete(params: IShared.IFindByIdRequest): Promise<void>;
31
35
  conflictFindByOwnerId(params: IShared.IFindByOwnerIdRequest): Promise<IConflictFindByOwnerIdResponse[]>;
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  "typescript",
10
10
  "helper"
11
11
  ],
12
- "version": "0.13.1",
12
+ "version": "0.14.1",
13
13
  "main": "./dist/index.js",
14
14
  "types": "./dist/index.d.ts",
15
15
  "files": [
@@ -38,9 +38,9 @@
38
38
  },
39
39
  "devDependencies": {
40
40
  "@types/convert-units": "^2.3.9",
41
- "@types/node": "^18.18.12",
42
- "@typescript-eslint/eslint-plugin": "^6.12.0",
43
- "@typescript-eslint/parser": "^6.12.0",
41
+ "@types/node": "^20.10.0",
42
+ "@typescript-eslint/eslint-plugin": "^6.13.1",
43
+ "@typescript-eslint/parser": "^6.13.1",
44
44
  "concurrently": "^8.2.2",
45
45
  "eslint": "^8.54.0",
46
46
  "eslint-config-airbnb-base": "^15.0.0",
@@ -49,7 +49,7 @@
49
49
  "eslint-plugin-import": "^2.29.0",
50
50
  "eslint-plugin-prettier": "^5.0.1",
51
51
  "prettier": "^3.1.0",
52
- "tsx": "^4.3.0",
52
+ "tsx": "^4.6.0",
53
53
  "typescript": "^5.3.2"
54
54
  }
55
55
  }