@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
package/android/.project
CHANGED
|
@@ -2,10 +2,10 @@ arguments=--init-script /var/folders/vw/1yz06gyj201f5y15zm_xv9gr0000gn/T/d146c97
|
|
|
2
2
|
auto.sync=false
|
|
3
3
|
build.scans.enabled=false
|
|
4
4
|
connection.gradle.distribution=GRADLE_DISTRIBUTION(VERSION(7.4.2))
|
|
5
|
-
connection.project.dir
|
|
5
|
+
connection.project.dir=../example/android
|
|
6
6
|
eclipse.preferences.version=1
|
|
7
7
|
gradle.user.home=
|
|
8
|
-
java.home=/Library/Java/JavaVirtualMachines/
|
|
8
|
+
java.home=/Library/Java/JavaVirtualMachines/zulu-11.jdk/Contents/Home
|
|
9
9
|
jvm.arguments=
|
|
10
10
|
offline.mode=false
|
|
11
11
|
override.workspace.settings=true
|
package/android/bin/build.gradle
CHANGED
|
@@ -4,13 +4,14 @@ buildscript {
|
|
|
4
4
|
|
|
5
5
|
repositories {
|
|
6
6
|
google()
|
|
7
|
-
|
|
7
|
+
mavenCentral()
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
dependencies {
|
|
11
|
-
classpath 'com.android.tools.build:gradle:3.
|
|
11
|
+
classpath 'com.android.tools.build:gradle:7.3.1'
|
|
12
12
|
// noinspection DifferentKotlinGradleVersion
|
|
13
13
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
|
14
|
+
classpath("com.facebook.react:react-native-gradle-plugin")
|
|
14
15
|
}
|
|
15
16
|
}
|
|
16
17
|
|
|
@@ -26,10 +27,11 @@ def getExtOrIntegerDefault(name) {
|
|
|
26
27
|
}
|
|
27
28
|
|
|
28
29
|
android {
|
|
30
|
+
namespace "com.adadapted.adadaptedreactnativesdk"
|
|
29
31
|
compileSdkVersion getExtOrIntegerDefault('compileSdkVersion')
|
|
30
32
|
buildToolsVersion getExtOrDefault('buildToolsVersion')
|
|
31
33
|
defaultConfig {
|
|
32
|
-
minSdkVersion
|
|
34
|
+
minSdkVersion 28
|
|
33
35
|
targetSdkVersion getExtOrIntegerDefault('targetSdkVersion')
|
|
34
36
|
versionCode 1
|
|
35
37
|
versionName "1.0"
|
|
@@ -50,7 +52,6 @@ android {
|
|
|
50
52
|
|
|
51
53
|
repositories {
|
|
52
54
|
mavenCentral()
|
|
53
|
-
jcenter()
|
|
54
55
|
google()
|
|
55
56
|
|
|
56
57
|
def found = false
|
|
@@ -112,7 +113,7 @@ repositories {
|
|
|
112
113
|
}
|
|
113
114
|
|
|
114
115
|
if (!found) {
|
|
115
|
-
throw new
|
|
116
|
+
throw new FileNotFoundException(
|
|
116
117
|
"${project.name}: unable to locate React Native android sources. " +
|
|
117
118
|
"Ensure you have you installed React Native as a dependency in your project and try again."
|
|
118
119
|
)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
AdadaptedReactNativeSdk_kotlinVersion=1.
|
|
2
|
-
AdadaptedReactNativeSdk_compileSdkVersion=
|
|
3
|
-
AdadaptedReactNativeSdk_buildToolsVersion=
|
|
4
|
-
AdadaptedReactNativeSdk_targetSdkVersion=
|
|
1
|
+
AdadaptedReactNativeSdk_kotlinVersion=1.8.0
|
|
2
|
+
AdadaptedReactNativeSdk_compileSdkVersion=33
|
|
3
|
+
AdadaptedReactNativeSdk_buildToolsVersion=33.0.2
|
|
4
|
+
AdadaptedReactNativeSdk_targetSdkVersion=33
|
package/android/build.gradle
CHANGED
|
@@ -4,13 +4,14 @@ buildscript {
|
|
|
4
4
|
|
|
5
5
|
repositories {
|
|
6
6
|
google()
|
|
7
|
-
|
|
7
|
+
mavenCentral()
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
dependencies {
|
|
11
|
-
classpath 'com.android.tools.build:gradle:3.
|
|
11
|
+
classpath 'com.android.tools.build:gradle:7.3.1'
|
|
12
12
|
// noinspection DifferentKotlinGradleVersion
|
|
13
13
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
|
14
|
+
classpath("com.facebook.react:react-native-gradle-plugin")
|
|
14
15
|
}
|
|
15
16
|
}
|
|
16
17
|
|
|
@@ -26,10 +27,11 @@ def getExtOrIntegerDefault(name) {
|
|
|
26
27
|
}
|
|
27
28
|
|
|
28
29
|
android {
|
|
30
|
+
namespace "com.adadapted.adadaptedreactnativesdk"
|
|
29
31
|
compileSdkVersion getExtOrIntegerDefault('compileSdkVersion')
|
|
30
32
|
buildToolsVersion getExtOrDefault('buildToolsVersion')
|
|
31
33
|
defaultConfig {
|
|
32
|
-
minSdkVersion
|
|
34
|
+
minSdkVersion 28
|
|
33
35
|
targetSdkVersion getExtOrIntegerDefault('targetSdkVersion')
|
|
34
36
|
versionCode 1
|
|
35
37
|
versionName "1.0"
|
|
@@ -50,7 +52,6 @@ android {
|
|
|
50
52
|
|
|
51
53
|
repositories {
|
|
52
54
|
mavenCentral()
|
|
53
|
-
jcenter()
|
|
54
55
|
google()
|
|
55
56
|
|
|
56
57
|
def found = false
|
|
@@ -112,7 +113,7 @@ repositories {
|
|
|
112
113
|
}
|
|
113
114
|
|
|
114
115
|
if (!found) {
|
|
115
|
-
throw new
|
|
116
|
+
throw new FileNotFoundException(
|
|
116
117
|
"${project.name}: unable to locate React Native android sources. " +
|
|
117
118
|
"Ensure you have you installed React Native as a dependency in your project and try again."
|
|
118
119
|
)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
AdadaptedReactNativeSdk_kotlinVersion=1.
|
|
2
|
-
AdadaptedReactNativeSdk_compileSdkVersion=
|
|
1
|
+
AdadaptedReactNativeSdk_kotlinVersion=1.8.0
|
|
2
|
+
AdadaptedReactNativeSdk_compileSdkVersion=33
|
|
3
3
|
AdadaptedReactNativeSdk_buildToolsVersion=28.0.3
|
|
4
|
-
AdadaptedReactNativeSdk_targetSdkVersion=
|
|
4
|
+
AdadaptedReactNativeSdk_targetSdkVersion=33
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["initializeSession","requestData","deviceOS","apiEnv","ApiEnv","Mock","adadaptedApiRequestMocks","axios","method","data","headers","accept","refreshSessionData","aid","sid","uid","reportAdEvent","getKeywordIntercepts","reportInterceptEvent","reportListManagerEvents","ListManagerApiEnv","reportPayloadContentStatus","PayloadApiEnv","retrievePayloadContent"],"sources":["adadaptedApiRequests.ts"],"sourcesContent":["/**\n * API requests focused around Settings.\n */\nimport {\n InitializeSessionRequest,\n InitializeSessionResponse,\n KeywordInterceptsRequest,\n KeywordInterceptsResponse,\n RefreshSessionDataRequest,\n RefreshSessionDataResponse,\n ReportAdEventRequest,\n ReportAdEventResponse,\n ReportInterceptEventRequest,\n ReportInterceptEventResponse,\n ReportListManagerDataRequest,\n ReportPayloadDataRequest,\n RetrievePayloadItemDataRequest,\n RetrievePayloadItemDataResponse,\n} from \"./adadaptedApiTypes\";\nimport axios, { AxiosResponse } from \"axios\";\nimport * as adadaptedApiRequestMocks from \"./adadaptedApiRequests.mock\";\nimport { ApiEnv, DeviceOS, ListManagerApiEnv, PayloadApiEnv } from \"../index\";\n\n/**\n * Makes an API request to initialize the session for the AdAdapted API.\n * @param requestData - The data to be sent with the request.\n * @param deviceOS - The operating system being ran on the device.\n * @param apiEnv - The API environment to use when making the API request.\n * @returns a promise containing the response data.\n */\nexport function initializeSession(\n requestData: InitializeSessionRequest,\n deviceOS: DeviceOS,\n apiEnv: ApiEnv\n): Promise<AxiosResponse<InitializeSessionResponse>> {\n return apiEnv === ApiEnv.Mock\n ? adadaptedApiRequestMocks.initializeSession()\n : axios(`${apiEnv}/v/0.9.5/${deviceOS}/sessions/initialize`, {\n method: \"POST\",\n data: requestData,\n headers: {\n accept: \"application/json\",\n },\n });\n}\n\n/**\n * Makes an API request to refresh the session data.\n * A valid session is required for this API endpoint to respond successfully.\n * @param requestData - The data to be sent with the request.\n * @param deviceOS - The operating system being ran on the device.\n * @param apiEnv - The API environment to use when making the API request.\n * @returns a promise containing the response data.\n */\nexport function refreshSessionData(\n requestData: RefreshSessionDataRequest,\n deviceOS: DeviceOS,\n apiEnv: ApiEnv\n): Promise<AxiosResponse<RefreshSessionDataResponse>> {\n return apiEnv === ApiEnv.Mock\n ? adadaptedApiRequestMocks.refreshSessionData()\n : axios(\n `${apiEnv}/v/0.9.5/${deviceOS}/ads/retrieve?aid=${requestData.aid}&sid=${requestData.sid}&uid=${requestData.uid}`,\n {\n method: \"GET\",\n headers: {\n accept: \"application/json\",\n },\n }\n );\n}\n\n/**\n * Makes an API request to report an ad event that has occurred.\n * A valid session is required for this API endpoint to respond successfully.\n * @param requestData - The data to be sent with the request.\n * @param deviceOS - The operating system being ran on the device.\n * @param apiEnv - The API environment to use when making the API request.\n * @returns a promise containing the response data.\n */\nexport function reportAdEvent(\n requestData: ReportAdEventRequest,\n deviceOS: DeviceOS,\n apiEnv: ApiEnv\n): Promise<AxiosResponse<ReportAdEventResponse>> {\n return apiEnv === ApiEnv.Mock\n ? adadaptedApiRequestMocks.reportAdEvent()\n : axios(`${apiEnv}/v/0.9.5/${deviceOS}/ads/events`, {\n method: \"POST\",\n data: requestData,\n headers: {\n accept: \"application/json\",\n },\n });\n}\n\n/**\n * Makes an API request to get all possible keyword intercepts for the session.\n * A valid session is required for this API endpoint to respond successfully.\n * @param requestData - The data to be sent with the request.\n * @param deviceOS - The operating system being ran on the device.\n * @param apiEnv - The API environment to use when making the API request.\n * @returns a promise containing the response data.\n */\nexport function getKeywordIntercepts(\n requestData: KeywordInterceptsRequest,\n deviceOS: DeviceOS,\n apiEnv: ApiEnv\n): Promise<AxiosResponse<KeywordInterceptsResponse>> {\n return apiEnv === ApiEnv.Mock\n ? adadaptedApiRequestMocks.getKeywordIntercepts()\n : axios(\n `${apiEnv}/v/0.9.5/${deviceOS}/intercepts/retrieve?aid=${requestData.aid}&sid=${requestData.sid}&uid=${requestData.uid}`,\n {\n method: \"GET\",\n headers: {\n accept: \"application/json\",\n },\n }\n );\n}\n\n/**\n * Makes an API request to report an intercept event that has occurred.\n * A valid session is required for this API endpoint to respond successfully.\n * @param requestData - The data to be sent with the request.\n * @param deviceOS - The operating system being ran on the device.\n * @param apiEnv - The API environment to use when making the API request.\n * @returns a promise containing the response data.\n */\nexport function reportInterceptEvent(\n requestData: ReportInterceptEventRequest,\n deviceOS: DeviceOS,\n apiEnv: ApiEnv\n): Promise<AxiosResponse<ReportInterceptEventResponse>> {\n return apiEnv === ApiEnv.Mock\n ? adadaptedApiRequestMocks.reportInterceptEvent()\n : axios(`${apiEnv}/v/0.9.5/${deviceOS}/intercepts/events`, {\n method: \"POST\",\n data: requestData,\n headers: {\n accept: \"application/json\",\n },\n });\n}\n\n/**\n * Makes an API request to report List Manager events.\n * A valid session is required for this API endpoint to respond successfully.\n * @param requestData - The data to be sent with the request.\n * @param deviceOS - The operating system being ran on the device.\n * @param apiEnv - The API environment to use when making the API request.\n * @returns a promise containing the response data.\n */\nexport function reportListManagerEvents(\n requestData: ReportListManagerDataRequest,\n deviceOS: DeviceOS,\n apiEnv: ListManagerApiEnv\n): Promise<AxiosResponse<void>> {\n return apiEnv === ListManagerApiEnv.Mock\n ? adadaptedApiRequestMocks.reportListManagerEvents()\n : axios(`${apiEnv}/v/1/${deviceOS}/events`, {\n method: \"POST\",\n data: requestData,\n headers: {\n accept: \"application/json\",\n },\n });\n}\n\n/**\n * Makes an API request to report the results of the\n * \"out of app\" add to list payload received.\n * A valid session is required for this API endpoint to respond successfully.\n * @param requestData - The data to be sent with the request.\n * @param apiEnv - The API environment to use when making the API request.\n * @returns a promise containing the response data.\n */\nexport function reportPayloadContentStatus(\n requestData: ReportPayloadDataRequest,\n apiEnv: PayloadApiEnv\n): Promise<AxiosResponse<void>> {\n return apiEnv === PayloadApiEnv.Mock\n ? adadaptedApiRequestMocks.reportPayloadContentStatus()\n : axios(`${apiEnv}/v/1/tracking`, {\n method: \"POST\",\n data: requestData,\n headers: {\n accept: \"application/json\",\n },\n });\n}\n\n/**\n * Makes an API request to get all outstanding add to list payloads for a given user.\n * A valid session is required for this API endpoint to respond successfully.\n * @param requestData - The data to be sent with the request.\n * @param apiEnv - The API environment to use when making the API request.\n * @returns a promise containing the response data.\n */\nexport function retrievePayloadContent(\n requestData: RetrievePayloadItemDataRequest,\n apiEnv: PayloadApiEnv\n): Promise<AxiosResponse<RetrievePayloadItemDataResponse>> {\n return apiEnv === PayloadApiEnv.Mock\n ? adadaptedApiRequestMocks.retrievePayloadContent()\n : axios(`${apiEnv}/v/1/pickup`, {\n method: \"POST\",\n data: requestData,\n headers: {\n accept: \"application/json\",\n },\n });\n}\n"],"mappings":";;;;;;;;;;;;;AAmBA;AACA;AACA;AAA8E;AAAA;AAAA;AArB9E;AACA;AACA;;AAqBA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASA,iBAAiB,CAC7BC,WAAqC,EACrCC,QAAkB,EAClBC,MAAc,EACmC;EACjD,OAAOA,MAAM,KAAKC,aAAM,CAACC,IAAI,GACvBC,wBAAwB,CAACN,iBAAiB,EAAE,GAC5C,IAAAO,cAAK,EAAE,GAAEJ,MAAO,YAAWD,QAAS,sBAAqB,EAAE;IACvDM,MAAM,EAAE,MAAM;IACdC,IAAI,EAAER,WAAW;IACjBS,OAAO,EAAE;MACLC,MAAM,EAAE;IACZ;EACJ,CAAC,CAAC;AACZ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASC,kBAAkB,CAC9BX,WAAsC,EACtCC,QAAkB,EAClBC,MAAc,EACoC;EAClD,OAAOA,MAAM,KAAKC,aAAM,CAACC,IAAI,GACvBC,wBAAwB,CAACM,kBAAkB,EAAE,GAC7C,IAAAL,cAAK,EACA,GAAEJ,MAAO,YAAWD,QAAS,qBAAoBD,WAAW,CAACY,GAAI,QAAOZ,WAAW,CAACa,GAAI,QAAOb,WAAW,CAACc,GAAI,EAAC,EACjH;IACIP,MAAM,EAAE,KAAK;IACbE,OAAO,EAAE;MACLC,MAAM,EAAE;IACZ;EACJ,CAAC,CACJ;AACX;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASK,aAAa,CACzBf,WAAiC,EACjCC,QAAkB,EAClBC,MAAc,EAC+B;E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,CAACa,uBAAuB,EAAE,GAClD,IAAAZ,cAAK,EAAE,GAAEJ,MAAO,QAAOD,QAAS,SAAQ,EAAE;IACtCM,MAAM,EAAE,MAAM;IACdC,IAAI,EAAER,WAAW;IACjBS,OAAO,EAAE;MACLC,MAAM,EAAE;IACZ;EACJ,CAAC,CAAC;AACZ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASU,0BAA0B,CACtCpB,WAAqC,EACrCE,MAAqB,EACO;EAC5B,OAAOA,MAAM,KAAKmB,oBAAa,CAACjB,IAAI,GAC9BC,wBAAwB,CAACe,0BAA0B,EAAE,GACrD,IAAAd,cAAK,EAAE,GAAEJ,MAAO,eAAc,EAAE;IAC5BK,MAAM,EAAE,MAAM;IACdC,IAAI,EAAER,WAAW;IACjBS,OAAO,EAAE;MACLC,MAAM,EAAE;IACZ;EACJ,CAAC,CAAC;AACZ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASY,sBAAsB,CAClCtB,WAA2C,EAC3CE,MAAqB,EACkC;EACvD,OAAOA,MAAM,KAAKmB,oBAAa,CAACjB,IAAI,GAC9BC,wBAAwB,CAACiB,sBAAsB,EAAE,GACjD,IAAAhB,cAAK,EAAE,GAAEJ,MAAO,aAAY,EAAE;IAC1BK,MAAM,EAAE,MAAM;IACdC,IAAI,EAAER,WAAW;IACjBS,OAAO,EAAE;MACLC,MAAM,EAAE;IACZ;EACJ,CAAC,CAAC;AACZ"}
|
|
1
|
+
{"version":3,"names":["_axios","_interopRequireDefault","require","adadaptedApiRequestMocks","_interopRequireWildcard","_index","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","initializeSession","requestData","deviceOS","apiEnv","ApiEnv","Mock","axios","method","data","headers","accept","refreshSessionData","aid","sid","uid","reportAdEvent","getKeywordIntercepts","reportInterceptEvent","reportListManagerEvents","ListManagerApiEnv","reportPayloadContentStatus","PayloadApiEnv","retrievePayloadContent"],"sourceRoot":"../../../src","sources":["api/adadaptedApiRequests.ts"],"mappings":";;;;;;;;;;;;;AAmBA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,wBAAA,GAAAC,uBAAA,CAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AAA8E,SAAAI,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAH,wBAAAO,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAAAI,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,oBAAAA,GAAA,wBAAAA,GAAA,4BAAAE,OAAA,EAAAF,GAAA,UAAAG,KAAA,GAAAR,wBAAA,CAAAC,WAAA,OAAAO,KAAA,IAAAA,KAAA,CAAAC,GAAA,CAAAJ,GAAA,YAAAG,KAAA,CAAAE,GAAA,CAAAL,GAAA,SAAAM,MAAA,WAAAC,qBAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,GAAA,IAAAX,GAAA,QAAAW,GAAA,kBAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAd,GAAA,EAAAW,GAAA,SAAAI,IAAA,GAAAR,qBAAA,GAAAC,MAAA,CAAAE,wBAAA,CAAAV,GAAA,EAAAW,GAAA,cAAAI,IAAA,KAAAA,IAAA,CAAAV,GAAA,IAAAU,IAAA,CAAAC,GAAA,KAAAR,MAAA,CAAAC,cAAA,CAAAH,MAAA,EAAAK,GAAA,EAAAI,IAAA,YAAAT,MAAA,CAAAK,GAAA,IAAAX,GAAA,CAAAW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AC,CAAC,GAClD,IAAAZ,cAAK,EAAE,GAAEH,MAAO,QAAOD,QAAS,SAAQ,EAAE;IACtCK,MAAM,EAAE,MAAM;IACdC,IAAI,EAAEP,WAAW;IACjBQ,OAAO,EAAE;MACLC,MAAM,EAAE;IACZ;EACJ,CAAC,CAAC;AACZ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASU,0BAA0BA,CACtCnB,WAAqC,EACrCE,MAAqB,EACO;EAC5B,OAAOA,MAAM,KAAKkB,oBAAa,CAAChB,IAAI,GAC9B9B,wBAAwB,CAAC6C,0BAA0B,CAAC,CAAC,GACrD,IAAAd,cAAK,EAAE,GAAEH,MAAO,eAAc,EAAE;IAC5BI,MAAM,EAAE,MAAM;IACdC,IAAI,EAAEP,WAAW;IACjBQ,OAAO,EAAE;MACLC,MAAM,EAAE;IACZ;EACJ,CAAC,CAAC;AACZ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASY,sBAAsBA,CAClCrB,WAA2C,EAC3CE,MAAqB,EACkC;EACvD,OAAOA,MAAM,KAAKkB,oBAAa,CAAChB,IAAI,GAC9B9B,wBAAwB,CAAC+C,sBAAsB,CAAC,CAAC,GACjD,IAAAhB,cAAK,EAAE,GAAEH,MAAO,aAAY,EAAE;IAC1BI,MAAM,EAAE,MAAM;IACdC,IAAI,EAAEP,WAAW;IACjBQ,OAAO,EAAE;MACLC,MAAM,EAAE;IACZ;EACJ,CAAC,CAAC;AACZ"}
|
|
@@ -11,6 +11,7 @@ exports.reportInterceptEvent = reportInterceptEvent;
|
|
|
11
11
|
exports.reportListManagerEvents = reportListManagerEvents;
|
|
12
12
|
exports.reportPayloadContentStatus = reportPayloadContentStatus;
|
|
13
13
|
exports.retrievePayloadContent = retrievePayloadContent;
|
|
14
|
+
var _axios = require("axios");
|
|
14
15
|
var _adadaptedApiTypes = require("./adadaptedApiTypes");
|
|
15
16
|
/**
|
|
16
17
|
* Contains all API request mocks for the Rewards API.
|
|
@@ -25,7 +26,9 @@ function initializeSession() {
|
|
|
25
26
|
resolve({
|
|
26
27
|
data: AD_SESSION_DATA,
|
|
27
28
|
then: undefined,
|
|
28
|
-
config: {
|
|
29
|
+
config: {
|
|
30
|
+
headers: new _axios.AxiosHeaders()
|
|
31
|
+
},
|
|
29
32
|
headers: {},
|
|
30
33
|
status: 200,
|
|
31
34
|
statusText: "200"
|
|
@@ -42,7 +45,9 @@ function refreshSessionData() {
|
|
|
42
45
|
resolve({
|
|
43
46
|
data: REFRESHED_AD_SESSION_DATA,
|
|
44
47
|
then: undefined,
|
|
45
|
-
config: {
|
|
48
|
+
config: {
|
|
49
|
+
headers: new _axios.AxiosHeaders()
|
|
50
|
+
},
|
|
46
51
|
headers: {},
|
|
47
52
|
status: 200,
|
|
48
53
|
statusText: "200"
|
|
@@ -61,7 +66,9 @@ function reportAdEvent() {
|
|
|
61
66
|
results: ["Ok"]
|
|
62
67
|
},
|
|
63
68
|
then: undefined,
|
|
64
|
-
config: {
|
|
69
|
+
config: {
|
|
70
|
+
headers: new _axios.AxiosHeaders()
|
|
71
|
+
},
|
|
65
72
|
headers: {},
|
|
66
73
|
status: 200,
|
|
67
74
|
statusText: "200"
|
|
@@ -78,7 +85,9 @@ function getKeywordIntercepts() {
|
|
|
78
85
|
resolve({
|
|
79
86
|
data: KEYWORD_INTERCEPT_DATA,
|
|
80
87
|
then: undefined,
|
|
81
|
-
config: {
|
|
88
|
+
config: {
|
|
89
|
+
headers: new _axios.AxiosHeaders()
|
|
90
|
+
},
|
|
82
91
|
headers: {},
|
|
83
92
|
status: 200,
|
|
84
93
|
statusText: "200"
|
|
@@ -97,7 +106,9 @@ function reportInterceptEvent() {
|
|
|
97
106
|
results: ["Ok"]
|
|
98
107
|
},
|
|
99
108
|
then: undefined,
|
|
100
|
-
config: {
|
|
109
|
+
config: {
|
|
110
|
+
headers: new _axios.AxiosHeaders()
|
|
111
|
+
},
|
|
101
112
|
headers: {},
|
|
102
113
|
status: 200,
|
|
103
114
|
statusText: "200"
|
|
@@ -114,7 +125,9 @@ function reportListManagerEvents() {
|
|
|
114
125
|
resolve({
|
|
115
126
|
data: undefined,
|
|
116
127
|
then: undefined,
|
|
117
|
-
config: {
|
|
128
|
+
config: {
|
|
129
|
+
headers: new _axios.AxiosHeaders()
|
|
130
|
+
},
|
|
118
131
|
headers: {},
|
|
119
132
|
status: 200,
|
|
120
133
|
statusText: "200"
|
|
@@ -131,7 +144,9 @@ function reportPayloadContentStatus() {
|
|
|
131
144
|
resolve({
|
|
132
145
|
data: undefined,
|
|
133
146
|
then: undefined,
|
|
134
|
-
config: {
|
|
147
|
+
config: {
|
|
148
|
+
headers: new _axios.AxiosHeaders()
|
|
149
|
+
},
|
|
135
150
|
headers: {},
|
|
136
151
|
status: 200,
|
|
137
152
|
statusText: "200"
|
|
@@ -161,7 +176,9 @@ function retrievePayloadContent() {
|
|
|
161
176
|
}]
|
|
162
177
|
},
|
|
163
178
|
then: undefined,
|
|
164
|
-
config: {
|
|
179
|
+
config: {
|
|
180
|
+
headers: new _axios.AxiosHeaders()
|
|
181
|
+
},
|
|
165
182
|
headers: {},
|
|
166
183
|
status: 200,
|
|
167
184
|
statusText: "200"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["initializeSession","Promise","resolve","data","AD_SESSION_DATA","then","undefined","config","headers","status","statusText","refreshSessionData","REFRESHED_AD_SESSION_DATA","reportAdEvent","results","getKeywordIntercepts","KEYWORD_INTERCEPT_DATA","reportInterceptEvent","reportListManagerEvents","reportPayloadContentStatus","retrievePayloadContent","payloads","payload_id","detailed_list_items","product_title","product_barcode","product_sku","product_image","product_discount","product_brand","product_category","session_id","will_serve_ads","active_campaigns","session_expires_at","polling_interval_ms","zones","id","port_height","port_width","land_height","land_width","ads","ad_id","impression_id","refresh_time","hide_after_interaction","type","creative_url","tracking_html","action_type","AdActionType","CONTENT","action_path","payload","search_id","min_match_length","terms","term_id","term","replacement","priority"],"sources":["adadaptedApiRequests.mock.ts"],"sourcesContent":["/**\n * Contains all API request mocks for the Rewards API.\n */\nimport { AxiosResponse } from \"axios\";\nimport {\n AdActionType,\n AdSession,\n InitializeSessionResponse,\n KeywordIntercepts,\n KeywordInterceptsResponse,\n RefreshSessionDataResponse,\n ReportAdEventResponse,\n ReportInterceptEventResponse,\n RetrievePayloadItemDataResponse,\n} from \"./adadaptedApiTypes\";\n\n/**\n * Mocks the API call for initializing a session.\n * @returns a promise of an {@link AxiosResponse} of the mocked data.\n */\nexport function initializeSession(): Promise<\n AxiosResponse<InitializeSessionResponse>\n> {\n return new Promise<AxiosResponse<InitializeSessionResponse>>((resolve) => {\n resolve({\n data: AD_SESSION_DATA,\n then: undefined,\n config: {},\n headers: {},\n status: 200,\n statusText: \"200\",\n });\n });\n}\n\n/**\n * Mocks the API call for refreshing session data.\n * @returns a promise of an {@link AxiosResponse} of the mocked data.\n */\nexport function refreshSessionData(): Promise<\n AxiosResponse<RefreshSessionDataResponse>\n> {\n return new Promise<AxiosResponse<RefreshSessionDataResponse>>((resolve) => {\n resolve({\n data: REFRESHED_AD_SESSION_DATA,\n then: undefined,\n config: {},\n headers: {},\n status: 200,\n statusText: \"200\",\n });\n });\n}\n\n/**\n * Mocks the API call for reporting an ad event.\n * @returns a promise of an {@link AxiosResponse} of the mocked data.\n */\nexport function reportAdEvent(): Promise<AxiosResponse<ReportAdEventResponse>> {\n return new Promise<AxiosResponse<ReportAdEventResponse>>((resolve) => {\n resolve({\n data: {\n results: [\"Ok\"],\n },\n then: undefined,\n config: {},\n headers: {},\n status: 200,\n statusText: \"200\",\n });\n });\n}\n\n/**\n * Mocks the API call for getting keyword intercepts.\n * @returns a promise of an {@link AxiosResponse} of the mocked data.\n */\nexport function getKeywordIntercepts(): Promise<\n AxiosResponse<KeywordInterceptsResponse>\n> {\n return new Promise<AxiosResponse<KeywordInterceptsResponse>>((resolve) => {\n resolve({\n data: KEYWORD_INTERCEPT_DATA,\n then: undefined,\n config: {},\n headers: {},\n status: 200,\n statusText: \"200\",\n });\n });\n}\n\n/**\n * Mocks the API call for reporting an ad event.\n * @returns a promise of an {@link AxiosResponse} of the mocked data.\n */\nexport function reportInterceptEvent(): Promise<\n AxiosResponse<ReportInterceptEventResponse>\n> {\n return new Promise<AxiosResponse<ReportInterceptEventResponse>>(\n (resolve) => {\n resolve({\n data: {\n results: [\"Ok\"],\n },\n then: undefined,\n config: {},\n headers: {},\n status: 200,\n statusText: \"200\",\n });\n }\n );\n}\n\n/**\n * Mocks the API call for reporting List Manager events.\n * @returns a promise of an {@link AxiosResponse} of the mocked data.\n */\nexport function reportListManagerEvents(): Promise<AxiosResponse<void>> {\n return new Promise<AxiosResponse<void>>((resolve) => {\n resolve({\n data: undefined,\n then: undefined,\n config: {},\n headers: {},\n status: 200,\n statusText: \"200\",\n });\n });\n}\n\n/**\n * Mocks the API call for reporting Payload content status.\n * @returns a promise of an {@link AxiosResponse} of the mocked data.\n */\nexport function reportPayloadContentStatus(): Promise<AxiosResponse<void>> {\n return new Promise<AxiosResponse<void>>((resolve) => {\n resolve({\n data: undefined,\n then: undefined,\n config: {},\n headers: {},\n status: 200,\n statusText: \"200\",\n });\n });\n}\n\n/**\n * Mocks the API call for reporting Payload content status.\n * @returns a promise of an {@link AxiosResponse} of the mocked data.\n */\nexport function retrievePayloadContent(): Promise<\n AxiosResponse<RetrievePayloadItemDataResponse>\n> {\n return new Promise<AxiosResponse<RetrievePayloadItemDataResponse>>(\n (resolve) => {\n resolve({\n data: {\n payloads: [\n {\n payload_id: \"TEST_PAYLOAD_1\",\n detailed_list_items: [\n {\n product_title: \"Test Product 1\",\n product_barcode: \"\",\n product_sku: \"\",\n product_image: \"\",\n product_discount: \"\",\n product_brand: \"\",\n product_category: \"\",\n },\n ],\n },\n ],\n },\n then: undefined,\n config: {},\n headers: {},\n status: 200,\n statusText: \"200\",\n });\n }\n );\n}\n\n/**\n * Mock data for an {@link AdSession} object.\n */\nconst AD_SESSION_DATA: AdSession = {\n session_id: \"TEST_SESSION_ID\",\n will_serve_ads: true,\n active_campaigns: true,\n session_expires_at: 1587684561,\n polling_interval_ms: 1000,\n zones: {\n 100838: {\n id: \"100838\",\n port_height: 250,\n port_width: 320,\n land_height: 250,\n land_width: 320,\n ads: [\n {\n ad_id: \"1815\",\n impression_id: \"100838::C4D792785EA1EC91\",\n refresh_time: 60,\n hide_after_interaction: false,\n type: \"html\",\n creative_url:\n \"https://testurl.com/a/NTLKNZKYMMI2NTM1;100838;1815?session_id=TEST_SESSION_ID&udid=00000000-0000-0000-0000-000000000000\",\n tracking_html: \"<html></html>\",\n action_type: AdActionType.CONTENT,\n action_path: \"\",\n payload: {\n detailed_list_items: [\n {\n product_barcode: \"0\",\n product_brand: \"Brand\",\n product_category: \"\",\n product_discount: \"\",\n product_image: \"\",\n product_sku: \"\",\n product_title: \"Sample Product\",\n },\n ],\n },\n },\n ],\n },\n },\n};\n\n/**\n * Mock data for an {@link AdSession} object.\n */\nconst REFRESHED_AD_SESSION_DATA: AdSession = {\n session_id: \"TEST_SESSION_ID\",\n will_serve_ads: true,\n active_campaigns: true,\n session_expires_at: 1587684561,\n polling_interval_ms: 1000,\n zones: {\n 100838: {\n id: \"100838\",\n port_height: 250,\n port_width: 320,\n land_height: 250,\n land_width: 320,\n ads: [\n {\n ad_id: \"1816\",\n impression_id: \"100838::C4D792785EA1EC91\",\n refresh_time: 30,\n hide_after_interaction: false,\n type: \"html\",\n creative_url:\n \"https://testurl.com/a/NTLKNZKYMMI2NTM1;100838;1815?session_id=TEST_SESSION_ID&udid=00000000-0000-0000-0000-000000000000\",\n tracking_html: \"<html></html>\",\n action_type: AdActionType.CONTENT,\n action_path: \"\",\n payload: {\n detailed_list_items: [\n {\n product_barcode: \"0\",\n product_brand: \"Brand\",\n product_category: \"\",\n product_discount: \"\",\n product_image: \"\",\n product_sku: \"\",\n product_title: \"Sample Product\",\n },\n ],\n },\n },\n ],\n },\n },\n};\n\n/**\n * Mock data for an {@link AdSession} object.\n */\nconst KEYWORD_INTERCEPT_DATA: KeywordIntercepts = {\n search_id: \"test-search-id\",\n min_match_length: 3,\n terms: [\n {\n term_id: \"test-term-id-1\",\n term: \"Milk\",\n replacement: \"Fairlife Milk\",\n priority: 1,\n },\n {\n term_id: \"test-term-id-2\",\n term: \"milk\",\n replacement: \"A2 Milk\",\n priority: 0,\n },\n {\n term_id: \"test-term-id-3\",\n term: \"CHEESE\",\n replacement: \"Kraft Singles\",\n priority: 0,\n },\n {\n term_id: \"test-term-id-4\",\n term: \"cOfFeE\",\n replacement: \"Folgers Instant Coffee\",\n priority: 0,\n },\n ],\n};\n"],"mappings":";;;;;;;;;;;;;AAIA;AAJA;AACA;AACA;;AAcA;AACA;AACA;AACA;AACO,SAASA,iBAAiB,GAE/B;EACE,OAAO,IAAIC,OAAO,CAA4CC,OAAO,IAAK;IACtEA,OAAO,CAAC;MACJC,IAAI,EAAEC,eAAe;MACrBC,IAAI,EAAEC,SAAS;MACfC,MAAM,EAAE,CAAC,CAAC;MACVC,OAAO,EAAE,CAAC,CAAC;MACXC,MAAM,EAAE,GAAG;MACXC,UAAU,EAAE;IAChB,CAAC,CAAC;EACN,CAAC,CAAC;AACN;;AAEA;AACA;AACA;AACA;AACO,SAASC,kBAAkB,GAEhC;EACE,OAAO,IAAIV,OAAO,CAA6CC,OAAO,IAAK;IACvEA,OAAO,CAAC;MACJC,IAAI,EAAES,yBAAyB;MAC/BP,IAAI,EAAEC,SAAS;MACfC,MAAM,EAAE,CAAC,CAAC;MACVC,OAAO,EAAE,CAAC,CAAC;MACXC,MAAM,EAAE,GAAG;MACXC,UAAU,EAAE;IAChB,CAAC,CAAC;EACN,CAAC,CAAC;AACN;;AAEA;AACA;AACA;AACA;AACO,SAASG,aAAa,GAAkD;EAC3E,OAAO,IAAIZ,OAAO,CAAwCC,OAAO,IAAK;IAClEA,OAAO,CAAC;MACJC,IAAI,EAAE;QACFW,OAAO,EAAE,CAAC,IAAI;MAClB,CAAC;MACDT,IAAI,EAAEC,SAAS;MACfC,MAAM,EA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;QAET;MACJ,CAAC;IAET;EACJ;AACJ,CAAC;;AAED;AACA;AACA;AACA,MAAMR,sBAAyC,GAAG;EAC9CuC,SAAS,EAAE,gBAAgB;EAC3BC,gBAAgB,EAAE,CAAC;EACnBC,KAAK,EAAE,CACH;IACIC,OAAO,EAAE,gBAAgB;IACzBC,IAAI,EAAE,MAAM;IACZC,WAAW,EAAE,eAAe;IAC5BC,QAAQ,EAAE;EACd,CAAC,EACD;IACIH,OAAO,EAAE,gBAAgB;IACzBC,IAAI,EAAE,MAAM;IACZC,WAAW,EAAE,SAAS;IACtBC,QAAQ,EAAE;EACd,CAAC,EACD;IACIH,OAAO,EAAE,gBAAgB;IACzBC,IAAI,EAAE,QAAQ;IACdC,WAAW,EAAE,eAAe;IAC5BC,QAAQ,EAAE;EACd,CAAC,EACD;IACIH,OAAO,EAAE,gBAAgB;IACzBC,IAAI,EAAE,QAAQ;IACdC,WAAW,EAAE,wBAAwB;IACrCC,QAAQ,EAAE;EACd,CAAC;AAET,CAAC"}
|
|
1
|
+
{"version":3,"names":["_axios","require","_adadaptedApiTypes","initializeSession","Promise","resolve","data","AD_SESSION_DATA","then","undefined","config","headers","AxiosHeaders","status","statusText","refreshSessionData","REFRESHED_AD_SESSION_DATA","reportAdEvent","results","getKeywordIntercepts","KEYWORD_INTERCEPT_DATA","reportInterceptEvent","reportListManagerEvents","reportPayloadContentStatus","retrievePayloadContent","payloads","payload_id","detailed_list_items","product_title","product_barcode","product_sku","product_image","product_discount","product_brand","product_category","session_id","will_serve_ads","active_campaigns","session_expires_at","polling_interval_ms","zones","id","port_height","port_width","land_height","land_width","ads","ad_id","impression_id","refresh_time","hide_after_interaction","type","creative_url","tracking_html","action_type","AdActionType","CONTENT","action_path","payload","search_id","min_match_length","terms","term_id","term","replacement","priority"],"sourceRoot":"../../../src","sources":["api/adadaptedApiRequests.mock.ts"],"mappings":";;;;;;;;;;;;;AAGA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,kBAAA,GAAA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ET;MACJ,CAAC;IAET;EACJ;AACJ,CAAC;;AAED;AACA;AACA;AACA,MAAMR,sBAAyC,GAAG;EAC9CuC,SAAS,EAAE,gBAAgB;EAC3BC,gBAAgB,EAAE,CAAC;EACnBC,KAAK,EAAE,CACH;IACIC,OAAO,EAAE,gBAAgB;IACzBC,IAAI,EAAE,MAAM;IACZC,WAAW,EAAE,eAAe;IAC5BC,QAAQ,EAAE;EACd,CAAC,EACD;IACIH,OAAO,EAAE,gBAAgB;IACzBC,IAAI,EAAE,MAAM;IACZC,WAAW,EAAE,SAAS;IACtBC,QAAQ,EAAE;EACd,CAAC,EACD;IACIH,OAAO,EAAE,gBAAgB;IACzBC,IAAI,EAAE,QAAQ;IACdC,WAAW,EAAE,eAAe;IAC5BC,QAAQ,EAAE;EACd,CAAC,EACD;IACIH,OAAO,EAAE,gBAAgB;IACzBC,IAAI,EAAE,QAAQ;IACdC,WAAW,EAAE,wBAAwB;IACrCC,QAAQ,EAAE;EACd,CAAC;AAET,CAAC"}
|
|
@@ -49,58 +49,104 @@ exports.ReportedEventType = exports.PayloadStatus = exports.ListManagerEventSour
|
|
|
49
49
|
/**
|
|
50
50
|
* Enumeration that defines the possible values for a List Manager Event Source.
|
|
51
51
|
*/
|
|
52
|
-
let ListManagerEventSource
|
|
52
|
+
let ListManagerEventSource = /*#__PURE__*/function (ListManagerEventSource) {
|
|
53
|
+
ListManagerEventSource["APP"] = "app";
|
|
54
|
+
return ListManagerEventSource;
|
|
55
|
+
}({});
|
|
53
56
|
/**
|
|
54
57
|
* Enumeration that defines the possible values for a List Manager Event Name.
|
|
55
58
|
*/
|
|
56
59
|
exports.ListManagerEventSource = ListManagerEventSource;
|
|
57
|
-
|
|
58
|
-
ListManagerEventSource["APP"] = "app";
|
|
59
|
-
})(ListManagerEventSource || (exports.ListManagerEventSource = ListManagerEventSource = {}));
|
|
60
|
-
let ListManagerEventName;
|
|
61
|
-
/**
|
|
62
|
-
* Enum defining the available ad action types.
|
|
63
|
-
*/
|
|
64
|
-
exports.ListManagerEventName = ListManagerEventName;
|
|
65
|
-
(function (ListManagerEventName) {
|
|
60
|
+
let ListManagerEventName = /*#__PURE__*/function (ListManagerEventName) {
|
|
66
61
|
ListManagerEventName["ADDED_TO_LIST"] = "user_added_to_list";
|
|
67
62
|
ListManagerEventName["CROSSED_OFF_LIST"] = "user_crossed_off_list";
|
|
68
63
|
ListManagerEventName["DELETED_FROM_LIST"] = "user_deleted_from_list";
|
|
69
|
-
|
|
70
|
-
|
|
64
|
+
return ListManagerEventName;
|
|
65
|
+
}({});
|
|
71
66
|
/**
|
|
72
|
-
* Enum defining the
|
|
67
|
+
* Enum defining the available ad action types.
|
|
73
68
|
*/
|
|
74
|
-
exports.
|
|
75
|
-
|
|
69
|
+
exports.ListManagerEventName = ListManagerEventName;
|
|
70
|
+
let AdActionType = /*#__PURE__*/function (AdActionType) {
|
|
76
71
|
AdActionType["CONTENT"] = "c";
|
|
77
72
|
AdActionType["EXTERNAL"] = "e";
|
|
78
73
|
AdActionType["LINK"] = "l";
|
|
79
74
|
AdActionType["APP"] = "a";
|
|
80
75
|
AdActionType["NONE"] = "n";
|
|
81
|
-
|
|
82
|
-
|
|
76
|
+
return AdActionType;
|
|
77
|
+
}({});
|
|
83
78
|
/**
|
|
84
|
-
*
|
|
79
|
+
* Enum defining the different types of events that can be reported.
|
|
85
80
|
*/
|
|
86
|
-
exports.
|
|
87
|
-
|
|
81
|
+
exports.AdActionType = AdActionType;
|
|
82
|
+
let ReportedEventType = /*#__PURE__*/function (ReportedEventType) {
|
|
88
83
|
ReportedEventType["IMPRESSION"] = "impression";
|
|
84
|
+
ReportedEventType["INVISIBLE_IMPRESSION"] = "invisible_impression";
|
|
89
85
|
ReportedEventType["INTERACTION"] = "interaction";
|
|
90
86
|
ReportedEventType["NOT_MATCHED"] = "not_matched";
|
|
91
87
|
ReportedEventType["MATCHED"] = "matched";
|
|
92
88
|
ReportedEventType["PRESENTED"] = "presented";
|
|
93
89
|
ReportedEventType["SELECTED"] = "selected";
|
|
94
|
-
|
|
95
|
-
|
|
90
|
+
return ReportedEventType;
|
|
91
|
+
}({});
|
|
92
|
+
/**
|
|
93
|
+
* Enumeration defining the possible payload acknowledgment status values.
|
|
94
|
+
*/
|
|
95
|
+
exports.ReportedEventType = ReportedEventType;
|
|
96
|
+
let PayloadStatus = /*#__PURE__*/function (PayloadStatus) {
|
|
97
|
+
PayloadStatus["DELIVERED"] = "delivered";
|
|
98
|
+
PayloadStatus["REJECTED"] = "rejected";
|
|
99
|
+
return PayloadStatus;
|
|
100
|
+
}({}); // =============================================================================
|
|
96
101
|
// REQUEST MODELS
|
|
97
102
|
// =============================================================================
|
|
98
103
|
/**
|
|
99
104
|
* The base request inputs that most requests will use.
|
|
100
105
|
*/
|
|
106
|
+
/**
|
|
107
|
+
* Interface for the request of the Initialize Session API call.
|
|
108
|
+
*/
|
|
109
|
+
/**
|
|
110
|
+
* Interface for the request of the Refresh Session Data API call.
|
|
111
|
+
*/
|
|
112
|
+
/**
|
|
113
|
+
* Interface for the request that reports an ad event.
|
|
114
|
+
*/
|
|
115
|
+
/**
|
|
116
|
+
* Interface for the request of the Refresh Session Data API call.
|
|
117
|
+
*/
|
|
118
|
+
/**
|
|
119
|
+
* Interface for the request that reports an intercept event.
|
|
120
|
+
*/
|
|
121
|
+
/**
|
|
122
|
+
* Interface for the request that reports List Manager data.
|
|
123
|
+
*/
|
|
124
|
+
/**
|
|
125
|
+
* Interface for the request that reports Payload tracking data.
|
|
126
|
+
*/
|
|
127
|
+
/**
|
|
128
|
+
* Interface for the request that gets Payload server data.
|
|
129
|
+
*/
|
|
130
|
+
// =============================================================================
|
|
131
|
+
// RESPONSE MODELS
|
|
132
|
+
// =============================================================================
|
|
133
|
+
/**
|
|
134
|
+
* Interface for the response of the Campaign API request.
|
|
135
|
+
*/
|
|
136
|
+
/**
|
|
137
|
+
* Interface for the response of the Campaign API request.
|
|
138
|
+
*/
|
|
139
|
+
/**
|
|
140
|
+
* Interface for the response of the Report Ad Event API request.
|
|
141
|
+
*/
|
|
142
|
+
/**
|
|
143
|
+
* Interface for the response of the Keyword Intercepts API request.
|
|
144
|
+
*/
|
|
145
|
+
/**
|
|
146
|
+
* Interface for the response of the Report Intercept Event API request.
|
|
147
|
+
*/
|
|
148
|
+
/**
|
|
149
|
+
* Interface for the response of the Retrieve Payload Item Data API request.
|
|
150
|
+
*/
|
|
101
151
|
exports.PayloadStatus = PayloadStatus;
|
|
102
|
-
(function (PayloadStatus) {
|
|
103
|
-
PayloadStatus["DELIVERED"] = "delivered";
|
|
104
|
-
PayloadStatus["REJECTED"] = "rejected";
|
|
105
|
-
})(PayloadStatus || (exports.PayloadStatus = PayloadStatus = {}));
|
|
106
152
|
//# sourceMappingURL=adadaptedApiTypes.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["ListManagerEventSource","ListManagerEventName","AdActionType","ReportedEventType","PayloadStatus"],"sources":["adadaptedApiTypes.ts"],"sourcesContent":["// =============================================================================\n// API TYPE MODELS\n// =============================================================================\n/**\n * The definition of an ad session data object.\n */\nexport interface AdSession {\n /**\n * The session ID.\n */\n session_id: string;\n /**\n * If true, ads will be served.\n */\n will_serve_ads: boolean;\n /**\n * If true, there are active campaigns.\n */\n active_campaigns: boolean;\n /**\n * How often to refresh session/ad data?\n */\n polling_interval_ms: number;\n /**\n * The time at which the session will expire.\n */\n session_expires_at: number;\n /**\n * All ad zones.\n */\n zones: { [key: number]: Zone };\n}\n\n/**\n * The definition of a zone.\n */\nexport interface Zone {\n /**\n * The zone ID.\n */\n id: string;\n /**\n * ?\n */\n land_height: number;\n /**\n * ?\n */\n land_width: number;\n /**\n * ?\n */\n port_height: number;\n /**\n * ?\n */\n port_width: number;\n /**\n * The available ads.\n */\n ads: Ad[];\n}\n\n/**\n * The definition of an Ad.\n */\nexport interface Ad {\n /**\n * The ad ID.\n */\n ad_id: string;\n /**\n * The impression ID.\n */\n impression_id: string;\n /**\n * The type of ad this is.\n */\n type: string;\n /**\n * How often the ad refreshes? Swaps out for another?\n * Length of time in seconds.\n */\n refresh_time: number;\n /**\n * The URL for the ad image to display.\n */\n creative_url: string;\n /**\n * The tracking pixel to include in the zone view for this ad?\n */\n tracking_html: string;\n /**\n * ?\n */\n action_path: string;\n /**\n * ?\n */\n action_type: AdActionType;\n /**\n * If true, the ad will be hidden after interaction.\n */\n hide_after_interaction: boolean;\n /**\n * ?\n */\n payload: AdPayload;\n}\n\n/**\n * The definition of an Ad Payload.\n */\nexport interface AdPayload {\n /**\n * The array of list items.\n */\n detailed_list_items: DetailedListItem[];\n}\n\n/**\n * The definition of an \"out of app\" data payload.\n */\nexport interface OutOfAppDataPayload {\n /**\n * The payload ID associated to the provided list items.\n */\n payload_id: string;\n /**\n * The payload message.\n */\n payload_message?: string;\n /**\n * The payload image.\n */\n payload_image?: string;\n /**\n * The campaign ID.\n */\n campaign_id?: string;\n /**\n * The app ID.\n */\n app_id?: string;\n /**\n * Expiration time in seconds.\n */\n expire_seconds?: number;\n /**\n * The array of list items.\n */\n detailed_list_items: DetailedListItem[];\n}\n\n/**\n * The definition of a Detailed List Item.\n */\nexport interface DetailedListItem {\n /**\n * The barcode of the product.\n */\n product_barcode: string;\n /**\n * The brand of the product.\n */\n product_brand: string;\n /**\n * The category of the product.\n */\n product_category: string;\n /**\n * The discount given for the product.\n */\n product_discount: string;\n /**\n * The image used for display of the product.\n */\n product_image: string;\n /**\n * The SKU of the product.\n */\n product_sku: string;\n /**\n * The name/title of the product.\n */\n product_title: string;\n /**\n * The tracking ID.\n */\n tracking_id?: string;\n}\n\n/**\n * The definition of a Keyword Intercepts object.\n */\nexport interface KeywordIntercepts {\n /**\n * The search ID.\n * Automatically assigned by the API.\n */\n search_id: string;\n /**\n * The minimum number of characters required to perform\n * a search against all available search terms.\n */\n min_match_length: number;\n /**\n * All available search terms.\n */\n terms: KeywordSearchTerm[];\n}\n\n/**\n * The definition of a Keyword Search Term.\n */\nexport interface KeywordSearchTerm {\n /**\n * The search term ID.\n */\n term_id: string;\n /**\n * The search term to validate a search string against.\n */\n term: string;\n /**\n * The display string a client can use to display in a list.\n */\n replacement: string;\n /**\n * The display priority of this item.\n * Compare this to other {@link KeywordSearchTerm} items to determine\n * the final priority order during display.\n * The lower the number, the higher the priority.\n */\n priority: number;\n}\n\n/**\n * The definition of a Reported Ad Event.\n */\nexport interface ReportedAdEvent {\n /**\n * The add ID.\n */\n ad_id: string;\n /**\n * The impression ID.\n */\n impression_id: string;\n /**\n * The event type to report\n */\n event_type: ReportedEventType;\n /**\n * The timestamp at which the event occurred.\n */\n created_at: number;\n}\n\n/**\n * The definition of a Reported Intercept Event.\n */\nexport interface ReportedInterceptEvent {\n /**\n * The intercept search ID.\n */\n search_id: string;\n /**\n * The term ID.\n */\n term_id: string;\n /**\n * The term.\n */\n term: string;\n /**\n * The user input provided that ultimately\n * resulted in the event triggering.\n */\n user_input: string;\n /**\n * The event type to report\n */\n event_type: ReportedEventType;\n /**\n * The timestamp at which the event occurred.\n */\n created_at: number;\n}\n\n/**\n * Interface defining the structure of an event to send when using List Manager.\n */\nexport interface ListManagerEvent {\n /**\n * The source of the list manager event.\n */\n event_source: ListManagerEventSource;\n /**\n * The timestamp this event occurred (unix time).\n */\n event_timestamp: number;\n /**\n * The event name.\n */\n event_name: ListManagerEventName;\n /**\n * The parameter the event is triggered for.\n */\n event_params: ListManagerEventParam;\n}\n\n/**\n * Interface defining the structure of a payload tracking event.\n */\nexport interface PayloadTrackingEvent {\n /**\n * The source of the list manager event.\n */\n payload_id: string;\n /**\n * The status to report.\n */\n status: PayloadStatus;\n /**\n * The timestamp this event occurred (unix time).\n */\n event_timestamp: number;\n}\n\n/**\n * Interface defining the structure of an Event Param for List Manager.\n */\nexport interface ListManagerEventParam {\n /**\n * The item name being reported.\n */\n item_name: string;\n /**\n * The list name being reported.\n */\n list_name?: string;\n}\n\n/**\n * Enumeration that defines the possible values for a List Manager Event Source.\n */\nexport enum ListManagerEventSource {\n /**\n * The event was triggered from the app.\n */\n APP = \"app\",\n}\n\n/**\n * Enumeration that defines the possible values for a List Manager Event Name.\n */\nexport enum ListManagerEventName {\n /**\n * The user added an item to their list.\n */\n ADDED_TO_LIST = \"user_added_to_list\",\n /**\n * The user crossed off an item from their list.\n */\n CROSSED_OFF_LIST = \"user_crossed_off_list\",\n /**\n * The user deleted an item from their list.\n */\n DELETED_FROM_LIST = \"user_deleted_from_list\",\n}\n\n/**\n * Enum defining the available ad action types.\n */\nexport enum AdActionType {\n /**\n * Used for Add To List.\n */\n CONTENT = \"c\",\n /**\n * Used for opening URLs in an external browser.\n */\n EXTERNAL = \"e\",\n /**\n * Used for opening URLs in a web view within the app.\n * NOTE: This one should probably be deprecated with the new\n * platform redesign, since its not as obvious what it does.\n */\n LINK = \"l\",\n /**\n * Used for opening app store URLs in the app store.\n */\n APP = \"a\",\n /**\n * ?\n */\n NONE = \"n\",\n}\n\n/**\n * Enum defining the different types of events that can be reported.\n */\nexport enum ReportedEventType {\n /**\n * Occurs when an ad is displayed to the user.\n */\n IMPRESSION = \"impression\",\n /**\n * Occurs when the user interacts with an ad.\n */\n INTERACTION = \"interaction\",\n /**\n * Occurs when the user's search term did not\n * match an available keyword intercept term.\n */\n NOT_MATCHED = \"not_matched\",\n /**\n * Occurs when the user's search term has matched a keyword intercept term.\n */\n MATCHED = \"matched\",\n /**\n * Occurs when the user was presented a keyword intercept term.\n */\n PRESENTED = \"presented\",\n /**\n * Occurs when the user has selected a keyword intercept term.\n */\n SELECTED = \"selected\",\n}\n\n/**\n * Enumeration defining the possible payload acknowledgment status values.\n */\nexport enum PayloadStatus {\n /**\n * The delivered status.\n */\n DELIVERED = \"delivered\",\n /**\n * The rejected status.\n */\n REJECTED = \"rejected\",\n}\n\n// =============================================================================\n// REQUEST MODELS\n// =============================================================================\n/**\n * The base request inputs that most requests will use.\n */\nexport interface BaseRequestInputs {\n /**\n * The app ID provided by the client using the API.\n */\n app_id: string;\n /**\n * The unique device ID.\n */\n udid: string;\n /**\n * The current session ID.\n */\n session_id: string;\n}\n\n/**\n * Interface for the request of the Initialize Session API call.\n */\nexport interface InitializeSessionRequest {\n /**\n * The app ID provided by the client using the API.\n */\n app_id: string;\n /**\n * The unique device ID of the users device.\n */\n udid: string;\n /**\n * The bundle ID.\n */\n bundle_id?: string;\n /**\n * The bundle version.\n */\n bundle_version?: string;\n /**\n * The name of the device.\n */\n device_name?: string;\n /**\n * The unique device ID of the users device.\n */\n device_udid?: string;\n /**\n * The OS of the device.\n */\n device_os?: string;\n /**\n * The OS version of the device.\n */\n device_osv?: string;\n /**\n * The locale the device is currently set for.\n */\n device_locale?: string;\n /**\n * The timezone the device is currently set for.\n */\n device_timezone?: string;\n /**\n * The device carrier name.\n */\n device_carrier?: string;\n /**\n * The height of the devices screen in pixels.\n */\n device_height?: number;\n /**\n * The width of the devices screen in pixels.\n */\n device_width?: number;\n /**\n * The density of the devices screen.\n */\n device_density?: string;\n /**\n * If true, the device allows for ad retargeting.\n */\n allow_retargeting?: boolean;\n /**\n * ?\n */\n created_at?: number;\n /**\n * The AdAdapted SDK version number.\n */\n sdk_version?: string;\n /**\n * ?\n */\n params?: { [key: string]: string };\n}\n\n/**\n * Interface for the request of the Refresh Session Data API call.\n */\nexport interface RefreshSessionDataRequest {\n /**\n * The app ID provided by the client using the API.\n */\n aid: string;\n /**\n * The unique device ID.\n */\n uid: string;\n /**\n * The current session ID.\n */\n sid: string;\n}\n\n/**\n * Interface for the request that reports an ad event.\n */\nexport interface ReportAdEventRequest extends BaseRequestInputs {\n /**\n * Events to report.\n */\n events: ReportedAdEvent[];\n}\n\n/**\n * Interface for the request of the Refresh Session Data API call.\n */\nexport interface KeywordInterceptsRequest {\n /**\n * The app ID provided by the client using the API.\n */\n aid: string;\n /**\n * The unique device ID.\n */\n uid: string;\n /**\n * The current session ID.\n */\n sid: string;\n}\n\n/**\n * Interface for the request that reports an intercept event.\n */\nexport interface ReportInterceptEventRequest extends BaseRequestInputs {\n /**\n * Events to report.\n */\n events: ReportedInterceptEvent[];\n}\n\n/**\n * Interface for the request that reports List Manager data.\n */\nexport interface ReportListManagerDataRequest extends BaseRequestInputs {\n /**\n * The events to report.\n */\n events: ListManagerEvent[];\n}\n\n/**\n * Interface for the request that reports Payload tracking data.\n */\nexport interface ReportPayloadDataRequest extends BaseRequestInputs {\n /**\n * The payload tracking events.\n */\n tracking: PayloadTrackingEvent[];\n}\n\n/**\n * Interface for the request that gets Payload server data.\n */\nexport interface RetrievePayloadItemDataRequest extends BaseRequestInputs {}\n\n// =============================================================================\n// RESPONSE MODELS\n// =============================================================================\n/**\n * Interface for the response of the Campaign API request.\n */\nexport interface InitializeSessionResponse extends AdSession {}\n\n/**\n * Interface for the response of the Campaign API request.\n */\nexport interface RefreshSessionDataResponse extends AdSession {}\n\n/**\n * Interface for the response of the Report Ad Event API request.\n */\nexport interface ReportAdEventResponse {\n /**\n * Array that contains response strings of \"Ok\" or \"Failed\" based\n * on the same order of the events sent to the request.\n */\n results: string[];\n}\n\n/**\n * Interface for the response of the Keyword Intercepts API request.\n */\nexport interface KeywordInterceptsResponse extends KeywordIntercepts {}\n\n/**\n * Interface for the response of the Report Intercept Event API request.\n */\nexport interface ReportInterceptEventResponse {\n /**\n * Array that contains response strings of \"Ok\" or \"Failed\" based\n * on the same order of the events sent to the request.\n */\n results: string[];\n}\n\n/**\n * Interface for the response of the Retrieve Payload Item Data API request.\n */\nexport interface RetrievePayloadItemDataResponse {\n /**\n * Array containing all current payloads for the provided user.\n */\n payloads: OutOfAppDataPayload[];\n}\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AA4BA;AACA;AACA;AA4BA;AACA;AACA;AA6CA;AACA;AACA;AAQA;AACA;AACA;AAgCA;AACA;AACA;AAoCA;AACA;AACA;AAkBA;AACA;AACA;AAuBA;AACA;AACA;AAoBA;AACA;AACA;AA6BA;AACA;AACA;AAoBA;AACA;AACA;AAgBA;AACA;AACA;AAYA;AACA;AACA;AAFA,IAGYA,sBAAsB;AAOlC;AACA;AACA;AAFA;AAAA,WAPYA,sBAAsB;EAAtBA,sBAAsB;AAAA,GAAtBA,sBAAsB,sCAAtBA,sBAAsB;AAAA,IAUtBC,oBAAoB;AAehC;AACA;AACA;AAFA;AAAA,WAfYA,oBAAoB;EAApBA,oBAAoB;EAApBA,oBAAoB;EAApBA,oBAAoB;AAAA,GAApBA,oBAAoB,oCAApBA,oBAAoB;AAAA,IAkBpBC,YAAY;AAyBxB;AACA;AACA;AAFA;AAAA,WAzBYA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;AAAA,GAAZA,YAAY,4BAAZA,YAAY;AAAA,IA4BZC,iBAAiB;AA4B7B;AACA;AACA;AAFA;AAAA,WA5BYA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;AAAA,GAAjBA,iBAAiB,iCAAjBA,iBAAiB;AAAA,IA+BjBC,aAAa,EAWzB;AACA;AACA;AACA;AACA;AACA;AAFA;AAAA,WAdYA,aAAa;EAAbA,aAAa;EAAbA,aAAa;AAAA,GAAbA,aAAa,6BAAbA,aAAa"}
|
|
1
|
+
{"version":3,"names":["ListManagerEventSource","exports","ListManagerEventName","AdActionType","ReportedEventType","PayloadStatus"],"sourceRoot":"../../../src","sources":["api/adadaptedApiTypes.ts"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AA4BA;AACA;AACA;AA4BA;AACA;AACA;AAiDA;AACA;AACA;AAQA;AACA;AACA;AAgCA;AACA;AACA;AAoCA;AACA;AACA;AAkBA;AACA;AACA;AAuBA;AACA;AACA;AAoBA;AACA;AACA;AA6BA;AACA;AACA;AAoBA;AACA;AACA;AAgBA;AACA;AACA;AAYA;AACA;AACA;AAFA,IAGYA,sBAAsB,0BAAtBA,sBAAsB;EAAtBA,sBAAsB;EAAA,OAAtBA,sBAAsB;AAAA;A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