@adadapted/react-native-sdk 3.4.0 → 3.5.1

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/adadapted-react-native-sdk.podspec +1 -1
  2. package/lib/commonjs/api/adadaptedApiRequests.js +10 -11
  3. package/lib/commonjs/api/adadaptedApiRequests.js.map +1 -1
  4. package/lib/commonjs/api/adadaptedApiTypes.js +57 -0
  5. package/lib/commonjs/api/adadaptedApiTypes.js.map +1 -1
  6. package/lib/commonjs/componentTypes/AdZone.js +11 -0
  7. package/lib/commonjs/componentTypes/AdZone.js.map +1 -0
  8. package/lib/commonjs/componentTypes/Device.js +28 -0
  9. package/lib/commonjs/componentTypes/Device.js.map +1 -0
  10. package/lib/commonjs/componentTypes/Environment.js +61 -0
  11. package/lib/commonjs/componentTypes/Environment.js.map +1 -0
  12. package/lib/commonjs/components/AdZone.js +12 -17
  13. package/lib/commonjs/components/AdZone.js.map +1 -1
  14. package/lib/commonjs/components/ReportAdButton.js +1 -2
  15. package/lib/commonjs/components/ReportAdButton.js.map +1 -1
  16. package/lib/commonjs/index.js +97 -118
  17. package/lib/commonjs/index.js.map +1 -1
  18. package/lib/commonjs/util.js +0 -1
  19. package/lib/commonjs/util.js.map +1 -1
  20. package/lib/module/api/adadaptedApiRequests.js +9 -9
  21. package/lib/module/api/adadaptedApiRequests.js.map +1 -1
  22. package/lib/module/api/adadaptedApiTypes.js +57 -0
  23. package/lib/module/api/adadaptedApiTypes.js.map +1 -1
  24. package/lib/module/componentTypes/AdZone.js +7 -0
  25. package/lib/module/componentTypes/AdZone.js.map +1 -0
  26. package/lib/module/componentTypes/Device.js +24 -0
  27. package/lib/module/componentTypes/Device.js.map +1 -0
  28. package/lib/module/componentTypes/Environment.js +57 -0
  29. package/lib/module/componentTypes/Environment.js.map +1 -0
  30. package/lib/module/components/AdZone.js +11 -15
  31. package/lib/module/components/AdZone.js.map +1 -1
  32. package/lib/module/index.js +92 -122
  33. package/lib/module/index.js.map +1 -1
  34. package/lib/module/util.js +0 -1
  35. package/lib/module/util.js.map +1 -1
  36. package/lib/typescript/index.d.ts +2 -0
  37. package/lib/typescript/index.d.ts.map +1 -0
  38. package/lib/typescript/jest.setup.d.ts +6 -0
  39. package/lib/typescript/jest.setup.d.ts.map +1 -0
  40. package/lib/typescript/src/api/adadaptedApiRequests.d.ts +10 -9
  41. package/lib/typescript/src/api/adadaptedApiRequests.d.ts.map +1 -1
  42. package/lib/typescript/src/api/adadaptedApiTypes.d.ts +11 -4
  43. package/lib/typescript/src/api/adadaptedApiTypes.d.ts.map +1 -1
  44. package/lib/typescript/src/componentTypes/AdZone.d.ts +95 -0
  45. package/lib/typescript/src/componentTypes/AdZone.d.ts.map +1 -0
  46. package/lib/typescript/src/componentTypes/Device.d.ts +80 -0
  47. package/lib/typescript/src/componentTypes/Device.d.ts.map +1 -0
  48. package/lib/typescript/src/componentTypes/Environment.d.ts +57 -0
  49. package/lib/typescript/src/componentTypes/Environment.d.ts.map +1 -0
  50. package/lib/typescript/src/components/AdZone.d.ts +2 -55
  51. package/lib/typescript/src/components/AdZone.d.ts.map +1 -1
  52. package/lib/typescript/src/index.d.ts +38 -142
  53. package/lib/typescript/src/index.d.ts.map +1 -1
  54. package/lib/typescript/src/types.d.ts.map +1 -1
  55. package/package.json +43 -34
  56. package/src/api/adadaptedApiRequests.mock.ts +2 -2
  57. package/src/api/adadaptedApiRequests.ts +27 -26
  58. package/src/api/adadaptedApiTypes.ts +11 -5
  59. package/src/componentTypes/AdZone.ts +97 -0
  60. package/src/componentTypes/Device.ts +79 -0
  61. package/src/componentTypes/Environment.ts +58 -0
  62. package/src/components/AdZone.tsx +42 -120
  63. package/src/index.tsx +189 -287
  64. package/src/types.tsx +6 -5
  65. package/src/util.ts +6 -7
  66. package/android/.project +0 -34
  67. package/android/.settings/org.eclipse.buildship.core.prefs +0 -13
  68. package/android/bin/.project +0 -34
  69. package/android/bin/.settings/org.eclipse.buildship.core.prefs +0 -13
  70. package/android/bin/build.gradle +0 -132
  71. package/android/bin/gradle.properties +0 -4
  72. package/android/bin/src/main/AndroidManifest.xml +0 -4
  73. package/android/bin/src/main/java/com/adadaptedreactnativesdk/AdadaptedReactNativeSdkModule.kt +0 -115
  74. package/android/bin/src/main/java/com/adadaptedreactnativesdk/AdadaptedReactNativeSdkPackage.kt +0 -20
  75. package/lib/module/package.json +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adadapted/react-native-sdk",
