@nxtedition/types 23.1.2 → 23.1.3

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.
Files changed (39) hide show
  1. package/dist/app.d.ts +7 -1
  2. package/dist/common/index.d.ts +1 -0
  3. package/dist/common/index.js +1 -0
  4. package/dist/common/panel-property.d.ts +2 -29
  5. package/dist/common/render-scene.d.ts +72 -12
  6. package/dist/common/schema-property.d.ts +36 -4
  7. package/dist/common/settings.d.ts +61 -41
  8. package/dist/common/settings.js +18 -1
  9. package/dist/common/widget.d.ts +16 -0
  10. package/dist/common/widget.js +1 -0
  11. package/dist/nxtpression.d.ts +409 -129
  12. package/dist/records/domains/condition.d.ts +1 -1
  13. package/dist/records/domains/event.d.ts +4 -3
  14. package/dist/records/domains/index.d.ts +5 -1
  15. package/dist/records/domains/index.js +2 -0
  16. package/dist/records/domains/ingestschedule.d.ts +1 -1
  17. package/dist/records/domains/media.d.ts +4 -0
  18. package/dist/records/domains/panel.d.ts +7 -19
  19. package/dist/records/domains/publish/file-legacy.d.ts +1 -1
  20. package/dist/records/domains/render.d.ts +54 -3
  21. package/dist/records/domains/schema.d.ts +21 -0
  22. package/dist/records/domains/schema.js +1 -0
  23. package/dist/records/domains/search.d.ts +1 -1
  24. package/dist/records/domains/stream.d.ts +80 -0
  25. package/dist/records/domains/stream.js +1 -0
  26. package/dist/records/domains/template.d.ts +2 -0
  27. package/dist/records/exact/asset.d.ts +17 -7
  28. package/dist/records/index.d.ts +1 -1
  29. package/dist/records/utils.d.ts +5 -1
  30. package/dist/records/validate/assert-guard.js +8967 -5235
  31. package/dist/records/validate/assert.js +8924 -5185
  32. package/dist/records/validate/is.js +153 -104
  33. package/dist/records/validate/schemas.js +4983 -1786
  34. package/dist/records/validate/stringify.js +748 -163
  35. package/dist/records/validate/utils.d.ts +1 -1
  36. package/dist/records/validate/utils.js +2 -2
  37. package/dist/records/validate/validate-equals.js +12609 -7864
  38. package/dist/records/validate/validate.js +8193 -5081
  39. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import type { SearchCondition } from '../../common';
1
+ import type { SearchCondition } from '../../common/search.ts';
2
2
  export interface ConditionDomainRecords {
3
3
  ":condition": ConditionDomainRecord;
4
4
  }
@@ -12,9 +12,9 @@ export interface EventDomainRecords {
12
12
  ":event.props?": EventPropsRecord;
13
13
  }
