Skip to content

Commit c0d867d

Browse files
authored
Merge pull request #2 from contentstack/development
Bug fixed for Organization accessing stack instance
2 parents 469493c + fb47cc6 commit c0d867d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+8346
-30
lines changed

.jsdoc.json

+13-5
Original file line numberDiff line numberDiff line change
@@ -28,18 +28,26 @@
2828
],
2929
"excludePattern": "(node_modules/|jsdocs)"
3030
},
31-
"templates": {
32-
"cleverLinks": false,
33-
"monospaceLinks": true
34-
},
3531
"opts": {
32+
"template": "docdash-template",
3633
"destination": "./jsdocs/",
3734
"encoding": "utf8",
3835
"private": true,
3936
"recurse": true,
40-
"template": "./node_modules/docdash",
4137
"sort": false
4238
},
39+
"templates":
40+
{
41+
"cleverLinks": false,
42+
"monospaceLinks": true,
43+
"default":
44+
{
45+
"staticFiles":
46+
{
47+
"include": [ "./docdash-template/favicon.ico"]
48+
}
49+
}
50+
},
4351
"docdash": {
4452
"static": true,
4553
"sort": false

CHANGELOG.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
# Changelog
2-
2+
## [v1.1.0](https://github.com/contentstack/contentstack-management-javascript/tree/v1.1.0) (2020-10-23)
3+
- Bug Fix
4+
- Owner of organization can access stack function
5+
36
## [v1.0.0](https://github.com/contentstack/contentstack-management-javascript/tree/v1.0.0) (2020-09-23)
47
- Initial release for Contentstack CMA base JS management SDK

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,10 @@ contentstackClient.login({ email: 'EMAIL', password: 'PASSWORD'})
4545
### Management Token
4646
[Management Tokens](https://www.contentstack.com/docs/developers/create-tokens/about-management-tokens/) are **stack-level** tokens, with no users attached to them.
4747
```
48-
contentstackClient.stack({ api_key: 'API_KEY', management_token: 'MANAGEMENT_TOKEN' })
48+
contentstackClient.stack({ api_key: 'API_KEY', management_token: 'MANAGEMENT_TOKEN' }).contentType('CONTENT_TYPE_UID')
4949
.fetch()
50-
.then((stack) => {
51-
console.log(stack)
50+
.then((contenttype) => {
51+
console.log(contenttype)
5252
})
5353
```
5454
### Contentstack Management JavaScript SDK: 5-minute Quickstart

docdash-template/.gitignore

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
node_modules
2+
fixtures-doc
3+
*.sublime-project
4+
*.sublime-workspace
5+
.DS_Store
6+
.DS_Store?
7+
._*
8+
.Spotlight-V100
9+
.Trashes
10+
ehthumbs.db
11+
Thumbs.db
12+
logs
13+
*.log
14+
jspm_packages
15+
.npm

docdash-template/.travis.yml

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
language: node_js
2+
node_js:
3+
- '8'
4+
- '10'
5+
sudo: false
6+
branches:
7+
except:
8+
- gh-pages
9+
before_script:
10+
- npm install
11+
- npm install -g jsdoc
12+
script:
13+
- npm test
14+
after_success:
15+
- cd $TRAVIS_BUILD_DIR
16+
- chmod +x generateDocs.sh
17+
- bash generateDocs.sh
18+
env:
19+
global:
20+
secure: ***REMOVED***

docdash-template/CHANGELOG.md

+65
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
## Version 1.2.0
2+
3+
* [feature] host fonts locally
4+
* [feature] separate styles for headers inside user markdown
5+
* [feature] hide static/private method depending of the config
6+
* [fix] fix empty source code lines in some browsers
7+
* [fix] improved viewing theme on smaller screens
8+
9+
## Version 1.1.1
10+
11+
* [feature] scroll to currently opened method on page load
12+
* [fix] fixed searching in IE11
13+
* [fix] hiding/showing find exact match to open only single relevant section
14+
15+
## Version 1.1.0
16+
17+
* [scripts] remove jQuery as dependency
18+
* [feature] allow aliasing event names
19+
20+
## Version 1.0.3
21+
22+
* [style] break headers into multiple lines
23+
* [style] break links in descriptions into multiple lines
24+
* [fix] fix ancestor check when there are none, like including tutorials
25+
* [fix] remove unnecessary files from published package
26+
* [fix] stop crashing on incorrect params JSDoc comments
27+
* [feature] add displaying version from package.json when it is provided
28+
* [feature] add support for yield
29+
* [feature] add support for namepsaces that are functions
30+
* [feature] add support for interfaces
31+
* [feature] add support for modifies
32+
33+
## Version 1.0.2
34+
35+
* [styles] increase space between custom menu items
36+
* [option] Added `wrap` option to wrap long names instead of trimming them
37+
* [option] Added `navLevel` option to control depth level to show in navbar, starting at 0
38+
* [option] Added `private` option to show/hide @private in navbar
39+
40+
## Version 1.0.1
41+
42+
* Allow adding custom menu items
43+
* Remove line-height: 160%
44+
45+
## Version 1.0.0
46+
47+
* Add option to add disqus comments to each page
48+
* Add option to filter through navigation items
49+
* Add option to have menus collapsed by default and only open the one for the current page
50+
* Add option to provide custom site title
51+
* Add option to provide meta information for the website
52+
* Add option to provide opengraph information for the website
53+
* Add viewport meta data
54+
* Added global table styles
55+
* Added support for @hidecontainer (jsdoc 3.5.0)
56+
* Added support for useLongnameInNav
57+
* Allow including typedefs in the menu
58+
* Allow inclusion of custom CSS
59+
* Allow injecting external or local copied scripts into HTML
60+
* Allow removing single and double quotes from pathnames
61+
* Fix crash when @example is empty or undefined
62+
* Fix issue with node 8.5
63+
* Fixing copyFile problem on some systems or nodejs versions
64+
* Removes arbitrary width property
65+
* Support ordering of the main navbar sections

docdash-template/LICENSE.md

+61
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# License
2+
3+
Docdash is free software, licensed under the Apache License, Version 2.0 (the
4+
"License"). Commercial and non-commercial use are permitted in compliance with
5+
the License.
6+
7+
Copyright (c) 2016 Clement Moron <[email protected]> and the
8+
[contributors to docdash](https://github.com/clenemt/docdash/graphs/contributors).
9+
All rights reserved.
10+
11+
You may obtain a copy of the License at:
12+
http://www.apache.org/licenses/LICENSE-2.0
13+
14+
In addition, a copy of the License is included with this distribution.
15+
16+
As stated in Section 7, "Disclaimer of Warranty," of the License:
17+
18+
> Licensor provides the Work (and each Contributor provides its Contributions)
19+
> on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
20+
> express or implied, including, without limitation, any warranties or
21+
> conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
22+
> PARTICULAR PURPOSE. You are solely responsible for determining the
23+
> appropriateness of using or redistributing the Work and assume any risks
24+
> associated with Your exercise of permissions under this License.
25+
26+
The source code for docdash is available at:
27+
https://github.com/clenemt/docdash
28+
29+
# Third-Party Software
30+
31+
Docdash includes or depends upon the following third-party software, either in
32+
whole or in part. Each third-party software package is provided under its own
33+
license.
34+
35+
## JSDoc 3
36+
37+
JSDoc 3 is free software, licensed under the Apache License, Version 2.0 (the
38+
"License"). Commercial and non-commercial use are permitted in compliance with
39+
the License.
40+
41+
Copyright (c) 2011-2016 Michael Mathews <[email protected]> and the
42+
[contributors to JSDoc](https://github.com/jsdoc3/jsdoc/graphs/contributors).
43+
All rights reserved.
44+
45+
You may obtain a copy of the License at:
46+
http://www.apache.org/licenses/LICENSE-2.0
47+
48+
In addition, a copy of the License is included with this distribution.
49+
50+
As stated in Section 7, "Disclaimer of Warranty," of the License:
51+
52+
> Licensor provides the Work (and each Contributor provides its Contributions)
53+
> on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
54+
> express or implied, including, without limitation, any warranties or
55+
> conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
56+
> PARTICULAR PURPOSE. You are solely responsible for determining the
57+
> appropriateness of using or redistributing the Work and assume any risks
58+
> associated with Your exercise of permissions under this License.
59+
60+
The source code for JSDoc 3 is available at:
61+
https://github.com/jsdoc3/jsdoc

docdash-template/README.md

+150
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,150 @@
1+
# Docdash
2+
[![Build Status](https://api.travis-ci.org/clenemt/docdash.png?branch=master)](https://travis-ci.org/clenemt/docdash) [![npm version](https://badge.fury.io/js/docdash.svg)](https://badge.fury.io/js/docdash) [![license](https://img.shields.io/npm/l/docdash.svg)](LICENSE.md)
3+
4+
A clean, responsive documentation template theme for JSDoc 3.
5+
6+
![docdash-screenshot](https://cloud.githubusercontent.com/assets/447956/13398144/4dde7f36-defd-11e5-8909-1a9013302cb9.png)
7+
8+
![docdash-screenshot-2](https://cloud.githubusercontent.com/assets/447956/13401057/e30effd8-df0a-11e5-9f51-66257ac38e94.jpg)
9+
10+
## Example
11+
See http://clenemt.github.io/docdash/ for a sample demo. :rocket:
12+
13+
## Install
14+
15+
```bash
16+
$ npm install docdash
17+
```
18+
19+
## Usage
20+
Clone repository to your designated `jsdoc` template directory, then:
21+
22+
```bash
23+
$ jsdoc entry-file.js -t path/to/docdash
24+
```
25+
26+
## Usage (npm)
27+
In your projects `package.json` file add a new script:
28+
29+
```json
30+
"script": {
31+
"generate-docs": "node_modules/.bin/jsdoc -c jsdoc.json"
32+
}
33+
```
34+
35+
In your `jsdoc.json` file, add a template option.
36+
37+
```json
38+
"opts": {
39+
"template": "node_modules/docdash"
40+
}
41+
```
42+
43+
## Sample `jsdoc.json`
44+
See the config file for the [fixtures](fixtures/fixtures.conf.json) or the sample below.
45+
46+
```json
47+
{
48+
"tags": {
49+
"allowUnknownTags": false
50+
},
51+
"source": {
52+
"include": "../js",
53+
"includePattern": "\\.js$",
54+
"excludePattern": "(node_modules/|docs)"
55+
},
56+
"plugins": [
57+
"plugins/markdown"
58+
],
59+
"opts": {
60+
"template": "assets/template/docdash/",
61+
"encoding": "utf8",
62+
"destination": "docs/",
63+
"recurse": true,
64+
"verbose": true
65+
},
66+
"templates": {
67+
"cleverLinks": false,
68+
"monospaceLinks": false
69+
}
70+
}
71+
```
72+
73+
## Options
74+
Docdash supports the following options:
75+
76+
```json5
77+
{
78+
"docdash": {
79+
"static": [false|true], // Display the static members inside the navbar
80+
"sort": [false|true], // Sort the methods in the navbar
81+
"sectionOrder": [ // Order the main section in the navbar (default order shown here)
82+
"Classes",
83+
"Modules",
84+
"Externals",
85+
"Events",
86+
"Namespaces",
87+
"Mixins",
88+
"Tutorials",
89+
"Interfaces"
90+
],
91+
"disqus": "", // Shortname for your disqus (subdomain during site creation)
92+
"openGraph": { // Open Graph options (mostly for Facebook and other sites to easily extract meta information)
93+
"title": "", // Title of the website
94+
"type": "website", // Type of the website
95+
"image": "", // Main image/logo
96+
"site_name": "", // Site name
97+
"url": "" // Main canonical URL for the main page of the site
98+
},
99+
"meta": { // Meta information options (mostly for search engines that have not indexed your site yet)
100+
"title": "", // Also will be used as postfix to actualy page title, prefixed with object/document name
101+
"description": "", // Description of overal contents of your website
102+
"keyword": "" // Keywords for search engines
103+
},
104+
"search": [false|true], // Display seach box above navigation which allows to search/filter navigation items
105+
"collapse": [false|true], // Collapse navigation by default except current object's navigation of the current page
106+
"wrap": [false|true], // Wrap long navigation names instead of trimming them
107+
"typedefs": [false|true], // Include typedefs in menu
108+
"navLevel": [integer], // depth level to show in navbar, starting at 0 (false or -1 to disable)
109+
"private": [false|true], // set to false to not show @private in navbar
110+
"removeQuotes": [none|all|trim],// Remove single and double quotes, trim removes only surrounding ones
111+
"scripts": [], // Array of external (or relative local copied using templates.default.staticFiles.include) js or css files to inject into HTML,
112+
"menu": { // Adding additional menu items after Home
113+
"Project Website": { // Menu item name
114+
"href":"https://myproject.com", //the rest of HTML properties to add to manu item
115+
"target":"_blank",
116+
"class":"menu-item",
117+
"id":"website_link"
118+
},
119+
"Forum": {
120+
"href":"https://myproject.com.forum",
121+
"target":"_blank",
122+
"class":"menu-item",
123+
"id":"forum_link"
124+
}
125+
},
126+
scopeInOutputPath: [false|true], // Add scope from package file (if present) to the output path, true by default.
127+
nameInOutputPath: [false|true], // Add name from package file to the output path, true by default.
128+
versionInOutputPath: [false|true] // Add package version to the output path, true by default.
129+
}
130+
}
131+
```
132+
133+
Place them anywhere inside your `jsdoc.json` file.
134+
135+
## Contributors
136+
137+
[![0](https://sourcerer.io/fame/ar2rsawseen/clenemt/docdash/images/0)](https://sourcerer.io/fame/ar2rsawseen/clenemt/docdash/links/0)
138+
[![1](https://sourcerer.io/fame/ar2rsawseen/clenemt/docdash/images/1)](https://sourcerer.io/fame/ar2rsawseen/clenemt/docdash/links/1)
139+
[![2](https://sourcerer.io/fame/ar2rsawseen/clenemt/docdash/images/2)](https://sourcerer.io/fame/ar2rsawseen/clenemt/docdash/links/2)
140+
[![3](https://sourcerer.io/fame/ar2rsawseen/clenemt/docdash/images/3)](https://sourcerer.io/fame/ar2rsawseen/clenemt/docdash/links/3)
141+
[![4](https://sourcerer.io/fame/ar2rsawseen/clenemt/docdash/images/4)](https://sourcerer.io/fame/ar2rsawseen/clenemt/docdash/links/4)
142+
[![5](https://sourcerer.io/fame/ar2rsawseen/clenemt/docdash/images/5)](https://sourcerer.io/fame/ar2rsawseen/clenemt/docdash/links/5)
143+
[![6](https://sourcerer.io/fame/ar2rsawseen/clenemt/docdash/images/6)](https://sourcerer.io/fame/ar2rsawseen/clenemt/docdash/links/6)
144+
[![7](https://sourcerer.io/fame/ar2rsawseen/clenemt/docdash/images/7)](https://sourcerer.io/fame/ar2rsawseen/clenemt/docdash/links/7)
145+
146+
## Thanks
147+
Thanks to [lodash](https://lodash.com) and [minami](https://github.com/nijikokun/minami).
148+
149+
## License
150+
Licensed under the Apache License, version 2.0. (see [Apache-2.0](LICENSE.md)).

docdash-template/favicon.ico

31.3 KB
Binary file not shown.

0 commit comments

Comments
 (0)