UNPKG

3.31 kBTypeScriptView Raw
1import { Enums } from '../extensibility';
2import { IRequestDictionary } from './IRequestDictionary';
3export declare module Shared {
4 interface IApiOperationResult<T> {
5 data: T;
6 errorMessage: string;
7 isSuccess: boolean;
8 status: number;
9 }
10 interface ITimeZone {
11 id: string;
12 displayName: string;
13 }
14 interface IUserInfo {
15 loginName?: string;
16 displayName?: string;
17 userId: number;
18 photoUrl: string;
19 }
20 interface IPortalWeb {
21 serverRelativeUrl?: string;
22 title?: string;
23 url?: string;
24 relativeUrl?: string;
25 editorGroup?: string;
26 isInRecycleBin?: boolean;
27 recycleBinItemId?: string;
28 deletedStatus?: string;
29 }
30 interface IPortalWebpart {
31 id: string;
32 title: string;
33 }
34 interface ITransactionLog {
35 messages: Array<IMessage>;
36 transactionCompleted: boolean;
37 logType: Enums.QueueMessageLogType;
38 }
39 interface IMessage {
40 message: string;
41 logType: Enums.QueueMessageLogType;
42 }
43 interface ILanguage {
44 lcid: number;
45 displayName: string;
46 name: string;
47 }
48 interface IPageLayout {
49 title: string;
50 displayName: string;
51 isDefault: boolean;
52 }
53 interface IPage {
54 title?: string;
55 name?: string;
56 url?: string;
57 parentTermId?: string;
58 ownerNavigationTerm?: string;
59 pageLayout?: string;
60 webUrl?: string;
61 }
62 interface ILookupValue {
63 id: any;
64 title: string;
65 }
66 interface IIcon {
67 iconType: Enums.IconType;
68 fontValue?: string;
69 customValue?: string;
70 backgroundColor?: string;
71 }
72 interface IPaging {
73 total?: number;
74 maxSize?: number;
75 currentPage?: number;
76 }
77 interface IPagingTypeModel {
78 kind: Enums.PagingType;
79 displayName: string;
80 }
81 interface ISortableOptions {
82 containment?: string;
83 update?: (event, ui, placeHolderElement, item) => void;
84 }
85 interface ITreePickerNode {
86 title: string;
87 hoverText: string;
88 isExpanded: boolean;
89 isSelected: boolean;
90 children: Array<ITreePickerNode>;
91 parent: ITreePickerNode;
92 domainObj: any;
93 isDisabled: boolean;
94 }
95 interface IAjaxRequest {
96 addQueryString(key?: string, value?: string): IAjaxRequest;
97 addQueryStrings(parameters?: IRequestDictionary): IAjaxRequest;
98 addHeader(key?: string, value?: string): IAjaxRequest;
99 addHeaders(parameters?: IRequestDictionary): IAjaxRequest;
100 cache(isCache?: boolean): IAjaxRequest;
101 doGet<T>(disableErrorHandling?: boolean): IAjaxInstance;
102 doUpdate<T>(body?: any, disableErrorHandling?: boolean): IAjaxInstance;
103 doPost<T>(body?: any, disableErrorHandling?: boolean): IAjaxInstance;
104 doDelete<T>(disableErrorHandling?: boolean): IAjaxInstance;
105 }
106 interface IAjaxInstance {
107 subscribe: (success?: (value: any) => void, error?: (error: any) => void) => void;
108 unsubscribe: () => void;
109 }
110}