@ketch-sdk/ketch-types 0.3.0 → 0.4.0

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
@@ -50,7 +50,7 @@ export interface Ketch {
50
50
  onShowConsentExperience(callback: ShowConsentExperience): Promise<void>;
51
51
  showPreferenceExperience(params: PreferenceExperienceParams): Promise<Consent>;
52
52
  onShowPreferenceExperience(callback: ShowPreferenceExperience): Promise<void>;
53
- experienceClosed(reason: string): Promise<Consent>;
53
+ experienceClosed(reason: ExperienceClosedReason): Promise<Consent>;
54
54
  onHideExperience(callback: Callback): Promise<void>;
55
55
  onWillShowExperience(callback: Callback): Promise<void>;
56
56
  invokeRight(eventData: InvokeRightsEvent): Promise<void>;
@@ -70,7 +70,12 @@ export interface Ketch {
70
70
  setRegionInfo(info: string): Promise<string>;
71
71
  getRegionInfo(): Promise<string>;
72
72
  onRegionInfo(callback: Callback): Promise<void>;
73
- fireNativeEvent(name: string, args: any): Promise<void>;
73
+ emit(eventName: string | symbol, ...args: any[]): boolean;
74
+ addListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
75
+ removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
76
+ on(eventName: string | symbol, listener: (...args: any[]) => void): this;
77
+ once(eventName: string | symbol, listener: (...args: any[]) => void): this;
78
+ off(eventName: string | symbol, listener: (...args: any[]) => void): this;
74
79
  }
75
80
  /**
76
81
  * ShowPreferenceExperience
@@ -124,6 +129,14 @@ export interface AppDiv {
124
129
  id: string;
125
130
  zIndex: string;
126
131
  }
132
+ /**
133
+ * ExperienceClosedReason describes the reason the experience was closed.
134
+ *
135
+ * setConsent = consent was accepted/set
136
+ * invokeRight = the right was invoked
137
+ * close = the close/exit button was clicked
138
+ */
139
+ export declare type ExperienceClosedReason = 'setConsent' | 'invokeRight' | 'close';
127
140
  /**
128
141
  * ExperienceDefault
129
142
  */
package/package.json CHANGED
@@ -1 +1 @@
1
- {"name": "@ketch-sdk/ketch-types", "version": "0.3.0", "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.1", "@types/jest": "^29.2.0", "@typescript-eslint/eslint-plugin": "^5.40.1", "@typescript-eslint/parser": "^5.40.1", "@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.1", "jest-environment-jsdom": "^29.2.1", "jest-junit": "^14.0.1", "prettier": "^2.7.1", "ts-jest": "^29.0.3", "typedoc": "^0.23.17", "typescript": "^4.8.4"}}
1
+ {"name": "@ketch-sdk/ketch-types", "version": "0.4.0", "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.41.0", "@typescript-eslint/parser": "^5.41.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="1666666865838" clover="3.2.0">
3
- <project timestamp="1666666865838" name="All files">
2
+ <coverage generated="1667182055910" clover="3.2.0">
3
+ <project timestamp="1667182055910" 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-10-25T03:01:05.835Z
89
+ at 2022-10-31T02:07:35.907Z
90
90
  </div>
91
91
  <script src="prettify.js"></script>
92
92
  <script>
@@ -1,3 +1,3 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
- <testsuites name="jest tests" tests="0" failures="0" errors="0" time="0.002">
2
+ <testsuites name="jest tests" tests="0" failures="0" errors="0" time="0.003">
3
3
  </testsuites>