@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.
@@ -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
- private readonly deviceIdKey;
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":"AAgBA,eAAO,MAAM,2BAA2B,oBAAoB,CAAC;AAE7D;;GAEG;AACH,qBAAa,eAAe;IAC1B,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAS;IACrC,OAAO,CAAC,OAAO,CAAU;gBAGvB,WAAW,GAAE,MAAoC,EACjD,OAAO,GAAE,OAAsB;IAMjC;;;;OAIG;IACH,GAAG,IAAI,MAAM,GAAG,IAAI;IAIpB;;;;OAIG;IACH,GAAG,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;IAI3B;;;;OAIG;IACH,gBAAgB,IAAI,MAAM;IAI1B;;;;OAIG;IACH,WAAW,IAAI,MAAM;IAYrB;;OAEG;IACH,KAAK,IAAI,IAAI;CAGd"}
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,2 @@
1
+ export declare function isBrowser(): boolean;
2
+ //# sourceMappingURL=env.d.ts.map
@@ -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 './inMemoryStorage';
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
@@ -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"}