Skip to content

Commit

Permalink
chore: upgrade api reference
Browse files Browse the repository at this point in the history
  • Loading branch information
nichenqin committed Oct 9, 2024
1 parent 147d8a9 commit 1caab42
Show file tree
Hide file tree
Showing 6 changed files with 136 additions and 91,350 deletions.
91,311 changes: 0 additions & 91,311 deletions apps/backend/assets/api-reference.js

This file was deleted.

36 changes: 36 additions & 0 deletions apps/backend/assets/[email protected]

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion apps/backend/src/modules/openapi/openapi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ export class OpenAPI {
JSON.stringify(configuration)
</script>
<script src="/assets/api-reference.js"></script>
<script src="/assets/api-reference@1.25.30.js"></script>
</body>
</html>`
},
Expand Down
26 changes: 13 additions & 13 deletions packages/persistence/src/template/template-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -278,16 +278,16 @@ export const templateData: ITemplateDTO[] = [
},
]

// if (env.NODE_ENV === "development") {
// templateData.unshift({
// id: "test",
// icon: "💼",
// name: "Test",
// categories: ["sales"],
// description: "A template for testing",
// template: {
// type: "base",
// template: templates.test as IBaseTemplateDTO,
// },
// })
// }
if (env.NODE_ENV === "development") {
templateData.unshift({
id: "test",
icon: "💼",
name: "Test",
categories: ["sales"],
description: "A template for testing",
template: {
type: "base",
template: templates.test as IBaseTemplateDTO,
},
})
}
88 changes: 65 additions & 23 deletions packages/template/src/templates/hr.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,22 @@
"fn": "lookup"
}
},
"Manage Department": {
"id": "manage_department",
"type": "reference",
"option": {
"symmetricFieldId": "manager"
}
},
"Manage Department Name": {
"id": "manage_department_name",
"type": "rollup",
"option": {
"referenceFieldId": "manage_department",
"rollupFieldId": "department_name",
"fn": "lookup"
}
},
"Start Date": {
"id": "start_date",
"type": "date",
Expand All @@ -96,6 +112,22 @@
}
}
},
"Subordinates": {
"id": "subordinates",
"type": "reference",
"option": {
"symmetricFieldId": "reports_to"
}
},
"Manager Name": {
"id": "manager_name",
"type": "rollup",
"option": {
"referenceFieldId": "reports_to",
"rollupFieldId": "name",
"fn": "lookup"
}
},
"Email": {
"id": "email",
"type": "email",
Expand Down Expand Up @@ -138,15 +170,6 @@
}
]
}
},
"Manager Name": {
"id": "manager_name",
"type": "rollup",
"option": {
"referenceFieldId": "reports_to",
"rollupFieldId": "name",
"fn": "lookup"
}
}
},
"views": {
Expand Down Expand Up @@ -220,6 +243,15 @@
}
}
},
"Manager Name": {
"id": "manager_name",
"type": "rollup",
"option": {
"referenceFieldId": "manager",
"rollupFieldId": "name",
"fn": "lookup"
}
},
"Budget": {
"id": "budget",
"type": "currency",
Expand All @@ -231,13 +263,20 @@
"id": "location",
"type": "string"
},
"Manager Name": {
"id": "manager_name",
"Employees": {
"id": "employees",
"type": "reference",
"option": {
"symmetricFieldId": "department"
}
},
"Employees Count": {
"id": "employees_count",
"type": "rollup",
"option": {
"referenceFieldId": "manager",
"rollupFieldId": "name",
"fn": "lookup"
"referenceFieldId": "employees",
"rollupFieldId": "id",
"fn": "count"
}
}
},
Expand All @@ -248,18 +287,21 @@
},
"records": [
{
"id": "dept1",
"department_name": "Development",
"manager": ["EMP002"],
"budget": 500000,
"location": "New York"
},
{
"id": "dept2",
"department_name": "Human Resources",
"manager": ["EMP003"],
"budget": 300000,
"location": "Chicago"
},
{
"id": "dept3",
"department_name": "Design",
"manager": null,
"budget": 250000,
Expand All @@ -269,6 +311,15 @@
},
"Payroll": {
"schema": {
"Employee Name": {
"id": "employee_name",
"type": "rollup",
"option": {
"referenceFieldId": "employee",
"rollupFieldId": "name",
"fn": "lookup"
}
},
"Employee": {
"id": "employee",
"type": "reference",
Expand Down Expand Up @@ -316,15 +367,6 @@
"option": {
"symbol": "$"
}
},
"Employee Name": {
"id": "employee_name",
"type": "rollup",
"option": {
"referenceFieldId": "employee",
"rollupFieldId": "name",
"fn": "lookup"
}
}
},
"views": {
Expand Down
23 changes: 21 additions & 2 deletions packages/template/src/templates/test.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,28 @@
"rollupFieldId": "title",
"fn": "lookup"
}
},
"Ref22": {
"id": "ref22",
"type": "reference",
"option": {
"createSymmetricField": true,
"foreignTable": {
"tableName": "Table2"
}
}
}
},
"records": [
{
"Title": "1-1",
"Ref2": ["1", "2"]
"Ref2": ["1", "2"],
"Ref22": ["1", "2"]
},
{
"Title": "1-2",
"Ref2": ["2"]
"Ref2": ["2"],
"Ref22": ["2"]
}
]
},
Expand All @@ -51,6 +63,13 @@
"symmetricFieldId": "ref2"
}
},
"Ref11": {
"id": "ref11",
"type": "reference",
"option": {
"symmetricFieldId": "ref22"
}
},
"T1": {
"id": "t1",
"type": "rollup",
Expand Down

0 comments on commit 1caab42

Please sign in to comment.