@artisan-commerce/analytics-rn 0.1.1-canary.0

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 ADDED
@@ -0,0 +1,8 @@
1
+ # Change Log
2
+
3
+ All notable changes to this project will be documented in this file.
4
+ See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
+
6
+ ### 0.1.1-canary.0 (2021-04-12)
7
+
8
+ **Note:** Version bump only for package @artisan-commerce/analytics-rn
package/README.md ADDED
@@ -0,0 +1 @@
1
+ ## Artisan commerce analytics react native
@@ -0,0 +1,2 @@
1
+ declare const CONSTANTS: {};
2
+ export default CONSTANTS;
@@ -0,0 +1,2 @@
1
+ export { initAnalytics } from "./lib/initAnalytics/initAnalytics";
2
+ export * from "./lib/initAnalytics/initAnalytics.types";
@@ -0,0 +1 @@
1
+ export declare const initAnalytics: () => void;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,17 @@
1
+ import { Vendor } from "@artisan-commerce/types";
2
+ import { AnalyticsMeta } from "../../types/common.types";
3
+ export interface InitAnalyticsConfig {
4
+ providers: any[];
5
+ activeVendor?: Vendor["id"];
6
+ vendors: Vendor["id"][];
7
+ debug?: boolean;
8
+ shareArtisanAnalytics?: boolean;
9
+ meta: InitAnalyticsConfigMeta;
10
+ }
11
+ export interface InitAnalyticsConfigMeta extends Omit<AnalyticsMeta, "vendorId" | "versionSDK" | "platform" | "vendorName" | "storeId" | "storeName" | "catalogueId" | "catalogueName"> {
12
+ vendorName?: AnalyticsMeta["vendorName"] | undefined;
13
+ storeId?: AnalyticsMeta["storeId"] | undefined;
14
+ storeName?: AnalyticsMeta["storeName"] | undefined;
15
+ catalogueId?: AnalyticsMeta["catalogueId"] | undefined;
16
+ catalogueName?: AnalyticsMeta["catalogueName"] | undefined;
17
+ }
@@ -0,0 +1 @@
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("analytics-rn",[],t):"object"==typeof exports?exports["analytics-rn"]=t():e["analytics-rn"]=t()}(this,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.initAnalytics=void 0;var i=n(1);Object.defineProperty(t,"initAnalytics",{enumerable:!0,get:function(){return i.initAnalytics}}),o(n(2),t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.initAnalytics=void 0;t.initAnalytics=()=>{console.log("init analytics")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})}])}));
@@ -0,0 +1 @@
1
+ [{"label":"main.bundle.js","isAsset":true,"statSize":1250,"parsedSize":1954,"gzipSize":710,"groups":[{"label":"src","path":"./src","statSize":1250,"groups":[{"id":0,"label":"index.ts","path":"./src/index.ts","statSize":920,"parsedSize":547,"gzipSize":300},{"label":"lib/initAnalytics","path":"./src/lib/initAnalytics","statSize":330,"groups":[{"id":1,"label":"initAnalytics.ts","path":"./src/lib/initAnalytics/initAnalytics.ts","statSize":251,"parsedSize":153,"gzipSize":141},{"id":2,"label":"initAnalytics.types.ts","path":"./src/lib/initAnalytics/initAnalytics.types.ts","statSize":79,"parsedSize":78,"gzipSize":97}],"parsedSize":231,"gzipSize":147}],"parsedSize":778,"gzipSize":332}]}]
@@ -0,0 +1,52 @@
1
+ import { Account, ArtisanPlatform, Channel } from "@artisan-commerce/types";
2
+ import { Store, Vendor } from "@artisan-commerce/types";
3
+ /**
4
+ * Analytics providers configurable options.
5
+ *
6
+ * @typedef ArtisanPlatform
7
+ * @since 0.5.14
8
+ */
9
+ /**
10
+ * Analytics event metadata to be included in every sent event.
11
+ *
12
+ * @interface ArtisanPlatform
13
+ * @since 0.5.14
14
+ * @property {number} accountId the id of the account it is running on
15
+ * @property {number} vendorId the id of the active vendor
16
+ * @property {string} vendorName the name of the active vendor
17
+ * @property {number} storeId the id of the active store
18
+ * @property {string} storeName the name of the active store
19
+ * @property {number} catalogueId the id of the active catalogue
20
+ * @property {string} catalogueName the name of the active catalogue
21
+ * @property {string} versionSDK the Analytics SDK version
22
+ * @property {string} versionApp the running on app version
23
+ * @property {string} appName the name of the app
24
+ * @property {ArtisanPlatform} platform the type of platform it is running on
25
+ */
26
+ export interface AnalyticsMeta {
27
+ accountId: Account["accountId"];
28
+ vendorId: Vendor["id"];
29
+ vendorName: Vendor["name"];
30
+ storeId: Store["storeId"];
31
+ storeName: Store["storeName"];
32
+ catalogueId: Channel["id"];
33
+ catalogueName: Channel["name"];
34
+ versionSDK: string;
35
+ versionApp: string;
36
+ appName: string;
37
+ platform: ArtisanPlatform;
38
+ }
39
+ /**
40
+ * Analytics supported providers.
41
+ *
42
+ * @typedef ArtisanPlatform
43
+ * @since 0.5.14
44
+ */
45
+ export declare type SupportedProviders = "GOOGLE_ANALYTICS" | "FACEBOOK_PIXEL";
46
+ /**
47
+ * Supported auth providers methods.
48
+ *
49
+ * @typedef AuthProviderMethods
50
+ * @since 0.5.14
51
+ */
52
+ export declare type AuthProviderMethods = "Google" | "Facebook" | "Apple" | "Email and Password" | "Phone";
package/package.json ADDED
@@ -0,0 +1,86 @@
1
+ {
2
+ "name": "@artisan-commerce/analytics-rn",
3
+ "description": "Artisan commerce analytics react native library",
4
+ "version": "0.1.1-canary.0",
5
+ "main": "./build/main.bundle.js",
6
+ "types": "./build/index.d.ts",
7
+ "files": [
8
+ "build/",
9
+ "LICENSE",
10
+ "README.md"
11
+ ],
12
+ "scripts": {
13
+ "start": "webpack --config webpack.dev.js",
14
+ "dev": "webpack --watch --config webpack.dev.js",
15
+ "build": "webpack --config webpack.prod.js",
16
+ "start:build": "nodemon ./build/main.bundle.js",
17
+ "test": "jest --watchAll --runInBand --passWithNoTests",
18
+ "test:all": "yarn test -- --watchAll=false --coverage",
19
+ "test:ci": "cross-env CI=true jest --runInBand --passWithNoTests",
20
+ "test:staged": "yarn test:ci --findRelatedTests ./src",
21
+ "check-types": "tsc --noEmit",
22
+ "lint": "eslint --ignore-path .gitignore --ignore-pattern !cypress/.eslintrc.js --ext .js,jsx,.ts,.tsx .",
23
+ "lint:staged": "yarn lint --max-warnings=0",
24
+ "prettier": "prettier --ignore-path .gitignore \"**/*.+(js|jsx|ts|tsx|json|css|scss|html)\"",
25
+ "format": "yarn prettier -- --write",
26
+ "check-format": "yarn prettier -- --list-different",
27
+ "validate": "cross-env CI=true npm-run-all --parallel test:ci check-types check-format lint build",
28
+ "validate:ci": "npm-run-all --parallel check-types check-format lint",
29
+ "prepare": "yarn build"
30
+ },
31
+ "author": "Luis Eduardo Andrade",
32
+ "license": "MIT",
33
+ "devDependencies": {
34
+ "@artisan-commerce/types": "0.13.0-canary.4",
35
+ "@babel/core": "^7.10.5",
36
+ "@babel/preset-env": "^7.10.4",
37
+ "@babel/preset-react": "^7.10.4",
38
+ "@types/faker": "^4.1.12",
39
+ "@types/jest": "^26.0.5",
40
+ "@types/jest-in-case": "^1.0.2",
41
+ "@types/node": "^14.0.24",
42
+ "@typescript-eslint/eslint-plugin": "^4.15.2",
43
+ "@typescript-eslint/parser": "^4.15.2",
44
+ "avn": "^0.2.4",
45
+ "avn-nvm": "^0.2.2",
46
+ "clean-webpack-plugin": "^3.0.0",
47
+ "cross-env": "^7.0.2",
48
+ "dotenv-webpack": "^2.0.0",
49
+ "env-cmd": "^10.1.0",
50
+ "eslint": "^7.5.0",
51
+ "eslint-config-prettier": "^6.11.0",
52
+ "eslint-config-react-app": "^5.2.1",
53
+ "eslint-config-universe": "^4.0.0",
54
+ "eslint-plugin-cypress": "^2.11.1",
55
+ "eslint-plugin-flowtype": "^5.2.0",
56
+ "eslint-plugin-import": "^2.22.0",
57
+ "eslint-plugin-jsx-a11y": "^6.3.1",
58
+ "eslint-plugin-react": "^7.20.3",
59
+ "eslint-plugin-react-hooks": "^4.0.8",
60
+ "expo-firebase-analytics": "^3.0.0",
61
+ "is-ci-cli": "^2.1.2",
62
+ "jest-axe": "^3.5.0",
63
+ "jest-in-case": "^1.0.2",
64
+ "jest-styled-components": "^7.0.2",
65
+ "nodemon": "^2.0.4",
66
+ "npm-run-all": "^4.1.5",
67
+ "prettier": "^2.0.5",
68
+ "react": "16.13.1",
69
+ "react-native": "0.63.2",
70
+ "start-server-and-test": "^1.11.2",
71
+ "test-data-bot": "^0.8.0",
72
+ "ts-jest": "^26.1.4",
73
+ "ts-loader": "^8.0.2",
74
+ "webpack": "^4.43.0",
75
+ "webpack-bundle-analyzer": "^4.4.0",
76
+ "webpack-cli": "^3.3.12",
77
+ "webpack-dev-server": "^3.11.0",
78
+ "webpack-merge": "^5.0.9",
79
+ "webpack-node-externals": "^2.5.2"
80
+ },
81
+ "peerDependencies": {
82
+ "expo-firebase-analytics": ">= 3.0.0",
83
+ "react": ">= 16.8.6"
84
+ },
85
+ "gitHead": "66cb171b845062f897bffa0833b6c54b55c62c98"
86
+ }