@adobe/alloy 2.29.0-beta.4 → 2.29.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 (141) hide show
  1. package/libEs5/components/ActivityCollector/utils/dom/findClickableElement.js +4 -0
  2. package/libEs5/components/Advertising/handlers/clickThroughHandler.js +2 -1
  3. package/libEs5/components/Advertising/handlers/onBeforeSendEventHandler.js +8 -3
  4. package/libEs5/components/Advertising/handlers/viewThroughHandler.js +2 -1
  5. package/libEs5/components/Advertising/identities/collectID5Id.js +1 -1
  6. package/libEs5/components/Advertising/identities/collectRampId.js +1 -1
  7. package/libEs5/components/Consent/createConsentRequestPayload.js +14 -3
  8. package/libEs5/components/Consent/types.js +18 -0
  9. package/libEs5/components/Personalization/dom-actions/action.js +7 -4
  10. package/libEs5/components/Personalization/dom-actions/initDomActionsModules.js +10 -10
  11. package/libEs5/components/PushNotifications/helpers/getPushSubscriptionDetails.js +116 -0
  12. package/libEs5/components/PushNotifications/index.js +96 -0
  13. package/libEs5/components/PushNotifications/request/createSendPushSubscriptionPayload.js +62 -0
  14. package/libEs5/components/PushNotifications/request/createSendPushSubscriptionRequest.js +35 -0
  15. package/libEs5/components/PushNotifications/request/makeSendPushSubscriptionRequest.js +88 -0
  16. package/libEs5/components/PushNotifications/types.js +14 -0
  17. package/libEs5/constants/libraryVersion.js +1 -1
  18. package/libEs5/core/componentCreators.js +8 -1
  19. package/libEs5/core/consent/createConsent.js +10 -0
  20. package/libEs5/core/consent/createConsentStateMachine.js +36 -0
  21. package/libEs5/core/consent/types.js +24 -0
  22. package/libEs5/core/edgeNetwork/injectSendEdgeNetworkRequest.js +20 -0
  23. package/libEs5/core/edgeNetwork/types.js +10 -0
  24. package/libEs5/core/identity/createIdentity.js +36 -0
  25. package/libEs5/core/identity/types.js +15 -0
  26. package/libEs5/core/injectCreateResponse.js +9 -7
  27. package/libEs5/core/types.js +101 -11
  28. package/libEs5/utils/bytes.js +12 -1
  29. package/libEs5/utils/createLoggingCookieJar.js +14 -1
  30. package/libEs5/utils/createMerger.js +5 -4
  31. package/libEs5/utils/injectStorage.js +19 -0
  32. package/libEs5/utils/request/createDataCollectionRequestPayload.js +16 -8
  33. package/libEs5/utils/request/createRequest.js +28 -1
  34. package/libEs5/utils/request/createRequestPayload.js +68 -4
  35. package/libEs5/utils/request/types.js +52 -0
  36. package/libEs5/utils/types.js +39 -0
  37. package/libEs6/components/ActivityCollector/utils/dom/findClickableElement.js +4 -0
  38. package/libEs6/components/Advertising/handlers/clickThroughHandler.js +2 -1
  39. package/libEs6/components/Advertising/handlers/onBeforeSendEventHandler.js +8 -3
  40. package/libEs6/components/Advertising/handlers/viewThroughHandler.js +2 -1
  41. package/libEs6/components/Advertising/identities/collectID5Id.js +1 -1
  42. package/libEs6/components/Advertising/identities/collectRampId.js +1 -1
  43. package/libEs6/components/Consent/createConsentRequestPayload.js +16 -3
  44. package/libEs6/components/Consent/types.js +15 -0
  45. package/libEs6/components/Personalization/dom-actions/action.js +7 -4
  46. package/libEs6/components/Personalization/dom-actions/initDomActionsModules.js +10 -10
  47. package/libEs6/components/PushNotifications/helpers/getPushSubscriptionDetails.js +114 -0
  48. package/libEs6/components/PushNotifications/index.js +93 -0
  49. package/libEs6/components/PushNotifications/request/createSendPushSubscriptionPayload.js +61 -0
  50. package/libEs6/components/PushNotifications/request/createSendPushSubscriptionRequest.js +34 -0
  51. package/libEs6/components/PushNotifications/request/makeSendPushSubscriptionRequest.js +84 -0
  52. package/libEs6/components/PushNotifications/types.js +11 -0
  53. package/libEs6/constants/libraryVersion.js +1 -1
  54. package/libEs6/core/componentCreators.js +2 -1
  55. package/libEs6/core/consent/createConsent.js +12 -0
  56. package/libEs6/core/consent/createConsentStateMachine.js +36 -0
  57. package/libEs6/core/consent/types.js +21 -0
  58. package/libEs6/core/edgeNetwork/injectSendEdgeNetworkRequest.js +20 -0
  59. package/libEs6/core/edgeNetwork/types.js +7 -0
  60. package/libEs6/core/identity/createIdentity.js +38 -0
  61. package/libEs6/core/identity/types.js +12 -0
  62. package/libEs6/core/injectCreateResponse.js +11 -7
  63. package/libEs6/core/types.js +101 -11
  64. package/libEs6/utils/bytes.js +12 -1
  65. package/libEs6/utils/createLoggingCookieJar.js +15 -1
  66. package/libEs6/utils/createMerger.js +5 -4
  67. package/libEs6/utils/injectStorage.js +20 -0
  68. package/libEs6/utils/request/createDataCollectionRequestPayload.js +19 -8
  69. package/libEs6/utils/request/createRequest.js +29 -1
  70. package/libEs6/utils/request/createRequestPayload.js +67 -4
  71. package/libEs6/utils/request/types.js +49 -0
  72. package/libEs6/utils/types.js +36 -0
  73. package/package.json +30 -30
  74. package/types/components/ActivityCollector/utils/dom/findClickableElement.d.ts.map +1 -1
  75. package/types/components/Advertising/handlers/onBeforeSendEventHandler.d.ts.map +1 -1
  76. package/types/components/Advertising/handlers/viewThroughHandler.d.ts.map +1 -1
  77. package/types/components/Consent/createConsentRequest.d.ts +1 -11
  78. package/types/components/Consent/createConsentRequest.d.ts.map +1 -1
  79. package/types/components/Consent/createConsentRequestPayload.d.ts +2 -9
  80. package/types/components/Consent/createConsentRequestPayload.d.ts.map +1 -1
  81. package/types/components/Consent/types.d.ts +28 -0
  82. package/types/components/Consent/types.d.ts.map +1 -0
  83. package/types/components/Identity/getIdentity/createIdentityRequest.d.ts +1 -11
  84. package/types/components/Identity/getIdentity/createIdentityRequest.d.ts.map +1 -1
  85. package/types/components/Identity/getIdentity/createIdentityRequestPayload.d.ts +1 -9
  86. package/types/components/Identity/getIdentity/createIdentityRequestPayload.d.ts.map +1 -1
  87. package/types/components/Personalization/dom-actions/action.d.ts +1 -1
  88. package/types/components/Personalization/dom-actions/action.d.ts.map +1 -1
  89. package/types/components/PushNotifications/helpers/getPushSubscriptionDetails.d.ts +30 -0
  90. package/types/components/PushNotifications/helpers/getPushSubscriptionDetails.d.ts.map +1 -0
  91. package/types/components/PushNotifications/index.d.ts +43 -0
  92. package/types/components/PushNotifications/index.d.ts.map +1 -0
  93. package/types/components/PushNotifications/request/createSendPushSubscriptionPayload.d.ts +10 -0
  94. package/types/components/PushNotifications/request/createSendPushSubscriptionPayload.d.ts.map +1 -0
  95. package/types/components/PushNotifications/request/createSendPushSubscriptionRequest.d.ts +7 -0
  96. package/types/components/PushNotifications/request/createSendPushSubscriptionRequest.d.ts.map +1 -0
  97. package/types/components/PushNotifications/request/makeSendPushSubscriptionRequest.d.ts +20 -0
  98. package/types/components/PushNotifications/request/makeSendPushSubscriptionRequest.d.ts.map +1 -0
  99. package/types/components/PushNotifications/types.d.ts +23 -0
  100. package/types/components/PushNotifications/types.d.ts.map +1 -0
  101. package/types/components/StreamingMedia/createMediaRequest.d.ts +1 -11
  102. package/types/components/StreamingMedia/createMediaRequest.d.ts.map +1 -1
  103. package/types/core/componentCreators.d.ts +1 -0
  104. package/types/core/consent/createConsent.d.ts +4 -10
  105. package/types/core/consent/createConsent.d.ts.map +1 -1
  106. package/types/core/consent/createConsentStateMachine.d.ts +4 -12
  107. package/types/core/consent/createConsentStateMachine.d.ts.map +1 -1
  108. package/types/core/consent/types.d.ts +42 -0
  109. package/types/core/consent/types.d.ts.map +1 -0
  110. package/types/core/edgeNetwork/injectSendEdgeNetworkRequest.d.ts +15 -13
  111. package/types/core/edgeNetwork/injectSendEdgeNetworkRequest.d.ts.map +1 -1
  112. package/types/core/edgeNetwork/types.d.ts +12 -0
  113. package/types/core/edgeNetwork/types.d.ts.map +1 -0
  114. package/types/core/identity/createIdentity.d.ts +9 -9
  115. package/types/core/identity/createIdentity.d.ts.map +1 -1
  116. package/types/core/identity/types.d.ts +23 -0
  117. package/types/core/identity/types.d.ts.map +1 -0
  118. package/types/core/injectCreateResponse.d.ts +3 -27
  119. package/types/core/injectCreateResponse.d.ts.map +1 -1
  120. package/types/core/types.d.ts +209 -22
  121. package/types/core/types.d.ts.map +1 -1
  122. package/types/utils/bytes.d.ts +3 -1
  123. package/types/utils/bytes.d.ts.map +1 -1
  124. package/types/utils/createLoggingCookieJar.d.ts +5 -3
  125. package/types/utils/createLoggingCookieJar.d.ts.map +1 -1
  126. package/types/utils/createMerger.d.ts +1 -1
  127. package/types/utils/createMerger.d.ts.map +1 -1
  128. package/types/utils/injectStorage.d.ts +2 -40
  129. package/types/utils/injectStorage.d.ts.map +1 -1
  130. package/types/utils/request/createDataCollectionRequest.d.ts +1 -11
  131. package/types/utils/request/createDataCollectionRequest.d.ts.map +1 -1
  132. package/types/utils/request/createDataCollectionRequestPayload.d.ts +2 -9
  133. package/types/utils/request/createDataCollectionRequestPayload.d.ts.map +1 -1
  134. package/types/utils/request/createRequest.d.ts +13 -11
  135. package/types/utils/request/createRequest.d.ts.map +1 -1
  136. package/types/utils/request/createRequestPayload.d.ts +7 -9
  137. package/types/utils/request/createRequestPayload.d.ts.map +1 -1
  138. package/types/utils/request/types.d.ts +91 -0
  139. package/types/utils/request/types.d.ts.map +1 -0
  140. package/types/utils/types.d.ts +91 -0
  141. package/types/utils/types.d.ts.map +1 -0
