@adobe/alloy 2.29.0-beta.5 → 2.30.0-beta.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 (177) 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/constants.js +19 -0
  12. package/libEs5/components/PushNotifications/helpers/getPushSubscriptionDetails.js +116 -0
  13. package/libEs5/components/PushNotifications/helpers/readFromIndexedDb.js +41 -0
  14. package/libEs5/components/PushNotifications/helpers/saveToIndexedDb.js +50 -0
  15. package/libEs5/components/PushNotifications/helpers/serviceWorkerNotificationClickListener.js +85 -0
  16. package/libEs5/components/PushNotifications/helpers/serviceWorkerPushListener.js +70 -0
  17. package/libEs5/components/PushNotifications/index.js +129 -0
  18. package/libEs5/components/PushNotifications/request/createSendPushSubscriptionPayload.js +62 -0
  19. package/libEs5/components/PushNotifications/request/createSendPushSubscriptionRequest.js +35 -0
  20. package/libEs5/components/PushNotifications/request/makeSendPushSubscriptionRequest.js +93 -0
  21. package/libEs5/components/PushNotifications/request/makeSendServiceWorkerTrackingData.js +146 -0
  22. package/libEs5/components/PushNotifications/serviceWorker.js +91 -0
  23. package/libEs5/components/PushNotifications/types.js +95 -0
  24. package/libEs5/constants/libraryVersion.js +1 -1
  25. package/libEs5/core/componentCreators.js +8 -1
  26. package/libEs5/core/consent/createConsent.js +10 -0
  27. package/libEs5/core/consent/createConsentStateMachine.js +36 -0
  28. package/libEs5/core/consent/types.js +24 -0
  29. package/libEs5/core/edgeNetwork/injectSendEdgeNetworkRequest.js +20 -0
  30. package/libEs5/core/edgeNetwork/types.js +10 -0
  31. package/libEs5/core/identity/createIdentity.js +36 -0
  32. package/libEs5/core/identity/types.js +15 -0
  33. package/libEs5/core/injectCreateResponse.js +9 -7
  34. package/libEs5/core/types.js +101 -11
  35. package/libEs5/utils/bytes.js +12 -1
  36. package/libEs5/utils/createLoggingCookieJar.js +14 -1
  37. package/libEs5/utils/createMerger.js +5 -4
  38. package/libEs5/utils/index.js +19 -0
  39. package/libEs5/utils/indexedDb.js +73 -0
  40. package/libEs5/utils/injectStorage.js +19 -0
  41. package/libEs5/utils/request/createDataCollectionRequestPayload.js +16 -8
  42. package/libEs5/utils/request/createRequest.js +28 -1
  43. package/libEs5/utils/request/createRequestPayload.js +15 -2
  44. package/libEs5/utils/request/types.js +52 -0
  45. package/libEs5/utils/types.js +39 -0
  46. package/libEs6/components/ActivityCollector/utils/dom/findClickableElement.js +4 -0
  47. package/libEs6/components/Advertising/handlers/clickThroughHandler.js +2 -1
  48. package/libEs6/components/Advertising/handlers/onBeforeSendEventHandler.js +8 -3
  49. package/libEs6/components/Advertising/handlers/viewThroughHandler.js +2 -1
  50. package/libEs6/components/Advertising/identities/collectID5Id.js +1 -1
  51. package/libEs6/components/Advertising/identities/collectRampId.js +1 -1
  52. package/libEs6/components/Consent/createConsentRequestPayload.js +16 -3
  53. package/libEs6/components/Consent/types.js +15 -0
  54. package/libEs6/components/Personalization/dom-actions/action.js +7 -4
  55. package/libEs6/components/Personalization/dom-actions/initDomActionsModules.js +10 -10
  56. package/libEs6/components/PushNotifications/helpers/constants.js +16 -0
  57. package/libEs6/components/PushNotifications/helpers/getPushSubscriptionDetails.js +114 -0
  58. package/libEs6/components/PushNotifications/helpers/readFromIndexedDb.js +40 -0
  59. package/libEs6/components/PushNotifications/helpers/saveToIndexedDb.js +48 -0
  60. package/libEs6/components/PushNotifications/helpers/serviceWorkerNotificationClickListener.js +82 -0
  61. package/libEs6/components/PushNotifications/helpers/serviceWorkerPushListener.js +69 -0
  62. package/libEs6/components/PushNotifications/index.js +126 -0
  63. package/libEs6/components/PushNotifications/request/createSendPushSubscriptionPayload.js +61 -0
  64. package/libEs6/components/PushNotifications/request/createSendPushSubscriptionRequest.js +34 -0
  65. package/libEs6/components/PushNotifications/request/makeSendPushSubscriptionRequest.js +89 -0
  66. package/libEs6/components/PushNotifications/request/makeSendServiceWorkerTrackingData.js +146 -0
  67. package/libEs6/components/PushNotifications/serviceWorker.js +90 -0
  68. package/libEs6/components/PushNotifications/types.js +92 -0
  69. package/libEs6/constants/libraryVersion.js +1 -1
  70. package/libEs6/core/componentCreators.js +2 -1
  71. package/libEs6/core/consent/createConsent.js +12 -0
  72. package/libEs6/core/consent/createConsentStateMachine.js +36 -0
  73. package/libEs6/core/consent/types.js +21 -0
  74. package/libEs6/core/edgeNetwork/injectSendEdgeNetworkRequest.js +20 -0
  75. package/libEs6/core/edgeNetwork/types.js +7 -0
  76. package/libEs6/core/identity/createIdentity.js +38 -0
  77. package/libEs6/core/identity/types.js +12 -0
  78. package/libEs6/core/injectCreateResponse.js +11 -7
  79. package/libEs6/core/types.js +101 -11
  80. package/libEs6/utils/bytes.js +12 -1
  81. package/libEs6/utils/createLoggingCookieJar.js +15 -1
  82. package/libEs6/utils/createMerger.js +5 -4
  83. package/libEs6/utils/index.js +1 -0
  84. package/libEs6/utils/indexedDb.js +67 -0
  85. package/libEs6/utils/injectStorage.js +20 -0
  86. package/libEs6/utils/request/createDataCollectionRequestPayload.js +19 -8
  87. package/libEs6/utils/request/createRequest.js +29 -1
  88. package/libEs6/utils/request/createRequestPayload.js +15 -2
  89. package/libEs6/utils/request/types.js +49 -0
  90. package/libEs6/utils/types.js +36 -0
  91. package/package.json +45 -52
  92. package/scripts/alloyBuilder.js +130 -4
  93. package/types/components/ActivityCollector/utils/dom/findClickableElement.d.ts.map +1 -1
  94. package/types/components/Advertising/handlers/onBeforeSendEventHandler.d.ts.map +1 -1
  95. package/types/components/Advertising/handlers/viewThroughHandler.d.ts.map +1 -1
  96. package/types/components/Consent/createConsentRequest.d.ts +1 -11
  97. package/types/components/Consent/createConsentRequest.d.ts.map +1 -1
  98. package/types/components/Consent/createConsentRequestPayload.d.ts +2 -9
  99. package/types/components/Consent/createConsentRequestPayload.d.ts.map +1 -1
  100. package/types/components/Consent/types.d.ts +28 -0
  101. package/types/components/Consent/types.d.ts.map +1 -0
  102. package/types/components/Identity/getIdentity/createIdentityRequest.d.ts +1 -11
  103. package/types/components/Identity/getIdentity/createIdentityRequest.d.ts.map +1 -1
  104. package/types/components/Identity/getIdentity/createIdentityRequestPayload.d.ts +1 -9
  105. package/types/components/Identity/getIdentity/createIdentityRequestPayload.d.ts.map +1 -1
  106. package/types/components/Personalization/dom-actions/action.d.ts +1 -1
  107. package/types/components/Personalization/dom-actions/action.d.ts.map +1 -1
  108. package/types/components/PushNotifications/helpers/constants.d.ts +5 -0
  109. package/types/components/PushNotifications/helpers/constants.d.ts.map +1 -0
  110. package/types/components/PushNotifications/helpers/getPushSubscriptionDetails.d.ts +30 -0
  111. package/types/components/PushNotifications/helpers/getPushSubscriptionDetails.d.ts.map +1 -0
  112. package/types/components/PushNotifications/helpers/readFromIndexedDb.d.ts +4 -0
  113. package/types/components/PushNotifications/helpers/readFromIndexedDb.d.ts.map +1 -0
  114. package/types/components/PushNotifications/helpers/saveToIndexedDb.d.ts +9 -0
  115. package/types/components/PushNotifications/helpers/saveToIndexedDb.d.ts.map +1 -0
  116. package/types/components/PushNotifications/helpers/serviceWorkerNotificationClickListener.d.ts +9 -0
  117. package/types/components/PushNotifications/helpers/serviceWorkerNotificationClickListener.d.ts.map +1 -0
  118. package/types/components/PushNotifications/helpers/serviceWorkerPushListener.d.ts +8 -0
  119. package/types/components/PushNotifications/helpers/serviceWorkerPushListener.d.ts.map +1 -0
  120. package/types/components/PushNotifications/index.d.ts +51 -0
  121. package/types/components/PushNotifications/index.d.ts.map +1 -0
  122. package/types/components/PushNotifications/request/createSendPushSubscriptionPayload.d.ts +10 -0
  123. package/types/components/PushNotifications/request/createSendPushSubscriptionPayload.d.ts.map +1 -0
  124. package/types/components/PushNotifications/request/createSendPushSubscriptionRequest.d.ts +7 -0
  125. package/types/components/PushNotifications/request/createSendPushSubscriptionRequest.d.ts.map +1 -0
  126. package/types/components/PushNotifications/request/makeSendPushSubscriptionRequest.d.ts +21 -0
  127. package/types/components/PushNotifications/request/makeSendPushSubscriptionRequest.d.ts.map +1 -0
  128. package/types/components/PushNotifications/request/makeSendServiceWorkerTrackingData.d.ts +11 -0
  129. package/types/components/PushNotifications/request/makeSendServiceWorkerTrackingData.d.ts.map +1 -0
  130. package/types/components/PushNotifications/serviceWorker.d.ts +2 -0
  131. package/types/components/PushNotifications/serviceWorker.d.ts.map +1 -0
  132. package/types/components/PushNotifications/types.d.ts +190 -0
  133. package/types/components/PushNotifications/types.d.ts.map +1 -0
  134. package/types/components/StreamingMedia/createMediaRequest.d.ts +1 -11
  135. package/types/components/StreamingMedia/createMediaRequest.d.ts.map +1 -1
  136. package/types/core/componentCreators.d.ts +1 -0
  137. package/types/core/consent/createConsent.d.ts +4 -10
  138. package/types/core/consent/createConsent.d.ts.map +1 -1
  139. package/types/core/consent/createConsentStateMachine.d.ts +4 -12
  140. package/types/core/consent/createConsentStateMachine.d.ts.map +1 -1
  141. package/types/core/consent/types.d.ts +42 -0
  142. package/types/core/consent/types.d.ts.map +1 -0
  143. package/types/core/edgeNetwork/injectSendEdgeNetworkRequest.d.ts +15 -13
  144. package/types/core/edgeNetwork/injectSendEdgeNetworkRequest.d.ts.map +1 -1
  145. package/types/core/edgeNetwork/types.d.ts +12 -0
  146. package/types/core/edgeNetwork/types.d.ts.map +1 -0
  147. package/types/core/identity/createIdentity.d.ts +9 -9
  148. package/types/core/identity/createIdentity.d.ts.map +1 -1
  149. package/types/core/identity/types.d.ts +23 -0
  150. package/types/core/identity/types.d.ts.map +1 -0
  151. package/types/core/injectCreateResponse.d.ts +3 -27
  152. package/types/core/injectCreateResponse.d.ts.map +1 -1
  153. package/types/core/types.d.ts +209 -22
  154. package/types/core/types.d.ts.map +1 -1
  155. package/types/utils/bytes.d.ts +3 -1
  156. package/types/utils/bytes.d.ts.map +1 -1
  157. package/types/utils/createLoggingCookieJar.d.ts +5 -3
  158. package/types/utils/createLoggingCookieJar.d.ts.map +1 -1
  159. package/types/utils/createMerger.d.ts +1 -1
  160. package/types/utils/createMerger.d.ts.map +1 -1
  161. package/types/utils/index.d.ts +1 -0
  162. package/types/utils/indexedDb.d.ts +4 -0
  163. package/types/utils/indexedDb.d.ts.map +1 -0
  164. package/types/utils/injectStorage.d.ts +2 -40
  165. package/types/utils/injectStorage.d.ts.map +1 -1
  166. package/types/utils/request/createDataCollectionRequest.d.ts +1 -11
  167. package/types/utils/request/createDataCollectionRequest.d.ts.map +1 -1
  168. package/types/utils/request/createDataCollectionRequestPayload.d.ts +2 -9
  169. package/types/utils/request/createDataCollectionRequestPayload.d.ts.map +1 -1
  170. package/types/utils/request/createRequest.d.ts +13 -11
  171. package/types/utils/request/createRequest.d.ts.map +1 -1
  172. package/types/utils/request/createRequestPayload.d.ts +7 -9
  173. package/types/utils/request/createRequestPayload.d.ts.map +1 -1
  174. package/types/utils/request/types.d.ts +91 -0
  175. package/types/utils/request/types.d.ts.map +1 -0
  176. package/types/utils/types.d.ts +91 -0
  177. package/types/utils/types.d.ts.map +1 -0
