diff --git a/package.json b/package.json
index f41ea95569..01f7d58731 100644
--- a/package.json
+++ b/package.json
@@ -22,11 +22,11 @@
},
"dependencies": {
"@ai-sdk/svelte": "^1.1.24",
- "@appwrite.io/console": "https://pkg.pr.new/appwrite-labs/cloud/@appwrite.io/console@2289",
+ "@appwrite.io/console": "https://pkg.pr.new/appwrite-labs/cloud/@appwrite.io/console@7813f3d",
"@appwrite.io/pink-icons": "0.25.0",
"@appwrite.io/pink-icons-svelte": "^2.0.0-RC.1",
"@appwrite.io/pink-legacy": "^1.0.3",
- "@appwrite.io/pink-svelte": "https://pkg.vc/-/@appwrite/@appwrite.io/pink-svelte@95bdb79",
+ "@appwrite.io/pink-svelte": "https://pkg.pr.new/appwrite/pink/@appwrite.io/pink-svelte@fee5c53",
"@popperjs/core": "^2.11.8",
"@sentry/sveltekit": "^8.38.0",
"@stripe/stripe-js": "^3.5.0",
@@ -47,8 +47,8 @@
"tippy.js": "^6.3.7"
},
"devDependencies": {
- "@eslint/compat": "^1.3.1",
- "@eslint/js": "^9.31.0",
+ "@eslint/compat": "^1.2.7",
+ "@eslint/js": "^9.24.0",
"@melt-ui/pp": "^0.3.2",
"@melt-ui/svelte": "^0.86.5",
"@playwright/test": "^1.51.1",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 3c18de4825..50e62a6e95 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -12,8 +12,8 @@ importers:
specifier: ^1.1.24
version: 1.1.24(svelte@5.25.3)(zod@3.24.3)
'@appwrite.io/console':
- specifier: https://pkg.pr.new/appwrite-labs/cloud/@appwrite.io/console@2289
- version: https://pkg.pr.new/appwrite-labs/cloud/@appwrite.io/console@2289
+ specifier: https://pkg.pr.new/appwrite-labs/cloud/@appwrite.io/console@7813f3d
+ version: https://pkg.pr.new/appwrite-labs/cloud/@appwrite.io/console@7813f3d
'@appwrite.io/pink-icons':
specifier: 0.25.0
version: 0.25.0
@@ -24,8 +24,8 @@ importers:
specifier: ^1.0.3
version: 1.0.3
'@appwrite.io/pink-svelte':
- specifier: https://pkg.vc/-/@appwrite/@appwrite.io/pink-svelte@95bdb79
- version: https://pkg.vc/-/@appwrite/%40appwrite.io%2Fpink-svelte@95bdb79(svelte@5.25.3)
+ specifier: https://pkg.pr.new/appwrite/pink/@appwrite.io/pink-svelte@fee5c53
+ version: https://pkg.pr.new/appwrite/pink/@appwrite.io/pink-svelte@fee5c53(svelte@5.25.3)
'@popperjs/core':
specifier: ^2.11.8
version: 2.11.8
@@ -82,11 +82,11 @@ importers:
version: 6.3.7
devDependencies:
'@eslint/compat':
- specifier: ^1.3.1
- version: 1.3.1(eslint@9.31.0)
+ specifier: ^1.2.7
+ version: 1.2.7(eslint@9.31.0)
'@eslint/js':
- specifier: ^9.31.0
- version: 9.31.0
+ specifier: ^9.24.0
+ version: 9.24.0
'@melt-ui/pp':
specifier: ^0.3.2
version: 0.3.2(@melt-ui/svelte@0.86.5(svelte@5.25.3))(svelte@5.25.3)
@@ -257,12 +257,13 @@ packages:
'@analytics/type-utils@0.6.2':
resolution: {integrity: sha512-TD+xbmsBLyYy/IxFimW/YL/9L2IEnM7/EoV9Aeh56U64Ify8o27HJcKjo38XY9Tcn0uOq1AX3thkKgvtWvwFQg==}
- '@appwrite.io/console@https://pkg.pr.new/appwrite-labs/cloud/@appwrite.io/console@2289':
- resolution: {tarball: https://pkg.pr.new/appwrite-labs/cloud/@appwrite.io/console@2289}
+ '@appwrite.io/console@https://pkg.pr.new/appwrite-labs/cloud/@appwrite.io/console@7813f3d':
+ resolution: {tarball: https://pkg.pr.new/appwrite-labs/cloud/@appwrite.io/console@7813f3d}
version: 1.9.0
- '@appwrite.io/pink-icons-svelte@2.0.0-RC.1':
- resolution: {integrity: sha512-iLFlV55hj8mGuAbmxJGenxN5RaZMmVT4GJb9dv/MP1xBAtYibFq7JvBcxm18qV2KU8c31Rntf+Ub4GL7HwqTYg==}
+ '@appwrite.io/pink-icons-svelte@https://pkg.pr.new/appwrite/pink/@appwrite.io/pink-icons-svelte@fee5c539136e15c93cd3f2398d25cb217caa8dc8':
+ resolution: {tarball: https://pkg.pr.new/appwrite/pink/@appwrite.io/pink-icons-svelte@fee5c539136e15c93cd3f2398d25cb217caa8dc8}
+ version: 2.0.0-RC.1
peerDependencies:
svelte: ^4.0.0
@@ -281,8 +282,8 @@ packages:
'@appwrite.io/pink-legacy@1.0.3':
resolution: {integrity: sha512-GGde5fmPhs+s6/3aFeMPc/kKADG/gTFkYQSy6oBN8pK0y0XNCLrZZgBv+EBbdhwdtqVEWXa0X85Mv9w7jcIlwQ==}
- '@appwrite.io/pink-svelte@https://pkg.vc/-/@appwrite/%40appwrite.io%2Fpink-svelte@95bdb79':
- resolution: {tarball: https://pkg.vc/-/@appwrite/%40appwrite.io%2Fpink-svelte@95bdb79}
+ '@appwrite.io/pink-svelte@https://pkg.pr.new/appwrite/pink/@appwrite.io/pink-svelte@fee5c53':
+ resolution: {tarball: https://pkg.pr.new/appwrite/pink/@appwrite.io/pink-svelte@fee5c53}
version: 2.0.0-RC.2
peerDependencies:
svelte: ^4.0.0
@@ -545,11 +546,11 @@ packages:
resolution: {integrity: sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==}
engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0}
- '@eslint/compat@1.3.1':
- resolution: {integrity: sha512-k8MHony59I5EPic6EQTCNOuPoVBnoYXkP+20xvwFjN7t0qI3ImyvyBgg+hIVPwC8JaxVjjUZld+cLfBLFDLucg==}
+ '@eslint/compat@1.2.7':
+ resolution: {integrity: sha512-xvv7hJE32yhegJ8xNAnb62ggiAwTYHBpUCWhRxEj/ksvgDJuSXfoDkBcRYaYNFiJ+jH0IE3K16hd+xXzhBgNbg==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
peerDependencies:
- eslint: ^8.40 || 9
+ eslint: ^9.10.0
peerDependenciesMeta:
eslint:
optional: true
@@ -570,6 +571,10 @@ packages:
resolution: {integrity: sha512-gtF186CXhIl1p4pJNGZw8Yc6RlshoePRvE0X91oPGb3vZ8pM3qOS9W9NGPat9LziaBV7XrJWGylNQXkGcnM3IQ==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
+ '@eslint/js@9.24.0':
+ resolution: {integrity: sha512-uIY/y3z0uvOGX8cp1C2fiC4+ZmBhp6yZWkojtHL1YEMnRt1Y63HB9TM17proGEmeG7HeUY+UP36F0aknKYTpYA==}
+ engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
+
'@eslint/js@9.31.0':
resolution: {integrity: sha512-LOm5OVt7D4qiKCqoiPbA7LWmI+tbw1VbTUowBcUMgQSuM6poJufkFkYDcQpo5KfgD39TnNySV26QjOh7VFpSyw==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
@@ -2544,8 +2549,8 @@ packages:
loupe@3.1.3:
resolution: {integrity: sha512-kkIp7XSkP78ZxJEsSxW3712C6teJVoeHHwgo9zJ380de7IYyJ2ISlxojcH2pC5OFLewESmnRi/+XCDIEEVyoug==}
- loupe@3.2.0:
- resolution: {integrity: sha512-2NCfZcT5VGVNX9mSZIxLRkEAegDGBpuQZBy13desuHeVORmBDyAET4TkJr4SjqQy3A8JDofMN6LpkK8Xcm/dlw==}
+ loupe@3.1.4:
+ resolution: {integrity: sha512-wJzkKwJrheKtknCOKNEtDK4iqg/MxmZheEMtSTYvnzRdEYaZzmgH976nenp8WdJRdx5Vc1X/9MO0Oszl6ezeXg==}
lru-cache@10.4.3:
resolution: {integrity: sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==}
@@ -3646,9 +3651,9 @@ snapshots:
'@analytics/type-utils@0.6.2': {}
- '@appwrite.io/console@https://pkg.pr.new/appwrite-labs/cloud/@appwrite.io/console@2289': {}
+ '@appwrite.io/console@https://pkg.pr.new/appwrite-labs/cloud/@appwrite.io/console@7813f3d': {}
- '@appwrite.io/pink-icons-svelte@2.0.0-RC.1(svelte@5.25.3)':
+ '@appwrite.io/pink-icons-svelte@https://pkg.pr.new/appwrite/pink/@appwrite.io/pink-icons-svelte@fee5c539136e15c93cd3f2398d25cb217caa8dc8(svelte@5.25.3)':
dependencies:
svelte: 5.25.3
@@ -3665,9 +3670,9 @@ snapshots:
'@appwrite.io/pink-icons': 1.0.0
the-new-css-reset: 1.11.3
- '@appwrite.io/pink-svelte@https://pkg.vc/-/@appwrite/%40appwrite.io%2Fpink-svelte@95bdb79(svelte@5.25.3)':
+ '@appwrite.io/pink-svelte@https://pkg.pr.new/appwrite/pink/@appwrite.io/pink-svelte@fee5c53(svelte@5.25.3)':
dependencies:
- '@appwrite.io/pink-icons-svelte': 2.0.0-RC.1(svelte@5.25.3)
+ '@appwrite.io/pink-icons-svelte': https://pkg.pr.new/appwrite/pink/@appwrite.io/pink-icons-svelte@fee5c539136e15c93cd3f2398d25cb217caa8dc8(svelte@5.25.3)
'@floating-ui/dom': 1.6.13
'@melt-ui/pp': 0.3.2(@melt-ui/svelte@0.86.6(svelte@5.25.3))(svelte@5.25.3)
'@melt-ui/svelte': 0.86.6(svelte@5.25.3)
@@ -3893,7 +3898,7 @@ snapshots:
'@eslint-community/regexpp@4.12.1': {}
- '@eslint/compat@1.3.1(eslint@9.31.0)':
+ '@eslint/compat@1.2.7(eslint@9.31.0)':
optionalDependencies:
eslint: 9.31.0
@@ -3925,6 +3930,8 @@ snapshots:
transitivePeerDependencies:
- supports-color
+ '@eslint/js@9.24.0': {}
+
'@eslint/js@9.31.0': {}
'@eslint/object-schema@2.1.6': {}
@@ -5037,7 +5044,7 @@ snapshots:
'@vitest/utils@3.2.4':
dependencies:
'@vitest/pretty-format': 3.2.4
- loupe: 3.2.0
+ loupe: 3.1.4
tinyrainbow: 2.0.0
'@vue/compiler-core@3.5.13':
@@ -6177,7 +6184,7 @@ snapshots:
loupe@3.1.3: {}
- loupe@3.2.0: {}
+ loupe@3.1.4: {}
lru-cache@10.4.3: {}
diff --git a/src/lib/actions/analytics.ts b/src/lib/actions/analytics.ts
index d9c86e0d95..e3ac82596d 100644
--- a/src/lib/actions/analytics.ts
+++ b/src/lib/actions/analytics.ts
@@ -148,9 +148,9 @@ export enum Click {
ConnectRepositoryClick = 'click_connect_repository',
CreditsRedeemClick = 'click_credits_redeem',
CloudSignupClick = 'click_cloud_signup',
- DatabaseAttributeDelete = 'click_attribute_delete',
+ DatabaseColumnDelete = 'click_column_delete',
DatabaseIndexDelete = 'click_index_delete',
- DatabaseCollectionDelete = 'click_collection_delete',
+ DatabaseTableDelete = 'click_table_delete',
DatabaseDatabaseDelete = 'click_database_delete',
DatabaseImportCsv = 'click_database_import_csv',
DomainCreateClick = 'click_domain_create',
@@ -273,22 +273,22 @@ export enum Submit {
DatabaseDelete = 'submit_database_delete',
DatabaseUpdateName = 'submit_database_update_name',
DatabaseImportCsv = 'submit_database_import_csv',
- AttributeCreate = 'submit_attribute_create',
- AttributeUpdate = 'submit_attribute_update',
- AttributeDelete = 'submit_attribute_delete',
- DocumentCreate = 'submit_document_create',
- DocumentDelete = 'submit_document_delete',
- DocumentUpdate = 'submit_document_update',
- DocumentUpdatePermissions = 'submit_document_update_permissions',
+ ColumnCreate = 'submit_column_create',
+ ColumnUpdate = 'submit_column_update',
+ ColumnDelete = 'submit_column_delete',
+ RowCreate = 'submit_row_create',
+ RowDelete = 'submit_row_delete',
+ RowUpdate = 'submit_row_update',
+ RowUpdatePermissions = 'submit_row_update_permissions',
IndexCreate = 'submit_index_create',
IndexDelete = 'submit_index_delete',
- CollectionCreate = 'submit_collection_create',
- CollectionDelete = 'submit_collection_delete',
- CollectionUpdateName = 'submit_collection_update_name',
- CollectionUpdatePermissions = 'submit_collection_update_permissions',
- CollectionUpdateSecurity = 'submit_collection_update_security',
- CollectionUpdateEnabled = 'submit_collection_update_enabled',
- CollectionUpdateDisplayNames = 'submit_collection_update_display_names',
+ TableCreate = 'submit_row_create',
+ TableDelete = 'submit_row_delete',
+ TableUpdateName = 'submit_row_update_name',
+ TableUpdatePermissions = 'submit_row_update_permissions',
+ TableUpdateSecurity = 'submit_row_update_security',
+ TableUpdateEnabled = 'submit_row_update_enabled',
+ TableUpdateDisplayNames = 'submit_row_update_display_names',
FunctionCreate = 'submit_function_create',
FunctionDelete = 'submit_function_delete',
FunctionUpdateName = 'submit_function_update_name',
diff --git a/src/lib/commandCenter/commands.ts b/src/lib/commandCenter/commands.ts
index b191b892f8..fa8427d30b 100644
--- a/src/lib/commandCenter/commands.ts
+++ b/src/lib/commandCenter/commands.ts
@@ -28,10 +28,10 @@ const groups = [
'integrations',
'migrations',
'users',
- 'collections',
- 'attributes',
+ 'tables',
+ 'columns',
'indexes',
- 'documents',
+ 'rows',
'teams',
'security',
'buckets',
diff --git a/src/lib/commandCenter/panels/ai.svelte b/src/lib/commandCenter/panels/ai.svelte
index 58407c6781..5181a99a27 100644
--- a/src/lib/commandCenter/panels/ai.svelte
+++ b/src/lib/commandCenter/panels/ai.svelte
@@ -27,7 +27,7 @@
const examples = [
'How to add platform in the console?',
'How can I manage users, permissions, and access control in Appwrite?',
- 'How can I set up database collections and documents in Appwrite?',
+ 'How can I set up database tables and rows in Appwrite?',
'How do I configure and manage server-side functions in Appwrite?',
'How to add custom domain in the console?'
];
diff --git a/src/lib/commandCenter/panels/createAttribute.svelte b/src/lib/commandCenter/panels/createColumn.svelte
similarity index 58%
rename from src/lib/commandCenter/panels/createAttribute.svelte
rename to src/lib/commandCenter/panels/createColumn.svelte
index 98d312698e..3a3cea77f9 100644
--- a/src/lib/commandCenter/panels/createAttribute.svelte
+++ b/src/lib/commandCenter/panels/createColumn.svelte
@@ -1,16 +1,16 @@
diff --git a/src/lib/commandCenter/searchers/collections.ts b/src/lib/commandCenter/searchers/collections.ts
deleted file mode 100644
index c3ffaebe9e..0000000000
--- a/src/lib/commandCenter/searchers/collections.ts
+++ /dev/null
@@ -1,29 +0,0 @@
-import { goto } from '$app/navigation';
-import { database } from '$routes/(console)/project-[region]-[project]/databases/database-[database]/store';
-import { get } from 'svelte/store';
-import type { Searcher } from '../commands';
-import { sdk } from '$lib/stores/sdk';
-import { base } from '$app/paths';
-import { page } from '$app/state';
-
-export const collectionsSearcher = (async (query: string) => {
- const databaseId = get(database).$id;
- const { collections } = await sdk
- .forProject(page.params.region, page.params.project)
- .databases.listCollections(databaseId);
-
- return collections
- .filter((col) => col.name.toLowerCase().includes(query.toLowerCase()))
- .map(
- (col) =>
- ({
- group: 'collections',
- label: col.name,
- callback: () => {
- goto(
- `${base}/project-${page.params.region}-${page.params.project}/databases/database-${databaseId}/collection-${col.$id}`
- );
- }
- }) as const
- );
-}) satisfies Searcher;
diff --git a/src/lib/commandCenter/searchers/databases.ts b/src/lib/commandCenter/searchers/databases.ts
index f50a1474d6..6775bfd4a0 100644
--- a/src/lib/commandCenter/searchers/databases.ts
+++ b/src/lib/commandCenter/searchers/databases.ts
@@ -8,7 +8,7 @@ import { page } from '$app/state';
export const dbSearcher = (async (query: string) => {
const { databases } = await sdk
.forProject(page.params.region, page.params.project)
- .databases.list();
+ .grids.listDatabases();
return databases
.filter((db) => db.name.toLowerCase().includes(query.toLowerCase()))
diff --git a/src/lib/commandCenter/searchers/index.ts b/src/lib/commandCenter/searchers/index.ts
index 0f78e8c90b..d4461c2a1f 100644
--- a/src/lib/commandCenter/searchers/index.ts
+++ b/src/lib/commandCenter/searchers/index.ts
@@ -1,7 +1,7 @@
export * from './databases';
export * from './users';
export * from './organizations';
-export * from './collections';
+export * from './tables';
export * from './projects';
export * from './teams';
export * from './functions';
diff --git a/src/lib/commandCenter/searchers/tables.ts b/src/lib/commandCenter/searchers/tables.ts
new file mode 100644
index 0000000000..8beff8e058
--- /dev/null
+++ b/src/lib/commandCenter/searchers/tables.ts
@@ -0,0 +1,27 @@
+import { goto } from '$app/navigation';
+import type { Searcher } from '../commands';
+import { sdk } from '$lib/stores/sdk';
+import { base } from '$app/paths';
+import { page } from '$app/state';
+
+export const tablesSearcher = (async (query: string) => {
+ const databaseId = page.params.database;
+ const { tables } = await sdk
+ .forProject(page.params.region, page.params.project)
+ .grids.listTables(databaseId);
+
+ return tables
+ .filter((table) => table.name.toLowerCase().includes(query.toLowerCase()))
+ .map(
+ (table) =>
+ ({
+ group: 'tables',
+ label: table.name,
+ callback: () => {
+ goto(
+ `${base}/project-${page.params.region}-${page.params.project}/databases/database-${databaseId}/table-${table.$id}`
+ );
+ }
+ }) as const
+ );
+}) satisfies Searcher;
diff --git a/src/lib/components/backupRestoreBox.svelte b/src/lib/components/backupRestoreBox.svelte
index 1598341f79..2f660985e0 100644
--- a/src/lib/components/backupRestoreBox.svelte
+++ b/src/lib/components/backupRestoreBox.svelte
@@ -57,6 +57,7 @@
}
function updateOrAddItem(payload: Payload) {
+ // todo: @itznotabug - might need a change to $table?
const { $id, status, $collection, policyId } = payload;
if ($collection === 'archives' && policyId !== null) {
return;
@@ -117,9 +118,9 @@
}
function backupName(item: BackupArchive | BackupRestoration, key: string) {
- const attribute = key === 'archives' ? '$createdAt' : 'startedAt';
+ const column = key === 'archives' ? '$createdAt' : 'startedAt';
- return toLocaleDate(item[attribute]);
+ return toLocaleDate(item[column]);
}
onMount(() => {
diff --git a/src/lib/components/columnSelector.svelte b/src/lib/components/columnSelector.svelte
index a899fe9e41..54d8ace9e3 100644
--- a/src/lib/components/columnSelector.svelte
+++ b/src/lib/components/columnSelector.svelte
@@ -8,19 +8,18 @@
let {
columns,
- isCustomCollection = false,
+ isCustomTable = false,
allowNoColumns = false,
children
}: {
columns: Writable;
- isCustomCollection?: boolean;
+ isCustomTable?: boolean;
allowNoColumns?: boolean;
children: Snippet<[toggle: () => void, selectedColumnsNumber: number]>;
} = $props();
let maxHeight = $state('none');
let containerRef = $state(null);
- const collectionId = $derived(page.params.collection);
const calcMaxHeight = () => {
if (containerRef) {
@@ -35,16 +34,16 @@
const saveColumnPreferences = () => {
const shownColumns = $columns.filter((n) => n.hide === true).map((n) => n.id);
- if (isCustomCollection) {
- preferences.setCustomCollectionColumns(collectionId, shownColumns);
+ if (isCustomTable) {
+ preferences.setCustomTableColumns(page.params.table, shownColumns);
} else {
preferences.setColumns(shownColumns);
}
};
onMount(() => {
- if (isCustomCollection) {
- const shownColumns = preferences.getCustomCollectionColumns(collectionId);
+ if (isCustomTable) {
+ const shownColumns = preferences.getCustomTableColumns(page.params.table);
columns.update((n) =>
n.map((column) => {
diff --git a/src/lib/components/csvImportBox.svelte b/src/lib/components/csvImportBox.svelte
index 60f93abf6d..48bef97ac5 100644
--- a/src/lib/components/csvImportBox.svelte
+++ b/src/lib/components/csvImportBox.svelte
@@ -13,7 +13,7 @@
type ImportItem = {
status: string;
- collection?: string;
+ table?: string;
};
type ImportItemsMap = Map;
@@ -22,15 +22,11 @@
* Keeps a track of the active and ongoing csv migrations.
*
* The structure is as follows -
- * `{ migrationId: { status: status, collection: collection } }`
+ * `{ migrationId: { status: status, table: table } }`
*/
const importItems: Writable = writable(new Map());
- async function showCompletionNotification(
- database: string,
- collection: string,
- payload: Payload
- ) {
+ async function showCompletionNotification(database: string, table: string, payload: Payload) {
const isSuccess = payload.status === 'completed';
const isError = !isSuccess && !!payload.errors;
@@ -48,20 +44,20 @@
const type = isSuccess ? 'success' : 'error';
const message = isError ? errorMessage : 'CSV import finished successfully.';
- const url = `${base}/project-${page.params.region}-${page.params.project}/databases/database-${database}/collection-${collection}`;
+ const url = `${base}/project-${page.params.region}-${page.params.project}/databases/database-${database}/table-${table}`;
addNotification({
type,
message,
isHtml: true,
buttons:
- isSuccess && collection !== page.params.collection
- ? [{ name: 'View documents', method: () => goto(url) }]
+ isSuccess && table !== page.params.table
+ ? [{ name: 'View rows', method: () => goto(url) }]
: undefined
});
if (isSuccess) {
- await invalidate(Dependencies.DOCUMENTS);
+ await invalidate(Dependencies.ROWS);
}
}
@@ -70,19 +66,19 @@
const status = importData.status;
const resourceId = importData.resourceId ?? '';
- const [databaseId, collectionId] = resourceId.split(':') ?? [];
+ const [databaseId, tableId] = resourceId.split(':') ?? [];
const current = $importItems.get(importData.$id);
- let collectionName = current?.collection ?? null;
+ let tableName = current?.table ?? null;
- if (!collectionName && collectionId) {
+ if (!tableName && tableId) {
try {
- const collection = await sdk
+ const table = await sdk
.forProject(page.params.region, page.params.project)
- .databases.getCollection(databaseId, collectionId);
- collectionName = collection.name;
+ .grids.getTable(databaseId, tableId);
+ tableName = table.name;
} catch {
- collectionName = null;
+ tableName = null;
}
}
@@ -99,12 +95,12 @@
if (shouldSkip) return items;
const next = new Map(items);
- next.set(importData.$id, { status, collection: collectionName ?? undefined });
+ next.set(importData.$id, { status, table: tableName ?? undefined });
return next;
});
if (status === 'completed' || status === 'failed') {
- await showCompletionNotification(databaseId, collectionId, importData);
+ await showCompletionNotification(databaseId, tableId, importData);
}
}
@@ -172,7 +168,7 @@