@adzenai/core 1.0.0 → 1.1.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.
package/dist/index.d.cts CHANGED
@@ -1,6 +1,5 @@
1
1
  interface AdzenPlacement {
2
2
  ad_id: string;
3
- campaign_id: string;
4
3
  advertiser_name: string;
5
4
  advertiser_image_url?: string;
6
5
  headline: string;
@@ -9,17 +8,28 @@ interface AdzenPlacement {
9
8
  destination_url: string;
10
9
  creative_url?: string;
11
10
  adUnitPosition: string;
12
- tracking: TrackingInfo;
11
+ render_impression_url: string | null;
12
+ view_impression_url: string | null;
13
13
  }
14
- interface TrackingInfo {
15
- render_url: string;
16
- view_url: string;
17
- click_slug: string;
18
- }
19
- interface AdzenDecision {
20
- decision: "serve" | "no_match";
21
- ad?: AdzenPlacement;
22
- reason?: string;
14
+ interface ProcessResponseAd {
15
+ ad_id: number | string;
16
+ title: string;
17
+ cta: string;
18
+ click_through_url: string;
19
+ advertiser_name: string;
20
+ sponsor_logo_url: string;
21
+ creative_url: string | null;
22
+ description: string;
23
+ pricing_model: string;
24
+ relevancy_score: number;
25
+ placement: string;
26
+ pixel_trackers: string[];
27
+ render_impression_url: string | null;
28
+ view_impression_url: string | null;
29
+ }
30
+ interface ProcessResponse {
31
+ message_id: string;
32
+ ads: ProcessResponseAd[];
23
33
  }
24
34
  type AdzenEnv = "prod" | "stg" | "dev";
25
35
  type AdzenFormat = "banner" | "native" | "sticky" | "in-feed";
@@ -182,4 +192,4 @@ interface ViewabilityOptions {
182
192
  }
183
193
  declare function observeViewability(options: ViewabilityOptions): () => void;
184
194
 
185
- export { type AbContext, type AdzenApi, type AdzenBaseConfig, type AdzenConsent, type AdzenDecision, type AdzenDefaults, type AdzenEnv, type AdzenError, type AdzenFormat, type AdzenPlacement, type AdzenQueueItem, type AdzenStaticConfig, type BannerCreative, type Beacons, type Creative, type Decision, type DecisionRequest, type DecisionResponse, type NativeCreative, type PageContext, type ResolvedAdzenStaticConfig, type SlotPosition, type SlotSpec, type StickyCreative, type TrackingInfo, type UserContext, type ViewabilityOptions, type ViewportContext, ensureTid, observeViewability, readTid, registerErrorSink, reportError, safeRun, safeRunAsync, uuidv4 };
195
+ export { type AbContext, type AdzenApi, type AdzenBaseConfig, type AdzenConsent, type AdzenDefaults, type AdzenEnv, type AdzenError, type AdzenFormat, type AdzenPlacement, type AdzenQueueItem, type AdzenStaticConfig, type BannerCreative, type Beacons, type Creative, type Decision, type DecisionRequest, type DecisionResponse, type NativeCreative, type PageContext, type ProcessResponse, type ProcessResponseAd, type ResolvedAdzenStaticConfig, type SlotPosition, type SlotSpec, type StickyCreative, type UserContext, type ViewabilityOptions, type ViewportContext, ensureTid, observeViewability, readTid, registerErrorSink, reportError, safeRun, safeRunAsync, uuidv4 };
package/dist/index.d.ts CHANGED
@@ -1,6 +1,5 @@
1
1
  interface AdzenPlacement {
2
2
  ad_id: string;
3
- campaign_id: string;
4
3
  advertiser_name: string;
5
4
  advertiser_image_url?: string;
6
5
  headline: string;
@@ -9,17 +8,28 @@ interface AdzenPlacement {
9
8
  destination_url: string;
10
9
  creative_url?: string;
11
10
  adUnitPosition: string;
12
- tracking: TrackingInfo;
11
+ render_impression_url: string | null;
12
+ view_impression_url: string | null;
13
13
  }
14
- interface TrackingInfo {
15
- render_url: string;
16
- view_url: string;
17
- click_slug: string;
18
- }
19
- interface AdzenDecision {
20
- decision: "serve" | "no_match";
21
- ad?: AdzenPlacement;
22
- reason?: string;
14
+ interface ProcessResponseAd {
15
+ ad_id: number | string;
16
+ title: string;
17
+ cta: string;
18
+ click_through_url: string;
19
+ advertiser_name: string;
20
+ sponsor_logo_url: string;
21
+ creative_url: string | null;
22
+ description: string;
23
+ pricing_model: string;
24
+ relevancy_score: number;
25
+ placement: string;
26
+ pixel_trackers: string[];
27
+ render_impression_url: string | null;
28
+ view_impression_url: string | null;
29
+ }
30
+ interface ProcessResponse {
31
+ message_id: string;
32
+ ads: ProcessResponseAd[];
23
33
  }
24
34
  type AdzenEnv = "prod" | "stg" | "dev";
25
35
  type AdzenFormat = "banner" | "native" | "sticky" | "in-feed";
@@ -182,4 +192,4 @@ interface ViewabilityOptions {
182
192
  }
183
193
  declare function observeViewability(options: ViewabilityOptions): () => void;
184
194
 
185
- export { type AbContext, type AdzenApi, type AdzenBaseConfig, type AdzenConsent, type AdzenDecision, type AdzenDefaults, type AdzenEnv, type AdzenError, type AdzenFormat, type AdzenPlacement, type AdzenQueueItem, type AdzenStaticConfig, type BannerCreative, type Beacons, type Creative, type Decision, type DecisionRequest, type DecisionResponse, type NativeCreative, type PageContext, type ResolvedAdzenStaticConfig, type SlotPosition, type SlotSpec, type StickyCreative, type TrackingInfo, type UserContext, type ViewabilityOptions, type ViewportContext, ensureTid, observeViewability, readTid, registerErrorSink, reportError, safeRun, safeRunAsync, uuidv4 };
195
+ export { type AbContext, type AdzenApi, type AdzenBaseConfig, type AdzenConsent, type AdzenDefaults, type AdzenEnv, type AdzenError, type AdzenFormat, type AdzenPlacement, type AdzenQueueItem, type AdzenStaticConfig, type BannerCreative, type Beacons, type Creative, type Decision, type DecisionRequest, type DecisionResponse, type NativeCreative, type PageContext, type ProcessResponse, type ProcessResponseAd, type ResolvedAdzenStaticConfig, type SlotPosition, type SlotSpec, type StickyCreative, type UserContext, type ViewabilityOptions, type ViewportContext, ensureTid, observeViewability, readTid, registerErrorSink, reportError, safeRun, safeRunAsync, uuidv4 };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adzenai/core",
3
- "version": "1.0.0",
3
+ "version": "1.1.1",
4
4
  "description": "Core types and utilities for the Adzen AI ad SDK",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -25,15 +25,15 @@
25
25
  "files": [
26
26
  "dist"
27
27
  ],
28
+ "devDependencies": {
29
+ "tsup": "^8.1.0",
30
+ "typescript": "^5.5.0",
31
+ "vitest": "^2.1.0"
32
+ },
28
33
  "scripts": {
29
34
  "build": "tsup",
30
35
  "test": "vitest run",
31
36
  "clean": "rm -rf dist",
32
37
  "typecheck": "tsc --noEmit"
33
- },
34
- "devDependencies": {
35
- "tsup": "^8.1.0",
36
- "typescript": "^5.5.0",
37
- "vitest": "^2.1.0"
38
38
  }
39
- }
39
+ }