const existingTopics = [ { id: 'utils', name: 'Utils', description: 'Shared lookup endpoints roles, locations, configs, app types, pricing.', endpoints: [ { name: 'getuserroles', method: 'GET', url: '/api/rest/Xpress/utils/getuserroles', description: 'Retrieve all user roles available in the system.' }, { name: 'getapptypes', method: 'GET', url: '/api/rest/xpress/utils/getapptypes?tag=DELIVERY', description: 'List application types filtered by a tag (e.g. DELIVERY).', _note: "Host typo in source ('workopi') corrected to api.workolik.com." }, { name: 'getapplocations', method: 'GET', url: '/api/rest/xpress/utils/getapplocations?userid=1326', description: 'List all application locations.', _note: "Source name 'Gpplocation' assumed to be 'Getapplocations'." }, { name: 'getapppricing', method: 'GET', url: '/api/rest/xpress/utils/getapppricing?applocationid=1', description: 'Retrieve app pricing for a given app location.', _note: "Source query 'getapppripplocationid=' reconstructed as 'getapppricing?applocationid='." }, { name: 'getallpricing', method: 'GET', url: '/api/rest/xpress/utils/getallpricing?applocationid=1', description: 'Retrieve all pricing rules for an app location.' }, { name: 'getapplocationconfig', method: 'GET', url: '/api/rest/xpress/utils/getapplocationconfig', description: 'Retrieve the configuration for application locations.', _note: "Host typo in source ('workom') corrected to api.workolik.com." }, { name: 'getsubcategories', method: 'GET', url: '/api/rest/xpress/utils/getsubcategories/?moduleid=6', description: 'List all subcategories for a given module.' } ] }, { id: 'users', name: 'Users', description: 'Manage users and roles across the Xpress platform.', endpoints: [ { name: 'getallusers', method: 'GET', url: '/api/rest/xpress/users/getallusers?roleid=2&configid=1&tenantid=1079&status=Active&keyword=%john%&limit=10&offset=0', description: 'List users filtered by role, config, tenant, status, and keyword.' }, { name: 'getusersinfo', method: 'GET', url: '/api/rest/xpress/users/getusers?userid=1326', description: 'Retrieve a single user by ID.' } ] }, { id: 'partners', name: 'Partners', description: 'Partners, riders, locations, shifts, and rider pricing.', endpoints: [ { name: 'getlocations (by user)', method: 'GET', url: '/api/rest/xpress/partners/getlocations?userid=1277&configid=9', description: 'Get partner locations linked to a specific user.' }, { name: 'gettenantlocations ', method: 'GET', url: '/api/rest/xpress/tenants/gettenantlocations?keyword=daily&tenantid=916', description: 'Get partner locations linked to a specific tenant.' }, { name: 'getpartners', method: 'GET', url: '/api/rest/xpress/partners/getpartners', description: 'List all partners.', _note: "Source URL had a double slash (/api/rest//partners/) — assumed /xpress/partners/." }, { name: 'getriderpricing', method: 'GET', url: '/api/rest/xpress/partners/getriderpricing?applocationid=0', description: 'Get rider pricing rules for an app location.' }, { name: 'getallriders', method: 'GET', url: '/api/rest/xpress/partners/getallriders?partnerid=44&limit=10', description: 'List all riders for a partner.' }, { name: 'getallridersummary', method: 'GET', url: '/api/rest/xpress/partners/getallridersummary?applocationid=1', description: 'Aggregated summary of all riders at a location.' }, { name: 'getriderdetail', method: 'GET', url: '/api/rest/xpress/partners/getriderdetail?userid=1', description: 'Detailed information for a specific rider.', _note: "Source had 'htapi.workolik.com' (missing 'tps://') — restored to https://api.workolik.com." }, { name: 'getridershifts', method: 'GET', url: '/api/rest/xpress/partners/getridershifts?applocationid=1', description: 'Get rider shift records for an app location.', _note: "Host typo in source ('workk.com') corrected to api.workolik.com." } ] }, { id: 'tenants', name: 'Tenants', description: 'Tenant accounts info, locations, customers, orders, pricing, summary.', endpoints: [ { name: 'gettenants', method: 'GET', url: '/api/rest/xpress/tenants/gettenants?applocationid=1&status=active&partnerid=44', description: 'List tenants filtered by app location and status.', params: [ { name: 'applocationid', type: 'STRING', default: '1' }, { name: 'status', type: 'STRING', default: 'active' }, { name: 'partnerid', type: 'string', default: '44' } ], _note: "Source name 'Gettenan' truncated — assumed 'Gettenants'." }, { name: 'getalltenants', method: 'GET', url: '/api/rest/xpress/tenants/getalltenants?applocationid=1&moduleid=6&tenanttype=E&keyword=%25%25&status=Active&limit=10&offset=0', description: 'List all tenants with extensive filters.', params: [ { name: 'applocationid', type: 'STRING', default: '1' }, { name: 'moduleid', type: 'STRING', default: '6' }, { name: 'tenanttype', type: 'STRING', default: 'E' }, { name: 'keyword', type: 'STRING', default: '%%' }, { name: 'status', type: 'STRING', default: 'Active' }, { name: 'limit', type: 'STRING', default: '10' }, { name: 'offset', type: 'STRING', default: '0' } ], _note: "Source query 'status=Actilimit=10' reconstructed as 'status=Active&limit=10'. 'approved=1' param dropped per spec." }, { name: 'gettenantinfo', method: 'GET', url: '/api/rest/xpress/tenants/gettenantinfo?tenantid=1', description: 'Get basic information about a tenant.' }, { name: 'gettenantlocations', method: 'GET', url: '/api/rest/xpress/tenants/gettenantlocations?tenantid=916&keyword=%%', description: 'List physical locations for a tenant.' }, { name: 'gettenantsummary', method: 'GET', url: '/api/rest/xpress/tenants/gettenantsummary?moduleid=6&applocationid=1&tenanttype=E&keyword=%%', description: 'Aggregated summary for tenants under a module/location.', _note: "Source 'tenettenantsummary' reconstructed as 'tenants/gettenantsummary'." }, { name: 'getpricinglist', method: 'GET', url: '/api/rest/xpress/tenants/getpricinglist?tenantid=1087', description: 'Retrieve the tenant’s pricing list.', _note: "Source 'getpricingl' truncated — assumed 'getpricinglist'." }, { name: 'tenantsearch', method: 'GET', url: '/api/rest/xpress/tenants/search?keyword=daily&status=active', description: 'Full-text search for tenants by keyword.', _note: "Source name 'Tennatsearch' assumed to be 'Tenantsearch'." }, { name: 'getorders', method: 'GET', url: '/api/rest/xpress/tenant/getorders?applocationid=&tenantid=&locationid=&status=', description: 'List orders scoped to a single tenant.', _note: "Source uses /tenant/ (singular) here. Confirm whether this should be /tenants/ or kept as /tenant/." } ] }, { id: 'customers', name: 'Customers', description: 'Customer accounts, lookups, and search.', endpoints: [ { name: 'getallcustomers', method: 'GET', url: '/api/rest/xpress/customers/getallcustomers?applocationid=&keyword=&pageno=&pagesize=', description: 'Paginated list of all customers under an app location.' }, { name: 'gettenantcustomers', method: 'GET', url: '/api/rest/xpress/customers/gettenantcustomers?tenantid=1087&limit=10&offset=0', description: 'List customers under a specific tenant.', _note: "Source path 'xpresustomers' reconstructed as 'xpress/customers'." }, { name: 'searchcustomers', method: 'GET', url: '/api/rest/xpress/customers/searchcustomers?tenantid=1087&keyword=%%', description: 'Search customers by keyword within a tenant.', _note: "Source name 'Searchcumer' assumed to be 'Searchcustomers'." } ] }, { id: 'deliveries', name: 'Deliveries', description: 'Delivery records, queues, and rider-delivery joins.', endpoints: [ { name: 'getdeliveries', method: 'GET', url: '/api/rest/xpress/deliveries/getdeliveries?tenantid=10&status=Delivered&fromdate=2026-05-01T00:00:00&todate=2026-05-05T23:59:59&keyword=%john%&limit=10&offset=0', description: 'List deliveries with filters: tenant, status, date range, keyword.', _note: "Source query 'tenantid=10=Delivered' reconstructed as 'tenantid=10&status=Delivered'." }, { name: 'getdeliveryqueues', method: 'GET', url: '/api/rest/xpress/deliveries/getdeliveryqueues?userid=1277&fdate=2025-12-30T00:00:00 &tdate=2025-12-30T23:59:59', description: 'Retrieve delivery queue snapshots for a user/date range.', _note: "Source name 'tdeliveryqueues' truncated — assumed 'Getdeliveryqueues'." }, { name: 'deliverysummary', method: 'GET', url: '/api/rest/xpress/deliveries/deliverysummary?appuserid=1&fromdate=2026-03-31T00:00:00&todate=2026-03-31T23:59:59&status=active&applocationid=1&locationid=1160&tenantid=916&userid=865', description: 'Aggregated delivery summary for an app user.' }, { name: 'getriderbydelivery', method: 'GET', url: '/api/rest/xpress/deliveries/getriderbydelivery/?applocationid=&tenantid=&locationid=&fromdate=&todate=&keyword=', description: 'Map riders to deliveries within a location and date range.', _note: "Source URL was missing 'https' scheme — restored." } ] }, { id: 'orders', name: 'Orders', description: 'Order records, details, and aggregate summaries.', endpoints: [ { name: 'getorders', method: 'GET', url: '/api/rest/xpress/orders/tenant/getorders?start=2026-05-01T00:00:00&end=2026-05-31T23:59:59&status=delivered&limit=10&offset=0', description: 'List orders within a time frame and status.' }, { name: 'getordersummary', method: 'GET', url: '/api/rest/getordersummary/?tenantid=1079&fromdate=2025-07-24&todate=2025-07-24&configid=9', description: 'High-level summary of orders for a tenant/date range.' }, { name: 'getorderdetails', method: 'GET', url: '/api/rest/xpress/orders/getorderdetails?orderheaderid=6562', description: 'Get full details of an order by header ID.' }, { name: 'getlocationsummary', method: 'GET', url: '/api/rest/xpress/orders/getlocationsummary?tenantid=916', description: 'Per-location summary of orders.' } ] }, { id: 'products', name: 'Products', description: 'Product catalog, categories, and subcategories.', endpoints: [ { name: 'getproductcategories', method: 'GET', url: '/api/rest/xpress/products/getproductcategories?moduleid=1', description: 'List root product categories for a module.' }, { name: 'getproductsubcategories', method: 'GET', url: '/api/rest/xpress/products/getproductsubcategories?categoryid=1001', description: 'List subcategories under a product category.' } ] }, { id: 'invoice', name: 'Invoice', description: 'Invoice insights and billing analytics.', endpoints: [ { name: 'getinvoiceinsight', method: 'GET', url: '/api/rest/xpress/invoice/getinvoiceinsight?tenantid=916', description: 'Retrieve invoice insights and statistics for a tenant.', _note: "Source name 'Getinvoinsights' assumed to be 'Getinvoiceinsight'." } ] }, { id: 'payments', name: 'Payments', description: 'Payment requests and settlements.', endpoints: [ { name: 'getpaymentrequest', method: 'GET', url: '/api/rest/xpress/payments/requests/getpaymentrequest?partnerid=44&status=1', description: 'List payment requests for a partner by status.' } ] } ]; module.exports = { existingTopics };