react-native-netmera 1.8.1 → 1.9.0-beta01
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/.github/ISSUE_TEMPLATE/bug_report.md +23 -0
- package/.github/ISSUE_TEMPLATE/feature.md +17 -0
- package/.github/ISSUE_TEMPLATE/release.md +19 -0
- package/.github/PULL_REQUEST_TEMPLATE.md +28 -0
- package/README.md +6 -5
- package/android/build.gradle +3 -3
- package/android/src/main/java/com/netmera/reactnativesdk/RNNetmera.java +1 -1
- package/index.ts +52 -2
- package/ios/RNNetmera.m +1 -1
- package/package.json +1 -1
- package/src/Netmera.ts +1 -1
- package/src/events/NetmeraEventBannerOpen.ts +16 -0
- package/src/events/NetmeraEventBatteryLevel.ts +11 -0
- package/src/events/NetmeraEventCategoryView.ts +16 -0
- package/src/events/NetmeraEventInAppPurchase.ts +41 -0
- package/src/events/NetmeraEventLogin.ts +11 -0
- package/src/events/NetmeraEventRegister.ts +11 -0
- package/src/events/NetmeraEventScreenView.ts +31 -0
- package/src/events/NetmeraEventSearch.ts +16 -0
- package/src/events/NetmeraEventShare.ts +16 -0
- package/src/events/commerce/NetmeraEventCartAddProduct.ts +16 -0
- package/src/events/commerce/NetmeraEventCartRemoveProduct.ts +11 -0
- package/src/events/commerce/NetmeraEventCartView.ts +16 -0
- package/src/events/commerce/NetmeraEventOrderCancel.ts +26 -0
- package/src/events/commerce/NetmeraEventProductComment.ts +5 -0
- package/src/events/commerce/NetmeraEventProductRate.ts +11 -0
- package/src/events/commerce/NetmeraEventProductView.ts +5 -0
- package/src/events/commerce/NetmeraEventPurchase.ts +53 -0
- package/src/events/commerce/NetmeraEventWishList.ts +5 -0
- package/src/events/commerce/NetmeraLineItem.ts +9 -0
- package/src/events/commerce/NetmeraProduct.ts +52 -0
- package/src/events/media/NetmeraEventContent.ts +45 -0
- package/src/events/media/NetmeraEventContentComment.ts +5 -0
- package/src/events/media/NetmeraEventContentRate.ts +11 -0
- package/src/events/media/NetmeraEventContentView.ts +5 -0
- package/.github/workflows/commit_sync.yml +0 -53
- /package/src/{models → events}/NetmeraEvent.ts +0 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Bug report
|
|
3
|
+
about: Describe a bug that needs to be fixed
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
**Describe the bug**
|
|
8
|
+
<!--- A clear and concise description of what the bug is. -->
|
|
9
|
+
|
|
10
|
+
**To Reproduce**
|
|
11
|
+
Steps to reproduce the behavior:
|
|
12
|
+
|
|
13
|
+
**Expected behavior**
|
|
14
|
+
<!--- A clear and concise description of what you expected to happen. -->
|
|
15
|
+
|
|
16
|
+
**Testing**
|
|
17
|
+
<!--- A clear and concise description of how to test the fix. -->
|
|
18
|
+
|
|
19
|
+
**Screenshots**
|
|
20
|
+
<!--- If applicable, add screenshots to help explain your problem. -->
|
|
21
|
+
|
|
22
|
+
**Additional context**
|
|
23
|
+
<!--- Add any other context about the problem here. -->
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Feature
|
|
3
|
+
about: Describe a feature for this project
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
**Is your feature related to a problem? Please describe.**
|
|
7
|
+
<!--- A clear and concise description of what the problem is. -->
|
|
8
|
+
<!--- Ex. I'm always frustrated when [...] -->
|
|
9
|
+
|
|
10
|
+
**Testing**
|
|
11
|
+
<!--- A clear and concise description of how to test the fix. -->
|
|
12
|
+
|
|
13
|
+
**Additional context**
|
|
14
|
+
<!--- Add any other context or screenshots about the feature here. -->
|
|
15
|
+
|
|
16
|
+
**Acceptance criteria**
|
|
17
|
+
<!--- A list of the conditions that a software product must meet to be accepted by a user, a customer, or other system. -->
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Release
|
|
3
|
+
about: Describe a mobile app release.
|
|
4
|
+
---
|
|
5
|
+
**Type of release.**
|
|
6
|
+
<!--- Is this a Pre Release or a Prod release? -->
|
|
7
|
+
|
|
8
|
+
**New features**
|
|
9
|
+
<!-- Replace ADD_TIME_PERIOD_HERE with the scope of the release -->
|
|
10
|
+
<!-- Add new release features below. -->
|
|
11
|
+
We have completed the mobile dev worked the platform team had scoped out for the month of ADD_TIME_PERIOD_HERE and now it is time to deploy a new release.
|
|
12
|
+
Details for this build are as follows:
|
|
13
|
+
|
|
14
|
+
**Additional context**
|
|
15
|
+
<!--- Add any other context or screenshots about the feature here. -->
|
|
16
|
+
|
|
17
|
+
**Acceptance criteria**
|
|
18
|
+
<!--- A list of the conditions that a software product must meet to be accepted by a user, a customer, or other system. -->
|
|
19
|
+
Testers report no issues.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
## Related Issue
|
|
2
|
+
<!--- PRs should be related to open issues. -->
|
|
3
|
+
<!--- If suggesting a new feature or change, please discuss it in an issue first. -->
|
|
4
|
+
<!--- If fixing a bug, there should be an issue describing it with steps to reproduce it. -->
|
|
5
|
+
|
|
6
|
+
<!--- Link to the issue here: -->
|
|
7
|
+
ISSUE LINK: https://app.asana.com/0/1203144541549209/ISSUE_NUMBER
|
|
8
|
+
|
|
9
|
+
## Description
|
|
10
|
+
<!--- Describe your changes in detail -->
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
## Types of changes
|
|
14
|
+
<!--- What types of changes does your code introduce? Delete options that are not relevant: -->
|
|
15
|
+
|
|
16
|
+
- [ ] Bug fix (non-breaking change which fixes an issue)
|
|
17
|
+
- [ ] New feature (non-breaking change which adds functionality)
|
|
18
|
+
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
|
|
19
|
+
|
|
20
|
+
## How Has This Been Tested?
|
|
21
|
+
<!--- Describe in detail how you tested your changes. -->
|
|
22
|
+
<!--- Include details of your testing environment, and the tests you ran to -->
|
|
23
|
+
<!--- see how your change affects other areas of the code, etc. -->
|
|
24
|
+
|
|
25
|
+
## Screenshots or Sample Output
|
|
26
|
+
~~~
|
|
27
|
+
PASTE_OUTPUT_HERE
|
|
28
|
+
~~~
|
package/README.md
CHANGED
|
@@ -357,20 +357,21 @@ You can send your events as follows. For more examples, please see the [example
|
|
|
357
357
|
|
|
358
358
|
```
|
|
359
359
|
const sendLoginEvent = () => {
|
|
360
|
-
const loginEvent = new
|
|
360
|
+
const loginEvent = new NetmeraEventLogin();
|
|
361
361
|
loginEvent.setUserId(<userId>);
|
|
362
362
|
Netmera.sendEvent(loginEvent)
|
|
363
363
|
}
|
|
364
364
|
|
|
365
365
|
const sendRegisterEvent = () => {
|
|
366
|
-
const registerEvent = new
|
|
366
|
+
const registerEvent = new NetmeraEventRegister();
|
|
367
|
+
registerEvent.setUserId(<userId>);
|
|
367
368
|
Netmera.sendEvent(registerEvent)
|
|
368
369
|
}
|
|
369
370
|
|
|
370
371
|
const sendViewCartEvent = () => {
|
|
371
|
-
const viewCartEvent = new
|
|
372
|
-
viewCartEvent.
|
|
373
|
-
viewCartEvent.
|
|
372
|
+
const viewCartEvent = new NetmeraEventCartView();
|
|
373
|
+
viewCartEvent.setSubTotal(<subTotal>);
|
|
374
|
+
viewCartEvent.setItemCount(<itemCount>);
|
|
374
375
|
Netmera.sendEvent(viewCartEvent)
|
|
375
376
|
}
|
|
376
377
|
```
|
package/android/build.gradle
CHANGED
|
@@ -19,8 +19,8 @@ android {
|
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
dependencies {
|
|
22
|
-
implementation 'com.netmera:nmcore:4.0
|
|
23
|
-
implementation 'com.netmera:nmfcm:4.0.
|
|
24
|
-
implementation 'com.netmera:nmhms:4.0.
|
|
22
|
+
implementation 'com.netmera:nmcore:4.3.0'
|
|
23
|
+
implementation 'com.netmera:nmfcm:4.0.2'
|
|
24
|
+
implementation 'com.netmera:nmhms:4.0.1'
|
|
25
25
|
implementation 'com.facebook.react:react-native:+'
|
|
26
26
|
}
|
|
@@ -18,7 +18,7 @@ public class RNNetmera {
|
|
|
18
18
|
static void setNetmeraHeaders() {
|
|
19
19
|
ContentValues headerValues = new ContentValues();
|
|
20
20
|
headerValues.put("X-netmera-framework", "react");
|
|
21
|
-
headerValues.put("X-netmera-frameworkV", "1.
|
|
21
|
+
headerValues.put("X-netmera-frameworkV", "1.9.0");
|
|
22
22
|
Netmera.setNetmeraHeaders(headerValues);
|
|
23
23
|
}
|
|
24
24
|
}
|
package/index.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import Netmera from "./src/Netmera";
|
|
2
2
|
import NetmeraCouponObject from "./src/models/NetmeraCouponObject";
|
|
3
|
-
import NetmeraEvent from "./src/
|
|
3
|
+
import NetmeraEvent from "./src/events/NetmeraEvent";
|
|
4
4
|
import NetmeraUser, {
|
|
5
5
|
NMUserGender,
|
|
6
6
|
NMUserMaritalStatus,
|
|
@@ -13,11 +13,34 @@ import NMInboxStatusCountFilter from "./src/models/NMInboxStatusCountFilter";
|
|
|
13
13
|
import NMCategoryPreference from "./src/models/NMCategoryPreference";
|
|
14
14
|
import { NMInboxStatus } from "./src/models/NMInboxStatus";
|
|
15
15
|
import { NotificationPermissionStatus } from "./src/models/NotificationPermissionStatus";
|
|
16
|
+
import { NetmeraEventBannerOpen } from "./src/events/NetmeraEventBannerOpen";
|
|
17
|
+
import { NetmeraEventBatteryLevel } from "./src/events/NetmeraEventBatteryLevel";
|
|
18
|
+
import { NetmeraEventCategoryView } from "./src/events/NetmeraEventCategoryView";
|
|
19
|
+
import { NetmeraEventInAppPurchase } from "./src/events/NetmeraEventInAppPurchase";
|
|
20
|
+
import { NetmeraEventLogin } from "./src/events/NetmeraEventLogin";
|
|
21
|
+
import { NetmeraEventRegister } from "./src/events/NetmeraEventRegister";
|
|
22
|
+
import { NetmeraEventScreenView } from "./src/events/NetmeraEventScreenView";
|
|
23
|
+
import { NetmeraEventSearch } from "./src/events/NetmeraEventSearch";
|
|
24
|
+
import { NetmeraEventShare } from "./src/events/NetmeraEventShare";
|
|
25
|
+
import { NetmeraEventCartAddProduct } from "./src/events/commerce/NetmeraEventCartAddProduct";
|
|
26
|
+
import { NetmeraEventCartRemoveProduct } from "./src/events/commerce/NetmeraEventCartRemoveProduct";
|
|
27
|
+
import {NetmeraEventCartView} from "./src/events/commerce/NetmeraEventCartView";
|
|
28
|
+
import {NetmeraEventOrderCancel} from "./src/events/commerce/NetmeraEventOrderCancel";
|
|
29
|
+
import {NetmeraEventProductComment} from "./src/events/commerce/NetmeraEventProductComment";
|
|
30
|
+
import {NetmeraEventProductRate} from "./src/events/commerce/NetmeraEventProductRate";
|
|
31
|
+
import {NetmeraEventProductView} from "./src/events/commerce/NetmeraEventProductView";
|
|
32
|
+
import {NetmeraEventPurchase} from "./src/events/commerce/NetmeraEventPurchase";
|
|
33
|
+
import {NetmeraEventWishList} from "./src/events/commerce/NetmeraEventWishList";
|
|
34
|
+
import {NetmeraLineItem} from "./src/events/commerce/NetmeraLineItem";
|
|
35
|
+
import {NetmeraProduct} from "./src/events/commerce/NetmeraProduct";
|
|
36
|
+
import {NetmeraEventContent} from "./src/events/media/NetmeraEventContent";
|
|
37
|
+
import {NetmeraEventContentComment} from "./src/events/media/NetmeraEventContentComment";
|
|
38
|
+
import {NetmeraEventContentRate} from "./src/events/media/NetmeraEventContentRate";
|
|
39
|
+
import {NetmeraEventContentView} from "./src/events/media/NetmeraEventContentView";
|
|
16
40
|
|
|
17
41
|
export {
|
|
18
42
|
Netmera,
|
|
19
43
|
NetmeraCouponObject,
|
|
20
|
-
NetmeraEvent,
|
|
21
44
|
NetmeraUser,
|
|
22
45
|
NMUserGender,
|
|
23
46
|
NMUserMaritalStatus,
|
|
@@ -29,4 +52,31 @@ export {
|
|
|
29
52
|
NetmeraCategoryFilter,
|
|
30
53
|
NMCategoryPreference,
|
|
31
54
|
NotificationPermissionStatus,
|
|
55
|
+
NetmeraLineItem,
|
|
56
|
+
NetmeraProduct,
|
|
57
|
+
|
|
58
|
+
// Events
|
|
59
|
+
NetmeraEvent,
|
|
60
|
+
NetmeraEventBannerOpen,
|
|
61
|
+
NetmeraEventBatteryLevel,
|
|
62
|
+
NetmeraEventCategoryView,
|
|
63
|
+
NetmeraEventInAppPurchase,
|
|
64
|
+
NetmeraEventLogin,
|
|
65
|
+
NetmeraEventRegister,
|
|
66
|
+
NetmeraEventScreenView,
|
|
67
|
+
NetmeraEventSearch,
|
|
68
|
+
NetmeraEventShare,
|
|
69
|
+
NetmeraEventCartAddProduct,
|
|
70
|
+
NetmeraEventCartRemoveProduct,
|
|
71
|
+
NetmeraEventCartView,
|
|
72
|
+
NetmeraEventOrderCancel,
|
|
73
|
+
NetmeraEventProductComment,
|
|
74
|
+
NetmeraEventProductRate,
|
|
75
|
+
NetmeraEventProductView,
|
|
76
|
+
NetmeraEventPurchase,
|
|
77
|
+
NetmeraEventWishList,
|
|
78
|
+
NetmeraEventContent,
|
|
79
|
+
NetmeraEventContentComment,
|
|
80
|
+
NetmeraEventContentRate,
|
|
81
|
+
NetmeraEventContentView
|
|
32
82
|
};
|
package/ios/RNNetmera.m
CHANGED
|
@@ -55,7 +55,7 @@ NSString *const ERROR_MESSAGE_UPDATE_USER = @"Error occurred while updating user
|
|
|
55
55
|
|
|
56
56
|
+ (void)setNetmeraHeaders {
|
|
57
57
|
[Netmera setFramework:@"react"];
|
|
58
|
-
[Netmera setFrameworkVersion:@"1.
|
|
58
|
+
[Netmera setFrameworkVersion:@"1.9.0"];
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
+ (void)setPushDelegate:(NSObject<NetmeraPushDelegate> *)delegate {
|
package/package.json
CHANGED
package/src/Netmera.ts
CHANGED
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
NativeModulesStatic,
|
|
12
12
|
} from "react-native";
|
|
13
13
|
import NetmeraUser from "./models/NetmeraUser";
|
|
14
|
-
import NetmeraEvent from "./
|
|
14
|
+
import NetmeraEvent from "./events/NetmeraEvent";
|
|
15
15
|
import NetmeraInboxFilter from "./models/NetmeraInboxFilter";
|
|
16
16
|
import NetmeraPushInbox from "./models/NetmeraInbox";
|
|
17
17
|
import NetmeraCategoryFilter from "./models/NetmeraCategoryFilter";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import NetmeraEvent from './NetmeraEvent';
|
|
2
|
+
|
|
3
|
+
export class NetmeraEventBannerOpen extends NetmeraEvent {
|
|
4
|
+
code = 'n:bc';
|
|
5
|
+
|
|
6
|
+
private ea: string | undefined;
|
|
7
|
+
private eg: string[] | undefined;
|
|
8
|
+
|
|
9
|
+
setId(id: string): void {
|
|
10
|
+
this.ea = id;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
setKeywords(keywords: string[]): void {
|
|
14
|
+
this.eg = keywords;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import NetmeraEvent from './NetmeraEvent';
|
|
2
|
+
|
|
3
|
+
export class NetmeraEventCategoryView extends NetmeraEvent {
|
|
4
|
+
code = 'n:cv';
|
|
5
|
+
|
|
6
|
+
private ga: string | undefined;
|
|
7
|
+
private ef: string | undefined;
|
|
8
|
+
|
|
9
|
+
setId(id: string): void {
|
|
10
|
+
this.ga = id;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
setName(name: string): void {
|
|
14
|
+
this.ef = name;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import NetmeraEvent from './NetmeraEvent';
|
|
2
|
+
|
|
3
|
+
export class NetmeraEventInAppPurchase extends NetmeraEvent {
|
|
4
|
+
code = 'n:ip';
|
|
5
|
+
|
|
6
|
+
private ea: string | undefined;
|
|
7
|
+
private eb: string | undefined;
|
|
8
|
+
private eq: number | undefined;
|
|
9
|
+
private ec: number | undefined;
|
|
10
|
+
private ga: string[] | undefined;
|
|
11
|
+
private ef: string[] | undefined;
|
|
12
|
+
private eg: string[] | undefined;
|
|
13
|
+
|
|
14
|
+
setId(id: string): void {
|
|
15
|
+
this.ea = id;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
setName(name: string): void {
|
|
19
|
+
this.eb = name;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
setPrice(price: number): void {
|
|
23
|
+
this.eq = price;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
setCount(count: number): void {
|
|
27
|
+
this.ec = count;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
setCategoryIds(categoryIds: string[]): void {
|
|
31
|
+
this.ga = categoryIds;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
setCategoryNames(categoryNames: string[]): void {
|
|
35
|
+
this.ef = categoryNames;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
setKeywords(keywords: string[]): void {
|
|
39
|
+
this.eg = keywords;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import NetmeraEvent from './NetmeraEvent';
|
|
2
|
+
|
|
3
|
+
export class NetmeraEventScreenView extends NetmeraEvent {
|
|
4
|
+
code = 'n:sv';
|
|
5
|
+
|
|
6
|
+
private ee: string | undefined;
|
|
7
|
+
private ef: string | undefined;
|
|
8
|
+
private ej: string | undefined;
|
|
9
|
+
private el: string | undefined;
|
|
10
|
+
private ea: string | undefined;
|
|
11
|
+
|
|
12
|
+
setPageId(pageId: string): void {
|
|
13
|
+
this.ee = pageId;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
setReferrerPageId(referrerPageId: string): void {
|
|
17
|
+
this.ef = referrerPageId;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
setReferrerPageName(referrerPageName: string): void {
|
|
21
|
+
this.ej = referrerPageName;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
setTimeInPage(timeInPage: string): void {
|
|
25
|
+
this.el = timeInPage;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
setPageName(pageName: string): void {
|
|
29
|
+
this.ea = pageName;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import NetmeraEvent from './NetmeraEvent';
|
|
2
|
+
|
|
3
|
+
export class NetmeraEventSearch extends NetmeraEvent {
|
|
4
|
+
code = 'n:sr';
|
|
5
|
+
|
|
6
|
+
private ga: string | undefined;
|
|
7
|
+
private ef: number | undefined;
|
|
8
|
+
|
|
9
|
+
setQuery(query: string): void {
|
|
10
|
+
this.ga = query;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
setResultCount(resultCount: number): void {
|
|
14
|
+
this.ef = resultCount;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import NetmeraEvent from './NetmeraEvent';
|
|
2
|
+
|
|
3
|
+
export class NetmeraEventShare extends NetmeraEvent {
|
|
4
|
+
code = 'n:sh';
|
|
5
|
+
|
|
6
|
+
private ga: string | undefined;
|
|
7
|
+
private ef: string | undefined;
|
|
8
|
+
|
|
9
|
+
setChannel(channel: string): void {
|
|
10
|
+
this.ga = channel;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
setContent(content: string): void {
|
|
14
|
+
this.ef = content;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import NetmeraEvent from './../NetmeraEvent';
|
|
2
|
+
|
|
3
|
+
export class NetmeraEventCartAddProduct extends NetmeraEvent {
|
|
4
|
+
code = 'n:acp';
|
|
5
|
+
|
|
6
|
+
private ec: number | undefined;
|
|
7
|
+
private er: number | undefined;
|
|
8
|
+
|
|
9
|
+
setCount(count: number): void {
|
|
10
|
+
this.ec = count;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
setBasketTotal(basketTotal: number): void {
|
|
14
|
+
this.er = basketTotal;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import NetmeraEvent from './../NetmeraEvent';
|
|
2
|
+
|
|
3
|
+
export class NetmeraEventCartView extends NetmeraEvent {
|
|
4
|
+
code = 'n:vt';
|
|
5
|
+
|
|
6
|
+
private ec: number | undefined;
|
|
7
|
+
private er: number | undefined;
|
|
8
|
+
|
|
9
|
+
setItemCount(itemCount: number): void {
|
|
10
|
+
this.ec = itemCount;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
setSubTotal(subTotal: number): void {
|
|
14
|
+
this.er = subTotal;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import NetmeraEvent from './../NetmeraEvent';
|
|
2
|
+
|
|
3
|
+
export class NetmeraEventOrderCancel extends NetmeraEvent {
|
|
4
|
+
code = 'n:co';
|
|
5
|
+
|
|
6
|
+
private er: number | undefined;
|
|
7
|
+
private es: number | undefined;
|
|
8
|
+
private ec: number | undefined;
|
|
9
|
+
private em: string | undefined;
|
|
10
|
+
|
|
11
|
+
setSubTotal(subTotal: number): void {
|
|
12
|
+
this.er = subTotal;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
setGrandTotal(grandTotal: number): void {
|
|
16
|
+
this.es = grandTotal;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
setItemCount(itemCount: number): void {
|
|
20
|
+
this.ec = itemCount;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
setPaymentMethod(paymentMethod: string): void {
|
|
24
|
+
this.em = paymentMethod;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import NetmeraEvent from './../NetmeraEvent';
|
|
2
|
+
import {NetmeraLineItem} from "./NetmeraLineItem";
|
|
3
|
+
|
|
4
|
+
export class NetmeraEventPurchase extends NetmeraEvent {
|
|
5
|
+
code = "n:ph"
|
|
6
|
+
|
|
7
|
+
private er: number | undefined;
|
|
8
|
+
private es: number | undefined;
|
|
9
|
+
private ec: number | undefined;
|
|
10
|
+
private fz: number | undefined;
|
|
11
|
+
private items: NetmeraLineItem[] | undefined;
|
|
12
|
+
private em: string | undefined;
|
|
13
|
+
private ep: number | undefined;
|
|
14
|
+
private el: number | undefined;
|
|
15
|
+
private ek: string | undefined;
|
|
16
|
+
|
|
17
|
+
setSubTotal(subTotal: number): void {
|
|
18
|
+
this.er = subTotal;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
setGrandTotal(grandTotal: number): void {
|
|
22
|
+
this.es = grandTotal;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
setItemCount(itemCount: number): void {
|
|
26
|
+
this.ec = itemCount;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
setProductCount(productCount: number): void {
|
|
30
|
+
this.fz = productCount;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
setLineItems(lineItems: NetmeraLineItem[]) {
|
|
34
|
+
this.items = lineItems;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
setPaymentMethod(paymentMethod: string) {
|
|
38
|
+
this.em = paymentMethod;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
setShippingCost(shippingCost: number): void {
|
|
42
|
+
this.ep = shippingCost;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
setDiscount(discount: number): void {
|
|
46
|
+
this.el = discount;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
setCoupon(coupon: string) {
|
|
50
|
+
this.ek = coupon;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
export class NetmeraProduct {
|
|
2
|
+
private ea: string | undefined; // id
|
|
3
|
+
private eb: string | undefined; // name
|
|
4
|
+
private eq: number| undefined; // price
|
|
5
|
+
private ga: string[] | undefined; // categoryIds
|
|
6
|
+
private ef: string[] | undefined; // categoryNames
|
|
7
|
+
private eh: string | undefined; // brandName
|
|
8
|
+
private gd: string | undefined; // brandId
|
|
9
|
+
private ei: string | undefined; // variant
|
|
10
|
+
private eg: string[] | undefined; // keywords
|
|
11
|
+
private ge: string | undefined; // campaignId
|
|
12
|
+
|
|
13
|
+
setId(value: string) {
|
|
14
|
+
this.ea = value;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
setName(value: string) {
|
|
18
|
+
this.eb = value;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
setPrice(value: number) {
|
|
22
|
+
this.eq = value;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
setCategoryIds(value: string[]) {
|
|
26
|
+
this.ga = value;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
setCategoryNames(value: string[]) {
|
|
30
|
+
this.ef = value;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
setBrandName(value: string) {
|
|
34
|
+
this.eh = value;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
setBrandId(value: string) {
|
|
38
|
+
this.gd = value;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
setVariant(value: string) {
|
|
42
|
+
this.ei = value;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
setKeywords(value: string[]) {
|
|
46
|
+
this.eg = value;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
setCampaignId(value: string) {
|
|
50
|
+
this.ge = value;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import NetmeraEvent from './../NetmeraEvent';
|
|
2
|
+
|
|
3
|
+
export abstract class NetmeraEventContent extends NetmeraEvent {
|
|
4
|
+
static readonly TYPE_OTHER = 0;
|
|
5
|
+
static readonly TYPE_IMAGE = 1;
|
|
6
|
+
static readonly TYPE_AUDIO = 2;
|
|
7
|
+
static readonly TYPE_VIDEO = 3;
|
|
8
|
+
static readonly TYPE_TEXT = 4;
|
|
9
|
+
|
|
10
|
+
private ea: string | undefined; // id
|
|
11
|
+
private eb: string | undefined; // name
|
|
12
|
+
private ed: number | undefined; // type
|
|
13
|
+
private ee: string | undefined; // provider
|
|
14
|
+
private ga: string[] | undefined; // categoryIds
|
|
15
|
+
private ef: string[] | undefined; // categoryNames
|
|
16
|
+
private eg: string[] | undefined; // keywords
|
|
17
|
+
|
|
18
|
+
setId(value: string): void {
|
|
19
|
+
this.ea = value;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
setName(value: string): void {
|
|
23
|
+
this.eb = value;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
setType(value: number): void {
|
|
27
|
+
this.ed = value;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
setProvider(value: string): void {
|
|
31
|
+
this.ee = value;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
setCategoryIds(value: string[]): void {
|
|
35
|
+
this.ga = value;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
setCategoryNames(value: string[]): void {
|
|
39
|
+
this.ef = value;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
setKeywords(value: string[]): void {
|
|
43
|
+
this.eg = value;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
name: Sync Commits to Client Repo
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
branches:
|
|
6
|
-
- master
|
|
7
|
-
|
|
8
|
-
jobs:
|
|
9
|
-
sync_to_repo_a:
|
|
10
|
-
runs-on: ubuntu-latest
|
|
11
|
-
|
|
12
|
-
steps:
|
|
13
|
-
- name: Checkout repository
|
|
14
|
-
uses: actions/checkout@v2
|
|
15
|
-
with:
|
|
16
|
-
fetch-depth: 0 # fetch the entire history
|
|
17
|
-
|
|
18
|
-
- name: Configure Git
|
|
19
|
-
run: |
|
|
20
|
-
git config --global user.email "engineering@initialcode.com.tr"
|
|
21
|
-
git config --global user.name "Initial Code"
|
|
22
|
-
|
|
23
|
-
- name: Add Repo A as remote
|
|
24
|
-
run: |
|
|
25
|
-
eval `ssh-agent -s`
|
|
26
|
-
ssh-add - <<< '${{ secrets.SSH_PRIVATE_KEY }}'
|
|
27
|
-
git remote add repo-a "git@github.com:Netmera/netmera-sdk-react-native.git"
|
|
28
|
-
git fetch repo-a
|
|
29
|
-
|
|
30
|
-
- name: Pull latest changes from Repo A
|
|
31
|
-
run: |
|
|
32
|
-
eval `ssh-agent -s`
|
|
33
|
-
ssh-add - <<< '${{ secrets.SSH_PRIVATE_KEY }}'
|
|
34
|
-
git pull repo-a master --rebase || git rebase --abort
|
|
35
|
-
|
|
36
|
-
- name: Remove .github folder
|
|
37
|
-
run: |
|
|
38
|
-
rm -rf .github
|
|
39
|
-
git add -A
|
|
40
|
-
git commit -m "Remove .github folder before pushing" || true
|
|
41
|
-
|
|
42
|
-
- name: Resolve conflicts if any and continue rebase
|
|
43
|
-
if: failure()
|
|
44
|
-
run: |
|
|
45
|
-
eval `ssh-agent -s`
|
|
46
|
-
ssh-add - <<< '${{ secrets.SSH_PRIVATE_KEY }}'
|
|
47
|
-
git rebase --continue || git rebase --skip || true
|
|
48
|
-
|
|
49
|
-
- name: Push to Repo A
|
|
50
|
-
run: |
|
|
51
|
-
eval `ssh-agent -s`
|
|
52
|
-
ssh-add - <<< '${{ secrets.SSH_PRIVATE_KEY }}'
|
|
53
|
-
git push repo-a master:master --force
|
|
File without changes
|