@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,196 @@
|
|
|
1
|
+
import { shared, Plot as Entity } from '@nomalism-com/types';
|
|
2
|
+
import api from '../../shared/client';
|
|
3
|
+
import { serviceHostname, serviceAuthPath, servicePublicPath } from '.';
|
|
4
|
+
|
|
5
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
6
|
+
export import IPlotVirtuals = Entity.IPlotVirtuals;
|
|
7
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
8
|
+
export import IPlotVirtualExtended = Entity.IPlotVirtualExtended;
|
|
9
|
+
|
|
10
|
+
export import IFindOptionalByOwnerIdRequest = shared.IFindOptionalByOwnerIdRequest;
|
|
11
|
+
export import IFindPlotsToReturnResponse = Entity.IFindPlotsToReturnResponse;
|
|
12
|
+
export import IDisassociatePlot = Entity.IDisassociatePlot;
|
|
13
|
+
export import IInventoryLossResponse = Entity.IInventoryLossResponse;
|
|
14
|
+
|
|
15
|
+
export import IFindByOwnerIdRequest = shared.IFindByOwnerIdRequest;
|
|
16
|
+
export import IFindByOwnerIdResponse = Entity.IFindByOwnerIdResponse;
|
|
17
|
+
|
|
18
|
+
export import IFindByIdRequest = shared.IFindByIdRequest;
|
|
19
|
+
|
|
20
|
+
export import IFindPlotsInPrisonResponse = Entity.IFindPlotsInPrisonResponse;
|
|
21
|
+
|
|
22
|
+
export import IFoldPlotRequest = Entity.IFoldPlotRequest;
|
|
23
|
+
export import IFoldPlotResponse = Entity.IFoldPlotResponse;
|
|
24
|
+
|
|
25
|
+
export import IUnfoldPlotRequest = Entity.IUnfoldPlotRequest;
|
|
26
|
+
export import IUnfoldPlotResponse = Entity.IUnfoldPlotResponse;
|
|
27
|
+
|
|
28
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
29
|
+
export import checkPlotInPrisonOptions = Entity.checkPlotInPrisonOptions;
|
|
30
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
31
|
+
export import ICheckPlotInPrisonOptions = Entity.ICheckPlotInPrisonOptions;
|
|
32
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
33
|
+
export import ICheckPlotInPrisonPlotsRequest = Entity.ICheckPlotInPrisonPlotsRequest;
|
|
34
|
+
export import ICheckPlotInPrisonRequest = Entity.ICheckPlotInPrisonRequest;
|
|
35
|
+
|
|
36
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
37
|
+
export import checkPlotsToReturnOptions = Entity.checkPlotsToReturnOptions;
|
|
38
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
39
|
+
export import ICheckPlotsToReturnOptions = Entity.ICheckPlotsToReturnOptions;
|
|
40
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
41
|
+
export import ICheckPlotsToReturnPlotsRequest = Entity.ICheckPlotsToReturnPlotsRequest;
|
|
42
|
+
export import ICheckPlotsToReturnRequest = Entity.ICheckPlotsToReturnRequest;
|
|
43
|
+
|
|
44
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
45
|
+
export import IEntity = Entity.Entity;
|
|
46
|
+
|
|
47
|
+
export import IPrintLabel = Entity.IPrintLabel;
|
|
48
|
+
|
|
49
|
+
export import ICreateInventoryRequest = Entity.ICreateInventoryRequest;
|
|
50
|
+
|
|
51
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
52
|
+
export import IFindDetailedResponse = Entity.IFindDetailedResponse;
|
|
53
|
+
|
|
54
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
55
|
+
export import IQrCodeRequest = Entity.IQrCodeRequest;
|
|
56
|
+
|
|
57
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
58
|
+
export import LabelTypeOptions = Entity.labelTypeOptions;
|
|
59
|
+
|
|
60
|
+
export const route = `${serviceHostname}${serviceAuthPath}plot/`;
|
|
61
|
+
export const publicRoute = `${serviceHostname}${servicePublicPath}plot/`;
|
|
62
|
+
|
|
63
|
+
interface IController extends Entity.IController {
|
|
64
|
+
printLabelToPdfUrl: (params: shared.IFindByIdRequest) => string;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
const repository: IController = {
|
|
68
|
+
findPlotsToReturn: async (
|
|
69
|
+
params: IFindOptionalByOwnerIdRequest,
|
|
70
|
+
): Promise<IFindPlotsToReturnResponse[]> => {
|
|
71
|
+
const response = await api.get(`${route}plots_to_return`, { params });
|
|
72
|
+
return response.data;
|
|
73
|
+
},
|
|
74
|
+
|
|
75
|
+
findPlotsToReturnProviders: async (): Promise<
|
|
76
|
+
shared.IFindMinifiedResponse[]
|
|
77
|
+
> => {
|
|
78
|
+
const response = await api.get(`${route}plots_to_return_providers`);
|
|
79
|
+
return response.data;
|
|
80
|
+
},
|
|
81
|
+
|
|
82
|
+
disassociatePlot: async (params: IDisassociatePlot): Promise<void> => {
|
|
83
|
+
const response = await api.post(`${route}disassociate_plot`, { params });
|
|
84
|
+
return response.data;
|
|
85
|
+
},
|
|
86
|
+
|
|
87
|
+
findInventoryLosses: async (): Promise<IInventoryLossResponse[]> => {
|
|
88
|
+
const response = await api.get(`${route}inventory_losses`);
|
|
89
|
+
return response.data;
|
|
90
|
+
},
|
|
91
|
+
|
|
92
|
+
findInventoryLossesProviders: async (): Promise<
|
|
93
|
+
shared.IFindMinifiedResponse[]
|
|
94
|
+
> => {
|
|
95
|
+
const response = await api.get(`${route}inventory_losses_providers`);
|
|
96
|
+
return response.data;
|
|
97
|
+
},
|
|
98
|
+
|
|
99
|
+
putPlotInPrison: async (data: IFindByIdRequest): Promise<IEntity | null> => {
|
|
100
|
+
const response = await api.post(`${route}put_in_prison`, data);
|
|
101
|
+
return response.data;
|
|
102
|
+
},
|
|
103
|
+
|
|
104
|
+
removePlotFromPrison: async (
|
|
105
|
+
data: IFindByIdRequest,
|
|
106
|
+
): Promise<IEntity | null> => {
|
|
107
|
+
const response = await api.post(`${route}remove_from_prison`, data);
|
|
108
|
+
return response.data;
|
|
109
|
+
},
|
|
110
|
+
|
|
111
|
+
findById: async (id: string): Promise<IEntity | null> => {
|
|
112
|
+
const response = await api.get(`${route}${id}`);
|
|
113
|
+
return response.data;
|
|
114
|
+
},
|
|
115
|
+
|
|
116
|
+
findByOwnerId: async (
|
|
117
|
+
params: IFindByOwnerIdRequest,
|
|
118
|
+
): Promise<IFindByOwnerIdResponse[]> => {
|
|
119
|
+
const response = await api.get(`${route}by_owner`, {
|
|
120
|
+
params,
|
|
121
|
+
});
|
|
122
|
+
return response.data;
|
|
123
|
+
},
|
|
124
|
+
|
|
125
|
+
findPlotsInPrison: async (): Promise<IFindPlotsInPrisonResponse[]> => {
|
|
126
|
+
const response = await api.get(`${route}in_prison`, {});
|
|
127
|
+
return response.data;
|
|
128
|
+
},
|
|
129
|
+
|
|
130
|
+
findPlotsInPrisonProviders: async (): Promise<
|
|
131
|
+
shared.IFindMinifiedResponse[]
|
|
132
|
+
> => {
|
|
133
|
+
const response = await api.get(`${route}in_prison_providers`, {});
|
|
134
|
+
return response.data;
|
|
135
|
+
},
|
|
136
|
+
|
|
137
|
+
unfoldPlot: async (
|
|
138
|
+
data: IUnfoldPlotRequest,
|
|
139
|
+
): Promise<IUnfoldPlotResponse> => {
|
|
140
|
+
const response = await api.post(`${route}unfold_plot`, data);
|
|
141
|
+
return response.data;
|
|
142
|
+
},
|
|
143
|
+
|
|
144
|
+
foldPlot: async (data: IFoldPlotRequest): Promise<IFoldPlotResponse> => {
|
|
145
|
+
const response = await api.post(`${route}fold_plot`, data);
|
|
146
|
+
return response.data;
|
|
147
|
+
},
|
|
148
|
+
|
|
149
|
+
checkPlotInPrison: async (data: ICheckPlotInPrisonRequest): Promise<void> => {
|
|
150
|
+
return api.post(`${route}check_in_prison`, data);
|
|
151
|
+
},
|
|
152
|
+
|
|
153
|
+
checkPlotsToReturn: async (
|
|
154
|
+
data: ICheckPlotsToReturnRequest,
|
|
155
|
+
): Promise<void> => {
|
|
156
|
+
await api.post(`${route}check_to_return`, data);
|
|
157
|
+
},
|
|
158
|
+
|
|
159
|
+
printLabel: async (params: IPrintLabel): Promise<void> => {
|
|
160
|
+
await api.post(`${route}print_label`, params);
|
|
161
|
+
},
|
|
162
|
+
|
|
163
|
+
printLabelToPdf: async (params: shared.IFindByIdRequest): Promise<void> => {
|
|
164
|
+
await api.get(`${publicRoute}print_label_pdf/${params}`);
|
|
165
|
+
},
|
|
166
|
+
|
|
167
|
+
printLabelToPdfUrl: (params: shared.IFindByIdRequest): string => {
|
|
168
|
+
return `${publicRoute}print_label_pdf?${new URLSearchParams(params)}`;
|
|
169
|
+
},
|
|
170
|
+
|
|
171
|
+
createInventory: (data: ICreateInventoryRequest): Promise<void> => {
|
|
172
|
+
return api.post(`${route}inventory`, data);
|
|
173
|
+
},
|
|
174
|
+
};
|
|
175
|
+
|
|
176
|
+
export const {
|
|
177
|
+
findPlotsToReturn,
|
|
178
|
+
findPlotsToReturnProviders,
|
|
179
|
+
disassociatePlot,
|
|
180
|
+
findInventoryLosses,
|
|
181
|
+
findInventoryLossesProviders,
|
|
182
|
+
checkPlotsToReturn,
|
|
183
|
+
checkPlotInPrison,
|
|
184
|
+
putPlotInPrison,
|
|
185
|
+
removePlotFromPrison,
|
|
186
|
+
findByOwnerId,
|
|
187
|
+
findById,
|
|
188
|
+
findPlotsInPrison,
|
|
189
|
+
findPlotsInPrisonProviders,
|
|
190
|
+
unfoldPlot,
|
|
191
|
+
foldPlot,
|
|
192
|
+
printLabel,
|
|
193
|
+
printLabelToPdf,
|
|
194
|
+
printLabelToPdfUrl,
|
|
195
|
+
createInventory,
|
|
196
|
+
} = repository;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { shared, PreSale as Entity } from '@nomalism-com/types';
|
|
2
|
+
import api from '../../shared/client';
|
|
3
|
+
import { serviceHostname, serviceAuthPath } from '.';
|
|
4
|
+
|
|
5
|
+
export import IFindResponse = Entity.IFindResponse;
|
|
6
|
+
export import IFindResponseWithQuantityOfPlots = Entity.IFindResponseWithQuantityOfPlots;
|
|
7
|
+
|
|
8
|
+
export import ICreateRequest = Entity.ICreateRequest;
|
|
9
|
+
export import IEntityExtended = Entity.IEntityExtended;
|
|
10
|
+
|
|
11
|
+
export import IUpdateRequest = Entity.IUpdateRequest;
|
|
12
|
+
export import IRemovePlotOrPreSaleProductRequest = Entity.IRemovePlotOrPreSaleProductRequest;
|
|
13
|
+
|
|
14
|
+
export import IImportToClientProposalRequest = Entity.IImportToClientProposalRequest;
|
|
15
|
+
|
|
16
|
+
export type IPaginationResponse =
|
|
17
|
+
shared.IPaginationResponse<Entity.IFindResponse>;
|
|
18
|
+
|
|
19
|
+
export const route = `${serviceHostname}${serviceAuthPath}pre_sale/`;
|
|
20
|
+
|
|
21
|
+
const repository = {
|
|
22
|
+
find: async (): Promise<IFindResponseWithQuantityOfPlots[]> => {
|
|
23
|
+
const response = await api.get(`${route}`);
|
|
24
|
+
return response.data;
|
|
25
|
+
},
|
|
26
|
+
|
|
27
|
+
findById: async (
|
|
28
|
+
selector: shared.IFindByIdRequest,
|
|
29
|
+
): Promise<IEntityExtended | null> => {
|
|
30
|
+
const response = await api.get(`${route}${selector.id}`);
|
|
31
|
+
return response.data;
|
|
32
|
+
},
|
|
33
|
+
|
|
34
|
+
findPending: async (): Promise<IEntityExtended[]> => {
|
|
35
|
+
const response = await api.get(`${route}pending`);
|
|
36
|
+
return response.data;
|
|
37
|
+
},
|
|
38
|
+
|
|
39
|
+
create: async (body: ICreateRequest): Promise<IFindResponse> => {
|
|
40
|
+
const response = await api.post(`${route}`, body);
|
|
41
|
+
return response.data;
|
|
42
|
+
},
|
|
43
|
+
|
|
44
|
+
update: async (
|
|
45
|
+
selector: shared.IFindByIdRequest,
|
|
46
|
+
body: IUpdateRequest,
|
|
47
|
+
): Promise<IFindResponse | null> => {
|
|
48
|
+
const response = await api.put(`${route}${selector.id}`, body);
|
|
49
|
+
return response.data;
|
|
50
|
+
},
|
|
51
|
+
|
|
52
|
+
removePlot: async (
|
|
53
|
+
selector: shared.IFindByIdRequest,
|
|
54
|
+
body: IRemovePlotOrPreSaleProductRequest,
|
|
55
|
+
): Promise<void> => {
|
|
56
|
+
const response = await api.put(`${route}plot/${selector.id}`, body);
|
|
57
|
+
return response.data;
|
|
58
|
+
},
|
|
59
|
+
|
|
60
|
+
importToClientProposal: async (
|
|
61
|
+
data: IImportToClientProposalRequest,
|
|
62
|
+
): Promise<void> => {
|
|
63
|
+
const response = await api.post(`${route}client_proposal`, data);
|
|
64
|
+
return response.data;
|
|
65
|
+
},
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
export const {
|
|
69
|
+
find,
|
|
70
|
+
findById,
|
|
71
|
+
create,
|
|
72
|
+
update,
|
|
73
|
+
removePlot,
|
|
74
|
+
findPending,
|
|
75
|
+
importToClientProposal,
|
|
76
|
+
} = repository;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { shared, PreSaleProduct as Entity } from '@nomalism-com/types';
|
|
2
|
+
import api from '../../shared/client';
|
|
3
|
+
import { serviceHostname, serviceAuthPath } from '.';
|
|
4
|
+
|
|
5
|
+
export import IFindResponse = Entity.Entity;
|
|
6
|
+
|
|
7
|
+
export const route = `${serviceHostname}${serviceAuthPath}pre_sale_product/`;
|
|
8
|
+
|
|
9
|
+
const repository = {
|
|
10
|
+
find: async (): Promise<IFindResponse[]> => {
|
|
11
|
+
const response = await api.get(`${route}`);
|
|
12
|
+
return response.data;
|
|
13
|
+
},
|
|
14
|
+
|
|
15
|
+
findById: async (
|
|
16
|
+
selector: shared.IFindByIdRequest,
|
|
17
|
+
): Promise<IFindResponse | null> => {
|
|
18
|
+
const response = await api.get(`${route}${selector.id}`);
|
|
19
|
+
return response.data;
|
|
20
|
+
},
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export const { find, findById } = repository;
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { shared, PrimaryColor 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}primary_color/`;
|
|
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;
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
import { shared, Product as Entity } from '@nomalism-com/types';
|
|
2
|
+
import api from '../../shared/client';
|
|
3
|
+
import { serviceHostname, serviceAuthPath, servicePublicPath } from '.';
|
|
4
|
+
|
|
5
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
6
|
+
export import IEntity = Entity.Entity;
|
|
7
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
8
|
+
export import ProductTypeEnum = Entity.ProductTypeEnum;
|
|
9
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
10
|
+
export import IProductType = Entity.IProductType;
|
|
11
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
12
|
+
export import productTypes = Entity.productTypes;
|
|
13
|
+
|
|
14
|
+
export import IPrintLabel = Entity.IPrintLabel;
|
|
15
|
+
|
|
16
|
+
export import IFindRequest = Entity.IFindRequest;
|
|
17
|
+
export import IFindResponse = Entity.IFindResponse;
|
|
18
|
+
|
|
19
|
+
export import IEntityExtended = Entity.IEntityExtended;
|
|
20
|
+
export import IFindByReferenceRequest = Entity.IFindByReferenceRequest;
|
|
21
|
+
export import IFindByIdResponse = Entity.IFindByIdResponse;
|
|
22
|
+
|
|
23
|
+
export import IFindPaginatedRequest = Entity.IFindPaginatedRequest;
|
|
24
|
+
|
|
25
|
+
export import IFindMinifiedRequest = shared.IFindMinifiedRequest;
|
|
26
|
+
export import IFindMinifiedResponse = shared.IFindMinifiedResponse;
|
|
27
|
+
|
|
28
|
+
export import IFindByOwnerIdRequest = shared.IFindByOwnerIdRequest;
|
|
29
|
+
export import IFindByOwnerIdResponse = Entity.IFindByOwnerIdResponse;
|
|
30
|
+
|
|
31
|
+
export import IBasicSearchRequest = Entity.IBasicSearchRequest;
|
|
32
|
+
export import IBasicSearchResponse = Entity.IBasicSearchResponse;
|
|
33
|
+
|
|
34
|
+
export import ICreateRequest = Entity.ICreateRequest;
|
|
35
|
+
|
|
36
|
+
export import IUpdateRequest = Entity.IUpdateRequest;
|
|
37
|
+
|
|
38
|
+
export import IBulkUpdateRequest = Entity.IBulkUpdateRequest;
|
|
39
|
+
export import IUpdateManyResponse = shared.IUpdateManyResponse;
|
|
40
|
+
|
|
41
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
42
|
+
export import IProductVirtuals = Entity.IProductVirtuals;
|
|
43
|
+
|
|
44
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
45
|
+
export import IProductPromotionVirtuals = Entity.IProductPromotionVirtuals;
|
|
46
|
+
|
|
47
|
+
export import IFindOrCreateProductionProductRequest = Entity.IFindOrCreateProductionProductRequest;
|
|
48
|
+
|
|
49
|
+
export import IFindByProductType = Entity.IFindByProductType;
|
|
50
|
+
|
|
51
|
+
export type IPaginationResponse =
|
|
52
|
+
shared.IPaginationResponse<Entity.IFindResponse>;
|
|
53
|
+
|
|
54
|
+
interface IController extends Entity.IController {
|
|
55
|
+
printLabelToPdfUrl: (params: shared.IFindByIdRequest) => string;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export const route = `${serviceHostname}${serviceAuthPath}product/`;
|
|
59
|
+
export const publicRoute = `${serviceHostname}${servicePublicPath}product/`;
|
|
60
|
+
|
|
61
|
+
const repository: IController = {
|
|
62
|
+
find: async (params: IFindRequest): Promise<IFindResponse[]> => {
|
|
63
|
+
const response = await api.get(`${route}`, { params });
|
|
64
|
+
return response.data;
|
|
65
|
+
},
|
|
66
|
+
|
|
67
|
+
findPaginated: async (
|
|
68
|
+
params: IFindPaginatedRequest,
|
|
69
|
+
): Promise<IPaginationResponse> => {
|
|
70
|
+
const response = await api.get(`${route}paginated`, { params });
|
|
71
|
+
return response.data;
|
|
72
|
+
},
|
|
73
|
+
|
|
74
|
+
findMinified: async (
|
|
75
|
+
params?: IFindMinifiedRequest,
|
|
76
|
+
): Promise<IFindMinifiedResponse[]> => {
|
|
77
|
+
const response = await api.get(`${route}minified`, {
|
|
78
|
+
params,
|
|
79
|
+
});
|
|
80
|
+
return response.data;
|
|
81
|
+
},
|
|
82
|
+
|
|
83
|
+
findByOwnerId: async (
|
|
84
|
+
params: IFindByOwnerIdRequest,
|
|
85
|
+
): Promise<IFindByOwnerIdResponse[]> => {
|
|
86
|
+
const response = await api.get(`${route}by_owner`, {
|
|
87
|
+
params,
|
|
88
|
+
});
|
|
89
|
+
return response.data;
|
|
90
|
+
},
|
|
91
|
+
|
|
92
|
+
findByRef: async (
|
|
93
|
+
params: IFindByReferenceRequest,
|
|
94
|
+
): Promise<IEntityExtended | null> => {
|
|
95
|
+
const response = await api.get(`${route}by_ref`, {
|
|
96
|
+
params,
|
|
97
|
+
});
|
|
98
|
+
return response.data;
|
|
99
|
+
},
|
|
100
|
+
|
|
101
|
+
findByProductType: async (
|
|
102
|
+
params: IFindByProductType,
|
|
103
|
+
): Promise<IEntityExtended[]> => {
|
|
104
|
+
const response = await api.get(`${route}by_product_type`, {
|
|
105
|
+
params,
|
|
106
|
+
});
|
|
107
|
+
return response.data;
|
|
108
|
+
},
|
|
109
|
+
|
|
110
|
+
findById: async (
|
|
111
|
+
selector: shared.IFindByIdRequest,
|
|
112
|
+
): Promise<IFindByIdResponse | null> => {
|
|
113
|
+
const response = await api.get(`${route}${selector.id}`);
|
|
114
|
+
return response.data;
|
|
115
|
+
},
|
|
116
|
+
|
|
117
|
+
findByPlot: async (
|
|
118
|
+
selector: shared.IFindByIdRequest,
|
|
119
|
+
): Promise<IEntityExtended | null> => {
|
|
120
|
+
const response = await api.get(`${route}plot/${selector.id}`);
|
|
121
|
+
return response.data;
|
|
122
|
+
},
|
|
123
|
+
|
|
124
|
+
findOrCreateProductionProduct: async (
|
|
125
|
+
body: IFindOrCreateProductionProductRequest,
|
|
126
|
+
): Promise<IFindResponse> => {
|
|
127
|
+
const response = await api.post(`${route}production`, body);
|
|
128
|
+
return response.data;
|
|
129
|
+
},
|
|
130
|
+
|
|
131
|
+
create: async (body: ICreateRequest): Promise<IFindResponse> => {
|
|
132
|
+
const response = await api.post(`${route}`, body);
|
|
133
|
+
return response.data;
|
|
134
|
+
},
|
|
135
|
+
|
|
136
|
+
update: async (
|
|
137
|
+
selector: shared.IFindByIdRequest,
|
|
138
|
+
body: IUpdateRequest,
|
|
139
|
+
): Promise<IFindResponse | null> => {
|
|
140
|
+
const response = await api.put(`${route}${selector.id}`, body);
|
|
141
|
+
return response.data;
|
|
142
|
+
},
|
|
143
|
+
|
|
144
|
+
deleteOne: async (
|
|
145
|
+
selector: shared.IFindByIdRequest,
|
|
146
|
+
): Promise<IFindResponse | null> => {
|
|
147
|
+
const response = await api.delete(`${route}${selector.id}`);
|
|
148
|
+
return response.data;
|
|
149
|
+
},
|
|
150
|
+
|
|
151
|
+
basicSearch: async (
|
|
152
|
+
params: IBasicSearchRequest,
|
|
153
|
+
): Promise<shared.IPaginationResponse<IBasicSearchResponse>> => {
|
|
154
|
+
const response = await api.get(`${route}basic_search`, {
|
|
155
|
+
params,
|
|
156
|
+
});
|
|
157
|
+
return response.data;
|
|
158
|
+
},
|
|
159
|
+
|
|
160
|
+
bulkUpdate: async (
|
|
161
|
+
body: IBulkUpdateRequest,
|
|
162
|
+
): Promise<IUpdateManyResponse> => {
|
|
163
|
+
const response = await api.put(`${route}bulk`, body);
|
|
164
|
+
return response.data;
|
|
165
|
+
},
|
|
166
|
+
|
|
167
|
+
printLabel: async (params: IPrintLabel): Promise<void> => {
|
|
168
|
+
await api.post(`${route}print_label`, params);
|
|
169
|
+
},
|
|
170
|
+
|
|
171
|
+
printLabelToPdf: async (params: shared.IFindByIdRequest): Promise<void> => {
|
|
172
|
+
await api.get(`${publicRoute}print_label_pdf/${params}`);
|
|
173
|
+
},
|
|
174
|
+
|
|
175
|
+
printLabelToPdfUrl: (params: shared.IFindByIdRequest): string => {
|
|
176
|
+
return `${publicRoute}print_label_pdf?${new URLSearchParams(params)}`;
|
|
177
|
+
},
|
|
178
|
+
};
|
|
179
|
+
|
|
180
|
+
export const {
|
|
181
|
+
find,
|
|
182
|
+
findPaginated,
|
|
183
|
+
findMinified,
|
|
184
|
+
findByOwnerId,
|
|
185
|
+
findById,
|
|
186
|
+
findByRef,
|
|
187
|
+
findOrCreateProductionProduct,
|
|
188
|
+
create,
|
|
189
|
+
update,
|
|
190
|
+
deleteOne,
|
|
191
|
+
basicSearch,
|
|
192
|
+
bulkUpdate,
|
|
193
|
+
printLabel,
|
|
194
|
+
printLabelToPdf,
|
|
195
|
+
printLabelToPdfUrl,
|
|
196
|
+
findByPlot,
|
|
197
|
+
} = repository;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { shared, ProductAttribute as Entity } from '@nomalism-com/types';
|
|
2
|
+
import api from '../../shared/client';
|
|
3
|
+
import { serviceHostname, serviceAuthPath } from '.';
|
|
4
|
+
|
|
5
|
+
export import IFindDetailedResponse = Entity.IFindDetailedResponse;
|
|
6
|
+
|
|
7
|
+
export import IFindRequest = Entity.IFindRequest;
|
|
8
|
+
export import IFindResponse = Entity.IFindResponse;
|
|
9
|
+
|
|
10
|
+
export import IFindPaginatedRequest = Entity.IFindPaginatedRequest;
|
|
11
|
+
|
|
12
|
+
export import IFindByOwnerIdRequest = shared.IFindByOwnerIdRequest;
|
|
13
|
+
export import IFindByOwnerIdResponse = Entity.IFindByOwnerIdResponse;
|
|
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}product_attribute/`;
|
|
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
|
+
findByOwnerId: async (
|
|
37
|
+
params: IFindByOwnerIdRequest,
|
|
38
|
+
): Promise<IFindByOwnerIdResponse[]> => {
|
|
39
|
+
const response = await api.get(`${route}by_owner`, {
|
|
40
|
+
params,
|
|
41
|
+
});
|
|
42
|
+
return response.data;
|
|
43
|
+
},
|
|
44
|
+
|
|
45
|
+
findById: async (
|
|
46
|
+
selector: shared.IFindByIdRequest,
|
|
47
|
+
): Promise<IFindResponse | null> => {
|
|
48
|
+
const response = await api.get(`${route}${selector.id}`);
|
|
49
|
+
return response.data;
|
|
50
|
+
},
|
|
51
|
+
|
|
52
|
+
create: async (body: ICreateRequest): Promise<IFindDetailedResponse> => {
|
|
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<IFindDetailedResponse | null> => {
|
|
61
|
+
const response = await api.put(`${route}${selector.id}`, body);
|
|
62
|
+
return response.data;
|
|
63
|
+
},
|
|
64
|
+
|
|
65
|
+
deleteOne: async (
|
|
66
|
+
selector: shared.IFindByIdRequest,
|
|
67
|
+
): Promise<IFindDetailedResponse | null> => {
|
|
68
|
+
const response = await api.delete(`${route}${selector.id}`);
|
|
69
|
+
return response.data;
|
|
70
|
+
},
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
export const {
|
|
74
|
+
find,
|
|
75
|
+
findPaginated,
|
|
76
|
+
findByOwnerId,
|
|
77
|
+
findById,
|
|
78
|
+
create,
|
|
79
|
+
update,
|
|
80
|
+
deleteOne,
|
|
81
|
+
} = repository;
|