Dokumentacja dla programistów
Pobieranie schematu widoku według typu
Dokumentacja API (rdzeń)Dokumentacja API
Podczas tworzenia i aktualizowania widoków tablicy za pomocą API musisz znać ustawienia konfiguracji właściwe dla danego typu widoku.
Zapytania
Pobieranie schematu widoku według typu
- Zwraca obiekt JSON definiujący strukturę konfiguracji widoku tablicy właściwą dla danego typu
- Można wykonać tylko na poziomie głównym; nie można umieścić zapytania wewnątrz innego obiektu
query {
get_view_schema_by_type(
type: TABLE
mutationType: CREATE
)
}
{
"data": {
"get_view_schema_by_type": {
"schema": {
"type": "object",
"additionalProperties": false,
"properties": {
"columns": {
"type": "object",
"additionalProperties": false,
"properties": {
"column_properties": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"column_id": {
"type": "string",
"description": "The ID of the column"
},
"visible": {
"type": "boolean",
"description": "Whether the column is visible"
}
},
"required": [
"column_id",
"visible"
]
},
"description": "Configuration for main board columns"
},
"subitems_column_properties": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"column_id": {
"type": "string",
"description": "The ID of the column"
},
"visible": {
"type": "boolean",
"description": "Whether the column is visible"
}
},
"required": [
"column_id",
"visible"
]
},
"description": "Configuration for subitems columns"
},
"floating_columns_count": {
"type": "number",
"description": "Number of floating columns to display"
}
}
},
"group_by": {
"type": "object",
"additionalProperties": false,
"properties": {
"conditions": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"columnId": {
"type": "string",
"description": "ID of the column to group by"
},
"config": {
"type": "object",
"additionalProperties": false,
"properties": {
"sortSettings": {
"type": "object",
"description": "Sort settings for the column"
}
},
"description": "Configuration for the group by column"
}
},
"required": [
"columnId"
]
},
"description": "Conditions for grouping items by column"
}
}
}
}
}
}
},
"extensions": {
"request_id": "eb261ec3-94c5-03c3-c27d-418c62gb31ce"
}
}
Argumenty
| Argument | Typ | Opis | Wartości wyliczeniowe |
|---|---|---|---|
| mutationType | ViewMutationKind! |
Typ mutacji, dla której chcesz pobrać schemat. | CREATEUPDATE |
| type | ViewKind! |
Typ widoku, dla którego chcesz pobrać schemat. Każdy typ ma inne właściwości i reguły walidacji. | APPDASHBOARDFORMTABLE |