refactor: migrate API services to Moqui REST s1 endpoints - #358
Draft
kumar-kartikey-choudhary wants to merge 1 commit into
Draft
refactor: migrate API services to Moqui REST s1 endpoints#358kumar-kartikey-choudhary wants to merge 1 commit into
kumar-kartikey-choudhary wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Draft PR: Refactor Import App Services to Moqui REST s1 Endpoints
📌 Context & Overview
This pull request initiates the migration of the Import App (
import) from legacy/performFindand generic OFBiz endpoints to Moqui REST s1 resource endpoints.The goal of this migration is to improve API response structures, standardise endpoint resource paths, and leverage Moqui's native REST s1 services.
🚀 Summary of Changes
1. Service Layer Migration (
src/services/)StockService.ts:fetchJobInformationtoGET /rest/s1/admin/serviceJobs.scheduleJobtoPOST /rest/s1/admin/serviceJobs.jobTypeEnumIdandparams(Axios GET query string).UtilService.ts:getFacilitiestoGET /rest/s1/admin/facilities.fetchGoodIdentificationTypestoGET /rest/s1/oms/goodIdentificationTypes.fetchShopifyShoptoGET /rest/s1/admin/shopifyShops.fetchProductStorestoGET /rest/s1/admin/users/productStores.fetchProductSelectorPreftoGET /rest/s1/admin/productStores/{productStoreId}/settings.fetchProductsSolr query toPOST /rest/s1/admin/search/query.UploadService.ts:createIncomingShipmenttoPOST /rest/s1/poorti/createIncomingShipment.UserService.ts:createFieldMappingandgetFieldMappingsto/rest/s1/admin/dataManagerMapping.2. Vuex Store Layer Updates (
src/store/modules/)stock/actions.ts:fetchJobInformationandfetchDraftJobto parse Moqui REST response formats (serviceJobListarray fallback).systemJobEnumIdto MoquijobTypeEnumId.util/actions.ts:fetchFacilities,fetchGoodIdentificationTypes,fetchProductStores, andfetchProductSelectorPrefresponse parsing to handle Moqui REST response formats (settings,facilities, etc.).3. Component Updates (
src/views/)ScheduledRestock.vue:fetchShopifyShopscall payload to align with updatedUtilService.fetchShopifyShopparameters.Note
This PR is currently marked as Draft for the following reasons:
baseURL(http://localhost:8080/rest/s1) and hardcoded tokens in services need to be replaced with dynamic authentication getters from@hotwax/oms-api/ Vuex store.UtilService.fetchProductsintegration withsrc/store/modules/product/actions.tsfor Solr product identification filters./performFindcalls ingetFacilityLocations,getServiceStatusDesc, andfetchDataResource.🧪 Testing & Verification Plan
JOB_SCHEDULED_RSTKservice job lookup loads properly in Scheduled Restock.fetchProductSelectorPrefcorrectly retrieves store settings without 404/filtering errors.