Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions types/pxr-oneline/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,17 +49,17 @@ declare namespace OneLine {
isEmpty: string;
isNotEmpty: string;
ageGateReady: string;
socialVendorsReady: string;
purposeReady: string;
};
cons: {
OneTime: string;
};
subscribe(topic: string, fn: NoParamFunction): void;
subscribe(topic: EventObject["topic"]["socialVendorsReady"], fn: (data: SocialVendorConsents) => void): void;
subscribe(topic: EventObject["topic"]["purposeReady"], fn: (data: SocialConsents) => void): void;
broadcast(oneTime: boolean, topic: string, data?: any): void;
}

interface SocialVendorConsents {
interface SocialConsents {
vendors: {
tiktok: boolean;
twitter: boolean;
Expand All @@ -69,6 +69,12 @@ declare namespace OneLine {
google_maps: boolean;
spotify: boolean;
jwplayer: boolean;
dailymotion: boolean;
omny: boolean;
vimeo: boolean;
liveblog: boolean;
art19: boolean;
roninmedia: boolean;
};
}

Expand Down
13 changes: 10 additions & 3 deletions types/pxr-oneline/oneline-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ interface BidderConfig {
type NoParamFunction = () => void;
type ParamFunction = (arg: any) => void;

interface SocialVendorConsents {
interface SocialConsents {
vendors: {
tiktok: boolean;
twitter: boolean;
Expand All @@ -24,6 +24,13 @@ interface SocialVendorConsents {
facebook: boolean;
google_maps: boolean;
spotify: boolean;
jwplayer: boolean;
dailymotion: boolean;
omny: boolean;
vimeo: boolean;
liveblog: boolean;
art19: boolean;
roninmedia: boolean;
};
}

Expand All @@ -36,13 +43,13 @@ const ndOne: OneLine.OneLine = {
isEmpty: "isEmpty",
isNotEmpty: "isNotEmpty",
ageGateReady: "ageGateReady",
socialVendorsReady: "socialVendorsReady",
purposeReady: "purposeReady",
},
cons: {
OneTime: "OneTime",
},

subscribe: (topic: string, fn: NoParamFunction | ((data: SocialVendorConsents) => void)) => {
subscribe: (topic: string, fn: NoParamFunction | ((data: SocialConsents) => void)) => {
// Mock implementation for subscribe
console.log(`Subscribed to topic: ${topic}`);
},
Expand Down
2 changes: 1 addition & 1 deletion types/pxr-oneline/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"private": true,
"name": "@types/pxr-oneline",
"version": "1.7.9999",
"version": "1.8.9999",
"nonNpm": true,
"nonNpmDescription": "The OneLine handles all the logic needed for a publisher to serve ads.",
"projects": [
Expand Down