@nomalism-com/types 0.18.65 → 0.18.66
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.
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import * as IShared from
|
|
2
|
-
import { DocumentLineNote } from
|
|
1
|
+
import * as IShared from "../../../shared/interface";
|
|
2
|
+
import { DocumentLineNote } from "../../../shared/entities";
|
|
3
3
|
export declare const Route = "purchase";
|
|
4
4
|
export declare const UpperName = "Purchase";
|
|
5
5
|
export declare const LowerName: string;
|
|
6
|
-
export type IUnpaidMaterialEntranceLineType =
|
|
6
|
+
export type IUnpaidMaterialEntranceLineType = "Por comprar" | "Comprado" | "Devolvido" | "Prisão";
|
|
7
7
|
export interface IUnpaidMaterialEntranceLineDetails {
|
|
8
8
|
document_line_id: string;
|
|
9
9
|
quantity: number;
|
|
@@ -55,13 +55,28 @@ export interface IPurchaseFromProviderRequest {
|
|
|
55
55
|
};
|
|
56
56
|
note?: string;
|
|
57
57
|
}
|
|
58
|
+
export interface ISyncRequest {
|
|
59
|
+
id_provider: number;
|
|
60
|
+
document_line_ids: string[];
|
|
61
|
+
}
|
|
62
|
+
export interface ISyncLines {
|
|
63
|
+
document_line_id: string;
|
|
64
|
+
preco_custo: number;
|
|
65
|
+
}
|
|
66
|
+
export interface ISyncResponse {
|
|
67
|
+
id_provider: number;
|
|
68
|
+
provider_discount: number;
|
|
69
|
+
provider_tax: number;
|
|
70
|
+
lines: ISyncLines[];
|
|
71
|
+
}
|
|
58
72
|
export interface IRepository {
|
|
59
73
|
findUnpaidMaterialEntrance(selector: IShared.IFindByIdRequest): Promise<IUnpaidMaterialEntranceResponse>;
|
|
60
74
|
findUnpaidMaterialEntranceProviders(): Promise<IShared.IFindMinifiedResponse[]>;
|
|
61
75
|
purchaseFromProvider(data: IPurchaseFromProviderRequest): Promise<IShared.IBrokerMessage<IShared.IBrokerTopic>[]>;
|
|
62
76
|
deleteOne(selector: IShared.IFindByIdRequest): Promise<void>;
|
|
77
|
+
sync(data: ISyncRequest): Promise<ISyncResponse>;
|
|
63
78
|
}
|
|
64
|
-
export type IApi = Omit<IRepository,
|
|
79
|
+
export type IApi = Omit<IRepository, "purchaseFromProvider"> & {
|
|
65
80
|
purchaseFromProvider(data: IPurchaseFromProviderRequest): Promise<void>;
|
|
66
81
|
};
|
|
67
82
|
export type IController = IShared.IEntityWithUserToken<IRepository>;
|
package/package.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"typescript",
|
|
10
10
|
"helper"
|
|
11
11
|
],
|
|
12
|
-
"version": "0.18.
|
|
12
|
+
"version": "0.18.66",
|
|
13
13
|
"main": "./dist/index.min.js",
|
|
14
14
|
"types": "./dist/index.d.ts",
|
|
15
15
|
"files": [
|
|
@@ -39,10 +39,10 @@
|
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@rollup/plugin-terser": "^0.4.4",
|
|
41
41
|
"@rollup/plugin-typescript": "^11.1.6",
|
|
42
|
-
"@types/node": "^20.11.
|
|
43
|
-
"@typescript-eslint/eslint-plugin": "^7.0
|
|
44
|
-
"@typescript-eslint/parser": "^7.0
|
|
45
|
-
"eslint": "^8.
|
|
42
|
+
"@types/node": "^20.11.21",
|
|
43
|
+
"@typescript-eslint/eslint-plugin": "^7.1.0",
|
|
44
|
+
"@typescript-eslint/parser": "^7.1.0",
|
|
45
|
+
"eslint": "^8.57.0",
|
|
46
46
|
"rollup": "^4.12.0",
|
|
47
47
|
"tslib": "^2.6.2"
|
|
48
48
|
}
|