@@ -0,0 +1,49 @@
1
+ /**
2
+ * Request object with methods to access and modify request properties.
3
+ *
4
+ * @typedef {Object} Request
5
+ * @property {function(): string} getId
6
+ * @property {function(): RequestPayload} getPayload
7
+ * @property {function({isIdentityEstablished: boolean}): string} getAction
8
+ * @property {function(): string|undefined} getDatastreamIdOverride
9
+ * @property {Function} getUseSendBeacon
10
+ * @property {function(): string|undefined} getEdgeSubPath
11
+ * @property {Function} getUseIdThirdPartyDomain
12
+ * @property {Function} setUseIdThirdPartyDomain
13
+ * @property {Function} setIsIdentityEstablished
14
+ */
15
+
16
+ /**
17
+ * Request payload object with methods for merging different types of data.
18
+ *
19
+ * @typedef {Object} RequestPayload
20
+ * @property {function(object): void} mergeMeta
21
+ * @property {function(object): void} mergeState
22
+ * @property {function(object): void} mergeQuery
23
+ * @property {function(object): void} mergeConfigOverride
24
+ * @property {function(string, Identity): void} options.addIdentity
25
+ * @property {function(string): boolean} options.hasIdentity
26
+ * @property {function(): object} toJSON
27
+ */
28
+
29
+ /**
30
+ * Request payload object with methods for merging different types of data.
31
+ *
32
+ * @typedef {Object} DataCollectionRequestPayload
33
+ * @property {function(object): void} mergeMeta
34
+ * @property {function(object): void} mergeState
35
+ * @property {function(object): void} mergeQuery
36
+ * @property {function(object): void} mergeConfigOverride
37
+ * @property {function(string, Identity): void} options.addIdentity
38
+ * @property {function(string): boolean} options.hasIdentity
39
+ * @property {function(object): void} addEvent
40
+ * @property {function(): boolean} getDocumentMayUnload
41
+ * @property {function(): object} toJSON
42
+ */
43
+
44
+ /**
45
+ * @typedef {Object} Identity
46
+ * @property {string} id
47
+ */
48
+
49
+ export const Types = {};
@@ -0,0 +1,36 @@
1
+ /**
2
+ * @typedef {Object} Storage
3
+ * @property {function(string): string|null} getItem
4
+ * @property {function(string, string): void} setItem
5
+ * @property {function(): void} clear
6
+ */
7
+
8
+ /**
9
+ * @typedef {Object} CookieAttributes
10
+ * @property {number|Date} [expires] - Cookie expiration (number of days or Date object)
11
+ * @property {string} [path] - Cookie path (default: "/")
12
+ * @property {string} [domain] - Cookie domain
13
+ * @property {boolean} [secure] - Requires HTTPS transmission
14
+ * @property {"strict"|"lax"|"none"} [sameSite] - SameSite attribute
15
+ */
16
+
17
+ /**
18
+ * @typedef {Object} CookieConverter
19
+ * @property {function(string, string): string} [read] - Custom decoder function
20
+ * @property {function(string, string): string} [write] - Custom encoder function
21
+ */
22
+
23
+ /**
24
+ * @typedef {Object} CookieJar
25
+ * @property {function(string): string|undefined} get - Get cookie value by name, or get all cookies as object if no name provided
26
+ * @property {function(): Object<string, string>} get - Get all cookies as key-value object when called with no arguments
27
+ * @property {function(string, string, CookieAttributes=): string|undefined} set - Set cookie with optional attributes
28
+ * @property {function(string, CookieAttributes=): void} remove - Remove cookie with optional attributes (must match set attributes)
29
+ * @property {function(CookieConverter): CookieJar} withConverter - Create new instance with custom encoding/decoding
30
+ */
31
+
32
+ /**
33
+ * @typedef {function(string): { session: Storage, persistent: Storage }} StorageCreator
34
+ */
35
+
36
+ export const Types = {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/alloy",
3
- "version": "2.29.0-beta.4",
3
+ "version": "2.29.0",
4
4
  "description": "Adobe Experience Platform Web SDK",
5
5
  "type": "module",
6
6
  "main": "libEs5/index.js",
@@ -78,50 +78,50 @@
78
78
  "@adobe/reactor-load-script": "^1.1.1",
79
79
  "@adobe/reactor-object-assign": "^2.0.0",
80
80
  "@adobe/reactor-query-string": "^2.0.0",
81
- "@babel/core": "^7.27.4",
81
+ "@babel/core": "^7.28.3",
82
82
  "@babel/plugin-transform-template-literals": "^7.27.1",
83
- "@babel/preset-env": "^7.27.2",
84
- "@inquirer/prompts": "^7.5.3",
83
+ "@babel/preset-env": "^7.28.3",
84
+ "@inquirer/prompts": "^7.8.4",
85
85
  "@rollup/plugin-babel": "^6.0.4",
86
- "@rollup/plugin-commonjs": "^28.0.3",
86
+ "@rollup/plugin-commonjs": "^28.0.6",
87
87
  "@rollup/plugin-node-resolve": "^16.0.1",
88
88
  "@rollup/plugin-terser": "^0.4.4",
89
89
  "commander": "^14.0.0",
90
90
  "css.escape": "^1.5.1",
91
91
  "js-cookie": "3.0.5",
92
- "rollup": "^4.41.1",
92
+ "rollup": "^4.48.1",
93
93
  "rollup-plugin-license": "^3.6.0",
94
94
  "uuid": "^11.1.0"
95
95
  },
