@freedome/client 1.1.0 → 1.2.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.cts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { A as ApiCaller, R as RepositoryContext, W as WatchObserver, U as Unsubscribe, V as Versioned, E as Emitter, P as Page, C as ContentSource, a as UploadTask, b as UploadPurpose, c as RealtimeTransport, O as OfflinePolicy, d as CacheStore, e as OutboxStore, F as FreedomeLogger, f as RealtimeConnector, g as OutboxOutcome, h as EventHub, i as CallOptions, j as RealtimeChannel, k as Resync, l as RealtimeClosed, m as RealtimeHello, n as RealtimeResult, o as ChannelWelcome } from './discovery-Do_9mAzB.cjs';
2
2
  export { B as BlobContentSource, p as BytesContentSource, q as CachedValue, r as CompositeDiscovery, D as DEFAULT_OFFLINE_POLICY, s as DiscoveredDome, t as Discovery, I as InMemoryCacheStore, u as InMemoryOutboxStore, L as LogLevel, v as LogRecord, M as MAX_UPLOAD_CHUNK, w as OutboxEntry, S as StaticDiscovery, x as UploadProgress, y as UploadResult, z as UploadTaskState, G as isAuthFailure, H as nextValue, J as probe, K as readAllPages, N as readPage } from './discovery-Do_9mAzB.cjs';
3
- import { Principal, TokenSet, ApiOperation, OperationBody, OperationResponse, CalibrationJob, CalibrationState, ClientRegistration, ClientDevice, ClientTelemetry, AssetResource, AssetCreateRequest, ImportRequest, Job, ShowResource, StorageStats, ShowSummary, ShowInput, UploadStatus, EngineStatus, DisplayResource, PlayerState, AppPayload, ActiveShowState, ParameterInfo, VenueOutput, Venue, VenueInput, ServerInfo, SemVer, FreedomeEvent } from '@freedome/protocol';
3
+ import { Principal, TokenSet, ApiOperation, OperationBody, OperationResponse, CalibrationJob, CalibrationState, AssistantConfirmation, AssistantLink, AssistantLinkSession, ClientRegistration, ClientDevice, ClientTelemetry, AssetResource, AssetCreateRequest, ImportRequest, Job, ShowResource, StorageStats, ShowSummary, ShowInput, UploadStatus, EngineStatus, DisplayResource, PlayerState, AppPayload, ActiveShowState, ParameterInfo, VenueOutput, Venue, VenueInput, ServerInfo, SemVer, FreedomeEvent } from '@freedome/protocol';
4
4
  export { ApiOperation, DomeTopics, EventKinds, FreedomeEvent, Operations, ProtocolVersions, SemVer } from '@freedome/protocol';
5
5
  import { F as FreedomeEndpoint, a as FreedomeTransportFactory, b as FreedomeResponse, M as MessageSocket } from './transport-dvmDQyvB.cjs';
6
6
  export { c as FetchTransport, d as FreedomeRequest, e as FreedomeTransport, f as MessageSocketConnector, P as PairingLink, W as WebSocketCtor, g as WebSocketLike, r as requestUrl, w as webSocketConnector } from './transport-dvmDQyvB.cjs';
@@ -511,6 +511,19 @@ declare class CalibrationRepository {
511
511
  jobs(venueId?: string): Promise<CalibrationJob[]>;
512
512
  }
513
513
 
514
+ /** Pending physical actions and approvals of the link. */
515
+ declare class AssistantRepository {
516
+ private readonly c;
517
+ constructor(c: RepositoryContext);
518
+ /** Newest first, with codes for a person. */
519
+ confirmations(): Promise<AssistantConfirmation[]>;
520
+ refuse(confirmationId: string): Promise<AssistantConfirmation>;
521
+ link(): Promise<AssistantLink>;
522
+ /** Approves the code the assistant showed. Lasts 8 hours, with the scopes of the person signed in here. */
523
+ approve(code: string): Promise<AssistantLinkSession>;
524
+ end(sessionId: string): Promise<void>;
525
+ }
526
+
514
527
  /** Registration of this app instance as a client device, telemetry, commands. */
