spaps-sdk 1.6.8 → 1.8.0

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/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as spaps_types from 'spaps-types';
2
- import { ResourceType, Entitlement, CreateProductRequest, Product, UpdateProductRequest, CreatePriceRequest, Price, ProductSyncResult, CryptoReconcileRequest, CreateSecureMessageRequest, SecureMessage, IssueReportScope, IssueReportStatusResult, IssueReportStatus, IssueReportListResult, IssueReport, CreateIssueReportRequest, IssueReportingVoiceTokenResult, UpdateIssueReportRequest, ReplyIssueReportRequest, AuthResponse, User as User$1, CreateCryptoInvoiceRequest, CryptoInvoiceStatusSnapshot, CheckoutSession, DayrateAvailabilityResponse, DayrateBookingRequest, DayrateBookingResponse, DayrateMultiBookingRequest, DayrateMultiBookingResponse, Subscription, UsageBalance, VerifyCryptoWebhookSignatureOptions } from 'spaps-types';
3
- export { AdminPermission, AdminRole, AdminUser, ApiResponse, AuthResponse, CheckoutSession, CreateCryptoInvoiceRequest, CreateIssueReportRequest, CreatePriceRequest, CreateProductRequest, CreateSecureMessageInput, CreateSecureMessageRequest, CryptoInvoice, CryptoInvoiceResponse, CryptoInvoiceStatusSnapshot, CryptoReconcileRequest, DayrateAvailabilityResponse, DayrateAvailableSlot, DayrateBookingRequest, DayrateBookingResponse, DayrateDayOfWeek, DayrateMultiBookingRequest, DayrateMultiBookingResponse, DayratePriceBreakdown, DayrateSlotType, Entitlement, IssueReport, IssueReportListResult, IssueReportStatus, IssueReportStatusResult, IssueReportTarget, IssueReportingInputMode, IssueReportingVoiceProvider, IssueReportingVoiceTokenResult, LinkedIssueReportCase, Price, Product, ProductSyncResult, ReplyIssueReportRequest, ResourceType, SecureMessage, SecureMessageOutput, Subscription, TokenPair, UpdateIssueReportRequest, UpdateProductRequest, UsageBalance, User, UserProfile, UserRole, UserWallet, VerifyCryptoWebhookSignatureOptions, createSecureMessageRequestSchema, secureMessageMetadataSchema, secureMessageSchema } from 'spaps-types';
2
+ import { ResourceType, Entitlement, CreateProductRequest, Product, UpdateProductRequest, CreatePriceRequest, Price, ProductSyncResult, CryptoReconcileRequest, CreateSecureMessageRequest, SecureMessage, IssueReportScope, IssueReportStatusResult, IssueReportStatus, IssueReportListResult, IssueReport, CreateIssueReportRequest, IssueReportingVoiceTokenResult, UpdateIssueReportRequest, ReplyIssueReportRequest, CreateAppLinkRequest, AppLink, AuthResponse, User as User$1, CreateCryptoInvoiceRequest, CryptoInvoiceStatusSnapshot, CheckoutSession, X402ResourceStatusResponse, X402ActionResponse, X402ReceiptResponse, X402ReceiptListResponse, X402HandoffVerification, DayrateAvailabilityResponse, DayrateBookingRequest, DayrateBookingResponse, DayrateMultiBookingRequest, DayrateMultiBookingResponse, DayrateX402BookingRequest, DayrateX402BookingResponse, DayrateCheckoutStatusResponse, Subscription, UsageBalance, VerifyCryptoWebhookSignatureOptions } from 'spaps-types';
3
+ export { AdminPermission, AdminRole, AdminUser, ApiResponse, AppLink, AuthResponse, CheckoutSession, CreateAppLinkRequest, CreateCryptoInvoiceRequest, CreateIssueReportRequest, CreatePriceRequest, CreateProductRequest, CreateSecureMessageInput, CreateSecureMessageRequest, CryptoInvoice, CryptoInvoiceResponse, CryptoInvoiceStatusSnapshot, CryptoReconcileRequest, DayrateAvailabilityResponse, DayrateAvailableSlot, DayrateBookingRequest, DayrateBookingResponse, DayrateCheckoutStatus, DayrateCheckoutStatusBooking, DayrateCheckoutStatusResponse, DayrateDayOfWeek, DayrateMultiBookingRequest, DayrateMultiBookingResponse, DayratePriceBreakdown, DayrateSlotType, DayrateX402BookingRequest, DayrateX402BookingResponse, Entitlement, IssueReport, IssueReportListResult, IssueReportStatus, IssueReportStatusResult, IssueReportTarget, IssueReportingInputMode, IssueReportingVoiceProvider, IssueReportingVoiceTokenResult, LinkedIssueReportCase, Price, Product, ProductSyncResult, ReplyIssueReportRequest, ResourceType, SecureMessage, SecureMessageOutput, Subscription, TokenPair, UpdateIssueReportRequest, UpdateProductRequest, UsageBalance, User, UserProfile, UserRole, UserWallet, VerifyCryptoWebhookSignatureOptions, X402ActionFreeResponse, X402ActionOutcome, X402ActionPendingResponse, X402ActionReplayedResponse, X402ActionResponse, X402ActionSettledResponse, X402ExecuteActionRequest, X402HandoffAuthorization, X402HandoffVerification, X402HandoffVerifyRequest, X402PaymentAccept, X402PaymentRequirement, X402ProjectionStatus, X402Receipt, X402ReceiptListResponse, X402ReceiptResponse, X402ReceiptStatus, X402Resource, X402ResourceStatus, X402ResourceStatusResponse, createSecureMessageRequestSchema, isX402PaymentRequired, isX402ResourceStatus, secureMessageMetadataSchema, secureMessageSchema } from 'spaps-types';
4
4
 
