@mission_sciences/provider-sdk 0.2.0-dev.bc67afe → 0.2.0-dev.dfda459

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 (39) hide show
  1. package/dist/adapters/react/index.d.ts +3 -0
  2. package/dist/adapters/react/index.d.ts.map +1 -0
  3. package/dist/adapters/react/index.js +75 -0
  4. package/dist/adapters/react/index.js.map +1 -0
  5. package/dist/adapters/react/useMarketplaceSession.d.ts +30 -0
  6. package/dist/adapters/react/useMarketplaceSession.d.ts.map +1 -0
  7. package/dist/adapters/vue/index.d.ts +3 -0
  8. package/dist/adapters/vue/index.d.ts.map +1 -0
  9. package/dist/adapters/vue/index.js +56 -0
  10. package/dist/adapters/vue/index.js.map +1 -0
  11. package/dist/adapters/vue/useMarketplaceSession.d.ts +74 -0
  12. package/dist/adapters/vue/useMarketplaceSession.d.ts.map +1 -0
  13. package/dist/core/HeartbeatManager.d.ts +43 -0
  14. package/dist/core/HeartbeatManager.d.ts.map +1 -0
  15. package/dist/core/JWKSValidator.d.ts +26 -0
  16. package/dist/core/JWKSValidator.d.ts.map +1 -0
  17. package/dist/core/JWTParser.d.ts +46 -0
  18. package/dist/core/JWTParser.d.ts.map +1 -0
  19. package/dist/core/MarketplaceSDK.d.ts +105 -0
  20. package/dist/core/MarketplaceSDK.d.ts.map +1 -0
  21. package/dist/core/TabSyncManager.d.ts +49 -0
  22. package/dist/core/TabSyncManager.d.ts.map +1 -0
  23. package/dist/core/TimerManager.d.ts +55 -0
  24. package/dist/core/TimerManager.d.ts.map +1 -0
  25. package/dist/index.d.ts +21 -771
  26. package/dist/index.d.ts.map +1 -0
  27. package/dist/styles/theme.d.ts +89 -0
  28. package/dist/styles/theme.d.ts.map +1 -0
  29. package/dist/types/index.d.ts +222 -0
  30. package/dist/types/index.d.ts.map +1 -0
  31. package/dist/ui/SessionHeader.d.ts +46 -0
  32. package/dist/ui/SessionHeader.d.ts.map +1 -0
  33. package/dist/ui/WarningModal.d.ts +39 -0
  34. package/dist/ui/WarningModal.d.ts.map +1 -0
  35. package/dist/utils/logger.d.ts +25 -0
  36. package/dist/utils/logger.d.ts.map +1 -0
  37. package/dist/utils/url.d.ts +12 -0
  38. package/dist/utils/url.d.ts.map +1 -0
  39. package/package.json +17 -3
