capacitor-record360sdk 7.0.0 → 7.0.1

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
@@ -15,6 +15,7 @@ npx cap sync
15
15
 
16
16
  * [`launchRecord360(...)`](#launchrecord360)
17
17
  * [`launchReferenceCapture(...)`](#launchreferencecapture)
18
+ * [`addListener('Record360Event', ...)`](#addlistenerrecord360event-)
18
19
  * [Interfaces](#interfaces)
19
20
  * [Type Aliases](#type-aliases)
20
21
 
@@ -49,6 +50,22 @@ launchReferenceCapture(options: { referenceNumber: string; workOrderId?: number;
49
50
  --------------------
50
51
 
51
52
 
53
+ ### addListener('Record360Event', ...)
54
+
55
+ ```typescript
56
+ addListener(eventName: 'Record360Event', listenerFunc: (data: { type: 'onFailedToAuthenticate' | 'onInspectionCancelled' | 'onInspectionComplete' | 'onInspectionUploadFailed' | 'onInspectionUploadProgress' | 'onInspectionUploaded' | 'onInspectionStarted' | 'onUserAuthenticated'; referenceNumber?: string; bytesComplete?: number; bytesTotal?: number; error?: string; userId?: string; username?: string; }) => void) => Promise<PluginListenerHandle>
57
+ ```
58
+
59
+ | Param | Type |
60
+ | ------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
61
+ | **`eventName`** | <code>'Record360Event'</code> |
62
+ | **`listenerFunc`** | <code>(data: { type: 'onFailedToAuthenticate' \| 'onInspectionCancelled' \| 'onInspectionComplete' \| 'onInspectionUploadFailed' \| 'onInspectionUploadProgress' \| 'onInspectionUploaded' \| 'onInspectionStarted' \| 'onUserAuthenticated'; referenceNumber?: string; bytesComplete?: number; bytesTotal?: number; error?: string; userId?: string; username?: string; }) =&gt; void</code> |
63
+
64
+ **Returns:** <code>Promise&lt;<a href="#pluginlistenerhandle">PluginListenerHandle</a>&gt;</code>
65
+
66
+ --------------------
67
+
68
+
52
69
  ### Interfaces
53
70
 
54
71
 
@@ -68,6 +85,13 @@ launchReferenceCapture(options: { referenceNumber: string; workOrderId?: number;
68
85
  | **`userToken`** | <code>string</code> |
69
86
 
70
87
 
88
+ #### PluginListenerHandle
89
+
90
+ | Prop | Type |
91
+ | ------------ | ----------------------------------------- |
92
+ | **`remove`** | <code>() =&gt; Promise&lt;void&gt;</code> |
93
+
94
+
71
95
  ### Type Aliases
72
96
 
73
97
 
package/dist/docs.json CHANGED
@@ -40,6 +40,29 @@
40
40
  "Record360Identity"
41
41
  ],
42
42
  "slug": "launchreferencecapture"
43
+ },
44
+ {
45
+ "name": "addListener",
46
+ "signature": "(eventName: 'Record360Event', listenerFunc: (data: { type: 'onFailedToAuthenticate' | 'onInspectionCancelled' | 'onInspectionComplete' | 'onInspectionUploadFailed' | 'onInspectionUploadProgress' | 'onInspectionUploaded' | 'onInspectionStarted' | 'onUserAuthenticated'; referenceNumber?: string; bytesComplete?: number; bytesTotal?: number; error?: string; userId?: string; username?: string; }) => void) => Promise<PluginListenerHandle>",
47
+ "parameters": [
48
+ {
49
+ "name": "eventName",
50
+ "docs": "",
51
+ "type": "'Record360Event'"
52
+ },
53
+ {
54
+ "name": "listenerFunc",
55
+ "docs": "",
56
+ "type": "(data: { type: 'onFailedToAuthenticate' | 'onInspectionCancelled' | 'onInspectionComplete' | 'onInspectionUploadFailed' | 'onInspectionUploadProgress' | 'onInspectionUploaded' | 'onInspectionStarted' | 'onUserAuthenticated'; referenceNumber?: string | undefined; bytesComplete?: number | undefined; bytesTotal?: number | undefined; error?: string | undefined; userId?: string | undefined; username?: string | undefined; }) => void"
57
+ }
58
+ ],
59
+ "returns": "Promise<PluginListenerHandle>",
60
+ "tags": [],
61
+ "docs": "",
62
+ "complexTypes": [
63
+ "PluginListenerHandle"
64
+ ],
65
+ "slug": "addlistenerrecord360event-"
43
66
  }
44
67
  ],
45
68
  "properties": []
@@ -90,6 +113,22 @@
90
113
  "type": "string"
91
114
  }
92
115
  ]
116
+ },
117
+ {
118
+ "name": "PluginListenerHandle",
119
+ "slug": "pluginlistenerhandle",
120
+ "docs": "",
121
+ "tags": [],
122
+ "methods": [],
123
+ "properties": [
124
+ {
125
+ "name": "remove",
126
+ "tags": [],
127
+ "docs": "",
128
+ "complexTypes": [],
129
+ "type": "() => Promise<void>"
130
+ }
131
+ ]
93
132
  }
94
133
  ],
95
134
  "enums": [],
@@ -1,3 +1,4 @@
1
+ import type { PluginListenerHandle } from "@capacitor/core";
1
2
  export declare type Record360Identity = R360PasswordIdentity | R360UserTokenIdentity;
2
3
  export interface R360PasswordIdentity {
3
4
  username: string;
@@ -15,4 +16,13 @@ export interface CapacitorRecord360SDKPlugin {
15
16
  workOrderLabel?: string;
16
17
  identity?: Record360Identity;
17
18
  }): Promise<void>;
19
+ addListener(eventName: 'Record360Event', listenerFunc: (data: {
20
+ type: 'onFailedToAuthenticate' | 'onInspectionCancelled' | 'onInspectionComplete' | 'onInspectionUploadFailed' | 'onInspectionUploadProgress' | 'onInspectionUploaded' | 'onInspectionStarted' | 'onUserAuthenticated';
21
+ referenceNumber?: string;
22
+ bytesComplete?: number;
23
+ bytesTotal?: number;
24
+ error?: string;
25
+ userId?: string;
26
+ username?: string;
27
+ }) => void): Promise<PluginListenerHandle>;
18
28
  }
@@ -1 +1 @@
1
- {"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"","sourcesContent":["export type Record360Identity = R360PasswordIdentity | R360UserTokenIdentity\n\nexport interface R360PasswordIdentity {\n username: string,\n password: string\n}\n\nexport interface R360UserTokenIdentity {\n userId: string,\n userToken: string\n}\n\nexport interface CapacitorRecord360SDKPlugin {\n launchRecord360(identity?: Record360Identity): Promise<void>\n\n launchReferenceCapture(options: {\n referenceNumber: string,\n workOrderId?: number,\n workOrderLabel?: string,\n identity?: Record360Identity\n }): Promise<void>\n}\n"]}
1
+ {"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"","sourcesContent":["import type { PluginListenerHandle } from \"@capacitor/core\"\nexport type Record360Identity = R360PasswordIdentity | R360UserTokenIdentity\n\nexport interface R360PasswordIdentity {\n username: string,\n password: string\n}\n\nexport interface R360UserTokenIdentity {\n userId: string,\n userToken: string\n}\n\nexport interface CapacitorRecord360SDKPlugin {\n launchRecord360(identity?: Record360Identity): Promise<void>\n\n launchReferenceCapture(options: {\n referenceNumber: string,\n workOrderId?: number,\n workOrderLabel?: string,\n identity?: Record360Identity\n }): Promise<void>\n\n addListener(\n eventName: 'Record360Event',\n listenerFunc: (\n data: { \n type: 'onFailedToAuthenticate' | 'onInspectionCancelled' | 'onInspectionComplete' | 'onInspectionUploadFailed' | 'onInspectionUploadProgress' | 'onInspectionUploaded' | 'onInspectionStarted' | 'onUserAuthenticated',\n referenceNumber?: string,\n bytesComplete?: number,\n bytesTotal?: number,\n error?: string,\n userId?: string,\n username?: string\n }\n ) => void,\n ): Promise<PluginListenerHandle>;\n}\n"]}
package/dist/esm/web.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { WebPlugin } from '@capacitor/core';
1
+ import { ListenerCallback, PluginListenerHandle, WebPlugin } from '@capacitor/core';
2
2
  import type { CapacitorRecord360SDKPlugin, Record360Identity } from './definitions';
3
3
  export declare class CapacitorRecord360SDKWeb extends WebPlugin implements CapacitorRecord360SDKPlugin {
4
4
  launchRecord360(_?: Record360Identity): Promise<void>;
@@ -8,4 +8,5 @@ export declare class CapacitorRecord360SDKWeb extends WebPlugin implements Capac
8
8
  workOrderLabel?: string;
9
9
  identity?: Record360Identity;
10
10
  }): Promise<void>;