3
- "version": "3.4.0",
3
+ "version": "3.5.1",
4
4
  "description": "The AdAdapted react-native SDK.",
5
5
  "main": "lib/commonjs/index.js",
6
6
  "module": "lib/module/index.js",
@@ -21,13 +21,17 @@
21
21
  "lint": "eslint --version && eslint ./",
22
22
  "compile": "tsc --version && tsc --project tsconfig.json --noEmit --noErrorTruncation --pretty",
23
23
  "test-coverage": "rm -rf coverage && jest --version --clearCache && jest --coverage --clearCache",
24
- "enable-git-hooks": "git config core.hooksPath .git-hooks",
25
- "test": "jest --version --clearCache && jest",
24
+ "enable-pre-commit": "pre-commit install",
25
+ "test": "jest --version --clearCache && jest --passWithNoTests",
26
26
  "prettier": "prettier --list-different \"*.{ts,tsx,js,jsx,json,css,scss,md}\" \"src/**/*.{ts,tsx,js,jsx,json,css,scss,md}\"",
27
27
  "prepack": "bob build",
28
28
  "example-app-install-pods": "cd example/ios && pod install",
29
29
  "npm-check-outdated": "npm outdated",
30
30
  "check-peer-dependencies": "npx check-peer-dependencies --npm",
31
+ "update-packages-semver-safe": "npm update",
32
+ "update-packages-latest-available": "npx npm-check-updates -u",
33
+ "install-packages": "npm install",
34
+ "audit-fix-packages": "npm audit fix",
31
35
  "prepare": "bob build"
32
36
  },
33
37
  "keywords": [
@@ -41,18 +45,17 @@
41
45
  ],
42
46
  "repository": {
43
47
  "type": "git",
44
- "url": "https://gitlab.com/adadapted/adadapted-react-native-sdk"
48
+ "url": "https://github.com/adadaptedinc/adadapted-react-native-sdk"
45
49
  },
46
- "author": "Jeramy Usher <jusher@adadapted.com> (https://gitlab.com/adadapted/adadapted-react-native-sdk)",
50
+ "author": "Jeramy Usher <jusher@adadapted.com> (https://github.com/adadaptedinc/adadapted-react-native-sdk)",
47
51
  "license": "AdAdapted Platform License",
48
52
  "bugs": {
49
- "url": "https://gitlab.com/adadapted/adadapted-react-native-sdk/issues"
53
+ "url": "https://github.com/adadaptedinc/adadapted-react-native-sdk/issues"
50
54
  },
