forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
fontoxml.d.ts
49 lines (44 loc) · 1.49 KB
/
fontoxml.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
// Type definitions for FontoXML
// Project: http://www.fontoxml.com/
// Definitions by: Roland Zwaga <https://github.com/rolandzwaga>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare module com.fontoxml
{
//This is a description of how to invoke the FontoXML editor, and instruct it to load (a) document(s).
//Please keep in mind that the URL length may be limited in certain browsers, so a safe limit of 2000 characters
//for the whole URL including query parameters should be used.
export interface IInvocator
{
//The document id's of the documents to load from the CMS.
documentIds: string[];
//The base URL where the CMS endpoints are exposed.
cmsBaseUrl: string;
//The edit session token to use for accessing the CMS endpoints.
editSessionToken: string;
//User information.
user?: IUserInfo;
//Workflow information.
workflow?: IWorkflowInfo;
//Allow/disallow auto-save functionality.
autosave?: boolean;
//If set to a positive integer, enable the Heartbeat API to send every x seconds.
heartbeat?: number;
}
export interface IWorkflowInfo
{
id:string;
displayName:string;
}
export interface IUserInfo extends IWorkflowInfo
{
roleId:string;
}
//This is describes the object that is assigned to the MessageEvent.data
//property after the FontoXML editor posts a message
export interface IFontoMessageEventData {
command: string;
type: string;
scope: com.fontoxml.IInvocator;
metadata: any;
}
}