enonic-types
Advanced tools
Comparing version 0.0.31 to 0.0.32
export interface EventLibrary { | ||
listener<A extends object>(params: ListenerParams<A>): null; | ||
listener<A extends object = EnonicEventData>(params: ListenerParams<A>): null; | ||
send(params: SendParams): null; | ||
} | ||
export interface ListenerParams<A extends object> { | ||
readonly type: string; | ||
export interface ListenerParams<A extends object = EnonicEventData> { | ||
readonly type?: EnonicEventTypes | string; | ||
readonly callback: (event: EnonicEvent<A>) => void; | ||
readonly localOnly: boolean; | ||
readonly localOnly?: boolean; | ||
} | ||
export interface SendParams { | ||
readonly type: EnonicEventTypes; | ||
readonly distributed: boolean; | ||
readonly data: object; | ||
readonly type?: EnonicEventTypes | string; | ||
readonly distributed?: boolean; | ||
readonly data?: object; | ||
} | ||
export interface EnonicEvent<A extends object> { | ||
readonly type: EnonicEventTypes; | ||
export interface EnonicEvent<A extends object = EnonicEventData> { | ||
readonly type: EnonicEventTypes | string; | ||
readonly timestamp: number; | ||
readonly localOrigin: boolean; | ||
readonly distributed: boolean; | ||
readonly data: { | ||
readonly nodes: ReadonlyArray<{ | ||
readonly id: string; | ||
readonly path: string; | ||
readonly branch: string; | ||
readonly repo: string; | ||
readonly newPath?: string; | ||
}>; | ||
readonly state?: string; | ||
}; | ||
readonly data: A; | ||
} | ||
export interface EnonicEventData { | ||
readonly nodes: ReadonlyArray<{ | ||
readonly id: string; | ||
readonly path: string; | ||
readonly branch: string; | ||
readonly repo: string; | ||
readonly newPath?: string; | ||
}>; | ||
readonly state?: string; | ||
} | ||
export declare type EnonicEventTypes = "node.created" | "node.deleted" | "node.pushed" | "node.duplicated" | "node.updated" | "node.moved" | "node.renamed" | "node.sorted" | "node.stateUpdated" | "node.permissionsUpdated"; |
{ | ||
"name": "enonic-types", | ||
"version": "0.0.31", | ||
"version": "0.0.32", | ||
"description": "TypeScript types for Enonic XP", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
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
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
39738
1113