@nxtedition/types 23.1.6 → 23.1.7
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/common/index.d.ts +2 -0
- package/dist/common/index.js +2 -0
- package/dist/common/panel-property.d.ts +35 -2
- package/dist/common/report.d.ts +85 -0
- package/dist/common/report.js +8 -0
- package/dist/common/rss.d.ts +70 -0
- package/dist/common/rss.js +11 -0
- package/dist/common/schema-property.d.ts +31 -27
- package/dist/nxtpression.d.ts +290 -41
- package/dist/records/domains/connection/index.d.ts +3 -1
- package/dist/records/domains/connection/index.js +1 -0
- package/dist/records/domains/connection/report.d.ts +7 -0
- package/dist/records/domains/connection/report.js +1 -0
- package/dist/records/domains/panel.d.ts +26 -3
- package/dist/records/domains/publish/index.d.ts +3 -1
- package/dist/records/domains/publish/index.js +1 -0
- package/dist/records/domains/publish/report.d.ts +70 -0
- package/dist/records/domains/publish/report.js +1294 -0
- package/dist/records/domains/schema.d.ts +2 -2
- package/dist/records/validate/assert-guard.js +3223 -1710
- package/dist/records/validate/assert.js +3223 -1710
- package/dist/records/validate/is.js +133 -31
- package/dist/records/validate/schemas.js +1805 -695
- package/dist/records/validate/stringify.js +549 -88
- package/dist/records/validate/validate-equals.js +2764 -887
- package/dist/records/validate/validate.js +2000 -750
- package/dist/rpc.d.ts +1 -1
- package/package.json +1 -1
package/dist/nxtpression.d.ts
CHANGED
|
@@ -414,38 +414,6 @@ declare interface AuthDomainRecords {
|
|
|
414
414
|
":auth": AuthDomainRecord;
|
|
415
415
|
}
|
|
416
416
|
|
|
417
|
-
declare interface BaseSchemaProperty<Value = unknown> {
|
|
418
|
-
domain?: string;
|
|
419
|
-
path?: string;
|
|
420
|
-
/** Specifying what type of data will be entered into the field. */
|
|
421
|
-
type?: "array" | "asset" | "boolean" | "datetime" | "number" | "string" | "object" | "rpc" | undefined;
|
|
422
|
-
/** User-friendly title of the property. This will be used as the field's label in the UI. */
|
|
423
|
-
title?: string;
|
|
424
|
-
description?: string;
|
|
425
|
-
/** If present, indicates that the user must specify a value for the asset to be treated as valid. */
|
|
426
|
-
required?: boolean;
|
|
427
|
-
oneOf?: Array<BaseSchemaProperty>;
|
|
428
|
-
anyOf?: Array<BaseSchemaProperty>;
|
|
429
|
-
enum?: ReadonlyArray<Value>;
|
|
430
|
-
widget?: WidgetType | WidgetOptions;
|
|
431
|
-
placeholder?: string;
|
|
432
|
-
helpText?: string;
|
|
433
|
-
invalid?: boolean;
|
|
434
|
-
emptyValue?: Value;
|
|
435
|
-
minItems?: number;
|
|
436
|
-
maxItems?: number;
|
|
437
|
-
items?: BaseSchemaProperty<Value>;
|
|
438
|
-
properties?: Record<string, BaseSchemaProperty<unknown>>;
|
|
439
|
-
computed?: Nxtpression<Value>;
|
|
440
|
-
/** An object specifying where to index the data. Adding this will effectively make the data searchable. */
|
|
441
|
-
index?: {
|
|
442
|
-
/** A string specifying the user-friendly title of the search property. This is what users will see when creating search filters and bookmarks. */
|
|
443
|
-
label: string;
|
|
444
|
-
/** A string specifying where to store the data in the search index. Note that this should be a globally unique value in the system. Typically you'd use `{domain}.{path}` and you should prefer English in camel case */
|
|
445
|
-
path: string;
|
|
446
|
-
};
|
|
447
|
-
}
|
|
448
|
-
|
|
449
417
|
declare interface BundleDomainRecords {
|
|
450
418
|
[":bundle"]: BundleRecord;
|
|
451
419
|
[":bundle.revisions"]: BundleRevisionsRecord;
|
|
@@ -621,6 +589,17 @@ declare interface ContactRecord {
|
|
|
621
589
|
address?: string;
|
|
622
590
|
}
|
|
623
591
|
|
|
592
|
+
/**
|
|
593
|
+
* @link https://oozcitak.github.io/xmlbuilder2/builder-functions.html#settings-related-to-value-conversions
|
|
594
|
+
*/
|
|
595
|
+
declare interface ConvertOptions {
|
|
596
|
+
att?: string;
|
|
597
|
+
ins?: string;
|
|
598
|
+
text?: string;
|
|
599
|
+
cdata?: string;
|
|
600
|
+
comment?: string;
|
|
601
|
+
}
|
|
602
|
+
|
|
624
603
|
declare interface CopyOperation {
|
|
625
604
|
op: 'copy';
|
|
626
605
|
from: string;
|
|
@@ -893,6 +872,10 @@ declare interface EventTemplateRecord {
|
|
|
893
872
|
|
|
894
873
|
declare type ExactRecords = MiscRecords & MediaRecords & AssetRecords & MonitorRecords & StorageRecords;
|
|
895
874
|
|
|
875
|
+
declare type ExpandObject = {
|
|
876
|
+
[key: string]: any;
|
|
877
|
+
} | any[];
|
|
878
|
+
|
|
896
879
|
declare interface FacebookConnectionDef extends ConnectionDef<"facebook"> {
|
|
897
880
|
connection: FacebookConnectionRecord;
|
|
898
881
|
}
|
|
@@ -2192,6 +2175,12 @@ export declare interface NxtpressionNxt {
|
|
|
2192
2175
|
hash(value: unknown): string;
|
|
2193
2176
|
}
|
|
2194
2177
|
|
|
2178
|
+
declare type NxtpressionSchemaProperty<Value = unknown> = {
|
|
2179
|
+
[K in keyof SchemaProperty<Value>]: Nxtpression<SchemaProperty<Value>[K], {
|
|
2180
|
+
id: string;
|
|
2181
|
+
}>;
|
|
2182
|
+
};
|
|
2183
|
+
|
|
2195
2184
|
declare interface NxtStatusMessage {
|
|
2196
2185
|
id: string;
|
|
2197
2186
|
msg: string;
|
|
@@ -2428,21 +2417,77 @@ declare interface PanelDomainPanelRecord {
|
|
|
2428
2417
|
priority?: number;
|
|
2429
2418
|
editorPriority?: number;
|
|
2430
2419
|
properties?: {
|
|
2431
|
-
[key: string]:
|
|
2420
|
+
[key: string]: PanelRootProperty;
|
|
2432
2421
|
};
|
|
2433
2422
|
layout?: {
|
|
2434
2423
|
panel?: WidgetLayout;
|
|
2435
2424
|
editor?: WidgetLayout;
|
|
2425
|
+
csv?: string[] | true;
|
|
2426
|
+
json?: string[] | true;
|
|
2427
|
+
xml?: string[] | true;
|
|
2428
|
+
rss?: string[] | true;
|
|
2436
2429
|
};
|
|
2437
2430
|
filter?: Nxtpression;
|
|
2438
|
-
expand?: Nxtpression
|
|
2431
|
+
expand?: Nxtpression<unknown>;
|
|
2432
|
+
expandSkipEmpty?: boolean;
|
|
2433
|
+
xml?: ReportXmlOptions;
|
|
2434
|
+
rss?: ReportRssOptions;
|
|
2435
|
+
/**
|
|
2436
|
+
* For reports. Only when :publish#expand.type === 'published'.
|
|
2437
|
+
* If an already expanded to :published record is connected to an ingestclip,
|
|
2438
|
+
* expand further on all :published records of type 'event' that were created
|
|
2439
|
+
* during the ingestclip's time range.
|
|
2440
|
+
*
|
|
2441
|
+
* The use case is to find e.g. music that was played during a broadcast of
|
|
2442
|
+
* an ingestclip.
|
|
2443
|
+
*/
|
|
2444
|
+
expandIngestclip?: boolean;
|
|
2445
|
+
/**
|
|
2446
|
+
* For reports, when :publish#expand.type === 'published'.
|
|
2447
|
+
* Due to legacy reasons publishedTypes defaults to ['event'],
|
|
2448
|
+
* if you want all types, set publishedTypes to null.
|
|
2449
|
+
*/
|
|
2450
|
+
publishedTypes?: string[] | null;
|
|
2439
2451
|
}
|
|
2440
2452
|
|
|
2441
2453
|
declare interface PanelDomainRecords {
|
|
2442
2454
|
":panel": PanelDomainPanelRecord;
|
|
2443
2455
|
}
|
|
2444
2456
|
|
|
2445
|
-
declare
|
|
2457
|
+
declare interface PanelProperty<Value = unknown> {
|
|
2458
|
+
type?: "array" | "asset" | "boolean" | "datetime" | "number" | "string" | "object" | "rpc" | undefined;
|
|
2459
|
+
/** User-friendly title of the property. This will be used as the field's label in the UI. */
|
|
2460
|
+
title?: string;
|
|
2461
|
+
description?: string;
|
|
2462
|
+
/** If present, indicates that the user must specify a value for the asset to be treated as valid. */
|
|
2463
|
+
required?: boolean;
|
|
2464
|
+
oneOf?: Array<PanelProperty>;
|
|
2465
|
+
anyOf?: Array<PanelProperty>;
|
|
2466
|
+
enum?: ReadonlyArray<Value>;
|
|
2467
|
+
minItems?: number;
|
|
2468
|
+
maxItems?: number;
|
|
2469
|
+
items?: PanelProperty<Value>;
|
|
2470
|
+
const?: Value;
|
|
2471
|
+
properties?: Record<string, PanelProperty<unknown>>;
|
|
2472
|
+
widget?: WidgetType | WidgetOptions;
|
|
2473
|
+
placeholder?: string;
|
|
2474
|
+
helpText?: string;
|
|
2475
|
+
invalid?: boolean;
|
|
2476
|
+
emptyValue?: Value;
|
|
2477
|
+
}
|
|
2478
|
+
|
|
2479
|
+
declare interface PanelRootProperty<Value = unknown> extends Omit<PanelProperty<Value>, "const"> {
|
|
2480
|
+
domain?: string;
|
|
2481
|
+
path?: string;
|
|
2482
|
+
computed?: Nxtpression<Value>;
|
|
2483
|
+
/** An object specifying where to index the data. Adding this will effectively make the data searchable. */
|
|
2484
|
+
index?: {
|
|
2485
|
+
/** A string specifying the user-friendly title of the search property. This is what users will see when creating search filters and bookmarks. */
|
|
2486
|
+
label: string;
|
|
2487
|
+
/** A string specifying where to store the data in the search index. Note that this should be a globally unique value in the system. Typically you'd use `{domain}.{path}` and you should prefer English in camel case */
|
|
2488
|
+
path: string;
|
|
2489
|
+
};
|
|
2490
|
+
}
|
|
2446
2491
|
|
|
2447
2492
|
declare interface ParagraphNodeContent extends ElementNodeContent {
|
|
2448
2493
|
type: "paragraph";
|
|
@@ -3064,6 +3109,104 @@ declare interface ReplaceOperation {
|
|
|
3064
3109
|
value: any;
|
|
3065
3110
|
}
|
|
3066
3111
|
|
|
3112
|
+
declare interface ReportConnectionDef extends ConnectionDef<"report"> {
|
|
3113
|
+
connection: ReportConnectionRecord;
|
|
3114
|
+
}
|
|
3115
|
+
|
|
3116
|
+
declare interface ReportConnectionRecord extends ConnectionBase {
|
|
3117
|
+
type?: "report";
|
|
3118
|
+
}
|
|
3119
|
+
|
|
3120
|
+
declare interface ReportPublishDef extends PublishDef<"report"> {
|
|
3121
|
+
publish: ReportPublishRecord;
|
|
3122
|
+
stats: ReportPublishStatsRecord;
|
|
3123
|
+
}
|
|
3124
|
+
|
|
3125
|
+
declare type ReportPublishExpandType = "published" | "deadlines" | "recurrence_date_range";
|
|
3126
|
+
|
|
3127
|
+
declare type ReportPublishFormat = "csv" | "json" | "xml" | "rss";
|
|
3128
|
+
|
|
3129
|
+
/**
|
|
3130
|
+
* A report can be downloaded from `/report/${publishId}[/${route}]/report.${format}`.
|
|
3131
|
+
*
|
|
3132
|
+
* Search query parameters:
|
|
3133
|
+
* - `start`: Date string parsable by `new Date()`. Overrides expand.start.
|
|
3134
|
+
* - `end`: Date string parsable by `new Date()`. Overrides expand.end.
|
|
3135
|
+
* - `token`: Unique identifier used to track report progress.
|
|
3136
|
+
*/
|
|
3137
|
+
declare interface ReportPublishRecord extends PublishRecordBase {
|
|
3138
|
+
type?: "report";
|
|
3139
|
+
searchId?: string;
|
|
3140
|
+
/**
|
|
3141
|
+
* If specified, for each search hit, additional rows will be added to the
|
|
3142
|
+
* report, based on the expand type.
|
|
3143
|
+
*
|
|
3144
|
+
* If type: "published", the report will expand with one row per :published
|
|
3145
|
+
* record that refers to the search hit and is within the date range.
|
|
3146
|
+
* The expression context passed to the panel's computed fields
|
|
3147
|
+
* will be extended with a `published` object containing data from the
|
|
3148
|
+
* corresponding :published record. NOTE: By default it will only expand
|
|
3149
|
+
* :published records of type: "event", unless a `filter` expression is
|
|
3150
|
+
* specified on the panel.
|
|
3151
|
+
*
|
|
3152
|
+
* If type: "deadlines", the report will expand with one row per deadline
|
|
3153
|
+
* provided by a search hit's :asset.deadline#value array. The expression
|
|
3154
|
+
* context passed to the panel's computed fields will be extended with a
|
|
3155
|
+
* `deadline` being a Date object corresponding to the deadline value.
|
|
3156
|
+
*
|
|
3157
|
+
* If type: "recurrence_date_range", the report will expand with one row
|
|
3158
|
+
* per date specified by a search hit's :calendarevent record (which could
|
|
3159
|
+
* be a recurrence expression evaluating to multiple dates) that falls within
|
|
3160
|
+
* the specified date range. The expression context passed to the panel's
|
|
3161
|
+
* computed fields will be extended with a `calendarevent` object with
|
|
3162
|
+
* a `start` and `end` Date object.
|
|
3163
|
+
*/
|
|
3164
|
+
expand?: {
|
|
3165
|
+
type?: ReportPublishExpandType | "";
|
|
3166
|
+
start?: string;
|
|
3167
|
+
end?: string;
|
|
3168
|
+
};
|
|
3169
|
+
/** Asset ID */
|
|
3170
|
+
panel?: string;
|
|
3171
|
+
/** The report can be downloaded from `/report/${publishId}[/${route}]`. */
|
|
3172
|
+
route?: string;
|
|
3173
|
+
/** Field name to sort by */
|
|
3174
|
+
sort?: string;
|
|
3175
|
+
/** Sort order */
|
|
3176
|
+
order?: "asc" | "desc";
|
|
3177
|
+
/** Used by the hub, which passes it as filename extension to the download URL */
|
|
3178
|
+
format?: ReportPublishFormat;
|
|
3179
|
+
xml?: ReportXmlOptions;
|
|
3180
|
+
}
|
|
3181
|
+
|
|
3182
|
+
declare interface ReportPublishStatsRecord extends PublishStatsRecordBase {
|
|
3183
|
+
retrieved?: {
|
|
3184
|
+
total?: number;
|
|
3185
|
+
count?: number;
|
|
3186
|
+
};
|
|
3187
|
+
}
|
|
3188
|
+
|
|
3189
|
+
declare interface ReportRssOptions extends Partial<RssOptions> {
|
|
3190
|
+
namespaces?: Record<string, string>;
|
|
3191
|
+
}
|
|
3192
|
+
|
|
3193
|
+
declare interface ReportXmlOptions {
|
|
3194
|
+
options?: XMLBuilderOptions;
|
|
3195
|
+
formatterOptions?: XMLWriterOptions;
|
|
3196
|
+
/**
|
|
3197
|
+
* Should resolve to a JS object representing the root XML schema, as readable by xmlbuilder2.
|
|
3198
|
+
*/
|
|
3199
|
+
rootSchema?: Nxtpression<ExpandObject, {
|
|
3200
|
+
publishId: string;
|
|
3201
|
+
items: unknown[];
|
|
3202
|
+
}>;
|
|
3203
|
+
/**
|
|
3204
|
+
* Should resolve to a JS object representing the XML schema for each item, as readable by xmlbuilder2.
|
|
3205
|
+
* Required for output to be generated.
|
|
3206
|
+
*/
|
|
3207
|
+
itemSchema?: Nxtpression<ExpandObject>;
|
|
3208
|
+
}
|
|
3209
|
+
|
|
3067
3210
|
declare interface ResolvedFilePublishRender extends PublishRenderBase {
|
|
3068
3211
|
name?: string;
|
|
3069
3212
|
path: string;
|
|
@@ -3114,6 +3257,40 @@ declare interface RpcPermission {
|
|
|
3114
3257
|
tags?: undefined;
|
|
3115
3258
|
}
|
|
3116
3259
|
|
|
3260
|
+
declare interface RssAuthor {
|
|
3261
|
+
name?: string;
|
|
3262
|
+
email?: string;
|
|
3263
|
+
link?: string;
|
|
3264
|
+
avatar?: string;
|
|
3265
|
+
}
|
|
3266
|
+
|
|
3267
|
+
declare interface RssOptions {
|
|
3268
|
+
id?: string;
|
|
3269
|
+
title: string;
|
|
3270
|
+
updated?: string | number;
|
|
3271
|
+
generator?: string;
|
|
3272
|
+
language?: string;
|
|
3273
|
+
ttl?: number;
|
|
3274
|
+
stylesheet?: string;
|
|
3275
|
+
feed?: string;
|
|
3276
|
+
feedLinks?: {
|
|
3277
|
+
rss?: string;
|
|
3278
|
+
atom?: string;
|
|
3279
|
+
json?: string;
|
|
3280
|
+
[key: string]: string | undefined;
|
|
3281
|
+
};
|
|
3282
|
+
hub?: string;
|
|
3283
|
+
docs?: string;
|
|
3284
|
+
podcast?: boolean;
|
|
3285
|
+
category?: string;
|
|
3286
|
+
author?: RssAuthor;
|
|
3287
|
+
link?: string;
|
|
3288
|
+
description?: string;
|
|
3289
|
+
image?: string;
|
|
3290
|
+
favicon?: string;
|
|
3291
|
+
copyright?: string;
|
|
3292
|
+
}
|
|
3293
|
+
|
|
3117
3294
|
declare interface SchemaDomainPanelRecord {
|
|
3118
3295
|
title?: string;
|
|
3119
3296
|
/**
|
|
@@ -3124,7 +3301,7 @@ declare interface SchemaDomainPanelRecord {
|
|
|
3124
3301
|
domain?: string;
|
|
3125
3302
|
priority?: number;
|
|
3126
3303
|
properties?: {
|
|
3127
|
-
[key: string]:
|
|
3304
|
+
[key: string]: SchemaRootProperty;
|
|
3128
3305
|
};
|
|
3129
3306
|
layout?: {
|
|
3130
3307
|
panel?: WidgetLayout;
|
|
@@ -3136,7 +3313,33 @@ declare interface SchemaDomainRecords {
|
|
|
3136
3313
|
":schema": SchemaDomainPanelRecord;
|
|
3137
3314
|
}
|
|
3138
3315
|
|
|
3139
|
-
declare interface SchemaProperty<Value = unknown>
|
|
3316
|
+
declare interface SchemaProperty<Value = unknown> {
|
|
3317
|
+
/** Specifying what type of data will be entered into the field. */
|
|
3318
|
+
type?: "array" | "asset" | "boolean" | "datetime" | "number" | "string" | "object" | "rpc";
|
|
3319
|
+
/** User-friendly title of the property. This will be used as the field's label in the UI. */
|
|
3320
|
+
title?: string;
|
|
3321
|
+
description?: string;
|
|
3322
|
+
/** If present, indicates that the user must specify a value for the asset to be treated as valid. */
|
|
3323
|
+
required?: boolean;
|
|
3324
|
+
oneOf?: Array<SchemaProperty>;
|
|
3325
|
+
anyOf?: Array<SchemaProperty>;
|
|
3326
|
+
enum?: ReadonlyArray<Value>;
|
|
3327
|
+
minItems?: number;
|
|
3328
|
+
maxItems?: number;
|
|
3329
|
+
items?: SchemaProperty<Value>;
|
|
3330
|
+
properties?: Record<string, SchemaProperty<unknown>>;
|
|
3331
|
+
default?: Value;
|
|
3332
|
+
const?: Value;
|
|
3333
|
+
widget?: WidgetType | WidgetOptions;
|
|
3334
|
+
placeholder?: string;
|
|
3335
|
+
helpText?: string;
|
|
3336
|
+
invalid?: boolean;
|
|
3337
|
+
emptyValue?: Value;
|
|
3338
|
+
}
|
|
3339
|
+
|
|
3340
|
+
declare interface SchemaRootProperty<Value = unknown> extends NxtpressionSchemaProperty<Value> {
|
|
3341
|
+
domain?: string;
|
|
3342
|
+
path?: string;
|
|
3140
3343
|
recordName?: Nxtpression<string, {
|
|
3141
3344
|
id: string;
|
|
3142
3345
|
}>;
|
|
@@ -3144,8 +3347,13 @@ declare interface SchemaProperty<Value = unknown> extends BaseSchemaProperty<Val
|
|
|
3144
3347
|
id: string;
|
|
3145
3348
|
value: unknown;
|
|
3146
3349
|
}>;
|
|
3147
|
-
|
|
3148
|
-
|
|
3350
|
+
/** An object specifying where to index the data. Adding this will effectively make the data searchable. */
|
|
3351
|
+
index?: {
|
|
3352
|
+
/** A string specifying the user-friendly title of the search property. This is what users will see when creating search filters and bookmarks. */
|
|
3353
|
+
label: string;
|
|
3354
|
+
/** A string specifying where to store the data in the search index. Note that this should be a globally unique value in the system. Typically you'd use `{domain}.{path}` and you should prefer English in camel case */
|
|
3355
|
+
path: string;
|
|
3356
|
+
};
|
|
3149
3357
|
}
|
|
3150
3358
|
|
|
3151
3359
|
/**
|
|
@@ -4563,9 +4771,9 @@ export declare interface Underscore {
|
|
|
4563
4771
|
fetch(options?: RequestInit, suspend?: boolean): (resource: string) => NxtpressionFetch;
|
|
4564
4772
|
}
|
|
4565
4773
|
|
|
4566
|
-
declare type Union = FileConnectionDef | FacebookConnectionDef | ReutersConnectionDef | EmptyConnectionDef;
|
|
4774
|
+
declare type Union = FileConnectionDef | FacebookConnectionDef | ReportConnectionDef | ReutersConnectionDef | EmptyConnectionDef;
|
|
4567
4775
|
|
|
4568
|
-
declare type Union_2 = EmptyPublishDef | YoutubePublishDef | FacebookPublishDef | FilePublishDef | FileLegacyPublishDef;
|
|
4776
|
+
declare type Union_2 = EmptyPublishDef | ReportPublishDef | YoutubePublishDef | FacebookPublishDef | FilePublishDef | FileLegacyPublishDef;
|
|
4569
4777
|
|
|
4570
4778
|
declare interface Unsubscribable {
|
|
4571
4779
|
unsubscribe(): void;
|
|
@@ -4740,6 +4948,47 @@ declare interface WidgetOptions {
|
|
|
4740
4948
|
|
|
4741
4949
|
declare type WidgetType = string;
|
|
4742
4950
|
|
|
4951
|
+
/**
|
|
4952
|
+
* @link https://oozcitak.github.io/xmlbuilder2/builder-functions.html#builder-options
|
|
4953
|
+
*/
|
|
4954
|
+
declare interface XMLBuilderOptions {
|
|
4955
|
+
[key: string]: unknown;
|
|
4956
|
+
version?: "1.0";
|
|
4957
|
+
encoding?: string | undefined;
|
|
4958
|
+
standalone?: boolean | undefined;
|
|
4959
|
+
keepNullNodes?: boolean;
|
|
4960
|
+
keepNullAttributes?: boolean;
|
|
4961
|
+
ignoreConverters?: boolean;
|
|
4962
|
+
skipWhitespaceOnlyText?: boolean;
|
|
4963
|
+
convert?: ConvertOptions;
|
|
4964
|
+
defaultNamespace?: {
|
|
4965
|
+
ele?: undefined | null | string;
|
|
4966
|
+
att?: undefined | null | string;
|
|
4967
|
+
};
|
|
4968
|
+
namespaceAlias?: {
|
|
4969
|
+
[key: string]: string | null | undefined;
|
|
4970
|
+
};
|
|
4971
|
+
invalidCharReplacement?: string | ((char: string, offset: number, str: string) => string) | undefined;
|
|
4972
|
+
parser?: any;
|
|
4973
|
+
}
|
|
4974
|
+
|
|
4975
|
+
/**
|
|
4976
|
+
* @link https://oozcitak.github.io/xmlbuilder2/serialization.html#serialization-settings
|
|
4977
|
+
*/
|
|
4978
|
+
declare interface XMLWriterOptions {
|
|
4979
|
+
wellFormed?: boolean;
|
|
4980
|
+
format?: "xml";
|
|
4981
|
+
headless?: boolean;
|
|
4982
|
+
prettyPrint?: boolean;
|
|
4983
|
+
indent?: string;
|
|
4984
|
+
newline?: string;
|
|
4985
|
+
offset?: number;
|
|
4986
|
+
width?: number;
|
|
4987
|
+
allowEmptyTags?: boolean;
|
|
4988
|
+
indentTextOnlyNodes?: boolean;
|
|
4989
|
+
spaceBeforeSlash?: boolean;
|
|
4990
|
+
}
|
|
4991
|
+
|
|
4743
4992
|
/**
|
|
4744
4993
|
* A base64 encoded string representing a complete Yjs document state.
|
|
4745
4994
|
* This is created using `Y.encodeStateAsUpdate()` and is used for
|
|
@@ -2,11 +2,13 @@ import type { FileConnectionDef } from './file/index.ts';
|
|
|
2
2
|
export * from './file/index.ts';
|
|
3
3
|
import type { FacebookConnectionDef } from './facebook.ts';
|
|
4
4
|
export * from './facebook.ts';
|
|
5
|
+
import type { ReportConnectionDef } from './report.ts';
|
|
6
|
+
export * from './report.ts';
|
|
5
7
|
import type { ReutersConnectionDef } from './reuters.ts';
|
|
6
8
|
export * from './reuters.ts';
|
|
7
9
|
import type { EmptyConnectionDef } from './empty.ts';
|
|
8
10
|
export * from './empty.ts';
|
|
9
|
-
type Union = FileConnectionDef | FacebookConnectionDef | ReutersConnectionDef | EmptyConnectionDef;
|
|
11
|
+
type Union = FileConnectionDef | FacebookConnectionDef | ReportConnectionDef | ReutersConnectionDef | EmptyConnectionDef;
|
|
10
12
|
export type ConnectionRecord = Union["connection"];
|
|
11
13
|
export type MethodsRecord = Union["methods"];
|
|
12
14
|
export type StatsRecord = Union["stats"];
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ConnectionDef, ConnectionBase } from './index.ts';
|
|
2
|
+
export interface ReportConnectionDef extends ConnectionDef<"report"> {
|
|
3
|
+
connection: ReportConnectionRecord;
|
|
4
|
+
}
|
|
5
|
+
export interface ReportConnectionRecord extends ConnectionBase {
|
|
6
|
+
type?: "report";
|
|
7
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Nxtpression,
|
|
1
|
+
import type { Nxtpression, PanelRootProperty, WidgetLayout, ReportRssOptions, ReportXmlOptions } from '../../common/index.ts';
|
|
2
2
|
export interface PanelDomainRecords {
|
|
3
3
|
":panel": PanelDomainPanelRecord;
|
|
4
4
|
}
|
|
@@ -12,12 +12,35 @@ export interface PanelDomainPanelRecord {
|
|
|
12
12
|
priority?: number;
|
|
13
13
|
editorPriority?: number;
|
|
14
14
|
properties?: {
|
|
15
|
-
[key: string]:
|
|
15
|
+
[key: string]: PanelRootProperty;
|
|
16
16
|
};
|
|
17
17
|
layout?: {
|
|
18
18
|
panel?: WidgetLayout;
|
|
19
19
|
editor?: WidgetLayout;
|
|
20
|
+
csv?: string[] | true;
|
|
21
|
+
json?: string[] | true;
|
|
22
|
+
xml?: string[] | true;
|
|
23
|
+
rss?: string[] | true;
|
|
20
24
|
};
|
|
21
25
|
filter?: Nxtpression;
|
|
22
|
-
expand?: Nxtpression
|
|
26
|
+
expand?: Nxtpression<unknown>;
|
|
27
|
+
expandSkipEmpty?: boolean;
|
|
28
|
+
xml?: ReportXmlOptions;
|
|
29
|
+
rss?: ReportRssOptions;
|
|
30
|
+
/**
|
|
31
|
+
* For reports. Only when :publish#expand.type === 'published'.
|
|
32
|
+
* If an already expanded to :published record is connected to an ingestclip,
|
|
33
|
+
* expand further on all :published records of type 'event' that were created
|
|
34
|
+
* during the ingestclip's time range.
|
|
35
|
+
*
|
|
36
|
+
* The use case is to find e.g. music that was played during a broadcast of
|
|
37
|
+
* an ingestclip.
|
|
38
|
+
*/
|
|
39
|
+
expandIngestclip?: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* For reports, when :publish#expand.type === 'published'.
|
|
42
|
+
* Due to legacy reasons publishedTypes defaults to ['event'],
|
|
43
|
+
* if you want all types, set publishedTypes to null.
|
|
44
|
+
*/
|
|
45
|
+
publishedTypes?: string[] | null;
|
|
23
46
|
}
|
|
@@ -7,9 +7,11 @@ import type { FileLegacyPublishDef } from './file-legacy.ts';
|
|
|
7
7
|
export * from './file-legacy.ts';
|
|
8
8
|
import type { FilePublishDef } from './file.ts';
|
|
9
9
|
export * from './file.ts';
|
|
10
|
+
import type { ReportPublishDef } from './report.ts';
|
|
11
|
+
export * from './report.ts';
|
|
10
12
|
import type { YoutubePublishDef } from './youtube.ts';
|
|
11
13
|
export * from './youtube.ts';
|
|
12
|
-
type Union = EmptyPublishDef | YoutubePublishDef | FacebookPublishDef | FilePublishDef | FileLegacyPublishDef;
|
|
14
|
+
type Union = EmptyPublishDef | ReportPublishDef | YoutubePublishDef | FacebookPublishDef | FilePublishDef | FileLegacyPublishDef;
|
|
13
15
|
export type PublishDefOfType<T extends string | null> = Union & {
|
|
14
16
|
type: T;
|
|
15
17
|
};
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import type { PublishDef, PublishRecordBase, PublishStatsRecordBase } from './index.ts';
|
|
2
|
+
import type { ReportXmlOptions } from '../../../common/report.ts';
|
|
3
|
+
export interface ReportPublishDef extends PublishDef<"report"> {
|
|
4
|
+
publish: ReportPublishRecord;
|
|
5
|
+
stats: ReportPublishStatsRecord;
|
|
6
|
+
}
|
|
7
|
+
export type ReportPublishFormat = "csv" | "json" | "xml" | "rss";
|
|
8
|
+
export declare const isReportPublishFormat: (input: unknown) => input is ReportPublishFormat;
|
|
9
|
+
export type ReportPublishExpandType = "published" | "deadlines" | "recurrence_date_range";
|
|
10
|
+
export declare const isReportPublishExpandType: (input: unknown) => input is ReportPublishExpandType;
|
|
11
|
+
/**
|
|
12
|
+
* A report can be downloaded from `/report/${publishId}[/${route}]/report.${format}`.
|
|
13
|
+
*
|
|
14
|
+
* Search query parameters:
|
|
15
|
+
* - `start`: Date string parsable by `new Date()`. Overrides expand.start.
|
|
16
|
+
* - `end`: Date string parsable by `new Date()`. Overrides expand.end.
|
|
17
|
+
* - `token`: Unique identifier used to track report progress.
|
|
18
|
+
*/
|
|
19
|
+
export interface ReportPublishRecord extends PublishRecordBase {
|
|
20
|
+
type?: "report";
|
|
21
|
+
searchId?: string;
|
|
22
|
+
/**
|
|
23
|
+
* If specified, for each search hit, additional rows will be added to the
|
|
24
|
+
* report, based on the expand type.
|
|
25
|
+
*
|
|
26
|
+
* If type: "published", the report will expand with one row per :published
|
|
27
|
+
* record that refers to the search hit and is within the date range.
|
|
28
|
+
* The expression context passed to the panel's computed fields
|
|
29
|
+
* will be extended with a `published` object containing data from the
|
|
30
|
+
* corresponding :published record. NOTE: By default it will only expand
|
|
31
|
+
* :published records of type: "event", unless a `filter` expression is
|
|
32
|
+
* specified on the panel.
|
|
33
|
+
*
|
|
34
|
+
* If type: "deadlines", the report will expand with one row per deadline
|
|
35
|
+
* provided by a search hit's :asset.deadline#value array. The expression
|
|
36
|
+
* context passed to the panel's computed fields will be extended with a
|
|
37
|
+
* `deadline` being a Date object corresponding to the deadline value.
|
|
38
|
+
*
|
|
39
|
+
* If type: "recurrence_date_range", the report will expand with one row
|
|
40
|
+
* per date specified by a search hit's :calendarevent record (which could
|
|
41
|
+
* be a recurrence expression evaluating to multiple dates) that falls within
|
|
42
|
+
* the specified date range. The expression context passed to the panel's
|
|
43
|
+
* computed fields will be extended with a `calendarevent` object with
|
|
44
|
+
* a `start` and `end` Date object.
|
|
45
|
+
*/
|
|
46
|
+
expand?: {
|
|
47
|
+
type?: ReportPublishExpandType | "";
|
|
48
|
+
start?: string;
|
|
49
|
+
end?: string;
|
|
50
|
+
};
|
|
51
|
+
/** Asset ID */
|
|
52
|
+
panel?: string;
|
|
53
|
+
/** The report can be downloaded from `/report/${publishId}[/${route}]`. */
|
|
54
|
+
route?: string;
|
|
55
|
+
/** Field name to sort by */
|
|
56
|
+
sort?: string;
|
|
57
|
+
/** Sort order */
|
|
58
|
+
order?: "asc" | "desc";
|
|
59
|
+
/** Used by the hub, which passes it as filename extension to the download URL */
|
|
60
|
+
format?: ReportPublishFormat;
|
|
61
|
+
xml?: ReportXmlOptions;
|
|
62
|
+
}
|
|
63
|
+
export declare const isReportPublishRecord: (input: unknown) => input is ReportPublishRecord;
|
|
64
|
+
export declare const assertReportPublishRecord: (input: unknown) => ReportPublishRecord;
|
|
65
|
+
export interface ReportPublishStatsRecord extends PublishStatsRecordBase {
|
|
66
|
+
retrieved?: {
|
|
67
|
+
total?: number;
|
|
68
|
+
count?: number;
|
|
69
|
+
};
|
|
70
|
+
}
|