@signalwire/js 4.0.0-dev-20260428183200 → 4.0.0-dev-20260429174756

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.cts CHANGED
@@ -84,7 +84,7 @@ type WebSocketAdapter = new (url: string | URL, protocols?: string | string[]) =
84
84
  * At least one of `token` or `authorizationState` must be provided.
85
85
  */
86
86
  interface SDKCredential {
87
- /** JWT subscriber access token (SAT). */
87
+ /** JWT user access token (SAT). */
88
88
  token?: string;
89
89
  /** Pre-authorized session state (alternative to token). */
90
90
  authorizationState?: string;
@@ -626,57 +626,57 @@ interface SATClaims {
626
626
  expires_at?: number;
627
627
  }
628
628
  //#endregion
629
- //#region src/core/types/subscriber.types.d.ts
630
- /** Raw subscriber profile response from the SignalWire Fabric API. */
631
- interface GetSubscriberInfoResponse {
632
- /** Unique subscriber identifier. */
629
+ //#region src/core/types/user.types.d.ts
630
+ /** Raw user profile response from the SignalWire Fabric API. */
631
+ interface GetUserInfoResponse {
632
+ /** Unique user identifier. */
633
633
  id: string;
634
- /** Subscriber's email address. */
634
+ /** User's email address. */
635
635
  email: string;
636
- /** Subscriber's first name. */
636
+ /** User's first name. */
637
637
  first_name?: string;
638
- /** Subscriber's last name. */
638
+ /** User's last name. */
639
639
  last_name?: string;
640
- /** Subscriber's display name. */
640
+ /** User's display name. */
641
641
  display_name?: string;
642
- /** Subscriber's job title. */
642
+ /** User's job title. */
643
643
  job_title?: string;
644
- /** Subscriber's time zone offset. */
644
+ /** User's time zone offset. */
645
645
  time_zone?: number;
646
- /** Subscriber's country. */
646
+ /** User's country. */
647
647
  country?: string;
648
- /** Subscriber's region or state. */
648
+ /** User's region or state. */
649
649
  region?: string;
650
- /** Subscriber's company name. */
650
+ /** User's company name. */
651
651
  company_name?: string;
652
652
  /** Key for push notification delivery. */
653
653
  push_notification_key: string;
654
- /** Application-level settings for this subscriber. */
654
+ /** Application-level settings for this user. */
655
655
  app_settings?: {
656
656
  /** Display name configured at the application level. */
657
657
  display_name: string;
658
- /** Permission scopes granted to this subscriber. */
658
+ /** Permission scopes granted to this user. */
659
659
  scopes: string[];
660
660
  };
661
- /** Fabric addresses associated with this subscriber. */
661
+ /** Fabric addresses associated with this user. */
662
662
  fabric_addresses: GetAddressResponse[];
663
663
  /** Filtered SAT claims (scope, cnf, expires_at) returned when the token has special capabilities. */
664
664
  sat_claims?: SATClaims;
665
665
  }
666
666
  //#endregion
667
- //#region src/core/entities/Subscriber.d.ts
668
- /** Subscriber online presence state. */
669
- type SubscriberPresence = 'online' | 'offline' | 'busy';
667
+ //#region src/core/entities/User.d.ts
668
+ /** User online presence state. */
669
+ type UserPresence = 'online' | 'offline' | 'busy';
670
670
  /**
671
- * Authenticated subscriber profile.
671
+ * Authenticated user profile.
672
672
  *
673
673
  * Fetched automatically when a {@link SignalWire} connects.
674
674
  * Contains identity, contact, and organization details.
675
675
  */
676
- declare class Subscriber extends Fetchable<GetSubscriberInfoResponse> {
677
- /** Unique subscriber identifier. */
676
+ declare class User extends Fetchable<GetUserInfoResponse> {
677
+ /** Unique user identifier. */
678
678
  id: string;
679
- /** Subscriber email address. */
679
+ /** User email address. */
680
680
  email: string;
681
681
  /** First name. */
682
682
  firstName?: string;
@@ -701,12 +701,12 @@ declare class Subscriber extends Fetchable<GetSubscriberInfoResponse> {
701
701
  displayName: string;
702
702
  scopes: string[];
703
703
  };
704
- /** Fabric addresses associated with this subscriber. */
704
+ /** Fabric addresses associated with this user. */
705
705
  addresses: GetAddressResponse[];
706
706
  /** Filtered SAT claims when the token has special capabilities (e.g., refresh scope). */
707
707
  satClaims?: SATClaims;
708
708
  constructor(http: HTTPRequestController);
709
- protected populateInstance(data: GetSubscriberInfoResponse): void;
709
+ protected populateInstance(data: GetUserInfoResponse): void;
710
710
  }
711
711
  //#endregion
712
712
  //#region src/core/types/call.types.d.ts
@@ -1780,8 +1780,8 @@ declare class Participant extends Destroyable implements CallParticipant {
1780
1780
  get denoise$(): Observable<boolean | undefined>;
1781
1781
  /** Observable of custom metadata for this participant. */
1782
1782
  get meta$(): Observable<Record<string, unknown> | undefined>;
1783
- /** Observable of the participant's subscriber ID. */
1784
- get subscriberId$(): Observable<string | undefined>;
1783
+ /** Observable of the participant's user ID. */
1784
+ get userId$(): Observable<string | undefined>;
1785
1785
  /** Observable of the participant's address ID. */
1786
1786
  get addressId$(): Observable<string | undefined>;
1787
1787
  /** Observable of the server node ID for this participant. */
@@ -1838,8 +1838,8 @@ declare class Participant extends Destroyable implements CallParticipant {
1838
1838
  get denoise(): boolean;
1839
1839
  /** Custom metadata for this participant, or `undefined` if not set. */
1840
1840
  get meta(): Record<string, unknown> | undefined;
1841
- /** Subscriber ID of this participant, or `undefined` if not available. */
1842
- get subscriberId(): string | undefined;
1841
+ /** User ID of this participant, or `undefined` if not available. */
1842
+ get userId(): string | undefined;
1843
1843
  /** Address ID of this participant, or `undefined` if not available. */
1844
1844
  get addressId(): string | undefined;
1845
1845
  /** Server node ID for this participant, or `undefined` if not available. */
@@ -2057,7 +2057,7 @@ interface CallParticipant {
2057
2057
  readonly lowbitrate$: Observable<boolean | undefined>;
2058
2058
  readonly denoise$: Observable<boolean | undefined>;
2059
2059
  readonly meta$: Observable<Record<string, unknown> | undefined>;
2060
- readonly subscriberId$: Observable<string | undefined>;
2060
+ readonly userId$: Observable<string | undefined>;
2061
2061
  readonly addressId$: Observable<string | undefined>;
2062
2062
  readonly nodeId$: Observable<string | undefined>;
2063
2063
  readonly isTalking$: Observable<boolean | undefined>;
@@ -2078,7 +2078,7 @@ interface CallParticipant {
2078
2078
  readonly lowbitrate: boolean;
2079
2079
  readonly denoise: boolean;
2080
2080
  readonly meta: Record<string, unknown> | undefined;
2081
- readonly subscriberId: string | undefined;
2081
+ readonly userId: string | undefined;
2082
2082
  readonly addressId: string | undefined;
2083
2083
  readonly nodeId: string | undefined;
2084
2084
  readonly isTalking: boolean;
@@ -2899,14 +2899,14 @@ declare class ClientSessionManager extends Destroyable implements SessionState {
2899
2899
  private _authState$;
2900
2900
  /** Sticky flag — once true, stays true for the session lifetime. */
2901
2901
  private _wasClientBound;
2902
- private _subscriberInfo$;
2902
+ private _userInfo$;
2903
2903
  private _calls$;
2904
2904
  private _iceServers$;
2905
2905
  constructor(getCredential: () => SDKCredential, transport: TransportManager, storage: StorageManager, authorizationStateKey: string, deviceController: DeviceController, attachManager: AttachManager, webRTCApiProvider: WebRTCApiProvider, dpopManager?: CryptoController | undefined, networkChange$?: Observable<NetworkChangeEvent>);
2906
2906
  get incomingCalls$(): Observable<Call[]>;
2907
2907
  get incomingCalls(): Call[];
2908
- get subscriberInfo$(): Observable<Address | null>;
2909
- get subscriberInfo(): Address | null;
2908
+ get userInfo$(): Observable<Address | null>;
2909
+ get userInfo(): Address | null;
2910
2910
  get calls$(): Observable<Call[]>;
2911
2911
  get calls(): Call[];
2912
2912
  get iceServers(): RTCIceServer[] | undefined;
@@ -3334,7 +3334,7 @@ declare const getLogger: () => InternalSDKLogger;
3334
3334
  interface SignalWireOptions {
3335
3335
  /** Skip automatic WebSocket connection on construction. */
3336
3336
  skipConnection?: boolean;
3337
- /** Skip automatic subscriber registration on construction. */
3337
+ /** Skip automatic user registration on construction. */
3338
3338
  skipRegister?: boolean;
3339
3339
  /** Skip monitoring media device changes. */
3340
3340
  skipDeviceMonitoring?: boolean;
@@ -3413,7 +3413,7 @@ interface DialOptions extends MediaOptions {
3413
3413
  declare class SignalWire extends Destroyable implements DeviceController {
3414
3414
  /** Global SDK preferences (timeouts, ICE config, media defaults). */
3415
3415
  preferences: ClientPreferences;
3416
- private _subscriber$;
3416
+ private _user$;
3417
3417
  private _directory$;
3418
3418
  private _transport;
3419
3419
  private _clientSession;
@@ -3503,19 +3503,19 @@ declare class SignalWire extends Destroyable implements DeviceController {
3503
3503
  */
3504
3504
  connect(): Promise<void>;
3505
3505
  /**
3506
- * Observable that emits the {@link Subscriber} profile once fetched,
3506
+ * Observable that emits the {@link User} profile once fetched,
3507
3507
  * or `undefined` before authentication completes.
3508
3508
  *
3509
3509
  * @example
3510
3510
  * ```ts
3511
- * client.subscriber$.subscribe(sub => {
3512
- * if (sub) console.log('Logged in as', sub.email);
3511
+ * client.user$.subscribe(u => {
3512
+ * if (u) console.log('Logged in as', u.email);
3513
3513
  * });
3514
3514
  * ```
3515
3515
  */
3516
- get subscriber$(): Observable<Subscriber | undefined>;
3517
- /** Current subscriber snapshot, or `undefined` if not yet authenticated. */
3518
- get subscriber(): Subscriber | undefined;
3516
+ get user$(): Observable<User | undefined>;
3517
+ /** Current user snapshot, or `undefined` if not yet authenticated. */
3518
+ get user(): User | undefined;
3519
3519
  /**
3520
3520
  * Observable that emits the {@link Directory} instance once the client is connected,
3521
3521
  * or `undefined` while disconnected. Subscribe to this to safely wait for the directory
@@ -3534,9 +3534,9 @@ declare class SignalWire extends Destroyable implements DeviceController {
3534
3534
  * Prefer {@link directory$} when you need to react to the directory becoming available.
3535
3535
  */
3536
3536
  get directory(): Directory | undefined;
3537
- /** Observable that emits when the subscriber registration state changes. */
3537
+ /** Observable that emits when the user registration state changes. */
3538
3538
  get isRegistered$(): Observable<boolean>;
3539
- /** Whether the subscriber is currently registered. */
3539
+ /** Whether the user is currently registered. */
3540
3540
  get isRegistered(): boolean;
3541
3541
  /** Whether the client is currently connected. */
3542
3542
  get isConnected(): boolean;
@@ -3574,7 +3574,7 @@ declare class SignalWire extends Destroyable implements DeviceController {
3574
3574
  private teardownTransportAndSession;
3575
3575
  private waitAuthentication;
3576
3576
  /**
3577
- * Registers the subscriber as online to receive inbound calls and events.
3577
+ * Registers the user as online to receive inbound calls and events.
3578
3578
  *
3579
3579
  * Waits for authentication to complete before sending the registration.
3580
3580
  * If the initial attempt fails, reauthentication is attempted automatically.
@@ -3583,7 +3583,7 @@ declare class SignalWire extends Destroyable implements DeviceController {
3583
3583
  */
3584
3584
  register(): Promise<void>;
3585
3585
  /**
3586
- * Unregisters the subscriber, going offline for inbound calls.
3586
+ * Unregisters the user, going offline for inbound calls.
3587
3587
  *
3588
3588
  * The WebSocket connection remains open; use {@link disconnect} to fully close it.
3589
3589
  */
@@ -4737,5 +4737,5 @@ declare const version: string;
4737
4737
  */
4738
4738
  declare const ready: boolean;
4739
4739
  //#endregion
4740
- export { Address, type AddressHistory, type AudioConstraintsEvent, type AuthenticateContext, type Call, type CallAddress, type CallCapabilitiesState, CallCreateError, type CallDiagnosticSummary, type CallDirection, type CallError, type CallErrorKind, type NetworkIssue as CallNetworkIssue, type NetworkIssue, type NetworkMetrics as CallNetworkMetrics, type NetworkMetrics, type CallOptions, type CallParticipant, type CallSelfParticipant, type CallState, type CallStatus, type Capability, ClientPreferences, CollectionFetchError, type ConstraintFallbackEvent, type CredentialProvider, DPoPInitError, type DebugOptions, type DeviceController, type DeviceRecoveryEvent, DeviceTokenError, type DiagnosticEvent, type DialOptions, type Directory, EmbedTokenCredentialProvider, type ExecuteMethod, InvalidCredentialsError, type JSONRPCErrorResponse, type JSONRPCRequest, type JSONRPCResponse, type JSONRPCSuccessResponse, type LayoutLayer, type LogLevel, type MediaDirection, type MediaDirections, type MediaOptions, type MediaParamsEvent, MediaTrackError, type MemberCapabilities, MessageParseError, type NodeSocketAdapter, type OnOffCapability, OverconstrainedFallbackError, Participant, type PendingRPCOptions, type PermissionResult, type PlatformCapabilities, PreflightError, type PreflightOptions, type PreflightResult, type QualityLevel, RecoveryError, type RecoveryEvent, type RecoveryState, type ResilienceCallStatus, type SATClaims, type SDKCredential, type SDKLogger, type ScreenShareStatus, type SelectDeviceOptions, SelfCapabilities, SelfParticipant, type SessionDiagnostics, type SessionState, SignalWire, type SignalWireOptions, StaticCredentialProvider, type Storage, type StoredDevicePreference, Subscriber, type SubscriberPresence, type TextMessage, TokenRefreshError, type TransferOptions, UnexpectedError, VertoPongError, type VideoPosition, type WebRTCApiProvider, WebRTCCall, type WebRTCMediaDevices, type WebSocketAdapter, embeddableCall, getLogger, isSelfParticipant, ready, setDebugOptions, setLogLevel, setLogger, version };
4740
+ export { Address, type AddressHistory, type AudioConstraintsEvent, type AuthenticateContext, type Call, type CallAddress, type CallCapabilitiesState, CallCreateError, type CallDiagnosticSummary, type CallDirection, type CallError, type CallErrorKind, type NetworkIssue as CallNetworkIssue, type NetworkIssue, type NetworkMetrics as CallNetworkMetrics, type NetworkMetrics, type CallOptions, type CallParticipant, type CallSelfParticipant, type CallState, type CallStatus, type Capability, ClientPreferences, CollectionFetchError, type ConstraintFallbackEvent, type CredentialProvider, DPoPInitError, type DebugOptions, type DeviceController, type DeviceRecoveryEvent, DeviceTokenError, type DiagnosticEvent, type DialOptions, type Directory, EmbedTokenCredentialProvider, type ExecuteMethod, InvalidCredentialsError, type JSONRPCErrorResponse, type JSONRPCRequest, type JSONRPCResponse, type JSONRPCSuccessResponse, type LayoutLayer, type LogLevel, type MediaDirection, type MediaDirections, type MediaOptions, type MediaParamsEvent, MediaTrackError, type MemberCapabilities, MessageParseError, type NodeSocketAdapter, type OnOffCapability, OverconstrainedFallbackError, Participant, type PendingRPCOptions, type PermissionResult, type PlatformCapabilities, PreflightError, type PreflightOptions, type PreflightResult, type QualityLevel, RecoveryError, type RecoveryEvent, type RecoveryState, type ResilienceCallStatus, type SATClaims, type SDKCredential, type SDKLogger, type ScreenShareStatus, type SelectDeviceOptions, SelfCapabilities, SelfParticipant, type SessionDiagnostics, type SessionState, SignalWire, type SignalWireOptions, StaticCredentialProvider, type Storage, type StoredDevicePreference, type TextMessage, TokenRefreshError, type TransferOptions, UnexpectedError, User, type UserPresence, VertoPongError, type VideoPosition, type WebRTCApiProvider, WebRTCCall, type WebRTCMediaDevices, type WebSocketAdapter, embeddableCall, getLogger, isSelfParticipant, ready, setDebugOptions, setLogLevel, setLogger, version };
4741
4741
  //# sourceMappingURL=index.d.cts.map