@ketch-sdk/ketch-types 1.1.3 → 1.1.4
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.ts
CHANGED
|
@@ -5,54 +5,54 @@ export declare type Callback = (arg0: any) => void;
|
|
|
5
5
|
/**
|
|
6
6
|
* Status
|
|
7
7
|
*/
|
|
8
|
-
export
|
|
8
|
+
export type Status = {
|
|
9
9
|
[key: string]: boolean;
|
|
10
10
|
};
|
|
11
11
|
/**
|
|
12
12
|
* Consent
|
|
13
13
|
*/
|
|
14
|
-
export
|
|
14
|
+
export type Consent = {
|
|
15
15
|
purposes: Status;
|
|
16
16
|
vendors?: string[];
|
|
17
17
|
};
|
|
18
18
|
/**
|
|
19
19
|
* Identities
|
|
20
20
|
*/
|
|
21
|
-
export
|
|
21
|
+
export type Identities = {
|
|
22
22
|
[key: string]: string;
|
|
23
23
|
};
|
|
24
24
|
/**
|
|
25
25
|
* Tabs
|
|
26
26
|
*/
|
|
27
27
|
export declare const ALL_TABS: readonly ["overviewTab", "rightsTab", "consentsTab"];
|
|
28
|
-
|
|
29
|
-
export
|
|
28
|
+
type TabTuple = typeof ALL_TABS;
|
|
29
|
+
export type Tab = TabTuple[number];
|
|
30
30
|
export declare function isTab(value: string): value is Tab;
|
|
31
31
|
/**
|
|
32
32
|
* Plugin class
|
|
33
33
|
*/
|
|
34
34
|
export interface PluginClass {
|
|
35
35
|
init?: (host: Ketch, config: Configuration) => void;
|
|
36
|
-
environmentLoaded?: (
|
|
37
|
-
geoIPLoaded?: (
|
|
38
|
-
identitiesLoaded?: (
|
|
39
|
-
jurisdictionLoaded?: (
|
|
40
|
-
regionInfoLoaded?: (
|
|
41
|
-
consentChanged?: (
|
|
42
|
-
rightInvoked?: (
|
|
36
|
+
environmentLoaded?: (env: Environment) => void;
|
|
37
|
+
geoIPLoaded?: (ipInfo: IPInfo) => void;
|
|
38
|
+
identitiesLoaded?: (identities: Identities) => void;
|
|
39
|
+
jurisdictionLoaded?: (policyScope: string) => void;
|
|
40
|
+
regionInfoLoaded?: (region: string) => void;
|
|
41
|
+
consentChanged?: (consent: Consent) => void;
|
|
42
|
+
rightInvoked?: (request: InvokeRightRequest) => void;
|
|
43
43
|
showConsentExperience?: ShowConsentExperience;
|
|
44
44
|
showPreferenceExperience?: ShowPreferenceExperience;
|
|
45
|
-
willShowExperience?: (
|
|
46
|
-
experienceHidden?: (
|
|
45
|
+
willShowExperience?: (type: string) => void;
|
|
46
|
+
experienceHidden?: (reason: string) => void;
|
|
47
47
|
}
|
|
48
48
|
/**
|
|
49
49
|
* Plugin factory function signature
|
|
50
50
|
*/
|
|
51
|
-
export
|
|
51
|
+
export type PluginFunction = (host: Ketch, config?: any) => Promise<void>;
|
|
52
52
|
/**
|
|
53
53
|
* Plugin
|
|
54
54
|
*/
|
|
55
|
-
export
|
|
55
|
+
export type Plugin = PluginClass | PluginFunction;
|
|
56
56
|
/**
|
|
57
57
|
* Ketch host
|
|
58
58
|
*/
|
|
@@ -99,15 +99,15 @@ export interface Ketch {
|
|
|
99
99
|
/**
|
|
100
100
|
* ShowPreferenceExperience
|
|
101
101
|
*/
|
|
102
|
-
export
|
|
102
|
+
export type ShowPreferenceExperience = (consents: Consent, options?: ShowPreferenceOptions) => void;
|
|
103
103
|
/**
|
|
104
104
|
* ShowConsentExperience
|
|
105
105
|
*/
|
|
106
|
-
export
|
|
106
|
+
export type ShowConsentExperience = (consents: Consent, options?: ShowConsentOptions) => void;
|
|
107
107
|
/**
|
|
108
108
|
* ShowPreferenceOptions
|
|
109
109
|
*/
|
|
110
|
-
export
|
|
110
|
+
export type ShowPreferenceOptions = {
|
|
111
111
|
tab?: Tab;
|
|
112
112
|
/**
|
|
113
113
|
* dataSubjectTypeCodes is the list of data subjects to display. If undefined, all data subjects are displayed.
|
|
@@ -140,14 +140,14 @@ export declare enum ConsentExperienceType {
|
|
|
140
140
|
/**
|
|
141
141
|
* ShowConsentOptions
|
|
142
142
|
*/
|
|
143
|
-
export
|
|
143
|
+
export type ShowConsentOptions = {
|
|
144
144
|
displayHint: ConsentExperienceType;
|
|
145
145
|
purposes?: string[];
|
|
146
146
|
};
|
|
147
147
|
/**
|
|
148
148
|
* InvokeRightEvent
|
|
149
149
|
*/
|
|
150
|
-
export
|
|
150
|
+
export type InvokeRightEvent = {
|
|
151
151
|
right: string;
|
|
152
152
|
subject: DataSubject;
|
|
153
153
|
};
|
|
@@ -497,7 +497,7 @@ export interface Cookie {
|
|
|
497
497
|
/**
|
|
498
498
|
* PurposeCategory
|
|
499
499
|
*/
|
|
500
|
-
export
|
|
500
|
+
export type PurposeCategory = {
|
|
501
501
|
name: string;
|
|
502
502
|
description: string;
|
|
503
503
|
retentionPeriod: string;
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name": "@ketch-sdk/ketch-types", "version": "1.1.
|
|
1
|
+
{"name": "@ketch-sdk/ketch-types", "version": "1.1.4", "description": "Ketch Types", "main": "./dist/index.js", "types": "./dist/index.d.ts", "scripts": {"all": "npm run lint && npm run format-check && npm run test && npm run build && npm run docs", "build": "ncc build --minify --license licenses.txt src/index.ts", "lint": "eslint src/**/*.ts", "test": "jest --runInBand --passWithNoTests", "format": "prettier --write \"**/*.{ts,tsx,yml,yaml}\"", "format-check": "prettier --check '**/*.ts'", "docs": "typedoc --githubPages true --excludeInternal src/index.ts"}, "repository": {"type": "git", "url": "git+https://github.com/ketch-sdk/ketch-types.git"}, "author": "Ketch Kloud, Inc. (https://www.ketch.com/)", "license": "MIT", "homepage": "https://github.com/ketch-sdk/ketch-types", "bugs": {"url": "https://github.com/ketch-sdk/ketch-types/issues"}, "devDependencies": {"@jest/globals": "^29.3.1", "@types/jest": "^29.2.3", "@typescript-eslint/eslint-plugin": "^5.45.0", "@typescript-eslint/parser": "^5.45.0", "@vercel/ncc": "^0.34.0", "eslint": "^8.28.0", "eslint-config-prettier": "^8.5.0", "eslint-plugin-import": "^2.26.0", "eslint-plugin-jest": "^27.1.6", "eslint-plugin-prettier": "^4.2.1", "jest": "^29.3.1", "jest-environment-jsdom": "^29.3.1", "jest-junit": "^15.0.0", "prettier": "^2.8.0", "ts-jest": "^29.0.3", "typedoc": "^0.23.21", "typescript": "^4.9.3"}}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<coverage generated="
|
|
3
|
-
<project timestamp="
|
|
2
|
+
<coverage generated="1670012673522" clover="3.2.0">
|
|
3
|
+
<project timestamp="1670012673522" name="All files">
|
|
4
4
|
<metrics statements="0" coveredstatements="0" conditionals="0" coveredconditionals="0" methods="0" coveredmethods="0" elements="0" coveredelements="0" complexity="0" loc="0" ncloc="0" packages="0" files="0" classes="0"/>
|
|
5
5
|
</project>
|
|
6
6
|
</coverage>
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
87
87
|
Code coverage generated by
|
|
88
88
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
89
|
-
at 2022-
|
|
89
|
+
at 2022-12-02T20:24:33.519Z
|
|
90
90
|
</div>
|
|
91
91
|
<script src="prettify.js"></script>
|
|
92
92
|
<script>
|