UNPKG

4.34 kBTypeScriptView Raw
1import { _SPCollection, _SPInstance, ISPCollection, IDeleteable } from "../spqueryable.js";
2export declare class _ContentTypes extends _SPCollection<IContentTypeInfo[]> {
3 /**
4 * Adds an existing contenttype to a content type collection
5 *
6 * @param contentTypeId in the following format, for example: 0x010102
7 */
8 addAvailableContentType(contentTypeId: string): Promise<IContentTypeAddResult>;
9 /**
10 * Gets a ContentType by content type id
11 * @param id The id of the content type to get, in the following format, for example: 0x010102
12 */
13 getById(id: string): IContentType;
14 /**
15 * Adds a new content type to the collection
16 *
17 * @param id The desired content type id for the new content type (also determines the parent
18 * content type)
19 * @param name The name of the content type
20 * @param description The description of the content type
21 * @param group The group in which to add the content type
22 * @param additionalSettings Any additional settings to provide when creating the content type
23 *
24 */
25 add(id: string, name: string, description?: string, group?: string, additionalSettings?: Record<string, string | number | boolean>): Promise<IContentTypeAddResult>;
26}
27export interface IContentTypes extends _ContentTypes {
28}
29export declare const ContentTypes: import("../spqueryable.js").ISPInvokableFactory<IContentTypes>;
30export declare class _ContentType extends _SPInstance<IContentTypeInfo> {
31 delete: (this: import("../spqueryable.js").ISPQueryable<any>) => Promise<void>;
32 /**
33 * Updates this list instance with the supplied properties
34 *
35 * @param properties A plain object hash of values to update for the web
36 */
37 update(properties: Record<string, any>): Promise<void>;
38 /**
39 * Gets the column (also known as field) references in the content type.
40 */
41 get fieldLinks(): IFieldLinks;
42 /**
43 * Gets a value that specifies the collection of fields for the content type.
44 */
45 get fields(): ISPCollection;
46 /**
47 * Gets the parent content type of the content type.
48 */
49 get parent(): IContentType;
50 /**
51 * Gets a value that specifies the collection of workflow associations for the content type.
52 */
53 get workflowAssociations(): ISPCollection;
54}
55export interface IContentType extends _ContentType, IDeleteable {
56}
57export declare const ContentType: import("../spqueryable.js").ISPInvokableFactory<IContentType>;
58/**
59 * Represents the output of adding a content type
60 */
61export interface IContentTypeAddResult {
62 contentType: IContentType;
63 data: Partial<IContentTypeInfo>;
64}
65export declare class _FieldLinks extends _SPCollection<IFieldLinkInfo[]> {
66 /**
67 * Gets a FieldLink by GUID id
68 *
69 * @param id The GUID id of the field link
70 */
71 getById(id: string): IFieldLink;
72}
73export interface IFieldLinks extends _FieldLinks {
74}
75export declare const FieldLinks: import("../spqueryable.js").ISPInvokableFactory<IFieldLinks>;
76export declare class _FieldLink extends _SPInstance<IFieldLinkInfo> {
77}
78export interface IFieldLink extends _FieldLink {
79}
80export declare const FieldLink: import("../spqueryable.js").ISPInvokableFactory<IFieldLink>;
81export interface IContentTypeInfo {
82 Description: string;
83 DispFormClientSideComponentId: string;
84 DispFormClientSideComponentProperties: string;
85 DisplayFormTemplateName: string;
86 DisplayFormUrl: string;
87 DocumentTemplate: string;
88 DocumentTemplateUrl: string;
89 EditFormClientSideComponentId: string;
90 EditFormClientSideComponentProperties: string;
91 EditFormTemplateName: string;
92 EditFormUrl: string;
93 Group: string;
94 Hidden: boolean;
95 Id: {
96 StringValue: string;
97 };
98 JSLink: string;
99 MobileDisplayFormUrl: string;
100 MobileEditFormUrl: string;
101 MobileNewFormUrl: string;
102 Name: string;
103 NewFormClientSideComponentId: string;
104 NewFormClientSideComponentProperties: string;
105 NewFormTemplateName: string;
106 NewFormUrl: string;
107 ReadOnly: boolean;
108 SchemaXml: string;
109 Scope: string;
110 Sealed: boolean;
111 StringId: string;
112}
113export interface IFieldLinkInfo {
114 FieldInternalName: string | null;
115 Hidden: boolean;
116 Id: string;
117 Name: string;
118 Required: boolean;
119}
120//# sourceMappingURL=types.d.ts.map
\No newline at end of file