5
5
  /**
6
6
  * Permission checking utilities for SPAPS SDK
@@ -244,6 +244,8 @@ declare class WebSocketAuthHelper {
244
244
  }
245
245
 
246
246
  type ApiKeyType = 'publishable' | 'secret';
247
+ /** Returns custom headers to merge into every SDK request. Called per request. */
248
+ type HeaderProvider = () => Record<string, string>;
247
249
  interface SPAPSConfig {
248
250
  apiUrl?: string;
249
251
  /** @deprecated Use publishableKey or secretKey instead */
@@ -254,6 +256,10 @@ interface SPAPSConfig {
254
256
  secretKey?: string;
255
257
  autoDetect?: boolean;
256
258
  timeout?: number;
259
+ /** Additive custom header provider. Called on each request.
260
+ * Returned headers are merged but cannot override SDK-managed
261
+ * `Authorization` or `X-API-Key` headers. */
262
+ headerProvider?: HeaderProvider;
257
263
  }
258
264
  interface CheckoutLineItemPriceData {
259
265
  currency: string;
@@ -354,6 +360,264 @@ interface IssueReportListParams {
354
360
  interface IssueReportStatusParams {
355
361
  scope?: SupportedIssueReportScope;
356
362
  }
363
+ declare class X402PaymentRequiredSDKError extends Error {
364
+ readonly paymentRequiredHeader: string;
365
+ readonly response: unknown;
366
+ constructor(paymentRequiredHeader: string, response: unknown);
367
+ }
368
+ interface X402ExecuteActionOptions {
369
+ paymentSignature?: string;
370
+ target: string;
371
+ bridgeToken?: string;
372
+ bridge_token?: string;
373
+ }
374
+ interface X402ReceiptListParams {
375
+ resourceKey?: string;
376
+ limit?: number;
377
+ offset?: number;
378
+ }
379
+ interface X402VerifyHandoffOptions {
380
+ resourceKey: string;
381
+ actionKey: string;
382
+ }
383
+ type SkillEvalDisclosurePolicy = 'blind_then_controlled_reveal';
384
+ type SkillEvalEligibilitySource = 'admin_assigned' | 'entitlement' | 'policy_import' | 'manual_override';
385
+ type SkillEvalConfidence = 'low' | 'medium' | 'high';
386
+ type SkillEvalReviewMarkKind = 'valuable' | 'not_valuable';
387
+ type SkillEvalPosterResponse = 'accepted' | 'rejected' | 'needs_clarification' | 'applied';
388
+ type SkillEvalRevealField = 'skill_version_digest' | 'provenance_ref';
389
+ type SkillEvalAccessMode = 'public' | 'team_private';
390
+ type SkillEvalGovernancePurpose = 'adopt_skill' | 'retire_skill' | 'merge_skill' | 'split_skill' | 'reviewer_policy' | 'fund_bounty';
391
+ interface SkillEvalCandidateInput {
392
+ candidate_id: string;
393
+ output_ref: string;
394
+ evidence_summary: string;
395
+ artifact_hash: string;
396
+ artifact_mime: string;
397
+ jsonl_log_ref: string;
398
+ jsonl_log_hash: string;
399
+ skill_ref: string;
400
+ skill_version_ref: string;
401
+ skill_version_digest: string;
402
+ model_id: string;
403
+ effort_level: string;
404
+ provenance_ref: string;
405
+ }
406
+ interface SkillEvalModelEffort {
407
+ model_id: string;
408
+ effort_level: string;
409
+ }
410
+ interface SkillEvalCasePolicy {
411
+ access_mode?: SkillEvalAccessMode;
412
+ allowed_model_efforts: SkillEvalModelEffort[];
413
+ min_contribution_score?: number | null;
414
+ contribution_score_source_ref?: string | null;
415
+ viewer_allowlist?: string[];
416
+ skill_user_allowlist?: string[];
417
+ participant_allowlist?: string[];
418
+ }
419
+ interface SkillEvalReviewerEligibilityInput {
420
+ reviewer_actor_id: string;
421
+ eligibility_source?: SkillEvalEligibilitySource;
422
+ contribution_score?: number | null;
423
+ contribution_score_source_ref?: string | null;
424
+ }
425
+ interface CreateSkillEvalCaseRequest {
426
+ title: string;
427
+ task_claim: string;
428
+ success_criteria: string[];
429
+ candidates: SkillEvalCandidateInput[];
430
+ disclosure_policy?: SkillEvalDisclosurePolicy;
431
+ case_policy: SkillEvalCasePolicy;
432
+ idempotency_key: string;
433
+ reviewer_eligibility?: SkillEvalReviewerEligibilityInput[];
434
+ }
435
+ interface SkillEvalCreateOptions {
436
+ paymentSignature?: string;
437
+ }
438
+ interface SkillEvalMutationOptions {
439
+ ifMatch?: string | number;
440
+ caseVersion?: number;
441
+ }
442
+ interface SkillEvalCaseResponse {
443
+ case_id: string;
444
+ status: string;
445
+ review_room_url?: string;
446
+ x402_action_key?: string;
447
+ x402_receipt_id?: string | null;
448
+ payload_fingerprint?: string;
449
+ case_version: number;
450
+ access_mode?: SkillEvalAccessMode;
451
+ case_policy?: SkillEvalCasePolicy;
452
+ actor_access?: SkillEvalActorAccess;
453
+ created_at?: string | null;
454
+ updated_at?: string | null;
455
+ idempotent_replay?: boolean;
456
+ title?: string;
457
+ task_claim?: string;
458
+ success_criteria?: string[];
459
+ candidates?: SkillEvalCandidateResponse[];
460
+ }
461
+ interface SkillEvalActorAccess {
462
+ can_view: boolean;
463
+ can_use_skill: boolean;
464
+ can_participate: boolean;
465
+ }
466
+ interface SkillEvalCandidateResponse {
467
+ candidate_id: string;
468
+ output_ref: string;
469
+ evidence_summary: string;
470
+ artifact_hash: string;
471
+ artifact_mime: string;
472
+ skill_version_digest?: string;
473
+ provenance_ref?: string;
474
+ jsonl_log_ref?: string;
475
+ jsonl_log_hash?: string;
476
+ model_id?: string;
477
+ effort_level?: string;
478
+ }
479
+ interface SkillEvalReviewRoom {
480
+ case_id: string;
481
+ status: string;
482
+ task_claim: string;
483
+ success_criteria: string[];
484
+ candidates: SkillEvalCandidateResponse[];
485
+ reviewer_state: string;
486
+ actor_access?: SkillEvalActorAccess;
487
+ case_version: number;
488
+ }
489
+ interface SkillEvalReviewMarkInput {
490
+ candidate_id: string;
491
+ kind: SkillEvalReviewMarkKind;
492
+ note: string;
493
+ reason_code: string;
494
+ confidence: SkillEvalConfidence;
495
+ criterion?: string | null;
496
+ }
497
+ interface SubmitSkillEvalReviewRequest {
498
+ winner_candidate_id?: string | null;
499
+ rationale?: string | null;
500
+ missing_from_winner?: string | null;
501
+ criteria_challenge?: string | null;
502
+ confidence?: SkillEvalConfidence | null;
503
+ review_marks?: SkillEvalReviewMarkInput[];
504
+ }
505
+ interface SkillEvalRewardEvent {
506
+ reward_event_id?: string;
507
+ event_kind: 'participation' | 'accepted_insight' | 'applied_insight' | 'delayed_bonus_candidate';
508
+ }
509
+ interface SkillEvalReviewResponse {
510
+ review_id: string;
511
+ status: string;
512
+ review_mark_counts?: {
513
+ valuable: number;
514
+ not_valuable: number;
515
+ };
516
+ reward_event?: SkillEvalRewardEvent | null;
517
+ }
518
+ interface SkillEvalInsight {
519
+ insight_ref: string;
520
+ mark_id?: string | null;
521
+ source_review_id: string;
522
+ reviewer_actor_id?: string | null;
523
+ source_review_created_at?: string | null;
524
+ candidate_id: string;
525
+ kind: SkillEvalReviewMarkKind;
526
+ note: string;
527
+ reason_code: string;
528
+ confidence: SkillEvalConfidence;
529
+ criterion?: string | null;
530
+ jsonl_log_ref: string;
531
+ jsonl_log_hash: string;
532
+ source_candidate?: {
533
+ output_ref?: string | null;
534
+ evidence_summary?: string | null;
535
+ artifact_hash?: string | null;
536
+ artifact_mime?: string | null;
537
+ model_id?: string | null;
538
+ effort_level?: string | null;
539
+ };
540
+ }
541
+ interface SkillEvalInsightsResponse {
542
+ case_id: string;
543
+ status?: string;
544
+ task_claim?: string;
545
+ success_criteria?: string[];
546
+ case_version?: number;
547
+ valuable: SkillEvalInsight[];
548
+ not_valuable: SkillEvalInsight[];
549
+ counts?: {
550
+ valuable: number;
551
+ not_valuable: number;
552
+ };
553
+ visibility_policy?: {
554
+ access_mode?: SkillEvalAccessMode;
555
+ actor_access?: SkillEvalActorAccess;
556
+ reviewer_identity_visible?: boolean;
557
+ case_policy?: SkillEvalCasePolicy;
558
+ };
559
+ }
560
+ interface RespondToSkillEvalReviewRequest {
561
+ response: SkillEvalPosterResponse;
562
+ reason: string;
563
+ applied_insight_ref?: string | null;
564
+ skill_change_ref?: string | null;
565
+ skill_version_before?: string | null;
566
+ skill_version_after?: string | null;
567
+ jsonl_log_ref?: string | null;
568
+ jsonl_log_hash?: string | null;
569
+ model_id?: string | null;
570
+ effort_level?: string | null;
571
+ }
572
+ interface SkillEvalPosterResponseResult {
573
+ response_id: string;
574
+ response: SkillEvalPosterResponse;
575
+ applied_insight_ref?: string | null;
576
+ skill_change_ref?: string | null;
577
+ skill_version_before?: string | null;
578
+ skill_version_after?: string | null;
579
+ jsonl_log_ref?: string | null;
580
+ jsonl_log_hash?: string | null;
581
+ model_id?: string | null;
582
+ effort_level?: string | null;
583
+ reward_event?: SkillEvalRewardEvent | null;
584
+ }
585
+ interface RevealSkillEvalEvidenceRequest {
586
+ fields: SkillEvalRevealField[];
587
+ reason: string;
588
+ }
589
+ interface SkillEvalRevealResult {
590
+ reveal_id: string;
591
+ case_id: string;
592
+ status: string;
593
+ revealed_fields: SkillEvalRevealField[];
594
+ }
595
+ interface CreateSkillEvalGovernanceSnapshotRequest {
596
+ proposal_purpose: SkillEvalGovernancePurpose;
597
+ summary?: Record<string, unknown>;
598
+ realms_proposal_ref?: string | null;
599
+ }
600
+ interface SkillEvalGovernanceSnapshotResult {
601
+ snapshot_id: string;
602
+ case_id: string;
603
+ summary: Record<string, unknown>;
604
+ content_hash: string;
605
+ proposal_purpose: SkillEvalGovernancePurpose;
606
+ realms_proposal_ref?: string | null;
607
+ status: string;
608
+ }
609
+ interface ImportSkillEvalGovernanceOutcomeRequest {
610
+ outcome_status: string;
611
+ realms_proposal_ref?: string | null;
612
+ outcome_ref?: string | null;
613
+ notes?: Record<string, unknown>;
614
+ }
615
+ interface SkillEvalGovernanceOutcomeResult {
616
+ snapshot_id: string;
617
+ case_id: string;
618
+ status: string;
619
+ realms_proposal_ref?: string | null;
620
+ }
357
621
 
358
622
  declare class SPAPSClient<SecureMessageMetadata extends Record<string, any> = Record<string, any>> {
359
623
  private client;
@@ -361,10 +625,17 @@ declare class SPAPSClient<SecureMessageMetadata extends Record<string, any> = Re
361
625
  private accessToken?;
362
626
  private refreshToken?;
363
627
  private _isLocalMode;
628
+ private headerProvider?;
364
629
  private unwrapApiResponse;
630
+ private skillEvalMutationConfig;
365
631
  private isAxiosResponse;
366
632
  private isResponseLikeWithData;
367
633
  private isApiResponse;
634
+ private static isSdkManagedHeader;
635
+ private static hasHeader;
636
+ private static setHeader;
637
+ private static assertSafeHeaderValue;
638
+ private applyCustomHeaders;
368
639
  admin: {
369
640
  createProduct: (productData: CreateProductRequest) => Promise<{
370
641
  data: Product;
@@ -472,6 +743,22 @@ declare class SPAPSClient<SecureMessageMetadata extends Record<string, any> = Re
472
743
  */
473
744
  reply: (issueReportId: string, payload: ReplyIssueReportRequest) => Promise<IssueReport>;
474
745
  };
746
+ /**
747
+ * Application-scoped short links for browser apps that need stable public URLs.
748
+ */
749
+ appLinks: {
750
+ /**
751
+ * Create a short link owned by the authenticated user.
752
+ */
753
+ create: (payload: CreateAppLinkRequest) => Promise<AppLink>;
754
+ /**
755
+ * Resolve a public short link for the active application.
756
+ */
757
+ get: (username: string, slug: string, options?: {
758
+ track?: boolean;
759
+ }) => Promise<AppLink>;
760
+ };
761
+ private static envVar;
475
762
  constructor(config?: SPAPSConfig);
476
763
  /** Raw API request helper that returns an ApiResponse-like shape */
477
764
  request<T = any>(method: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH', url: string, data?: any, requiresAuth?: boolean): Promise<{
@@ -749,6 +1036,32 @@ declare class SPAPSClient<SecureMessageMetadata extends Record<string, any> = Re
749
1036
  message: string;
750
1037
  }>;
751
1038
  };
1039
+ /**
1040
+ * x402 paid-resource namespace.
1041
+ * Handles resource status checks, payment-gated actions, receipts, and handoff authorization.
1042
+ */
1043
+ x402: {
1044
+ getResourceStatus: (resourceKey: string) => Promise<X402ResourceStatusResponse>;
1045
+ executeAction: (resourceKey: string, actionKey: string, options: X402ExecuteActionOptions) => Promise<X402ActionResponse>;
1046
+ getReceipt: (receiptId: string) => Promise<X402ReceiptResponse>;
1047
+ listReceipts: (params?: X402ReceiptListParams) => Promise<X402ReceiptListResponse>;
1048
+ verifyHandoff: (token: string, target: string, bridgeToken: string, options: X402VerifyHandoffOptions) => Promise<X402HandoffVerification>;
1049
+ };
1050
+ /**
1051
+ * Blind comparative skill-eval namespace.
1052
+ */
1053
+ skillEvals: {
1054
+ createCase: (payload: CreateSkillEvalCaseRequest, options?: SkillEvalCreateOptions) => Promise<SkillEvalCaseResponse>;
1055
+ getCase: (caseId: string) => Promise<SkillEvalCaseResponse>;
1056
+ getReviewRoom: (caseId: string) => Promise<SkillEvalReviewRoom>;
1057
+ getInsights: (caseId: string) => Promise<SkillEvalInsightsResponse>;
1058
+ submitReview: (caseId: string, payload: SubmitSkillEvalReviewRequest, options?: SkillEvalMutationOptions) => Promise<SkillEvalReviewResponse>;
1059
+ respondToReview: (caseId: string, reviewId: string, payload: RespondToSkillEvalReviewRequest, options?: SkillEvalMutationOptions) => Promise<SkillEvalPosterResponseResult>;
1060
+ lockReviews: (caseId: string, options?: SkillEvalMutationOptions) => Promise<SkillEvalCaseResponse>;
1061
+ revealEvidence: (caseId: string, payload: RevealSkillEvalEvidenceRequest, options?: SkillEvalMutationOptions) => Promise<SkillEvalRevealResult>;
1062
+ createGovernanceSnapshot: (caseId: string, payload: CreateSkillEvalGovernanceSnapshotRequest, options?: SkillEvalMutationOptions) => Promise<SkillEvalGovernanceSnapshotResult>;
1063
+ importGovernanceOutcome: (snapshotId: string, payload: ImportSkillEvalGovernanceOutcomeRequest) => Promise<SkillEvalGovernanceOutcomeResult>;
1064
+ };
752
1065
  /**
753
1066
  * DayRate (Dynamic Scheduling) namespace
754
1067
  * For booking half-day sessions with dynamic pricing
@@ -769,6 +1082,14 @@ declare class SPAPSClient<SecureMessageMetadata extends Record<string, any> = Re
769
1082
  * Reserves multiple slots with a single checkout session
770
1083
  */
771
1084
  createMultiBooking: (payload: DayrateMultiBookingRequest) => Promise<DayrateMultiBookingResponse>;
1085
+ /**
1086
+ * Create a single-slot booking hold backed by an x402 paid-resource action.
1087
+ */
1088
+ createX402Booking: (payload: DayrateX402BookingRequest) => Promise<DayrateX402BookingResponse>;
1089
+ /**
1090
+ * Get guest-safe checkout confirmation state for a Stripe session.
1091
+ */
1092
+ getCheckoutStatus: (sessionId: string) => Promise<DayrateCheckoutStatusResponse>;
772
1093
  };
773
1094
  createCheckoutSession(priceId: string, successUrl: string, cancelUrl?: string): Promise<{
774
1095
  data: CheckoutSession;
@@ -878,6 +1199,7 @@ declare class TokenManager {
878
1199
  static getRefreshToken(): string | null;
879
1200
  static getStoredUser(): User$1 | null;
880
1201
  static clearTokens(): void;
1202
+ static decodePayload(token: string): Record<string, unknown> | null;
881
1203
  static isTokenExpired(token: string): boolean;
882
1204
  static autoRefreshToken(sdk: SPAPSClient): Promise<boolean>;
883
1205
  /**
@@ -903,6 +1225,29 @@ declare class WalletUtils {
903
1225
  static detectChainType(address: string): 'solana' | 'ethereum' | 'bitcoin' | null;
904
1226
  static isValidAddress(address: string, chainType?: 'solana' | 'ethereum' | 'bitcoin' | 'base'): boolean;
905
1227
  }
1228
+ interface SPAPSEnvelope<T = unknown> {
1229
+ success: boolean;
1230
+ data?: T;
1231
+ error?: {
1232
+ code: string;
1233
+ message: string;
1234
+ details?: unknown;
1235
+ };
1236
+ }
1237
+ declare function isEnvelope(value: unknown): value is SPAPSEnvelope;
1238
+ declare function isSuccessEnvelope<T = unknown>(value: unknown): value is SPAPSEnvelope<T> & {
1239
+ success: true;
1240
+ };
1241
+ declare function isErrorEnvelope(value: unknown): value is SPAPSEnvelope & {
1242
+ success: false;
1243
+ error: {
1244
+ code: string;
1245
+ message: string;
1246
+ details?: unknown;
1247
+ };
1248
+ };
1249
+ declare function unwrapEnvelope<T = unknown>(value: unknown, fallbackMessage?: string): T;
1250
+ declare function unwrapNestedData<T = unknown>(value: unknown): T;
906
1251
  /**
907
1252
  * Create a SPAPS client for browser/client-side usage
908
1253
  * Uses publishable key which is safe to expose in client bundles
@@ -938,4 +1283,4 @@ declare function createServerClient(secretKey: string, options?: Omit<SPAPSConfi
938
1283
  */
939
1284
  declare function detectKeyType(key: string): ApiKeyType | null;
940
1285
 
941
- export { type AdminConfig, type ApiKeyType, type CheckoutLineItem, type CheckoutLineItemPriceData, type CreateCheckoutSessionPayload, DEFAULT_ADMIN_ACCOUNTS, type EmailSendOptions, type EmailSendResult, type EmailTemplate, type EmailTemplatePreview, type EntitlementCheckResult, type EntitlementListParams, type FeatureContext, type FeatureDefinition, FeatureEvaluator, type IssueReportListParams, type IssueReportStatusParams, type PermissionCheckResult, PermissionChecker, RoleHierarchy, SPAPSClient as SPAPS, SPAPSClient, type SPAPSConfig, type TemplateVariable, TokenManager, WalletUtils, WebSocketAuthHelper, type WebSocketAuthHelperConfig, canAccessAdmin, createBrowserClient, createPermissionChecker, createServerClient, SPAPSClient as default, defaultPermissionChecker, detectKeyType, getRoleAwareErrorMessage, getUserDisplay, getUserRole, hasPermission, isAdminAccount, verifyCryptoWebhookSignature };
1286
+ export { type AdminConfig, type ApiKeyType, type CheckoutLineItem, type CheckoutLineItemPriceData, type CreateCheckoutSessionPayload, type CreateSkillEvalCaseRequest, type CreateSkillEvalGovernanceSnapshotRequest, DEFAULT_ADMIN_ACCOUNTS, type EmailSendOptions, type EmailSendResult, type EmailTemplate, type EmailTemplatePreview, type EntitlementCheckResult, type EntitlementListParams, type FeatureContext, type FeatureDefinition, FeatureEvaluator, type HeaderProvider, type ImportSkillEvalGovernanceOutcomeRequest, type IssueReportListParams, type IssueReportStatusParams, type PermissionCheckResult, PermissionChecker, type RespondToSkillEvalReviewRequest, type RevealSkillEvalEvidenceRequest, RoleHierarchy, SPAPSClient as SPAPS, SPAPSClient, type SPAPSConfig, type SPAPSEnvelope, type SkillEvalAccessMode, type SkillEvalActorAccess, type SkillEvalCandidateInput, type SkillEvalCandidateResponse, type SkillEvalCasePolicy, type SkillEvalCaseResponse, type SkillEvalConfidence, type SkillEvalCreateOptions, type SkillEvalDisclosurePolicy, type SkillEvalEligibilitySource, type SkillEvalGovernanceOutcomeResult, type SkillEvalGovernancePurpose, type SkillEvalGovernanceSnapshotResult, type SkillEvalInsight, type SkillEvalInsightsResponse, type SkillEvalModelEffort, type SkillEvalMutationOptions, type SkillEvalPosterResponse, type SkillEvalPosterResponseResult, type SkillEvalRevealField, type SkillEvalRevealResult, type SkillEvalReviewMarkInput, type SkillEvalReviewMarkKind, type SkillEvalReviewResponse, type SkillEvalReviewRoom, type SkillEvalReviewerEligibilityInput, type SkillEvalRewardEvent, type SubmitSkillEvalReviewRequest, type TemplateVariable, TokenManager, WalletUtils, WebSocketAuthHelper, type WebSocketAuthHelperConfig, type X402ExecuteActionOptions, X402PaymentRequiredSDKError, type X402ReceiptListParams, type X402VerifyHandoffOptions, canAccessAdmin, createBrowserClient, createPermissionChecker, createServerClient, SPAPSClient as default, defaultPermissionChecker, detectKeyType, getRoleAwareErrorMessage, getUserDisplay, getUserRole, hasPermission, isAdminAccount, isEnvelope, isErrorEnvelope, isSuccessEnvelope, unwrapEnvelope, unwrapNestedData, verifyCryptoWebhookSignature };