@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.
Files changed (75) hide show
  1. package/android/.project +1 -1
  2. package/android/.settings/org.eclipse.buildship.core.prefs +2 -2
  3. package/android/bin/build.gradle +6 -5
  4. package/android/bin/gradle.properties +4 -4
  5. package/android/build.gradle +6 -5
  6. package/android/gradle.properties +3 -3
  7. package/android/src/main/AndroidManifest.xml +1 -3
  8. package/lib/commonjs/api/adadaptedApiRequests.js.map +1 -1
  9. package/lib/commonjs/api/adadaptedApiRequests.mock.js +25 -8
  10. package/lib/commonjs/api/adadaptedApiRequests.mock.js.map +1 -1
  11. package/lib/commonjs/api/adadaptedApiTypes.js +72 -26
  12. package/lib/commonjs/api/adadaptedApiTypes.js.map +1 -1
  13. package/lib/commonjs/components/AdZone.js +200 -129
  14. package/lib/commonjs/components/AdZone.js.map +1 -1
  15. package/lib/commonjs/components/ReportAdButton.js +38 -0
  16. package/lib/commonjs/components/ReportAdButton.js.map +1 -0
  17. package/lib/commonjs/images/ReportIcon.png +0 -0
  18. package/lib/commonjs/index.js +162 -78
  19. package/lib/commonjs/index.js.map +1 -1
  20. package/lib/commonjs/types.js +4 -0
  21. package/lib/commonjs/types.js.map +1 -1
  22. package/lib/commonjs/util.js +13 -0
  23. package/lib/commonjs/util.js.map +1 -1
  24. package/lib/module/api/adadaptedApiRequests.js.map +1 -1
  25. package/lib/module/api/adadaptedApiRequests.mock.js +25 -9
  26. package/lib/module/api/adadaptedApiRequests.mock.js.map +1 -1
  27. package/lib/module/api/adadaptedApiTypes.js +70 -24
  28. package/lib/module/api/adadaptedApiTypes.js.map +1 -1
  29. package/lib/module/components/AdZone.js +192 -128
  30. package/lib/module/components/AdZone.js.map +1 -1
  31. package/lib/module/components/ReportAdButton.js +30 -0
  32. package/lib/module/components/ReportAdButton.js.map +1 -0
  33. package/lib/module/images/ReportIcon.png +0 -0
  34. package/lib/module/index.js +162 -77
  35. package/lib/module/index.js.map +1 -1
  36. package/lib/module/types.js +1 -1
  37. package/lib/module/types.js.map +1 -1
  38. package/lib/module/util.js +14 -2
  39. package/lib/module/util.js.map +1 -1
  40. package/lib/typescript/example/index.d.ts +1 -0
  41. package/lib/typescript/example/index.d.ts.map +1 -0
  42. package/lib/typescript/example/src/App.d.ts +15 -62
  43. package/lib/typescript/example/src/App.d.ts.map +1 -0
  44. package/lib/typescript/example/src/OffScreenAdZone.d.ts +38 -0
  45. package/lib/typescript/example/src/OffScreenAdZone.d.ts.map +1 -0
  46. package/lib/typescript/example/src/StandardAdZone.d.ts +38 -0
  47. package/lib/typescript/example/src/StandardAdZone.d.ts.map +1 -0
  48. package/lib/typescript/index.d.ts +2 -0
  49. package/lib/typescript/index.d.ts.map +1 -0
  50. package/lib/typescript/jest.setup.d.ts +2 -1
  51. package/lib/typescript/jest.setup.d.ts.map +1 -0
  52. package/lib/typescript/src/api/adadaptedApiRequests.d.ts +1 -0
  53. package/lib/typescript/src/api/adadaptedApiRequests.d.ts.map +1 -0
  54. package/lib/typescript/src/api/adadaptedApiRequests.mock.d.ts +1 -0
  55. package/lib/typescript/src/api/adadaptedApiRequests.mock.d.ts.map +1 -0
  56. package/lib/typescript/src/api/adadaptedApiTypes.d.ts +9 -0
  57. package/lib/typescript/src/api/adadaptedApiTypes.d.ts.map +1 -0
  58. package/lib/typescript/src/components/AdZone.d.ts +9 -80
  59. package/lib/typescript/src/components/AdZone.d.ts.map +1 -0
  60. package/lib/typescript/src/components/ReportAdButton.d.ts +19 -0
  61. package/lib/typescript/src/components/ReportAdButton.d.ts.map +1 -0
  62. package/lib/typescript/src/index.d.ts +39 -1
  63. package/lib/typescript/src/index.d.ts.map +1 -0
  64. package/lib/typescript/src/types.d.ts +3 -2
  65. package/lib/typescript/src/types.d.ts.map +1 -0
  66. package/lib/typescript/src/util.d.ts +13 -0
  67. package/lib/typescript/src/util.d.ts.map +1 -0
  68. package/package.json +155 -155
  69. package/src/api/adadaptedApiRequests.mock.ts +25 -9
  70. package/src/api/adadaptedApiTypes.ts +8 -0
  71. package/src/components/AdZone.tsx +222 -173
  72. package/src/components/ReportAdButton.tsx +46 -0
  73. package/src/images/ReportIcon.png +0 -0
  74. package/src/index.tsx +160 -56
  75. package/src/util.ts +13 -0