14
14
  export interface EventRecord {
15
- start?: number;
16
- end?: number;
17
- duration?: number;
15
+ start?: number | null;
16
+ end?: number | null;
17
+ duration?: number | null;
18
18
  text?: string;
19
19
  lang?: string;
20
20
  style?: string;
@@ -26,6 +26,7 @@ export interface EventTemplateRecord {
26
26
  layout?: {
27
27
  title?: string;
28
28
  };
29
+ controller?: string;
29
30
  }
30
31
  export interface EventDurationRecord {
31
32
  scheduled?: number;
@@ -35,11 +35,13 @@ import type { RenderPresetDomainRecords } from './render-preset.ts';
35
35
  import type { RenderDomainRecords } from './render.ts';
36
36
  import type { RevsDomainRecords } from './revs.ts';
37
37
  import type { RoleDomainRecords } from './role.ts';
38
+ import type { SchemaDomainRecords } from './schema.ts';
38
39
  import type { ScriptDomainRecords } from './script.ts';
39
40
  import type { SearchDomainRecords } from './search.ts';
40
41
  import type { SettingsDomainRecords } from './settings.ts';
41
42
  import type { ShotboxDomainRecords } from './shotbox.ts';
42
43
  import type { StoryboardDomainRecords } from './storyboard.ts';
44
+ import type { StreamDomainRecords } from './stream.ts';
43
45
  import type { SubtitleStyleDomainRecords } from './subtitle-style.ts';
44
46
  import type { SubtitleDomainRecords } from './subtitle.ts';
45
47
  import type { TemplateDomainRecords } from './template.ts';
@@ -84,11 +86,13 @@ export * from './render-preset.ts';
84
86
  export * from './render.ts';
85
87
  export * from './revs.ts';
86
88
  export * from './role.ts';
89
+ export * from './schema.ts';
87
90
  export * from './script.ts';
88
91
  export * from './search.ts';
89
92
  export * from './settings.ts';
90
93
  export * from './shotbox.ts';
91
94
  export * from './storyboard.ts';
95
+ export * from './stream.ts';
92
96
  export * from './subtitle-style.ts';
93
97
  export * from './subtitle.ts';
94
98
  export * from './template.ts';
@@ -96,5 +100,5 @@ export * from './user-notification-status.ts';
96
100
  export * from './user-notification.ts';
97
101
  export * from './user.ts';
98
102
  export * from './username.ts';
99
- export interface DomainRecords extends AssetDomainRecords, AuthDomainRecords, BundleDomainRecords, CalendarEventDomainRecords, CloneDomainRecords, CommentReactionDomainRecords, CommentReadMarkDomainRecords, CommentDomainRecords, ConditionDomainRecords, ConnectionDomainRecords, ContactDomainRecords, DeepstreamDomainRecords, DesignDomainRecords, DeviceDomainRecords, EditDomainRecords, EventDomainRecords, FileDomainRecords, FolderDomainRecords, GeneralDomainRecords, HarvestDomainRecords, IngestclipDomainRecords, IngestScheduleDomainRecords, MediaDomainRecords, MonitorDomainRecords, NoteDomainRecords, PanelDomainRecords, PermissionDomainRecords, PipelinePresetDomainRecords, PipelineDomainRecords, PlanningDomainRecords, PrompterDomainRecords, PublishDomainRecords, PublishedDomainRecords, RenderPresetDomainRecords, RenderDomainRecords, RevsDomainRecords, RoleDomainRecords, ScriptDomainRecords, SearchDomainRecords, SettingsDomainRecords, ShotboxDomainRecords, StoryboardDomainRecords, SubtitleStyleDomainRecords, SubtitleDomainRecords, TemplateDomainRecords, UserNotificationStatusDomainRecords, UserNotificationDomainRecords, UserDomainRecords, UsernameDomainRecords {
103
+ export interface DomainRecords extends AssetDomainRecords, AuthDomainRecords, BundleDomainRecords, CalendarEventDomainRecords, CloneDomainRecords, CommentReactionDomainRecords, CommentReadMarkDomainRecords, CommentDomainRecords, ConditionDomainRecords, ConnectionDomainRecords, ContactDomainRecords, DeepstreamDomainRecords, DesignDomainRecords, DeviceDomainRecords, EditDomainRecords, EventDomainRecords, FileDomainRecords, FolderDomainRecords, GeneralDomainRecords, HarvestDomainRecords, IngestclipDomainRecords, IngestScheduleDomainRecords, MediaDomainRecords, MonitorDomainRecords, NoteDomainRecords, PanelDomainRecords, PermissionDomainRecords, PipelinePresetDomainRecords, PipelineDomainRecords, PlanningDomainRecords, PrompterDomainRecords, PublishDomainRecords, PublishedDomainRecords, RenderPresetDomainRecords, RenderDomainRecords, RevsDomainRecords, RoleDomainRecords, SchemaDomainRecords, ScriptDomainRecords, SearchDomainRecords, SettingsDomainRecords, ShotboxDomainRecords, StoryboardDomainRecords, StreamDomainRecords, SubtitleStyleDomainRecords, SubtitleDomainRecords, TemplateDomainRecords, UserNotificationStatusDomainRecords, UserNotificationDomainRecords, UserDomainRecords, UsernameDomainRecords {
100
104
  }
@@ -35,11 +35,13 @@ export * from "./render-preset.js";
35
35
  export * from "./render.js";
36
36
  export * from "./revs.js";
37
37
  export * from "./role.js";
38
+ export * from "./schema.js";
38
39
  export * from "./script.js";
39
40
  export * from "./search.js";
40
41
  export * from "./settings.js";
41
42
  export * from "./shotbox.js";
42
43
  export * from "./storyboard.js";
44
+ export * from "./stream.js";
43
45
  export * from "./subtitle-style.js";
44
46
  export * from "./subtitle.js";
45
47
  export * from "./template.js";
@@ -1,4 +1,4 @@
1
- import type { Nxtpression } from '../../common';
1
+ import type { Nxtpression } from '../../common/nxtpression.ts';
2
2
  export interface IngestScheduleDomainRecords {
3
3
  ":ingestschedule": IngestScheduleDomainRecord;
4
4
  ":ingestschedule.stats?": IngestScheduleDomainStatsRecord;
@@ -11,6 +11,7 @@ export interface MediaDomainRecords {
11
11
  ":media.probe?": MediaProbeRecord;
12
12
  ":media.updateSubtitles?": MediaDomainUpdateSubtitlesRecord;
13
13
  ":media.updateGraphics?": MediaDomainUpdateGraphicsRecord;
14
+ ":media.revisions": MediaDomainRevisionsRecord;
14
15
  }
15
16
  export type MediaSourceRecord = RenderSceneObject;
16
17
  export interface MediaDomainConsolidateRecord {
@@ -68,3 +69,6 @@ export interface MediaDomainUpdateSubtitlesRecord {
68
69
  export interface MediaDomainUpdateGraphicsRecord {
69
70
  [key: string]: unknown;
70
71
  }
72
+ export interface MediaDomainRevisionsRecord {
73
+ [revisionId: string]: RenderSceneObject;
74
+ }
@@ -1,9 +1,13 @@
1
- import type { Nxtpression, PanelProperty } from '../../common/index.ts';
1
+ import type { Nxtpression, PanelProperty, WidgetLayout } from '../../common/index.ts';
2
2
  export interface PanelDomainRecords {
3
3
  ":panel": PanelDomainPanelRecord;
4
4
  }
5
5
  export interface PanelDomainPanelRecord {
6
6
  title?: string;
7
+ /**
8
+ * - If an array: interpreted as a list of supported asset types
9
+ * - If a string: interpreted as the ID of a search which contains supported assets
10
+ */
7
11
  supports?: string[] | string;
8
12
  priority?: number;
9
13
  editorPriority?: number;
@@ -11,25 +15,9 @@ export interface PanelDomainPanelRecord {
11
15
  [key: string]: PanelProperty;
12
16
  };
13
17
  layout?: {
14
- panel?: PanelLayout;
15
- editor?: PanelLayout;
18
+ panel?: WidgetLayout;
19
+ editor?: WidgetLayout;
16
20
  };
17
21
  filter?: Nxtpression;
18
22
  expand?: Nxtpression;
19
23
  }
20
- export type PanelLayout = string | PanelLayoutDivider | PanelLayoutItem | PanelLayout[];
21
- export interface PanelLayoutItem {
22
- property: string;
23
- width?: string | number;
24
- widget?: LayoutWidget;
25
- }
26
- export interface PanelLayoutDivider {
27
- type: "divider";
28
- title?: string;
29
- }
30
- export type LayoutWidget = WidgetType | WidgetItem;
31
- export type WidgetType = "default" | "assetTypes" | "assetTags" | "geopoint" | "poster" | "textarea" | "tags";
32
- export interface WidgetItem {
33
- type: WidgetType;
34
- readOnly?: boolean;
35
- }
@@ -1,4 +1,4 @@
1
- import type { FilePublishDraft, FilePublishPublished } from './file';
1
+ import type { FilePublishDraft, FilePublishPublished } from './file.ts';
2
2
  import type { PublishDef, PublishRecordBase } from './index.ts';
3
3
  export interface FileLegacyPublishDef extends PublishDef<"file"> {
4
4
  publish: FilePublishRecordLegacy;
@@ -61,13 +61,14 @@ export interface RenderDomainStatsRecord {
61
61
  netTransferTotal?: number | null;
62
62
  cpu?: number | null;
63
63
  memory?: number | null;
64
- activeCount: number | null;
65
- totalCount: number | null;
64
+ activeCount?: number | null;
65
+ totalCount?: number | null;
66
66
  gpuStat?: RenderDomainGpuStats | null;
67
67
  cpuStat?: RenderDomainCpuStats | null;
68
68
  netStat?: RenderDomainNetStats | null;
69
69
  limits?: unknown;
70
70
  taskset?: string;
71
+ end?: number | null;
71
72
  }
72
73
  export interface RenderDomainGpuStats {
73
74
  [key: string]: unknown;
@@ -105,10 +106,60 @@ export interface RenderDomainQueryRecord {
105
106
  };
106
107
  }
107
108
  export interface RenderDomainResultRecord {
108
- [key: string]: unknown;
109
+ id?: string;
109
110
  url?: string;
111
+ files?: string[];
112
+ refs?: Array<{
113
+ file?: string;
114
+ offset?: number;
115
+ start?: number | null;
116
+ end?: number | null;
117
+ }>;
110
118
  result?: unknown;
111
119
  error?: null | Record<string, unknown> | Array<Record<string, unknown>>;
120
+ extension?: string;
121
+ extensions?: string[];
122
+ type?: string;
123
+ format?: string;
124
+ formatName?: string;
125
+ mimeType?: string;
126
+ duration?: number;
127
+ estimatedDuration?: number | null;
128
+ video?: {
129
+ codec?: string;
130
+ width?: number;
131
+ height?: number;
132
+ interlaced?: boolean;
133
+ alpha?: boolean | string;
134
+ sar?: string | null;
135
+ dar?: string;
136
+ framerate?: number;
137
+ format?: string;
138
+ encoder?: string;
139
+ codecName?: string;
140
+ } | null;
141
+ audio?: {
142
+ codec?: string;
143
+ codecName?: string;
144
+ format?: string;
145
+ channels?: number;
146
+ samplerate?: number;
147
+ peaksPerSecond?: number;
148
+ streams?: number;
149
+ encoder?: string;
150
+ } | null;
151
+ language?: string;
152
+ transcribe?: {
153
+ engine?: string;
154
+ version?: string;
155
+ language?: string;
156
+ } | null;
157
+ pan?: number[];
158
+ translate?: {
159
+ engine?: string;
160
+ source?: string;
161
+ target?: string;
162
+ } | null;
112
163
  }
113
164
  export interface RenderDomainSchedulersRecord {
114
165
  [key: string]: number[];
@@ -0,0 +1,21 @@
1
+ import type { SchemaProperty, WidgetLayout } from '../../common/index.ts';
2
+ export interface SchemaDomainRecords {
3
+ ":schema": SchemaDomainPanelRecord;
4
+ }
5
+ export interface SchemaDomainPanelRecord {
6
+ title?: string;
7
+ /**
8
+ * - If an array: interpreted as a list of supported asset types
9
+ * - If a string: interpreted as the ID of a search which contains supported assets
10
+ */
11
+ supports?: string[] | string;
12
+ domain?: string;
13
+ priority?: number;
14
+ properties?: {
15
+ [key: string]: SchemaProperty;
16
+ };
17
+ layout?: {
18
+ panel?: WidgetLayout;
19
+ editor?: WidgetLayout;
20
+ };
21
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -1,4 +1,4 @@
1
- import type { SearchCalendarView, SearchCondition, SearchType, SearchView } from '../../common';
1
+ import type { SearchCalendarView, SearchCondition, SearchType, SearchView } from '../../common/search.ts';
2
2
  export interface SearchDomainRecords {
3
3
  ":search": SearchRecord;
4
4
  ":search?": SearchRecordProvided;
@@ -0,0 +1,80 @@
1
+ export interface StreamDomainRecords {
2
+ ":stream": StreamDomainRecord;
3
+ ":stream.stats?": StreamDomainStatsRecord;
4
+ ":stream.ingest": StreamDomainIngestRecord;
5
+ ":stream.ingest.stats?": StreamDomainIngestStatsRecord;
6
+ }
7
+ export interface StreamDomainRecord {
8
+ input?: "webcam" | "screen" | "url" | "push" | `ingest:${string}` | "srt-listener" | "srt-caller";
9
+ url?: string;
10
+ enabled?: boolean;
11
+ endpoints?: {
12
+ enabled?: boolean;
13
+ url?: string;
14
+ asset?: string;
15
+ }[];
16
+ }
17
+ export interface StreamDomainStatsRecord {
18
+ status?: "stopped" | "broadcasting" | "error";
19
+ proxyStatus?: "stopped" | "broadcasting" | "error";
20
+ rtmpUrl?: string;
21
+ rtmpPublishUrl?: string;
22
+ endpoints?: {
23
+ rtmpUrl?: string;
24
+ status?: "broadcasting" | "failed" | "created" | "stopped" | "finished";
25
+ }[];
26
+ error?: string;
27
+ }
28
+ export interface StreamDomainIngestRecord {
29
+ server?: string;
30
+ enabled?: boolean;
31
+ input?: {
32
+ raw_format?: string;
33
+ video_format?: string;
34
+ };
35
+ encoding?: {
36
+ [preset: string]: Record<string, unknown>;
37
+ };
38
+ record?: {
39
+ hls_time?: number;
40
+ hls_list_size?: number;
41
+ mainPreset?: string | {
42
+ video: string;
43
+ audio: string;
44
+ };
45
+ proxyPreset?: string | {
46
+ video: string;
47
+ audio: string;
48
+ };
49
+ main?: Record<string, unknown>;
50
+ proxy?: Record<string, unknown>;
51
+ };
52
+ stream?: {
53
+ mainPreset?: {
54
+ video: string;
55
+ audio: string;
56
+ };
57
+ proxyPreset?: {
58
+ video: string;
59
+ audio: string;
60
+ };
61
+ main?: Record<string, unknown>;
62
+ proxy?: Record<string, unknown>;
63
+ };
64
+ subtitle?: {
65
+ driver?: string;
66
+ template?: string;
67
+ };
68
+ video?: string;
69
+ audio?: string;
70
+ channels?: number;
71
+ audioDelay?: number;
72
+ interlaced?: boolean;
73
+ }
74
+ export interface StreamDomainIngestStatsRecord {
75
+ status?: "starting" | "recording" | "streaming" | "stopping" | "stopped" | "restarting" | "stalled" | "deleted" | "exited" | "not configured" | "initializing" | "error";
76
+ server?: string;
77
+ hostname?: string;
78
+ port?: number;
79
+ error?: string;
80
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -2,7 +2,9 @@ export interface TemplateDomainRecords {
2
2
  ":template": TemplateRecord;
3
3
  }
4
4
  export interface TemplateRecord {
5
+ source?: string;
5
6
  controller?: string;
7
+ type?: string;
6
8
  mixin?: string[];
7
9
  properties?: Record<string, TemplateProperty>;
8
10
  }
@@ -12,6 +12,7 @@ export interface AssetRecords {
12
12
  "asset.tags": AssetTagsRecord;
13
13
  "asset.title": AssetTitleRecord;
14
14
  "asset.types": AssetTypesRecord;
15
+ "asset.http": AssetHttpRecord;
15
16
  }
16
17
  export interface AssetAssigneesRecord {
17
18
  value?: Nxtpression<string[], {
@@ -80,6 +81,11 @@ export interface AssetTypesRecord {
80
81
  icon?: string;
81
82
  };
82
83
  }
84
+ export interface AssetHttpRecord {
85
+ whitelist?: string[] | null;
86
+ blacklist?: string[] | null;
87
+ allowImport?: boolean;
88
+ }
83
89
  export interface AssetDynamicPropertiesProvidedRecord {
84
90
  value?: DynamicProperty[];
85
91
  }
@@ -87,14 +93,18 @@ export interface AssetDynamicPropertiesProvidedRecord {
87
93
  * Dynamic property definition.
88
94
  * Properties come from :panel assets or :schema assets.
89
95
  */
90
- export interface DynamicProperty extends Omit<PanelProperty, "path">, Omit<SchemaProperty, "path"> {
91
- /** ID of the panel asset that defines this property (for panel-sourced properties) */
92
- panel?: string;
93
- /** ID of the schema asset that defines this property (for schema-sourced properties) */
94
- schema?: string;
95
- /** List of asset types this property supports */
96
- supports: string[];
96
+ export type DynamicProperty = DynamicPanelProperty | DynamicSchemaProperty;
97
+ interface DynamicPropertyBase {
97
98
  path: string;
99
+ domain: string;
100
+ }
101
+ interface DynamicPanelProperty extends DynamicPropertyBase, Omit<PanelProperty, "path" | "domain"> {
102
+ /** ID of the panel asset that defines this property */
103
+ panel: string;
104
+ }
105
+ interface DynamicSchemaProperty extends DynamicPropertyBase, Omit<SchemaProperty, "path" | "domain"> {
106
+ /** ID of the schema asset that defines this property */
107
+ schema: string;
98
108
  }
99
109
  type Dynamic = false | string[];
100
110
  export {};
@@ -1,3 +1,3 @@
1
1
  export * from './domains/index.ts';
2
2
  export * from './exact/index.ts';
3
- export type { RecordNameToType, DomainNameToType, Records } from './utils.ts';
3
+ export type { RecordNameToType, DomainNameToType, Records, EmptyObject } from './utils.ts';
@@ -1,4 +1,4 @@
1
- import type { EmptyObject, SingleKeyObject } from 'type-fest';
1
+ import type { SingleKeyObject } from 'type-fest';
2
2
  import type { DomainRecords, DomainRows, ExactRecords } from './index.ts';
3
3
  type ProvidedDomainKeys = keyof DomainRecords & `${string}?`;
4
4
  type DbDomainKeys = Exclude<keyof DomainRecords, ProvidedDomainKeys>;
@@ -16,6 +16,10 @@ type DbExactRecords = {
16
16
  type DbProvidedRecord = {
17
17
  [Name in ProvidedExactKeys as `${Name}${string}`]: GettablePossibleEmpty<ExactRecords[Name]>;
18
18
  };
19
+ declare const emptyObjectSymbol: unique symbol;
20
+ export type EmptyObject = {
21
+ [emptyObjectSymbol]?: never;
22
+ };
19
23
  export interface Records extends KeyedDomainRecords, KeyedProvidedDomainRecords, DbExactRecords, DbProvidedRecord {
20
24
  [key: string]: unknown;
21
25
  }