96
96
  "devDependencies": {
97
- "@adobe/alloy": "^2.29.0-beta.3",
98
- "@babel/cli": "^7.27.2",
97
+ "@adobe/alloy": "^2.29.0-beta.15",
98
+ "@babel/cli": "^7.28.3",
99
99
  "@babel/plugin-transform-modules-commonjs": "^7.27.1",
100
- "@babel/plugin-transform-runtime": "^7.27.4",
101
- "@eslint/js": "^9.28.0",
100
+ "@babel/plugin-transform-runtime": "^7.28.3",
101
+ "@eslint/js": "^9.34.0",
102
102
  "@octokit/rest": "^22.0.0",
103
- "@vitest/browser": "^3.1.4",
104
- "@vitest/coverage-v8": "^3.1.4",
105
- "@vitest/eslint-plugin": "^1.2.1",
106
- "chalk": "^5.4.1",
107
- "concurrently": "^9.2.0",
103
+ "@vitest/browser": "^3.2.4",
104
+ "@vitest/coverage-v8": "^3.2.4",
105
+ "@vitest/eslint-plugin": "^1.3.4",
106
+ "chalk": "^5.6.0",
107
+ "concurrently": "^9.2.1",
108
108
  "date-fns": "^4.1.0",
109
- "dotenv": "^16.5.0",
110
- "eslint": "^9.28.0",
111
- "eslint-config-prettier": "^10.1.5",
109
+ "dotenv": "^17.2.1",
110
+ "eslint": "^9.34.0",
111
+ "eslint-config-prettier": "^10.1.8",
112
112
  "eslint-plugin-compat": "^6.0.2",
113
- "eslint-plugin-import": "^2.31.0",
114
- "eslint-plugin-prettier": "^5.4.1",
113
+ "eslint-plugin-import": "^2.32.0",
114
+ "eslint-plugin-prettier": "^5.5.4",
115
115
  "eslint-plugin-react": "^7.37.5",
116
- "glob": "^11.0.2",
117
- "globals": "^16.2.0",
116
+ "glob": "^11.0.3",
117
+ "globals": "^16.3.0",
118
118
  "handlebars": "^4.7.8",
119
- "happy-dom": "^17.5.9",
119
+ "happy-dom": "^18.0.1",
120
120
  "husky": "^9.1.7",
121
- "lint-staged": "^16.1.0",
122
- "msw": "^2.8.7",
123
- "playwright": "^1.52.0",
124
- "prettier": "^3.5.3",
121
+ "lint-staged": "^16.1.5",
122
+ "msw": "^2.10.5",
123
+ "playwright": "^1.55.0",
124
+ "prettier": "^3.6.2",
125
125
  "read-cache": "^1.0.0",
126
126
  "recursive-readdir": "^2.2.3",
127
127
  "rimraf": "^6.0.1",
@@ -131,12 +131,12 @@
131
131
  "testcafe-browser-provider-saucelabs": "^3.0.0",
132
132
  "testcafe-reporter-junit": "^3.0.2",
133
133
  "testcafe-reporter-saucelabs": "^3.6.0",
134
- "typescript": "^5.8.3",
134
+ "typescript": "^5.9.2",
135
135
  "url-exists-nodejs": "^0.2.4",
136
136
  "url-parse": "^1.5.10",
137
- "vitest": "^3.2.0"
137
+ "vitest": "^3.2.4"
138
138
  },