@@ -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
  /**
@@ -76,6 +88,7 @@ function safeInvoke(func) {
76
88
  for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
77
89
  args[_key - 1] = arguments[_key];
78
90
  }
91
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
79
92
  return func(...args);
80
93
  }
81
94
  }
@@ -1 +1 @@
1
- {"version":3,"names":["safeInvoke","func","args"],"sources":["util.ts"],"sourcesContent":["import { nil } from \"./types\";\nimport { NoInfer } from \"type-zoo\";\n\n/**\n * Convenient utility for calling a function that may or may\n * not be undefined/null.\n * Does nothing if the provided function is undefined/null.\n * @param func - The function to be called.\n * @returns The return value of the executed function, or undefined if\n * the function is null/undefined\n */\nexport function safeInvoke<R>(func: (() => R) | nil): R | undefined;\n/**\n * See main definition above.\n * @param func - The function to call.\n * @param arg1 - Function argument.\n */\nexport function safeInvoke<A1, R>(\n func: ((arg1: A1) => R) | nil,\n arg1: NoInfer<A1>\n): R | undefined;\n/**\n * See main definition above.\n * @param func - The function to call.\n * @param arg1 - Function argument.\n * @param arg2 - Function argument.\n */\nexport function safeInvoke<A1, A2, R>(\n func: ((arg1: A1, arg2: A2) => R) | nil,\n arg1: NoInfer<A1>,\n arg2: NoInfer<A2>\n): R | undefined;\n/**\n * See main definition above.\n * @param func - The function to call.\n * @param arg1 - Function argument.\n * @param arg2 - Function argument.\n * @param arg3 - Function argument.\n */\nexport function safeInvoke<A1, A2, A3, R>(\n func: ((arg1: A1, arg2: A2, arg3: A3) => R) | nil,\n arg1: NoInfer<A1>,\n arg2: NoInfer<A2>,\n arg3: NoInfer<A3>\n): R | undefined;\n/**\n * See main definition above.\n * @param func - The function to call.\n * @param arg1 - Function argument.\n * @param arg2 - Function argument.\n * @param arg3 - Function argument.\n * @param arg4 - Function argument.\n */\nexport function safeInvoke<A1, A2, A3, A4, R>(\n func: ((arg1: A1, arg2: A2, arg3: A3, arg4: A4) => R) | nil,\n arg1: NoInfer<A1>,\n arg2: NoInfer<A2>,\n arg3: NoInfer<A3>,\n arg4: NoInfer<A4>\n): R | undefined;\n/**\n * See main definition above.\n * @param func - The function to call.\n * @param arg1 - Function argument.\n * @param arg2 - Function argument.\n * @param arg3 - Function argument.\n * @param arg4 - Function argument.\n * @param arg5 - Function argument.\n */\nexport function safeInvoke<A1, A2, A3, A4, A5, R>(\n func: ((arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5) => R) | nil,\n arg1: NoInfer<A1>,\n arg2: NoInfer<A2>,\n arg3: NoInfer<A3>,\n arg4: NoInfer<A4>,\n arg5: NoInfer<A5>\n): R | undefined;\n/**\n * See main definition above.\n * @param func - The function to call.\n * @param arg1 - Function argument.\n * @param arg2 - Function argument.\n * @param arg3 - Function argument.\n * @param arg4 - Function argument.\n * @param arg5 - Function argument.\n * @param arg6 - Function argument.\n */\nexport function safeInvoke<A1, A2, A3, A4, A5, A6, R>(\n func:\n | ((arg1: A1, arg2: A2, arg3: A3, arg4: A4, arg5: A5, arg6: A6) => R)\n | nil,\n arg1: NoInfer<A1>,\n arg2: NoInfer<A2>,\n arg3: NoInfer<A3>,\n arg4: NoInfer<A4>,\n arg5: NoInfer<A5>,\n arg6: NoInfer<A6>\n): R | undefined;\n/**\n * See main definition above.\n * @param func - The function to call.\n * @param args - All arguments to call with the function.\n * @returns the method to be called if its defined.\n */\n// eslint-disable-next-line @typescript-eslint/ban-types\nexport function safeInvoke(func: Function | nil, ...args: any[]): any {\n if (func) {\n return func(...args);\n }\n}\n"],"mappings":";;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAKA;AACA;AACA;AACA;AACA;AACA;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AASA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAYA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASA,UAAU,CAACC,IAAoB,EAAuB;EAClE,IAAIA,IAAI,EAAE;IAAA,kCADsCC,IAAI;MAAJA,IAAI;IAAA;IAEhD,OAAOD,IAAI,CAAC,GAAGC,IAAI,CAAC;EACxB;AACJ"}
1
+ {"version":3,"names":["safeInvoke","func","_len","arguments","length","args","Array","_key"],"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,EAAuB;EAClE,IAAIA,IAAI,EAAE;IAAA,SAAAC,IAAA,GAAAC,SAAA,CAAAC,MAAA,EADsCC,IAAI,OAAAC,KAAA,CAAAJ,IAAA,OAAAA,IAAA,WAAAK,IAAA,MAAAA,IAAA,GAAAL,IAAA,EAAAK,IAAA;MAAJF,IAAI,CAAAE,IAAA,QAAAJ,SAAA,CAAAI,IAAA;IAAA;IAEhD;IACA,OAAON,IAAI,CAAC,GAAGI,IAAI,CAAC;EACxB;AACJ"}
@@ -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;EACJ,CAAC,CACJ;AACX;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASK,aAAa,CACzBZ,WAAiC,EACjCC,QAAkB,EAClBC,MAAc,EAC+B;EAC7C,OAAOA,MAAM,KAAKN,MAAM,C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B,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;AACv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ACA;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,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,sBAAsBA,CAClCjB,WAA2C,EAC3CE,MAAqB,EACkC;EACvD,OAAOA,MAAM,KAAKJ,aAAa,CAACK,IAAI,GAC9BR,wBAAwB,CAACsB,sBAAsB,CAAC,CAAC,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,7 +1,7 @@
1
1
  /**
2
2
  * Contains all API request mocks for the Rewards API.
3
3
  */
