From d3f0aa03042ff6c1d5c0b9f38fc7fa48749817cb Mon Sep 17 00:00:00 2001 From: ChiragAgg5k Date: Tue, 25 Feb 2025 10:05:21 +0530 Subject: [PATCH] chore: update naming convention --- src/lib/sdk/billing.ts | 5 ++--- src/lib/sdk/usage.ts | 4 ++-- .../usage/[[invoice]]/+page.svelte | 6 +++--- .../organization-[organization]/usage/[[invoice]]/+page.ts | 4 ++-- .../storage/bucket-[bucket]/usage/[[period]]/+page.svelte | 4 ++-- .../storage/bucket-[bucket]/usage/[[period]]/+page.ts | 4 ++-- 6 files changed, 13 insertions(+), 14 deletions(-) diff --git a/src/lib/sdk/billing.ts b/src/lib/sdk/billing.ts index d387b3ae0..b680c9d2e 100644 --- a/src/lib/sdk/billing.ts +++ b/src/lib/sdk/billing.ts @@ -213,13 +213,13 @@ export type OrganizationUsage = { executions: Array; databasesReads: Array; databasesWrites: Array; - fileTransformations: Array; + imageTransformations: Array; executionsTotal: number; filesStorageTotal: number; buildsStorageTotal: number; databasesReadsTotal: number; databasesWritesTotal: number; - fileTransformationsTotal: number; + imageTransformationsTotal: number; deploymentsStorageTotal: number; executionsMBSecondsTotal: number; buildsMBSecondsTotal: number; @@ -237,7 +237,6 @@ export type OrganizationUsage = { users: number; authPhoneTotal: number; authPhoneEstimate: number; - fileTransformations: number; }>; authPhoneTotal: number; authPhoneEstimate: number; diff --git a/src/lib/sdk/usage.ts b/src/lib/sdk/usage.ts index 33b9a877a..1d99d8d50 100644 --- a/src/lib/sdk/usage.ts +++ b/src/lib/sdk/usage.ts @@ -188,11 +188,11 @@ export type UsageBuckets = { /** * Aggregated statistics of bucket file transformations per period. */ - fileTransformations: Metric[]; + imageTransformations: Metric[]; /** * Total aggregated number of file transformations. */ - fileTransformationsTotal: number; + imageTransformationsTotal: number; }; /** * UsageFunctions diff --git a/src/routes/(console)/organization-[organization]/usage/[[invoice]]/+page.svelte b/src/routes/(console)/organization-[organization]/usage/[[invoice]]/+page.svelte index b5723fbd7..8782758b0 100644 --- a/src/routes/(console)/organization-[organization]/usage/[[invoice]]/+page.svelte +++ b/src/routes/(console)/organization-[organization]/usage/[[invoice]]/+page.svelte @@ -266,7 +266,7 @@ The total number of image transformations across all projects in your organization.

- {#if data.organizationUsage.fileTransformationsTotal} + {#if data.organizationUsage.imageTransformationsTotal}
[e.date, e.value] ) ] @@ -292,7 +292,7 @@ legendData={[ { name: 'Transformations', - value: data.organizationUsage.fileTransformationsTotal + value: data.organizationUsage.imageTransformationsTotal } ]} /> diff --git a/src/routes/(console)/organization-[organization]/usage/[[invoice]]/+page.ts b/src/routes/(console)/organization-[organization]/usage/[[invoice]]/+page.ts index d81cd35ac..2605dc4a6 100644 --- a/src/routes/(console)/organization-[organization]/usage/[[invoice]]/+page.ts +++ b/src/routes/(console)/organization-[organization]/usage/[[invoice]]/+page.ts @@ -34,8 +34,8 @@ export const load: PageLoad = async ({ params, parent }) => { databasesWrites: null, databasesReadsTotal: null, databasesWritesTotal: null, - fileTransformations: null, - fileTransformationsTotal: null + imageTransformations: null, + imageTransformationsTotal: null } }; } diff --git a/src/routes/(console)/project-[project]/storage/bucket-[bucket]/usage/[[period]]/+page.svelte b/src/routes/(console)/project-[project]/storage/bucket-[bucket]/usage/[[period]]/+page.svelte index 3366a0130..b4b2f6127 100644 --- a/src/routes/(console)/project-[project]/storage/bucket-[bucket]/usage/[[period]]/+page.svelte +++ b/src/routes/(console)/project-[project]/storage/bucket-[bucket]/usage/[[period]]/+page.svelte @@ -7,8 +7,8 @@ export let data: PageData; $: filesTotal = data.filesTotal; $: files = data.files; - $: transformationsTotal = data.fileTransformationsTotal; - $: transformations = data.fileTransformations; + $: transformationsTotal = data.imageTransformationsTotal; + $: transformations = data.imageTransformations; console.log(data); diff --git a/src/routes/(console)/project-[project]/storage/bucket-[bucket]/usage/[[period]]/+page.ts b/src/routes/(console)/project-[project]/storage/bucket-[bucket]/usage/[[period]]/+page.ts index 021b2ba45..e54038b45 100644 --- a/src/routes/(console)/project-[project]/storage/bucket-[bucket]/usage/[[period]]/+page.ts +++ b/src/routes/(console)/project-[project]/storage/bucket-[bucket]/usage/[[period]]/+page.ts @@ -16,7 +16,7 @@ export const load: PageLoad = async ({ params }) => { return { filesTotal: response.filesTotal, files: response.files as Metric[], - fileTransformationsTotal: response.fileTransformationsTotal, - fileTransformations: response.fileTransformations as Metric[] + imageTransformationsTotal: response.imageTransformationsTotal, + imageTransformations: response.imageTransformations as Metric[] }; };