From 35ae01764a1a5020a74eee206be990d017993170 Mon Sep 17 00:00:00 2001 From: harshithad0703 Date: Mon, 9 Oct 2023 18:23:46 +0530 Subject: [PATCH] feat: :sparkles: terms implementaion with descendants and move function --- types/stack/index.d.ts | 4 ++++ types/stack/taxonomy/index.d.ts | 4 +--- types/stack/taxonomy/terms/index.d.ts | 4 +++- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/types/stack/index.d.ts b/types/stack/index.d.ts index 913585ec..adf0d85d 100644 --- a/types/stack/index.d.ts +++ b/types/stack/index.d.ts @@ -18,6 +18,7 @@ import { Release, Releases } from "./release"; import { Role, Roles } from "./role"; import { Webhook, Webhooks } from "./webhook"; import { Workflow, Workflows } from "./workflow"; +import { Taxonomy, Taxonomies } from "./taxonomy"; export interface StackConfig { api_key:string @@ -92,4 +93,7 @@ export interface Stack extends SystemFields { unShare(email: string): Promise role(): Roles role(uid: string): Role + + taxonomy(): Taxonomy + taxonomies(uid: string): Taxonomies } diff --git a/types/stack/taxonomy/index.d.ts b/types/stack/taxonomy/index.d.ts index 845d9b1b..6c265ddb 100644 --- a/types/stack/taxonomy/index.d.ts +++ b/types/stack/taxonomy/index.d.ts @@ -6,9 +6,6 @@ export interface Taxonomy extends SystemFields, SystemFunction { term(): Terms term(uid: string): Term } - -export interface Taxonomy extends SystemFields, SystemFunction { -} export interface Taxonomies extends Queryable { } @@ -19,4 +16,5 @@ export interface Taxonomies extends Creatable { ancestors(data: {term_uid: TermData, include_children_count: boolean, include_referenced_entries_count: boolean, include_count: boolean, skip: number, limit: number}): Promise + descendants(data: {term_uid: TermData, include_children_count: boolean, include_referenced_entries_count: boolean, include_count: boolean, skip: number, limit: number}): Promise + move(data: {term_uid: TermData, force: boolean}): Promise } export interface Term extends Creatable { @@ -14,6 +16,6 @@ export interface Terms extends Queryable { export interface TermData extends AnyProperty { name: string term_uid: string - taxonomy_uid: string parent_uid?: string + order: number }