@antcde/component-library 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -0
- package/dist/component-library.css +1 -1
- package/dist/index.js +16719 -17759
- package/dist/types/components/BaseAppCard.vue.d.ts +18 -4
- package/dist/types/components/BaseAppCardSkeleton.vue.d.ts +2 -0
- package/dist/types/components/BaseDeleteDialog.vue.d.ts +20 -7
- package/dist/types/components/RBAC/Permissions/PermissionCard.vue.d.ts +1 -1
- package/dist/types/components/TasksFlow/useTaskFlow.d.ts +7 -6
- package/dist/types/index.d.ts +3 -1
- package/lib/DocumentManager/DocumentDrop.vue +2 -6
- package/lib/DocumentManager/DocumentManager.vue +48 -41
- package/lib/DocumentManager/hooks/useDms.ts +1 -3
- package/lib/DocumentManager/index.ts +1 -1
- package/lib/DocumentManager/lang/translations/de.json +36 -0
- package/lib/DocumentManager/lang/translations/en.json +38 -0
- package/lib/DocumentManager/lang/translations/nl.json +36 -0
- package/lib/DocumentManager/utils.ts +1 -1
- package/lib/ForgeViewer/ForgeViewer.vue +6 -5
- package/lib/ForgeViewer/lang/translations/de.json +6 -0
- package/lib/ForgeViewer/lang/translations/en.json +6 -0
- package/lib/ForgeViewer/lang/translations/nl.json +6 -0
- package/lib/ForgeViewer/useForgeViewer.ts +0 -1
- package/lib/GisViewer/GisViewer.vue +14 -8
- package/lib/GisViewer/useGisViewer.ts +3 -3
- package/package.json +4 -3
- package/lib/DocumentManager/hooks/useDarkMode.ts +0 -17
- package/lib/TableViewer/TableView.vue +0 -39
- package/lib/TableViewer/TableViewer.vue +0 -205
- package/lib/TableViewer/composables/records.ts +0 -53
- package/lib/TableViewer/composables/useFile.ts +0 -20
- package/lib/TableViewer/core/Columns/ColumnForm.vue +0 -230
- package/lib/TableViewer/core/Columns/ColumnsConfiguration.vue +0 -99
- package/lib/TableViewer/core/Columns/ColumnsConfigurationTable.vue +0 -186
- package/lib/TableViewer/core/Columns/ColumnsTable.vue +0 -165
- package/lib/TableViewer/core/Permissions/PermissionDialog.vue +0 -149
- package/lib/TableViewer/core/Permissions/PermissionForm.vue +0 -117
- package/lib/TableViewer/core/Permissions/PermissionsConfiguration.vue +0 -55
- package/lib/TableViewer/core/Permissions/PermissionsConfigurationTable.vue +0 -185
- package/lib/TableViewer/core/Permissions/PermissionsTable.vue +0 -207
- package/lib/TableViewer/core/Queries/QueriesMenu.vue +0 -75
- package/lib/TableViewer/core/Queries/QueryItem.vue +0 -112
- package/lib/TableViewer/core/Records/RecordCell.vue +0 -118
- package/lib/TableViewer/core/Records/RecordDialog.vue +0 -128
- package/lib/TableViewer/core/Records/RecordHeader.vue +0 -175
- package/lib/TableViewer/core/Records/RecordInput.vue +0 -183
- package/lib/TableViewer/core/Records/RecordValue.vue +0 -123
- package/lib/TableViewer/core/Records/RecordsTable.vue +0 -233
- package/lib/TableViewer/core/Records/RecordsTableToolbar.vue +0 -310
- package/lib/TableViewer/core/Relations/RelationForm.vue +0 -154
- package/lib/TableViewer/core/Relations/RelationsConfiguration.vue +0 -32
- package/lib/TableViewer/core/Relations/RelationsConfigurationTable.vue +0 -146
- package/lib/TableViewer/core/Relations/RelationsTable.vue +0 -129
- package/lib/TableViewer/core/Revisions/RevisionComparisonCell.vue +0 -50
- package/lib/TableViewer/core/Revisions/RevisionComparisonTable.vue +0 -98
- package/lib/TableViewer/core/Revisions/RevisionHistory.vue +0 -138
- package/lib/TableViewer/core/Revisions/RevisionSelector.vue +0 -140
- package/lib/TableViewer/index.ts +0 -4
- package/lib/TableViewer/services/file-handler.ts +0 -84
- package/lib/TableViewer/stores/client.ts +0 -18
- package/lib/TableViewer/stores/columns.ts +0 -152
- package/lib/TableViewer/stores/conditions.ts +0 -88
- package/lib/TableViewer/stores/permissions.ts +0 -102
- package/lib/TableViewer/stores/queries.ts +0 -80
- package/lib/TableViewer/stores/records.ts +0 -256
- package/lib/TableViewer/stores/relations.ts +0 -89
- package/lib/TableViewer/stores/revisions.ts +0 -194
- package/lib/TableViewer/stores/roles.ts +0 -109
- package/lib/TableViewer/stores/table.ts +0 -134
- package/lib/TableViewer/stores/tables.ts +0 -65
- package/lib/TableViewer/types/app.d.ts +0 -5
- package/lib/TableViewer/types/column.d.ts +0 -28
- package/lib/TableViewer/types/permission.d.ts +0 -12
- package/lib/TableViewer/types/project.d.ts +0 -37
- package/lib/TableViewer/types/tables.d.ts +0 -69
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
import type { PermissionData } from '@antcde/connect-ts/services/RBAC/PermissionService'
|
|
2
|
-
import type { Role, RoleData, RoleUpdate } from '@antcde/connect-ts/services/RBAC/RoleService'
|
|
3
|
-
import { defineStore } from 'pinia'
|
|
4
|
-
import { ref } from 'vue'
|
|
5
|
-
import { useClientStore } from './client'
|
|
6
|
-
|
|
7
|
-
export const useRoleStore = defineStore('ant.apps.table.viewer.rbacRoles', () => {
|
|
8
|
-
const roles = ref<Role[]>([])
|
|
9
|
-
const selectedRole = ref<Role | null>(null)
|
|
10
|
-
const isFetching = ref(false)
|
|
11
|
-
const isCreating = ref(false)
|
|
12
|
-
|
|
13
|
-
const clientStore = useClientStore()
|
|
14
|
-
const { client } = clientStore
|
|
15
|
-
const connect = client?.connect
|
|
16
|
-
|
|
17
|
-
async function fetchRoles(resourceId?: string) {
|
|
18
|
-
if (!resourceId || !connect) {
|
|
19
|
-
return
|
|
20
|
-
}
|
|
21
|
-
try {
|
|
22
|
-
isFetching.value = true
|
|
23
|
-
const rolesResponse = await connect.rbacRoles.fetchRoles('projects', resourceId) // TODO Add licenses if needed
|
|
24
|
-
roles.value = rolesResponse?.data ?? []
|
|
25
|
-
}
|
|
26
|
-
finally {
|
|
27
|
-
isFetching.value = false
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
async function createRole(data: RoleData, resourceId?: string) {
|
|
32
|
-
if (!resourceId || !connect) {
|
|
33
|
-
return
|
|
34
|
-
}
|
|
35
|
-
try {
|
|
36
|
-
isCreating.value = true
|
|
37
|
-
const createdRoleResponse = await connect.rbacRoles.createRole('projects', resourceId, data)
|
|
38
|
-
roles.value.push(createdRoleResponse.data)
|
|
39
|
-
}
|
|
40
|
-
finally {
|
|
41
|
-
isCreating.value = false
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
async function updateRole(roleId: string, data: RoleUpdate) {
|
|
46
|
-
if (!connect) {
|
|
47
|
-
return
|
|
48
|
-
}
|
|
49
|
-
const updatedRoleResponse = await connect.rbacRoles.updateRole(roleId, data)
|
|
50
|
-
const roleIndex = roles.value.findIndex(role => role.id === roleId)
|
|
51
|
-
roles.value.splice(roleIndex, 1, updatedRoleResponse.data)
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
async function syncPermissions(roleId: string, permissions: PermissionData[]) {
|
|
55
|
-
if (!connect) {
|
|
56
|
-
return
|
|
57
|
-
}
|
|
58
|
-
const permissionResponse = await connect.rbacRoles.syncPermissions(roleId, permissions)
|
|
59
|
-
const roleIndex = roles.value.findIndex(role => role.id === roleId)
|
|
60
|
-
roles.value[roleIndex].permissions = permissionResponse.data
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
async function givePermission(roleId: string, permission: PermissionData) {
|
|
64
|
-
if (!connect) {
|
|
65
|
-
return
|
|
66
|
-
}
|
|
67
|
-
const permissionResponse = await connect.rbacRoles.givePermission(roleId, permission)
|
|
68
|
-
const roleIndex = roles.value.findIndex(role => role.id === roleId)
|
|
69
|
-
roles.value[roleIndex].permissions?.push(permissionResponse.data)
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
async function revokePermission(roleId: string, permission: PermissionData) {
|
|
73
|
-
if (!connect) {
|
|
74
|
-
return
|
|
75
|
-
}
|
|
76
|
-
const permissionResponse = await connect.rbacRoles.revokePermission(roleId, permission)
|
|
77
|
-
const roleIndex = roles.value.findIndex(role => role.id === roleId)
|
|
78
|
-
roles.value[roleIndex].permissions = roles.value[roleIndex].permissions?.filter(p => p.id !== permissionResponse.data.id)
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
async function syncUsers(roleId: string, users: string[]) {
|
|
82
|
-
if (!connect) {
|
|
83
|
-
return
|
|
84
|
-
}
|
|
85
|
-
const userResponse = await connect.rbacRoles.syncUsers(roleId, users)
|
|
86
|
-
const roleIndex = roles.value.findIndex(role => role.id === roleId)
|
|
87
|
-
roles.value[roleIndex].users = userResponse.data
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
function reset() {
|
|
91
|
-
roles.value = []
|
|
92
|
-
selectedRole.value = null
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
return {
|
|
96
|
-
roles,
|
|
97
|
-
selectedRole,
|
|
98
|
-
isFetching,
|
|
99
|
-
isCreating,
|
|
100
|
-
reset,
|
|
101
|
-
updateRole,
|
|
102
|
-
createRole,
|
|
103
|
-
fetchRoles,
|
|
104
|
-
givePermission,
|
|
105
|
-
syncPermissions,
|
|
106
|
-
revokePermission,
|
|
107
|
-
syncUsers,
|
|
108
|
-
}
|
|
109
|
-
})
|
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
import type { Table } from '@antcde/connect-ts/services/TableService'
|
|
2
|
-
import type { TableCbAction } from '@lib/TableViewer/types/tables'
|
|
3
|
-
import { defineStore } from 'pinia'
|
|
4
|
-
import { ref } from 'vue'
|
|
5
|
-
import { useClientStore } from './client'
|
|
6
|
-
import { useColumnStore } from './columns'
|
|
7
|
-
import { useConditionStore } from './conditions'
|
|
8
|
-
import { usePermissionStore } from './permissions'
|
|
9
|
-
import { useQueryStore } from './queries'
|
|
10
|
-
import { useRecordStore } from './records'
|
|
11
|
-
import { useRelationStore } from './relations'
|
|
12
|
-
import { useRevisionStore } from './revisions'
|
|
13
|
-
|
|
14
|
-
export const useTableStore = defineStore('ant.apps.table.viewer.table', () => {
|
|
15
|
-
const table = ref<Table | null>(null)
|
|
16
|
-
const isFetching = ref(false)
|
|
17
|
-
const isCreating = ref(false)
|
|
18
|
-
const isUpdating = ref(false)
|
|
19
|
-
const isDeleting = ref(false)
|
|
20
|
-
const tableChangeCb = ref<((action?: TableCbAction) => void) | null>(null)
|
|
21
|
-
|
|
22
|
-
const clientStore = useClientStore()
|
|
23
|
-
const { client } = clientStore
|
|
24
|
-
const connect = client?.connect
|
|
25
|
-
const queryStore = useQueryStore()
|
|
26
|
-
const recordStore = useRecordStore()
|
|
27
|
-
const columnStore = useColumnStore()
|
|
28
|
-
const revisionStore = useRevisionStore()
|
|
29
|
-
const relationStore = useRelationStore()
|
|
30
|
-
const conditionStore = useConditionStore()
|
|
31
|
-
const permissionStore = usePermissionStore()
|
|
32
|
-
|
|
33
|
-
function setTableChangeCb(cb: (action?: TableCbAction) => void) {
|
|
34
|
-
tableChangeCb.value = cb
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
async function fetchTable(tableId: string) {
|
|
38
|
-
if (!tableId || !connect)
|
|
39
|
-
return
|
|
40
|
-
try {
|
|
41
|
-
resetTable()
|
|
42
|
-
isFetching.value = true
|
|
43
|
-
table.value = await connect.tables.getTable(tableId)
|
|
44
|
-
Promise.allSettled([
|
|
45
|
-
columnStore.fetchColumns().then(() => recordStore.fetchRecords()),
|
|
46
|
-
revisionStore.fetchRevisions(),
|
|
47
|
-
queryStore.fetchQueries(),
|
|
48
|
-
permissionStore.fetchPermissions(),
|
|
49
|
-
relationStore.fetchRelations(),
|
|
50
|
-
])
|
|
51
|
-
}
|
|
52
|
-
finally {
|
|
53
|
-
isFetching.value = false
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
async function updateTable(name: string) {
|
|
58
|
-
if (!name || !connect)
|
|
59
|
-
return
|
|
60
|
-
try {
|
|
61
|
-
isUpdating.value = true
|
|
62
|
-
if (table.value) {
|
|
63
|
-
const { id } = table.value
|
|
64
|
-
|
|
65
|
-
const updatedTable = await connect.tables.updateTable(id, { name })
|
|
66
|
-
table.value = { ...table.value, ...updatedTable }
|
|
67
|
-
tableChangeCb.value?.()
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
finally {
|
|
71
|
-
isUpdating.value = false
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
async function deleteTable() {
|
|
76
|
-
if (!connect)
|
|
77
|
-
return
|
|
78
|
-
try {
|
|
79
|
-
isDeleting.value = true
|
|
80
|
-
if (table.value) {
|
|
81
|
-
const tableId = table.value.id
|
|
82
|
-
|
|
83
|
-
await connect.tables.deleteTable(tableId)
|
|
84
|
-
tableChangeCb.value?.('delete')
|
|
85
|
-
resetTable()
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
finally {
|
|
89
|
-
isDeleting.value = false
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
async function createTable(name: string) {
|
|
94
|
-
const context = client?.context
|
|
95
|
-
const projectId = context?.project?.id
|
|
96
|
-
if (!name || !connect || !projectId)
|
|
97
|
-
return
|
|
98
|
-
try {
|
|
99
|
-
isCreating.value = true
|
|
100
|
-
await connect.tables.createTable({ project: projectId, name })
|
|
101
|
-
tableChangeCb.value?.()
|
|
102
|
-
}
|
|
103
|
-
finally {
|
|
104
|
-
isCreating.value = false
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
function resetTable() {
|
|
109
|
-
table.value = null
|
|
110
|
-
isFetching.value = false
|
|
111
|
-
isCreating.value = false
|
|
112
|
-
isUpdating.value = false
|
|
113
|
-
isDeleting.value = false
|
|
114
|
-
columnStore.reset()
|
|
115
|
-
conditionStore.reset()
|
|
116
|
-
recordStore.reset()
|
|
117
|
-
revisionStore.reset()
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
return {
|
|
121
|
-
table,
|
|
122
|
-
isFetching,
|
|
123
|
-
isCreating,
|
|
124
|
-
isDeleting,
|
|
125
|
-
isUpdating,
|
|
126
|
-
|
|
127
|
-
setTableChangeCb,
|
|
128
|
-
fetchTable,
|
|
129
|
-
resetTable,
|
|
130
|
-
createTable,
|
|
131
|
-
updateTable,
|
|
132
|
-
deleteTable,
|
|
133
|
-
}
|
|
134
|
-
})
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import type { TableCbAction, TableList } from '../types/tables'
|
|
2
|
-
import { defineStore } from 'pinia'
|
|
3
|
-
import { computed, ref } from 'vue'
|
|
4
|
-
import { useClientStore } from './client'
|
|
5
|
-
|
|
6
|
-
export const useTablesStore = defineStore('ant.apps.table.viewer.tables', () => {
|
|
7
|
-
const tables = ref<TableList[]>([])
|
|
8
|
-
const selectedTable = ref<TableList | null>(null)
|
|
9
|
-
const tableType = ref<'data' | 'config'>('data')
|
|
10
|
-
const isFetchingTables = ref(false)
|
|
11
|
-
|
|
12
|
-
const clientStore = useClientStore()
|
|
13
|
-
const { client } = clientStore
|
|
14
|
-
const connect = client?.connect
|
|
15
|
-
|
|
16
|
-
async function fetchTables() {
|
|
17
|
-
if (!client || !connect)
|
|
18
|
-
return
|
|
19
|
-
const projectId = client?.context?.project?.id
|
|
20
|
-
if (!projectId)
|
|
21
|
-
return
|
|
22
|
-
try {
|
|
23
|
-
isFetchingTables.value = true
|
|
24
|
-
tables.value = await connect.tables.getTables(projectId)
|
|
25
|
-
}
|
|
26
|
-
finally {
|
|
27
|
-
isFetchingTables.value = false
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
async function tableUpdateCallback(action?: TableCbAction) {
|
|
32
|
-
if (action === 'delete') {
|
|
33
|
-
selectedTable.value = null
|
|
34
|
-
}
|
|
35
|
-
await fetchTables()
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
function toggleTableType() {
|
|
39
|
-
tableType.value = tableType.value === 'data' ? 'config' : 'data'
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
const configTables = computed(() => {
|
|
43
|
-
return tables.value
|
|
44
|
-
.filter(table => table.name.startsWith('CFFA_') || table.name.startsWith('CAG_'))
|
|
45
|
-
.sort((a, b) => a.name.localeCompare(b.name))
|
|
46
|
-
})
|
|
47
|
-
|
|
48
|
-
const dataTables = computed(() => {
|
|
49
|
-
return tables.value
|
|
50
|
-
.filter(table => !table.name.startsWith('CFFA_') && !table.name.startsWith('CAG_'))
|
|
51
|
-
.sort((a, b) => a.name.localeCompare(b.name))
|
|
52
|
-
})
|
|
53
|
-
|
|
54
|
-
return {
|
|
55
|
-
configTables,
|
|
56
|
-
dataTables,
|
|
57
|
-
isFetchingTables,
|
|
58
|
-
selectedTable,
|
|
59
|
-
tables,
|
|
60
|
-
tableType,
|
|
61
|
-
fetchTables,
|
|
62
|
-
toggleTableType,
|
|
63
|
-
tableUpdateCallback,
|
|
64
|
-
}
|
|
65
|
-
})
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import type { TableRelation } from './tables'
|
|
2
|
-
|
|
3
|
-
export interface Column {
|
|
4
|
-
id: string
|
|
5
|
-
name: string
|
|
6
|
-
type: string
|
|
7
|
-
default_value: string | boolean | null
|
|
8
|
-
options_value: string[]
|
|
9
|
-
order: number
|
|
10
|
-
required: boolean
|
|
11
|
-
is_unique: boolean
|
|
12
|
-
table: string
|
|
13
|
-
relation: TableRelation
|
|
14
|
-
has_relation?: boolean
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export type ColumnKey = 'order' | 'name' | 'type' | 'is_unique' | 'has_relation' | 'default_value' | 'options_value' | 'required'
|
|
18
|
-
|
|
19
|
-
export interface ColumnRequestBody {
|
|
20
|
-
table?: string
|
|
21
|
-
name: string
|
|
22
|
-
type?: string
|
|
23
|
-
default_value: string
|
|
24
|
-
options_value?: string
|
|
25
|
-
order: number
|
|
26
|
-
required: boolean
|
|
27
|
-
is_unique?: boolean
|
|
28
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import type { UserShort } from '@antcde/connect-ts/src'
|
|
2
|
-
import type { Permission } from './permission'
|
|
3
|
-
|
|
4
|
-
export interface ProjectRole {
|
|
5
|
-
id: string
|
|
6
|
-
name: string
|
|
7
|
-
is_admin: boolean
|
|
8
|
-
members?: UserShort[]
|
|
9
|
-
permissions?: {
|
|
10
|
-
tables: Permission[]
|
|
11
|
-
general: RoleGeneralPermission
|
|
12
|
-
workflows: RoleWorkflowPermission
|
|
13
|
-
sbs: RoleSbsPermission
|
|
14
|
-
}
|
|
15
|
-
project?: string
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export interface RoleGeneralPermission {
|
|
19
|
-
workflows: boolean
|
|
20
|
-
tables: boolean
|
|
21
|
-
sbs: boolean
|
|
22
|
-
tasks: boolean
|
|
23
|
-
labels: boolean
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export interface RoleSbsPermission {
|
|
27
|
-
create: boolean
|
|
28
|
-
delete: boolean
|
|
29
|
-
update: boolean
|
|
30
|
-
import: boolean
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export interface RoleWorkflowPermission {
|
|
34
|
-
'import': boolean
|
|
35
|
-
'configure': boolean
|
|
36
|
-
'start-session': boolean
|
|
37
|
-
}
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
export type TableCbAction = 'update' | 'delete'
|
|
2
|
-
|
|
3
|
-
export interface Table {
|
|
4
|
-
id: string
|
|
5
|
-
name: string
|
|
6
|
-
permissions: {
|
|
7
|
-
create: boolean
|
|
8
|
-
read: boolean
|
|
9
|
-
update: boolean
|
|
10
|
-
delete: boolean
|
|
11
|
-
configure: boolean
|
|
12
|
-
}
|
|
13
|
-
project: string
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export interface TableRevision {
|
|
17
|
-
id: string
|
|
18
|
-
reason: string
|
|
19
|
-
version: number
|
|
20
|
-
project: string
|
|
21
|
-
table: string
|
|
22
|
-
timestamp: string
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export interface TableList {
|
|
26
|
-
id: string
|
|
27
|
-
name: string
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export interface TableRelation {
|
|
31
|
-
id: string
|
|
32
|
-
project: string
|
|
33
|
-
table: string
|
|
34
|
-
column: Column | null
|
|
35
|
-
related_project: string
|
|
36
|
-
related_table: Table | null
|
|
37
|
-
related_column: Column | null
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
export interface Stats {
|
|
41
|
-
count: number
|
|
42
|
-
limit: number
|
|
43
|
-
offset: number
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
export interface TableRecord {
|
|
47
|
-
id: string
|
|
48
|
-
[key: string]: any
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
export interface RecordsTable<T extends object = any> {
|
|
52
|
-
id: string
|
|
53
|
-
stats: Stats
|
|
54
|
-
metadata: {
|
|
55
|
-
count: number
|
|
56
|
-
limit: number
|
|
57
|
-
offset: number
|
|
58
|
-
}
|
|
59
|
-
records: Array<T & TableRecord>
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
export interface TableRecords<T extends object = any> {
|
|
63
|
-
[key: string]: RecordsTable<T>
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
export interface RevisionResponse {
|
|
67
|
-
message: string
|
|
68
|
-
revision: TableRevision
|
|
69
|
-
}
|