Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
bcb43d2
feat: Support new REST preview service
Deepak-Kharah Oct 23, 2023
7803e7f
feat: make management token optional
Deepak-Kharah Oct 26, 2023
a2f8f84
test: test live preview changes
Deepak-Kharah Oct 26, 2023
8bee6a0
chore: remove failing workflow
Deepak-Kharah Oct 26, 2023
d8c0729
feat: use separate header for preview token
Deepak-Kharah Nov 8, 2023
e831040
refactor: remove logs
Deepak-Kharah Nov 8, 2023
6453bb4
Merge pull request #1 from Deepak-Kharah/EB-550-add-preveiew-token-he…
Deepak-Kharah Nov 8, 2023
645f388
feat: add live preview hash in header
Deepak-Kharah Nov 8, 2023
98d4ab1
fix: typo in the interface name
Deepak-Kharah Nov 22, 2023
82c6d2a
Merge pull request #2 from Deepak-Kharah/EB-634-typo-in-the-interface
Deepak-Kharah Nov 23, 2023
5ef8408
Merge remote-tracking branch 'upstream/master' into VC-311-changes-fo…
Deepak-Kharah Dec 1, 2023
7a3e454
chore: add sca scan
Deepak-Kharah Dec 8, 2023
e9788b4
feat: remove live preview optimization for live editor
Deepak-Kharah Dec 12, 2023
b9faa4b
Merge pull request #3 from Deepak-Kharah/EB-749-remove-live-preview-o…
Deepak-Kharah Dec 12, 2023
0763916
feat: remove caching
Deepak-Kharah Dec 14, 2023
547cbe5
feat: remove content type check from find queries.
Deepak-Kharah Dec 14, 2023
85beba7
fix: add hash check
Deepak-Kharah Dec 14, 2023
d0d2bbd
Merge pull request #4 from Deepak-Kharah/EB-749-remove-live-preview-o…
Deepak-Kharah Jan 11, 2024
9fdcf2d
V3 (#118) (#119)
sunil-lakshman Jan 16, 2024
c0cfcc6
Updated this branch by pulling changes from master branch
harshithad0703 Jan 19, 2024
7c502f3
test: Fixed the failing test case
harshithad0703 Jan 19, 2024
8d845b8
Merge branch 'master' into VC-311-changes-for-rest-preview-service
harshithad0703 Jan 19, 2024
9aa21a2
Merge branch 'next' into VC-311-changes-for-rest-preview-service
harshithad0703 Jan 19, 2024
4564971
Revert "Updated this branch by pulling changes from master branch"
harshithad0703 Jan 22, 2024
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
Prev Previous commit
Next Next commit
V3 (#118) (#119)
* Updated X-User-Agent header (#109)

* feat: added taxonomies url

* fix: updated dependencies and settings to fix npm install and build warnings

* fix: added fix for ESM module cannot use module.exports issue

* WIP: added taxonomy files

* fix: updated talismanrc

* feat: added taxonomies url

* WIP: taxonomy tests

* feat: added , ,  and  for taxonomy query

* feat: version bump

* refactor: moved _extend

* fix: updated .talismanrc

* fix: added fixes for failing asset tests

* fix: corrected content-types for tests

* fix: removed .only from test, so that all tests may execute

* fix: fixed existing tests

* fix: fixed taxonomies url, levels param and added doc

* WIP: added integration test cases

* fix: added unit tests

* fix: added unit tests

* fix: corrected test prefix and content-type uid

* fix: bumped patch version and updated lock file

* fix: removed commented tests

* fix: removed unused file, updated description

* fix: corrected package version

* feat: added gcp_na region

* feat: updated talismanrc

* fix: updated minor version

* fix: replaced Taxonomies().Query() with Taxonomies()

* fix: updated tests and types

* Bug/cs 40045 x user agent (#108)

* Updated X-User-Agent header

* Updated the X-User-Agent

* fix: fixed vulnerabilities

---------




* Upgraded node version in github workflow file (#116)

* feat: added taxonomies url

* fix: updated dependencies and settings to fix npm install and build warnings

* fix: added fix for ESM module cannot use module.exports issue

* WIP: added taxonomy files

* fix: updated talismanrc

* feat: added taxonomies url

* WIP: taxonomy tests

* feat: added , ,  and  for taxonomy query

* feat: version bump

* refactor: moved _extend

* fix: updated .talismanrc

* fix: added fixes for failing asset tests

* fix: corrected content-types for tests

* fix: removed .only from test, so that all tests may execute

* fix: fixed existing tests

* fix: fixed taxonomies url, levels param and added doc

* WIP: added integration test cases

* fix: added unit tests

* fix: added unit tests

* fix: corrected test prefix and content-type uid

* fix: bumped patch version and updated lock file

* fix: removed commented tests

* fix: removed unused file, updated description

* fix: corrected package version

* feat: added gcp_na region

* feat: updated talismanrc

* fix: updated minor version

* fix: replaced Taxonomies().Query() with Taxonomies()

* fix: updated tests and types

* Bug/cs 40045 x user agent (#108)

* Updated X-User-Agent header

* Updated the X-User-Agent

* fix: fixed vulnerabilities

* Fix/ghwf issuefix (#115)

* Updated X-User-Agent header (#109)

* feat: added taxonomies url

* fix: updated dependencies and settings to fix npm install and build warnings

* fix: added fix for ESM module cannot use module.exports issue

* WIP: added taxonomy files

* fix: updated talismanrc

* feat: added taxonomies url

* WIP: taxonomy tests

* feat: added , ,  and  for taxonomy query

* feat: version bump

* refactor: moved _extend

* fix: updated .talismanrc

* fix: added fixes for failing asset tests

* fix: corrected content-types for tests

* fix: removed .only from test, so that all tests may execute

* fix: fixed existing tests

* fix: fixed taxonomies url, levels param and added doc

* WIP: added integration test cases

* fix: added unit tests

* fix: added unit tests

* fix: corrected test prefix and content-type uid

* fix: bumped patch version and updated lock file

* fix: removed commented tests

* fix: removed unused file, updated description

* fix: corrected package version

* feat: added gcp_na region

* feat: updated talismanrc

* fix: updated minor version

* fix: replaced Taxonomies().Query() with Taxonomies()

* fix: updated tests and types

* Bug/cs 40045 x user agent (#108)

* Updated X-User-Agent header

* Updated the X-User-Agent

* fix: fixed vulnerabilities

---------




* Upgraded the working nodejs version in GH workflows

---------




---------




---------

Co-authored-by: Nadeem <110535104+nadeem-cs@users.noreply.github.com>
Co-authored-by: Abhinav Gupta <abhinav.gupta@contentstack.com>
Co-authored-by: abhinav <63039365+abhinav-from-contentstack@users.noreply.github.com>
Co-authored-by: Aravind Kumar <aravind.kumar@contentstack.com>
  • Loading branch information
5 people authored Jan 16, 2024
commit 9fdcf2d9a6831b70cb04ca6978ac97e6eca11a0e
4 changes: 2 additions & 2 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '12.x'
node-version: '18.x'
registry-url: 'https://registry.npmjs.org'
- run: npm ci
- run: npm publish
Expand All @@ -25,7 +25,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '12.x'
node-version: '18.x'
registry-url: 'https://npm.pkg.github.com'
scope: '@contentstack'
- run: npm ci
Expand Down
15 changes: 12 additions & 3 deletions .talismanrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
threshold: medium
fileignoreconfig:
- filename: package-lock.json
checksum: 0dbf56c1fd0eda1145d69b718de5b7d419650556492851c343fab05867e233a2
version: ""
checksum: b55c22a1b5dca347c79fea4cac3a0a3ea7487180cb21e4e3d5b2bbdf1981cebe
- filename: test/typescript/taxonomy.test.ts
checksum: e4bdf633e147fd60d929d379f20c814eed5f68b11421d7b53ec8826e9142de37
- filename: src/core/modules/taxonomy.js
checksum: 84589be9805c1be5fd6c56021c41d18365126cf82059ad2cbef1d418c70d08e0
- filename: src/core/lib/utils.js
checksum: 6018f9f13fa32b724d09b9cdf5f78cf030a6332ca549651e1e35fe91e8c7e0e7
- filename: src/core/modules/query.js
checksum: c88b336f9a271397ffedcf8c5085941ceb0bd1cd7e25ed9ada3acd8ce4f8970c
- filename: test/typescript/stack.test.ts
checksum: bbb3c425f8e1a63d4793f69ee9eaba9559294ff53f163a28f70ae54b1792276a
version: ""
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
## Change log

### Version: 3.18.0
#### Date: January-15-2024
##### New Features:
- added taxonomy support
- X-User-Agent updated
- added region gcp_na
### Version: 3.17.2
#### Date: November-15-2023
##### Bug fix:
Expand Down
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
The MIT License (MIT)


Copyright (c) 2016-2023 Contentstack
Copyright (c) 2016-2024 Contentstack

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ You can use advanced sync queries to fetch custom results while performing initi

### The MIT License (MIT)

Copyright © 2012-2021 [Contentstack](https://www.contentstack.com). All Rights Reserved
Copyright © 2012-2024 [Contentstack](https://www.contentstack.com). All Rights Reserved

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

Expand Down
3 changes: 2 additions & 1 deletion config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ const config = {
content_types: "/content_types/",
entries: "/entries/",
assets: "/assets/",
environments: "/environments/"
environments: "/environments/",
taxonomies: "/taxonomies/entries"
},
live_preview: {
enable: false,
Expand Down
16 changes: 14 additions & 2 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ export enum Region {
US = "us",
EU = "eu",
AZURE_NA = "azure-na",
AZURE_EU = "azure-eu"
AZURE_EU = "azure-eu",
GCP_NA = "gcp-na",
}

//Enum for Contentstack CachePolicy
Expand Down Expand Up @@ -125,6 +126,7 @@ export class Stack {
ContentType(uid: string): ContentType;
Assets(uid: string): Asset;
Assets(): Assets;
Taxonomies(): Taxonomies;

setPort(port: number): Stack;
setProtocol(protocol: string): Stack;
Expand Down Expand Up @@ -152,11 +154,13 @@ export class ContentType {
constructor();
content_type_uid: string

Query(): Query;
Query(): Taxonomy;
Entry(uid: string): Entry;
fetch(fetchOptions?: object): Promise<any>;
}

export class Taxonomies extends Taxonomy {}

export class Assets {
constructor();

Expand Down Expand Up @@ -277,3 +281,11 @@ export class Query extends Entry {
find(fetchOptions?: object): Promise<any>;
findOne(): Promise<any>;
}

export class Taxonomy extends Query {
constructor();
above(key: string, value: string, levels?: number): Query;
equalAndAbove(key: string, value: string, levels?: number): Query;
below(key: string, value: string, levels?: number): Query;
equalAndBelow(key: string, value: string, levels?: number): Query;
}
Loading