Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
21a1b58
Merge pull request #244 from contentstack/master
cs-raj Jan 17, 2025
c44cd90
Merge pull request #245 from contentstack/staging
cs-raj Jan 17, 2025
f090a3a
version bump and code changes
cs-raj Jan 18, 2025
f8d8796
fix: variants type naming fix
Jan 19, 2025
0094fdd
Merge pull request #246 from contentstack/fix/DX-2015
cs-raj Jan 20, 2025
4b3e769
update sanity with delay for branch creation
harshithad0703 Jan 21, 2025
3ebc1b8
removed console log
harshithad0703 Jan 21, 2025
0de28b9
Merge pull request #249 from contentstack/fix/dx-2069-sanity-update
harshithad0703 Jan 21, 2025
a026c7e
Merge pull request #247 from contentstack/fix/1989
vkalta Jan 21, 2025
df4689c
Merge pull request #250 from contentstack/development
cs-raj Jan 21, 2025
cf2d605
Merge branch 'master' into staging
cs-raj Jan 21, 2025
8f00205
Merge pull request #252 from contentstack/fix/stage
cs-raj Jan 21, 2025
6edd839
Merge pull request #253 from contentstack/staging
cs-raj Jan 21, 2025
f0770ad
Added support for fetching entry references
sunil-lakshman Jan 22, 2025
725273c
Updated changelog file
sunil-lakshman Jan 22, 2025
1293e50
Merge pull request #254 from contentstack/feat/dx-2040-entry-reference
harshithad0703 Jan 22, 2025
c112907
Merge pull request #255 from contentstack/development
harshithad0703 Jan 22, 2025
b3d0365
update version property in types/utility/publish.d.ts
harshithad0703 Jan 24, 2025
aefa26b
Merge pull request #256 from contentstack/fix/dx-2034-version-property
harshithad0703 Jan 24, 2025
545a721
Merge pull request #257 from contentstack/development
harshithad0703 Jan 24, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## [v1.19.1](https://github.com/contentstack/contentstack-management-javascript/tree/v1.19.1) (2025-01-27)
- Feature
- Added support for get entry references
- Added delay sanity testcases
- Axios, webpack, form-data, qs version bump

## [v1.19.0](https://github.com/contentstack/contentstack-management-javascript/tree/v1.19.0) (2025-01-13)
- Feature
- Release 2.0 feature
Expand Down
29 changes: 29 additions & 0 deletions lib/stack/contentType/entry/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,35 @@ export function Entry (http, data) {
}
}

/**
* @description The get references request allows to get the references of an entry.
* @memberof Entry
* @func references
* @returns {Promise<Object>} Response Object.
* @example 1
* client.stack({ api_key: 'api_key'}).contentType('content_type_uid').entry('uid').references()
* .then((response) => console.log(response));
* @example 2
* client.stack({ api_key: 'api_key'}).contentType('content_type_uid').entry('uid').references({locale: 'en-us'})
* .then((response) => console.log(response));
*/
this.references = async (param = {}) => {
const headers = {}
if (this.stackHeaders) {
headers.headers = this.stackHeaders
}
try {
const response = await http.get(`${this.urlPath}/references`, {...headers, params: param,})
if (response.data) {
return response.data
} else {
throw error(response)
}
} catch (err) {
throw error(err)
}
}

} else {
/**
* @description The Create an entry call creates a new entry for the selected content type.
Expand Down
Loading
Loading