|
1 |
| -// Type definitions for contentstack 3.11.0 |
| 1 | +// Type definitions for contentstack 3.12.0 |
2 | 2 | // Project: https://www.contentstack.com/
|
3 | 3 | // Definitions by: Contentstack <https://github.com/contentstack>
|
| 4 | +import { EntryEmbedable, Option, RenderOption } from '@contentstack/utils' |
| 5 | + |
| 6 | +// Utils |
| 7 | +export class Utils { |
| 8 | + static render(option: { |
| 9 | + entry: EntryEmbedable| EntryEmbedable[], |
| 10 | + renderOption?: RenderOption, |
| 11 | + paths?: string[] |
| 12 | + }): void; |
| 13 | + static renderContent(content: (string | string[]), option: Option): (string| string[]); |
| 14 | +} |
4 | 15 |
|
5 | 16 | //Enum for Contentstack Region
|
6 | 17 | export enum Region {
|
@@ -119,32 +130,32 @@ export class Entry {
|
119 | 130 | cachePolicy: number;
|
120 | 131 | queryCachePolicy: number;
|
121 | 132 |
|
122 |
| - only(field_uid: string): Entry; |
123 |
| - only(field_uids: string[]): Entry; |
124 |
| - only(reference_field_uid:string, field_uid: string): Entry; |
125 |
| - only(reference_field_uid:string, field_uids: string[]): Entry; |
126 |
| - |
127 |
| - except(field_uid: string): Entry; |
128 |
| - except(field_uids: string[]): Entry; |
129 |
| - except(reference_field_uid:string, field_uid: string): Entry; |
130 |
| - except(reference_field_uid:string, field_uids: string[]): Entry; |
131 |
| - |
132 |
| - setCacheProvider(provider: object): Entry; |
133 |
| - setCachePolicy(policy: number): Entry; |
134 |
| - includeReference(val: string[]): Entry; |
135 |
| - includeReference(...val: string[]): Entry; |
136 |
| - language(language_code: string): Entry; |
137 |
| - addQuery(key: string, value: string): Entry; |
138 |
| - includeEmbeddedObjects(): Entry |
| 133 | + only(field_uid: string): this; |
| 134 | + only(field_uids: string[]): this; |
| 135 | + only(reference_field_uid:string, field_uid: string): this; |
| 136 | + only(reference_field_uid:string, field_uids: string[]): this; |
| 137 | + |
| 138 | + except(field_uid: string): this; |
| 139 | + except(field_uids: string[]): this; |
| 140 | + except(reference_field_uid:string, field_uid: string): this; |
| 141 | + except(reference_field_uid:string, field_uids: string[]): this; |
| 142 | + |
| 143 | + setCacheProvider(provider: object): this; |
| 144 | + setCachePolicy(policy: number): this; |
| 145 | + includeReference(val: string[]): this; |
| 146 | + includeReference(...val: string[]): this; |
| 147 | + language(language_code: string): this; |
| 148 | + addQuery(key: string, value: string): this; |
| 149 | + includeEmbeddedObjects(): this; |
139 | 150 | /**
|
140 | 151 | * @deprecated since verion 3.3.0
|
141 | 152 | */
|
142 |
| - includeSchema(): Entry; |
143 |
| - includeReferenceContentTypeUID(): Entry; |
144 |
| - includeContentType(): Entry; |
145 |
| - includeOwner(): Entry; |
146 |
| - toJSON(): Entry; |
147 |
| - addParam(key: string, value: any): Entry; |
| 153 | + includeSchema(): this; |
| 154 | + includeReferenceContentTypeUID(): this; |
| 155 | + includeContentType(): this; |
| 156 | + includeOwner(): this; |
| 157 | + toJSON(): this; |
| 158 | + addParam(key: string, value: any): this; |
148 | 159 | fetch(fetchOptions?: object): Promise<any>;
|
149 | 160 | }
|
150 | 161 |
|
|
0 commit comments