51
- "homepage": "https://gitlab.com/adadapted/adadapted-react-native-sdk#readme",
55
+ "homepage": "https://github.com/adadaptedinc/adadapted-react-native-sdk",
52
56
  "dependencies": {
53
- "@react-native-community/eslint-config": "^3.2.0",
54
57
  "axios": "^1.7.9",
55
- "react-native-base64": "0.2.1",
58
+ "react-native-base64": "^0.2.2",
56
59
  "type-zoo": "3.4.1"
57
60
  },
58
61
  "peerDependencies": {
@@ -62,32 +65,38 @@
62
65
  },
63
66
  "devDependencies": {
64
67
  "@babel/plugin-proposal-private-property-in-object": "^7.21.11",
65
- "@babel/plugin-transform-typescript": "7.22.5",
66
- "@babel/preset-env": "7.22.5",
67
- "@babel/preset-react": "7.22.5",
68
- "@babel/preset-typescript": "7.22.5",
69
- "@react-native/typescript-config": "0.74.88",
70
- "@types/jest": "29.5.2",
71
- "@types/react": "18.3.1",
72
- "@types/react-native-base64": "0.2.0",
73
- "@typescript-eslint/eslint-plugin": "^5.62.0",
74
- "@typescript-eslint/parser": "5.60.0",
75
- "eslint": "^8.19.0",
76
- "eslint-config-standard-with-typescript": "^36.0.0",
77
- "eslint-plugin-import": "^2.27.5",
78
- "eslint-plugin-jest": "27.2.2",
79
- "eslint-plugin-jsdoc": "46.2.6",
80
- "eslint-plugin-n": "^15.7.0",
68
+ "@babel/plugin-transform-typescript": "^7.28.6",
69
+ "@babel/preset-env": "^7.29.2",
70
+ "@babel/preset-react": "^7.28.5",
71
+ "@babel/preset-typescript": "^7.28.5",
72
+ "@eslint/eslintrc": "^3.0.0",
73
+ "@eslint/js": "^9.0.0",
74
+ "@react-native/typescript-config": "^0.85.2",
75
+ "@types/react": "^19.0.0",
76
+ "@testing-library/jest-dom": "^6.0.0",
77
+ "@types/react-native-base64": "^0.2.2",
78
+ "@typescript-eslint/eslint-plugin": "^8.59.0",
79
+ "@typescript-eslint/parser": "^8.59.0",
80
+ "eslint": "^9.0.0",
81
+ "eslint-plugin-import": "^2.32.0",
82
+ "eslint-plugin-jest": "^29.15.0",
83
+ "eslint-plugin-jsdoc": "^62.9.0",
84
+ "eslint-plugin-n": "^17.24.0",
81
85
  "eslint-plugin-prefer-arrow": "1.2.3",
82
- "eslint-plugin-promise": "^6.1.1",
83
- "eslint-plugin-react": "^7.32.2",
84
- "eslint-plugin-react-hooks": "^5.1.0",
85
- "eslint-plugin-react-native": "^4.0.0",
86
- "jest": "^29.6.3",
87
- "prettier": "2.8.8",
88
- "react-native-builder-bob": "0.33.3",
89
- "ts-jest": "29.1.0",
90
- "typescript": "5.0.4"
86
+ "eslint-plugin-promise": "^7.3.0",
87
+ "eslint-plugin-react": "^7.37.5",
88
+ "eslint-plugin-react-hooks": "^7.1.1",
89
+ "eslint-plugin-react-native": "^5.0.0",
90
+ "globals": "^17.0.0",
91
+ "jest": "^30.3.0",
92
+ "prettier": "^3.8.3",
93
+ "react": "^19.0.0",
94
+ "react-native": "^0.80.0",
95
+ "react-native-builder-bob": "^0.41.0",
96
+ "react-native-webview": "^13.16.1",
97
+ "ts-jest": "^29.4.9",
98
+ "typescript": "^6.0.0",
99
+ "typescript-eslint": "^8.59.0"
91
100
  },
92
101
  "jest": {
93
102
  "preset": "react-native",
@@ -119,7 +119,7 @@ export function reportInterceptEvent(): Promise<
119
119
  status: 200,
120
120
  statusText: "200",
121
121
  });
