@ketch-sdk/ketch-types 1.0.2 → 1.1.1
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
|
@@ -41,11 +41,9 @@ export interface Ketch {
|
|
|
41
41
|
hasConsent(): boolean;
|
|
42
42
|
getConsent(): Promise<Consent>;
|
|
43
43
|
setConsent(c: Consent): Promise<Consent>;
|
|
44
|
-
changeConsent(consent: Consent): Promise<void>;
|
|
45
44
|
setProvisionalConsent(c: Consent): Promise<void>;
|
|
46
45
|
onConsent(callback: Callback): Promise<void>;
|
|
47
46
|
setShowConsentExperience(): Promise<void>;
|
|
48
|
-
shouldShowConsent(c: Consent): boolean;
|
|
49
47
|
showConsentExperience(): Promise<Consent>;
|
|
50
48
|
onShowConsentExperience(callback: ShowConsentExperience): Promise<void>;
|
|
51
49
|
showPreferenceExperience(params: ShowPreferenceOptions): Promise<Consent>;
|
|
@@ -103,11 +101,26 @@ export declare type ShowPreferenceOptions = {
|
|
|
103
101
|
*/
|
|
104
102
|
supportedCountries?: string[];
|
|
105
103
|
};
|
|
104
|
+
/**
|
|
105
|
+
* ExperienceType is the type of experience that will be shown
|
|
106
|
+
*/
|
|
107
|
+
export declare enum ExperienceType {
|
|
108
|
+
Consent = "experiences.consent",
|
|
109
|
+
Preference = "experiences.preference"
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* ConsentExperienceType is the type of consent experience that will be shown
|
|
113
|
+
*/
|
|
114
|
+
export declare enum ConsentExperienceType {
|
|
115
|
+
Banner = "experiences.consent.banner",
|
|
116
|
+
Modal = "experiences.consent.modal",
|
|
117
|
+
JIT = "experiences.consent.jit"
|
|
118
|
+
}
|
|
106
119
|
/**
|
|
107
120
|
* ShowConsentOptions
|
|
108
121
|
*/
|
|
109
122
|
export declare type ShowConsentOptions = {
|
|
110
|
-
displayHint:
|
|
123
|
+
displayHint: ConsentExperienceType;
|
|
111
124
|
purposes?: string[];
|
|
112
125
|
};
|
|
113
126
|
/**
|
|
@@ -134,7 +147,8 @@ export interface AppDiv {
|
|
|
134
147
|
export declare enum ExperienceClosedReason {
|
|
135
148
|
SET_CONSENT = "setConsent",
|
|
136
149
|
INVOKE_RIGHT = "invokeRight",
|
|
137
|
-
CLOSE = "close"
|
|
150
|
+
CLOSE = "close",
|
|
151
|
+
WILL_NOT_SHOW = "willNotShow"
|
|
138
152
|
}
|
|
139
153
|
/**
|
|
140
154
|
* ExperienceDefault
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{"use strict";var T={};(()=>{T.d=(E,
|
|
1
|
+
(()=>{"use strict";var T={};(()=>{T.d=(E,e)=>{for(var _ in e){if(T.o(e,_)&&!T.o(E,_)){Object.defineProperty(E,_,{enumerable:true,get:e[_]})}}}})();(()=>{T.o=(T,E)=>Object.prototype.hasOwnProperty.call(T,E)})();(()=>{T.r=T=>{if(typeof Symbol!=="undefined"&&Symbol.toStringTag){Object.defineProperty(T,Symbol.toStringTag,{value:"Module"})}Object.defineProperty(T,"__esModule",{value:true})}})();if(typeof T!=="undefined")T.ab=__dirname+"/";var E={};T.r(E);T.d(E,{ALL_TABS:()=>e,isTab:()=>isTab,ExperienceType:()=>_,ConsentExperienceType:()=>n,ExperienceClosedReason:()=>o,ExperienceDefault:()=>R,ExperienceButtonDestination:()=>I,ExperiencePrimaryButtonAction:()=>t,MigrationOption:()=>i,CookieDuration:()=>r,CookieProvenance:()=>A,CookieCategory:()=>N,IdentityType:()=>O,IdentityFormat:()=>S,SwitchTextRenderLogic:()=>a,BannerPosition:()=>L,ModalPosition:()=>c});const e=["overviewTab","rightsTab","consentsTab"];function isTab(T){return e.includes(T)}var _;(function(T){T["Consent"]="experiences.consent";T["Preference"]="experiences.preference"})(_||(_={}));var n;(function(T){T["Banner"]="experiences.consent.banner";T["Modal"]="experiences.consent.modal";T["JIT"]="experiences.consent.jit"})(n||(n={}));var o;(function(T){T["SET_CONSENT"]="setConsent";T["INVOKE_RIGHT"]="invokeRight";T["CLOSE"]="close";T["WILL_NOT_SHOW"]="willNotShow"})(o||(o={}));var R;(function(T){T[T["BANNER"]=1]="BANNER";T[T["MODAL"]=2]="MODAL"})(R||(R={}));var I;(function(T){T[T["GOTO_MODAL"]=1]="GOTO_MODAL";T[T["GOTO_PREFERENCE"]=2]="GOTO_PREFERENCE";T[T["REJECT_ALL"]=3]="REJECT_ALL"})(I||(I={}));var t;(function(T){T[T["SAVE_CURRENT_STATE"]=1]="SAVE_CURRENT_STATE";T[T["ACCEPT_ALL"]=2]="ACCEPT_ALL"})(t||(t={}));var i;(function(T){T[T["MIGRATE_DEFAULT"]=0]="MIGRATE_DEFAULT";T[T["MIGRATE_NEVER"]=1]="MIGRATE_NEVER";T[T["MIGRATE_FROM_ALLOW"]=2]="MIGRATE_FROM_ALLOW";T[T["MIGRATE_FROM_DENY"]=3]="MIGRATE_FROM_DENY";T[T["MIGRATE_ALWAYS"]=4]="MIGRATE_ALWAYS"})(i||(i={}));var r;(function(T){T[T["SESSION"]=1]="SESSION";T[T["PERSISTENT"]=2]="PERSISTENT"})(r||(r={}));var A;(function(T){T[T["FIRST_PARTY"]=1]="FIRST_PARTY";T[T["THIRD_PARTY"]=2]="THIRD_PARTY"})(A||(A={}));var N;(function(T){T[T["STRICTLY_NECESSARY"]=1]="STRICTLY_NECESSARY";T[T["FUNCTIONAL"]=2]="FUNCTIONAL";T[T["PERFORMANCE"]=3]="PERFORMANCE";T[T["MARKETING"]=4]="MARKETING"})(N||(N={}));var O;(function(T){T["IDENTITY_TYPE_UNDEFINED"]="";T["IDENTITY_TYPE_DATA_LAYER"]="dataLayer";T["IDENTITY_TYPE_WINDOW"]="window";T["IDENTITY_TYPE_COOKIE"]="cookie";T["IDENTITY_TYPE_MANAGED"]="managedCookie";T["IDENTITY_TYPE_LOCAL_STORAGE"]="localStorage";T["IDENTITY_TYPE_SESSION_STORAGE"]="sessionStorage";T["IDENTITY_TYPE_QUERY_STRING"]="queryString"})(O||(O={}));var S;(function(T){T["IDENTITY_FORMAT_UNDEFINED"]="";T["IDENTITY_FORMAT_STRING"]="string";T["IDENTITY_FORMAT_JSON"]="json";T["IDENTITY_FORMAT_JWT"]="jwt";T["IDENTITY_FORMAT_QUERY"]="query";T["IDENTITY_FORMAT_SEMICOLON"]="semicolon"})(S||(S={}));var a;(function(T){T[T["SWITCH_TEXT_RENDER_ALL"]=1]="SWITCH_TEXT_RENDER_ALL";T[T["SWITCH_TEXT_RENDER_LEGAL_BASIS"]=2]="SWITCH_TEXT_RENDER_LEGAL_BASIS";T[T["SWITCH_TEXT_RENDER_CHANGE"]=3]="SWITCH_TEXT_RENDER_CHANGE";T[T["SWITCH_TEXT_RENDER_NEVER"]=4]="SWITCH_TEXT_RENDER_NEVER"})(a||(a={}));var L;(function(T){T[T["BOTTOM"]=1]="BOTTOM";T[T["TOP"]=2]="TOP";T[T["BOTTOM_LEFT"]=3]="BOTTOM_LEFT";T[T["BOTTOM_RIGHT"]=4]="BOTTOM_RIGHT"})(L||(L={}));var c;(function(T){T[T["CENTER"]=1]="CENTER";T[T["LEFT_FULL_HEIGHT"]=2]="LEFT_FULL_HEIGHT";T[T["RIGHT_FULL_HEIGHT"]=3]="RIGHT_FULL_HEIGHT"})(c||(c={}));module.exports=E})();
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name": "@ketch-sdk/ketch-types", "version": "1.
|
|
1
|
+
{"name": "@ketch-sdk/ketch-types", "version": "1.1.1", "description": "Ketch Types", "main": "./dist/index.js", "types": "./dist/index.d.ts", "scripts": {"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.2.2", "@types/jest": "^29.2.0", "@typescript-eslint/eslint-plugin": "^5.42.0", "@typescript-eslint/parser": "^5.42.0", "@vercel/ncc": "^0.34.0", "eslint": "^8.26.0", "eslint-config-prettier": "^8.5.0", "eslint-plugin-import": "^2.26.0", "eslint-plugin-jest": "^27.1.3", "eslint-plugin-prettier": "^4.2.1", "jest": "^29.2.2", "jest-environment-jsdom": "^29.2.2", "jest-junit": "^14.0.1", "prettier": "^2.7.1", "ts-jest": "^29.0.3", "typedoc": "^0.23.19", "typescript": "^4.8.4"}}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<coverage generated="
|
|
3
|
-
<project timestamp="
|
|
2
|
+
<coverage generated="1667934824780" clover="3.2.0">
|
|
3
|
+
<project timestamp="1667934824780" 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-11-
|
|
89
|
+
at 2022-11-08T19:13:44.777Z
|
|
90
90
|
</div>
|
|
91
91
|
<script src="prettify.js"></script>
|
|
92
92
|
<script>
|