@artisan-commerce/analytics-rn 0.2.1-canary.2 → 0.3.0-canary.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.
- package/CHANGELOG.md +17 -0
- package/README.md +1 -1
- package/build/analytics-rn/src/lib/events/events.types.d.ts +3 -3
- package/build/analytics-rn/src/lib/events/product/filterProducts/filterProducts.types.d.ts +2 -2
- package/build/analytics-rn/src/lib/events/product/sortProducts/sortProducts.types.d.ts +1 -1
- package/build/analytics-rn/src/lib/providers/AnalyticsProvider/AnalyticsProvider.d.ts +1 -1
- package/build/analytics-rn/src/types/common.types.d.ts +6 -6
- package/build/analytics-rn/src/types/event.types.d.ts +78 -78
- package/build/analytics-rn/src/utils/events.utils.d.ts +1 -1
- package/build/main.bundle.js +4 -4
- package/build/report.json +1 -1
- package/package.json +9 -9
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,23 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [0.3.0-canary.1](https://bitbucket.org/tradesystem/artisn_sdk/compare/@artisan-commerce/analytics-rn@0.3.0-canary.0...@artisan-commerce/analytics-rn@0.3.0-canary.1) (2021-08-12)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @artisan-commerce/analytics-rn
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [0.3.0-canary.0](https://bitbucket.org/tradesystem/artisn_sdk/compare/@artisan-commerce/analytics-rn@0.2.1-canary.2...@artisan-commerce/analytics-rn@0.3.0-canary.0) (2021-08-11)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Features
|
|
18
|
+
|
|
19
|
+
* **global:** rebrand artisan-commerce to artisn ([b2688b1](https://bitbucket.org/tradesystem/artisn_sdk/commit/b2688b107757ed82791c0be49439e9fb28f78b6d))
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
6
23
|
### [0.2.1-canary.2](https://bitbucket.org/tradesystem/artisan_sdk/compare/@artisan-commerce/analytics-rn@0.2.1-canary.1...@artisan-commerce/analytics-rn@0.2.1-canary.2) (2021-08-06)
|
|
7
24
|
|
|
8
25
|
**Note:** Version bump only for package @artisan-commerce/analytics-rn
|
package/README.md
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
##
|
|
1
|
+
## Artisn commerce analytics react native
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Google Analytics event shared parameters.
|
|
3
3
|
*
|
|
4
|
-
* @interface
|
|
4
|
+
* @interface ArtisnCommonEventParams
|
|
5
5
|
* @since 0.5.14
|
|
6
6
|
* @property {string} userId The user's unique identifier between platforms
|
|
7
7
|
*/
|
|
8
|
-
export interface
|
|
9
|
-
|
|
8
|
+
export interface ArtisnCommonEventParams {
|
|
9
|
+
artisnName?: string;
|
|
10
10
|
}
|
|
11
11
|
/**
|
|
12
12
|
* Workflow types.
|
|
@@ -7,8 +7,8 @@ import { FilterProductsParams as SegmentFilterProductsParams } from "../../../pr
|
|
|
7
7
|
* @interface FilterProductsCommonParams
|
|
8
8
|
* @since 0.5.14
|
|
9
9
|
* @property {string} list the name of the list of products to filter
|
|
10
|
-
* @property {string} filterBy key:value list of filters e.g. ["brand:
|
|
11
|
-
* @property {string} categoryId if the list is an
|
|
10
|
+
* @property {string} filterBy key:value list of filters e.g. ["brand:Artisn"]
|
|
11
|
+
* @property {string} categoryId if the list is an artisn category, the category id
|
|
12
12
|
*/
|
|
13
13
|
export interface FilterProductsCommonParams {
|
|
14
14
|
list: string;
|
|
@@ -9,7 +9,7 @@ import { SortProductsParams as SegmentSortProductsParams } from "../../../provid
|
|
|
9
9
|
* @property {string} list the name of the list of products to sort
|
|
10
10
|
* @property {string} sortBy sort attribute by (e.g. alphabetical)
|
|
11
11
|
* @property {string} sortMethod method used to sort (e.g. asc)
|
|
12
|
-
* @property {string} categoryId if the list is an
|
|
12
|
+
* @property {string} categoryId if the list is an artisn category, the category id
|
|
13
13
|
*/
|
|
14
14
|
export interface SortProductsCommonParams {
|
|
15
15
|
list: string;
|
|
@@ -16,7 +16,7 @@ declare abstract class AnalyticsProvider implements IAnaliticsProvider {
|
|
|
16
16
|
*
|
|
17
17
|
* @constructs
|
|
18
18
|
* @since 0.5.14
|
|
19
|
-
* @param {Config} config
|
|
19
|
+
* @param {Config} config artisn's account unique identifier.
|
|
20
20
|
*/
|
|
21
21
|
constructor(config: Config);
|
|
22
22
|
/**
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { Account,
|
|
1
|
+
import { Account, ArtisnPlatform, Catalogue } from "@artisan-commerce/types";
|
|
2
2
|
import { Store, Vendor } from "@artisan-commerce/types";
|
|
3
3
|
/**
|
|
4
4
|
* Analytics providers configurable options.
|
|
5
5
|
*
|
|
6
|
-
* @typedef
|
|
6
|
+
* @typedef ArtisnPlatform
|
|
7
7
|
* @since 0.5.14
|
|
8
8
|
*/
|
|
9
9
|
/**
|
|
10
10
|
* Analytics event metadata to be included in every sent event.
|
|
11
11
|
*
|
|
12
|
-
* @interface
|
|
12
|
+
* @interface ArtisnPlatform
|
|
13
13
|
* @since 0.5.14
|
|
14
14
|
* @property {number} accountId the id of the account it is running on
|
|
15
15
|
* @property {number} vendorId the id of the active vendor
|
|
@@ -21,7 +21,7 @@ import { Store, Vendor } from "@artisan-commerce/types";
|
|
|
21
21
|
* @property {string} versionSDK the Analytics SDK version
|
|
22
22
|
* @property {string} versionApp the running on app version
|
|
23
23
|
* @property {string} appName the name of the app
|
|
24
|
-
* @property {
|
|
24
|
+
* @property {ArtisnPlatform} platform the type of platform it is running on
|
|
25
25
|
*/
|
|
26
26
|
export interface AnalyticsMeta {
|
|
27
27
|
accountId: Account["accountId"];
|
|
@@ -34,12 +34,12 @@ export interface AnalyticsMeta {
|
|
|
34
34
|
versionSDK: string;
|
|
35
35
|
versionApp: string;
|
|
36
36
|
appName: string;
|
|
37
|
-
platform:
|
|
37
|
+
platform: ArtisnPlatform;
|
|
38
38
|
}
|
|
39
39
|
/**
|
|
40
40
|
* Analytics supported providers.
|
|
41
41
|
*
|
|
42
|
-
* @typedef
|
|
42
|
+
* @typedef ArtisnPlatform
|
|
43
43
|
* @since 0.5.14
|
|
44
44
|
*/
|
|
45
45
|
export declare type SupportedProviders = "GOOGLE_ANALYTICS" | "FACEBOOK_PIXEL" | "SEGMENT";
|
|
@@ -3,187 +3,187 @@ import { FacebookPixelProvider } from "../lib/providers/FacebookPixel/FacebookPi
|
|
|
3
3
|
import { GoogleAnalyticsProvider } from "../lib/providers/GoogleAnalytics/GoogleAnalytics.types";
|
|
4
4
|
import { SegmentProvider } from "../lib/providers/Segment/Segment.types";
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* Artisn Auth event names type
|
|
7
7
|
*
|
|
8
|
-
* @typedef
|
|
8
|
+
* @typedef ArtisnAuthEventNames
|
|
9
9
|
* @since 0.5.14
|
|
10
10
|
*/
|
|
11
|
-
export declare type
|
|
11
|
+
export declare type ArtisnAuthEventNames = "changePasswordAttempt" | "changePasswordFail" | "changePasswordSuccess" | "signIn" | "signOut" | "signUp" | "signUpAttempt";
|
|
12
12
|
/**
|
|
13
|
-
*
|
|
13
|
+
* Artisn Banner event names type
|
|
14
14
|
*
|
|
15
|
-
* @typedef
|
|
15
|
+
* @typedef ArtisnBannerEventNames
|
|
16
16
|
* @since 0.5.14
|
|
17
17
|
*/
|
|
18
|
-
export declare type
|
|
18
|
+
export declare type ArtisnBannerEventNames = "bannerImpression" | "selectBanner";
|
|
19
19
|
/**
|
|
20
|
-
*
|
|
20
|
+
* Artisn Billing event names type
|
|
21
21
|
*
|
|
22
|
-
* @typedef
|
|
22
|
+
* @typedef ArtisnBillingEventNames
|
|
23
23
|
* @since 0.5.14
|
|
24
24
|
*/
|
|
25
|
-
export declare type
|
|
25
|
+
export declare type ArtisnBillingEventNames = "addBillingInfo" | "selectBillingInfo" | "updateBillingInfo";
|
|
26
26
|
/**
|
|
27
|
-
*
|
|
27
|
+
* Artisn Booking event names type
|
|
28
28
|
*
|
|
29
|
-
* @typedef
|
|
29
|
+
* @typedef ArtisnBookingEventNames
|
|
30
30
|
* @since 0.5.14
|
|
31
31
|
*/
|
|
32
|
-
export declare type
|
|
32
|
+
export declare type ArtisnBookingEventNames = "bookAppointment";
|
|
33
33
|
/**
|
|
34
|
-
*
|
|
34
|
+
* Artisn Category event names type
|
|
35
35
|
*
|
|
36
|
-
* @typedef
|
|
36
|
+
* @typedef ArtisnCategoryEventNames
|
|
37
37
|
* @since 0.5.14
|
|
38
38
|
*/
|
|
39
|
-
export declare type
|
|
39
|
+
export declare type ArtisnCategoryEventNames = "categoryImpression" | "searchCategoryAttempt" | "selectCategory" | "viewCategory";
|
|
40
40
|
/**
|
|
41
|
-
*
|
|
41
|
+
* Artisn Checkout event names type
|
|
42
42
|
*
|
|
43
|
-
* @typedef
|
|
43
|
+
* @typedef ArtisnCheckoutEventNames
|
|
44
44
|
* @since 0.5.14
|
|
45
45
|
*/
|
|
46
|
-
export declare type
|
|
46
|
+
export declare type ArtisnCheckoutEventNames = "checkoutAction" | "initiateCheckout";
|
|
47
47
|
/**
|
|
48
|
-
*
|
|
48
|
+
* Artisn Coupon event names type
|
|
49
49
|
*
|
|
50
|
-
* @typedef
|
|
50
|
+
* @typedef ArtisnCouponEventNames
|
|
51
51
|
* @since 0.5.14
|
|
52
52
|
*/
|
|
53
|
-
export declare type
|
|
53
|
+
export declare type ArtisnCouponEventNames = "applyBenefit" | "couponCodeError" | "redeemCouponCode" | "removeBenefit" | "viewBenefitDetails" | "viewBenefitsWallet" | "viewQRStoreCoupon";
|
|
54
54
|
/**
|
|
55
|
-
*
|
|
55
|
+
* Artisn Credit event names type
|
|
56
56
|
*
|
|
57
|
-
* @typedef
|
|
57
|
+
* @typedef ArtisnCreditEventNames
|
|
58
58
|
* @since 0.5.14
|
|
59
59
|
*/
|
|
60
|
-
export declare type
|
|
60
|
+
export declare type ArtisnCreditEventNames = "addCredits" | "spendCredits" | "viewCredits";
|
|
61
61
|
/**
|
|
62
|
-
*
|
|
62
|
+
* Artisn Fulfillment event names type
|
|
63
63
|
*
|
|
64
|
-
* @typedef
|
|
64
|
+
* @typedef ArtisnFulfillmentEventNames
|
|
65
65
|
* @since 0.5.14
|
|
66
66
|
*/
|
|
67
|
-
export declare type
|
|
67
|
+
export declare type ArtisnFulfillmentEventNames = "viewFulfillmentStep" | "viewTracking";
|
|
68
68
|
/**
|
|
69
|
-
*
|
|
69
|
+
* Artisn Geo event names type
|
|
70
70
|
*
|
|
71
|
-
* @typedef
|
|
71
|
+
* @typedef ArtisnGeoEventNames
|
|
72
72
|
* @since 0.5.14
|
|
73
73
|
*/
|
|
74
|
-
export declare type
|
|
74
|
+
export declare type ArtisnGeoEventNames = "changeLocation" | "findLocation" | "outOfCoverage" | "setLocation";
|
|
75
75
|
/**
|
|
76
|
-
*
|
|
76
|
+
* Artisn Help event names type
|
|
77
77
|
*
|
|
78
|
-
* @typedef
|
|
78
|
+
* @typedef ArtisnHelpEventNames
|
|
79
79
|
* @since 0.5.14
|
|
80
80
|
*/
|
|
81
|
-
export declare type
|
|
81
|
+
export declare type ArtisnHelpEventNames = "requestAssistance";
|
|
82
82
|
/**
|
|
83
|
-
*
|
|
83
|
+
* Artisn Loyalty event names type
|
|
84
84
|
*
|
|
85
|
-
* @typedef
|
|
85
|
+
* @typedef ArtisnLoyaltyEventNames
|
|
86
86
|
* @since 0.5.14
|
|
87
87
|
*/
|
|
88
|
-
export declare type
|
|
88
|
+
export declare type ArtisnLoyaltyEventNames = "earnPoints" | "sharePoints" | "spendPoints" | "viewLoyaltyLevel";
|
|
89
89
|
/**
|
|
90
|
-
*
|
|
90
|
+
* Artisn Order event names type
|
|
91
91
|
*
|
|
92
|
-
* @typedef
|
|
92
|
+
* @typedef ArtisnOrderEventNames
|
|
93
93
|
* @since 0.5.14
|
|
94
94
|
*/
|
|
95
|
-
export declare type
|
|
95
|
+
export declare type ArtisnOrderEventNames = "cancelOrder" | "rateOrder" | "requestRefund";
|
|
96
96
|
/**
|
|
97
|
-
*
|
|
97
|
+
* Artisn Other event names type
|
|
98
98
|
*
|
|
99
|
-
* @typedef
|
|
99
|
+
* @typedef ArtisnOtherEventNames
|
|
100
100
|
* @since 0.5.14
|
|
101
101
|
*/
|
|
102
|
-
export declare type
|
|
102
|
+
export declare type ArtisnOtherEventNames = "generateLead" | "screenView" | "searchPageContent";
|
|
103
103
|
/**
|
|
104
|
-
*
|
|
104
|
+
* Artisn Payment event names type
|
|
105
105
|
*
|
|
106
|
-
* @typedef
|
|
106
|
+
* @typedef ArtisnPaymentEventNames
|
|
107
107
|
* @since 0.5.14
|
|
108
108
|
*/
|
|
109
|
-
export declare type
|
|
109
|
+
export declare type ArtisnPaymentEventNames = "changePaymentType" | "selectPaymentType" | "setPaymentInfo";
|
|
110
110
|
/**
|
|
111
|
-
*
|
|
111
|
+
* Artisn Product event names type
|
|
112
112
|
*
|
|
113
|
-
* @typedef
|
|
113
|
+
* @typedef ArtisnProductEventNames
|
|
114
114
|
* @since 0.5.14
|
|
115
115
|
*/
|
|
116
|
-
export declare type
|
|
116
|
+
export declare type ArtisnProductEventNames = "customizeProduct" | "filterProducts" | "productImpression" | "searchProductAttempt" | "searchProductNotFound" | "searchProductSuccess" | "selectProduct" | "sortProducts" | "viewProductDetails";
|
|
117
117
|
/**
|
|
118
|
-
*
|
|
118
|
+
* Artisn Purchase event names type
|
|
119
119
|
*
|
|
120
|
-
* @typedef
|
|
120
|
+
* @typedef ArtisnPurchaseEventNames
|
|
121
121
|
* @since 0.5.14
|
|
122
122
|
*/
|
|
123
|
-
export declare type
|
|
123
|
+
export declare type ArtisnPurchaseEventNames = "purchaseAttempt" | "purchaseFail" | "purchaseSuccess";
|
|
124
124
|
/**
|
|
125
|
-
*
|
|
125
|
+
* Artisn Settings event names type
|
|
126
126
|
*
|
|
127
|
-
* @typedef
|
|
127
|
+
* @typedef ArtisnSettingsEventNames
|
|
128
128
|
* @since 0.5.14
|
|
129
129
|
*/
|
|
130
|
-
export declare type
|
|
130
|
+
export declare type ArtisnSettingsEventNames = "viewSettings";
|
|
131
131
|
/**
|
|
132
|
-
*
|
|
132
|
+
* Artisn Shipping event names type
|
|
133
133
|
*
|
|
134
|
-
* @typedef
|
|
134
|
+
* @typedef ArtisnShippingEventNames
|
|
135
135
|
* @since 0.5.14
|
|
136
136
|
*/
|
|
137
|
-
export declare type
|
|
137
|
+
export declare type ArtisnShippingEventNames = "addShippingAddress" | "selectShippingAddress" | "updateShippingAddress";
|
|
138
138
|
/**
|
|
139
|
-
*
|
|
139
|
+
* Artisn ShoppingCart event names type
|
|
140
140
|
*
|
|
141
|
-
* @typedef
|
|
141
|
+
* @typedef ArtisnShoppingCartEventNames
|
|
142
142
|
* @since 0.5.14
|
|
143
143
|
*/
|
|
144
|
-
export declare type
|
|
144
|
+
export declare type ArtisnShoppingCartEventNames = "addProductToCart" | "addProductToWishlist" | "clearCart" | "removeProductFromCart" | "removeProductFromWishlist" | "updateProductInCart" | "updateProductInWishlist" | "viewCart";
|
|
145
145
|
/**
|
|
146
|
-
*
|
|
146
|
+
* Artisn Social event names type
|
|
147
147
|
*
|
|
148
|
-
* @typedef
|
|
148
|
+
* @typedef ArtisnSocialEventNames
|
|
149
149
|
* @since 0.5.14
|
|
150
150
|
*/
|
|
151
|
-
export declare type
|
|
151
|
+
export declare type ArtisnSocialEventNames = "share";
|
|
152
152
|
/**
|
|
153
|
-
*
|
|
153
|
+
* Artisn Store event names type
|
|
154
154
|
*
|
|
155
|
-
* @typedef
|
|
155
|
+
* @typedef ArtisnStoreEventNames
|
|
156
156
|
* @since 0.5.14
|
|
157
157
|
*/
|
|
158
|
-
export declare type
|
|
158
|
+
export declare type ArtisnStoreEventNames = "changeStore" | "setStore";
|
|
159
159
|
/**
|
|
160
|
-
*
|
|
160
|
+
* Artisn User event names type
|
|
161
161
|
*
|
|
162
|
-
* @typedef
|
|
162
|
+
* @typedef ArtisnUserEventNames
|
|
163
163
|
* @since 0.5.14
|
|
164
164
|
*/
|
|
165
|
-
export declare type
|
|
165
|
+
export declare type ArtisnUserEventNames = "setUserInfo" | "updateUserInfo";
|
|
166
166
|
/**
|
|
167
|
-
*
|
|
167
|
+
* Artisn Vendor event names type
|
|
168
168
|
*
|
|
169
|
-
* @typedef
|
|
169
|
+
* @typedef ArtisnVendorEventNames
|
|
170
170
|
* @since 0.5.14
|
|
171
171
|
*/
|
|
172
|
-
export declare type
|
|
172
|
+
export declare type ArtisnVendorEventNames = "changeVendor" | "setVendor";
|
|
173
173
|
/**
|
|
174
|
-
*
|
|
174
|
+
* Artisn Workflow event names type
|
|
175
175
|
*
|
|
176
|
-
* @typedef
|
|
176
|
+
* @typedef ArtisnWorkflowEventNames
|
|
177
177
|
* @since 0.5.14
|
|
178
178
|
*/
|
|
179
|
-
export declare type
|
|
179
|
+
export declare type ArtisnWorkflowEventNames = "selectWorkflow" | "updateWorkflow";
|
|
180
180
|
/**
|
|
181
|
-
*
|
|
181
|
+
* Artisn event names type
|
|
182
182
|
*
|
|
183
|
-
* @typedef
|
|
183
|
+
* @typedef ArtisnEventNames
|
|
184
184
|
* @since 0.5.14
|
|
185
185
|
*/
|
|
186
|
-
export declare type
|
|
186
|
+
export declare type ArtisnEventNames = ArtisnAuthEventNames | ArtisnBannerEventNames | ArtisnBillingEventNames | ArtisnBookingEventNames | ArtisnCategoryEventNames | ArtisnCheckoutEventNames | ArtisnCouponEventNames | ArtisnCreditEventNames | ArtisnFulfillmentEventNames | ArtisnGeoEventNames | ArtisnHelpEventNames | ArtisnLoyaltyEventNames | ArtisnOrderEventNames | ArtisnOtherEventNames | ArtisnPaymentEventNames | ArtisnProductEventNames | ArtisnPurchaseEventNames | ArtisnSettingsEventNames | ArtisnShippingEventNames | ArtisnShoppingCartEventNames | ArtisnSocialEventNames | ArtisnStoreEventNames | ArtisnUserEventNames | ArtisnVendorEventNames | ArtisnWorkflowEventNames;
|
|
187
187
|
/**
|
|
188
188
|
* ProvidersHandlers interface
|
|
189
189
|
*
|
|
@@ -7,7 +7,7 @@ import { Segment } from "../lib/providers/Segment/Segment.types";
|
|
|
7
7
|
* Triage event to each provider handler.
|
|
8
8
|
*
|
|
9
9
|
* @since 0.5.14
|
|
10
|
-
* @param {string} eventName The
|
|
10
|
+
* @param {string} eventName The Artisn event name
|
|
11
11
|
* @param {T} params The event parameters
|
|
12
12
|
* @param {ProvidersHandlers<T>} providersHandlers The providers handlers
|
|
13
13
|
*/
|