diff --git a/package.json b/package.json
index ec3f7fb81..2e205104f 100644
--- a/package.json
+++ b/package.json
@@ -22,7 +22,7 @@
},
"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",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 1b689ea46..4d925c43a 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
@@ -260,8 +260,8 @@ 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':
@@ -2551,8 +2551,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==}
@@ -3653,7 +3653,7 @@ 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)':
dependencies:
@@ -5046,7 +5046,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':
@@ -6186,7 +6186,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 d9c86e0d9..e3ac82596 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 b191b892f..fa8427d30 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 58407c678..5181a99a2 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 98d312698..3a3cea77f 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 c3ffaebe9..000000000
--- 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 f50a1474d..6775bfd4a 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 0f78e8c90..d4461c2a1 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 000000000..8beff8e05
--- /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 1598341f7..2f660985e 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 43dbbeebd..a93ee23bf 100644
--- a/src/lib/components/columnSelector.svelte
+++ b/src/lib/components/columnSelector.svelte
@@ -16,14 +16,14 @@
let {
columns,
- isCustomCollection = false,
+ isCustomTable = false,
ui = 'legacy',
allowNoColumns = false,
showAnyway = false,
children
}: {
columns: Writable;
- isCustomCollection?: boolean;
+ isCustomTable?: boolean;
allowNoColumns?: boolean;
ui?: 'legacy' | 'new';
showAnyway?: boolean;
@@ -44,7 +44,6 @@
let maxHeight = $state('none');
let containerRef = $state(null);
- const collectionId = $derived(page.params.collection);
const isNewStyle = ui === 'new';
const calcMaxHeight = () => {
@@ -60,16 +59,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) => {
@@ -244,8 +243,9 @@
{/if}
+