barsa 1b944f57aa Update Configuration Files and Refactor Code Structure
- Adjusted .prettierrc to ensure consistent formatting with a newline at the end of the file.
- Reformatted eslint.config.mjs for improved readability by aligning array elements.
- Updated pnpm-lock.yaml to use single quotes for consistency across dependencies.
- Simplified worktree setup in .cursor/worktrees.json for cleaner configuration.
- Enhanced documentation in .cursor/plans to clarify architecture refactoring.
- Refactored various service files for improved readability and maintainability, including rate-limiting and auth services.
- Updated imports and exports across multiple files for consistency and clarity.
- Improved error handling and logging in service methods to enhance debugging capabilities.
- Streamlined utility functions for better performance and maintainability across the domain packages.
2025-12-25 17:30:02 +09:00

75 lines
3.4 KiB
TypeScript

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,
trafficInfo: Requests.freebitTrafficInfoRequestSchema,
topUp: Requests.freebitTopUpRequestPayloadSchema,
topUpApi: Requests.freebitTopUpApiRequestSchema,
planChange: Requests.freebitPlanChangeRequestSchema,
planChangeApi: Requests.freebitPlanChangeApiRequestSchema,
addSpec: Requests.freebitAddSpecRequestSchema,
cancelPlan: Requests.freebitCancelPlanRequestSchema,
cancelPlanApi: Requests.freebitCancelPlanApiRequestSchema,
quotaHistory: Requests.freebitQuotaHistoryRequestSchema,
esimReissue: Requests.freebitEsimReissueRequestSchema,
simFeatures: Requests.freebitSimFeaturesRequestSchema,
globalIp: Requests.freebitGlobalIpRequestSchema,
esimActivationParams: Requests.freebitEsimActivationParamsSchema,
esimActivationRequest: Requests.freebitEsimActivationRequestSchema,
esimAddAccount: Requests.freebitEsimAddAccountRequestSchema,
auth: Requests.freebitAuthRequestSchema,
cancelAccount: Requests.freebitCancelAccountRequestSchema,
};
export const raw = RawTypes;
export const mapper = Mapper;
export const requests = Requests;
export type EsimAccountActivationRequest = Requests.FreebitEsimActivationRequest;
export type TopUpRequest = Requests.FreebitTopUpRequest;
export type TopUpApiRequest = Requests.FreebitTopUpApiRequest;
export type PlanChangeRequest = Requests.FreebitPlanChangeRequest;
export type PlanChangeApiRequest = Requests.FreebitPlanChangeApiRequest;
export type SimFeaturesRequest = Requests.FreebitSimFeaturesRequest;
export type QuotaHistoryRequest = Requests.FreebitQuotaHistoryRequest;
export type EsimAddAccountRequest = Requests.FreebitEsimAddAccountRequest;
export type TrafficInfoRequest = Requests.FreebitTrafficInfoRequest;
export type CancelPlanRequest = Requests.FreebitCancelPlanRequest;
export type CancelPlanApiRequest = Requests.FreebitCancelPlanApiRequest;
export type CancelAccountRequest = Requests.FreebitCancelAccountRequest;
export type AuthRequest = Requests.FreebitAuthRequest;
export type TopUpResponse = ReturnType<typeof Mapper.transformFreebitTopUpResponse>;
export type AddSpecResponse = ReturnType<typeof Mapper.transformFreebitAddSpecResponse>;
export type PlanChangeResponse = ReturnType<typeof Mapper.transformFreebitPlanChangeResponse>;
export type CancelPlanResponse = ReturnType<typeof Mapper.transformFreebitCancelPlanResponse>;
export type CancelAccountResponse = ReturnType<typeof Mapper.transformFreebitCancelAccountResponse>;
export type EsimReissueResponse = ReturnType<typeof Mapper.transformFreebitEsimReissueResponse>;
export type EsimAddAccountResponse = ReturnType<
typeof Mapper.transformFreebitEsimAddAccountResponse
>;
export type EsimActivationResponse = ReturnType<
typeof Mapper.transformFreebitEsimActivationResponse
>;
export type AuthResponse = ReturnType<typeof Mapper.transformFreebitAuthResponse>;
export * from "./mapper.js";
export * from "./raw.types.js";
export * from "./requests.js";
export * from "./utils.js";
export const Freebit = {
...Mapper,
...Utils,
mapper: Mapper,
raw: RawTypes,
schemas,
requests: Requests,
utils: Utils,
};
// Deprecated: use Freebit.normalizeAccount
export const normalizeAccount = Utils.normalizeAccount;