Update TypeScript configurations and improve module imports

- Changed TypeScript target and library settings in tsconfig files to align with ESNext standards.
- Updated pnpm version in GitHub workflows for better dependency management.
- Modified Dockerfile to reflect the updated pnpm version.
- Adjusted import statements across various domain modules to include file extensions for consistency and compatibility.
- Cleaned up TypeScript configuration files for improved clarity and organization.
This commit is contained in:
barsa 2025-12-10 15:22:10 +09:00
parent 89b495db1a
commit f68fb50638
85 changed files with 269 additions and 270 deletions

View File

@ -24,7 +24,7 @@ jobs:
- name: Setup pnpm - name: Setup pnpm
uses: pnpm/action-setup@v4 uses: pnpm/action-setup@v4
with: with:
version: 10.15.0 version: 10.25.0
- name: Setup Node.js - name: Setup Node.js
uses: actions/setup-node@v4 uses: actions/setup-node@v4

View File

@ -22,7 +22,7 @@ jobs:
- name: Setup pnpm - name: Setup pnpm
uses: pnpm/action-setup@v4 uses: pnpm/action-setup@v4
with: with:
version: 10.15.0 version: 10.25.0
- name: Setup Node.js - name: Setup Node.js
uses: actions/setup-node@v4 uses: actions/setup-node@v4

View File

@ -6,7 +6,7 @@
# ============================================================================= # =============================================================================
ARG NODE_VERSION=22 ARG NODE_VERSION=22
ARG PNPM_VERSION=10.15.0 ARG PNPM_VERSION=10.25.0
# ============================================================================= # =============================================================================
# Stage 1: Builder # Stage 1: Builder

View File

@ -2,7 +2,7 @@
"extends": "../../tsconfig.base.json", "extends": "../../tsconfig.base.json",
"compilerOptions": { "compilerOptions": {
"target": "ES2022", "target": "ES2022",
"lib": ["ES2024", "DOM", "DOM.Iterable"], "lib": ["ESNext", "DOM", "DOM.Iterable"],
"module": "ESNext", "module": "ESNext",
"moduleResolution": "Bundler", "moduleResolution": "Bundler",
"jsx": "preserve", "jsx": "preserve",

View File

@ -77,4 +77,4 @@ export type {
LinkWhmcsResponse, LinkWhmcsResponse,
// Error types // Error types
AuthError, AuthError,
} from './schema'; } from './schema.js';

View File

@ -1,6 +1,6 @@
import type { z } from "zod"; import type { z } from "zod";
import { signupRequestSchema } from "./schema"; import { signupRequestSchema } from "./schema.js";
type SignupRequestInput = z.input<typeof signupRequestSchema>; type SignupRequestInput = z.input<typeof signupRequestSchema>;

View File

@ -20,7 +20,7 @@ export {
type AuthErrorCode, type AuthErrorCode,
type TokenTypeValue, type TokenTypeValue,
type GenderValue, type GenderValue,
} from "./contract"; } from "./contract.js";
export type { export type {
// Request types // Request types
@ -48,7 +48,7 @@ export type {
LinkWhmcsResponse, LinkWhmcsResponse,
// Error types // Error types
AuthError, AuthError,
} from "./contract"; } from "./contract.js";
// ============================================================================ // ============================================================================
// Schemas (for validation) // Schemas (for validation)
@ -83,9 +83,9 @@ export {
ssoLinkResponseSchema, ssoLinkResponseSchema,
checkPasswordNeededResponseSchema, checkPasswordNeededResponseSchema,
linkWhmcsResponseSchema, linkWhmcsResponseSchema,
} from "./schema"; } from "./schema.js";
export { buildSignupRequest } from "./helpers"; export { buildSignupRequest } from "./helpers.js";
// ============================================================================ // ============================================================================
// Password Utilities // Password Utilities
@ -98,4 +98,4 @@ export {
MIGRATION_TRANSFER_ITEMS, MIGRATION_TRANSFER_ITEMS,
MIGRATION_STEPS, MIGRATION_STEPS,
type PasswordRequirementKey, type PasswordRequirementKey,
} from "./forms"; } from "./forms.js";

View File

@ -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

View File

@ -4,7 +4,7 @@
* Domain constants for billing validation and business rules. * Domain constants for billing validation and business rules.
*/ */
import type { WhmcsCurrency } from "./providers/whmcs/raw.types"; import type { WhmcsCurrency } from "./providers/whmcs/raw.types.js";
// ============================================================================ // ============================================================================
// Currency Defaults // Currency Defaults

View File

@ -35,5 +35,5 @@ export type {
BillingSummary, BillingSummary,
InvoiceQueryParams, InvoiceQueryParams,
InvoiceListQuery, InvoiceListQuery,
} from './schema'; } from './schema.js';

View File

