react-native-sdk-pianoio 0.3.1 → 0.3.4
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 +176 -186
- package/android/build.gradle +29 -42
- package/android/gradle.properties +33 -14
- package/android/src/main/java/com/sdkpianoio/ComposerPianoImpl.kt +366 -0
- package/android/src/main/java/com/sdkpianoio/SdkPianoioModule.kt +281 -507
- package/android/src/main/java/com/sdkpianoio/TokenService.kt +139 -0
- package/android/test.sh +494 -0
- package/ios/ComposerPianoImpl.swift +128 -225
- package/ios/MyComposerDelegate.swift +142 -109
- package/ios/SdkPianoio.swift +69 -143
- package/ios/SdkPianoioBridge.m +18 -46
- package/ios/TokenService.swift +219 -0
- package/lib/commonjs/NativeSdkPianoio.ts +35 -22
- package/lib/commonjs/PianoComposer.js +89 -132
- package/lib/commonjs/PianoComposer.js.map +1 -1
- package/lib/commonjs/index.js.map +1 -1
- package/lib/module/NativeSdkPianoio.ts +35 -22
- package/lib/module/PianoComposer.js +90 -132
- package/lib/module/PianoComposer.js.map +1 -1
- package/lib/module/index.js +0 -14
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/commonjs/src/NativeSdkPianoio.d.ts +28 -21
- package/lib/typescript/commonjs/src/NativeSdkPianoio.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/PianoComposer.d.ts +55 -31
- package/lib/typescript/commonjs/src/PianoComposer.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
- package/lib/typescript/module/src/NativeSdkPianoio.d.ts +28 -21
- package/lib/typescript/module/src/NativeSdkPianoio.d.ts.map +1 -1
- package/lib/typescript/module/src/PianoComposer.d.ts +55 -31
- package/lib/typescript/module/src/PianoComposer.d.ts.map +1 -1
- package/lib/typescript/module/src/index.d.ts.map +1 -1
- package/package.json +5 -2
- package/src/NativeSdkPianoio.ts +35 -22
- package/src/PianoComposer.tsx +78 -141
- package/src/index.tsx +0 -14
- package/android/src/main/AndroidManifestNew.xml +0 -2
- package/ios/services/TokenService.swift +0 -70
@@ -1,25 +1,32 @@
|
|
1
|
+
/**
|
2
|
+
* This interface defines the full API surface of the native module.
|
3
|
+
* It is a complete and accurate representation of the methods exposed
|
4
|
+
* in SdkPianoioModule.kt.
|
5
|
+
*/
|
1
6
|
interface SdkPianoioType {
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
7
|
+
initialize(aid: string): Promise<boolean>;
|
8
|
+
addTag(tag: string): Promise<boolean>;
|
9
|
+
addTags(tags: string[]): Promise<boolean>;
|
10
|
+
setZoneId(zoneId: string): Promise<boolean>;
|
11
|
+
setReferrer(referrer: string): Promise<boolean>;
|
12
|
+
setUrl(url: string): Promise<boolean>;
|
13
|
+
setUserToken(token: string): Promise<boolean>;
|
14
|
+
addCustomVariable(key: string, value: string): Promise<boolean>;
|
15
|
+
setCustomVariables(variables: {
|
16
|
+
[key: string]: string;
|
17
|
+
}): Promise<boolean>;
|
18
|
+
executeExperience(): Promise<any>;
|
19
|
+
signIn(): Promise<any>;
|
20
|
+
signOut(): Promise<any>;
|
21
|
+
getCurrentUser(): Promise<any>;
|
22
|
+
isAuthenticated(): Promise<any>;
|
23
|
+
getStatus(): Promise<any>;
|
24
|
+
isInitialized(): Promise<boolean>;
|
25
|
+
clearConfiguration(): Promise<boolean>;
|
26
|
+
removeTag(tag: string): Promise<boolean>;
|
27
|
+
removeCustomVariable(key: string): Promise<boolean>;
|
28
|
+
clearTags(): Promise<boolean>;
|
29
|
+
clearCustomVariables(): Promise<boolean>;
|
23
30
|
}
|
24
31
|
declare const _default: SdkPianoioType;
|
25
32
|
export default _default;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"NativeSdkPianoio.d.ts","sourceRoot":"","sources":["../../../../src/NativeSdkPianoio.ts"],"names":[],"mappings":"AAEA,UAAU,cAAc;
|
1
|
+
{"version":3,"file":"NativeSdkPianoio.d.ts","sourceRoot":"","sources":["../../../../src/NativeSdkPianoio.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,UAAU,cAAc;IAEtB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAG1C,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IACtC,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAC1C,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAC5C,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAChD,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IACtC,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAC9C,iBAAiB,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAChE,kBAAkB,CAAC,SAAS,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAG3E,iBAAiB,IAAI,OAAO,CAAC,GAAG,CAAC,CAAC;IAGlC,MAAM,IAAI,OAAO,CAAC,GAAG,CAAC,CAAC;IACvB,OAAO,IAAI,OAAO,CAAC,GAAG,CAAC,CAAC;IACxB,cAAc,IAAI,OAAO,CAAC,GAAG,CAAC,CAAC;IAC/B,eAAe,IAAI,OAAO,CAAC,GAAG,CAAC,CAAC;IAGhC,SAAS,IAAI,OAAO,CAAC,GAAG,CAAC,CAAC;IAC1B,aAAa,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC;IAClC,kBAAkB,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC;IACvC,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IACzC,oBAAoB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IACpD,SAAS,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC;IAC9B,oBAAoB,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC;CAC1C;wBAW4B,cAAc;AAA3C,wBAA4C"}
|
@@ -1,37 +1,61 @@
|
|
1
|
+
/**
|
2
|
+
* A wrapper class for the native SdkPianoio module that provides a clean,
|
3
|
+
* object-oriented API for interacting with the Piano SDK.
|
4
|
+
*/
|
1
5
|
declare class PianoComposer {
|
2
|
-
aid: string;
|
3
|
-
tags: string[];
|
4
|
-
zoneId: string | null;
|
5
|
-
referrer: string | null;
|
6
|
-
customVariables: {
|
7
|
-
[key: string]: string;
|
8
|
-
};
|
9
|
-
userToken: string | null;
|
10
|
-
url: string | null;
|
11
6
|
private constructor();
|
7
|
+
/**
|
8
|
+
* Creates and initializes a new PianoComposer instance.
|
9
|
+
* This is the main entry point for using the library.
|
10
|
+
* @param aid Your Application ID from Piano.io
|
11
|
+
*/
|
12
12
|
static create(aid: string): Promise<PianoComposer>;
|
13
|
-
addTag(tag: string): Promise<
|
14
|
-
addTags(tags: string[]): Promise<
|
15
|
-
setZoneId(zoneId: string): Promise<
|
16
|
-
setReferrer(referrer: string): Promise<
|
17
|
-
setCustomVariable(name: string, value: string): Promise<
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
13
|
+
addTag(tag: string): Promise<boolean>;
|
14
|
+
addTags(tags: string[]): Promise<boolean>;
|
15
|
+
setZoneId(zoneId: string): Promise<boolean>;
|
16
|
+
setReferrer(referrer: string): Promise<boolean>;
|
17
|
+
setCustomVariable(name: string, value: string): Promise<boolean>;
|
18
|
+
setCustomVariables(variables: {
|
19
|
+
[key: string]: string;
|
20
|
+
}): Promise<boolean>;
|
21
|
+
setUserToken(token: string): Promise<boolean>;
|
22
|
+
setUrl(url: string): Promise<boolean>;
|
23
|
+
/**
|
24
|
+
* Signs in the user with Piano.
|
25
|
+
* @returns A promise that resolves with user information.
|
26
|
+
*/
|
27
|
+
signIn(): Promise<any>;
|
28
|
+
/**
|
29
|
+
* Signs out the current user.
|
30
|
+
* @returns A promise that resolves when sign out is complete.
|
31
|
+
*/
|
32
|
+
signOut(): Promise<any>;
|
33
|
+
/**
|
34
|
+
* Gets information about the current authenticated user.
|
35
|
+
* @returns A promise that resolves with user information.
|
36
|
+
*/
|
37
|
+
getCurrentUser(): Promise<any>;
|
38
|
+
/**
|
39
|
+
* Checks if a user is currently authenticated.
|
40
|
+
* @returns A promise that resolves with the authentication status.
|
41
|
+
*/
|
42
|
+
isAuthenticated(): Promise<any>;
|
43
|
+
/**
|
44
|
+
* Executes the Piano experience with the current configuration.
|
45
|
+
* This is the primary method to get a decision from the Piano backend.
|
46
|
+
* @returns A promise that resolves with the event data object from the native SDK.
|
47
|
+
*/
|
48
|
+
executeExperience(): Promise<any>;
|
49
|
+
/**
|
50
|
+
* Gets the current status of the SDK.
|
51
|
+
* @returns A promise that resolves with status information.
|
52
|
+
*/
|
53
|
+
getStatus(): Promise<any>;
|
54
|
+
/**
|
55
|
+
* Clears all configured tags and custom variables.
|
56
|
+
* @returns A promise that resolves when the configuration is cleared.
|
57
|
+
*/
|
58
|
+
clearConfiguration(): Promise<boolean>;
|
35
59
|
}
|
36
60
|
export default PianoComposer;
|
37
61
|
//# sourceMappingURL=PianoComposer.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"PianoComposer.d.ts","sourceRoot":"","sources":["../../../../src/PianoComposer.tsx"],"names":[],"mappings":"AAEA,cAAM,aAAa;
|
1
|
+
{"version":3,"file":"PianoComposer.d.ts","sourceRoot":"","sources":["../../../../src/PianoComposer.tsx"],"names":[],"mappings":"AAEA;;;GAGG;AACH,cAAM,aAAa;IAEjB,OAAO;IAIP;;;;OAIG;WACU,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC;IAQlD,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAIrC,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,OAAO,CAAC;IAIzC,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAI3C,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAI/C,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAIhE,kBAAkB,CAAC,SAAS,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,OAAO,CAAC;IAI1E,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAI7C,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAM3C;;;OAGG;IACG,MAAM,IAAI,OAAO,CAAC,GAAG,CAAC;IAI5B;;;OAGG;IACG,OAAO,IAAI,OAAO,CAAC,GAAG,CAAC;IAI7B;;;OAGG;IACG,cAAc,IAAI,OAAO,CAAC,GAAG,CAAC;IAIpC;;;OAGG;IACG,eAAe,IAAI,OAAO,CAAC,GAAG,CAAC;IAMrC;;;;OAIG;IACG,iBAAiB,IAAI,OAAO,CAAC,GAAG,CAAC;IAMvC;;;OAGG;IACG,SAAS,IAAI,OAAO,CAAC,GAAG,CAAC;IAI/B;;;OAGG;IACG,kBAAkB,IAAI,OAAO,CAAC,OAAO,CAAC;CAG7C;AAED,eAAe,aAAa,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/index.tsx"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC"}
|
@@ -1,25 +1,32 @@
|
|
1
|
+
/**
|
2
|
+
* This interface defines the full API surface of the native module.
|
3
|
+
* It is a complete and accurate representation of the methods exposed
|
4
|
+
* in SdkPianoioModule.kt.
|
5
|
+
*/
|
1
6
|
interface SdkPianoioType {
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
7
|
+
initialize(aid: string): Promise<boolean>;
|
8
|
+
addTag(tag: string): Promise<boolean>;
|
9
|
+
addTags(tags: string[]): Promise<boolean>;
|
10
|
+
setZoneId(zoneId: string): Promise<boolean>;
|
11
|
+
setReferrer(referrer: string): Promise<boolean>;
|
12
|
+
setUrl(url: string): Promise<boolean>;
|
13
|
+
setUserToken(token: string): Promise<boolean>;
|
14
|
+
addCustomVariable(key: string, value: string): Promise<boolean>;
|
15
|
+
setCustomVariables(variables: {
|
16
|
+
[key: string]: string;
|
17
|
+
}): Promise<boolean>;
|
18
|
+
executeExperience(): Promise<any>;
|
19
|
+
signIn(): Promise<any>;
|
20
|
+
signOut(): Promise<any>;
|
21
|
+
getCurrentUser(): Promise<any>;
|
22
|
+
isAuthenticated(): Promise<any>;
|
23
|
+
getStatus(): Promise<any>;
|
24
|
+
isInitialized(): Promise<boolean>;
|
25
|
+
clearConfiguration(): Promise<boolean>;
|
26
|
+
removeTag(tag: string): Promise<boolean>;
|
27
|
+
removeCustomVariable(key: string): Promise<boolean>;
|
28
|
+
clearTags(): Promise<boolean>;
|
29
|
+
clearCustomVariables(): Promise<boolean>;
|
23
30
|
}
|
24
31
|
declare const _default: SdkPianoioType;
|
25
32
|
export default _default;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"NativeSdkPianoio.d.ts","sourceRoot":"","sources":["../../../../src/NativeSdkPianoio.ts"],"names":[],"mappings":"AAEA,UAAU,cAAc;
|
1
|
+
{"version":3,"file":"NativeSdkPianoio.d.ts","sourceRoot":"","sources":["../../../../src/NativeSdkPianoio.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,UAAU,cAAc;IAEtB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAG1C,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IACtC,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAC1C,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAC5C,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAChD,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IACtC,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAC9C,iBAAiB,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAChE,kBAAkB,CAAC,SAAS,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAG3E,iBAAiB,IAAI,OAAO,CAAC,GAAG,CAAC,CAAC;IAGlC,MAAM,IAAI,OAAO,CAAC,GAAG,CAAC,CAAC;IACvB,OAAO,IAAI,OAAO,CAAC,GAAG,CAAC,CAAC;IACxB,cAAc,IAAI,OAAO,CAAC,GAAG,CAAC,CAAC;IAC/B,eAAe,IAAI,OAAO,CAAC,GAAG,CAAC,CAAC;IAGhC,SAAS,IAAI,OAAO,CAAC,GAAG,CAAC,CAAC;IAC1B,aAAa,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC;IAClC,kBAAkB,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC;IACvC,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IACzC,oBAAoB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IACpD,SAAS,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC;IAC9B,oBAAoB,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC;CAC1C;wBAW4B,cAAc;AAA3C,wBAA4C"}
|
@@ -1,37 +1,61 @@
|
|
1
|
+
/**
|
2
|
+
* A wrapper class for the native SdkPianoio module that provides a clean,
|
3
|
+
* object-oriented API for interacting with the Piano SDK.
|
4
|
+
*/
|
1
5
|
declare class PianoComposer {
|
2
|
-
aid: string;
|
3
|
-
tags: string[];
|
4
|
-
zoneId: string | null;
|
5
|
-
referrer: string | null;
|
6
|
-
customVariables: {
|
7
|
-
[key: string]: string;
|
8
|
-
};
|
9
|
-
userToken: string | null;
|
10
|
-
url: string | null;
|
11
6
|
private constructor();
|
7
|
+
/**
|
8
|
+
* Creates and initializes a new PianoComposer instance.
|
9
|
+
* This is the main entry point for using the library.
|
10
|
+
* @param aid Your Application ID from Piano.io
|
11
|
+
*/
|
12
12
|
static create(aid: string): Promise<PianoComposer>;
|
13
|
-
addTag(tag: string): Promise<
|
14
|
-
addTags(tags: string[]): Promise<
|
15
|
-
setZoneId(zoneId: string): Promise<
|
16
|
-
setReferrer(referrer: string): Promise<
|
17
|
-
setCustomVariable(name: string, value: string): Promise<
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
13
|
+
addTag(tag: string): Promise<boolean>;
|
14
|
+
addTags(tags: string[]): Promise<boolean>;
|
15
|
+
setZoneId(zoneId: string): Promise<boolean>;
|
16
|
+
setReferrer(referrer: string): Promise<boolean>;
|
17
|
+
setCustomVariable(name: string, value: string): Promise<boolean>;
|
18
|
+
setCustomVariables(variables: {
|
19
|
+
[key: string]: string;
|
20
|
+
}): Promise<boolean>;
|
21
|
+
setUserToken(token: string): Promise<boolean>;
|
22
|
+
setUrl(url: string): Promise<boolean>;
|
23
|
+
/**
|
24
|
+
* Signs in the user with Piano.
|
25
|
+
* @returns A promise that resolves with user information.
|
26
|
+
*/
|
27
|
+
signIn(): Promise<any>;
|
28
|
+
/**
|
29
|
+
* Signs out the current user.
|
30
|
+
* @returns A promise that resolves when sign out is complete.
|
31
|
+
*/
|
32
|
+
signOut(): Promise<any>;
|
33
|
+
/**
|
34
|
+
* Gets information about the current authenticated user.
|
35
|
+
* @returns A promise that resolves with user information.
|
36
|
+
*/
|
37
|
+
getCurrentUser(): Promise<any>;
|
38
|
+
/**
|
39
|
+
* Checks if a user is currently authenticated.
|
40
|
+
* @returns A promise that resolves with the authentication status.
|
41
|
+
*/
|
42
|
+
isAuthenticated(): Promise<any>;
|
43
|
+
/**
|
44
|
+
* Executes the Piano experience with the current configuration.
|
45
|
+
* This is the primary method to get a decision from the Piano backend.
|
46
|
+
* @returns A promise that resolves with the event data object from the native SDK.
|
47
|
+
*/
|
48
|
+
executeExperience(): Promise<any>;
|
49
|
+
/**
|
50
|
+
* Gets the current status of the SDK.
|
51
|
+
* @returns A promise that resolves with status information.
|
52
|
+
*/
|
53
|
+
getStatus(): Promise<any>;
|
54
|
+
/**
|
55
|
+
* Clears all configured tags and custom variables.
|
56
|
+
* @returns A promise that resolves when the configuration is cleared.
|
57
|
+
*/
|
58
|
+
clearConfiguration(): Promise<boolean>;
|
35
59
|
}
|
36
60
|
export default PianoComposer;
|
37
61
|
//# sourceMappingURL=PianoComposer.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"PianoComposer.d.ts","sourceRoot":"","sources":["../../../../src/PianoComposer.tsx"],"names":[],"mappings":"AAEA,cAAM,aAAa;
|
1
|
+
{"version":3,"file":"PianoComposer.d.ts","sourceRoot":"","sources":["../../../../src/PianoComposer.tsx"],"names":[],"mappings":"AAEA;;;GAGG;AACH,cAAM,aAAa;IAEjB,OAAO;IAIP;;;;OAIG;WACU,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC;IAQlD,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAIrC,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,OAAO,CAAC;IAIzC,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAI3C,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAI/C,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAIhE,kBAAkB,CAAC,SAAS,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,OAAO,CAAC;IAI1E,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAI7C,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAM3C;;;OAGG;IACG,MAAM,IAAI,OAAO,CAAC,GAAG,CAAC;IAI5B;;;OAGG;IACG,OAAO,IAAI,OAAO,CAAC,GAAG,CAAC;IAI7B;;;OAGG;IACG,cAAc,IAAI,OAAO,CAAC,GAAG,CAAC;IAIpC;;;OAGG;IACG,eAAe,IAAI,OAAO,CAAC,GAAG,CAAC;IAMrC;;;;OAIG;IACG,iBAAiB,IAAI,OAAO,CAAC,GAAG,CAAC;IAMvC;;;OAGG;IACG,SAAS,IAAI,OAAO,CAAC,GAAG,CAAC;IAI/B;;;OAGG;IACG,kBAAkB,IAAI,OAAO,CAAC,OAAO,CAAC;CAG7C;AAED,eAAe,aAAa,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/index.tsx"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "react-native-sdk-pianoio",
|
3
|
-
"version": "0.3.
|
3
|
+
"version": "0.3.4",
|
4
4
|
"description": "Piano io sdk integration",
|
5
5
|
"source": "./src/index.tsx",
|
6
6
|
"main": "./lib/commonjs/index.js",
|
@@ -214,5 +214,8 @@
|
|
214
214
|
"type": "turbo-module",
|
215
215
|
"languages": "kotlin-objc",
|
216
216
|
"version": "0.48.9"
|
217
|
+
},
|
218
|
+
"dependencies": {
|
219
|
+
"@react-native-community/cli-platform-android": "^18.0.0"
|
217
220
|
}
|
218
|
-
}
|
221
|
+
}
|
package/src/NativeSdkPianoio.ts
CHANGED
@@ -1,28 +1,41 @@
|
|
1
1
|
import { NativeModules, Platform } from 'react-native';
|
2
2
|
|
3
|
+
/**
|
4
|
+
* This interface defines the full API surface of the native module.
|
5
|
+
* It is a complete and accurate representation of the methods exposed
|
6
|
+
* in SdkPianoioModule.kt.
|
7
|
+
*/
|
3
8
|
interface SdkPianoioType {
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
9
|
+
// Initialization
|
10
|
+
initialize(aid: string): Promise<boolean>;
|
11
|
+
|
12
|
+
// Configuration
|
13
|
+
addTag(tag: string): Promise<boolean>;
|
14
|
+
addTags(tags: string[]): Promise<boolean>;
|
15
|
+
setZoneId(zoneId: string): Promise<boolean>;
|
16
|
+
setReferrer(referrer: string): Promise<boolean>;
|
17
|
+
setUrl(url: string): Promise<boolean>;
|
18
|
+
setUserToken(token: string): Promise<boolean>;
|
19
|
+
addCustomVariable(key: string, value: string): Promise<boolean>;
|
20
|
+
setCustomVariables(variables: { [key: string]: string }): Promise<boolean>;
|
21
|
+
|
22
|
+
// Execution
|
23
|
+
executeExperience(): Promise<any>;
|
24
|
+
|
25
|
+
// Authentication
|
26
|
+
signIn(): Promise<any>;
|
27
|
+
signOut(): Promise<any>;
|
28
|
+
getCurrentUser(): Promise<any>;
|
29
|
+
isAuthenticated(): Promise<any>;
|
30
|
+
|
31
|
+
// Status & Cleanup
|
32
|
+
getStatus(): Promise<any>;
|
33
|
+
isInitialized(): Promise<boolean>;
|
34
|
+
clearConfiguration(): Promise<boolean>;
|
35
|
+
removeTag(tag: string): Promise<boolean>;
|
36
|
+
removeCustomVariable(key: string): Promise<boolean>;
|
37
|
+
clearTags(): Promise<boolean>;
|
38
|
+
clearCustomVariables(): Promise<boolean>;
|
26
39
|
}
|
27
40
|
|
28
41
|
const SdkPianoio = NativeModules.SdkPianoio;
|