react-native-nami-sdk 3.4.4-dev.202607080622 → 3.4.4-rc.202607080215
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/android/build.gradle +2 -2
- package/dist/specs/NativeNamiCampaignManager.d.ts +1 -1
- package/dist/src/types.d.ts +2 -3
- package/dist/src/version.d.ts +1 -1
- package/package.json +1 -1
- package/react-native-nami-sdk.podspec +1 -1
- package/specs/NativeNamiCampaignManager.ts +1 -1
- package/src/types.ts +2 -3
- package/src/version.ts +1 -1
- package/src/__tests__/customAttributeValue.type.test.ts +0 -32
package/android/build.gradle
CHANGED
|
@@ -85,8 +85,8 @@ dependencies {
|
|
|
85
85
|
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
|
86
86
|
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
|
|
87
87
|
|
|
88
|
-
playImplementation "com.namiml:sdk-android:3.4.4-
|
|
89
|
-
amazonImplementation "com.namiml:sdk-amazon:3.4.4-
|
|
88
|
+
playImplementation "com.namiml:sdk-android:3.4.4-rc.202607080215"
|
|
89
|
+
amazonImplementation "com.namiml:sdk-amazon:3.4.4-rc.202607080215"
|
|
90
90
|
|
|
91
91
|
implementation "com.facebook.react:react-native:+" // From node_modules
|
|
92
92
|
coreLibraryDesugaring "com.android.tools:desugar_jdk_libs:2.0.4"
|
|
@@ -3,7 +3,7 @@ export interface Spec extends TurboModule {
|
|
|
3
3
|
launch(label: string | null, withUrl: string | null, context: {
|
|
4
4
|
productGroups?: string[];
|
|
5
5
|
customAttributes?: {
|
|
6
|
-
[key: string]: string | boolean | number
|
|
6
|
+
[key: string]: string | boolean | number;
|
|
7
7
|
};
|
|
8
8
|
customObject?: {
|
|
9
9
|
[key: string]: unknown;
|
package/dist/src/types.d.ts
CHANGED
|
@@ -97,10 +97,9 @@ export type FailureResultObject = {
|
|
|
97
97
|
*
|
|
98
98
|
* Values are matched strictly by type: the string "true" and the boolean true are
|
|
99
99
|
* distinct values that never compare equal. A key present with any non-null value —
|
|
100
|
-
* including false or "false" — is considered "set".
|
|
101
|
-
* key) means the attribute is not set; the native bridge omits null values entirely.
|
|
100
|
+
* including false or "false" — is considered "set".
|
|
102
101
|
*/
|
|
103
|
-
export type CustomAttributeValue = string | boolean | number
|
|
102
|
+
export type CustomAttributeValue = string | boolean | number;
|
|
104
103
|
export type PaywallLaunchContext = {
|
|
105
104
|
productGroups?: string[];
|
|
106
105
|
customAttributes: {
|
package/dist/src/version.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-nami-sdk",
|
|
3
|
-
"version": "3.4.4-
|
|
3
|
+
"version": "3.4.4-rc.202607080215",
|
|
4
4
|
"description": "React Native SDK for Nami - No-code paywall and onboarding flows with A/B testing.",
|
|
5
5
|
"main": "index.ts",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -21,7 +21,7 @@ Pod::Spec.new do |s|
|
|
|
21
21
|
s.requires_arc = true
|
|
22
22
|
s.swift_version = '5.0' # or your supported version
|
|
23
23
|
|
|
24
|
-
s.dependency 'Nami', '3.4.4-
|
|
24
|
+
s.dependency 'Nami', '3.4.4-rc.202607080215'
|
|
25
25
|
|
|
26
26
|
pod_target_xcconfig = {
|
|
27
27
|
'DEFINES_MODULE' => 'YES',
|
|
@@ -7,7 +7,7 @@ export interface Spec extends TurboModule {
|
|
|
7
7
|
withUrl: string | null,
|
|
8
8
|
context: {
|
|
9
9
|
productGroups?: string[];
|
|
10
|
-
customAttributes?: { [key: string]: string | boolean | number
|
|
10
|
+
customAttributes?: { [key: string]: string | boolean | number };
|
|
11
11
|
customObject?: { [key: string]: unknown };
|
|
12
12
|
} | null,
|
|
13
13
|
completion: (
|
package/src/types.ts
CHANGED
|
@@ -208,10 +208,9 @@ export type FailureResultObject = {
|
|
|
208
208
|
*
|
|
209
209
|
* Values are matched strictly by type: the string "true" and the boolean true are
|
|
210
210
|
* distinct values that never compare equal. A key present with any non-null value —
|
|
211
|
-
* including false or "false" — is considered "set".
|
|
212
|
-
* key) means the attribute is not set; the native bridge omits null values entirely.
|
|
211
|
+
* including false or "false" — is considered "set".
|
|
213
212
|
*/
|
|
214
|
-
export type CustomAttributeValue = string | boolean | number
|
|
213
|
+
export type CustomAttributeValue = string | boolean | number;
|
|
215
214
|
|
|
216
215
|
export type PaywallLaunchContext = {
|
|
217
216
|
// Can contain multiple product group identifiers
|
package/src/version.ts
CHANGED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import type { CustomAttributeValue, PaywallLaunchContext } from '../types';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* NAM-2544: `null` is a permitted custom-attribute value meaning "attribute not set".
|
|
5
|
-
*
|
|
6
|
-
* This is an executable example of the widened shape and a runtime check that a null
|
|
7
|
-
* attribute round-trips through a PaywallLaunchContext literal. Note: ts-jest runs in
|
|
8
|
-
* transpile-only mode here (tsconfig `isolatedModules: true`), so it does NOT typecheck.
|
|
9
|
-
* The compile-time guard is `npm run build` (tsc), which type-checks the public type
|
|
10
|
-
* against the TurboModule spec at the NamiCampaignManager launch call site — reverting
|
|
11
|
-
* either the type or the spec widening breaks that build.
|
|
12
|
-
*/
|
|
13
|
-
describe('CustomAttributeValue null support (NAM-2544)', () => {
|
|
14
|
-
it('permits null in a PaywallLaunchContext customAttributes literal', () => {
|
|
15
|
-
const context: PaywallLaunchContext = {
|
|
16
|
-
customAttributes: {
|
|
17
|
-
lastSession: null,
|
|
18
|
-
tier: 'premium',
|
|
19
|
-
isTrial: false,
|
|
20
|
-
seatCount: 3,
|
|
21
|
-
},
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
expect(context.customAttributes.lastSession).toBeNull();
|
|
25
|
-
expect(context.customAttributes.tier).toBe('premium');
|
|
26
|
-
});
|
|
27
|
-
|
|
28
|
-
it('allows null as a standalone CustomAttributeValue', () => {
|
|
29
|
-
const value: CustomAttributeValue = null;
|
|
30
|
-
expect(value).toBeNull();
|
|
31
|
-
});
|
|
32
|
-
});
|