139
139
  "optionalDependencies": {
140
- "@rollup/rollup-linux-x64-gnu": "^4.41.1"
140
+ "@rollup/rollup-linux-x64-gnu": "^4.48.1"
141
141
  }
142
142
  }
@@ -1 +1 @@
1
- {"version":3,"file":"findClickableElement.d.ts","sourceRoot":"","sources":["../../../../../src/components/ActivityCollector/utils/dom/findClickableElement.js"],"names":[],"mappings":"AAiBe,6CAcd"}
1
+ {"version":3,"file":"findClickableElement.d.ts","sourceRoot":"","sources":["../../../../../src/components/ActivityCollector/utils/dom/findClickableElement.js"],"names":[],"mappings":"AAiBe,6CAkBd"}
@@ -1 +1 @@
1
- {"version":3,"file":"onBeforeSendEventHandler.d.ts","sourceRoot":"","sources":["../../../../src/components/Advertising/handlers/onBeforeSendEventHandler.js"],"names":[],"mappings":"AAyBA;;;;;;;;;;GAUG;AACH,6HARG;IAAuB,aAAa;IACb,MAAM;IACN,KAAK;IACL,KAAK;IACL,eAAe;IACf,WAAW;IACT,UAAU;CACrC,iBAiFA"}
1
+ {"version":3,"file":"onBeforeSendEventHandler.d.ts","sourceRoot":"","sources":["../../../../src/components/Advertising/handlers/onBeforeSendEventHandler.js"],"names":[],"mappings":"AA4BA;;;;;;;;;;GAUG;AACH,6HARG;IAAuB,aAAa;IACb,MAAM;IACN,KAAK;IACL,KAAK;IACL,eAAe;IACf,WAAW;IACT,UAAU;CACrC,iBAsFA"}
@@ -1 +1 @@
1
- {"version":3,"file":"viewThroughHandler.d.ts","sourceRoot":"","sources":["../../../../src/components/Advertising/handlers/viewThroughHandler.js"],"names":[],"mappings":"AAkBA;;;;;;;yCAgEC"}
1
+ {"version":3,"file":"viewThroughHandler.d.ts","sourceRoot":"","sources":["../../../../src/components/Advertising/handlers/viewThroughHandler.js"],"names":[],"mappings":"AAkBA;;;;;;;yCAiEC"}
@@ -1,16 +1,6 @@
1
1
  declare function _default({ payload, datastreamIdOverride }: {
2
2
  payload: any;
3
3
  datastreamIdOverride: any;
4
- }): {
5
- getId(): string;
6
- getPayload(): any;
7
- getAction(): any;
8
- getDatastreamIdOverride(): any;
9
- getUseSendBeacon(): any;
10
- getEdgeSubPath(): any;
11
- getUseIdThirdPartyDomain(): boolean;
12
- setUseIdThirdPartyDomain(): void;
13
- setIsIdentityEstablished(): void;
14
- };
4
+ }): import("../../utils/request/types.js").Request;
15
5
  export default _default;
16
6
  //# sourceMappingURL=createConsentRequest.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"createConsentRequest.d.ts","sourceRoot":"","sources":["../../../src/components/Consent/createConsentRequest.js"],"names":[],"mappings":"AAce;;;;;;;;;;;;;EAWd"}
