myxl-core 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -0
- package/dist/@types/payment.d.ts +10 -0
- package/dist/auth.d.ts +20 -0
- package/dist/auth.js +157 -0
- package/dist/ciam.d.ts +259 -0
- package/dist/ciam.js +351 -0
- package/dist/client.d.ts +56 -0
- package/dist/client.js +276 -0
- package/dist/config.d.ts +14 -0
- package/dist/config.js +70 -0
- package/dist/device.d.ts +23 -0
- package/dist/device.js +107 -0
- package/dist/encrypt.d.ts +37 -0
- package/dist/encrypt.js +259 -0
- package/dist/family-plan.d.ts +28 -0
- package/dist/family-plan.js +325 -0
- package/dist/family.d.ts +146 -0
- package/dist/family.js +365 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.js +1487 -0
- package/dist/lib/decoy.d.ts +17 -0
- package/dist/lib/decoy.js +117 -0
- package/dist/lib/encrypt-helper.d.ts +71 -0
- package/dist/lib/encrypt-helper.js +166 -0
- package/dist/lib/payment.d.ts +116 -0
- package/dist/lib/payment.js +271 -0
- package/dist/lib/utils.d.ts +15 -0
- package/dist/lib/utils.js +290 -0
- package/dist/notification.d.ts +28 -0
- package/dist/notification.js +275 -0
- package/dist/package.d.ts +259 -0
- package/dist/package.js +387 -0
- package/dist/payments/balance.d.ts +2 -0
- package/dist/payments/balance.js +408 -0
- package/dist/payments/decoy.d.ts +1 -0
- package/dist/payments/decoy.js +6 -0
- package/dist/payments/ewallet.d.ts +11 -0
- package/dist/payments/ewallet.js +373 -0
- package/dist/payments/index.d.ts +3 -0
- package/dist/payments/index.js +632 -0
- package/dist/payments/qris.d.ts +2 -0
- package/dist/payments/qris.js +378 -0
- package/dist/profile.d.ts +1 -0
- package/dist/profile.js +266 -0
- package/dist/verification.d.ts +2 -0
- package/dist/verification.js +279 -0
- package/package.json +116 -0
package/README.md
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# myxl-core
|
|
2
|
+
|
|
3
|
+
To install dependencies:
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
bun install
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
To run:
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
bun run index.ts
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
This project was created using `bun init` in bun v1.3.14. [Bun](https://bun.com) is a fast all-in-one JavaScript runtime.
|
package/dist/auth.d.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { AuthToken } from "./ciam";
|
|
2
|
+
type OtpResponse = {
|
|
3
|
+
expires_in: number;
|
|
4
|
+
max_validation_attempt_suspend_duration: number;
|
|
5
|
+
max_validation_attempt: number;
|
|
6
|
+
next_resend_allowed_at: number;
|
|
7
|
+
max_validation_suspend_duration: number;
|
|
8
|
+
max_request_attempt: number;
|
|
9
|
+
max_request_suspend_duration: number;
|
|
10
|
+
subscriber_id: string;
|
|
11
|
+
type: string;
|
|
12
|
+
};
|
|
13
|
+
export declare function getOtp(contact: string, axDeviceId: string, axFingerprint: string): Promise<OtpResponse>;
|
|
14
|
+
type IContactType = "SMS" | "DEVICEID";
|
|
15
|
+
export declare function submitOtp(contactType: IContactType, contact: string, code: string, axDeviceId: string, axFingerprint: string): Promise<AuthToken>;
|
|
16
|
+
/**
|
|
17
|
+
* Submit SMS OTP only, using same CIAM flow as above.
|
|
18
|
+
*/
|
|
19
|
+
export declare function submitSmsOtp(contact: string, code: string, axDeviceId: string, axFingerprint: string): Promise<any>;
|
|
20
|
+
export {};
|
package/dist/auth.js
ADDED
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
|
3
|
+
|
|
4
|
+
// src/lib/encrypt-helper.ts
|
|
5
|
+
import crypto from "crypto";
|
|
6
|
+
function makeAxApiSignature(tsForSign, contact, code, contactType) {
|
|
7
|
+
const preimage = `${tsForSign}password${contactType}${contact}${code}openid`;
|
|
8
|
+
const digest = crypto.createHmac("sha256", Buffer.from(AX_API_SIG_KEY, "ascii")).update(preimage).digest();
|
|
9
|
+
return digest.toString("base64");
|
|
10
|
+
}
|
|
11
|
+
var init_encrypt_helper = __esm(() => {
|
|
12
|
+
init_config();
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
// src/encrypt.ts
|
|
16
|
+
var init_encrypt = __esm(() => {
|
|
17
|
+
init_config();
|
|
18
|
+
init_encrypt_helper();
|
|
19
|
+
init_encrypt_helper();
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
// src/lib/utils.ts
|
|
23
|
+
import axios from "axios";
|
|
24
|
+
import { v4 as uuidv4 } from "uuid";
|
|
25
|
+
import { DateTime } from "luxon";
|
|
26
|
+
function javaLikeTimestamp(dt = DateTime.now()) {
|
|
27
|
+
return dt.toMillis().toString();
|
|
28
|
+
}
|
|
29
|
+
function base64Encode(str) {
|
|
30
|
+
return Buffer.from(str, "utf-8").toString("base64");
|
|
31
|
+
}
|
|
32
|
+
function tsGmt7WithoutColon(date) {
|
|
33
|
+
let formatted = date.toFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZZ");
|
|
34
|
+
if (formatted.endsWith("+07:00")) {
|
|
35
|
+
formatted = formatted.replace("+07:00", "+0700");
|
|
36
|
+
}
|
|
37
|
+
return formatted;
|
|
38
|
+
}
|
|
39
|
+
function unseal(getter, fallback) {
|
|
40
|
+
try {
|
|
41
|
+
const hex = getter();
|
|
42
|
+
if (!hex || typeof __SEED__ === "undefined")
|
|
43
|
+
return fallback;
|
|
44
|
+
const seed = Buffer.from(__SEED__, "hex");
|
|
45
|
+
const data = Buffer.from(hex, "hex");
|
|
46
|
+
return Buffer.from(data.map((b, i) => b ^ seed[i % seed.length])).toString("utf8");
|
|
47
|
+
} catch {
|
|
48
|
+
return fallback;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
var init_utils = __esm(() => {
|
|
52
|
+
init_config();
|
|
53
|
+
init_encrypt();
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
// src/config.ts
|
|
57
|
+
var BASE_API_URL, BASE_CIAM_URL, BASIC_AUTH, AX_FP_KEY, UA, API_KEY, ENCRYPTED_FIELD_KEY, XDATA_KEY, AX_API_SIG_KEY, X_API_BASE_SECRET, CIRCLE_MSISDN_KEY;
|
|
58
|
+
var init_config = __esm(() => {
|
|
59
|
+
init_utils();
|
|
60
|
+
BASE_API_URL = unseal(() => __E_BASE_API_URL__, "https://api.myxl.xlaxiata.co.id");
|
|
61
|
+
BASE_CIAM_URL = unseal(() => __E_BASE_CIAM_URL__, "https://gede.ciam.xlaxiata.co.id");
|
|
62
|
+
BASIC_AUTH = unseal(() => __E_BASIC_AUTH__, "OWZjOTdlZDEtNmEzMC00OGQ1LTk1MTYtNjBjNTNjZTNhMTM1OllEV21GNExKajlYSUt3UW56eTJlMmxiMHRKUWIyOW8z");
|
|
63
|
+
AX_FP_KEY = unseal(() => __E_AX_FP_KEY__, "18b4d589826af50241177961590e6693");
|
|
64
|
+
UA = unseal(() => __E_UA__, "myXL / 8.9.0(1202); com.android.vending; (samsung; SM-N935F; SDK 33; Android 13)");
|
|
65
|
+
API_KEY = unseal(() => __E_API_KEY__, "vT8tINqHaOxXbGE7eOWAhA==");
|
|
66
|
+
ENCRYPTED_FIELD_KEY = unseal(() => __E_ENCRYPTED_FIELD_KEY__, "5dccbf08920a5527");
|
|
67
|
+
XDATA_KEY = unseal(() => __E_XDATA_KEY__, "5dccbf08920a5527b99e222789c34bb7");
|
|
68
|
+
AX_API_SIG_KEY = unseal(() => __E_AX_API_SIG_KEY__, "18b4d589826af50241177961590e6693");
|
|
69
|
+
X_API_BASE_SECRET = unseal(() => __E_X_API_BASE_SECRET__, "mU1Y4n1vBjf3M7tMnRkFU08mVyUJHed8B5En3EAniu1mXLixeuASmBmKnkyzVziOye7rG5nIekMdthensbQMcOJ6SLnrkGyfXALD7mrBC6vuWv6G01pmD3XlU5rT7Tzx");
|
|
70
|
+
CIRCLE_MSISDN_KEY = unseal(() => __E_CIRCLE_MSISDN_KEY__, "5dccbf08920a5527");
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
// src/auth.ts
|
|
74
|
+
init_config();
|
|
75
|
+
init_utils();
|
|
76
|
+
init_encrypt();
|
|
77
|
+
import axios2 from "axios";
|
|
78
|
+
import { v4 as uuidv42 } from "uuid";
|
|
79
|
+
import { DateTime as DateTime2, FixedOffsetZone } from "luxon";
|
|
80
|
+
import * as crypto2 from "crypto";
|
|
81
|
+
async function getOtp(contact, axDeviceId, axFingerprint) {
|
|
82
|
+
const url = BASE_CIAM_URL + "/realms/xl-ciam/auth/otp";
|
|
83
|
+
const querystring = {
|
|
84
|
+
contact,
|
|
85
|
+
contactType: "SMS",
|
|
86
|
+
alternateContact: "false"
|
|
87
|
+
};
|
|
88
|
+
const gmt7Zone = FixedOffsetZone.instance(420);
|
|
89
|
+
const now = DateTime2.now().setZone(gmt7Zone);
|
|
90
|
+
const ax_request_at = javaLikeTimestamp(now);
|
|
91
|
+
const ax_request_id = uuidv42();
|
|
92
|
+
const headers = {
|
|
93
|
+
"Accept-Encoding": "gzip, deflate, br",
|
|
94
|
+
Authorization: `Basic ${BASIC_AUTH}`,
|
|
95
|
+
"Ax-Device-Id": axDeviceId,
|
|
96
|
+
"Ax-Fingerprint": axFingerprint,
|
|
97
|
+
"Ax-Request-At": ax_request_at,
|
|
98
|
+
"Ax-Request-Device": "samsung",
|
|
99
|
+
"Ax-Request-Device-Model": "SM-N935F",
|
|
100
|
+
"Ax-Request-Id": ax_request_id,
|
|
101
|
+
"Ax-Substype": "PREPAID",
|
|
102
|
+
"Content-Type": "application/json",
|
|
103
|
+
Host: BASE_CIAM_URL.replace(/^https?:\/\//, ""),
|
|
104
|
+
"User-Agent": UA
|
|
105
|
+
};
|
|
106
|
+
const { data } = await axios2.get(url, {
|
|
107
|
+
headers,
|
|
108
|
+
params: querystring,
|
|
109
|
+
timeout: 30000
|
|
110
|
+
});
|
|
111
|
+
return data;
|
|
112
|
+
}
|
|
113
|
+
async function submitOtp(contactType, contact, code, axDeviceId, axFingerprint) {
|
|
114
|
+
let finalContact = "";
|
|
115
|
+
let finalCode = "";
|
|
116
|
+
if (contactType === "SMS") {
|
|
117
|
+
finalContact = contact;
|
|
118
|
+
finalCode = code;
|
|
119
|
+
} else if (contactType === "DEVICEID") {
|
|
120
|
+
finalContact = base64Encode(contact);
|
|
121
|
+
finalCode = code;
|
|
122
|
+
}
|
|
123
|
+
const url = BASE_CIAM_URL + "/realms/xl-ciam/protocol/openid-connect/token";
|
|
124
|
+
const now = DateTime2.now().setZone("Asia/Jakarta");
|
|
125
|
+
const ts_for_sign = tsGmt7WithoutColon(now);
|
|
126
|
+
const ts_header = tsGmt7WithoutColon(now.minus({ minutes: 5 }));
|
|
127
|
+
const signature = await makeAxApiSignature(ts_for_sign, finalContact, code, contactType);
|
|
128
|
+
const payload = `contactType=${encodeURIComponent(contactType)}&code=${encodeURIComponent(finalCode)}&grant_type=password&contact=${encodeURIComponent(finalContact)}&scope=openid`;
|
|
129
|
+
const axRequestId = crypto2.randomUUID();
|
|
130
|
+
const headers = {
|
|
131
|
+
"Accept-Encoding": "gzip, deflate, br",
|
|
132
|
+
Authorization: `Basic ${BASIC_AUTH}`,
|
|
133
|
+
"Ax-Api-Signature": signature,
|
|
134
|
+
"Ax-Device-Id": axDeviceId,
|
|
135
|
+
"Ax-Fingerprint": axFingerprint,
|
|
136
|
+
"Ax-Request-At": ts_header,
|
|
137
|
+
"Ax-Request-Device": "samsung",
|
|
138
|
+
"Ax-Request-Device-Model": "SM-N935F",
|
|
139
|
+
"Ax-Request-Id": axRequestId,
|
|
140
|
+
"Ax-Substype": "PREPAID",
|
|
141
|
+
"Content-Type": "application/x-www-form-urlencoded",
|
|
142
|
+
"User-Agent": UA
|
|
143
|
+
};
|
|
144
|
+
const response = await axios2.post(url, payload, {
|
|
145
|
+
headers,
|
|
146
|
+
timeout: 30000
|
|
147
|
+
});
|
|
148
|
+
return response.data;
|
|
149
|
+
}
|
|
150
|
+
async function submitSmsOtp(contact, code, axDeviceId, axFingerprint) {
|
|
151
|
+
return submitOtp("SMS", contact, code, axDeviceId, axFingerprint);
|
|
152
|
+
}
|
|
153
|
+
export {
|
|
154
|
+
submitSmsOtp,
|
|
155
|
+
submitOtp,
|
|
156
|
+
getOtp
|
|
157
|
+
};
|
package/dist/ciam.d.ts
ADDED
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
export type AuthToken = {
|
|
2
|
+
access_token: string;
|
|
3
|
+
expires_in: number;
|
|
4
|
+
refresh_expires_in: number;
|
|
5
|
+
refresh_token: string;
|
|
6
|
+
token_type: string;
|
|
7
|
+
id_token: string;
|
|
8
|
+
'not-before-policy': number;
|
|
9
|
+
session_state: string;
|
|
10
|
+
scope: string;
|
|
11
|
+
};
|
|
12
|
+
export declare function getNewToken(refreshToken: string, axDeviceId: string, axFingerprint: string): Promise<AuthToken>;
|
|
13
|
+
export type Profile = {
|
|
14
|
+
age: number;
|
|
15
|
+
alternate_phone_number: string;
|
|
16
|
+
avatar: string;
|
|
17
|
+
card_id_editable: boolean;
|
|
18
|
+
dob: string;
|
|
19
|
+
dob_modified: number;
|
|
20
|
+
email: string;
|
|
21
|
+
login_email: string;
|
|
22
|
+
msisdn: string;
|
|
23
|
+
name: string;
|
|
24
|
+
registered_address: string;
|
|
25
|
+
registered_name: string;
|
|
26
|
+
subscriber_id: string;
|
|
27
|
+
subscription_type: string;
|
|
28
|
+
};
|
|
29
|
+
export type ProfileResponse = {
|
|
30
|
+
code: string;
|
|
31
|
+
data: {
|
|
32
|
+
profile: Profile;
|
|
33
|
+
};
|
|
34
|
+
status: string;
|
|
35
|
+
};
|
|
36
|
+
export declare function getProfile(accessToken: string, idToken: string): Promise<Profile>;
|
|
37
|
+
export type Balance = {
|
|
38
|
+
remaining: number;
|
|
39
|
+
expired_at: number;
|
|
40
|
+
};
|
|
41
|
+
export type PrioFlexBalance = {
|
|
42
|
+
remaining: number;
|
|
43
|
+
has_prio_flex: boolean;
|
|
44
|
+
};
|
|
45
|
+
export type CurrentCycle = {
|
|
46
|
+
start_date: string;
|
|
47
|
+
end_date: string;
|
|
48
|
+
};
|
|
49
|
+
export type BalanceAndCredit = {
|
|
50
|
+
subscription_status: string;
|
|
51
|
+
suspended_status: string;
|
|
52
|
+
balance: Balance;
|
|
53
|
+
prio_flex_balance: PrioFlexBalance;
|
|
54
|
+
credit_limit: number;
|
|
55
|
+
is_spend_limit_activated: boolean;
|
|
56
|
+
limit_percentage: number;
|
|
57
|
+
can_change_spend_limit: boolean;
|
|
58
|
+
is_spend_limit_reached: boolean;
|
|
59
|
+
current_cycle: CurrentCycle;
|
|
60
|
+
prio_x_status: string;
|
|
61
|
+
enterprise_type: string;
|
|
62
|
+
grace_end_date: number;
|
|
63
|
+
};
|
|
64
|
+
export type ExternalBalanceAndCreditResponse = {
|
|
65
|
+
code: string;
|
|
66
|
+
status: string;
|
|
67
|
+
data: BalanceAndCredit;
|
|
68
|
+
};
|
|
69
|
+
export declare function getBalance(idToken: string): Promise<ExternalBalanceAndCreditResponse>;
|
|
70
|
+
export type TieringInfo = {
|
|
71
|
+
code: string;
|
|
72
|
+
status: string;
|
|
73
|
+
data: {
|
|
74
|
+
tier: number;
|
|
75
|
+
current_spending: number;
|
|
76
|
+
current_point: number;
|
|
77
|
+
latest_tier_up_date: number;
|
|
78
|
+
flag_upgrade_downgrade: string;
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
export declare function getTieringInfo(idToken: string): Promise<TieringInfo>;
|
|
82
|
+
export type Redeemable = {
|
|
83
|
+
action_param: string;
|
|
84
|
+
action_type: string;
|
|
85
|
+
banner_information: string;
|
|
86
|
+
bonus_type: string;
|
|
87
|
+
category_code: string;
|
|
88
|
+
image_url: string;
|
|
89
|
+
is_sent: boolean;
|
|
90
|
+
is_voucher: boolean;
|
|
91
|
+
name: string;
|
|
92
|
+
order: number;
|
|
93
|
+
price: number;
|
|
94
|
+
program_id: string;
|
|
95
|
+
ribbon_icon_url: string;
|
|
96
|
+
ribbon_label: string;
|
|
97
|
+
star_category: string;
|
|
98
|
+
status: string;
|
|
99
|
+
valid_until: number;
|
|
100
|
+
validity_label: string;
|
|
101
|
+
};
|
|
102
|
+
export type RedeemableCategory = {
|
|
103
|
+
category_code: string;
|
|
104
|
+
category_name: string;
|
|
105
|
+
icon_url: string;
|
|
106
|
+
order: number;
|
|
107
|
+
redeemables: Redeemable[];
|
|
108
|
+
};
|
|
109
|
+
export type ExternalRedeemablesResponse = {
|
|
110
|
+
code: string;
|
|
111
|
+
data: {
|
|
112
|
+
categories: RedeemableCategory[];
|
|
113
|
+
};
|
|
114
|
+
status: string;
|
|
115
|
+
};
|
|
116
|
+
export declare function getRedeemables({ idToken, isEnterprise }: {
|
|
117
|
+
idToken: string;
|
|
118
|
+
isEnterprise: boolean;
|
|
119
|
+
}): Promise<ExternalRedeemablesResponse>;
|
|
120
|
+
export type ExternalProfileResponse = {
|
|
121
|
+
success: boolean;
|
|
122
|
+
code: string;
|
|
123
|
+
message: string;
|
|
124
|
+
data: {
|
|
125
|
+
subs_info: {
|
|
126
|
+
msisdn: string;
|
|
127
|
+
operator: string;
|
|
128
|
+
id_verified: string;
|
|
129
|
+
net_type: string;
|
|
130
|
+
tenure: string;
|
|
131
|
+
exp_date: string;
|
|
132
|
+
grace_until: string;
|
|
133
|
+
volte: {
|
|
134
|
+
device: boolean;
|
|
135
|
+
area: boolean;
|
|
136
|
+
simcard: boolean;
|
|
137
|
+
};
|
|
138
|
+
};
|
|
139
|
+
package_info: {
|
|
140
|
+
error_message: string | null;
|
|
141
|
+
packages: Array<{
|
|
142
|
+
name: string;
|
|
143
|
+
expiry: string;
|
|
144
|
+
timestamp: number;
|
|
145
|
+
quotas: Array<{
|
|
146
|
+
name: string;
|
|
147
|
+
percent: number;
|
|
148
|
+
total: string;
|
|
149
|
+
remaining: string;
|
|
150
|
+
}>;
|
|
151
|
+
}>;
|
|
152
|
+
};
|
|
153
|
+
};
|
|
154
|
+
};
|
|
155
|
+
export declare function checkQuota(msisdn: string): Promise<ExternalProfileResponse>;
|
|
156
|
+
export type QuotaBenefit = {
|
|
157
|
+
id: string;
|
|
158
|
+
name: string;
|
|
159
|
+
icon: string;
|
|
160
|
+
information: string;
|
|
161
|
+
data_type: string;
|
|
162
|
+
total: number;
|
|
163
|
+
remaining: number;
|
|
164
|
+
is_unlimited: boolean;
|
|
165
|
+
index: number;
|
|
166
|
+
is_shared: boolean;
|
|
167
|
+
is_usage_limit: boolean;
|
|
168
|
+
benefit_type: string;
|
|
169
|
+
benefit_category: string;
|
|
170
|
+
is_fup: boolean;
|
|
171
|
+
can_be_transfer: boolean;
|
|
172
|
+
};
|
|
173
|
+
export type QuotaPackageFamily = {
|
|
174
|
+
name: string;
|
|
175
|
+
package_family_code: string;
|
|
176
|
+
package_family_type: string;
|
|
177
|
+
is_family_plan: boolean;
|
|
178
|
+
flag: string;
|
|
179
|
+
payment_method: string;
|
|
180
|
+
plan_type: string;
|
|
181
|
+
background_color: string;
|
|
182
|
+
roaming: {
|
|
183
|
+
is_roaming: boolean;
|
|
184
|
+
is_hajj: boolean;
|
|
185
|
+
roaming_countries: string[];
|
|
186
|
+
};
|
|
187
|
+
flashsale_banner_url: string;
|
|
188
|
+
flashsale_background_image_url: string;
|
|
189
|
+
flashsale_countdown: number;
|
|
190
|
+
flashsale_live_duration: number;
|
|
191
|
+
flashsale_status: string;
|
|
192
|
+
rc_banner_information: string;
|
|
193
|
+
rc_banner_information_icon_url: string;
|
|
194
|
+
rc_bonus_type: string;
|
|
195
|
+
rc_valid_until: number;
|
|
196
|
+
};
|
|
197
|
+
export type QuotaPackageVariants = {
|
|
198
|
+
name: string;
|
|
199
|
+
package_variant_code: string;
|
|
200
|
+
image: string;
|
|
201
|
+
image_url: string;
|
|
202
|
+
};
|
|
203
|
+
export type QuotaAdditionalBenefitInfo = {
|
|
204
|
+
title: string;
|
|
205
|
+
icon: string;
|
|
206
|
+
content: string;
|
|
207
|
+
};
|
|
208
|
+
export type Quota = {
|
|
209
|
+
quota_code: string;
|
|
210
|
+
name: string;
|
|
211
|
+
icon: string;
|
|
212
|
+
expired_at: number;
|
|
213
|
+
is_expiration_unlimited: boolean;
|
|
214
|
+
is_unsubscribable: boolean;
|
|
215
|
+
benefits: QuotaBenefit[];
|
|
216
|
+
promo_code: string;
|
|
217
|
+
product_domain: string;
|
|
218
|
+
product_subscription_type: string;
|
|
219
|
+
action_message: string | null;
|
|
220
|
+
xcf_action_message: string | null;
|
|
221
|
+
subtitle: string;
|
|
222
|
+
package_family: QuotaPackageFamily;
|
|
223
|
+
package_family_plan_type: string;
|
|
224
|
+
package_variants: QuotaPackageVariants;
|
|
225
|
+
active_date: number;
|
|
226
|
+
recurring_date: number;
|
|
227
|
+
recurring_date_summary: number;
|
|
228
|
+
end_date: number;
|
|
229
|
+
group_name: string;
|
|
230
|
+
group_code: string;
|
|
231
|
+
is_recurring: boolean;
|
|
232
|
+
remaining_contract_month: number;
|
|
233
|
+
family_member_id: string;
|
|
234
|
+
family_plan_role: string;
|
|
235
|
+
transferable: string;
|
|
236
|
+
quota_transfer_specs: string[];
|
|
237
|
+
migrateable: boolean;
|
|
238
|
+
fup_limit_rule: string;
|
|
239
|
+
fup_limit_notice: string;
|
|
240
|
+
status_resubscribe: string;
|
|
241
|
+
subscribed_packages: null;
|
|
242
|
+
payment_method: string;
|
|
243
|
+
additional_benefit_info: QuotaAdditionalBenefitInfo;
|
|
244
|
+
additional_notice: string;
|
|
245
|
+
is_can_exchange_quota: boolean;
|
|
246
|
+
is_autobuy_eligible: boolean;
|
|
247
|
+
};
|
|
248
|
+
export type MyPackagesResponse = {
|
|
249
|
+
code: string;
|
|
250
|
+
status: string;
|
|
251
|
+
data: {
|
|
252
|
+
quotas: Quota[];
|
|
253
|
+
static_banners: string;
|
|
254
|
+
show_autobuy_banner: boolean;
|
|
255
|
+
};
|
|
256
|
+
};
|
|
257
|
+
export declare function fetchMyPackages({ idToken }: {
|
|
258
|
+
idToken: string;
|
|
259
|
+
}): Promise<MyPackagesResponse>;
|