wacom 20.2.2 → 20.2.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/fesm2022/wacom.mjs +208 -207
- package/fesm2022/wacom.mjs.map +1 -1
- package/index.d.ts +75 -75
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -70,13 +70,14 @@ interface Alert extends AlertConfig {
|
|
|
70
70
|
*/
|
|
71
71
|
declare const DEFAULT_ALERT_CONFIG: Alert;
|
|
72
72
|
|
|
73
|
+
type HttpHeaderType = string | number | (string | number)[];
|
|
73
74
|
/**
|
|
74
75
|
* Configuration values used by the HTTP service when
|
|
75
76
|
* issuing requests to a backend API.
|
|
76
77
|
*/
|
|
77
78
|
interface HttpConfig {
|
|
78
79
|
/** Map of default headers appended to each request. */
|
|
79
|
-
headers?: Record<string,
|
|
80
|
+
headers?: Record<string, HttpHeaderType>;
|
|
80
81
|
/** Base URL for all HTTP requests. */
|
|
81
82
|
url?: string;
|
|
82
83
|
}
|
|
@@ -1111,89 +1112,20 @@ declare class CoreService {
|
|
|
1111
1112
|
static ɵprov: i0.ɵɵInjectableDeclaration<CoreService>;
|
|
1112
1113
|
}
|
|
1113
1114
|
|
|
1114
|
-
declare class StoreService {
|
|
1115
|
-
constructor(config: Config);
|
|
1116
|
-
/**
|
|
1117
|
-
* Sets the prefix for storage keys.
|
|
1118
|
-
*
|
|
1119
|
-
* @param prefix - The prefix to set.
|
|
1120
|
-
*/
|
|
1121
|
-
setPrefix(prefix: string): void;
|
|
1122
|
-
/**
|
|
1123
|
-
* Sets a value in storage asynchronously.
|
|
1124
|
-
*
|
|
1125
|
-
* @param key - The storage key.
|
|
1126
|
-
* @param value - The value to store.
|
|
1127
|
-
* @returns A promise that resolves to a boolean indicating success.
|
|
1128
|
-
*/
|
|
1129
|
-
set(key: string, value: string, callback?: () => void, errCallback?: (err: unknown) => void): Promise<boolean>;
|
|
1130
|
-
/**
|
|
1131
|
-
* Gets a value from storage asynchronously.
|
|
1132
|
-
*
|
|
1133
|
-
* @param key - The storage key.
|
|
1134
|
-
* @returns A promise that resolves to the retrieved value or `null` if the key is missing.
|
|
1135
|
-
*/
|
|
1136
|
-
get(key: string, callback?: (value: string | null) => void, errCallback?: (err: unknown) => void): Promise<string | null>;
|
|
1137
|
-
/**
|
|
1138
|
-
* Sets a JSON value in storage asynchronously.
|
|
1139
|
-
*
|
|
1140
|
-
* @param key - The storage key.
|
|
1141
|
-
* @param value - The value to store.
|
|
1142
|
-
* @returns A promise that resolves to a boolean indicating success.
|
|
1143
|
-
*/
|
|
1144
|
-
setJson<T>(key: string, value: T, callback?: () => void, errCallback?: (err: unknown) => void): Promise<boolean>;
|
|
1145
|
-
/**
|
|
1146
|
-
* Gets a JSON value from storage asynchronously.
|
|
1147
|
-
*
|
|
1148
|
-
* @param key - The storage key.
|
|
1149
|
-
* @returns A promise that resolves to the retrieved value.
|
|
1150
|
-
*/
|
|
1151
|
-
getJson<T = any>(key: string, callback?: (value: string | null) => void, errCallback?: (err: unknown) => void): Promise<T | null>;
|
|
1152
|
-
/**
|
|
1153
|
-
* Removes a value from storage.
|
|
1154
|
-
*
|
|
1155
|
-
* @param key - The storage key.
|
|
1156
|
-
* @param callback - The callback to execute on success.
|
|
1157
|
-
* @param errCallback - The callback to execute on error.
|
|
1158
|
-
* @returns A promise that resolves to a boolean indicating success.
|
|
1159
|
-
*/
|
|
1160
|
-
remove(key: string, callback?: () => void, errCallback?: (err: unknown) => void): Promise<boolean>;
|
|
1161
|
-
/**
|
|
1162
|
-
* Clears all values from storage.
|
|
1163
|
-
*
|
|
1164
|
-
* @param callback - The callback to execute on success.
|
|
1165
|
-
* @param errCallback - The callback to execute on error.
|
|
1166
|
-
* @returns A promise that resolves to a boolean indicating success.
|
|
1167
|
-
*/
|
|
1168
|
-
clear(callback?: () => void, errCallback?: (err: unknown) => void): Promise<boolean>;
|
|
1169
|
-
private _prefix;
|
|
1170
|
-
private _config;
|
|
1171
|
-
/**
|
|
1172
|
-
* Applies the configured prefix to a storage key.
|
|
1173
|
-
*
|
|
1174
|
-
* @param key - The storage key.
|
|
1175
|
-
* @returns The prefixed storage key.
|
|
1176
|
-
*/
|
|
1177
|
-
private _applyPrefix;
|
|
1178
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<StoreService, [{ optional: true; }]>;
|
|
1179
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<StoreService>;
|
|
1180
|
-
}
|
|
1181
|
-
|
|
1182
1115
|
declare class HttpService {
|
|
1183
|
-
private
|
|
1184
|
-
private http;
|
|
1116
|
+
private _http;
|
|
1185
1117
|
errors: ((err: HttpErrorResponse, retry?: () => void) => {})[];
|
|
1186
1118
|
url: string;
|
|
1187
1119
|
locked: boolean;
|
|
1188
|
-
awaitLocked:
|
|
1120
|
+
awaitLocked: ReturnType<typeof setTimeout>[];
|
|
1189
1121
|
private _config;
|
|
1190
1122
|
private _headers;
|
|
1191
1123
|
private _http_headers;
|
|
1192
|
-
constructor(config: Config,
|
|
1124
|
+
constructor(config: Config, _http: HttpClient);
|
|
1193
1125
|
setUrl(url: string): void;
|
|
1194
1126
|
removeUrl(): void;
|
|
1195
1127
|
set(key: any, value: any): void;
|
|
1196
|
-
header(key: any):
|
|
1128
|
+
header(key: any): HttpHeaderType;
|
|
1197
1129
|
remove(key: any): void;
|
|
1198
1130
|
private _httpMethod;
|
|
1199
1131
|
/**
|
|
@@ -1297,10 +1229,78 @@ declare class HttpService {
|
|
|
1297
1229
|
* @returns A new object containing only the specified fields.
|
|
1298
1230
|
*/
|
|
1299
1231
|
private _newDoc;
|
|
1300
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<HttpService, [{ optional: true; }, null
|
|
1232
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<HttpService, [{ optional: true; }, null]>;
|
|
1301
1233
|
static ɵprov: i0.ɵɵInjectableDeclaration<HttpService>;
|
|
1302
1234
|
}
|
|
1303
1235
|
|
|
1236
|
+
declare class StoreService {
|
|
1237
|
+
constructor(config: Config);
|
|
1238
|
+
/**
|
|
1239
|
+
* Sets the prefix for storage keys.
|
|
1240
|
+
*
|
|
1241
|
+
* @param prefix - The prefix to set.
|
|
1242
|
+
*/
|
|
1243
|
+
setPrefix(prefix: string): void;
|
|
1244
|
+
/**
|
|
1245
|
+
* Sets a value in storage asynchronously.
|
|
1246
|
+
*
|
|
1247
|
+
* @param key - The storage key.
|
|
1248
|
+
* @param value - The value to store.
|
|
1249
|
+
* @returns A promise that resolves to a boolean indicating success.
|
|
1250
|
+
*/
|
|
1251
|
+
set(key: string, value: string, callback?: () => void, errCallback?: (err: unknown) => void): Promise<boolean>;
|
|
1252
|
+
/**
|
|
1253
|
+
* Gets a value from storage asynchronously.
|
|
1254
|
+
*
|
|
1255
|
+
* @param key - The storage key.
|
|
1256
|
+
* @returns A promise that resolves to the retrieved value or `null` if the key is missing.
|
|
1257
|
+
*/
|
|
1258
|
+
get(key: string, callback?: (value: string | null) => void, errCallback?: (err: unknown) => void): Promise<string | null>;
|
|
1259
|
+
/**
|
|
1260
|
+
* Sets a JSON value in storage asynchronously.
|
|
1261
|
+
*
|
|
1262
|
+
* @param key - The storage key.
|
|
1263
|
+
* @param value - The value to store.
|
|
1264
|
+
* @returns A promise that resolves to a boolean indicating success.
|
|
1265
|
+
*/
|
|
1266
|
+
setJson<T>(key: string, value: T, callback?: () => void, errCallback?: (err: unknown) => void): Promise<boolean>;
|
|
1267
|
+
/**
|
|
1268
|
+
* Gets a JSON value from storage asynchronously.
|
|
1269
|
+
*
|
|
1270
|
+
* @param key - The storage key.
|
|
1271
|
+
* @returns A promise that resolves to the retrieved value.
|
|
1272
|
+
*/
|
|
1273
|
+
getJson<T = any>(key: string, callback?: (value: string | null) => void, errCallback?: (err: unknown) => void): Promise<T | null>;
|
|
1274
|
+
/**
|
|
1275
|
+
* Removes a value from storage.
|
|
1276
|
+
*
|
|
1277
|
+
* @param key - The storage key.
|
|
1278
|
+
* @param callback - The callback to execute on success.
|
|
1279
|
+
* @param errCallback - The callback to execute on error.
|
|
1280
|
+
* @returns A promise that resolves to a boolean indicating success.
|
|
1281
|
+
*/
|
|
1282
|
+
remove(key: string, callback?: () => void, errCallback?: (err: unknown) => void): Promise<boolean>;
|
|
1283
|
+
/**
|
|
1284
|
+
* Clears all values from storage.
|
|
1285
|
+
*
|
|
1286
|
+
* @param callback - The callback to execute on success.
|
|
1287
|
+
* @param errCallback - The callback to execute on error.
|
|
1288
|
+
* @returns A promise that resolves to a boolean indicating success.
|
|
1289
|
+
*/
|
|
1290
|
+
clear(callback?: () => void, errCallback?: (err: unknown) => void): Promise<boolean>;
|
|
1291
|
+
private _prefix;
|
|
1292
|
+
private _config;
|
|
1293
|
+
/**
|
|
1294
|
+
* Applies the configured prefix to a storage key.
|
|
1295
|
+
*
|
|
1296
|
+
* @param key - The storage key.
|
|
1297
|
+
* @returns The prefixed storage key.
|
|
1298
|
+
*/
|
|
1299
|
+
private _applyPrefix;
|
|
1300
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<StoreService, [{ optional: true; }]>;
|
|
1301
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<StoreService>;
|
|
1302
|
+
}
|
|
1303
|
+
|
|
1304
1304
|
interface CrudConfig<Document> {
|
|
1305
1305
|
signalFields?: Record<string, (doc: Document) => unknown>;
|
|
1306
1306
|
name: string;
|