Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/icewind1991/files_markdown.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2018-08-16 19:27:31 +0300
committerRobin Appelman <robin@icewind.nl>2018-08-16 19:27:31 +0300
commit57d0cbf57a79e5bbb7cf7e6a8e20b18001a6edae (patch)
tree7a6ba7c47536d35a7789d5e372b5a986444db36f
parentf51481c4e128882ac3525efe158c67ce8b21b58c (diff)
update nextcloud.d.ts
Signed-off-by: Robin Appelman <robin@icewind.nl>
-rw-r--r--js/Nextcloud.d.ts106
1 files changed, 62 insertions, 44 deletions
diff --git a/js/Nextcloud.d.ts b/js/Nextcloud.d.ts
index 36128f5..961bfc9 100644
--- a/js/Nextcloud.d.ts
+++ b/js/Nextcloud.d.ts
@@ -47,67 +47,85 @@ declare namespace OCA {
}
}
-declare namespace OC {
- namespace Util {
- function humanFileSize(size: number): string;
-
- function computerFileSize(size: string): number;
- }
-
- namespace dialogs {
- function info(text: string, title: string, callback: () => void, modal?: boolean): void;
+interface EscapeOptions {
+ escape?: boolean;
+}
- function confirm(text: string, title: string, callback: (result: boolean) => void, modal?: boolean): void;
+declare namespace OC {
+ namespace Util {
+ function humanFileSize(size: number): string;
- function confirmHtml(text: string, title: string, callback: (result: boolean) => void, modal?: boolean): void;
+ function computerFileSize(size: string): number;
+ }
- function prompt(text: string, title: string, callback: (ok: boolean, result: string) => void, modal?: boolean, name?: string, password?: boolean): void;
+ namespace dialogs {
+ function info(text: string, title: string, callback: () => void, modal?: boolean): void;
- function filepicker(title: string, callback: (result: string | string[]) => void, multiselect?: boolean, mimetypeFilter?: string, modal?: boolean): void;
- }
+ function confirm(text: string, title: string, callback: (result: boolean) => void, modal?: boolean): void;
- namespace Plugins {
- function register(scope: string, plugin: BasePlugin);
- function register(scope: 'OCA.Files.SidebarPreviewManager', plugin: SidebarPreviewPlugin);
- }
+ function confirmHtml(text: string, title: string, callback: (result: boolean) => void, modal?: boolean): void;
- function generateUrl(url: string, parameters?: { [key: string]: string }, options?: EscapeOptions)
+ function prompt(text: string, title: string, callback: (result: string) => void, modal?: boolean, name?: string, password?: boolean): void;
- function linkToOCS(service: string, version: number): string;
+ function filepicket(title: string, callback: (result: string | string[]) => void, multiselect?: boolean, mimetypeFilter?: string, modal?: boolean): void;
+ }
- function imagePath(app: string, file: string): string;
+ interface Plugin<T> {
+ name?: string;
+ attach: (instance: T, options: any) => void;
+ detach?: (instance: T, options: any) => void;
+ }
- function linkToRemote(service: string): string;
+ namespace Plugins {
+ function register<T>(scope: string, plugin: OC.Plugin<T>): void;
+ }
- function linkToRemoteBase(service: string): string;
+ namespace Search {
+ interface Core {
+ setFilter: (app: string, callback: (query: string) => void) => void;
+ }
+ }
- function filePath(app: string, type: string, path: string): string;
+ function generateUrl(url: string, parameters?: { [key: string]: string }, options?: EscapeOptions)
- function addStyle(app: string, stylesheet: string): void;
+ function linkToOCS(service: string, version: number): string;
- function addScript(app: string, script: string, callback?: Function): JQueryPromise<void>
+ function imagePath(app: string, file: string): string;
- const PERMISSION_CREATE = 4;
- const PERMISSION_READ = 1;
- const PERMISSION_UPDATE = 2;
- const PERMISSION_DELETE = 8;
- const PERMISSION_SHARE = 16;
- const PERMISSION_ALL = 31;
+ const PERMISSION_CREATE = 4;
+ const PERMISSION_READ = 1;
+ const PERMISSION_UPDATE = 2;
+ const PERMISSION_DELETE = 8;
+ const PERMISSION_SHARE = 16;
+ const PERMISSION_ALL = 31;
}
declare function t(app: string, string: string, vars?: { [key: string]: string }, count?: number, options?: EscapeOptions): string;
+declare const oc_config: {
+ blacklist_files_regex: string;
+ enable_avatars: boolean;
+ last_password_link: string | null;
+ modRewriteWorking: boolean;
+ session_keepalive: boolean;
+ session_lifetime: boolean;
+ "sharing.maxAutocompleteResults": number;
+ "sharing.minSearchStringLength": number;
+ version: string;
+ versionString: string;
+};
+
declare module 'NC' {
- export interface OCSResult<T> {
- ocs: {
- data: T;
- meta: {
- status: 'ok' | 'failure';
- message: string;
- statuscode: number;
- totalitems: number;
- itemsperpage: number;
- }
- }
- }
+ export interface OCSResult<T> {
+ ocs: {
+ data: T;
+ meta: {
+ status: 'ok' | 'failure';
+ message: string;
+ statuscode: number;
+ totalitems: number;
+ itemsperpage: number;
+ }
+ }
+ }
}