@icanbwell/types 0.42.0 → 0.44.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@icanbwell/types",
3
- "version": "0.42.0",
3
+ "version": "0.44.0",
4
4
  "typedoc": {
5
5
  "entryPoint": "./src/index.ts",
6
6
  "tsconfig": "./tsconfig.lib.json"
@@ -36,8 +36,8 @@
36
36
  "import": "./index.js"
37
37
  }
38
38
  },
39
- "repoVersion": "1.32.0",
40
- "description": "@icanbwell/types. repo version: 1.32.0",
39
+ "repoVersion": "1.36.0",
40
+ "description": "@icanbwell/types. repo version: 1.36.0",
41
41
  "module": "./index.js",
42
42
  "main": "./index.js",
43
43
  "type": "module",
@@ -1,7 +1,7 @@
1
1
  import type rnBiometrics from 'react-native-biometrics';
2
2
  import type TypedEmitter from 'typed-emitter';
3
3
  import { OnAuthSuccessEventKey, type OnAuthSuccessEventData, ErrorEventKey, type ErrorEventData, type NativeDependenciesEventKey } from './native-components';
4
- import { PermissionStatus } from 'react-native-permissions';
4
+ import { openSettings, PermissionStatus } from 'react-native-permissions';
5
5
  import { NativeDependencies } from './native-plugins';
6
6
  export type NativeEvents<T = any> = {
7
7
  openwebview: (url: string) => void;
@@ -39,6 +39,15 @@ export interface ICamera {
39
39
  isAvailable(): Promise<boolean>;
40
40
  requestPermission(): Promise<PermissionStatus>;
41
41
  checkPermission(): Promise<PermissionStatus>;
42
+ requestRollPermission(): Promise<PermissionStatus>;
43
+ checkRollPermission(): Promise<PermissionStatus>;
44
+ }
45
+ export type AllowedDocumentType = 'image/png' | 'image/jpg' | 'image/jpeg' | 'image/svg+xml' | 'application/pdf';
46
+ export interface IDocumentDownload {
47
+ isAvailable(): Promise<boolean>;
48
+ writeFile(filename: string, filetype: string, contents: string): Promise<string | void>;
49
+ requestPermission(): Promise<GlobalPermissionStatus>;
50
+ checkPermission(): Promise<GlobalPermissionStatus>;
42
51
  }
43
52
  export interface GeoOptions {
44
53
  timeout?: number;
@@ -81,6 +90,21 @@ export type PrintOptions = {
81
90
  export interface IPrint {
82
91
  print(options: PrintOptions): Promise<boolean>;
83
92
  }
93
+ export type DocumentPickerResult = {
94
+ type: string;
95
+ name: string;
96
+ size: number;
97
+ base64: string;
98
+ };
99
+ export interface IDocumentPicker {
100
+ pickMultiple(): Array<DocumentPickerResult>;
101
+ pickSingle(): DocumentPickerResult[];
102
+ requestPermission(): Promise<PermissionStatus>;
103
+ checkPermission(): Promise<PermissionStatus>;
104
+ }
105
+ export interface ISystem {
106
+ openSettings: typeof openSettings;
107
+ }
84
108
  export interface INativeBridge {
85
109
  webview: IWebview;
86
110
  biometrics: IBiometrics;
@@ -89,6 +113,9 @@ export interface INativeBridge {
89
113
  camera: ICamera;
90
114
  geolocation: IGeolocation;
91
115
  print: IPrint;
116
+ documentDownload: IDocumentDownload;
117
+ documentPicker: IDocumentPicker;
118
+ system: ISystem;
92
119
  reloadView(): void;
93
120
  }
94
121
  export type GlobalPermissionStatus = PermissionStatus | PermissionState;