capacitor-event-bird 0.0.12 → 0.0.13
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 +12 -0
- package/dist/docs.json +10 -0
- package/dist/esm/definitions.d.ts +3 -0
- package/dist/esm/definitions.js.map +1 -1
- package/dist/esm/web.d.ts +3 -0
- package/dist/esm/web.js +3 -0
- package/dist/esm/web.js.map +1 -1
- package/dist/plugin.cjs.js +3 -0
- package/dist/plugin.cjs.js.map +1 -1
- package/dist/plugin.js +3 -0
- package/dist/plugin.js.map +1 -1
- package/ios/Sources/CapacitorEventBirdPlugin/CapacitorEventBirdPlugin.swift +6 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -17,6 +17,7 @@ npx cap sync
|
|
|
17
17
|
* [`logout()`](#logout)
|
|
18
18
|
* [`waitlistAfterInit()`](#waitlistafterinit)
|
|
19
19
|
* [`openHelpModal()`](#openhelpmodal)
|
|
20
|
+
* [`getDeviceId()`](#getdeviceid)
|
|
20
21
|
|
|
21
22
|
</docgen-index>
|
|
22
23
|
|
|
@@ -64,4 +65,15 @@ openHelpModal() => Promise<void>
|
|
|
64
65
|
|
|
65
66
|
--------------------
|
|
66
67
|
|
|
68
|
+
|
|
69
|
+
### getDeviceId()
|
|
70
|
+
|
|
71
|
+
```typescript
|
|
72
|
+
getDeviceId() => Promise<{ value: string; }>
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
**Returns:** <code>Promise<{ value: string; }></code>
|
|
76
|
+
|
|
77
|
+
--------------------
|
|
78
|
+
|
|
67
79
|
</docgen-api>
|
package/dist/docs.json
CHANGED
|
@@ -50,6 +50,16 @@
|
|
|
50
50
|
"docs": "",
|
|
51
51
|
"complexTypes": [],
|
|
52
52
|
"slug": "openhelpmodal"
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"name": "getDeviceId",
|
|
56
|
+
"signature": "() => Promise<{ value: string; }>",
|
|
57
|
+
"parameters": [],
|
|
58
|
+
"returns": "Promise<{ value: string; }>",
|
|
59
|
+
"tags": [],
|
|
60
|
+
"docs": "",
|
|
61
|
+
"complexTypes": [],
|
|
62
|
+
"slug": "getdeviceid"
|
|
53
63
|
}
|
|
54
64
|
],
|
|
55
65
|
"properties": []
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"","sourcesContent":["export interface CapacitorEventBirdPlugin {\n echo(options: { value: string }): Promise<{ value: string }>;\n logout(): Promise<void>;\n waitlistAfterInit(): Promise<void>\n openHelpModal(): Promise<void>\n}\n"]}
|
|
1
|
+
{"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"","sourcesContent":["export interface CapacitorEventBirdPlugin {\n echo(options: { value: string }): Promise<{ value: string }>;\n logout(): Promise<void>;\n waitlistAfterInit(): Promise<void>\n openHelpModal(): Promise<void>\n getDeviceId(): Promise<{ value: string }>;\n}\n"]}
|
package/dist/esm/web.d.ts
CHANGED
package/dist/esm/web.js
CHANGED
|
@@ -13,5 +13,8 @@ export class CapacitorEventBirdWeb extends WebPlugin {
|
|
|
13
13
|
async waitlistAfterInit() {
|
|
14
14
|
console.log('waitlistAfterInit in web isnt really needed it already works');
|
|
15
15
|
}
|
|
16
|
+
async getDeviceId() {
|
|
17
|
+
return { value: 'ios device id is not needed for web' };
|
|
18
|
+
}
|
|
16
19
|
}
|
|
17
20
|
//# sourceMappingURL=web.js.map
|
package/dist/esm/web.js.map
CHANGED
|
@@ -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,qBAAsB,SAAQ,SAAS;IAClD,KAAK,CAAC,IAAI,CAAC,OAA0B;QACnC,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAC7B,OAAO,OAAO,CAAC;IACjB,CAAC;IAED,KAAK,CAAC,MAAM;QACV,OAAO,CAAC,GAAG,CAAC,mDAAmD,CAAC,CAAC;IACnE,CAAC;IAED,KAAK,CAAC,aAAa;QACjB,OAAO,CAAC,GAAG,CAAC,0DAA0D,CAAC,CAAC;IAC1E,CAAC;IAED,KAAK,CAAC,iBAAiB;QACrB,OAAO,CAAC,GAAG,CAAC,8DAA8D,CAAC,CAAC;IAC9E,CAAC;CACF","sourcesContent":["import { WebPlugin } from '@capacitor/core';\n\nimport type { CapacitorEventBirdPlugin } from './definitions';\n\nexport class CapacitorEventBirdWeb extends WebPlugin implements CapacitorEventBirdPlugin {\n async echo(options: { value: string }): Promise<{ value: string }> {\n console.log('ECHO', options);\n return options;\n }\n\n async logout(): Promise<void> {\n console.log('logout in web isnt really needed it already works');\n }\n\n async openHelpModal(): Promise<void> {\n console.log('openHelpModal in web isnt really needed it already works');\n }\n\n async waitlistAfterInit(): Promise<void> {\n console.log('waitlistAfterInit in web isnt really needed it already works');\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,qBAAsB,SAAQ,SAAS;IAClD,KAAK,CAAC,IAAI,CAAC,OAA0B;QACnC,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAC7B,OAAO,OAAO,CAAC;IACjB,CAAC;IAED,KAAK,CAAC,MAAM;QACV,OAAO,CAAC,GAAG,CAAC,mDAAmD,CAAC,CAAC;IACnE,CAAC;IAED,KAAK,CAAC,aAAa;QACjB,OAAO,CAAC,GAAG,CAAC,0DAA0D,CAAC,CAAC;IAC1E,CAAC;IAED,KAAK,CAAC,iBAAiB;QACrB,OAAO,CAAC,GAAG,CAAC,8DAA8D,CAAC,CAAC;IAC9E,CAAC;IAED,KAAK,CAAC,WAAW;QACf,OAAO,EAAE,KAAK,EAAE,qCAAqC,EAAE,CAAC;IAC1D,CAAC;CACF","sourcesContent":["import { WebPlugin } from '@capacitor/core';\n\nimport type { CapacitorEventBirdPlugin } from './definitions';\n\nexport class CapacitorEventBirdWeb extends WebPlugin implements CapacitorEventBirdPlugin {\n async echo(options: { value: string }): Promise<{ value: string }> {\n console.log('ECHO', options);\n return options;\n }\n\n async logout(): Promise<void> {\n console.log('logout in web isnt really needed it already works');\n }\n\n async openHelpModal(): Promise<void> {\n console.log('openHelpModal in web isnt really needed it already works');\n }\n\n async waitlistAfterInit(): Promise<void> {\n console.log('waitlistAfterInit in web isnt really needed it already works');\n }\n\n async getDeviceId(): Promise<{ value: string }> {\n return { value: 'ios device id is not needed for web' };\n }\n}\n"]}
|
package/dist/plugin.cjs.js
CHANGED
|
@@ -20,6 +20,9 @@ class CapacitorEventBirdWeb extends core.WebPlugin {
|
|
|
20
20
|
async waitlistAfterInit() {
|
|
21
21
|
console.log('waitlistAfterInit in web isnt really needed it already works');
|
|
22
22
|
}
|
|
23
|
+
async getDeviceId() {
|
|
24
|
+
return { value: 'ios device id is not needed for web' };
|
|
25
|
+
}
|
|
23
26
|
}
|
|
24
27
|
|
|
25
28
|
var web = /*#__PURE__*/Object.freeze({
|
package/dist/plugin.cjs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.cjs.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst CapacitorEventBird = registerPlugin('CapacitorEventBird', {\n web: () => import('./web').then((m) => new m.CapacitorEventBirdWeb()),\n});\nexport * from './definitions';\nexport { CapacitorEventBird };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class CapacitorEventBirdWeb extends WebPlugin {\n async echo(options) {\n console.log('ECHO', options);\n return options;\n }\n async logout() {\n console.log('logout in web isnt really needed it already works');\n }\n async openHelpModal() {\n console.log('openHelpModal in web isnt really needed it already works');\n }\n async waitlistAfterInit() {\n console.log('waitlistAfterInit in web isnt really needed it already works');\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;;AACK,MAAC,kBAAkB,GAAGA,mBAAc,CAAC,oBAAoB,EAAE;AAChE,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,qBAAqB,EAAE,CAAC;AACzE,CAAC;;ACFM,MAAM,qBAAqB,SAASC,cAAS,CAAC;AACrD,IAAI,MAAM,IAAI,CAAC,OAAO,EAAE;AACxB,QAAQ,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC;AACpC,QAAQ,OAAO,OAAO;AACtB;AACA,IAAI,MAAM,MAAM,GAAG;AACnB,QAAQ,OAAO,CAAC,GAAG,CAAC,mDAAmD,CAAC;AACxE;AACA,IAAI,MAAM,aAAa,GAAG;AAC1B,QAAQ,OAAO,CAAC,GAAG,CAAC,0DAA0D,CAAC;AAC/E;AACA,IAAI,MAAM,iBAAiB,GAAG;AAC9B,QAAQ,OAAO,CAAC,GAAG,CAAC,8DAA8D,CAAC;AACnF;AACA;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"plugin.cjs.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst CapacitorEventBird = registerPlugin('CapacitorEventBird', {\n web: () => import('./web').then((m) => new m.CapacitorEventBirdWeb()),\n});\nexport * from './definitions';\nexport { CapacitorEventBird };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class CapacitorEventBirdWeb extends WebPlugin {\n async echo(options) {\n console.log('ECHO', options);\n return options;\n }\n async logout() {\n console.log('logout in web isnt really needed it already works');\n }\n async openHelpModal() {\n console.log('openHelpModal in web isnt really needed it already works');\n }\n async waitlistAfterInit() {\n console.log('waitlistAfterInit in web isnt really needed it already works');\n }\n async getDeviceId() {\n return { value: 'ios device id is not needed for web' };\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;;AACK,MAAC,kBAAkB,GAAGA,mBAAc,CAAC,oBAAoB,EAAE;AAChE,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,qBAAqB,EAAE,CAAC;AACzE,CAAC;;ACFM,MAAM,qBAAqB,SAASC,cAAS,CAAC;AACrD,IAAI,MAAM,IAAI,CAAC,OAAO,EAAE;AACxB,QAAQ,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC;AACpC,QAAQ,OAAO,OAAO;AACtB;AACA,IAAI,MAAM,MAAM,GAAG;AACnB,QAAQ,OAAO,CAAC,GAAG,CAAC,mDAAmD,CAAC;AACxE;AACA,IAAI,MAAM,aAAa,GAAG;AAC1B,QAAQ,OAAO,CAAC,GAAG,CAAC,0DAA0D,CAAC;AAC/E;AACA,IAAI,MAAM,iBAAiB,GAAG;AAC9B,QAAQ,OAAO,CAAC,GAAG,CAAC,8DAA8D,CAAC;AACnF;AACA,IAAI,MAAM,WAAW,GAAG;AACxB,QAAQ,OAAO,EAAE,KAAK,EAAE,qCAAqC,EAAE;AAC/D;AACA;;;;;;;;;"}
|
package/dist/plugin.js
CHANGED
|
@@ -19,6 +19,9 @@ var capacitorCapacitorEventBird = (function (exports, core) {
|
|
|
19
19
|
async waitlistAfterInit() {
|
|
20
20
|
console.log('waitlistAfterInit in web isnt really needed it already works');
|
|
21
21
|
}
|
|
22
|
+
async getDeviceId() {
|
|
23
|
+
return { value: 'ios device id is not needed for web' };
|
|
24
|
+
}
|
|
22
25
|
}
|
|
23
26
|
|
|
24
27
|
var web = /*#__PURE__*/Object.freeze({
|
package/dist/plugin.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst CapacitorEventBird = registerPlugin('CapacitorEventBird', {\n web: () => import('./web').then((m) => new m.CapacitorEventBirdWeb()),\n});\nexport * from './definitions';\nexport { CapacitorEventBird };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class CapacitorEventBirdWeb extends WebPlugin {\n async echo(options) {\n console.log('ECHO', options);\n return options;\n }\n async logout() {\n console.log('logout in web isnt really needed it already works');\n }\n async openHelpModal() {\n console.log('openHelpModal in web isnt really needed it already works');\n }\n async waitlistAfterInit() {\n console.log('waitlistAfterInit in web isnt really needed it already works');\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;AACK,UAAC,kBAAkB,GAAGA,mBAAc,CAAC,oBAAoB,EAAE;IAChE,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,qBAAqB,EAAE,CAAC;IACzE,CAAC;;ICFM,MAAM,qBAAqB,SAASC,cAAS,CAAC;IACrD,IAAI,MAAM,IAAI,CAAC,OAAO,EAAE;IACxB,QAAQ,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC;IACpC,QAAQ,OAAO,OAAO;IACtB;IACA,IAAI,MAAM,MAAM,GAAG;IACnB,QAAQ,OAAO,CAAC,GAAG,CAAC,mDAAmD,CAAC;IACxE;IACA,IAAI,MAAM,aAAa,GAAG;IAC1B,QAAQ,OAAO,CAAC,GAAG,CAAC,0DAA0D,CAAC;IAC/E;IACA,IAAI,MAAM,iBAAiB,GAAG;IAC9B,QAAQ,OAAO,CAAC,GAAG,CAAC,8DAA8D,CAAC;IACnF;IACA;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"plugin.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst CapacitorEventBird = registerPlugin('CapacitorEventBird', {\n web: () => import('./web').then((m) => new m.CapacitorEventBirdWeb()),\n});\nexport * from './definitions';\nexport { CapacitorEventBird };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class CapacitorEventBirdWeb extends WebPlugin {\n async echo(options) {\n console.log('ECHO', options);\n return options;\n }\n async logout() {\n console.log('logout in web isnt really needed it already works');\n }\n async openHelpModal() {\n console.log('openHelpModal in web isnt really needed it already works');\n }\n async waitlistAfterInit() {\n console.log('waitlistAfterInit in web isnt really needed it already works');\n }\n async getDeviceId() {\n return { value: 'ios device id is not needed for web' };\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;AACK,UAAC,kBAAkB,GAAGA,mBAAc,CAAC,oBAAoB,EAAE;IAChE,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,qBAAqB,EAAE,CAAC;IACzE,CAAC;;ICFM,MAAM,qBAAqB,SAASC,cAAS,CAAC;IACrD,IAAI,MAAM,IAAI,CAAC,OAAO,EAAE;IACxB,QAAQ,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC;IACpC,QAAQ,OAAO,OAAO;IACtB;IACA,IAAI,MAAM,MAAM,GAAG;IACnB,QAAQ,OAAO,CAAC,GAAG,CAAC,mDAAmD,CAAC;IACxE;IACA,IAAI,MAAM,aAAa,GAAG;IAC1B,QAAQ,OAAO,CAAC,GAAG,CAAC,0DAA0D,CAAC;IAC/E;IACA,IAAI,MAAM,iBAAiB,GAAG;IAC9B,QAAQ,OAAO,CAAC,GAAG,CAAC,8DAA8D,CAAC;IACnF;IACA,IAAI,MAAM,WAAW,GAAG;IACxB,QAAQ,OAAO,EAAE,KAAK,EAAE,qCAAqC,EAAE;IAC/D;IACA;;;;;;;;;;;;;;;"}
|
|
@@ -11,6 +11,7 @@ public class CapacitorEventBirdPlugin: CAPPlugin, CAPBridgedPlugin {
|
|
|
11
11
|
CAPPluginMethod(name: "logout", returnType: CAPPluginReturnPromise),
|
|
12
12
|
CAPPluginMethod(name: "waitlistAfterInit", returnType: CAPPluginReturnPromise),
|
|
13
13
|
CAPPluginMethod(name: "openHelpModal", returnType: CAPPluginReturnPromise),
|
|
14
|
+
CAPPluginMethod(name: "getDeviceId", returnType: CAPPluginReturnPromise),
|
|
14
15
|
]
|
|
15
16
|
|
|
16
17
|
private var pendingEchoCalls: [CAPPluginCall] = []
|
|
@@ -27,6 +28,11 @@ public class CapacitorEventBirdPlugin: CAPPlugin, CAPBridgedPlugin {
|
|
|
27
28
|
}
|
|
28
29
|
}
|
|
29
30
|
|
|
31
|
+
@objc func getDeviceId(_ call: CAPPluginCall) {
|
|
32
|
+
call.resolve(["value": UIDevice.current.identifierForVendor?.uuidString])
|
|
33
|
+
return
|
|
34
|
+
}
|
|
35
|
+
|
|
30
36
|
@objc public func setAuthToken(_ token: String) {
|
|
31
37
|
print("[Native] Setting auth token in plugin")
|
|
32
38
|
self.savedToken = token
|