122
- }
122
+ },
123
123
  );
124
124
  }
125
125
 
@@ -197,7 +197,7 @@ export function retrievePayloadContent(): Promise<
197
197
  status: 200,
198
198
  statusText: "200",
199
199
  });
200
- }
200
+ },
201
201
  );
202
202
  }
203
203
 
@@ -19,7 +19,8 @@ import {
19
19
  } from "./adadaptedApiTypes";
20
20
  import axios, { AxiosResponse } from "axios";
21
21
  import * as adadaptedApiRequestMocks from "./adadaptedApiRequests.mock";
22
- import { ApiEnv, DeviceOS, ListManagerApiEnv, PayloadApiEnv } from "../index";
22
+ import { DeviceTypes } from "../componentTypes/Device";
23
+ import { EnvironmentTypes } from "../componentTypes/Environment";
23
24
 
24
25
  /**
25
26
  * Makes an API request to initialize the session for the AdAdapted API.
@@ -30,10 +31,10 @@ import { ApiEnv, DeviceOS, ListManagerApiEnv, PayloadApiEnv } from "../index";
30
31
  */
31
32
  export function initializeSession(
32
33
  requestData: InitializeSessionRequest,
33
- deviceOS: DeviceOS,
34
- apiEnv: ApiEnv
34
+ deviceOS: DeviceTypes.DeviceOS,
35
+ apiEnv: EnvironmentTypes.ApiEnv,
35
36
  ): Promise<AxiosResponse<InitializeSessionResponse>> {
36
- return apiEnv === ApiEnv.Mock
37
+ return apiEnv === EnvironmentTypes.ApiEnv.Mock
37
38
  ? adadaptedApiRequestMocks.initializeSession()
38
39
  : axios(`${apiEnv}/v/0.9.5/${deviceOS}/sessions/initialize`, {
39
40
  method: "POST",
@@ -54,19 +55,19 @@ export function initializeSession(
54
55
  */
55
56
  export function refreshSessionData(
56
57
  requestData: RefreshSessionDataRequest,
57
- deviceOS: DeviceOS,
58
- apiEnv: ApiEnv
58
+ deviceOS: DeviceTypes.DeviceOS,
59
+ apiEnv: EnvironmentTypes.ApiEnv,
59
60
  ): Promise<AxiosResponse<RefreshSessionDataResponse>> {
60
- return apiEnv === ApiEnv.Mock
61
+ return apiEnv === EnvironmentTypes.ApiEnv.Mock
61
62
  ? adadaptedApiRequestMocks.refreshSessionData()
62
63
  : axios(
63
- `${apiEnv}/v/0.9.5/${deviceOS}/ads/retrieve?aid=${requestData.aid}&sid=${requestData.sid}&uid=${requestData.uid}`,
64
+ `${apiEnv}/v/0.9.5/${deviceOS}/ads/retrieve?aid=${requestData.aid}&sid=${requestData.sid}&uid=${requestData.uid}&sdk=${requestData.sdkVersion}&contextID=${requestData.adContext?.contextIds}&zoneID=${requestData.adContext?.zoneIds}`,
64
65
  {
65
66
  method: "GET",
66
67
  headers: {
67
68
  accept: "application/json",
68
69
  },
69
- }
70
+ },
70
71
  );
71
72
  }
72
73
 
@@ -80,10 +81,10 @@ export function refreshSessionData(
80
81
  */
81
82
  export function reportAdEvent(
82
83
  requestData: ReportAdEventRequest,
83
- deviceOS: DeviceOS,
84
- apiEnv: ApiEnv
84
+ deviceOS: DeviceTypes.DeviceOS,
85
+ apiEnv: EnvironmentTypes.ApiEnv,
85
86
  ): Promise<AxiosResponse<ReportAdEventResponse>> {
86
- return apiEnv === ApiEnv.Mock
87
+ return apiEnv === EnvironmentTypes.ApiEnv.Mock
87
88
  ? adadaptedApiRequestMocks.reportAdEvent()
88
89
  : axios(`${apiEnv}/v/0.9.5/${deviceOS}/ads/events`, {
89
90
  method: "POST",
@@ -104,10 +105,10 @@ export function reportAdEvent(
104
105
  */
105
106
  export function getKeywordIntercepts(
106
107
  requestData: KeywordInterceptsRequest,
107
- deviceOS: DeviceOS,
108
- apiEnv: ApiEnv
108
+ deviceOS: DeviceTypes.DeviceOS,
109
+ apiEnv: EnvironmentTypes.ApiEnv,
109
110
  ): Promise<AxiosResponse<KeywordInterceptsResponse>> {
110
- return apiEnv === ApiEnv.Mock
111
+ return apiEnv === EnvironmentTypes.ApiEnv.Mock
111
112
  ? adadaptedApiRequestMocks.getKeywordIntercepts()
112
113
  : axios(
113
114
  `${apiEnv}/v/0.9.5/${deviceOS}/intercepts/retrieve?aid=${requestData.aid}&sid=${requestData.sid}&uid=${requestData.uid}`,
@@ -116,7 +117,7 @@ export function getKeywordIntercepts(
116
117
  headers: {
117
118
  accept: "application/json",
118
119
  },
119
- }
120
+ },
120
121
  );
121
122
  }
122
123
 
@@ -130,10 +131,10 @@ export function getKeywordIntercepts(
130
131
  */
131
132
  export function reportInterceptEvent(
132
133
  requestData: ReportInterceptEventRequest,
133
- deviceOS: DeviceOS,
134
- apiEnv: ApiEnv
134
+ deviceOS: DeviceTypes.DeviceOS,
135
+ apiEnv: EnvironmentTypes.ApiEnv,
135
136
  ): Promise<AxiosResponse<ReportInterceptEventResponse>> {
136
- return apiEnv === ApiEnv.Mock
137
+ return apiEnv === EnvironmentTypes.ApiEnv.Mock
137
138
  ? adadaptedApiRequestMocks.reportInterceptEvent()
138
139
  : axios(`${apiEnv}/v/0.9.5/${deviceOS}/intercepts/events`, {
139
140
  method: "POST",
@@ -154,10 +155,10 @@ export function reportInterceptEvent(
154
155
  */
155
156
  export function reportListManagerEvents(
156
157
  requestData: ReportListManagerDataRequest,
157
- deviceOS: DeviceOS,
158
- apiEnv: ListManagerApiEnv
158
+ deviceOS: DeviceTypes.DeviceOS,
159
+ apiEnv: EnvironmentTypes.ListManagerApiEnv,
159
160
  ): Promise<AxiosResponse<void>> {
160
- return apiEnv === ListManagerApiEnv.Mock
161
+ return apiEnv === EnvironmentTypes.ListManagerApiEnv.Mock
161
162
  ? adadaptedApiRequestMocks.reportListManagerEvents()
162
163
  : axios(`${apiEnv}/v/1/${deviceOS}/events`, {
163
164
  method: "POST",
@@ -178,9 +179,9 @@ export function reportListManagerEvents(
178
179
  */
179
180
  export function reportPayloadContentStatus(
180
181
  requestData: ReportPayloadDataRequest,
181
- apiEnv: PayloadApiEnv
182
+ apiEnv: EnvironmentTypes.PayloadApiEnv,
182
183
  ): Promise<AxiosResponse<void>> {
183
- return apiEnv === PayloadApiEnv.Mock
184
+ return apiEnv === EnvironmentTypes.PayloadApiEnv.Mock
184
185
  ? adadaptedApiRequestMocks.reportPayloadContentStatus()
185
186
  : axios(`${apiEnv}/v/1/tracking`, {
186
187
  method: "POST",
@@ -200,9 +201,9 @@ export function reportPayloadContentStatus(
200
201
  */
201
202
  export function retrievePayloadContent(
202
203
  requestData: RetrievePayloadItemDataRequest,
203
- apiEnv: PayloadApiEnv
204
+ apiEnv: EnvironmentTypes.PayloadApiEnv,
204
205
  ): Promise<AxiosResponse<RetrievePayloadItemDataResponse>> {
205
- return apiEnv === PayloadApiEnv.Mock
206
+ return apiEnv === EnvironmentTypes.PayloadApiEnv.Mock
206
207
  ? adadaptedApiRequestMocks.retrievePayloadContent()
207
208
  : axios(`${apiEnv}/v/1/pickup`, {
208
209
  method: "POST",
@@ -156,11 +156,6 @@ export interface OutOfAppDataPayload {
156
156
  detailed_list_items: DetailedListItem[];
157
157
  }
158
158
 
159
- export interface AdZoneDetailedListItemInfo {
160
- zoneId: string;
161
- items: DetailedListItem[];
162
- }
163
-
164
159
  /**
165
160
  * The definition of a Detailed List Item.
166
161
  */
@@ -571,6 +566,17 @@ export interface RefreshSessionDataRequest {
571
566
  * The current session ID.
572
567
  */
573
568
  sid: string;
569
+ /**
570
+ * The current sdk version.
571
+ */
572
+ sdkVersion: string;
573
+ /**
574
+ * The context IDs and associated zone IDs.
575
+ */
576
+ adContext?: {
577
+ contextIds: string[] | undefined;
578
+ zoneIds: string[];
579
+ };
574
580
  }
575
581
 
576
582
  /**
@@ -0,0 +1,97 @@
1
+ import { ViewStyle } from "react-native";
2
+ import { Zone, DetailedListItem } from "src/api/adadaptedApiTypes";
3
+ import { DeviceTypes } from "./Device";
4
+ import { EnvironmentTypes } from "./Environment";
5
+
6
+ /**
7
+ * Namespace for AdZone types.
8
+ */
9
+ export namespace AdZoneTypes {
10
+ /**
11
+ * Props interface for an ad zone.
12
+ */
13
+ export interface Props {
14
+ /**
15
+ * The app ID.
16
+ */
17
+ appId: string;
18
+ /**
19
+ * The session ID.
20
+ */
21
+ sessionId: string;
22
+ /**
23
+ * The UDID.
24
+ */
25
+ udid: string;
26
+ /**
27
+ * The touch sensitivity of the Ad Zone in both the X and Y directions.
28
+ * This is used to determine the click/press sensitivity when the
29
+ * Ad Zone is being touched by the user as a regular touch or while
30
+ * scrolling the view. If the amount of touch "drag" distance in either
31
+ * X or Y direction is less than this value, we will treat the action as
32
+ * a click/press on the Ad Zone.
33
+ */
34
+ xyDragDistanceAllowed: number;
35
+ /**
36
+ * The device OS used for API requests.
37
+ */
38
+ deviceOs: DeviceTypes.DeviceOS;
39
+ /**
40
+ * The API environment to use when making an API request.
41
+ */
42
+ apiEnv: EnvironmentTypes.ApiEnv;
43
+ /**
44
+ * The ad zone data.
45
+ */
46
+ adZoneData: Zone;
47
+ /**
48
+ * Callback that gets triggered when an "add to list" item/items are clicked.
49
+ * @param items - The array of items to "add to list".
50
+ */
51
+ onAddToListTriggered?(items: DetailedListItem[]): void;
52
+ /**
53
+ * An ad zone that is not visible on screen for the initial render.
54
+ */
55
+ offScreenAdZone: boolean;
56
+ /**
57
+ * Track the ad zone visibility in parent component. (for off-screen ads)
58
+ */
59
+ isAdZoneVisible?: boolean;
60
+ /**
61
+ * Flag to determine if the ad is contextual.
62
+ */
63
+ isContextualAd?: boolean;
64
+ }
65
+
66
+ /**
67
+ * Interface for tracking "touch" coordinates.
68
+ */
69
+ export interface TouchCoordinates {
70
+ /**
71
+ * The X coordinate for the touch.
72
+ */
73
+ x: number;
74
+ /**
75
+ * The Y coordinate for the touch.
76
+ */
77
+ y: number;
78
+ }
79
+
80
+ /**
81
+ * Defines the style typing for the component.
82
+ */
83
+ export interface StyleDef {
84
+ /**
85
+ * Styles for the main View element.
86
+ */
87
+ mainView: ViewStyle;
88
+ /**
89
+ * Styles for the WebView element.
90
+ */
91
+ webView: ViewStyle;
92
+ /**
93
+ * Styles for the ReportAdButton.
94
+ */
95
+ reportAd: ViewStyle;
96
+ }
97
+ }
@@ -0,0 +1,79 @@
1
+ /**
2
+ * Namespace for Device types.
3
+ */
4
+ export namespace DeviceTypes {
5
+ /**
6
+ * Enum representing possible device operating systems.
7
+ */
8
+ export enum DeviceOS {
9
+ /**
10
+ * Represents the Android operating system.
11
+ */
12
+ ANDROID = "android",
13
+ /**
14
+ * Represents the iOS operating system.
15
+ */
16
+ IOS = "ios",
17
+ }
18
+ /**
19
+ * Interface defining properties of a user's Device.
20
+ */
21
+ export interface DeviceInfo {
22
+ /**
23
+ * The unique device ID.
24
+ */
25
+ udid: string;
26
+ /**
27
+ * The device name.
28
+ */
29
+ deviceName: string;
30
+ /**
31
+ * The operating system name.
32
+ */
33
+ systemName: string;
34
+ /**
35
+ * The operating system version.
36
+ */
37
+ systemVersion: string;
38
+ /**
39
+ * The device model.
40
+ */
41
+ deviceModel: string;
42
+ /**
43
+ * The device screen width.
44
+ */
45
+ deviceWidth: string;
46
+ /**
47
+ * The device screen height.
48
+ */
49
+ deviceHeight: string;
50
+ /**
51
+ * The device screen density.
52
+ */
53
+ deviceScreenDensity: string;
54
+ /**
55
+ * The current device local.
56
+ */
57
+ deviceLocale: string;
58
+ /**
59
+ * The device carrier name.
60
+ */
61
+ deviceCarrier: string;
62
+ /**
63
+ * The bundle ID.
64
+ */
65
+ bundleId: string;
66
+ /**
67
+ * The bundle version.
68
+ */
69
+ bundleVersion: string;
70
+ /**
71
+ * The current device timezone.
72
+ */
73
+ deviceTimezone: string;
74
+ /**
75
+ * If true, ad tracking is enabled for the device.
76
+ */
77
+ isAdTrackingEnabled: boolean;
78
+ }
79
+ }
@@ -0,0 +1,58 @@
1
+ /**
2
+ * Namespace for environment types.
3
+ */
4
+ export namespace EnvironmentTypes {
5
+ /**
6
+ * Enum defining the different API environments.
7
+ */
8
+ export enum ApiEnv {
9
+ /**
10
+ * The production API environment.
11
+ */
12
+ Prod = "https://ads.adadapted.com",
13
+ /**
14
+ * The development API environment.
15
+ */
16
+ Dev = "https://sandbox.adadapted.com",
17
+ /**
18
+ * Used only for unit testing/mock data.
19
+ */
20
+ Mock = "MOCK_DATA",
21
+ }
22
+
23
+ /**
24
+ * Enum defining the different API environments for List Manager.
25
+ */
26
+ export enum ListManagerApiEnv {
27
+ /**
28
+ * The production API environment.
29
+ */
30
+ Prod = "https://ec.adadapted.com",
31
+ /**
32
+ * The development API environment.
33
+ */
34
+ Dev = "https://sandec.adadapted.com",
35
+ /**
36
+ * Used only for unit testing/mocking data.
37
+ */
38
+ Mock = "MOCK_DATA",
39
+ }
40
+
41
+ /**
42
+ * Enum defining the different API environments for the Payload Server.
43
+ */
44
+ export enum PayloadApiEnv {
45
+ /**
46
+ * The production API environment.
47
+ */
48
+ Prod = "https://payload.adadapted.com",
49
+ /**
50
+ * The development API environment.
51
+ */
52
+ Dev = "https://sandpayload.adadapted.com",
53
+ /**
54
+ * Used only for unit testing/mocking data.
55
+ */
56
+ Mock = "MOCK_DATA",
57
+ }
58
+ }