capacitorandroidpermissions 0.0.1 → 0.0.3

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/README.md CHANGED
@@ -14,6 +14,8 @@ npx cap sync
14
14
  <docgen-index>
15
15
 
16
16
  * [`echo(...)`](#echo)
17
+ * [`checkPermissions()`](#checkpermissions)
18
+ * [`requestPermissions()`](#requestpermissions)
17
19
 
18
20
  </docgen-index>
19
21
 
@@ -34,4 +36,26 @@ echo(options: { value: string; }) => Promise<{ value: string; }>
34
36
 
35
37
  --------------------
36
38
 
39
+
40
+ ### checkPermissions()
41
+
42
+ ```typescript
43
+ checkPermissions() => Promise<PermissionStatus>
44
+ ```
45
+
46
+ **Returns:** <code>Promise&lt;any&gt;</code>
47
+
48
+ --------------------
49
+
50
+
51
+ ### requestPermissions()
52
+
53
+ ```typescript
54
+ requestPermissions() => Promise<PermissionStatus>
55
+ ```
56
+
57
+ **Returns:** <code>Promise&lt;any&gt;</code>
58
+
59
+ --------------------
60
+
37
61
  </docgen-api>
package/dist/docs.json CHANGED
@@ -20,6 +20,30 @@
20
20
  "docs": "",
21
21
  "complexTypes": [],
22
22
  "slug": "echo"
23
+ },
24
+ {
25
+ "name": "checkPermissions",
26
+ "signature": "() => Promise<PermissionStatus>",
27
+ "parameters": [],
28
+ "returns": "Promise<any>",
29
+ "tags": [],
30
+ "docs": "",
31
+ "complexTypes": [
32
+ "PermissionStatus"
33
+ ],
34
+ "slug": "checkpermissions"
35
+ },
36
+ {
37
+ "name": "requestPermissions",
38
+ "signature": "() => Promise<PermissionStatus>",
39
+ "parameters": [],
40
+ "returns": "Promise<any>",
41
+ "tags": [],
42
+ "docs": "",
43
+ "complexTypes": [
44
+ "PermissionStatus"
45
+ ],
46
+ "slug": "requestpermissions"
23
47
  }
24
48
  ],
25
49
  "properties": []
@@ -4,4 +4,6 @@ export interface ExamplePlugin {
4
4
  }): Promise<{
5
5
  value: string;
6
6
  }>;
7
+ checkPermissions(): Promise<PermissionStatus>;
8
+ requestPermissions(): Promise<PermissionStatus>;
7
9
  }