515
528
  declare class ClientsRepository {
516
529
  private readonly c;
@@ -554,6 +567,18 @@ declare class ContentRepository {
554
567
  /** One page of assets (first pages cache-backed). */
555
568
  list(query?: ContentQuery, cursor?: string): Promise<Page<AssetResource>>;
556
569
  get(assetId: string): Promise<AssetResource>;
570
+ /**
571
+ * The first asset whose `name` equals `name` exactly (case-sensitive), or `null` when there is none.
572
+ *
573
+ * Asks the server with `q` = `name` (a case-insensitive substring match), keeps exact matches only and reads more
574
+ * pages while needed; `type` / `tag` / `status` narrow it as in `list`. Several assets with the name: the first in
575
+ * the server's order wins. Offline, the first page comes from the cache as in `list`. Added in 1.2.0.
576
+ */
577
+ findAssetByName(name: string, filter?: {
578
+ type?: string;
579
+ tag?: string;
580
+ status?: string;
581
+ }): Promise<AssetResource | null>;
557
582
  /** Starts a resumable upload creating an asset (await `task.done`). */
558
583
  upload(source: ContentSource | Uint8Array, o?: {
559
584
  asset?: AssetCreateRequest;
@@ -877,7 +902,7 @@ declare class VenuesRepository {
877
902
  }
878
903
 
879
904
  /** SDK version (User-Agent / hello). */
880
- declare const FREEDOME_CLIENT_VERSION = "1.1.0";
905
+ declare const FREEDOME_CLIENT_VERSION = "1.2.0";
881
906
  /** Connection states (02f §7.1). */
882
907
  type ConnectionState = 'idle' | 'negotiating' | 'incompatible' | 'authenticating' | 'unauthorized' | 'online' | 'degraded' | 'reconnecting' | 'resyncing' | 'offline' | 'closed';
883
908
  /** Client options. */
@@ -927,6 +952,7 @@ declare class FreedomeClient {
927
952
  readonly playback: PlaybackRepository;
928
953
  readonly content: ContentRepository;
929
954
  readonly osc: OscRepository;
955
+ readonly assistant: AssistantRepository;
930
956
  readonly clients: ClientsRepository;
931
957
  readonly audio: AudioRepository;
932
958
  readonly audioReactive: AudioReactiveRepository;
@@ -1187,4 +1213,4 @@ declare function base64(bytes: Uint8Array): string;
1187
1213
  */
1188
1214
  declare const PACKAGE_NAME = "@freedome/client";
1189
1215
 
1190
- export { ApiCaller, type AudioAnalysisFrame, type AudioAnalysisSettings, type AudioAnalysisState, type AudioDevice, type AudioDeviceKind, type AudioDevicePatch, type AudioDeviceSweep, type AudioDeviceSweepJob, type AudioDeviceTest, type AudioDeviceTestResult, type AudioLayout, type AudioLevels, type AudioMode, type AudioOnset, type AudioPreset, type AudioPresetInput, type AudioPresetSummary, AudioReactiveRepository, type AudioReactiveScene, type AudioReactiveSceneInput, type AudioReactiveState, AudioRepository, type AudioRoleZones, type AudioSession, type AudioSessionStart, type AudioState, type AudioTargets, type AudioZone, type AudioZoneInput, type AudioZonePatch, BackoffPolicy, CALIBRATION_FILE_TYPES, CacheStore, CalibrationRepository, CallOptions, type CaptureFrame, ChannelWelcome, ClientsRepository, type ConnectionState, type ContentChange, type ContentQuery, ContentRepository, ContentSource, Credentials, type DisplayState, Emitter, EngineRepository, EventHub, FREEDOME_CLIENT_VERSION, FreedomeClient, type FreedomeClientInit, type FreedomeClientOptions, type FreedomeCredentials, FreedomeEndpoint, FreedomeLogger, FreedomeResponse, FreedomeTransportFactory, GRAPHQL_EVENTS_SUBSCRIPTION, GRAPHQL_OPERATION, GRAPHQL_WS_SUBPROTOCOL, type Gateway, type GatewayPatch, type GatewayTestResult, GatewaysRepository, type GeneratorMulti, GeneratorSession, type GeneratorSettings, type GeneratorState, GraphqlClient, GraphqlWsChannel, InMemoryTokenStore, MessageSocket, NO_SESSION, OfflinePolicy, type OscArg, type OscMessage, OscRepository, OutboxOutcome, OutboxStore, PACKAGE_NAME, Page, type PlayTarget, PlayTargets, PlaybackRepository, type PlaybackSnapshot, PlayerHandle, RealtimeChannel, RealtimeClosed, RealtimeConnector, RealtimeHello, RealtimeResult, RealtimeTransport, RepositoryContext, Resync, type Session, Sha256, ShowParts, SocketIoChannel, type SourcePosition, type StoredTokens, type TextureSource, type TokenStore, Unsubscribe, type UploadCapabilities, UploadPurpose, UploadTask, VenuesRepository, Versioned, WatchObserver, WsChannel, audioSessionEnded, base64, can, defaultTransports, multipart, oscArg, scopesOfRole, sessionFromPrincipal, sessionFromTokens, sha256Hex, storedTokensOf, uuidV7 };
1216
+ export { ApiCaller, AssistantRepository, type AudioAnalysisFrame, type AudioAnalysisSettings, type AudioAnalysisState, type AudioDevice, type AudioDeviceKind, type AudioDevicePatch, type AudioDeviceSweep, type AudioDeviceSweepJob, type AudioDeviceTest, type AudioDeviceTestResult, type AudioLayout, type AudioLevels, type AudioMode, type AudioOnset, type AudioPreset, type AudioPresetInput, type AudioPresetSummary, AudioReactiveRepository, type AudioReactiveScene, type AudioReactiveSceneInput, type AudioReactiveState, AudioRepository, type AudioRoleZones, type AudioSession, type AudioSessionStart, type AudioState, type AudioTargets, type AudioZone, type AudioZoneInput, type AudioZonePatch, BackoffPolicy, CALIBRATION_FILE_TYPES, CacheStore, CalibrationRepository, CallOptions, type CaptureFrame, ChannelWelcome, ClientsRepository, type ConnectionState, type ContentChange, type ContentQuery, ContentRepository, ContentSource, Credentials, type DisplayState, Emitter, EngineRepository, EventHub, FREEDOME_CLIENT_VERSION, FreedomeClient, type FreedomeClientInit, type FreedomeClientOptions, type FreedomeCredentials, FreedomeEndpoint, FreedomeLogger, FreedomeResponse, FreedomeTransportFactory, GRAPHQL_EVENTS_SUBSCRIPTION, GRAPHQL_OPERATION, GRAPHQL_WS_SUBPROTOCOL, type Gateway, type GatewayPatch, type GatewayTestResult, GatewaysRepository, type GeneratorMulti, GeneratorSession, type GeneratorSettings, type GeneratorState, GraphqlClient, GraphqlWsChannel, InMemoryTokenStore, MessageSocket, NO_SESSION, OfflinePolicy, type OscArg, type OscMessage, OscRepository, OutboxOutcome, OutboxStore, PACKAGE_NAME, Page, type PlayTarget, PlayTargets, PlaybackRepository, type PlaybackSnapshot, PlayerHandle, RealtimeChannel, RealtimeClosed, RealtimeConnector, RealtimeHello, RealtimeResult, RealtimeTransport, RepositoryContext, Resync, type Session, Sha256, ShowParts, SocketIoChannel, type SourcePosition, type StoredTokens, type TextureSource, type TokenStore, Unsubscribe, type UploadCapabilities, UploadPurpose, UploadTask, VenuesRepository, Versioned, WatchObserver, WsChannel, audioSessionEnded, base64, can, defaultTransports, multipart, oscArg, scopesOfRole, sessionFromPrincipal, sessionFromTokens, sha256Hex, storedTokensOf, uuidV7 };
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { A as ApiCaller, R as RepositoryContext, W as WatchObserver, U as Unsubscribe, V as Versioned, E as Emitter, P as Page, C as ContentSource, a as UploadTask, b as UploadPurpose, c as RealtimeTransport, O as OfflinePolicy, d as CacheStore, e as OutboxStore, F as FreedomeLogger, f as RealtimeConnector, g as OutboxOutcome, h as EventHub, i as CallOptions, j as RealtimeChannel, k as Resync, l as RealtimeClosed, m as RealtimeHello, n as RealtimeResult, o as ChannelWelcome } from './discovery-BkrBFXwA.js';
2
2
  export { B as BlobContentSource, p as BytesContentSource, q as CachedValue, r as CompositeDiscovery, D as DEFAULT_OFFLINE_POLICY, s as DiscoveredDome, t as Discovery, I as InMemoryCacheStore, u as InMemoryOutboxStore, L as LogLevel, v as LogRecord, M as MAX_UPLOAD_CHUNK, w as OutboxEntry, S as StaticDiscovery, x as UploadProgress, y as UploadResult, z as UploadTaskState, G as isAuthFailure, H as nextValue, J as probe, K as readAllPages, N as readPage } from './discovery-BkrBFXwA.js';
3
- import { Principal, TokenSet, ApiOperation, OperationBody, OperationResponse, CalibrationJob, CalibrationState, ClientRegistration, ClientDevice, ClientTelemetry, AssetResource, AssetCreateRequest, ImportRequest, Job, ShowResource, StorageStats, ShowSummary, ShowInput, UploadStatus, EngineStatus, DisplayResource, PlayerState, AppPayload, ActiveShowState, ParameterInfo, VenueOutput, Venue, VenueInput, ServerInfo, SemVer, FreedomeEvent } from '@freedome/protocol';
3
+ import { Principal, TokenSet, ApiOperation, OperationBody, OperationResponse, CalibrationJob, CalibrationState, AssistantConfirmation, AssistantLink, AssistantLinkSession, ClientRegistration, ClientDevice, ClientTelemetry, AssetResource, AssetCreateRequest, ImportRequest, Job, ShowResource, StorageStats, ShowSummary, ShowInput, UploadStatus, EngineStatus, DisplayResource, PlayerState, AppPayload, ActiveShowState, ParameterInfo, VenueOutput, Venue, VenueInput, ServerInfo, SemVer, FreedomeEvent } from '@freedome/protocol';
4
4
  export { ApiOperation, DomeTopics, EventKinds, FreedomeEvent, Operations, ProtocolVersions, SemVer } from '@freedome/protocol';
5
5
  import { F as FreedomeEndpoint, a as FreedomeTransportFactory, b as FreedomeResponse, M as MessageSocket } from './transport-dvmDQyvB.js';
6
6
  export { c as FetchTransport, d as FreedomeRequest, e as FreedomeTransport, f as MessageSocketConnector, P as PairingLink, W as WebSocketCtor, g as WebSocketLike, r as requestUrl, w as webSocketConnector } from './transport-dvmDQyvB.js';
@@ -511,6 +511,19 @@ declare class CalibrationRepository {
511
511
  jobs(venueId?: string): Promise<CalibrationJob[]>;
512
512
  }
513
513
 
514
+ /** Pending physical actions and approvals of the link. */
515
+ declare class AssistantRepository {
516
+ private readonly c;
517
+ constructor(c: RepositoryContext);
518
+ /** Newest first, with codes for a person. */
519
+ confirmations(): Promise<AssistantConfirmation[]>;
520
+ refuse(confirmationId: string): Promise<AssistantConfirmation>;
521
+ link(): Promise<AssistantLink>;
522
+ /** Approves the code the assistant showed. Lasts 8 hours, with the scopes of the person signed in here. */
523
+ approve(code: string): Promise<AssistantLinkSession>;
524
+ end(sessionId: string): Promise<void>;
525
+ }
526
+
514
527
  /** Registration of this app instance as a client device, telemetry, commands. */
515
528
  declare class ClientsRepository {
516
529
  private readonly c;
@@ -554,6 +567,18 @@ declare class ContentRepository {
554
567
  /** One page of assets (first pages cache-backed). */
555
568
  list(query?: ContentQuery, cursor?: string): Promise<Page<AssetResource>>;
556
569
  get(assetId: string): Promise<AssetResource>;
570
+ /**
571
+ * The first asset whose `name` equals `name` exactly (case-sensitive), or `null` when there is none.
572
+ *
573
+ * Asks the server with `q` = `name` (a case-insensitive substring match), keeps exact matches only and reads more
574
+ * pages while needed; `type` / `tag` / `status` narrow it as in `list`. Several assets with the name: the first in
575
+ * the server's order wins. Offline, the first page comes from the cache as in `list`. Added in 1.2.0.
576
+ */
577
+ findAssetByName(name: string, filter?: {
578
+ type?: string;
579
+ tag?: string;
580
+ status?: string;
581
+ }): Promise<AssetResource | null>;
557
582
  /** Starts a resumable upload creating an asset (await `task.done`). */
558
583
  upload(source: ContentSource | Uint8Array, o?: {
559
584
  asset?: AssetCreateRequest;
@@ -877,7 +902,7 @@ declare class VenuesRepository {
877
902
  }
878
903
 
879
904
  /** SDK version (User-Agent / hello). */
880
- declare const FREEDOME_CLIENT_VERSION = "1.1.0";
905
+ declare const FREEDOME_CLIENT_VERSION = "1.2.0";
881
906
  /** Connection states (02f §7.1). */
882
907
  type ConnectionState = 'idle' | 'negotiating' | 'incompatible' | 'authenticating' | 'unauthorized' | 'online' | 'degraded' | 'reconnecting' | 'resyncing' | 'offline' | 'closed';
883
908
  /** Client options. */
@@ -927,6 +952,7 @@ declare class FreedomeClient {
927
952
  readonly playback: PlaybackRepository;
928
953
  readonly content: ContentRepository;
929
954
  readonly osc: OscRepository;
955
+ readonly assistant: AssistantRepository;
930
956
  readonly clients: ClientsRepository;
931
957
  readonly audio: AudioRepository;
932
958
  readonly audioReactive: AudioReactiveRepository;
@@ -1187,4 +1213,4 @@ declare function base64(bytes: Uint8Array): string;
1187
1213
  */
1188
1214
  declare const PACKAGE_NAME = "@freedome/client";
1189
1215
 
1190
- export { ApiCaller, type AudioAnalysisFrame, type AudioAnalysisSettings, type AudioAnalysisState, type AudioDevice, type AudioDeviceKind, type AudioDevicePatch, type AudioDeviceSweep, type AudioDeviceSweepJob, type AudioDeviceTest, type AudioDeviceTestResult, type AudioLayout, type AudioLevels, type AudioMode, type AudioOnset, type AudioPreset, type AudioPresetInput, type AudioPresetSummary, AudioReactiveRepository, type AudioReactiveScene, type AudioReactiveSceneInput, type AudioReactiveState, AudioRepository, type AudioRoleZones, type AudioSession, type AudioSessionStart, type AudioState, type AudioTargets, type AudioZone, type AudioZoneInput, type AudioZonePatch, BackoffPolicy, CALIBRATION_FILE_TYPES, CacheStore, CalibrationRepository, CallOptions, type CaptureFrame, ChannelWelcome, ClientsRepository, type ConnectionState, type ContentChange, type ContentQuery, ContentRepository, ContentSource, Credentials, type DisplayState, Emitter, EngineRepository, EventHub, FREEDOME_CLIENT_VERSION, FreedomeClient, type FreedomeClientInit, type FreedomeClientOptions, type FreedomeCredentials, FreedomeEndpoint, FreedomeLogger, FreedomeResponse, FreedomeTransportFactory, GRAPHQL_EVENTS_SUBSCRIPTION, GRAPHQL_OPERATION, GRAPHQL_WS_SUBPROTOCOL, type Gateway, type GatewayPatch, type GatewayTestResult, GatewaysRepository, type GeneratorMulti, GeneratorSession, type GeneratorSettings, type GeneratorState, GraphqlClient, GraphqlWsChannel, InMemoryTokenStore, MessageSocket, NO_SESSION, OfflinePolicy, type OscArg, type OscMessage, OscRepository, OutboxOutcome, OutboxStore, PACKAGE_NAME, Page, type PlayTarget, PlayTargets, PlaybackRepository, type PlaybackSnapshot, PlayerHandle, RealtimeChannel, RealtimeClosed, RealtimeConnector, RealtimeHello, RealtimeResult, RealtimeTransport, RepositoryContext, Resync, type Session, Sha256, ShowParts, SocketIoChannel, type SourcePosition, type StoredTokens, type TextureSource, type TokenStore, Unsubscribe, type UploadCapabilities, UploadPurpose, UploadTask, VenuesRepository, Versioned, WatchObserver, WsChannel, audioSessionEnded, base64, can, defaultTransports, multipart, oscArg, scopesOfRole, sessionFromPrincipal, sessionFromTokens, sha256Hex, storedTokensOf, uuidV7 };
1216
+ export { ApiCaller, AssistantRepository, type AudioAnalysisFrame, type AudioAnalysisSettings, type AudioAnalysisState, type AudioDevice, type AudioDeviceKind, type AudioDevicePatch, type AudioDeviceSweep, type AudioDeviceSweepJob, type AudioDeviceTest, type AudioDeviceTestResult, type AudioLayout, type AudioLevels, type AudioMode, type AudioOnset, type AudioPreset, type AudioPresetInput, type AudioPresetSummary, AudioReactiveRepository, type AudioReactiveScene, type AudioReactiveSceneInput, type AudioReactiveState, AudioRepository, type AudioRoleZones, type AudioSession, type AudioSessionStart, type AudioState, type AudioTargets, type AudioZone, type AudioZoneInput, type AudioZonePatch, BackoffPolicy, CALIBRATION_FILE_TYPES, CacheStore, CalibrationRepository, CallOptions, type CaptureFrame, ChannelWelcome, ClientsRepository, type ConnectionState, type ContentChange, type ContentQuery, ContentRepository, ContentSource, Credentials, type DisplayState, Emitter, EngineRepository, EventHub, FREEDOME_CLIENT_VERSION, FreedomeClient, type FreedomeClientInit, type FreedomeClientOptions, type FreedomeCredentials, FreedomeEndpoint, FreedomeLogger, FreedomeResponse, FreedomeTransportFactory, GRAPHQL_EVENTS_SUBSCRIPTION, GRAPHQL_OPERATION, GRAPHQL_WS_SUBPROTOCOL, type Gateway, type GatewayPatch, type GatewayTestResult, GatewaysRepository, type GeneratorMulti, GeneratorSession, type GeneratorSettings, type GeneratorState, GraphqlClient, GraphqlWsChannel, InMemoryTokenStore, MessageSocket, NO_SESSION, OfflinePolicy, type OscArg, type OscMessage, OscRepository, OutboxOutcome, OutboxStore, PACKAGE_NAME, Page, type PlayTarget, PlayTargets, PlaybackRepository, type PlaybackSnapshot, PlayerHandle, RealtimeChannel, RealtimeClosed, RealtimeConnector, RealtimeHello, RealtimeResult, RealtimeTransport, RepositoryContext, Resync, type Session, Sha256, ShowParts, SocketIoChannel, type SourcePosition, type StoredTokens, type TextureSource, type TokenStore, Unsubscribe, type UploadCapabilities, UploadPurpose, UploadTask, VenuesRepository, Versioned, WatchObserver, WsChannel, audioSessionEnded, base64, can, defaultTransports, multipart, oscArg, scopesOfRole, sessionFromPrincipal, sessionFromTokens, sha256Hex, storedTokensOf, uuidV7 };