11
+ addListener(_eventName: string, _listenerFunc: ListenerCallback): Promise<PluginListenerHandle>;
11
12
  }
package/dist/esm/web.js CHANGED
@@ -6,5 +6,8 @@ export class CapacitorRecord360SDKWeb extends WebPlugin {
6
6
  launchReferenceCapture(_) {
7
7
  throw new Error("Not available on web");
8
8
  }
9
+ addListener(_eventName, _listenerFunc) {
10
+ throw new Error("Not available on web");
11
+ }
9
12
  }
10
13
  //# sourceMappingURL=web.js.map
@@ -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,wBAAyB,SAAQ,SAAS;IACrD,eAAe,CAAC,CAAqB;QACnC,MAAM,IAAI,KAAK,CAAC,uBAAuB,CAAC,CAAC;IAC3C,CAAC;IAED,sBAAsB,CAAC,CAA4G;QAC/H,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;IAC5C,CAAC;CAEF","sourcesContent":["import { WebPlugin } from '@capacitor/core';\n\nimport type { CapacitorRecord360SDKPlugin, Record360Identity } from './definitions';\n\nexport class CapacitorRecord360SDKWeb extends WebPlugin implements CapacitorRecord360SDKPlugin {\n launchRecord360(_?: Record360Identity): Promise<void> {\n throw new Error(\"Not available on web.\");\n }\n\n launchReferenceCapture(_: { referenceNumber: string; workOrderId?: number; workOrderLabel?: string; identity?: Record360Identity; }): Promise<void> {\n throw new Error(\"Not available on web\");\n }\n \n}"]}
1
+ {"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAA0C,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAIpF,MAAM,OAAO,wBAAyB,SAAQ,SAAS;IACrD,eAAe,CAAC,CAAqB;QACnC,MAAM,IAAI,KAAK,CAAC,uBAAuB,CAAC,CAAC;IAC3C,CAAC;IAED,sBAAsB,CAAC,CAA4G;QAC/H,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;IAC5C,CAAC;IAED,WAAW,CAAC,UAAkB,EAAE,aAA+B;QAC3D,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;IAC5C,CAAC;CACF","sourcesContent":["import { ListenerCallback, PluginListenerHandle, WebPlugin } from '@capacitor/core';\n\nimport type { CapacitorRecord360SDKPlugin, Record360Identity } from './definitions';\n\nexport class CapacitorRecord360SDKWeb extends WebPlugin implements CapacitorRecord360SDKPlugin {\n launchRecord360(_?: Record360Identity): Promise<void> {\n throw new Error(\"Not available on web.\");\n }\n\n launchReferenceCapture(_: { referenceNumber: string; workOrderId?: number; workOrderLabel?: string; identity?: Record360Identity; }): Promise<void> {\n throw new Error(\"Not available on web\");\n }\n \n addListener(_eventName: string, _listenerFunc: ListenerCallback): Promise<PluginListenerHandle> {\n throw new Error(\"Not available on web\");\n }\n}"]}
@@ -13,6 +13,9 @@ class CapacitorRecord360SDKWeb extends core.WebPlugin {
13
13
  launchReferenceCapture(_) {
14
14
  throw new Error("Not available on web");
15
15
  }
16
+ addListener(_eventName, _listenerFunc) {
17
+ throw new Error("Not available on web");
18
+ }
16
19
  }
17
20
 
18
21
  var web = /*#__PURE__*/Object.freeze({
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.cjs.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst CapacitorRecord360SDK = registerPlugin('CapacitorRecord360SDK', {\n web: () => import('./web').then(m => new m.CapacitorRecord360SDKWeb()),\n});\nexport * from './definitions';\nexport { CapacitorRecord360SDK };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class CapacitorRecord360SDKWeb extends WebPlugin {\n launchRecord360(_) {\n throw new Error(\"Not available on web.\");\n }\n launchReferenceCapture(_) {\n throw new Error(\"Not available on web\");\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;;AACK,MAAC,qBAAqB,GAAGA,mBAAc,CAAC,uBAAuB,EAAE;AACtE,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,wBAAwB,EAAE,CAAC;AAC1E,CAAC;;ACFM,MAAM,wBAAwB,SAASC,cAAS,CAAC;AACxD,IAAI,eAAe,CAAC,CAAC,EAAE;AACvB,QAAQ,MAAM,IAAI,KAAK,CAAC,uBAAuB,CAAC;AAChD;AACA,IAAI,sBAAsB,CAAC,CAAC,EAAE;AAC9B,QAAQ,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC;AAC/C;AACA;;;;;;;;;"}
1
+ {"version":3,"file":"plugin.cjs.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst CapacitorRecord360SDK = registerPlugin('CapacitorRecord360SDK', {\n web: () => import('./web').then(m => new m.CapacitorRecord360SDKWeb()),\n});\nexport * from './definitions';\nexport { CapacitorRecord360SDK };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class CapacitorRecord360SDKWeb extends WebPlugin {\n launchRecord360(_) {\n throw new Error(\"Not available on web.\");\n }\n launchReferenceCapture(_) {\n throw new Error(\"Not available on web\");\n }\n addListener(_eventName, _listenerFunc) {\n throw new Error(\"Not available on web\");\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;;AACK,MAAC,qBAAqB,GAAGA,mBAAc,CAAC,uBAAuB,EAAE;AACtE,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,wBAAwB,EAAE,CAAC;AAC1E,CAAC;;ACFM,MAAM,wBAAwB,SAASC,cAAS,CAAC;AACxD,IAAI,eAAe,CAAC,CAAC,EAAE;AACvB,QAAQ,MAAM,IAAI,KAAK,CAAC,uBAAuB,CAAC;AAChD;AACA,IAAI,sBAAsB,CAAC,CAAC,EAAE;AAC9B,QAAQ,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC;AAC/C;AACA,IAAI,WAAW,CAAC,UAAU,EAAE,aAAa,EAAE;AAC3C,QAAQ,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC;AAC/C;AACA;;;;;;;;;"}
package/dist/plugin.js CHANGED
@@ -12,6 +12,9 @@ var capacitorCapacitorRecord360SDK = (function (exports, core) {
12
12
  launchReferenceCapture(_) {
13
13
  throw new Error("Not available on web");
14
14
  }
15
+ addListener(_eventName, _listenerFunc) {
16
+ throw new Error("Not available on web");
17
+ }
15
18
  }
16
19
 
17
20
  var web = /*#__PURE__*/Object.freeze({
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst CapacitorRecord360SDK = registerPlugin('CapacitorRecord360SDK', {\n web: () => import('./web').then(m => new m.CapacitorRecord360SDKWeb()),\n});\nexport * from './definitions';\nexport { CapacitorRecord360SDK };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class CapacitorRecord360SDKWeb extends WebPlugin {\n launchRecord360(_) {\n throw new Error(\"Not available on web.\");\n }\n launchReferenceCapture(_) {\n throw new Error(\"Not available on web\");\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;AACK,UAAC,qBAAqB,GAAGA,mBAAc,CAAC,uBAAuB,EAAE;IACtE,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,wBAAwB,EAAE,CAAC;IAC1E,CAAC;;ICFM,MAAM,wBAAwB,SAASC,cAAS,CAAC;IACxD,IAAI,eAAe,CAAC,CAAC,EAAE;IACvB,QAAQ,MAAM,IAAI,KAAK,CAAC,uBAAuB,CAAC;IAChD;IACA,IAAI,sBAAsB,CAAC,CAAC,EAAE;IAC9B,QAAQ,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC;IAC/C;IACA;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"plugin.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst CapacitorRecord360SDK = registerPlugin('CapacitorRecord360SDK', {\n web: () => import('./web').then(m => new m.CapacitorRecord360SDKWeb()),\n});\nexport * from './definitions';\nexport { CapacitorRecord360SDK };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class CapacitorRecord360SDKWeb extends WebPlugin {\n launchRecord360(_) {\n throw new Error(\"Not available on web.\");\n }\n launchReferenceCapture(_) {\n throw new Error(\"Not available on web\");\n }\n addListener(_eventName, _listenerFunc) {\n throw new Error(\"Not available on web\");\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;AACK,UAAC,qBAAqB,GAAGA,mBAAc,CAAC,uBAAuB,EAAE;IACtE,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,wBAAwB,EAAE,CAAC;IAC1E,CAAC;;ICFM,MAAM,wBAAwB,SAASC,cAAS,CAAC;IACxD,IAAI,eAAe,CAAC,CAAC,EAAE;IACvB,QAAQ,MAAM,IAAI,KAAK,CAAC,uBAAuB,CAAC;IAChD;IACA,IAAI,sBAAsB,CAAC,CAAC,EAAE;IAC9B,QAAQ,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC;IAC/C;IACA,IAAI,WAAW,CAAC,UAAU,EAAE,aAAa,EAAE;IAC3C,QAAQ,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC;IAC/C;IACA;;;;;;;;;;;;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "capacitor-record360sdk",
3
- "version": "7.0.0",
3
+ "version": "7.0.1",
4
4
  "description": "Capacitor wrapper for Record360SDK",
5
5
  "main": "dist/plugin.cjs.js",
6
6
  "module": "dist/esm/index.js",
@@ -63,7 +63,7 @@
63
63
  "typescript": "~4.1.5"
64
64
  },
65
65
  "peerDependencies": {
66
- "@capacitor/core": "^6.0.0"
66
+ "@capacitor/core": "^7.0.0"
67
67
  },
68
68
  "prettier": "@ionic/prettier-config",
69
69
  "swiftlint": "@ionic/swiftlint-config",