andoncloud-sdk 1.4.28 → 1.4.30
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/andoncloud-sdk.js +24 -24
- package/dist/andoncloud-sdk.js.map +1 -1
- package/dist/index.d.ts +18 -16
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -16,14 +16,6 @@ declare module "andoncloud-sdk" {
|
|
|
16
16
|
action?: () => void;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
type ServiceWorkerRegistrationConfig = {
|
|
20
|
-
onSuccess?: (registration: ServiceWorkerRegistration) => void;
|
|
21
|
-
onUpdate?: (
|
|
22
|
-
registration: ServiceWorkerRegistration,
|
|
23
|
-
version?: string
|
|
24
|
-
) => void;
|
|
25
|
-
};
|
|
26
|
-
|
|
27
19
|
interface AuthProps {
|
|
28
20
|
enabled?: boolean;
|
|
29
21
|
loginUrl?: string;
|
|
@@ -33,20 +25,12 @@ declare module "andoncloud-sdk" {
|
|
|
33
25
|
grantType?: "authorization_code" | "password";
|
|
34
26
|
}
|
|
35
27
|
|
|
36
|
-
interface ServiceWorkerProps {
|
|
37
|
-
registrationConfig?: ServiceWorkerRegistrationConfig;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
28
|
interface AppProps {
|
|
41
29
|
children: React.ReactNode;
|
|
42
|
-
publicUrl?: string;
|
|
43
30
|
baseUrl: string;
|
|
44
31
|
authProps: AuthProps;
|
|
45
32
|
sentryProps?: Sentry.BrowserOptions;
|
|
46
|
-
serviceWorkerProps?: ServiceWorkerProps;
|
|
47
33
|
muiTheme?: Record<string, unknown>;
|
|
48
|
-
mode?: "development" | "production" | "test";
|
|
49
|
-
version?: string;
|
|
50
34
|
}
|
|
51
35
|
export const App: React.FC<AppProps>;
|
|
52
36
|
|
|
@@ -124,6 +108,22 @@ declare module "andoncloud-sdk" {
|
|
|
124
108
|
};
|
|
125
109
|
}
|
|
126
110
|
|
|
111
|
+
type ServiceWorkerRegistrationConfig = {
|
|
112
|
+
onSuccess?: (registration: ServiceWorkerRegistration) => void;
|
|
113
|
+
onUpdate?: (
|
|
114
|
+
registration: ServiceWorkerRegistration,
|
|
115
|
+
version?: string
|
|
116
|
+
) => void;
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
interface ServiceWorkerConfig {
|
|
120
|
+
publicUrl: string;
|
|
121
|
+
mode: "development" | "production" | "test";
|
|
122
|
+
version?: string;
|
|
123
|
+
autoUpdate?: boolean;
|
|
124
|
+
registrationConfig?: ServiceWorkerRegistrationConfig;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
127
|
export const useLoginStatus: () => LoginStatus;
|
|
128
128
|
|
|
129
129
|
export const logout: () => void;
|
|
@@ -134,5 +134,7 @@ declare module "andoncloud-sdk" {
|
|
|
134
134
|
|
|
135
135
|
export const fetch: typeof global.fetch;
|
|
136
136
|
|
|
137
|
+
export const registerServiceWorker: (config: ServiceWorkerConfig) => void;
|
|
138
|
+
|
|
137
139
|
export const captureException: typeof Sentry.captureException;
|
|
138
140
|
}
|