Skip to content

Feat/cs 42865 taxonomy support #106

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
4bb2bcc
feat: added taxonomies url
abhinav-from-contentstack Nov 24, 2023
663a08f
fix: updated dependencies and settings to fix npm install and build w…
abhinav-from-contentstack Nov 24, 2023
2f38633
fix: added fix for ESM module cannot use module.exports issue
abhinav-from-contentstack Nov 27, 2023
e83a2f6
WIP: added taxonomy files
abhinav-from-contentstack Nov 27, 2023
aaf2469
fix: updated talismanrc
abhinav-from-contentstack Nov 27, 2023
14d1dcb
feat: added taxonomies url
abhinav-from-contentstack Nov 29, 2023
6802d64
WIP: taxonomy tests
abhinav-from-contentstack Nov 29, 2023
bfd8607
feat: added , , and for taxonomy query
abhinav-from-contentstack Dec 1, 2023
e85eb63
feat: version bump
abhinav-from-contentstack Dec 5, 2023
9cfaabe
refactor: moved _extend
abhinav-from-contentstack Dec 14, 2023
a31fc97
fix: updated .talismanrc
abhinav-from-contentstack Dec 14, 2023
492450a
fix: added fixes for failing asset tests
abhinav-from-contentstack Dec 22, 2023
7b748aa
fix: corrected content-types for tests
abhinav-from-contentstack Dec 22, 2023
2a21fed
fix: removed .only from test, so that all tests may execute
abhinav-from-contentstack Dec 22, 2023
1717fea
fix: fixed existing tests
abhinav-from-contentstack Jan 2, 2024
a8d9e72
fix: fixed taxonomies url, levels param and added doc
abhinav-from-contentstack Jan 3, 2024
3f38d24
WIP: added integration test cases
abhinav-from-contentstack Jan 3, 2024
703b138
fix: added unit tests
abhinav-from-contentstack Jan 3, 2024
6420727
fix: added unit tests
abhinav-from-contentstack Jan 3, 2024
45ca69f
fix: corrected test prefix and content-type uid
abhinav-from-contentstack Jan 4, 2024
79b9704
fix: bumped patch version and updated lock file
abhinav-from-contentstack Jan 4, 2024
c7c0b2d
fix: removed commented tests
abhinav-from-contentstack Jan 4, 2024
7b72526
fix: removed unused file, updated description
abhinav-from-contentstack Jan 4, 2024
443e822
fix: corrected package version
abhinav-from-contentstack Jan 4, 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
13 changes: 10 additions & 3 deletions .talismanrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
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
version: ""
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
18 changes: 17 additions & 1 deletion index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,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,7 +153,14 @@ export class ContentType {
constructor();
content_type_uid: string

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

export class Taxonomies {
constructor();
Query(): TaxonomyQuery;
Entry(uid: string): Entry;
fetch(fetchOptions?: object): Promise<any>;
}
Expand Down Expand Up @@ -277,3 +285,11 @@ export class Query extends Entry {
find(fetchOptions?: object): Promise<any>;
findOne(): Promise<any>;
}

export class TaxonomyQuery 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