@ -7,11 +7,11 @@
*/ */
// Constants // Constants
export { INVOICE_STATUS } from "./contract"; export { INVOICE_STATUS } from "./contract.js";
export * from "./constants"; export * from "./constants.js";
// Schemas (includes derived types) // Schemas (includes derived types)
export * from "./schema"; export * from "./schema.js";
// Re-export types for convenience // Re-export types for convenience
export type { export type {
@ -25,10 +25,10 @@ export type {
BillingSummary, BillingSummary,
InvoiceQueryParams, InvoiceQueryParams,
InvoiceListQuery, InvoiceListQuery,
} from './schema'; } from './schema.js';
// Provider adapters // Provider adapters
export * as Providers from "./providers/index"; export * as Providers from "./providers/index.js";
// Re-export provider raw types (request and response) // Re-export provider raw types (request and response)
export type { export type {
@ -45,4 +45,4 @@ export type {
WhmcsCapturePaymentResponse, WhmcsCapturePaymentResponse,
WhmcsCurrency, WhmcsCurrency,
WhmcsCurrenciesResponse, WhmcsCurrenciesResponse,
} from "./providers/whmcs/raw.types"; } from "./providers/whmcs/raw.types.js";

View File

@ -2,8 +2,8 @@
* Billing Domain - Providers * Billing Domain - Providers
*/ */
import * as WhmcsMapper from "./whmcs/mapper"; import * as WhmcsMapper from "./whmcs/mapper.js";
import * as WhmcsRaw from "./whmcs/raw.types"; import * as WhmcsRaw from "./whmcs/raw.types.js";
export const Whmcs = { export const Whmcs = {
...WhmcsMapper, ...WhmcsMapper,
@ -12,5 +12,5 @@ export const Whmcs = {
}; };
export { WhmcsMapper, WhmcsRaw }; export { WhmcsMapper, WhmcsRaw };
export * from "./whmcs/mapper"; export * from "./whmcs/mapper.js";
export * from "./whmcs/raw.types"; export * from "./whmcs/raw.types.js";

View File

@ -1,2 +1,2 @@
export * from "./mapper"; export * from "./mapper.js";
export * from "./raw.types"; export * from "./raw.types.js";

View File

@ -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,8 +13,8 @@ import {
whmcsInvoiceListItemSchema, whmcsInvoiceListItemSchema,
type WhmcsInvoiceItemsRaw, type WhmcsInvoiceItemsRaw,
whmcsInvoiceItemsRawSchema, whmcsInvoiceItemsRawSchema,
} from "./raw.types"; } from "./raw.types.js";
import { parseAmount, formatDate } from "../../../providers/whmcs/utils"; import { parseAmount, formatDate } from "../../../providers/whmcs/utils.js";
export interface TransformInvoiceOptions { export interface TransformInvoiceOptions {
defaultCurrencyCode?: string; defaultCurrencyCode?: string;

View File

@ -91,4 +91,4 @@ export type {
VpnCatalogProduct, VpnCatalogProduct,
// Union type // Union type
CatalogProduct, CatalogProduct,
} from './schema'; } from './schema.js';

View File

@ -12,10 +12,10 @@ export {
type PricingTier, type PricingTier,
type CatalogFilter, type CatalogFilter,
type CatalogPriceInfo, type CatalogPriceInfo,
} from "./contract"; } from "./contract.js";
// Schemas (includes derived types) // Schemas (includes derived types)
export * from "./schema"; export * from "./schema.js";
// Re-export types for convenience // Re-export types for convenience
export type { export type {
@ -34,23 +34,23 @@ export type {
VpnCatalogProduct, VpnCatalogProduct,
// Union type // Union type
CatalogProduct, CatalogProduct,
} from './schema'; } from './schema.js';
// Provider adapters // Provider adapters
export * as Providers from "./providers/index"; export * as Providers from "./providers/index.js";
// Re-export provider raw types for convenience // Re-export provider raw types for convenience
export * from "./providers/salesforce/raw.types"; export * from "./providers/salesforce/raw.types.js";
// Re-export WHMCS provider types // Re-export WHMCS provider types
export type { export type {
WhmcsCatalogProduct, WhmcsCatalogProduct,
WhmcsCatalogProductListResponse, WhmcsCatalogProductListResponse,
} from "./providers/whmcs/raw.types"; } from "./providers/whmcs/raw.types.js";
export type { export type {
WhmcsCatalogProductNormalized, WhmcsCatalogProductNormalized,
WhmcsCatalogPricing, WhmcsCatalogPricing,
} from "./providers/whmcs/mapper"; } from "./providers/whmcs/mapper.js";
// Utilities // Utilities
export * from "./utils"; export * from "./utils.js";

View File

@ -2,10 +2,10 @@
* Catalog Domain - Providers * Catalog Domain - Providers
*/ */
import * as SalesforceMapper from "./salesforce/mapper"; import * as SalesforceMapper from "./salesforce/mapper.js";
import * as SalesforceRaw from "./salesforce/raw.types"; import * as SalesforceRaw from "./salesforce/raw.types.js";
import * as WhmcsMapper from "./whmcs/mapper"; import * as WhmcsMapper from "./whmcs/mapper.js";
import * as WhmcsRaw from "./whmcs/raw.types"; import * as WhmcsRaw from "./whmcs/raw.types.js";
export const Salesforce = { export const Salesforce = {
...SalesforceMapper, ...SalesforceMapper,
@ -19,7 +19,7 @@ export const Whmcs = {
}; };
export { SalesforceMapper, SalesforceRaw, WhmcsMapper, WhmcsRaw }; export { SalesforceMapper, SalesforceRaw, WhmcsMapper, WhmcsRaw };
export * from "./salesforce/mapper"; export * from "./salesforce/mapper.js";
export * from "./salesforce/raw.types"; export * from "./salesforce/raw.types.js";
export * from "./whmcs/mapper"; export * from "./whmcs/mapper.js";
export * from "./whmcs/raw.types"; export * from "./whmcs/raw.types.js";

View File

@ -1,2 +1,2 @@
export * from "./mapper"; export * from "./mapper.js";
export * from "./raw.types"; export * from "./raw.types.js";

View File

@ -12,16 +12,16 @@ import type {
SimCatalogProduct, SimCatalogProduct,
SimActivationFeeCatalogItem, SimActivationFeeCatalogItem,
VpnCatalogProduct, VpnCatalogProduct,
} from "../../contract"; } from "../../contract.js";
import type { import type {
SalesforceProduct2WithPricebookEntries, SalesforceProduct2WithPricebookEntries,
SalesforcePricebookEntryRecord, SalesforcePricebookEntryRecord,
} from "./raw.types"; } from "./raw.types.js";
import { import {
enrichInternetPlanMetadata, enrichInternetPlanMetadata,
inferAddonTypeFromSku, inferAddonTypeFromSku,
inferInstallationTermFromSku, inferInstallationTermFromSku,
} from "../../utils"; } from "../../utils.js";
// ============================================================================ // ============================================================================
// Tier Templates (Hardcoded Product Metadata) // Tier Templates (Hardcoded Product Metadata)

View File

@ -1,2 +1,2 @@
export * from "./raw.types"; export * from "./raw.types.js";

View File

@ -1,8 +1,8 @@
import { parseAmount } from "../../../providers/whmcs/utils"; import { parseAmount } from "../../../providers/whmcs/utils.js";
import { import {
whmcsCatalogProductListResponseSchema, whmcsCatalogProductListResponseSchema,
type WhmcsCatalogProductListResponse, type WhmcsCatalogProductListResponse,
} from "./raw.types"; } from "./raw.types.js";
export interface WhmcsCatalogPricing { export interface WhmcsCatalogPricing {
currency: string; currency: string;

View File

@ -9,8 +9,8 @@ import {
type VpnCatalogCollection, type VpnCatalogCollection,
type InternetPlanTemplate, type InternetPlanTemplate,
type CatalogProductBase, type CatalogProductBase,
} from "./schema"; } from "./schema.js";
import type { CatalogPriceInfo } from "./contract"; import type { CatalogPriceInfo } from "./contract.js";
/** /**
* Empty catalog defaults shared by portal and BFF. * Empty catalog defaults shared by portal and BFF.

View File

@ -4,15 +4,15 @@
* Shared types and utilities used across all domains. * Shared types and utilities used across all domains.
*/ */
export * from "./types"; export * from "./types.js";
export * from "./schema"; export * from "./schema.js";
export * from "./validation"; export * from "./validation.js";
export * from "./errors"; export * from "./errors.js";
// Common provider types (generic wrappers used across domains) // Common provider types (generic wrappers used across domains)
export * as CommonProviders from "./providers/index"; export * as CommonProviders from "./providers/index.js";
// Re-export provider types for convenience // Re-export provider types for convenience
export type { WhmcsResponse, WhmcsErrorResponse } from "./providers/whmcs"; export type { WhmcsResponse, WhmcsErrorResponse } from "./providers/whmcs.js";
export type { SalesforceResponse } from "./providers/salesforce"; export type { SalesforceResponse } from "./providers/salesforce.js";

View File

@ -4,5 +4,5 @@
* Generic provider-specific response structures used across multiple domains. * Generic provider-specific response structures used across multiple domains.
*/ */
export * as Whmcs from "./whmcs"; export * as Whmcs from "./whmcs.js";
export * as Salesforce from "./salesforce/index"; export * as Salesforce from "./salesforce/index.js";

View File

@ -1,2 +1,2 @@
export * from "./raw.types"; export * from "./raw.types.js";

View File

@ -52,4 +52,4 @@ export type {
UserRole, UserRole,
Address, Address,
AddressFormData, AddressFormData,
} from './schema'; } from './schema.js';

View File

@ -15,7 +15,7 @@
// Constants // Constants
// ============================================================================ // ============================================================================
export { USER_ROLE, type UserRoleValue } from "./contract"; export { USER_ROLE, type UserRoleValue } from "./contract.js";
// ============================================================================ // ============================================================================
// Domain Types (Clean Names - Public API) // Domain Types (Clean Names - Public API)
@ -32,7 +32,7 @@ export type {
UserProfile, // Alias for User UserProfile, // Alias for User
AuthenticatedUser, // Alias for authenticated user AuthenticatedUser, // Alias for authenticated user
WhmcsClient, // Provider-normalized WHMCS client shape WhmcsClient, // Provider-normalized WHMCS client shape
} from "./schema"; } from "./schema.js";
// ============================================================================ // ============================================================================
// Schemas // Schemas
@ -50,7 +50,7 @@ export {
combineToUser, // Domain helper: UserAuth + WhmcsClient → User combineToUser, // Domain helper: UserAuth + WhmcsClient → User
addressFormToRequest, addressFormToRequest,
profileFormToRequest, profileFormToRequest,
} from "./schema"; } from "./schema.js";
// ============================================================================ // ============================================================================
// Provider Namespace // Provider Namespace
@ -64,7 +64,7 @@ export {
* - Providers.Whmcs.transformWhmcsClientResponse() * - Providers.Whmcs.transformWhmcsClientResponse()
* - Providers.Portal.mapPrismaUserToUserAuth() * - Providers.Portal.mapPrismaUserToUserAuth()
*/ */
export * as Providers from "./providers/index"; export * as Providers from "./providers/index.js";
// ============================================================================ // ============================================================================
// Provider Raw Response Types (Selective Exports) // Provider Raw Response Types (Selective Exports)
@ -84,7 +84,7 @@ export type {
WhmcsAddClientResponse, WhmcsAddClientResponse,
WhmcsValidateLoginResponse, WhmcsValidateLoginResponse,
WhmcsSsoResponse, WhmcsSsoResponse,
} from "./providers/whmcs/raw.types"; } from "./providers/whmcs/raw.types.js";
// ============================================================================ // ============================================================================
// Provider-Specific Types (For Integrations) // Provider-Specific Types (For Integrations)
@ -97,4 +97,4 @@ export type {
export type { export type {
SalesforceAccountFieldMap, SalesforceAccountFieldMap,
SalesforceAccountRecord, SalesforceAccountRecord,
} from "./contract"; } from "./contract.js";

View File

@ -6,5 +6,5 @@
* - Whmcs: WHMCS API WhmcsClient * - Whmcs: WHMCS API WhmcsClient
*/ */
export * as Portal from "./portal/index"; export * as Portal from "./portal/index.js";
export * as Whmcs from "./whmcs/index"; export * as Whmcs from "./whmcs/index.js";

View File

@ -4,6 +4,6 @@
* Handles mapping from Prisma (portal database) to UserAuth domain type * Handles mapping from Prisma (portal database) to UserAuth domain type
*/ */
export * from "./mapper"; export * from "./mapper.js";
export * from "./types"; export * from "./types.js";

View File

@ -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"; 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

View File

@ -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

View File

@ -5,9 +5,9 @@
* Exports transformation functions and raw API types (request/response). * Exports transformation functions and raw API types (request/response).
*/ */
export * from "./mapper"; export * from "./mapper.js";
export * from "./raw.types"; export * from "./raw.types.js";
export { getCustomFieldValue, getCustomFieldsMap } from "../../../providers/whmcs/utils"; export { getCustomFieldValue, getCustomFieldsMap } from "../../../providers/whmcs/utils.js";
// Re-export domain types for provider namespace convenience // Re-export domain types for provider namespace convenience
export type { WhmcsClient, EmailPreferences, SubUser, Stats } from "../../schema"; export type { WhmcsClient, EmailPreferences, SubUser, Stats } from "../../schema.js";

View File

@ -7,14 +7,14 @@
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,
type WhmcsClient as WhmcsRawClient, type WhmcsClient as WhmcsRawClient,
type WhmcsClientResponse, type WhmcsClientResponse,
} from "./raw.types"; } from "./raw.types.js";
/** /**
* Parse and validate WHMCS client response * Parse and validate WHMCS client response

View File

@ -12,8 +12,8 @@
import { z } from "zod"; import { z } from "zod";
import { countryCodeSchema } from "../common/schema"; import { countryCodeSchema } from "../common/schema.js";
import { whmcsClientSchema as whmcsRawClientSchema, whmcsCustomFieldSchema } from "./providers/whmcs/raw.types"; import { whmcsClientSchema as whmcsRawClientSchema, whmcsCustomFieldSchema } from "./providers/whmcs/raw.types.js";
// ============================================================================ // ============================================================================
// Helper Schemas // Helper Schemas

View File

@ -9,7 +9,7 @@ import {
activityFilterSchema, activityFilterSchema,
activityFilterConfigSchema, activityFilterConfigSchema,
dashboardSummaryResponseSchema, dashboardSummaryResponseSchema,
} from "./schema"; } from "./schema.js";
export type ActivityType = z.infer<typeof activityTypeSchema>; export type ActivityType = z.infer<typeof activityTypeSchema>;
export type Activity = z.infer<typeof activitySchema>; export type Activity = z.infer<typeof activitySchema>;

View File

@ -2,6 +2,6 @@
* Dashboard Domain * Dashboard Domain
*/ */
export * from "./contract"; export * from "./contract.js";
export * from "./schema"; export * from "./schema.js";
export * from "./utils"; export * from "./utils.js";

