-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathcontenttype-query.ts
More file actions
28 lines (25 loc) · 910 Bytes
/
contenttype-query.ts
File metadata and controls
28 lines (25 loc) · 910 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import { AxiosInstance } from '@contentstack/core';
import { BaseQuery } from './base-query';
export class ContentTypeQuery extends BaseQuery {
constructor(client: AxiosInstance) {
super()
this._client = client;
this._urlPath = '/content_types';
}
/**
* @method includeGlobalFieldSchema
* @memberof ContentTypeQuery
* @description Includes the global field schema in the content type response
* @returns {ContentTypeQuery}
* @example
* import contentstack from '@contentstack/delivery-sdk'
*
* const stack = contentstack.stack({ apiKey: "apiKey", deliveryToken: "deliveryToken", environment: "environment" });
* const contentTypeQuery = stack.contentType();
* const result = await contentTypeQuery.includeGlobalFieldSchema().find();
*/
includeGlobalFieldSchema(): this {
this._queryParams.include_global_field_schema = 'true';
return this;
}
}