Update import paths across various modules to include the '.js' extension for consistency and improved clarity. This change enhances maintainability and aligns with the updated module structure throughout the application.
This commit is contained in:
parent
12299b5b44
commit
5eebd11668
@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@customer-portal/bff",
|
"name": "@customer-portal/bff",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
|
"type": "module",
|
||||||
"description": "Backend for Frontend API",
|
"description": "Backend for Frontend API",
|
||||||
"author": "",
|
"author": "",
|
||||||
"private": true,
|
"private": true,
|
||||||
|
|||||||
@ -31,8 +31,9 @@
|
|||||||
},
|
},
|
||||||
"ts-node": {
|
"ts-node": {
|
||||||
"transpileOnly": true,
|
"transpileOnly": true,
|
||||||
|
"esm": true,
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"module": "CommonJS"
|
"module": "Node16"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"include": ["src/**/*", "scripts/**/*", "src/types/**/*"],
|
"include": ["src/**/*", "scripts/**/*", "src/types/**/*"],
|
||||||
|
|||||||
@ -12,8 +12,8 @@
|
|||||||
|
|
||||||
import { z } from "zod";
|
import { z } from "zod";
|
||||||
|
|
||||||
import { emailSchema, nameSchema, passwordSchema, phoneSchema } from "../common/schema";
|
import { emailSchema, nameSchema, passwordSchema, phoneSchema } from "../common/schema.js";
|
||||||
import { addressSchema, userSchema } from "../customer/schema";
|
import { addressSchema, userSchema } from "../customer/schema.js";
|
||||||
|
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
// Authentication Request Schemas
|
// Authentication Request Schemas
|
||||||
|
|||||||
@ -4,8 +4,8 @@
|
|||||||
* Transforms raw WHMCS invoice data into normalized billing domain types.
|
* Transforms raw WHMCS invoice data into normalized billing domain types.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import type { Invoice, InvoiceItem } from "../../contract";
|
import type { Invoice, InvoiceItem } from "../../contract.js";
|
||||||
import { invoiceSchema } from "../../schema";
|
import { invoiceSchema } from "../../schema.js";
|
||||||
import {
|
import {
|
||||||
type WhmcsInvoiceRaw,
|
type WhmcsInvoiceRaw,
|
||||||
whmcsInvoiceRawSchema,
|
whmcsInvoiceRawSchema,
|
||||||
|
|||||||
@ -13,7 +13,7 @@ import type {
|
|||||||
SimCatalogProduct,
|
SimCatalogProduct,
|
||||||
SimActivationFeeCatalogItem,
|
SimActivationFeeCatalogItem,
|
||||||
VpnCatalogProduct,
|
VpnCatalogProduct,
|
||||||
} from "../../contract";
|
} from "../../contract.js";
|
||||||
import type {
|
import type {
|
||||||
SalesforceProduct2WithPricebookEntries,
|
SalesforceProduct2WithPricebookEntries,
|
||||||
SalesforcePricebookEntryRecord,
|
SalesforcePricebookEntryRecord,
|
||||||
|
|||||||
@ -4,9 +4,9 @@
|
|||||||
* Maps Prisma user data to UserAuth domain type using schema validation
|
* Maps Prisma user data to UserAuth domain type using schema validation
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { userAuthSchema } from "../../schema";
|
import { userAuthSchema } from "../../schema.js";
|
||||||
import type { PrismaUserRaw } from "./types.js";
|
import type { PrismaUserRaw } from "./types.js";
|
||||||
import type { UserAuth } from "../../schema";
|
import type { UserAuth } from "../../schema.js";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Maps raw Prisma user data to UserAuth domain type
|
* Maps raw Prisma user data to UserAuth domain type
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
* Domain doesn't depend on @prisma/client directly.
|
* Domain doesn't depend on @prisma/client directly.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import type { UserRole } from "../../schema";
|
import type { UserRole } from "../../schema.js";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Raw Prisma user data from portal database
|
* Raw Prisma user data from portal database
|
||||||
|
|||||||
@ -7,8 +7,8 @@
|
|||||||
|
|
||||||
import { z } from "zod";
|
import { z } from "zod";
|
||||||
|
|
||||||
import type { WhmcsClient, Address } from "../../schema";
|
import type { WhmcsClient, Address } from "../../schema.js";
|
||||||
import { whmcsClientSchema, addressSchema } from "../../schema";
|
import { whmcsClientSchema, addressSchema } from "../../schema.js";
|
||||||
import {
|
import {
|
||||||
whmcsClientSchema as whmcsRawClientSchema,
|
whmcsClientSchema as whmcsRawClientSchema,
|
||||||
whmcsClientResponseSchema,
|
whmcsClientResponseSchema,
|
||||||
|
|||||||
@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
import { z } from "zod";
|
import { z } from "zod";
|
||||||
|
|
||||||
import { countryCodeSchema } from "../common/schema";
|
import { countryCodeSchema } from "../common/schema.js";
|
||||||
|
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
// Helper Schemas
|
// Helper Schemas
|
||||||
|
|||||||
@ -4,8 +4,8 @@
|
|||||||
* Shared types for dashboard summaries, activity feeds, and related data.
|
* Shared types for dashboard summaries, activity feeds, and related data.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import type { IsoDateTimeString } from "../common/types";
|
import type { IsoDateTimeString } from "../common/types.js";
|
||||||
import type { Invoice } from "../billing/contract";
|
import type { Invoice } from "../billing/contract.js";
|
||||||
|
|
||||||
export type ActivityType =
|
export type ActivityType =
|
||||||
| "invoice_created"
|
| "invoice_created"
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
* Normalized types for mapping portal users to external systems.
|
* Normalized types for mapping portal users to external systems.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import type { IsoDateTimeString } from "../common/types";
|
import type { IsoDateTimeString } from "../common/types.js";
|
||||||
|
|
||||||
export interface UserIdMapping {
|
export interface UserIdMapping {
|
||||||
id: string;
|
id: string;
|
||||||
|
|||||||
@ -5,9 +5,9 @@
|
|||||||
* Validated types are derived from schemas (see schema.ts).
|
* Validated types are derived from schemas (see schema.ts).
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import type { SalesforceProductFieldMap } from "../catalog/contract";
|
import type { SalesforceProductFieldMap } from "../catalog/contract.js";
|
||||||
import type { SalesforceAccountFieldMap } from "../customer";
|
import type { SalesforceAccountFieldMap } from "../customer/index.js";
|
||||||
import type { UserIdMapping } from "../mappings/contract";
|
import type { UserIdMapping } from "../mappings/contract.js";
|
||||||
|
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
// Order Type Constants
|
// Order Type Constants
|
||||||
|
|||||||
@ -9,8 +9,8 @@ import type {
|
|||||||
OrderItemDetails,
|
OrderItemDetails,
|
||||||
OrderItemSummary,
|
OrderItemSummary,
|
||||||
OrderSummary,
|
OrderSummary,
|
||||||
} from "../../contract";
|
} from "../../contract.js";
|
||||||
import { orderDetailsSchema, orderSummarySchema, orderItemDetailsSchema } from "../../schema";
|
import { orderDetailsSchema, orderSummarySchema, orderItemDetailsSchema } from "../../schema.js";
|
||||||
import type {
|
import type {
|
||||||
SalesforceOrderItemRecord,
|
SalesforceOrderItemRecord,
|
||||||
SalesforceOrderRecord,
|
SalesforceOrderRecord,
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
* Transforms normalized order data to WHMCS API format.
|
* Transforms normalized order data to WHMCS API format.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import type { OrderDetails, OrderItemDetails } from "../../contract";
|
import type { OrderDetails, OrderItemDetails } from "../../contract.js";
|
||||||
import {
|
import {
|
||||||
type WhmcsOrderItem,
|
type WhmcsOrderItem,
|
||||||
type WhmcsAddOrderParams,
|
type WhmcsAddOrderParams,
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@customer-portal/domain",
|
"name": "@customer-portal/domain",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
|
"type": "module",
|
||||||
"description": "Unified domain layer with contracts, schemas, and provider mappers",
|
"description": "Unified domain layer with contracts, schemas, and provider mappers",
|
||||||
"main": "./dist/index.js",
|
"main": "./dist/index.js",
|
||||||
"types": "./dist/index.d.ts",
|
"types": "./dist/index.d.ts",
|
||||||
|
|||||||
@ -2,8 +2,8 @@
|
|||||||
* WHMCS Payments Provider - Mapper
|
* WHMCS Payments Provider - Mapper
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import type { PaymentMethod, PaymentGateway } from "../../contract";
|
import type { PaymentMethod, PaymentGateway } from "../../contract.js";
|
||||||
import { paymentMethodSchema, paymentGatewaySchema } from "../../schema";
|
import { paymentMethodSchema, paymentGatewaySchema } from "../../schema.js";
|
||||||
import {
|
import {
|
||||||
type WhmcsPaymentMethodRaw,
|
type WhmcsPaymentMethodRaw,
|
||||||
type WhmcsPaymentGatewayRaw,
|
type WhmcsPaymentGatewayRaw,
|
||||||
|
|||||||
@ -2,8 +2,8 @@
|
|||||||
* Freebit SIM Provider - Mapper
|
* Freebit SIM Provider - Mapper
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import type { SimDetails, SimUsage, SimTopUpHistory, SimType, SimStatus } from "../../contract";
|
import type { SimDetails, SimUsage, SimTopUpHistory, SimType, SimStatus } from "../../contract.js";
|
||||||
import { simDetailsSchema, simUsageSchema, simTopUpHistorySchema } from "../../schema";
|
import { simDetailsSchema, simUsageSchema, simTopUpHistorySchema } from "../../schema.js";
|
||||||
import {
|
import {
|
||||||
type FreebitAccountDetailsRaw,
|
type FreebitAccountDetailsRaw,
|
||||||
type FreebitTrafficInfoRaw,
|
type FreebitTrafficInfoRaw,
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
* These functions contain no infrastructure dependencies.
|
* These functions contain no infrastructure dependencies.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import type { Subscription } from "../subscriptions/schema";
|
import type { Subscription } from "../subscriptions/schema.js";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if a subscription is a SIM service
|
* Check if a subscription is a SIM service
|
||||||
|
|||||||
@ -4,8 +4,8 @@
|
|||||||
* Transforms raw WHMCS product/service data into normalized subscription types.
|
* Transforms raw WHMCS product/service data into normalized subscription types.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import type { Subscription, SubscriptionStatus, SubscriptionCycle } from "../../contract";
|
import type { Subscription, SubscriptionStatus, SubscriptionCycle } from "../../contract.js";
|
||||||
import { subscriptionSchema } from "../../schema";
|
import { subscriptionSchema } from "../../schema.js";
|
||||||
import {
|
import {
|
||||||
type WhmcsProductRaw,
|
type WhmcsProductRaw,
|
||||||
whmcsProductRawSchema,
|
whmcsProductRawSchema,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user