@nomalism-com/api 0.8.16 → 0.8.19
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/.editorconfig +9 -0
- package/.eslintignore +3 -0
- package/.eslintrc.json +51 -0
- package/.nvmrc +1 -0
- package/package-lock.json +6181 -0
- package/package.json +7 -12
- package/prettier.config.js +5 -0
- package/{dist/index.d.ts → src/index.ts} +118 -1
- package/src/modules/documentManagement/index.ts +6 -0
- package/src/modules/documentManagement/multimedia.ts +33 -0
- package/src/modules/integration/dynamicData.ts +45 -0
- package/src/modules/integration/field.ts +38 -0
- package/src/modules/integration/fieldGroup.ts +68 -0
- package/src/modules/integration/file.ts +30 -0
- package/src/modules/integration/history.ts +30 -0
- package/src/modules/integration/index.ts +6 -0
- package/src/modules/integration/observation.ts +43 -0
- package/src/modules/integration/observationType.ts +55 -0
- package/src/modules/integration/task.ts +66 -0
- package/src/modules/integration/taskAttachment.ts +26 -0
- package/src/modules/integration/taskGroup.ts +45 -0
- package/src/modules/integration/taskNote.ts +39 -0
- package/src/modules/print/index.ts +10 -0
- package/src/modules/print/npc.ts +24 -0
- package/src/modules/print/printer.ts +26 -0
- package/src/modules/print/schedulePrintJob.ts +75 -0
- package/src/modules/stock/attribute.ts +101 -0
- package/src/modules/stock/attributeValue.ts +91 -0
- package/src/modules/stock/cabide.ts +105 -0
- package/src/modules/stock/cabideProduct.ts +67 -0
- package/src/modules/stock/clientCurrentAccount.ts +22 -0
- package/src/modules/stock/color.ts +90 -0
- package/src/modules/stock/composition.ts +81 -0
- package/src/modules/stock/compositionMaterial.ts +92 -0
- package/src/modules/stock/documentHeader.ts +324 -0
- package/src/modules/stock/documentLine.ts +89 -0
- package/src/modules/stock/documentLineAssoc.ts +117 -0
- package/src/modules/stock/documentLineFolder.ts +43 -0
- package/src/modules/stock/documentLineState.ts +66 -0
- package/src/modules/stock/documentLineStateCriteria.ts +90 -0
- package/src/modules/stock/documentSet.ts +53 -0
- package/src/modules/stock/documentType.ts +68 -0
- package/src/modules/stock/externalDocumentHeader.ts +85 -0
- package/src/modules/stock/externalDocumentType.ts +26 -0
- package/src/modules/stock/index.ts +8 -0
- package/src/modules/stock/location.ts +91 -0
- package/src/modules/stock/maintenance.ts +91 -0
- package/src/modules/stock/maintenanceAssoc.ts +81 -0
- package/src/modules/stock/maintenancePreset.ts +55 -0
- package/src/modules/stock/maintenancePresetAssoc.ts +42 -0
- package/src/modules/stock/maintenanceType.ts +92 -0
- package/src/modules/stock/moloniRequest.ts +18 -0
- package/src/modules/stock/orderManagement.ts +41 -0
- package/src/modules/stock/payment.ts +161 -0
- package/src/modules/stock/plot.ts +196 -0
- package/src/modules/stock/preSale.ts +76 -0
- package/src/modules/stock/preSaleProduct.ts +23 -0
- package/src/modules/stock/primaryColor.ts +92 -0
- package/src/modules/stock/product.ts +197 -0
- package/src/modules/stock/productAttribute.ts +81 -0
- package/src/modules/stock/productCategory.ts +92 -0
- package/src/modules/stock/productColor.ts +81 -0
- package/src/modules/stock/productImage.ts +86 -0
- package/src/modules/stock/productName.ts +92 -0
- package/src/modules/stock/productNamePreset.ts +92 -0
- package/src/modules/stock/productPart.ts +91 -0
- package/src/modules/stock/productSubCategory.ts +90 -0
- package/src/modules/stock/productUse.ts +92 -0
- package/src/modules/stock/productUseAssoc.ts +78 -0
- package/src/modules/stock/promotion.ts +93 -0
- package/src/modules/stock/promotionAssoc.ts +81 -0
- package/src/modules/stock/providerCurrentAccount.ts +22 -0
- package/src/modules/stock/queryList.ts +61 -0
- package/src/modules/stock/queryParameter.ts +50 -0
- package/src/modules/stock/returnReason.ts +40 -0
- package/src/modules/stock/similarProduct.ts +81 -0
- package/src/modules/stock/stockMovement.ts +32 -0
- package/src/modules/stock/topMenu.ts +22 -0
- package/src/modules/stock/typeOfInventory.ts +92 -0
- package/src/modules/stock/typeOfLocation.ts +92 -0
- package/src/modules/stock/unitOfMeasure.ts +92 -0
- package/src/modules/stock/vatTax.ts +92 -0
- package/src/modules/stock/vatTaxZone.ts +94 -0
- package/src/modules/stock/vatValidation.ts +20 -0
- package/src/modules/stock/websiteRequest.ts +51 -0
- package/src/modules/stock/workflow.ts +50 -0
- package/src/modules/user/address.ts +81 -0
- package/src/modules/user/bankData.ts +81 -0
- package/src/modules/user/clientType.ts +80 -0
- package/src/modules/user/clients.ts +100 -0
- package/src/modules/user/commissioner.ts +96 -0
- package/src/modules/user/contactTypes.ts +80 -0
- package/src/modules/user/contacts.ts +100 -0
- package/src/modules/user/country.ts +90 -0
- package/src/modules/user/deliveryMethods.ts +60 -0
- package/src/modules/user/entityList.ts +42 -0
- package/src/modules/user/favorites.ts +36 -0
- package/src/modules/user/groupPermission.ts +44 -0
- package/src/modules/user/index.ts +8 -0
- package/src/modules/user/language.ts +80 -0
- package/src/modules/user/logout.ts +12 -0
- package/src/modules/user/maturityDates.ts +60 -0
- package/src/modules/user/password.ts +21 -0
- package/src/modules/user/paymentCondition.ts +79 -0
- package/src/modules/user/paymentMethods.ts +60 -0
- package/src/modules/user/permission.ts +44 -0
- package/src/modules/user/provider.ts +106 -0
- package/src/modules/user/providerType.ts +80 -0
- package/src/modules/user/purchaseCondition.ts +82 -0
- package/src/modules/user/reasonForExemption.ts +80 -0
- package/src/modules/user/refreshToken.ts +18 -0
- package/src/modules/user/segmentsArea.ts +80 -0
- package/src/modules/user/sessions.ts +18 -0
- package/src/modules/user/shippings.ts +79 -0
- package/src/modules/user/socialMedia.ts +79 -0
- package/src/modules/user/storeOperator.ts +104 -0
- package/src/modules/user/swift.ts +80 -0
- package/src/modules/user/tenant.ts +36 -0
- package/src/modules/user/user.ts +111 -0
- package/src/modules/user/userPermission.ts +37 -0
- package/src/modules/user/userPositions.ts +80 -0
- package/src/modules/user/userToken.ts +69 -0
- package/src/modules/user/vehicles.ts +40 -0
- package/src/modules/user/zipCode.ts +23 -0
- package/src/shared/client.ts +5 -0
- package/tsconfig.json +19 -0
- package/dist/index.js +0 -256
- package/dist/modules/documentManagement/index.d.ts +0 -2
- package/dist/modules/documentManagement/index.js +0 -7
- package/dist/modules/documentManagement/multimedia.d.ts +0 -5
- package/dist/modules/documentManagement/multimedia.js +0 -69
- package/dist/modules/integration/dynamicData.d.ts +0 -8
- package/dist/modules/integration/dynamicData.js +0 -103
- package/dist/modules/integration/field.d.ts +0 -26
- package/dist/modules/integration/field.js +0 -93
- package/dist/modules/integration/fieldGroup.d.ts +0 -12
- package/dist/modules/integration/fieldGroup.js +0 -119
- package/dist/modules/integration/file.d.ts +0 -5
- package/dist/modules/integration/file.js +0 -83
- package/dist/modules/integration/history.d.ts +0 -11
- package/dist/modules/integration/history.js +0 -66
- package/dist/modules/integration/index.d.ts +0 -2
- package/dist/modules/integration/index.js +0 -7
- package/dist/modules/integration/observation.d.ts +0 -8
- package/dist/modules/integration/observation.js +0 -94
- package/dist/modules/integration/observationType.d.ts +0 -10
- package/dist/modules/integration/observationType.js +0 -107
- package/dist/modules/integration/task.d.ts +0 -10
- package/dist/modules/integration/task.js +0 -113
- package/dist/modules/integration/taskAttachment.d.ts +0 -7
- package/dist/modules/integration/taskAttachment.js +0 -72
- package/dist/modules/integration/taskGroup.d.ts +0 -8
- package/dist/modules/integration/taskGroup.js +0 -103
- package/dist/modules/integration/taskNote.d.ts +0 -8
- package/dist/modules/integration/taskNote.js +0 -92
- package/dist/modules/print/index.d.ts +0 -4
- package/dist/modules/print/index.js +0 -9
- package/dist/modules/print/npc.d.ts +0 -5
- package/dist/modules/print/npc.js +0 -70
- package/dist/modules/print/printer.d.ts +0 -6
- package/dist/modules/print/printer.js +0 -70
- package/dist/modules/print/schedulePrintJob.d.ts +0 -8
- package/dist/modules/print/schedulePrintJob.js +0 -139
- package/dist/modules/stock/attribute.d.ts +0 -16
- package/dist/modules/stock/attribute.js +0 -145
- package/dist/modules/stock/attributeValue.d.ts +0 -12
- package/dist/modules/stock/attributeValue.js +0 -140
- package/dist/modules/stock/cabide.d.ts +0 -15
- package/dist/modules/stock/cabide.js +0 -152
- package/dist/modules/stock/cabideProduct.d.ts +0 -10
- package/dist/modules/stock/cabideProduct.js +0 -127
- package/dist/modules/stock/clientCurrentAccount.d.ts +0 -5
- package/dist/modules/stock/clientCurrentAccount.js +0 -61
- package/dist/modules/stock/color.d.ts +0 -13
- package/dist/modules/stock/color.js +0 -139
- package/dist/modules/stock/composition.d.ts +0 -12
- package/dist/modules/stock/composition.js +0 -127
- package/dist/modules/stock/compositionMaterial.d.ts +0 -13
- package/dist/modules/stock/compositionMaterial.js +0 -140
- package/dist/modules/stock/documentHeader.d.ts +0 -45
- package/dist/modules/stock/documentHeader.js +0 -361
- package/dist/modules/stock/documentLine.d.ts +0 -14
- package/dist/modules/stock/documentLine.js +0 -123
- package/dist/modules/stock/documentLineAssoc.d.ts +0 -20
- package/dist/modules/stock/documentLineAssoc.js +0 -154
- package/dist/modules/stock/documentLineFolder.d.ts +0 -6
- package/dist/modules/stock/documentLineFolder.js +0 -92
- package/dist/modules/stock/documentLineState.d.ts +0 -10
- package/dist/modules/stock/documentLineState.js +0 -114
- package/dist/modules/stock/documentLineStateCriteria.d.ts +0 -20
- package/dist/modules/stock/documentLineStateCriteria.js +0 -124
- package/dist/modules/stock/documentSet.d.ts +0 -8
- package/dist/modules/stock/documentSet.js +0 -114
- package/dist/modules/stock/documentType.d.ts +0 -14
- package/dist/modules/stock/documentType.js +0 -119
- package/dist/modules/stock/externalDocumentHeader.d.ts +0 -15
- package/dist/modules/stock/externalDocumentHeader.js +0 -135
- package/dist/modules/stock/externalDocumentType.d.ts +0 -6
- package/dist/modules/stock/externalDocumentType.js +0 -70
- package/dist/modules/stock/index.d.ts +0 -3
- package/dist/modules/stock/index.js +0 -8
- package/dist/modules/stock/location.d.ts +0 -12
- package/dist/modules/stock/location.js +0 -140
- package/dist/modules/stock/maintenance.d.ts +0 -12
- package/dist/modules/stock/maintenance.js +0 -140
- package/dist/modules/stock/maintenanceAssoc.d.ts +0 -12
- package/dist/modules/stock/maintenanceAssoc.js +0 -127
- package/dist/modules/stock/maintenancePreset.d.ts +0 -10
- package/dist/modules/stock/maintenancePreset.js +0 -114
- package/dist/modules/stock/maintenancePresetAssoc.d.ts +0 -8
- package/dist/modules/stock/maintenancePresetAssoc.js +0 -91
- package/dist/modules/stock/maintenanceType.d.ts +0 -13
- package/dist/modules/stock/maintenanceType.js +0 -140
- package/dist/modules/stock/moloniRequest.d.ts +0 -5
- package/dist/modules/stock/moloniRequest.js +0 -59
- package/dist/modules/stock/orderManagement.d.ts +0 -11
- package/dist/modules/stock/orderManagement.js +0 -88
- package/dist/modules/stock/payment.d.ts +0 -22
- package/dist/modules/stock/payment.js +0 -210
- package/dist/modules/stock/plot.d.ts +0 -32
- package/dist/modules/stock/plot.js +0 -240
- package/dist/modules/stock/preSale.d.ts +0 -11
- package/dist/modules/stock/preSale.js +0 -125
- package/dist/modules/stock/preSaleProduct.d.ts +0 -4
- package/dist/modules/stock/preSaleProduct.js +0 -70
- package/dist/modules/stock/primaryColor.d.ts +0 -13
- package/dist/modules/stock/primaryColor.js +0 -140
- package/dist/modules/stock/product.d.ts +0 -30
- package/dist/modules/stock/product.js +0 -241
- package/dist/modules/stock/productAttribute.d.ts +0 -12
- package/dist/modules/stock/productAttribute.js +0 -127
- package/dist/modules/stock/productCategory.d.ts +0 -13
- package/dist/modules/stock/productCategory.js +0 -140
- package/dist/modules/stock/productColor.d.ts +0 -12
- package/dist/modules/stock/productColor.js +0 -127
- package/dist/modules/stock/productImage.d.ts +0 -14
- package/dist/modules/stock/productImage.js +0 -132
- package/dist/modules/stock/productName.d.ts +0 -13
- package/dist/modules/stock/productName.js +0 -140
- package/dist/modules/stock/productNamePreset.d.ts +0 -13
- package/dist/modules/stock/productNamePreset.js +0 -140
- package/dist/modules/stock/productPart.d.ts +0 -14
- package/dist/modules/stock/productPart.js +0 -139
- package/dist/modules/stock/productSubCategory.d.ts +0 -13
- package/dist/modules/stock/productSubCategory.js +0 -139
- package/dist/modules/stock/productUse.d.ts +0 -13
- package/dist/modules/stock/productUse.js +0 -140
- package/dist/modules/stock/productUseAssoc.d.ts +0 -12
- package/dist/modules/stock/productUseAssoc.js +0 -126
- package/dist/modules/stock/promotion.d.ts +0 -13
- package/dist/modules/stock/promotion.js +0 -140
- package/dist/modules/stock/promotionAssoc.d.ts +0 -12
- package/dist/modules/stock/promotionAssoc.js +0 -127
- package/dist/modules/stock/providerCurrentAccount.d.ts +0 -5
- package/dist/modules/stock/providerCurrentAccount.js +0 -61
- package/dist/modules/stock/queryList.d.ts +0 -11
- package/dist/modules/stock/queryList.js +0 -116
- package/dist/modules/stock/queryParameter.d.ts +0 -8
- package/dist/modules/stock/queryParameter.js +0 -106
- package/dist/modules/stock/returnReason.d.ts +0 -6
- package/dist/modules/stock/returnReason.js +0 -92
- package/dist/modules/stock/similarProduct.d.ts +0 -12
- package/dist/modules/stock/similarProduct.js +0 -127
- package/dist/modules/stock/stockMovement.d.ts +0 -8
- package/dist/modules/stock/stockMovement.js +0 -75
- package/dist/modules/stock/topMenu.d.ts +0 -5
- package/dist/modules/stock/topMenu.js +0 -61
- package/dist/modules/stock/typeOfInventory.d.ts +0 -13
- package/dist/modules/stock/typeOfInventory.js +0 -140
- package/dist/modules/stock/typeOfLocation.d.ts +0 -13
- package/dist/modules/stock/typeOfLocation.js +0 -140
- package/dist/modules/stock/unitOfMeasure.d.ts +0 -13
- package/dist/modules/stock/unitOfMeasure.js +0 -140
- package/dist/modules/stock/vatTax.d.ts +0 -13
- package/dist/modules/stock/vatTax.js +0 -140
- package/dist/modules/stock/vatTaxZone.d.ts +0 -14
- package/dist/modules/stock/vatTaxZone.js +0 -140
- package/dist/modules/stock/vatValidation.d.ts +0 -4
- package/dist/modules/stock/vatValidation.js +0 -63
- package/dist/modules/stock/websiteRequest.d.ts +0 -10
- package/dist/modules/stock/websiteRequest.js +0 -97
- package/dist/modules/stock/workflow.d.ts +0 -8
- package/dist/modules/stock/workflow.js +0 -103
- package/dist/modules/user/address.d.ts +0 -12
- package/dist/modules/user/address.js +0 -127
- package/dist/modules/user/bankData.d.ts +0 -12
- package/dist/modules/user/bankData.js +0 -127
- package/dist/modules/user/clientType.d.ts +0 -12
- package/dist/modules/user/clientType.js +0 -127
- package/dist/modules/user/clients.d.ts +0 -17
- package/dist/modules/user/clients.js +0 -140
- package/dist/modules/user/commissioner.d.ts +0 -15
- package/dist/modules/user/commissioner.js +0 -140
- package/dist/modules/user/contactTypes.d.ts +0 -12
- package/dist/modules/user/contactTypes.js +0 -127
- package/dist/modules/user/contacts.d.ts +0 -14
- package/dist/modules/user/contacts.js +0 -149
- package/dist/modules/user/country.d.ts +0 -12
- package/dist/modules/user/country.js +0 -140
- package/dist/modules/user/deliveryMethods.d.ts +0 -8
- package/dist/modules/user/deliveryMethods.js +0 -116
- package/dist/modules/user/entityList.d.ts +0 -7
- package/dist/modules/user/entityList.js +0 -106
- package/dist/modules/user/favorites.d.ts +0 -7
- package/dist/modules/user/favorites.js +0 -92
- package/dist/modules/user/groupPermission.d.ts +0 -7
- package/dist/modules/user/groupPermission.js +0 -94
- package/dist/modules/user/index.d.ts +0 -3
- package/dist/modules/user/index.js +0 -8
- package/dist/modules/user/language.d.ts +0 -12
- package/dist/modules/user/language.js +0 -127
- package/dist/modules/user/logout.d.ts +0 -2
- package/dist/modules/user/logout.js +0 -58
- package/dist/modules/user/maturityDates.d.ts +0 -8
- package/dist/modules/user/maturityDates.js +0 -116
- package/dist/modules/user/password.d.ts +0 -5
- package/dist/modules/user/password.js +0 -68
- package/dist/modules/user/paymentCondition.d.ts +0 -11
- package/dist/modules/user/paymentCondition.js +0 -127
- package/dist/modules/user/paymentMethods.d.ts +0 -8
- package/dist/modules/user/paymentMethods.js +0 -116
- package/dist/modules/user/permission.d.ts +0 -7
- package/dist/modules/user/permission.js +0 -94
- package/dist/modules/user/provider.d.ts +0 -15
- package/dist/modules/user/provider.js +0 -153
- package/dist/modules/user/providerType.d.ts +0 -12
- package/dist/modules/user/providerType.js +0 -127
- package/dist/modules/user/purchaseCondition.d.ts +0 -12
- package/dist/modules/user/purchaseCondition.js +0 -127
- package/dist/modules/user/reasonForExemption.d.ts +0 -12
- package/dist/modules/user/reasonForExemption.js +0 -127
- package/dist/modules/user/refreshToken.d.ts +0 -5
- package/dist/modules/user/refreshToken.js +0 -59
- package/dist/modules/user/segmentsArea.d.ts +0 -12
- package/dist/modules/user/segmentsArea.js +0 -127
- package/dist/modules/user/sessions.d.ts +0 -5
- package/dist/modules/user/sessions.js +0 -59
- package/dist/modules/user/shippings.d.ts +0 -11
- package/dist/modules/user/shippings.js +0 -127
- package/dist/modules/user/socialMedia.d.ts +0 -11
- package/dist/modules/user/socialMedia.js +0 -127
- package/dist/modules/user/storeOperator.d.ts +0 -16
- package/dist/modules/user/storeOperator.js +0 -151
- package/dist/modules/user/swift.d.ts +0 -12
- package/dist/modules/user/swift.js +0 -127
- package/dist/modules/user/tenant.d.ts +0 -6
- package/dist/modules/user/tenant.js +0 -92
- package/dist/modules/user/user.d.ts +0 -18
- package/dist/modules/user/user.js +0 -151
- package/dist/modules/user/userPermission.d.ts +0 -7
- package/dist/modules/user/userPermission.js +0 -83
- package/dist/modules/user/userPositions.d.ts +0 -12
- package/dist/modules/user/userPositions.js +0 -127
- package/dist/modules/user/userToken.d.ts +0 -9
- package/dist/modules/user/userToken.js +0 -116
- package/dist/modules/user/vehicles.d.ts +0 -6
- package/dist/modules/user/vehicles.js +0 -92
- package/dist/modules/user/zipCode.d.ts +0 -6
- package/dist/modules/user/zipCode.js +0 -69
- package/dist/shared/client.d.ts +0 -2
- package/dist/shared/client.js +0 -9
- package/dist/tsconfig.tsbuildinfo +0 -1
|
@@ -0,0 +1,117 @@
|
|
|
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;
|
|
@@ -0,0 +1,43 @@
|
|
|
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;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { shared, DocumentLineState as Entity } from '@nomalism-com/types';
|
|
2
|
+
import api from '../../shared/client';
|
|
3
|
+
import { serviceHostname, serviceAuthPath } from '.';
|
|
4
|
+
|
|
5
|
+
export import IFindByDocumentTypeRequest = Entity.IFindByDocumentTypeRequest;
|
|
6
|
+
export import IFindByDocumentTypeResponse = Entity.IFindByDocumentTypeResponse;
|
|
7
|
+
|
|
8
|
+
export import IFindDetailedResponse = Entity.IFindDetailedResponse;
|
|
9
|
+
|
|
10
|
+
export import IFindMinifiedResponse = shared.IFindMinifiedResponse;
|
|
11
|
+
|
|
12
|
+
export import ICreateRequest = Entity.ICreateRequest;
|
|
13
|
+
|
|
14
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
15
|
+
export import IEntity = Entity.Entity;
|
|
16
|
+
export import IUpdateRequest = Entity.IUpdateRequest;
|
|
17
|
+
|
|
18
|
+
export const route = `${serviceHostname}${serviceAuthPath}document_line_state/`;
|
|
19
|
+
|
|
20
|
+
const repository: Omit<Entity.IRepository, 'findById'> = {
|
|
21
|
+
findByDocumentType: async (
|
|
22
|
+
params: IFindByDocumentTypeRequest,
|
|
23
|
+
): Promise<IFindByDocumentTypeResponse[]> => {
|
|
24
|
+
const response = await api.get(`${route}find_by_document_type`, { params });
|
|
25
|
+
return response.data;
|
|
26
|
+
},
|
|
27
|
+
|
|
28
|
+
find: async (): Promise<IFindDetailedResponse[]> => {
|
|
29
|
+
const response = await api.get(`${route}`);
|
|
30
|
+
return response.data;
|
|
31
|
+
},
|
|
32
|
+
|
|
33
|
+
findMinified: async (): Promise<IFindMinifiedResponse[]> => {
|
|
34
|
+
const response = await api.get(`${route}minified`);
|
|
35
|
+
return response.data;
|
|
36
|
+
},
|
|
37
|
+
|
|
38
|
+
create: async (body: ICreateRequest): Promise<IFindDetailedResponse> => {
|
|
39
|
+
const response = await api.post(`${route}`, body);
|
|
40
|
+
return response.data;
|
|
41
|
+
},
|
|
42
|
+
|
|
43
|
+
update: async (
|
|
44
|
+
selector: shared.IFindByIdNumberRequest,
|
|
45
|
+
body: IUpdateRequest,
|
|
46
|
+
): Promise<IFindDetailedResponse | null> => {
|
|
47
|
+
const response = await api.put(`${route}${selector.id}`, body);
|
|
48
|
+
return response.data;
|
|
49
|
+
},
|
|
50
|
+
|
|
51
|
+
deleteOne: async (
|
|
52
|
+
selector: shared.IFindByIdNumberRequest,
|
|
53
|
+
): Promise<IFindDetailedResponse | null> => {
|
|
54
|
+
const response = await api.delete(`${route}${selector.id}`);
|
|
55
|
+
return response.data;
|
|
56
|
+
},
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
export const {
|
|
60
|
+
findByDocumentType,
|
|
61
|
+
find,
|
|
62
|
+
findMinified,
|
|
63
|
+
create,
|
|
64
|
+
update,
|
|
65
|
+
deleteOne,
|
|
66
|
+
} = repository;
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import {
|
|
2
|
+
shared,
|
|
3
|
+
DocumentLineStateCriteria as Entity,
|
|
4
|
+
} from '@nomalism-com/types';
|
|
5
|
+
import api from '../../shared/client';
|
|
6
|
+
import { serviceHostname, serviceAuthPath } from '.';
|
|
7
|
+
|
|
8
|
+
export import IFindRequest = Entity.IFindRequest;
|
|
9
|
+
export import IFindResponse = Entity.IFindResponse;
|
|
10
|
+
|
|
11
|
+
export import IFindPaginatedRequest = Entity.IFindPaginatedRequest;
|
|
12
|
+
|
|
13
|
+
export import IFindByOwnerIdRequest = shared.IFindByOwnerIdRequest;
|
|
14
|
+
|
|
15
|
+
export import AccessorType = Entity.AccessorType;
|
|
16
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
17
|
+
export import ScalarOperatorType = Entity.ScalarOperatorType;
|
|
18
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
19
|
+
export import TruthyOperatorType = Entity.TruthyOperatorType;
|
|
20
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
21
|
+
export import EqualityOperatorType = Entity.EqualityOperatorType;
|
|
22
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
23
|
+
export import IntervalOperatorType = Entity.IntervalOperatorType;
|
|
24
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
25
|
+
export import StringOperatorType = Entity.StringOperatorType;
|
|
26
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
27
|
+
export import ArrayOperatorType = Entity.ArrayOperatorType;
|
|
28
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
29
|
+
export import AggregatorOperatorType = Entity.AggregatorOperatorType;
|
|
30
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
31
|
+
export import ScalarOperatorMap = Entity.ScalarOperatorMap;
|
|
32
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
33
|
+
export import ScalarOperator = Entity.ScalarOperator;
|
|
34
|
+
|
|
35
|
+
export import ICreateRequest = Entity.ICreateRequest;
|
|
36
|
+
|
|
37
|
+
export import IUpdateRequest = Entity.IUpdateRequest;
|
|
38
|
+
|
|
39
|
+
export type IPaginationResponse =
|
|
40
|
+
shared.IPaginationResponse<Entity.IFindResponse>;
|
|
41
|
+
|
|
42
|
+
export const route = `${serviceHostname}${serviceAuthPath}document_line_state_criteria/`;
|
|
43
|
+
|
|
44
|
+
const repository: Entity.IRepository = {
|
|
45
|
+
find: async (params: IFindRequest): Promise<IFindResponse[]> => {
|
|
46
|
+
const response = await api.get(`${route}`, { params });
|
|
47
|
+
return response.data;
|
|
48
|
+
},
|
|
49
|
+
|
|
50
|
+
findPaginated: async (
|
|
51
|
+
params: IFindPaginatedRequest,
|
|
52
|
+
): Promise<IPaginationResponse> => {
|
|
53
|
+
const response = await api.get(`${route}paginated`, { params });
|
|
54
|
+
return response.data;
|
|
55
|
+
},
|
|
56
|
+
|
|
57
|
+
findByOwnerId: async (
|
|
58
|
+
params: IFindByOwnerIdRequest,
|
|
59
|
+
): Promise<IFindResponse[]> => {
|
|
60
|
+
const response = await api.get(`${route}by_owner`, {
|
|
61
|
+
params,
|
|
62
|
+
});
|
|
63
|
+
return response.data;
|
|
64
|
+
},
|
|
65
|
+
|
|
66
|
+
create: async <T extends AccessorType>(
|
|
67
|
+
body: ICreateRequest<T>,
|
|
68
|
+
): Promise<IFindResponse> => {
|
|
69
|
+
const response = await api.post(`${route}`, body);
|
|
70
|
+
return response.data;
|
|
71
|
+
},
|
|
72
|
+
|
|
73
|
+
update: async <T extends AccessorType>(
|
|
74
|
+
selector: shared.IFindByIdNumberRequest,
|
|
75
|
+
body: IUpdateRequest<T>,
|
|
76
|
+
): Promise<IFindResponse | null> => {
|
|
77
|
+
const response = await api.put(`${route}${selector.id}`, body);
|
|
78
|
+
return response.data;
|
|
79
|
+
},
|
|
80
|
+
|
|
81
|
+
deleteOne: async (
|
|
82
|
+
selector: shared.IFindByIdNumberRequest,
|
|
83
|
+
): Promise<IFindResponse | null> => {
|
|
84
|
+
const response = await api.delete(`${route}${selector.id}`);
|
|
85
|
+
return response.data;
|
|
86
|
+
},
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
export const { find, findPaginated, findByOwnerId, create, update, deleteOne } =
|
|
90
|
+
repository;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { DocumentSet as Entity, shared } from '@nomalism-com/types';
|
|
2
|
+
import api from '../../shared/client';
|
|
3
|
+
import { serviceHostname, serviceAuthPath } from '.';
|
|
4
|
+
|
|
5
|
+
export import IEntity = Entity.Entity;
|
|
6
|
+
|
|
7
|
+
export import IFindMinifiedRequest = shared.IFindMinifiedRequest;
|
|
8
|
+
export import IFindMinifiedResponse = shared.IFindMinifiedResponse;
|
|
9
|
+
|
|
10
|
+
export import ICreateRequest = Entity.ICreateRequest;
|
|
11
|
+
|
|
12
|
+
export import IUpdateRequest = Entity.IUpdateRequest;
|
|
13
|
+
|
|
14
|
+
export const route = `${serviceHostname}${serviceAuthPath}document_set/`;
|
|
15
|
+
|
|
16
|
+
const repository: Entity.IRepository = {
|
|
17
|
+
find: async (): Promise<IEntity[]> => {
|
|
18
|
+
const response = await api.get(`${route}`);
|
|
19
|
+
return response.data;
|
|
20
|
+
},
|
|
21
|
+
findById: async (
|
|
22
|
+
selector: shared.IFindByIdRequest,
|
|
23
|
+
): Promise<IEntity | null> => {
|
|
24
|
+
const response = await api.get(`${route}${selector.id}`);
|
|
25
|
+
return response.data;
|
|
26
|
+
},
|
|
27
|
+
findMinified: async (
|
|
28
|
+
params?: IFindMinifiedRequest,
|
|
29
|
+
): Promise<IFindMinifiedResponse[]> => {
|
|
30
|
+
const response = await api.get(`${route}minified`, { params });
|
|
31
|
+
return response.data;
|
|
32
|
+
},
|
|
33
|
+
create: async (body: ICreateRequest): Promise<IEntity> => {
|
|
34
|
+
const response = await api.post(`${route}`, body);
|
|
35
|
+
return response.data;
|
|
36
|
+
},
|
|
37
|
+
update: async (
|
|
38
|
+
selector: shared.IFindByIdRequest,
|
|
39
|
+
body: IUpdateRequest,
|
|
40
|
+
): Promise<IEntity | null> => {
|
|
41
|
+
const response = await api.put(`${route}${selector.id}`, body);
|
|
42
|
+
return response.data;
|
|
43
|
+
},
|
|
44
|
+
deleteOne: async (
|
|
45
|
+
selector: shared.IFindByIdRequest,
|
|
46
|
+
): Promise<IEntity | null> => {
|
|
47
|
+
const response = await api.delete(`${route}${selector.id}`);
|
|
48
|
+
return response.data;
|
|
49
|
+
},
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
export const { find, findById, findMinified, create, update, deleteOne } =
|
|
53
|
+
repository;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { shared, DocumentType 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 IDocumentTypeUserType = Entity.IDocumentTypeUserType;
|
|
7
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
8
|
+
export import DocumentTypeUserTypeEnum = Entity.DocumentTypeUserTypeEnum;
|
|
9
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
10
|
+
export import documentTypeUserTypes = Entity.documentTypeUserTypes;
|
|
11
|
+
|
|
12
|
+
export import IFindRequest = Entity.IFindRequest;
|
|
13
|
+
export import IFindResponse = Entity.IFindResponse;
|
|
14
|
+
|
|
15
|
+
export import IFindMinifiedRequest = shared.IFindMinifiedRequest;
|
|
16
|
+
export import IFindMinifiedResponse = shared.IFindMinifiedResponse;
|
|
17
|
+
|
|
18
|
+
export import IEntityExtended = Entity.IEntityExtended;
|
|
19
|
+
|
|
20
|
+
export import ICreateRequest = Entity.ICreateRequest;
|
|
21
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
22
|
+
export import IEntity = Entity.Entity;
|
|
23
|
+
|
|
24
|
+
export import IUpdateRequest = Entity.IUpdateRequest;
|
|
25
|
+
|
|
26
|
+
export const route = `${serviceHostname}${serviceAuthPath}document_type/`;
|
|
27
|
+
|
|
28
|
+
const repository: Omit<Entity.IRepository, 'findById' | 'findByQuery'> = {
|
|
29
|
+
find: async (params?: IFindRequest): Promise<IFindResponse[]> => {
|
|
30
|
+
const response = await api.get(`${route}`, { params });
|
|
31
|
+
return response.data;
|
|
32
|
+
},
|
|
33
|
+
|
|
34
|
+
findMinified: async (
|
|
35
|
+
params?: IFindMinifiedRequest,
|
|
36
|
+
): Promise<IFindMinifiedResponse[]> => {
|
|
37
|
+
const response = await api.get(`${route}minified`, { params });
|
|
38
|
+
return response.data;
|
|
39
|
+
},
|
|
40
|
+
|
|
41
|
+
findDetailed: async (params?: IFindRequest): Promise<IEntityExtended[]> => {
|
|
42
|
+
const response = await api.get(`${route}detailed`, { params });
|
|
43
|
+
return response.data;
|
|
44
|
+
},
|
|
45
|
+
|
|
46
|
+
create: async (body: ICreateRequest): Promise<IEntityExtended> => {
|
|
47
|
+
const response = await api.post(`${route}`, body);
|
|
48
|
+
return response.data;
|
|
49
|
+
},
|
|
50
|
+
|
|
51
|
+
update: async (
|
|
52
|
+
selector: shared.IFindByIdNumberRequest,
|
|
53
|
+
body: IUpdateRequest,
|
|
54
|
+
): Promise<IEntityExtended | null> => {
|
|
55
|
+
const response = await api.put(`${route}${selector.id}`, body);
|
|
56
|
+
return response.data;
|
|
57
|
+
},
|
|
58
|
+
|
|
59
|
+
deleteOne: async (
|
|
60
|
+
selector: shared.IFindByIdNumberRequest,
|
|
61
|
+
): Promise<IEntityExtended | null> => {
|
|
62
|
+
const response = await api.delete(`${route}${selector.id}`);
|
|
63
|
+
return response.data;
|
|
64
|
+
},
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
export const { find, findMinified, findDetailed, create, update, deleteOne } =
|
|
68
|
+
repository;
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { ExternalDocumentHeader as Entity, shared } from '@nomalism-com/types';
|
|
2
|
+
import api from '../../shared/client';
|
|
3
|
+
import { serviceHostname, serviceAuthPath } from '.';
|
|
4
|
+
|
|
5
|
+
export import IEntity = Entity.Entity;
|
|
6
|
+
|
|
7
|
+
export import ICreateRequest = Entity.ICreateRequest;
|
|
8
|
+
export import IUpdateRequest = Entity.IUpdateRequest;
|
|
9
|
+
|
|
10
|
+
export import IFindRequest = Entity.IFindRequest;
|
|
11
|
+
export import IFindResponse = Entity.IFindResponse;
|
|
12
|
+
|
|
13
|
+
export import IFindPaginatedRequest = Entity.IFindPaginatedRequest;
|
|
14
|
+
export import IFindWithPaginationResponse = Entity.IFindWithPaginationResponse;
|
|
15
|
+
|
|
16
|
+
export import IFindByIdRequest = shared.IFindByIdRequest;
|
|
17
|
+
export import IFindByIdResponse = Entity.IFindByIdResponse;
|
|
18
|
+
|
|
19
|
+
export import IFindByOwnerIdRequest = shared.IFindByOwnerIdRequest;
|
|
20
|
+
export import IFindByOwnerIdResponse = Entity.IFindByOwnerIdResponse;
|
|
21
|
+
|
|
22
|
+
export import ISendEmailDocumentRequest = Entity.ISendEmailDocumentRequest;
|
|
23
|
+
|
|
24
|
+
export const route = `${serviceHostname}${serviceAuthPath}external_document_header/`;
|
|
25
|
+
|
|
26
|
+
const repository: Entity.IController = {
|
|
27
|
+
create: async (body: ICreateRequest): Promise<IEntity> => {
|
|
28
|
+
const response = await api.post(`${route}`, body);
|
|
29
|
+
return response.data;
|
|
30
|
+
},
|
|
31
|
+
|
|
32
|
+
update: async (
|
|
33
|
+
selector: IFindByIdRequest,
|
|
34
|
+
body: IUpdateRequest,
|
|
35
|
+
): Promise<IEntity | null> => {
|
|
36
|
+
const response = await api.put(`${route}${selector.id}`, body);
|
|
37
|
+
return response.data;
|
|
38
|
+
},
|
|
39
|
+
|
|
40
|
+
findById: async (
|
|
41
|
+
selector: IFindByIdRequest,
|
|
42
|
+
): Promise<IFindByIdResponse | null> => {
|
|
43
|
+
const response = await api.get(`${route}${selector.id}`);
|
|
44
|
+
return response.data;
|
|
45
|
+
},
|
|
46
|
+
|
|
47
|
+
findByOwnerId: async (
|
|
48
|
+
params?: IFindByOwnerIdRequest,
|
|
49
|
+
): Promise<IFindByOwnerIdResponse[]> => {
|
|
50
|
+
const response = await api.get(`${route}by_owner`, { params });
|
|
51
|
+
return response.data;
|
|
52
|
+
},
|
|
53
|
+
|
|
54
|
+
find: async (params?: IFindRequest): Promise<IFindResponse[]> => {
|
|
55
|
+
const response = await api.get(`${route}`, { params });
|
|
56
|
+
return response.data;
|
|
57
|
+
},
|
|
58
|
+
|
|
59
|
+
findPaginated: async (
|
|
60
|
+
params: IFindPaginatedRequest,
|
|
61
|
+
): Promise<IFindWithPaginationResponse> => {
|
|
62
|
+
const response = await api.get(`${route}paginated`, { params });
|
|
63
|
+
return response.data;
|
|
64
|
+
},
|
|
65
|
+
|
|
66
|
+
deleteOne: async (params?: IFindByIdRequest): Promise<IEntity | null> => {
|
|
67
|
+
const response = await api.get(`${route}`, { params });
|
|
68
|
+
return response.data;
|
|
69
|
+
},
|
|
70
|
+
|
|
71
|
+
sendEmailDocument: async (body: ISendEmailDocumentRequest): Promise<void> => {
|
|
72
|
+
await api.post(`${route}sendEmail`, body);
|
|
73
|
+
},
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
export const {
|
|
77
|
+
find,
|
|
78
|
+
create,
|
|
79
|
+
deleteOne,
|
|
80
|
+
findById,
|
|
81
|
+
findByOwnerId,
|
|
82
|
+
findPaginated,
|
|
83
|
+
update,
|
|
84
|
+
sendEmailDocument,
|
|
85
|
+
} = repository;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { ExternalDocumentType as Entity, shared } from '@nomalism-com/types';
|
|
2
|
+
import api from '../../shared/client';
|
|
3
|
+
import { serviceHostname, serviceAuthPath } from '.';
|
|
4
|
+
|
|
5
|
+
export import IEntity = Entity.Entity;
|
|
6
|
+
|
|
7
|
+
export import IFindMinifiedRequest = shared.IFindMinifiedRequest;
|
|
8
|
+
export import IFindMinifiedResponse = shared.IFindMinifiedResponse;
|
|
9
|
+
|
|
10
|
+
export const route = `${serviceHostname}${serviceAuthPath}external_document_type/`;
|
|
11
|
+
|
|
12
|
+
const repository: Entity.IRepository = {
|
|
13
|
+
find: async (): Promise<IEntity[]> => {
|
|
14
|
+
const response = await api.get(`${route}`);
|
|
15
|
+
return response.data;
|
|
16
|
+
},
|
|
17
|
+
|
|
18
|
+
findMinified: async (
|
|
19
|
+
params?: IFindMinifiedRequest,
|
|
20
|
+
): Promise<IFindMinifiedResponse[]> => {
|
|
21
|
+
const response = await api.get(`${route}minified`, { params });
|
|
22
|
+
return response.data;
|
|
23
|
+
},
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export const { find, findMinified } = repository;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export const serviceHostname =
|
|
2
|
+
process.env.REACT_APP_ENV === 'development'
|
|
3
|
+
? process.env.REACT_APP_STOCK_URL
|
|
4
|
+
: process.env.REACT_APP_API_GATEWAY_URL;
|
|
5
|
+
export const serviceAuthPath =
|
|
6
|
+
process.env.REACT_APP_ENV === 'development' ? '/' : 'stock/auth/';
|
|
7
|
+
export const servicePublicPath =
|
|
8
|
+
process.env.REACT_APP_ENV === 'development' ? '/' : 'stock/public/';
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { shared, Location 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
|
+
|
|
17
|
+
export import IUpdateRequest = Entity.IUpdateRequest;
|
|
18
|
+
export type IPaginationResponse =
|
|
19
|
+
shared.IPaginationResponse<Entity.IFindResponse>;
|
|
20
|
+
|
|
21
|
+
export const route = `${serviceHostname}${serviceAuthPath}location/`;
|
|
22
|
+
|
|
23
|
+
const repository: Entity.IRepository = {
|
|
24
|
+
find: async (params: IFindRequest): Promise<IFindResponse[]> => {
|
|
25
|
+
const response = await api.get(`${route}`, { params });
|
|
26
|
+
return response.data;
|
|
27
|
+
},
|
|
28
|
+
|
|
29
|
+
findPaginated: async (
|
|
30
|
+
params: IFindPaginatedRequest,
|
|
31
|
+
): Promise<IPaginationResponse> => {
|
|
32
|
+
const response = await api.get(`${route}paginated`, { params });
|
|
33
|
+
return response.data;
|
|
34
|
+
},
|
|
35
|
+
|
|
36
|
+
findMinified: async (
|
|
37
|
+
params?: IFindMinifiedRequest,
|
|
38
|
+
): Promise<IFindMinifiedResponse[]> => {
|
|
39
|
+
const response = await api.get(`${route}minified`, {
|
|
40
|
+
params,
|
|
41
|
+
});
|
|
42
|
+
return response.data;
|
|
43
|
+
},
|
|
44
|
+
|
|
45
|
+
findByOwnerId: async (
|
|
46
|
+
params: IFindByOwnerIdRequest,
|
|
47
|
+
): Promise<IFindResponse[]> => {
|
|
48
|
+
const response = await api.get(`${route}by_owner`, {
|
|
49
|
+
params,
|
|
50
|
+
});
|
|
51
|
+
return response.data;
|
|
52
|
+
},
|
|
53
|
+
|
|
54
|
+
findById: async (
|
|
55
|
+
selector: shared.IFindByIdRequest,
|
|
56
|
+
): Promise<IFindResponse | null> => {
|
|
57
|
+
const response = await api.get(`${route}${selector.id}`);
|
|
58
|
+
return response.data;
|
|
59
|
+
},
|
|
60
|
+
|
|
61
|
+
create: async (body: ICreateRequest): Promise<IFindResponse> => {
|
|
62
|
+
const response = await api.post(`${route}`, body);
|
|
63
|
+
return response.data;
|
|
64
|
+
},
|
|
65
|
+
|
|
66
|
+
update: async (
|
|
67
|
+
selector: shared.IFindByIdRequest,
|
|
68
|
+
body: IUpdateRequest,
|
|
69
|
+
): Promise<IFindResponse | null> => {
|
|
70
|
+
const response = await api.put(`${route}${selector.id}`, body);
|
|
71
|
+
return response.data;
|
|
72
|
+
},
|
|
73
|
+
|
|
74
|
+
deleteOne: async (
|
|
75
|
+
selector: shared.IFindByIdRequest,
|
|
76
|
+
): Promise<IFindResponse | null> => {
|
|
77
|
+
const response = await api.delete(`${route}${selector.id}`);
|
|
78
|
+
return response.data;
|
|
79
|
+
},
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
export const {
|
|
83
|
+
find,
|
|
84
|
+
findPaginated,
|
|
85
|
+
findMinified,
|
|
86
|
+
findByOwnerId,
|
|
87
|
+
findById,
|
|
88
|
+
create,
|
|
89
|
+
update,
|
|
90
|
+
deleteOne,
|
|
91
|
+
} = repository;
|