freshyo/apps/backend/src/postgresImporter.ts
2026-04-02 00:52:07 +05:30

294 lines
7.7 KiB
TypeScript

// // Postgres Importer - Intermediate layer to avoid direct postgresService imports in dbService
// // This file re-exports everything from postgresService
//
// // Re-export database connection
// export { db } from 'postgresService'
//
// // Re-export all schema exports
// export * from 'postgresService'
//
// // Re-export all helper methods from postgresService
// export {
// // Admin - Banner
// getBanners,
// getBannerById,
// createBanner,
// updateBanner,
// deleteBanner,
// // Admin - Complaint
// getComplaints,
// resolveComplaint,
// // Admin - Constants
// getAllConstants,
// upsertConstants,
// // Admin - Coupon
// getAllCoupons,
// getCouponById,
// invalidateCoupon,
// validateCoupon,
// getReservedCoupons,
// getUsersForCoupon,
// createCouponWithRelations,
// updateCouponWithRelations,
// generateCancellationCoupon,
// createReservedCouponWithProducts,
// createCouponForUser,
// checkUsersExist,
// checkCouponExists,
// checkReservedCouponExists,
// getOrderWithUser,
// // Admin - Order
// updateOrderNotes,
// getOrderDetails,
// updateOrderPackaged,
// updateOrderDelivered,
// updateOrderItemPackaging,
// removeDeliveryCharge,
// getSlotOrders,
// updateAddressCoords,
// getAllOrders,
// rebalanceSlots,
// cancelOrder,
// deleteOrderById,
// // Admin - Product
// getAllProducts,
// getProductById,
// deleteProduct,
// createProduct,
// updateProduct,
// checkProductExistsByName,
// checkUnitExists,
// getProductImagesById,
// createSpecialDealsForProduct,
// updateProductDeals,
// replaceProductTags,
// toggleProductOutOfStock,
// updateSlotProducts,
// getSlotProductIds,
// getSlotsProductIds,
// getAllUnits,
// getAllProductTags,
// getAllProductTagInfos,
// getProductTagInfoById,
// createProductTag,
// getProductTagById,
// updateProductTag,
// deleteProductTag,
// checkProductTagExistsByName,
// getProductReviews,
// respondToReview,
// getAllProductGroups,
// createProductGroup,
// updateProductGroup,
// deleteProductGroup,
// addProductToGroup,
// removeProductFromGroup,
// updateProductPrices,
// // Admin - Slots
// getActiveSlotsWithProducts,
// getActiveSlots,
// getSlotsAfterDate,
// getSlotByIdWithRelations,
// createSlotWithRelations,
// updateSlotWithRelations,
// deleteSlotById,
// updateSlotCapacity,
// getSlotDeliverySequence,
// updateSlotDeliverySequence,
// // Admin - Staff User
// getStaffUserByName,
// getStaffUserById,
// getAllStaff,
// getAllUsers,
// getUserWithDetails,
// updateUserSuspensionStatus,
// checkStaffUserExists,
// checkStaffRoleExists,
// createStaffUser,
// getAllRoles,
// // Admin - Store
// getAllStores,
// getStoreById,
// createStore,
// updateStore,
// deleteStore,
// // Admin - User
// createUserByMobile,
// getUserByMobile,
// getUnresolvedComplaintsCount,
// getAllUsersWithFilters,
// getOrderCountsByUserIds,
// getLastOrdersByUserIds,
// getSuspensionStatusesByUserIds,
// getUserBasicInfo,
// getUserSuspensionStatus,
// getUserOrders,
// getOrderStatusesByOrderIds,
// getItemCountsByOrderIds,
// upsertUserSuspension,
// searchUsers,
// getAllNotifCreds,
// getAllUnloggedTokens,
// getNotifTokensByUserIds,
// getUserIncidentsWithRelations,
// createUserIncident,
// // Admin - Vendor Snippets
// checkVendorSnippetExists,
// getVendorSnippetById,
// getVendorSnippetByCode,
// getAllVendorSnippets,
// createVendorSnippet,
// updateVendorSnippet,
// deleteVendorSnippet,
// getProductsByIds,
// getVendorSlotById,
// getVendorOrdersBySlotId,
// getOrderItemsByOrderIds,
// getOrderStatusByOrderIds,
// updateVendorOrderItemPackaging,
// getVendorOrders,
// // User - Address
// getUserDefaultAddress,
// getUserAddresses,
// getUserAddressById,
// clearUserDefaultAddress,
// createUserAddress,
// updateUserAddress,
// deleteUserAddress,
// hasOngoingOrdersForAddress,
// // User - Banners
// getUserActiveBanners,
// // User - Cart
// getUserCartItemsWithProducts,
// getUserProductById,
// getUserCartItemByUserProduct,
// incrementUserCartItemQuantity,
// insertUserCartItem,
// updateUserCartItemQuantity,
// deleteUserCartItem,
// clearUserCart,
// // User - Complaint
// getUserComplaints,
// createUserComplaint,
// // User - Stores
// getUserStoreSummaries,
// getUserStoreDetail,
// // User - Product
// getUserProductDetailById,
// getUserProductReviews,
// getUserProductByIdBasic,
// createUserProductReview,
// getAllProductsWithUnits,
// type ProductSummaryData,
// // User - Slots
// getUserActiveSlotsList,
// getUserProductAvailability,
// // User - Payments
// getUserPaymentOrderById,
// getUserPaymentByOrderId,
// getUserPaymentByMerchantOrderId,
// updateUserPaymentSuccess,
// updateUserOrderPaymentStatus,
// markUserPaymentFailed,
// // User - Auth
// getUserAuthByEmail,
// getUserAuthByMobile,
// getUserAuthById,
// getUserAuthCreds,
// getUserAuthDetails,
// isUserSuspended,
// createUserAuthWithCreds,
// createUserAuthWithMobile,
// upsertUserAuthPassword,
// deleteUserAuthAccount,
// // UV API helpers
// createUserWithProfile,
// getUserDetailsByUserId,
// updateUserProfile,
// // User - Coupon
// getUserActiveCouponsWithRelations,
// getUserAllCouponsWithRelations,
// getUserReservedCouponByCode,
// redeemUserReservedCoupon,
// // User - Profile
// getUserProfileById,
// getUserProfileDetailById,
// getUserWithCreds,
// getUserNotifCred,
// upsertUserNotifCred,
// deleteUserUnloggedToken,
// getUserUnloggedToken,
// upsertUserUnloggedToken,
// // User - Order
// validateAndGetUserCoupon,
// applyDiscountToUserOrder,
// getUserAddressByIdAndUser,
// getOrderProductById,
// checkUserSuspended,
// getUserSlotCapacityStatus,
// placeUserOrderTransaction,
// deleteUserCartItemsForOrder,
// recordUserCouponUsage,
// getUserOrdersWithRelations,
// getUserOrderCount,
// getUserOrderByIdWithRelations,
// getUserCouponUsageForOrder,
// getUserOrderBasic,
// cancelUserOrderTransaction,
// updateUserOrderNotes,
// getUserRecentlyDeliveredOrderIds,
// getUserProductIdsFromOrders,
// getUserProductsForRecentOrders,
// // Store Helpers
// getAllBannersForCache,
// getAllProductsForCache,
// getAllStoresForCache,
// getAllDeliverySlotsForCache,
// getAllSpecialDealsForCache,
// getAllProductTagsForCache,
// getAllTagsForCache,
// getAllTagProductMappings,
// getAllSlotsWithProductsForCache,
// getAllUserNegativityScores,
// getUserNegativityScore,
// type BannerData,
// type ProductBasicData,
// type StoreBasicData,
// type DeliverySlotData,
// type SpecialDealData,
// type ProductTagData,
// type TagBasicData,
// type TagProductMapping,
// type SlotWithProductsData,
// type UserNegativityData,
// // Automated Jobs
// toggleFlashDeliveryForItems,
// toggleKeyVal,
// getAllKeyValStore,
// // Post-order handler helpers
// getOrdersByIdsWithFullData,
// getOrderByIdWithFullData,
// type OrderWithFullData,
// type OrderWithCancellationData,
// // Common API helpers
// getSuspendedProductIds,
// getNextDeliveryDateWithCapacity,
// getStoresSummary,
// healthCheck,
// // Delete orders helper
// deleteOrdersWithRelations,
// // Seed helpers
// seedUnits,
// seedStaffRoles,
// seedStaffPermissions,
// seedRolePermissions,
// seedKeyValStore,
// type UnitSeedData,
// type RolePermissionAssignment,
// type KeyValSeedData,
// type StaffRoleName,
// type StaffPermissionName,
// // Upload URL Helpers
// createUploadUrlStatus,
// claimUploadUrlStatus,
// } from 'postgresService'