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