@freedome/client 1.0.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,7 +1,7 @@
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-BsEQfHam.cjs';
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-BsEQfHam.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, FreedomeEvent } from '@freedome/protocol';
4
- export { ApiOperation, DomeTopics, EventKinds, FreedomeEvent, Operations } from '@freedome/protocol';
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
+ 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, 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
+ 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';
7
7
  export { C as ConflictError, a as ForbiddenError, F as FreedomeError, b as FreedomeErrorOptions, I as IncompatibleServerError, N as NetworkError, c as NotFoundError, O as OfflineError, P as PayloadTooLargeError, Q as QueuedForReplayError, R as RateLimitedError, d as RequestTimeoutError, S as ServerError, T as TlsPinMismatchError, U as UnauthorizedError, e as UnsupportedCapabilityError, f as UnsupportedFormatError, V as ValidationError, g as ValidationIssue, h as errorFromProblem, i as isUnreachable } from './errors-L_bIF-OR.cjs';
@@ -228,17 +228,30 @@ type AudioPresetSummary = OperationResponse<'listAudioPresets'>['items'][number]
228
228
  type AudioSession = OperationResponse<'getAudioSession'>;
229
229
  /** Generator settings (signal, frequencies, gain, duration, targets). */
230
230
  type GeneratorSettings = OperationBody<'setGenerator'>;
231
+ /**
232
+ * NmSoundParams of a MULTI generator (`program`, `target`, `enviroment`, `modulation`, `multi`, `channel`, `audio`,
233
+ * `compatJava`), the object `multi` of an ananta/1.0 programme segment. Contract 1.1.0.
234
+ */
235
+ type GeneratorMulti = Partial<NonNullable<GeneratorSettings['multi']>>;
231
236
  /** Generator state (`running`, settings, startedAt). */
232
237
  type GeneratorState = OperationResponse<'getGenerator'>;
233
238
  /** Spherical source position (listener at the dome centre). */
234
239
  type SourcePosition = OperationBody<'setSourcePosition'>;
235
240
  /** Session targets (devices / zones / speakers). */
236
241
  type AudioTargets = NonNullable<OperationBody<'startAudioSession'>['targets']>;
242
+ /** Preset role → the zones it plays in. Contract 1.1.0. */
243
+ type AudioRoleZones = NonNullable<OperationBody<'startAudioSession'>['roleZones']>;
244
+ /** Resonance sweep request (every member optional; the defaults are the engine's). Contract 1.1.0. */
245
+ type AudioDeviceSweep = Partial<NonNullable<OperationBody<'startAudioDeviceSweep'>>>;
246
+ /** Calibration job of kind `audio-device-sweep`; its member `sweep` holds the result. */
247
+ type AudioDeviceSweepJob = OperationResponse<'startAudioDeviceSweep'>;
237
248
  /** Session start options. */
