@nomalism-com/api 0.8.19 → 0.8.20
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/{src/index.ts → dist/index.d.ts} +2 -118
- package/dist/index.js +257 -0
- package/dist/modules/documentManagement/index.d.ts +2 -0
- package/dist/modules/documentManagement/index.js +7 -0
- package/dist/modules/documentManagement/multimedia.d.ts +5 -0
- package/dist/modules/documentManagement/multimedia.js +69 -0
- package/dist/modules/integration/dynamicData.d.ts +8 -0
- package/dist/modules/integration/dynamicData.js +103 -0
- package/dist/modules/integration/field.d.ts +26 -0
- package/dist/modules/integration/field.js +93 -0
- package/dist/modules/integration/fieldGroup.d.ts +12 -0
- package/dist/modules/integration/fieldGroup.js +118 -0
- package/dist/modules/integration/file.d.ts +5 -0
- package/dist/modules/integration/file.js +83 -0
- package/dist/modules/integration/history.d.ts +11 -0
- package/dist/modules/integration/history.js +63 -0
- package/dist/modules/integration/index.d.ts +2 -0
- package/dist/modules/integration/index.js +7 -0
- package/dist/modules/integration/observation.d.ts +8 -0
- package/dist/modules/integration/observation.js +94 -0
- package/dist/modules/integration/observationType.d.ts +10 -0
- package/dist/modules/integration/observationType.js +107 -0
- package/dist/modules/integration/task.d.ts +10 -0
- package/dist/modules/integration/task.js +113 -0
- package/dist/modules/integration/taskAttachment.d.ts +7 -0
- package/dist/modules/integration/taskAttachment.js +72 -0
- package/dist/modules/integration/taskGroup.d.ts +8 -0
- package/dist/modules/integration/taskGroup.js +103 -0
- package/dist/modules/integration/taskNote.d.ts +8 -0
- package/dist/modules/integration/taskNote.js +92 -0
- package/dist/modules/print/index.d.ts +4 -0
- package/dist/modules/print/index.js +9 -0
- package/dist/modules/print/npc.d.ts +5 -0
- package/dist/modules/print/npc.js +70 -0
- package/dist/modules/print/printer.d.ts +6 -0
- package/dist/modules/print/printer.js +70 -0
- package/dist/modules/print/schedulePrintJob.d.ts +8 -0
- package/dist/modules/print/schedulePrintJob.js +139 -0
- package/dist/modules/stock/attribute.d.ts +16 -0
- package/dist/modules/stock/attribute.js +143 -0
- package/dist/modules/stock/attributeValue.d.ts +12 -0
- package/dist/modules/stock/attributeValue.js +140 -0
- package/dist/modules/stock/cabide.d.ts +15 -0
- package/dist/modules/stock/cabide.js +151 -0
- package/dist/modules/stock/cabideProduct.d.ts +10 -0
- package/dist/modules/stock/cabideProduct.js +127 -0
- package/dist/modules/stock/clientCurrentAccount.d.ts +5 -0
- package/dist/modules/stock/clientCurrentAccount.js +61 -0
- package/dist/modules/stock/color.d.ts +13 -0
- package/dist/modules/stock/color.js +139 -0
- package/dist/modules/stock/composition.d.ts +12 -0
- package/dist/modules/stock/composition.js +127 -0
- package/dist/modules/stock/compositionMaterial.d.ts +13 -0
- package/dist/modules/stock/compositionMaterial.js +140 -0
- package/dist/modules/stock/documentHeader.d.ts +45 -0
- package/dist/modules/stock/documentHeader.js +361 -0
- package/dist/modules/stock/documentLine.d.ts +24 -0
- package/dist/modules/stock/documentLine.js +125 -0
- package/dist/modules/stock/documentLineAssoc.d.ts +20 -0
- package/dist/modules/stock/documentLineAssoc.js +154 -0
- package/dist/modules/stock/documentLineFolder.d.ts +6 -0
- package/dist/modules/stock/documentLineFolder.js +92 -0
- package/dist/modules/stock/documentLineState.d.ts +10 -0
- package/dist/modules/stock/documentLineState.js +114 -0
- package/dist/modules/stock/documentLineStateCriteria.d.ts +20 -0
- package/dist/modules/stock/documentLineStateCriteria.js +121 -0
- package/dist/modules/stock/documentSet.d.ts +8 -0
- package/dist/modules/stock/documentSet.js +114 -0
- package/dist/modules/stock/documentType.d.ts +14 -0
- package/dist/modules/stock/documentType.js +117 -0
- package/dist/modules/stock/externalDocumentHeader.d.ts +15 -0
- package/dist/modules/stock/externalDocumentHeader.js +135 -0
- package/dist/modules/stock/externalDocumentType.d.ts +6 -0
- package/dist/modules/stock/externalDocumentType.js +70 -0
- package/dist/modules/stock/index.d.ts +3 -0
- package/dist/modules/stock/index.js +8 -0
- package/dist/modules/stock/location.d.ts +12 -0
- package/dist/modules/stock/location.js +140 -0
- package/dist/modules/stock/maintenance.d.ts +12 -0
- package/dist/modules/stock/maintenance.js +140 -0
- package/dist/modules/stock/maintenanceAssoc.d.ts +12 -0
- package/dist/modules/stock/maintenanceAssoc.js +127 -0
- package/dist/modules/stock/maintenancePreset.d.ts +10 -0
- package/dist/modules/stock/maintenancePreset.js +114 -0
- package/dist/modules/stock/maintenancePresetAssoc.d.ts +8 -0
- package/dist/modules/stock/maintenancePresetAssoc.js +91 -0
- package/dist/modules/stock/maintenanceType.d.ts +13 -0
- package/dist/modules/stock/maintenanceType.js +140 -0
- package/dist/modules/stock/moloniRequest.d.ts +5 -0
- package/dist/modules/stock/moloniRequest.js +59 -0
- package/dist/modules/stock/orderManagement.d.ts +11 -0
- package/dist/modules/stock/orderManagement.js +88 -0
- package/dist/modules/stock/payment.d.ts +22 -0
- package/dist/modules/stock/payment.js +210 -0
- package/dist/modules/stock/plot.d.ts +32 -0
- package/dist/modules/stock/plot.js +238 -0
- package/dist/modules/stock/preSale.d.ts +11 -0
- package/dist/modules/stock/preSale.js +125 -0
- package/dist/modules/stock/preSaleProduct.d.ts +4 -0
- package/dist/modules/stock/preSaleProduct.js +70 -0
- package/dist/modules/stock/primaryColor.d.ts +13 -0
- package/dist/modules/stock/primaryColor.js +140 -0
- package/dist/modules/stock/product.d.ts +30 -0
- package/dist/modules/stock/product.js +239 -0
- package/dist/modules/stock/productAttribute.d.ts +12 -0
- package/dist/modules/stock/productAttribute.js +127 -0
- package/dist/modules/stock/productCategory.d.ts +13 -0
- package/dist/modules/stock/productCategory.js +140 -0
- package/dist/modules/stock/productColor.d.ts +12 -0
- package/dist/modules/stock/productColor.js +127 -0
- package/dist/modules/stock/productImage.d.ts +14 -0
- package/dist/modules/stock/productImage.js +130 -0
- package/dist/modules/stock/productName.d.ts +13 -0
- package/dist/modules/stock/productName.js +140 -0
- package/dist/modules/stock/productNamePreset.d.ts +13 -0
- package/dist/modules/stock/productNamePreset.js +140 -0
- package/dist/modules/stock/productPart.d.ts +14 -0
- package/dist/modules/stock/productPart.js +139 -0
- package/dist/modules/stock/productSubCategory.d.ts +13 -0
- package/dist/modules/stock/productSubCategory.js +139 -0
- package/dist/modules/stock/productUse.d.ts +13 -0
- package/dist/modules/stock/productUse.js +140 -0
- package/dist/modules/stock/productUseAssoc.d.ts +12 -0
- package/dist/modules/stock/productUseAssoc.js +126 -0
- package/dist/modules/stock/promotion.d.ts +13 -0
- package/dist/modules/stock/promotion.js +140 -0
- package/dist/modules/stock/promotionAssoc.d.ts +12 -0
- package/dist/modules/stock/promotionAssoc.js +127 -0
- package/dist/modules/stock/providerCurrentAccount.d.ts +5 -0
- package/dist/modules/stock/providerCurrentAccount.js +61 -0
- package/dist/modules/stock/queryList.d.ts +11 -0
- package/dist/modules/stock/queryList.js +116 -0
- package/dist/modules/stock/queryParameter.d.ts +8 -0
- package/dist/modules/stock/queryParameter.js +105 -0
- package/dist/modules/stock/returnReason.d.ts +6 -0
- package/dist/modules/stock/returnReason.js +92 -0
- package/dist/modules/stock/similarProduct.d.ts +12 -0
- package/dist/modules/stock/similarProduct.js +127 -0
- package/dist/modules/stock/stockMovement.d.ts +8 -0
- package/dist/modules/stock/stockMovement.js +75 -0
- package/dist/modules/stock/topMenu.d.ts +5 -0
- package/dist/modules/stock/topMenu.js +61 -0
- package/dist/modules/stock/typeOfInventory.d.ts +13 -0
- package/dist/modules/stock/typeOfInventory.js +140 -0
- package/dist/modules/stock/typeOfLocation.d.ts +13 -0
- package/dist/modules/stock/typeOfLocation.js +140 -0
- package/dist/modules/stock/unitOfMeasure.d.ts +13 -0
- package/dist/modules/stock/unitOfMeasure.js +140 -0
- package/dist/modules/stock/vatTax.d.ts +13 -0
- package/dist/modules/stock/vatTax.js +140 -0
- package/dist/modules/stock/vatTaxZone.d.ts +14 -0
- package/dist/modules/stock/vatTaxZone.js +140 -0
- package/dist/modules/stock/vatValidation.d.ts +4 -0
- package/dist/modules/stock/vatValidation.js +63 -0
- package/dist/modules/stock/websiteRequest.d.ts +10 -0
- package/dist/modules/stock/websiteRequest.js +96 -0
- package/dist/modules/stock/workflow.d.ts +8 -0
- package/dist/modules/stock/workflow.js +103 -0
- package/dist/modules/user/address.d.ts +12 -0
- package/dist/modules/user/address.js +127 -0
- package/dist/modules/user/bankData.d.ts +12 -0
- package/dist/modules/user/bankData.js +127 -0
- package/dist/modules/user/clientType.d.ts +12 -0
- package/dist/modules/user/clientType.js +127 -0
- package/dist/modules/user/clients.d.ts +17 -0
- package/dist/modules/user/clients.js +140 -0
- package/dist/modules/user/commissioner.d.ts +15 -0
- package/dist/modules/user/commissioner.js +140 -0
- package/dist/modules/user/contactTypes.d.ts +12 -0
- package/dist/modules/user/contactTypes.js +127 -0
- package/dist/modules/user/contacts.d.ts +14 -0
- package/dist/modules/user/contacts.js +149 -0
- package/dist/modules/user/country.d.ts +12 -0
- package/dist/modules/user/country.js +140 -0
- package/dist/modules/user/deliveryMethods.d.ts +8 -0
- package/dist/modules/user/deliveryMethods.js +116 -0
- package/dist/modules/user/entityList.d.ts +7 -0
- package/dist/modules/user/entityList.js +105 -0
- package/dist/modules/user/favorites.d.ts +7 -0
- package/dist/modules/user/favorites.js +92 -0
- package/dist/modules/user/groupPermission.d.ts +7 -0
- package/dist/modules/user/groupPermission.js +94 -0
- package/dist/modules/user/index.d.ts +3 -0
- package/dist/modules/user/index.js +8 -0
- package/dist/modules/user/language.d.ts +12 -0
- package/dist/modules/user/language.js +127 -0
- package/dist/modules/user/logout.d.ts +2 -0
- package/dist/modules/user/logout.js +58 -0
- package/dist/modules/user/maturityDates.d.ts +8 -0
- package/dist/modules/user/maturityDates.js +116 -0
- package/dist/modules/user/password.d.ts +5 -0
- package/dist/modules/user/password.js +68 -0
- package/dist/modules/user/paymentCondition.d.ts +11 -0
- package/dist/modules/user/paymentCondition.js +127 -0
- package/dist/modules/user/paymentMethods.d.ts +8 -0
- package/dist/modules/user/paymentMethods.js +116 -0
- package/dist/modules/user/permission.d.ts +7 -0
- package/dist/modules/user/permission.js +94 -0
- package/dist/modules/user/provider.d.ts +15 -0
- package/dist/modules/user/provider.js +153 -0
- package/dist/modules/user/providerType.d.ts +12 -0
- package/dist/modules/user/providerType.js +127 -0
- package/dist/modules/user/purchaseCondition.d.ts +12 -0
- package/dist/modules/user/purchaseCondition.js +127 -0
- package/dist/modules/user/reasonForExemption.d.ts +12 -0
- package/dist/modules/user/reasonForExemption.js +127 -0
- package/dist/modules/user/refreshToken.d.ts +5 -0
- package/dist/modules/user/refreshToken.js +59 -0
- package/dist/modules/user/segmentsArea.d.ts +12 -0
- package/dist/modules/user/segmentsArea.js +127 -0
- package/dist/modules/user/sessions.d.ts +5 -0
- package/dist/modules/user/sessions.js +59 -0
- package/dist/modules/user/shippings.d.ts +11 -0
- package/dist/modules/user/shippings.js +127 -0
- package/dist/modules/user/socialMedia.d.ts +11 -0
- package/dist/modules/user/socialMedia.js +127 -0
- package/dist/modules/user/storeOperator.d.ts +16 -0
- package/dist/modules/user/storeOperator.js +151 -0
- package/dist/modules/user/swift.d.ts +12 -0
- package/dist/modules/user/swift.js +127 -0
- package/dist/modules/user/tenant.d.ts +6 -0
- package/dist/modules/user/tenant.js +92 -0
- package/dist/modules/user/user.d.ts +18 -0
- package/dist/modules/user/user.js +151 -0
- package/dist/modules/user/userPermission.d.ts +7 -0
- package/dist/modules/user/userPermission.js +83 -0
- package/dist/modules/user/userPositions.d.ts +12 -0
- package/dist/modules/user/userPositions.js +127 -0
- package/dist/modules/user/userToken.d.ts +9 -0
- package/dist/modules/user/userToken.js +116 -0
- package/dist/modules/user/vehicles.d.ts +6 -0
- package/dist/modules/user/vehicles.js +92 -0
- package/dist/modules/user/zipCode.d.ts +6 -0
- package/dist/modules/user/zipCode.js +69 -0
- package/dist/shared/client.d.ts +2 -0
- package/dist/shared/client.js +9 -0
- package/package.json +13 -8
- package/.editorconfig +0 -9
- package/.eslintignore +0 -3
- package/.eslintrc.json +0 -51
- package/.nvmrc +0 -1
- package/package-lock.json +0 -6181
- package/prettier.config.js +0 -5
- package/src/modules/documentManagement/index.ts +0 -6
- package/src/modules/documentManagement/multimedia.ts +0 -33
- package/src/modules/integration/dynamicData.ts +0 -45
- package/src/modules/integration/field.ts +0 -38
- package/src/modules/integration/fieldGroup.ts +0 -68
- package/src/modules/integration/file.ts +0 -30
- package/src/modules/integration/history.ts +0 -30
- package/src/modules/integration/index.ts +0 -6
- package/src/modules/integration/observation.ts +0 -43
- package/src/modules/integration/observationType.ts +0 -55
- package/src/modules/integration/task.ts +0 -66
- package/src/modules/integration/taskAttachment.ts +0 -26
- package/src/modules/integration/taskGroup.ts +0 -45
- package/src/modules/integration/taskNote.ts +0 -39
- package/src/modules/print/index.ts +0 -10
- package/src/modules/print/npc.ts +0 -24
- package/src/modules/print/printer.ts +0 -26
- package/src/modules/print/schedulePrintJob.ts +0 -75
- package/src/modules/stock/attribute.ts +0 -101
- package/src/modules/stock/attributeValue.ts +0 -91
- package/src/modules/stock/cabide.ts +0 -105
- package/src/modules/stock/cabideProduct.ts +0 -67
- package/src/modules/stock/clientCurrentAccount.ts +0 -22
- package/src/modules/stock/color.ts +0 -90
- package/src/modules/stock/composition.ts +0 -81
- package/src/modules/stock/compositionMaterial.ts +0 -92
- package/src/modules/stock/documentHeader.ts +0 -324
- package/src/modules/stock/documentLine.ts +0 -89
- package/src/modules/stock/documentLineAssoc.ts +0 -117
- package/src/modules/stock/documentLineFolder.ts +0 -43
- package/src/modules/stock/documentLineState.ts +0 -66
- package/src/modules/stock/documentLineStateCriteria.ts +0 -90
- package/src/modules/stock/documentSet.ts +0 -53
- package/src/modules/stock/documentType.ts +0 -68
- package/src/modules/stock/externalDocumentHeader.ts +0 -85
- package/src/modules/stock/externalDocumentType.ts +0 -26
- package/src/modules/stock/index.ts +0 -8
- package/src/modules/stock/location.ts +0 -91
- package/src/modules/stock/maintenance.ts +0 -91
- package/src/modules/stock/maintenanceAssoc.ts +0 -81
- package/src/modules/stock/maintenancePreset.ts +0 -55
- package/src/modules/stock/maintenancePresetAssoc.ts +0 -42
- package/src/modules/stock/maintenanceType.ts +0 -92
- package/src/modules/stock/moloniRequest.ts +0 -18
- package/src/modules/stock/orderManagement.ts +0 -41
- package/src/modules/stock/payment.ts +0 -161
- package/src/modules/stock/plot.ts +0 -196
- package/src/modules/stock/preSale.ts +0 -76
- package/src/modules/stock/preSaleProduct.ts +0 -23
- package/src/modules/stock/primaryColor.ts +0 -92
- package/src/modules/stock/product.ts +0 -197
- package/src/modules/stock/productAttribute.ts +0 -81
- package/src/modules/stock/productCategory.ts +0 -92
- package/src/modules/stock/productColor.ts +0 -81
- package/src/modules/stock/productImage.ts +0 -86
- package/src/modules/stock/productName.ts +0 -92
- package/src/modules/stock/productNamePreset.ts +0 -92
- package/src/modules/stock/productPart.ts +0 -91
- package/src/modules/stock/productSubCategory.ts +0 -90
- package/src/modules/stock/productUse.ts +0 -92
- package/src/modules/stock/productUseAssoc.ts +0 -78
- package/src/modules/stock/promotion.ts +0 -93
- package/src/modules/stock/promotionAssoc.ts +0 -81
- package/src/modules/stock/providerCurrentAccount.ts +0 -22
- package/src/modules/stock/queryList.ts +0 -61
- package/src/modules/stock/queryParameter.ts +0 -50
- package/src/modules/stock/returnReason.ts +0 -40
- package/src/modules/stock/similarProduct.ts +0 -81
- package/src/modules/stock/stockMovement.ts +0 -32
- package/src/modules/stock/topMenu.ts +0 -22
- package/src/modules/stock/typeOfInventory.ts +0 -92
- package/src/modules/stock/typeOfLocation.ts +0 -92
- package/src/modules/stock/unitOfMeasure.ts +0 -92
- package/src/modules/stock/vatTax.ts +0 -92
- package/src/modules/stock/vatTaxZone.ts +0 -94
- package/src/modules/stock/vatValidation.ts +0 -20
- package/src/modules/stock/websiteRequest.ts +0 -51
- package/src/modules/stock/workflow.ts +0 -50
- package/src/modules/user/address.ts +0 -81
- package/src/modules/user/bankData.ts +0 -81
- package/src/modules/user/clientType.ts +0 -80
- package/src/modules/user/clients.ts +0 -100
- package/src/modules/user/commissioner.ts +0 -96
- package/src/modules/user/contactTypes.ts +0 -80
- package/src/modules/user/contacts.ts +0 -100
- package/src/modules/user/country.ts +0 -90
- package/src/modules/user/deliveryMethods.ts +0 -60
- package/src/modules/user/entityList.ts +0 -42
- package/src/modules/user/favorites.ts +0 -36
- package/src/modules/user/groupPermission.ts +0 -44
- package/src/modules/user/index.ts +0 -8
- package/src/modules/user/language.ts +0 -80
- package/src/modules/user/logout.ts +0 -12
- package/src/modules/user/maturityDates.ts +0 -60
- package/src/modules/user/password.ts +0 -21
- package/src/modules/user/paymentCondition.ts +0 -79
- package/src/modules/user/paymentMethods.ts +0 -60
- package/src/modules/user/permission.ts +0 -44
- package/src/modules/user/provider.ts +0 -106
- package/src/modules/user/providerType.ts +0 -80
- package/src/modules/user/purchaseCondition.ts +0 -82
- package/src/modules/user/reasonForExemption.ts +0 -80
- package/src/modules/user/refreshToken.ts +0 -18
- package/src/modules/user/segmentsArea.ts +0 -80
- package/src/modules/user/sessions.ts +0 -18
- package/src/modules/user/shippings.ts +0 -79
- package/src/modules/user/socialMedia.ts +0 -79
- package/src/modules/user/storeOperator.ts +0 -104
- package/src/modules/user/swift.ts +0 -80
- package/src/modules/user/tenant.ts +0 -36
- package/src/modules/user/user.ts +0 -111
- package/src/modules/user/userPermission.ts +0 -37
- package/src/modules/user/userPositions.ts +0 -80
- package/src/modules/user/userToken.ts +0 -69
- package/src/modules/user/vehicles.ts +0 -40
- package/src/modules/user/zipCode.ts +0 -23
- package/src/shared/client.ts +0 -5
- package/tsconfig.json +0 -19
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
import { shared, CompositionMaterial as Entity } from '@nomalism-com/types';
|
|
2
|
-
import api from '../../shared/client';
|
|
3
|
-
import { serviceHostname, serviceAuthPath } from '.';
|
|
4
|
-
|
|
5
|
-
export import IFindRequest = Entity.IFindRequest;
|
|
6
|
-
export import IFindResponse = Entity.IFindResponse;
|
|
7
|
-
|
|
8
|
-
export import IFindPaginatedRequest = Entity.IFindPaginatedRequest;
|
|
9
|
-
|
|
10
|
-
export import IFindMinifiedRequest = shared.IFindMinifiedRequest;
|
|
11
|
-
export import IFindMinifiedResponse = shared.IFindMinifiedResponse;
|
|
12
|
-
|
|
13
|
-
export import IFindByOwnerIdRequest = shared.IFindByOwnerIdRequest;
|
|
14
|
-
|
|
15
|
-
export import ICreateRequest = Entity.ICreateRequest;
|
|
16
|
-
export import IEntity = Entity.Entity;
|
|
17
|
-
|
|
18
|
-
export import IUpdateRequest = Entity.IUpdateRequest;
|
|
19
|
-
export type IPaginationResponse =
|
|
20
|
-
shared.IPaginationResponse<Entity.IFindResponse>;
|
|
21
|
-
|
|
22
|
-
export const route = `${serviceHostname}${serviceAuthPath}composition_material/`;
|
|
23
|
-
|
|
24
|
-
const repository: Entity.IRepository = {
|
|
25
|
-
find: async (params: IFindRequest): Promise<IFindResponse[]> => {
|
|
26
|
-
const response = await api.get(`${route}`, { params });
|
|
27
|
-
return response.data;
|
|
28
|
-
},
|
|
29
|
-
|
|
30
|
-
findPaginated: async (
|
|
31
|
-
params: IFindPaginatedRequest,
|
|
32
|
-
): Promise<IPaginationResponse> => {
|
|
33
|
-
const response = await api.get(`${route}paginated`, { params });
|
|
34
|
-
return response.data;
|
|
35
|
-
},
|
|
36
|
-
|
|
37
|
-
findMinified: async (
|
|
38
|
-
params?: IFindMinifiedRequest,
|
|
39
|
-
): Promise<IFindMinifiedResponse[]> => {
|
|
40
|
-
const response = await api.get(`${route}minified`, {
|
|
41
|
-
params,
|
|
42
|
-
});
|
|
43
|
-
return response.data;
|
|
44
|
-
},
|
|
45
|
-
|
|
46
|
-
findByOwnerId: async (
|
|
47
|
-
params: IFindByOwnerIdRequest,
|
|
48
|
-
): Promise<IFindResponse[]> => {
|
|
49
|
-
const response = await api.get(`${route}by_owner`, {
|
|
50
|
-
params,
|
|
51
|
-
});
|
|
52
|
-
return response.data;
|
|
53
|
-
},
|
|
54
|
-
|
|
55
|
-
findById: async (
|
|
56
|
-
selector: shared.IFindByIdRequest,
|
|
57
|
-
): Promise<IFindResponse | null> => {
|
|
58
|
-
const response = await api.get(`${route}${selector.id}`);
|
|
59
|
-
return response.data;
|
|
60
|
-
},
|
|
61
|
-
|
|
62
|
-
create: async (body: ICreateRequest): Promise<IEntity> => {
|
|
63
|
-
const response = await api.post(`${route}`, body);
|
|
64
|
-
return response.data;
|
|
65
|
-
},
|
|
66
|
-
|
|
67
|
-
update: async (
|
|
68
|
-
selector: shared.IFindByIdRequest,
|
|
69
|
-
body: IUpdateRequest,
|
|
70
|
-
): Promise<IEntity | null> => {
|
|
71
|
-
const response = await api.put(`${route}${selector.id}`, body);
|
|
72
|
-
return response.data;
|
|
73
|
-
},
|
|
74
|
-
|
|
75
|
-
deleteOne: async (
|
|
76
|
-
selector: shared.IFindByIdRequest,
|
|
77
|
-
): Promise<IEntity | null> => {
|
|
78
|
-
const response = await api.delete(`${route}${selector.id}`);
|
|
79
|
-
return response.data;
|
|
80
|
-
},
|
|
81
|
-
};
|
|
82
|
-
|
|
83
|
-
export const {
|
|
84
|
-
find,
|
|
85
|
-
findPaginated,
|
|
86
|
-
findMinified,
|
|
87
|
-
findByOwnerId,
|
|
88
|
-
findById,
|
|
89
|
-
create,
|
|
90
|
-
update,
|
|
91
|
-
deleteOne,
|
|
92
|
-
} = repository;
|
|
@@ -1,324 +0,0 @@
|
|
|
1
|
-
import { shared, DocumentHeader as Entity } from '@nomalism-com/types';
|
|
2
|
-
import api from '../../shared/client';
|
|
3
|
-
import { serviceHostname, serviceAuthPath } from '.';
|
|
4
|
-
|
|
5
|
-
export import IFindByDocumentLineStateRequest = Entity.IFindByDocumentLineStateRequest;
|
|
6
|
-
|
|
7
|
-
export import IFindByDocumentLineStateResponse = Entity.IFindByDocumentLineStateResponse;
|
|
8
|
-
|
|
9
|
-
export import IFindOneResponse = Entity.IFindOneResponse;
|
|
10
|
-
|
|
11
|
-
export import IFindRequest = Entity.IFindRequest;
|
|
12
|
-
|
|
13
|
-
export import IFindByCommissionerIdRequest = Entity.IFindByCommissionerIdRequest;
|
|
14
|
-
|
|
15
|
-
export import IFindByCommissionerIdResponse = Entity.IFindByCommissionerIdResponse;
|
|
16
|
-
|
|
17
|
-
export import IFindMinifiedRequest = shared.IFindMinifiedRequest;
|
|
18
|
-
|
|
19
|
-
export import IFindMinifiedResponse = shared.IFindMinifiedResponse;
|
|
20
|
-
|
|
21
|
-
export import IBasicSearchRequest = Entity.IBasicSearchRequest;
|
|
22
|
-
|
|
23
|
-
export import IBasicSearchResponse = Entity.IBasicSearchResponse;
|
|
24
|
-
|
|
25
|
-
export import ICreateRequest = Entity.ICreateRequest;
|
|
26
|
-
|
|
27
|
-
export import IUpdateRequest = Entity.IUpdateRequest;
|
|
28
|
-
|
|
29
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
30
|
-
export import IEntity = Entity.Entity;
|
|
31
|
-
|
|
32
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
33
|
-
export import IStartDocumentHeaderVirtuals = Entity.IStartDocumentHeaderVirtuals;
|
|
34
|
-
|
|
35
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
36
|
-
export import IDocumentHeaderVirtuals = Entity.IDocumentHeaderVirtuals;
|
|
37
|
-
|
|
38
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
39
|
-
export import ICreateFromHeaderMaturityDate = Entity.ICreateFromHeaderMaturityDate;
|
|
40
|
-
|
|
41
|
-
export import ICreateFromHeaderRequest = Entity.ICreateFromHeaderRequest;
|
|
42
|
-
|
|
43
|
-
export import IGetActionsResponse = Entity.IGetActionsResponse;
|
|
44
|
-
|
|
45
|
-
export import IBrokerMessage = shared.IBrokerMessage;
|
|
46
|
-
|
|
47
|
-
export import IBrokerTopic = shared.IBrokerTopic;
|
|
48
|
-
|
|
49
|
-
export import IUnpaidDocumentResponse = Entity.IUnpaidDocumentResponse;
|
|
50
|
-
|
|
51
|
-
export import IUnfinishedPickingsResponse = Entity.IUnfinishedPickingsResponse;
|
|
52
|
-
|
|
53
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
54
|
-
export import IUnpaidMaterialEntranceLineType = Entity.IUnpaidMaterialEntranceLineType;
|
|
55
|
-
|
|
56
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
57
|
-
export import IUnpaidMaterialEntranceLineResponse = Entity.IUnpaidMaterialEntranceLineResponse;
|
|
58
|
-
|
|
59
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
60
|
-
export import IUnpaidMaterialEntranceItemResponse = Entity.IUnpaidMaterialEntranceItemResponse;
|
|
61
|
-
|
|
62
|
-
export import IUnpaidMaterialEntranceResponse = Entity.IUnpaidMaterialEntranceResponse;
|
|
63
|
-
|
|
64
|
-
export import ICreateFromPlotsRequest = Entity.ICreateFromPlotsRequest;
|
|
65
|
-
|
|
66
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
67
|
-
export import IValueByVatTax = Entity.IValueByVatTax;
|
|
68
|
-
|
|
69
|
-
export import IFindProviderInvoiceRequest = Entity.IFindProviderInvoiceRequest;
|
|
70
|
-
|
|
71
|
-
export import IFindProviderInvoiceResponse = Entity.IFindProviderInvoiceResponse;
|
|
72
|
-
|
|
73
|
-
export import ICreateProviderFinancialCreditNoteRequest = Entity.ICreateProviderFinancialCreditNoteRequest;
|
|
74
|
-
|
|
75
|
-
export import ICreateProviderServiceInvoiceRequest = Entity.ICreateProviderServiceInvoiceRequest;
|
|
76
|
-
|
|
77
|
-
export import IFindProviderReturnRequest = Entity.IFindProviderReturnRequest;
|
|
78
|
-
|
|
79
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
80
|
-
export import IFindProviderReturnOptionValue = Entity.IFindProviderReturnOptionValue;
|
|
81
|
-
|
|
82
|
-
export import IFindProviderReturnResponse = Entity.IFindProviderReturnResponse;
|
|
83
|
-
|
|
84
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
85
|
-
export import ICreateProviderCreditNoteFromReturnDocumentHeaders = Entity.ICreateProviderCreditNoteFromReturnDocumentHeaders;
|
|
86
|
-
|
|
87
|
-
export import ICreateProviderCreditNoteFromReturnRequest = Entity.ICreateProviderCreditNoteFromReturnRequest;
|
|
88
|
-
|
|
89
|
-
export import ICreateProductionOrderRequest = Entity.ICreateProductionOrderRequest;
|
|
90
|
-
|
|
91
|
-
export import ITransferOwnershipRequest = Entity.ITransferOwnershipRequest;
|
|
92
|
-
|
|
93
|
-
export import IUpdateManyWithContact = Entity.IUpdateManyWithContact;
|
|
94
|
-
|
|
95
|
-
export import IUpdateManyWithAddress = Entity.IUpdateManyWithAddress;
|
|
96
|
-
|
|
97
|
-
export import IFindResponse = Entity.IFindResponse;
|
|
98
|
-
|
|
99
|
-
export const route = `${serviceHostname}${serviceAuthPath}document_header/`;
|
|
100
|
-
|
|
101
|
-
const repository: Entity.IController = {
|
|
102
|
-
findMinified: async (
|
|
103
|
-
params?: IFindMinifiedRequest,
|
|
104
|
-
): Promise<IFindMinifiedResponse[]> => {
|
|
105
|
-
const response = await api.get(`${route}minified`, {
|
|
106
|
-
params,
|
|
107
|
-
});
|
|
108
|
-
return response.data;
|
|
109
|
-
},
|
|
110
|
-
|
|
111
|
-
findOne: async (
|
|
112
|
-
selector: shared.IFindByIdRequest,
|
|
113
|
-
): Promise<IFindOneResponse | null> => {
|
|
114
|
-
const response = await api.get(`${route}${selector.id}`);
|
|
115
|
-
return response.data;
|
|
116
|
-
},
|
|
117
|
-
|
|
118
|
-
findByDocumentLineState: async (
|
|
119
|
-
params: IFindByDocumentLineStateRequest,
|
|
120
|
-
): Promise<IFindByDocumentLineStateResponse[]> => {
|
|
121
|
-
const response = await api.get(`${route}by_document_line_state`, {
|
|
122
|
-
params,
|
|
123
|
-
});
|
|
124
|
-
return response.data;
|
|
125
|
-
},
|
|
126
|
-
|
|
127
|
-
findByBasicSearch: async (
|
|
128
|
-
params: IBasicSearchRequest,
|
|
129
|
-
): Promise<shared.IPaginationResponse<IBasicSearchResponse>> => {
|
|
130
|
-
const response = await api.get(`${route}basic_search`, {
|
|
131
|
-
params,
|
|
132
|
-
});
|
|
133
|
-
return response.data;
|
|
134
|
-
},
|
|
135
|
-
|
|
136
|
-
find: async (params: IFindRequest): Promise<IFindResponse[]> => {
|
|
137
|
-
const response = await api.get(`${route}`, { params });
|
|
138
|
-
return response.data;
|
|
139
|
-
},
|
|
140
|
-
|
|
141
|
-
findByCommissionerId: async (
|
|
142
|
-
params: IFindByCommissionerIdRequest,
|
|
143
|
-
): Promise<IFindByCommissionerIdResponse[]> => {
|
|
144
|
-
const response = await api.get(`${route}by_commissioner`, { params });
|
|
145
|
-
return response.data;
|
|
146
|
-
},
|
|
147
|
-
|
|
148
|
-
findClientUnpaidCredit: async (
|
|
149
|
-
params: shared.IFindByOwnerIdRequest,
|
|
150
|
-
): Promise<IUnpaidDocumentResponse[]> => {
|
|
151
|
-
const response = await api.get(`${route}unpaid_credit`, { params });
|
|
152
|
-
return response.data;
|
|
153
|
-
},
|
|
154
|
-
|
|
155
|
-
findClientUnpaidDebit: async (
|
|
156
|
-
params: shared.IFindByOwnerIdRequest,
|
|
157
|
-
): Promise<IUnpaidDocumentResponse[]> => {
|
|
158
|
-
const response = await api.get(`${route}unpaid_debit`, { params });
|
|
159
|
-
return response.data;
|
|
160
|
-
},
|
|
161
|
-
|
|
162
|
-
findUnpaidCommissions: async (
|
|
163
|
-
params: shared.IFindByOwnerIdRequest,
|
|
164
|
-
): Promise<IUnpaidDocumentResponse[]> => {
|
|
165
|
-
const response = await api.get(`${route}unpaid_commissions`, { params });
|
|
166
|
-
return response.data;
|
|
167
|
-
},
|
|
168
|
-
|
|
169
|
-
create: async (body: ICreateRequest): Promise<IFindOneResponse> => {
|
|
170
|
-
const response = await api.post(`${route}`, body);
|
|
171
|
-
return response.data;
|
|
172
|
-
},
|
|
173
|
-
|
|
174
|
-
createFromHeader: async (
|
|
175
|
-
body: ICreateFromHeaderRequest,
|
|
176
|
-
): Promise<IBrokerMessage<IBrokerTopic.document_header_create_start>[]> => {
|
|
177
|
-
const response = await api.post(`${route}from_header`, body);
|
|
178
|
-
return response.data;
|
|
179
|
-
},
|
|
180
|
-
|
|
181
|
-
createProductionOrder: async (
|
|
182
|
-
body: ICreateProductionOrderRequest,
|
|
183
|
-
): Promise<void> => {
|
|
184
|
-
await api.post(`${route}production_order`, body);
|
|
185
|
-
},
|
|
186
|
-
|
|
187
|
-
createFromPlots: async (
|
|
188
|
-
body: ICreateFromPlotsRequest,
|
|
189
|
-
): Promise<shared.IBrokerMessage<shared.IBrokerTopic>[]> => {
|
|
190
|
-
const response = await api.post(`${route}from_plots`, body);
|
|
191
|
-
return response.data;
|
|
192
|
-
},
|
|
193
|
-
|
|
194
|
-
update: async (
|
|
195
|
-
selector: shared.IFindByIdRequest,
|
|
196
|
-
body: IUpdateRequest,
|
|
197
|
-
): Promise<IFindOneResponse | null> => {
|
|
198
|
-
const response = await api.put(`${route}${selector.id}`, body);
|
|
199
|
-
return response.data;
|
|
200
|
-
},
|
|
201
|
-
|
|
202
|
-
deleteOne: async (selector: shared.IFindByIdRequest): Promise<void> => {
|
|
203
|
-
await api.delete(`${route}${selector.id}`);
|
|
204
|
-
},
|
|
205
|
-
|
|
206
|
-
getActions: async (
|
|
207
|
-
selector: shared.IFindByIdRequest,
|
|
208
|
-
): Promise<IGetActionsResponse[]> => {
|
|
209
|
-
const response = await api.get(`${route}get_actions/${selector.id}`);
|
|
210
|
-
return response.data;
|
|
211
|
-
},
|
|
212
|
-
|
|
213
|
-
findUnfinishedPickings: async ({
|
|
214
|
-
id,
|
|
215
|
-
}: shared.IFindByIdRequest): Promise<IUnfinishedPickingsResponse[]> => {
|
|
216
|
-
const response = await api.get(`${route}unfinished_pickings/${id}`);
|
|
217
|
-
return response.data;
|
|
218
|
-
},
|
|
219
|
-
|
|
220
|
-
findUnpaidMaterialEntrance: async (
|
|
221
|
-
params: shared.IFindByIdRequest,
|
|
222
|
-
): Promise<IUnpaidMaterialEntranceResponse> => {
|
|
223
|
-
const response = await api.get(`${route}unpaid_material_entrance`, {
|
|
224
|
-
params,
|
|
225
|
-
});
|
|
226
|
-
return response.data;
|
|
227
|
-
},
|
|
228
|
-
|
|
229
|
-
findUnpaidMaterialEntranceProviders: async (): Promise<
|
|
230
|
-
shared.IFindMinifiedResponse[]
|
|
231
|
-
> => {
|
|
232
|
-
const response = await api.get(
|
|
233
|
-
`${route}unpaid_material_entrance_providers`,
|
|
234
|
-
);
|
|
235
|
-
return response.data;
|
|
236
|
-
},
|
|
237
|
-
|
|
238
|
-
findMaterialEntranceProviders: async (): Promise<
|
|
239
|
-
shared.IFindMinifiedResponse[]
|
|
240
|
-
> => {
|
|
241
|
-
const response = await api.get(`${route}material_entrance_providers`);
|
|
242
|
-
return response.data;
|
|
243
|
-
},
|
|
244
|
-
|
|
245
|
-
findProviderInvoice: async (
|
|
246
|
-
params: IFindProviderInvoiceRequest,
|
|
247
|
-
): Promise<IFindProviderInvoiceResponse[]> => {
|
|
248
|
-
const response = await api.get(`${route}provider_invoice`, { params });
|
|
249
|
-
return response.data;
|
|
250
|
-
},
|
|
251
|
-
|
|
252
|
-
createProviderFinancialCreditNote: async (
|
|
253
|
-
data: ICreateProviderFinancialCreditNoteRequest,
|
|
254
|
-
): Promise<void> => {
|
|
255
|
-
await api.post(`${route}provider_financial_credit_note`, data);
|
|
256
|
-
},
|
|
257
|
-
|
|
258
|
-
createProviderServiceInvoice: async (
|
|
259
|
-
data: ICreateProviderServiceInvoiceRequest,
|
|
260
|
-
): Promise<void> => {
|
|
261
|
-
await api.post(`${route}provider_service_invoice`, data);
|
|
262
|
-
},
|
|
263
|
-
|
|
264
|
-
findProviderReturn: async (
|
|
265
|
-
params: IFindProviderReturnRequest,
|
|
266
|
-
): Promise<IFindProviderReturnResponse[]> => {
|
|
267
|
-
const response = await api.get(`${route}provider_return`, { params });
|
|
268
|
-
return response.data;
|
|
269
|
-
},
|
|
270
|
-
|
|
271
|
-
createProviderCreditNoteFromReturn: async (
|
|
272
|
-
data: ICreateProviderCreditNoteFromReturnRequest,
|
|
273
|
-
): Promise<void> => {
|
|
274
|
-
await api.post(`${route}provider_credit_note_from_return`, data);
|
|
275
|
-
},
|
|
276
|
-
|
|
277
|
-
transferClientOwnership: async (
|
|
278
|
-
data: ITransferOwnershipRequest,
|
|
279
|
-
): Promise<void> => {
|
|
280
|
-
await api.put(`${route}transfer_client_ownership`, data);
|
|
281
|
-
},
|
|
282
|
-
|
|
283
|
-
updateManyWithContact: async (
|
|
284
|
-
data: IUpdateManyWithContact,
|
|
285
|
-
): Promise<void> => {
|
|
286
|
-
await api.put(`${route}update_many_with_contact`, data);
|
|
287
|
-
},
|
|
288
|
-
|
|
289
|
-
updateManyWithAddress: async (
|
|
290
|
-
data: IUpdateManyWithAddress,
|
|
291
|
-
): Promise<void> => {
|
|
292
|
-
await api.put(`${route}update_many_with_address`, data);
|
|
293
|
-
},
|
|
294
|
-
};
|
|
295
|
-
|
|
296
|
-
export const {
|
|
297
|
-
findMinified,
|
|
298
|
-
findOne,
|
|
299
|
-
findByDocumentLineState,
|
|
300
|
-
findByBasicSearch,
|
|
301
|
-
findByCommissionerId,
|
|
302
|
-
findClientUnpaidCredit,
|
|
303
|
-
findClientUnpaidDebit,
|
|
304
|
-
find,
|
|
305
|
-
create,
|
|
306
|
-
createFromHeader,
|
|
307
|
-
createFromPlots,
|
|
308
|
-
update,
|
|
309
|
-
deleteOne,
|
|
310
|
-
getActions,
|
|
311
|
-
findUnpaidCommissions,
|
|
312
|
-
findUnfinishedPickings,
|
|
313
|
-
findUnpaidMaterialEntrance,
|
|
314
|
-
findUnpaidMaterialEntranceProviders,
|
|
315
|
-
findProviderInvoice,
|
|
316
|
-
createProviderFinancialCreditNote,
|
|
317
|
-
createProviderServiceInvoice,
|
|
318
|
-
findProviderReturn,
|
|
319
|
-
createProviderCreditNoteFromReturn,
|
|
320
|
-
findMaterialEntranceProviders,
|
|
321
|
-
transferClientOwnership,
|
|
322
|
-
updateManyWithContact,
|
|
323
|
-
updateManyWithAddress,
|
|
324
|
-
} = repository;
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
shared,
|
|
3
|
-
DocumentLine as Entity,
|
|
4
|
-
DocumentLineAssoc,
|
|
5
|
-
} from '@nomalism-com/types';
|
|
6
|
-
import api from '../../shared/client';
|
|
7
|
-
import { serviceHostname, serviceAuthPath } from '.';
|
|
8
|
-
|
|
9
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
10
|
-
export import IDocumentLineVirtuals = Entity.IDocumentLineVirtuals;
|
|
11
|
-
|
|
12
|
-
export import IFindByOwnerIdRequest = shared.IFindByOwnerIdRequest;
|
|
13
|
-
|
|
14
|
-
export import ICreateRequest = Entity.ICreateRequest;
|
|
15
|
-
|
|
16
|
-
export import IUpdateRequest = Entity.IUpdateRequest;
|
|
17
|
-
|
|
18
|
-
export import IUpdateManyRequest = Entity.IUpdateManyRequest;
|
|
19
|
-
|
|
20
|
-
export import IEntity = Entity.Entity;
|
|
21
|
-
|
|
22
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
23
|
-
export import IEntityExtended = Entity.IEntityExtended;
|
|
24
|
-
|
|
25
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
26
|
-
export import IDataKeys = Entity.IDataKeys;
|
|
27
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
28
|
-
export import IDataPayload = Entity.IDataPayload;
|
|
29
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
30
|
-
export import IData = Entity.IData;
|
|
31
|
-
|
|
32
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
33
|
-
export import IMetadata = Entity.IMetadata;
|
|
34
|
-
|
|
35
|
-
export const route = `${serviceHostname}${serviceAuthPath}document_line/`;
|
|
36
|
-
|
|
37
|
-
const repository: Entity.IController = {
|
|
38
|
-
findById: async (
|
|
39
|
-
selector: shared.IFindByIdRequest,
|
|
40
|
-
): Promise<IEntity | null> => {
|
|
41
|
-
const response = await api.get(`${route}${selector.id}`);
|
|
42
|
-
return response.data;
|
|
43
|
-
},
|
|
44
|
-
|
|
45
|
-
findByOwnerId: async (params?: IFindByOwnerIdRequest): Promise<IEntity[]> => {
|
|
46
|
-
const response = await api.get(`${route}by_owner`, { params });
|
|
47
|
-
return response.data;
|
|
48
|
-
},
|
|
49
|
-
|
|
50
|
-
create: async (
|
|
51
|
-
body: ICreateRequest[],
|
|
52
|
-
): Promise<DocumentLineAssoc.IEntityExtended[]> => {
|
|
53
|
-
const response = await api.post(`${route}`, body);
|
|
54
|
-
return response.data;
|
|
55
|
-
},
|
|
56
|
-
|
|
57
|
-
update: async (
|
|
58
|
-
selector: shared.IFindByIdRequest,
|
|
59
|
-
body: IUpdateRequest,
|
|
60
|
-
): Promise<DocumentLineAssoc.IEntityExtended | null> => {
|
|
61
|
-
const response = await api.put(`${route}${selector.id}`, body);
|
|
62
|
-
return response.data;
|
|
63
|
-
},
|
|
64
|
-
|
|
65
|
-
updateIndexes: async (document_line_ids: string[]): Promise<void> => {
|
|
66
|
-
await api.put(`${route}update_indexes`, document_line_ids);
|
|
67
|
-
},
|
|
68
|
-
|
|
69
|
-
updateMany: async (
|
|
70
|
-
data: IUpdateManyRequest,
|
|
71
|
-
): Promise<DocumentLineAssoc.IEntityExtended[]> => {
|
|
72
|
-
const response = await api.post(`${route}update_many`, data);
|
|
73
|
-
return response.data;
|
|
74
|
-
},
|
|
75
|
-
|
|
76
|
-
deleteMany: async (document_line_ids: string[]): Promise<void> => {
|
|
77
|
-
await api.delete(`${route}`, { data: document_line_ids });
|
|
78
|
-
},
|
|
79
|
-
};
|
|
80
|
-
|
|
81
|
-
export const {
|
|
82
|
-
findById,
|
|
83
|
-
findByOwnerId,
|
|
84
|
-
create,
|
|
85
|
-
update,
|
|
86
|
-
updateIndexes,
|
|
87
|
-
updateMany,
|
|
88
|
-
deleteMany,
|
|
89
|
-
} = repository;
|
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
import { shared, DocumentLineAssoc as Entity } from '@nomalism-com/types';
|
|
2
|
-
import api from '../../shared/client';
|
|
3
|
-
import { serviceHostname, serviceAuthPath } from '.';
|
|
4
|
-
|
|
5
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
6
|
-
export import IEntity = Entity.Entity;
|
|
7
|
-
|
|
8
|
-
export import IFindByOwnerIdRequest = shared.IFindByOwnerIdRequest;
|
|
9
|
-
export import IEntityExtended = Entity.IEntityExtended;
|
|
10
|
-
|
|
11
|
-
export import ICreateRequest = Entity.ICreateRequest;
|
|
12
|
-
|
|
13
|
-
export import IUpdateRequest = Entity.IUpdateRequest;
|
|
14
|
-
|
|
15
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
16
|
-
export import IValidarEntradaDeMaterialParcel = Entity.IValidarEntradaDeMaterialParcel;
|
|
17
|
-
export import IValidarEntradaDeMaterialRequest = Entity.IValidarEntradaDeMaterialRequest;
|
|
18
|
-
|
|
19
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
20
|
-
export import IValidarEntradaDeMaterialPlotsResponse = Entity.IValidarEntradaDeMaterialPlotsResponse;
|
|
21
|
-
export import IValidarEntradaDeMaterialResponse = Entity.IValidarEntradaDeMaterialResponse;
|
|
22
|
-
|
|
23
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
24
|
-
export import IFinalizarEntradaDeMaterialDocumentHeaderPlot = Entity.IFinalizarEntradaDeMaterialDocumentHeaderPlot;
|
|
25
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
26
|
-
export import IFinalizarEntradaDeMaterialDocumentHeader = Entity.IFinalizarEntradaDeMaterialDocumentHeader;
|
|
27
|
-
export import IFinalizarEntradaDeMaterialRequest = Entity.IFinalizarEntradaDeMaterialRequest;
|
|
28
|
-
|
|
29
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
30
|
-
export import IConferirEncomendaClienteOptions = Entity.IConferirEncomendaClienteOptions;
|
|
31
|
-
export import IConferirEncomendaClienteRequest = Entity.IConferirEncomendaClienteRequest;
|
|
32
|
-
|
|
33
|
-
export import IPurchaFromProviderRequest = Entity.IPurchaseFromProviderRequest;
|
|
34
|
-
export import IDeleteInventoryLossRequest = Entity.IDeleteInventoryLossRequest;
|
|
35
|
-
|
|
36
|
-
export import IFindStockToOrderResponse = Entity.IFindStockToOrderResponse;
|
|
37
|
-
export import IFindStockToOrderRequest = Entity.IFindStockToOrderRequest;
|
|
38
|
-
|
|
39
|
-
const route = `${serviceHostname}${serviceAuthPath}document_line_assoc/`;
|
|
40
|
-
|
|
41
|
-
const repository: Omit<Entity.IController, 'findById'> = {
|
|
42
|
-
findByOwnerId: async (
|
|
43
|
-
params?: IFindByOwnerIdRequest,
|
|
44
|
-
): Promise<IEntityExtended[]> => {
|
|
45
|
-
const response = await api.get(`${route}by_owner`, { params });
|
|
46
|
-
return response.data;
|
|
47
|
-
},
|
|
48
|
-
|
|
49
|
-
create: async (body: ICreateRequest[]): Promise<IEntityExtended[]> => {
|
|
50
|
-
const response = await api.post(`${route}`, body);
|
|
51
|
-
return response.data;
|
|
52
|
-
},
|
|
53
|
-
|
|
54
|
-
update: async (
|
|
55
|
-
selector: shared.IFindByIdRequest,
|
|
56
|
-
body: IUpdateRequest,
|
|
57
|
-
): Promise<IEntityExtended | null> => {
|
|
58
|
-
const response = await api.put(`${route}${selector.id}`, body);
|
|
59
|
-
return response.data;
|
|
60
|
-
},
|
|
61
|
-
|
|
62
|
-
validarEntradaMaterial: async (
|
|
63
|
-
data: IValidarEntradaDeMaterialRequest,
|
|
64
|
-
): Promise<IValidarEntradaDeMaterialResponse> => {
|
|
65
|
-
const response = await api.post(`${route}validate_material_entrance`, data);
|
|
66
|
-
return response.data;
|
|
67
|
-
},
|
|
68
|
-
|
|
69
|
-
finalizarEntradaMaterial: async (
|
|
70
|
-
data: IFinalizarEntradaDeMaterialRequest,
|
|
71
|
-
): Promise<void> => {
|
|
72
|
-
await api.post(`${route}finalize_material_entrance`, data);
|
|
73
|
-
},
|
|
74
|
-
|
|
75
|
-
conferirEncomendaCliente: async (
|
|
76
|
-
data: IConferirEncomendaClienteRequest[],
|
|
77
|
-
): Promise<void> => {
|
|
78
|
-
await api.post(`${route}check_client_order`, data);
|
|
79
|
-
},
|
|
80
|
-
|
|
81
|
-
purchaseFromProvider: async (
|
|
82
|
-
data: IPurchaFromProviderRequest,
|
|
83
|
-
): Promise<void> => {
|
|
84
|
-
await api.post(`${route}purchase_from_provider`, data);
|
|
85
|
-
},
|
|
86
|
-
deleteInventoryLosses: async (
|
|
87
|
-
data: IDeleteInventoryLossRequest,
|
|
88
|
-
): Promise<void> => {
|
|
89
|
-
await api.delete(`${route}inventory_loss`, { data });
|
|
90
|
-
},
|
|
91
|
-
|
|
92
|
-
findStockToOrder: async (
|
|
93
|
-
params: IFindStockToOrderRequest,
|
|
94
|
-
): Promise<IFindStockToOrderResponse[]> => {
|
|
95
|
-
const response = await api.get(`${route}check_lines_to_order`, { params });
|
|
96
|
-
return response.data;
|
|
97
|
-
},
|
|
98
|
-
|
|
99
|
-
findProvidersWithStockToOrder: async (): Promise<
|
|
100
|
-
shared.IFindMinifiedResponse[]
|
|
101
|
-
> => {
|
|
102
|
-
const response = await api.get(`${route}stock_order_provider`);
|
|
103
|
-
return response.data;
|
|
104
|
-
},
|
|
105
|
-
};
|
|
106
|
-
|
|
107
|
-
export const {
|
|
108
|
-
findByOwnerId,
|
|
109
|
-
create,
|
|
110
|
-
update,
|
|
111
|
-
validarEntradaMaterial,
|
|
112
|
-
finalizarEntradaMaterial,
|
|
113
|
-
conferirEncomendaCliente,
|
|
114
|
-
purchaseFromProvider,
|
|
115
|
-
deleteInventoryLosses,
|
|
116
|
-
findProvidersWithStockToOrder,
|
|
117
|
-
} = repository;
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { shared, DocumentLineFolder as Entity } from '@nomalism-com/types';
|
|
2
|
-
import api from '../../shared/client';
|
|
3
|
-
import { serviceHostname, serviceAuthPath } from '.';
|
|
4
|
-
|
|
5
|
-
export import IFindByOwnerIdRequest = shared.IFindByOwnerIdRequest;
|
|
6
|
-
|
|
7
|
-
export import ICreateRequest = Entity.ICreateRequest;
|
|
8
|
-
|
|
9
|
-
export import IUpdateRequest = Entity.IUpdateRequest;
|
|
10
|
-
export import IEntity = Entity.Entity;
|
|
11
|
-
|
|
12
|
-
const route = `${serviceHostname}${serviceAuthPath}document_line_folder/`;
|
|
13
|
-
|
|
14
|
-
const repository: Omit<Entity.IRepository, 'findById'> = {
|
|
15
|
-
findByOwnerId: async (
|
|
16
|
-
params?: IFindByOwnerIdRequest,
|
|
17
|
-
): Promise<Entity.Entity[]> => {
|
|
18
|
-
const response = await api.get(`${route}by_owner`, { params });
|
|
19
|
-
return response.data;
|
|
20
|
-
},
|
|
21
|
-
|
|
22
|
-
create: async (body: ICreateRequest): Promise<Entity.Entity> => {
|
|
23
|
-
const response = await api.post(`${route}`, body);
|
|
24
|
-
return response.data;
|
|
25
|
-
},
|
|
26
|
-
|
|
27
|
-
update: async (
|
|
28
|
-
selector: shared.IFindByIdRequest,
|
|
29
|
-
body: IUpdateRequest,
|
|
30
|
-
): Promise<IEntity | null> => {
|
|
31
|
-
const response = await api.put(`${route}${selector.id}`, body);
|
|
32
|
-
return response.data;
|
|
33
|
-
},
|
|
34
|
-
|
|
35
|
-
deleteOne: async (
|
|
36
|
-
selector: shared.IFindByIdRequest,
|
|
37
|
-
): Promise<IEntity | null> => {
|
|
38
|
-
const response = await api.delete(`${route}${selector.id}`);
|
|
39
|
-
return response.data;
|
|
40
|
-
},
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
export const { findByOwnerId, create, update, deleteOne } = repository;
|