Skip to content

Commit a7589db

Browse files
sunil-lakshmannadeem-csabhinav-from-contentstackaravindbuilt
authored
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 <[email protected]> Co-authored-by: Abhinav Gupta <[email protected]> Co-authored-by: abhinav <[email protected]> Co-authored-by: Aravind Kumar <[email protected]>
1 parent 8144417 commit a7589db

27 files changed

+12241
-18708
lines changed

.github/workflows/npm-publish.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
- uses: actions/checkout@v3
1414
- uses: actions/setup-node@v3
1515
with:
16-
node-version: '12.x'
16+
node-version: '18.x'
1717
registry-url: 'https://registry.npmjs.org'
1818
- run: npm ci
1919
- run: npm publish
@@ -25,7 +25,7 @@ jobs:
2525
- uses: actions/checkout@v3
2626
- uses: actions/setup-node@v3
2727
with:
28-
node-version: '12.x'
28+
node-version: '18.x'
2929
registry-url: 'https://npm.pkg.github.com'
3030
scope: '@contentstack'
3131
- run: npm ci

.talismanrc

+12-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
1-
threshold: medium
21
fileignoreconfig:
32
- filename: package-lock.json
4-
checksum: 0dbf56c1fd0eda1145d69b718de5b7d419650556492851c343fab05867e233a2
5-
version: ""
3+
checksum: b55c22a1b5dca347c79fea4cac3a0a3ea7487180cb21e4e3d5b2bbdf1981cebe
4+
- filename: test/typescript/taxonomy.test.ts
5+
checksum: e4bdf633e147fd60d929d379f20c814eed5f68b11421d7b53ec8826e9142de37
6+
- filename: src/core/modules/taxonomy.js
7+
checksum: 84589be9805c1be5fd6c56021c41d18365126cf82059ad2cbef1d418c70d08e0
8+
- filename: src/core/lib/utils.js
9+
checksum: 6018f9f13fa32b724d09b9cdf5f78cf030a6332ca549651e1e35fe91e8c7e0e7
10+
- filename: src/core/modules/query.js
11+
checksum: c88b336f9a271397ffedcf8c5085941ceb0bd1cd7e25ed9ada3acd8ce4f8970c
12+
- filename: test/typescript/stack.test.ts
13+
checksum: bbb3c425f8e1a63d4793f69ee9eaba9559294ff53f163a28f70ae54b1792276a
14+
version: ""

CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
## Change log
22

3+
### Version: 3.18.0
4+
#### Date: January-15-2024
5+
##### New Features:
6+
- added taxonomy support
7+
- X-User-Agent updated
8+
- added region gcp_na
39
### Version: 3.17.2
410
#### Date: November-15-2023
511
##### Bug fix:

LICENSE.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
The MIT License (MIT)
22

33

4-
Copyright (c) 2016-2023 Contentstack
4+
Copyright (c) 2016-2024 Contentstack
55

66
Permission is hereby granted, free of charge, to any person obtaining a copy
77
of this software and associated documentation files (the "Software"), to deal

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ You can use advanced sync queries to fetch custom results while performing initi
291291

292292
### The MIT License (MIT)
293293

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

296296
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:
297297

config.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ const config = {
88
content_types: "/content_types/",
99
entries: "/entries/",
1010
assets: "/assets/",
11-
environments: "/environments/"
11+
environments: "/environments/",
12+
taxonomies: "/taxonomies/entries"
1213
},
1314
live_preview: {
1415
enable: false,

index.d.ts

+14-2
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ export enum Region {
2323
US = "us",
2424
EU = "eu",
2525
AZURE_NA = "azure-na",
26-
AZURE_EU = "azure-eu"
26+
AZURE_EU = "azure-eu",
27+
GCP_NA = "gcp-na",
2728
}
2829

2930
//Enum for Contentstack CachePolicy
@@ -125,6 +126,7 @@ export class Stack {
125126
ContentType(uid: string): ContentType;
126127
Assets(uid: string): Asset;
127128
Assets(): Assets;
129+
Taxonomies(): Taxonomies;
128130

129131
setPort(port: number): Stack;
130132
setProtocol(protocol: string): Stack;
@@ -152,11 +154,13 @@ export class ContentType {
152154
constructor();
153155
content_type_uid: string
154156

155-
Query(): Query;
157+
Query(): Taxonomy;
156158
Entry(uid: string): Entry;
157159
fetch(fetchOptions?: object): Promise<any>;
158160
}
159161

162+
export class Taxonomies extends Taxonomy {}
163+
160164
export class Assets {
161165
constructor();
162166

@@ -277,3 +281,11 @@ export class Query extends Entry {
277281
find(fetchOptions?: object): Promise<any>;
278282
findOne(): Promise<any>;
279283
}
284+
285+
export class Taxonomy extends Query {
286+
constructor();
287+
above(key: string, value: string, levels?: number): Query;
288+
equalAndAbove(key: string, value: string, levels?: number): Query;
289+
below(key: string, value: string, levels?: number): Query;
290+
equalAndBelow(key: string, value: string, levels?: number): Query;
291+
}

0 commit comments

Comments
 (0)