View File

@ -1,5 +1,5 @@
import { z } from "zod"; import { z } from "zod";
import { invoiceSchema } from "../billing/schema"; import { invoiceSchema } from "../billing/schema.js";
export const activityTypeSchema = z.enum([ export const activityTypeSchema = z.enum([
"invoice_created", "invoice_created",

View File

@ -3,7 +3,7 @@
* Business logic for dashboard activities and task generation * Business logic for dashboard activities and task generation
*/ */
import type { Activity, ActivityFilter, ActivityFilterConfig, ActivityType } from "./contract"; import type { Activity, ActivityFilter, ActivityFilterConfig, ActivityType } from "./contract.js";
/** /**
* Activity filter configurations * Activity filter configurations

View File

@ -4,16 +4,16 @@
*/ */
// Re-export domain modules // Re-export domain modules
export * as Billing from "./billing/index"; export * as Billing from "./billing/index.js";
export * as Subscriptions from "./subscriptions/index"; export * as Subscriptions from "./subscriptions/index.js";
export * as Payments from "./payments/index"; export * as Payments from "./payments/index.js";
export * as Sim from "./sim/index"; export * as Sim from "./sim/index.js";
export * as Support from "./support/index"; export * as Support from "./support/index.js";
export * as Orders from "./orders/index"; export * as Orders from "./orders/index.js";
export * as Catalog from "./catalog/index"; export * as Catalog from "./catalog/index.js";
export * as Common from "./common/index"; export * as Common from "./common/index.js";
export * as Toolkit from "./toolkit/index"; export * as Toolkit from "./toolkit/index.js";
export * as Auth from "./auth/index"; export * as Auth from "./auth/index.js";
export * as Customer from "./customer/index"; export * as Customer from "./customer/index.js";
export * as Mappings from "./mappings/index"; export * as Mappings from "./mappings/index.js";
export * as Dashboard from "./dashboard/index"; export * as Dashboard from "./dashboard/index.js";

View File

@ -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;

View File

@ -2,9 +2,9 @@
* ID Mapping Domain * ID Mapping Domain
*/ */
export * from "./contract"; export * from "./contract.js";
export * from "./schema"; export * from "./schema.js";
export * from "./validation"; export * from "./validation.js";
// Re-export types for convenience // Re-export types for convenience
export type { export type {
@ -12,5 +12,5 @@ export type {
MappingStats, MappingStats,
BulkMappingOperation, BulkMappingOperation,
BulkMappingResult, BulkMappingResult,
} from "./schema"; } from "./schema.js";
export type { MappingValidationResult } from "./contract"; export type { MappingValidationResult } from "./contract.js";

View File

@ -7,7 +7,7 @@ import type {
CreateMappingRequest, CreateMappingRequest,
UpdateMappingRequest, UpdateMappingRequest,
UserIdMapping, UserIdMapping,
} from "./contract"; } from "./contract.js";
export const createMappingRequestSchema: z.ZodType<CreateMappingRequest> = z.object({ export const createMappingRequestSchema: z.ZodType<CreateMappingRequest> = z.object({
userId: z.string().uuid(), userId: z.string().uuid(),

View File

@ -10,13 +10,13 @@ import {
createMappingRequestSchema, createMappingRequestSchema,
updateMappingRequestSchema, updateMappingRequestSchema,
userIdMappingSchema, userIdMappingSchema,
} from "./schema"; } from "./schema.js";
import type { import type {
CreateMappingRequest, CreateMappingRequest,
UpdateMappingRequest, UpdateMappingRequest,
UserIdMapping, UserIdMapping,
MappingValidationResult, MappingValidationResult,
} from "./contract"; } from "./contract.js";
/** /**
* Check if a mapping request has optional Salesforce account ID * Check if a mapping request has optional Salesforce account ID

View File

@ -5,11 +5,11 @@
* 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/index"; import type { SalesforceAccountFieldMap } from "../customer/index.js";
import type { UserIdMapping } from "../mappings/contract"; import type { UserIdMapping } from "../mappings/contract.js";
import type { SalesforceOrderRecord } from "./providers/salesforce/raw.types"; import type { SalesforceOrderRecord } from "./providers/salesforce/raw.types.js";
import type { OrderConfigurations } from "./schema"; import type { OrderConfigurations } from "./schema.js";
// ============================================================================ // ============================================================================
// Order Type Constants // Order Type Constants
@ -205,4 +205,4 @@ export type {
CreateOrderRequest, CreateOrderRequest,
OrderBusinessValidation, OrderBusinessValidation,
SfOrderIdParam, SfOrderIdParam,
} from './schema'; } from './schema.js';

View File

@ -8,11 +8,11 @@ import {
type OrderDisplayItemCategory, type OrderDisplayItemCategory,
type OrderDisplayItemCharge, type OrderDisplayItemCharge,
type OrderDisplayItemChargeKind, type OrderDisplayItemChargeKind,
} from "./schema"; } from "./schema.js";
import { ORDER_TYPE } from "./contract"; import { ORDER_TYPE } from "./contract.js";
import type { CheckoutTotals } from "./contract"; import type { CheckoutTotals } from "./contract.js";
import type { SimConfigureFormData } from "../sim"; import type { SimConfigureFormData } from "../sim/index.js";
import type { WhmcsOrderItem } from "./providers/whmcs/raw.types"; import type { WhmcsOrderItem } from "./providers/whmcs/raw.types.js";
export interface BuildSimOrderConfigurationsOptions { export interface BuildSimOrderConfigurationsOptions {
/** /**

View File

@ -30,17 +30,17 @@ export {
type AccessModeValue, type AccessModeValue,
ORDER_FULFILLMENT_ERROR_CODE, ORDER_FULFILLMENT_ERROR_CODE,
type OrderFulfillmentErrorCode, type OrderFulfillmentErrorCode,
} from "./contract"; } from "./contract.js";
// Schemas (includes derived types) // Schemas (includes derived types)
export * from "./schema"; export * from "./schema.js";
// Validation (extended business rules) // Validation (extended business rules)
export * from "./validation"; export * from "./validation.js";
// Utilities // Utilities
export * from "./utils"; export * from "./utils.js";
export * from "./events"; export * from "./events.js";
export { export {
buildSimOrderConfigurations, buildSimOrderConfigurations,
normalizeBillingCycle, normalizeBillingCycle,
@ -58,7 +58,7 @@ export {
getOrderServiceCategory, getOrderServiceCategory,
calculateOrderTotals, calculateOrderTotals,
formatScheduledDate, formatScheduledDate,
} from "./helpers"; } from "./helpers.js";
// Re-export types for convenience // Re-export types for convenience
export type { export type {
// Order item types // Order item types
@ -79,12 +79,12 @@ export type {
OrderDisplayItemCategory, OrderDisplayItemCategory,
OrderDisplayItemCharge, OrderDisplayItemCharge,
OrderDisplayItemChargeKind, OrderDisplayItemChargeKind,
} from './schema'; } from './schema.js';
// Provider adapters // Provider adapters
export * as Providers from "./providers/index"; export * as Providers from "./providers/index.js";
// Re-export provider types for convenience // Re-export provider types for convenience
export * from "./providers/whmcs/raw.types"; export * from "./providers/whmcs/raw.types.js";
export * from "./providers/salesforce/raw.types"; export * from "./providers/salesforce/raw.types.js";
export * from "./providers/salesforce/field-map"; export * from "./providers/salesforce/field-map.js";

View File

@ -2,11 +2,11 @@
* Orders Domain - Providers * Orders Domain - Providers
*/ */
import * as WhmcsMapper from "./whmcs/mapper"; import * as WhmcsMapper from "./whmcs/mapper.js";
import * as WhmcsRaw from "./whmcs/raw.types"; import * as WhmcsRaw from "./whmcs/raw.types.js";
import * as SalesforceFieldMap from "./salesforce/field-map"; import * as SalesforceFieldMap from "./salesforce/field-map.js";
import * as SalesforceMapper from "./salesforce/mapper"; import * as SalesforceMapper from "./salesforce/mapper.js";
import * as SalesforceRaw from "./salesforce/raw.types"; import * as SalesforceRaw from "./salesforce/raw.types.js";
export const Whmcs = { export const Whmcs = {
...WhmcsMapper, ...WhmcsMapper,
@ -27,8 +27,8 @@ export {
SalesforceMapper, SalesforceMapper,
SalesforceRaw, SalesforceRaw,
}; };
export * from "./whmcs/mapper"; export * from "./whmcs/mapper.js";
export * from "./whmcs/raw.types"; export * from "./whmcs/raw.types.js";
export * from "./salesforce/mapper"; export * from "./salesforce/mapper.js";
export * from "./salesforce/raw.types"; export * from "./salesforce/raw.types.js";
export * from "./salesforce/field-map"; export * from "./salesforce/field-map.js";

View File

@ -1,8 +1,8 @@
import type { SalesforceProduct2WithPricebookEntries } from "../../../catalog/providers/salesforce/raw.types"; import type { SalesforceProduct2WithPricebookEntries } from "../../../catalog/providers/salesforce/raw.types.js";
import type { import type {
SalesforceOrderItemRecord, SalesforceOrderItemRecord,
SalesforceOrderRecord, SalesforceOrderRecord,
} from "./raw.types"; } from "./raw.types.js";
export interface SalesforceOrderFieldMap { export interface SalesforceOrderFieldMap {
order: { order: {

View File

@ -1,2 +1,2 @@
export * from "./raw.types"; export * from "./raw.types.js";
export * from "./mapper"; export * from "./mapper.js";

View File

@ -9,21 +9,21 @@ import type {
OrderItemDetails, OrderItemDetails,
OrderItemSummary, OrderItemSummary,
OrderSummary, OrderSummary,
} from "../../contract"; } from "../../contract.js";
import { normalizeBillingCycle } from "../../helpers"; import { normalizeBillingCycle } from "../../helpers.js";
import { orderDetailsSchema, orderSummarySchema, orderItemDetailsSchema } from "../../schema"; import { orderDetailsSchema, orderSummarySchema, orderItemDetailsSchema } from "../../schema.js";
import type { import type {
SalesforceProduct2WithPricebookEntries, SalesforceProduct2WithPricebookEntries,
SalesforcePricebookEntryRecord, SalesforcePricebookEntryRecord,
} from "../../../catalog/providers/salesforce/raw.types"; } from "../../../catalog/providers/salesforce/raw.types.js";
import { import {
defaultSalesforceOrderFieldMap, defaultSalesforceOrderFieldMap,
type SalesforceOrderFieldMap, type SalesforceOrderFieldMap,
} from "./field-map"; } from "./field-map.js";
import type { import type {
SalesforceOrderItemRecord, SalesforceOrderItemRecord,
SalesforceOrderRecord, SalesforceOrderRecord,
} from "./raw.types"; } from "./raw.types.js";
/** /**
* Helper function to get sort priority for item class * Helper function to get sort priority for item class

View File

@ -1,2 +1,2 @@
export * from "./mapper"; export * from "./mapper.js";
export * from "./raw.types"; export * from "./raw.types.js";

View File

@ -4,13 +4,13 @@
* 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 { normalizeBillingCycle } from "../../helpers"; import { normalizeBillingCycle } from "../../helpers.js";
import { import {
type WhmcsOrderItem, type WhmcsOrderItem,
type WhmcsAddOrderParams, type WhmcsAddOrderParams,
type WhmcsAddOrderPayload, type WhmcsAddOrderPayload,
} from "./raw.types"; } from "./raw.types.js";
export interface OrderItemMappingResult { export interface OrderItemMappingResult {
whmcsItems: WhmcsOrderItem[]; whmcsItems: WhmcsOrderItem[];

View File

@ -5,7 +5,7 @@
*/ */
import { z } from "zod"; import { z } from "zod";
import { apiSuccessResponseSchema } from "../common"; import { apiSuccessResponseSchema } from "../common/index.js";
// ============================================================================ // ============================================================================
// Enum Value Arrays (for Zod schemas) // Enum Value Arrays (for Zod schemas)

View File

@ -4,8 +4,8 @@ import {
type OrderConfigurations, type OrderConfigurations,
type CreateOrderRequest, type CreateOrderRequest,
type OrderSelections, type OrderSelections,
} from "./schema"; } from "./schema.js";
import { ORDER_TYPE, type CheckoutCart, type OrderTypeValue } from "./contract"; import { ORDER_TYPE, type CheckoutCart, type OrderTypeValue } from "./contract.js";
export function buildOrderConfigurations(selections: OrderSelections): OrderConfigurations { export function buildOrderConfigurations(selections: OrderSelections): OrderConfigurations {
const normalizedSelections = orderSelectionsSchema.parse(selections); const normalizedSelections = orderSelectionsSchema.parse(selections);

View File

@ -6,7 +6,7 @@
*/ */
import { z } from "zod"; import { z } from "zod";
import { orderBusinessValidationSchema } from "./schema"; import { orderBusinessValidationSchema } from "./schema.js";
// ============================================================================ // ============================================================================
// SKU Business Rules Helpers // SKU Business Rules Helpers

View File

@ -53,4 +53,4 @@ export type {
PaymentGatewayType, PaymentGatewayType,
PaymentGateway, PaymentGateway,
PaymentGatewayList, PaymentGatewayList,
} from './schema'; } from './schema.js';

View File

@ -7,10 +7,10 @@
*/ */
// Constants // Constants
export { PAYMENT_METHOD_TYPE, PAYMENT_GATEWAY_TYPE, type InvoicePaymentLink } from "./contract"; export { PAYMENT_METHOD_TYPE, PAYMENT_GATEWAY_TYPE, type InvoicePaymentLink } from "./contract.js";
// Schemas (includes derived types) // Schemas (includes derived types)
export * from "./schema"; export * from "./schema.js";
// Re-export types for convenience // Re-export types for convenience
export type { export type {
@ -20,10 +20,10 @@ export type {
PaymentGatewayType, PaymentGatewayType,
PaymentGateway, PaymentGateway,
PaymentGatewayList, PaymentGatewayList,
} from './schema'; } from './schema.js';
// Provider adapters // Provider adapters
export * as Providers from "./providers/index"; export * as Providers from "./providers/index.js";
// Re-export provider raw types (request and response) // Re-export provider raw types (request and response)
export type { export type {
@ -34,4 +34,4 @@ export type {
WhmcsPaymentMethodListResponse, WhmcsPaymentMethodListResponse,
WhmcsPaymentGateway, WhmcsPaymentGateway,
WhmcsPaymentGatewayListResponse, WhmcsPaymentGatewayListResponse,
} from "./providers/whmcs/raw.types"; } from "./providers/whmcs/raw.types.js";

View File

@ -2,8 +2,8 @@
* Payments Domain - Providers * Payments Domain - Providers
*/ */
import * as WhmcsMapper from "./whmcs/mapper"; import * as WhmcsMapper from "./whmcs/mapper.js";
import * as WhmcsRaw from "./whmcs/raw.types"; import * as WhmcsRaw from "./whmcs/raw.types.js";
export const Whmcs = { export const Whmcs = {
...WhmcsMapper, ...WhmcsMapper,
@ -12,5 +12,5 @@ export const Whmcs = {
}; };
export { WhmcsMapper, WhmcsRaw }; export { WhmcsMapper, WhmcsRaw };
export * from "./whmcs/mapper"; export * from "./whmcs/mapper.js";
export * from "./whmcs/raw.types"; export * from "./whmcs/raw.types.js";

View File

@ -1,2 +1,2 @@
export * from "./mapper"; export * from "./mapper.js";
export * from "./raw.types"; export * from "./raw.types.js";

View File

@ -2,14 +2,14 @@
* 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,
whmcsPaymentMethodRawSchema, whmcsPaymentMethodRawSchema,
whmcsPaymentGatewayRawSchema, whmcsPaymentGatewayRawSchema,
} from "./raw.types"; } from "./raw.types.js";
const PAYMENT_TYPE_MAP: Record<string, PaymentMethod["type"]> = { const PAYMENT_TYPE_MAP: Record<string, PaymentMethod["type"]> = {
creditcard: "CreditCard", creditcard: "CreditCard",

View File

@ -3,5 +3,5 @@
* Re-exports shared provider utilities * Re-exports shared provider utilities
*/ */
export * as Whmcs from "./whmcs"; export * as Whmcs from "./whmcs/index.js";

View File

@ -3,5 +3,5 @@
* Re-exports shared WHMCS provider utilities * Re-exports shared WHMCS provider utilities
*/ */
export * from "./utils"; export * from "./utils.js";

View File

@ -64,4 +64,4 @@ export type {
SimOrderActivationRequest, SimOrderActivationRequest,
SimOrderActivationMnp, SimOrderActivationMnp,
SimOrderActivationAddons, SimOrderActivationAddons,
} from './schema'; } from './schema.js';

View File

@ -1,5 +1,5 @@
import { SIM_PLAN_CODES, SIM_PLAN_LABELS, SIM_STATUS } from "./contract"; import { SIM_PLAN_CODES, SIM_PLAN_LABELS, SIM_STATUS } from "./contract.js";
import type { SimStatus, SimFeaturesUpdateRequest } from "./schema"; import type { SimStatus, SimFeaturesUpdateRequest } from "./schema.js";
export function canManageActiveSim(status: SimStatus): boolean { export function canManageActiveSim(status: SimStatus): boolean {
return status === SIM_STATUS.ACTIVE; return status === SIM_STATUS.ACTIVE;

View File

@ -7,14 +7,14 @@
*/ */
// Constants // Constants
export { SIM_STATUS, SIM_TYPE, SIM_PLAN_CODES, SIM_PLAN_LABELS } from "./contract"; export { SIM_STATUS, SIM_TYPE, SIM_PLAN_CODES, SIM_PLAN_LABELS } from "./contract.js";
// Schemas (includes derived types) // Schemas (includes derived types)
export * from "./schema"; export * from "./schema.js";
export * from "./lifecycle"; export * from "./lifecycle.js";
// Validation functions // Validation functions
export * from "./validation"; export * from "./validation.js";
export { export {
canManageActiveSim, canManageActiveSim,
canReissueEsim, canReissueEsim,
@ -24,7 +24,7 @@ export {
SIM_PLAN_OPTIONS, SIM_PLAN_OPTIONS,
getSimPlanLabel, getSimPlanLabel,
buildSimFeaturesUpdatePayload, buildSimFeaturesUpdatePayload,
} from "./helpers"; } from "./helpers.js";
// Re-export types for convenience // Re-export types for convenience
export type { export type {
@ -59,9 +59,9 @@ export type {
SimTopUpPricing, SimTopUpPricing,
SimTopUpPricingPreviewRequest, SimTopUpPricingPreviewRequest,
SimTopUpPricingPreviewResponse, SimTopUpPricingPreviewResponse,
} from './schema'; } from './schema.js';
export type { SimPlanCode } from "./contract"; export type { SimPlanCode } from "./contract.js";
export type { SimPlanOption, SimFeatureToggleSnapshot } from "./helpers"; export type { SimPlanOption, SimFeatureToggleSnapshot } from "./helpers.js";
// Provider adapters // Provider adapters
export * as Providers from "./providers/index"; export * as Providers from "./providers/index.js";

View File

@ -1,7 +1,7 @@
import * as Mapper from "./mapper"; import * as Mapper from "./mapper.js";
import * as RawTypes from "./raw.types"; import * as RawTypes from "./raw.types.js";
import * as Requests from "./requests"; import * as Requests from "./requests.js";
import * as Utils from "./utils"; import * as Utils from "./utils.js";
export const schemas = { export const schemas = {
accountDetails: Requests.freebitAccountDetailsRequestSchema, accountDetails: Requests.freebitAccountDetailsRequestSchema,
@ -51,10 +51,10 @@ export type EsimAddAccountResponse = ReturnType<typeof Mapper.transformFreebitEs
export type EsimActivationResponse = ReturnType<typeof Mapper.transformFreebitEsimActivationResponse>; export type EsimActivationResponse = ReturnType<typeof Mapper.transformFreebitEsimActivationResponse>;
export type AuthResponse = ReturnType<typeof Mapper.transformFreebitAuthResponse>; export type AuthResponse = ReturnType<typeof Mapper.transformFreebitAuthResponse>;
export * from "./mapper"; export * from "./mapper.js";
export * from "./raw.types"; export * from "./raw.types.js";
export * from "./requests"; export * from "./requests.js";
export * from "./utils"; export * from "./utils.js";
export const Freebit = { export const Freebit = {
...Mapper, ...Mapper,

View File

@ -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,
@ -27,8 +27,8 @@ import {
freebitCancelAccountRawSchema, freebitCancelAccountRawSchema,
freebitEsimReissueRawSchema, freebitEsimReissueRawSchema,
freebitEsimAddAccountRawSchema, freebitEsimAddAccountRawSchema,
} from "./raw.types"; } from "./raw.types.js";
import { normalizeAccount } from "./utils"; import { normalizeAccount } from "./utils.js";
function asString(value: unknown): string { function asString(value: unknown): string {
if (typeof value === "string") return value; if (typeof value === "string") return value;

View File

@ -2,9 +2,9 @@
* SIM Domain - Providers * SIM Domain - Providers
*/ */
import { Freebit as FreebitAggregated } from "./freebit/index"; import { Freebit as FreebitAggregated } from "./freebit/index.js";
import * as FreebitModule from "./freebit/index"; import * as FreebitModule from "./freebit/index.js";
export const Freebit = FreebitAggregated; export const Freebit = FreebitAggregated;
export { FreebitModule }; export { FreebitModule };
export * from "./freebit/index"; export * from "./freebit/index.js";

View File

@ -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

View File

@ -45,4 +45,4 @@ export type {
SubscriptionList, SubscriptionList,
SubscriptionQueryParams, SubscriptionQueryParams,
SubscriptionQuery, SubscriptionQuery,
} from './schema'; } from './schema.js';

View File

@ -7,10 +7,10 @@
*/ */
// Constants // Constants
export { SUBSCRIPTION_STATUS, SUBSCRIPTION_CYCLE } from "./contract"; export { SUBSCRIPTION_STATUS, SUBSCRIPTION_CYCLE } from "./contract.js";
// Schemas (includes derived types) // Schemas (includes derived types)
export * from "./schema"; export * from "./schema.js";
// Re-export types for convenience // Re-export types for convenience
export type { export type {
@ -23,10 +23,10 @@ export type {
SubscriptionStats, SubscriptionStats,
SimActionResponse, SimActionResponse,
SimPlanChangeResult, SimPlanChangeResult,
} from './schema'; } from './schema.js';
// Provider adapters // Provider adapters
export * as Providers from "./providers/index"; export * as Providers from "./providers/index.js";
// Re-export provider raw types (request and response) // Re-export provider raw types (request and response)
export type { export type {
@ -34,8 +34,8 @@ export type {
WhmcsGetClientsProductsParams, WhmcsGetClientsProductsParams,
// Response types // Response types
WhmcsProductListResponse, WhmcsProductListResponse,
} from "./providers/whmcs/raw.types"; } from "./providers/whmcs/raw.types.js";
export { export {
whmcsProductListResponseSchema, whmcsProductListResponseSchema,
} from "./providers/whmcs/raw.types"; } from "./providers/whmcs/raw.types.js";

View File

@ -2,8 +2,8 @@
* Subscriptions Domain - Providers * Subscriptions Domain - Providers
*/ */
import * as WhmcsMapper from "./whmcs/mapper"; import * as WhmcsMapper from "./whmcs/mapper.js";
import * as WhmcsRaw from "./whmcs/raw.types"; import * as WhmcsRaw from "./whmcs/raw.types.js";
export const Whmcs = { export const Whmcs = {
...WhmcsMapper, ...WhmcsMapper,
@ -12,5 +12,5 @@ export const Whmcs = {
}; };
export { WhmcsMapper, WhmcsRaw }; export { WhmcsMapper, WhmcsRaw };
export * from "./whmcs/mapper"; export * from "./whmcs/mapper.js";
export * from "./whmcs/raw.types"; export * from "./whmcs/raw.types.js";

View File

@ -1,2 +1,2 @@
export * from "./mapper"; export * from "./mapper.js";
export * from "./raw.types"; export * from "./raw.types.js";

View File

@ -4,20 +4,20 @@
* 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, SubscriptionList } from "../../contract"; import type { Subscription, SubscriptionStatus, SubscriptionCycle, SubscriptionList } from "../../contract.js";
import { subscriptionSchema, subscriptionListSchema, subscriptionStatusSchema } from "../../schema"; import { subscriptionSchema, subscriptionListSchema, subscriptionStatusSchema } from "../../schema.js";
import { import {
type WhmcsProductRaw, type WhmcsProductRaw,
whmcsProductRawSchema, whmcsProductRawSchema,
whmcsCustomFieldsContainerSchema, whmcsCustomFieldsContainerSchema,
whmcsProductListResponseSchema, whmcsProductListResponseSchema,
} from "./raw.types"; } from "./raw.types.js";
import { import {
parseAmount, parseAmount,
formatDate, formatDate,
normalizeStatus, normalizeStatus,
normalizeCycle, normalizeCycle,
} from "../../../providers/whmcs/utils"; } from "../../../providers/whmcs/utils.js";
export interface TransformSubscriptionOptions { export interface TransformSubscriptionOptions {
defaultCurrencyCode?: string; defaultCurrencyCode?: string;

View File

@ -12,14 +12,14 @@ export {
SUPPORT_CASE_PRIORITY, SUPPORT_CASE_PRIORITY,
SUPPORT_CASE_CATEGORY, SUPPORT_CASE_CATEGORY,
PORTAL_CASE_ORIGIN, PORTAL_CASE_ORIGIN,
} from "./contract"; } from "./contract.js";
// Schemas (includes derived types) // Schemas (includes derived types)
export * from "./schema"; export * from "./schema.js";
// Provider adapters // Provider adapters
export * as Providers from "./providers/index"; export * as Providers from "./providers/index.js";
// Re-export provider types for convenience // Re-export provider types for convenience
export * from "./providers/salesforce/raw.types"; export * from "./providers/salesforce/raw.types.js";
export * from "./providers/salesforce/mapper"; export * from "./providers/salesforce/mapper.js";

View File

@ -2,8 +2,8 @@
* Support Domain - Providers * Support Domain - Providers
*/ */
import * as SalesforceMapper from "./salesforce/mapper"; import * as SalesforceMapper from "./salesforce/mapper.js";
import * as SalesforceRaw from "./salesforce/raw.types"; import * as SalesforceRaw from "./salesforce/raw.types.js";
export const Salesforce = { export const Salesforce = {
...SalesforceMapper, ...SalesforceMapper,
@ -13,6 +13,6 @@ export const Salesforce = {
}; };
export { SalesforceMapper, SalesforceRaw }; export { SalesforceMapper, SalesforceRaw };
export * from "./salesforce/mapper"; export * from "./salesforce/mapper.js";
export * from "./salesforce/raw.types"; export * from "./salesforce/raw.types.js";

View File

@ -2,6 +2,6 @@
* Support Domain - Salesforce Provider * Support Domain - Salesforce Provider
*/ */
export * from "./raw.types"; export * from "./raw.types.js";
export * from "./mapper"; export * from "./mapper.js";

View File

@ -4,14 +4,14 @@
* Transform functions to convert raw Salesforce Case records to domain types. * Transform functions to convert raw Salesforce Case records to domain types.
*/ */
import { supportCaseSchema, type SupportCase } from "../../schema"; import { supportCaseSchema, type SupportCase } from "../../schema.js";
import type { SalesforceCaseRecord } from "./raw.types"; import type { SalesforceCaseRecord } from "./raw.types.js";
import { import {
getStatusDisplayLabel, getStatusDisplayLabel,
getPriorityDisplayLabel, getPriorityDisplayLabel,
SALESFORCE_CASE_STATUS, SALESFORCE_CASE_STATUS,
SALESFORCE_CASE_PRIORITY, SALESFORCE_CASE_PRIORITY,
} from "./raw.types"; } from "./raw.types.js";
// ============================================================================ // ============================================================================
// Helper Functions // Helper Functions

View File

@ -3,7 +3,7 @@ import {
SUPPORT_CASE_STATUS, SUPPORT_CASE_STATUS,
SUPPORT_CASE_PRIORITY, SUPPORT_CASE_PRIORITY,
SUPPORT_CASE_CATEGORY, SUPPORT_CASE_CATEGORY,
} from "./contract"; } from "./contract.js";
/** /**
* Portal status values (mapped from Salesforce Japanese API names) * Portal status values (mapped from Salesforce Japanese API names)

View File

@ -4,8 +4,8 @@
* Formatting utilities for currency, dates, phone numbers, etc. * Formatting utilities for currency, dates, phone numbers, etc.
*/ */
export * from "./currency"; export * from "./currency.js";
export * from "./date"; export * from "./date.js";
export * from "./phone"; export * from "./phone.js";
export * from "./text"; export * from "./text.js";

View File

@ -4,16 +4,16 @@
* Utility functions and helpers used across all domain packages. * Utility functions and helpers used across all domain packages.
*/ */
export * as Formatting from "./formatting/index"; export * as Formatting from "./formatting/index.js";
export * as Validation from "./validation/index"; export * as Validation from "./validation/index.js";
export * as Typing from "./typing/index"; export * as Typing from "./typing/index.js";
// Re-export commonly used utilities for convenience // Re-export commonly used utilities for convenience
export { formatCurrency } from "./formatting/currency"; export { formatCurrency } from "./formatting/currency.js";
export type { SupportedCurrency } from "./formatting/currency"; export type { SupportedCurrency } from "./formatting/currency.js";
// Re-export AsyncState types and helpers // Re-export AsyncState types and helpers
export type { AsyncState } from "./typing/helpers"; export type { AsyncState } from "./typing/helpers.js";
export { export {
createIdleState, createIdleState,
createLoadingState, createLoadingState,
@ -23,5 +23,5 @@ export {
isLoading, isLoading,
isSuccess, isSuccess,
isError, isError,
} from "./typing/helpers"; } from "./typing/helpers.js";

View File

@ -4,7 +4,7 @@
* TypeScript type utilities and runtime type checking. * TypeScript type utilities and runtime type checking.
*/ */
export * from "./guards"; export * from "./guards.js";
export * from "./assertions"; export * from "./assertions.js";
export * from "./helpers"; export * from "./helpers.js";

View File

@ -4,9 +4,9 @@
* Validation utilities for common data types. * Validation utilities for common data types.
*/ */
export * from "./email"; export * from "./email.js";
export * from "./url"; export * from "./url.js";
export * from "./string"; export * from "./string.js";
export * from "./helpers"; export * from "./helpers.js";

View File

@ -5,9 +5,8 @@
"outDir": "./dist", "outDir": "./dist",
"rootDir": ".", "rootDir": ".",
"tsBuildInfoFile": "./dist/.tsbuildinfo", "tsBuildInfoFile": "./dist/.tsbuildinfo",
"module": "ESNext", "module": "NodeNext",
"moduleResolution": "Bundler", "moduleResolution": "NodeNext"
"verbatimModuleSyntax": false
}, },
"include": [ "include": [
"auth/**/*", "auth/**/*",

View File

@ -2,7 +2,7 @@
"$schema": "https://json.schemastore.org/tsconfig", "$schema": "https://json.schemastore.org/tsconfig",
"compilerOptions": { "compilerOptions": {
"target": "ES2024", "target": "ES2024",
"lib": ["ES2024"], "lib": ["ESNext"],
"strict": true, "strict": true,
"noImplicitReturns": true, "noImplicitReturns": true,
"noFallthroughCasesInSwitch": true, "noFallthroughCasesInSwitch": true,