Skip to content

Commit f4aafa6

Browse files
committed
Docs update
1 parent 09fcf11 commit f4aafa6

File tree

4 files changed

+26
-16
lines changed

4 files changed

+26
-16
lines changed

lib/contentstackCollection.js

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
/**
2+
* @namespace ContentstackCollection
3+
*/
14
export default class ContentstackCollection {
25
constructor (response, http, stackHeaders = null, wrapperCollection) {
36
const data = response.data || {}

lib/stack/deliveryToken/index.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
import cloneDeep from 'lodash/cloneDeep'
22
import { create, update, deleteEntity, fetch, query } from '../../entity'
3-
// import ContentstackCollection from '../../contentstackCollection'
4-
// import error from '../../core/contentstackError'
53

4+
/**
5+
* Delivery tokens provide read-only access to the associated environments. Read more about <a href='https://www.contentstack.com/docs/developers/create-tokens/about-delivery-tokens'>DeliveryToken</a>.
6+
* @namespace DeliveryToken
7+
*/
68
export function DeliveryToken (http, data = {}) {
79
this.stackHeaders = data.stackHeaders
810
this.urlPath = `/stacks/delivery_tokens`

lib/stack/environment/index.js

+5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
import cloneDeep from 'lodash/cloneDeep'
22
import { create, update, deleteEntity, fetch, query } from '../../entity'
33

4+
/**
5+
* A publishing environment corresponds to one or more deployment servers or a content delivery destination where the entries need to be published. Read more about <a href='https://www.contentstack.com/docs/developers/set-up-environments'>Environment</a>.
6+
* @namespace Environment
7+
* */
8+
49
export function Environment (http, data = {}) {
510
this.stackHeaders = data.stackHeaders
611
this.urlPath = `/environments`

lib/stack/index.js

+14-14
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ export function Stack (http, data) {
7373
/**
7474
* @description Content type defines the structure or schema of a page or a section of your web or mobile property.
7575
* @param {String} uid The UID of the ContentType you want to get details.
76-
* @returns {ContenType} Instace of ContentType.
76+
* @returns {ContentType} Instance of ContentType.
7777
* @example
7878
* import * as contentstack from '@contentstack/management'
7979
* const client = contentstack.client()
@@ -95,7 +95,7 @@ export function Stack (http, data) {
9595
/**
9696
* @description Locale allows you to create and publish entries in any language.
9797
* @param {String} uid The UID of the Locale you want to get details.
98-
* @returns {Locale} Instace of Locale.
98+
* @returns {Locale} Instance of Locale.
9999
* @example
100100
* import * as contentstack from '@contentstack/management'
101101
* const client = contentstack.client()
@@ -117,7 +117,7 @@ export function Stack (http, data) {
117117
/**
118118
* @description Assets refer to all the media files (images, videos, PDFs, audio files, and so on) uploaded in your Contentstack repository for future use.
119119
* @param {String} uid The UID of the Asset you want to get details.
120-
* @returns {Asset} Instace of Asset.
120+
* @returns {Asset} Instance of Asset.
121121
* @example
122122
* import * as contentstack from '@contentstack/management'
123123
* const client = contentstack.client()
@@ -138,7 +138,7 @@ export function Stack (http, data) {
138138
/**
139139
* @description Global field defines the structure or schema of a page or a section of your web or mobile property.
140140
* @param {String} uid The UID of the Global field you want to get details.
141-
* @returns {ContenType} Instace of Global field.
141+
* @returns {GlobalField} Instance of Global field.
142142
* @example
143143
* import * as contentstack from '@contentstack/management'
144144
* const client = contentstack.client()
@@ -160,16 +160,16 @@ export function Stack (http, data) {
160160
/**
161161
* @description Environment corresponds to one or more deployment servers or a content delivery destination where the entries need to be published.
162162
* @param {String} uid The UID of the Environment you want to get details.
163-
* @returns {Environment} Instace of Environment.
163+
* @returns {Environment} Instance of Environment.
164164
* @example
165165
* import * as contentstack from '@contentstack/management'
166166
* const client = contentstack.client()
167167
*
168-
* client.stack({ api_key: 'api_key'}).globalField().create()
169-
* .then((globalField) => console.log(globalField))
168+
* client.stack({ api_key: 'api_key'}).environment().create()
169+
* .then((environment) => console.log(environment))
170170
*
171-
* client.stack({ api_key: 'api_key'}).globalField('globalField_uid').fetch()
172-
* .then((globalField) => console.log(globalField))
171+
* client.stack({ api_key: 'api_key'}).environment('environment_uid').fetch()
172+
* .then((environment) => console.log(environment))
173173
*/
174174
this.environment = (environmentUid = null) => {
175175
const data = { stackHeaders: this.stackHeaders }
@@ -181,7 +181,7 @@ export function Stack (http, data) {
181181
/**
182182
* @description Delivery Tokens provide read-only access to the associated environments.
183183
* @param {String} deliveryTokenUid The UID of the Delivery Token field you want to get details.
184-
* @returns {DeliveryToken} Instace of DeliveryToken.
184+
* @returns {DeliveryToken} Instance of DeliveryToken.
185185
* @example
186186
* import * as contentstack from '@contentstack/management'
187187
* const client = contentstack.client()
@@ -203,7 +203,7 @@ export function Stack (http, data) {
203203
/**
204204
* @description Extensions let you create custom fields and custom widgets that lets you customize Contentstack's default UI and behavior.
205205
* @param {String} extensionUid The UID of the Extension you want to get details.
206-
* @returns {Extension} Instace of Extension.
206+
* @returns {Extension} Instance of Extension.
207207
* @example
208208
* import * as contentstack from '@contentstack/management'
209209
* const client = contentstack.client()
@@ -226,7 +226,7 @@ export function Stack (http, data) {
226226
/**
227227
* @description Workflow is a tool that allows you to streamline the process of content creation and publishing, and lets you manage the content lifecycle of your project smoothly.
228228
* @param {String} workflowUid The UID of the Workflow you want to get details.
229-
* @returns {Workflow} Instace of Workflow.
229+
* @returns {Workflow} Instance of Workflow.
230230
* @example
231231
* import * as contentstack from '@contentstack/management'
232232
* const client = contentstack.client()
@@ -248,7 +248,7 @@ export function Stack (http, data) {
248248
/**
249249
* @description Webhooks allow you to specify a URL to which you would like Contentstack to post data when an event happens.
250250
* @param {String} webhookUid The UID of the Webhook you want to get details.
251-
* @returns {Webhook} Instace of Webhook.
251+
* @returns {Webhook} Instance of Webhook.
252252
* @example
253253
* import * as contentstack from '@contentstack/management'
254254
* const client = contentstack.client()
@@ -270,7 +270,7 @@ export function Stack (http, data) {
270270
/**
271271
* @description Labels allow you to group a collection of content within a stack. Using labels you can group content types that need to work together
272272
* @param {String} uid The UID of the Label you want to get details.
273-
* @returns {Label} Instace of Label.
273+
* @returns {Label} Instance of Label.
274274
* @example
275275
* import * as contentstack from '@contentstack/management'
276276
* const client = contentstack.client()

0 commit comments

Comments
 (0)