@ahoo-wang/fetcher-cosec 1.5.5 → 1.5.8
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/deviceIdStorage.d.ts +3 -20
- package/dist/deviceIdStorage.d.ts.map +1 -1
- package/dist/env.d.ts +2 -0
- package/dist/env.d.ts.map +1 -0
- package/dist/index.d.ts +5 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.es.js +442 -130
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/dist/jwtToken.d.ts +86 -0
- package/dist/jwtToken.d.ts.map +1 -0
- package/dist/jwtTokenManager.d.ts +40 -0
- package/dist/jwtTokenManager.d.ts.map +1 -0
- package/dist/jwts.d.ts +6 -0
- package/dist/jwts.d.ts.map +1 -1
- package/dist/serializer.d.ts +96 -0
- package/dist/serializer.d.ts.map +1 -0
- package/dist/storage/browserListenableStorage.d.ts +51 -0
- package/dist/storage/browserListenableStorage.d.ts.map +1 -0
- package/dist/storage/inMemoryListenableStorage.d.ts +52 -0
- package/dist/storage/inMemoryListenableStorage.d.ts.map +1 -0
- package/dist/storage/index.d.ts +5 -0
- package/dist/storage/index.d.ts.map +1 -0
- package/dist/storage/keyStorage.d.ts +65 -0
- package/dist/storage/keyStorage.d.ts.map +1 -0
- package/dist/storage/listenableStorage.d.ts +33 -0
- package/dist/storage/listenableStorage.d.ts.map +1 -0
- package/dist/tokenStorage.d.ts +7 -20
- package/dist/tokenStorage.d.ts.map +1 -1
- package/package.json +2 -2
- package/dist/inMemoryStorage.d.ts +0 -14
- package/dist/inMemoryStorage.d.ts.map +0 -1
|
@@ -1,23 +1,10 @@
|
|
|
1
|
+
import { KeyStorage } from './storage';
|
|
1
2
|
export declare const DEFAULT_COSEC_DEVICE_ID_KEY = "cosec-device-id";
|
|
2
3
|
/**
|
|
3
4
|
* Storage class for managing device identifiers.
|
|
4
5
|
*/
|
|
5
|
-
export declare class DeviceIdStorage {
|
|
6
|
-
|
|
7
|
-
private storage;
|
|
8
|
-
constructor(deviceIdKey?: string, storage?: Storage);
|
|
9
|
-
/**
|
|
10
|
-
* Get the current device ID.
|
|
11
|
-
*
|
|
12
|
-
* @returns The current device ID or null if not set
|
|
13
|
-
*/
|
|
14
|
-
get(): string | null;
|
|
15
|
-
/**
|
|
16
|
-
* Set a device ID.
|
|
17
|
-
*
|
|
18
|
-
* @param deviceId - The device ID to set
|
|
19
|
-
*/
|
|
20
|
-
set(deviceId: string): void;
|
|
6
|
+
export declare class DeviceIdStorage extends KeyStorage<string> {
|
|
7
|
+
constructor(key?: string);
|
|
21
8
|
/**
|
|
22
9
|
* Generate a new device ID.
|
|
23
10
|
*
|
|
@@ -30,9 +17,5 @@ export declare class DeviceIdStorage {
|
|
|
30
17
|
* @returns The existing device ID if available, otherwise a newly generated one
|
|
31
18
|
*/
|
|
32
19
|
getOrCreate(): string;
|
|
33
|
-
/**
|
|
34
|
-
* Clear the stored device ID.
|
|
35
|
-
*/
|
|
36
|
-
clear(): void;
|
|
37
20
|
}
|
|
38
21
|
//# sourceMappingURL=deviceIdStorage.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deviceIdStorage.d.ts","sourceRoot":"","sources":["../src/deviceIdStorage.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"deviceIdStorage.d.ts","sourceRoot":"","sources":["../src/deviceIdStorage.ts"],"names":[],"mappings":"AAcA,OAAO,EAA2B,UAAU,EAAE,MAAM,WAAW,CAAC;AAGhE,eAAO,MAAM,2BAA2B,oBAAoB,CAAC;AAE7D;;GAEG;AACH,qBAAa,eAAgB,SAAQ,UAAU,CAAC,MAAM,CAAC;gBACzC,GAAG,GAAE,MAAoC;IAQrD;;;;OAIG;IACH,gBAAgB,IAAI,MAAM;IAI1B;;;;OAIG;IACH,WAAW,IAAI,MAAM;CAYtB"}
|
package/dist/env.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../src/env.ts"],"names":[],"mappings":"AAaA,wBAAgB,SAAS,IAAI,OAAO,CAEnC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,14 @@
|
|
|
1
|
+
export * from './storage';
|
|
1
2
|
export * from './cosecRequestInterceptor';
|
|
2
3
|
export * from './cosecResponseInterceptor';
|
|
3
4
|
export * from './deviceIdStorage';
|
|
4
5
|
export * from './idGenerator';
|
|
5
6
|
export * from './jwts';
|
|
6
|
-
export * from './
|
|
7
|
+
export * from './jwtToken';
|
|
8
|
+
export * from './jwtTokenManager';
|
|
9
|
+
export * from './serializer';
|
|
7
10
|
export * from './tokenRefresher';
|
|
8
11
|
export * from './tokenStorage';
|
|
9
12
|
export * from './types';
|
|
13
|
+
export * from './env';
|
|
10
14
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAaA,cAAc,2BAA2B,CAAC;AAC1C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,QAAQ,CAAC;AACvB,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAaA,cAAc,WAAW,CAAC;AAC1B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC;AACxB,cAAc,OAAO,CAAC"}
|