1
+ {"version":3,"file":"createConsentRequest.d.ts","sourceRoot":"","sources":["../../../src/components/Consent/createConsentRequest.js"],"names":[],"mappings":"AAce;;;mDAWd"}
@@ -1,11 +1,4 @@
1
- declare function _default(): {
2
- mergeMeta: Function;
3
- mergeState: Function;
4
- mergeQuery: Function;
5
- mergeConfigOverride: (updates: any) => any;
6
- addIdentity: any;
7
- hasIdentity: any;
8
- toJSON(): any;
9
- };
1
+ declare function _default(): ConsentRequestPayload;
10
2
  export default _default;
3
+ import type { ConsentRequestPayload } from './types.js';
11
4
  //# sourceMappingURL=createConsentRequestPayload.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"createConsentRequestPayload.d.ts","sourceRoot":"","sources":["../../../src/components/Consent/createConsentRequestPayload.js"],"names":[],"mappings":"AAce;;;;;;;;EAuBd"}
1
+ {"version":3,"file":"createConsentRequestPayload.d.ts","sourceRoot":"","sources":["../../../src/components/Consent/createConsentRequestPayload.js"],"names":[],"mappings":"AAqBe,6BAFF,qBAAqB,CA8BjC;;2CArC0C,YAAY"}
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Request payload object with methods for merging different types of data.
3
+ *
4
+ * @typedef {Object} ConsentRequestPayload
5
+ * @property {Function} mergeMeta
6
+ * @property {Function} mergeState
7
+ * @property {Function} mergeQuery
8
+ * @property {Function} mergeConfigOverride
9
+ * @property {Function} addIdentity
10
+ * @property {Function} hasIdentity
11
+ * @property {Function} toJSON
12
+ * @property {Function} setConsent
13
+ */
14
+ export const Types: {};
15
+ /**
16
+ * Request payload object with methods for merging different types of data.
17
+ */
18
+ export type ConsentRequestPayload = {
19
+ mergeMeta: Function;
20
+ mergeState: Function;
21
+ mergeQuery: Function;
22
+ mergeConfigOverride: Function;
23
+ addIdentity: Function;
24
+ hasIdentity: Function;
25
+ toJSON: Function;
26
+ setConsent: Function;
27
+ };
28
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/Consent/types.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,uBAAwB"}
@@ -1,16 +1,6 @@
1
1
  declare function _default({ payload, datastreamIdOverride }: {
2
2
  payload: any;
3
3
  datastreamIdOverride: any;
4
- }): {
5
- getId(): string;
6
- getPayload(): any;
7
- getAction(): any;
8
- getDatastreamIdOverride(): any;
9
- getUseSendBeacon(): any;
10
- getEdgeSubPath(): any;
11
- getUseIdThirdPartyDomain(): boolean;
12
- setUseIdThirdPartyDomain(): void;
13
- setIsIdentityEstablished(): void;
14
- };
4
+ }): import("../../../utils/request/types.js").Request;
15
5
  export default _default;
16
6
  //# sourceMappingURL=createIdentityRequest.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"createIdentityRequest.d.ts","sourceRoot":"","sources":["../../../../src/components/Identity/getIdentity/createIdentityRequest.js"],"names":[],"mappings":"AAce;;;;;;;;;;;;;EAWd"}
1
+ {"version":3,"file":"createIdentityRequest.d.ts","sourceRoot":"","sources":["../../../../src/components/Identity/getIdentity/createIdentityRequest.js"],"names":[],"mappings":"AAce;;;sDAWd"}
@@ -1,11 +1,3 @@
1
- declare function _default(namespaces: any): {
2
- mergeMeta: Function;
3
- mergeState: Function;
4
- mergeQuery: Function;
5
- mergeConfigOverride: (updates: any) => any;
6
- addIdentity: any;
7
- hasIdentity: any;
8
- toJSON(): any;
9
- };
1
+ declare function _default(namespaces: any): import("../../../utils/request/types.js").RequestPayload;
10
2
  export default _default;
11
3
  //# sourceMappingURL=createIdentityRequestPayload.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"createIdentityRequestPayload.d.ts","sourceRoot":"","sources":["../../../../src/components/Identity/getIdentity/createIdentityRequestPayload.js"],"names":[],"mappings":"AAkBe;;;;;;;;EAad"}
1
+ {"version":3,"file":"createIdentityRequestPayload.d.ts","sourceRoot":"","sources":["../../../../src/components/Identity/getIdentity/createIdentityRequestPayload.js"],"names":[],"mappings":"AAkBe,qGAad"}
@@ -9,7 +9,7 @@ export { default as setStyles } from "./setStyles.js";
9
9
  export { default as setAttributes } from "./setAttributes.js";
10
10
  export { default as swapImage } from "./swapImage.js";
11
11
  export { default as rearrangeChildren } from "./rearrangeChildren.js";
