UNPKG

2.67 kBTypeScriptView Raw
1import { _SPCollection, _SPInstance, IDeleteable } from "../spqueryable.js";
2import { IBasePermissions } from "../security/index.js";
3export declare class _UserCustomActions extends _SPCollection<IUserCustomActionInfo[]> {
4 /**
5 * Returns the user custom action with the specified id
6 *
7 * @param id The GUID id of the user custom action to retrieve
8 */
9 getById(id: string): IUserCustomAction;
10 /**
11 * Creates a user custom action
12 *
13 * @param properties The information object of property names and values which define the new user custom action
14 */
15 add(properties: Partial<IUserCustomActionInfo>): Promise<IUserCustomActionAddResult>;
16 /**
17 * Deletes all user custom actions in the collection
18 */
19 clear(): Promise<void>;
20}
21export interface IUserCustomActions extends _UserCustomActions {
22}
23export declare const UserCustomActions: import("../spqueryable.js").ISPInvokableFactory<IUserCustomActions>;
24export declare class _UserCustomAction extends _SPInstance<IUserCustomActionInfo> {
25 delete: (this: import("../spqueryable.js").ISPQueryable<any>) => Promise<void>;
26 /**
27 * Updates this user custom action with the supplied properties
28 *
29 * @param properties An information object of property names and values to update for this user custom action
30 */
31 update(props: Partial<IUserCustomActionInfo>): Promise<IUserCustomActionUpdateResult>;
32}
33export interface IUserCustomAction extends _UserCustomAction, IDeleteable {
34}
35export declare const UserCustomAction: import("../spqueryable.js").ISPInvokableFactory<IUserCustomAction>;
36/**
37 * Result from adding a user custom action
38 */
39export interface IUserCustomActionAddResult {
40 data: any;
41 action: IUserCustomAction;
42}
43/**
44 * Result from udating a user custom action
45 */
46export interface IUserCustomActionUpdateResult {
47 data: any;
48 action: IUserCustomAction;
49}
50export declare enum UserCustomActionRegistrationType {
51 None = 0,
52 List = 1,
53 ContentType = 2,
54 ProgId = 3,
55 FileType = 4
56}
57export declare enum UserCustomActionScope {
58 Unknown = 0,
59 Site = 2,
60 Web = 3,
61 List = 4
62}
63export interface IUserCustomActionInfo {
64 CommandUIExtension: string;
65 Description: string;
66 Group: string;
67 Id: string;
68 ImageUrl: string;
69 Location: string;
70 Name: string;
71 RegistrationId: string;
72 RegistrationType: UserCustomActionRegistrationType;
73 Rights: IBasePermissions;
74 Scope: UserCustomActionScope;
75 ScriptBlock: string;
76 ScriptSrc: string;
77 Sequence: number;
78 Title: string;
79 Url: string;
80 VersionOfUserCustomAction: string;
81}
82//# sourceMappingURL=types.d.ts.map
\No newline at end of file