enonic-types
Advanced tools
Comparing version 0.4.7 to 0.4.8
@@ -138,4 +138,9 @@ declare module "*/lib/xp/content" { | ||
type SiteData<Config extends object> = { | ||
siteConfig: SiteConfig<Config> | Array<SiteConfig<Config>>; | ||
description?: string; | ||
siteConfig: SiteDataSiteConfig<Config> | Array<SiteDataSiteConfig<Config>>; | ||
}; | ||
interface SiteDataSiteConfig<Config> { | ||
applicationKey: string; | ||
config: Config; | ||
} | ||
/** | ||
@@ -689,6 +694,2 @@ * Implements the "data" of type "base:shortcut" | ||
} | ||
interface SiteConfig<Config> { | ||
applicationKey: string; | ||
config: Config; | ||
} | ||
interface GetSiteConfigParams { | ||
@@ -695,0 +696,0 @@ key: string; |
declare module "*/lib/cristin" { | ||
namespace cristinLib { | ||
type RepoConnection = import("/lib/xp/node").RepoConnection; | ||
type ListOfPersons = import("./generated").ListOfPersons; | ||
@@ -23,2 +22,3 @@ type Person = import("./generated").Person; | ||
type CristinResultCategory = NonNullable<Result["category"]>; | ||
type CristinResultLink = Unarray<NonNullable<Result["links"]>>; | ||
interface CristinResultJournal { | ||
@@ -38,12 +38,12 @@ cristin_journal_id: string; | ||
getCristinPersons(ids: Array<string>): Array<Person>; | ||
getCristinPerson(id: string, connection?: RepoConnection): Person | void; | ||
getCristinPerson(id: string): Person | void; | ||
getCristinInstitutions(ids: Array<string>): Array<Institution>; | ||
getCristinInstitution(id: string, connection?: RepoConnection): Institution | void; | ||
getCristinInstitution(id: string): Institution | void; | ||
getCristinProjects(ids: Array<string>): Array<Project>; | ||
getCristinProject(id: string, connection?: RepoConnection): Project | void; | ||
getCristinProject(id: string): Project | void; | ||
getCristinUnits(ids: Array<string>): Array<Unit>; | ||
getCristinUnit(id: string, connection?: RepoConnection): Unit | void; | ||
getCristinUnit(id: string): Unit | void; | ||
getCristinResults(ids: Array<string>): Array<Result>; | ||
getCristinResult(id: string, connection?: RepoConnection): Result | void; | ||
getCristinResultContributors(id: string, repoConnection?: RepoConnection): ListOfResultContributors | void; | ||
getCristinResult(id: string): Result | void; | ||
getCristinResultContributors(id: string): ListOfResultContributors | void; | ||
} | ||
@@ -151,2 +151,3 @@ } | ||
fetchPerson(params: GetSingleParams): Person; | ||
fetchPersonResults(params: GetPersonResultsParams): ListOfResults; | ||
fetchProjects(params: GetProjectsParams): FetchResponse<ListOfProjects>; | ||
@@ -230,2 +231,8 @@ fetchProject(params: GetSingleParams): Project; | ||
} | ||
interface GetPersonResultsParams { | ||
id?: string; | ||
lang?: string; | ||
page?: string; | ||
per_page?: string; | ||
} | ||
interface GetInstitutionsParams { | ||
@@ -265,3 +272,2 @@ id?: string; | ||
id: string; | ||
connection: RepoConnection; | ||
repoId: string; | ||
@@ -273,4 +279,4 @@ data?: NodeData; | ||
getNodeByDataId(connection: RepoConnection, ids: string | Array<string>): Array<import("/lib/xp/node").NodeQueryHit>; | ||
getEntriesByName<NodeData>(repoId: string, name: Array<string>): Array<NodeData & import("/lib/xp/node").RepoNode>; | ||
saveToRepo<NodeData>({ data, id, connection }: SaveToRepoParams<NodeData>): NodeData | void; | ||
getEntriesByName<NodeData>(repoId: string, names: Array<string>): Array<NodeData & import("/lib/xp/node").RepoNode>; | ||
saveToRepo<NodeData>(params: SaveToRepoParams<NodeData>): NodeData | void; | ||
} | ||
@@ -277,0 +283,0 @@ } |
{ | ||
"name": "enonic-types", | ||
"sideEffects": false, | ||
"version": "0.4.7", | ||
"version": "0.4.8", | ||
"description": "TypeScript types for Enonic XP", | ||
@@ -29,13 +29,13 @@ "typings": "index.d.ts", | ||
"devDependencies": { | ||
"@typescript-eslint/eslint-plugin": "^5.22.0", | ||
"@typescript-eslint/parser": "^5.22.0", | ||
"@typescript-eslint/eslint-plugin": "^5.28.0", | ||
"@typescript-eslint/parser": "^5.28.0", | ||
"copyfiles": "^2.4.1", | ||
"eslint": "^8.14.0", | ||
"eslint": "^8.17.0", | ||
"eslint-config-prettier": "^8.5.0", | ||
"eslint-plugin-prettier": "^4.0.0", | ||
"json-schema-to-typescript": "^10.1.5", | ||
"prettier": "^2.6.2", | ||
"prettier": "^2.7.0", | ||
"rimraf": "^3.0.2", | ||
"typescript": "^4.6.4" | ||
"typescript": "^4.7.3" | ||
} | ||
} |
277480
7561