UNPKG

3.83 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 content type)
18 * @param name The name of the content type
19 * @param description The description of the content type
20 * @param group The group in which to add the content type
21 * @param additionalSettings Any additional settings to provide when creating the content type
22 *
23 */
24 add(id: string, name: string, description?: string, group?: string, additionalSettings?: Record<string, string | number | boolean>): Promise<IContentTypeAddResult>;
25}
26export interface IContentTypes extends _ContentTypes {
27}
28export declare const ContentTypes: import("../spqueryable.js").ISPInvokableFactory<IContentTypes>;
29export declare class _ContentType extends _SPInstance<IContentTypeInfo> {
30 delete: (this: import("../spqueryable.js").ISPQueryable<any>) => Promise<void>;
31 /**
32 * Gets the column (also known as field) references in the content type.
33 */
34 get fieldLinks(): IFieldLinks;
35 /**
36 * Gets a value that specifies the collection of fields for the content type.
37 */
38 get fields(): ISPCollection;
39 /**
40 * Gets the parent content type of the content type.
41 */
42 get parent(): IContentType;
43 /**
44 * Gets a value that specifies the collection of workflow associations for the content type.
45 */
46 get workflowAssociations(): ISPCollection;
47}
48export interface IContentType extends _ContentType, IDeleteable {
49}
50export declare const ContentType: import("../spqueryable.js").ISPInvokableFactory<IContentType>;
51/**
52 * Represents the output of adding a content type
53 */
54export interface IContentTypeAddResult {
55 contentType: IContentType;
56 data: Partial<IContentTypeInfo>;
57}
58export declare class _FieldLinks extends _SPCollection<IFieldLinkInfo[]> {
59 /**
60 * Gets a FieldLink by GUID id
61 *
62 * @param id The GUID id of the field link
63 */
64 getById(id: string): IFieldLink;
65}
66export interface IFieldLinks extends _FieldLinks {
67}
68export declare const FieldLinks: import("../spqueryable.js").ISPInvokableFactory<IFieldLinks>;
69export declare class _FieldLink extends _SPInstance<IFieldLinkInfo> {
70}
71export interface IFieldLink extends _FieldLink {
72}
73export declare const FieldLink: import("../spqueryable.js").ISPInvokableFactory<IFieldLink>;
74export interface IContentTypeInfo {
75 Description: string;
76 DisplayFormTemplateName: string;
77 DisplayFormUrl: string;
78 DocumentTemplate: string;
79 DocumentTemplateUrl: string;
80 EditFormTemplateName: string;
81 EditFormUrl: string;
82 Group: string;
83 Hidden: boolean;
84 Id: {
85 StringValue: string;
86 };
87 JSLink: string;
88 MobileDisplayFormUrl: string;
89 MobileEditFormUrl: string;
90 MobileNewFormUrl: string;
91 Name: string;
92 NewFormTemplateName: string;
93 NewFormUrl: string;
94 ReadOnly: boolean;
95 SchemaXml: string;
96 Scope: string;
97 Sealed: boolean;
98 StringId: string;
99}
100export interface IFieldLinkInfo {
101 FieldInternalName: string | null;
102 Hidden: boolean;
103 Id: string;
104 Name: string;
105 Required: boolean;
106}
107//# sourceMappingURL=types.d.ts.map
\No newline at end of file