diff --git a/src/lib/sdk/billing.ts b/src/lib/sdk/billing.ts index 9390ff953..131fa12c6 100644 --- a/src/lib/sdk/billing.ts +++ b/src/lib/sdk/billing.ts @@ -66,31 +66,6 @@ export type EstimationDeleteOrganization = { unpaidInvoices: Invoice[]; }; -export type AllowedRegions = - | 'fra' - | 'nyc' - | 'sfo' - | 'blr' - | 'lon' - | 'ams' - | 'sgp' - | 'tor' - | 'syd' - | 'default'; //TODO: remove after migration - -export type Region = { - $id: AllowedRegions; - name: string; - disabled: boolean; - default: boolean; - flag: string; -}; - -export type RegionList = { - regions: Region[]; - total: number; -}; - export type Address = { $id: string; streetAddress: string; @@ -176,11 +151,6 @@ export type PlanList = { export type PlansMap = Map; -export type Roles = { - scopes: string[]; - roles: string[]; -}; - export class Billing { client: Client; @@ -319,7 +289,7 @@ export class Billing { }); } - async getRoles(organizationId: string): Promise { + async getRoles(organizationId: string): Promise { const path = `/organizations/${organizationId}/roles`; const uri = new URL(this.client.config.endpoint + path); return await this.client.call('get', uri, { @@ -1088,7 +1058,7 @@ export class Billing { ); } - async listRegions(): Promise { + async listRegions(): Promise { const path = `/console/regions`; const params = {}; const uri = new URL(this.client.config.endpoint + path); diff --git a/src/lib/stores/organization.ts b/src/lib/stores/organization.ts index dcfd0a562..92f6650c8 100644 --- a/src/lib/stores/organization.ts +++ b/src/lib/stores/organization.ts @@ -1,8 +1,8 @@ import { page } from '$app/stores'; -import { derived, writable } from 'svelte/store'; -import type { Models } from '@appwrite.io/console'; -import type { Tier } from './billing'; import type { Plan } from '$lib/sdk/billing'; +import type { Models } from '@appwrite.io/console'; +import { derived, writable } from 'svelte/store'; +import type { Tier } from './billing'; export type OrganizationError = { status: number; diff --git a/src/routes/(console)/organization-[organization]/store.ts b/src/routes/(console)/organization-[organization]/store.ts index aae6830f4..83ae116ab 100644 --- a/src/routes/(console)/organization-[organization]/store.ts +++ b/src/routes/(console)/organization-[organization]/store.ts @@ -1,10 +1,9 @@ import { page } from '$app/stores'; +import { sdk } from '$lib/stores/sdk'; import type { Models } from '@appwrite.io/console'; import { derived, writable } from 'svelte/store'; -import type { RegionList } from '$lib/sdk/billing'; -import { sdk } from '$lib/stores/sdk'; -export const regions = writable(undefined); +export const regions = writable(undefined); export const regionFlagUrls = derived(regions, ($regions) => { if (!$regions?.regions?.length) return []; diff --git a/src/routes/(console)/organization-[organization]/wizard/step2.svelte b/src/routes/(console)/organization-[organization]/wizard/step2.svelte index 1ac76706e..253fe2c1b 100644 --- a/src/routes/(console)/organization-[organization]/wizard/step2.svelte +++ b/src/routes/(console)/organization-[organization]/wizard/step2.svelte @@ -1,15 +1,14 @@