diff --git a/types/stack/taxonomy/index.d.ts b/types/stack/taxonomy/index.d.ts new file mode 100644 index 00000000..845d9b1b --- /dev/null +++ b/types/stack/taxonomy/index.d.ts @@ -0,0 +1,22 @@ +import { AnyProperty, SystemFields } from "../../utility/fields"; +import { Creatable, Queryable, SystemFunction } from "../../utility/operations"; +import { Term, Terms } from "../taxonomy/terms" + +export interface Taxonomy extends SystemFields, SystemFunction { + term(): Terms + term(uid: string): Term +} + +export interface Taxonomy extends SystemFields, SystemFunction { +} + +export interface Taxonomies extends Queryable { +} + +export interface Taxonomies extends Creatable { +} + +export interface TaxonomyData extends AnyProperty { + name: string + taxonomy_uid: string +} diff --git a/types/stack/taxonomy/terms/index.d.ts b/types/stack/taxonomy/terms/index.d.ts new file mode 100644 index 00000000..1334636d --- /dev/null +++ b/types/stack/taxonomy/terms/index.d.ts @@ -0,0 +1,19 @@ +import { AnyProperty, SystemFields } from "../../../utility/fields"; +import { Creatable, Queryable, SystemFunction } from "../../../utility/operations"; + +export interface Term extends SystemFields, SystemFunction { + ancestors(data: {term_uid: TermData, include_children_count: boolean, include_referenced_entries_count: boolean, include_count: boolean, skip: number, limit: number}): Promise +} + +export interface Term extends Creatable { +} + +export interface Terms extends Queryable { +} + +export interface TermData extends AnyProperty { + name: string + term_uid: string + taxonomy_uid: string + parent_uid?: string +}