@@ -1,11 +1,3 @@
1
- declare function _default(namespaces: any): {
2
- mergeMeta: Function;
3
- mergeState: Function;
4
- mergeQuery: Function;
5
- mergeConfigOverride: (updates: any) => void;
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,5 @@
1
+ export const DB_NAME: "alloyPushNotifications";
2
+ export const DB_VERSION: 1;
3
+ export const STORE_NAME: "config";
4
+ export const INDEX_KEY: "alloyConfig";
5
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../src/components/PushNotifications/helpers/constants.js"],"names":[],"mappings":"AAYA,sBAAuB,wBAAwB,CAAC;AAChD,yBAA0B,CAAC,CAAC;AAC5B,yBAA0B,QAAQ,CAAC;AACnC,wBAAyB,aAAa,CAAC"}
@@ -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,4 @@
1
+ declare function _default(logger: ServiceWorkerLogger): Promise<any | undefined>;
2
+ export default _default;
3
+ import type { ServiceWorkerLogger } from '../types.js';
4
+ //# sourceMappingURL=readFromIndexedDb.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"readFromIndexedDb.d.ts","sourceRoot":"","sources":["../../../../src/components/PushNotifications/helpers/readFromIndexedDb.js"],"names":[],"mappings":"AAyBe,kCAJJ,mBAAmB,GACjB,OAAO,CAAC,MAAO,SAAS,CAAC,CA2BrC;;yCArCwC,aAAa"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @param {Object} data
3
+ * @param {Logger} logger
4
+ *
5
+ * @returns {Promise<void>}
6
+ */
7
+ export default function saveToIndexedDB(data: any, logger: Logger): Promise<void>;
8
+ import type { Logger } from '../../../core/types.js';
9
+ //# sourceMappingURL=saveToIndexedDb.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"saveToIndexedDb.d.ts","sourceRoot":"","sources":["../../../../src/components/PushNotifications/helpers/saveToIndexedDb.js"],"names":[],"mappings":"AAsBA;;;;;GAKG;AACH,2DAJW,MAAM,GAEJ,OAAO,CAAC,IAAI,CAAC,CAqCzB;4BAnD2B,wBAAwB"}
@@ -0,0 +1,9 @@
1
+ declare function _default({ event, sw, logger, fetch }: {
2
+ sw: ServiceWorkerGlobalScope;
3
+ event: NotificationEvent;
4
+ fetch: (url: string, options: object) => Promise<Response>;
5
+ logger: ServiceWorkerLogger;
6
+ }): void;
7
+ export default _default;
8
+ import type { ServiceWorkerLogger } from '../types.js';
9
+ //# sourceMappingURL=serviceWorkerNotificationClickListener.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"serviceWorkerNotificationClickListener.d.ts","sourceRoot":"","sources":["../../../../src/components/PushNotifications/helpers/serviceWorkerNotificationClickListener.js"],"names":[],"mappings":"AAkCe,wDALZ;IAA0C,EAAE,EAApC,wBAAwB;IACG,KAAK,EAAhC,iBAAiB;IAC4C,KAAK,EAAlE,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,QAAQ,CAAC;IACtB,MAAM,EAAnC,mBAAmB;CAC7B,QAkDA;;yCApEwC,aAAa"}
@@ -0,0 +1,8 @@
1
+ declare function _default({ sw, event, logger }: {
2
+ sw: ServiceWorkerGlobalScope;
3
+ event: PushEvent;
4
+ logger: ServiceWorkerLogger;
5
+ }): Promise<void>;
6
+ export default _default;
7
+ import type { ServiceWorkerLogger } from '../types.js';
8
+ //# sourceMappingURL=serviceWorkerPushListener.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"serviceWorkerPushListener.d.ts","sourceRoot":"","sources":["../../../../src/components/PushNotifications/helpers/serviceWorkerPushListener.js"],"names":[],"mappings":"AA4Be,iDALZ;IAA0C,EAAE,EAApC,wBAAwB;IACL,KAAK,EAAxB,SAAS;IACoB,MAAM,EAAnC,mBAAmB;CAC3B,GAAU,OAAO,CAAC,IAAI,CAAC,CA6CzB;;yCAvDwC,aAAa"}
@@ -0,0 +1,51 @@
1
+ export default createPushNotifications;
2
+ /**
3
+ * @function
4
+ *
5
+ * @param {Object} options
6
+ * @param {{ orgId: string, datastreamId: string, edgeDomain: string, edgeBasePath: string, pushNotifications: { vapidPublicKey: string, appId: string, trackingDatasetId: 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 {function(): string} options.getBrowser
13
+ * @param {EdgeRequestExecutor} options.sendEdgeNetworkRequest
14
+ * @returns {{ lifecycle: object, commands: { sendPushSubscription: object } }}
15
+ */
16
+ declare function createPushNotifications({ createNamespacedStorage, eventManager, config, logger, consent, identity, getBrowser, sendEdgeNetworkRequest, }: {
17
+ config: {
18
+ orgId: string;
19
+ datastreamId: string;
20
+ edgeDomain: string;
21
+ edgeBasePath: string;
22
+ pushNotifications: {
23
+ vapidPublicKey: string;
24
+ appId: string;
25
+ trackingDatasetId: string;
26
+ };
27
+ };
28
+ createNamespacedStorage: StorageCreator;
29
+ eventManager: EventManager;
30
+ logger: Logger;
31
+ consent: ConsentManager;
32
+ identity: IdentityManager;
33
+ getBrowser: () => string;
34
+ sendEdgeNetworkRequest: EdgeRequestExecutor;
35
+ }): {
36
+ lifecycle: object;
37
+ commands: {
38
+ sendPushSubscription: object;
39
+ };
40
+ };
41
+ declare namespace createPushNotifications {
42
+ let namespace: string;
43
+ let configValidators: any;
44
+ }
45
+ import type { StorageCreator } from '../../utils/types.js';
46
+ import type { EventManager } from '../../core/types.js';
47
+ import type { Logger } from '../../core/types.js';
48
+ import type { ConsentManager } from '../../core/consent/types.js';
49
+ import type { IdentityManager } from '../../core/identity/types.js';
50
+ import type { EdgeRequestExecutor } from '../../core/edgeNetwork/types.js';
51
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/PushNotifications/index.js"],"names":[],"mappings":";AAgCA;;;;;;;;;;;;;GAaG;AACH,4JAVG;IAA2L,MAAM,EAAzL;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,YAAY,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,CAAC;QAAC,YAAY,EAAE,MAAM,CAAC;QAAC,iBAAiB,EAAE;YAAE,cAAc,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,MAAM,CAAC;YAAC,iBAAiB,EAAE,MAAM,CAAA;SAAE,CAAA;KAAC;IACjJ,uBAAuB,EAA/C,cAAc;IACQ,YAAY,EAAlC,YAAY;IACI,MAAM,EAAtB,MAAM;IACkB,OAAO,EAA/B,cAAc;IACW,QAAQ,EAAjC,eAAe;IACa,UAAU,EAAtC,MAAY,MAAM;IACW,sBAAsB,EAAnD,mBAAmB;CAC3B,GAAU;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE;QAAE,oBAAoB,EAAE,MAAM,CAAA;KAAE,CAAA;CAAE,CAwE7E;;;;;oCAxGmC,sBAAsB;kCAChB,qBAAqB;4BAArB,qBAAqB;oCAE3B,6BAA6B;qCAD5B,8BAA8B;yCAE1B,iCAAiC"}
@@ -0,0 +1,10 @@
1
+ declare function _default({ ecid, eventManager, serializedPushSubscriptionDetails, appId, }: {
2
+ ecid: string;
3
+ eventManager: EventManager;
4
+ serializedPushSubscriptionDetails: string;
5
+ appId: string;
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,6FAPZ;IAAwB,IAAI,EAApB,MAAM;IACgB,YAAY,EAAlC,YAAY;IACI,iCAAiC,EAAjD,MAAM;IACU,KAAK,EAArB,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,21 @@
1
+ declare function _default({ config: { vapidPublicKey, appId }, storage, logger, sendEdgeNetworkRequest, consent, eventManager, identity, window, }: {
2
+ config: {
3
+ vapidPublicKey: string;
4
+ appId: string;
5
+ };
6
+ storage: Storage;
7
+ logger: Logger;
8
+ eventManager: EventManager;
9
+ identity: IdentityManager;
10
+ sendEdgeNetworkRequest: EdgeRequestExecutor;
11
+ consent: ConsentManager;
12
+ window: Window;
13
+ }): Promise<void>;
14
+ export default _default;
15
+ import type { Storage } from '../../../utils/types.js';
16
+ import type { Logger } from '../../../core/types.js';
17
+ import type { EventManager } from '../../../core/types.js';
18
+ import type { IdentityManager } from '../../../core/identity/types.js';
19
+ import type { EdgeRequestExecutor } from '../../../core/edgeNetwork/types.js';
20
+ import type { ConsentManager } from '../../../core/consent/types.js';
21
+ //# 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":"AA+Ce,oJAXZ;IAAyD,MAAM,EAAvD;QAAC,cAAc,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAC;IACtB,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,CAmDzB;;6BApF4B,yBAAyB;4BACZ,wBAAwB;kCAAxB,wBAAwB;qCAC7B,iCAAiC;yCAE7B,oCAAoC;oCADzC,gCAAgC"}
@@ -0,0 +1,11 @@
1
+ declare function _default({ xdm, actionLabel, applicationLaunches }: {
2
+ xdm: any;
3
+ actionLabel?: string;
4
+ applicationLaunches?: number;
5
+ }, { logger, fetch }: {
6
+ logger: ServiceWorkerLogger;
7
+ fetch: (url: string, options: object) => Promise<Response>;
8
+ }): Promise<boolean>;
9
+ export default _default;
10
+ import type { ServiceWorkerLogger } from '../types.js';
11
+ //# sourceMappingURL=makeSendServiceWorkerTrackingData.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"makeSendServiceWorkerTrackingData.d.ts","sourceRoot":"","sources":["../../../../src/components/PushNotifications/request/makeSendServiceWorkerTrackingData.js"],"names":[],"mappings":"AAkCe,qEAVZ;IAAwB,GAAG;IACF,WAAW,GAA5B,MAAM;IACW,mBAAmB,GAApC,MAAM;CACd,qBACA;IAAmC,MAAM,EAAjC,mBAAmB;IACwC,KAAK,EAAhE,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,QAAQ,CAAC;CAE3D,GAAU,OAAO,CAAC,OAAO,CAAC,CAsH5B;;yCAvIwC,aAAa"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=serviceWorker.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"serviceWorker.d.ts","sourceRoot":"","sources":["../../../src/components/PushNotifications/serviceWorker.js"],"names":[],"mappings":""}
@@ -0,0 +1,190 @@
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
+ /**
10
+ * @typedef {Object} CustomerJourneyManagement
11
+ * @property {Object} messageExecution
12
+ * @property {string} messageExecution.messageExecutionID
13
+ * @property {string} messageExecution.messageID
14
+ * @property {string} messageExecution.messageType
15
+ * @property {string} messageExecution.campaignID
16
+ * @property {string} messageExecution.campaignVersionID
17
+ * @property {string} messageExecution.batchInstanceID
18
+ * @property {Object} [pushChannelContext]
19
+ * @property {"web"} [pushChannelContext.platform]
20
+ * @property {Object} [messageProfile]
21
+ * @property {Object} [messageProfile.channel]
22
+ * @property {string} [messageProfile.channel._id]
23
+ */
24
+ /**
25
+ * @typedef {Object} Decisioning
26
+ * @property {Object[]} propositions
27
+ * @property {Object} propositions[].scopeDetails
28
+ * @property {string} propositions[].scopeDetails.correlationID
29
+ */
30
+ /**
31
+ * @typedef {Object} XdmTrackingContext
32
+ * @property {Object} _experience
33
+ * @property {CustomerJourneyManagement} _experience.customerJourneyManagement
34
+ * @property {Decisioning} _experience.decisioning
35
+ */
36
+ /**
37
+ * @typedef {Object} PushNotificationData
38
+ * @property {Object} web
39
+ * @property {string} web.title
40
+ * @property {string} web.body
41
+ * @property {string|null} web.media
42
+ * @property {Object} web.interaction
43
+ * @property {string} web.interaction.type
44
+ * @property {string|null} web.interaction.uri
45
+ * @property {Object} web.actions
46
+ * @property {Object[]} web.actions.buttons
47
+ * @property {string} web.actions.buttons[].label
48
+ * @property {string} web.actions.buttons[].type
49
+ * @property {string} web.actions.buttons[].uri
50
+ * @property {string} web.priority
51
+ * @property {Object} web._xdm
52
+ * @property {XdmTrackingContext} web._xdm.mixins
53
+ */
54
+ /**
55
+ * @typedef {Object} TrackingDataPayload
56
+ * @property {Object[]} events
57
+ * @property {Object} events[].xdm
58
+ * @property {Object} events[].xdm.identityMap
59
+ * @property {Object[]} events[].xdm.identityMap.ECID
60
+ * @property {string} events[].xdm.identityMap.ECID[].id
61
+ * @property {string} events[].xdm.timestamp
62
+ * @property {Object} events[].xdm.pushNotificationTracking
63
+ * @property {string} events[].xdm.pushNotificationTracking.pushProviderMessageID
64
+ * @property {string} events[].xdm.pushNotificationTracking.pushProvider
65
+ * @property {Object} [events[].xdm.pushNotificationTracking.customAction]
66
+ * @property {string} [events[].xdm.pushNotificationTracking.customAction.actionID]
67
+ * @property {Object} events[].xdm.application
68
+ * @property {Object} events[].xdm.application.launches
69
+ * @property {number} events[].xdm.application.launches.value
70
+ * @property {string} events[].xdm.eventType
71
+ * @property {Object} events[].xdm._experience
72
+ * @property {CustomerJourneyManagement} events[].xdm._experience.customerJourneyManagement
73
+ * @property {Decisioning} events[].xdm._experience.decisioning
74
+ * @property {Object} events[].meta
75
+ * @property {Object} events[].meta.collect
76
+ * @property {string} events[].meta.collect.datasetId
77
+ */
78
+ /**
79
+ * @typedef {Object} ServiceWorkerLogger
80
+ * @property {string} namespace
81
+ * @property {(...args: any[]) => void} info
82
+ * @property {(...args: any[]) => void} error
83
+ */
84
+ export const Types: {};
85
+ export type PushSubscription = {
86
+ /**
87
+ * - The push service endpoint URL
88
+ */
89
+ endpoint: string;
90
+ /**
91
+ * - The subscription keys object
92
+ */
93
+ keys: {
94
+ p256dh: string | null;
95
+ auth: string | null;
96
+ };
97
+ };
98
+ export type CustomerJourneyManagement = {
99
+ messageExecution: {
100
+ messageExecutionID: string;
101
+ messageID: string;
102
+ messageType: string;
103
+ campaignID: string;
104
+ campaignVersionID: string;
105
+ batchInstanceID: string;
106
+ };
107
+ pushChannelContext?: {
108
+ platform?: "web";
109
+ };
110
+ messageProfile?: {
111
+ channel?: {
112
+ _id?: string;
113
+ };
114
+ };
115
+ };
116
+ export type Decisioning = {
117
+ propositions: {
118
+ scopeDetails: {
119
+ correlationID: string;
120
+ };
121
+ };
122
+ };
123
+ export type XdmTrackingContext = {
124
+ _experience: {
125
+ customerJourneyManagement: CustomerJourneyManagement;
126
+ decisioning: Decisioning;
127
+ };
128
+ };
129
+ export type PushNotificationData = {
130
+ web: {
131
+ title: string;
132
+ body: string;
133
+ media: string | null;
134
+ interaction: {
135
+ type: string;
136
+ uri: string | null;
137
+ };
138
+ actions: {
139
+ buttons: {
140
+ label: string;
141
+ type: string;
142
+ uri: string;
143
+ };
144
+ };
145
+ priority: string;
146
+ _xdm: {
147
+ mixins: XdmTrackingContext;
148
+ };
149
+ };
150
+ };
151
+ export type TrackingDataPayload = {
152
+ events: {
153
+ xdm: {
154
+ identityMap: {
155
+ ECID: {
156
+ id: string;
157
+ };
158
+ };
159
+ timestamp: string;
160
+ pushNotificationTracking: {
161
+ pushProviderMessageID: string;
162
+ pushProvider: string;
163
+ customAction?: {
164
+ actionID?: string;
165
+ };
166
+ };
167
+ application: {
168
+ launches: {
169
+ value: number;
170
+ };
171
+ };
172
+ eventType: string;
173
+ _experience: {
174
+ customerJourneyManagement: CustomerJourneyManagement;
175
+ decisioning: Decisioning;
176
+ };
177
+ };
178
+ meta: {
179
+ collect: {
180
+ datasetId: string;
181
+ };
182
+ };
183
+ };
184
+ };
185
+ export type ServiceWorkerLogger = {
186
+ namespace: string;
187
+ info: (...args: any[]) => void;
188
+ error: (...args: any[]) => void;
189
+ };
190
+ //# 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;;;;;;;;;;;;;;GAcG;AAEH;;;;;GAKG;AAEH;;;;;GAKG;AAEH;;;;;;;;;;;;;;;;;GAiBG;AAEH;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH;;;;;GAKG;AAEH,uBAAwB;;;;;cAvFV,MAAM;;;;UAEjB;QAA6B,MAAM,EAAxB,MAAM,GAAC,IAAI;QACO,IAAI,EAAtB,MAAM,GAAC,IAAI;KACxB;;;sBAKE;QAAoC,kBAAkB,EAA3C,MAAM;QACmB,SAAS,EAAlC,MAAM;QACmB,WAAW,EAApC,MAAM;QACmB,UAAU,EAAnC,MAAM;QACmB,iBAAiB,EAA1C,MAAM;QACmB,eAAe,EAAxC,MAAM;KACjB;yBACA;QAAsC,QAAQ,GAAnC,KAAK;KAChB;qBACA;QAAmC,OAAO,GAC1C;YAA2C,GAAG,GAAnC,MAAM;SAA8B;KAAA;;;kBAM/C;QAAkC,YAAY,EAC9C;YAA+C,aAAa,EAAjD,MAAM;SACnB;KAAA;;;iBAKE;QAAkD,yBAAyB,EAAhE,yBAAyB;QACA,WAAW,EAApC,WAAW;KACxB;;;SAKE;QAAuB,KAAK,EAAjB,MAAM;QACM,IAAI,EAAhB,MAAM;QACW,KAAK,EAAtB,MAAM,GAAC,IAAI;QACC,WAAW,EAClC;YAAmC,IAAI,EAA5B,MAAM;YACuB,GAAG,EAAhC,MAAM,GAAC,IAAI;SACtB;QAAuB,OAAO,EAC9B;YAAiC,OAAO,EACxC;gBAAyC,KAAK,EAAnC,MAAM;gBACwB,IAAI,EAAlC,MAAM;gBACwB,GAAG,EAAjC,MAAM;aACjB;SAAA;QAAuB,QAAQ,EAApB,MAAM;QACM,IAAI,EAC3B;YAAwC,MAAM,EAAnC,kBAAkB;SAC/B;KAAA;;;YAKE;QAA4B,GAAG,EAC/B;YAAgC,WAAW,EAC3C;gBAA8C,IAAI,EAClD;oBAAmD,EAAE,EAA1C,MAAM;iBACjB;aAAA;YAAgC,SAAS,EAA9B,MAAM;YACe,wBAAwB,EACxD;gBAAyD,qBAAqB,EAAnE,MAAM;gBACwC,YAAY,EAA1D,MAAM;gBACyC,YAAY,GACtE;oBAAuE,QAAQ,GAApE,MAAM;iBACjB;aAAA;YAAgC,WAAW,EAC3C;gBAA4C,QAAQ,EACpD;oBAAqD,KAAK,EAA/C,MAAM;iBACjB;aAAA;YAAgC,SAAS,EAA9B,MAAM;YACe,WAAW,EAC3C;gBAA+D,yBAAyB,EAA7E,yBAAyB;gBACa,WAAW,EAAjD,WAAW;aACtB;SAAA;QAA4B,IAAI,EAChC;YAAiC,OAAO,EACxC;gBAAyC,SAAS,EAAvC,MAAM;aACnB;SAAA;KAAA;;;eAIa,MAAM;UACN,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI;WACxB,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI"}
@@ -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
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/core/consent/types.js"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH;;;;;;;;GAQG;AAEH,uBAAwB;;QAlBV,CAAS,IAAM,EAAN,MAAM,KAAG,IAAI;SACtB,CAAS,IAAM,EAAN,MAAM,KAAG,IAAI;aACtB,CAAS,IAAM,EAAN,MAAM,KAAG,IAAI;kBACtB,CAAS,IAAQ,EAAR,OAAO,YAAC,KAAG,OAAO,CAAC,IAAI,CAAC;iBACjC,MAAY,OAAO,CAAC,IAAI,CAAC;aACzB,MAAY;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,OAAO,CAAA;KAAC;;;uBAK5C,CAAS,IAAM,OAAE,IAAM,UAAG,IAAI;gBAC9B,CAAS,IAAM,UAAG,IAAI;aACtB,MAAY,IAAI;kBAChB,MAAY,OAAO,CAAC,IAAI,CAAC;iBACzB,MAAY,OAAO,CAAC,IAAI,CAAC;aACzB,MAAY;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,OAAO,CAAA;KAAC"}
@@ -1,16 +1,18 @@
1
1
  declare function _default({ config, lifecycle, cookieTransfer, sendNetworkRequest, createResponse, processWarningsAndErrors, getLocationHint, getAssuranceValidationTokenParams, }: {
2
- config: any;
3
- lifecycle: any;
4
- cookieTransfer: any;
5
- sendNetworkRequest: any;
6
- createResponse: any;
7
- processWarningsAndErrors: any;
8
- getLocationHint: any;
9
- getAssuranceValidationTokenParams: any;
10
- }): ({ request, runOnResponseCallbacks, runOnRequestFailureCallbacks, }: {
11
- request: any;
12
- runOnResponseCallbacks?: () => void;
13
- runOnRequestFailureCallbacks?: () => void;
14
- }) => any;
2
+ config: {
3
+ edgeDomain: string;
4
+ edgeBasePath: string;
5
+ datastreamId: string;
6
+ };
7
+ lifecycle: object;
8
+ cookieTransfer: object;
9
+ sendNetworkRequest: (arg0: object) => Promise<any>;
10
+ createResponse: ResponseCreator;
11
+ processWarningsAndErrors: (arg0: object) => void;
12
+ getLocationHint: () => string | undefined;
13
+ getAssuranceValidationTokenParams: () => string;
14
+ }): EdgeRequestExecutor;
15
15
  export default _default;
