@ketch-sdk/ketch-types 1.1.2 → 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,43 +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
|
-
init(host: Ketch, config: Configuration)
|
|
35
|
+
init?: (host: Ketch, config: Configuration) => void;
|
|
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
|
+
showConsentExperience?: ShowConsentExperience;
|
|
44
|
+
showPreferenceExperience?: ShowPreferenceExperience;
|
|
45
|
+
willShowExperience?: (type: string) => void;
|
|
46
|
+
experienceHidden?: (reason: string) => void;
|
|
36
47
|
}
|
|
37
48
|
/**
|
|
38
49
|
* Plugin factory function signature
|
|
39
50
|
*/
|
|
40
|
-
export
|
|
51
|
+
export type PluginFunction = (host: Ketch, config?: any) => Promise<void>;
|
|
41
52
|
/**
|
|
42
53
|
* Plugin
|
|
43
54
|
*/
|
|
44
|
-
export
|
|
55
|
+
export type Plugin = PluginClass | PluginFunction;
|
|
45
56
|
/**
|
|
46
57
|
* Ketch host
|
|
47
58
|
*/
|
|
@@ -88,15 +99,15 @@ export interface Ketch {
|
|
|
88
99
|
/**
|
|
89
100
|
* ShowPreferenceExperience
|
|
90
101
|
*/
|
|
91
|
-
export
|
|
102
|
+
export type ShowPreferenceExperience = (consents: Consent, options?: ShowPreferenceOptions) => void;
|
|
92
103
|
/**
|
|
93
104
|
* ShowConsentExperience
|
|
94
105
|
*/
|
|
95
|
-
export
|
|
106
|
+
export type ShowConsentExperience = (consents: Consent, options?: ShowConsentOptions) => void;
|
|
96
107
|
/**
|
|
97
108
|
* ShowPreferenceOptions
|
|
98
109
|
*/
|
|
99
|
-
export
|
|
110
|
+
export type ShowPreferenceOptions = {
|
|
100
111
|
tab?: Tab;
|
|
101
112
|
/**
|
|
102
113
|
* dataSubjectTypeCodes is the list of data subjects to display. If undefined, all data subjects are displayed.
|
|
@@ -129,14 +140,14 @@ export declare enum ConsentExperienceType {
|
|
|
129
140
|
/**
|
|
130
141
|
* ShowConsentOptions
|
|
131
142
|
*/
|
|
132
|
-
export
|
|
143
|
+
export type ShowConsentOptions = {
|
|
133
144
|
displayHint: ConsentExperienceType;
|
|
134
145
|
purposes?: string[];
|
|
135
146
|
};
|
|
136
147
|
/**
|
|
137
148
|
* InvokeRightEvent
|
|
138
149
|
*/
|
|
139
|
-
export
|
|
150
|
+
export type InvokeRightEvent = {
|
|
140
151
|
right: string;
|
|
141
152
|
subject: DataSubject;
|
|
142
153
|
};
|
|
@@ -486,7 +497,7 @@ export interface Cookie {
|
|
|
486
497
|
/**
|
|
487
498
|
* PurposeCategory
|
|
488
499
|
*/
|
|
489
|
-
export
|
|
500
|
+
export type PurposeCategory = {
|
|
490
501
|
name: string;
|
|
491
502
|
description: string;
|
|
492
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>
|