@nomalism-com/api 0.36.28 → 0.37.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 +174 -247
- package/dist/index.d.ts +173 -204
- package/dist/index.js +174 -247
- package/package.json +17 -21
- package/.editorconfig +0 -9
- package/.prettierrc +0 -7
- package/eslint.config.mjs +0 -39
- package/package-lock.json +0 -4616
- package/src/index.ts +0 -3
- package/src/main.ts +0 -805
- package/src/modules/document/billOfLading.ts +0 -24
- package/src/modules/document/inventario.ts +0 -21
- package/src/modules/document/materialEntrance.ts +0 -81
- package/src/modules/document/order.ts +0 -52
- package/src/modules/document/productionOrder.ts +0 -23
- package/src/modules/document/proforma.ts +0 -22
- package/src/modules/document/propostaFornecedor.ts +0 -24
- package/src/modules/document/propostaSheets.ts +0 -87
- package/src/modules/document/providerCreditNoteFromReturn.ts +0 -32
- package/src/modules/document/providerFinancialCreditNote.ts +0 -32
- package/src/modules/document/providerServiceInvoice.ts +0 -23
- package/src/modules/document/purchase.ts +0 -40
- package/src/modules/document/quebra.ts +0 -41
- package/src/modules/document/returnToProvider.ts +0 -37
- package/src/modules/document/transformado.ts +0 -27
- package/src/modules/document/upfrontReturn.ts +0 -25
- package/src/modules/documentManagement/multimedia.ts +0 -39
- package/src/modules/integration/emailLog.ts +0 -43
- package/src/modules/integration/emailTemplate.ts +0 -44
- package/src/modules/integration/emailTemplateAttachment.ts +0 -26
- package/src/modules/integration/emailVerification.ts +0 -34
- package/src/modules/integration/googleFilePermission.ts +0 -43
- package/src/modules/integration/googleSheets.ts +0 -47
- package/src/modules/integration/observation.ts +0 -55
- package/src/modules/integration/observationType.ts +0 -53
- package/src/modules/integration/projectInfo.ts +0 -21
- package/src/modules/integration/settings.ts +0 -48
- package/src/modules/print/npc.ts +0 -39
- package/src/modules/print/printer.ts +0 -48
- package/src/modules/print/schedulePrintJob.ts +0 -45
- package/src/modules/stock/chat.ts +0 -54
- package/src/modules/stock/chatRapidMessage.ts +0 -48
- package/src/modules/stock/dashboard.ts +0 -24
- package/src/modules/stock/file.ts +0 -45
- package/src/modules/stock/location.ts +0 -74
- package/src/modules/stock/prison.ts +0 -46
- package/src/modules/stock/productGoogleSheets.ts +0 -175
- package/src/modules/stock/productImage.ts +0 -67
- package/src/modules/stock/promotion.ts +0 -107
- package/src/modules/stock/promotionAssoc.ts +0 -69
- package/src/modules/stock/queryList.ts +0 -72
- package/src/modules/stock/queryParameter.ts +0 -56
- package/src/modules/stock/recurrentTasks.ts +0 -25
- package/src/modules/stock/returnReason.ts +0 -42
- package/src/modules/stock/savedEmPicking.ts +0 -35
- package/src/modules/stock/savedProviderProposal.ts +0 -42
- package/src/modules/stock/schedule.ts +0 -21
- package/src/modules/stock/sideMenu.ts +0 -45
- package/src/modules/stock/stockMovement.ts +0 -56
- package/src/modules/stock/tag.ts +0 -37
- package/src/modules/stock/task.ts +0 -57
- package/src/modules/stock/taskMessage.ts +0 -33
- package/src/modules/stock/taskRead.ts +0 -25
- package/src/modules/stock/typeOfLocation.ts +0 -78
- package/src/modules/stock/unitOfMeasure.ts +0 -78
- package/src/modules/stock/vatTax.ts +0 -74
- package/src/modules/stock/vatTaxZone.ts +0 -78
- package/src/modules/supply/clientCurrentAccount.ts +0 -71
- package/src/modules/supply/documentHeader.ts +0 -195
- package/src/modules/supply/documentHeaderHistory.ts +0 -24
- package/src/modules/supply/documentLine.ts +0 -75
- package/src/modules/supply/documentLineAssoc.ts +0 -57
- package/src/modules/supply/documentLineMt.ts +0 -28
- package/src/modules/supply/documentLineNote.ts +0 -35
- package/src/modules/supply/documentLineRm.ts +0 -28
- package/src/modules/supply/documentSet.ts +0 -56
- package/src/modules/supply/documentType.ts +0 -60
- package/src/modules/supply/externalDocumentHeader.ts +0 -96
- package/src/modules/supply/externalDocumentType.ts +0 -29
- package/src/modules/supply/orderManagement.ts +0 -33
- package/src/modules/supply/payment.ts +0 -156
- package/src/modules/supply/preSale.ts +0 -72
- package/src/modules/supply/preSaleProduct.ts +0 -29
- package/src/modules/supply/providerCurrentAccount.ts +0 -26
- package/src/modules/supply/startDocumentHeaderLastUpdate.ts +0 -24
- package/src/modules/supply/vatValidation.ts +0 -26
- package/src/modules/supply/workflow.ts +0 -53
- package/src/modules/tickets/channel.ts +0 -54
- package/src/modules/tickets/clt.ts +0 -50
- package/src/modules/tickets/language.ts +0 -56
- package/src/modules/tickets/tickets.ts +0 -41
- package/src/modules/user/bankData.ts +0 -67
- package/src/modules/user/chatSubscriber.ts +0 -49
- package/src/modules/user/clientType.ts +0 -67
- package/src/modules/user/clients.ts +0 -89
- package/src/modules/user/commissioner.ts +0 -81
- package/src/modules/user/country.ts +0 -77
- package/src/modules/user/deliveryMethods.ts +0 -60
- package/src/modules/user/favorites.ts +0 -39
- package/src/modules/user/groupPermission.ts +0 -45
- package/src/modules/user/language.ts +0 -68
- package/src/modules/user/logout.ts +0 -20
- package/src/modules/user/maturityDates.ts +0 -60
- package/src/modules/user/password.ts +0 -25
- package/src/modules/user/paymentMethods.ts +0 -60
- package/src/modules/user/permission.ts +0 -43
- package/src/modules/user/persona.ts +0 -92
- package/src/modules/user/provider.ts +0 -90
- package/src/modules/user/providerType.ts +0 -70
- package/src/modules/user/purchaseCondition.ts +0 -69
- package/src/modules/user/reasonForExemption.ts +0 -69
- package/src/modules/user/refreshToken.ts +0 -24
- package/src/modules/user/segmentsArea.ts +0 -67
- package/src/modules/user/sessions.ts +0 -22
- package/src/modules/user/shippings.ts +0 -65
- package/src/modules/user/storeOperator.ts +0 -56
- package/src/modules/user/swift.ts +0 -65
- package/src/modules/user/tenant.ts +0 -42
- package/src/modules/user/theme.ts +0 -21
- package/src/modules/user/user.ts +0 -79
- package/src/modules/user/userPermission.ts +0 -40
- package/src/modules/user/userPositions.ts +0 -69
- package/src/modules/user/vehicles.ts +0 -42
- package/src/modules/user/zipCode.ts +0 -28
- package/src/modules/view/adminPanel.ts +0 -24
- package/src/modules/view/errorLog.ts +0 -21
- package/tsconfig.json +0 -18
- package/tsup.config.ts +0 -13
|
@@ -1,56 +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.QueryParameter.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 find(): Promise<Nomalism.QueryParameter.Entity[]> {
|
|
19
|
-
const response = await this.api.get(`${this.route}`);
|
|
20
|
-
return response.data;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
async findById(
|
|
24
|
-
selector: Nomalism.shared.IFindByIdRequest,
|
|
25
|
-
): Promise<Nomalism.QueryParameter.Entity | null> {
|
|
26
|
-
const response = await this.api.get(`${this.route}${selector.id}`);
|
|
27
|
-
return response.data;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
async create(
|
|
31
|
-
body: Nomalism.QueryParameter.ICreateRequest,
|
|
32
|
-
): Promise<Nomalism.QueryParameter.Entity> {
|
|
33
|
-
const response = await this.api.post(`${this.route}`, body);
|
|
34
|
-
return response.data;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
async update(
|
|
38
|
-
selector: Nomalism.shared.IFindByIdRequest,
|
|
39
|
-
body: Nomalism.QueryParameter.IUpdateRequest,
|
|
40
|
-
): Promise<Nomalism.QueryParameter.Entity | null> {
|
|
41
|
-
const response = await this.api.put(`${this.route}${selector.id}`, body);
|
|
42
|
-
return response.data;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
async deleteOne(selector: Nomalism.shared.IFindByIdRequest): Promise<void> {
|
|
46
|
-
const response = await this.api.delete(`${this.route}${selector.id}`);
|
|
47
|
-
return response.data;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
async findByOwnerId(
|
|
51
|
-
params: Nomalism.shared.IFindByOwnerIdRequest,
|
|
52
|
-
): Promise<Nomalism.QueryParameter.IFindByOwnerIdResponse[]> {
|
|
53
|
-
const response = await this.api.get(`${this.route}by_owner`, { params });
|
|
54
|
-
return response.data;
|
|
55
|
-
}
|
|
56
|
-
}
|
|
@@ -1,25 +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.RecurrentTasks.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 from_master(): Promise<string> {
|
|
19
|
-
return this.api.post(`${this.route}from_master`);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
async from_master_checked(): Promise<string> {
|
|
23
|
-
return this.api.post(`${this.route}from_master`);
|
|
24
|
-
}
|
|
25
|
-
}
|
|
@@ -1,42 +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.ReturnReason.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.ReturnReason.ICreateRequest): Promise<Nomalism.ReturnReason.Entity> {
|
|
19
|
-
const response = await this.api.post(`${this.route}`, body);
|
|
20
|
-
return response.data;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
async update(
|
|
24
|
-
selector: Nomalism.shared.IFindByIdRequest,
|
|
25
|
-
body: Nomalism.ReturnReason.IUpdateRequest,
|
|
26
|
-
): Promise<Nomalism.ReturnReason.Entity | null> {
|
|
27
|
-
const response = await this.api.put(`${this.route}${selector.id}`, body);
|
|
28
|
-
return response.data;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
async find(): Promise<Nomalism.ReturnReason.Entity[]> {
|
|
32
|
-
const response = await this.api.get(`${this.route}`);
|
|
33
|
-
return response.data;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
async deleteOne(
|
|
37
|
-
selector: Nomalism.shared.IFindByIdRequest,
|
|
38
|
-
): Promise<Nomalism.ReturnReason.Entity | null> {
|
|
39
|
-
const response = await this.api.delete(`${this.route}${selector.id}`);
|
|
40
|
-
return response.data;
|
|
41
|
-
}
|
|
42
|
-
}
|
|
@@ -1,35 +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.SavedEmPicking.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.SavedEmPicking.ICreateRequest): Promise<string> {
|
|
19
|
-
const response = await this.api.post(`${this.route}`, body);
|
|
20
|
-
return response.data;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
async createMany(body: Nomalism.SavedEmPicking.ICreateManyRequest): Promise<string[]> {
|
|
24
|
-
const response = await this.api.post(`${this.route}many`, body);
|
|
25
|
-
return response.data;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
async deleteOne(selector: Nomalism.shared.IFindByIdRequest): Promise<void> {
|
|
29
|
-
await this.api.delete(`${this.route}${selector.id}`);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
async deleteMany(body: Nomalism.SavedEmPicking.IDeleteManyRequest): Promise<void> {
|
|
33
|
-
await this.api.post(`${this.route}delete_many`, body);
|
|
34
|
-
}
|
|
35
|
-
}
|
|
@@ -1,42 +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.SavedProviderProposal.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 findByProviderId(
|
|
19
|
-
selector: Nomalism.shared.IFindByIdRequest,
|
|
20
|
-
): Promise<Nomalism.SavedProviderProposal.IFindManyResponse[]> {
|
|
21
|
-
const response = await this.api.get(`${this.route}${selector.id}`);
|
|
22
|
-
return response.data;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
async create(body: Nomalism.SavedProviderProposal.ICreateRequest): Promise<void> {
|
|
26
|
-
const response = await this.api.post(`${this.route}`, body);
|
|
27
|
-
return response.data;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
async update(
|
|
31
|
-
selector: Nomalism.shared.IFindByIdRequest,
|
|
32
|
-
body: Nomalism.SavedProviderProposal.IUpdateRequest,
|
|
33
|
-
): Promise<void> {
|
|
34
|
-
const response = await this.api.put(`${this.route}${selector.id}`, body);
|
|
35
|
-
return response.data;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
async deleteOne(selector: Nomalism.shared.IFindByIdRequest): Promise<void> {
|
|
39
|
-
const response = await this.api.delete(`${this.route}${selector.id}`);
|
|
40
|
-
return response.data;
|
|
41
|
-
}
|
|
42
|
-
}
|
|
@@ -1,21 +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.Schedule.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 runImmediately(selector: Nomalism.Schedule.IRunImmediatelyRequest): Promise<void> {
|
|
19
|
-
await this.api.post(`${this.route}${selector.scheduleType}`);
|
|
20
|
-
}
|
|
21
|
-
}
|
|
@@ -1,45 +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.SideMenu.IController {
|
|
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 findSideMenuStoreOperators(): Promise<string[]> {
|
|
19
|
-
const response = await this.api.get(`${this.route}side_menu_store_operators`);
|
|
20
|
-
return response.data;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
async findByDocumentLineState(
|
|
24
|
-
params: Nomalism.SideMenu.IFindByDocumentLineStateRequest,
|
|
25
|
-
): Promise<Nomalism.SideMenu.IFindByDocumentLineStateResponse[]> {
|
|
26
|
-
const response = await this.api.get(`${this.route}by_document_line_state`, {
|
|
27
|
-
params,
|
|
28
|
-
});
|
|
29
|
-
return response.data;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
async findByState(
|
|
33
|
-
params: Nomalism.SideMenu.IFindByStateRequest,
|
|
34
|
-
): Promise<Nomalism.SideMenu.IFindByStateResponse[]> {
|
|
35
|
-
const response = await this.api.get(`${this.route}find_by_state`, {
|
|
36
|
-
params,
|
|
37
|
-
});
|
|
38
|
-
return response.data;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
async findSideMenuCounters(): Promise<Nomalism.SideMenu.IFindSideMenuCountersResponse> {
|
|
42
|
-
const response = await this.api.get(`${this.route}counters`);
|
|
43
|
-
return response.data;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
@@ -1,56 +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.StockMovement.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 findByProvider({
|
|
19
|
-
id,
|
|
20
|
-
}: Nomalism.shared.IFindByIdNumberRequest): Promise<
|
|
21
|
-
Nomalism.StockMovement.IFindByProviderResponse[]
|
|
22
|
-
> {
|
|
23
|
-
const response = await this.api.get(`${this.route}${id}`);
|
|
24
|
-
return response.data;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
async findByOwnerId(
|
|
28
|
-
params: Nomalism.shared.IFindByOwnerIdRequest,
|
|
29
|
-
): Promise<Nomalism.StockMovement.IFindByOwnerIdResponse[]> {
|
|
30
|
-
const response = await this.api.get(`${this.route}by_owner`, { params });
|
|
31
|
-
return response.data;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
async exportCsv(
|
|
35
|
-
params: Nomalism.StockMovement.IExportRequest,
|
|
36
|
-
): Promise<Nomalism.StockMovement.IExportCsvResponse[]> {
|
|
37
|
-
const response = await this.api.get(`${this.route}csv`, { params });
|
|
38
|
-
return response.data;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
getStockCsvUrl({ date, version, format, token }: Nomalism.StockMovement.IExportRequest): string {
|
|
42
|
-
const qs = new URLSearchParams();
|
|
43
|
-
qs.set('date', date.toISOString());
|
|
44
|
-
qs.set('version', version);
|
|
45
|
-
qs.set('format', format);
|
|
46
|
-
qs.set('token', token);
|
|
47
|
-
return `${this.publicRoute}csv?${qs.toString()}`;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
async findStockMovementPaginated(
|
|
51
|
-
params: Nomalism.StockMovement.IFindStockMovementPaginatedRequest,
|
|
52
|
-
): Promise<Nomalism.shared.IPaginationResponse<Nomalism.StockMovement.IFindByOwnerIdResponse>> {
|
|
53
|
-
const response = await this.api.get(`${this.route}stock_movement_paginated`, { params });
|
|
54
|
-
return response.data;
|
|
55
|
-
}
|
|
56
|
-
}
|
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
|
-
}
|
|
@@ -1,57 +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.Task.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
|
-
async find(selector: Nomalism.Task.IFindTasksRequest): Promise<Nomalism.Task.IFindResponse[]> {
|
|
18
|
-
return this.api.get(`${this.route}${selector}`);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
async findWithMessages(
|
|
22
|
-
selector: Nomalism.shared.IFindByIdRequest,
|
|
23
|
-
): Promise<Nomalism.Task.IFindWithMessagesResponse> {
|
|
24
|
-
return this.api.get(`${this.route}with_messages`, {
|
|
25
|
-
params: selector,
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
async create(body: Nomalism.Task.ICreateRequest): Promise<Nomalism.Task.Entity> {
|
|
30
|
-
const response = await this.api.post(`${this.route}`, body);
|
|
31
|
-
return response.data;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
async createFromDossier(
|
|
35
|
-
body: Nomalism.Task.ICreateFromDossierRequest,
|
|
36
|
-
): Promise<Nomalism.Task.Entity> {
|
|
37
|
-
const response = await this.api.post(`${this.route}from_dossier`, body);
|
|
38
|
-
return response.data;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
async update(
|
|
42
|
-
selector: Nomalism.shared.IFindByIdRequest,
|
|
43
|
-
body: Nomalism.Task.IUpdateRequest,
|
|
44
|
-
): Promise<void> {
|
|
45
|
-
await this.api.put(`${this.route}${selector.id}`, body);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
async delete(selector: Nomalism.shared.IFindByIdRequest): Promise<void> {
|
|
49
|
-
await this.api.delete(`${this.route}${selector.id}`);
|
|
50
|
-
}
|
|
51
|
-
async findByOwnerId(
|
|
52
|
-
selector: Nomalism.shared.IFindByOwnerIdRequest,
|
|
53
|
-
): Promise<Nomalism.Task.IFindByOwnerResponse[]> {
|
|
54
|
-
const response = await this.api.delete(`${this.route}by_owner/${selector.owner_id}`);
|
|
55
|
-
return response.data;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
@@ -1,33 +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.TaskMessage.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.TaskMessage.ICreateRequest): Promise<Nomalism.TaskMessage.Entity> {
|
|
19
|
-
const response = await this.api.post(`${this.route}`, body);
|
|
20
|
-
return response.data;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
async update(
|
|
24
|
-
selector: Nomalism.shared.IFindByIdRequest,
|
|
25
|
-
body: Nomalism.TaskMessage.IUpdateRequest,
|
|
26
|
-
): Promise<void> {
|
|
27
|
-
await this.api.put(`${this.route}${selector.id}`, body);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
async delete(selector: Nomalism.shared.IFindByIdRequest): Promise<void> {
|
|
31
|
-
await this.api.delete(`${this.route}${selector.id}`);
|
|
32
|
-
}
|
|
33
|
-
}
|
|
@@ -1,25 +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.TaskRead.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.TaskRead.ICreateRequest): Promise<void> {
|
|
19
|
-
await this.api.post(`${this.route}`, body);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
async delete(params: Nomalism.TaskRead.IDeleteRequest): Promise<void> {
|
|
23
|
-
await this.api.delete(`${this.route}`, { data: params });
|
|
24
|
-
}
|
|
25
|
-
}
|
|
@@ -1,78 +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.TypeOfLocation.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 find(
|
|
19
|
-
params: Nomalism.TypeOfLocation.IFindRequest,
|
|
20
|
-
): Promise<Nomalism.TypeOfLocation.IFindResponse[]> {
|
|
21
|
-
const response = await this.api.get(`${this.route}`, { params });
|
|
22
|
-
return response.data;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
async findPaginated(
|
|
26
|
-
params: Nomalism.TypeOfLocation.IFindPaginatedRequest,
|
|
27
|
-
): Promise<Nomalism.shared.IPaginationResponse<Nomalism.TypeOfLocation.IFindResponse>> {
|
|
28
|
-
const response = await this.api.get(`${this.route}paginated`, { params });
|
|
29
|
-
return response.data;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
async findMinified(
|
|
33
|
-
params?: Nomalism.shared.IFindMinifiedRequest,
|
|
34
|
-
): Promise<Nomalism.shared.IFindMinifiedResponse[]> {
|
|
35
|
-
const response = await this.api.get(`${this.route}minified`, {
|
|
36
|
-
params,
|
|
37
|
-
});
|
|
38
|
-
return response.data;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
async findByOwnerId(
|
|
42
|
-
params: Nomalism.shared.IFindByOwnerIdRequest,
|
|
43
|
-
): Promise<Nomalism.TypeOfLocation.IFindResponse[]> {
|
|
44
|
-
const response = await this.api.get(`${this.route}by_owner`, {
|
|
45
|
-
params,
|
|
46
|
-
});
|
|
47
|
-
return response.data;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
async findById(
|
|
51
|
-
selector: Nomalism.shared.IFindByIdRequest,
|
|
52
|
-
): Promise<Nomalism.TypeOfLocation.IFindResponse | null> {
|
|
53
|
-
const response = await this.api.get(`${this.route}${selector.id}`);
|
|
54
|
-
return response.data;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
async create(
|
|
58
|
-
body: Nomalism.TypeOfLocation.ICreateRequest,
|
|
59
|
-
): Promise<Nomalism.TypeOfLocation.Entity> {
|
|
60
|
-
const response = await this.api.post(`${this.route}`, body);
|
|
61
|
-
return response.data;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
async update(
|
|
65
|
-
selector: Nomalism.shared.IFindByIdRequest,
|
|
66
|
-
body: Nomalism.TypeOfLocation.IUpdateRequest,
|
|
67
|
-
): Promise<Nomalism.TypeOfLocation.Entity | null> {
|
|
68
|
-
const response = await this.api.put(`${this.route}${selector.id}`, body);
|
|
69
|
-
return response.data;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
async deleteOne(
|
|
73
|
-
selector: Nomalism.shared.IFindByIdRequest,
|
|
74
|
-
): Promise<Nomalism.TypeOfLocation.Entity | null> {
|
|
75
|
-
const response = await this.api.delete(`${this.route}${selector.id}`);
|
|
76
|
-
return response.data;
|
|
77
|
-
}
|
|
78
|
-
}
|
|
@@ -1,78 +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.UnitOfMeasure.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 find(
|
|
19
|
-
params: Nomalism.UnitOfMeasure.IFindRequest,
|
|
20
|
-
): Promise<Nomalism.UnitOfMeasure.IFindResponse[]> {
|
|
21
|
-
const response = await this.api.get(`${this.route}`, { params });
|
|
22
|
-
return response.data;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
async findPaginated(
|
|
26
|
-
params: Nomalism.UnitOfMeasure.IFindPaginatedRequest,
|
|
27
|
-
): Promise<Nomalism.shared.IPaginationResponse<Nomalism.UnitOfMeasure.IFindResponse>> {
|
|
28
|
-
const response = await this.api.get(`${this.route}paginated`, { params });
|
|
29
|
-
return response.data;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
async findMinified(
|
|
33
|
-
params?: Nomalism.shared.IFindMinifiedRequest,
|
|
34
|
-
): Promise<Nomalism.shared.IFindMinifiedResponse[]> {
|
|
35
|
-
const response = await this.api.get(`${this.route}minified`, {
|
|
36
|
-
params,
|
|
37
|
-
});
|
|
38
|
-
return response.data;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
async findByOwnerId(
|
|
42
|
-
params: Nomalism.shared.IFindByOwnerIdRequest,
|
|
43
|
-
): Promise<Nomalism.UnitOfMeasure.IFindResponse[]> {
|
|
44
|
-
const response = await this.api.get(`${this.route}by_owner`, {
|
|
45
|
-
params,
|
|
46
|
-
});
|
|
47
|
-
return response.data;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
async findById(
|
|
51
|
-
selector: Nomalism.shared.IFindByIdRequest,
|
|
52
|
-
): Promise<Nomalism.UnitOfMeasure.IFindResponse | null> {
|
|
53
|
-
const response = await this.api.get(`${this.route}${selector.id}`);
|
|
54
|
-
return response.data;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
async create(
|
|
58
|
-
body: Nomalism.UnitOfMeasure.ICreateRequest,
|
|
59
|
-
): Promise<Nomalism.UnitOfMeasure.Entity> {
|
|
60
|
-
const response = await this.api.post(`${this.route}`, body);
|
|
61
|
-
return response.data;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
async update(
|
|
65
|
-
selector: Nomalism.shared.IFindByIdRequest,
|
|
66
|
-
body: Nomalism.UnitOfMeasure.IUpdateRequest,
|
|
67
|
-
): Promise<Nomalism.UnitOfMeasure.Entity | null> {
|
|
68
|
-
const response = await this.api.put(`${this.route}${selector.id}`, body);
|
|
69
|
-
return response.data;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
async deleteOne(
|
|
73
|
-
selector: Nomalism.shared.IFindByIdRequest,
|
|
74
|
-
): Promise<Nomalism.UnitOfMeasure.Entity | null> {
|
|
75
|
-
const response = await this.api.delete(`${this.route}${selector.id}`);
|
|
76
|
-
return response.data;
|
|
77
|
-
}
|
|
78
|
-
}
|