• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2024-2024 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 *     http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16/**
17 * @file
18 * @kit TelephonyKit
19 */
20
21import type { AsyncCallback } from './@ohos.base';
22
23/**
24 * This indicates that the eSIM card performs the profile management operation synchronously.
25 * Includes methods defined by GSMA Spec (SGP.22) and customized methods.
26 *
27 * @namespace eSIM
28 * @syscap SystemCapability.Telephony.CoreService.Esim
29 * @since 14
30 */
31declare namespace eSIM {
32  /**
33   * Whether embedded subscriptions are currently supported.
34   *
35   * @param { number } slotId - Indicates the card slot index number.
36   * @returns { boolean } Returns {@code true} if the eSIM capability is supported; returns {@code false} otherwise.
37   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
38   * 2. Incorrect parameter types. 3. Invalid parameter value.
39   * @throws { BusinessError } 3120001 - Service connection failed.
40   * @throws { BusinessError } 3120002 - System internal error.
41   * @syscap SystemCapability.Telephony.CoreService.Esim
42   * @since 14
43   */
44  function isSupported(slotId: number): boolean;
45
46  /**
47   * Starts a page through an ability, on which users can touch the button to download a profile.
48   *
49   * @permission ohos.permission.SET_TELEPHONY_ESIM_STATE_OPEN
50   * @param { DownloadableProfile } profile - Bound profile package data returned by the SM-DP+ server.
51   * @returns { Promise<boolean> } Returns {@code true} if the profile is added successfully;
52   * returns {@code false} otherwise.
53   * @throws { BusinessError } 201 - Permission denied.
54   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
55   * 2. Incorrect parameter types. 3. Invalid parameter value.
56   * @throws { BusinessError } 801 - Capability not supported.
57   * @throws { BusinessError } 3120001 - Service connection failed.
58   * @throws { BusinessError } 3120002 - System internal error.
59   * @syscap SystemCapability.Telephony.CoreService.Esim
60   * @since 14
61   */
62  function addProfile(profile: DownloadableProfile): Promise<boolean>;
63
64  /**
65   * Returns the EID identifying for the eUICC hardware.
66   *
67   * @permission ohos.permission.GET_TELEPHONY_ESIM_STATE
68   * @param { number } slotId - Indicates the card slot index number.
69   * @returns { Promise<string> } Returns the EID. When eUICC is not ready, the return value may be null.
70   * @throws { BusinessError } 201 - Permission denied.
71   * @throws { BusinessError } 202 - Non-system applications use system APIs.
72   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
73   * 2. Incorrect parameter types. 3. Invalid parameter value.
74   * @throws { BusinessError } 801 - Capability not supported.
75   * @throws { BusinessError } 3120001 - Service connection failed.
76   * @throws { BusinessError } 3120002 - System internal error.
77   * @syscap SystemCapability.Telephony.CoreService.Esim
78   * @systemapi Hide this for inner system use.
79   * @since 14
80   */
81  function getEid(slotId: number): Promise<string>;
82
83  /**
84   * Returns the current status of eUICC OS upgrade.
85   *
86   * @permission ohos.permission.GET_TELEPHONY_ESIM_STATE
87   * @param { number } slotId - Indicates the card slot index number.
88   * @returns { Promise<OsuStatus> } Return the status of eUICC OS upgrade.
89   * @throws { BusinessError } 201 - Permission denied.
90   * @throws { BusinessError } 202 - Non-system applications use system APIs.
91   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
92   * 2. Incorrect parameter types. 3. Invalid parameter value.
93   * @throws { BusinessError } 801 - Capability not supported.
94   * @throws { BusinessError } 3120001 - Service connection failed.
95   * @throws { BusinessError } 3120002 - System internal error.
96   * @syscap SystemCapability.Telephony.CoreService.Esim
97   * @systemapi Hide this for inner system use.
98   * @since 14
99   */
100  function getOsuStatus(slotId: number): Promise<OsuStatus>;
101
102  /**
103   * Execute OS upgrade if current OS upgrade is not the latest one.
104   *
105   * @permission ohos.permission.SET_TELEPHONY_ESIM_STATE
106   * @param { number } slotId - Indicates the card slot index number.
107   * @returns { Promise<OsuStatus> } Return the status of OS upgrade when OS upgrade status changed.
108   * @throws { BusinessError } 201 - Permission denied.
109   * @throws { BusinessError } 202 - Non-system applications use system APIs.
110   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
111   * 2. Incorrect parameter types. 3. Invalid parameter value.
112   * @throws { BusinessError } 801 - Capability not supported.
113   * @throws { BusinessError } 3120001 - Service connection failed.
114   * @throws { BusinessError } 3120002 - System internal error.
115   * @syscap SystemCapability.Telephony.CoreService.Esim
116   * @systemapi Hide this for inner system use.
117   * @since 14
118   */
119  function startOsu(slotId: number): Promise<OsuStatus>;
120
121  /**
122   * Fills in and gets the metadata for a downloadable profile.
123   *
124   * @permission ohos.permission.SET_TELEPHONY_ESIM_STATE
125   * @param { number } slotId - Indicates the card slot index number.
126   * @param { number } portIndex - Index of the port for the slot.
127   * @param { DownloadableProfile } profile - The Bound Profile Package data returned by SM-DP+ server.
128   * @param { boolean } forceDisableProfile - If true, the active profile must be disabled in order to perform the
129   * operation. Otherwise, the resultCode should return {@link RESULT_MUST_DISABLE_PROFILE} to allow
130   * the user to agree to this operation first.
131   * @returns { Promise<GetDownloadableProfileMetadataResult> } Return the metadata for profile.
132   * @throws { BusinessError } 201 - Permission denied.
133   * @throws { BusinessError } 202 - Non-system applications use system APIs.
134   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
135   * 2. Incorrect parameter types. 3. Invalid parameter value.
136   * @throws { BusinessError } 801 - Capability not supported.
137   * @throws { BusinessError } 3120001 - Service connection failed.
138   * @throws { BusinessError } 3120002 - System internal error.
139   * @syscap SystemCapability.Telephony.CoreService.Esim
140   * @systemapi Hide this for inner system use.
141   * @since 14
142   */
143  function getDownloadableProfileMetadata(slotId: number, portIndex: number,
144    profile: DownloadableProfile, forceDisableProfile: boolean): Promise<GetDownloadableProfileMetadataResult>;
145
146  /**
147   * Gets downloadable profile List which are available for download on this device.
148   *
149   * @permission ohos.permission.GET_TELEPHONY_ESIM_STATE
150   * @param { number } slotId - Indicates the card slot index number.
151   * @param { number } portIndex - Index of the port for the slot.
152   * @param { boolean } forceDisableProfile - If true, the active profile must be disabled in order to perform the
153   * operation. Otherwise, the resultCode should return {@link RESULT_MUST_DISABLE_PROFILE} to allow
154   * the user to agree to this operation first.
155   * @returns { Promise<GetDownloadableProfilesResult> } Return metadata for downloadableProfile which are
156   * available for download on this device.
157   * @throws { BusinessError } 201 - Permission denied.
158   * @throws { BusinessError } 202 - Non-system applications use system APIs.
159   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
160   * 2. Incorrect parameter types. 3. Invalid parameter value.
161   * @throws { BusinessError } 801 - Capability not supported.
162   * @throws { BusinessError } 3120001 - Service connection failed.
163   * @throws { BusinessError } 3120002 - System internal error.
164   * @syscap SystemCapability.Telephony.CoreService.Esim
165   * @systemapi Hide this for inner system use.
166   * @since 14
167   */
168  function getDownloadableProfiles(slotId: number, portIndex: number,
169    forceDisableProfile: boolean): Promise<GetDownloadableProfilesResult>;
170
171  /**
172   * Attempt to download the given downloadable Profile.
173   *
174   * @permission ohos.permission.SET_TELEPHONY_ESIM_STATE
175   * @param { number } slotId - Indicates the card slot index number.
176   * @param { number } portIndex - Index of the port for the slot.
177   * @param { DownloadableProfile } profile - The Bound Profile Package data returned by SM-DP+ server.
178   * @param { DownloadConfiguration } configuration - Configuration information during downloading.
179   * @returns { Promise<DownloadProfileResult> } Return the given downloadableProfile.
180   * @throws { BusinessError } 201 - Permission denied.
181   * @throws { BusinessError } 202 - Non-system applications use system APIs.
182   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
183   * 2. Incorrect parameter types. 3. Invalid parameter value.
184   * @throws { BusinessError } 801 - Capability not supported.
185   * @throws { BusinessError } 3120001 - Service connection failed.
186   * @throws { BusinessError } 3120002 - System internal error.
187   * @syscap SystemCapability.Telephony.CoreService.Esim
188   * @systemapi Hide this for inner system use.
189   * @since 14
190   */
191  function downloadProfile(slotId: number, portIndex: number, profile: DownloadableProfile,
192    configuration: DownloadConfiguration): Promise<DownloadProfileResult>;
193
194  /**
195   * Returns a list of all eUICC profile information.
196   *
197   * @permission ohos.permission.GET_TELEPHONY_ESIM_STATE
198   * @param { number } slotId - Indicates the card slot index number.
199   * @returns { Promise<GetEuiccProfileInfoListResult> } Return a list of eUICC profile information.
200   * @throws { BusinessError } 201 - Permission denied.
201   * @throws { BusinessError } 202 - Non-system applications use system APIs.
202   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
203   * 2. Incorrect parameter types. 3. Invalid parameter value.
204   * @throws { BusinessError } 801 - Capability not supported.
205   * @throws { BusinessError } 3120001 - Service connection failed.
206   * @throws { BusinessError } 3120002 - System internal error.
207   * @syscap SystemCapability.Telephony.CoreService.Esim
208   * @systemapi Hide this for inner system use.
209   * @since 14
210   */
211  function getEuiccProfileInfoList(slotId: number): Promise<GetEuiccProfileInfoListResult>;
212
213  /**
214   * Returns the eUICC Information.
215   *
216   * @permission ohos.permission.GET_TELEPHONY_ESIM_STATE
217   * @param { number } slotId - Indicates the card slot index number.
218   * @returns { Promise<EuiccInfo> } Returns the eUICC information to obtain. When eUICC is not ready,
219   * the return value may be null.
220   * @throws { BusinessError } 201 - Permission denied.
221   * @throws { BusinessError } 202 - Non-system applications use system APIs.
222   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
223   * 2. Incorrect parameter types. 3. Invalid parameter value.
224   * @throws { BusinessError } 801 - Capability not supported.
225   * @throws { BusinessError } 3120001 - Service connection failed.
226   * @throws { BusinessError } 3120002 - System internal error.
227   * @syscap SystemCapability.Telephony.CoreService.Esim
228   * @systemapi Hide this for inner system use.
229   * @since 14
230   */
231  function getEuiccInfo(slotId: number): Promise<EuiccInfo>;
232
233  /**
234   * Deletes the given profile from eUICC.
235   *
236   * @permission ohos.permission.SET_TELEPHONY_ESIM_STATE
237   * @param { number } slotId - Indicates the card slot index number.
238   * @param { string } iccid - The iccid of the profile.
239   * @returns { Promise<ResultCode> } Returns the response to deletes the given profile.
240   * @throws { BusinessError } 201 - Permission denied.
241   * @throws { BusinessError } 202 - Non-system applications use system APIs.
242   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
243   * 2. Incorrect parameter types. 3. Invalid parameter value.
244   * @throws { BusinessError } 801 - Capability not supported.
245   * @throws { BusinessError } 3120001 - Service connection failed.
246   * @throws { BusinessError } 3120002 - System internal error.
247   * @syscap SystemCapability.Telephony.CoreService.Esim
248   * @systemapi Hide this for inner system use.
249   * @since 14
250   */
251  function deleteProfile(slotId: number, iccid: string): Promise<ResultCode>;
252
253  /**
254   * Switch to (enable) the given profile on the eUICC.
255   *
256   * @permission ohos.permission.SET_TELEPHONY_ESIM_STATE
257   * @param { number } slotId - Indicates the card slot index number.
258   * @param { number } portIndex - Index of the port for the slot.
259   * @param { string } iccid - The iccid of the profile to switch to.
260   * @param { boolean } forceDisableProfile - If true, the active profile must be disabled in order to perform the
261   * operation. Otherwise, the resultCode should return {@link RESULT_MUST_DISABLE_PROFILE} to allow
262   * the user to agree to this operation first.
263   * @returns { Promise<ResultCode> } Returns the response to switch profile.
264   * @throws { BusinessError } 201 - Permission denied.
265   * @throws { BusinessError } 202 - Non-system applications use system APIs.
266   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
267   * 2. Incorrect parameter types. 3. Invalid parameter value.
268   * @throws { BusinessError } 801 - Capability not supported.
269   * @throws { BusinessError } 3120001 - Service connection failed.
270   * @throws { BusinessError } 3120002 - System internal error.
271   * @syscap SystemCapability.Telephony.CoreService.Esim
272   * @systemapi Hide this for inner system use.
273   * @since 14
274   */
275  function switchToProfile(slotId: number, portIndex: number, iccid: string,
276    forceDisableProfile: boolean): Promise<ResultCode>;
277
278  /**
279   * Adds or updates the given profile nickname.
280   *
281   * @permission ohos.permission.SET_TELEPHONY_ESIM_STATE
282   * @param { number } slotId - Indicates the card slot index number.
283   * @param { string } iccid - The iccid of the profile.
284   * @param { string } nickname - The nickname of the profile.
285   * @returns { Promise<ResultCode> } Returns the result of the set nickname operation.
286   * @throws { BusinessError } 201 - Permission denied.
287   * @throws { BusinessError } 202 - Non-system applications use system APIs.
288   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
289   * 2. Incorrect parameter types. 3. Invalid parameter value.
290   * @throws { BusinessError } 801 - Capability not supported.
291   * @throws { BusinessError } 3120001 - Service connection failed.
292   * @throws { BusinessError } 3120002 - System internal error.
293   * @syscap SystemCapability.Telephony.CoreService.Esim
294   * @systemapi Hide this for inner system use.
295   * @since 14
296   */
297  function setProfileNickname(slotId: number, iccid: string, nickname: string): Promise<ResultCode>;
298
299  /**
300   * Erase all specific profiles and reset the eUICC.
301   *
302   * @permission ohos.permission.SET_TELEPHONY_ESIM_STATE
303   * @param { number } slotId - Indicates the card slot index number.
304   * @param { ResetOption } options - Options for resetting eUICC memory.
305   * @returns { Promise<ResultCode> } Returns the result of the reset operation.
306   * @throws { BusinessError } 201 - Permission denied.
307   * @throws { BusinessError } 202 - Non-system applications use system APIs.
308   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
309   * 2. Incorrect parameter types. 3. Invalid parameter value.
310   * @throws { BusinessError } 801 - Capability not supported.
311   * @throws { BusinessError } 3120001 - Service connection failed.
312   * @throws { BusinessError } 3120002 - System internal error.
313   * @syscap SystemCapability.Telephony.CoreService.Esim
314   * @systemapi Hide this for inner system use.
315   * @since 14
316   */
317  function resetMemory(slotId: number, options?:ResetOption): Promise<ResultCode>;
318
319  /**
320   * Ensure that profiles will be retained on the next factory reset.
321   *
322   * @permission ohos.permission.SET_TELEPHONY_ESIM_STATE
323   * @param { number } slotId - Indicates the card slot index number.
324   * @returns { Promise<ResultCode> } Returns the result code.
325   * @throws { BusinessError } 201 - Permission denied.
326   * @throws { BusinessError } 202 - Non-system applications use system APIs.
327   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
328   * 2. Incorrect parameter types. 3. Invalid parameter value.
329   * @throws { BusinessError } 801 - Capability not supported.
330   * @throws { BusinessError } 3120001 - Service connection failed.
331   * @throws { BusinessError } 3120002 - System internal error.
332   * @syscap SystemCapability.Telephony.CoreService.Esim
333   * @systemapi Hide this for inner system use.
334   * @since 14
335   */
336  function reserveProfilesForFactoryRestore(slotId: number): Promise<ResultCode>;
337
338  /**
339   * Set or update the default SM-DP+ address stored in an eUICC.
340   *
341   * @permission ohos.permission.SET_TELEPHONY_ESIM_STATE
342   * @param { number } slotId - Indicates the card slot index number.
343   * @param { string } address -  The default SM-DP+ address to set.
344   * @returns { Promise<ResultCode> } Returns the result code.
345   * @throws { BusinessError } 201 - Permission denied.
346   * @throws { BusinessError } 202 - Non-system applications use system APIs.
347   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
348   * 2. Incorrect parameter types. 3. Invalid parameter value.
349   * @throws { BusinessError } 801 - Capability not supported.
350   * @throws { BusinessError } 3120001 - Service connection failed.
351   * @throws { BusinessError } 3120002 - System internal error.
352   * @syscap SystemCapability.Telephony.CoreService.Esim
353   * @systemapi Hide this for inner system use.
354   * @since 14
355   */
356  function setDefaultSmdpAddress(slotId: number, address: string): Promise<ResultCode>;
357
358  /**
359   * Gets the default SM-DP+ address stored in an eUICC.
360   *
361   * @permission ohos.permission.GET_TELEPHONY_ESIM_STATE
362   * @param { number } slotId - Indicates the card slot index number.
363   * @returns { Promise<string> } Returns the default SM-DP+ address.
364   * @throws { BusinessError } 201 - Permission denied.
365   * @throws { BusinessError } 202 - Non-system applications use system APIs.
366   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
367   * 2. Incorrect parameter types. 3. Invalid parameter value.
368   * @throws { BusinessError } 801 - Capability not supported.
369   * @throws { BusinessError } 3120001 - Service connection failed.
370   * @throws { BusinessError } 3120002 - System internal error.
371   * @syscap SystemCapability.Telephony.CoreService.Esim
372   * @systemapi Hide this for inner system use.
373   * @since 14
374   */
375  function getDefaultSmdpAddress(slotId: number): Promise<string>;
376
377  /**
378   * Cancel session can be used in the
379   * 1.after the response to "ES9+.AuthenticateClient"
380   * 2.after the response to "ES9+.GetBoundProfilePackage"
381   *
382   * @permission ohos.permission.SET_TELEPHONY_ESIM_STATE
383   * @param { number } slotId - Indicates the card slot index number.
384   * @param { string } transactionId - The transaction ID returned by SM-DP+ server.
385   * @param { CancelReason } cancelReason - The cancel reason.
386   * @returns { Promise<ResultCode> } Returns the result code.
387   * @throws { BusinessError } 201 - Permission denied.
388   * @throws { BusinessError } 202 - Non-system applications use system APIs.
389   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
390   * 2. Incorrect parameter types. 3. Invalid parameter value.
391   * @throws { BusinessError } 801 - Capability not supported.
392   * @throws { BusinessError } 3120001 - Service connection failed.
393   * @throws { BusinessError } 3120002 - System internal error.
394   * @syscap SystemCapability.Telephony.CoreService.Esim
395   * @systemapi Hide this for inner system use.
396   * @since 14
397   */
398  function cancelSession(slotId: number, transactionId: string, cancelReason: CancelReason): Promise<ResultCode>;
399
400  /**
401   * Establishes a single UICC access rule pursuant to the GlobalPlatform Secure Element Access Control specification.
402   *
403   * @interface AccessRule
404   * @syscap SystemCapability.Telephony.CoreService.Esim
405   * @systemapi Hide this for inner system use.
406   * @since 14
407   */
408  export interface AccessRule {
409    /**
410     * Certificate hash hexadecimal string.
411     *
412     * @type { string }
413     * @syscap SystemCapability.Telephony.CoreService.Esim
414     * @systemapi Hide this for inner system use.
415     * @since 14
416     */
417    certificateHashHexStr: string;
418
419    /**
420     * The name of package.
421     *
422     * @type { string }
423     * @syscap SystemCapability.Telephony.CoreService.Esim
424     * @systemapi Hide this for inner system use.
425     * @since 14
426     */
427    packageName: string;
428
429    /**
430     * The type of access.
431     *
432     * @type { number }
433     * @syscap SystemCapability.Telephony.CoreService.Esim
434     * @systemapi Hide this for inner system use.
435     * @since 14
436     */
437    accessType: number;
438  }
439
440  /**
441   * Information about a profile which is downloadable to an eUICC using.
442   *
443   * @interface DownloadableProfile
444   * @syscap SystemCapability.Telephony.CoreService.Esim
445   * @systemapi Hide this for inner system use.
446   * @since 14
447   */
448  export interface DownloadableProfile {
449    /**
450     * Activation code.
451     *
452     * @type { string }
453     * @syscap SystemCapability.Telephony.CoreService.Esim
454     * @systemapi Hide this for inner system use.
455     * @since 14
456     */
457    activationCode: string;
458
459    /**
460     * Confirmation code.
461     *
462     * @type { ?string }
463     * @syscap SystemCapability.Telephony.CoreService.Esim
464     * @systemapi Hide this for inner system use.
465     * @since 14
466     */
467    confirmationCode?: string;
468
469    /**
470     * Carrier name.
471     *
472     * @type { ?string }
473     * @syscap SystemCapability.Telephony.CoreService.Esim
474     * @systemapi Hide this for inner system use.
475     * @since 14
476     */
477    carrierName?: string;
478
479    /**
480     * Gets the accessRules.
481     *
482     * @type { ?Array<AccessRule> }
483     * @syscap SystemCapability.Telephony.CoreService.Esim
484     * @systemapi Hide this for inner system use.
485     * @since 14
486     */
487    accessRules?: Array<AccessRule>;
488  }
489
490  /**
491   * Result the metadata for a downloadableProfile.
492   *
493   * @interface GetDownloadableProfileMetadataResult
494   * @syscap SystemCapability.Telephony.CoreService.Esim
495   * @systemapi Hide this for inner system use.
496   * @since 14
497   */
498  export interface GetDownloadableProfileMetadataResult {
499    /**
500     * Information about a profile which is downloadable to an eUICC using.
501     *
502     * @type { DownloadableProfile }
503     * @syscap SystemCapability.Telephony.CoreService.Esim
504     * @systemapi Hide this for inner system use.
505     * @since 14
506     */
507    downloadableProfile: DownloadableProfile;
508
509    /**
510     * The type of profile policy rule.
511     *
512     * @type { number }
513     * @syscap SystemCapability.Telephony.CoreService.Esim
514     * @systemapi Hide this for inner system use.
515     * @since 14
516     */
517    pprType: number;
518
519    /**
520     * The flag of profile policy rule.
521     *
522     * @type { boolean }
523     * @syscap SystemCapability.Telephony.CoreService.Esim
524     * @systemapi Hide this for inner system use.
525     * @since 14
526     */
527    pprFlag: boolean;
528
529    /**
530     * The iccid of the profile.
531     *
532     * @type { string }
533     * @syscap SystemCapability.Telephony.CoreService.Esim
534     * @systemapi Hide this for inner system use.
535     * @since 14
536     */
537     iccid: string;
538
539     /**
540      * The service provider name for the profile.
541      *
542      * @type { string }
543      * @syscap SystemCapability.Telephony.CoreService.Esim
544      * @systemapi Hide this for inner system use.
545      * @since 14
546      */
547     serviceProviderName: string;
548
549     /**
550      * The profile name.
551      *
552      * @type { string }
553      * @syscap SystemCapability.Telephony.CoreService.Esim
554      * @systemapi Hide this for inner system use.
555      * @since 14
556      */
557     profileName: string;
558
559     /**
560      * Profile class for the profile.
561      *
562      * @type { ProfileClass }
563      * @syscap SystemCapability.Telephony.CoreService.Esim
564      * @systemapi Hide this for inner system use.
565      * @since 14
566      */
567     profileClass: ProfileClass;
568
569    /**
570     * Gets the solvable errors.
571     *
572     * @type { SolvableErrors }
573     * @syscap SystemCapability.Telephony.CoreService.Esim
574     * @systemapi Hide this for inner system use.
575     * @since 14
576     */
577    solvableErrors: SolvableErrors;
578
579    /**
580     * Gets the result of the operation.
581     *
582     * @type { ResultCode }
583     * @syscap SystemCapability.Telephony.CoreService.Esim
584     * @systemapi Hide this for inner system use.
585     * @since 14
586     */
587    responseResult: ResultCode;
588  }
589
590  /**
591   * Result of downloadable Profile list.
592   *
593   * @interface GetDownloadableProfilesResult
594   * @syscap SystemCapability.Telephony.CoreService.Esim
595   * @systemapi Hide this for inner system use.
596   * @since 14
597   */
598  export interface GetDownloadableProfilesResult {
599    /**
600     * Gets the result of the operation.
601     *
602     * @type { ResultCode }
603     * @syscap SystemCapability.Telephony.CoreService.Esim
604     * @systemapi Hide this for inner system use.
605     * @since 14
606     */
607    responseResult: ResultCode;
608
609    /**
610     * Gets the downloadable Profiles with filled-in metadata.
611     *
612     * @type { Array<DownloadableProfile> }
613     * @syscap SystemCapability.Telephony.CoreService.Esim
614     * @systemapi Hide this for inner system use.
615     * @since 14
616     */
617    downloadableProfiles: Array<DownloadableProfile>;
618  }
619
620  /**
621   * Result of the given downloadable Profile.
622   *
623   * @interface DownloadProfileResult
624   * @syscap SystemCapability.Telephony.CoreService.Esim
625   * @systemapi Hide this for inner system use.
626   * @since 14
627   */
628  export interface DownloadProfileResult {
629    /**
630     * Gets the result of the operation.
631     *
632     * @type { ResultCode }
633     * @syscap SystemCapability.Telephony.CoreService.Esim
634     * @systemapi Hide this for inner system use.
635     * @since 14
636     */
637    responseResult: ResultCode;
638
639    /**
640     * Gets the solvable errors.
641     *
642     * @type { SolvableErrors }
643     * @syscap SystemCapability.Telephony.CoreService.Esim
644     * @systemapi Hide this for inner system use.
645     * @since 14
646     */
647    solvableErrors: SolvableErrors;
648
649    /**
650     * Gets the card Id. This value comes from EuiccService and is used when resolving solvable errors.
651     *
652     * @type { number }
653     * @syscap SystemCapability.Telephony.CoreService.Esim
654     * @systemapi Hide this for inner system use.
655     * @since 14
656     */
657    cardId: number;
658  }
659
660  /**
661   * Result of all eUICC profile information.
662   *
663   * @interface GetEuiccProfileInfoListResult
664   * @syscap SystemCapability.Telephony.CoreService.Esim
665   * @systemapi Hide this for inner system use.
666   * @since 14
667   */
668  export interface GetEuiccProfileInfoListResult {
669    /**
670     * Gets the result of the operation.
671     *
672     * @type { ResultCode }
673     * @syscap SystemCapability.Telephony.CoreService.Esim
674     * @systemapi Hide this for inner system use.
675     * @since 14
676     */
677    responseResult: ResultCode;
678
679    /**
680     * Gets the profile list (only upon success).
681     *
682     * @type { Array<EuiccProfile> }
683     * @syscap SystemCapability.Telephony.CoreService.Esim
684     * @systemapi Hide this for inner system use.
685     * @since 14
686     */
687    profiles: Array<EuiccProfile>;
688
689    /**
690     * Gets whether the eUICC can be removed.
691     *
692     * @type { boolean }
693     * @syscap SystemCapability.Telephony.CoreService.Esim
694     * @systemapi Hide this for inner system use.
695     * @since 14
696     */
697    isRemovable: boolean;
698  }
699
700  /**
701   * Information about the eUICC chip/device.
702   *
703   * @interface OperatorId
704   * @syscap SystemCapability.Telephony.CoreService.Esim
705   * @systemapi Hide this for inner system use.
706   * @since 14
707   */
708  export interface OperatorId {
709    /**
710     * Mobile country code.
711     *
712     * @type { string }
713     * @syscap SystemCapability.Telephony.CoreService.Esim
714     * @systemapi Hide this for inner system use.
715     * @since 14
716     */
717    mcc: string;
718
719    /**
720     * Mobile network code.
721     *
722     * @type { string }
723     * @syscap SystemCapability.Telephony.CoreService.Esim
724     * @systemapi Hide this for inner system use.
725     * @since 14
726     */
727    mnc: string;
728
729    /**
730     * Group id level 1.
731     *
732     * @type { string }
733     * @syscap SystemCapability.Telephony.CoreService.Esim
734     * @systemapi Hide this for inner system use.
735     * @since 14
736     */
737    gid1: string;
738
739    /**
740     * Group id level 2.
741     *
742     * @type { string }
743     * @syscap SystemCapability.Telephony.CoreService.Esim
744     * @systemapi Hide this for inner system use.
745     * @since 14
746     */
747    gid2: string;
748  }
749
750  /**
751   * Information about an embedded profile (subscription) on an eUICC.
752   *
753   * @interface EuiccProfile
754   * @syscap SystemCapability.Telephony.CoreService.Esim
755   * @systemapi Hide this for inner system use.
756   * @since 14
757   */
758  export interface EuiccProfile {
759    /**
760     * The iccid of the profile.
761     *
762     * @type { string }
763     * @syscap SystemCapability.Telephony.CoreService.Esim
764     * @systemapi Hide this for inner system use.
765     * @since 14
766     */
767    iccid: string;
768
769    /**
770     * An optional nickname for the profile.
771     *
772     * @type { string }
773     * @syscap SystemCapability.Telephony.CoreService.Esim
774     * @systemapi Hide this for inner system use.
775     * @since 14
776     */
777    nickName: string;
778
779    /**
780     * The service provider name for the profile.
781     *
782     * @type { string }
783     * @syscap SystemCapability.Telephony.CoreService.Esim
784     * @systemapi Hide this for inner system use.
785     * @since 14
786     */
787    serviceProviderName: string;
788
789    /**
790     * The profile name.
791     *
792     * @type { string }
793     * @syscap SystemCapability.Telephony.CoreService.Esim
794     * @systemapi Hide this for inner system use.
795     * @since 14
796     */
797    profileName: string;
798
799    /**
800     * The profile state.
801     *
802     * @type { ProfileState }
803     * @syscap SystemCapability.Telephony.CoreService.Esim
804     * @systemapi Hide this for inner system use.
805     * @since 14
806     */
807    state: ProfileState;
808
809    /**
810     * Profile class for the profile.
811     *
812     * @type { ProfileClass }
813     * @syscap SystemCapability.Telephony.CoreService.Esim
814     * @systemapi Hide this for inner system use.
815     * @since 14
816     */
817    profileClass: ProfileClass;
818
819    /**
820     * The operator Id of the profile.
821     *
822     * @type { OperatorId }
823     * @syscap SystemCapability.Telephony.CoreService.Esim
824     * @systemapi Hide this for inner system use.
825     * @since 14
826     */
827    operatorId: OperatorId;
828
829    /**
830     * The policy rules of the profile.
831     *
832     * @type { PolicyRules }
833     * @syscap SystemCapability.Telephony.CoreService.Esim
834     * @systemapi Hide this for inner system use.
835     * @since 14
836     */
837    policyRules: PolicyRules;
838
839    /**
840     * Optional access rules that specify which apps can manage this profile. Default platform management when not set.
841     *
842     * @type { Array<AccessRule> }
843     * @syscap SystemCapability.Telephony.CoreService.Esim
844     * @systemapi Hide this for inner system use.
845     * @since 14
846     */
847    accessRules: Array<AccessRule>;
848  }
849
850  /**
851   * Information related to eUICC chips/devices.
852   *
853   * @interface EuiccInfo
854   * @syscap SystemCapability.Telephony.CoreService.Esim
855   * @systemapi Hide this for inner system use.
856   * @since 14
857   */
858  export interface EuiccInfo {
859    /**
860     * Operating system version.
861     *
862     * @type { string }
863     * @syscap SystemCapability.Telephony.CoreService.Esim
864     * @systemapi Hide this for inner system use.
865     * @since 14
866     */
867    osVersion: string;
868  }
869
870  /**
871   * Options for resetting eUICC memory.
872   *
873   * @enum { number }
874   * @syscap SystemCapability.Telephony.CoreService.Esim
875   * @systemapi Hide this for inner system use.
876   * @since 14
877   */
878  export enum ResetOption {
879    /**
880     * Deletes all operational profiles on reset.
881     *
882     * @syscap SystemCapability.Telephony.CoreService.Esim
883     * @systemapi Hide this for inner system use.
884     * @since 14
885     */
886    DELETE_OPERATIONAL_PROFILES = 1,
887
888    /**
889     * Deletes all field-loaded testing profiles on reset.
890     *
891     * @syscap SystemCapability.Telephony.CoreService.Esim
892     * @systemapi Hide this for inner system use.
893     * @since 14
894     */
895    DELETE_FIELD_LOADED_TEST_PROFILES = 1 << 1,
896
897    /**
898     * Resets the default SM-DP+ address on reset.
899     *
900     * @syscap SystemCapability.Telephony.CoreService.Esim
901     * @systemapi Hide this for inner system use.
902     * @since 14
903     */
904    RESET_DEFAULT_SMDP_ADDRESS = 1 << 2,
905  }
906
907  /**
908   * Euicc OS upgrade status.
909   *
910   * @enum { number }
911   * @syscap SystemCapability.Telephony.CoreService.Esim
912   * @systemapi Hide this for inner system use.
913   * @since 14
914   */
915  export enum OsuStatus {
916    /**
917     * The OS upgrade is in progress.
918     *
919     * @syscap SystemCapability.Telephony.CoreService.Esim
920     * @systemapi Hide this for inner system use.
921     * @since 14
922     */
923    EUICC_UPGRADE_IN_PROGRESS = 1,
924
925    /**
926     * The OS upgrade failed.
927     *
928     * @syscap SystemCapability.Telephony.CoreService.Esim
929     * @systemapi Hide this for inner system use.
930     * @since 14
931     */
932    EUICC_UPGRADE_FAILED = 2,
933
934    /**
935     * The OS upgrade successful.
936     *
937     * @syscap SystemCapability.Telephony.CoreService.Esim
938     * @systemapi Hide this for inner system use.
939     * @since 14
940     */
941    EUICC_UPGRADE_SUCCESSFUL = 3,
942
943    /**
944     * The OS upgrade not needed since current eUICC OS is latest.
945     *
946     * @syscap SystemCapability.Telephony.CoreService.Esim
947     * @systemapi Hide this for inner system use.
948     * @since 14
949     */
950    EUICC_UPGRADE_ALREADY_LATEST = 4,
951
952    /**
953     * The OS upgrade status is unavailable since eUICC service is unavailable.
954     *
955     * @syscap SystemCapability.Telephony.CoreService.Esim
956     * @systemapi Hide this for inner system use.
957     * @since 14
958     */
959    EUICC_UPGRADE_SERVICE_UNAVAILABLE = 5,
960  }
961
962  /**
963   * Result state.
964   *
965   * @enum { number }
966   * @syscap SystemCapability.Telephony.CoreService.Esim
967   * @systemapi Hide this for inner system use.
968   * @since 14
969   */
970  export enum ResultCode {
971    /**
972     * Indicates that the user must resolve a solvable error.
973     *
974     * @syscap SystemCapability.Telephony.CoreService.Esim
975     * @systemapi Hide this for inner system use.
976     * @since 14
977     */
978    RESULT_SOLVABLE_ERRORS = -2,
979
980    /**
981     * Indicates that the active profile must be disabled to perform the operation.
982     *
983     * @syscap SystemCapability.Telephony.CoreService.Esim
984     * @systemapi Hide this for inner system use.
985     * @since 14
986     */
987    RESULT_MUST_DISABLE_PROFILE = -1,
988
989    /**
990     * Operation succeeded.
991     *
992     * @syscap SystemCapability.Telephony.CoreService.Esim
993     * @systemapi Hide this for inner system use.
994     * @since 14
995     */
996    RESULT_OK = 0,
997
998    /**
999     * Failed to obtain the EID.
1000     *
1001     * @syscap SystemCapability.Telephony.CoreService.Esim
1002     * @systemapi Hide this for inner system use.
1003     * @since 14
1004     */
1005    RESULT_GET_EID_FAILED = 201,
1006
1007    /**
1008     * The activation code is changed after the end user confirms the operation.
1009     *
1010     * @syscap SystemCapability.Telephony.CoreService.Esim
1011     * @systemapi Hide this for inner system use.
1012     * @since 14
1013     */
1014    RESULT_ACTIVATION_CODE_CHANGED = 203,
1015
1016    /**
1017     * The activation code is invalid.
1018     *
1019     * @syscap SystemCapability.Telephony.CoreService.Esim
1020     * @systemapi Hide this for inner system use.
1021     * @since 14
1022     */
1023    RESULT_ACTIVATION_CODE_INVALID = 204,
1024
1025    /**
1026     * The SM-DP+ server address is invalid.
1027     *
1028     * @syscap SystemCapability.Telephony.CoreService.Esim
1029     * @systemapi Hide this for inner system use.
1030     * @since 14
1031     */
1032    RESULT_SMDP_ADDRESS_INVALID = 205,
1033
1034    /**
1035     * Invalid eUICC information.
1036     *
1037     * @syscap SystemCapability.Telephony.CoreService.Esim
1038     * @systemapi Hide this for inner system use.
1039     * @since 14
1040     */
1041    RESULT_EUICC_INFO_INVALID = 206,
1042
1043    /**
1044     * TLS handshake fails.
1045     *
1046     * @syscap SystemCapability.Telephony.CoreService.Esim
1047     * @systemapi Hide this for inner system use.
1048     * @since 14
1049     */
1050    RESULT_TLS_HANDSHAKE_FAILED = 207,
1051
1052    /**
1053     * Certificate network connection error.
1054     *
1055     * @syscap SystemCapability.Telephony.CoreService.Esim
1056     * @systemapi Hide this for inner system use.
1057     * @since 14
1058     */
1059    RESULT_CERTIFICATE_IO_ERROR = 208,
1060
1061    /**
1062     * The certificate address is invalid or the response times out.
1063     *
1064     * @syscap SystemCapability.Telephony.CoreService.Esim
1065     * @systemapi Hide this for inner system use.
1066     * @since 14
1067     */
1068    RESULT_CERTIFICATE_RESPONSE_TIMEOUT = 209,
1069
1070    /**
1071     * Authentication fails.
1072     *
1073     * @syscap SystemCapability.Telephony.CoreService.Esim
1074     * @systemapi Hide this for inner system use.
1075     * @since 14
1076     */
1077    RESULT_AUTHENTICATION_FAILED = 210,
1078
1079    /**
1080     * HTTP response fails.
1081     *
1082     * @syscap SystemCapability.Telephony.CoreService.Esim
1083     * @systemapi Hide this for inner system use.
1084     * @since 14
1085     */
1086    RESULT_RESPONSE_HTTP_FAILED = 211,
1087
1088    /**
1089     * Incorrect confirmation code.
1090     *
1091     * @syscap SystemCapability.Telephony.CoreService.Esim
1092     * @systemapi Hide this for inner system use.
1093     * @since 14
1094     */
1095    RESULT_CONFIRMATION_CODE_INCORRECT = 212,
1096
1097    /**
1098     * The maximum number of confirmation code attempts is reached.
1099     *
1100     * @syscap SystemCapability.Telephony.CoreService.Esim
1101     * @systemapi Hide this for inner system use.
1102     * @since 14
1103     */
1104    RESULT_EXCEEDED_CONFIRMATION_CODE_TRY_LIMIT = 213,
1105
1106    /**
1107     * There is no profile on the server for download.
1108     *
1109     * @syscap SystemCapability.Telephony.CoreService.Esim
1110     * @systemapi Hide this for inner system use.
1111     * @since 14
1112     */
1113    RESULT_NO_PROFILE_ON_SERVER = 214,
1114
1115    /**
1116     * The transaction ID is invalid.
1117     *
1118     * @syscap SystemCapability.Telephony.CoreService.Esim
1119     * @systemapi Hide this for inner system use.
1120     * @since 14
1121     */
1122    RESULT_TRANSACTION_ID_INVALID = 215,
1123
1124    /**
1125     * The server address is invalid.
1126     *
1127     * @syscap SystemCapability.Telephony.CoreService.Esim
1128     * @systemapi Hide this for inner system use.
1129     * @since 14
1130     */
1131    RESULT_SERVER_ADDRESS_INVALID = 216,
1132
1133    /**
1134     * Failed to obtain the bound profile package.
1135     *
1136     * @syscap SystemCapability.Telephony.CoreService.Esim
1137     * @systemapi Hide this for inner system use.
1138     * @since 14
1139     */
1140    RESULT_GET_BOUND_PROFILE_PACKAGE_FAILED = 217,
1141
1142    /**
1143     * The download is canceled by the end user.
1144     *
1145     * @syscap SystemCapability.Telephony.CoreService.Esim
1146     * @systemapi Hide this for inner system use.
1147     * @since 14
1148     */
1149    RESULT_USER_CANCEL_DOWNLOAD = 218,
1150
1151    /**
1152     * The carrier server is unavailable.
1153     *
1154     * @syscap SystemCapability.Telephony.CoreService.Esim
1155     * @systemapi Hide this for inner system use.
1156     * @since 14
1157     */
1158    RESULT_SERVER_UNAVAILABLE = 220,
1159
1160    /**
1161     * The profile is attached to a non-delete profile policy rule.
1162     *
1163     * @syscap SystemCapability.Telephony.CoreService.Esim
1164     * @systemapi Hide this for inner system use.
1165     * @since 14
1166     */
1167    RESULT_PROFILE_NON_DELETE = 223,
1168
1169    /**
1170     * The authentication response server address does not match.
1171     *
1172     * @syscap SystemCapability.Telephony.CoreService.Esim
1173     * @systemapi Hide this for inner system use.
1174     * @since 14
1175     */
1176    RESULT_SMDP_ADDRESS_INCORRECT = 226,
1177
1178    /**
1179     * Failed to analyze the authentication server response.
1180     *
1181     * @syscap SystemCapability.Telephony.CoreService.Esim
1182     * @systemapi Hide this for inner system use.
1183     * @since 14
1184     */
1185    RESULT_ANALYZE_AUTHENTICATION_SERVER_RESPONSE_FAILED = 228,
1186
1187    /**
1188     * Failed to analyze the authentication client response.
1189     *
1190     * @syscap SystemCapability.Telephony.CoreService.Esim
1191     * @systemapi Hide this for inner system use.
1192     * @since 14
1193     */
1194    RESULT_ANALYZE_AUTHENTICATION_CLIENT_RESPONSE_FAILED = 229,
1195
1196    /**
1197     * Failed to analyze the authentication client response because the matching ID is rejected.
1198     *
1199     * @syscap SystemCapability.Telephony.CoreService.Esim
1200     * @systemapi Hide this for inner system use.
1201     * @since 14
1202     */
1203    RESULT_ANALYZE_AUTHENTICATION_CLIENT_MATCHING_ID_REFUSED = 231,
1204
1205    /**
1206     * Authentication stopped due to an error in the profile type.
1207     *
1208     * @syscap SystemCapability.Telephony.CoreService.Esim
1209     * @systemapi Hide this for inner system use.
1210     * @since 14
1211     */
1212    RESULT_PROFILE_TYPE_ERROR_AUTHENTICATION_STOPPED = 233,
1213
1214    /**
1215     * The carrier server refused errors of which the reason code is 3.8.
1216     *
1217     * @syscap SystemCapability.Telephony.CoreService.Esim
1218     * @systemapi Hide this for inner system use.
1219     * @since 14
1220     */
1221    RESULT_CARRIER_SERVER_REFUSED_ERRORS = 249,
1222
1223    /**
1224     * The certificate is invalid.
1225     *
1226     * @syscap SystemCapability.Telephony.CoreService.Esim
1227     * @systemapi Hide this for inner system use.
1228     * @since 14
1229     */
1230    RESULT_CERTIFICATE_INVALID = 251,
1231
1232    /**
1233     * Profile installation failed due to insufficient memory.
1234     *
1235     * @syscap SystemCapability.Telephony.CoreService.Esim
1236     * @systemapi Hide this for inner system use.
1237     * @since 14
1238     */
1239    RESULT_OUT_OF_MEMORY = 263,
1240
1241    /**
1242     * The profile policy rule prohibits this operation during download.
1243     *
1244     * @syscap SystemCapability.Telephony.CoreService.Esim
1245     * @systemapi Hide this for inner system use.
1246     * @since 14
1247     */
1248    RESULT_PPR_FORBIDDEN = 268,
1249
1250    /**
1251     * Nothing is to be deleted.
1252     *
1253     * @syscap SystemCapability.Telephony.CoreService.Esim
1254     * @systemapi Hide this for inner system use.
1255     * @since 14
1256     */
1257    RESULT_NOTHING_TO_DELETE = 270,
1258
1259    /**
1260     * The profile policy rule does not match.
1261     *
1262     * @syscap SystemCapability.Telephony.CoreService.Esim
1263     * @systemapi Hide this for inner system use.
1264     * @since 14
1265     */
1266    RESULT_PPR_NOT_MATCH = 276,
1267
1268    /**
1269     * A session is ongoing.
1270     *
1271     * @syscap SystemCapability.Telephony.CoreService.Esim
1272     * @systemapi Hide this for inner system use.
1273     * @since 14
1274     */
1275    RESULT_CAT_BUSY = 283,
1276
1277    /**
1278     * This eSIM profile is already in use or is invalid.
1279     *
1280     * @syscap SystemCapability.Telephony.CoreService.Esim
1281     * @systemapi Hide this for inner system use.
1282     * @since 14
1283     */
1284    RESULT_PROFILE_EID_INVALID = 284,
1285
1286    /**
1287     * Download times out.
1288     *
1289     * @syscap SystemCapability.Telephony.CoreService.Esim
1290     * @systemapi Hide this for inner system use.
1291     * @since 14
1292     */
1293    RESULT_DOWNLOAD_TIMEOUT = 287,
1294
1295    /**
1296     * Other errors defined in SGP.22.
1297     *
1298     * @syscap SystemCapability.Telephony.CoreService.Esim
1299     * @systemapi Hide this for inner system use.
1300     * @since 14
1301     */
1302    RESULT_SGP_22_OTHER = 400,
1303  }
1304
1305  /**
1306   * The reason for canceling a profile download session.
1307   *
1308   * @enum { number }
1309   * @syscap SystemCapability.Telephony.CoreService.Esim
1310   * @systemapi Hide this for inner system use.
1311   * @since 14
1312   */
1313  export enum CancelReason {
1314    /**
1315     * The end user has rejected the download.
1316     *
1317     * @syscap SystemCapability.Telephony.CoreService.Esim
1318     * @systemapi Hide this for inner system use.
1319     * @since 14
1320     */
1321    CANCEL_REASON_END_USER_REJECTION = 0,
1322
1323    /**
1324     * The download has been postponed and you can try again later.
1325     *
1326     * @syscap SystemCapability.Telephony.CoreService.Esim
1327     * @systemapi Hide this for inner system use.
1328     * @since 14
1329     */
1330    CANCEL_REASON_POSTPONED = 1,
1331
1332    /**
1333     * The download has been timed out and you can try again later.
1334     *
1335     * @syscap SystemCapability.Telephony.CoreService.Esim
1336     * @systemapi Hide this for inner system use.
1337     * @since 14
1338     */
1339    CANCEL_REASON_TIMEOUT = 2,
1340
1341    /**
1342     * The profile to be downloaded cannot be installed because profile policy rules are not allowed.
1343     *
1344     * @syscap SystemCapability.Telephony.CoreService.Esim
1345     * @systemapi Hide this for inner system use.
1346     * @since 14
1347     */
1348    CANCEL_REASON_PPR_NOT_ALLOWED = 3,
1349  }
1350
1351  /**
1352   * The profile state.
1353   *
1354   * @enum { number }
1355   * @syscap SystemCapability.Telephony.CoreService.Esim
1356   * @systemapi Hide this for inner system use.
1357   * @since 14
1358   */
1359  export enum ProfileState {
1360    /**
1361     * Profile state not specified.
1362     *
1363     * @syscap SystemCapability.Telephony.CoreService.Esim
1364     * @systemapi Hide this for inner system use.
1365     * @since 14
1366     */
1367    PROFILE_STATE_UNSPECIFIED = -1,
1368
1369    /**
1370     * Disabled profiles.
1371     *
1372     * @syscap SystemCapability.Telephony.CoreService.Esim
1373     * @systemapi Hide this for inner system use.
1374     * @since 14
1375     */
1376    PROFILE_STATE_DISABLED = 0,
1377
1378    /**
1379     * Enabled profile.
1380     *
1381     * @syscap SystemCapability.Telephony.CoreService.Esim
1382     * @systemapi Hide this for inner system use.
1383     * @since 14
1384     */
1385    PROFILE_STATE_ENABLED = 1,
1386  }
1387
1388  /**
1389   * The Profile class.
1390   *
1391   * @enum { number }
1392   * @syscap SystemCapability.Telephony.CoreService.Esim
1393   * @systemapi Hide this for inner system use.
1394   * @since 14
1395   */
1396  export enum ProfileClass {
1397    /**
1398     * Profile class not specified.
1399     *
1400     * @syscap SystemCapability.Telephony.CoreService.Esim
1401     * @systemapi Hide this for inner system use.
1402     * @since 14
1403     */
1404    PROFILE_CLASS_UNSPECIFIED = -1,
1405
1406    /**
1407     * Testing profiles.
1408     *
1409     * @syscap SystemCapability.Telephony.CoreService.Esim
1410     * @systemapi Hide this for inner system use.
1411     * @since 14
1412     */
1413    PROFILE_CLASS_TEST = 0,
1414
1415    /**
1416     * Provisioning profiles that preloaded on the eUICC.
1417     *
1418     * @syscap SystemCapability.Telephony.CoreService.Esim
1419     * @systemapi Hide this for inner system use.
1420     * @since 14
1421     */
1422    PROFILE_CLASS_PROVISIONING = 1,
1423
1424    /**
1425     * Operational profiles that can be preloaded or downloaded.
1426     *
1427     * @syscap SystemCapability.Telephony.CoreService.Esim
1428     * @systemapi Hide this for inner system use.
1429     * @since 14
1430     */
1431    PROFILE_CLASS_OPERATIONAL = 2,
1432  }
1433
1434  /**
1435   * The policy rules of the profile.
1436   *
1437   * @enum { number }
1438   * @syscap SystemCapability.Telephony.CoreService.Esim
1439   * @systemapi Hide this for inner system use.
1440   * @since 14
1441   */
1442  export enum PolicyRules {
1443    /**
1444     * Disabling of this Profile is not allowed.
1445     *
1446     * @syscap SystemCapability.Telephony.CoreService.Esim
1447     * @systemapi Hide this for inner system use.
1448     * @since 14
1449     */
1450    POLICY_RULE_DISABLE_NOT_ALLOWED = 1,
1451
1452    /**
1453     * Deletion of this Profile is not allowed.
1454     *
1455     * @syscap SystemCapability.Telephony.CoreService.Esim
1456     * @systemapi Hide this for inner system use.
1457     * @since 14
1458     */
1459    POLICY_RULE_DELETE_NOT_ALLOWED = 1 << 1,
1460
1461    /**
1462     * This profile should be deleted when disabled.
1463     *
1464     * @syscap SystemCapability.Telephony.CoreService.Esim
1465     * @systemapi Hide this for inner system use.
1466     * @since 14
1467     */
1468    POLICY_RULE_DISABLE_AND_DELETE = 1 << 2,
1469  }
1470
1471  /**
1472   * The solvable errors.
1473   *
1474   * @enum { number }
1475   * @syscap SystemCapability.Telephony.CoreService.Esim
1476   * @systemapi Hide this for inner system use.
1477   * @since 14
1478   */
1479  export enum SolvableErrors {
1480    /**
1481     * Indicates that the user needs to input a confirmation code during the download.
1482     *
1483     * @syscap SystemCapability.Telephony.CoreService.Esim
1484     * @systemapi Hide this for inner system use.
1485     * @since 14
1486     */
1487    SOLVABLE_ERROR_NEED_CONFIRMATION_CODE = 1 << 0,
1488
1489    /**
1490     * Indicates that the download process requires user consent to allow profile policy rules.
1491     *
1492     * @syscap SystemCapability.Telephony.CoreService.Esim
1493     * @systemapi Hide this for inner system use.
1494     * @since 14
1495     */
1496    SOLVABLE_ERROR_NEED_POLICY_RULE = 1 << 1,
1497  }
1498
1499  /**
1500   * Specifies the download configuration.
1501   *
1502   * @interface DownloadConfiguration
1503   * @syscap SystemCapability.Telephony.CoreService.Esim
1504   * @systemapi Hide this for inner system use.
1505   * @since 14
1506   */
1507  export interface DownloadConfiguration {
1508    /**
1509     * Specifies whether to enable the profile after successful download.
1510     *
1511     * @type { boolean }
1512     * @syscap SystemCapability.Telephony.CoreService.Esim
1513     * @systemapi Hide this for inner system use.
1514     * @since 14
1515     */
1516    switchAfterDownload: boolean;
1517
1518    /**
1519     * Specifies whether to forcibly disable the profile. If true, the active profile is disabled in order to perform
1520     * the operation. Otherwise, {@link RESULT_MUST_DISABLE_PROFILE} is returned in resultCode to ask for the user's
1521     * agreement to the operation.
1522     *
1523     * @type { boolean }
1524     * @syscap SystemCapability.Telephony.CoreService.Esim
1525     * @systemapi Hide this for inner system use.
1526     * @since 14
1527     */
1528    forceDisableProfile: boolean;
1529
1530    /**
1531     * Specifies whether the user allows the service provider to enforce this Profile Policy Rule (PPR)
1532     * after being informed of its restrictions.
1533     *
1534     * @type { boolean }
1535     * @syscap SystemCapability.Telephony.CoreService.Esim
1536     * @systemapi Hide this for inner system use.
1537     * @since 14
1538     */
1539    isPprAllowed: boolean;
1540  }
1541}
1542
1543export default eSIM;