12
- export function createAction(renderFunc: Function): (itemData: {
12
+ export function createAction(renderFunc: Function, alwaysRender?: boolean): (itemData: {
13
13
  selector: string;
14
14
  prehidingSelector: string;
15
15
  content: string;
@@ -1 +1 @@
1
- {"version":3,"file":"action.d.ts","sourceRoot":"","sources":["../../../../src/components/Personalization/dom-actions/action.js"],"names":[],"mappings":";;;;;;;;;;;AA4DO,qDAQS,UAJH;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,iBAAiB,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAInD,EAAE,wBAAmB,EAAE,qBAFlC;IAAE,YAAY,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,OAAO,CAAC;IAAC,cAAc,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAA;CAEpC,mBAuBjE"}
1
+ {"version":3,"file":"action.d.ts","sourceRoot":"","sources":["../../../../src/components/Personalization/dom-actions/action.js"],"names":[],"mappings":";;;;;;;;;;;AAgEO,kEAFI,OAAO,IAUF,UAJH;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,iBAAiB,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAInD,EAAE,wBAAmB,EAAE,qBAFlC;IAAE,YAAY,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,OAAO,CAAC;IAAC,cAAc,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAA;CAEpC,mBAwBjE"}
@@ -0,0 +1,30 @@
1
+ export default getPushSubscriptionDetails;
2
+ /**
3
+ * Gets push subscription details for the current browser.
4
+ *
5
+ * @async
6
+ * @function
7
+ *
8
+ * @param {object} options
9
+ * @param {string} options.vapidPublicKey - The VAPID public key in base64 format used for push notification authentication.
10
+ * @param {Window} options.window
11
+ *
12
+ * @returns {Promise<PushSubscription>} A promise that resolves to an object containing the push subscription details.
13
+
14
+ * @throws {Error} Throws an error if service workers are not supported in the browser.
15
+ * @throws {Error} Throws an error if user didn't approve push notifications for the domain.
16
+ * @throws {Error} Throws an error if push notifications are not supported in the browser.
17
+ * @throws {Error} Throws an error if no VAPID public key was provided.
18
+ *
19
+ * @example
20
+ * // Get subscription details with VAPID key
21
+ * const vapidKey = "BEl62iUYgUivxIkv69yViEuiBIa40HI5hmjHbKPlXO...";
22
+ * const subscription = await getPushSubscriptionDetails(vapidKey);
23
+ * console.log(subscription.endpoint); // "https://fcm.googleapis.com/fcm/send/..."
24
+ */
25
+ declare function getPushSubscriptionDetails({ vapidPublicKey, window }: {
26
+ vapidPublicKey: string;
27
+ window: Window;
28
+ }): Promise<PushSubscription>;
29
+ import type { PushSubscription } from '../types.js';
30
+ //# sourceMappingURL=getPushSubscriptionDetails.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getPushSubscriptionDetails.d.ts","sourceRoot":"","sources":["../../../../src/components/PushNotifications/helpers/getPushSubscriptionDetails.js"],"names":[],"mappings":";AAgBA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wEAhBG;IAAwB,cAAc,EAA9B,MAAM;IACU,MAAM,EAAtB,MAAM;CAEd,GAAU,OAAO,CAAC,gBAAgB,CAAC,CA6FrC;sCA3GqC,aAAa"}
@@ -0,0 +1,43 @@
1
+ export default createPushNotifications;
2
+ /**
3
+ * @function
4
+ *
5
+ * @param {Object} options
6
+ * @param {{ orgId: string, pushNotifications: { vapidPublicKey: string }}} options.config
7
+ * @param {StorageCreator} options.createNamespacedStorage
8
+ * @param {EventManager} options.eventManager
9
+ * @param {Logger} options.logger
10
+ * @param {ConsentManager} options.consent
11
+ * @param {IdentityManager} options.identity
12
+ * @param {EdgeRequestExecutor} options.sendEdgeNetworkRequest
13
+ * @returns {{ commands: { sendPushSubscription: object } }}
14
+ */
15
+ declare function createPushNotifications({ createNamespacedStorage, eventManager, config, logger, consent, identity, sendEdgeNetworkRequest, }: {
16
+ config: {
17
+ orgId: string;
18
+ pushNotifications: {
19
+ vapidPublicKey: string;
20
+ };
21
+ };
22
+ createNamespacedStorage: StorageCreator;
23
+ eventManager: EventManager;
24
+ logger: Logger;
25
+ consent: ConsentManager;
26
+ identity: IdentityManager;
27
+ sendEdgeNetworkRequest: EdgeRequestExecutor;
28
+ }): {
29
+ commands: {
30
+ sendPushSubscription: object;
31
+ };
32
+ };
33
+ declare namespace createPushNotifications {
34
+ let namespace: string;
35
+ let configValidators: any;
36
+ }
37
+ import type { StorageCreator } from '../../utils/types.js';
38
+ import type { EventManager } from '../../core/types.js';
39
+ import type { Logger } from '../../core/types.js';
40
+ import type { ConsentManager } from '../../core/consent/types.js';
41
+ import type { IdentityManager } from '../../core/identity/types.js';
42
+ import type { EdgeRequestExecutor } from '../../core/edgeNetwork/types.js';
43
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/PushNotifications/index.js"],"names":[],"mappings":";AA6BA;;;;;;;;;;;;GAYG;AACH,gJATG;IAAiF,MAAM,EAA/E;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,iBAAiB,EAAE;YAAE,cAAc,EAAE,MAAM,CAAA;SAAE,CAAA;KAAC;IACvC,uBAAuB,EAA/C,cAAc;IACQ,YAAY,EAAlC,YAAY;IACI,MAAM,EAAtB,MAAM;IACkB,OAAO,EAA/B,cAAc;IACW,QAAQ,EAAjC,eAAe;IACc,sBAAsB,EAAnD,mBAAmB;CAC3B,GAAU;IAAG,QAAQ,EAAE;QAAE,oBAAoB,EAAE,MAAM,CAAA;KAAE,CAAA;CAAE,CAiD3D;;;;;oCA7EmC,sBAAsB;kCAChB,qBAAqB;4BAArB,qBAAqB;oCAE3B,6BAA6B;qCAD5B,8BAA8B;yCAE1B,iCAAiC"}
@@ -0,0 +1,10 @@
1
+ declare function _default({ ecid, eventManager, serializedPushSubscriptionDetails, window, }: {
2
+ ecid: string;
3
+ eventManager: EventManager;
4
+ serializedPushSubscriptionDetails: string;
5
+ window: Window;
6
+ }): Promise<DataCollectionRequestPayload>;
7
+ export default _default;
8
+ import type { EventManager } from "../../../core/types.js";
9
+ import type { DataCollectionRequestPayload } from "../../../utils/request/types.js";
10
+ //# sourceMappingURL=createSendPushSubscriptionPayload.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createSendPushSubscriptionPayload.d.ts","sourceRoot":"","sources":["../../../../src/components/PushNotifications/request/createSendPushSubscriptionPayload.js"],"names":[],"mappings":"AAmCe,8FAPZ;IAAwB,IAAI,EAApB,MAAM;IACgB,YAAY,EAAlC,YAAY;IACI,iCAAiC,EAAjD,MAAM;IACU,MAAM,EAAtB,MAAM;CAEd,GAAU,OAAO,CAAC,4BAA4B,CAAC,CAgCjD;;kCArDiC,wBAAwB;kDACR,iCAAiC"}
@@ -0,0 +1,7 @@
1
+ declare function _default({ payload }: {
2
+ payload: DataCollectionRequestPayload;
3
+ }): Request;
4
+ export default _default;
5
+ import type { DataCollectionRequestPayload } from '../../../utils/request/types.js';
6
+ import type { Request } from '../../../utils/request/types.js';
7
+ //# sourceMappingURL=createSendPushSubscriptionRequest.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createSendPushSubscriptionRequest.d.ts","sourceRoot":"","sources":["../../../../src/components/PushNotifications/request/createSendPushSubscriptionRequest.js"],"names":[],"mappings":"AAuBe,uCAJJ;IAAE,OAAO,EAAE,4BAA4B,CAAA;CAAE,GAEvC,OAAO,CAahB;;kDAtBuD,iCAAiC;6BAAjC,iCAAiC"}
@@ -0,0 +1,20 @@
1
+ declare function _default({ config: { vapidPublicKey }, storage, logger, sendEdgeNetworkRequest, consent, eventManager, identity, window, }: {
2
+ config: {
3
+ vapidPublicKey: string;
4
+ };
5
+ storage: Storage;
6
+ logger: Logger;
7
+ eventManager: EventManager;
8
+ identity: IdentityManager;
9
+ sendEdgeNetworkRequest: EdgeRequestExecutor;
10
+ consent: ConsentManager;
11
+ window: Window;
12
+ }): Promise<void>;
13
+ export default _default;
14
+ import type { Storage } from '../../../utils/types.js';
15
+ import type { Logger } from '../../../core/types.js';
16
+ import type { EventManager } from '../../../core/types.js';
17
+ import type { IdentityManager } from '../../../core/identity/types.js';
18
+ import type { EdgeRequestExecutor } from '../../../core/edgeNetwork/types.js';
19
+ import type { ConsentManager } from '../../../core/consent/types.js';
20
+ //# sourceMappingURL=makeSendPushSubscriptionRequest.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"makeSendPushSubscriptionRequest.d.ts","sourceRoot":"","sources":["../../../../src/components/PushNotifications/request/makeSendPushSubscriptionRequest.js"],"names":[],"mappings":"AA8Ce,6IAXZ;IAA0C,MAAM,EAAxC;QAAC,cAAc,EAAE,MAAM,CAAA;KAAC;IACP,OAAO,EAAxB,OAAO;IACS,MAAM,EAAtB,MAAM;IACgB,YAAY,EAAlC,YAAY;IACa,QAAQ,EAAjC,eAAe;IACc,sBAAsB,EAAnD,mBAAmB;IACK,OAAO,EAA/B,cAAc;IACE,MAAM,EAAtB,MAAM;CAEd,GAAU,OAAO,CAAC,IAAI,CAAC,CAiDzB;;6BAjF4B,yBAAyB;4BACZ,wBAAwB;kCAAxB,wBAAwB;qCAC7B,iCAAiC;yCAE7B,oCAAoC;oCADzC,gCAAgC"}
@@ -0,0 +1,23 @@
1
+ /** @import { Identity } from '../../utils/request/types.js' */
2
+ /**
3
+ * @typedef {Object} PushSubscription
4
+ * @property {string} endpoint - The push service endpoint URL
5
+ * @property {Object} keys - The subscription keys object
6
+ * @property {string|null} keys.p256dh - The P-256 ECDH public key as an ArrayBuffer, or null if not available
7
+ * @property {string|null} keys.auth - The authentication secret as an ArrayBuffer, or null if not available
8
+ */
9
+ export const Types: {};
10
+ export type PushSubscription = {
11
+ /**
12
+ * - The push service endpoint URL
13
+ */
14
+ endpoint: string;
15
+ /**
16
+ * - The subscription keys object
17
+ */
18
+ keys: {
19
+ p256dh: string | null;
20
+ auth: string | null;
21
+ };
22
+ };
23
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/PushNotifications/types.js"],"names":[],"mappings":"AAAA,+DAA+D;AAE/D;;;;;;GAMG;AAEH,uBAAwB;;;;;cANV,MAAM;;;;UAEjB;QAA6B,MAAM,EAAxB,MAAM,GAAC,IAAI;QACO,IAAI,EAAtB,MAAM,GAAC,IAAI;KACxB"}
@@ -1,16 +1,6 @@
1
1
  declare function _default({ mediaRequestPayload, action }: {
2
2
  mediaRequestPayload: any;
3
3
  action: any;
4
- }): {
5
- getId(): string;
6
- getPayload(): any;
7
- getAction(): any;
8
- getDatastreamIdOverride(): any;
9
- getUseSendBeacon(): any;
10
- getEdgeSubPath(): any;
11
- getUseIdThirdPartyDomain(): boolean;
12
- setUseIdThirdPartyDomain(): void;
13
- setIsIdentityEstablished(): void;
14
- };
4
+ }): import("../../utils/request/types.js").Request;
15
5
  export default _default;
16
6
  //# sourceMappingURL=createMediaRequest.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"createMediaRequest.d.ts","sourceRoot":"","sources":["../../../src/components/StreamingMedia/createMediaRequest.js"],"names":[],"mappings":"AAce;;;;;;;;;;;;;EAWd"}
1
+ {"version":3,"file":"createMediaRequest.d.ts","sourceRoot":"","sources":["../../../src/components/StreamingMedia/createMediaRequest.js"],"names":[],"mappings":"AAce;;;mDAWd"}
@@ -7,4 +7,5 @@ export { default as personalization } from "../components/Personalization/index.
7
7
  export { default as rulesEngine } from "../components/RulesEngine/index.js";
8
8
  export { default as streamingMedia } from "../components/StreamingMedia/index.js";
9
9
  export { default as advertising } from "../components/Advertising/index.js";
10
+ export { default as pushNotifications } from "../components/PushNotifications/index.js";
10
11
  //# sourceMappingURL=componentCreators.d.ts.map
@@ -1,13 +1,7 @@
1
1
  declare function _default({ generalConsentState, logger }: {
2
- generalConsentState: any;
3
- logger: any;
4
- }): {
5
- initializeConsent(defaultConsentByPurpose: any, storedConsentByPurpose: any): void;
6
- setConsent(consentByPurpose: any): void;
7
- suspend(): void;
8
- awaitConsent(): any;
9
- withConsent(): any;
10
- current(): any;
11
- };
2
+ generalConsentState: ConsentStateMachine;
3
+ logger: Logger;
4
+ }): ConsentManager;
12
5
  export default _default;
