docs.json 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804
  1. {
  2. "api": {
  3. "name": "CameraPlugin",
  4. "slug": "cameraplugin",
  5. "docs": "",
  6. "tags": [],
  7. "methods": [
  8. {
  9. "name": "getPhoto",
  10. "signature": "(options: ImageOptions) => Promise<Photo>",
  11. "parameters": [
  12. {
  13. "name": "options",
  14. "docs": "",
  15. "type": "ImageOptions"
  16. }
  17. ],
  18. "returns": "Promise<Photo>",
  19. "tags": [
  20. {
  21. "name": "since",
  22. "text": "1.0.0"
  23. }
  24. ],
  25. "docs": "Prompt the user to pick a photo from an album, or take a new photo\nwith the camera.",
  26. "complexTypes": [
  27. "Photo",
  28. "ImageOptions"
  29. ],
  30. "slug": "getphoto"
  31. },
  32. {
  33. "name": "pickImages",
  34. "signature": "(options: GalleryImageOptions) => Promise<GalleryPhotos>",
  35. "parameters": [
  36. {
  37. "name": "options",
  38. "docs": "",
  39. "type": "GalleryImageOptions"
  40. }
  41. ],
  42. "returns": "Promise<GalleryPhotos>",
  43. "tags": [
  44. {
  45. "name": "since",
  46. "text": "1.2.0"
  47. }
  48. ],
  49. "docs": "Allows the user to pick multiple pictures from the photo gallery.\nOn iOS 13 and older it only allows to pick one picture.",
  50. "complexTypes": [
  51. "GalleryPhotos",
  52. "GalleryImageOptions"
  53. ],
  54. "slug": "pickimages"
  55. },
  56. {
  57. "name": "pickLimitedLibraryPhotos",
  58. "signature": "() => Promise<GalleryPhotos>",
  59. "parameters": [],
  60. "returns": "Promise<GalleryPhotos>",
  61. "tags": [
  62. {
  63. "name": "since",
  64. "text": "4.1.0"
  65. }
  66. ],
  67. "docs": "iOS 14+ Only: Allows the user to update their limited photo library selection.\nOn iOS 15+ returns all the limited photos after the picker dismissal.\nOn iOS 14 or if the user gave full access to the photos it returns an empty array.",
  68. "complexTypes": [
  69. "GalleryPhotos"
  70. ],
  71. "slug": "picklimitedlibraryphotos"
  72. },
  73. {
  74. "name": "getLimitedLibraryPhotos",
  75. "signature": "() => Promise<GalleryPhotos>",
  76. "parameters": [],
  77. "returns": "Promise<GalleryPhotos>",
  78. "tags": [
  79. {
  80. "name": "since",
  81. "text": "4.1.0"
  82. }
  83. ],
  84. "docs": "iOS 14+ Only: Return an array of photos selected from the limited photo library.",
  85. "complexTypes": [
  86. "GalleryPhotos"
  87. ],
  88. "slug": "getlimitedlibraryphotos"
  89. },
  90. {
  91. "name": "checkPermissions",
  92. "signature": "() => Promise<PermissionStatus>",
  93. "parameters": [],
  94. "returns": "Promise<PermissionStatus>",
  95. "tags": [
  96. {
  97. "name": "since",
  98. "text": "1.0.0"
  99. }
  100. ],
  101. "docs": "Check camera and photo album permissions",
  102. "complexTypes": [
  103. "PermissionStatus"
  104. ],
  105. "slug": "checkpermissions"
  106. },
  107. {
  108. "name": "requestPermissions",
  109. "signature": "(permissions?: CameraPluginPermissions | undefined) => Promise<PermissionStatus>",
  110. "parameters": [
  111. {
  112. "name": "permissions",
  113. "docs": "",
  114. "type": "CameraPluginPermissions | undefined"
  115. }
  116. ],
  117. "returns": "Promise<PermissionStatus>",
  118. "tags": [
  119. {
  120. "name": "since",
  121. "text": "1.0.0"
  122. }
  123. ],
  124. "docs": "Request camera and photo album permissions",
  125. "complexTypes": [
  126. "PermissionStatus",
  127. "CameraPluginPermissions"
  128. ],
  129. "slug": "requestpermissions"
  130. }
  131. ],
  132. "properties": []
  133. },
  134. "interfaces": [
  135. {
  136. "name": "Photo",
  137. "slug": "photo",
  138. "docs": "",
  139. "tags": [],
  140. "methods": [],
  141. "properties": [
  142. {
  143. "name": "base64String",
  144. "tags": [
  145. {
  146. "text": "1.0.0",
  147. "name": "since"
  148. }
  149. ],
  150. "docs": "The base64 encoded string representation of the image, if using CameraResultType.Base64.",
  151. "complexTypes": [],
  152. "type": "string | undefined"
  153. },
  154. {
  155. "name": "dataUrl",
  156. "tags": [
  157. {
  158. "text": "1.0.0",
  159. "name": "since"
  160. }
  161. ],
  162. "docs": "The url starting with 'data:image/jpeg;base64,' and the base64 encoded string representation of the image, if using CameraResultType.DataUrl.\n\nNote: On web, the file format could change depending on the browser.",
  163. "complexTypes": [],
  164. "type": "string | undefined"
  165. },
  166. {
  167. "name": "path",
  168. "tags": [
  169. {
  170. "text": "1.0.0",
  171. "name": "since"
  172. }
  173. ],
  174. "docs": "If using CameraResultType.Uri, the path will contain a full,\nplatform-specific file URL that can be read later using the Filesystem API.",
  175. "complexTypes": [],
  176. "type": "string | undefined"
  177. },
  178. {
  179. "name": "webPath",
  180. "tags": [
  181. {
  182. "text": "1.0.0",
  183. "name": "since"
  184. }
  185. ],
  186. "docs": "webPath returns a path that can be used to set the src attribute of an image for efficient\nloading and rendering.",
  187. "complexTypes": [],
  188. "type": "string | undefined"
  189. },
  190. {
  191. "name": "exif",
  192. "tags": [
  193. {
  194. "text": "1.0.0",
  195. "name": "since"
  196. }
  197. ],
  198. "docs": "Exif data, if any, retrieved from the image",
  199. "complexTypes": [],
  200. "type": "any"
  201. },
  202. {
  203. "name": "format",
  204. "tags": [
  205. {
  206. "text": "1.0.0",
  207. "name": "since"
  208. }
  209. ],
  210. "docs": "The format of the image, ex: jpeg, png, gif.\n\niOS and Android only support jpeg.\nWeb supports jpeg, png and gif, but the exact availability may vary depending on the browser.\ngif is only supported if `webUseInput` is set to `true` or if `source` is set to `Photos`.",
  211. "complexTypes": [],
  212. "type": "string"
  213. },
  214. {
  215. "name": "saved",
  216. "tags": [
  217. {
  218. "text": "1.1.0",
  219. "name": "since"
  220. }
  221. ],
  222. "docs": "Whether if the image was saved to the gallery or not.\n\nOn Android and iOS, saving to the gallery can fail if the user didn't\ngrant the required permissions.\nOn Web there is no gallery, so always returns false.",
  223. "complexTypes": [],
  224. "type": "boolean"
  225. }
  226. ]
  227. },
  228. {
  229. "name": "ImageOptions",
  230. "slug": "imageoptions",
  231. "docs": "",
  232. "tags": [],
  233. "methods": [],
  234. "properties": [
  235. {
  236. "name": "quality",
  237. "tags": [
  238. {
  239. "text": "1.0.0",
  240. "name": "since"
  241. }
  242. ],
  243. "docs": "The quality of image to return as JPEG, from 0-100\nNote: This option is only supported on Android and iOS",
  244. "complexTypes": [],
  245. "type": "number | undefined"
  246. },
  247. {
  248. "name": "allowEditing",
  249. "tags": [
  250. {
  251. "text": "1.0.0",
  252. "name": "since"
  253. }
  254. ],
  255. "docs": "Whether to allow the user to crop or make small edits (platform specific).\nOn iOS 14+ it's only supported for CameraSource.Camera, but not for CameraSource.Photos.",
  256. "complexTypes": [],
  257. "type": "boolean | undefined"
  258. },
  259. {
  260. "name": "resultType",
  261. "tags": [
  262. {
  263. "text": "1.0.0",
  264. "name": "since"
  265. }
  266. ],
  267. "docs": "How the data should be returned. Currently, only 'Base64', 'DataUrl' or 'Uri' is supported",
  268. "complexTypes": [
  269. "CameraResultType"
  270. ],
  271. "type": "CameraResultType"
  272. },
  273. {
  274. "name": "saveToGallery",
  275. "tags": [
  276. {
  277. "text": ": false",
  278. "name": "default"
  279. },
  280. {
  281. "text": "1.0.0",
  282. "name": "since"
  283. }
  284. ],
  285. "docs": "Whether to save the photo to the gallery.\nIf the photo was picked from the gallery, it will only be saved if edited.",
  286. "complexTypes": [],
  287. "type": "boolean | undefined"
  288. },
  289. {
  290. "name": "width",
  291. "tags": [
  292. {
  293. "text": "1.0.0",
  294. "name": "since"
  295. }
  296. ],
  297. "docs": "The desired maximum width of the saved image. The aspect ratio is respected.",
  298. "complexTypes": [],
  299. "type": "number | undefined"
  300. },
  301. {
  302. "name": "height",
  303. "tags": [
  304. {
  305. "text": "1.0.0",
  306. "name": "since"
  307. }
  308. ],
  309. "docs": "The desired maximum height of the saved image. The aspect ratio is respected.",
  310. "complexTypes": [],
  311. "type": "number | undefined"
  312. },
  313. {
  314. "name": "correctOrientation",
  315. "tags": [
  316. {
  317. "text": ": true",
  318. "name": "default"
  319. },
  320. {
  321. "text": "1.0.0",
  322. "name": "since"
  323. }
  324. ],
  325. "docs": "Whether to automatically rotate the image \"up\" to correct for orientation\nin portrait mode",
  326. "complexTypes": [],
  327. "type": "boolean | undefined"
  328. },
  329. {
  330. "name": "source",
  331. "tags": [
  332. {
  333. "text": ": CameraSource.Prompt",
  334. "name": "default"
  335. },
  336. {
  337. "text": "1.0.0",
  338. "name": "since"
  339. }
  340. ],
  341. "docs": "The source to get the photo from. By default this prompts the user to select\neither the photo album or take a photo.",
  342. "complexTypes": [
  343. "CameraSource"
  344. ],
  345. "type": "CameraSource"
  346. },
  347. {
  348. "name": "direction",
  349. "tags": [
  350. {
  351. "text": ": CameraDirection.Rear",
  352. "name": "default"
  353. },
  354. {
  355. "text": "1.0.0",
  356. "name": "since"
  357. }
  358. ],
  359. "docs": "iOS and Web only: The camera direction.",
  360. "complexTypes": [
  361. "CameraDirection"
  362. ],
  363. "type": "CameraDirection"
  364. },
  365. {
  366. "name": "presentationStyle",
  367. "tags": [
  368. {
  369. "text": ": 'fullscreen'",
  370. "name": "default"
  371. },
  372. {
  373. "text": "1.0.0",
  374. "name": "since"
  375. }
  376. ],
  377. "docs": "iOS only: The presentation style of the Camera.",
  378. "complexTypes": [],
  379. "type": "'fullscreen' | 'popover' | undefined"
  380. },
  381. {
  382. "name": "webUseInput",
  383. "tags": [
  384. {
  385. "text": "1.0.0",
  386. "name": "since"
  387. }
  388. ],
  389. "docs": "Web only: Whether to use the PWA Element experience or file input. The\ndefault is to use PWA Elements if installed and fall back to file input.\nTo always use file input, set this to `true`.\n\nLearn more about PWA Elements: https://capacitorjs.com/docs/web/pwa-elements",
  390. "complexTypes": [],
  391. "type": "boolean | undefined"
  392. },
  393. {
  394. "name": "promptLabelHeader",
  395. "tags": [
  396. {
  397. "text": ": 'Photo'",
  398. "name": "default"
  399. },
  400. {
  401. "text": "1.0.0",
  402. "name": "since"
  403. }
  404. ],
  405. "docs": "Text value to use when displaying the prompt.",
  406. "complexTypes": [],
  407. "type": "string | undefined"
  408. },
  409. {
  410. "name": "promptLabelCancel",
  411. "tags": [
  412. {
  413. "text": ": 'Cancel'",
  414. "name": "default"
  415. },
  416. {
  417. "text": "1.0.0",
  418. "name": "since"
  419. }
  420. ],
  421. "docs": "Text value to use when displaying the prompt.\niOS only: The label of the 'cancel' button.",
  422. "complexTypes": [],
  423. "type": "string | undefined"
  424. },
  425. {
  426. "name": "promptLabelPhoto",
  427. "tags": [
  428. {
  429. "text": ": 'From Photos'",
  430. "name": "default"
  431. },
  432. {
  433. "text": "1.0.0",
  434. "name": "since"
  435. }
  436. ],
  437. "docs": "Text value to use when displaying the prompt.\nThe label of the button to select a saved image.",
  438. "complexTypes": [],
  439. "type": "string | undefined"
  440. },
  441. {
  442. "name": "promptLabelPicture",
  443. "tags": [
  444. {
  445. "text": ": 'Take Picture'",
  446. "name": "default"
  447. },
  448. {
  449. "text": "1.0.0",
  450. "name": "since"
  451. }
  452. ],
  453. "docs": "Text value to use when displaying the prompt.\nThe label of the button to open the camera.",
  454. "complexTypes": [],
  455. "type": "string | undefined"
  456. }
  457. ]
  458. },
  459. {
  460. "name": "GalleryPhotos",
  461. "slug": "galleryphotos",
  462. "docs": "",
  463. "tags": [],
  464. "methods": [],
  465. "properties": [
  466. {
  467. "name": "photos",
  468. "tags": [
  469. {
  470. "text": "1.2.0",
  471. "name": "since"
  472. }
  473. ],
  474. "docs": "Array of all the picked photos.",
  475. "complexTypes": [
  476. "GalleryPhoto"
  477. ],
  478. "type": "GalleryPhoto[]"
  479. }
  480. ]
  481. },
  482. {
  483. "name": "GalleryPhoto",
  484. "slug": "galleryphoto",
  485. "docs": "",
  486. "tags": [],
  487. "methods": [],
  488. "properties": [
  489. {
  490. "name": "path",
  491. "tags": [
  492. {
  493. "text": "1.2.0",
  494. "name": "since"
  495. }
  496. ],
  497. "docs": "Full, platform-specific file URL that can be read later using the Filesystem API.",
  498. "complexTypes": [],
  499. "type": "string | undefined"
  500. },
  501. {
  502. "name": "webPath",
  503. "tags": [
  504. {
  505. "text": "1.2.0",
  506. "name": "since"
  507. }
  508. ],
  509. "docs": "webPath returns a path that can be used to set the src attribute of an image for efficient\nloading and rendering.",
  510. "complexTypes": [],
  511. "type": "string"
  512. },
  513. {
  514. "name": "exif",
  515. "tags": [
  516. {
  517. "text": "1.2.0",
  518. "name": "since"
  519. }
  520. ],
  521. "docs": "Exif data, if any, retrieved from the image",
  522. "complexTypes": [],
  523. "type": "any"
  524. },
  525. {
  526. "name": "format",
  527. "tags": [
  528. {
  529. "text": "1.2.0",
  530. "name": "since"
  531. }
  532. ],
  533. "docs": "The format of the image, ex: jpeg, png, gif.\n\niOS and Android only support jpeg.\nWeb supports jpeg, png and gif.",
  534. "complexTypes": [],
  535. "type": "string"
  536. }
  537. ]
  538. },
  539. {
  540. "name": "GalleryImageOptions",
  541. "slug": "galleryimageoptions",
  542. "docs": "",
  543. "tags": [],
  544. "methods": [],
  545. "properties": [
  546. {
  547. "name": "quality",
  548. "tags": [
  549. {
  550. "text": "1.2.0",
  551. "name": "since"
  552. }
  553. ],
  554. "docs": "The quality of image to return as JPEG, from 0-100\nNote: This option is only supported on Android and iOS.",
  555. "complexTypes": [],
  556. "type": "number | undefined"
  557. },
  558. {
  559. "name": "width",
  560. "tags": [
  561. {
  562. "text": "1.2.0",
  563. "name": "since"
  564. }
  565. ],
  566. "docs": "The desired maximum width of the saved image. The aspect ratio is respected.",
  567. "complexTypes": [],
  568. "type": "number | undefined"
  569. },
  570. {
  571. "name": "height",
  572. "tags": [
  573. {
  574. "text": "1.2.0",
  575. "name": "since"
  576. }
  577. ],
  578. "docs": "The desired maximum height of the saved image. The aspect ratio is respected.",
  579. "complexTypes": [],
  580. "type": "number | undefined"
  581. },
  582. {
  583. "name": "correctOrientation",
  584. "tags": [
  585. {
  586. "text": ": true",
  587. "name": "default"
  588. },
  589. {
  590. "text": "1.2.0",
  591. "name": "since"
  592. }
  593. ],
  594. "docs": "Whether to automatically rotate the image \"up\" to correct for orientation\nin portrait mode",
  595. "complexTypes": [],
  596. "type": "boolean | undefined"
  597. },
  598. {
  599. "name": "presentationStyle",
  600. "tags": [
  601. {
  602. "text": ": 'fullscreen'",
  603. "name": "default"
  604. },
  605. {
  606. "text": "1.2.0",
  607. "name": "since"
  608. }
  609. ],
  610. "docs": "iOS only: The presentation style of the Camera.",
  611. "complexTypes": [],
  612. "type": "'fullscreen' | 'popover' | undefined"
  613. },
  614. {
  615. "name": "limit",
  616. "tags": [
  617. {
  618. "text": "0 (unlimited)",
  619. "name": "default"
  620. },
  621. {
  622. "text": "1.2.0",
  623. "name": "since"
  624. }
  625. ],
  626. "docs": "Maximum number of pictures the user will be able to choose.\nNote: This option is only supported on Android 13+ and iOS.",
  627. "complexTypes": [],
  628. "type": "number | undefined"
  629. }
  630. ]
  631. },
  632. {
  633. "name": "PermissionStatus",
  634. "slug": "permissionstatus",
  635. "docs": "",
  636. "tags": [],
  637. "methods": [],
  638. "properties": [
  639. {
  640. "name": "camera",
  641. "tags": [],
  642. "docs": "",
  643. "complexTypes": [
  644. "CameraPermissionState"
  645. ],
  646. "type": "CameraPermissionState"
  647. },
  648. {
  649. "name": "photos",
  650. "tags": [],
  651. "docs": "",
  652. "complexTypes": [
  653. "CameraPermissionState"
  654. ],
  655. "type": "CameraPermissionState"
  656. }
  657. ]
  658. },
  659. {
  660. "name": "CameraPluginPermissions",
  661. "slug": "camerapluginpermissions",
  662. "docs": "",
  663. "tags": [],
  664. "methods": [],
  665. "properties": [
  666. {
  667. "name": "permissions",
  668. "tags": [],
  669. "docs": "",
  670. "complexTypes": [
  671. "CameraPermissionType"
  672. ],
  673. "type": "CameraPermissionType[]"
  674. }
  675. ]
  676. }
  677. ],
  678. "enums": [
  679. {
  680. "name": "CameraResultType",
  681. "slug": "cameraresulttype",
  682. "members": [
  683. {
  684. "name": "Uri",
  685. "value": "'uri'",
  686. "tags": [],
  687. "docs": ""
  688. },
  689. {
  690. "name": "Base64",
  691. "value": "'base64'",
  692. "tags": [],
  693. "docs": ""
  694. },
  695. {
  696. "name": "DataUrl",
  697. "value": "'dataUrl'",
  698. "tags": [],
  699. "docs": ""
  700. }
  701. ]
  702. },
  703. {
  704. "name": "CameraSource",
  705. "slug": "camerasource",
  706. "members": [
  707. {
  708. "name": "Prompt",
  709. "value": "'PROMPT'",
  710. "tags": [],
  711. "docs": "Prompts the user to select either the photo album or take a photo."
  712. },
  713. {
  714. "name": "Camera",
  715. "value": "'CAMERA'",
  716. "tags": [],
  717. "docs": "Take a new photo using the camera."
  718. },
  719. {
  720. "name": "Photos",
  721. "value": "'PHOTOS'",
  722. "tags": [],
  723. "docs": "Pick an existing photo from the gallery or photo album."
  724. }
  725. ]
  726. },
  727. {
  728. "name": "CameraDirection",
  729. "slug": "cameradirection",
  730. "members": [
  731. {
  732. "name": "Rear",
  733. "value": "'REAR'",
  734. "tags": [],
  735. "docs": ""
  736. },
  737. {
  738. "name": "Front",
  739. "value": "'FRONT'",
  740. "tags": [],
  741. "docs": ""
  742. }
  743. ]
  744. }
  745. ],
  746. "typeAliases": [
  747. {
  748. "name": "CameraPermissionState",
  749. "slug": "camerapermissionstate",
  750. "docs": "",
  751. "types": [
  752. {
  753. "text": "PermissionState",
  754. "complexTypes": [
  755. "PermissionState"
  756. ]
  757. },
  758. {
  759. "text": "'limited'",
  760. "complexTypes": []
  761. }
  762. ]
  763. },
  764. {
  765. "name": "PermissionState",
  766. "slug": "permissionstate",
  767. "docs": "",
  768. "types": [
  769. {
  770. "text": "'prompt'",
  771. "complexTypes": []
  772. },
  773. {
  774. "text": "'prompt-with-rationale'",
  775. "complexTypes": []
  776. },
  777. {
  778. "text": "'granted'",
  779. "complexTypes": []
  780. },
  781. {
  782. "text": "'denied'",
  783. "complexTypes": []
  784. }
  785. ]
  786. },
  787. {
  788. "name": "CameraPermissionType",
  789. "slug": "camerapermissiontype",
  790. "docs": "",
  791. "types": [
  792. {
  793. "text": "'camera'",
  794. "complexTypes": []
  795. },
  796. {
  797. "text": "'photos'",
  798. "complexTypes": []
  799. }
  800. ]
  801. }
  802. ],
  803. "pluginConfigs": []
  804. }