71 lines
3.3 KiB
TypeScript

import * as Mapper from "./mapper";
import * as RawTypes from "./raw.types";
import * as Requests from "./requests";
import * as Utils from "./utils";
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";
export * from "./raw.types";
export * from "./requests";
export * from "./utils";
export const Freebit = {
...Mapper,
...Utils,
mapper: Mapper,
raw: RawTypes,
schemas,
requests: Requests,
utils: Utils,
};
// Deprecated: use Freebit.normalizeAccount
export const normalizeAccount = Utils.normalizeAccount;