@givefreely/adunit 1.18.2-pip.2 → 2.0.0-dev.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  PROPRIETARY LICENSE AGREEMENT
2
2
 
3
- GiveFreely/AdUnit NPM PACKAGE LICENSE
3
+ GiveFreely NPM PACKAGE LICENSE
4
4
 
5
5
  This is a legal agreement between you (either an individual or an entity) and Give Freely regarding your use of the Ad Unit software package and accompanying documentation (collectively referred to as the "Software").
6
6
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@givefreely/adunit",
3
- "version": "1.18.2-pip.2",
4
- "description": "AdUnit module",
3
+ "version": "2.0.0-dev.0",
4
+ "description": "GiveFreely module",
5
5
  "main": "./GiveFreely-content.cjs",
6
6
  "module": "./GiveFreely-content.esm",
7
7
  "exports": {
@@ -4,7 +4,7 @@ export { default as browser } from 'webextension-polyfill';
4
4
  * Filters out domains where the popup should stand down.
5
5
  * Should return false in case the popup should not be shown for a specific domain
6
6
  */
7
- type DomainAdUnitFilter = (domain: string) => Promise<boolean>;
7
+ type DomainFilter = (domain: string) => Promise<boolean>;
8
8
 
9
9
  /**
10
10
  * Main service for GiveFreely functionality
@@ -12,12 +12,12 @@ type DomainAdUnitFilter = (domain: string) => Promise<boolean>;
12
12
  * Example usage:
13
13
  *
14
14
  * const giveFreely = new GiveFreely.GiveFreelyService(PARTNER_KEY);
15
- * const domainAdUnitFilter = async (domain) => {
15
+ * const domainFilter = async (domain) => {
16
16
  * const result = !(domain === 'www.temu.com')
17
17
  * return result
18
18
  * }
19
19
  *
20
- * giveFreely.initialize(domainAdUnitFilter)
20
+ * giveFreely.initialize(domainFilter)
21
21
  * .then(() => {
22
22
  * // Log to show the background script is running
23
23
  * console.log('GiveFreely background running');
@@ -25,19 +25,19 @@ type DomainAdUnitFilter = (domain: string) => Promise<boolean>;
25
25
  */
26
26
  declare class GiveFreelyService {
27
27
  readonly partnerApiKey: string;
28
- private readonly _adUnitService;
28
+ private readonly _coreService;
29
29
  constructor(partnerApiKey: string);
30
- initialize: (partnerFilter?: DomainAdUnitFilter) => Promise<void>;
30
+ initialize: (partnerFilter?: DomainFilter) => Promise<void>;
31
31
  destroy: () => Promise<void>;
32
32
  }
33
33
 
34
- declare const isAdUnitMessage: (message: unknown) => boolean;
34
+ declare const isGiveFreelyMessage: (message: unknown) => boolean;
35
35
 
36
36
  /**
37
- * Initializes the GiveFreely AdUnit UI by creating a
37
+ * Initializes the GiveFreely UI by creating a
38
38
  * shadow DOM and rendering the main app component.
39
39
  * @returns The store instance
40
40
  */
41
- declare function initializeAdUnit(): Promise<void>;
41
+ declare function initialize(): Promise<void>;
42
42
 
43
- export { GiveFreelyService, initializeAdUnit, isAdUnitMessage };
43
+ export { GiveFreelyService, initialize, isGiveFreelyMessage };