@mission_sciences/provider-sdk 0.2.0-dev.03bcad5 → 0.2.0-dev.8e1d7d7

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/README.md CHANGED
@@ -17,7 +17,6 @@ npm install @mission_sciences/provider-sdk
17
17
  import { MarketplaceSDK } from '@mission_sciences/provider-sdk';
18
18
 
19
19
  const sdk = new MarketplaceSDK({
20
- jwksUri: 'https://api.generalwisdom.com/.well-known/jwks.json',
21
20
  applicationId: 'your-app-id',
22
21
  autoStart: true,
23
22
  hooks: {
@@ -478,7 +477,6 @@ npm view @mission_sciences/provider-sdk --json | jq .dist
478
477
 
479
478
  ## Production Checklist
480
479
 
481
- - [ ] Set `jwksUri` to production JWKS endpoint
482
480
  - [ ] Set correct `applicationId`
483
481
  - [ ] Set `hookTimeoutMs` appropriately for your auth provider latency
484
482
  - [ ] Enable HTTPS on all endpoints
@@ -500,43 +498,6 @@ npm view @mission_sciences/provider-sdk --json | jq .dist
500
498
 
501
499
  **Multi-tab conflicts** -- Enable `enableTabSync: true` to elect a master tab and sync session state across tabs via BroadcastChannel.
502
500
 
503
- ## Migration from @marketplace/provider-sdk
504
-
505
- ```bash
506
- # 1. Update package
507
- npm uninstall @marketplace/provider-sdk
508
- npm install @mission_sciences/provider-sdk
509
-
510
- # 2. Update imports
511
- # Old: import MarketplaceSDK from '@marketplace/provider-sdk';
512
- # New: import { MarketplaceSDK } from '@mission_sciences/provider-sdk';
513
- ```
514
-
515
- The API is 100% compatible. No code changes required beyond the package name.
516
-
517
- **What changed:**
518
- - Repository: Bitbucket (private) -> [GitHub](https://github.com/Mission-Sciences/provider-sdk) (public)
519
- - Package: `@marketplace/provider-sdk` -> `@mission_sciences/provider-sdk`
520
- - Registry: CodeArtifact only -> npm (public) + CodeArtifact (private)
521
- - CI/CD: Bitbucket Pipelines -> GitHub Actions with OIDC
522
- - Security: Added cryptographic provenance attestation
523
-
524
- ## Changelog
525
-
526
- ### v0.1.2 (2025-01-11) -- Migration Release
527
- - Migrated from Bitbucket to GitHub
528
- - Package renamed: `@marketplace/provider-sdk` -> `@mission_sciences/provider-sdk`
529
- - Added cryptographic provenance attestation
530
- - Dual publishing: npm (public) + AWS CodeArtifact (private)
531
- - Zero-secret CI/CD with OIDC authentication
532
- - Added lifecycle hooks (`onSessionStart`, `onSessionEnd`, `onSessionWarning`, `onSessionExtend`)
533
- - Added heartbeat, multi-tab sync, session extension, early completion
534
- - Added auth integration demo with 5 identity providers
535
-
536
- ### v0.1.1 (2024) -- Pre-Migration
537
- - Initial Bitbucket release
538
- - CodeArtifact-only distribution
539
-
540
501
  ## License
541
502
 
542
503
  MIT -- see [LICENSE](./LICENSE)
@@ -544,4 +505,4 @@ MIT -- see [LICENSE](./LICENSE)
544
505
  ## Support
545
506
 
546
507
  - **Issues**: [GitHub Issues](https://github.com/Mission-Sciences/provider-sdk/issues)
547
- - **Email**: support@generalwisdom.com
508
+ - **Discord**: [Discord](https://discord.com/invite/RN5gFEzXhB)
package/dist/index.d.ts CHANGED
@@ -332,12 +332,14 @@ export declare interface ModalStyles {
332
332
  * SDK Configuration
333
333
  */
334
334
  export declare interface SDKConfig {
335
- /** JWKS endpoint URL (default: https://api.generalwisdom.com/.well-known/jwks.json) */
335
+ /** JWKS endpoint URL (default: https://api.platform.generalwisdom.com/.well-known/jwks.json) */
336
336
  jwksUri?: string;
337
337
  /** URL query parameter name containing the JWT (default: 'gwSession') */
338
338
  jwtParamName?: string;
339
339
  /** API endpoint for backend integration (Phase 2) */
340
340
  apiEndpoint?: string;
341
+ /** JWT issuer for validation (default: 'generalwisdom.com') */
342
+ jwtIssuer?: string;
341
343
  /** Enable debug logging */
342
344
  debug?: boolean;
343
345
  /** Auto-start timer after initialization */
@@ -350,7 +352,7 @@ export declare interface SDKConfig {
350
352
  themeMode?: ThemeMode;
351
353
  /** Application ID for validation */
352
354
  applicationId?: string;
353
- /** Marketplace URL for redirects (default: https://d3p2yqofgy75sz.cloudfront.net/) */
355
+ /** Marketplace URL for redirects (default: https://platform.generalwisdom.com/) */
354
356
  marketplaceUrl?: string;
355
357
  /** Enable heartbeat system (default: false) */
356
358
  enableHeartbeat?: boolean;
@@ -2514,16 +2514,17 @@ class MarketplaceSDK {
2514
2514
  this.jwtToken = null;
2515
2515
  this.endReason = "manual";
2516
2516
  this.config = {
2517
- jwksUri: config.jwksUri || "https://api.generalwisdom.com/.well-known/jwks.json",
2517
+ jwksUri: config.jwksUri || "https://api.platform.generalwisdom.com/.well-known/jwks.json",
2518
2518
  jwtParamName: config.jwtParamName || "gwSession",
2519
- apiEndpoint: config.apiEndpoint || "http://localhost:3000",
2519
+ apiEndpoint: config.apiEndpoint || "https://api.platform.generalwisdom.com",
2520
+ jwtIssuer: config.jwtIssuer || "generalwisdom.com",
2520
2521
  debug: config.debug ?? false,
2521
2522
  autoStart: config.autoStart ?? true,
2522
2523
  warningThresholdSeconds: config.warningThresholdSeconds ?? 300,
2523
2524
  customStyles: config.customStyles ?? {},
2524
2525
  themeMode: config.themeMode ?? "light",
2525
2526
  applicationId: config.applicationId ?? "",
2526
- marketplaceUrl: config.marketplaceUrl ?? "https://d3p2yqofgy75sz.cloudfront.net/",
2527
+ marketplaceUrl: config.marketplaceUrl ?? "https://platform.generalwisdom.com/",
2527
2528
  // Phase 2 options
2528
2529
  enableHeartbeat: config.enableHeartbeat ?? false,
2529
2530
  heartbeatIntervalSeconds: config.heartbeatIntervalSeconds ?? 30,
@@ -2624,7 +2625,7 @@ class MarketplaceSDK {
2624
2625
  this.logger.log("Using JWKS validation");
2625
2626
  verifiedClaims = await this.validator.verify(
2626
2627
  this.jwtToken,
2627
- "generalwisdom.com",
2628
+ this.config.jwtIssuer,
2628
2629
  this.config.applicationId || void 0
2629
2630
  );
2630
2631
  }