4
-
4
+ import { AxiosHeaders } from "axios";
5
5
  import { AdActionType } from "./adadaptedApiTypes";
6
6
 
7
7
  /**
@@ -13,7 +13,9 @@ export function initializeSession() {
13
13
  resolve({
14
14
  data: AD_SESSION_DATA,
15
15
  then: undefined,
16
- config: {},
16
+ config: {
17
+ headers: new AxiosHeaders()
18
+ },
17
19
  headers: {},
18
20
  status: 200,
19
21
  statusText: "200"
@@ -30,7 +32,9 @@ export function refreshSessionData() {
30
32
  resolve({
31
33
  data: REFRESHED_AD_SESSION_DATA,
32
34
  then: undefined,
33
- config: {},
35
+ config: {
36
+ headers: new AxiosHeaders()
37
+ },
34
38
  headers: {},
35
39
  status: 200,
36
40
  statusText: "200"
@@ -49,7 +53,9 @@ export function reportAdEvent() {
49
53
  results: ["Ok"]
50
54
  },
51
55
  then: undefined,
52
- config: {},
56
+ config: {
57
+ headers: new AxiosHeaders()
58
+ },
53
59
  headers: {},
54
60
  status: 200,
55
61
  statusText: "200"
@@ -66,7 +72,9 @@ export function getKeywordIntercepts() {
66
72
  resolve({
67
73
  data: KEYWORD_INTERCEPT_DATA,
68
74
  then: undefined,
69
- config: {},
75
+ config: {
76
+ headers: new AxiosHeaders()
77
+ },
70
78
  headers: {},
71
79
  status: 200,
72
80
  statusText: "200"
@@ -85,7 +93,9 @@ export function reportInterceptEvent() {
85
93
  results: ["Ok"]
86
94
  },
87
95
  then: undefined,
88
- config: {},
96
+ config: {
97
+ headers: new AxiosHeaders()
98
+ },
89
99
  headers: {},
90
100
  status: 200,
91
101
  statusText: "200"
@@ -102,7 +112,9 @@ export function reportListManagerEvents() {
102
112
  resolve({
103
113
  data: undefined,
104
114
  then: undefined,
105
- config: {},
115
+ config: {
116
+ headers: new AxiosHeaders()
117
+ },
106
118
  headers: {},
107
119
  status: 200,
108
120
  statusText: "200"
@@ -119,7 +131,9 @@ export function reportPayloadContentStatus() {
119
131
  resolve({
120
132
  data: undefined,
121
133
  then: undefined,
122
- config: {},
134
+ config: {
135
+ headers: new AxiosHeaders()
136
+ },
123
137
  headers: {},
124
138
  status: 200,
125
139
  statusText: "200"
@@ -149,7 +163,9 @@ export function retrievePayloadContent() {
149
163
  }]
150
164
  },
151
165
  then: undefined,
152
- config: {},
166
+ config: {
167
+ headers: new AxiosHeaders()
168
+ },
153
169
  headers: {},
154
170
  status: 200,
155
171
  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&amp;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&amp;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;MACX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E,eAAe;QAC9BC,WAAW,EAAEnD,YAAY,CAACoD,OAAO;QACjCC,WAAW,EAAE,EAAE;QACfC,OAAO,EAAE;UACL9B,mBAAmB,EAAE,CACjB;YACIE,eAAe,EAAE,GAAG;YACpBI,aAAa,EAAE,OAAO;YACtBC,gBAAgB,EAAE,EAAE;YACpBF,gBAAgB,EAAE,EAAE;YACpBD,aAAa,EAAE,EAAE;YACjBD,WAAW,EAAE,EAAE;YACfF,aAAa,EAAE;UACnB,CAAC;QAET;MACJ,CAAC;IAET;EACJ;AACJ,CAAC;;AAED;AACA;AACA;AACA,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,IAAIC,OAAO,CAA4CC,OAAO,IAAK;IACtEA,OAAO,CAAC;MACJC,IAAI,EAAEC,eAAe;MACrBC,IAAI,EAAEC,SAAS;MACfC,MAAM,EAAE;QACJC,OAAO,EAAE,IAAIV,YAAY,CAAC;MAC9B,CAAC;MACDU,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,kBAAkBA,CAAA,EAEhC;EACE,OAAO,IAAIV,OAAO,CAA6CC,OAAO,IAAK;IACvEA,OAAO,CAAC;MACJC,IAAI,EAAES,yBAAyB;MAC/BP,IAAI,EAAEC,SAAS;MACfC,MAAM,EAAE;QACJC,OAAO,EAAE,IAAIV,YAAY,CAAC;MAC9B,CAAC;MACDU,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,aAAaA,CAAA,EAAkD;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;Q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C9BC,WAAW,EAAEnD,YAAY,CAACoD,OAAO;QACjCC,WAAW,EAAE,EAAE;QACfC,OAAO,EAAE;UACL9B,mBAAmB,EAAE,CACjB;YACIE,eAAe,EAAE,GAAG;YACpBI,aAAa,EAAE,OAAO;YACtBC,gBAAgB,EAAE,EAAE;YACpBF,gBAAgB,EAAE,EAAE;YACpBD,aAAa,EAAE,EAAE;YACjBD,WAAW,EAAE,EAAE;YACfF,aAAa,EAAE;UACnB,CAAC;QAET;MACJ,CAAC;IAET;EACJ;AACJ,CAAC;;AAED;AACA;AACA;AACA,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"}
@@ -56,50 +56,55 @@
56
56
  /**
57
57
  * Enumeration that defines the possible values for a List Manager Event Source.
58
58
  */
