@nomalism-com/api 0.35.12 → 0.36.2
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 +0 -29
- package/dist/index.d.ts +334 -350
- package/dist/index.js +0 -29
- package/package-lock.json +194 -151
- package/package.json +2 -2
- package/src/main.ts +0 -6
- package/src/modules/stock/tag.ts +0 -37
package/package.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"typescript",
|
|
10
10
|
"helper"
|
|
11
11
|
],
|
|
12
|
-
"version": "0.
|
|
12
|
+
"version": "0.36.2",
|
|
13
13
|
"type": "module",
|
|
14
14
|
"main": "./dist/index.cjs",
|
|
15
15
|
"module": "./dist/index.js",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"prepack": "npm run lint && npm run build"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@nomalism-com/types": "^0.
|
|
42
|
+
"@nomalism-com/types": "^0.36.1",
|
|
43
43
|
"axios": "^1.9.0"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
package/src/main.ts
CHANGED
|
@@ -114,7 +114,6 @@ import AdminPanelClass from './modules/view/adminPanel';
|
|
|
114
114
|
import DocumentLineRmClass from './modules/supply/documentLineRm';
|
|
115
115
|
import DocumentLineMtClass from './modules/supply/documentLineMt';
|
|
116
116
|
import ChatSubscriberClass from './modules/user/chatSubscriber';
|
|
117
|
-
import TagClass from './modules/stock/tag';
|
|
118
117
|
|
|
119
118
|
export * as BankData from './modules/user/bankData';
|
|
120
119
|
export * as Client from './modules/user/clients';
|
|
@@ -222,7 +221,6 @@ export * as AdminPanelClass from './modules/view/adminPanel';
|
|
|
222
221
|
export * as DocumentLineRmClass from './modules/supply/documentLineRm';
|
|
223
222
|
export * as DocumentLineMtClass from './modules/supply/documentLineMt';
|
|
224
223
|
export * as ChatSubscriberClass from './modules/user/chatSubscriber';
|
|
225
|
-
export * as TagClass from './modules/stock/tag';
|
|
226
224
|
|
|
227
225
|
export type IEnvironment = 'production' | 'uat' | 'development' | 'localhost';
|
|
228
226
|
|
|
@@ -477,8 +475,6 @@ export class API {
|
|
|
477
475
|
|
|
478
476
|
public ChatSubscriber: ChatSubscriberClass;
|
|
479
477
|
|
|
480
|
-
public Tag: TagClass;
|
|
481
|
-
|
|
482
478
|
constructor({ processEnvironment, services, gatewayUrl, apikey, tokenBearer }: IOptions) {
|
|
483
479
|
this.processEnvironment = processEnvironment || 'localhost';
|
|
484
480
|
|
|
@@ -791,7 +787,5 @@ export class API {
|
|
|
791
787
|
this.DocumentLineMt = new DocumentLineMtClass(getModuleParams('stock', 'document_line_mt'));
|
|
792
788
|
|
|
793
789
|
this.ChatSubscriber = new ChatSubscriberClass(getModuleParams('users', 'chat_subscriber'));
|
|
794
|
-
|
|
795
|
-
this.Tag = new TagClass(getModuleParams('stock', 'tag'));
|
|
796
790
|
}
|
|
797
791
|
}
|
package/src/modules/stock/tag.ts
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import Nomalism from '@nomalism-com/types';
|
|
2
|
-
import { AxiosInstance } from 'axios';
|
|
3
|
-
import { IModuleConstructor } from '../../main';
|
|
4
|
-
|
|
5
|
-
export default class Repository implements Nomalism.Tag.IRepository {
|
|
6
|
-
public route: string;
|
|
7
|
-
|
|
8
|
-
public publicRoute: string;
|
|
9
|
-
|
|
10
|
-
private api: AxiosInstance;
|
|
11
|
-
|
|
12
|
-
constructor({ api, route, publicRoute }: IModuleConstructor) {
|
|
13
|
-
this.api = api;
|
|
14
|
-
this.route = route;
|
|
15
|
-
this.publicRoute = publicRoute;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
async create(body: Nomalism.Tag.ICreateRequest): Promise<void> {
|
|
19
|
-
const response = await this.api.post(`${this.route}`, body);
|
|
20
|
-
return response.data;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
async findByDocumentHeaderId(
|
|
24
|
-
selector: Nomalism.shared.IFindByIdRequest,
|
|
25
|
-
): Promise<Nomalism.Tag.IFindResponse[]> {
|
|
26
|
-
const response = await this.api.get(`${this.route}document_header_id/${selector.id}`);
|
|
27
|
-
return response.data;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
async updateMany(body: Nomalism.Tag.IUpdateManyRequest[]): Promise<void> {
|
|
31
|
-
await this.api.put(`${this.route}update_many`, body);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
async delete(selector: Nomalism.shared.IFindByIdRequest): Promise<void> {
|
|
35
|
-
await this.api.delete(`${this.route}${selector.id}`);
|
|
36
|
-
}
|
|
37
|
-
}
|