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 * Establishes a single UICC access rule pursuant to the GlobalPlatform Secure Element Access Control specification. 384 * 385 * @interface AccessRule 386 * @syscap SystemCapability.Telephony.CoreService.Esim 387 * @systemapi Hide this for inner system use. 388 * @since 18 389 */ 390 export interface AccessRule { 391 /** 392 * Certificate hash hexadecimal string. 393 * 394 * @type { string } 395 * @syscap SystemCapability.Telephony.CoreService.Esim 396 * @systemapi Hide this for inner system use. 397 * @since 18 398 */ 399 certificateHashHexStr: string; 400 401 /** 402 * The name of package. 403 * 404 * @type { string } 405 * @syscap SystemCapability.Telephony.CoreService.Esim 406 * @systemapi Hide this for inner system use. 407 * @since 18 408 */ 409 packageName: string; 410 411 /** 412 * The type of access. 413 * 414 * @type { number } 415 * @syscap SystemCapability.Telephony.CoreService.Esim 416 * @systemapi Hide this for inner system use. 417 * @since 18 418 */ 419 accessType: number; 420 } 421 422 /** 423 * Information about a profile which is downloadable to an eUICC using. 424 * 425 * @interface DownloadableProfile 426 * @syscap SystemCapability.Telephony.CoreService.Esim 427 * @since 18 428 */ 429 export interface DownloadableProfile { 430 /** 431 * Activation code. 432 * 433 * @type { string } 434 * @syscap SystemCapability.Telephony.CoreService.Esim 435 * @since 18 436 */ 437 activationCode: string; 438 439 /** 440 * Confirmation code. 441 * 442 * @type { ?string } 443 * @syscap SystemCapability.Telephony.CoreService.Esim 444 * @since 18 445 */ 446 confirmationCode?: string; 447 448 /** 449 * Carrier name. 450 * 451 * @type { ?string } 452 * @syscap SystemCapability.Telephony.CoreService.Esim 453 * @since 18 454 */ 455 carrierName?: string; 456 457 /** 458 * Gets the accessRules. 459 * 460 * @type { ?Array<AccessRule> } 461 * @syscap SystemCapability.Telephony.CoreService.Esim 462 * @since 18 463 */ 464 accessRules?: Array<AccessRule>; 465 } 466 467 /** 468 * Result the metadata for a downloadableProfile. 469 * 470 * @interface GetDownloadableProfileMetadataResult 471 * @syscap SystemCapability.Telephony.CoreService.Esim 472 * @systemapi Hide this for inner system use. 473 * @since 18 474 */ 475 export interface GetDownloadableProfileMetadataResult { 476 /** 477 * Information about a profile which is downloadable to an eUICC using. 478 * 479 * @type { DownloadableProfile } 480 * @syscap SystemCapability.Telephony.CoreService.Esim 481 * @systemapi Hide this for inner system use. 482 * @since 18 483 */ 484 downloadableProfile: DownloadableProfile; 485 486 /** 487 * The type of profile policy rule. 488 * 489 * @type { number } 490 * @syscap SystemCapability.Telephony.CoreService.Esim 491 * @systemapi Hide this for inner system use. 492 * @since 18 493 */ 494 pprType: number; 495 496 /** 497 * The flag of profile policy rule. 498 * 499 * @type { boolean } 500 * @syscap SystemCapability.Telephony.CoreService.Esim 501 * @systemapi Hide this for inner system use. 502 * @since 18 503 */ 504 pprFlag: boolean; 505 506 /** 507 * The iccid of the profile. 508 * 509 * @type { string } 510 * @syscap SystemCapability.Telephony.CoreService.Esim 511 * @systemapi Hide this for inner system use. 512 * @since 18 513 */ 514 iccid: string; 515 516 /** 517 * The service provider name for the profile. 518 * 519 * @type { string } 520 * @syscap SystemCapability.Telephony.CoreService.Esim 521 * @systemapi Hide this for inner system use. 522 * @since 18 523 */ 524 serviceProviderName: string; 525 526 /** 527 * The profile name. 528 * 529 * @type { string } 530 * @syscap SystemCapability.Telephony.CoreService.Esim 531 * @systemapi Hide this for inner system use. 532 * @since 18 533 */ 534 profileName: string; 535 536 /** 537 * Profile class for the profile. 538 * 539 * @type { ProfileClass } 540 * @syscap SystemCapability.Telephony.CoreService.Esim 541 * @systemapi Hide this for inner system use. 542 * @since 18 543 */ 544 profileClass: ProfileClass; 545 546 /** 547 * Gets the solvable errors. 548 * 549 * @type { SolvableErrors } 550 * @syscap SystemCapability.Telephony.CoreService.Esim 551 * @systemapi Hide this for inner system use. 552 * @since 18 553 */ 554 solvableErrors: SolvableErrors; 555 556 /** 557 * Gets the result of the operation. 558 * 559 * @type { ResultCode } 560 * @syscap SystemCapability.Telephony.CoreService.Esim 561 * @systemapi Hide this for inner system use. 562 * @since 18 563 */ 564 responseResult: ResultCode; 565 } 566 567 /** 568 * Result of downloadable Profile list. 569 * 570 * @interface GetDownloadableProfilesResult 571 * @syscap SystemCapability.Telephony.CoreService.Esim 572 * @systemapi Hide this for inner system use. 573 * @since 18 574 */ 575 export interface GetDownloadableProfilesResult { 576 /** 577 * Gets the result of the operation. 578 * 579 * @type { ResultCode } 580 * @syscap SystemCapability.Telephony.CoreService.Esim 581 * @systemapi Hide this for inner system use. 582 * @since 18 583 */ 584 responseResult: ResultCode; 585 586 /** 587 * Gets the downloadable Profiles with filled-in metadata. 588 * 589 * @type { Array<DownloadableProfile> } 590 * @syscap SystemCapability.Telephony.CoreService.Esim 591 * @systemapi Hide this for inner system use. 592 * @since 18 593 */ 594 downloadableProfiles: Array<DownloadableProfile>; 595 } 596 597 /** 598 * Result of the given downloadable Profile. 599 * 600 * @interface DownloadProfileResult 601 * @syscap SystemCapability.Telephony.CoreService.Esim 602 * @systemapi Hide this for inner system use. 603 * @since 18 604 */ 605 export interface DownloadProfileResult { 606 /** 607 * Gets the result of the operation. 608 * 609 * @type { ResultCode } 610 * @syscap SystemCapability.Telephony.CoreService.Esim 611 * @systemapi Hide this for inner system use. 612 * @since 18 613 */ 614 responseResult: ResultCode; 615 616 /** 617 * Gets the solvable errors. 618 * 619 * @type { SolvableErrors } 620 * @syscap SystemCapability.Telephony.CoreService.Esim 621 * @systemapi Hide this for inner system use. 622 * @since 18 623 */ 624 solvableErrors: SolvableErrors; 625 626 /** 627 * Gets the card Id. This value comes from EuiccService and is used when resolving solvable errors. 628 * 629 * @type { number } 630 * @syscap SystemCapability.Telephony.CoreService.Esim 631 * @systemapi Hide this for inner system use. 632 * @since 18 633 */ 634 cardId: number; 635 } 636 637 /** 638 * Result of all eUICC profile information. 639 * 640 * @interface GetEuiccProfileInfoListResult 641 * @syscap SystemCapability.Telephony.CoreService.Esim 642 * @systemapi Hide this for inner system use. 643 * @since 18 644 */ 645 export interface GetEuiccProfileInfoListResult { 646 /** 647 * Gets the result of the operation. 648 * 649 * @type { ResultCode } 650 * @syscap SystemCapability.Telephony.CoreService.Esim 651 * @systemapi Hide this for inner system use. 652 * @since 18 653 */ 654 responseResult: ResultCode; 655 656 /** 657 * Gets the profile list (only upon success). 658 * 659 * @type { Array<EuiccProfile> } 660 * @syscap SystemCapability.Telephony.CoreService.Esim 661 * @systemapi Hide this for inner system use. 662 * @since 18 663 */ 664 profiles: Array<EuiccProfile>; 665 666 /** 667 * Gets whether the eUICC can be removed. 668 * 669 * @type { boolean } 670 * @syscap SystemCapability.Telephony.CoreService.Esim 671 * @systemapi Hide this for inner system use. 672 * @since 18 673 */ 674 isRemovable: boolean; 675 } 676 677 /** 678 * Information about the eUICC chip/device. 679 * 680 * @interface OperatorId 681 * @syscap SystemCapability.Telephony.CoreService.Esim 682 * @systemapi Hide this for inner system use. 683 * @since 18 684 */ 685 export interface OperatorId { 686 /** 687 * Mobile country code. 688 * 689 * @type { string } 690 * @syscap SystemCapability.Telephony.CoreService.Esim 691 * @systemapi Hide this for inner system use. 692 * @since 18 693 */ 694 mcc: string; 695 696 /** 697 * Mobile network code. 698 * 699 * @type { string } 700 * @syscap SystemCapability.Telephony.CoreService.Esim 701 * @systemapi Hide this for inner system use. 702 * @since 18 703 */ 704 mnc: string; 705 706 /** 707 * Group id level 1. 708 * 709 * @type { string } 710 * @syscap SystemCapability.Telephony.CoreService.Esim 711 * @systemapi Hide this for inner system use. 712 * @since 18 713 */ 714 gid1: string; 715 716 /** 717 * Group id level 2. 718 * 719 * @type { string } 720 * @syscap SystemCapability.Telephony.CoreService.Esim 721 * @systemapi Hide this for inner system use. 722 * @since 18 723 */ 724 gid2: string; 725 } 726 727 /** 728 * Information about an embedded profile (subscription) on an eUICC. 729 * 730 * @interface EuiccProfile 731 * @syscap SystemCapability.Telephony.CoreService.Esim 732 * @systemapi Hide this for inner system use. 733 * @since 18 734 */ 735 export interface EuiccProfile { 736 /** 737 * The iccid of the profile. 738 * 739 * @type { string } 740 * @syscap SystemCapability.Telephony.CoreService.Esim 741 * @systemapi Hide this for inner system use. 742 * @since 18 743 */ 744 iccid: string; 745 746 /** 747 * An optional nickname for the profile. 748 * 749 * @type { string } 750 * @syscap SystemCapability.Telephony.CoreService.Esim 751 * @systemapi Hide this for inner system use. 752 * @since 18 753 */ 754 nickName: string; 755 756 /** 757 * The service provider name for the profile. 758 * 759 * @type { string } 760 * @syscap SystemCapability.Telephony.CoreService.Esim 761 * @systemapi Hide this for inner system use. 762 * @since 18 763 */ 764 serviceProviderName: string; 765 766 /** 767 * The profile name. 768 * 769 * @type { string } 770 * @syscap SystemCapability.Telephony.CoreService.Esim 771 * @systemapi Hide this for inner system use. 772 * @since 18 773 */ 774 profileName: string; 775 776 /** 777 * The profile state. 778 * 779 * @type { ProfileState } 780 * @syscap SystemCapability.Telephony.CoreService.Esim 781 * @systemapi Hide this for inner system use. 782 * @since 18 783 */ 784 state: ProfileState; 785 786 /** 787 * Profile class for the profile. 788 * 789 * @type { ProfileClass } 790 * @syscap SystemCapability.Telephony.CoreService.Esim 791 * @systemapi Hide this for inner system use. 792 * @since 18 793 */ 794 profileClass: ProfileClass; 795 796 /** 797 * The operator Id of the profile. 798 * 799 * @type { OperatorId } 800 * @syscap SystemCapability.Telephony.CoreService.Esim 801 * @systemapi Hide this for inner system use. 802 * @since 18 803 */ 804 operatorId: OperatorId; 805 806 /** 807 * The policy rules of the profile. 808 * 809 * @type { PolicyRules } 810 * @syscap SystemCapability.Telephony.CoreService.Esim 811 * @systemapi Hide this for inner system use. 812 * @since 18 813 */ 814 policyRules: PolicyRules; 815 816 /** 817 * Optional access rules that specify which apps can manage this profile. Default platform management when not set. 818 * 819 * @type { Array<AccessRule> } 820 * @syscap SystemCapability.Telephony.CoreService.Esim 821 * @systemapi Hide this for inner system use. 822 * @since 18 823 */ 824 accessRules: Array<AccessRule>; 825 } 826 827 /** 828 * Information related to eUICC chips/devices. 829 * 830 * @interface EuiccInfo 831 * @syscap SystemCapability.Telephony.CoreService.Esim 832 * @systemapi Hide this for inner system use. 833 * @since 18 834 */ 835 export interface EuiccInfo { 836 /** 837 * Operating system version. 838 * 839 * @type { string } 840 * @syscap SystemCapability.Telephony.CoreService.Esim 841 * @systemapi Hide this for inner system use. 842 * @since 18 843 */ 844 osVersion: string; 845 } 846 847 /** 848 * Options for resetting eUICC memory. 849 * 850 * @enum { number } 851 * @syscap SystemCapability.Telephony.CoreService.Esim 852 * @systemapi Hide this for inner system use. 853 * @since 18 854 */ 855 export enum ResetOption { 856 /** 857 * Deletes all operational profiles on reset. 858 * 859 * @syscap SystemCapability.Telephony.CoreService.Esim 860 * @systemapi Hide this for inner system use. 861 * @since 18 862 */ 863 DELETE_OPERATIONAL_PROFILES = 1, 864 865 /** 866 * Deletes all field-loaded testing profiles on reset. 867 * 868 * @syscap SystemCapability.Telephony.CoreService.Esim 869 * @systemapi Hide this for inner system use. 870 * @since 18 871 */ 872 DELETE_FIELD_LOADED_TEST_PROFILES = 1 << 1, 873 874 /** 875 * Resets the default SM-DP+ address on reset. 876 * 877 * @syscap SystemCapability.Telephony.CoreService.Esim 878 * @systemapi Hide this for inner system use. 879 * @since 18 880 */ 881 RESET_DEFAULT_SMDP_ADDRESS = 1 << 2, 882 } 883 884 /** 885 * Euicc OS upgrade status. 886 * 887 * @enum { number } 888 * @syscap SystemCapability.Telephony.CoreService.Esim 889 * @systemapi Hide this for inner system use. 890 * @since 18 891 */ 892 export enum OsuStatus { 893 /** 894 * The OS upgrade is in progress. 895 * 896 * @syscap SystemCapability.Telephony.CoreService.Esim 897 * @systemapi Hide this for inner system use. 898 * @since 18 899 */ 900 EUICC_UPGRADE_IN_PROGRESS = 1, 901 902 /** 903 * The OS upgrade failed. 904 * 905 * @syscap SystemCapability.Telephony.CoreService.Esim 906 * @systemapi Hide this for inner system use. 907 * @since 18 908 */ 909 EUICC_UPGRADE_FAILED = 2, 910 911 /** 912 * The OS upgrade successful. 913 * 914 * @syscap SystemCapability.Telephony.CoreService.Esim 915 * @systemapi Hide this for inner system use. 916 * @since 18 917 */ 918 EUICC_UPGRADE_SUCCESSFUL = 3, 919 920 /** 921 * The OS upgrade not needed since current eUICC OS is latest. 922 * 923 * @syscap SystemCapability.Telephony.CoreService.Esim 924 * @systemapi Hide this for inner system use. 925 * @since 18 926 */ 927 EUICC_UPGRADE_ALREADY_LATEST = 4, 928 929 /** 930 * The OS upgrade status is unavailable since eUICC service is unavailable. 931 * 932 * @syscap SystemCapability.Telephony.CoreService.Esim 933 * @systemapi Hide this for inner system use. 934 * @since 18 935 */ 936 EUICC_UPGRADE_SERVICE_UNAVAILABLE = 5, 937 } 938 939 /** 940 * Result state. 941 * 942 * @enum { number } 943 * @syscap SystemCapability.Telephony.CoreService.Esim 944 * @systemapi Hide this for inner system use. 945 * @since 18 946 */ 947 export enum ResultCode { 948 /** 949 * Indicates that the user must resolve a solvable error. 950 * 951 * @syscap SystemCapability.Telephony.CoreService.Esim 952 * @systemapi Hide this for inner system use. 953 * @since 18 954 */ 955 RESULT_SOLVABLE_ERRORS = -2, 956 957 /** 958 * Indicates that the active profile must be disabled to perform the operation. 959 * 960 * @syscap SystemCapability.Telephony.CoreService.Esim 961 * @systemapi Hide this for inner system use. 962 * @since 18 963 */ 964 RESULT_MUST_DISABLE_PROFILE = -1, 965 966 /** 967 * Operation succeeded. 968 * 969 * @syscap SystemCapability.Telephony.CoreService.Esim 970 * @systemapi Hide this for inner system use. 971 * @since 18 972 */ 973 RESULT_OK = 0, 974 975 /** 976 * Failed to obtain the EID. 977 * 978 * @syscap SystemCapability.Telephony.CoreService.Esim 979 * @systemapi Hide this for inner system use. 980 * @since 18 981 */ 982 RESULT_GET_EID_FAILED = 201, 983 984 /** 985 * The activation code is changed after the end user confirms the operation. 986 * 987 * @syscap SystemCapability.Telephony.CoreService.Esim 988 * @systemapi Hide this for inner system use. 989 * @since 18 990 */ 991 RESULT_ACTIVATION_CODE_CHANGED = 203, 992 993 /** 994 * The activation code is invalid. 995 * 996 * @syscap SystemCapability.Telephony.CoreService.Esim 997 * @systemapi Hide this for inner system use. 998 * @since 18 999 */ 1000 RESULT_ACTIVATION_CODE_INVALID = 204, 1001 1002 /** 1003 * The SM-DP+ server address is invalid. 1004 * 1005 * @syscap SystemCapability.Telephony.CoreService.Esim 1006 * @systemapi Hide this for inner system use. 1007 * @since 18 1008 */ 1009 RESULT_SMDP_ADDRESS_INVALID = 205, 1010 1011 /** 1012 * Invalid eUICC information. 1013 * 1014 * @syscap SystemCapability.Telephony.CoreService.Esim 1015 * @systemapi Hide this for inner system use. 1016 * @since 18 1017 */ 1018 RESULT_EUICC_INFO_INVALID = 206, 1019 1020 /** 1021 * TLS handshake fails. 1022 * 1023 * @syscap SystemCapability.Telephony.CoreService.Esim 1024 * @systemapi Hide this for inner system use. 1025 * @since 18 1026 */ 1027 RESULT_TLS_HANDSHAKE_FAILED = 207, 1028 1029 /** 1030 * Certificate network connection error. 1031 * 1032 * @syscap SystemCapability.Telephony.CoreService.Esim 1033 * @systemapi Hide this for inner system use. 1034 * @since 18 1035 */ 1036 RESULT_CERTIFICATE_IO_ERROR = 208, 1037 1038 /** 1039 * The certificate address is invalid or the response times out. 1040 * 1041 * @syscap SystemCapability.Telephony.CoreService.Esim 1042 * @systemapi Hide this for inner system use. 1043 * @since 18 1044 */ 1045 RESULT_CERTIFICATE_RESPONSE_TIMEOUT = 209, 1046 1047 /** 1048 * Authentication fails. 1049 * 1050 * @syscap SystemCapability.Telephony.CoreService.Esim 1051 * @systemapi Hide this for inner system use. 1052 * @since 18 1053 */ 1054 RESULT_AUTHENTICATION_FAILED = 210, 1055 1056 /** 1057 * HTTP response fails. 1058 * 1059 * @syscap SystemCapability.Telephony.CoreService.Esim 1060 * @systemapi Hide this for inner system use. 1061 * @since 18 1062 */ 1063 RESULT_RESPONSE_HTTP_FAILED = 211, 1064 1065 /** 1066 * Incorrect confirmation code. 1067 * 1068 * @syscap SystemCapability.Telephony.CoreService.Esim 1069 * @systemapi Hide this for inner system use. 1070 * @since 18 1071 */ 1072 RESULT_CONFIRMATION_CODE_INCORRECT = 212, 1073 1074 /** 1075 * The maximum number of confirmation code attempts is reached. 1076 * 1077 * @syscap SystemCapability.Telephony.CoreService.Esim 1078 * @systemapi Hide this for inner system use. 1079 * @since 18 1080 */ 1081 RESULT_EXCEEDED_CONFIRMATION_CODE_TRY_LIMIT = 213, 1082 1083 /** 1084 * There is no profile on the server for download. 1085 * 1086 * @syscap SystemCapability.Telephony.CoreService.Esim 1087 * @systemapi Hide this for inner system use. 1088 * @since 18 1089 */ 1090 RESULT_NO_PROFILE_ON_SERVER = 214, 1091 1092 /** 1093 * The transaction ID is invalid. 1094 * 1095 * @syscap SystemCapability.Telephony.CoreService.Esim 1096 * @systemapi Hide this for inner system use. 1097 * @since 18 1098 */ 1099 RESULT_TRANSACTION_ID_INVALID = 215, 1100 1101 /** 1102 * The server address is invalid. 1103 * 1104 * @syscap SystemCapability.Telephony.CoreService.Esim 1105 * @systemapi Hide this for inner system use. 1106 * @since 18 1107 */ 1108 RESULT_SERVER_ADDRESS_INVALID = 216, 1109 1110 /** 1111 * Failed to obtain the bound profile package. 1112 * 1113 * @syscap SystemCapability.Telephony.CoreService.Esim 1114 * @systemapi Hide this for inner system use. 1115 * @since 18 1116 */ 1117 RESULT_GET_BOUND_PROFILE_PACKAGE_FAILED = 217, 1118 1119 /** 1120 * The download is canceled by the end user. 1121 * 1122 * @syscap SystemCapability.Telephony.CoreService.Esim 1123 * @systemapi Hide this for inner system use. 1124 * @since 18 1125 */ 1126 RESULT_USER_CANCEL_DOWNLOAD = 218, 1127 1128 /** 1129 * The carrier server is unavailable. 1130 * 1131 * @syscap SystemCapability.Telephony.CoreService.Esim 1132 * @systemapi Hide this for inner system use. 1133 * @since 18 1134 */ 1135 RESULT_SERVER_UNAVAILABLE = 220, 1136 1137 /** 1138 * The profile is attached to a non-delete profile policy rule. 1139 * 1140 * @syscap SystemCapability.Telephony.CoreService.Esim 1141 * @systemapi Hide this for inner system use. 1142 * @since 18 1143 */ 1144 RESULT_PROFILE_NON_DELETE = 223, 1145 1146 /** 1147 * The authentication response server address does not match. 1148 * 1149 * @syscap SystemCapability.Telephony.CoreService.Esim 1150 * @systemapi Hide this for inner system use. 1151 * @since 18 1152 */ 1153 RESULT_SMDP_ADDRESS_INCORRECT = 226, 1154 1155 /** 1156 * Failed to analyze the authentication server response. 1157 * 1158 * @syscap SystemCapability.Telephony.CoreService.Esim 1159 * @systemapi Hide this for inner system use. 1160 * @since 18 1161 */ 1162 RESULT_ANALYZE_AUTHENTICATION_SERVER_RESPONSE_FAILED = 228, 1163 1164 /** 1165 * Failed to analyze the authentication client response. 1166 * 1167 * @syscap SystemCapability.Telephony.CoreService.Esim 1168 * @systemapi Hide this for inner system use. 1169 * @since 18 1170 */ 1171 RESULT_ANALYZE_AUTHENTICATION_CLIENT_RESPONSE_FAILED = 229, 1172 1173 /** 1174 * Failed to analyze the authentication client response because the matching ID is rejected. 1175 * 1176 * @syscap SystemCapability.Telephony.CoreService.Esim 1177 * @systemapi Hide this for inner system use. 1178 * @since 18 1179 */ 1180 RESULT_ANALYZE_AUTHENTICATION_CLIENT_MATCHING_ID_REFUSED = 231, 1181 1182 /** 1183 * Authentication stopped due to an error in the profile type. 1184 * 1185 * @syscap SystemCapability.Telephony.CoreService.Esim 1186 * @systemapi Hide this for inner system use. 1187 * @since 18 1188 */ 1189 RESULT_PROFILE_TYPE_ERROR_AUTHENTICATION_STOPPED = 233, 1190 1191 /** 1192 * The carrier server refused errors of which the reason code is 3.8. 1193 * 1194 * @syscap SystemCapability.Telephony.CoreService.Esim 1195 * @systemapi Hide this for inner system use. 1196 * @since 18 1197 */ 1198 RESULT_CARRIER_SERVER_REFUSED_ERRORS = 249, 1199 1200 /** 1201 * The certificate is invalid. 1202 * 1203 * @syscap SystemCapability.Telephony.CoreService.Esim 1204 * @systemapi Hide this for inner system use. 1205 * @since 18 1206 */ 1207 RESULT_CERTIFICATE_INVALID = 251, 1208 1209 /** 1210 * Profile installation failed due to insufficient memory. 1211 * 1212 * @syscap SystemCapability.Telephony.CoreService.Esim 1213 * @systemapi Hide this for inner system use. 1214 * @since 18 1215 */ 1216 RESULT_OUT_OF_MEMORY = 263, 1217 1218 /** 1219 * The profile policy rule prohibits this operation during download. 1220 * 1221 * @syscap SystemCapability.Telephony.CoreService.Esim 1222 * @systemapi Hide this for inner system use. 1223 * @since 18 1224 */ 1225 RESULT_PPR_FORBIDDEN = 268, 1226 1227 /** 1228 * Nothing is to be deleted. 1229 * 1230 * @syscap SystemCapability.Telephony.CoreService.Esim 1231 * @systemapi Hide this for inner system use. 1232 * @since 18 1233 */ 1234 RESULT_NOTHING_TO_DELETE = 270, 1235 1236 /** 1237 * The profile policy rule does not match. 1238 * 1239 * @syscap SystemCapability.Telephony.CoreService.Esim 1240 * @systemapi Hide this for inner system use. 1241 * @since 18 1242 */ 1243 RESULT_PPR_NOT_MATCH = 276, 1244 1245 /** 1246 * A session is ongoing. 1247 * 1248 * @syscap SystemCapability.Telephony.CoreService.Esim 1249 * @systemapi Hide this for inner system use. 1250 * @since 18 1251 */ 1252 RESULT_CAT_BUSY = 283, 1253 1254 /** 1255 * This eSIM profile is already in use or is invalid. 1256 * 1257 * @syscap SystemCapability.Telephony.CoreService.Esim 1258 * @systemapi Hide this for inner system use. 1259 * @since 18 1260 */ 1261 RESULT_PROFILE_EID_INVALID = 284, 1262 1263 /** 1264 * Download times out. 1265 * 1266 * @syscap SystemCapability.Telephony.CoreService.Esim 1267 * @systemapi Hide this for inner system use. 1268 * @since 18 1269 */ 1270 RESULT_DOWNLOAD_TIMEOUT = 287, 1271 1272 /** 1273 * Other errors defined in SGP.22. 1274 * 1275 * @syscap SystemCapability.Telephony.CoreService.Esim 1276 * @systemapi Hide this for inner system use. 1277 * @since 18 1278 */ 1279 RESULT_SGP_22_OTHER = 400, 1280 } 1281 1282 /** 1283 * The reason for canceling a profile download session. 1284 * 1285 * @enum { number } 1286 * @syscap SystemCapability.Telephony.CoreService.Esim 1287 * @systemapi Hide this for inner system use. 1288 * @since 18 1289 */ 1290 export enum CancelReason { 1291 /** 1292 * The end user has rejected the download. 1293 * 1294 * @syscap SystemCapability.Telephony.CoreService.Esim 1295 * @systemapi Hide this for inner system use. 1296 * @since 18 1297 */ 1298 CANCEL_REASON_END_USER_REJECTION = 0, 1299 1300 /** 1301 * The download has been postponed and you can try again later. 1302 * 1303 * @syscap SystemCapability.Telephony.CoreService.Esim 1304 * @systemapi Hide this for inner system use. 1305 * @since 18 1306 */ 1307 CANCEL_REASON_POSTPONED = 1, 1308 1309 /** 1310 * The download has been timed out and you can try again later. 1311 * 1312 * @syscap SystemCapability.Telephony.CoreService.Esim 1313 * @systemapi Hide this for inner system use. 1314 * @since 18 1315 */ 1316 CANCEL_REASON_TIMEOUT = 2, 1317 1318 /** 1319 * The profile to be downloaded cannot be installed because profile policy rules are not allowed. 1320 * 1321 * @syscap SystemCapability.Telephony.CoreService.Esim 1322 * @systemapi Hide this for inner system use. 1323 * @since 18 1324 */ 1325 CANCEL_REASON_PPR_NOT_ALLOWED = 3, 1326 } 1327 1328 /** 1329 * The profile state. 1330 * 1331 * @enum { number } 1332 * @syscap SystemCapability.Telephony.CoreService.Esim 1333 * @systemapi Hide this for inner system use. 1334 * @since 18 1335 */ 1336 export enum ProfileState { 1337 /** 1338 * Profile state not specified. 1339 * 1340 * @syscap SystemCapability.Telephony.CoreService.Esim 1341 * @systemapi Hide this for inner system use. 1342 * @since 18 1343 */ 1344 PROFILE_STATE_UNSPECIFIED = -1, 1345 1346 /** 1347 * Disabled profiles. 1348 * 1349 * @syscap SystemCapability.Telephony.CoreService.Esim 1350 * @systemapi Hide this for inner system use. 1351 * @since 18 1352 */ 1353 PROFILE_STATE_DISABLED = 0, 1354 1355 /** 1356 * Enabled profile. 1357 * 1358 * @syscap SystemCapability.Telephony.CoreService.Esim 1359 * @systemapi Hide this for inner system use. 1360 * @since 18 1361 */ 1362 PROFILE_STATE_ENABLED = 1, 1363 } 1364 1365 /** 1366 * The Profile class. 1367 * 1368 * @enum { number } 1369 * @syscap SystemCapability.Telephony.CoreService.Esim 1370 * @systemapi Hide this for inner system use. 1371 * @since 18 1372 */ 1373 export enum ProfileClass { 1374 /** 1375 * Profile class not specified. 1376 * 1377 * @syscap SystemCapability.Telephony.CoreService.Esim 1378 * @systemapi Hide this for inner system use. 1379 * @since 18 1380 */ 1381 PROFILE_CLASS_UNSPECIFIED = -1, 1382 1383 /** 1384 * Testing profiles. 1385 * 1386 * @syscap SystemCapability.Telephony.CoreService.Esim 1387 * @systemapi Hide this for inner system use. 1388 * @since 18 1389 */ 1390 PROFILE_CLASS_TEST = 0, 1391 1392 /** 1393 * Provisioning profiles that preloaded on the eUICC. 1394 * 1395 * @syscap SystemCapability.Telephony.CoreService.Esim 1396 * @systemapi Hide this for inner system use. 1397 * @since 18 1398 */ 1399 PROFILE_CLASS_PROVISIONING = 1, 1400 1401 /** 1402 * Operational profiles that can be preloaded or downloaded. 1403 * 1404 * @syscap SystemCapability.Telephony.CoreService.Esim 1405 * @systemapi Hide this for inner system use. 1406 * @since 18 1407 */ 1408 PROFILE_CLASS_OPERATIONAL = 2, 1409 } 1410 1411 /** 1412 * The policy rules of the profile. 1413 * 1414 * @enum { number } 1415 * @syscap SystemCapability.Telephony.CoreService.Esim 1416 * @systemapi Hide this for inner system use. 1417 * @since 18 1418 */ 1419 export enum PolicyRules { 1420 /** 1421 * Disabling of this Profile is not allowed. 1422 * 1423 * @syscap SystemCapability.Telephony.CoreService.Esim 1424 * @systemapi Hide this for inner system use. 1425 * @since 18 1426 */ 1427 POLICY_RULE_DISABLE_NOT_ALLOWED = 1, 1428 1429 /** 1430 * Deletion of this Profile is not allowed. 1431 * 1432 * @syscap SystemCapability.Telephony.CoreService.Esim 1433 * @systemapi Hide this for inner system use. 1434 * @since 18 1435 */ 1436 POLICY_RULE_DELETE_NOT_ALLOWED = 1 << 1, 1437 1438 /** 1439 * This profile should be deleted when disabled. 1440 * 1441 * @syscap SystemCapability.Telephony.CoreService.Esim 1442 * @systemapi Hide this for inner system use. 1443 * @since 18 1444 */ 1445 POLICY_RULE_DISABLE_AND_DELETE = 1 << 2, 1446 } 1447 1448 /** 1449 * The solvable errors. 1450 * 1451 * @enum { number } 1452 * @syscap SystemCapability.Telephony.CoreService.Esim 1453 * @systemapi Hide this for inner system use. 1454 * @since 18 1455 */ 1456 export enum SolvableErrors { 1457 /** 1458 * Indicates that the user needs to input a confirmation code during the download. 1459 * 1460 * @syscap SystemCapability.Telephony.CoreService.Esim 1461 * @systemapi Hide this for inner system use. 1462 * @since 18 1463 */ 1464 SOLVABLE_ERROR_NEED_CONFIRMATION_CODE = 1 << 0, 1465 1466 /** 1467 * Indicates that the download process requires user consent to allow profile policy rules. 1468 * 1469 * @syscap SystemCapability.Telephony.CoreService.Esim 1470 * @systemapi Hide this for inner system use. 1471 * @since 18 1472 */ 1473 SOLVABLE_ERROR_NEED_POLICY_RULE = 1 << 1, 1474 } 1475 1476 /** 1477 * Specifies the download configuration. 1478 * 1479 * @interface DownloadConfiguration 1480 * @syscap SystemCapability.Telephony.CoreService.Esim 1481 * @systemapi Hide this for inner system use. 1482 * @since 18 1483 */ 1484 export interface DownloadConfiguration { 1485 /** 1486 * Specifies whether to enable the profile after successful download. 1487 * 1488 * @type { boolean } 1489 * @syscap SystemCapability.Telephony.CoreService.Esim 1490 * @systemapi Hide this for inner system use. 1491 * @since 18 1492 */ 1493 switchAfterDownload: boolean; 1494 1495 /** 1496 * Specifies whether to forcibly disable the profile. If true, the active profile is disabled in order to perform 1497 * the operation. Otherwise, {@link RESULT_MUST_DISABLE_PROFILE} is returned in resultCode to ask for the user's 1498 * agreement to the operation. 1499 * 1500 * @type { boolean } 1501 * @syscap SystemCapability.Telephony.CoreService.Esim 1502 * @systemapi Hide this for inner system use. 1503 * @since 18 1504 */ 1505 forceDisableProfile: boolean; 1506 1507 /** 1508 * Specifies whether the user allows the service provider to enforce this Profile Policy Rule (PPR) 1509 * after being informed of its restrictions. 1510 * 1511 * @type { boolean } 1512 * @syscap SystemCapability.Telephony.CoreService.Esim 1513 * @systemapi Hide this for inner system use. 1514 * @since 18 1515 */ 1516 isPprAllowed: boolean; 1517 } 1518} 1519 1520export default eSIM;