SDTF Query Language
SDTF Query Langage format API reference
Last updated
Was this helpful?
Was this helpful?
{
"where": {
"collection": "^Colors$",
"andWhere": {
"group": "^components$",
"andWhere": {
"token": ".*",
"withTypes": { "include": ["color"] },
"select": {
"token": true,
"parents": true
}
}
}
}
}type SDTFQuery = { where: Where | Array<Where> }type WhereToken = {
token:
| string // regex compatible
| {
name?: string; // regex compatible
description?: string; // regex compatible
};
select:
| true
| {
token?: boolean;
parents?:
| true
| {
groups?: true;
collections?: true;
};
};
withTypes?: {
include?: Array<TokenTypeName>;
exclude?: Array<TokenTypeName>;
};
withModes?: {
include?: Array<string>;
exclude?: Array<string>;
}
};type WhereGroup = {
group:
| string // regex compatible
| {
name?: string; // regex compatible
description?: string; // regex compatible
};
select:
| true
| {
group?: boolean;
parents?:
| true
| {
groups?: true;
collections?: true;
};
children:
| true
| {
groups?: true;
collections?: true;
tokens?: true;
};
};
};type WhereCollection = {
collection:
| string // regex compatible
| {
name?: string; // regex compatible
description?: string; // regex compatible
};
select:
| true
| {
collection?: boolean;
parents?:
| true
| {
groups?: true;
};
children:
| true
| {
groups?: true;
tokens?: true;
};
};
withModes?: {
include?: Array<string>;
exclude?: Array<string>;
}
};{
"where": {
"collection": "^colors$",
"andWhere": {
"group": "^base",
"andWhere": {
"token": ".*",
"withTypes": { "include": ["color"] },
"select": {
"token": true,
"parents": true
}
}
}
}
}