16
+ import type { ResponseCreator } from '../types.js';
17
+ import type { EdgeRequestExecutor } from './types.js';
16
18
  //# sourceMappingURL=injectSendEdgeNetworkRequest.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"injectSendEdgeNetworkRequest.d.ts","sourceRoot":"","sources":["../../../src/core/edgeNetwork/injectSendEdgeNetworkRequest.js"],"names":[],"mappings":"AAuBe;;;;;;;;;KAqCL;;;;CAIP,SAsEF"}
1
+ {"version":3,"file":"injectSendEdgeNetworkRequest.d.ts","sourceRoot":"","sources":["../../../src/core/edgeNetwork/injectSendEdgeNetworkRequest.js"],"names":[],"mappings":"AA0Ce,oLAZZ;IAAkF,MAAM,EAAhF;QAAC,UAAU,EAAE,MAAM,CAAC;QAAC,YAAY,EAAE,MAAM,CAAC;QAAC,YAAY,EAAE,MAAM,CAAA;KAAC;IAChD,SAAS,EAAzB,MAAM;IACU,cAAc,EAA9B,MAAM;IACqC,kBAAkB,EAA7D,CAAS,IAAM,EAAN,MAAM,KAAG,OAAO,KAAQ;IACR,cAAc,EAAvC,eAAe;IACiB,wBAAwB,EAAxD,CAAS,IAAM,EAAN,MAAM,KAAG,IAAI;IACgB,eAAe,EAArD,MAAY,MAAM,GAAC,SAAS;IACA,iCAAiC,EAA7D,MAAY,MAAM;CAG1B,GAAU,mBAAmB,CAiH/B;;qCA5IoC,aAAa;yCADT,YAAY"}