@enonic-types/lib-project
Advanced tools
Comparing version 7.11.3 to 7.12.0-B1
{ | ||
"name": "@enonic-types/lib-project", | ||
"version": "7.11.3", | ||
"version": "7.12.0-B1", | ||
"description": "Type definitions for lib-project.", | ||
@@ -5,0 +5,0 @@ "types": "project.d.ts", |
@@ -22,3 +22,3 @@ /** | ||
} | ||
export interface CreateProjectParams { | ||
export interface CreateProjectParams<Config extends Record<string, unknown>> { | ||
id: string; | ||
@@ -29,8 +29,7 @@ displayName: string; | ||
parent?: string; | ||
siteConfig: Record<string, unknown>; | ||
applications?: string[]; | ||
siteConfig?: Config; | ||
permissions?: ProjectPermission; | ||
readAccess?: ProjectReadAccess; | ||
readAccess: ProjectReadAccess; | ||
} | ||
export interface Project { | ||
export interface Project<Config extends Record<string, unknown> = Record<string, unknown>> { | ||
id: string; | ||
@@ -40,4 +39,3 @@ displayName: string; | ||
parent: string; | ||
siteConfig: Record<string, unknown>; | ||
applications?: string[]; | ||
siteConfig: Config; | ||
language?: string; | ||
@@ -53,3 +51,3 @@ permissions?: ProjectPermission; | ||
* @param {Object} params JSON with the parameters. | ||
* @param {string} params.id Unique project id (alpha-numeric characters and hyphens allowed). | ||
* @param {string} params.id Unique project id (alphanumeric characters and hyphens allowed). | ||
* @param {string} params.displayName Project's display name. | ||
@@ -68,4 +66,4 @@ * @param {string} [params.description] Project description. | ||
*/ | ||
export declare function create(params: CreateProjectParams): Project; | ||
export interface ModifyProjectParams { | ||
export declare function create<Config extends Record<string, unknown> = Record<string, unknown>>(params: CreateProjectParams<Config>): Project<Config>; | ||
export interface ModifyProjectParams<Config extends Record<string, unknown>> { | ||
id: string; | ||
@@ -75,4 +73,3 @@ displayName: string; | ||
language?: string; | ||
siteConfig: Record<string, unknown>; | ||
applications?: string[]; | ||
siteConfig?: Config; | ||
} | ||
@@ -90,7 +87,7 @@ /** | ||
* @param {string} [params.language] Default project language. | ||
* @param {object} params.siteConfig Connected applications config. | ||
* @param {object} [params.siteConfig] Connected applications config. | ||
* | ||
* @returns {Object} Modified project. | ||
*/ | ||
export declare function modify(params: ModifyProjectParams): Project; | ||
export declare function modify<Config extends Record<string, unknown> = Record<string, unknown>>(params: ModifyProjectParams<Config>): Project<Config>; | ||
export interface DeleteProjectParams { | ||
@@ -197,3 +194,3 @@ id: string; | ||
* Toggles public/private READ access for an existing Content Project. | ||
* This will modify permissions on ALL of the content items inside the project repository by adding or removing READ access for `system.everyone`. | ||
* This will modify permissions on ALL the content items inside the project repository by adding or removing READ access for `system.everyone`. | ||
* To modify READ access, user must have `owner` permissions for the project, or either `system.admin` or `cms.admin` role. | ||
@@ -200,0 +197,0 @@ * |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
10973
198
1