Custom Templates
albert.resources.custom_templates
Attributes:
Name | Type | Description |
---|---|---|
CustomTemplateData |
|
|
ACLEntry |
|
CustomTemplateData
CustomTemplateData = Annotated[
_CustomTemplateDataUnion,
Field(discriminator="category"),
]
ACLEntry
DataTemplateInventory
Bases: EntityLink
Attributes:
Name | Type | Description |
---|---|---|
batch_size |
float | None
|
|
sheet |
list[Sheet | EntityLink] | None
|
|
category |
InventoryCategory | None
|
|
DesignLink
TemplateCategory
Priority
GeneralData
Bases: BaseTaggedResource
Attributes:
Name | Type | Description |
---|---|---|
category |
Literal[GENERAL]
|
|
name |
str | None
|
|
project |
SerializeAsEntityLink[Project] | None
|
|
location |
SerializeAsEntityLink[Location] | None
|
|
assigned_to |
SerializeAsEntityLink[User] | None
|
|
notebook_id |
NotebookId | None
|
|
priority |
Priority | None
|
|
sources |
list[TaskSource] | None
|
|
parent_id |
str | None
|
|
assigned_to
assigned_to: SerializeAsEntityLink[User] | None = Field(
alias="AssignedTo", default=None
)
JobStatus
SamInput
SamConfig
Bases: BaseResource
Attributes:
Name | Type | Description |
---|---|---|
configuration_name |
str
|
|
configurationId |
str
|
|
machineId |
str | None
|
|
input |
list[SamInput] | None
|
|
job_status |
JobStatus | None
|
|
Workflow
Block
QCBatchData
Bases: BaseTaggedResource
Attributes:
Name | Type | Description |
---|---|---|
category |
Literal[QC_BATCH]
|
|
project |
SerializeAsEntityLink[Project] | None
|
|
inventories |
list[DataTemplateInventory] | None
|
|
workflow |
list[EntityLink]
|
|
location |
SerializeAsEntityLink[Location] | None
|
|
batch_size_unit |
str | None
|
|
batch_size |
str | None
|
|
priority |
Priority
|
|
name |
str | None
|
|
inventories
inventories: list[DataTemplateInventory] | None = Field(
default=None, alias="Inventories"
)
BatchData
Bases: BaseTaggedResource
Attributes:
Name | Type | Description |
---|---|---|
name |
str | None
|
|
category |
Literal[BATCH]
|
|
assigned_to |
SerializeAsEntityLink[User] | None
|
|
project |
SerializeAsEntityLink[Project] | None
|
|
location |
SerializeAsEntityLink[Location] | None
|
|
batch_size_unit |
str
|
|
inventories |
list[DataTemplateInventory] | None
|
|
priority |
Priority
|
|
workflow |
list[EntityLink]
|
|
assigned_to
assigned_to: SerializeAsEntityLink[User] | None = Field(
alias="AssignedTo", default=None
)
inventories
inventories: list[DataTemplateInventory] | None = Field(
default=None, alias="Inventories"
)
PropertyData
Bases: BaseTaggedResource
Attributes:
Name | Type | Description |
---|---|---|
category |
Literal[PROPERTY]
|
|
name |
str | None
|
|
blocks |
list[Block]
|
|
priority |
Priority
|
|
location |
SerializeAsEntityLink[Location] | None
|
|
assigned_to |
SerializeAsEntityLink[User] | None
|
|
project |
SerializeAsEntityLink[Project] | None
|
|
inventories |
list[DataTemplateInventory] | None
|
|
due_date |
str | None
|
|
assigned_to
assigned_to: SerializeAsEntityLink[User] | None = Field(
alias="AssignedTo", default=None
)
inventories
inventories: list[DataTemplateInventory] | None = Field(
default=None, alias="Inventories"
)
SheetData
Bases: BaseTaggedResource
Attributes:
Name | Type | Description |
---|---|---|
category |
Literal[SHEET]
|
|
designs |
list[DesignLink]
|
|
formula_info |
list
|
|
task_rows |
list[EntityLink]
|
|
NotebookData
ACLType
TeamACL
Bases: ACL
Show JSON schema:
{
"$defs": {
"AccessControlLevel": {
"description": "The fine grain control",
"enum": [
"ProjectOwner",
"ProjectEditor",
"ProjectViewer",
"ProjectAllTask",
"ProjectPropertyTask",
"InventoryOwner",
"InventoryViewer",
"CustomTemplateOwner",
"CustomTemplateViewer"
],
"title": "AccessControlLevel",
"type": "string"
}
},
"properties": {
"id": {
"description": "The id of the user for which this ACL applies",
"title": "Id",
"type": "string"
},
"fgc": {
"anyOf": [
{
"$ref": "#/$defs/AccessControlLevel"
},
{
"type": "null"
}
],
"default": null,
"description": "The Fine-Grain Control Level"
},
"type": {
"const": "team",
"default": "team",
"title": "Type",
"type": "string"
}
},
"required": [
"id"
],
"title": "TeamACL",
"type": "object"
}
Fields:
OwnerACL
Bases: ACL
Show JSON schema:
{
"$defs": {
"AccessControlLevel": {
"description": "The fine grain control",
"enum": [
"ProjectOwner",
"ProjectEditor",
"ProjectViewer",
"ProjectAllTask",
"ProjectPropertyTask",
"InventoryOwner",
"InventoryViewer",
"CustomTemplateOwner",
"CustomTemplateViewer"
],
"title": "AccessControlLevel",
"type": "string"
}
},
"properties": {
"id": {
"description": "The id of the user for which this ACL applies",
"title": "Id",
"type": "string"
},
"fgc": {
"anyOf": [
{
"$ref": "#/$defs/AccessControlLevel"
},
{
"type": "null"
}
],
"default": null,
"description": "The Fine-Grain Control Level"
},
"type": {
"const": "owner",
"default": "owner",
"title": "Type",
"type": "string"
}
},
"required": [
"id"
],
"title": "OwnerACL",
"type": "object"
}
Fields:
MemberACL
Bases: ACL
Show JSON schema:
{
"$defs": {
"AccessControlLevel": {
"description": "The fine grain control",
"enum": [
"ProjectOwner",
"ProjectEditor",
"ProjectViewer",
"ProjectAllTask",
"ProjectPropertyTask",
"InventoryOwner",
"InventoryViewer",
"CustomTemplateOwner",
"CustomTemplateViewer"
],
"title": "AccessControlLevel",
"type": "string"
}
},
"properties": {
"id": {
"description": "The id of the user for which this ACL applies",
"title": "Id",
"type": "string"
},
"fgc": {
"anyOf": [
{
"$ref": "#/$defs/AccessControlLevel"
},
{
"type": "null"
}
],
"default": null,
"description": "The Fine-Grain Control Level"
},
"type": {
"const": "member",
"default": "member",
"title": "Type",
"type": "string"
}
},
"required": [
"id"
],
"title": "MemberACL",
"type": "object"
}
Fields:
ViewerACL
Bases: ACL
Show JSON schema:
{
"$defs": {
"AccessControlLevel": {
"description": "The fine grain control",
"enum": [
"ProjectOwner",
"ProjectEditor",
"ProjectViewer",
"ProjectAllTask",
"ProjectPropertyTask",
"InventoryOwner",
"InventoryViewer",
"CustomTemplateOwner",
"CustomTemplateViewer"
],
"title": "AccessControlLevel",
"type": "string"
}
},
"properties": {
"id": {
"description": "The id of the user for which this ACL applies",
"title": "Id",
"type": "string"
},
"fgc": {
"anyOf": [
{
"$ref": "#/$defs/AccessControlLevel"
},
{
"type": "null"
}
],
"default": null,
"description": "The Fine-Grain Control Level"
},
"type": {
"const": "viewer",
"default": "viewer",
"title": "Type",
"type": "string"
}
},
"required": [
"id"
],
"title": "ViewerACL",
"type": "object"
}
Fields:
TemplateACL
CustomTemplate
Bases: BaseTaggedResource
A custom template entity.
Attributes:
Name | Type | Description |
---|---|---|
name |
str
|
The name of the template. |
id |
str
|
The Albert ID of the template. Set when the template is retrieved from Albert. |
category |
TemplateCategory
|
The category of the template. Allowed values are |
metadata |
Dict[str, str | List[EntityLink] | EntityLink] | None
|
The metadata of the template. Allowed Metadata fields can be found using Custim Fields. |
data |
CustomTemplateData | None
|
The data of the template. |
team |
List[TeamACL] | None
|
The team of the template. |
acl |
TemplateACL | None
|
|
Methods:
Name | Description |
---|---|
add_missing_category |
Initialize private attributes from the incoming data dictionary before the model is fully constructed. |
add_missing_category
Initialize private attributes from the incoming data dictionary before the model is fully constructed.
Source code in src/albert/resources/custom_templates.py
CustomTemplateSearchItemData
Bases: BaseAlbertModel
Show JSON schema:
{
"$defs": {
"DesignLink": {
"properties": {
"id": {
"title": "Id",
"type": "string"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Name"
},
"type": {
"$ref": "#/$defs/DesignType"
}
},
"required": [
"id",
"type"
],
"title": "DesignLink",
"type": "object"
},
"DesignType": {
"description": "The type of Design",
"enum": [
"apps",
"products",
"results",
"process"
],
"title": "DesignType",
"type": "string"
},
"EntityLink": {
"properties": {
"id": {
"title": "Id",
"type": "string"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Name"
}
},
"required": [
"id"
],
"title": "EntityLink",
"type": "object"
}
},
"properties": {
"Designs": {
"default": null,
"items": {
"$ref": "#/$defs/DesignLink"
},
"title": "Designs",
"type": "array"
},
"FormulaInfo": {
"items": {},
"title": "Formulainfo",
"type": "array"
},
"TaskRows": {
"items": {
"$ref": "#/$defs/EntityLink"
},
"title": "Taskrows",
"type": "array"
}
},
"title": "CustomTemplateSearchItemData",
"type": "object"
}
Fields:
-
designs
(list[DesignLink]
) -
formula_info
(list
) -
task_rows
(list[EntityLink]
)
CustomTemplateSearchItemACL
Bases: ACL
Show JSON schema:
{
"$defs": {
"ACLType": {
"enum": [
"team",
"member",
"owner",
"viewer"
],
"title": "ACLType",
"type": "string"
},
"AccessControlLevel": {
"description": "The fine grain control",
"enum": [
"ProjectOwner",
"ProjectEditor",
"ProjectViewer",
"ProjectAllTask",
"ProjectPropertyTask",
"InventoryOwner",
"InventoryViewer",
"CustomTemplateOwner",
"CustomTemplateViewer"
],
"title": "AccessControlLevel",
"type": "string"
},
"UserClass": {
"description": "The ACL class level of the user",
"enum": [
"guest",
"standard",
"trusted",
"privileged",
"admin"
],
"title": "UserClass",
"type": "string"
}
},
"properties": {
"id": {
"description": "The id of the user for which this ACL applies",
"title": "Id",
"type": "string"
},
"fgc": {
"anyOf": [
{
"$ref": "#/$defs/AccessControlLevel"
},
{
"type": "null"
}
],
"default": null,
"description": "The Fine-Grain Control Level"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Name"
},
"userType": {
"anyOf": [
{
"$ref": "#/$defs/UserClass"
},
{
"type": "null"
}
],
"default": null
},
"type": {
"$ref": "#/$defs/ACLType"
}
},
"required": [
"id",
"type"
],
"title": "CustomTemplateSearchItemACL",
"type": "object"
}
Fields:
CustomTemplateSearchItemTeam
Bases: BaseAlbertModel
Show JSON schema:
{
"$defs": {
"ACLType": {
"enum": [
"team",
"member",
"owner",
"viewer"
],
"title": "ACLType",
"type": "string"
},
"AccessControlLevel": {
"description": "The fine grain control",
"enum": [
"ProjectOwner",
"ProjectEditor",
"ProjectViewer",
"ProjectAllTask",
"ProjectPropertyTask",
"InventoryOwner",
"InventoryViewer",
"CustomTemplateOwner",
"CustomTemplateViewer"
],
"title": "AccessControlLevel",
"type": "string"
}
},
"properties": {
"id": {
"title": "Id",
"type": "string"
},
"name": {
"title": "Name",
"type": "string"
},
"type": {
"anyOf": [
{
"$ref": "#/$defs/ACLType"
},
{
"type": "null"
}
],
"default": null
},
"fgc": {
"anyOf": [
{
"$ref": "#/$defs/AccessControlLevel"
},
{
"type": "null"
}
],
"default": null
}
},
"required": [
"id",
"name"
],
"title": "CustomTemplateSearchItemTeam",
"type": "object"
}
Fields:
CustomTemplateSearchItem
Bases: BaseAlbertModel
, HydrationMixin[CustomTemplate]
Show JSON schema:
{
"$defs": {
"ACLType": {
"enum": [
"team",
"member",
"owner",
"viewer"
],
"title": "ACLType",
"type": "string"
},
"AccessControlLevel": {
"description": "The fine grain control",
"enum": [
"ProjectOwner",
"ProjectEditor",
"ProjectViewer",
"ProjectAllTask",
"ProjectPropertyTask",
"InventoryOwner",
"InventoryViewer",
"CustomTemplateOwner",
"CustomTemplateViewer"
],
"title": "AccessControlLevel",
"type": "string"
},
"CustomTemplateSearchItemACL": {
"properties": {
"id": {
"description": "The id of the user for which this ACL applies",
"title": "Id",
"type": "string"
},
"fgc": {
"anyOf": [
{
"$ref": "#/$defs/AccessControlLevel"
},
{
"type": "null"
}
],
"default": null,
"description": "The Fine-Grain Control Level"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Name"
},
"userType": {
"anyOf": [
{
"$ref": "#/$defs/UserClass"
},
{
"type": "null"
}
],
"default": null
},
"type": {
"$ref": "#/$defs/ACLType"
}
},
"required": [
"id",
"type"
],
"title": "CustomTemplateSearchItemACL",
"type": "object"
},
"CustomTemplateSearchItemData": {
"properties": {
"Designs": {
"default": null,
"items": {
"$ref": "#/$defs/DesignLink"
},
"title": "Designs",
"type": "array"
},
"FormulaInfo": {
"items": {},
"title": "Formulainfo",
"type": "array"
},
"TaskRows": {
"items": {
"$ref": "#/$defs/EntityLink"
},
"title": "Taskrows",
"type": "array"
}
},
"title": "CustomTemplateSearchItemData",
"type": "object"
},
"CustomTemplateSearchItemTeam": {
"properties": {
"id": {
"title": "Id",
"type": "string"
},
"name": {
"title": "Name",
"type": "string"
},
"type": {
"anyOf": [
{
"$ref": "#/$defs/ACLType"
},
{
"type": "null"
}
],
"default": null
},
"fgc": {
"anyOf": [
{
"$ref": "#/$defs/AccessControlLevel"
},
{
"type": "null"
}
],
"default": null
}
},
"required": [
"id",
"name"
],
"title": "CustomTemplateSearchItemTeam",
"type": "object"
},
"DesignLink": {
"properties": {
"id": {
"title": "Id",
"type": "string"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Name"
},
"type": {
"$ref": "#/$defs/DesignType"
}
},
"required": [
"id",
"type"
],
"title": "DesignLink",
"type": "object"
},
"DesignType": {
"description": "The type of Design",
"enum": [
"apps",
"products",
"results",
"process"
],
"title": "DesignType",
"type": "string"
},
"EntityLink": {
"properties": {
"id": {
"title": "Id",
"type": "string"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Name"
}
},
"required": [
"id"
],
"title": "EntityLink",
"type": "object"
},
"SecurityClass": {
"description": "The security class of a resource",
"enum": [
"shared",
"restricted",
"confidential",
"private"
],
"title": "SecurityClass",
"type": "string"
},
"Status": {
"description": "The status of a resource",
"enum": [
"active",
"inactive"
],
"title": "Status",
"type": "string"
},
"UserClass": {
"description": "The ACL class level of the user",
"enum": [
"guest",
"standard",
"trusted",
"privileged",
"admin"
],
"title": "UserClass",
"type": "string"
}
},
"properties": {
"name": {
"title": "Name",
"type": "string"
},
"albertId": {
"title": "Albertid",
"type": "string"
},
"createdByName": {
"title": "Createdbyname",
"type": "string"
},
"createdAt": {
"title": "Createdat",
"type": "string"
},
"category": {
"title": "Category",
"type": "string"
},
"status": {
"anyOf": [
{
"$ref": "#/$defs/Status"
},
{
"type": "null"
}
],
"default": null
},
"resourceClass": {
"anyOf": [
{
"$ref": "#/$defs/SecurityClass"
},
{
"type": "null"
}
],
"default": null
},
"data": {
"anyOf": [
{
"$ref": "#/$defs/CustomTemplateSearchItemData"
},
{
"type": "null"
}
],
"default": null
},
"acl": {
"items": {
"$ref": "#/$defs/CustomTemplateSearchItemACL"
},
"title": "Acl",
"type": "array"
},
"team": {
"items": {
"$ref": "#/$defs/CustomTemplateSearchItemTeam"
},
"title": "Team",
"type": "array"
}
},
"required": [
"name",
"albertId",
"createdByName",
"createdAt",
"category",
"acl",
"team"
],
"title": "CustomTemplateSearchItem",
"type": "object"
}
Fields:
-
_collection
(BaseCollection | None
) -
name
(str
) -
id
(str
) -
created_by_name
(str
) -
created_at
(str
) -
category
(str
) -
status
(Status | None
) -
resource_class
(SecurityClass | None
) -
data
(CustomTemplateSearchItemData | None
) -
acl
(list[CustomTemplateSearchItemACL]
) -
team
(list[CustomTemplateSearchItemTeam]
)