@adadapted/react-native-sdk 3.1.12 → 3.3.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/android/.project +1 -1
- package/android/.settings/org.eclipse.buildship.core.prefs +2 -2
- package/android/bin/build.gradle +6 -5
- package/android/bin/gradle.properties +4 -4
- package/android/build.gradle +6 -5
- package/android/gradle.properties +3 -3
- package/android/src/main/AndroidManifest.xml +1 -3
- package/lib/commonjs/api/adadaptedApiRequests.js.map +1 -1
- package/lib/commonjs/api/adadaptedApiRequests.mock.js +25 -8
- package/lib/commonjs/api/adadaptedApiRequests.mock.js.map +1 -1
- package/lib/commonjs/api/adadaptedApiTypes.js +72 -26
- package/lib/commonjs/api/adadaptedApiTypes.js.map +1 -1
- package/lib/commonjs/components/AdZone.js +200 -129
- package/lib/commonjs/components/AdZone.js.map +1 -1
- package/lib/commonjs/components/ReportAdButton.js +38 -0
- package/lib/commonjs/components/ReportAdButton.js.map +1 -0
- package/lib/commonjs/images/ReportIcon.png +0 -0
- package/lib/commonjs/index.js +162 -78
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/types.js +4 -0
- package/lib/commonjs/types.js.map +1 -1
- package/lib/commonjs/util.js +13 -0
- package/lib/commonjs/util.js.map +1 -1
- package/lib/module/api/adadaptedApiRequests.js.map +1 -1
- package/lib/module/api/adadaptedApiRequests.mock.js +25 -9
- package/lib/module/api/adadaptedApiRequests.mock.js.map +1 -1
- package/lib/module/api/adadaptedApiTypes.js +70 -24
- package/lib/module/api/adadaptedApiTypes.js.map +1 -1
- package/lib/module/components/AdZone.js +192 -128
- package/lib/module/components/AdZone.js.map +1 -1
- package/lib/module/components/ReportAdButton.js +30 -0
- package/lib/module/components/ReportAdButton.js.map +1 -0
- package/lib/module/images/ReportIcon.png +0 -0
- package/lib/module/index.js +162 -77
- package/lib/module/index.js.map +1 -1
- package/lib/module/types.js +1 -1
- package/lib/module/types.js.map +1 -1
- package/lib/module/util.js +14 -2
- package/lib/module/util.js.map +1 -1
- package/lib/typescript/example/index.d.ts +1 -0
- package/lib/typescript/example/index.d.ts.map +1 -0
- package/lib/typescript/example/src/App.d.ts +15 -62
- package/lib/typescript/example/src/App.d.ts.map +1 -0
- package/lib/typescript/example/src/OffScreenAdZone.d.ts +38 -0
- package/lib/typescript/example/src/OffScreenAdZone.d.ts.map +1 -0
- package/lib/typescript/example/src/StandardAdZone.d.ts +38 -0
- package/lib/typescript/example/src/StandardAdZone.d.ts.map +1 -0
- package/lib/typescript/index.d.ts +2 -0
- package/lib/typescript/index.d.ts.map +1 -0
- package/lib/typescript/jest.setup.d.ts +2 -1
- package/lib/typescript/jest.setup.d.ts.map +1 -0
- package/lib/typescript/src/api/adadaptedApiRequests.d.ts +1 -0
- package/lib/typescript/src/api/adadaptedApiRequests.d.ts.map +1 -0
- package/lib/typescript/src/api/adadaptedApiRequests.mock.d.ts +1 -0
- package/lib/typescript/src/api/adadaptedApiRequests.mock.d.ts.map +1 -0
- package/lib/typescript/src/api/adadaptedApiTypes.d.ts +9 -0
- package/lib/typescript/src/api/adadaptedApiTypes.d.ts.map +1 -0
- package/lib/typescript/src/components/AdZone.d.ts +9 -80
- package/lib/typescript/src/components/AdZone.d.ts.map +1 -0
- package/lib/typescript/src/components/ReportAdButton.d.ts +19 -0
- package/lib/typescript/src/components/ReportAdButton.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +39 -1
- package/lib/typescript/src/index.d.ts.map +1 -0
- package/lib/typescript/src/types.d.ts +3 -2
- package/lib/typescript/src/types.d.ts.map +1 -0
- package/lib/typescript/src/util.d.ts +13 -0
- package/lib/typescript/src/util.d.ts.map +1 -0
- package/package.json +155 -155
- package/src/api/adadaptedApiRequests.mock.ts +25 -9
- package/src/api/adadaptedApiTypes.ts +8 -0
- package/src/components/AdZone.tsx +222 -173
- package/src/components/ReportAdButton.tsx +46 -0
- package/src/images/ReportIcon.png +0 -0
- package/src/index.tsx +160 -56
- package/src/util.ts +13 -0
|
@@ -13,6 +13,8 @@ export declare function safeInvoke<R>(func: (() => R) | nil): R | undefined;
|
|
|
13
13
|
* See main definition above.
|
|
14
14
|
* @param func - The function to call.
|
|
15
15
|
* @param arg1 - Function argument.
|
|
16
|
+
* @returns The return value of the executed function, or undefined if
|
|
17
|
+
* the function is null/undefined
|
|
16
18
|
*/
|
|
17
19
|
export declare function safeInvoke<A1, R>(func: ((arg1: A1) => R) | nil, arg1: NoInfer<A1>): R | undefined;
|
|
18
20
|
/**
|
|
@@ -20,6 +22,8 @@ export declare function safeInvoke<A1, R>(func: ((arg1: A1) => R) | nil, arg1: N
|
|
|
20
22
|
* @param func - The function to call.
|
|
21
23
|
* @param arg1 - Function argument.
|
|
22
24
|
* @param arg2 - Function argument.
|
|
25
|
+
* @returns The return value of the executed function, or undefined if
|
|
26
|
+
* the function is null/undefined
|
|
23
27
|
*/
|
|
24
28
|
export declare function safeInvoke<A1, A2, R>(func: ((arg1: A1, arg2: A2) => R) | nil, arg1: NoInfer<A1>, arg2: NoInfer<A2>): R | undefined;
|
|
25
29
|
/**
|
|
@@ -28,6 +32,8 @@ export declare function safeInvoke<A1, A2, R>(func: ((arg1: A1, arg2: A2) => R)
|
|
|
28
32
|
* @param arg1 - Function argument.
|
|
29
33
|
* @param arg2 - Function argument.
|
|
30
34
|
* @param arg3 - Function argument.
|
|
35
|
+
* @returns The return value of the executed function, or undefined if
|
|
36
|
+
* the function is null/undefined
|
|
31
37
|
*/
|
|
32
38
|
export declare function safeInvoke<A1, A2, A3, R>(func: ((arg1: A1, arg2: A2, arg3: A3) => R) | nil, arg1: NoInfer<A1>, arg2: NoInfer<A2>, arg3: NoInfer<A3>): R | undefined;
|
|
33
39
|
/**
|
|
@@ -37,6 +43,8 @@ export declare function safeInvoke<A1, A2, A3, R>(func: ((arg1: A1, arg2: A2, ar
|
|
|
37
43
|
* @param arg2 - Function argument.
|
|
38
44
|
* @param arg3 - Function argument.
|
|
39
45
|
* @param arg4 - Function argument.
|
|
46
|
+
* @returns The return value of the executed function, or undefined if
|
|
47
|
+
* the function is null/undefined
|
|
40
48
|
*/
|
|
41
49
|
export declare function safeInvoke<A1, A2, A3, A4, R>(func: ((arg1: A1, arg2: A2, arg3: A3, arg4: A4) => R) | nil, arg1: NoInfer<A1>, arg2: NoInfer<A2>, arg3: NoInfer<A3>, arg4: NoInfer<A4>): R | undefined;
|
|
42
50
|
/**
|
|
@@ -47,6 +55,8 @@ export declare function safeInvoke<A1, A2, A3, A4, R>(func: ((arg1: A1, arg2: A2
|
|
|
47
55
|
* @param arg3 - Function argument.
|
|
48
56
|
* @param arg4 - Function argument.
|
|
49
57
|
* @param arg5 - Function argument.
|
|
58
|
+
* @returns The return value of the executed function, or undefined if
|
|
59
|
+
* the function is null/undefined
|
|
50
60
|
*/
|
|
51
61
|
export declare function safeInvoke<A1, A2, A3, A4, A5, R>(func: ((arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5) => R) | nil, arg1: NoInfer<A1>, arg2: NoInfer<A2>, arg3: NoInfer<A3>, arg4: NoInfer<A4>, arg5: NoInfer<A5>): R | undefined;
|
|
52
62
|
/**
|
|
@@ -58,5 +68,8 @@ export declare function safeInvoke<A1, A2, A3, A4, A5, R>(func: ((arg1: A1, arg2
|
|
|
58
68
|
* @param arg4 - Function argument.
|
|
59
69
|
* @param arg5 - Function argument.
|
|
60
70
|
* @param arg6 - Function argument.
|
|
71
|
+
* @returns The return value of the executed function, or undefined if
|
|
72
|
+
* the function is null/undefined
|
|
61
73
|
*/
|
|
62
74
|
export declare function safeInvoke<A1, A2, A3, A4, A5, A6, R>(func: ((arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, arg6: A6) => R) | nil, arg1: NoInfer<A1>, arg2: NoInfer<A2>, arg3: NoInfer<A3>, arg4: NoInfer<A4>, arg5: NoInfer<A5>, arg6: NoInfer<A6>): R | undefined;
|
|
75
|
+
//# sourceMappingURL=util.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
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C,CAAC,GACnE,GAAG,EACT,IAAI,EAAE,OAAO,CAAC,EAAE,CAAC,EACjB,IAAI,EAAE,OAAO,CAAC,EAAE,CAAC,EACjB,IAAI,EAAE,OAAO,CAAC,EAAE,CAAC,EACjB,IAAI,EAAE,OAAO,CAAC,EAAE,CAAC,EACjB,IAAI,EAAE,OAAO,CAAC,EAAE,CAAC,EACjB,IAAI,EAAE,OAAO,CAAC,EAAE,CAAC,GAClB,CAAC,GAAG,SAAS,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,164 +1,164 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
2
|
+
"name": "@adadapted/react-native-sdk",
|
|
3
|
+
"version": "3.3.0",
|
|
4
|
+
"description": "The AdAdapted react-native SDK.",
|
|
5
|
+
"main": "lib/commonjs/index.js",
|
|
6
|
+
"module": "lib/module/index.js",
|
|
7
|
+
"types": "lib/typescript/src/index.d.ts",
|
|
8
|
+
"react-native": "src/index.tsx",
|
|
9
|
+
"files": [
|
|
10
|
+
"src",
|
|
11
|
+
"lib",
|
|
12
|
+
"!**/__tests__",
|
|
13
|
+
"!**/__fixtures__",
|
|
14
|
+
"!**/__mocks__",
|
|
15
|
+
"android/",
|
|
16
|
+
"ios/",
|
|
17
|
+
"adadapted-react-native-sdk.podspec"
|
|
18
|
+
],
|
|
19
|
+
"scripts": {
|
|
20
|
+
"prettier-fix": "prettier --write \"*.{ts,tsx,js,jsx,json,css,scss,md}\" \"src/**/*.{ts,tsx,js,jsx,json,css,scss,md}\" \"example/**/*.{ts,tsx,js,jsx,json,css,scss,md}\"",
|
|
21
|
+
"lint": "eslint --version && eslint ./",
|
|
22
|
+
"compile": "tsc --version && tsc --project tsconfig.json --noEmit --noErrorTruncation --pretty",
|
|
23
|
+
"test-coverage": "rm -rf coverage && jest --version --clearCache && jest --coverage --clearCache",
|
|
24
|
+
"enable-git-hooks": "git config core.hooksPath .git-hooks",
|
|
25
|
+
"test": "jest --version --clearCache && jest",
|
|
26
|
+
"prettier": "prettier --list-different \"*.{ts,tsx,js,jsx,json,css,scss,md}\" \"src/**/*.{ts,tsx,js,jsx,json,css,scss,md}\"",
|
|
27
|
+
"prepack": "bob build",
|
|
28
|
+
"example-app-install-pods": "cd example/ios && pod install",
|
|
29
|
+
"npm-check-outdated": "npm outdated",
|
|
30
|
+
"check-peer-dependencies": "npx check-peer-dependencies --npm",
|
|
31
|
+
"prepare": "bob build"
|
|
32
|
+
},
|
|
33
|
+
"keywords": [
|
|
34
|
+
"react-native",
|
|
35
|
+
"ios",
|
|
36
|
+
"android",
|
|
37
|
+
"adadapted",
|
|
38
|
+
"sdk",
|
|
39
|
+
"ad",
|
|
40
|
+
"ads"
|
|
41
|
+
],
|
|
42
|
+
"repository": {
|
|
43
|
+
"type": "git",
|
|
44
|
+
"url": "https://gitlab.com/adadapted/adadapted-react-native-sdk"
|
|
45
|
+
},
|
|
46
|
+
"author": "Jeramy Usher <jusher@adadapted.com> (https://gitlab.com/adadapted/adadapted-react-native-sdk)",
|
|
47
|
+
"license": "AdAdapted Platform License",
|
|
48
|
+
"bugs": {
|
|
49
|
+
"url": "https://gitlab.com/adadapted/adadapted-react-native-sdk/issues"
|
|
50
|
+
},
|
|
51
|
+
"homepage": "https://gitlab.com/adadapted/adadapted-react-native-sdk#readme",
|
|
52
|
+
"dependencies": {
|
|
53
|
+
"@react-native-community/eslint-config": "^3.2.0",
|
|
54
|
+
"axios": "1.4.0",
|
|
55
|
+
"react-native-base64": "0.2.1",
|
|
56
|
+
"type-zoo": "3.4.1"
|
|
57
|
+
},
|
|
58
|
+
"peerDependencies": {
|
|
59
|
+
"react": "*",
|
|
60
|
+
"react-native": "*",
|
|
61
|
+
"react-native-webview": "*"
|
|
62
|
+
},
|
|
63
|
+
"devDependencies": {
|
|
64
|
+
"@babel/plugin-proposal-private-property-in-object": "^7.21.11",
|
|
65
|
+
"@babel/plugin-transform-typescript": "7.22.5",
|
|
66
|
+
"@babel/preset-env": "7.22.5",
|
|
67
|
+
"@babel/preset-react": "7.22.5",
|
|
68
|
+
"@babel/preset-typescript": "7.22.5",
|
|
69
|
+
"@types/jest": "29.5.2",
|
|
70
|
+
"@types/react": "18.2.12",
|
|
71
|
+
"@types/react-dom": "18.2.6",
|
|
72
|
+
"@types/react-native": "0.72.2",
|
|
73
|
+
"@types/react-native-base64": "0.2.0",
|
|
74
|
+
"@typescript-eslint/eslint-plugin": "^5.62.0",
|
|
75
|
+
"@typescript-eslint/parser": "5.60.0",
|
|
76
|
+
"eslint": "^8.44.0",
|
|
77
|
+
"eslint-config-standard-with-typescript": "^36.0.0",
|
|
78
|
+
"eslint-plugin-import": "^2.27.5",
|
|
79
|
+
"eslint-plugin-jest": "27.2.2",
|
|
80
|
+
"eslint-plugin-jsdoc": "46.2.6",
|
|
81
|
+
"eslint-plugin-n": "^15.7.0",
|
|
82
|
+
"eslint-plugin-prefer-arrow": "1.2.3",
|
|
83
|
+
"eslint-plugin-promise": "^6.1.1",
|
|
84
|
+
"eslint-plugin-react": "^7.32.2",
|
|
85
|
+
"eslint-plugin-react-native": "^4.0.0",
|
|
86
|
+
"jest": "29.5.0",
|
|
87
|
+
"prettier": "2.8.8",
|
|
88
|
+
"react": "18.2.0",
|
|
89
|
+
"react-native": "0.72.0",
|
|
90
|
+
"react-native-builder-bob": "^0.23.2",
|
|
91
|
+
"react-native-webview": "13.2.2",
|
|
92
|
+
"react-router-native": "6.14.0",
|
|
93
|
+
"ts-jest": "29.1.0",
|
|
94
|
+
"typescript": "^5.0.4"
|
|
95
|
+
},
|
|
96
|
+
"jest": {
|
|
97
|
+
"preset": "react-native",
|
|
98
|
+
"modulePathIgnorePatterns": [
|
|
99
|
+
"<rootDir>/example/node_modules",
|
|
100
|
+
"<rootDir>/lib/"
|
|
15
101
|
],
|
|
16
|
-
"
|
|
17
|
-
|
|
18
|
-
"lint": "eslint --version && eslint ./",
|
|
19
|
-
"compile": "tsc --version && tsc --project tsconfig.json --noEmit --noErrorTruncation --pretty",
|
|
20
|
-
"test-coverage": "rm -rf coverage && jest --version --clearCache && jest --coverage --clearCache",
|
|
21
|
-
"enable-git-hooks": "git config core.hooksPath .git-hooks",
|
|
22
|
-
"test": "jest --version --clearCache && jest",
|
|
23
|
-
"prettier": "prettier --list-different \"*.{ts,tsx,js,jsx,json,css,scss,md}\" \"src/**/*.{ts,tsx,js,jsx,json,css,scss,md}\"",
|
|
24
|
-
"prepare-build": "bob build",
|
|
25
|
-
"example-app-install-pods": "cd example/ios && pod install",
|
|
26
|
-
"npm-check-outdated": "npm outdated",
|
|
27
|
-
"check-peer-dependencies": "npx check-peer-dependencies --npm"
|
|
28
|
-
},
|
|
29
|
-
"keywords": [
|
|
30
|
-
"react-native",
|
|
31
|
-
"ios",
|
|
32
|
-
"android",
|
|
33
|
-
"adadapted",
|
|
34
|
-
"sdk",
|
|
35
|
-
"ad",
|
|
36
|
-
"ads"
|
|
102
|
+
"setupFiles": [
|
|
103
|
+
"<rootDir>/jest.setup.ts"
|
|
37
104
|
],
|
|
38
|
-
"
|
|
39
|
-
|
|
40
|
-
"url": "https://gitlab.com/adadapted/adadapted-react-native-sdk"
|
|
41
|
-
},
|
|
42
|
-
"author": "Jeramy Usher <jusher@adadapted.com> (https://gitlab.com/adadapted/adadapted-react-native-sdk)",
|
|
43
|
-
"license": "AdAdapted Platform License",
|
|
44
|
-
"bugs": {
|
|
45
|
-
"url": "https://gitlab.com/adadapted/adadapted-react-native-sdk/issues"
|
|
46
|
-
},
|
|
47
|
-
"homepage": "https://gitlab.com/adadapted/adadapted-react-native-sdk#readme",
|
|
48
|
-
"dependencies": {
|
|
49
|
-
"axios": "^0.21.1",
|
|
50
|
-
"react-native-base64": "^0.2.1",
|
|
51
|
-
"type-zoo": "^3.4.1"
|
|
52
|
-
},
|
|
53
|
-
"peerDependencies": {
|
|
54
|
-
"react": "*",
|
|
55
|
-
"react-native": "*",
|
|
56
|
-
"react-native-webview": "*"
|
|
105
|
+
"transform": {
|
|
106
|
+
"^.+\\.[j|t]sx?$": "ts-jest"
|
|
57
107
|
},
|
|
58
|
-
"
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
"enzyme-to-json": "^3.6.1",
|
|
77
|
-
"eslint": "^7.17.0",
|
|
78
|
-
"eslint-plugin-import": "^2.22.1",
|
|
79
|
-
"eslint-plugin-jest": "^24.1.3",
|
|
80
|
-
"eslint-plugin-jsdoc": "^31.0.3",
|
|
81
|
-
"eslint-plugin-prefer-arrow": "^1.2.2",
|
|
82
|
-
"eslint-plugin-react": "^7.22.0",
|
|
83
|
-
"jest": "^26.6.3",
|
|
84
|
-
"jest-enzyme": "7.1.2",
|
|
85
|
-
"prettier": "^2.2.1",
|
|
86
|
-
"react": "17.0.2",
|
|
87
|
-
"react-native": "0.65.0",
|
|
88
|
-
"react-router-native": "^5.2.0",
|
|
89
|
-
"react-native-webview": "11.23.1",
|
|
90
|
-
"ts-jest": "^26.4.4",
|
|
91
|
-
"tslint": "^6.1.3",
|
|
92
|
-
"typescript": "^4.1.3"
|
|
108
|
+
"transformIgnorePatterns": [
|
|
109
|
+
"/node_modules/(?!react-native)/.+"
|
|
110
|
+
],
|
|
111
|
+
"testRegex": "(/__tests__/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$",
|
|
112
|
+
"moduleFileExtensions": [
|
|
113
|
+
"ts",
|
|
114
|
+
"tsx",
|
|
115
|
+
"js",
|
|
116
|
+
"jsx",
|
|
117
|
+
"json"
|
|
118
|
+
],
|
|
119
|
+
"modulePaths": [
|
|
120
|
+
"<rootDir>/node_modules"
|
|
121
|
+
],
|
|
122
|
+
"moduleNameMapper": {
|
|
123
|
+
"\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "<rootDir>/__mocks__/fileMock.js",
|
|
124
|
+
"\\.(s?css)$": "<rootDir>/__mocks__/styleMock.js",
|
|
125
|
+
"^src/(.*)$": "<rootDir>/src/$1"
|
|
93
126
|
},
|
|
94
|
-
"
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
"
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
"transformIgnorePatterns": [
|
|
110
|
-
"/node_modules/(?!react-native)/.+"
|
|
111
|
-
],
|
|
112
|
-
"testRegex": "(/__tests__/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$",
|
|
113
|
-
"moduleFileExtensions": [
|
|
114
|
-
"ts",
|
|
115
|
-
"tsx",
|
|
116
|
-
"js",
|
|
117
|
-
"jsx",
|
|
118
|
-
"json"
|
|
119
|
-
],
|
|
120
|
-
"modulePaths": [
|
|
121
|
-
"<rootDir>/node_modules"
|
|
122
|
-
],
|
|
123
|
-
"moduleNameMapper": {
|
|
124
|
-
"\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "<rootDir>/__mocks__/fileMock.js",
|
|
125
|
-
"\\.(s?css)$": "<rootDir>/__mocks__/styleMock.js",
|
|
126
|
-
"^src/(.*)$": "<rootDir>/src/$1"
|
|
127
|
-
},
|
|
128
|
-
"collectCoverage": false,
|
|
129
|
-
"coverageDirectory": "coverage",
|
|
130
|
-
"collectCoverageFrom": [
|
|
131
|
-
"src/**/*.{js,jsx,ts,tsx}",
|
|
132
|
-
"!src/api/**/*.*",
|
|
133
|
-
"!src/**/*.d.ts",
|
|
134
|
-
"!src/index.tsx"
|
|
135
|
-
],
|
|
136
|
-
"coverageThreshold": {
|
|
137
|
-
"global": {
|
|
138
|
-
"branches": 5,
|
|
139
|
-
"functions": 5,
|
|
140
|
-
"lines": 5,
|
|
141
|
-
"statements": 5
|
|
142
|
-
}
|
|
143
|
-
},
|
|
144
|
-
"watchPathIgnorePatterns": [
|
|
145
|
-
"<rootDir>/jest.json"
|
|
146
|
-
],
|
|
147
|
-
"globals": {
|
|
148
|
-
"BUILD_ENV": "dev"
|
|
149
|
-
}
|
|
127
|
+
"collectCoverage": false,
|
|
128
|
+
"coverageDirectory": "coverage",
|
|
129
|
+
"collectCoverageFrom": [
|
|
130
|
+
"src/**/*.{js,jsx,ts,tsx}",
|
|
131
|
+
"!src/api/**/*.*",
|
|
132
|
+
"!src/**/*.d.ts",
|
|
133
|
+
"!src/index.tsx"
|
|
134
|
+
],
|
|
135
|
+
"coverageThreshold": {
|
|
136
|
+
"global": {
|
|
137
|
+
"branches": 5,
|
|
138
|
+
"functions": 5,
|
|
139
|
+
"lines": 5,
|
|
140
|
+
"statements": 5
|
|
141
|
+
}
|
|
150
142
|
},
|
|
151
|
-
"
|
|
152
|
-
|
|
153
|
-
"lib/"
|
|
143
|
+
"watchPathIgnorePatterns": [
|
|
144
|
+
"<rootDir>/jest.json"
|
|
154
145
|
],
|
|
155
|
-
"
|
|
156
|
-
|
|
157
|
-
"output": "lib",
|
|
158
|
-
"targets": [
|
|
159
|
-
"commonjs",
|
|
160
|
-
"module",
|
|
161
|
-
"typescript"
|
|
162
|
-
]
|
|
146
|
+
"globals": {
|
|
147
|
+
"BUILD_ENV": "dev"
|
|
163
148
|
}
|
|
149
|
+
},
|
|
150
|
+
"eslintIgnore": [
|
|
151
|
+
"node_modules/",
|
|
152
|
+
"lib/"
|
|
153
|
+
],
|
|
154
|
+
"source": "src/index.tsx",
|
|
155
|
+
"react-native-builder-bob": {
|
|
156
|
+
"source": "src",
|
|
157
|
+
"output": "lib",
|
|
158
|
+
"targets": [
|
|
159
|
+
"commonjs",
|
|
160
|
+
"module",
|
|
161
|
+
"typescript"
|
|
162
|
+
]
|
|
163
|
+
}
|
|
164
164
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Contains all API request mocks for the Rewards API.
|
|
3
3
|
*/
|
|
4
|
-
import { AxiosResponse } from "axios";
|
|
4
|
+
import { AxiosHeaders, AxiosResponse } from "axios";
|
|
5
5
|
import {
|
|
6
6
|
AdActionType,
|
|
7
7
|
AdSession,
|
|
@@ -25,7 +25,9 @@ export function initializeSession(): Promise<
|
|
|
25
25
|
resolve({
|
|
26
26
|
data: AD_SESSION_DATA,
|
|
27
27
|
then: undefined,
|
|
28
|
-
config: {
|
|
28
|
+
config: {
|
|
29
|
+
headers: new AxiosHeaders(),
|
|
30
|
+
},
|
|
29
31
|
headers: {},
|
|
30
32
|
status: 200,
|
|
31
33
|
statusText: "200",
|
|
@@ -44,7 +46,9 @@ export function refreshSessionData(): Promise<
|
|
|
44
46
|
resolve({
|
|
45
47
|
data: REFRESHED_AD_SESSION_DATA,
|
|
46
48
|
then: undefined,
|
|
47
|
-
config: {
|
|
49
|
+
config: {
|
|
50
|
+
headers: new AxiosHeaders(),
|
|
51
|
+
},
|
|
48
52
|
headers: {},
|
|
49
53
|
status: 200,
|
|
50
54
|
statusText: "200",
|
|
@@ -63,7 +67,9 @@ export function reportAdEvent(): Promise<AxiosResponse<ReportAdEventResponse>> {
|
|
|
63
67
|
results: ["Ok"],
|
|
64
68
|
},
|
|
65
69
|
then: undefined,
|
|
66
|
-
config: {
|
|
70
|
+
config: {
|
|
71
|
+
headers: new AxiosHeaders(),
|
|
72
|
+
},
|
|
67
73
|
headers: {},
|
|
68
74
|
status: 200,
|
|
69
75
|
statusText: "200",
|
|
@@ -82,7 +88,9 @@ export function getKeywordIntercepts(): Promise<
|
|
|
82
88
|
resolve({
|
|
83
89
|
data: KEYWORD_INTERCEPT_DATA,
|
|
84
90
|
then: undefined,
|
|
85
|
-
config: {
|
|
91
|
+
config: {
|
|
92
|
+
headers: new AxiosHeaders(),
|
|
93
|
+
},
|
|
86
94
|
headers: {},
|
|
87
95
|
status: 200,
|
|
88
96
|
statusText: "200",
|
|
@@ -104,7 +112,9 @@ export function reportInterceptEvent(): Promise<
|
|
|
104
112
|
results: ["Ok"],
|
|
105
113
|
},
|
|
106
114
|
then: undefined,
|
|
107
|
-
config: {
|
|
115
|
+
config: {
|
|
116
|
+
headers: new AxiosHeaders(),
|
|
117
|
+
},
|
|
108
118
|
headers: {},
|
|
109
119
|
status: 200,
|
|
110
120
|
statusText: "200",
|
|
@@ -122,7 +132,9 @@ export function reportListManagerEvents(): Promise<AxiosResponse<void>> {
|
|
|
122
132
|
resolve({
|
|
123
133
|
data: undefined,
|
|
124
134
|
then: undefined,
|
|
125
|
-
config: {
|
|
135
|
+
config: {
|
|
136
|
+
headers: new AxiosHeaders(),
|
|
137
|
+
},
|
|
126
138
|
headers: {},
|
|
127
139
|
status: 200,
|
|
128
140
|
statusText: "200",
|
|
@@ -139,7 +151,9 @@ export function reportPayloadContentStatus(): Promise<AxiosResponse<void>> {
|
|
|
139
151
|
resolve({
|
|
140
152
|
data: undefined,
|
|
141
153
|
then: undefined,
|
|
142
|
-
config: {
|
|
154
|
+
config: {
|
|
155
|
+
headers: new AxiosHeaders(),
|
|
156
|
+
},
|
|
143
157
|
headers: {},
|
|
144
158
|
status: 200,
|
|
145
159
|
statusText: "200",
|
|
@@ -176,7 +190,9 @@ export function retrievePayloadContent(): Promise<
|
|
|
176
190
|
],
|
|
177
191
|
},
|
|
178
192
|
then: undefined,
|
|
179
|
-
config: {
|
|
193
|
+
config: {
|
|
194
|
+
headers: new AxiosHeaders(),
|
|
195
|
+
},
|
|
180
196
|
headers: {},
|
|
181
197
|
status: 200,
|
|
182
198
|
statusText: "200",
|
|
@@ -106,6 +106,10 @@ export interface Ad {
|
|
|
106
106
|
* ?
|
|
107
107
|
*/
|
|
108
108
|
payload: AdPayload;
|
|
109
|
+
/**
|
|
110
|
+
* Track impression status.
|
|
111
|
+
*/
|
|
112
|
+
impression_tracked?: boolean;
|
|
109
113
|
}
|
|
110
114
|
|
|
111
115
|
/**
|
|
@@ -406,6 +410,10 @@ export enum ReportedEventType {
|
|
|
406
410
|
* Occurs when an ad is displayed to the user.
|
|
407
411
|
*/
|
|
408
412
|
IMPRESSION = "impression",
|
|
413
|
+
/**
|
|
414
|
+
* Occurs when an ad is not viewable before timimg out.
|
|
415
|
+
*/
|
|
416
|
+
INVISIBLE_IMPRESSION = "invisible_impression",
|
|
409
417
|
/**
|
|
410
418
|
* Occurs when the user interacts with an ad.
|
|
411
419
|
*/
|