Skip to content

Commit

Permalink
feat: collections
Browse files Browse the repository at this point in the history
  • Loading branch information
bineenasc committed Dec 19, 2024
1 parent 0a1cd9a commit 5e7f670
Show file tree
Hide file tree
Showing 3 changed files with 802 additions and 9 deletions.
355 changes: 352 additions & 3 deletions api/.aeria/aeria-sdk.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,170 @@ import type {
} from '@aeriajs/types'

declare type MirrorDescriptions = {
"employee": {
"$id": "employee",
"properties": {
"name": {
"type": "string"
},
"corporate_email": {
"type": "string"
},
"contact": {
"type": "string"
},
"employee_status": {
"type": "boolean"
},
"arrive_date": {
"type": "string",
"format": "date"
},
"exit_date": {
"type": "string",
"format": "date"
},
"created_at": {
"type": "string",
"format": "date-time",
"noForm": true,
"readOnly": true,
"isTimestamp": true
},
"updated_at": {
"type": "string",
"format": "date-time",
"noForm": true,
"readOnly": true,
"isTimestamp": true
}
},
"icon": "folder-user",
"presets": [
"crud"
],
"actions": {
"spawnAdd": {
"label": "action.add",
"event": "spawnAdd",
"icon": "plus",
"button": true,
"translate": true
}
},
"individualActions": {
"spawnEdit": {
"label": "action.edit",
"event": "spawnEdit",
"icon": "pencil-simple",
"translate": true
},
"viewItem": {
"label": "action.view",
"icon": "eye",
"translate": true,
"route": {
"name": "/dashboard/:collection/:id",
"setItem": true
}
},
"remove": {
"label": "action.remove",
"icon": "trash",
"ask": true,
"translate": true
}
}
},
"equipment": {
"$id": "equipment",
"properties": {
"resource_assigned": {
"$ref": "info",
"indexes": [
"name_resource"
]
},
"asset": {
"type": "string"
},
"allocation_date": {
"type": "string",
"format": "date-time"
},
"collection_date": {
"type": "string",
"format": "date-time"
},
"created_at": {
"type": "string",
"format": "date-time",
"noForm": true,
"readOnly": true,
"isTimestamp": true
},
"updated_at": {
"type": "string",
"format": "date-time",
"noForm": true,
"readOnly": true,
"isTimestamp": true
}
},
"icon": "desktop-tower",
"table": [
"resource_assigned",
"asset",
"allocation_date",
"collection_date"
],
"required": [
"resource_assigned",
"asset",
"allocation_date"
],
"filters": [
"resource_assigned",
"asset",
"allocation_date",
"collection_date"
],
"presets": [
"crud"
],
"actions": {
"spawnAdd": {
"label": "action.add",
"event": "spawnAdd",
"icon": "plus",
"button": true,
"translate": true
}
},
"individualActions": {
"spawnEdit": {
"label": "action.edit",
"event": "spawnEdit",
"icon": "pencil-simple",
"translate": true
},
"viewItem": {
"label": "action.view",
"icon": "eye",
"translate": true,
"route": {
"name": "/dashboard/:collection/:id",
"setItem": true
}
},
"remove": {
"label": "action.remove",
"icon": "trash",
"ask": true,
"translate": true
}
}
},
"file": {
"$id": "file",
"icon": "paperclip",
Expand Down Expand Up @@ -88,6 +252,97 @@ declare type MirrorDescriptions = {
}
}
},
"info": {
"$id": "info",
"properties": {
"name_resource": {
"type": "string"
},
"serial_number": {
"type": "string"
},
"cape": {
"type": "boolean"
},
"deliver_by": {
"$ref": "user",
"indexes": [
"name"
]
},
"observation": {
"type": "string"
},
"created_at": {
"type": "string",
"format": "date-time",
"noForm": true,
"readOnly": true,
"isTimestamp": true
},
"updated_at": {
"type": "string",
"format": "date-time",
"noForm": true,
"readOnly": true,
"isTimestamp": true
}
},
"icon": "info",
"table": [
"name_resource",
"serial_number",
"deliver_by",
"observation"
],
"required": [
"name_resource",
"serial_number",
"cape",
"deliver_by"
],
"filters": [
"name_resource",
"serial_number",
"cape",
"deliver_by"
],
"presets": [
"crud"
],
"actions": {
"spawnAdd": {
"label": "action.add",
"event": "spawnAdd",
"icon": "plus",
"button": true,
"translate": true
}
},
"individualActions": {
"spawnEdit": {
"label": "action.edit",
"event": "spawnEdit",
"icon": "pencil-simple",
"translate": true
},
"viewItem": {
"label": "action.view",
"icon": "eye",
"translate": true,
"route": {
"name": "/dashboard/:collection/:id",
"setItem": true
}
},
"remove": {
"label": "action.remove",
"icon": "trash",
"ask": true,
"translate": true
}
}
},
"tempFile": {
"$id": "tempFile",
"icon": "file",
Expand Down Expand Up @@ -165,9 +420,7 @@ declare type MirrorDescriptions = {
"items": {
"type": "string",
"enum": [
"root",
"supervisor",
"customer"
"RH"
]
},
"uniqueItems": true,
Expand Down Expand Up @@ -321,6 +574,70 @@ declare type MirrorDescriptions = {


declare type MirrorRouter = {
"/employee/get": {
"POST": {
"roles": [
"root"
],
"builtin": true
}
},
"/employee/getAll": {
"POST": {
"roles": [
"root"
],
"builtin": true
}
},
"/employee/insert": {
"POST": {
"roles": [
"root"
],
"builtin": true
}
},
"/employee/remove": {
"POST": {
"roles": [
"root"
],
"builtin": true
}
},
"/equipment/get": {
"POST": {
"roles": [
"root"
],
"builtin": true
}
},
"/equipment/getAll": {
"POST": {
"roles": [
"root"
],
"builtin": true
}
},
"/equipment/insert": {
"POST": {
"roles": [
"root"
],
"builtin": true
}
},
"/equipment/remove": {
"POST": {
"roles": [
"root"
],
"builtin": true
}
},
"/file/get": {
"POST": {
"roles": [
Expand Down Expand Up @@ -360,6 +677,38 @@ declare type MirrorRouter = {
"builtin": true
}
},
"/info/get": {
"POST": {
"roles": [
"root"
],
"builtin": true
}
},
"/info/getAll": {
"POST": {
"roles": [
"root"
],
"builtin": true
}
},
"/info/insert": {
"POST": {
"roles": [
"root"
],
"builtin": true
}
},
"/info/remove": {
"POST": {
"roles": [
"root"
],
"builtin": true
}
},
"/user/get": {
"POST": {
"roles": [
Expand Down
Loading

0 comments on commit 5e7f670

Please sign in to comment.