6
+ import type { ConsentManager } from './types.js';
13
7
  //# sourceMappingURL=createConsent.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"createConsent.d.ts","sourceRoot":"","sources":["../../../src/core/consent/createConsent.js"],"names":[],"mappings":"AAoBe;;;;;;;;;;EAyCd"}
1
+ {"version":3,"file":"createConsent.d.ts","sourceRoot":"","sources":["../../../src/core/consent/createConsent.js"],"names":[],"mappings":"AA+Be,2DALZ;IAAqC,mBAAmB,EAAhD,mBAAmB;IACH,MAAM,EAAtB,MAAM;CAEd,GAAU,cAAc,CA2C1B;;oCA5DmC,YAAY"}
@@ -4,17 +4,9 @@ export const CONSENT_SOURCE_DEFAULT: "default";
4
4
  export const CONSENT_SOURCE_INITIAL: "initial";
5
5
  export const CONSENT_SOURCE_NEW: "new";
6
6
  declare function _default({ logger }: {
7
- logger: any;
8
- }): {
9
- in(source: any): void;
10
- out(source: any): void;
11
- pending(source: any): void;
12
- awaitConsent: () => Promise<void>;
13
- withConsent(): Promise<void>;
14
- current(): {
15
- state: string;
16
- wasSet: boolean;
17
- };
18
- };
7
+ logger: Logger;
8
+ }): ConsentStateMachine;
19
9
  export default _default;
