@ketch-sdk/ketch-types 1.3.3 → 1.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
|
@@ -53,13 +53,59 @@ export type PluginFunction = (host: Ketch, config?: any) => Promise<void>;
|
|
|
53
53
|
* Plugin
|
|
54
54
|
*/
|
|
55
55
|
export type Plugin = PluginClass | PluginFunction;
|
|
56
|
+
/**
|
|
57
|
+
* IdentityProvider defines a function for providing identities
|
|
58
|
+
*/
|
|
59
|
+
export type IdentityProvider = () => Promise<string[]>;
|
|
60
|
+
/**
|
|
61
|
+
* StorageProvider defines an interface for storage
|
|
62
|
+
*/
|
|
63
|
+
export interface StorageProvider {
|
|
64
|
+
/**
|
|
65
|
+
* Get an item with the given key
|
|
66
|
+
*
|
|
67
|
+
* @param key
|
|
68
|
+
*/
|
|
69
|
+
getItem(key: string): Promise<string | null>;
|
|
70
|
+
/**
|
|
71
|
+
* Sets the value for the given key
|
|
72
|
+
*
|
|
73
|
+
* @param key
|
|
74
|
+
* @param value
|
|
75
|
+
*/
|
|
76
|
+
setItem(key: string, value: string): Promise<void>;
|
|
77
|
+
/**
|
|
78
|
+
* Removes the given key
|
|
79
|
+
*
|
|
80
|
+
* @param key
|
|
81
|
+
*/
|
|
82
|
+
removeItem(key: string): Promise<void>;
|
|
83
|
+
}
|
|
56
84
|
/**
|
|
57
85
|
* Ketch host
|
|
58
86
|
*/
|
|
59
87
|
export interface Ketch {
|
|
60
88
|
getConfig(): Promise<Configuration>;
|
|
89
|
+
/**
|
|
90
|
+
* Register a plugin with the given configuration
|
|
91
|
+
*
|
|
92
|
+
* @param plugin
|
|
93
|
+
* @param config
|
|
94
|
+
*/
|
|
61
95
|
registerPlugin(plugin: Plugin, config?: any): Promise<void>;
|
|
62
|
-
|
|
96
|
+
/**
|
|
97
|
+
* Register an identity provider for the given identity
|
|
98
|
+
*
|
|
99
|
+
* @param name
|
|
100
|
+
* @param provider
|
|
101
|
+
*/
|
|
102
|
+
registerIdentityProvider(name: string, provider: IdentityProvider): Promise<void>;
|
|
103
|
+
/**
|
|
104
|
+
* Register a storage provider
|
|
105
|
+
*
|
|
106
|
+
* @param provider
|
|
107
|
+
*/
|
|
108
|
+
registerStorageProvider(provider: StorageProvider): Promise<void>;
|
|
63
109
|
hasConsent(): boolean;
|
|
64
110
|
getConsent(): Promise<Consent>;
|
|
65
111
|
setConsent(c: Consent): Promise<Consent>;
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name": "@ketch-sdk/ketch-types", "version": "1.
|
|
1
|
+
{"name": "@ketch-sdk/ketch-types", "version": "1.4.0", "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.4", "@typescript-eslint/eslint-plugin": "^5.47.0", "@typescript-eslint/parser": "^5.47.0", "@vercel/ncc": "^0.36.0", "eslint": "^8.30.0", "eslint-config-prettier": "^8.5.0", "eslint-plugin-import": "^2.26.0", "eslint-plugin-jest": "^27.1.7", "eslint-plugin-prettier": "^4.2.1", "jest": "^29.3.1", "jest-environment-jsdom": "^29.3.1", "jest-junit": "^15.0.0", "prettier": "^2.8.1", "ts-jest": "^29.0.3", "typedoc": "^0.23.23", "typescript": "^4.9.4"}}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<coverage generated="
|
|
3
|
-
<project timestamp="
|
|
2
|
+
<coverage generated="1672382456424" clover="3.2.0">
|
|
3
|
+
<project timestamp="1672382456424" 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-12-
|
|
89
|
+
at 2022-12-30T06:40:56.420Z
|
|
90
90
|
</div>
|
|
91
91
|
<script src="prettify.js"></script>
|
|
92
92
|
<script>
|