tema 1283880f7d Revamp Physical SIM activation to use PA02-01 + PA05-05
Replace PA05-33 OTA API with the proper two-step activation flow:
- PA02-01: Account Registration (/master/addAcnt/)
- PA05-05: Voice Options Registration (/mvno/talkoption/addOrder/)

Changes:
- Add FreebitAccountRegistrationService for PA02-01 account registration
- Add FreebitVoiceOptionsService for PA05-05 voice options
- Update SimFulfillmentService to use new APIs instead of PA05-33 OTA
- Add SalesforceSIMInventoryService for fetching SIM inventory data
- Remove deprecated FreebitOtaService (PA05-33 no longer used)
- Remove debug console.log statements

The new flow:
1. Fetch SIM inventory from Salesforce (phone number, PT number)
2. Call PA02-01 to register MVNO account with plan code
3. Call PA05-05 to configure voice options with customer identity
4. Update SIM inventory status to "In Use"

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 18:22:00 +09:00

33 lines
826 B
TypeScript

/**
* SIM Domain
*
* Exports SIM contracts + schemas.
*
* Provider adapters (BFF-only) live under: `@customer-portal/domain/sim/providers`.
*
* Types are derived from Zod schemas (Schema-First Approach)
*/
// Constants
export { SIM_STATUS, SIM_TYPE, SIM_PLAN_CODES, SIM_PLAN_LABELS } from "./contract.js";
// Schemas (includes derived types)
export * from "./schema.js";
export * from "./lifecycle.js";
// Validation functions
export * from "./validation.js";
export {
canManageActiveSim,
canReissueEsim,
canCancelSim,
canTopUpSim,
formatSimPlanShort,
SIM_PLAN_OPTIONS,
getSimPlanLabel,
buildSimFeaturesUpdatePayload,
mapProductToFreebitPlanCode,
} from "./helpers.js";
export type { SimPlanCode } from "./contract.js";
export type { SimPlanOption, SimFeatureToggleSnapshot } from "./helpers.js";