react-native-insider 7.0.5 → 7.0.6-nh
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/.claude/commands/pr-description.md +40 -0
- package/.claude/settings.json +34 -0
- package/RNInsider.podspec +2 -2
- package/android/.gradle/8.10/checksums/checksums.lock +0 -0
- package/android/.gradle/8.10/dependencies-accessors/gc.properties +0 -0
- package/android/.gradle/8.10/fileChanges/last-build.bin +0 -0
- package/android/.gradle/8.10/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/8.10/gc.properties +0 -0
- package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/android/.gradle/buildOutputCleanup/cache.properties +2 -0
- package/android/.gradle/config.properties +2 -0
- package/android/.gradle/vcs-1/gc.properties +0 -0
- package/android/build.gradle +1 -7
- package/android/local.properties +8 -0
- package/android/src/main/java/com/useinsider/react/RNInsiderModule.java +34 -37
- package/android/src/main/java/com/useinsider/react/RNUtils.java +197 -8
- package/index.d.ts +14 -0
- package/index.js +41 -29
- package/ios/RNInsider/RNInsider.m +56 -19
- package/ios/RNInsider/RNUtils.h +26 -0
- package/ios/RNInsider/RNUtils.m +250 -0
- package/ios/RNInsider.xcodeproj/project.pbxproj +6 -0
- package/ios/RNInsider.xcodeproj/project.xcworkspace/xcuserdata/heysem.katibi.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- package/ios/RNInsider.xcodeproj/project.xcworkspace/xcuserdata/heysem.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- package/ios/RNInsider.xcodeproj/xcuserdata/heysem.katibi.xcuserdatad/xcschemes/xcschememanagement.plist +14 -0
- package/ios/RNInsider.xcodeproj/xcuserdata/heysem.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist +6 -0
- package/ios/RNInsider.xcodeproj/xcuserdata/heysem.xcuserdatad/xcschemes/xcschememanagement.plist +14 -0
- package/package.json +2 -2
- package/react-native-insider-7.0.6.tgz +0 -0
- package/src/InsiderEvent.js +10 -10
- package/src/InsiderProduct.js +35 -66
- package/src/InsiderUser.js +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-insider",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.6-nh",
|
|
4
4
|
"description": "React Native Insider SDK",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -16,4 +16,4 @@
|
|
|
16
16
|
],
|
|
17
17
|
"author": "insidermobile",
|
|
18
18
|
"homepage": "https://github.com/useinsider/react-native-insider"
|
|
19
|
-
}
|
|
19
|
+
}
|
|
Binary file
|
package/src/InsiderEvent.js
CHANGED
|
@@ -6,8 +6,8 @@ const Insider = NativeModules.RNInsider;
|
|
|
6
6
|
|
|
7
7
|
export default class RNInsiderEvent {
|
|
8
8
|
name = '';
|
|
9
|
-
parameters =
|
|
10
|
-
|
|
9
|
+
parameters = [];
|
|
10
|
+
|
|
11
11
|
constructor(name) {
|
|
12
12
|
this.name = name;
|
|
13
13
|
}
|
|
@@ -19,7 +19,7 @@ export default class RNInsiderEvent {
|
|
|
19
19
|
return this;
|
|
20
20
|
}
|
|
21
21
|
try {
|
|
22
|
-
this.parameters
|
|
22
|
+
this.parameters.push({ type: 'string', key, value });
|
|
23
23
|
return this;
|
|
24
24
|
} catch (error) {
|
|
25
25
|
Insider.putErrorLog(generateJSONErrorString(error));
|
|
@@ -34,7 +34,7 @@ export default class RNInsiderEvent {
|
|
|
34
34
|
return this;
|
|
35
35
|
}
|
|
36
36
|
try {
|
|
37
|
-
this.parameters
|
|
37
|
+
this.parameters.push({ type: 'integer', key, value });
|
|
38
38
|
return this;
|
|
39
39
|
} catch (error) {
|
|
40
40
|
Insider.putErrorLog(generateJSONErrorString(error));
|
|
@@ -49,7 +49,7 @@ export default class RNInsiderEvent {
|
|
|
49
49
|
return this;
|
|
50
50
|
}
|
|
51
51
|
try {
|
|
52
|
-
this.parameters
|
|
52
|
+
this.parameters.push({ type: 'double', key, value });
|
|
53
53
|
return this;
|
|
54
54
|
} catch (error) {
|
|
55
55
|
Insider.putErrorLog(generateJSONErrorString(error));
|
|
@@ -64,7 +64,7 @@ export default class RNInsiderEvent {
|
|
|
64
64
|
return this;
|
|
65
65
|
}
|
|
66
66
|
try {
|
|
67
|
-
this.parameters
|
|
67
|
+
this.parameters.push({ type: 'boolean', key, value });
|
|
68
68
|
return this;
|
|
69
69
|
} catch (error) {
|
|
70
70
|
Insider.putErrorLog(generateJSONErrorString(error));
|
|
@@ -79,7 +79,7 @@ export default class RNInsiderEvent {
|
|
|
79
79
|
return this;
|
|
80
80
|
}
|
|
81
81
|
try {
|
|
82
|
-
this.parameters
|
|
82
|
+
this.parameters.push({ type: 'date', key, value: value.getTime().toString() });
|
|
83
83
|
return this;
|
|
84
84
|
} catch (error) {
|
|
85
85
|
Insider.putErrorLog(generateJSONErrorString(error));
|
|
@@ -94,7 +94,7 @@ export default class RNInsiderEvent {
|
|
|
94
94
|
return this;
|
|
95
95
|
}
|
|
96
96
|
try {
|
|
97
|
-
this.parameters
|
|
97
|
+
this.parameters.push({ type: 'strings', key, value });
|
|
98
98
|
return this;
|
|
99
99
|
} catch (error) {
|
|
100
100
|
Insider.putErrorLog(generateJSONErrorString(error));
|
|
@@ -109,7 +109,7 @@ export default class RNInsiderEvent {
|
|
|
109
109
|
return this;
|
|
110
110
|
}
|
|
111
111
|
try {
|
|
112
|
-
this.parameters
|
|
112
|
+
this.parameters.push({ type: 'strings', key, value });
|
|
113
113
|
return this;
|
|
114
114
|
} catch (error) {
|
|
115
115
|
Insider.putErrorLog(generateJSONErrorString(error));
|
|
@@ -124,7 +124,7 @@ export default class RNInsiderEvent {
|
|
|
124
124
|
return this;
|
|
125
125
|
}
|
|
126
126
|
try {
|
|
127
|
-
this.parameters
|
|
127
|
+
this.parameters.push({ type: 'numbers', key, value });
|
|
128
128
|
return this;
|
|
129
129
|
} catch (error) {
|
|
130
130
|
Insider.putErrorLog(generateJSONErrorString(error));
|
package/src/InsiderProduct.js
CHANGED
|
@@ -4,49 +4,18 @@ import { shouldNotProceed, generateJSONErrorString, checkParameters, showParamet
|
|
|
4
4
|
|
|
5
5
|
const Insider = NativeModules.RNInsider;
|
|
6
6
|
|
|
7
|
-
// Must
|
|
8
|
-
const PRODUCT_ID = 'product_id';
|
|
9
|
-
const PRODUCT_NAME = 'name';
|
|
10
|
-
const TAXONOMY = 'taxonomy';
|
|
11
|
-
const CURRENCY = 'currency';
|
|
12
|
-
const UNIT_PRICE = 'unit_price';
|
|
13
|
-
const IMAGE_URL = 'image_url';
|
|
14
|
-
|
|
15
|
-
// Optional
|
|
16
|
-
const SUB_CATEGORY = 'sub_category';
|
|
17
|
-
const SALE_PRICE = 'sale_price';
|
|
18
|
-
const STOCK = 'stock';
|
|
19
|
-
const COLOR = 'color';
|
|
20
|
-
const SIZE = 'size';
|
|
21
|
-
const QUANTITY = 'quantity';
|
|
22
|
-
const SHIPPING_COST = 'shipping_cost';
|
|
23
|
-
const VOUCHER_NAME = 'voucher_name';
|
|
24
|
-
const VOUCHER_DISCOUNT = 'voucher_discount';
|
|
25
|
-
const PROMOTION_NAME = 'promotion_name';
|
|
26
|
-
const PROMOTION_DISCOUNT = 'promotion_discount';
|
|
27
|
-
const GROUP_CODE = 'groupcode';
|
|
28
|
-
const BRAND = 'brnd';
|
|
29
|
-
const SKU = 'sku';
|
|
30
|
-
const PRODUCT_GENDER = 'ge';
|
|
31
|
-
const MULTIPACK = 'mlt';
|
|
32
|
-
const PRODUCT_TYPE = 'pt';
|
|
33
|
-
const GTIN = 'gt';
|
|
34
|
-
const DESCRIPTION = 'desc';
|
|
35
|
-
const TAGS = 'tags';
|
|
36
|
-
const IS_IN_STOCK = 'iis';
|
|
37
|
-
const PRODUCT_URL = 'url';
|
|
38
|
-
|
|
39
|
-
|
|
40
7
|
export default class RNInsiderProduct {
|
|
41
|
-
|
|
42
|
-
|
|
8
|
+
requiredFields = {};
|
|
9
|
+
optionalFields = {};
|
|
10
|
+
customParameters = [];
|
|
11
|
+
|
|
43
12
|
constructor(productID, name, taxonomy, imageURL, price, currency) {
|
|
44
|
-
this.
|
|
13
|
+
this.requiredFields = {
|
|
45
14
|
product_id: productID,
|
|
46
15
|
name: name,
|
|
47
16
|
taxonomy: taxonomy,
|
|
48
17
|
image_url: imageURL,
|
|
49
|
-
|
|
18
|
+
price: price,
|
|
50
19
|
currency: currency,
|
|
51
20
|
};
|
|
52
21
|
}
|
|
@@ -58,7 +27,7 @@ export default class RNInsiderProduct {
|
|
|
58
27
|
return this;
|
|
59
28
|
}
|
|
60
29
|
try {
|
|
61
|
-
this.
|
|
30
|
+
this.optionalFields["color"] = color;
|
|
62
31
|
} catch (error) {
|
|
63
32
|
Insider.putErrorLog(generateJSONErrorString(error));
|
|
64
33
|
}
|
|
@@ -72,7 +41,7 @@ export default class RNInsiderProduct {
|
|
|
72
41
|
return this;
|
|
73
42
|
}
|
|
74
43
|
try {
|
|
75
|
-
this.
|
|
44
|
+
this.optionalFields["voucher_name"] = voucherName;
|
|
76
45
|
} catch (error) {
|
|
77
46
|
Insider.putErrorLog(generateJSONErrorString(error));
|
|
78
47
|
}
|
|
@@ -86,7 +55,7 @@ export default class RNInsiderProduct {
|
|
|
86
55
|
return this;
|
|
87
56
|
}
|
|
88
57
|
try {
|
|
89
|
-
this.
|
|
58
|
+
this.optionalFields["promotion_name"] = promotionName;
|
|
90
59
|
} catch (error) {
|
|
91
60
|
Insider.putErrorLog(generateJSONErrorString(error));
|
|
92
61
|
}
|
|
@@ -100,7 +69,7 @@ export default class RNInsiderProduct {
|
|
|
100
69
|
return this;
|
|
101
70
|
}
|
|
102
71
|
try {
|
|
103
|
-
this.
|
|
72
|
+
this.optionalFields["size"] = size;
|
|
104
73
|
} catch (error) {
|
|
105
74
|
Insider.putErrorLog(generateJSONErrorString(error));
|
|
106
75
|
}
|
|
@@ -114,7 +83,7 @@ export default class RNInsiderProduct {
|
|
|
114
83
|
return this;
|
|
115
84
|
}
|
|
116
85
|
try {
|
|
117
|
-
this.
|
|
86
|
+
this.optionalFields["sale_price"] = salePrice;
|
|
118
87
|
} catch (error) {
|
|
119
88
|
Insider.putErrorLog(generateJSONErrorString(error));
|
|
120
89
|
}
|
|
@@ -128,7 +97,7 @@ export default class RNInsiderProduct {
|
|
|
128
97
|
return this;
|
|
129
98
|
}
|
|
130
99
|
try {
|
|
131
|
-
this.
|
|
100
|
+
this.optionalFields["shipping_cost"] = shippingCost;
|
|
132
101
|
} catch (error) {
|
|
133
102
|
Insider.putErrorLog(generateJSONErrorString(error));
|
|
134
103
|
}
|
|
@@ -142,7 +111,7 @@ export default class RNInsiderProduct {
|
|
|
142
111
|
return this;
|
|
143
112
|
}
|
|
144
113
|
try {
|
|
145
|
-
this.
|
|
114
|
+
this.optionalFields["voucher_discount"] = voucherDiscount;
|
|
146
115
|
} catch (error) {
|
|
147
116
|
Insider.putErrorLog(generateJSONErrorString(error));
|
|
148
117
|
}
|
|
@@ -156,7 +125,7 @@ export default class RNInsiderProduct {
|
|
|
156
125
|
return this;
|
|
157
126
|
}
|
|
158
127
|
try {
|
|
159
|
-
this.
|
|
128
|
+
this.optionalFields["promotion_discount"] = promotionDiscount;
|
|
160
129
|
} catch (error) {
|
|
161
130
|
Insider.putErrorLog(generateJSONErrorString(error));
|
|
162
131
|
}
|
|
@@ -170,7 +139,7 @@ export default class RNInsiderProduct {
|
|
|
170
139
|
return this;
|
|
171
140
|
}
|
|
172
141
|
try {
|
|
173
|
-
this.
|
|
142
|
+
this.optionalFields["stock"] = stock;
|
|
174
143
|
} catch (error) {
|
|
175
144
|
Insider.putErrorLog(generateJSONErrorString(error));
|
|
176
145
|
}
|
|
@@ -184,7 +153,7 @@ export default class RNInsiderProduct {
|
|
|
184
153
|
return this;
|
|
185
154
|
}
|
|
186
155
|
try {
|
|
187
|
-
this.
|
|
156
|
+
this.optionalFields["quantity"] = quantity;
|
|
188
157
|
} catch (error) {
|
|
189
158
|
Insider.putErrorLog(generateJSONErrorString(error));
|
|
190
159
|
}
|
|
@@ -198,7 +167,7 @@ export default class RNInsiderProduct {
|
|
|
198
167
|
return this;
|
|
199
168
|
}
|
|
200
169
|
try {
|
|
201
|
-
this.
|
|
170
|
+
this.optionalFields["group_code"] = groupCode;
|
|
202
171
|
} catch (error) {
|
|
203
172
|
Insider.putErrorLog(generateJSONErrorString(error));
|
|
204
173
|
}
|
|
@@ -212,7 +181,7 @@ export default class RNInsiderProduct {
|
|
|
212
181
|
return this;
|
|
213
182
|
}
|
|
214
183
|
try {
|
|
215
|
-
this.
|
|
184
|
+
this.optionalFields["brand"] = brand;
|
|
216
185
|
} catch (error) {
|
|
217
186
|
Insider.putErrorLog(generateJSONErrorString(error));
|
|
218
187
|
}
|
|
@@ -226,7 +195,7 @@ export default class RNInsiderProduct {
|
|
|
226
195
|
return this;
|
|
227
196
|
}
|
|
228
197
|
try {
|
|
229
|
-
this.
|
|
198
|
+
this.optionalFields["sku"] = sku;
|
|
230
199
|
} catch (error) {
|
|
231
200
|
Insider.putErrorLog(generateJSONErrorString(error));
|
|
232
201
|
}
|
|
@@ -240,7 +209,7 @@ export default class RNInsiderProduct {
|
|
|
240
209
|
return this;
|
|
241
210
|
}
|
|
242
211
|
try {
|
|
243
|
-
this.
|
|
212
|
+
this.optionalFields["gender"] = gender;
|
|
244
213
|
} catch (error) {
|
|
245
214
|
Insider.putErrorLog(generateJSONErrorString(error));
|
|
246
215
|
}
|
|
@@ -254,7 +223,7 @@ export default class RNInsiderProduct {
|
|
|
254
223
|
return this;
|
|
255
224
|
}
|
|
256
225
|
try {
|
|
257
|
-
this.
|
|
226
|
+
this.optionalFields["multipack"] = multipack;
|
|
258
227
|
} catch (error) {
|
|
259
228
|
Insider.putErrorLog(generateJSONErrorString(error));
|
|
260
229
|
}
|
|
@@ -268,7 +237,7 @@ export default class RNInsiderProduct {
|
|
|
268
237
|
return this;
|
|
269
238
|
}
|
|
270
239
|
try {
|
|
271
|
-
this.
|
|
240
|
+
this.optionalFields["product_type"] = productType;
|
|
272
241
|
} catch (error) {
|
|
273
242
|
Insider.putErrorLog(generateJSONErrorString(error));
|
|
274
243
|
}
|
|
@@ -282,7 +251,7 @@ export default class RNInsiderProduct {
|
|
|
282
251
|
return this;
|
|
283
252
|
}
|
|
284
253
|
try {
|
|
285
|
-
this.
|
|
254
|
+
this.optionalFields["gtin"] = gtin;
|
|
286
255
|
} catch (error) {
|
|
287
256
|
Insider.putErrorLog(generateJSONErrorString(error));
|
|
288
257
|
}
|
|
@@ -296,7 +265,7 @@ export default class RNInsiderProduct {
|
|
|
296
265
|
return this;
|
|
297
266
|
}
|
|
298
267
|
try {
|
|
299
|
-
this.
|
|
268
|
+
this.optionalFields["description"] = description;
|
|
300
269
|
} catch (error) {
|
|
301
270
|
Insider.putErrorLog(generateJSONErrorString(error));
|
|
302
271
|
}
|
|
@@ -310,7 +279,7 @@ export default class RNInsiderProduct {
|
|
|
310
279
|
return this;
|
|
311
280
|
}
|
|
312
281
|
try {
|
|
313
|
-
this.
|
|
282
|
+
this.optionalFields["tags"] = tags;
|
|
314
283
|
} catch (error) {
|
|
315
284
|
Insider.putErrorLog(generateJSONErrorString(error));
|
|
316
285
|
}
|
|
@@ -324,7 +293,7 @@ export default class RNInsiderProduct {
|
|
|
324
293
|
return this;
|
|
325
294
|
}
|
|
326
295
|
try {
|
|
327
|
-
this.
|
|
296
|
+
this.optionalFields["in_stock"] = isInStock;
|
|
328
297
|
} catch (error) {
|
|
329
298
|
Insider.putErrorLog(generateJSONErrorString(error));
|
|
330
299
|
}
|
|
@@ -338,7 +307,7 @@ export default class RNInsiderProduct {
|
|
|
338
307
|
return this;
|
|
339
308
|
}
|
|
340
309
|
try {
|
|
341
|
-
this.
|
|
310
|
+
this.optionalFields["product_url"] = productURL;
|
|
342
311
|
} catch (error) {
|
|
343
312
|
Insider.putErrorLog(generateJSONErrorString(error));
|
|
344
313
|
}
|
|
@@ -352,7 +321,7 @@ export default class RNInsiderProduct {
|
|
|
352
321
|
return this;
|
|
353
322
|
}
|
|
354
323
|
try {
|
|
355
|
-
this.
|
|
324
|
+
this.customParameters.push({ type: 'string', key, value });
|
|
356
325
|
} catch (error) {
|
|
357
326
|
Insider.putErrorLog(generateJSONErrorString(error));
|
|
358
327
|
}
|
|
@@ -366,7 +335,7 @@ export default class RNInsiderProduct {
|
|
|
366
335
|
return this;
|
|
367
336
|
}
|
|
368
337
|
try {
|
|
369
|
-
this.
|
|
338
|
+
this.customParameters.push({ type: 'integer', key, value });
|
|
370
339
|
} catch (error) {
|
|
371
340
|
Insider.putErrorLog(generateJSONErrorString(error));
|
|
372
341
|
}
|
|
@@ -380,7 +349,7 @@ export default class RNInsiderProduct {
|
|
|
380
349
|
return this;
|
|
381
350
|
}
|
|
382
351
|
try {
|
|
383
|
-
this.
|
|
352
|
+
this.customParameters.push({ type: 'boolean', key, value });
|
|
384
353
|
} catch (error) {
|
|
385
354
|
Insider.putErrorLog(generateJSONErrorString(error));
|
|
386
355
|
}
|
|
@@ -394,7 +363,7 @@ export default class RNInsiderProduct {
|
|
|
394
363
|
return this;
|
|
395
364
|
}
|
|
396
365
|
try {
|
|
397
|
-
this.
|
|
366
|
+
this.customParameters.push({ type: 'double', key, value });
|
|
398
367
|
} catch (error) {
|
|
399
368
|
Insider.putErrorLog(generateJSONErrorString(error));
|
|
400
369
|
}
|
|
@@ -408,7 +377,7 @@ export default class RNInsiderProduct {
|
|
|
408
377
|
return this;
|
|
409
378
|
}
|
|
410
379
|
try {
|
|
411
|
-
this.
|
|
380
|
+
this.customParameters.push({ type: 'date', key, value: value.getTime().toString() });
|
|
412
381
|
} catch (error) {
|
|
413
382
|
Insider.putErrorLog(generateJSONErrorString(error));
|
|
414
383
|
}
|
|
@@ -422,7 +391,7 @@ export default class RNInsiderProduct {
|
|
|
422
391
|
return this;
|
|
423
392
|
}
|
|
424
393
|
try {
|
|
425
|
-
this.
|
|
394
|
+
this.customParameters.push({ type: 'strings', key, value });
|
|
426
395
|
} catch (error) {
|
|
427
396
|
Insider.putErrorLog(generateJSONErrorString(error));
|
|
428
397
|
}
|
|
@@ -436,7 +405,7 @@ export default class RNInsiderProduct {
|
|
|
436
405
|
return this;
|
|
437
406
|
}
|
|
438
407
|
try {
|
|
439
|
-
this.
|
|
408
|
+
this.customParameters.push({ type: 'strings', key, value });
|
|
440
409
|
} catch (error) {
|
|
441
410
|
Insider.putErrorLog(generateJSONErrorString(error));
|
|
442
411
|
}
|
|
@@ -450,7 +419,7 @@ export default class RNInsiderProduct {
|
|
|
450
419
|
return this;
|
|
451
420
|
}
|
|
452
421
|
try {
|
|
453
|
-
this.
|
|
422
|
+
this.customParameters.push({ type: 'numbers', key, value });
|
|
454
423
|
} catch (error) {
|
|
455
424
|
Insider.putErrorLog(generateJSONErrorString(error));
|
|
456
425
|
}
|
package/src/InsiderUser.js
CHANGED
|
@@ -26,7 +26,7 @@ export default class RNInsiderUser {
|
|
|
26
26
|
return this;
|
|
27
27
|
}
|
|
28
28
|
try {
|
|
29
|
-
Insider.setBirthday(value.
|
|
29
|
+
Insider.setBirthday(value.getTime().toString());
|
|
30
30
|
} catch (error) {
|
|
31
31
|
Insider.putErrorLog(generateJSONErrorString(error));
|
|
32
32
|
}
|
|
@@ -332,7 +332,7 @@ export default class RNInsiderUser {
|
|
|
332
332
|
return this;
|
|
333
333
|
}
|
|
334
334
|
try {
|
|
335
|
-
Insider.setCustomAttributeWithDate(key, value.
|
|
335
|
+
Insider.setCustomAttributeWithDate(key, value.getTime().toString());
|
|
336
336
|
} catch (error) {
|
|
337
337
|
Insider.putErrorLog(generateJSONErrorString(error));
|
|
338
338
|
}
|