Skip to content

Commit 2fce2e3

Browse files
committed
chore: bump SDK to 666231b, fix enum renames, add OAuth2 server feature flag
- Update @appwrite.io/console to 666231b - Scopes → ProjectKeyScopes in all function/overview files - StatusCode.MovedPermanently301/Found302/TemporaryRedirect307/PermanentRedirect308 → MovedPermanently/Found/TemporaryRedirect/PermanentRedirect - Add oauth2Server feature flag to flags.ts - Wire UpdateOAuth2Server card into project settings behind oauth2-server flag - Type-cast missing oAuth2Server fields and updateOAuth2Server method until SDK ships them - Add Submit.ProjectUpdateOAuth2Server analytics event
1 parent 4107a78 commit 2fce2e3

31 files changed

Lines changed: 66 additions & 64 deletions

bun.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
},
2121
"dependencies": {
2222
"@ai-sdk/svelte": "^1.1.24",
23-
"@appwrite.io/console": "https://pkg.vc/-/@appwrite/@appwrite.io/console@35c3dea",
23+
"@appwrite.io/console": "https://pkg.vc/-/@appwrite/@appwrite.io/console@666231b",
2424
"@appwrite.io/pink-icons": "0.25.0",
2525
"@appwrite.io/pink-icons-svelte": "https://pkg.vc/-/@appwrite/@appwrite.io/pink-icons-svelte@bfe7ce3",
2626
"@appwrite.io/pink-legacy": "^1.0.3",

src/lib/flags.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,6 @@ function isFlagEnabled(name: string) {
2020

2121
export const flags = {
2222
multiDb: isFlagEnabled('multi-db'),
23-
granularProjectAccess: isFlagEnabled('granular-project-access')
23+
granularProjectAccess: isFlagEnabled('granular-project-access'),
24+
oauth2Server: isFlagEnabled('oauth2-server')
2425
};

src/lib/stores/domains.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,19 @@ import { StatusCode } from '@appwrite.io/console';
33
export const statusCodeOptions = [
44
{
55
label: '301 Moved permanently',
6-
value: StatusCode.MovedPermanently301
6+
value: StatusCode.MovedPermanently
77
},
88
{
99
label: '302 Found',
10-
value: StatusCode.Found302
10+
value: StatusCode.Found
1111
},
1212
{
1313
label: '307 Temporary redirect',
14-
value: StatusCode.TemporaryRedirect307
14+
value: StatusCode.TemporaryRedirect
1515
},
1616
{
1717
label: '308 Permanent redirect',
18-
value: StatusCode.PermanentRedirect308
18+
value: StatusCode.PermanentRedirect
1919
}
2020
];
2121

src/routes/(console)/project-[region]-[project]/functions/create-function/deploy/+page.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
import { Fieldset, Layout, Icon, Input, Tag } from '@appwrite.io/pink-svelte';
1212
import { IconGithub, IconPencil } from '@appwrite.io/pink-icons-svelte';
1313
import { onMount } from 'svelte';
14-
import { ID, Runtime, TemplateReferenceType, type Scopes } from '@appwrite.io/console';
14+
import { ID, Runtime, TemplateReferenceType, type ProjectKeyScopes } from '@appwrite.io/console';
1515
import { CustomId } from '$lib/components';
1616
import { getIconFromRuntime } from '$lib/stores/runtimes';
1717
import { regionalConsoleVariables } from '$routes/(console)/project-[region]-[project]/store';
@@ -39,7 +39,7 @@
3939
let specification = $state('');
4040
let runtime = $state<Runtime>();
4141
let installCommand = $state('');
42-
let selectedScopes = $state<Scopes[]>([]);
42+
let selectedScopes = $state<ProjectKeyScopes[]>([]);
4343
let rootDir = $state(data.repository?.rootDirectory);
4444
let variables = $state<Array<{ key: string; value: string; secret: boolean }>>([]);
4545

src/routes/(console)/project-[region]-[project]/functions/create-function/template-[template]/+page.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
Runtime,
2121
TemplateReferenceType,
2222
type Models,
23-
type Scopes
23+
type ProjectKeyScopes
2424
} from '@appwrite.io/console';
2525
import {
2626
ConnectBehaviour,
@@ -71,7 +71,7 @@
7171
let showConfig = $state(false);
7272
let silentMode = $state(false);
7373
let entrypoint = $state('');
74-
let selectedScopes = $state<Scopes[]>([]);
74+
let selectedScopes = $state<ProjectKeyScopes[]>([]);
7575
let execute = $state(true);
7676
let variables = $state<Partial<Models.TemplateVariable>[]>([]);
7777
let specification = $state(untrack(() => specificationOptions[0]?.value || ''));

src/routes/(console)/project-[region]-[project]/functions/create-function/template-[template]/permissions.svelte

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
<script lang="ts">
22
import { scopes } from '$lib/constants';
33
import { Fieldset, Layout, Selector } from '@appwrite.io/pink-svelte';
4-
import type { Scopes } from '@appwrite.io/console';
4+
import type { ProjectKeyScopes } from '@appwrite.io/console';
55
66
export let templateScopes: string[];
7-
export let selectedScopes: Scopes[];
7+
export let selectedScopes: ProjectKeyScopes[];
88
export let execute = true;
99
1010
let scopeList = scopes
1111
.filter((s) => templateScopes.includes(s.scope))
1212
.map((s) => {
13-
selectedScopes.push(s.scope as Scopes);
13+
selectedScopes.push(s.scope as ProjectKeyScopes);
1414
return {
1515
value: s,
1616
checked: true
@@ -38,7 +38,7 @@
3838
on:change={() => {
3939
selectedScopes = scopeList
4040
.filter((s) => s.checked)
41-
.map((s) => s.value.scope as Scopes);
41+
.map((s) => s.value.scope as ProjectKeyScopes);
4242
}}>
4343
</Selector.Switch>
4444
{/each}

src/routes/(console)/project-[region]-[project]/functions/function-[function]/(modals)/createGit.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import { addNotification } from '$lib/stores/notifications';
1010
import { sdk } from '$lib/stores/sdk';
1111
import { installation, repository, sortBranches } from '$lib/stores/vcs';
12-
import { Runtime, VCSReferenceType, type Models, type Scopes } from '@appwrite.io/console';
12+
import { Runtime, VCSReferenceType, type Models, type ProjectKeyScopes } from '@appwrite.io/console';
1313
import { IconGithub } from '@appwrite.io/pink-icons-svelte';
1414
import { Icon, Input, Layout, Skeleton, Typography } from '@appwrite.io/pink-svelte';
1515
import { func } from '../store';
@@ -87,7 +87,7 @@
8787
logging: $func.logging ?? undefined,
8888
entrypoint: $func.entrypoint,
8989
commands: $func.commands || undefined,
90-
scopes: ($func.scopes as Scopes[]) || undefined,
90+
scopes: ($func.scopes as ProjectKeyScopes[]) || undefined,
9191
installationId: $installation.$id || undefined,
9292
providerRepositoryId: selectedRepository || undefined,
9393
providerBranch: branch || undefined,

src/routes/(console)/project-[region]-[project]/functions/function-[function]/domains/add-domain/+page.svelte

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
ProxyResourceType,
1616
Runtime,
1717
StatusCode,
18-
type Scopes
18+
type ProjectKeyScopes
1919
} from '@appwrite.io/console';
2020
import { statusCodeOptions } from '$lib/stores/domains';
2121
import { writable } from 'svelte/store';
@@ -36,7 +36,7 @@
3636
let domainName = $state('');
3737
let redirect: string = $state(null);
3838
let branch: string = $state(null);
39-
let statusCode = $state(StatusCode.TemporaryRedirect307);
39+
let statusCode = $state(StatusCode.TemporaryRedirect);
4040
4141
const routeBase = resolveRoute(
4242
'/(console)/project-[region]-[project]/functions/function-[function]/domains',
@@ -145,7 +145,7 @@
145145
logging: data.func.logging ?? undefined,
146146
entrypoint: data.func.entrypoint,
147147
commands: data.func.commands || undefined,
148-
scopes: (data.func.scopes as Scopes[]) || undefined,
148+
scopes: (data.func.scopes as ProjectKeyScopes[]) || undefined,
149149
installationId: selectedInstallationId,
150150
providerRepositoryId: selectedRepository,
151151
providerBranch: 'main',

src/routes/(console)/project-[region]-[project]/functions/function-[function]/settings/disconnectRepo.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
import { createEventDispatcher } from 'svelte';
1111
import { func } from '../store';
1212
import { isValueOfStringEnum } from '$lib/helpers/types';
13-
import { Runtime, type Scopes } from '@appwrite.io/console';
13+
import { Runtime, type ProjectKeyScopes } from '@appwrite.io/console';
1414
1515
export let show = false;
1616
const functionId = page.params.function;
@@ -35,7 +35,7 @@
3535
logging: $func.logging ?? undefined,
3636
entrypoint: $func.entrypoint,
3737
commands: $func.commands || undefined,
38-
scopes: ($func.scopes as Scopes[]) || undefined,
38+
scopes: ($func.scopes as ProjectKeyScopes[]) || undefined,
3939
installationId: '',
4040
providerRepositoryId: '',
4141
providerBranch: '',

0 commit comments

Comments
 (0)