1/* 2 * Copyright (c) 2021 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 * A static class pertaining to the product information. 18 * 19 * @namespace deviceInfo 20 * @syscap SystemCapability.Startup.SystemInfo 21 * @since 6 22 */ 23declare namespace deviceInfo { 24 /** 25 * Obtains the device type represented by a string, 26 * which can be {@code phone} (or {@code default} for phones), {@code wearable}, {@code liteWearable}, 27 * {@code tablet}, {@code tv}, {@code car}, or {@code smartVision}. 28 * 29 * @constant 30 * @syscap SystemCapability.Startup.SystemInfo 31 * @since 6 32 */ 33 /** 34 * Obtains the device type represented by a string, 35 * which can be {@code phone} (or {@code default} for phones), {@code wearable}, {@code liteWearable}, 36 * {@code tablet}, {@code tv}, {@code car}, or {@code smartVision}. 37 * 38 * @constant 39 * @syscap SystemCapability.Startup.SystemInfo 40 * @crossplatform 41 * @since 10 42 */ 43 const deviceType: string; 44 45 /** 46 * Obtains the device manufacturer represented by a string. 47 * 48 * @constant 49 * @syscap SystemCapability.Startup.SystemInfo 50 * @since 6 51 */ 52 /** 53 * Obtains the device manufacturer represented by a string. 54 * 55 * @constant 56 * @syscap SystemCapability.Startup.SystemInfo 57 * @crossplatform 58 * @since 10 59 */ 60 const manufacture: string; 61 62 /** 63 * Obtains the device brand represented by a string. 64 * 65 * @constant 66 * @syscap SystemCapability.Startup.SystemInfo 67 * @since 6 68 */ 69 /** 70 * Obtains the device brand represented by a string. 71 * 72 * @constant 73 * @syscap SystemCapability.Startup.SystemInfo 74 * @crossplatform 75 * @since 10 76 */ 77 const brand: string; 78 79 /** 80 * Obtains the external product series represented by a string. 81 * 82 * @constant 83 * @syscap SystemCapability.Startup.SystemInfo 84 * @since 6 85 */ 86 /** 87 * Obtains the external product series represented by a string. 88 * 89 * @constant 90 * @syscap SystemCapability.Startup.SystemInfo 91 * @crossplatform 92 * @since 10 93 */ 94 const marketName: string; 95 96 /** 97 * Obtains the product series represented by a string. 98 * 99 * @constant 100 * @syscap SystemCapability.Startup.SystemInfo 101 * @since 6 102 */ 103 /** 104 * Obtains the product series represented by a string. 105 * 106 * @constant 107 * @syscap SystemCapability.Startup.SystemInfo 108 * @crossplatform 109 * @since 10 110 */ 111 const productSeries: string; 112 113 /** 114 * Obtains the product model represented by a string. 115 * 116 * @constant 117 * @syscap SystemCapability.Startup.SystemInfo 118 * @since 6 119 */ 120 /** 121 * Obtains the product model represented by a string. 122 * 123 * @constant 124 * @syscap SystemCapability.Startup.SystemInfo 125 * @crossplatform 126 * @since 10 127 */ 128 const productModel: string; 129 130 /** 131 * Obtains the software model represented by a string. 132 * 133 * @constant 134 * @syscap SystemCapability.Startup.SystemInfo 135 * @since 6 136 */ 137 /** 138 * Obtains the software model represented by a string. 139 * 140 * @constant 141 * @syscap SystemCapability.Startup.SystemInfo 142 * @crossplatform 143 * @since 10 144 */ 145 const softwareModel: string; 146 147 /** 148 * Obtains the hardware model represented by a string. 149 * 150 * @constant 151 * @syscap SystemCapability.Startup.SystemInfo 152 * @since 6 153 */ 154 /** 155 * Obtains the hardware model represented by a string. 156 * 157 * @constant 158 * @syscap SystemCapability.Startup.SystemInfo 159 * @crossplatform 160 * @since 10 161 */ 162 const hardwareModel: string; 163 164 /** 165 * Obtains the hardware profile represented by a string. 166 * 167 * @constant 168 * @syscap SystemCapability.Startup.SystemInfo 169 * @since 6 170 * @deprecated since 9 171 */ 172 const hardwareProfile: string; 173 174 /** 175 * Obtains the device serial number represented by a string. 176 * 177 * @permission ohos.permission.sec.ACCESS_UDID 178 * @constant 179 * @syscap SystemCapability.Startup.SystemInfo 180 * @since 6 181 */ 182 const serial: string; 183 184 /** 185 * Obtains the bootloader version number represented by a string. 186 * 187 * @constant 188 * @syscap SystemCapability.Startup.SystemInfo 189 * @since 6 190 */ 191 /** 192 * Obtains the bootloader version number represented by a string. 193 * 194 * @constant 195 * @syscap SystemCapability.Startup.SystemInfo 196 * @crossplatform 197 * @since 10 198 */ 199 const bootloaderVersion: string; 200 201 /** 202 * Obtains the application binary interface (Abi) list represented by a string. 203 * 204 * @constant 205 * @syscap SystemCapability.Startup.SystemInfo 206 * @since 6 207 */ 208 /** 209 * Obtains the application binary interface (Abi) list represented by a string. 210 * 211 * @constant 212 * @syscap SystemCapability.Startup.SystemInfo 213 * @crossplatform 214 * @since 10 215 */ 216 const abiList: string; 217 218 /** 219 * Obtains the security patch level represented by a string. 220 * 221 * @constant 222 * @syscap SystemCapability.Startup.SystemInfo 223 * @since 6 224 */ 225 /** 226 * Obtains the security patch level represented by a string. 227 * 228 * @constant 229 * @syscap SystemCapability.Startup.SystemInfo 230 * @crossplatform 231 * @since 10 232 */ 233 const securityPatchTag: string; 234 235 /** 236 * Obtains the product version represented by a string. 237 * 238 * @constant 239 * @syscap SystemCapability.Startup.SystemInfo 240 * @since 6 241 */ 242 /** 243 * Obtains the product version represented by a string. 244 * 245 * @constant 246 * @syscap SystemCapability.Startup.SystemInfo 247 * @crossplatform 248 * @since 10 249 */ 250 const displayVersion: string; 251 252 /** 253 * Obtains the incremental version represented by a string. 254 * 255 * @constant 256 * @syscap SystemCapability.Startup.SystemInfo 257 * @since 6 258 */ 259 /** 260 * Obtains the incremental version represented by a string. 261 * 262 * @constant 263 * @syscap SystemCapability.Startup.SystemInfo 264 * @crossplatform 265 * @since 10 266 */ 267 const incrementalVersion: string; 268 269 /** 270 * Obtains the OS release type represented by a string. 271 * <p>The OS release category can be {@code Release}, {@code Beta}, or {@code Canary}. 272 * The specific release type may be {@code Release}, {@code Beta1}, or others alike. 273 * 274 * @constant 275 * @syscap SystemCapability.Startup.SystemInfo 276 * @since 6 277 */ 278 /** 279 * Obtains the OS release type represented by a string. 280 * <p>The OS release category can be {@code Release}, {@code Beta}, or {@code Canary}. 281 * The specific release type may be {@code Release}, {@code Beta1}, or others alike. 282 * 283 * @constant 284 * @syscap SystemCapability.Startup.SystemInfo 285 * @crossplatform 286 * @since 10 287 */ 288 const osReleaseType: string; 289 290 /** 291 * Obtains the OS version represented by a string. 292 * 293 * @constant 294 * @syscap SystemCapability.Startup.SystemInfo 295 * @since 6 296 */ 297 /** 298 * Obtains the OS version represented by a string. 299 * 300 * @constant 301 * @syscap SystemCapability.Startup.SystemInfo 302 * @crossplatform 303 * @since 10 304 */ 305 const osFullName: string; 306 307 /** 308 * Obtains the major (M) version number, which increases with any updates to the overall architecture. 309 * <p>The M version number monotonically increases from 1 to 99. 310 * 311 * @constant 312 * @syscap SystemCapability.Startup.SystemInfo 313 * @since 6 314 */ 315 /** 316 * Obtains the major (M) version number, which increases with any updates to the overall architecture. 317 * <p>The M version number monotonically increases from 1 to 99. 318 * 319 * @constant 320 * @syscap SystemCapability.Startup.SystemInfo 321 * @crossplatform 322 * @since 10 323 */ 324 const majorVersion: number; 325 326 /** 327 * Obtains the senior (S) version number, which increases with any updates to the partial 328 * architecture or major features. 329 * <p>The S version number monotonically increases from 0 to 99. 330 * 331 * @constant 332 * @syscap SystemCapability.Startup.SystemInfo 333 * @since 6 334 */ 335 /** 336 * Obtains the senior (S) version number, which increases with any updates to the partial 337 * architecture or major features. 338 * <p>The S version number monotonically increases from 0 to 99. 339 * 340 * @constant 341 * @syscap SystemCapability.Startup.SystemInfo 342 * @crossplatform 343 * @since 10 344 */ 345 const seniorVersion: number; 346 347 /** 348 * Obtains the feature (F) version number, which increases with any planned new features. 349 * <p>The F version number monotonically increases from 0 or 1 to 99. 350 * 351 * @constant 352 * @syscap SystemCapability.Startup.SystemInfo 353 * @since 6 354 */ 355 /** 356 * Obtains the feature (F) version number, which increases with any planned new features. 357 * <p>The F version number monotonically increases from 0 or 1 to 99. 358 * 359 * @constant 360 * @syscap SystemCapability.Startup.SystemInfo 361 * @crossplatform 362 * @since 10 363 */ 364 const featureVersion: number; 365 366 /** 367 * Obtains the build (B) version number, which increases with each new development build. 368 * <p>The B version number monotonically increases from 0 or 1 to 999. 369 * 370 * @constant 371 * @syscap SystemCapability.Startup.SystemInfo 372 * @since 6 373 */ 374 /** 375 * Obtains the build (B) version number, which increases with each new development build. 376 * <p>The B version number monotonically increases from 0 or 1 to 999. 377 * 378 * @constant 379 * @syscap SystemCapability.Startup.SystemInfo 380 * @crossplatform 381 * @since 10 382 */ 383 const buildVersion: number; 384 385 /** 386 * Obtains the SDK API version number. 387 * 388 * @constant 389 * @syscap SystemCapability.Startup.SystemInfo 390 * @since 6 391 */ 392 /** 393 * Obtains the SDK API version number. 394 * 395 * @constant 396 * @syscap SystemCapability.Startup.SystemInfo 397 * @crossplatform 398 * @since 10 399 */ 400 const sdkApiVersion: number; 401 402 /** 403 * Obtains the first API version number. 404 * 405 * @constant 406 * @syscap SystemCapability.Startup.SystemInfo 407 * @since 6 408 */ 409 /** 410 * Obtains the first API version number. 411 * 412 * @constant 413 * @syscap SystemCapability.Startup.SystemInfo 414 * @crossplatform 415 * @since 10 416 */ 417 const firstApiVersion: number; 418 419 /** 420 * Obtains the version ID by a string. 421 * 422 * @constant 423 * @syscap SystemCapability.Startup.SystemInfo 424 * @since 6 425 */ 426 /** 427 * Obtains the version ID by a string. 428 * 429 * @constant 430 * @syscap SystemCapability.Startup.SystemInfo 431 * @crossplatform 432 * @since 10 433 */ 434 const versionId: string; 435 436 /** 437 * Obtains the build types of the same baseline code. 438 * 439 * @constant 440 * @syscap SystemCapability.Startup.SystemInfo 441 * @since 6 442 */ 443 /** 444 * Obtains the build types of the same baseline code. 445 * 446 * @constant 447 * @syscap SystemCapability.Startup.SystemInfo 448 * @crossplatform 449 * @since 10 450 */ 451 const buildType: string; 452 453 /** 454 * Obtains the different build user of the same baseline code. 455 * 456 * @constant 457 * @syscap SystemCapability.Startup.SystemInfo 458 * @since 6 459 */ 460 /** 461 * Obtains the different build user of the same baseline code. 462 * 463 * @constant 464 * @syscap SystemCapability.Startup.SystemInfo 465 * @crossplatform 466 * @since 10 467 */ 468 const buildUser: string; 469 470 /** 471 * Obtains the different build host of the same baseline code. 472 * 473 * @constant 474 * @syscap SystemCapability.Startup.SystemInfo 475 * @since 6 476 */ 477 /** 478 * Obtains the different build host of the same baseline code. 479 * 480 * @constant 481 * @syscap SystemCapability.Startup.SystemInfo 482 * @crossplatform 483 * @since 10 484 */ 485 const buildHost: string; 486 487 /** 488 * Obtains the build time. 489 * 490 * @constant 491 * @syscap SystemCapability.Startup.SystemInfo 492 * @since 6 493 */ 494 /** 495 * Obtains the build time. 496 * 497 * @constant 498 * @syscap SystemCapability.Startup.SystemInfo 499 * @crossplatform 500 * @since 10 501 */ 502 const buildTime: string; 503 504 /** 505 * Obtains the version hash. 506 * 507 * @constant 508 * @syscap SystemCapability.Startup.SystemInfo 509 * @since 6 510 */ 511 /** 512 * Obtains the version hash. 513 * 514 * @constant 515 * @syscap SystemCapability.Startup.SystemInfo 516 * @crossplatform 517 * @since 10 518 */ 519 const buildRootHash: string; 520 /** 521 * Obtains the device udid. 522 * 523 * @permission ohos.permission.sec.ACCESS_UDID 524 * @constant 525 * @syscap SystemCapability.Startup.SystemInfo 526 * @since 7 527 */ 528 const udid: string; 529 530 /** 531 * Obtains the Distribution OS name. 532 * <p>Independent Software Vendor (ISV) may distribute OHOS with their own OS name. 533 * distributionOsName will return the ISV OS name 534 * If ISV not specified, it will return an empty string 535 * 536 * @constant 537 * @syscap SystemCapability.Startup.SystemInfo 538 * @since 10 539 */ 540 const distributionOSName: string; 541 542 /** 543 * Obtains the Distribution OS version. 544 * <p>Independent Software Vendor (ISV) may distribute OHOS with their own OS version. 545 * distributionOSVersion will return the ISV OS version 546 * If ISV not specified, it will return the same value as osFullName 547 * 548 * @constant 549 * @syscap SystemCapability.Startup.SystemInfo 550 * @since 10 551 */ 552 const distributionOSVersion: string; 553 554 /** 555 * Obtains the Distribution OS version. 556 * <p>Independent Software Vendor (ISV) may distribute OHOS with their own OS api version. 557 * distributionOSVersion will return the ISV OS api version 558 * If ISV not specified, it will return the same value as sdkApiVersion 559 * 560 * @constant 561 * @syscap SystemCapability.Startup.SystemInfo 562 * @since 10 563 */ 564 const distributionOSApiVersion: number; 565 566 /** 567 * Obtains the Distribution OS release type. 568 * <p>Independent Software Vendor (ISV) may distribute OHOS with their own OS release type. 569 * distributionOSVersion will return the ISV OS release type 570 * If ISV not specified, it will return the same value as osReleaseType 571 * 572 * @constant 573 * @syscap SystemCapability.Startup.SystemInfo 574 * @since 10 575 */ 576 const distributionOSReleaseType: string; 577} 578 579export default deviceInfo; 580