Skip to content

Commit 12010a5

Browse files
committed
Merge remote-tracking branch 'origin/main' into develop
2 parents 5a06438 + f3c06c4 commit 12010a5

File tree

4 files changed

+32
-15
lines changed

4 files changed

+32
-15
lines changed

.github/workflows/sca-scan.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ jobs:
1212
env:
1313
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
1414
with:
15-
args: --all-projects
15+
args: --all-projects --fail-on=all

package-lock.json

Lines changed: 4 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@contentstack/app-sdk",
3-
"version": "1.2.1",
3+
"version": "1.2.2",
44
"types": "dist/src/index.d.ts",
55
"description": "This SDK helps connect to the development server of the Contentstack and sync the data.",
66
"main": "dist/index.js",

src/stack/index.ts

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,32 @@ class Stack {
159159
return this._connection.sendToParent('stackQuery', options).then(onData).catch(onError);
160160
}
161161

162+
/**
163+
* This API allows you to retrieve details of releases of a stack using the {@link https://www.contentstack.com/docs/developers/apis/content-management-api/#get-all-releases| Releases API} requests. This method returns a Promise object.
164+
* @param {Object} query Query for the GET call
165+
* @param {Object} params Optional parameters for the GET call
166+
* @return {Object} A Promise object which will be resolved with details of the releases.
167+
*/
168+
getReleases(query = {}, params = {}) {
169+
const optionParams: { [key: string]: any } = params;
170+
optionParams.query = query;
171+
const options = { params: optionParams, action: 'getReleases' };
172+
return this._connection.sendToParent('stackQuery', options).then(onData).catch(onError);
173+
}
174+
175+
/**
176+
* This API allows you to retrieve details of publish queue of a stack using the {@link https://www.contentstack.com/docs/developers/apis/content-management-api/#get-publish-queue| Publish Queue API} requests. This method returns a Promise object.
177+
* @param {Object} query Query for the GET call
178+
* @param {Object} params Optional parameters for the GET call
179+
* @return {Object} A Promise object which will be resolved with details of the publish queue.
180+
*/
181+
getPublishes(query = {}, params = {}) {
182+
const optionParams: { [key: string]: any } = params;
183+
optionParams.query = query;
184+
const options = { params: optionParams, action: 'getPublishes' };
185+
return this._connection.sendToParent('stackQuery', options).then(onData).catch(onError);
186+
}
187+
162188
/**
163189
* This API allows you to retrive a locale of a stack using the {@link https://www.contentstack.com/docs/apis/content-management-api/#get-a-language| Language API} requests. Method returns a Promise object.
164190
* @param {string} code Code of the desired locale

0 commit comments

Comments
 (0)