@telicent-oss/ds 0.26.0 → 0.27.1

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,5 +1,5 @@
1
1
  /// <reference lib="webworker" />
2
- console.info("sw.js version: 0.26.0");
2
+ console.info("sw.js version: 0.27.1");
3
3
  self.addEventListener("install", () => self.skipWaiting());
4
4
  self.addEventListener("activate", (event) =>
5
5
  event.waitUntil(self.clients.claim())
@@ -0,0 +1,6 @@
1
+ interface AuthRedirectModalProps {
2
+ signOutUrl: string;
3
+ debounceMs?: number;
4
+ }
5
+ export declare const AuthModal: React.FC<AuthRedirectModalProps>;
6
+ export {};
@@ -0,0 +1,4 @@
1
+ type AuthEvent = "unauthorized" | "authorized";
2
+ export declare function onAuthEvent(callback: (event: AuthEvent) => void): () => void;
3
+ export declare function broadcastAuthEvent(event: AuthEvent): void;
4
+ export {};
@@ -0,0 +1,3 @@
1
+ import { ApiFactory } from './types';
2
+
3
+ export declare const createApi: (baseURL?: string) => ApiFactory;
@@ -0,0 +1,19 @@
1
+ import { AxiosInstance } from 'axios';
2
+ import { QueryClient } from '@tanstack/react-query';
3
+
4
+ export interface SessionHandlingConfig {
5
+ queryClient?: QueryClient;
6
+ broadcastChannel?: BroadcastChannel;
7
+ keysToInvalidate?: string[];
8
+ }
9
+ export interface AuthConfig {
10
+ getToken: () => string | null;
11
+ onAuthError?: () => void;
12
+ }
13
+ export interface ApiFactory {
14
+ instance: AxiosInstance;
15
+ withSessionHandling: (config: SessionHandlingConfig) => ApiFactory;
16
+ build: () => {
17
+ instance: AxiosInstance;
18
+ };
19
+ }
@@ -0,0 +1,6 @@
1
+ import { AxiosInstance } from 'axios';
2
+ import { SessionHandlingConfig } from './types';
3
+
4
+ export declare function withSessionHandling(instance: AxiosInstance, { queryClient, keysToInvalidate, broadcastChannel, }: SessionHandlingConfig): {
5
+ instance: AxiosInstance;
6
+ };
@@ -13,6 +13,8 @@ export * from './v1/components/surfaces';
13
13
  export * from './v1/theme';
14
14
  export * from './v1/components/utils/index';
15
15
  export * from './component-library/Map';
16
+ export * from './candidate-packages/authorize-flow/AuthModal';
17
+ export * from './candidate-packages/authorize-flow';
16
18
  export { getCodec, type Codec, base64Codec, uriComponentCodec, ENCODE_SEARCH_PARAMS_MODES_Schema, type ENCODE_SEARCH_PARAMS_MODES_Type, toStringEncoded, type URLSearchParamsInit, GRAPH_APP, type LoggerLevelString, type LoggerLevel, loggerLevelOrder, Logger } from './candidate-packages/utils-lib/src/index';
17
19
  export { setupWipe, WipeConfigSchema, type WipeConfig, } from './candidate-packages/logout-syncer/setupWipe';
18
20
  export { requestWipe } from './candidate-packages/logout-syncer/requestWipe';
package/package.json CHANGED
@@ -7,7 +7,7 @@
7
7
  "url": "https://github.com/telicent-oss/telicent-ds.git"
8
8
  },
9
9
  "type": "module",
10
- "version": "0.26.0",
10
+ "version": "0.27.1",
11
11
  "private": false,
12
12
  "dependencies": {
13
13
  "@emotion/react": "^11.10.6",
@@ -76,7 +76,8 @@
76
76
  },
77
77
  "peerDependencies": {
78
78
  "react": "*",
79
- "react-dom": "*"
79
+ "react-dom": "*",
80
+ "axios": "*"
80
81
  },
81
82
  "browserslist": {
82
83
  "production": [
@@ -91,6 +92,7 @@
91
92
  ]
92
93
  },
93
94
  "devDependencies": {
95
+ "axios": "^1.7.0",
94
96
  "@babel/core": "^7.20.12",
95
97
  "@chromatic-com/storybook": "^1.7.0",
96
98
  "@commitlint/cli": "17.1.2",