@thealteroffice/react-native-adgeist 0.0.27-beta → 0.0.29-beta
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/Adgeist.podspec +3 -4
- package/README.md +51 -2
- package/android/app/build/generated/source/codegen/java/com/facebook/fbreact/specs/NativeAdgeistSpec.java +4 -0
- package/android/app/build/generated/source/codegen/java/com/facebook/react/viewmanagers/HTML5AdNativeComponentManagerDelegate.java +1 -1
- package/android/app/build/generated/source/codegen/jni/RNAdgeistSpec-generated.cpp +6 -0
- package/android/app/build/generated/source/codegen/jni/react/renderer/components/RNAdgeistSpec/Props.cpp +1 -1
- package/android/app/build/generated/source/codegen/jni/react/renderer/components/RNAdgeistSpec/Props.h +18 -1
- package/android/app/build/generated/source/codegen/jni/react/renderer/components/RNAdgeistSpec/RNAdgeistSpecJSI-generated.cpp +8 -0
- package/android/app/build/generated/source/codegen/jni/react/renderer/components/RNAdgeistSpec/RNAdgeistSpecJSI.h +9 -0
- package/android/build.gradle +22 -1
- package/android/libs/adgeistkit-beta-release.aar +0 -0
- package/android/src/main/java/com/adgeist/components/HTML5AdViewManagerImpl.kt +31 -11
- package/android/src/main/java/com/adgeist/modules/AdgeistImpl.kt +8 -3
- package/android/src/main/java/com/adgeist/utils/CreativeExtensions.kt +76 -36
- package/android/src/newarch/java/com/Adgeist.kt +5 -1
- package/android/src/oldarch/java/com/Adgeist.kt +6 -1
- package/ios/Adgeist.mm +4 -0
- package/ios/AdgeistImpl.swift +16 -13
- package/ios/NativeHTML5AdManager.h +12 -1
- package/ios/NativeHTML5AdManager.mm +120 -7
- package/ios/NativeHTML5AdView.swift +77 -15
- package/ios/adgeist-Bridging-Header.h +1 -0
- package/lib/module/components/deprecated/BannerAdView.js +6 -5
- package/lib/module/components/deprecated/BannerAdView.js.map +1 -1
- package/lib/module/constants.js +1 -1
- package/lib/module/index.js +2 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/providers/AdgeistProvider.js +8 -0
- package/lib/module/providers/AdgeistProvider.js.map +1 -1
- package/lib/module/specs/HTML5AdNativeComponent.ts +16 -5
- package/lib/module/specs/NativeAdgeist.js.map +1 -1
- package/lib/module/types/AdType.js +16 -0
- package/lib/module/types/AdType.js.map +1 -0
- package/lib/module/utmtracker/index.js +25 -0
- package/lib/module/utmtracker/index.js.map +1 -0
- package/lib/typescript/src/components/deprecated/BannerAdView.d.ts.map +1 -1
- package/lib/typescript/src/constants.d.ts +1 -1
- package/lib/typescript/src/index.d.ts +2 -0
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/providers/AdgeistProvider.d.ts.map +1 -1
- package/lib/typescript/src/specs/HTML5AdNativeComponent.d.ts +3 -2
- package/lib/typescript/src/specs/HTML5AdNativeComponent.d.ts.map +1 -1
- package/lib/typescript/src/specs/NativeAdgeist.d.ts +1 -0
- package/lib/typescript/src/specs/NativeAdgeist.d.ts.map +1 -1
- package/lib/typescript/src/types/AdType.d.ts +14 -0
- package/lib/typescript/src/types/AdType.d.ts.map +1 -0
- package/lib/typescript/src/types/CPMAdResponse.d.ts +6 -2
- package/lib/typescript/src/types/CPMAdResponse.d.ts.map +1 -1
- package/lib/typescript/src/types/FixedAdResponse.d.ts +69 -38
- package/lib/typescript/src/types/FixedAdResponse.d.ts.map +1 -1
- package/lib/typescript/src/types/HTML5AdNativeComponentProps.d.ts +2 -1
- package/lib/typescript/src/types/HTML5AdNativeComponentProps.d.ts.map +1 -1
- package/lib/typescript/src/utmtracker/index.d.ts +6 -0
- package/lib/typescript/src/utmtracker/index.d.ts.map +1 -0
- package/package.json +1 -1
- package/src/components/deprecated/BannerAdView.tsx +7 -5
- package/src/constants.ts +1 -1
- package/src/index.tsx +5 -0
- package/src/providers/AdgeistProvider.tsx +9 -0
- package/src/specs/HTML5AdNativeComponent.ts +16 -5
- package/src/specs/NativeAdgeist.ts +2 -0
- package/src/types/AdType.ts +16 -0
- package/src/types/CPMAdResponse.ts +7 -2
- package/src/types/FixedAdResponse.ts +77 -38
- package/src/types/HTML5AdNativeComponentProps.ts +2 -1
- package/src/utmtracker/index.ts +26 -0
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import type { HostComponent, ViewProps } from 'react-native';
|
|
2
|
-
import type { DirectEventHandler, Double } from 'react-native/Libraries/Types/CodegenTypes';
|
|
2
|
+
import type { DirectEventHandler, Double, WithDefault } from 'react-native/Libraries/Types/CodegenTypes';
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
export interface AdSize {
|
|
5
5
|
width?: Double;
|
|
6
6
|
height?: Double;
|
|
7
7
|
}
|
|
8
|
+
export type AdType = 'BANNER' | 'DISPLAY' | 'COMPANION';
|
|
8
9
|
export interface AdFailedToLoadEvent {
|
|
9
10
|
error: string;
|
|
10
11
|
}
|
|
@@ -12,7 +13,7 @@ export interface NativeProps extends ViewProps {
|
|
|
12
13
|
adUnitID: string;
|
|
13
14
|
adIsResponsive?: boolean;
|
|
14
15
|
adSize?: AdSize;
|
|
15
|
-
adType
|
|
16
|
+
adType?: WithDefault<AdType, 'BANNER'>;
|
|
16
17
|
onAdLoaded?: DirectEventHandler<null>;
|
|
17
18
|
onAdFailedToLoad?: DirectEventHandler<AdFailedToLoadEvent>;
|
|
18
19
|
onAdOpened?: DirectEventHandler<null>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HTML5AdNativeComponent.d.ts","sourceRoot":"","sources":["../../../../src/specs/HTML5AdNativeComponent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC7D,OAAO,KAAK,EACV,kBAAkB,EAClB,MAAM,
|
|
1
|
+
{"version":3,"file":"HTML5AdNativeComponent.d.ts","sourceRoot":"","sources":["../../../../src/specs/HTML5AdNativeComponent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC7D,OAAO,KAAK,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AC,UAAU,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC,cACzC,OAAO;gCAgBF,KAAK,CAAC,UAAU,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC;CAcvD,CAAC"}
|
|
@@ -22,6 +22,7 @@ export interface Spec extends TurboModule {
|
|
|
22
22
|
trackTotalView(campaignId: string, adSpaceId: string, bidId: string, bidMeta: string, buyType: string, isTestEnvironment: boolean, totalViewTime: number): Promise<string>;
|
|
23
23
|
trackClick(campaignId: string, adSpaceId: string, bidId: string, bidMeta: string, buyType: string, isTestEnvironment: boolean): Promise<string>;
|
|
24
24
|
trackVideoPlayback(campaignId: string, adSpaceId: string, bidId: string, bidMeta: string, buyType: string, isTestEnvironment: boolean, totalPlaybackTime: number): Promise<string>;
|
|
25
|
+
trackDeeplinkUtm(url: string): void;
|
|
25
26
|
}
|
|
26
27
|
declare const _default: Spec;
|
|
27
28
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NativeAdgeist.d.ts","sourceRoot":"","sources":["../../../../src/specs/NativeAdgeist.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAGhD,MAAM,WAAW,WAAW;IAC1B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,KAAK;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,EAAE,MAAM,CAAC;CACzB;AACD,MAAM,WAAW,IAAK,SAAQ,WAAW;IACvC,aAAa,CACX,6BAA6B,EAAE,MAAM,GAAG,IAAI,EAC5C,uBAAuB,EAAE,MAAM,GAAG,IAAI,EACtC,kBAAkB,EAAE,MAAM,GAAG,IAAI,EACjC,gBAAgB,EAAE,MAAM,GAAG,IAAI,GAC9B,OAAO,CAAC,OAAO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B,OAAO,CAAC,MAAM,CAAC,CAAC;IAEnB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;CASrC;;AAED,wBAAiE"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Defines the supported ad types for AdGeist SDK.
|
|
3
|
+
* Publishers must use these predefined values when configuring ads.
|
|
4
|
+
*/
|
|
5
|
+
export type AdType = 'BANNER' | 'DISPLAY' | 'COMPANION';
|
|
6
|
+
export declare const AdTypes: {
|
|
7
|
+
/** Small rectangular banner ads typically displayed at the top or bottom of the screen */
|
|
8
|
+
readonly BANNER: AdType;
|
|
9
|
+
/** Standard display advertisements */
|
|
10
|
+
readonly DISPLAY: AdType;
|
|
11
|
+
/** Companion ads displayed alongside other content (requires minimum 320x320 dimensions) */
|
|
12
|
+
readonly COMPANION: AdType;
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=AdType.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AdType.d.ts","sourceRoot":"","sources":["../../../../src/types/AdType.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,MAAM,MAAM,GAAG,QAAQ,GAAG,SAAS,GAAG,WAAW,CAAC;AAExD,eAAO,MAAM,OAAO;IAClB,0FAA0F;qBACtE,MAAM;IAE1B,sCAAsC;sBAChB,MAAM;IAE5B,4FAA4F;wBAClE,MAAM;CACxB,CAAC"}
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
export interface CPMADRESPONSE {
|
|
2
|
+
success: boolean;
|
|
3
|
+
message: string;
|
|
4
|
+
data?: BidResponseData;
|
|
5
|
+
}
|
|
6
|
+
interface BidResponseData {
|
|
2
7
|
id: string;
|
|
8
|
+
seatBid: SeatBid[];
|
|
3
9
|
bidId: string;
|
|
4
10
|
cur: string;
|
|
5
|
-
seatBid: SeatBid[];
|
|
6
11
|
}
|
|
7
12
|
interface SeatBid {
|
|
8
13
|
bidId: string;
|
|
@@ -19,7 +24,6 @@ interface BidExtension {
|
|
|
19
24
|
ctaUrl: string;
|
|
20
25
|
creativeTitle: string;
|
|
21
26
|
creativeDescription: string;
|
|
22
|
-
creativeBrandName?: string;
|
|
23
27
|
}
|
|
24
28
|
export {};
|
|
25
29
|
//# sourceMappingURL=CPMAdResponse.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CPMAdResponse.d.ts","sourceRoot":"","sources":["../../../../src/types/CPMAdResponse.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"CPMAdResponse.d.ts","sourceRoot":"","sources":["../../../../src/types/CPMAdResponse.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,eAAe,CAAC;CACxB;AAED,UAAU,eAAe;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,OAAO,EAAE,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;CACb;AAED,UAAU,OAAO;IACf,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,GAAG,EAAE,CAAC;CACZ;AAED,UAAU,GAAG;IACX,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,YAAY,CAAC;CACnB;AAED,UAAU,YAAY;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,MAAM,CAAC;IACtB,mBAAmB,EAAE,MAAM,CAAC;CAC7B"}
|
|
@@ -1,50 +1,81 @@
|
|
|
1
1
|
export interface FIXEDADRESPONSE {
|
|
2
|
+
isTest?: boolean;
|
|
3
|
+
expiresAt?: string;
|
|
2
4
|
metaData: string;
|
|
3
5
|
id: string;
|
|
4
|
-
generatedAt
|
|
5
|
-
signature
|
|
6
|
-
campaignId
|
|
7
|
-
advertiser
|
|
8
|
-
type
|
|
9
|
-
loadType
|
|
10
|
-
|
|
11
|
-
campaignValidity: {
|
|
12
|
-
startTime: string;
|
|
13
|
-
endTime: string;
|
|
14
|
-
};
|
|
6
|
+
generatedAt?: string;
|
|
7
|
+
signature?: string;
|
|
8
|
+
campaignId?: string;
|
|
9
|
+
advertiser?: Advertiser;
|
|
10
|
+
type?: string;
|
|
11
|
+
loadType?: string;
|
|
12
|
+
campaignValidity?: CampaignValidity;
|
|
15
13
|
creatives: Creative[];
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
};
|
|
14
|
+
creativesV1: CreativeV1[];
|
|
15
|
+
displayOptions?: DisplayOptions;
|
|
16
|
+
frontendCacheDurationSeconds?: number;
|
|
17
|
+
impressionRequirements?: ImpressionRequirements;
|
|
21
18
|
}
|
|
22
19
|
interface Advertiser {
|
|
23
|
-
id
|
|
24
|
-
name
|
|
25
|
-
logoUrl
|
|
20
|
+
id?: string;
|
|
21
|
+
name?: string;
|
|
22
|
+
logoUrl?: string;
|
|
26
23
|
}
|
|
27
|
-
interface
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
width: number;
|
|
31
|
-
height: number;
|
|
32
|
-
};
|
|
33
|
-
styleOptions: {
|
|
34
|
-
fontFamily: string;
|
|
35
|
-
fontColor: string;
|
|
36
|
-
};
|
|
37
|
-
allowedFormats: string[];
|
|
24
|
+
interface CampaignValidity {
|
|
25
|
+
startTime?: string;
|
|
26
|
+
endTime?: string;
|
|
38
27
|
}
|
|
39
28
|
interface Creative {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
fileName
|
|
45
|
-
fileSize
|
|
46
|
-
fileUrl
|
|
47
|
-
thumbnailUrl
|
|
29
|
+
contentModerationResult?: MongoIdWrapper;
|
|
30
|
+
createdAt?: MongoDateWrapper;
|
|
31
|
+
ctaUrl?: string;
|
|
32
|
+
description?: string;
|
|
33
|
+
fileName?: string;
|
|
34
|
+
fileSize?: number;
|
|
35
|
+
fileUrl?: string;
|
|
36
|
+
thumbnailUrl?: string;
|
|
37
|
+
title?: string;
|
|
38
|
+
type?: string;
|
|
39
|
+
updatedAt?: MongoDateWrapper;
|
|
40
|
+
}
|
|
41
|
+
interface CreativeV1 {
|
|
42
|
+
title?: string;
|
|
43
|
+
description?: string;
|
|
44
|
+
ctaUrl?: string;
|
|
45
|
+
primary?: MediaItem;
|
|
46
|
+
companions?: MediaItem[];
|
|
47
|
+
}
|
|
48
|
+
interface MediaItem {
|
|
49
|
+
type?: string;
|
|
50
|
+
fileName?: string;
|
|
51
|
+
fileSize?: number;
|
|
52
|
+
fileUrl?: string;
|
|
53
|
+
thumbnailUrl?: string;
|
|
54
|
+
}
|
|
55
|
+
interface MongoIdWrapper {
|
|
56
|
+
$oid?: string;
|
|
57
|
+
}
|
|
58
|
+
interface MongoDateWrapper {
|
|
59
|
+
$date?: number;
|
|
60
|
+
}
|
|
61
|
+
interface DisplayOptions {
|
|
62
|
+
allowedFormats?: string[];
|
|
63
|
+
dimensions?: Dimensions;
|
|
64
|
+
isResponsive?: boolean;
|
|
65
|
+
responsiveType?: string;
|
|
66
|
+
styleOptions?: StyleOptions;
|
|
67
|
+
}
|
|
68
|
+
interface Dimensions {
|
|
69
|
+
height?: number;
|
|
70
|
+
width?: number;
|
|
71
|
+
}
|
|
72
|
+
interface StyleOptions {
|
|
73
|
+
fontColor?: string;
|
|
74
|
+
fontFamily?: string;
|
|
75
|
+
}
|
|
76
|
+
interface ImpressionRequirements {
|
|
77
|
+
impressionType?: string[];
|
|
78
|
+
minViewDurationSeconds?: number;
|
|
48
79
|
}
|
|
49
80
|
export {};
|
|
50
81
|
//# sourceMappingURL=FixedAdResponse.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FixedAdResponse.d.ts","sourceRoot":"","sources":["../../../../src/types/FixedAdResponse.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,MAAM,CAAC;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"FixedAdResponse.d.ts","sourceRoot":"","sources":["../../../../src/types/FixedAdResponse.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,eAAe;IAC9B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IACpC,SAAS,EAAE,QAAQ,EAAE,CAAC;IACtB,WAAW,EAAE,UAAU,EAAE,CAAC;IAC1B,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,4BAA4B,CAAC,EAAE,MAAM,CAAC;IACtC,sBAAsB,CAAC,EAAE,sBAAsB,CAAC;CACjD;AAED,UAAU,UAAU;IAClB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,UAAU,gBAAgB;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,UAAU,QAAQ;IAChB,uBAAuB,CAAC,EAAE,cAAc,CAAC;IACzC,SAAS,CAAC,EAAE,gBAAgB,CAAC;IAC7B,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,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,UAAU,sBAAsB;IAC9B,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,sBAAsB,CAAC,EAAE,MAAM,CAAC;CACjC"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import type { NativeSyntheticEvent } from 'react-native';
|
|
2
2
|
import type { AdSize } from './AdSize';
|
|
3
|
+
import type { AdType } from './AdType';
|
|
3
4
|
export interface HTML5AdNativeComponentProps {
|
|
4
5
|
adUnitID: string;
|
|
5
6
|
adIsResponsive?: boolean;
|
|
6
7
|
adSize?: AdSize;
|
|
7
|
-
adType:
|
|
8
|
+
adType: AdType;
|
|
8
9
|
onAdLoaded?: () => void;
|
|
9
10
|
onAdFailedToLoad?: (event: NativeSyntheticEvent<AdFailedToLoadEvent>) => void;
|
|
10
11
|
onAdOpened?: () => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HTML5AdNativeComponentProps.d.ts","sourceRoot":"","sources":["../../../../src/types/HTML5AdNativeComponentProps.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AACzD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAEvC,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,EAAE,MAAM,CAAC;IACjB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IAEf,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,gBAAgB,CAAC,EAAE,CAAC,KAAK,EAAE,oBAAoB,CAAC,mBAAmB,CAAC,KAAK,IAAI,CAAC;IAC9E,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;CAC1B;AAED,MAAM,WAAW,m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
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/utmtracker/index.ts"],"names":[],"mappings":"AAaA;;;GAGG;AACH,eAAO,MAAM,6BAA6B,GAAI,KAAK,MAAM,KAAG,IAQ3D,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thealteroffice/react-native-adgeist",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.29-beta",
|
|
4
4
|
"description": "Publishers can integrate our SDK to connect their ad spaces to the AdGeist marketplace.",
|
|
5
5
|
"main": "./lib/module/index.js",
|
|
6
6
|
"module": "./lib/module/index.js",
|
|
@@ -83,16 +83,17 @@ export const BannerAd: React.FC<AdBannerProps> = ({
|
|
|
83
83
|
bidId = (adData as FIXEDADRESPONSE)?.id;
|
|
84
84
|
campaignId = (adData as FIXEDADRESPONSE)?.campaignId;
|
|
85
85
|
} else {
|
|
86
|
-
let
|
|
86
|
+
let cpmData = (adData as CPMADRESPONSE)?.data;
|
|
87
|
+
let creativeData = cpmData?.seatBid?.[0]?.bid?.[0]?.ext;
|
|
87
88
|
|
|
88
89
|
creativeTitle = creativeData?.creativeTitle;
|
|
89
90
|
creativeDescription = creativeData?.creativeDescription;
|
|
90
|
-
creativeBrandName =
|
|
91
|
+
creativeBrandName = undefined; // Not available in CPM response
|
|
91
92
|
creativeUrl = creativeData?.creativeUrl;
|
|
92
93
|
ctaUrl = creativeData?.ctaUrl;
|
|
93
94
|
|
|
94
|
-
bidId =
|
|
95
|
-
campaignId =
|
|
95
|
+
bidId = cpmData?.id;
|
|
96
|
+
campaignId = cpmData?.seatBid?.[0]?.bid?.[0]?.id;
|
|
96
97
|
}
|
|
97
98
|
|
|
98
99
|
const fetchAd = useCallback(async () => {
|
|
@@ -273,7 +274,8 @@ export const BannerAd: React.FC<AdBannerProps> = ({
|
|
|
273
274
|
const handleClick = useCallback(async () => {
|
|
274
275
|
if (
|
|
275
276
|
!adData ||
|
|
276
|
-
(dataBuyType == 'CPM' &&
|
|
277
|
+
(dataBuyType == 'CPM' &&
|
|
278
|
+
!(adData as CPMADRESPONSE).data?.seatBid?.length) ||
|
|
277
279
|
!bidId ||
|
|
278
280
|
!campaignId
|
|
279
281
|
)
|
package/src/constants.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { AdSize } from './types/AdSize';
|
|
2
2
|
|
|
3
3
|
export const PACKAGE_VERSION_TAG = 'RN';
|
|
4
|
-
export const PACKAGE_VERSION = '0.0.
|
|
4
|
+
export const PACKAGE_VERSION = '0.0.29-beta';
|
|
5
5
|
|
|
6
6
|
export const AdSizes = {
|
|
7
7
|
custom: (width: number, height: number): AdSize => ({ width, height }),
|
package/src/index.tsx
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
export * from './providers/AdgeistProvider';
|
|
2
|
+
|
|
2
3
|
export * from './components/HTML5AdView';
|
|
3
4
|
|
|
4
5
|
export * from './components/deprecated/BannerAdView';
|
|
5
6
|
|
|
6
7
|
export * from './cdpclient/index';
|
|
8
|
+
|
|
9
|
+
export * from './utmtracker/index';
|
|
10
|
+
|
|
11
|
+
export * from './types/AdType';
|
|
@@ -45,6 +45,15 @@ export const AdgeistProvider: React.FC<AdgeistProviderProps> = ({
|
|
|
45
45
|
try {
|
|
46
46
|
await Adgeist.destroySdk();
|
|
47
47
|
|
|
48
|
+
if (__DEV__) {
|
|
49
|
+
console.log('[AdgeistProvider] Calling initializeSdk with:', {
|
|
50
|
+
domain: customBidRequestBackendDomain,
|
|
51
|
+
bundleId: customPackageOrBundleID,
|
|
52
|
+
appId: customAdgeistAppID,
|
|
53
|
+
version: `${PACKAGE_VERSION_TAG}-${PACKAGE_VERSION}`,
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
|
|
48
57
|
await Adgeist.initializeSdk(
|
|
49
58
|
customBidRequestBackendDomain,
|
|
50
59
|
customPackageOrBundleID,
|
|
@@ -2,17 +2,20 @@ import type { HostComponent, ViewProps } from 'react-native';
|
|
|
2
2
|
import type {
|
|
3
3
|
DirectEventHandler,
|
|
4
4
|
Double,
|
|
5
|
+
WithDefault,
|
|
5
6
|
} from 'react-native/Libraries/Types/CodegenTypes';
|
|
6
7
|
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
|
|
7
8
|
import codegenNativeCommands from 'react-native/Libraries/Utilities/codegenNativeCommands';
|
|
8
9
|
import * as React from 'react';
|
|
9
|
-
import { UIManager, findNodeHandle } from 'react-native';
|
|
10
|
+
import { Platform, UIManager, findNodeHandle } from 'react-native';
|
|
10
11
|
|
|
11
12
|
export interface AdSize {
|
|
12
13
|
width?: Double;
|
|
13
14
|
height?: Double;
|
|
14
15
|
}
|
|
15
16
|
|
|
17
|
+
export type AdType = 'BANNER' | 'DISPLAY' | 'COMPANION';
|
|
18
|
+
|
|
16
19
|
export interface AdFailedToLoadEvent {
|
|
17
20
|
error: string;
|
|
18
21
|
}
|
|
@@ -21,7 +24,7 @@ export interface NativeProps extends ViewProps {
|
|
|
21
24
|
adUnitID: string;
|
|
22
25
|
adIsResponsive?: boolean;
|
|
23
26
|
adSize?: AdSize;
|
|
24
|
-
adType
|
|
27
|
+
adType?: WithDefault<AdType, 'BANNER'>;
|
|
25
28
|
|
|
26
29
|
onAdLoaded?: DirectEventHandler<null>;
|
|
27
30
|
onAdFailedToLoad?: DirectEventHandler<AdFailedToLoadEvent>;
|
|
@@ -58,18 +61,26 @@ export const AdCommands = {
|
|
|
58
61
|
} else {
|
|
59
62
|
const reactTag = findNodeHandle(viewRef);
|
|
60
63
|
if (reactTag != null) {
|
|
61
|
-
UIManager.dispatchViewManagerCommand(
|
|
64
|
+
UIManager.dispatchViewManagerCommand(
|
|
65
|
+
reactTag,
|
|
66
|
+
Platform.OS === 'ios' ? 'loadAd' : 1,
|
|
67
|
+
[isTestMode]
|
|
68
|
+
);
|
|
62
69
|
}
|
|
63
70
|
}
|
|
64
71
|
},
|
|
65
72
|
|
|
66
73
|
destroy: (viewRef: React.ElementRef<HostComponent<NativeProps>>) => {
|
|
67
|
-
if (
|
|
74
|
+
if (isFabric) {
|
|
68
75
|
Commands.destroy(viewRef);
|
|
69
76
|
} else {
|
|
70
77
|
const reactTag = findNodeHandle(viewRef);
|
|
71
78
|
if (reactTag != null) {
|
|
72
|
-
UIManager.dispatchViewManagerCommand(
|
|
79
|
+
UIManager.dispatchViewManagerCommand(
|
|
80
|
+
reactTag,
|
|
81
|
+
Platform.OS === 'ios' ? 'destroy' : 2,
|
|
82
|
+
[]
|
|
83
|
+
);
|
|
73
84
|
}
|
|
74
85
|
}
|
|
75
86
|
},
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Defines the supported ad types for AdGeist SDK.
|
|
3
|
+
* Publishers must use these predefined values when configuring ads.
|
|
4
|
+
*/
|
|
5
|
+
export type AdType = 'BANNER' | 'DISPLAY' | 'COMPANION';
|
|
6
|
+
|
|
7
|
+
export const AdTypes = {
|
|
8
|
+
/** Small rectangular banner ads typically displayed at the top or bottom of the screen */
|
|
9
|
+
BANNER: 'BANNER' as AdType,
|
|
10
|
+
|
|
11
|
+
/** Standard display advertisements */
|
|
12
|
+
DISPLAY: 'DISPLAY' as AdType,
|
|
13
|
+
|
|
14
|
+
/** Companion ads displayed alongside other content (requires minimum 320x320 dimensions) */
|
|
15
|
+
COMPANION: 'COMPANION' as AdType,
|
|
16
|
+
} as const;
|
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
export interface CPMADRESPONSE {
|
|
2
|
+
success: boolean;
|
|
3
|
+
message: string;
|
|
4
|
+
data?: BidResponseData;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
interface BidResponseData {
|
|
2
8
|
id: string;
|
|
9
|
+
seatBid: SeatBid[];
|
|
3
10
|
bidId: string;
|
|
4
11
|
cur: string;
|
|
5
|
-
seatBid: SeatBid[];
|
|
6
12
|
}
|
|
7
13
|
|
|
8
14
|
interface SeatBid {
|
|
@@ -22,5 +28,4 @@ interface BidExtension {
|
|
|
22
28
|
ctaUrl: string;
|
|
23
29
|
creativeTitle: string;
|
|
24
30
|
creativeDescription: string;
|
|
25
|
-
creativeBrandName?: string;
|
|
26
31
|
}
|
|
@@ -1,51 +1,90 @@
|
|
|
1
1
|
export interface FIXEDADRESPONSE {
|
|
2
|
+
isTest?: boolean;
|
|
3
|
+
expiresAt?: string;
|
|
2
4
|
metaData: string;
|
|
3
5
|
id: string;
|
|
4
|
-
generatedAt
|
|
5
|
-
signature
|
|
6
|
-
campaignId
|
|
7
|
-
advertiser
|
|
8
|
-
type
|
|
9
|
-
loadType
|
|
10
|
-
|
|
11
|
-
campaignValidity: {
|
|
12
|
-
startTime: string;
|
|
13
|
-
endTime: string;
|
|
14
|
-
};
|
|
6
|
+
generatedAt?: string;
|
|
7
|
+
signature?: string;
|
|
8
|
+
campaignId?: string;
|
|
9
|
+
advertiser?: Advertiser;
|
|
10
|
+
type?: string;
|
|
11
|
+
loadType?: string;
|
|
12
|
+
campaignValidity?: CampaignValidity;
|
|
15
13
|
creatives: Creative[];
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
};
|
|
14
|
+
creativesV1: CreativeV1[];
|
|
15
|
+
displayOptions?: DisplayOptions;
|
|
16
|
+
frontendCacheDurationSeconds?: number;
|
|
17
|
+
impressionRequirements?: ImpressionRequirements;
|
|
21
18
|
}
|
|
22
19
|
|
|
23
20
|
interface Advertiser {
|
|
24
|
-
id
|
|
25
|
-
name
|
|
26
|
-
logoUrl
|
|
21
|
+
id?: string;
|
|
22
|
+
name?: string;
|
|
23
|
+
logoUrl?: string;
|
|
27
24
|
}
|
|
28
25
|
|
|
29
|
-
interface
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
width: number;
|
|
33
|
-
height: number;
|
|
34
|
-
};
|
|
35
|
-
styleOptions: {
|
|
36
|
-
fontFamily: string;
|
|
37
|
-
fontColor: string;
|
|
38
|
-
};
|
|
39
|
-
allowedFormats: string[];
|
|
26
|
+
interface CampaignValidity {
|
|
27
|
+
startTime?: string;
|
|
28
|
+
endTime?: string;
|
|
40
29
|
}
|
|
41
30
|
|
|
42
31
|
interface Creative {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
fileName
|
|
48
|
-
fileSize
|
|
49
|
-
fileUrl
|
|
50
|
-
thumbnailUrl
|
|
32
|
+
contentModerationResult?: MongoIdWrapper;
|
|
33
|
+
createdAt?: MongoDateWrapper;
|
|
34
|
+
ctaUrl?: string;
|
|
35
|
+
description?: string;
|
|
36
|
+
fileName?: string;
|
|
37
|
+
fileSize?: number;
|
|
38
|
+
fileUrl?: string;
|
|
39
|
+
thumbnailUrl?: string;
|
|
40
|
+
title?: string;
|
|
41
|
+
type?: string;
|
|
42
|
+
updatedAt?: MongoDateWrapper;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
interface CreativeV1 {
|
|
46
|
+
title?: string;
|
|
47
|
+
description?: string;
|
|
48
|
+
ctaUrl?: string;
|
|
49
|
+
primary?: MediaItem;
|
|
50
|
+
companions?: MediaItem[];
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
interface MediaItem {
|
|
54
|
+
type?: string;
|
|
55
|
+
fileName?: string;
|
|
56
|
+
fileSize?: number;
|
|
57
|
+
fileUrl?: string;
|
|
58
|
+
thumbnailUrl?: string;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
interface MongoIdWrapper {
|
|
62
|
+
$oid?: string;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
interface MongoDateWrapper {
|
|
66
|
+
$date?: number;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
interface DisplayOptions {
|
|
70
|
+
allowedFormats?: string[];
|
|
71
|
+
dimensions?: Dimensions;
|
|
72
|
+
isResponsive?: boolean;
|
|
73
|
+
responsiveType?: string;
|
|
74
|
+
styleOptions?: StyleOptions;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
interface Dimensions {
|
|
78
|
+
height?: number;
|
|
79
|
+
width?: number;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
interface StyleOptions {
|
|
83
|
+
fontColor?: string;
|
|
84
|
+
fontFamily?: string;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
interface ImpressionRequirements {
|
|
88
|
+
impressionType?: string[];
|
|
89
|
+
minViewDurationSeconds?: number;
|
|
51
90
|
}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import type { NativeSyntheticEvent } from 'react-native';
|
|
2
2
|
import type { AdSize } from './AdSize';
|
|
3
|
+
import type { AdType } from './AdType';
|
|
3
4
|
|
|
4
5
|
export interface HTML5AdNativeComponentProps {
|
|
5
6
|
adUnitID: string;
|
|
6
7
|
adIsResponsive?: boolean;
|
|
7
8
|
adSize?: AdSize;
|
|
8
|
-
adType:
|
|
9
|
+
adType: AdType;
|
|
9
10
|
|
|
10
11
|
onAdLoaded?: () => void;
|
|
11
12
|
onAdFailedToLoad?: (event: NativeSyntheticEvent<AdFailedToLoadEvent>) => void;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import Adgeist from '../specs/NativeAdgeist';
|
|
2
|
+
|
|
3
|
+
class AdgeistError extends Error {
|
|
4
|
+
code?: string;
|
|
5
|
+
|
|
6
|
+
constructor(message: string, code?: string) {
|
|
7
|
+
super(message);
|
|
8
|
+
this.name = 'AdgeistError';
|
|
9
|
+
this.code = code;
|
|
10
|
+
Object.setPrototypeOf(this, AdgeistError.prototype);
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* @param uri - string
|
|
16
|
+
* @throws AdgeistError if the operation fails
|
|
17
|
+
*/
|
|
18
|
+
export const trackConversionsWithDeepLinks = (uri: string): void => {
|
|
19
|
+
try {
|
|
20
|
+
Adgeist.trackDeeplinkUtm(uri);
|
|
21
|
+
} catch (error: unknown) {
|
|
22
|
+
const err =
|
|
23
|
+
error instanceof Error ? error : new Error('Failed to set user details');
|
|
24
|
+
throw new AdgeistError(err.message);
|
|
25
|
+
}
|
|
26
|
+
};
|