UNPKG

jxa-common-used

Version:
774 lines (686 loc) 18.9 kB
export namespace PathFinder { // Default Application export interface Application {} // Class /** * This file was automatically generated by json-schema-to-typescript. * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, * and run json-schema-to-typescript to regenerate this file. */ /** * The application's top-level scripting object. */ export interface Application { /** * The name of the application. */ name(): string /** * Is this the frontmost (active) application? */ frontmost(): boolean /** * The version of the application. */ version(): string } /** * This file was automatically generated by json-schema-to-typescript. * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, * and run json-schema-to-typescript to regenerate this file. */ /** * A Sketch document. */ export interface Document { /** * The document's name. */ name(): string /** * Has the document been modified since the last save? */ modified(): boolean /** * The document's location on disk. */ file(): any } /** * This file was automatically generated by json-schema-to-typescript. * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, * and run json-schema-to-typescript to regenerate this file. */ /** * A window. */ export interface Window { /** * The full title of the window. */ name(): string /** * The unique identifier of the window. */ id(): number /** * The index of the window, ordered front to back. */ index(): number /** * The bounding rectangle of the window. */ bounds(): any /** * Whether the window has a close box. */ closeable(): boolean /** * Whether the window can be minimized. */ minimizable(): boolean /** * Whether the window is currently minimized. */ minimized(): boolean /** * Whether the window can be resized. */ resizable(): boolean /** * Whether the window is currently visible. */ visible(): boolean /** * Whether the window can be zoomed. */ zoomable(): boolean /** * Whether the window is currently zoomed. */ zoomed(): boolean /** * The document whose contents are being displayed in the window. */ document(): any } /** * This file was automatically generated by json-schema-to-typescript. * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, * and run json-schema-to-typescript to regenerate this file. */ /** * Rich (styled) text */ export interface RichText { /** * The color of the first character. */ color(): any /** * The name of the font of the first character. */ font(): string /** * The size in points of the first character. */ size(): any } /** * This file was automatically generated by json-schema-to-typescript. * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, * and run json-schema-to-typescript to regenerate this file. */ /** * This subdivides the text into characters. */ export interface Character { /** * The color of the first character. */ color(): any /** * The name of the font of the first character. */ font(): string /** * The size in points of the first character. */ size(): number } /** * This file was automatically generated by json-schema-to-typescript. * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, * and run json-schema-to-typescript to regenerate this file. */ /** * This subdivides the text into paragraphs. */ export interface Paragraph { /** * The color of the first character. */ color(): any /** * The name of the font of the first character. */ font(): string /** * The size in points of the first character. */ size(): number } /** * This file was automatically generated by json-schema-to-typescript. * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, * and run json-schema-to-typescript to regenerate this file. */ /** * This subdivides the text into words. */ export interface Word { /** * The color of the first character. */ color(): any /** * The name of the font of the first character. */ font(): string /** * The size in points of the first character. */ size(): number } /** * This file was automatically generated by json-schema-to-typescript. * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, * and run json-schema-to-typescript to regenerate this file. */ /** * This subdivides the text into chunks that all have the same attributes. */ export interface AttributeRun { /** * The color of the first character. */ color(): any /** * The name of the font of the first character. */ font(): string /** * The size in points of the first character. */ size(): number } /** * This file was automatically generated by json-schema-to-typescript. * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, * and run json-schema-to-typescript to regenerate this file. */ /** * Represents an inline text attachment. This class is used mainly for make commands. */ export interface Attachment { /** * The path to the file for the attachment */ file(): any } /** * This file was automatically generated by json-schema-to-typescript. * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, * and run json-schema-to-typescript to regenerate this file. */ /** * A file system item */ export interface FsItem { extensionHidden(): boolean locked(): boolean kind(): string size(): number modificationDate(): any name(): string groupPrivileges(): string displayedName(): string labelIndex(): number everyonesPrivileges(): string disk(): any group(): string owner(): string informationWindow(): any ownerPrivileges(): string creationDate(): any nameExtension(): string physicalSize(): number container(): any url(): string posixPath(): string path(): string } /** * This file was automatically generated by json-schema-to-typescript. * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, * and run json-schema-to-typescript to regenerate this file. */ export interface FsFile { fileType(): string creatorType(): string } /** * This file was automatically generated by json-schema-to-typescript. * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, * and run json-schema-to-typescript to regenerate this file. */ /** * An item that contains other items */ export interface Container {} /** * This file was automatically generated by json-schema-to-typescript. * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, * and run json-schema-to-typescript to regenerate this file. */ /** * A container in the window's active pane */ export interface ActiveTarget {} /** * This file was automatically generated by json-schema-to-typescript. * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, * and run json-schema-to-typescript to regenerate this file. */ /** * A container in the window's left pane */ export interface LeftTarget {} /** * This file was automatically generated by json-schema-to-typescript. * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, * and run json-schema-to-typescript to regenerate this file. */ /** * A container in the window's right pane */ export interface RightTarget {} /** * This file was automatically generated by json-schema-to-typescript. * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, * and run json-schema-to-typescript to regenerate this file. */ export interface FsFolder {} /** * This file was automatically generated by json-schema-to-typescript. * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, * and run json-schema-to-typescript to regenerate this file. */ export interface Disk { localVolume(): boolean startup(): boolean ejectable(): boolean capacity(): number freeSpace(): number } /** * This file was automatically generated by json-schema-to-typescript. * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, * and run json-schema-to-typescript to regenerate this file. */ /** * A Finder Window */ export interface FinderWindow { target(): any currentView(): string } /** * This file was automatically generated by json-schema-to-typescript. * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, * and run json-schema-to-typescript to regenerate this file. */ /** * This class represents Path Finder. */ export interface Application { home(): any selection(): null | FsItem[] startupDisk(): any desktop(): any trash(): any } /** * This file was automatically generated by json-schema-to-typescript. * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, * and run json-schema-to-typescript to regenerate this file. */ /** * An Info Window */ export interface InfoWindow { item(): any } // CLass Extension // Records /** * This file was automatically generated by json-schema-to-typescript. * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, * and run json-schema-to-typescript to regenerate this file. */ export interface PrintSettings { /** * the number of copies of a document to be printed */ copies(): number /** * Should printed copies be collated? */ collating(): boolean /** * the first page of the document to be printed */ startingPage(): number /** * the last page of the document to be printed */ endingPage(): number /** * number of logical pages laid across a physical page */ pagesAcross(): number /** * number of logical pages laid out down a physical page */ pagesDown(): number /** * how errors are handled */ errorHandling(): any /** * for fax number */ faxNumber(): string /** * for target printer */ targetPrinter(): string } // Function options /** * This file was automatically generated by json-schema-to-typescript. * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, * and run json-schema-to-typescript to regenerate this file. */ export interface CloseOptionalParameter { /** * Whether or not changes should be saved before closing. */ saving?: any /** * The file in which to save the document. */ savingIn?: any } /** * This file was automatically generated by json-schema-to-typescript. * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, * and run json-schema-to-typescript to regenerate this file. */ export interface SaveOptionalParameter { /** * The file in which to save the document. */ in?: any /** * The type of file to save. */ as?: string } /** * This file was automatically generated by json-schema-to-typescript. * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, * and run json-schema-to-typescript to regenerate this file. */ export interface PrintOptionalParameter { /** * The print settings to use. */ withProperties?: any /** * Should the application show the print dialog? */ printDialog?: boolean } /** * This file was automatically generated by json-schema-to-typescript. * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, * and run json-schema-to-typescript to regenerate this file. */ export interface QuitOptionalParameter { /** * Whether or not changed documents should be saved before closing. */ saving?: any } /** * This file was automatically generated by json-schema-to-typescript. * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, * and run json-schema-to-typescript to regenerate this file. */ export interface CountOptionalParameter { /** * The class of objects to be counted. */ each?: any } /** * This file was automatically generated by json-schema-to-typescript. * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, * and run json-schema-to-typescript to regenerate this file. */ export interface DuplicateOptionalParameter { /** * The location for the new object(s). */ to?: string /** * Properties to be set in the new duplicated object(s). */ withProperties?: any replacing?: boolean } /** * This file was automatically generated by json-schema-to-typescript. * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, * and run json-schema-to-typescript to regenerate this file. */ export interface MakeOptionalParameter { /** * The class of the new object. */ new: any /** * The location at which to insert the object. */ at?: any /** * The initial contents of the object. */ withContents?: any /** * The initial values for properties of the object. */ withProperties?: any } /** * This file was automatically generated by json-schema-to-typescript. * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, * and run json-schema-to-typescript to regenerate this file. */ export interface MoveOptionalParameter { /** * The new location for the object(s). */ to: string replacing?: boolean } /** * This file was automatically generated by json-schema-to-typescript. * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, * and run json-schema-to-typescript to regenerate this file. */ export interface PfOpenOptionalParameter { /** * the application to open with */ using?: string } /** * This file was automatically generated by json-schema-to-typescript. * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, * and run json-schema-to-typescript to regenerate this file. */ export interface AddToolbarItemOptionalParameter { /** * The position in the toolbar for the new item. */ atPosition: number } } export interface PathFinder extends PathFinder.Application { // Functions /** * Open a document. * @param directParameter The file(s) to be opened. * */ open(directParameter: {}): void /** * Close a document. * @param directParameter the document(s) or window(s) to close. * @param option * */ close(directParameter: any, option?: PathFinder.CloseOptionalParameter): void /** * Save a document. * @param directParameter The document(s) or window(s) to save. * @param option * */ save(directParameter: any, option?: PathFinder.SaveOptionalParameter): void /** * Print a document. * @param directParameter The file(s), document(s), or window(s) to be printed. * @param option * */ print(directParameter: {}, option?: PathFinder.PrintOptionalParameter): void /** * Quit the application. * @param option * */ quit(option?: PathFinder.QuitOptionalParameter): void /** * Return the number of elements of a particular class within an object. * @param directParameter the object whose elements are to be counted * @param option * @return the number of elements */ count(directParameter: any, option?: PathFinder.CountOptionalParameter): number /** * Delete an object. * @param directParameter the object to delete * */ delete(directParameter: any): void /** * Copy object(s) and put the copies at a new location. * @param directParameter the object(s) to duplicate * @param option * @return to the duplicated object(s) */ duplicate(directParameter: {}, option?: PathFinder.DuplicateOptionalParameter): any /** * Verify if an object exists. * @param directParameter the object in question * @return true if it exists, false if not */ exists(directParameter: any): boolean /** * Make a new object. * @param option * @return to the new object */ make(option?: PathFinder.MakeOptionalParameter): any /** * Move object(s) to a new location. * @param directParameter the object(s) to move * @param option * @return to the moved object(s) */ move(directParameter: {}, option?: PathFinder.MoveOptionalParameter): any /** * Reveal an item. * @param directParameter undefined * */ reveal(directParameter: {}): void /** * undefined * @param directParameter undefined * */ select(directParameter: {}): void /** * undefined * @param directParameter undefined * @return undefined */ exists(directParameter: {}): boolean /** * undefined * @param directParameter undefined * */ delete(directParameter: {}): void /** * undefined * @param directParameter undefined * */ eject(directParameter: {}): void /** * used by DragThing to open a folder * @param directParameter undefined * @param option * */ PFOpen(directParameter: {}, option?: PathFinder.PfOpenOptionalParameter): void /** * Show info window - used by DragThing * @param directParameter undefined * */ PFInfo(directParameter: {}): void /** * Empty Trash * */ empty(): void /** * Add custom toolbar item. * @param directParameter The full path of the custom item to add to a toolbar * @param option * @return The actual position of the added item. */ addToolbarItem(directParameter: {}, option?: PathFinder.AddToolbarItemOptionalParameter): number /** * Remove custom toolbar item. * @param directParameter The name of the custom item to remove from a toolbar * @return The actual position of the removed item. */ removeToolbarItem(directParameter: {}): number }