@optable/web-sdk 0.21.4 → 0.22.0-rc1
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/README.md +1 -7
- package/browser/dist/sdk.js +1 -1
- package/lib/dist/addons/paapi.d.ts +0 -1
- package/lib/dist/addons/paapi.js +1 -1
- package/lib/dist/build.json +1 -1
- package/lib/dist/config.d.ts +16 -5
- package/lib/dist/config.js +18 -3
- package/lib/dist/core/network.d.ts +3 -3
- package/lib/dist/core/network.js +14 -3
- package/lib/dist/core/regs/consent.d.ts +13 -0
- package/lib/dist/core/regs/consent.js +96 -0
- package/lib/dist/core/regs/gpp/cmpapi.d.ts +46 -0
- package/lib/dist/core/regs/gpp/cmpapi.js +1 -0
- package/lib/dist/core/regs/gpp/index.d.ts +2 -0
- package/lib/dist/core/regs/gpp/index.js +2 -0
- package/lib/dist/core/regs/gpp/primitives.d.ts +6 -0
- package/lib/dist/core/regs/gpp/primitives.js +1 -0
- package/lib/dist/core/regs/gpp/sections.d.ts +18 -0
- package/lib/dist/core/regs/gpp/sections.js +18 -0
- package/lib/dist/core/regs/gpp/tcfcav1.d.ts +36 -0
- package/lib/dist/core/regs/gpp/tcfcav1.js +3 -0
- package/lib/dist/core/regs/gpp/tcfeuv2.d.ts +39 -0
- package/lib/dist/core/regs/gpp/tcfeuv2.js +3 -0
- package/lib/dist/core/regs/gpp/usca.d.ts +19 -0
- package/lib/dist/core/regs/gpp/usca.js +3 -0
- package/lib/dist/core/regs/gpp/usco.d.ts +18 -0
- package/lib/dist/core/regs/gpp/usco.js +3 -0
- package/lib/dist/core/regs/gpp/usct.d.ts +18 -0
- package/lib/dist/core/regs/gpp/usct.js +3 -0
- package/lib/dist/core/regs/gpp/usde.d.ts +19 -0
- package/lib/dist/core/regs/gpp/usde.js +3 -0
- package/lib/dist/core/regs/gpp/usfl.d.ts +19 -0
- package/lib/dist/core/regs/gpp/usfl.js +3 -0
- package/lib/dist/core/regs/gpp/usia.d.ts +19 -0
- package/lib/dist/core/regs/gpp/usia.js +3 -0
- package/lib/dist/core/regs/gpp/usmt.d.ts +19 -0
- package/lib/dist/core/regs/gpp/usmt.js +3 -0
- package/lib/dist/core/regs/gpp/usnat.d.ts +23 -0
- package/lib/dist/core/regs/gpp/usnat.js +3 -0
- package/lib/dist/core/regs/gpp/usne.d.ts +19 -0
- package/lib/dist/core/regs/gpp/usne.js +3 -0
- package/lib/dist/core/regs/gpp/usnh.d.ts +19 -0
- package/lib/dist/core/regs/gpp/usnh.js +3 -0
- package/lib/dist/core/regs/gpp/usnj.d.ts +19 -0
- package/lib/dist/core/regs/gpp/usnj.js +3 -0
- package/lib/dist/core/regs/gpp/usor.d.ts +19 -0
- package/lib/dist/core/regs/gpp/usor.js +3 -0
- package/lib/dist/core/regs/gpp/ustn.d.ts +19 -0
- package/lib/dist/core/regs/gpp/ustn.js +3 -0
- package/lib/dist/core/regs/gpp/ustx.d.ts +19 -0
- package/lib/dist/core/regs/gpp/ustx.js +3 -0
- package/lib/dist/core/regs/gpp/usut.d.ts +18 -0
- package/lib/dist/core/regs/gpp/usut.js +3 -0
- package/lib/dist/core/regs/gpp/usva.d.ts +18 -0
- package/lib/dist/core/regs/gpp/usva.js +3 -0
- package/lib/dist/core/regs/regulations.d.ts +4 -0
- package/lib/dist/core/regs/regulations.js +67 -0
- package/lib/dist/core/regs/storage.d.ts +9 -0
- package/lib/dist/core/regs/storage.js +24 -0
- package/lib/dist/core/regs/tcf/cmpapi.d.ts +61 -0
- package/lib/dist/core/regs/tcf/cmpapi.js +1 -0
- package/lib/dist/core/regs/tcf/index.d.ts +1 -0
- package/lib/dist/core/regs/tcf/index.js +1 -0
- package/lib/dist/core/storage.d.ts +4 -3
- package/lib/dist/core/storage.js +15 -13
- package/lib/dist/edge/identify.d.ts +2 -2
- package/lib/dist/edge/profile.d.ts +2 -2
- package/lib/dist/edge/site.d.ts +3 -3
- package/lib/dist/edge/targeting.d.ts +4 -4
- package/lib/dist/edge/tokenize.d.ts +2 -2
- package/lib/dist/edge/uid2_token.d.ts +2 -2
- package/lib/dist/edge/witness.d.ts +2 -2
- package/lib/dist/sdk.d.ts +4 -4
- package/lib/dist/sdk.js +4 -4
- package/package.json +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ResolvedConfig } from "../config";
|
|
2
2
|
import { User as RTB2User } from "./rtb2";
|
|
3
3
|
type Identifier = {
|
|
4
4
|
id: string;
|
|
@@ -17,9 +17,9 @@ type TargetingResponse = {
|
|
|
17
17
|
audience?: AudienceIdentifiers[];
|
|
18
18
|
user?: UserIdentifiers[];
|
|
19
19
|
};
|
|
20
|
-
declare function Targeting(config:
|
|
21
|
-
declare function TargetingFromCache(config:
|
|
22
|
-
declare function TargetingClearCache(config:
|
|
20
|
+
declare function Targeting(config: ResolvedConfig, id: string): Promise<TargetingResponse>;
|
|
21
|
+
declare function TargetingFromCache(config: ResolvedConfig): TargetingResponse | null;
|
|
22
|
+
declare function TargetingClearCache(config: ResolvedConfig): void;
|
|
23
23
|
type PrebidORTB2 = {
|
|
24
24
|
user?: RTB2User;
|
|
25
25
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ResolvedConfig } from "../config";
|
|
2
2
|
import { User } from "./rtb2";
|
|
3
3
|
type TokenizeResponse = {
|
|
4
4
|
User: User;
|
|
@@ -6,6 +6,6 @@ type TokenizeResponse = {
|
|
|
6
6
|
type TokenizeRequest = {
|
|
7
7
|
id: string;
|
|
8
8
|
};
|
|
9
|
-
declare function Tokenize(config:
|
|
9
|
+
declare function Tokenize(config: ResolvedConfig, id: string): Promise<TokenizeResponse>;
|
|
10
10
|
export { Tokenize, TokenizeRequest, TokenizeResponse };
|
|
11
11
|
export default Tokenize;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ResolvedConfig } from "../config";
|
|
2
2
|
type Uid2TokenResponse = {
|
|
3
3
|
advertising_token: string;
|
|
4
4
|
RefreshToken: string;
|
|
@@ -7,6 +7,6 @@ type Uid2TokenResponse = {
|
|
|
7
7
|
RefreshExpires: number;
|
|
8
8
|
RefreshResponseKey: string;
|
|
9
9
|
};
|
|
10
|
-
declare function Uid2Token(config:
|
|
10
|
+
declare function Uid2Token(config: ResolvedConfig, id: string): Promise<Uid2TokenResponse>;
|
|
11
11
|
export { Uid2Token };
|
|
12
12
|
export default Uid2Token;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ResolvedConfig } from "../config";
|
|
2
2
|
type WitnessProperties = {
|
|
3
3
|
[key: string]: string | number | boolean;
|
|
4
4
|
};
|
|
5
|
-
declare function Witness(config:
|
|
5
|
+
declare function Witness(config: ResolvedConfig, event: string, properties: WitnessProperties): Promise<void>;
|
|
6
6
|
export { Witness, WitnessProperties };
|
|
7
7
|
export default Witness;
|
package/lib/dist/sdk.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { InitConfig, ResolvedConfig } from "./config";
|
|
2
2
|
import type { WitnessProperties } from "./edge/witness";
|
|
3
3
|
import type { ProfileTraits } from "./edge/profile";
|
|
4
4
|
import { SiteResponse } from "./edge/site";
|
|
@@ -6,9 +6,9 @@ import { TargetingKeyValues, TargetingResponse, PrebidORTB2 } from "./edge/targe
|
|
|
6
6
|
import { TokenizeResponse } from "./edge/tokenize";
|
|
7
7
|
declare class OptableSDK {
|
|
8
8
|
static version: string;
|
|
9
|
-
dcn:
|
|
9
|
+
dcn: ResolvedConfig;
|
|
10
10
|
private init;
|
|
11
|
-
constructor(dcn:
|
|
11
|
+
constructor(dcn: InitConfig);
|
|
12
12
|
identify(...ids: string[]): Promise<void>;
|
|
13
13
|
uid2Token(id: string): Promise<{
|
|
14
14
|
advertising_token: string;
|
|
@@ -37,5 +37,5 @@ declare class OptableSDK {
|
|
|
37
37
|
static PrebidORTB2(tdata: TargetingResponse): PrebidORTB2;
|
|
38
38
|
}
|
|
39
39
|
export { OptableSDK };
|
|
40
|
-
export type {
|
|
40
|
+
export type { InitConfig };
|
|
41
41
|
export default OptableSDK;
|
package/lib/dist/sdk.js
CHANGED
|
@@ -36,8 +36,8 @@ class OptableSDK {
|
|
|
36
36
|
return Uid2Token(this.dcn, id);
|
|
37
37
|
});
|
|
38
38
|
}
|
|
39
|
-
targeting(
|
|
40
|
-
return __awaiter(this,
|
|
39
|
+
targeting() {
|
|
40
|
+
return __awaiter(this, arguments, void 0, function* (id = "__passport__") {
|
|
41
41
|
yield this.init;
|
|
42
42
|
return Targeting(this.dcn, id);
|
|
43
43
|
});
|
|
@@ -74,8 +74,8 @@ class OptableSDK {
|
|
|
74
74
|
const tdata = this.targetingFromCache();
|
|
75
75
|
return TargetingKeyValues(tdata);
|
|
76
76
|
}
|
|
77
|
-
witness(
|
|
78
|
-
return __awaiter(this,
|
|
77
|
+
witness(event_1) {
|
|
78
|
+
return __awaiter(this, arguments, void 0, function* (event, properties = {}) {
|
|
79
79
|
yield this.init;
|
|
80
80
|
return Witness(this.dcn, event, properties);
|
|
81
81
|
});
|
package/package.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
},
|
|
10
10
|
"homepage": "https://optable.co",
|
|
11
11
|
"license": "SEE LICENSE IN LICENSE",
|
|
12
|
-
"version": "v0.
|
|
12
|
+
"version": "v0.22.0-rc1",
|
|
13
13
|
"devDependencies": {
|
|
14
14
|
"@babel/core": "^7.12.3",
|
|
15
15
|
"@babel/plugin-proposal-class-properties": "^7.12.1",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"shellcheck": "^3.0.0",
|
|
28
28
|
"typescript": "^5.2.2",
|
|
29
29
|
"webpack": "^5.97.1",
|
|
30
|
-
"webpack-cli": "^
|
|
30
|
+
"webpack-cli": "^5.1.4",
|
|
31
31
|
"whatwg-fetch": "^3.6.20"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|