Sheet
Recurso
Sheetpor espacio de trabajoSheet is a tenant's table: the built-in place flows add rows to, look rows up in and update, instead of an outside spreadsheet.
At a glance
| Propiedad | Valor |
|---|---|
| apiVersion | lumen.ai/v1alpha1 |
| kind | Sheet |
| Resource name | sheets |
| Scope | Namespaced (lives in a workspace's namespace) |
Spec
Fields under spec:. Nested fields are indented under their parent.
| Campo | Tipo | Valor por defecto | Descripción |
|---|---|---|---|
baseRef | string | - | BaseRef names the SheetBase (a database of tables) this sheet is a table of. The sheet holds the link, not the base: a sheet belongs to at most one base, a deleted sheet leaves its base on its own, and a base lists its tables by finding the sheets that name it. Unset, the sheet is shown under "Unsorted".maxLength 63 |
columnsobligatorio | list of object | - | Columns are the sheet's columns, in order. A column removed from the list is hidden, not erased: the values stay in the rows, and come back if a column of the same name and type is added again.minItems 1; maxItems 100 |
columns[].choices | list of string | - | Choices are the values a choice column accepts.maxItems 100 |
columns[].currency | string | - | Currency is the ISO 4217 code a money value without one is taken to be in; ILS when unset.pattern `^[A-Z]{3}$` |
columns[].formula | string | - | Formula computes a formula column from the other columns of the row. The webhook parses it and says where it is wrong.maxLength 4000 |
columns[].multiple | boolean | - | Multiple lets a select column hold several of its options. |
columns[].nameobligatorio | string | - | Name is the column's stable id: what flows, the API and the key refer to it by. It never changes (a different name is a different column); Title is what people see and may be edited freely.minLength 1; maxLength 63; pattern `^[a-z][a-z0-9]*([_-][a-z0-9]+)*$` |
columns[].options | list of object | - | Options are the values a select column accepts, with their colours.maxItems 100 |
columns[].options[].color | string | - | Color is an antd preset colour name (blue, green, orange, red, ...) or a #rrggbb colour; the UI picks one when it is unset.pattern `^(#[0-9a-fA-F]{6}|[a-z]{3,12})$` |
columns[].options[].valueobligatorio | string | - | Value is the option's text; it is what rows store.minLength 1; maxLength 100 |
columns[].required | boolean | - | Required says a row cannot be added without a value here. |
columns[].resultType | string | - | ResultType is what a formula column gives. Unset, it is derived from the formula; set, it must agree with it.one of number, text, boolean, date, money |
columns[].titleobligatorio | string | - | Title is the column's heading.minLength 1; maxLength 100 |
columns[].typeobligatorio | string | - | SheetColumnType is what a sheet column holds. A value is checked against it on every write, so a sheet never holds a total that is not a number. link, lookup and rollup are reserved for related records: the webhook refuses them until they exist, and they are listed here so adding them later is not a change to this enum.one of text, number, money, date, file, boolean, choice, select, user, formula, link, lookup, rollup |
description | string | - | maxLength 1000 |
displayNameobligatorio | string | - | DisplayName is the title the UI shows.minLength 1; maxLength 200 |
key | list of string | - | Key names the columns that together identify a row: no two rows have the same key, and a write can upsert by it. Optional. It is set when the sheet is created and does not change after, because the rows are indexed by it.maxItems 8 |
position | integer | - | Position orders the tables of a base (lowest first, then by name).minimum 0; maximum 100000 |
Status
Written by Lumen; do not set it. Only the phase and the conditions are described here.
| Campo | Tipo | Valor por defecto | Descripción |
|---|---|---|---|
conditions | list of object | - | |
conditions[].lastTransitionTimeobligatorio | string | - | lastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. |
conditions[].messageobligatorio | string | - | message is a human readable message indicating details about the transition. This may be an empty string.maxLength 32768 |
conditions[].observedGeneration | integer | - | observedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance.minimum 0 |
conditions[].reasonobligatorio | string | - | reason contains a programmatic identifier indicating the reason for the condition's last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty.minLength 1; maxLength 1024; pattern `^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$` |
conditions[].statusobligatorio | string | - | status of the condition, one of True, False, Unknown.one of True, False, Unknown |
conditions[].typeobligatorio | string | - | type of condition in CamelCase or in foo.example.com/CamelCase.maxLength 316; pattern `^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$` |
kubectl columns
| Column | Type | JSONPath |
|---|---|---|
| Title | string | .spec.displayName |
| Rows | integer | .status.rowCount |
| Ready | string | .status.conditions[?(@.type=="Ready")].status |
| Age | date | .metadata.creationTimestamp |
Example
sheet.yaml
apiVersion: lumen.ai/v1alpha1
kind: Sheet
metadata:
name: invoices
namespace: tenant-acme
spec:
displayName: Invoices
baseRef: finance
position: 0
columns:
- {name: supplier, title: Supplier, type: text, required: true}
- {name: invoice_no, title: Invoice number, type: text, required: true}
- {name: total, title: Total, type: money, currency: ILS}
- {name: vat, title: VAT, type: formula, formula: "ROUND({total} * 0.17, 2)"}
- {name: due, title: Due date, type: date}
- {name: status, title: Status, type: choice, choices: [open, paid]}
- {name: owner, title: Owner, type: user}
- {name: scan, title: Scan, type: file}
key: [invoice_no]
¿Te ha resultado útil esta página?