@aigens/aigens-sdk-core 0.0.18 → 0.0.19

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
@@ -22,6 +22,7 @@ npx cap sync
22
22
  * [`isInstalledApp(...)`](#isinstalledapp)
23
23
  * [`getIsProductionEnvironment()`](#getisproductionenvironment)
24
24
  * [`openExternalUrl(...)`](#openexternalurl)
25
+ * [Interfaces](#interfaces)
25
26
 
26
27
  </docgen-index>
27
28
 
@@ -76,14 +77,14 @@ finish(options: any) => Promise<any>
76
77
  ### getMember(...)
77
78
 
78
79
  ```typescript
79
- getMember(options: any) => Promise<any>
80
+ getMember(options: any) => Promise<{ member: Member; }>
80
81
  ```
81
82
 
82
83
  | Param | Type |
83
84
  | ------------- | ---------------- |
84
85
  | **`options`** | <code>any</code> |
85
86
 
86
- **Returns:** <code>Promise&lt;any&gt;</code>
87
+ **Returns:** <code>Promise&lt;{ member: <a href="#member">Member</a>; }&gt;</code>
87
88
 
88
89
  --------------------
89
90
 
@@ -91,14 +92,14 @@ getMember(options: any) => Promise<any>
91
92
  ### getDeeplink(...)
92
93
 
93
94
  ```typescript
94
- getDeeplink(options: any) => Promise<any>
95
+ getDeeplink(options: any) => Promise<{ deeplink: Deeplink; }>
95
96
  ```
96
97
 
97
98
  | Param | Type |
98
99
  | ------------- | ---------------- |
99
100
  | **`options`** | <code>any</code> |
100
101
 
101
- **Returns:** <code>Promise&lt;any&gt;</code>
102
+ **Returns:** <code>Promise&lt;{ deeplink: <a href="#deeplink">Deeplink</a>; }&gt;</code>
102
103
 
103
104
  --------------------
104
105
 
@@ -158,4 +159,33 @@ openExternalUrl(options: { url: string; }) => Promise<any>
158
159
 
159
160
  --------------------
160
161
 
162
+
163
+ ### Interfaces
164
+
165
+
166
+ #### Member
167
+
168
+ | Prop | Type |
169
+ | -------------------------- | -------------------- |
170
+ | **`"memberCode"`** | <code>string</code> |
171
+ | **`"source"`** | <code>string</code> |
172
+ | **`"sessionId"`** | <code>string</code> |
173
+ | **`"pushId"`** | <code>string</code> |
174
+ | **`"deviceId"`** | <code>string</code> |
175
+ | **`"universalLink"`** | <code>string</code> |
176
+ | **`"appleMerchantId"`** | <code>string</code> |
177
+ | **`"cachedOrderContext"`** | <code>boolean</code> |
178
+ | **`"name"`** | <code>string</code> |
179
+ | **`"email"`** | <code>string</code> |
180
+ | **`"phone"`** | <code>string</code> |
181
+
182
+
183
+ #### Deeplink
184
+
185
+ | Prop | Type |
186
+ | ----------------------- | ------------------- |
187
+ | **`"addItemId"`** | <code>string</code> |
188
+ | **`"addDiscountCode"`** | <code>string</code> |
189
+ | **`"addOfferId"`** | <code>string</code> |
190
+
161
191
  </docgen-api>
package/dist/docs.json CHANGED
@@ -55,7 +55,7 @@
55
55
  },
56
56
  {
57
57
  "name": "getMember",
58
- "signature": "(options: any) => Promise<any>",
58
+ "signature": "(options: any) => Promise<{ member: Member; }>",
59
59
  "parameters": [
60
60
  {
61
61
  "name": "options",
@@ -63,15 +63,17 @@
63
63
  "type": "any"
64
64
  }
65
65
  ],
66
- "returns": "Promise<any>",
66
+ "returns": "Promise<{ member: Member; }>",
67
67
  "tags": [],
68
68
  "docs": "",
69
- "complexTypes": [],
69
+ "complexTypes": [
70
+ "Member"
71
+ ],
70
72
  "slug": "getmember"
71
73
  },
72
74
  {
73
75
  "name": "getDeeplink",
74
- "signature": "(options: any) => Promise<any>",
76
+ "signature": "(options: any) => Promise<{ deeplink: Deeplink; }>",
75
77
  "parameters": [
76
78
  {
77
79
  "name": "options",
@@ -79,10 +81,12 @@
79
81
  "type": "any"
80
82
  }
81
83
  ],
82
- "returns": "Promise<any>",
84
+ "returns": "Promise<{ deeplink: Deeplink; }>",
83
85
  "tags": [],
84
86
  "docs": "",
85
- "complexTypes": [],
87
+ "complexTypes": [
88
+ "Deeplink"
89
+ ],
86
90
  "slug": "getdeeplink"
87
91
  },
88
92
  {
@@ -146,7 +150,124 @@
146
150
  ],
147
151
  "properties": []
148
152
  },
149
- "interfaces": [],
153
+ "interfaces": [
154
+ {
155
+ "name": "Member",
156
+ "slug": "member",
157
+ "docs": "",
158
+ "tags": [],
159
+ "methods": [],
160
+ "properties": [
161
+ {
162
+ "name": "\"memberCode\"",
163
+ "tags": [],
164
+ "docs": "",
165
+ "complexTypes": [],
166
+ "type": "string | undefined"
167
+ },
168
+ {
169
+ "name": "\"source\"",
170
+ "tags": [],
171
+ "docs": "",
172
+ "complexTypes": [],
173
+ "type": "string | undefined"
174
+ },
175
+ {
176
+ "name": "\"sessionId\"",
177
+ "tags": [],
178
+ "docs": "",
179
+ "complexTypes": [],
180
+ "type": "string | undefined"
181
+ },
182
+ {
183
+ "name": "\"pushId\"",
184
+ "tags": [],
185
+ "docs": "",
186
+ "complexTypes": [],
187
+ "type": "string | undefined"
188
+ },
189
+ {
190
+ "name": "\"deviceId\"",
191
+ "tags": [],
192
+ "docs": "",
193
+ "complexTypes": [],
194
+ "type": "string"
195
+ },
196
+ {
197
+ "name": "\"universalLink\"",
198
+ "tags": [],
199
+ "docs": "",
200
+ "complexTypes": [],
201
+ "type": "string | undefined"
202
+ },
203
+ {
204
+ "name": "\"appleMerchantId\"",
205
+ "tags": [],
206
+ "docs": "",
207
+ "complexTypes": [],
208
+ "type": "string | undefined"
209
+ },
210
+ {
211
+ "name": "\"cachedOrderContext\"",
212
+ "tags": [],
213
+ "docs": "",
214
+ "complexTypes": [],
215
+ "type": "boolean | undefined"
216
+ },
217
+ {
218
+ "name": "\"name\"",
219
+ "tags": [],
220
+ "docs": "",
221
+ "complexTypes": [],
222
+ "type": "string | undefined"
223
+ },
224
+ {
225
+ "name": "\"email\"",
226
+ "tags": [],
227
+ "docs": "",
228
+ "complexTypes": [],
229
+ "type": "string | undefined"
230
+ },
231
+ {
232
+ "name": "\"phone\"",
233
+ "tags": [],
234
+ "docs": "",
235
+ "complexTypes": [],
236
+ "type": "string | undefined"
237
+ }
238
+ ]
239
+ },
240
+ {
241
+ "name": "Deeplink",
242
+ "slug": "deeplink",
243
+ "docs": "",
244
+ "tags": [],
245
+ "methods": [],
246
+ "properties": [
247
+ {
248
+ "name": "\"addItemId\"",
249
+ "tags": [],
250
+ "docs": "",
251
+ "complexTypes": [],
252
+ "type": "string | undefined"
253
+ },
254
+ {
255
+ "name": "\"addDiscountCode\"",
256
+ "tags": [],
257
+ "docs": "",
258
+ "complexTypes": [],
259
+ "type": "string | undefined"
260
+ },
261
+ {
262
+ "name": "\"addOfferId\"",
263
+ "tags": [],
264
+ "docs": "",
265
+ "complexTypes": [],
266
+ "type": "string | undefined"
267
+ }
268
+ ]
269
+ }
270
+ ],
150
271
  "enums": [],
151
272
  "typeAliases": [],
152
273
  "pluginConfigs": []
@@ -2,8 +2,12 @@ export interface CorePlugin {
2
2
  echo(options: any): Promise<any>;
3
3
  dismiss(options: any): Promise<any>;
4
4
  finish(options: any): Promise<any>;
5
- getMember(options: any): Promise<any>;
6
- getDeeplink(options: any): Promise<any>;
5
+ getMember(options: any): Promise<{
6
+ member: Member;
7
+ }>;
8
+ getDeeplink(options: any): Promise<{
9
+ deeplink: Deeplink;
10
+ }>;
7
11
  openBrowser(options: any): Promise<any>;
8
12
  isInstalledApp(options: {
9
13
  key: string;
@@ -17,3 +21,21 @@ export interface CorePlugin {
17
21
  url: string;
18
22
  }): Promise<any>;
19
23
  }
24
+ export interface Member {
25
+ "memberCode"?: string;
26
+ "source"?: string;
27
+ "sessionId"?: string;
28
+ "pushId"?: string;
29
+ "deviceId": string;
30
+ "universalLink"?: string;
31
+ "appleMerchantId"?: string;
32
+ "cachedOrderContext"?: boolean;
33
+ "name"?: string;
34
+ "email"?: string;
35
+ "phone"?: string;
36
+ }
37
+ export interface Deeplink {
38
+ "addItemId"?: string;
39
+ "addDiscountCode"?: string;
40
+ "addOfferId"?: string;
41
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"","sourcesContent":["export interface CorePlugin {\n echo(options: any): Promise<any>;\n dismiss(options: any): Promise<any>;\n finish(options: any): Promise<any>;\n getMember(options: any): Promise<any>;\n getDeeplink(options: any): Promise<any>;\n openBrowser(options: any): Promise<any>;\n isInstalledApp(options: { key: string }): Promise<{ install: boolean }>;\n getIsProductionEnvironment(): Promise<{ isPrd: boolean }>;\n openExternalUrl(options: { url: string }): Promise<any>;\n\n}\n"]}
1
+ {"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"","sourcesContent":["export interface CorePlugin {\n echo(options: any): Promise<any>;\n dismiss(options: any): Promise<any>;\n finish(options: any): Promise<any>;\n getMember(options: any): Promise<{ member: Member }>;\n getDeeplink(options: any): Promise<{ deeplink: Deeplink }>;\n openBrowser(options: any): Promise<any>;\n isInstalledApp(options: { key: string }): Promise<{ install: boolean }>;\n getIsProductionEnvironment(): Promise<{ isPrd: boolean }>;\n openExternalUrl(options: { url: string }): Promise<any>;\n\n}\nexport interface Member {\n \"memberCode\"?: string;\n \"source\"?: string;\n \"sessionId\"?: string;\n \"pushId\"?: string;\n \"deviceId\": string;\n \"universalLink\"?: string;\n \"appleMerchantId\"?: string;\n \"cachedOrderContext\"?: boolean;\n \"name\"?: string;\n \"email\"?: string;\n \"phone\"?: string;\n}\nexport interface Deeplink {\n \"addItemId\"?: string;\n \"addDiscountCode\"?: string;\n \"addOfferId\"?: string;\n}\n"]}
package/dist/esm/web.d.ts CHANGED
@@ -1,9 +1,13 @@
1
1
  import { WebPlugin } from '@capacitor/core';
2
- import type { CorePlugin } from './definitions';
2
+ import type { CorePlugin, Deeplink, Member } from './definitions';
3
3
  export declare class CoreWeb extends WebPlugin implements CorePlugin {
4
4
  echo(options: any): Promise<any>;
5
- getMember(options: any): Promise<any>;
6
- getDeeplink(options: any): Promise<any>;
5
+ getMember(options: any): Promise<{
6
+ member: Member;
7
+ }>;
8
+ getDeeplink(options: any): Promise<{
9
+ deeplink: Deeplink;
10
+ }>;
7
11
  dismiss(options: any): Promise<any>;
8
12
  finish(options: any): Promise<any>;
9
13
  openBrowser(options: any): Promise<any>;
@@ -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,OAAQ,SAAQ,SAAS;IAClC,KAAK,CAAC,IAAI,CAAC,OAAY;QACnB,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAC7B,OAAO,OAAO,CAAC;IACnB,CAAC;IAED,KAAK,CAAC,SAAS,CAAC,OAAY;;QACxB,OAAO,CAAC,GAAG,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;QACnC,IAAI,MAAM,GAAG,EAAS,CAAC;QACvB,IAAI,CAAC,GAAG,MAAa,CAAC;QACtB,MAAM,CAAC,MAAM,eAAG,CAAC,CAAC,MAAM,0CAAE,OAAO,0CAAE,MAAM,CAAC;QAC1C,OAAO,MAAM,CAAC;IAClB,CAAC;IACD,KAAK,CAAC,WAAW,CAAC,OAAY;;QAC1B,OAAO,CAAC,GAAG,CAAC,cAAc,EAAE,OAAO,CAAC,CAAC;QACrC,IAAI,MAAM,GAAG,EAAS,CAAC;QACvB,IAAI,CAAC,GAAG,MAAa,CAAC;QACtB,MAAM,CAAC,QAAQ,eAAG,CAAC,CAAC,MAAM,0CAAE,OAAO,0CAAE,QAAQ,CAAC;QAC9C,OAAO,MAAM,CAAC;IAClB,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,OAAY;QACtB,OAAO,CAAC,GAAG,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;QAChC,OAAO,OAAO,CAAC;IACnB,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,OAAY;QACrB,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;QAC/B,OAAO,OAAO,CAAC;IACnB,CAAC;IAED,KAAK,CAAC,WAAW,CAAC,OAAY;QAC1B,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QACrB,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC/C,CAAC;IAED,KAAK,CAAC,cAAc,CAAC,OAAwB;QACzC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QACrB,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC/C,CAAC;IAED,KAAK,CAAC,eAAe,CAAC,OAAwB;QAC1C,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;QACnC,OAAO;YACH,IAAI,EAAE,IAAI;SACb,CAAA;IACL,CAAC;IAED,KAAK,CAAC,0BAA0B;QAC5B,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;IAC3B,CAAC;CAGJ","sourcesContent":["import { WebPlugin } from '@capacitor/core';\nimport type { CorePlugin } from './definitions';\n\n\nexport class CoreWeb extends WebPlugin implements CorePlugin {\n async echo(options: any): Promise<any> {\n console.log('ECHO', options);\n return options;\n }\n\n async getMember(options: any): Promise<any> {\n console.log('GET MEMBER', options);\n var result = {} as any;\n var w = window as any;\n result.member = w.aigens?.context?.member;\n return result;\n }\n async getDeeplink(options: any): Promise<any> {\n console.log('GET Deeplink', options);\n var result = {} as any;\n var w = window as any;\n result.deeplink = w.aigens?.context?.deeplink;\n return result;\n }\n\n async dismiss(options: any): Promise<any> {\n console.log('DISMISS', options);\n return options;\n }\n\n async finish(options: any): Promise<any> {\n console.log('FINISH', options);\n return options;\n }\n\n async openBrowser(options: any): Promise<any> {\n console.log(options);\n throw new Error('Method not implemented.');\n }\n\n async isInstalledApp(options: { key: string }): Promise<{ install: boolean }> {\n console.log(options);\n throw new Error('Method not implemented.');\n }\n\n async openExternalUrl(options: { url: string }): Promise<any> {\n window.open(options.url, \"_blank\");\n return {\n open: true\n }\n }\n\n async getIsProductionEnvironment(): Promise<{ isPrd: boolean }> {\n return { isPrd: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;QACrB,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC/C,CAAC;IAED,KAAK,CAAC,cAAc,CAAC,OAAwB;QACzC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QACrB,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC/C,CAAC;IAED,KAAK,CAAC,eAAe,CAAC,OAAwB;QAC1C,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;QACnC,OAAO;YACH,IAAI,EAAE,IAAI;SACb,CAAA;IACL,CAAC;IAED,KAAK,CAAC,0BAA0B;QAC5B,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;IAC3B,CAAC;CAGJ","sourcesContent":["import { WebPlugin } from '@capacitor/core';\nimport type { CorePlugin, Deeplink, Member } from './definitions';\n\n\nexport class CoreWeb extends WebPlugin implements CorePlugin {\n async echo(options: any): Promise<any> {\n console.log('ECHO', options);\n return options;\n }\n\n async getMember(options: any): Promise<{ member: Member }> {\n console.log('GET MEMBER', options);\n var result = {} as any;\n var w = window as any;\n result.member = w.aigens?.context?.member;\n return result;\n }\n async getDeeplink(options: any): Promise<{ deeplink: Deeplink }> {\n console.log('GET Deeplink', options);\n var result = {} as any;\n var w = window as any;\n result.deeplink = w.aigens?.context?.deeplink;\n return result;\n }\n\n async dismiss(options: any): Promise<any> {\n console.log('DISMISS', options);\n return options;\n }\n\n async finish(options: any): Promise<any> {\n console.log('FINISH', options);\n return options;\n }\n\n async openBrowser(options: any): Promise<any> {\n console.log(options);\n throw new Error('Method not implemented.');\n }\n\n async isInstalledApp(options: { key: string }): Promise<{ install: boolean }> {\n console.log(options);\n throw new Error('Method not implemented.');\n }\n\n async openExternalUrl(options: { url: string }): Promise<any> {\n window.open(options.url, \"_blank\");\n return {\n open: true\n }\n }\n\n async getIsProductionEnvironment(): Promise<{ isPrd: boolean }> {\n return { isPrd: true };\n }\n\n\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aigens/aigens-sdk-core",
3
- "version": "0.0.18",
3
+ "version": "0.0.19",
4
4
  "description": "Aigens Order.Place Core Plugin",
5
5
  "main": "dist/plugin.cjs.js",
6
6
  "module": "dist/esm/index.js",