andoncloud-sdk 1.7.34 → 1.7.35

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.
Files changed (2) hide show
  1. package/dist/index.d.ts +346 -348
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -25,430 +25,428 @@ declare module '@mui/material/styles' {
25
25
  }
26
26
  }
27
27
 
28
- declare module 'andoncloud-sdk' {
29
- interface NavItem {
30
- label: string;
31
- url?: string;
32
- redirect?: boolean;
33
- action?: () => void;
34
- icon?: React.ReactNode;
35
- defaultOpened?: boolean;
36
- }
28
+ interface NavItem {
29
+ label: string;
30
+ url?: string;
31
+ redirect?: boolean;
32
+ action?: () => void;
33
+ icon?: React.ReactNode;
34
+ defaultOpened?: boolean;
35
+ }
37
36
 
38
- interface MenuItem {
39
- label: string;
40
- url?: string;
41
- action?: () => void;
42
- }
37
+ interface MenuItem {
38
+ label: string;
39
+ url?: string;
40
+ action?: () => void;
41
+ }
43
42
 
44
- interface AuthProps {
45
- enabled?: boolean;
46
- loginUrl?: string;
47
- redirectUri?: string;
48
- redirectPath?: string;
49
- clientId: string;
50
- grantType?: 'authorization_code' | 'password';
51
- }
43
+ interface AuthProps {
44
+ enabled?: boolean;
45
+ loginUrl?: string;
46
+ redirectUri?: string;
47
+ redirectPath?: string;
48
+ clientId: string;
49
+ grantType?: 'authorization_code' | 'password';
50
+ }
52
51
 
53
- interface I18nProps {
54
- locales: InitOptions['resources'];
55
- }
52
+ interface I18nProps {
53
+ locales: InitOptions['resources'];
54
+ }
56
55
 
57
- interface MetaProps {
58
- appVersion?: string;
59
- apiVersion?: string;
60
- releaseVersion?: string;
61
- releasePageLink?: string;
62
- }
56
+ interface MetaProps {
57
+ appVersion?: string;
58
+ apiVersion?: string;
59
+ releaseVersion?: string;
60
+ releasePageLink?: string;
61
+ }
63
62
 
64
- interface Display {
65
- mode: 'standalone' | 'iframe';
66
- isEmbeddedMode: boolean;
67
- iframeMounted: boolean;
68
- setIframeMounted: (mounted: boolean) => void;
69
- iframeNavigationItems: SidebarMenuItem[];
70
- setIframeNavigationItems: (items: SidebarMenuItem[]) => void;
71
- }
72
- export const useDisplay: () => Display;
63
+ interface Display {
64
+ mode: 'standalone' | 'iframe';
65
+ isEmbeddedMode: boolean;
66
+ iframeMounted: boolean;
67
+ setIframeMounted: (mounted: boolean) => void;
68
+ iframeNavigationItems: SidebarMenuItem[];
69
+ setIframeNavigationItems: (items: SidebarMenuItem[]) => void;
70
+ }
71
+ export const useDisplay: () => Display;
73
72
 
74
- export const getDisplayMode: () => Display['mode'];
73
+ export const getDisplayMode: () => Display['mode'];
75
74
 
76
- export const updateParentHeaderLeadingText: (text: string) => void;
77
- export const resetParentHeaderLeadingText: () => void;
75
+ export const updateParentHeaderLeadingText: (text: string) => void;
76
+ export const resetParentHeaderLeadingText: () => void;
78
77
 
79
- export const updateParentHeaderTitle: (title: string) => void;
80
- export const resetParentHeaderTitle: () => void;
78
+ export const updateParentHeaderTitle: (title: string) => void;
79
+ export const resetParentHeaderTitle: () => void;
81
80
 
82
- type UpdateParentHeaderStylesArgs = {
83
- target?: string;
84
- styles: SxProps<Theme>;
85
- };
86
- export const updateParentHeaderStyles: ({ target, styles }: UpdateParentHeaderStylesArgs) => void;
87
- export const resetParentHeaderStyles: (target?: string) => void;
81
+ type UpdateParentHeaderStylesArgs = {
82
+ target?: string;
83
+ styles: SxProps<Theme>;
84
+ };
85
+ export const updateParentHeaderStyles: ({ target, styles }: UpdateParentHeaderStylesArgs) => void;
86
+ export const resetParentHeaderStyles: (target?: string) => void;
88
87
 
89
- interface ContentDescriptor {
90
- component: string;
91
- props?: Record<string, any>;
92
- }
93
- export const updateParentHeaderContent: (descriptor: ContentDescriptor) => void;
94
- export const resetParentHeaderContent: () => void;
95
-
96
- interface AppProps {
97
- children: React.ReactNode;
98
- baseUrl: string;
99
- authProps: AuthProps;
100
- gtmProps?: TagManagerArgs;
101
- i18nProps?: I18nProps;
102
- sentryProps?: Sentry.BrowserOptions;
103
- metaProps?: MetaProps;
104
- muiTheme?: Record<string, unknown>;
105
- }
106
- export const App: React.FC<AppProps>;
88
+ interface ContentDescriptor {
89
+ component: string;
90
+ props?: Record<string, any>;
91
+ }
92
+ export const updateParentHeaderContent: (descriptor: ContentDescriptor) => void;
93
+ export const resetParentHeaderContent: () => void;
94
+
95
+ interface AppProps {
96
+ children: React.ReactNode;
97
+ baseUrl: string;
98
+ authProps: AuthProps;
99
+ gtmProps?: TagManagerArgs;
100
+ i18nProps?: I18nProps;
101
+ sentryProps?: Sentry.BrowserOptions;
102
+ metaProps?: MetaProps;
103
+ muiTheme?: Record<string, unknown>;
104
+ }
105
+ export const App: React.FC<AppProps>;
107
106
 
108
- interface NavProps {
109
- items?: NavItem[];
110
- }
107
+ interface NavProps {
108
+ items?: NavItem[];
109
+ }
111
110
 
112
- interface UserProps {
113
- show?: boolean;
114
- showCompanyLogo?: boolean;
115
- }
111
+ interface UserProps {
112
+ show?: boolean;
113
+ showCompanyLogo?: boolean;
114
+ }
116
115
 
117
- interface MenuProps {
118
- items?: MenuItem[];
119
- buttonColor?: string;
120
- dropdownStyles?: SxProps<Theme>;
121
- styles?: SxProps<Theme>;
122
- }
116
+ interface MenuProps {
117
+ items?: MenuItem[];
118
+ buttonColor?: string;
119
+ dropdownStyles?: SxProps<Theme>;
120
+ styles?: SxProps<Theme>;
121
+ }
123
122
 
124
- interface HeaderProps {
125
- position?: 'absolute' | 'fixed' | 'relative' | 'static' | 'sticky';
126
- showAcLogo?: boolean;
127
- leadingText?: string;
128
- title?: string;
129
- titleStyles?: SxProps<Theme>;
130
- content?: React.ReactNode;
131
- contentComponents?: Record<string, React.ComponentType<any>>;
132
- contentStyles?: SxProps<Theme>;
133
- navProps?: NavProps;
134
- userProps?: UserProps;
135
- menuProps?: MenuProps;
136
- styles?: SxProps<Theme>;
137
- }
123
+ interface HeaderProps {
124
+ position?: 'absolute' | 'fixed' | 'relative' | 'static' | 'sticky';
125
+ showAcLogo?: boolean;
126
+ leadingText?: string;
127
+ title?: string;
128
+ titleStyles?: SxProps<Theme>;
129
+ content?: React.ReactNode;
130
+ contentComponents?: Record<string, React.ComponentType<any>>;
131
+ contentStyles?: SxProps<Theme>;
132
+ navProps?: NavProps;
133
+ userProps?: UserProps;
134
+ menuProps?: MenuProps;
135
+ styles?: SxProps<Theme>;
136
+ }
138
137
 
139
- interface SidebarMenuItem extends NavItem {
140
- items?: NavItem[];
141
- }
138
+ interface SidebarMenuItem extends NavItem {
139
+ items?: NavItem[];
140
+ }
142
141
 
143
- interface SidebarMenuProps {
144
- enabled: boolean;
145
- items: SidebarMenuItem[];
146
- open?: boolean;
147
- width?: number;
148
- styles?: SxProps<Theme>;
149
- listStyles?: SxProps<Theme>;
150
- itemStyles?: SxProps<Theme>;
151
- subitemStyles?: SxProps<Theme>;
152
- }
142
+ interface SidebarMenuProps {
143
+ enabled: boolean;
144
+ items: SidebarMenuItem[];
145
+ open?: boolean;
146
+ width?: number;
147
+ styles?: SxProps<Theme>;
148
+ listStyles?: SxProps<Theme>;
149
+ itemStyles?: SxProps<Theme>;
150
+ subitemStyles?: SxProps<Theme>;
151
+ }
153
152
 
154
- export interface SidePanelProps {
155
- enabled: boolean;
156
- open?: boolean;
157
- onClose?: () => void;
158
- title?: string;
159
- mainContent: React.ReactNode;
160
- asideContent?: React.ReactNode;
161
- width?: string;
162
- mainContentWidth?: string;
163
- asideContentWidth?: string;
164
- styles?: SxProps<Theme>;
165
- headerStyles?: SxProps<Theme>;
166
- contentWrapperStyles?: SxProps<Theme>;
167
- mainContentStyles?: SxProps<Theme>;
168
- asideContentStyles?: SxProps<Theme>;
169
- }
153
+ export interface SidePanelProps {
154
+ enabled: boolean;
155
+ open?: boolean;
156
+ onClose?: () => void;
157
+ title?: string;
158
+ mainContent: React.ReactNode;
159
+ asideContent?: React.ReactNode;
160
+ width?: string;
161
+ mainContentWidth?: string;
162
+ asideContentWidth?: string;
163
+ styles?: SxProps<Theme>;
164
+ headerStyles?: SxProps<Theme>;
165
+ contentWrapperStyles?: SxProps<Theme>;
166
+ mainContentStyles?: SxProps<Theme>;
167
+ asideContentStyles?: SxProps<Theme>;
168
+ }
170
169
 
171
- interface ContainerProps {
172
- children: React.ReactNode;
173
- headerProps: HeaderProps;
174
- sidebarMenuProps?: SidebarMenuProps;
175
- sidePanelProps?: SidePanelProps;
176
- styles?: SxProps<Theme>;
177
- }
178
- export const Container: React.FC<ContainerProps>;
170
+ interface ContainerProps {
171
+ children: React.ReactNode;
172
+ headerProps: HeaderProps;
173
+ sidebarMenuProps?: SidebarMenuProps;
174
+ sidePanelProps?: SidePanelProps;
175
+ styles?: SxProps<Theme>;
176
+ }
177
+ export const Container: React.FC<ContainerProps>;
179
178
 
180
- type FeatureStatus =
181
- | 'accessible'
182
- | 'no_permission'
183
- | 'not_purchased'
184
- | 'trial_expired_recent'
185
- | 'trial_expired_old'
186
- | 'no_access';
179
+ type FeatureStatus =
180
+ | 'accessible'
181
+ | 'no_permission'
182
+ | 'not_purchased'
183
+ | 'trial_expired_recent'
184
+ | 'trial_expired_old'
185
+ | 'no_access';
187
186
 
188
- type EntitlementType = 'trial' | 'purchased' | null;
187
+ type EntitlementType = 'trial' | 'purchased' | null;
189
188
 
190
- type AccessState = 'no_permission' | 'accessible' | 'expired' | 'not_purchased';
189
+ type AccessState = 'no_permission' | 'accessible' | 'expired' | 'not_purchased';
191
190
 
192
- type DenyReason = 'MISSING_ROLE_PERMISSION' | 'EXPIRED_PLAN' | string;
191
+ type DenyReason = 'MISSING_ROLE_PERMISSION' | 'EXPIRED_PLAN' | string;
193
192
 
194
- type PermissionValue = 'ALLOW' | `DENY:${DenyReason}`;
193
+ type PermissionValue = 'ALLOW' | `DENY:${DenyReason}`;
195
194
 
196
- interface PermissionsMap {
197
- [permissionKey: string]: PermissionValue;
198
- }
195
+ interface PermissionsMap {
196
+ [permissionKey: string]: PermissionValue;
197
+ }
199
198
 
200
- interface FeatureInfo {
201
- status: FeatureStatus;
202
- entitlementType: EntitlementType;
203
- expiresAt: string | null;
204
- daysSinceExpiry: number | null;
205
- permissions: string[];
206
- }
199
+ interface FeatureInfo {
200
+ status: FeatureStatus;
201
+ entitlementType: EntitlementType;
202
+ expiresAt: string | null;
203
+ daysSinceExpiry: number | null;
204
+ permissions: string[];
205
+ }
207
206
 
208
- interface FeaturesMap {
209
- [featureKey: string]: FeatureInfo;
210
- }
207
+ interface FeaturesMap {
208
+ [featureKey: string]: FeatureInfo;
209
+ }
211
210
 
212
- interface RequestInfo {
213
- lastRequestedAt: string;
214
- daysRemaining: number;
215
- }
211
+ interface RequestInfo {
212
+ lastRequestedAt: string;
213
+ daysRemaining: number;
214
+ }
216
215
 
217
- interface FeaturesRequestsMap {
218
- [workplaceIdOrCompany: string]: {
219
- [featureKey: string]: {
220
- [requestType: string]: RequestInfo;
221
- };
216
+ interface FeaturesRequestsMap {
217
+ [workplaceIdOrCompany: string]: {
218
+ [featureKey: string]: {
219
+ [requestType: string]: RequestInfo;
222
220
  };
223
- }
221
+ };
222
+ }
224
223
 
225
- interface CooldownStatus {
226
- isInCooldown: boolean;
227
- daysRemaining: number;
228
- }
224
+ interface CooldownStatus {
225
+ isInCooldown: boolean;
226
+ daysRemaining: number;
227
+ }
229
228
 
230
- interface CooldownInfo {
231
- [requestType: string]: CooldownStatus;
232
- }
229
+ interface CooldownInfo {
230
+ [requestType: string]: CooldownStatus;
231
+ }
233
232
 
234
- interface UserData {
235
- id: number;
236
- companyId: number;
237
- roleId: number;
238
- username: string;
239
- email: string;
240
- name: string;
241
- permissionsMap: PermissionsMap | null;
242
- featuresMap: FeaturesMap | null;
243
- featuresRequestsMap: FeaturesRequestsMap | null;
244
- }
233
+ interface UserData {
234
+ id: number;
235
+ companyId: number;
236
+ roleId: number;
237
+ username: string;
238
+ email: string;
239
+ name: string;
240
+ permissionsMap: PermissionsMap | null;
241
+ featuresMap: FeaturesMap | null;
242
+ featuresRequestsMap: FeaturesRequestsMap | null;
243
+ }
245
244
 
246
- interface PermissionCheckResult {
247
- isAllowed: boolean;
248
- denyReason: DenyReason | null;
249
- }
245
+ interface PermissionCheckResult {
246
+ isAllowed: boolean;
247
+ denyReason: DenyReason | null;
248
+ }
250
249
 
251
- interface UsePermissionsResult {
252
- checkPermission: (permissionKey: string) => PermissionCheckResult;
253
- checkPermissions: (permissionKeys: string[]) => {
254
- allAllowed: boolean;
255
- results: Record<string, PermissionCheckResult>;
256
- deniedKeys: string[];
257
- };
258
- permissionsMap: PermissionsMap | null;
259
- }
250
+ interface UsePermissionsResult {
251
+ checkPermission: (permissionKey: string) => PermissionCheckResult;
252
+ checkPermissions: (permissionKeys: string[]) => {
253
+ allAllowed: boolean;
254
+ results: Record<string, PermissionCheckResult>;
255
+ deniedKeys: string[];
256
+ };
257
+ permissionsMap: PermissionsMap | null;
258
+ }
260
259
 
261
- export const usePermissions: () => UsePermissionsResult;
260
+ export const usePermissions: () => UsePermissionsResult;
262
261
 
263
- interface UseFeaturesResult {
264
- getFeature: (featureKey: string) => FeatureInfo | null;
265
- getFeatures: (featureKeys: string[]) => Record<string, FeatureInfo | null>;
266
- featuresMap: FeaturesMap | null;
267
- }
262
+ interface UseFeaturesResult {
263
+ getFeature: (featureKey: string) => FeatureInfo | null;
264
+ getFeatures: (featureKeys: string[]) => Record<string, FeatureInfo | null>;
265
+ featuresMap: FeaturesMap | null;
266
+ }
268
267
 
269
- export const useFeatures: () => UseFeaturesResult;
268
+ export const useFeatures: () => UseFeaturesResult;
270
269
 
271
- interface UseAccessOptions {
272
- extraPermissions?: string[];
273
- workplaceId?: string;
274
- }
270
+ interface UseAccessOptions {
271
+ extraPermissions?: string[];
272
+ workplaceId?: string;
273
+ }
275
274
 
276
- export type AccessAction = 'start_trial' | 'request_access' | 'renew' | 'buy' | 'wishlist';
275
+ export type AccessAction = 'start_trial' | 'request_access' | 'renew' | 'buy' | 'wishlist';
277
276
 
278
- export type AccessRequestType = 'feature_access' | 'trial_expired' | 'purchase' | 'wishlist';
277
+ export type AccessRequestType = 'feature_access' | 'trial_expired' | 'purchase' | 'wishlist';
279
278
 
280
- export type ButtonVariant = 'primary' | 'secondary' | 'link';
279
+ export type ButtonVariant = 'primary' | 'secondary' | 'link';
281
280
 
282
- export interface AccessButton {
283
- action: AccessAction;
284
- requestType: AccessRequestType | null;
285
- variant: ButtonVariant;
286
- }
281
+ export interface AccessButton {
282
+ action: AccessAction;
283
+ requestType: AccessRequestType | null;
284
+ variant: ButtonVariant;
285
+ }
287
286
 
288
- interface FeatureAccessDetail {
289
- featureKey: string;
290
- hasAccess: boolean;
291
- accessState: AccessState;
292
- daysSinceExpiry: number | null;
293
- buttons: AccessButton[];
294
- }
287
+ interface FeatureAccessDetail {
288
+ featureKey: string;
289
+ hasAccess: boolean;
290
+ accessState: AccessState;
291
+ daysSinceExpiry: number | null;
292
+ buttons: AccessButton[];
293
+ }
295
294
 
296
- interface UseAccessResult {
297
- hasAccess: boolean;
298
- accessState: AccessState;
299
- features: FeatureAccessDetail[];
300
- buttons: AccessButton[];
301
- cooldownInfo: CooldownInfo;
302
- missingPermissions: string[];
303
- }
295
+ interface UseAccessResult {
296
+ hasAccess: boolean;
297
+ accessState: AccessState;
298
+ features: FeatureAccessDetail[];
299
+ buttons: AccessButton[];
300
+ cooldownInfo: CooldownInfo;
301
+ missingPermissions: string[];
302
+ }
304
303
 
305
- export const useAccess: (features?: string[], options?: UseAccessOptions) => UseAccessResult;
304
+ export const useAccess: (features?: string[], options?: UseAccessOptions) => UseAccessResult;
306
305
 
307
- type ContentEventHandler = (event: string, payload?: unknown) => void;
308
- export const useHeaderContentEvent: (handler: ContentEventHandler) => void;
306
+ type ContentEventHandler = (event: string, payload?: unknown) => void;
307
+ export const useHeaderContentEvent: (handler: ContentEventHandler) => void;
309
308
 
310
- export interface FeatureRequestPayload {
311
- featureKey: string;
312
- requestType: AccessRequestType;
313
- workplaceId?: string;
314
- }
309
+ export interface FeatureRequestPayload {
310
+ featureKey: string;
311
+ requestType: AccessRequestType;
312
+ workplaceId?: string;
313
+ }
315
314
 
316
- interface AccessGuardProps {
317
- features?: string[];
318
- extraPermissions?: string[];
319
- workplaceId?: string;
320
- backgroundImage?: string;
321
- onTrialRequest: (featureKey: string) => Promise<boolean>;
322
- onFeatureRequest: (payload: FeatureRequestPayload) => Promise<boolean>;
323
- children: React.ReactNode;
324
- }
315
+ interface AccessGuardProps {
316
+ features?: string[];
317
+ extraPermissions?: string[];
318
+ workplaceId?: string;
319
+ backgroundImage?: string;
320
+ onTrialRequest: (featureKey: string) => Promise<boolean>;
321
+ onFeatureRequest: (payload: FeatureRequestPayload) => Promise<boolean>;
322
+ children: React.ReactNode;
323
+ }
324
+
325
+ export const AccessGuard: React.FC<AccessGuardProps>;
326
+
327
+ /**
328
+ * @note AccessBlocker is exported for demo/preview purposes only.
329
+ * For production use, prefer AccessGuard or withAccessGuard.
330
+ */
331
+ interface AccessBlockerProps {
332
+ accessState: AccessState;
333
+ buttons: AccessButton[];
334
+ featureKey: string;
335
+ daysSinceExpiry?: number;
336
+ workplaceId?: string;
337
+ backgroundImage?: string;
338
+ cooldownInfo?: CooldownInfo;
339
+ onTrialRequest: (featureKey: string) => Promise<boolean>;
340
+ onFeatureRequest: (payload: FeatureRequestPayload) => Promise<boolean>;
341
+ }
342
+
343
+ export const AccessBlocker: React.FC<AccessBlockerProps>;
325
344
 
326
- export const AccessGuard: React.FC<AccessGuardProps>;
327
-
328
- /**
329
- * @note AccessBlocker is exported for demo/preview purposes only.
330
- * For production use, prefer AccessGuard or withAccessGuard.
331
- */
332
- interface AccessBlockerProps {
333
- accessState: AccessState;
334
- buttons: AccessButton[];
335
- featureKey: string;
336
- daysSinceExpiry?: number;
337
- workplaceId?: string;
338
- backgroundImage?: string;
339
- cooldownInfo?: CooldownInfo;
345
+ interface AccessGuardInjectedProps {
346
+ accessState: AccessState;
347
+ hasAccess: boolean;
348
+ missingPermissions: string[];
349
+ }
350
+
351
+ export function withAccessGuard<P extends object>(
352
+ features?: string[],
353
+ options?: UseAccessOptions,
354
+ ): (Component: React.ComponentType<P & AccessGuardInjectedProps>) => React.FC<
355
+ P & {
340
356
  onTrialRequest: (featureKey: string) => Promise<boolean>;
341
357
  onFeatureRequest: (payload: FeatureRequestPayload) => Promise<boolean>;
342
358
  }
359
+ >;
360
+
361
+ export interface Session {
362
+ user: UserData;
363
+ accessToken: string;
364
+ refreshToken: string;
365
+ }
343
366
 
344
- export const AccessBlocker: React.FC<AccessBlockerProps>;
367
+ interface LoginProps {
368
+ title?: string;
369
+ subtitle?: string;
370
+ redirectPath?: string;
371
+ storeSession?: boolean;
372
+ onSuccess?: (session: Session) => void;
373
+ onFailure?: () => void;
374
+ onCancel?: () => void;
375
+ }
345
376
 
346
- interface AccessGuardInjectedProps {
347
- accessState: AccessState;
348
- hasAccess: boolean;
349
- missingPermissions: string[];
350
- }
377
+ export const useLogin: (scope: string, loginProps?: LoginProps) => () => void;
351
378
 
352
- export function withAccessGuard<P extends object>(
353
- features?: string[],
354
- options?: UseAccessOptions,
355
- ): (Component: React.ComponentType<P & AccessGuardInjectedProps>) => React.FC<
356
- P & {
357
- onTrialRequest: (featureKey: string) => Promise<boolean>;
358
- onFeatureRequest: (payload: FeatureRequestPayload) => Promise<boolean>;
359
- }
360
- >;
361
-
362
- export interface Session {
379
+ interface LoginStatus {
380
+ status: 'connected' | 'not_authorized' | 'unknown';
381
+ authResponse?: {
363
382
  user: UserData;
364
383
  accessToken: string;
365
384
  refreshToken: string;
366
- }
367
-
368
- interface LoginProps {
369
- title?: string;
370
- subtitle?: string;
371
- redirectPath?: string;
372
- storeSession?: boolean;
373
- onSuccess?: (session: Session) => void;
374
- onFailure?: () => void;
375
- onCancel?: () => void;
376
- }
377
-
378
- export const useLogin: (scope: string, loginProps?: LoginProps) => () => void;
379
-
380
- interface LoginStatus {
381
- status: 'connected' | 'not_authorized' | 'unknown';
382
- authResponse?: {
383
- user: UserData;
384
- accessToken: string;
385
- refreshToken: string;
386
- tokenType: string;
387
- createdAt: number;
388
- expiresIn: number;
389
- };
390
- }
385
+ tokenType: string;
386
+ createdAt: number;
387
+ expiresIn: number;
388
+ };
389
+ }
391
390
 
392
- interface SessionStore {
393
- loginStatus: LoginStatus;
394
- }
391
+ interface SessionStore {
392
+ loginStatus: LoginStatus;
393
+ }
395
394
 
396
- interface RootStore {
397
- sessionStore: SessionStore;
398
- }
395
+ interface RootStore {
396
+ sessionStore: SessionStore;
397
+ }
399
398
 
400
- export const useStore: () => RootStore;
399
+ export const useStore: () => RootStore;
401
400
 
402
- type ServiceWorkerRegistrationConfig = {
403
- onSuccess?: (registration: ServiceWorkerRegistration) => void;
404
- onUpdate?: (registration: ServiceWorkerRegistration, version?: string) => void;
405
- };
401
+ type ServiceWorkerRegistrationConfig = {
402
+ onSuccess?: (registration: ServiceWorkerRegistration) => void;
403
+ onUpdate?: (registration: ServiceWorkerRegistration, version?: string) => void;
404
+ };
406
405
 
407
- interface ServiceWorkerConfig {
408
- publicUrl: string;
409
- mode: 'development' | 'production' | 'test';
410
- version?: string;
411
- autoUpdate?: boolean;
412
- registrationConfig?: ServiceWorkerRegistrationConfig;
413
- }
406
+ interface ServiceWorkerConfig {
407
+ publicUrl: string;
408
+ mode: 'development' | 'production' | 'test';
409
+ version?: string;
410
+ autoUpdate?: boolean;
411
+ registrationConfig?: ServiceWorkerRegistrationConfig;
412
+ }
414
413
 
415
- export const useLoginStatus: () => LoginStatus;
414
+ export const useLoginStatus: () => LoginStatus;
416
415
 
417
- export const logout: () => void;
416
+ export const logout: () => void;
418
417
 
419
- export const refreshUserData: () => Promise<UserData | null>;
418
+ export const refreshUserData: () => Promise<UserData | null>;
420
419
 
421
- export const setLocale: (lang: string) => void;
420
+ export const setLocale: (lang: string) => void;
422
421
 
423
- export const getLocale: () => string;
422
+ export const getLocale: () => string;
424
423
 
425
- export const notify: typeof toast;
424
+ export const notify: typeof toast;
426
425
 
427
- export type AuthEventType = 'TOKEN_REFRESHED' | 'LOGOUT';
426
+ export type AuthEventType = 'TOKEN_REFRESHED' | 'LOGOUT';
428
427
 
429
- export interface AuthEvent {
430
- type: AuthEventType;
431
- }
428
+ export interface AuthEvent {
429
+ type: AuthEventType;
430
+ }
432
431
 
433
- export const fetch: typeof global.fetch;
432
+ export const fetch: typeof global.fetch;
434
433
 
435
- export const registerServiceWorker: (config: ServiceWorkerConfig) => void;
434
+ export const registerServiceWorker: (config: ServiceWorkerConfig) => void;
436
435
 
437
- export const registerTranslations: (locales: InitOptions['resources']) => void;
436
+ export const registerTranslations: (locales: InitOptions['resources']) => void;
438
437
 
439
- export const captureException: typeof Sentry.captureException;
438
+ export const captureException: typeof Sentry.captureException;
440
439
 
441
- // NOTE: Checkbox/Radio/RadioGroup types loosened to `any` because their
442
- // source declarations live in src/core/ui/* which is not bundled into
443
- // published dist (only dist/index.js + dist/index.d.ts ship). Restoring
444
- // proper types requires either bundling .d.ts (via tsdown --dts or
445
- // rollup-plugin-dts) or migrating SDK to TypeScript (tech-debt #4).
446
- // Downstream consumers will see these as React.FC<any> until then.
447
- export const Checkbox: React.FC<any>;
440
+ // NOTE: Checkbox/Radio/RadioGroup types loosened to `any` because their
441
+ // source declarations live in src/core/ui/* which is not bundled into
442
+ // published dist (only dist/index.js + dist/index.d.ts ship). Restoring
443
+ // proper types requires either bundling .d.ts (via tsdown --dts or
444
+ // rollup-plugin-dts) or migrating SDK to TypeScript (tech-debt #4).
445
+ // Downstream consumers will see these as React.FC<any> until then.
446
+ export const Checkbox: React.FC<any>;
448
447
 
449
- export const Radio: React.FC<any>;
448
+ export const Radio: React.FC<any>;
450
449
 
451
- export const RadioGroup: React.FC<any>;
450
+ export const RadioGroup: React.FC<any>;
452
451
 
453
- export const sidePanelDefaultProps: SidePanelProps;
454
- }
452
+ export const sidePanelDefaultProps: SidePanelProps;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "andoncloud-sdk",
3
- "version": "1.7.34",
3
+ "version": "1.7.35",
4
4
  "license": "MIT",
5
5
  "private": false,
6
6
  "type": "module",