enonic-types
Advanced tools
Comparing version 0.3.3 to 0.3.4
@@ -99,2 +99,12 @@ declare module "*/lib/xp/content" { | ||
getTypes(): ReadonlyArray<ContentType>; | ||
/** | ||
* Archive a content. | ||
* @since 7.8.0 | ||
*/ | ||
archive(params: ArchiveParams): Array<string>; | ||
/** | ||
* Restore a content from the archive. | ||
* @since 7.8.0 | ||
*/ | ||
restore(params: RestoreParams): Array<string>; | ||
} | ||
@@ -633,2 +643,18 @@ type WORKFLOW_STATES = "IN_PROGRESS" | "PENDING_APPROVAL" | "REJECTED" | "READY"; | ||
} | ||
interface ArchiveParams { | ||
/** | ||
* Path or id of the content to be archived. | ||
*/ | ||
content: string; | ||
} | ||
interface RestoreParams { | ||
/** | ||
* Path or id of the content to be restored. | ||
*/ | ||
content: string; | ||
/** | ||
* Path of parent for restored content. | ||
*/ | ||
path: string; | ||
} | ||
} | ||
@@ -635,0 +661,0 @@ const contentLib: contentLib.ContentLibrary; |
@@ -13,2 +13,3 @@ /// <reference path="admin.d.ts" /> | ||
/// <reference path="event.d.ts" /> | ||
/// <reference path="explorer.d.ts" /> | ||
/// <reference path="export.d.ts" /> | ||
@@ -15,0 +16,0 @@ /// <reference path="freemarker.d.ts" /> |
@@ -13,2 +13,6 @@ export interface EnonicLibraryMap { | ||
"/lib/xp/event": typeof import("/lib/xp/event"); | ||
"/lib/explorer": typeof import("/lib/explorer"); | ||
"/lib/explorer/model/2/constants": typeof import("/lib/explorer/model/2/constants"); | ||
"/lib/explorer/document": typeof import("/lib/explorer/document"); | ||
"/lib/explorer/client": typeof import("/lib/explorer/client"); | ||
"/lib/xp/export": typeof import("/lib/xp/export"); | ||
@@ -15,0 +19,0 @@ "/lib/tineikt/freemarker": typeof import("/lib/tineikt/freemarker"); |
@@ -57,31 +57,31 @@ declare module "*/lib/xp/node" { | ||
*/ | ||
readonly start?: number; | ||
start?: number; | ||
/** | ||
* Number of contents to fetch. | ||
*/ | ||
readonly count?: number; | ||
count?: number; | ||
/** | ||
* Query expression. | ||
*/ | ||
readonly query?: string; | ||
query?: string; | ||
/** | ||
* Query filters | ||
*/ | ||
readonly filters?: import("/lib/xp/content").BasicFilters | import("/lib/xp/content").BooleanFilter; | ||
filters?: import("/lib/xp/content").BasicFilters | import("/lib/xp/content").BooleanFilter; | ||
/** | ||
* Sorting expression. | ||
*/ | ||
readonly sort?: string; | ||
sort?: string; | ||
/** | ||
* Aggregations expression. | ||
*/ | ||
readonly aggregations?: Record<AggregationKeys, import("/lib/xp/content").Aggregation>; | ||
aggregations?: Record<AggregationKeys, import("/lib/xp/content").Aggregation>; | ||
/** | ||
* Highlighting config | ||
*/ | ||
readonly highlight?: import("/lib/xp/content").Highlight; | ||
highlight?: import("/lib/xp/content").Highlight; | ||
/** | ||
* Return score calculation explanation. | ||
*/ | ||
readonly explain?: boolean; | ||
explain?: boolean; | ||
} | ||
@@ -93,32 +93,32 @@ interface IndexConfigEntry { | ||
*/ | ||
readonly decideByType: boolean; | ||
decideByType: boolean; | ||
/** | ||
* If false, indexing will be disabled for the affected properties | ||
*/ | ||
readonly enabled: boolean; | ||
enabled: boolean; | ||
/** | ||
* Values are stored as 'ngram' | ||
*/ | ||
readonly nGram: boolean; | ||
nGram: boolean; | ||
/** | ||
* Values are stored as 'ngram', 'analyzed' and also added to the _allText system property | ||
*/ | ||
readonly fulltext: boolean; | ||
fulltext: boolean; | ||
/** | ||
* Affected values will be added to the _allText property | ||
*/ | ||
readonly includeInAllText: boolean; | ||
includeInAllText: boolean; | ||
/** | ||
* Values are stored as 'path' type and applicable for the pathMatch-function | ||
*/ | ||
readonly path: boolean; | ||
readonly indexValueProcessors: ReadonlyArray<any>; | ||
readonly languages: ReadonlyArray<any>; | ||
path: boolean; | ||
indexValueProcessors: ReadonlyArray<any>; | ||
languages: ReadonlyArray<any>; | ||
} | ||
type IndexConfigTemplates = "none" | "byType" | "fulltext" | "path" | "minimal"; | ||
interface IndexConfig { | ||
readonly default: IndexConfigEntry | IndexConfigTemplates; | ||
readonly configs?: ReadonlyArray<{ | ||
readonly path: string; | ||
readonly config: IndexConfigEntry | IndexConfigTemplates; | ||
default: IndexConfigEntry | IndexConfigTemplates; | ||
configs?: ReadonlyArray<{ | ||
path: string; | ||
config: IndexConfigEntry | IndexConfigTemplates; | ||
}>; | ||
@@ -130,27 +130,27 @@ } | ||
*/ | ||
readonly _name?: string; | ||
_name?: string; | ||
/** | ||
* Path to place content under. | ||
*/ | ||
readonly _parentPath?: string; | ||
_parentPath?: string; | ||
/** | ||
* How the document should be indexed. A default value "byType" will be set if no value specified. | ||
*/ | ||
readonly _indexConfig?: IndexConfig; | ||
_indexConfig?: IndexConfig; | ||
/** | ||
* The access control list for the node. By default the creator will have full access | ||
*/ | ||
readonly _permissions?: ReadonlyArray<import("/lib/xp/content").PermissionsParams>; | ||
_permissions?: ReadonlyArray<import("/lib/xp/content").PermissionsParams>; | ||
/** | ||
* true if the permissions should be inherited from the node parent. Default is false. | ||
*/ | ||
readonly _inheritsPermissions?: boolean; | ||
_inheritsPermissions?: boolean; | ||
/** | ||
* Value used to order document when ordering by parent and child-order is set to manual | ||
*/ | ||
readonly _manualOrderValue?: number; | ||
_manualOrderValue?: number; | ||
/** | ||
* Default ordering of children when doing getChildren if no order is given in query | ||
*/ | ||
readonly _childOrder?: string; | ||
_childOrder?: string; | ||
} | ||
@@ -161,7 +161,7 @@ interface NodeModifyParams<NodeData> { | ||
*/ | ||
readonly key: string; | ||
key: string; | ||
/** | ||
* Editor callback function | ||
*/ | ||
readonly editor: (node: NodeData & RepoNode) => NodeData & RepoNode; | ||
editor: (node: NodeData & RepoNode) => NodeData & RepoNode; | ||
} | ||
@@ -172,3 +172,3 @@ interface NodeMoveParams { | ||
*/ | ||
readonly source: string; | ||
source: string; | ||
/** | ||
@@ -178,3 +178,3 @@ * New path or name for the node. If the target ends in slash '/', it specifies the parent path where to be moved. | ||
*/ | ||
readonly target: string; | ||
target: string; | ||
} | ||
@@ -185,23 +185,23 @@ interface NodeFindChildrenParams { | ||
*/ | ||
readonly parentKey: string; | ||
parentKey: string; | ||
/** | ||
* start index used for paging - default: 0 | ||
*/ | ||
readonly start?: number; | ||
start?: number; | ||
/** | ||
* number of content to fetch, used for paging - default: 10 | ||
*/ | ||
readonly count?: number; | ||
count?: number; | ||
/** | ||
* How to order the children - default is value stored on parent | ||
*/ | ||
readonly childOrder?: string; | ||
childOrder?: string; | ||
/** | ||
* Optimize for count children only - default is false | ||
*/ | ||
readonly countOnly?: boolean; | ||
countOnly?: boolean; | ||
/** | ||
* Do recursive fetching of all children of children - default is false | ||
*/ | ||
readonly recursive?: boolean; | ||
recursive?: boolean; | ||
} | ||
@@ -208,0 +208,0 @@ interface RepoNode { |
{ | ||
"name": "enonic-types", | ||
"sideEffects": false, | ||
"version": "0.3.3", | ||
"version": "0.3.4", | ||
"description": "TypeScript types for Enonic XP", | ||
@@ -6,0 +6,0 @@ "typings": "index.d.ts", |
@@ -100,2 +100,3 @@ # TypeScript types for Enonic XP | ||
* [EventLibrary](./src/event.ts) | ||
* [ExplorerLibrary](./src/explorer.ts) | ||
* [ExportLibrary](./src/export.ts) | ||
@@ -102,0 +103,0 @@ * [FreeMarkerLibrary](./src/freemarker.ts) |
174997
49
4608
130