@adadapted/react-native-sdk 3.2.0 → 3.4.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 +13 -11
- package/android/bin/gradle.properties +4 -4
- package/android/build.gradle +19 -81
- package/android/gradle.properties +4 -4
- package/android/src/main/AndroidManifest.xml +1 -3
- package/android/src/main/java/com/adadaptedreactnativesdk/AdadaptedReactNativeSdkModule.kt +39 -54
- package/ios/AdadaptedReactNativeSdk.m +1 -1
- package/lib/commonjs/api/adadaptedApiRequests.js +3 -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 +68 -28
- package/lib/commonjs/api/adadaptedApiTypes.js.map +1 -1
- package/lib/commonjs/components/AdZone.js +101 -67
- package/lib/commonjs/components/AdZone.js.map +1 -1
- package/lib/commonjs/components/ReportAdButton.js +40 -0
- package/lib/commonjs/components/ReportAdButton.js.map +1 -0
- package/lib/commonjs/images/ReportIcon.png +0 -0
- package/lib/commonjs/index.js +139 -93
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/package.json +1 -0
- package/lib/commonjs/types.js +4 -0
- package/lib/commonjs/types.js.map +1 -1
- package/lib/commonjs/util.js +14 -4
- package/lib/commonjs/util.js.map +1 -1
- package/lib/module/api/adadaptedApiRequests.js +2 -0
- package/lib/module/api/adadaptedApiRequests.js.map +1 -1
- package/lib/module/api/adadaptedApiRequests.mock.js +27 -9
- package/lib/module/api/adadaptedApiRequests.mock.js.map +1 -1
- package/lib/module/api/adadaptedApiTypes.js +85 -24
- package/lib/module/api/adadaptedApiTypes.js.map +1 -1
- package/lib/module/components/AdZone.js +90 -61
- package/lib/module/components/AdZone.js.map +1 -1
- package/lib/module/components/ReportAdButton.js +34 -0
- package/lib/module/components/ReportAdButton.js.map +1 -0
- package/lib/module/images/ReportIcon.png +0 -0
- package/lib/module/index.js +142 -89
- package/lib/module/index.js.map +1 -1
- package/lib/module/package.json +1 -0
- package/lib/module/types.js +2 -0
- package/lib/module/types.js.map +1 -1
- package/lib/module/util.js +16 -4
- package/lib/module/util.js.map +1 -1
- 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 +5 -0
- package/lib/typescript/src/api/adadaptedApiTypes.d.ts.map +1 -0
- package/lib/typescript/src/components/AdZone.d.ts +11 -6
- 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 +33 -17
- 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 +151 -155
- package/src/api/adadaptedApiRequests.mock.ts +25 -9
- package/src/api/adadaptedApiTypes.ts +5 -0
- package/src/components/AdZone.tsx +94 -46
- package/src/components/ReportAdButton.tsx +46 -0
- package/src/images/ReportIcon.png +0 -0
- package/src/index.tsx +146 -69
- package/src/util.ts +13 -0
- package/lib/typescript/example/index.d.ts +0 -1
- package/lib/typescript/example/src/App.d.ts +0 -9
- package/lib/typescript/jest.setup.d.ts +0 -5
package/lib/commonjs/util.js
CHANGED
|
@@ -17,6 +17,8 @@ exports.safeInvoke = safeInvoke;
|
|
|
17
17
|
* See main definition above.
|
|
18
18
|
* @param func - The function to call.
|
|
19
19
|
* @param arg1 - Function argument.
|
|
20
|
+
* @returns The return value of the executed function, or undefined if
|
|
21
|
+
* the function is null/undefined
|
|
20
22
|
*/
|
|
21
23
|
|
|
22
24
|
/**
|
|
@@ -24,6 +26,8 @@ exports.safeInvoke = safeInvoke;
|
|
|
24
26
|
* @param func - The function to call.
|
|
25
27
|
* @param arg1 - Function argument.
|
|
26
28
|
* @param arg2 - Function argument.
|
|
29
|
+
* @returns The return value of the executed function, or undefined if
|
|
30
|
+
* the function is null/undefined
|
|
27
31
|
*/
|
|
28
32
|
|
|
29
33
|
/**
|
|
@@ -32,6 +36,8 @@ exports.safeInvoke = safeInvoke;
|
|
|
32
36
|
* @param arg1 - Function argument.
|
|
33
37
|
* @param arg2 - Function argument.
|
|
34
38
|
* @param arg3 - Function argument.
|
|
39
|
+
* @returns The return value of the executed function, or undefined if
|
|
40
|
+
* the function is null/undefined
|
|
35
41
|
*/
|
|
36
42
|
|
|
37
43
|
/**
|
|
@@ -41,6 +47,8 @@ exports.safeInvoke = safeInvoke;
|
|
|
41
47
|
* @param arg2 - Function argument.
|
|
42
48
|
* @param arg3 - Function argument.
|
|
43
49
|
* @param arg4 - Function argument.
|
|
50
|
+
* @returns The return value of the executed function, or undefined if
|
|
51
|
+
* the function is null/undefined
|
|
44
52
|
*/
|
|
45
53
|
|
|
46
54
|
/**
|
|
@@ -51,6 +59,8 @@ exports.safeInvoke = safeInvoke;
|
|
|
51
59
|
* @param arg3 - Function argument.
|
|
52
60
|
* @param arg4 - Function argument.
|
|
53
61
|
* @param arg5 - Function argument.
|
|
62
|
+
* @returns The return value of the executed function, or undefined if
|
|
63
|
+
* the function is null/undefined
|
|
54
64
|
*/
|
|
55
65
|
|
|
56
66
|
/**
|
|
@@ -62,6 +72,8 @@ exports.safeInvoke = safeInvoke;
|
|
|
62
72
|
* @param arg4 - Function argument.
|
|
63
73
|
* @param arg5 - Function argument.
|
|
64
74
|
* @param arg6 - Function argument.
|
|
75
|
+
* @returns The return value of the executed function, or undefined if
|
|
76
|
+
* the function is null/undefined
|
|
65
77
|
*/
|
|
66
78
|
|
|
67
79
|
/**
|
|
@@ -71,11 +83,9 @@ exports.safeInvoke = safeInvoke;
|
|
|
71
83
|
* @returns the method to be called if its defined.
|
|
72
84
|
*/
|
|
73
85
|
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
74
|
-
function safeInvoke(func) {
|
|
86
|
+
function safeInvoke(func, ...args) {
|
|
75
87
|
if (func) {
|
|
76
|
-
|
|
77
|
-
args[_key - 1] = arguments[_key];
|
|
78
|
-
}
|
|
88
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
79
89
|
return func(...args);
|
|
80
90
|
}
|
|
81
91
|
}
|
package/lib/commonjs/util.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["safeInvoke","func","args"],"
|
|
1
|
+
{"version":3,"names":["safeInvoke","func","args"],"sourceRoot":"../../src","sources":["util.ts"],"mappings":";;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AASA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAYA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASA,UAAUA,CAACC,IAAoB,EAAE,GAAGC,IAAW,EAAO;EAClE,IAAID,IAAI,EAAE;IACN;IACA,OAAOA,IAAI,CAAC,GAAGC,IAAI,CAAC;EACxB;AACJ","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["axios","adadaptedApiRequestMocks","ApiEnv","ListManagerApiEnv","PayloadApiEnv","initializeSession","requestData","deviceOS","apiEnv","Mock","method","data","headers","accept","refreshSessionData","aid","sid","uid","reportAdEvent","getKeywordIntercepts","reportInterceptEvent","reportListManagerEvents","reportPayloadContentStatus","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":"AAAA;AACA;AACA;;AAiBA,OAAOA,KAAK,MAAyB,OAAO;AAC5C,OAAO,KAAKC,wBAAwB,MAAM,6BAA6B;AACvE,SAASC,MAAM,EAAYC,iBAAiB,EAAEC,aAAa,QAAQ,UAAU;;AAE7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,iBAAiB,CAC7BC,WAAqC,EACrCC,QAAkB,EAClBC,MAAc,EACmC;EACjD,OAAOA,MAAM,KAAKN,MAAM,CAACO,IAAI,GACvBR,wBAAwB,CAACI,iBAAiB,EAAE,GAC5CL,KAAK,CAAE,GAAEQ,MAAO,YAAWD,QAAS,sBAAqB,EAAE;IACvDG,MAAM,EAAE,MAAM;IACdC,IAAI,EAAEL,WAAW;IACjBM,OAAO,EAAE;MACLC,MAAM,EAAE;IACZ;EACJ,CAAC,CAAC;AACZ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,kBAAkB,CAC9BR,WAAsC,EACtCC,QAAkB,EAClBC,MAAc,EACoC;EAClD,OAAOA,MAAM,KAAKN,MAAM,CAACO,IAAI,GACvBR,wBAAwB,CAACa,kBAAkB,EAAE,GAC7Cd,KAAK,CACA,GAAEQ,MAAO,YAAWD,QAAS,qBAAoBD,WAAW,CAACS,GAAI,QAAOT,WAAW,CAACU,GAAI,QAAOV,WAAW,CAACW,GAAI,EAAC,EACjH;IACIP,MAAM,EAAE,KAAK;IACbE,OAAO,EAAE;MACLC,MAAM,EAAE;IACZ;EAC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ACA;AACA,OAAO,SAASQ,uBAAuB,CACnCf,WAAyC,EACzCC,QAAkB,EAClBC,MAAyB,EACG;EAC5B,OAAOA,MAAM,KAAKL,iBAAiB,CAACM,IAAI,GAClCR,wBAAwB,CAACoB,uBAAuB,EAAE,GAClDrB,KAAK,CAAE,GAAEQ,MAAO,QAAOD,QAAS,SAAQ,EAAE;IACtCG,MAAM,EAAE,MAAM;IACdC,IAAI,EAAEL,WAAW;IACjBM,OAAO,EAAE;MACLC,MAAM,EAAE;IACZ;EACJ,CAAC,CAAC;AACZ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASS,0BAA0B,CACtChB,WAAqC,EACrCE,MAAqB,EACO;EAC5B,OAAOA,MAAM,KAAKJ,aAAa,CAACK,IAAI,GAC9BR,wBAAwB,CAACqB,0BAA0B,EAAE,GACrDtB,KAAK,CAAE,GAAEQ,MAAO,eAAc,EAAE;IAC5BE,MAAM,EAAE,MAAM;IACdC,IAAI,EAAEL,WAAW;IACjBM,OAAO,EAAE;MACLC,MAAM,EAAE;IACZ;EACJ,CAAC,CAAC;AACZ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASU,sBAAsB,CAClCjB,WAA2C,EAC3CE,MAAqB,EACkC;EACvD,OAAOA,MAAM,KAAKJ,aAAa,CAACK,IAAI,GAC9BR,wBAAwB,CAACsB,sBAAsB,EAAE,GACjDvB,KAAK,CAAE,GAAEQ,MAAO,aAAY,EAAE;IAC1BE,MAAM,EAAE,MAAM;IACdC,IAAI,EAAEL,WAAW;IACjBM,OAAO,EAAE;MACLC,MAAM,EAAE;IACZ;EACJ,CAAC,CAAC;AACZ"}
|
|
1
|
+
{"version":3,"names":["axios","adadaptedApiRequestMocks","ApiEnv","ListManagerApiEnv","PayloadApiEnv","initializeSession","requestData","deviceOS","apiEnv","Mock","method","data","headers","accept","refreshSessionData","aid","sid","uid","reportAdEvent","getKeywordIntercepts","reportInterceptEvent","reportListManagerEvents","reportPayloadContentStatus","retrievePayloadContent"],"sourceRoot":"../../../src","sources":["api/adadaptedApiRequests.ts"],"mappings":";;AAAA;AACA;AACA;;AAiBA,OAAOA,KAAK,MAAyB,OAAO;AAC5C,OAAO,KAAKC,wBAAwB,MAAM,6BAA6B;AACvE,SAASC,MAAM,EAAYC,iBAAiB,EAAEC,aAAa,QAAQ,UAAU;;AAE7E;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,iBAAiBA,CAC7BC,WAAqC,EACrCC,QAAkB,EAClBC,MAAc,EACmC;EACjD,OAAOA,MAAM,KAAKN,MAAM,CAACO,IAAI,GACvBR,wBAAwB,CAACI,iBAAiB,CAAC,CAAC,GAC5CL,KAAK,CAAC,GAAGQ,MAAM,YAAYD,QAAQ,sBAAsB,EAAE;IACvDG,MAAM,EAAE,MAAM;IACdC,IAAI,EAAEL,WAAW;IACjBM,OAAO,EAAE;MACLC,MAAM,EAAE;IACZ;EACJ,CAAC,CAAC;AACZ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,kBAAkBA,CAC9BR,WAAsC,EACtCC,QAAkB,EAClBC,MAAc,EACoC;EAClD,OAAOA,MAAM,KAAKN,MAAM,CAACO,IAAI,GACvBR,wBAAwB,CAACa,kBAAkB,CAAC,CAAC,GAC7Cd,KAAK,CACD,GAAGQ,MAAM,YAAYD,QAAQ,qBAAqBD,WAAW,CAACS,GAAG,QAAQT,WAAW,CAACU,GAAG,QAAQV,WAAW,CAACW,GAAG,EAAE,EACjH;IACIP,MAAM,EAAE,KAAK;IACbE,OAAO,EAAE;MACLC,MAAM,EAAE;IACZ;EACJ,CACJ,CAAC;AACX;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASK,aAAaA,CACzBZ,WAAiC,EACjCC,QAAkB,EAClBC,MAAc,EAC+B;EAC7C,OAAOA,MAAM,KAAKN,MAAM,CAACO,IAAI,GACvBR,wBAAwB,CAACiB,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KAAK,CAAC,GAAGQ,MAAM,QAAQD,QAAQ,SAAS,EAAE;IACtCG,MAAM,EAAE,MAAM;IACdC,IAAI,EAAEL,WAAW;IACjBM,OAAO,EAAE;MACLC,MAAM,EAAE;IACZ;EACJ,CAAC,CAAC;AACZ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASS,0BAA0BA,CACtChB,WAAqC,EACrCE,MAAqB,EACO;EAC5B,OAAOA,MAAM,KAAKJ,aAAa,CAACK,IAAI,GAC9BR,wBAAwB,CAACqB,0BAA0B,CAAC,CAAC,GACrDtB,KAAK,CAAC,GAAGQ,MAAM,eAAe,EAAE;IAC5BE,MAAM,EAAE,MAAM;IACdC,IAAI,EAAEL,WAAW;IACjBM,OAAO,EAAE;MACLC,MAAM,EAAE;IACZ;EACJ,CAAC,CAAC;AACZ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASU,sBAAsBA,CAClCjB,WAA2C,EAC3CE,MAAqB,EACkC;EACvD,OAAOA,MAAM,KAAKJ,aAAa,CAACK,IAAI,GAC9BR,wBAAwB,CAACsB,sBAAsB,CAAC,CAAC,GACjDvB,KAAK,CAAC,GAAGQ,MAAM,aAAa,EAAE;IAC1BE,MAAM,EAAE,MAAM;IACdC,IAAI,EAAEL,WAAW;IACjBM,OAAO,EAAE;MACLC,MAAM,EAAE;IACZ;EACJ,CAAC,CAAC;AACZ","ignoreList":[]}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
1
3
|
/**
|
|
2
4
|
* Contains all API request mocks for the Rewards API.
|
|
3
5
|
*/
|
|
4
|
-
|
|
6
|
+
import { AxiosHeaders } from "axios";
|
|
5
7
|
import { AdActionType } from "./adadaptedApiTypes";
|
|
6
8
|
|
|
7
9
|
/**
|
|
@@ -13,7 +15,9 @@ export function initializeSession() {
|
|
|
13
15
|
resolve({
|
|
14
16
|
data: AD_SESSION_DATA,
|
|
15
17
|
then: undefined,
|
|
16
|
-
config: {
|
|
18
|
+
config: {
|
|
19
|
+
headers: new AxiosHeaders()
|
|
20
|
+
},
|
|
17
21
|
headers: {},
|
|
18
22
|
status: 200,
|
|
19
23
|
statusText: "200"
|
|
@@ -30,7 +34,9 @@ export function refreshSessionData() {
|
|
|
30
34
|
resolve({
|
|
31
35
|
data: REFRESHED_AD_SESSION_DATA,
|
|
32
36
|
then: undefined,
|
|
33
|
-
config: {
|
|
37
|
+
config: {
|
|
38
|
+
headers: new AxiosHeaders()
|
|
39
|
+
},
|
|
34
40
|
headers: {},
|
|
35
41
|
status: 200,
|
|
36
42
|
statusText: "200"
|
|
@@ -49,7 +55,9 @@ export function reportAdEvent() {
|
|
|
49
55
|
results: ["Ok"]
|
|
50
56
|
},
|
|
51
57
|
then: undefined,
|
|
52
|
-
config: {
|
|
58
|
+
config: {
|
|
59
|
+
headers: new AxiosHeaders()
|
|
60
|
+
},
|
|
53
61
|
headers: {},
|
|
54
62
|
status: 200,
|
|
55
63
|
statusText: "200"
|
|
@@ -66,7 +74,9 @@ export function getKeywordIntercepts() {
|
|
|
66
74
|
resolve({
|
|
67
75
|
data: KEYWORD_INTERCEPT_DATA,
|
|
68
76
|
then: undefined,
|
|
69
|
-
config: {
|
|
77
|
+
config: {
|
|
78
|
+
headers: new AxiosHeaders()
|
|
79
|
+
},
|
|
70
80
|
headers: {},
|
|
71
81
|
status: 200,
|
|
72
82
|
statusText: "200"
|
|
@@ -85,7 +95,9 @@ export function reportInterceptEvent() {
|
|
|
85
95
|
results: ["Ok"]
|
|
86
96
|
},
|
|
87
97
|
then: undefined,
|
|
88
|
-
config: {
|
|
98
|
+
config: {
|
|
99
|
+
headers: new AxiosHeaders()
|
|
100
|
+
},
|
|
89
101
|
headers: {},
|
|
90
102
|
status: 200,
|
|
91
103
|
statusText: "200"
|
|
@@ -102,7 +114,9 @@ export function reportListManagerEvents() {
|
|
|
102
114
|
resolve({
|
|
103
115
|
data: undefined,
|
|
104
116
|
then: undefined,
|
|
105
|
-
config: {
|
|
117
|
+
config: {
|
|
118
|
+
headers: new AxiosHeaders()
|
|
119
|
+
},
|
|
106
120
|
headers: {},
|
|
107
121
|
status: 200,
|
|
108
122
|
statusText: "200"
|
|
@@ -119,7 +133,9 @@ export function reportPayloadContentStatus() {
|
|
|
119
133
|
resolve({
|
|
120
134
|
data: undefined,
|
|
121
135
|
then: undefined,
|
|
122
|
-
config: {
|
|
136
|
+
config: {
|
|
137
|
+
headers: new AxiosHeaders()
|
|
138
|
+
},
|
|
123
139
|
headers: {},
|
|
124
140
|
status: 200,
|
|
125
141
|
statusText: "200"
|
|
@@ -149,7 +165,9 @@ export function retrievePayloadContent() {
|
|
|
149
165
|
}]
|
|
150
166
|
},
|
|
151
167
|
then: undefined,
|
|
152
|
-
config: {
|
|
168
|
+
config: {
|
|
169
|
+
headers: new AxiosHeaders()
|
|
170
|
+
},
|
|
153
171
|
headers: {},
|
|
154
172
|
status: 200,
|
|
155
173
|
statusText: "200"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["AdActionType","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","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":"AAAA;AACA;AACA;;AAEA,SACIA,YAAY,QAST,qBAAqB;;AAE5B;AACA;AACA;AACA;AACA,OAAO,SAASC,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;AACA,OAAO,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;AACA,OAAO,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,EAAE,CAAC,CAAC;MACVC,OAAO,EAAE,CAAC,CAAC;MACXC,MAAM,EAAE,GAAG;MACXC,UAAU,EAAE;IA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ACA,MAAMR,sBAAyC,GAAG;EAC9CsC,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":["AxiosHeaders","AdActionType","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","CONTENT","action_path","payload","search_id","min_match_length","terms","term_id","term","replacement","priority"],"sourceRoot":"../../../src","sources":["api/adadaptedApiRequests.mock.ts"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,YAAY,QAAuB,OAAO;AACnD,SACIC,YAAY,QAST,qBAAqB;;AAE5B;AACA;AACA;AACA;AACA,OAAO,SAASC,iBAAiBA,CAAA,EAE/B;EACE,OAAO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,MAAMR,sBAAyC,GAAG;EAC9CsC,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","ignoreList":[]}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
1
3
|
// =============================================================================
|
|
2
4
|
// API TYPE MODELS
|
|
3
5
|
// =============================================================================
|
|
@@ -56,42 +58,37 @@
|
|
|
56
58
|
/**
|
|
57
59
|
* Enumeration that defines the possible values for a List Manager Event Source.
|
|
58
60
|
*/
|
|
59
|
-
export let ListManagerEventSource
|
|
60
|
-
|
|
61
|
-
/**
|
|
62
|
-
* Enumeration that defines the possible values for a List Manager Event Name.
|
|
63
|
-
*/
|
|
64
|
-
(function (ListManagerEventSource) {
|
|
61
|
+
export let ListManagerEventSource = /*#__PURE__*/function (ListManagerEventSource) {
|
|
65
62
|
ListManagerEventSource["APP"] = "app";
|
|
66
|
-
|
|
67
|
-
|
|
63
|
+
return ListManagerEventSource;
|
|
64
|
+
}({});
|
|
68
65
|
|
|
69
66
|
/**
|
|
70
|
-
*
|
|
67
|
+
* Enumeration that defines the possible values for a List Manager Event Name.
|
|
71
68
|
*/
|
|
72
|
-
|
|
69
|
+
export let ListManagerEventName = /*#__PURE__*/function (ListManagerEventName) {
|
|
73
70
|
ListManagerEventName["ADDED_TO_LIST"] = "user_added_to_list";
|
|
74
71
|
ListManagerEventName["CROSSED_OFF_LIST"] = "user_crossed_off_list";
|
|
75
72
|
ListManagerEventName["DELETED_FROM_LIST"] = "user_deleted_from_list";
|
|
76
|
-
|
|
77
|
-
|
|
73
|
+
return ListManagerEventName;
|
|
74
|
+
}({});
|
|
78
75
|
|
|
79
76
|
/**
|
|
80
|
-
* Enum defining the
|
|
77
|
+
* Enum defining the available ad action types.
|
|
81
78
|
*/
|
|
82
|
-
|
|
79
|
+
export let AdActionType = /*#__PURE__*/function (AdActionType) {
|
|
83
80
|
AdActionType["CONTENT"] = "c";
|
|
84
81
|
AdActionType["EXTERNAL"] = "e";
|
|
85
82
|
AdActionType["LINK"] = "l";
|
|
86
83
|
AdActionType["APP"] = "a";
|
|
87
84
|
AdActionType["NONE"] = "n";
|
|
88
|
-
|
|
89
|
-
|
|
85
|
+
return AdActionType;
|
|
86
|
+
}({});
|
|
90
87
|
|
|
91
88
|
/**
|
|
92
|
-
*
|
|
89
|
+
* Enum defining the different types of events that can be reported.
|
|
93
90
|
*/
|
|
94
|
-
|
|
91
|
+
export let ReportedEventType = /*#__PURE__*/function (ReportedEventType) {
|
|
95
92
|
ReportedEventType["IMPRESSION"] = "impression";
|
|
96
93
|
ReportedEventType["INVISIBLE_IMPRESSION"] = "invisible_impression";
|
|
97
94
|
ReportedEventType["INTERACTION"] = "interaction";
|
|
@@ -99,8 +96,17 @@ export let ReportedEventType;
|
|
|
99
96
|
ReportedEventType["MATCHED"] = "matched";
|
|
100
97
|
ReportedEventType["PRESENTED"] = "presented";
|
|
101
98
|
ReportedEventType["SELECTED"] = "selected";
|
|
102
|
-
|
|
103
|
-
|
|
99
|
+
return ReportedEventType;
|
|
100
|
+
}({});
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Enumeration defining the possible payload acknowledgment status values.
|
|
104
|
+
*/
|
|
105
|
+
export let PayloadStatus = /*#__PURE__*/function (PayloadStatus) {
|
|
106
|
+
PayloadStatus["DELIVERED"] = "delivered";
|
|
107
|
+
PayloadStatus["REJECTED"] = "rejected";
|
|
108
|
+
return PayloadStatus;
|
|
109
|
+
}({});
|
|
104
110
|
|
|
105
111
|
// =============================================================================
|
|
106
112
|
// REQUEST MODELS
|
|
@@ -108,8 +114,63 @@ export let PayloadStatus;
|
|
|
108
114
|
/**
|
|
109
115
|
* The base request inputs that most requests will use.
|
|
110
116
|
*/
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Interface for the request of the Initialize Session API call.
|
|
120
|
+
*/
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Interface for the request of the Refresh Session Data API call.
|
|
124
|
+
*/
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Interface for the request that reports an ad event.
|
|
128
|
+
*/
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* Interface for the request of the Refresh Session Data API call.
|
|
132
|
+
*/
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* Interface for the request that reports an intercept event.
|
|
136
|
+
*/
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* Interface for the request that reports List Manager data.
|
|
140
|
+
*/
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* Interface for the request that reports Payload tracking data.
|
|
144
|
+
*/
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* Interface for the request that gets Payload server data.
|
|
148
|
+
*/
|
|
149
|
+
|
|
150
|
+
// =============================================================================
|
|
151
|
+
// RESPONSE MODELS
|
|
152
|
+
// =============================================================================
|
|
153
|
+
/**
|
|
154
|
+
* Interface for the response of the Campaign API request.
|
|
155
|
+
*/
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* Interface for the response of the Campaign API request.
|
|
159
|
+
*/
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* Interface for the response of the Report Ad Event API request.
|
|
163
|
+
*/
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* Interface for the response of the Keyword Intercepts API request.
|
|
167
|
+
*/
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* Interface for the response of the Report Intercept Event API request.
|
|
171
|
+
*/
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* Interface for the response of the Retrieve Payload Item Data API request.
|
|
175
|
+
*/
|
|
115
176
|
//# 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 * Track impression status.\n */\n impression_tracked?: boolean;\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 an ad is not viewable before timimg out.\n */\n INVISIBLE_IMPRESSION = \"invisible_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;;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;AACA,WAAYA,sBAAsB;;AAOlC;AACA;AACA;AAFA,WAPYA,sBAAsB;EAAtBA,sBAAsB;AAAA,GAAtBA,sBAAsB,KAAtBA,sBAAsB;AAUlC,WAAYC,oBAAoB;;AAehC;AACA;AACA;AAFA,WAfYA,oBAAoB;EAApBA,oBAAoB;EAApBA,oBAAoB;EAApBA,oBAAoB;AAAA,GAApBA,oBAAoB,KAApBA,oBAAoB;AAkBhC,WAAYC,YAAY;;AAyBxB;AACA;AACA;AAFA,WAzBYA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;AAAA,GAAZA,YAAY,KAAZA,YAAY;AA4BxB,WAAYC,iBAAiB;;AAgC7B;AACA;AACA;AAFA,WAhCYA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;AAAA,GAAjBA,iBAAiB,KAAjBA,iBAAiB;AAmC7B,WAAYC,aAAa;;AAWzB;AACA;AACA;AACA;AACA;AACA;AAFA,WAdYA,aAAa;EAAbA,aAAa;EAAbA,aAAa;AAAA,GAAbA,aAAa,KAAbA,aAAa"}
|
|
1
|
+
{"version":3,"names":["ListManagerEventSource","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;;AAqCA;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;AACA,WAAYA,sBAAsB,0BAAtBA,sBAAsB;EAAtBA,sBAAsB;EAAA,OAAtBA,sBAAsB;AAAA;;AAOlC;AACA;AACA;AACA,WAAYC,oBAAoB,0BAApBA,oBAAoB;EAApBA,oBAAoB;EAApBA,oBAAoB;EAApBA,oBAAoB;EAAA,OAApBA,oBAAoB;AAAA;;AAehC;AACA;AACA;AACA,WAAYC,YAAY,0BAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAA,OAAZA,YAAY;AAAA;;AAyBxB;AACA;AACA;AACA,WAAYC,iBAAiB,0BAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAA,OAAjBA,iBAAiB;AAAA;;AAgC7B;AACA;AACA;AACA,WAAYC,aAAa,0BAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAA,OAAbA,aAAa;AAAA;;AAWzB;AACA;AACA;AACA;AACA;AACA;;AAgBA;AACA;AACA;;AA4EA;AACA;AACA;;AAgBA;AACA;AACA;;AAQA;AACA;AACA;;AAgBA;AACA;AACA;;AAQA;AACA;AACA;;AAQA;AACA;AACA;;AAQA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;;AAGA;AACA;AACA;;AASA;AACA;AACA;;AAGA;AACA;AACA;;AASA;AACA;AACA","ignoreList":[]}
|