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:
parent
89b495db1a
commit
f68fb50638
2
.github/workflows/deploy.yml
vendored
2
.github/workflows/deploy.yml
vendored
@ -24,7 +24,7 @@ jobs:
|
||||
- name: Setup pnpm
|
||||
uses: pnpm/action-setup@v4
|
||||
with:
|
||||
version: 10.15.0
|
||||
version: 10.25.0
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
|
||||
2
.github/workflows/security.yml
vendored
2
.github/workflows/security.yml
vendored
@ -22,7 +22,7 @@ jobs:
|
||||
- name: Setup pnpm
|
||||
uses: pnpm/action-setup@v4
|
||||
with:
|
||||
version: 10.15.0
|
||||
version: 10.25.0
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
# =============================================================================
|
||||
|
||||
ARG NODE_VERSION=22
|
||||
ARG PNPM_VERSION=10.15.0
|
||||
ARG PNPM_VERSION=10.25.0
|
||||
|
||||
# =============================================================================
|
||||
# Stage 1: Builder
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"target": "ES2022",
|
||||
"lib": ["ES2024", "DOM", "DOM.Iterable"],
|
||||
"lib": ["ESNext", "DOM", "DOM.Iterable"],
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "Bundler",
|
||||
"jsx": "preserve",
|
||||
|
||||
@ -77,4 +77,4 @@ export type {
|
||||
LinkWhmcsResponse,
|
||||
// Error types
|
||||
AuthError,
|
||||
} from './schema';
|
||||
} from './schema.js';
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import type { z } from "zod";
|
||||
|
||||
import { signupRequestSchema } from "./schema";
|
||||
import { signupRequestSchema } from "./schema.js";
|
||||
|
||||
type SignupRequestInput = z.input<typeof signupRequestSchema>;
|
||||
|
||||
|
||||
@ -20,7 +20,7 @@ export {
|
||||
type AuthErrorCode,
|
||||
type TokenTypeValue,
|
||||
type GenderValue,
|
||||
} from "./contract";
|
||||
} from "./contract.js";
|
||||
|
||||
export type {
|
||||
// Request types
|
||||
@ -48,7 +48,7 @@ export type {
|
||||
LinkWhmcsResponse,
|
||||
// Error types
|
||||
AuthError,
|
||||
} from "./contract";
|
||||
} from "./contract.js";
|
||||
|
||||
// ============================================================================
|
||||
// Schemas (for validation)
|
||||
@ -83,9 +83,9 @@ export {
|
||||
ssoLinkResponseSchema,
|
||||
checkPasswordNeededResponseSchema,
|
||||
linkWhmcsResponseSchema,
|
||||
} from "./schema";
|
||||
} from "./schema.js";
|
||||
|
||||
export { buildSignupRequest } from "./helpers";
|
||||
export { buildSignupRequest } from "./helpers.js";
|
||||
|
||||
// ============================================================================
|
||||
// Password Utilities
|
||||
@ -98,4 +98,4 @@ export {
|
||||
MIGRATION_TRANSFER_ITEMS,
|
||||
MIGRATION_STEPS,
|
||||
type PasswordRequirementKey,
|
||||
} from "./forms";
|
||||
} from "./forms.js";
|
||||
|
||||
@ -12,8 +12,8 @@
|
||||
|
||||
import { z } from "zod";
|
||||
|
||||
import { emailSchema, nameSchema, passwordSchema, phoneSchema } from "../common/schema";
|
||||
import { addressSchema, userSchema } from "../customer/schema";
|
||||
import { emailSchema, nameSchema, passwordSchema, phoneSchema } from "../common/schema.js";
|
||||
import { addressSchema, userSchema } from "../customer/schema.js";
|
||||
|
||||
// ============================================================================
|
||||
// Authentication Request Schemas
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
* 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
|
||||
|
||||
@ -35,5 +35,5 @@ export type {
|
||||
BillingSummary,
|
||||
InvoiceQueryParams,
|
||||
InvoiceListQuery,
|
||||
} from './schema';
|
||||
} from './schema.js';
|
||||
|
||||
|
||||
@ -7,11 +7,11 @@
|
||||
*/
|
||||
|
||||
// Constants
|
||||
export { INVOICE_STATUS } from "./contract";
|
||||
export * from "./constants";
|
||||
export { INVOICE_STATUS } from "./contract.js";
|
||||
export * from "./constants.js";
|
||||
|
||||
// Schemas (includes derived types)
|
||||
export * from "./schema";
|
||||
export * from "./schema.js";
|
||||
|
||||
// Re-export types for convenience
|
||||
export type {
|
||||
@ -25,10 +25,10 @@ export type {
|
||||
BillingSummary,
|
||||
InvoiceQueryParams,
|
||||
InvoiceListQuery,
|
||||
} from './schema';
|
||||
} from './schema.js';
|
||||
|
||||
// Provider adapters
|
||||
export * as Providers from "./providers/index";
|
||||
export * as Providers from "./providers/index.js";
|
||||
|
||||
// Re-export provider raw types (request and response)
|
||||
export type {
|
||||
@ -45,4 +45,4 @@ export type {
|
||||
WhmcsCapturePaymentResponse,
|
||||
WhmcsCurrency,
|
||||
WhmcsCurrenciesResponse,
|
||||
} from "./providers/whmcs/raw.types";
|
||||
} from "./providers/whmcs/raw.types.js";
|
||||
|
||||
@ -2,8 +2,8 @@
|
||||
* Billing Domain - Providers
|
||||
*/
|
||||
|
||||
import * as WhmcsMapper from "./whmcs/mapper";
|
||||
import * as WhmcsRaw from "./whmcs/raw.types";
|
||||
import * as WhmcsMapper from "./whmcs/mapper.js";
|
||||
import * as WhmcsRaw from "./whmcs/raw.types.js";
|
||||
|
||||
export const Whmcs = {
|
||||
...WhmcsMapper,
|
||||
@ -12,5 +12,5 @@ export const Whmcs = {
|
||||
};
|
||||
|
||||
export { WhmcsMapper, WhmcsRaw };
|
||||
export * from "./whmcs/mapper";
|
||||
export * from "./whmcs/raw.types";
|
||||
export * from "./whmcs/mapper.js";
|
||||
export * from "./whmcs/raw.types.js";
|
||||
|
||||
@ -1,2 +1,2 @@
|
||||
export * from "./mapper";
|
||||
export * from "./raw.types";
|
||||
export * from "./mapper.js";
|
||||
export * from "./raw.types.js";
|
||||
|
||||
@ -4,8 +4,8 @@
|
||||
* Transforms raw WHMCS invoice data into normalized billing domain types.
|
||||
*/
|
||||
|
||||
import type { Invoice, InvoiceItem } from "../../contract";
|
||||
import { invoiceSchema } from "../../schema";
|
||||
import type { Invoice, InvoiceItem } from "../../contract.js";
|
||||
import { invoiceSchema } from "../../schema.js";
|
||||
import {
|
||||
type WhmcsInvoiceRaw,
|
||||
whmcsInvoiceRawSchema,
|
||||
@ -13,8 +13,8 @@ import {
|
||||
whmcsInvoiceListItemSchema,
|
||||
type WhmcsInvoiceItemsRaw,
|
||||
whmcsInvoiceItemsRawSchema,
|
||||
} from "./raw.types";
|
||||
import { parseAmount, formatDate } from "../../../providers/whmcs/utils";
|
||||
} from "./raw.types.js";
|
||||
import { parseAmount, formatDate } from "../../../providers/whmcs/utils.js";
|
||||
|
||||
export interface TransformInvoiceOptions {
|
||||
defaultCurrencyCode?: string;
|
||||
|
||||
@ -91,4 +91,4 @@ export type {
|
||||
VpnCatalogProduct,
|
||||
// Union type
|
||||
CatalogProduct,
|
||||
} from './schema';
|
||||
} from './schema.js';
|
||||
|
||||
@ -12,10 +12,10 @@ export {
|
||||
type PricingTier,
|
||||
type CatalogFilter,
|
||||
type CatalogPriceInfo,
|
||||
} from "./contract";
|
||||
} from "./contract.js";
|
||||
|
||||
// Schemas (includes derived types)
|
||||
export * from "./schema";
|
||||
export * from "./schema.js";
|
||||
|
||||
// Re-export types for convenience
|
||||
export type {
|
||||
@ -34,23 +34,23 @@ export type {
|
||||
VpnCatalogProduct,
|
||||
// Union type
|
||||
CatalogProduct,
|
||||
} from './schema';
|
||||
} from './schema.js';
|
||||
|
||||
// Provider adapters
|
||||
export * as Providers from "./providers/index";
|
||||
export * as Providers from "./providers/index.js";
|
||||
|
||||
// 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
|
||||
export type {
|
||||
WhmcsCatalogProduct,
|
||||
WhmcsCatalogProductListResponse,
|
||||
} from "./providers/whmcs/raw.types";
|
||||
} from "./providers/whmcs/raw.types.js";
|
||||
export type {
|
||||
WhmcsCatalogProductNormalized,
|
||||
WhmcsCatalogPricing,
|
||||
} from "./providers/whmcs/mapper";
|
||||
} from "./providers/whmcs/mapper.js";
|
||||
|
||||
// Utilities
|
||||
export * from "./utils";
|
||||
export * from "./utils.js";
|
||||
|
||||
@ -2,10 +2,10 @@
|
||||
* Catalog Domain - Providers
|
||||
*/
|
||||
|
||||
import * as SalesforceMapper from "./salesforce/mapper";
|
||||
import * as SalesforceRaw from "./salesforce/raw.types";
|
||||
import * as WhmcsMapper from "./whmcs/mapper";
|
||||
import * as WhmcsRaw from "./whmcs/raw.types";
|
||||
import * as SalesforceMapper from "./salesforce/mapper.js";
|
||||
import * as SalesforceRaw from "./salesforce/raw.types.js";
|
||||
import * as WhmcsMapper from "./whmcs/mapper.js";
|
||||
import * as WhmcsRaw from "./whmcs/raw.types.js";
|
||||
|
||||
export const Salesforce = {
|
||||
...SalesforceMapper,
|
||||
@ -19,7 +19,7 @@ export const Whmcs = {
|
||||
};
|
||||
|
||||
export { SalesforceMapper, SalesforceRaw, WhmcsMapper, WhmcsRaw };
|
||||
export * from "./salesforce/mapper";
|
||||
export * from "./salesforce/raw.types";
|
||||
export * from "./whmcs/mapper";
|
||||
export * from "./whmcs/raw.types";
|
||||
export * from "./salesforce/mapper.js";
|
||||
export * from "./salesforce/raw.types.js";
|
||||
export * from "./whmcs/mapper.js";
|
||||
export * from "./whmcs/raw.types.js";
|
||||
|
||||
@ -1,2 +1,2 @@
|
||||
export * from "./mapper";
|
||||
export * from "./raw.types";
|
||||
export * from "./mapper.js";
|
||||
export * from "./raw.types.js";
|
||||
|
||||
@ -12,16 +12,16 @@ import type {
|
||||
SimCatalogProduct,
|
||||
SimActivationFeeCatalogItem,
|
||||
VpnCatalogProduct,
|
||||
} from "../../contract";
|
||||
} from "../../contract.js";
|
||||
import type {
|
||||
SalesforceProduct2WithPricebookEntries,
|
||||
SalesforcePricebookEntryRecord,
|
||||
} from "./raw.types";
|
||||
} from "./raw.types.js";
|
||||
import {
|
||||
enrichInternetPlanMetadata,
|
||||
inferAddonTypeFromSku,
|
||||
inferInstallationTermFromSku,
|
||||
} from "../../utils";
|
||||
} from "../../utils.js";
|
||||
|
||||
// ============================================================================
|
||||
// Tier Templates (Hardcoded Product Metadata)
|
||||
|
||||
@ -1,2 +1,2 @@
|
||||
export * from "./raw.types";
|
||||
export * from "./raw.types.js";
|
||||
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
import { parseAmount } from "../../../providers/whmcs/utils";
|
||||
import { parseAmount } from "../../../providers/whmcs/utils.js";
|
||||
import {
|
||||
whmcsCatalogProductListResponseSchema,
|
||||
type WhmcsCatalogProductListResponse,
|
||||
} from "./raw.types";
|
||||
} from "./raw.types.js";
|
||||
|
||||
export interface WhmcsCatalogPricing {
|
||||
currency: string;
|
||||
|
||||
@ -9,8 +9,8 @@ import {
|
||||
type VpnCatalogCollection,
|
||||
type InternetPlanTemplate,
|
||||
type CatalogProductBase,
|
||||
} from "./schema";
|
||||
import type { CatalogPriceInfo } from "./contract";
|
||||
} from "./schema.js";
|
||||
import type { CatalogPriceInfo } from "./contract.js";
|
||||
|
||||
/**
|
||||
* Empty catalog defaults shared by portal and BFF.
|
||||
|
||||
@ -4,15 +4,15 @@
|
||||
* Shared types and utilities used across all domains.
|
||||
*/
|
||||
|
||||
export * from "./types";
|
||||
export * from "./schema";
|
||||
export * from "./validation";
|
||||
export * from "./errors";
|
||||
export * from "./types.js";
|
||||
export * from "./schema.js";
|
||||
export * from "./validation.js";
|
||||
export * from "./errors.js";
|
||||
|
||||
// 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
|
||||
export type { WhmcsResponse, WhmcsErrorResponse } from "./providers/whmcs";
|
||||
export type { SalesforceResponse } from "./providers/salesforce";
|
||||
export type { WhmcsResponse, WhmcsErrorResponse } from "./providers/whmcs.js";
|
||||
export type { SalesforceResponse } from "./providers/salesforce.js";
|
||||
|
||||
|
||||
@ -4,5 +4,5 @@
|
||||
* Generic provider-specific response structures used across multiple domains.
|
||||
*/
|
||||
|
||||
export * as Whmcs from "./whmcs";
|
||||
export * as Salesforce from "./salesforce/index";
|
||||
export * as Whmcs from "./whmcs.js";
|
||||
export * as Salesforce from "./salesforce/index.js";
|
||||
|
||||
@ -1,2 +1,2 @@
|
||||
export * from "./raw.types";
|
||||
export * from "./raw.types.js";
|
||||
|
||||
|
||||
@ -52,4 +52,4 @@ export type {
|
||||
UserRole,
|
||||
Address,
|
||||
AddressFormData,
|
||||
} from './schema';
|
||||
} from './schema.js';
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
// Constants
|
||||
// ============================================================================
|
||||
|
||||
export { USER_ROLE, type UserRoleValue } from "./contract";
|
||||
export { USER_ROLE, type UserRoleValue } from "./contract.js";
|
||||
|
||||
// ============================================================================
|
||||
// Domain Types (Clean Names - Public API)
|
||||
@ -32,7 +32,7 @@ export type {
|
||||
UserProfile, // Alias for User
|
||||
AuthenticatedUser, // Alias for authenticated user
|
||||
WhmcsClient, // Provider-normalized WHMCS client shape
|
||||
} from "./schema";
|
||||
} from "./schema.js";
|
||||
|
||||
// ============================================================================
|
||||
// Schemas
|
||||
@ -50,7 +50,7 @@ export {
|
||||
combineToUser, // Domain helper: UserAuth + WhmcsClient → User
|
||||
addressFormToRequest,
|
||||
profileFormToRequest,
|
||||
} from "./schema";
|
||||
} from "./schema.js";
|
||||
|
||||
// ============================================================================
|
||||
// Provider Namespace
|
||||
@ -64,7 +64,7 @@ export {
|
||||
* - Providers.Whmcs.transformWhmcsClientResponse()
|
||||
* - Providers.Portal.mapPrismaUserToUserAuth()
|
||||
*/
|
||||
export * as Providers from "./providers/index";
|
||||
export * as Providers from "./providers/index.js";
|
||||
|
||||
// ============================================================================
|
||||
// Provider Raw Response Types (Selective Exports)
|
||||
@ -84,7 +84,7 @@ export type {
|
||||
WhmcsAddClientResponse,
|
||||
WhmcsValidateLoginResponse,
|
||||
WhmcsSsoResponse,
|
||||
} from "./providers/whmcs/raw.types";
|
||||
} from "./providers/whmcs/raw.types.js";
|
||||
|
||||
// ============================================================================
|
||||
// Provider-Specific Types (For Integrations)
|
||||
@ -97,4 +97,4 @@ export type {
|
||||
export type {
|
||||
SalesforceAccountFieldMap,
|
||||
SalesforceAccountRecord,
|
||||
} from "./contract";
|
||||
} from "./contract.js";
|
||||
|
||||
@ -6,5 +6,5 @@
|
||||
* - Whmcs: WHMCS API → WhmcsClient
|
||||
*/
|
||||
|
||||
export * as Portal from "./portal/index";
|
||||
export * as Whmcs from "./whmcs/index";
|
||||
export * as Portal from "./portal/index.js";
|
||||
export * as Whmcs from "./whmcs/index.js";
|
||||
|
||||
@ -4,6 +4,6 @@
|
||||
* Handles mapping from Prisma (portal database) to UserAuth domain type
|
||||
*/
|
||||
|
||||
export * from "./mapper";
|
||||
export * from "./types";
|
||||
export * from "./mapper.js";
|
||||
export * from "./types.js";
|
||||
|
||||
|
||||
@ -4,9 +4,9 @@
|
||||
* Maps Prisma user data to UserAuth domain type using schema validation
|
||||
*/
|
||||
|
||||
import { userAuthSchema } from "../../schema";
|
||||
import type { PrismaUserRaw } from "./types";
|
||||
import type { UserAuth } from "../../schema";
|
||||
import { userAuthSchema } from "../../schema.js";
|
||||
import type { PrismaUserRaw } from "./types.js";
|
||||
import type { UserAuth } from "../../schema.js";
|
||||
|
||||
/**
|
||||
* Maps raw Prisma user data to UserAuth domain type
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
* 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
|
||||
|
||||
@ -5,9 +5,9 @@
|
||||
* Exports transformation functions and raw API types (request/response).
|
||||
*/
|
||||
|
||||
export * from "./mapper";
|
||||
export * from "./raw.types";
|
||||
export { getCustomFieldValue, getCustomFieldsMap } from "../../../providers/whmcs/utils";
|
||||
export * from "./mapper.js";
|
||||
export * from "./raw.types.js";
|
||||
export { getCustomFieldValue, getCustomFieldsMap } from "../../../providers/whmcs/utils.js";
|
||||
|
||||
// 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";
|
||||
|
||||
@ -7,14 +7,14 @@
|
||||
|
||||
import { z } from "zod";
|
||||
|
||||
import type { WhmcsClient, Address } from "../../schema";
|
||||
import { whmcsClientSchema, addressSchema } from "../../schema";
|
||||
import type { WhmcsClient, Address } from "../../schema.js";
|
||||
import { whmcsClientSchema, addressSchema } from "../../schema.js";
|
||||
import {
|
||||
whmcsClientSchema as whmcsRawClientSchema,
|
||||
whmcsClientResponseSchema,
|
||||
type WhmcsClient as WhmcsRawClient,
|
||||
type WhmcsClientResponse,
|
||||
} from "./raw.types";
|
||||
} from "./raw.types.js";
|
||||
|
||||
/**
|
||||
* Parse and validate WHMCS client response
|
||||
|
||||
@ -12,8 +12,8 @@
|
||||
|
||||
import { z } from "zod";
|
||||
|
||||
import { countryCodeSchema } from "../common/schema";
|
||||
import { whmcsClientSchema as whmcsRawClientSchema, whmcsCustomFieldSchema } from "./providers/whmcs/raw.types";
|
||||
import { countryCodeSchema } from "../common/schema.js";
|
||||
import { whmcsClientSchema as whmcsRawClientSchema, whmcsCustomFieldSchema } from "./providers/whmcs/raw.types.js";
|
||||
|
||||
// ============================================================================
|
||||
// Helper Schemas
|
||||
|
||||
@ -9,7 +9,7 @@ import {
|
||||
activityFilterSchema,
|
||||
activityFilterConfigSchema,
|
||||
dashboardSummaryResponseSchema,
|
||||
} from "./schema";
|
||||
} from "./schema.js";
|
||||
|
||||
export type ActivityType = z.infer<typeof activityTypeSchema>;
|
||||
export type Activity = z.infer<typeof activitySchema>;
|
||||
|
||||
@ -2,6 +2,6 @@
|
||||
* Dashboard Domain
|
||||
*/
|
||||
|
||||
export * from "./contract";
|
||||
export * from "./schema";
|
||||
export * from "./utils";
|
||||
export * from "./contract.js";
|
||||
export * from "./schema.js";
|
||||
export * from "./utils.js";
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { z } from "zod";
|
||||
import { invoiceSchema } from "../billing/schema";
|
||||
import { invoiceSchema } from "../billing/schema.js";
|
||||
|
||||
export const activityTypeSchema = z.enum([
|
||||
"invoice_created",
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
* 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
|
||||
|
||||
@ -4,16 +4,16 @@
|
||||
*/
|
||||
|
||||
// Re-export domain modules
|
||||
export * as Billing from "./billing/index";
|
||||
export * as Subscriptions from "./subscriptions/index";
|
||||
export * as Payments from "./payments/index";
|
||||
export * as Sim from "./sim/index";
|
||||
export * as Support from "./support/index";
|
||||
export * as Orders from "./orders/index";
|
||||
export * as Catalog from "./catalog/index";
|
||||
export * as Common from "./common/index";
|
||||
export * as Toolkit from "./toolkit/index";
|
||||
export * as Auth from "./auth/index";
|
||||
export * as Customer from "./customer/index";
|
||||
export * as Mappings from "./mappings/index";
|
||||
export * as Dashboard from "./dashboard/index";
|
||||
export * as Billing from "./billing/index.js";
|
||||
export * as Subscriptions from "./subscriptions/index.js";
|
||||
export * as Payments from "./payments/index.js";
|
||||
export * as Sim from "./sim/index.js";
|
||||
export * as Support from "./support/index.js";
|
||||
export * as Orders from "./orders/index.js";
|
||||
export * as Catalog from "./catalog/index.js";
|
||||
export * as Common from "./common/index.js";
|
||||
export * as Toolkit from "./toolkit/index.js";
|
||||
export * as Auth from "./auth/index.js";
|
||||
export * as Customer from "./customer/index.js";
|
||||
export * as Mappings from "./mappings/index.js";
|
||||
export * as Dashboard from "./dashboard/index.js";
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
* 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 {
|
||||
id: string;
|
||||
|
||||
@ -2,9 +2,9 @@
|
||||
* ID Mapping Domain
|
||||
*/
|
||||
|
||||
export * from "./contract";
|
||||
export * from "./schema";
|
||||
export * from "./validation";
|
||||
export * from "./contract.js";
|
||||
export * from "./schema.js";
|
||||
export * from "./validation.js";
|
||||
|
||||
// Re-export types for convenience
|
||||
export type {
|
||||
@ -12,5 +12,5 @@ export type {
|
||||
MappingStats,
|
||||
BulkMappingOperation,
|
||||
BulkMappingResult,
|
||||
} from "./schema";
|
||||
export type { MappingValidationResult } from "./contract";
|
||||
} from "./schema.js";
|
||||
export type { MappingValidationResult } from "./contract.js";
|
||||
|
||||
@ -7,7 +7,7 @@ import type {
|
||||
CreateMappingRequest,
|
||||
UpdateMappingRequest,
|
||||
UserIdMapping,
|
||||
} from "./contract";
|
||||
} from "./contract.js";
|
||||
|
||||
export const createMappingRequestSchema: z.ZodType<CreateMappingRequest> = z.object({
|
||||
userId: z.string().uuid(),
|
||||
|
||||
@ -10,13 +10,13 @@ import {
|
||||
createMappingRequestSchema,
|
||||
updateMappingRequestSchema,
|
||||
userIdMappingSchema,
|
||||
} from "./schema";
|
||||
} from "./schema.js";
|
||||
import type {
|
||||
CreateMappingRequest,
|
||||
UpdateMappingRequest,
|
||||
UserIdMapping,
|
||||
MappingValidationResult,
|
||||
} from "./contract";
|
||||
} from "./contract.js";
|
||||
|
||||
/**
|
||||
* Check if a mapping request has optional Salesforce account ID
|
||||
|
||||
@ -5,11 +5,11 @@
|
||||
* Validated types are derived from schemas (see schema.ts).
|
||||
*/
|
||||
|
||||
import type { SalesforceProductFieldMap } from "../catalog/contract";
|
||||
import type { SalesforceAccountFieldMap } from "../customer/index";
|
||||
import type { UserIdMapping } from "../mappings/contract";
|
||||
import type { SalesforceOrderRecord } from "./providers/salesforce/raw.types";
|
||||
import type { OrderConfigurations } from "./schema";
|
||||
import type { SalesforceProductFieldMap } from "../catalog/contract.js";
|
||||
import type { SalesforceAccountFieldMap } from "../customer/index.js";
|
||||
import type { UserIdMapping } from "../mappings/contract.js";
|
||||
import type { SalesforceOrderRecord } from "./providers/salesforce/raw.types.js";
|
||||
import type { OrderConfigurations } from "./schema.js";
|
||||
|
||||
// ============================================================================
|
||||
// Order Type Constants
|
||||
@ -205,4 +205,4 @@ export type {
|
||||
CreateOrderRequest,
|
||||
OrderBusinessValidation,
|
||||
SfOrderIdParam,
|
||||
} from './schema';
|
||||
} from './schema.js';
|
||||
|
||||
@ -8,11 +8,11 @@ import {
|
||||
type OrderDisplayItemCategory,
|
||||
type OrderDisplayItemCharge,
|
||||
type OrderDisplayItemChargeKind,
|
||||
} from "./schema";
|
||||
import { ORDER_TYPE } from "./contract";
|
||||
import type { CheckoutTotals } from "./contract";
|
||||
import type { SimConfigureFormData } from "../sim";
|
||||
import type { WhmcsOrderItem } from "./providers/whmcs/raw.types";
|
||||
} from "./schema.js";
|
||||
import { ORDER_TYPE } from "./contract.js";
|
||||
import type { CheckoutTotals } from "./contract.js";
|
||||
import type { SimConfigureFormData } from "../sim/index.js";
|
||||
import type { WhmcsOrderItem } from "./providers/whmcs/raw.types.js";
|
||||
|
||||
export interface BuildSimOrderConfigurationsOptions {
|
||||
/**
|
||||
|
||||
@ -30,17 +30,17 @@ export {
|
||||
type AccessModeValue,
|
||||
ORDER_FULFILLMENT_ERROR_CODE,
|
||||
type OrderFulfillmentErrorCode,
|
||||
} from "./contract";
|
||||
} from "./contract.js";
|
||||
|
||||
// Schemas (includes derived types)
|
||||
export * from "./schema";
|
||||
export * from "./schema.js";
|
||||
|
||||
// Validation (extended business rules)
|
||||
export * from "./validation";
|
||||
export * from "./validation.js";
|
||||
|
||||
// Utilities
|
||||
export * from "./utils";
|
||||
export * from "./events";
|
||||
export * from "./utils.js";
|
||||
export * from "./events.js";
|
||||
export {
|
||||
buildSimOrderConfigurations,
|
||||
normalizeBillingCycle,
|
||||
@ -58,7 +58,7 @@ export {
|
||||
getOrderServiceCategory,
|
||||
calculateOrderTotals,
|
||||
formatScheduledDate,
|
||||
} from "./helpers";
|
||||
} from "./helpers.js";
|
||||
// Re-export types for convenience
|
||||
export type {
|
||||
// Order item types
|
||||
@ -79,12 +79,12 @@ export type {
|
||||
OrderDisplayItemCategory,
|
||||
OrderDisplayItemCharge,
|
||||
OrderDisplayItemChargeKind,
|
||||
} from './schema';
|
||||
} from './schema.js';
|
||||
|
||||
// Provider adapters
|
||||
export * as Providers from "./providers/index";
|
||||
export * as Providers from "./providers/index.js";
|
||||
|
||||
// Re-export provider types for convenience
|
||||
export * from "./providers/whmcs/raw.types";
|
||||
export * from "./providers/salesforce/raw.types";
|
||||
export * from "./providers/salesforce/field-map";
|
||||
export * from "./providers/whmcs/raw.types.js";
|
||||
export * from "./providers/salesforce/raw.types.js";
|
||||
export * from "./providers/salesforce/field-map.js";
|
||||
|
||||
@ -2,11 +2,11 @@
|
||||
* Orders Domain - Providers
|
||||
*/
|
||||
|
||||
import * as WhmcsMapper from "./whmcs/mapper";
|
||||
import * as WhmcsRaw from "./whmcs/raw.types";
|
||||
import * as SalesforceFieldMap from "./salesforce/field-map";
|
||||
import * as SalesforceMapper from "./salesforce/mapper";
|
||||
import * as SalesforceRaw from "./salesforce/raw.types";
|
||||
import * as WhmcsMapper from "./whmcs/mapper.js";
|
||||
import * as WhmcsRaw from "./whmcs/raw.types.js";
|
||||
import * as SalesforceFieldMap from "./salesforce/field-map.js";
|
||||
import * as SalesforceMapper from "./salesforce/mapper.js";
|
||||
import * as SalesforceRaw from "./salesforce/raw.types.js";
|
||||
|
||||
export const Whmcs = {
|
||||
...WhmcsMapper,
|
||||
@ -27,8 +27,8 @@ export {
|
||||
SalesforceMapper,
|
||||
SalesforceRaw,
|
||||
};
|
||||
export * from "./whmcs/mapper";
|
||||
export * from "./whmcs/raw.types";
|
||||
export * from "./salesforce/mapper";
|
||||
export * from "./salesforce/raw.types";
|
||||
export * from "./salesforce/field-map";
|
||||
export * from "./whmcs/mapper.js";
|
||||
export * from "./whmcs/raw.types.js";
|
||||
export * from "./salesforce/mapper.js";
|
||||
export * from "./salesforce/raw.types.js";
|
||||
export * from "./salesforce/field-map.js";
|
||||
|
||||
@ -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 {
|
||||
SalesforceOrderItemRecord,
|
||||
SalesforceOrderRecord,
|
||||
} from "./raw.types";
|
||||
} from "./raw.types.js";
|
||||
|
||||
export interface SalesforceOrderFieldMap {
|
||||
order: {
|
||||
|
||||
@ -1,2 +1,2 @@
|
||||
export * from "./raw.types";
|
||||
export * from "./mapper";
|
||||
export * from "./raw.types.js";
|
||||
export * from "./mapper.js";
|
||||
|
||||
@ -9,21 +9,21 @@ import type {
|
||||
OrderItemDetails,
|
||||
OrderItemSummary,
|
||||
OrderSummary,
|
||||
} from "../../contract";
|
||||
import { normalizeBillingCycle } from "../../helpers";
|
||||
import { orderDetailsSchema, orderSummarySchema, orderItemDetailsSchema } from "../../schema";
|
||||
} from "../../contract.js";
|
||||
import { normalizeBillingCycle } from "../../helpers.js";
|
||||
import { orderDetailsSchema, orderSummarySchema, orderItemDetailsSchema } from "../../schema.js";
|
||||
import type {
|
||||
SalesforceProduct2WithPricebookEntries,
|
||||
SalesforcePricebookEntryRecord,
|
||||
} from "../../../catalog/providers/salesforce/raw.types";
|
||||
} from "../../../catalog/providers/salesforce/raw.types.js";
|
||||
import {
|
||||
defaultSalesforceOrderFieldMap,
|
||||
type SalesforceOrderFieldMap,
|
||||
} from "./field-map";
|
||||
} from "./field-map.js";
|
||||
import type {
|
||||
SalesforceOrderItemRecord,
|
||||
SalesforceOrderRecord,
|
||||
} from "./raw.types";
|
||||
} from "./raw.types.js";
|
||||
|
||||
/**
|
||||
* Helper function to get sort priority for item class
|
||||
|
||||
@ -1,2 +1,2 @@
|
||||
export * from "./mapper";
|
||||
export * from "./raw.types";
|
||||
export * from "./mapper.js";
|
||||
export * from "./raw.types.js";
|
||||
|
||||
@ -4,13 +4,13 @@
|
||||
* Transforms normalized order data to WHMCS API format.
|
||||
*/
|
||||
|
||||
import type { OrderDetails, OrderItemDetails } from "../../contract";
|
||||
import { normalizeBillingCycle } from "../../helpers";
|
||||
import type { OrderDetails, OrderItemDetails } from "../../contract.js";
|
||||
import { normalizeBillingCycle } from "../../helpers.js";
|
||||
import {
|
||||
type WhmcsOrderItem,
|
||||
type WhmcsAddOrderParams,
|
||||
type WhmcsAddOrderPayload,
|
||||
} from "./raw.types";
|
||||
} from "./raw.types.js";
|
||||
|
||||
export interface OrderItemMappingResult {
|
||||
whmcsItems: WhmcsOrderItem[];
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
import { z } from "zod";
|
||||
import { apiSuccessResponseSchema } from "../common";
|
||||
import { apiSuccessResponseSchema } from "../common/index.js";
|
||||
|
||||
// ============================================================================
|
||||
// Enum Value Arrays (for Zod schemas)
|
||||
|
||||
@ -4,8 +4,8 @@ import {
|
||||
type OrderConfigurations,
|
||||
type CreateOrderRequest,
|
||||
type OrderSelections,
|
||||
} from "./schema";
|
||||
import { ORDER_TYPE, type CheckoutCart, type OrderTypeValue } from "./contract";
|
||||
} from "./schema.js";
|
||||
import { ORDER_TYPE, type CheckoutCart, type OrderTypeValue } from "./contract.js";
|
||||
|
||||
export function buildOrderConfigurations(selections: OrderSelections): OrderConfigurations {
|
||||
const normalizedSelections = orderSelectionsSchema.parse(selections);
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
*/
|
||||
|
||||
import { z } from "zod";
|
||||
import { orderBusinessValidationSchema } from "./schema";
|
||||
import { orderBusinessValidationSchema } from "./schema.js";
|
||||
|
||||
// ============================================================================
|
||||
// SKU Business Rules Helpers
|
||||
|
||||
@ -53,4 +53,4 @@ export type {
|
||||
PaymentGatewayType,
|
||||
PaymentGateway,
|
||||
PaymentGatewayList,
|
||||
} from './schema';
|
||||
} from './schema.js';
|
||||
|
||||
@ -7,10 +7,10 @@
|
||||
*/
|
||||
|
||||
// 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)
|
||||
export * from "./schema";
|
||||
export * from "./schema.js";
|
||||
|
||||
// Re-export types for convenience
|
||||
export type {
|
||||
@ -20,10 +20,10 @@ export type {
|
||||
PaymentGatewayType,
|
||||
PaymentGateway,
|
||||
PaymentGatewayList,
|
||||
} from './schema';
|
||||
} from './schema.js';
|
||||
|
||||
// Provider adapters
|
||||
export * as Providers from "./providers/index";
|
||||
export * as Providers from "./providers/index.js";
|
||||
|
||||
// Re-export provider raw types (request and response)
|
||||
export type {
|
||||
@ -34,4 +34,4 @@ export type {
|
||||
WhmcsPaymentMethodListResponse,
|
||||
WhmcsPaymentGateway,
|
||||
WhmcsPaymentGatewayListResponse,
|
||||
} from "./providers/whmcs/raw.types";
|
||||
} from "./providers/whmcs/raw.types.js";
|
||||
|
||||
@ -2,8 +2,8 @@
|
||||
* Payments Domain - Providers
|
||||
*/
|
||||
|
||||
import * as WhmcsMapper from "./whmcs/mapper";
|
||||
import * as WhmcsRaw from "./whmcs/raw.types";
|
||||
import * as WhmcsMapper from "./whmcs/mapper.js";
|
||||
import * as WhmcsRaw from "./whmcs/raw.types.js";
|
||||
|
||||
export const Whmcs = {
|
||||
...WhmcsMapper,
|
||||
@ -12,5 +12,5 @@ export const Whmcs = {
|
||||
};
|
||||
|
||||
export { WhmcsMapper, WhmcsRaw };
|
||||
export * from "./whmcs/mapper";
|
||||
export * from "./whmcs/raw.types";
|
||||
export * from "./whmcs/mapper.js";
|
||||
export * from "./whmcs/raw.types.js";
|
||||
|
||||
@ -1,2 +1,2 @@
|
||||
export * from "./mapper";
|
||||
export * from "./raw.types";
|
||||
export * from "./mapper.js";
|
||||
export * from "./raw.types.js";
|
||||
|
||||
@ -2,14 +2,14 @@
|
||||
* WHMCS Payments Provider - Mapper
|
||||
*/
|
||||
|
||||
import type { PaymentMethod, PaymentGateway } from "../../contract";
|
||||
import { paymentMethodSchema, paymentGatewaySchema } from "../../schema";
|
||||
import type { PaymentMethod, PaymentGateway } from "../../contract.js";
|
||||
import { paymentMethodSchema, paymentGatewaySchema } from "../../schema.js";
|
||||
import {
|
||||
type WhmcsPaymentMethodRaw,
|
||||
type WhmcsPaymentGatewayRaw,
|
||||
whmcsPaymentMethodRawSchema,
|
||||
whmcsPaymentGatewayRawSchema,
|
||||
} from "./raw.types";
|
||||
} from "./raw.types.js";
|
||||
|
||||
const PAYMENT_TYPE_MAP: Record<string, PaymentMethod["type"]> = {
|
||||
creditcard: "CreditCard",
|
||||
|
||||
@ -3,5 +3,5 @@
|
||||
* Re-exports shared provider utilities
|
||||
*/
|
||||
|
||||
export * as Whmcs from "./whmcs";
|
||||
export * as Whmcs from "./whmcs/index.js";
|
||||
|
||||
|
||||
@ -3,5 +3,5 @@
|
||||
* Re-exports shared WHMCS provider utilities
|
||||
*/
|
||||
|
||||
export * from "./utils";
|
||||
export * from "./utils.js";
|
||||
|
||||
|
||||
@ -64,4 +64,4 @@ export type {
|
||||
SimOrderActivationRequest,
|
||||
SimOrderActivationMnp,
|
||||
SimOrderActivationAddons,
|
||||
} from './schema';
|
||||
} from './schema.js';
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { SIM_PLAN_CODES, SIM_PLAN_LABELS, SIM_STATUS } from "./contract";
|
||||
import type { SimStatus, SimFeaturesUpdateRequest } from "./schema";
|
||||
import { SIM_PLAN_CODES, SIM_PLAN_LABELS, SIM_STATUS } from "./contract.js";
|
||||
import type { SimStatus, SimFeaturesUpdateRequest } from "./schema.js";
|
||||
|
||||
export function canManageActiveSim(status: SimStatus): boolean {
|
||||
return status === SIM_STATUS.ACTIVE;
|
||||
|
||||
@ -7,14 +7,14 @@
|
||||
*/
|
||||
|
||||
// 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)
|
||||
export * from "./schema";
|
||||
export * from "./lifecycle";
|
||||
export * from "./schema.js";
|
||||
export * from "./lifecycle.js";
|
||||
|
||||
// Validation functions
|
||||
export * from "./validation";
|
||||
export * from "./validation.js";
|
||||
export {
|
||||
canManageActiveSim,
|
||||
canReissueEsim,
|
||||
@ -24,7 +24,7 @@ export {
|
||||
SIM_PLAN_OPTIONS,
|
||||
getSimPlanLabel,
|
||||
buildSimFeaturesUpdatePayload,
|
||||
} from "./helpers";
|
||||
} from "./helpers.js";
|
||||
|
||||
// Re-export types for convenience
|
||||
export type {
|
||||
@ -59,9 +59,9 @@ export type {
|
||||
SimTopUpPricing,
|
||||
SimTopUpPricingPreviewRequest,
|
||||
SimTopUpPricingPreviewResponse,
|
||||
} from './schema';
|
||||
export type { SimPlanCode } from "./contract";
|
||||
export type { SimPlanOption, SimFeatureToggleSnapshot } from "./helpers";
|
||||
} from './schema.js';
|
||||
export type { SimPlanCode } from "./contract.js";
|
||||
export type { SimPlanOption, SimFeatureToggleSnapshot } from "./helpers.js";
|
||||
|
||||
// Provider adapters
|
||||
export * as Providers from "./providers/index";
|
||||
export * as Providers from "./providers/index.js";
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import * as Mapper from "./mapper";
|
||||
import * as RawTypes from "./raw.types";
|
||||
import * as Requests from "./requests";
|
||||
import * as Utils from "./utils";
|
||||
import * as Mapper from "./mapper.js";
|
||||
import * as RawTypes from "./raw.types.js";
|
||||
import * as Requests from "./requests.js";
|
||||
import * as Utils from "./utils.js";
|
||||
|
||||
export const schemas = {
|
||||
accountDetails: Requests.freebitAccountDetailsRequestSchema,
|
||||
@ -51,10 +51,10 @@ export type EsimAddAccountResponse = ReturnType<typeof Mapper.transformFreebitEs
|
||||
export type EsimActivationResponse = ReturnType<typeof Mapper.transformFreebitEsimActivationResponse>;
|
||||
export type AuthResponse = ReturnType<typeof Mapper.transformFreebitAuthResponse>;
|
||||
|
||||
export * from "./mapper";
|
||||
export * from "./raw.types";
|
||||
export * from "./requests";
|
||||
export * from "./utils";
|
||||
export * from "./mapper.js";
|
||||
export * from "./raw.types.js";
|
||||
export * from "./requests.js";
|
||||
export * from "./utils.js";
|
||||
|
||||
export const Freebit = {
|
||||
...Mapper,
|
||||
|
||||
@ -2,8 +2,8 @@
|
||||
* Freebit SIM Provider - Mapper
|
||||
*/
|
||||
|
||||
import type { SimDetails, SimUsage, SimTopUpHistory, SimType, SimStatus } from "../../contract";
|
||||
import { simDetailsSchema, simUsageSchema, simTopUpHistorySchema } from "../../schema";
|
||||
import type { SimDetails, SimUsage, SimTopUpHistory, SimType, SimStatus } from "../../contract.js";
|
||||
import { simDetailsSchema, simUsageSchema, simTopUpHistorySchema } from "../../schema.js";
|
||||
import {
|
||||
type FreebitAccountDetailsRaw,
|
||||
type FreebitTrafficInfoRaw,
|
||||
@ -27,8 +27,8 @@ import {
|
||||
freebitCancelAccountRawSchema,
|
||||
freebitEsimReissueRawSchema,
|
||||
freebitEsimAddAccountRawSchema,
|
||||
} from "./raw.types";
|
||||
import { normalizeAccount } from "./utils";
|
||||
} from "./raw.types.js";
|
||||
import { normalizeAccount } from "./utils.js";
|
||||
|
||||
function asString(value: unknown): string {
|
||||
if (typeof value === "string") return value;
|
||||
|
||||
@ -2,9 +2,9 @@
|
||||
* SIM Domain - Providers
|
||||
*/
|
||||
|
||||
import { Freebit as FreebitAggregated } from "./freebit/index";
|
||||
import * as FreebitModule from "./freebit/index";
|
||||
import { Freebit as FreebitAggregated } from "./freebit/index.js";
|
||||
import * as FreebitModule from "./freebit/index.js";
|
||||
|
||||
export const Freebit = FreebitAggregated;
|
||||
export { FreebitModule };
|
||||
export * from "./freebit/index";
|
||||
export * from "./freebit/index.js";
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
* 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
|
||||
|
||||
@ -45,4 +45,4 @@ export type {
|
||||
SubscriptionList,
|
||||
SubscriptionQueryParams,
|
||||
SubscriptionQuery,
|
||||
} from './schema';
|
||||
} from './schema.js';
|
||||
|
||||
@ -7,10 +7,10 @@
|
||||
*/
|
||||
|
||||
// Constants
|
||||
export { SUBSCRIPTION_STATUS, SUBSCRIPTION_CYCLE } from "./contract";
|
||||
export { SUBSCRIPTION_STATUS, SUBSCRIPTION_CYCLE } from "./contract.js";
|
||||
|
||||
// Schemas (includes derived types)
|
||||
export * from "./schema";
|
||||
export * from "./schema.js";
|
||||
|
||||
// Re-export types for convenience
|
||||
export type {
|
||||
@ -23,10 +23,10 @@ export type {
|
||||
SubscriptionStats,
|
||||
SimActionResponse,
|
||||
SimPlanChangeResult,
|
||||
} from './schema';
|
||||
} from './schema.js';
|
||||
|
||||
// Provider adapters
|
||||
export * as Providers from "./providers/index";
|
||||
export * as Providers from "./providers/index.js";
|
||||
|
||||
// Re-export provider raw types (request and response)
|
||||
export type {
|
||||
@ -34,8 +34,8 @@ export type {
|
||||
WhmcsGetClientsProductsParams,
|
||||
// Response types
|
||||
WhmcsProductListResponse,
|
||||
} from "./providers/whmcs/raw.types";
|
||||
} from "./providers/whmcs/raw.types.js";
|
||||
|
||||
export {
|
||||
whmcsProductListResponseSchema,
|
||||
} from "./providers/whmcs/raw.types";
|
||||
} from "./providers/whmcs/raw.types.js";
|
||||
|
||||
@ -2,8 +2,8 @@
|
||||
* Subscriptions Domain - Providers
|
||||
*/
|
||||
|
||||
import * as WhmcsMapper from "./whmcs/mapper";
|
||||
import * as WhmcsRaw from "./whmcs/raw.types";
|
||||
import * as WhmcsMapper from "./whmcs/mapper.js";
|
||||
import * as WhmcsRaw from "./whmcs/raw.types.js";
|
||||
|
||||
export const Whmcs = {
|
||||
...WhmcsMapper,
|
||||
@ -12,5 +12,5 @@ export const Whmcs = {
|
||||
};
|
||||
|
||||
export { WhmcsMapper, WhmcsRaw };
|
||||
export * from "./whmcs/mapper";
|
||||
export * from "./whmcs/raw.types";
|
||||
export * from "./whmcs/mapper.js";
|
||||
export * from "./whmcs/raw.types.js";
|
||||
|
||||
@ -1,2 +1,2 @@
|
||||
export * from "./mapper";
|
||||
export * from "./raw.types";
|
||||
export * from "./mapper.js";
|
||||
export * from "./raw.types.js";
|
||||
|
||||
@ -4,20 +4,20 @@
|
||||
* Transforms raw WHMCS product/service data into normalized subscription types.
|
||||
*/
|
||||
|
||||
import type { Subscription, SubscriptionStatus, SubscriptionCycle, SubscriptionList } from "../../contract";
|
||||
import { subscriptionSchema, subscriptionListSchema, subscriptionStatusSchema } from "../../schema";
|
||||
import type { Subscription, SubscriptionStatus, SubscriptionCycle, SubscriptionList } from "../../contract.js";
|
||||
import { subscriptionSchema, subscriptionListSchema, subscriptionStatusSchema } from "../../schema.js";
|
||||
import {
|
||||
type WhmcsProductRaw,
|
||||
whmcsProductRawSchema,
|
||||
whmcsCustomFieldsContainerSchema,
|
||||
whmcsProductListResponseSchema,
|
||||
} from "./raw.types";
|
||||
} from "./raw.types.js";
|
||||
import {
|
||||
parseAmount,
|
||||
formatDate,
|
||||
normalizeStatus,
|
||||
normalizeCycle,
|
||||
} from "../../../providers/whmcs/utils";
|
||||
} from "../../../providers/whmcs/utils.js";
|
||||
|
||||
export interface TransformSubscriptionOptions {
|
||||
defaultCurrencyCode?: string;
|
||||
|
||||
@ -12,14 +12,14 @@ export {
|
||||
SUPPORT_CASE_PRIORITY,
|
||||
SUPPORT_CASE_CATEGORY,
|
||||
PORTAL_CASE_ORIGIN,
|
||||
} from "./contract";
|
||||
} from "./contract.js";
|
||||
|
||||
// Schemas (includes derived types)
|
||||
export * from "./schema";
|
||||
export * from "./schema.js";
|
||||
|
||||
// Provider adapters
|
||||
export * as Providers from "./providers/index";
|
||||
export * as Providers from "./providers/index.js";
|
||||
|
||||
// Re-export provider types for convenience
|
||||
export * from "./providers/salesforce/raw.types";
|
||||
export * from "./providers/salesforce/mapper";
|
||||
export * from "./providers/salesforce/raw.types.js";
|
||||
export * from "./providers/salesforce/mapper.js";
|
||||
|
||||
@ -2,8 +2,8 @@
|
||||
* Support Domain - Providers
|
||||
*/
|
||||
|
||||
import * as SalesforceMapper from "./salesforce/mapper";
|
||||
import * as SalesforceRaw from "./salesforce/raw.types";
|
||||
import * as SalesforceMapper from "./salesforce/mapper.js";
|
||||
import * as SalesforceRaw from "./salesforce/raw.types.js";
|
||||
|
||||
export const Salesforce = {
|
||||
...SalesforceMapper,
|
||||
@ -13,6 +13,6 @@ export const Salesforce = {
|
||||
};
|
||||
|
||||
export { SalesforceMapper, SalesforceRaw };
|
||||
export * from "./salesforce/mapper";
|
||||
export * from "./salesforce/raw.types";
|
||||
export * from "./salesforce/mapper.js";
|
||||
export * from "./salesforce/raw.types.js";
|
||||
|
||||
|
||||
@ -2,6 +2,6 @@
|
||||
* Support Domain - Salesforce Provider
|
||||
*/
|
||||
|
||||
export * from "./raw.types";
|
||||
export * from "./mapper";
|
||||
export * from "./raw.types.js";
|
||||
export * from "./mapper.js";
|
||||
|
||||
|
||||
@ -4,14 +4,14 @@
|
||||
* Transform functions to convert raw Salesforce Case records to domain types.
|
||||
*/
|
||||
|
||||
import { supportCaseSchema, type SupportCase } from "../../schema";
|
||||
import type { SalesforceCaseRecord } from "./raw.types";
|
||||
import { supportCaseSchema, type SupportCase } from "../../schema.js";
|
||||
import type { SalesforceCaseRecord } from "./raw.types.js";
|
||||
import {
|
||||
getStatusDisplayLabel,
|
||||
getPriorityDisplayLabel,
|
||||
SALESFORCE_CASE_STATUS,
|
||||
SALESFORCE_CASE_PRIORITY,
|
||||
} from "./raw.types";
|
||||
} from "./raw.types.js";
|
||||
|
||||
// ============================================================================
|
||||
// Helper Functions
|
||||
|
||||
@ -3,7 +3,7 @@ import {
|
||||
SUPPORT_CASE_STATUS,
|
||||
SUPPORT_CASE_PRIORITY,
|
||||
SUPPORT_CASE_CATEGORY,
|
||||
} from "./contract";
|
||||
} from "./contract.js";
|
||||
|
||||
/**
|
||||
* Portal status values (mapped from Salesforce Japanese API names)
|
||||
|
||||
@ -4,8 +4,8 @@
|
||||
* Formatting utilities for currency, dates, phone numbers, etc.
|
||||
*/
|
||||
|
||||
export * from "./currency";
|
||||
export * from "./date";
|
||||
export * from "./phone";
|
||||
export * from "./text";
|
||||
export * from "./currency.js";
|
||||
export * from "./date.js";
|
||||
export * from "./phone.js";
|
||||
export * from "./text.js";
|
||||
|
||||
|
||||
@ -4,16 +4,16 @@
|
||||
* Utility functions and helpers used across all domain packages.
|
||||
*/
|
||||
|
||||
export * as Formatting from "./formatting/index";
|
||||
export * as Validation from "./validation/index";
|
||||
export * as Typing from "./typing/index";
|
||||
export * as Formatting from "./formatting/index.js";
|
||||
export * as Validation from "./validation/index.js";
|
||||
export * as Typing from "./typing/index.js";
|
||||
|
||||
// Re-export commonly used utilities for convenience
|
||||
export { formatCurrency } from "./formatting/currency";
|
||||
export type { SupportedCurrency } from "./formatting/currency";
|
||||
export { formatCurrency } from "./formatting/currency.js";
|
||||
export type { SupportedCurrency } from "./formatting/currency.js";
|
||||
|
||||
// Re-export AsyncState types and helpers
|
||||
export type { AsyncState } from "./typing/helpers";
|
||||
export type { AsyncState } from "./typing/helpers.js";
|
||||
export {
|
||||
createIdleState,
|
||||
createLoadingState,
|
||||
@ -23,5 +23,5 @@ export {
|
||||
isLoading,
|
||||
isSuccess,
|
||||
isError,
|
||||
} from "./typing/helpers";
|
||||
} from "./typing/helpers.js";
|
||||
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
* TypeScript type utilities and runtime type checking.
|
||||
*/
|
||||
|
||||
export * from "./guards";
|
||||
export * from "./assertions";
|
||||
export * from "./helpers";
|
||||
export * from "./guards.js";
|
||||
export * from "./assertions.js";
|
||||
export * from "./helpers.js";
|
||||
|
||||
|
||||
@ -4,9 +4,9 @@
|
||||
* Validation utilities for common data types.
|
||||
*/
|
||||
|
||||
export * from "./email";
|
||||
export * from "./url";
|
||||
export * from "./string";
|
||||
export * from "./helpers";
|
||||
export * from "./email.js";
|
||||
export * from "./url.js";
|
||||
export * from "./string.js";
|
||||
export * from "./helpers.js";
|
||||
|
||||
|
||||
|
||||
@ -5,9 +5,8 @@
|
||||
"outDir": "./dist",
|
||||
"rootDir": ".",
|
||||
"tsBuildInfoFile": "./dist/.tsbuildinfo",
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "Bundler",
|
||||
"verbatimModuleSyntax": false
|
||||
"module": "NodeNext",
|
||||
"moduleResolution": "NodeNext"
|
||||
},
|
||||
"include": [
|
||||
"auth/**/*",
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
"$schema": "https://json.schemastore.org/tsconfig",
|
||||
"compilerOptions": {
|
||||
"target": "ES2024",
|
||||
"lib": ["ES2024"],
|
||||
"lib": ["ESNext"],
|
||||
"strict": true,
|
||||
"noImplicitReturns": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user