59
- export let ListManagerEventSource;
60
-
61
- /**
62
- * Enumeration that defines the possible values for a List Manager Event Name.
63
- */
64
- (function (ListManagerEventSource) {
59
+ export let ListManagerEventSource = /*#__PURE__*/function (ListManagerEventSource) {
65
60
  ListManagerEventSource["APP"] = "app";
66
- })(ListManagerEventSource || (ListManagerEventSource = {}));
67
- export let ListManagerEventName;
61
+ return ListManagerEventSource;
62
+ }({});
68
63
 
69
64
  /**
70
- * Enum defining the available ad action types.
65
+ * Enumeration that defines the possible values for a List Manager Event Name.
71
66
  */
72
- (function (ListManagerEventName) {
67
+ export let ListManagerEventName = /*#__PURE__*/function (ListManagerEventName) {
73
68
  ListManagerEventName["ADDED_TO_LIST"] = "user_added_to_list";
74
69
  ListManagerEventName["CROSSED_OFF_LIST"] = "user_crossed_off_list";
75
70
  ListManagerEventName["DELETED_FROM_LIST"] = "user_deleted_from_list";
76
- })(ListManagerEventName || (ListManagerEventName = {}));
77
- export let AdActionType;
71
+ return ListManagerEventName;
72
+ }({});
78
73
 
