132 lines
2.9 KiB
TypeScript
132 lines
2.9 KiB
TypeScript
export namespace NosApi {
|
|
|
|
export type ActivationData = {
|
|
/**
|
|
The unique physical subscriber identifier:
|
|
Cellular - the ICCID
|
|
Non - IP - the EUI
|
|
Satellite - the IMEI
|
|
*/
|
|
physicalId: string,
|
|
|
|
/**
|
|
example: 447000000001
|
|
The unique network subscriber identifier:
|
|
|
|
Cellular subscriber - the MSISDN
|
|
Non - IP subscriber - the Device EUI
|
|
Satellite subscriber - the Subscription ID
|
|
*/
|
|
subscriberId: string,
|
|
|
|
/**
|
|
example: 9999
|
|
If the subscriber uses Circuit Switched Data(CSD), this field displays its data number.If the subscriber does not use CSD, this field is null.
|
|
*/
|
|
dataNumber: string
|
|
|
|
/**
|
|
example: 172.0.0.1
|
|
The subscriber IP address.
|
|
*/
|
|
ip: string
|
|
|
|
/**
|
|
example: 234150000000001
|
|
The subscriber IMSI.
|
|
*/
|
|
imsi: string
|
|
|
|
}
|
|
|
|
type OkResponse<T> = {
|
|
error?: undefined | null,
|
|
content: T
|
|
}
|
|
|
|
type ErrorResponse<E = GeneralError> = {
|
|
content?: undefined | null,
|
|
error: E
|
|
}
|
|
|
|
type GeneralError = {
|
|
children?: string[],
|
|
code: string,
|
|
message: string
|
|
}
|
|
|
|
export type ActivateResponseOK = OkResponse<ActivationData>
|
|
export type ActivateResponseError = ErrorResponse
|
|
export type ActivateResponse = ActivateResponseOK | ActivateResponseError
|
|
|
|
export type LineDataResponseOK = OkResponse<LineData>
|
|
export type LineDataResponseError = ErrorResponse
|
|
export type LineDataResponse = LineDataResponseOK | LineDataResponseError
|
|
|
|
export type PageDataResponseOk = OkResponse<LineData[]>
|
|
export type PageDataResponseError = OkResponse<LineData[]>
|
|
export type PageResponse = PageDataResponseOk | PageDataResponseError
|
|
|
|
export type LineData = {
|
|
physicalId: string
|
|
subscriberId: string
|
|
imsi: string
|
|
nickname: string
|
|
operatorCode: string
|
|
tariffName: string
|
|
lineRental: number
|
|
contractLength: number
|
|
isBarred: boolean
|
|
isActive: boolean
|
|
terminateDate: any
|
|
groupId: number
|
|
subscriberType: any
|
|
connectionDate: string
|
|
expiryDate: string
|
|
networkState: NetworkState
|
|
billingState: BillingState
|
|
operatorName: string
|
|
imei: string
|
|
dataUsage?: number
|
|
eid?: string
|
|
smdpProvider?: string
|
|
related?: {
|
|
parent: RelatedItem,
|
|
profiles: RelatedItem[]
|
|
}
|
|
}
|
|
|
|
type RelatedItem = {
|
|
physicalId: string
|
|
isEnabledOnParent: boolean
|
|
}
|
|
|
|
export type NetworkState = {
|
|
currentStateId: number
|
|
currentState: "active" | "barred" | "terminated"
|
|
isTransferring: boolean
|
|
lastTransferred: number
|
|
isOnline: boolean
|
|
lastSeenOnline: number
|
|
}
|
|
|
|
export type BillingState = {
|
|
currentStateId: number
|
|
currentState: "active" | "terminated"
|
|
}
|
|
|
|
export type BarData = {
|
|
product: string
|
|
description: string
|
|
enabled: boolean
|
|
}
|
|
|
|
export type BarResponseOk = OkResponse<BarData>
|
|
export type BarResponseError = ErrorResponse
|
|
export type BarResponse = BarResponseOk | BarResponseError
|
|
|
|
|
|
}
|
|
|
|
|