238
249
  interface AudioSessionStart {
239
250
  presetId: string;
240
251
  gainDb?: number;
241
252
  targets?: AudioTargets;
253
+ /** Zones per role; needs [AudioRepository.supportsAudioControl]. */
254
+ roleZones?: AudioRoleZones;
242
255
  /** Server time to start at (multi-node sync). */
243
256
  at?: Date | string;
244
257
  loop?: boolean;
@@ -256,6 +269,14 @@ declare class AudioRepository {
256
269
  /** @internal */
257
270
  get ctx(): RepositoryContext;
258
271
  private get v();
272
+ /**
273
+ * Whether the server has the audio additions of contract 1.1.0: [pauseSession], [resumeSession], [startDeviceSweep],
274
+ * `roleZones` of [startSession] and the `multi` block of the generator. False against a 1.0 server and while its
275
+ * contract version is not known.
276
+ */
277
+ get supportsAudioControl(): boolean;
278
+ /** @internal A 1.0 server would answer 404 or 422: says why instead. Sent as it is when the version is not known. */
279
+ requireAudioControl(what: string): void;
259
280
  /** The same repository for another venue. */
260
281
  venue(id: string): AudioRepository;
261
282
  /** Mode, master gain / mute, engine status. */
@@ -318,6 +339,14 @@ declare class AudioRepository {
318
339
  device(deviceId: string): Promise<AudioDevice>;
319
340
  /** Operator gain / mute / name / config of a device. */
320
341
  patchDevice(deviceId: string, patch: AudioDevicePatch): Promise<AudioDevice>;
342
+ /**
343
+ * Resonance sweep of one resonator channel of [deviceId] (scope `audio:calibrate`): answers a calibration job of kind
344
+ * `audio-device-sweep`. Follow it with `client.calibration.progress`; progress is elapsed time, not measurement, and
345
+ * the job's `sweep` member holds `peaks`, and with `modelHz` also `partials` and `warnings`, once it has succeeded.
346
+ * There is nothing to apply. 409 while a session uses the device, another sweep runs or the device is in emergency
347
+ * stop; 422 without such a resonator channel. Needs [supportsAudioControl].
348
+ */
349
+ startDeviceSweep(deviceId: string, sweep?: AudioDeviceSweep): Promise<AudioDeviceSweepJob>;
321
350
  /** Ping / tone / self-test / strike of a device. */
322
351
  testDevice(deviceId: string, test?: AudioDeviceTest): Promise<AudioDeviceTestResult>;
323
352
  /** Follows a device (`audioDevice.state`, telemetry patches ≤ 1 Hz). */
@@ -349,6 +378,17 @@ declare class AudioRepository {
349
378
  sessionState(sessionId: string, obs: WatchObserver<AudioSession>, o?: {
350
379
  intervalMs?: number;
351
380
  }): Unsubscribe;
381
+ /**
382
+ * Pauses a session (live control, scope `audio:control`): every engine holds its position, `audioSession.state`
383
+ * follows. A paused session answers as it is; 409 for one that is starting or has ended. Needs
384
+ * [supportsAudioControl].
385
+ */
386
+ pauseSession(sessionId: string): Promise<AudioSession>;
387
+ /**
388
+ * Resumes a paused session from its position (live control, scope `audio:control`). A running session answers as it
389
+ * is; 409 for one that is starting or has ended. Needs [supportsAudioControl].
390
+ */
391
+ resumeSession(sessionId: string): Promise<AudioSession>;
352
392
  /** Stops a session (live control). */
353
393
  stopSession(sessionId: string): Promise<void>;
354
394
  /** The venue's test / MULTI generator (backs the dome sound engine). Close it when done. */
@@ -375,6 +415,18 @@ declare class GeneratorSession {
375
415
  zones?: string[];
376
416
  speakers?: string[];
377
417
  };
418
+ multi?: {
419
+ program?: string;
420
+ target?: number;
421
+ enviroment?: number;
422
+ modulation?: number;
423
+ multi?: number;
424
+ channel?: number;
425
+ audio?: number;
426
+ compatJava: boolean;
427
+ } & {
428
+ [key: string]: unknown;
429
+ };
378
430
  };
379
431
  startedAt?: string;
380
432
  }>;
@@ -397,8 +449,16 @@ declare class GeneratorSession {
397
449
  }): Unsubscribe;
398
450
  /** Reads the state over REST. */
399
451
  get(): Promise<GeneratorState>;
400
- /** Starts the generator or replaces its settings (live control, scope `audio:control`). */
452
+ /**
453
+ * Starts the generator or replaces its settings (live control, scope `audio:control`). The `multi` block needs
454
+ * [AudioRepository.supportsAudioControl].
455
+ */
401
456
  start(settings: GeneratorSettings): Promise<GeneratorState>;
457
+ /**
458
+ * Plays a MULTI programme: `signal: multi` with the block [multi], the same object a phone gives to `setParams`
459
+ * (contract 1.1.0, `docs/audio-control.md`).
460
+ */
461
+ startMulti(multi: GeneratorMulti, o?: Pick<GeneratorSettings, 'gainDb' | 'durationS' | 'targets'>): Promise<GeneratorState>;
402
462
  /** Stops the generator (live control). */
403
463
  stop(): Promise<void>;
404
464
  private refreshQuietly;
@@ -451,6 +511,19 @@ declare class CalibrationRepository {
451
511
  jobs(venueId?: string): Promise<CalibrationJob[]>;
452
512
  }
453
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
+
454
527
  /** Registration of this app instance as a client device, telemetry, commands. */
455
528
  declare class ClientsRepository {
456
529
  private readonly c;
@@ -494,6 +567,18 @@ declare class ContentRepository {
494
567
  /** One page of assets (first pages cache-backed). */
495
568
  list(query?: ContentQuery, cursor?: string): Promise<Page<AssetResource>>;
496
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>;
497
582
  /** Starts a resumable upload creating an asset (await `task.done`). */
498
583
  upload(source: ContentSource | Uint8Array, o?: {
499
584
  asset?: AssetCreateRequest;
@@ -817,7 +902,7 @@ declare class VenuesRepository {
817
902
  }
818
903
 
819
904
  /** SDK version (User-Agent / hello). */
820
- declare const FREEDOME_CLIENT_VERSION = "1.0.0-rc.1";
905
+ declare const FREEDOME_CLIENT_VERSION = "1.2.0";
821
906
  /** Connection states (02f §7.1). */
822
907
  type ConnectionState = 'idle' | 'negotiating' | 'incompatible' | 'authenticating' | 'unauthorized' | 'online' | 'degraded' | 'reconnecting' | 'resyncing' | 'offline' | 'closed';
823
908
  /** Client options. */
@@ -867,6 +952,7 @@ declare class FreedomeClient {
867
952
  readonly playback: PlaybackRepository;
868
953
  readonly content: ContentRepository;
869
954
  readonly osc: OscRepository;
955
+ readonly assistant: AssistantRepository;
870
956
  readonly clients: ClientsRepository;
871
957
  readonly audio: AudioRepository;
872
958
  readonly audioReactive: AudioReactiveRepository;
@@ -900,6 +986,12 @@ declare class FreedomeClient {
900
986
  get userAgent(): string;
901
987
  get endpoint(): FreedomeEndpoint;
902
988
  get server(): ServerInfo | undefined;
989
+ /**
990
+ * Contract version the server reports (`contractVersion` of `GET /info`); undefined before [open], or when the server
991
+ * reports none or an unreadable one. This is how an app tells what a server offers: a 1.0 server has no audio control
992
+ * (`ProtocolVersions.audioControl`, `AudioRepository.supportsAudioControl`).
993
+ */
994
+ get contractVersion(): SemVer | undefined;
903
995
  get state(): ConnectionState;
904
996
  /** Reason of `degraded` / `offline` / `reconnecting`. */
905
997
  get stateReason(): string | undefined;
@@ -1121,4 +1213,4 @@ declare function base64(bytes: Uint8Array): string;
1121
1213
  */
1122
1214
  declare const PACKAGE_NAME = "@freedome/client";
1123
1215
 
1124
- export { ApiCaller, type AudioAnalysisFrame, type AudioAnalysisSettings, type AudioAnalysisState, type AudioDevice, type AudioDeviceKind, type AudioDevicePatch, 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 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, 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,7 +1,7 @@
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-DTV9yp9S.js';
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-DTV9yp9S.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, FreedomeEvent } from '@freedome/protocol';
4
- export { ApiOperation, DomeTopics, EventKinds, FreedomeEvent, Operations } from '@freedome/protocol';
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
+ 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, 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
+ 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';
7
7
  export { C as ConflictError, a as ForbiddenError, F as FreedomeError, b as FreedomeErrorOptions, I as IncompatibleServerError, N as NetworkError, c as NotFoundError, O as OfflineError, P as PayloadTooLargeError, Q as QueuedForReplayError, R as RateLimitedError, d as RequestTimeoutError, S as ServerError, T as TlsPinMismatchError, U as UnauthorizedError, e as UnsupportedCapabilityError, f as UnsupportedFormatError, V as ValidationError, g as ValidationIssue, h as errorFromProblem, i as isUnreachable } from './errors-L_bIF-OR.js';
@@ -228,17 +228,30 @@ type AudioPresetSummary = OperationResponse<'listAudioPresets'>['items'][number]
228
228
  type AudioSession = OperationResponse<'getAudioSession'>;
229
229
  /** Generator settings (signal, frequencies, gain, duration, targets). */
230
230
  type GeneratorSettings = OperationBody<'setGenerator'>;
231
+ /**
232
+ * NmSoundParams of a MULTI generator (`program`, `target`, `enviroment`, `modulation`, `multi`, `channel`, `audio`,
233
+ * `compatJava`), the object `multi` of an ananta/1.0 programme segment. Contract 1.1.0.
234
+ */
235
+ type GeneratorMulti = Partial<NonNullable<GeneratorSettings['multi']>>;
231
236
  /** Generator state (`running`, settings, startedAt). */
232
237
  type GeneratorState = OperationResponse<'getGenerator'>;
233
238
  /** Spherical source position (listener at the dome centre). */
234
239
  type SourcePosition = OperationBody<'setSourcePosition'>;
235
240
  /** Session targets (devices / zones / speakers). */
236
241
  type AudioTargets = NonNullable<OperationBody<'startAudioSession'>['targets']>;
242
+ /** Preset role → the zones it plays in. Contract 1.1.0. */
243
+ type AudioRoleZones = NonNullable<OperationBody<'startAudioSession'>['roleZones']>;
244
+ /** Resonance sweep request (every member optional; the defaults are the engine's). Contract 1.1.0. */
245
+ type AudioDeviceSweep = Partial<NonNullable<OperationBody<'startAudioDeviceSweep'>>>;
246
+ /** Calibration job of kind `audio-device-sweep`; its member `sweep` holds the result. */
247
+ type AudioDeviceSweepJob = OperationResponse<'startAudioDeviceSweep'>;
237
248
  /** Session start options. */
238
249
  interface AudioSessionStart {
239
250
  presetId: string;
240
251
  gainDb?: number;
241
252
  targets?: AudioTargets;
253
+ /** Zones per role; needs [AudioRepository.supportsAudioControl]. */
254
+ roleZones?: AudioRoleZones;
242
255
  /** Server time to start at (multi-node sync). */
243
256
  at?: Date | string;
244
257
  loop?: boolean;
@@ -256,6 +269,14 @@ declare class AudioRepository {
256
269
  /** @internal */
257
270
  get ctx(): RepositoryContext;
258
271
  private get v();
272
+ /**
273
+ * Whether the server has the audio additions of contract 1.1.0: [pauseSession], [resumeSession], [startDeviceSweep],
274
+ * `roleZones` of [startSession] and the `multi` block of the generator. False against a 1.0 server and while its
275
+ * contract version is not known.
276
+ */
277
+ get supportsAudioControl(): boolean;
278
+ /** @internal A 1.0 server would answer 404 or 422: says why instead. Sent as it is when the version is not known. */
279
+ requireAudioControl(what: string): void;
259
280
  /** The same repository for another venue. */
260
281
  venue(id: string): AudioRepository;
261
282
  /** Mode, master gain / mute, engine status. */
@@ -318,6 +339,14 @@ declare class AudioRepository {
318
339
  device(deviceId: string): Promise<AudioDevice>;
319
340
  /** Operator gain / mute / name / config of a device. */
320
341
  patchDevice(deviceId: string, patch: AudioDevicePatch): Promise<AudioDevice>;
342
+ /**
343
+ * Resonance sweep of one resonator channel of [deviceId] (scope `audio:calibrate`): answers a calibration job of kind
344
+ * `audio-device-sweep`. Follow it with `client.calibration.progress`; progress is elapsed time, not measurement, and
345
+ * the job's `sweep` member holds `peaks`, and with `modelHz` also `partials` and `warnings`, once it has succeeded.
346
+ * There is nothing to apply. 409 while a session uses the device, another sweep runs or the device is in emergency
347
+ * stop; 422 without such a resonator channel. Needs [supportsAudioControl].
348
+ */
349
+ startDeviceSweep(deviceId: string, sweep?: AudioDeviceSweep): Promise<AudioDeviceSweepJob>;
321
350
  /** Ping / tone / self-test / strike of a device. */
322
351
  testDevice(deviceId: string, test?: AudioDeviceTest): Promise<AudioDeviceTestResult>;
323
352
  /** Follows a device (`audioDevice.state`, telemetry patches ≤ 1 Hz). */
@@ -349,6 +378,17 @@ declare class AudioRepository {
349
378
  sessionState(sessionId: string, obs: WatchObserver<AudioSession>, o?: {
350
379
  intervalMs?: number;
351
380
  }): Unsubscribe;
381
+ /**
382
+ * Pauses a session (live control, scope `audio:control`): every engine holds its position, `audioSession.state`
383
+ * follows. A paused session answers as it is; 409 for one that is starting or has ended. Needs
384
+ * [supportsAudioControl].
385
+ */
386
+ pauseSession(sessionId: string): Promise<AudioSession>;
387
+ /**
388
+ * Resumes a paused session from its position (live control, scope `audio:control`). A running session answers as it
389
+ * is; 409 for one that is starting or has ended. Needs [supportsAudioControl].
390
+ */
391
+ resumeSession(sessionId: string): Promise<AudioSession>;
352
392
  /** Stops a session (live control). */
353
393
  stopSession(sessionId: string): Promise<void>;
354
394
  /** The venue's test / MULTI generator (backs the dome sound engine). Close it when done. */
@@ -375,6 +415,18 @@ declare class GeneratorSession {
375
415
  zones?: string[];
376
416
  speakers?: string[];
377
417
  };
418
+ multi?: {
419
+ program?: string;
420
+ target?: number;
421
+ enviroment?: number;
422
+ modulation?: number;
423
+ multi?: number;
424
+ channel?: number;
425
+ audio?: number;
426
+ compatJava: boolean;
427
+ } & {
428
+ [key: string]: unknown;
429
+ };
378
430
  };
379
431
  startedAt?: string;
380
432
  }>;
@@ -397,8 +449,16 @@ declare class GeneratorSession {
397
449
  }): Unsubscribe;
398
450
  /** Reads the state over REST. */
399
451
  get(): Promise<GeneratorState>;
400
- /** Starts the generator or replaces its settings (live control, scope `audio:control`). */
452
+ /**
453
+ * Starts the generator or replaces its settings (live control, scope `audio:control`). The `multi` block needs
454
+ * [AudioRepository.supportsAudioControl].
455
+ */
401
456
  start(settings: GeneratorSettings): Promise<GeneratorState>;
457
+ /**
458
+ * Plays a MULTI programme: `signal: multi` with the block [multi], the same object a phone gives to `setParams`
459
+ * (contract 1.1.0, `docs/audio-control.md`).
460
+ */
461
+ startMulti(multi: GeneratorMulti, o?: Pick<GeneratorSettings, 'gainDb' | 'durationS' | 'targets'>): Promise<GeneratorState>;
402
462
  /** Stops the generator (live control). */
403
463
  stop(): Promise<void>;
404
464
  private refreshQuietly;
@@ -451,6 +511,19 @@ declare class CalibrationRepository {
451
511
  jobs(venueId?: string): Promise<CalibrationJob[]>;
452
512
  }
453
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
+
454
527
  /** Registration of this app instance as a client device, telemetry, commands. */
455
528
  declare class ClientsRepository {
456
529
  private readonly c;
@@ -494,6 +567,18 @@ declare class ContentRepository {
494
567
  /** One page of assets (first pages cache-backed). */
495
568
  list(query?: ContentQuery, cursor?: string): Promise<Page<AssetResource>>;
496
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>;
497
582
  /** Starts a resumable upload creating an asset (await `task.done`). */
498
583
  upload(source: ContentSource | Uint8Array, o?: {
499
584
  asset?: AssetCreateRequest;
@@ -817,7 +902,7 @@ declare class VenuesRepository {
817
902
  }
818
903
 
819
904
  /** SDK version (User-Agent / hello). */
820
- declare const FREEDOME_CLIENT_VERSION = "1.0.0-rc.1";
905
+ declare const FREEDOME_CLIENT_VERSION = "1.2.0";
821
906
  /** Connection states (02f §7.1). */
822
907
  type ConnectionState = 'idle' | 'negotiating' | 'incompatible' | 'authenticating' | 'unauthorized' | 'online' | 'degraded' | 'reconnecting' | 'resyncing' | 'offline' | 'closed';
823
908
  /** Client options. */
@@ -867,6 +952,7 @@ declare class FreedomeClient {
867
952
  readonly playback: PlaybackRepository;
868
953
  readonly content: ContentRepository;
869
954
  readonly osc: OscRepository;
955
+ readonly assistant: AssistantRepository;
870
956
  readonly clients: ClientsRepository;
871
957
  readonly audio: AudioRepository;
872
958
  readonly audioReactive: AudioReactiveRepository;
@@ -900,6 +986,12 @@ declare class FreedomeClient {
900
986
  get userAgent(): string;
901
987
  get endpoint(): FreedomeEndpoint;
902
988
  get server(): ServerInfo | undefined;
989
+ /**
990
+ * Contract version the server reports (`contractVersion` of `GET /info`); undefined before [open], or when the server
991
+ * reports none or an unreadable one. This is how an app tells what a server offers: a 1.0 server has no audio control
992
+ * (`ProtocolVersions.audioControl`, `AudioRepository.supportsAudioControl`).
993
+ */
994
+ get contractVersion(): SemVer | undefined;
903
995
  get state(): ConnectionState;
904
996
  /** Reason of `degraded` / `offline` / `reconnecting`. */
905
997
  get stateReason(): string | undefined;
@@ -1121,4 +1213,4 @@ declare function base64(bytes: Uint8Array): string;
1121
1213
  */
1122
1214
  declare const PACKAGE_NAME = "@freedome/client";
1123
1215
 
1124
- export { ApiCaller, type AudioAnalysisFrame, type AudioAnalysisSettings, type AudioAnalysisState, type AudioDevice, type AudioDeviceKind, type AudioDevicePatch, 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 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, 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 };