79
74
  /**
80
- * Enum defining the different types of events that can be reported.
75
+ * Enum defining the available ad action types.
81
76
  */
82
- (function (AdActionType) {
77
+ export let AdActionType = /*#__PURE__*/function (AdActionType) {
83
78
  AdActionType["CONTENT"] = "c";
84
79
  AdActionType["EXTERNAL"] = "e";
85
80
  AdActionType["LINK"] = "l";
86
81
  AdActionType["APP"] = "a";
87
82
  AdActionType["NONE"] = "n";
88
- })(AdActionType || (AdActionType = {}));
89
- export let ReportedEventType;
83
+ return AdActionType;
84
+ }({});
90
85
 
91
86
  /**
92
- * Enumeration defining the possible payload acknowledgment status values.
87
+ * Enum defining the different types of events that can be reported.
93
88
  */
94
- (function (ReportedEventType) {
89
+ export let ReportedEventType = /*#__PURE__*/function (ReportedEventType) {
95
90
  ReportedEventType["IMPRESSION"] = "impression";
91
+ ReportedEventType["INVISIBLE_IMPRESSION"] = "invisible_impression";
96
92
  ReportedEventType["INTERACTION"] = "interaction";
97
93
  ReportedEventType["NOT_MATCHED"] = "not_matched";
98
94
  ReportedEventType["MATCHED"] = "matched";
99
95
  ReportedEventType["PRESENTED"] = "presented";
100
96
  ReportedEventType["SELECTED"] = "selected";
101
- })(ReportedEventType || (ReportedEventType = {}));
102
- export let PayloadStatus;
97
+ return ReportedEventType;
98
+ }({});
99
+
100
+ /**
101
+ * Enumeration defining the possible payload acknowledgment status values.
102
+ */
103
+ export let PayloadStatus = /*#__PURE__*/function (PayloadStatus) {
104
+ PayloadStatus["DELIVERED"] = "delivered";
105
+ PayloadStatus["REJECTED"] = "rejected";
106
+ return PayloadStatus;
107
+ }({});
103
108
 
104
109
  // =============================================================================
105
110
  // REQUEST MODELS
@@ -107,8 +112,49 @@ export let PayloadStatus;
107
112
  /**
108
113
  * The base request inputs that most requests will use.
109
114
  */
110
- (function (PayloadStatus) {
111
- PayloadStatus["DELIVERED"] = "delivered";
112
- PayloadStatus["REJECTED"] = "rejected";
113
- })(PayloadStatus || (PayloadStatus = {}));
115
+ /**
116
+ * Interface for the request of the Initialize Session API call.
117
+ */
118
+ /**
119
+ * Interface for the request of the Refresh Session Data API call.
120
+ */
121
+ /**
122
+ * Interface for the request that reports an ad event.
123
+ */
124
+ /**
125
+ * Interface for the request of the Refresh Session Data API call.
126
+ */
127
+ /**
128
+ * Interface for the request that reports an intercept event.
129
+ */
130
+ /**
131
+ * Interface for the request that reports List Manager data.
132
+ */
133
+ /**
134
+ * Interface for the request that reports Payload tracking data.
135
+ */
136
+ /**
137
+ * Interface for the request that gets Payload server data.
138
+ */
139
+ // =============================================================================
140
+ // RESPONSE MODELS
141
+ // =============================================================================
142
+ /**
143
+ * Interface for the response of the Campaign API request.
144
+ */
145
+ /**
146
+ * Interface for the response of the Campaign API request.
147
+ */
148
+ /**
149
+ * Interface for the response of the Report Ad Event API request.
150
+ */
151
+ /**
152
+ * Interface for the response of the Keyword Intercepts API request.
153
+ */
154
+ /**
155
+ * Interface for the response of the Report Intercept Event API request.
156
+ */
157
+ /**
158
+ * Interface for the response of the Retrieve Payload Item Data API request.
159
+ */
114
160
  //# 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;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;;AA4B7B;AACA;AACA;AAFA,WA5BYA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;AAAA,GAAjBA,iBAAiB,KAAjBA,iBAAiB;AA+B7B,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;;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,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"}