react-native-nami-sdk 3.3.5-3 → 3.3.6-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.
@@ -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.3.5.4"
89
- amazonImplementation "com.namiml:sdk-amazon:3.3.5.4"
88
+ playImplementation "com.namiml:sdk-android:3.3.6.1"
89
+ amazonImplementation "com.namiml:sdk-amazon:3.3.6.1"
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"
@@ -8,7 +8,11 @@ export interface Spec extends TurboModule {
8
8
  customObject?: {
9
9
  [key: string]: unknown;
10
10
  };
11
- } | null, completion: (successAction: boolean, error: number | null) => void, paywallCompletion: (event: {
11
+ } | null, completion: (successAction: boolean, error: {
12
+ domain: string;
13
+ code: number;
14
+ message: string;
15
+ } | null) => void, paywallCompletion: (event: {
12
16
  campaignId?: string;
13
17
  campaignName?: string;
14
18
  campaignType?: string;
@@ -1,5 +1,5 @@
1
1
  import { NativeEventEmitter } from 'react-native';
2
- import type { PaywallLaunchContext, NamiCampaign } from './types';
2
+ import type { PaywallLaunchContext, NamiCampaign, NamiError } from './types';
3
3
  export declare enum NamiCampaignManagerEvents {
4
4
  AvailableCampaignsChanged = "AvailableCampaignsChanged",
5
5
  NamiPaywallEvent = "NamiPaywallEvent"
@@ -7,7 +7,7 @@ export declare enum NamiCampaignManagerEvents {
7
7
  export declare const NamiCampaignManager: {
8
8
  emitter: NativeEventEmitter;
9
9
  launchSubscription: ReturnType<NativeEventEmitter["addListener"]> | undefined;
10
- launch(label: string | null, withUrl: string | null, context: PaywallLaunchContext | null, resultCallback?: (success: boolean, errorCode?: number | null) => void, actionCallback?: (event: any) => void): void;
10
+ launch(label: string | null, withUrl: string | null, context: PaywallLaunchContext | null, resultCallback?: (success: boolean, error?: NamiError | null) => void, actionCallback?: (event: any) => void): void;
11
11
  allCampaigns: () => Promise<{
12
12
  id?: string;
13
13
  rule?: string;
@@ -80,6 +80,11 @@ export declare enum LaunchCampaignError {
80
80
  PRODUCT_DATA_NOT_FOUND = 7,
81
81
  PRODUCT_GROUPS_NOT_FOUND = 8
82
82
  }
83
+ export type NamiError = {
84
+ domain: string;
85
+ code: number;
86
+ message: string;
87
+ };
83
88
  export declare enum LaunchCampaignResultAction {
84
89
  FAILURE = "FAILURE",
85
90
  SUCCESS = "SUCCESS"
@@ -2,4 +2,4 @@
2
2
  * Auto-generated file. Do not edit manually.
3
3
  * React Native Nami SDK version.
4
4
  */
5
- export declare const NAMI_REACT_NATIVE_VERSION = "3.3.5-3";
5
+ export declare const NAMI_REACT_NATIVE_VERSION = "3.3.6-1";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-nami-sdk",
3
- "version": "3.3.5-3",
3
+ "version": "3.3.6-1",
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.3.5.1'
24
+ s.dependency 'Nami', '3.3.6'
25
25
  s.dependency 'React'
26
26
 
27
27
  pod_target_xcconfig = {
@@ -10,7 +10,10 @@ export interface Spec extends TurboModule {
10
10
  customAttributes?: { [key: string]: string };
11
11
  customObject?: { [key: string]: unknown };
12
12
  } | null,
13
- completion: (successAction: boolean, error: number | null) => void,
13
+ completion: (
14
+ successAction: boolean,
15
+ error: { domain: string; code: number; message: string } | null,
16
+ ) => void,
14
17
  paywallCompletion: (event: {
15
18
  campaignId?: string;
16
19
  campaignName?: string;
@@ -8,6 +8,7 @@ import type {
8
8
  NamiPaywallEvent,
9
9
  PaywallLaunchContext,
10
10
  NamiCampaign,
11
+ NamiError,
11
12
  } from './types';
12
13
  import { NamiPaywallAction } from './types';
13
14
 
@@ -43,7 +44,7 @@ export const NamiCampaignManager = {
43
44
  label: string | null,
44
45
  withUrl: string | null,
45
46
  context: PaywallLaunchContext | null,
46
- resultCallback?: (success: boolean, errorCode?: number | null) => void,
47
+ resultCallback?: (success: boolean, error?: NamiError | null) => void,
47
48
  actionCallback?: (event: any) => void,
48
49
  ): void {
49
50
  if (this.launchSubscription) {
package/src/types.ts CHANGED
@@ -188,6 +188,12 @@ export enum LaunchCampaignError {
188
188
  PRODUCT_GROUPS_NOT_FOUND = 8,
189
189
  }
190
190
 
191
+ export type NamiError = {
192
+ domain: string;
193
+ code: number;
194
+ message: string;
195
+ };
196
+
191
197
  export enum LaunchCampaignResultAction {
192
198
  FAILURE = 'FAILURE',
193
199
  SUCCESS = 'SUCCESS',
package/src/version.ts CHANGED
@@ -2,4 +2,4 @@
2
2
  * Auto-generated file. Do not edit manually.
3
3
  * React Native Nami SDK version.
4
4
  */
5
- export const NAMI_REACT_NATIVE_VERSION = '3.3.5-3';
5
+ export const NAMI_REACT_NATIVE_VERSION = '3.3.6-1';