@@ -1 +1 @@
1
- {"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"","sourcesContent":["export interface ExamplePlugin {\n echo(options: { value: string }): Promise<{ value: string }>;\n}\n"]}
1
+ {"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"","sourcesContent":["export interface ExamplePlugin {\n echo(options: { value: string }): Promise<{ value: string }>;\n checkPermissions(): Promise<PermissionStatus>;\n requestPermissions(): Promise<PermissionStatus>;}\n"]}
package/dist/esm/web.d.ts CHANGED
@@ -1,6 +1,8 @@
1
1
  import { WebPlugin } from '@capacitor/core';
2
2
  import type { ExamplePlugin } from './definitions';
3
3
  export declare class ExampleWeb extends WebPlugin implements ExamplePlugin {
4
+ checkPermissions(): Promise<PermissionStatus>;
5
+ requestPermissions(): Promise<PermissionStatus>;
4
6
  echo(options: {
5
7
  value: string;
6
8
  }): Promise<{
package/dist/esm/web.js CHANGED
@@ -1,5 +1,11 @@
1
1
  import { WebPlugin } from '@capacitor/core';
2
2
  export class ExampleWeb extends WebPlugin {
3
+ checkPermissions() {
4
+ throw new Error('Method not implemented.');
5
+ }
6
+ requestPermissions() {
7
+ throw new Error('Method not implemented.');
8
+ }
3
9
  async echo(options) {
4
10
  console.log('ECHO', options);
5
11
  return options;
@@ -1 +1 @@
1
- {"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAI5C,MAAM,OAAO,UAAW,SAAQ,SAAS;IACvC,KAAK,CAAC,IAAI,CAAC,OAA0B;QACnC,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAC7B,OAAO,OAAO,CAAC;IACjB,CAAC;CACF","sourcesContent":["import { WebPlugin } from '@capacitor/core';\n\nimport type { ExamplePlugin } from './definitions';\n\nexport class ExampleWeb extends WebPlugin implements ExamplePlugin {\n async echo(options: { value: string }): Promise<{ value: string }> {\n console.log('ECHO', options);\n return options;\n }\n}\n"]}
1
+ {"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAI5C,MAAM,OAAO,UAAW,SAAQ,SAAS;IACvC,gBAAgB;QACd,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC7C,CAAC;IACD,kBAAkB;QAChB,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC7C,CAAC;IACD,KAAK,CAAC,IAAI,CAAC,OAA0B;QACnC,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAC7B,OAAO,OAAO,CAAC;IACjB,CAAC;CACF","sourcesContent":["import { WebPlugin } from '@capacitor/core';\n\nimport type { ExamplePlugin } from './definitions';\n\nexport class ExampleWeb extends WebPlugin implements ExamplePlugin {\n checkPermissions(): Promise<PermissionStatus> {\n throw new Error('Method not implemented.');\n }\n requestPermissions(): Promise<PermissionStatus> {\n throw new Error('Method not implemented.');\n }\n async echo(options: { value: string }): Promise<{ value: string }> {\n console.log('ECHO', options);\n return options;\n }\n}\n"]}
@@ -9,6 +9,12 @@ const Example = core.registerPlugin('Example', {
9
9
  });
10
10
 
11
11
  class ExampleWeb extends core.WebPlugin {
12
+ checkPermissions() {
13
+ throw new Error('Method not implemented.');
14
+ }
15
+ requestPermissions() {
16
+ throw new Error('Method not implemented.');
17
+ }
12
18
  async echo(options) {
13
19
  console.log('ECHO', options);
14
20
  return options;
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.cjs.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst Example = registerPlugin('Example', {\n web: () => import('./web').then((m) => new m.ExampleWeb()),\n});\nexport * from './definitions';\nexport { Example };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class ExampleWeb extends WebPlugin {\n async echo(options) {\n console.log('ECHO', options);\n return options;\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;;;;AACK,MAAC,OAAO,GAAGA,mBAAc,CAAC,SAAS,EAAE;AAC1C,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,UAAU,EAAE,CAAC;AAC9D,CAAC;;ACFM,MAAM,UAAU,SAASC,cAAS,CAAC;AAC1C,IAAI,MAAM,IAAI,CAAC,OAAO,EAAE;AACxB,QAAQ,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AACrC,QAAQ,OAAO,OAAO,CAAC;AACvB,KAAK;AACL;;;;;;;;;"}
1
+ {"version":3,"file":"plugin.cjs.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst Example = registerPlugin('Example', {\n web: () => import('./web').then((m) => new m.ExampleWeb()),\n});\nexport * from './definitions';\nexport { Example };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class ExampleWeb extends WebPlugin {\n checkPermissions() {\n throw new Error('Method not implemented.');\n }\n requestPermissions() {\n throw new Error('Method not implemented.');\n }\n async echo(options) {\n console.log('ECHO', options);\n return options;\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;;;;AACK,MAAC,OAAO,GAAGA,mBAAc,CAAC,SAAS,EAAE;AAC1C,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,UAAU,EAAE,CAAC;AAC9D,CAAC;;ACFM,MAAM,UAAU,SAASC,cAAS,CAAC;AAC1C,IAAI,gBAAgB,GAAG;AACvB,QAAQ,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;AACnD,KAAK;AACL,IAAI,kBAAkB,GAAG;AACzB,QAAQ,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;AACnD,KAAK;AACL,IAAI,MAAM,IAAI,CAAC,OAAO,EAAE;AACxB,QAAQ,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AACrC,QAAQ,OAAO,OAAO,CAAC;AACvB,KAAK;AACL;;;;;;;;;"}
package/dist/plugin.js CHANGED
@@ -6,6 +6,12 @@ var capacitorExample = (function (exports, core) {
6
6
  });
7
7
 
8
8
  class ExampleWeb extends core.WebPlugin {
9
+ checkPermissions() {
10
+ throw new Error('Method not implemented.');
11
+ }
12
+ requestPermissions() {
13
+ throw new Error('Method not implemented.');
14
+ }
9
15
  async echo(options) {
10
16
  console.log('ECHO', options);
11
17
  return options;
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst Example = registerPlugin('Example', {\n web: () => import('./web').then((m) => new m.ExampleWeb()),\n});\nexport * from './definitions';\nexport { Example };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class ExampleWeb extends WebPlugin {\n async echo(options) {\n console.log('ECHO', options);\n return options;\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;AACK,UAAC,OAAO,GAAGA,mBAAc,CAAC,SAAS,EAAE;IAC1C,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,UAAU,EAAE,CAAC;IAC9D,CAAC;;ICFM,MAAM,UAAU,SAASC,cAAS,CAAC;IAC1C,IAAI,MAAM,IAAI,CAAC,OAAO,EAAE;IACxB,QAAQ,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACrC,QAAQ,OAAO,OAAO,CAAC;IACvB,KAAK;IACL;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"plugin.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst Example = registerPlugin('Example', {\n web: () => import('./web').then((m) => new m.ExampleWeb()),\n});\nexport * from './definitions';\nexport { Example };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class ExampleWeb extends WebPlugin {\n checkPermissions() {\n throw new Error('Method not implemented.');\n }\n requestPermissions() {\n throw new Error('Method not implemented.');\n }\n async echo(options) {\n console.log('ECHO', options);\n return options;\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;AACK,UAAC,OAAO,GAAGA,mBAAc,CAAC,SAAS,EAAE;IAC1C,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,UAAU,EAAE,CAAC;IAC9D,CAAC;;ICFM,MAAM,UAAU,SAASC,cAAS,CAAC;IAC1C,IAAI,gBAAgB,GAAG;IACvB,QAAQ,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IACnD,KAAK;IACL,IAAI,kBAAkB,GAAG;IACzB,QAAQ,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IACnD,KAAK;IACL,IAAI,MAAM,IAAI,CAAC,OAAO,EAAE;IACxB,QAAQ,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACrC,QAAQ,OAAO,OAAO,CAAC;IACvB,KAAK;IACL;;;;;;;;;;;;;;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "capacitorandroidpermissions",
3
- "version": "0.0.1",
3
+ "version": "0.0.3",
4
4
  "description": "notification permission handler",
5
5
  "main": "dist/plugin.cjs.js",
6
6
  "module": "dist/esm/index.js",