10
+ import type { Logger } from '../../core/types.js';
11
+ import type { ConsentStateMachine } from './types.js';
20
12
  //# sourceMappingURL=createConsentStateMachine.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"createConsentStateMachine.d.ts","sourceRoot":"","sources":["../../../src/core/consent/createConsentStateMachine.js"],"names":[],"mappings":"AAcA,+BAAgC,4BAA4B,CAAC;AAC7D,0CAA2C,iBAAiB,CAAC;AAC7D,qCAAsC,SAAS,CAAC;AAChD,qCAAsC,SAAS,CAAC;AAChD,iCAAkC,KAAK,CAAC;AASzB;;;;;;;;;;;;EAuGd"}
1
+ {"version":3,"file":"createConsentStateMachine.d.ts","sourceRoot":"","sources":["../../../src/core/consent/createConsentStateMachine.js"],"names":[],"mappings":"AAiBA,+BAAgC,4BAA4B,CAAC;AAC7D,0CAA2C,iBAAiB,CAAC;AAC7D,qCAAsC,SAAS,CAAC;AAChD,qCAAsC,SAAS,CAAC;AAChD,iCAAkC,KAAK,CAAC;AAwCzB,sCAhBZ;IAAwB,MAAM,EAAtB,MAAM;CAEd,GAAU,mBAAmB,CAqH/B;;4BAxJ2B,qBAAqB;yCACkB,YAAY"}
@@ -0,0 +1,42 @@
1
+ /**
2
+ * @typedef {Object} ConsentStateMachine
3
+ * @property {function(string): void} in
4
+ * @property {function(string): void} out
5
+ * @property {function(string): void} pending
6
+ * @property {function(boolean=): Promise<void>} awaitConsent
7
+ * @property {function(): Promise<void>} withConsent
8
+ * @property {function(): {state: string, wasSet: boolean}} current
9
+ */
10
+ /**
11
+ * @typedef {Object} ConsentManager
12
+ * @property {function(Object, Object): void} initializeConsent
13
+ * @property {function(Object): void} setConsent
14
+ * @property {function(): void} suspend
15
+ * @property {function(): Promise<void>} awaitConsent
16
+ * @property {function(): Promise<void>} withConsent
17
+ * @property {function(): {state: string, wasSet: boolean}} current
18
+ */
19
+ export const Types: {};
20
+ export type ConsentStateMachine = {
21
+ in: (arg0: string) => void;
22
+ out: (arg0: string) => void;
23
+ pending: (arg0: string) => void;
24
+ awaitConsent: (arg0: boolean | undefined) => Promise<void>;
25
+ withConsent: () => Promise<void>;
26
+ current: () => {
27
+ state: string;
28
+ wasSet: boolean;
29
+ };
30
+ };
31
+ export type ConsentManager = {
32
+ initializeConsent: (arg0: any, arg1: any) => void;
33
+ setConsent: (arg0: any) => void;
34
+ suspend: () => void;
35
+ awaitConsent: () => Promise<void>;
36
+ withConsent: () => Promise<void>;
37
+ current: () => {
38
+ state: string;
39
+ wasSet: boolean;
40
+ };
41
+ };
42
+ //# sourceMappingURL=types.d.ts.map