package/dist/index.d.ts CHANGED
@@ -1,771 +1,21 @@
1
- /**
2
- * Dark theme matching gw-spa design system
3
- */
4
- export declare const darkTheme: Theme;
5
-
6
- /**
7
- * Extract JWT token from URL parameter
8
- * @param paramName - URL parameter name (default: 'gwSession')
9
- * @param url - URL to extract from (default: window.location.href)
10
- * @returns JWT token or null if not found
11
- */
12
- export declare function extractTokenFromURL(paramName?: string, url?: string): string | null;
13
-
14
- /**
15
- * Generate CSS string from theme colors for inline styles
16
- */
17
- export declare function generateCSSVariables(theme: Theme): string;
18
-
19
- /**
20
- * Get theme based on user preference or system setting
21
- */
22
- export declare function getTheme(prefersDark?: boolean): Theme;
23
-
24
- /**
25
- * Heartbeat Manager for active session tracking
26
- * Phase 2 Feature - Sends periodic heartbeats to backend
27
- */
28
- export declare class HeartbeatManager {
29
- private sessionId;
30
- private apiEndpoint;
31
- private token;
32
- private onSync?;
33
- private onError?;
34
- private intervalId;
35
- private heartbeatInterval;
36
- private failureCount;
37
- private maxFailures;
38
- private isEnabled;
39
- private logger;
40
- constructor(sessionId: string, apiEndpoint: string, token: string, onSync?: ((remainingSeconds: number) => void) | undefined, onError?: ((error: Error) => void) | undefined, heartbeatIntervalSeconds?: number, debug?: boolean);
41
- /**
42
- * Start sending heartbeats
43
- */
44
- start(): void;
45
- /**
46
- * Stop sending heartbeats
47
- */
48
- stop(): void;
49
- /**
50
- * Send a single heartbeat to backend
51
- */
52
- private sendHeartbeat;
53
- /**
54
- * Check if heartbeat is running
55
- */
56
- isRunning(): boolean;
57
- /**
58
- * Get failure count
59
- */
60
- getFailureCount(): number;
61
- /**
62
- * Update heartbeat interval
63
- */
64
- updateInterval(seconds: number): void;
65
- }
66
-
67
- /**
68
- * Check if code is running in browser environment
69
- */
70
- export declare function isBrowser(): boolean;
71
-
72
- /**
73
- * JWKS Key
74
- */
75
- export declare interface JWKSKey {
76
- kty: string;
77
- use: string;
78
- kid: string;
79
- alg: string;
80
- n: string;
81
- e: string;
82
- }
83
-
84
- /**
85
- * JWKS Response
86
- */
87
- export declare interface JWKSResponse {
88
- keys: JWKSKey[];
89
- }
90
-
91
- /**
92
- * JWKS Validator for RS256 JWT signature verification
93
- * Uses jose library for browser and Node.js compatibility
94
- */
95
- export declare class JWKSValidator {
96
- private jwksUri;
97
- private logger;
98
- private jwks;
99
- constructor(jwksUri: string, debug?: boolean);
100
- /**
101
- * Verify JWT signature using JWKS public key
102
- * @param token - JWT token to verify
103
- * @param expectedIssuer - Expected issuer (default: 'generalwisdom.com')
104
- * @param expectedApplicationId - Optional application ID to validate
105
- * @returns Decoded and verified JWT claims
106
- */
107
- verify(token: string, expectedIssuer?: string, expectedApplicationId?: string): Promise<JWTClaims>;
108
- /**
109
- * Update JWKS URI
110
- * @param jwksUri - New JWKS URI
111
- */
112
- updateJwksUri(jwksUri: string): void;
113
- }
114
-
115
- /**
116
- * JWT Claims (raw payload from token)
117
- */
118
- export declare interface JWTClaims {
119
- sessionId: string;
120
- applicationId: string;
121
- userId: string;
122
- orgId: string;
123
- startTime: number;
124
- durationMinutes: number;
125
- iat: number;
126
- exp: number;
127
- iss: string;
128
- sub: string;
129
- }
130
-
131
- /**
132
- * JWT Header
133
- */
134
- export declare interface JWTHeader {
135
- alg: string;
136
- typ: string;
137
- kid: string;
138
- }
139
-
140
- /**
141
- * JWT Parser for client-side token decoding
142
- * Note: Does NOT verify signature - use JWKSValidator for verification
143
- */
144
- export declare class JWTParser {
145
- /**
146
- * Decode JWT payload without verification
147
- * @param token - JWT token string
148
- * @returns Decoded payload
149
- */
150
- static decode(token: string): JWTClaims;
151
- /**
152
- * Decode JWT header
153
- * @param token - JWT token string
154
- * @returns Decoded header
155
- */
156
- static decodeHeader(token: string): JWTHeader;
157
- /**
158
- * Extract specific claim from JWT
159
- * @param token - JWT token string
160
- * @param claim - Claim name to extract
161
- * @returns Claim value
162
- */
163
- static extractClaim<T = any>(token: string, claim: string): T;
164
- /**
165
- * Check if JWT is expired (client-side only, not authoritative)
166
- * @param token - JWT token string
167
- * @returns True if token is expired
168
- */
169
- static isExpired(token: string): boolean;
170
- /**
171
- * Get time remaining until expiration
172
- * @param token - JWT token string
173
- * @returns Seconds remaining (0 if expired)
174
- */
175
- static getTimeRemaining(token: string): number;
176
- /**
177
- * Base64 URL decode
178
- * @param str - Base64 URL encoded string
179
- * @returns Decoded string
180
- */
181
- private static base64UrlDecode;
182
- }
183
-
184
- /**
185
- * Light theme matching gw-spa design system
186
- */
187
- export declare const lightTheme: Theme;
188
-
189
- /**
190
- * Simple logger with debug mode support
191
- */
192
- export declare class Logger {
193
- private debug;
194
- private prefix;
195
- constructor(debug?: boolean, prefix?: string);
196
- /**
197
- * Log debug message (only if debug enabled)
198
- */
199
- log(...args: any[]): void;
200
- /**
201
- * Log info message (only if debug enabled)
202
- */
203
- info(...args: any[]): void;
204
- /**
205
- * Log warning message (always shown)
206
- */
207
- warn(...args: any[]): void;
208
- /**
209
- * Log error message (always shown)
210
- */
211
- error(...args: any[]): void;
212
- }
213
-
214
- /**
215
- * Marketplace SDK with Phase 2 Features
216
- * - Heartbeat system
217
- * - Multi-tab synchronization
218
- * - Visibility API integration
219
- * - Session extension/completion
220
- * - Backend validation
221
- */
222
- declare class MarketplaceSDK {
223
- private config;
224
- private validator;
225
- private timer;
226
- private heartbeat;
227
- private tabSync;
228
- private modal;
229
- private logger;
230
- private events;
231
- private sessionData;
232
- private jwtToken;
233
- private endReason;
234
- constructor(config: SDKConfig);
235
- /**
236
- * Register event handlers
237
- */
238
- on<K extends keyof SDKEvents>(event: K, handler: SDKEvents[K]): void;
239
- /**
240
- * Execute a lifecycle hook with timeout
241
- */
242
- private executeHook;
243
- /**
244
- * Calculate actual session duration in minutes
245
- */
246
- private calculateActualDuration;
247
- /**
248
- * Initialize SDK and validate session
249
- */
250
- initialize(): Promise<SessionData>;
251
- /**
252
- * Phase 2: Validate JWT with backend
253
- */
254
- private validateWithBackend;
255
- /**
256
- * Phase 2: Handle tab sync messages
257
- */
258
- private handleTabSyncMessage;
259
- /**
260
- * Phase 2: Initialize Visibility API handling
261
- */
262
- private initializeVisibilityHandling;
263
- /**
264
- * Start session timer manually
265
- */
266
- startTimer(): void;
267
- /**
268
- * Pause session timer
269
- */
270
- pauseTimer(): void;
271
- /**
272
- * Resume session timer
273
- */
274
- resumeTimer(): void;
275
- /**
276
- * Phase 2: Extend session
277
- */
278
- extendSession(additionalMinutes: number): Promise<void>;
279
- /**
280
- * Phase 2: Complete session
281
- */
282
- completeSession(actualUsageMinutes?: number): Promise<void>;
283
- /**
284
- * End session
285
- */
286
- endSession(): Promise<void>;
287
- /**
288
- * Show warning modal
289
- */
290
- private showWarningModal;
291
- /**
292
- * Get current session data
293
- */
294
- getSessionData(): SessionData | null;
295
- /**
296
- * Get remaining time
297
- */
298
- getRemainingTime(): number;
299
- /**
300
- * Get formatted time (MM:SS)
301
- */
302
- getFormattedTime(): string;
303
- /**
304
- * Get formatted time with hours (HH:MM:SS)
305
- */
306
- getFormattedTimeWithHours(): string;
307
- /**
308
- * Check if timer is running
309
- */
310
- isTimerRunning(): boolean;
311
- /**
312
- * Cleanup and destroy SDK instance
313
- */
314
- destroy(): void;
315
- }
316
- export { MarketplaceSDK }
317
- export default MarketplaceSDK;
318
-
319
- /**
320
- * Modal styling options (Legacy - prefer using theme)
321
- * @deprecated Use theme configuration from src/styles/theme.ts instead
322
- */
323
- export declare interface ModalStyles {
324
- backgroundColor: string;
325
- textColor: string;
326
- primaryColor: string;
327
- borderRadius: string;
328
- fontFamily: string;
329
- }
330
-
331
- /**
332
- * SDK Configuration
333
- */
334
- export declare interface SDKConfig {
335
- /** JWKS endpoint URL (default: https://api.platform.generalwisdom.com/.well-known/jwks.json) */
336
- jwksUri?: string;
337
- /** URL query parameter name containing the JWT (default: 'gwSession') */
338
- jwtParamName?: string;
339
- /** API endpoint for backend integration (Phase 2) */
340
- apiEndpoint?: string;
341
- /** JWT issuer for validation (default: 'generalwisdom.com') */
342
- jwtIssuer?: string;
343
- /** Enable debug logging */
344
- debug?: boolean;
345
- /** Auto-start timer after initialization */
346
- autoStart?: boolean;
347
- /** Warning threshold in seconds (default: 300 = 5 minutes) */
348
- warningThresholdSeconds?: number;
349
- /** Custom styling for warning modal (Legacy - prefer using themeMode) */
350
- customStyles?: Partial<ModalStyles>;
351
- /** Theme mode for modal styling (default: 'light') */
352
- themeMode?: ThemeMode;
353
- /** Application ID for validation */
354
- applicationId?: string;
355
- /** Marketplace URL for redirects (default: https://platform.generalwisdom.com/) */
356
- marketplaceUrl?: string;
357
- /** Enable heartbeat system (default: false) */
358
- enableHeartbeat?: boolean;
359
- /** Heartbeat interval in seconds (default: 30) */
360
- heartbeatIntervalSeconds?: number;
361
- /** Enable multi-tab synchronization (default: false) */
362
- enableTabSync?: boolean;
363
- /** Pause timer when tab is hidden (default: false) */
364
- pauseOnHidden?: boolean;
365
- /** Use backend validation instead of JWKS (default: false) */
366
- useBackendValidation?: boolean;
367
- /** Optional hooks for synchronizing app auth state with marketplace sessions */
368
- hooks?: SessionLifecycleHooks;
369
- /** Hook execution timeout in milliseconds (default: 5000) */
370
- hookTimeoutMs?: number;
371
- }
372
-
373
- /**
374
- * Custom SDK Error
375
- */
376
- export declare class SDKError extends Error {
377
- code: string;
378
- statusCode?: number | undefined;
379
- constructor(message: string, code: string, statusCode?: number | undefined);
380
- }
381
-
382
- /**
383
- * SDK Event Handlers
384
- */
385
- export declare interface SDKEvents {
386
- /** Called when session successfully initialized */
387
- onSessionStart: (data: SessionData) => void;
388
- /** Called when warning threshold reached */
389
- onSessionWarning: (data: {
390
- remainingSeconds: number;
391
- }) => void;
392
- /** Called when session expires or is ended */
393
- onSessionEnd: () => void;
394
- /** Called on any error */
395
- onError: (error: Error) => void;
396
- }
397
-
398
- /**
399
- * Session Data extracted from JWT
400
- */
401
- export declare interface SessionData {
402
- /** Unique session UUID */
403
- sessionId: string;
404
- /** Application ID */
405
- applicationId: string;
406
- /** User ID */
407
- userId: string;
408
- /** Organization ID */
409
- orgId: string;
410
- /** Session start time (Unix timestamp seconds) */
411
- startTime: number;
412
- /** Session duration in minutes */
413
- durationMinutes: number;
414
- /** Issued at timestamp (Unix seconds) */
415
- iat: number;
416
- /** Expiration timestamp (Unix seconds) */
417
- exp: number;
418
- /** Issuer */
419
- iss: string;
420
- /** Subject (user ID) */
421
- sub: string;
422
- }
423
-
424
- export declare interface SessionEndContext {
425
- /** Unique session UUID */
426
- sessionId: string;
427
- /** User ID */
428
- userId: string;
429
- /** Reason for session end */
430
- reason: 'expired' | 'manual' | 'error';
431
- /** Actual session duration in minutes (if available) */
432
- actualDurationMinutes?: number;
433
- }
434
-
435
- export declare interface SessionExtendContext {
436
- /** Unique session UUID */
437
- sessionId: string;
438
- /** User ID */
439
- userId: string;
440
- /** Additional minutes added to session */
441
- additionalMinutes: number;
442
- /** New expiration timestamp (Unix seconds) */
443
- newExpiresAt: number;
444
- }
445
-
446
- /**
447
- * Session Header Component
448
- * Compact header widget showing session timer with extend/end controls
449
- */
450
- export declare class SessionHeader {
451
- private container;
452
- private theme;
453
- private updateInterval;
454
- private timeDisplay;
455
- private getTimeCallback;
456
- private onExtendCallback;
457
- private onEndCallback;
458
- private mounted;
459
- constructor(themeMode?: ThemeMode);
460
- private detectDarkMode;
461
- /**
462
- * Mount the session header to a DOM element
463
- * @param targetElement - Element to mount to (or selector string)
464
- * @param options - Configuration options
465
- */
466
- mount(targetElement: HTMLElement | string, options: {
467
- getTime: () => string;
468
- onExtend?: () => void;
469
- onEnd?: () => void;
470
- position?: 'left' | 'center' | 'right';
471
- }): void;
472
- /**
473
- * Start updating the time display
474
- */
475
- private startUpdating;
476
- /**
477
- * Unmount and cleanup the session header
478
- */
479
- unmount(): void;
480
- /**
481
- * Check if component is mounted
482
- */
483
- isMounted(): boolean;
484
- /**
485
- * Update the theme
486
- */
487
- updateTheme(themeMode: ThemeMode): void;
488
- }
489
-
490
- /**
491
- * Session Lifecycle Hooks
492
- * Optional callbacks that allow applications to synchronize their auth state with marketplace sessions
493
- */
494
- export declare interface SessionLifecycleHooks {
495
- /**
496
- * Called after JWT validation succeeds but before session timer starts
497
- * Use to: Auto-login user to your app's auth system
498
- * Note: Hook failure will prevent session from starting
499
- */
500
- onSessionStart?: (context: SessionStartContext) => Promise<void> | void;
501
- /**
502
- * Called when session expires or is manually ended, before redirect
503
- * Use to: Force logout user from your app's auth system
504
- * Note: Hook failure will be logged but won't prevent session end
505
- */
506
- onSessionEnd?: (context: SessionEndContext) => Promise<void> | void;
507
- /**
508
- * Called when session extension succeeds
509
- * Use to: Refresh app auth tokens if needed
510
- */
511
- onSessionExtend?: (context: SessionExtendContext) => Promise<void> | void;
512
- /**
513
- * Called before session warning modal is shown
514
- * Use to: Prepare user for session expiration
515
- */
516
- onSessionWarning?: (context: SessionWarningContext) => Promise<void> | void;
517
- }
518
-
519
- /**
520
- * Session Lifecycle Hook Contexts
521
- */
522
- export declare interface SessionStartContext {
523
- /** Unique session UUID */
524
- sessionId: string;
525
- /** User ID from JWT */
526
- userId: string;
527
- /** User email (if available in JWT) */
528
- email?: string;
529
- /** Organization ID */
530
- orgId: string;
531
- /** Application ID */
532
- applicationId: string;
533
- /** Session duration in minutes */
534
- durationMinutes: number;
535
- /** Expiration timestamp (Unix seconds) */
536
- expiresAt: number;
537
- /** Full JWT token for app use */
538
- jwt: string;
539
- }
540
-
541
- export declare interface SessionWarningContext {
542
- /** Unique session UUID */
543
- sessionId: string;
544
- /** User ID */
545
- userId: string;
546
- /** Remaining seconds until expiration */
547
- remainingSeconds: number;
548
- }
549
-
550
- /**
551
- * Tab Synchronization Manager
552
- * Phase 2 Feature - Syncs session state across multiple tabs
553
- */
554
- export declare class TabSyncManager {
555
- private sessionId;
556
- private onMessage;
557
- private channel;
558
- private storageKey;
559
- private logger;
560
- private isMaster;
561
- constructor(sessionId: string, onMessage: (message: TabSyncMessage) => void, debug?: boolean);
562
- /**
563
- * Initialize sync mechanism
564
- */
565
- private initialize;
566
- /**
567
- * Broadcast message to other tabs
568
- */
569
- broadcast(type: TabSyncMessage['type'], data?: Partial<TabSyncMessage>): void;
570
- /**
571
- * Handle incoming message
572
- */
573
- private handleMessage;
574
- /**
575
- * Handle storage event (fallback mechanism)
576
- */
577
- private handleStorageEvent;
578
- /**
579
- * Elect this tab as master if appropriate
580
- * Master tab is responsible for heartbeats
581
- */
582
- private electMaster;
583
- /**
584
- * Check if this tab is the master
585
- */
586
- isMasterTab(): boolean;
587
- /**
588
- * Cleanup and destroy
589
- */
590
- destroy(): void;
591
- }
592
-
593
- export declare interface TabSyncMessage {
594
- type: 'timer_update' | 'pause' | 'resume' | 'end';
595
- sessionId: string;
596
- remainingSeconds?: number;
597
- timestamp: number;
598
- }
599
-
600
- export declare interface Theme {
601
- colors: ThemeColors;
602
- typography: ThemeTypography;
603
- spacing: ThemeSpacing;
604
- }
605
-
606
- /**
607
- * Theme configuration matching the General Wisdom SPA design system
608
- * Based on gw-spa/src/styles/globals.css and Tailwind CSS v4
609
- */
610
- export declare interface ThemeColors {
611
- background: string;
612
- foreground: string;
613
- card: string;
614
- cardForeground: string;
615
- popover: string;
616
- popoverForeground: string;
617
- primary: string;
618
- primaryForeground: string;
619
- secondary: string;
620
- secondaryForeground: string;
621
- muted: string;
622
- mutedForeground: string;
623
- accent: string;
624
- accentForeground: string;
625
- destructive: string;
626
- destructiveForeground: string;
627
- success: string;
628
- successForeground: string;
629
- border: string;
630
- input: string;
631
- ring: string;
632
- }
633
-
634
- /**
635
- * Theme mode for modal styling
636
- */
637
- export declare type ThemeMode = 'light' | 'dark' | 'auto';
638
-
639
- export declare interface ThemeSpacing {
640
- borderRadius: {
641
- sm: string;
642
- md: string;
643
- lg: string;
644
- };
645
- padding: {
646
- sm: string;
647
- md: string;
648
- lg: string;
649
- xl: string;
650
- };
651
- gap: {
652
- sm: string;
653
- md: string;
654
- lg: string;
655
- };
656
- }
657
-
658
- export declare interface ThemeTypography {
659
- fontFamily: string;
660
- fontSize: {
661
- xs: string;
662
- sm: string;
663
- base: string;
664
- lg: string;
665
- xl: string;
666
- '2xl': string;
667
- };
668
- fontWeight: {
669
- normal: string;
670
- medium: string;
671
- semibold: string;
672
- bold: string;
673
- };
674
- lineHeight: {
675
- tight: string;
676
- normal: string;
677
- relaxed: string;
678
- };
679
- }
680
-
681
- /**
682
- * Timer Manager for session countdown
683
- */
684
- export declare class TimerManager {
685
- private remainingSeconds;
686
- private intervalId;
687
- private warningThreshold;
688
- private warningShown;
689
- private logger;
690
- private events;
691
- constructor(durationSeconds: number, warningThresholdSeconds?: number, events?: Partial<SDKEvents>, debug?: boolean);
692
- /**
693
- * Start countdown timer
694
- */
695
- start(): void;
696
- /**
697
- * Stop timer
698
- */
699
- stop(): void;
700
- /**
701
- * Pause timer
702
- */
703
- pause(): void;
704
- /**
705
- * Resume timer
706
- */
707
- resume(): void;
708
- /**
709
- * Get remaining time in seconds
710
- */
711
- getRemainingSeconds(): number;
712
- /**
713
- * Get formatted time string (MM:SS)
714
- */
715
- getFormattedTime(): string;
716
- /**
717
- * Get formatted time string with hours (HH:MM:SS)
718
- */
719
- getFormattedTimeWithHours(): string;
720
- /**
721
- * Check if timer is running
722
- */
723
- isRunning(): boolean;
724
- /**
725
- * Check if warning has been shown
726
- */
727
- hasWarningBeenShown(): boolean;
728
- /**
729
- * Update remaining time (useful for syncing with server)
730
- */
731
- updateRemainingTime(seconds: number): void;
732
- }
733
-
734
- /**
735
- * Warning Modal for session expiration alerts
736
- */
737
- export declare class WarningModal {
738
- private modal;
739
- private theme;
740
- private legacyStyles;
741
- private updateInterval;
742
- private timeDisplay;
743
- private startTime;
744
- private initialSeconds;
745
- private onEndCallback;
746
- constructor(themeMode?: ThemeMode, customStyles?: Partial<ModalStyles>);
747
- private detectDarkMode;
748
- /**
749
- * Show warning modal
750
- */
751
- show(options: {
752
- remainingSeconds: number;
753
- onExtend?: () => void;
754
- onEnd?: () => void;
755
- }): void;
756
- /**
757
- * Hide and remove modal
758
- */
759
- hide(): void;
760
- /**
761
- * Check if modal is currently shown
762
- */
763
- isShown(): boolean;
764
- /**
765
- * Show "Session Ending" modal before redirect
766
- * Displays for a fixed duration (3 seconds) then calls callback
767
- */
768
- showEndingMessage(onComplete: () => void, durationMs?: number): void;
769
- }
770
-
771
- export { }
1
+ /**
2
+ * Marketplace Provider SDK
3
+ * JWT-based session management for application providers
4
+ */
5
+ export { MarketplaceSDK } from './core/MarketplaceSDK';
6
+ export { JWTParser } from './core/JWTParser';
7
+ export { JWKSValidator } from './core/JWKSValidator';
8
+ export { TimerManager } from './core/TimerManager';
9
+ export { HeartbeatManager } from './core/HeartbeatManager';
10
+ export { TabSyncManager } from './core/TabSyncManager';
11
+ export type { TabSyncMessage } from './core/TabSyncManager';
12
+ export { WarningModal } from './ui/WarningModal';
13
+ export { SessionHeader } from './ui/SessionHeader';
14
+ export { lightTheme, darkTheme, getTheme, generateCSSVariables } from './styles/theme';
15
+ export type { Theme, ThemeColors, ThemeTypography, ThemeSpacing } from './styles/theme';
16
+ export type { SDKConfig, SessionData, SDKEvents, ModalStyles, ThemeMode, JWTHeader, JWTClaims, JWKSKey, JWKSResponse, SessionLifecycleHooks, SessionStartContext, SessionEndContext, SessionExtendContext, SessionWarningContext, } from './types';
17
+ export { SDKError } from './types';
18
+ export { extractTokenFromURL, isBrowser } from './utils/url';
19
+ export { Logger } from './utils/logger';
20
+ export { MarketplaceSDK as default } from './core/MarketplaceSDK';
21
+ //# sourceMappingURL=index.d.ts.map