Need a hand?
- {#if providers[$providerType].providers[$provider].needAHand}
- {@const needAHand = providers[$providerType].providers[$provider].needAHand}
-
-
-
-
-
-
-
+
+ {#if providers[$providerType].providers[$provider].needAHand}
+ {@const needAHand = providers[$providerType].providers[$provider].needAHand}
+
+
+
+
+
+
+
+
+
How to enable
+ {#if $providerType == MessagingProviderType.Push}notifications{:else}{/if} service?
- How to enable
- {#if $providerType == MessagingProviderType.Push}notifications{:else}{/if} service?
+
+
+ {#each needAHand as p}
+
+ {@html p}
+
+ {/each}
-
-
- {#each needAHand as p}
-
- {@html p}
-
- {/each}
-
-
-
-
- {/if}
+
+
+
+
+ {/if}
-
-
-
-
-
-
-
-
-
- Read the full guide in the documentation
+
+
+
+
+
+
-
+
Read the full guide in the documentation
-
-
-
($newMemberModal = true)}>
-
-
-
-
-
-
- Invite a team member to complete this step
+
+
+
+
($newMemberModal = true)}>
+
+
+
+
-
+
Invite a team member to complete this step
-
-
-
-
+
+
+
+
+
diff --git a/src/routes/console/project-[project]/messaging/providers/wizard/provider.svelte b/src/routes/console/project-[project]/messaging/providers/wizard/provider.svelte
index b5b8fb1d2..d5e494991 100644
--- a/src/routes/console/project-[project]/messaging/providers/wizard/provider.svelte
+++ b/src/routes/console/project-[project]/messaging/providers/wizard/provider.svelte
@@ -6,7 +6,7 @@
import { FormList, InputText } from '$lib/elements/forms';
import { Pill } from '$lib/elements';
import { Providers } from '../../provider.svelte';
- import { Encryption } from '@appwrite.io/console';
+ import { SmtpEncryption } from '@appwrite.io/console';
let name = '';
let showCustomId = false;
@@ -102,7 +102,7 @@
username: '',
password: '',
autoTLS: true,
- encryption: Encryption.Tls,
+ encryption: SmtpEncryption.Tls,
mailer: '',
fromEmail: '',
fromName: '',
@@ -126,7 +126,8 @@
authKey: '',
authKeyId: '',
teamId: '',
- bundleId: ''
+ bundleId: '',
+ sandbox: false
};
break;
}
diff --git a/src/routes/console/project-[project]/messaging/providers/wizard/store.ts b/src/routes/console/project-[project]/messaging/providers/wizard/store.ts
index 764669921..4ea4d8c4d 100644
--- a/src/routes/console/project-[project]/messaging/providers/wizard/store.ts
+++ b/src/routes/console/project-[project]/messaging/providers/wizard/store.ts
@@ -1,6 +1,6 @@
import { writable } from 'svelte/store';
import type { Providers } from '../../provider.svelte';
-import type { MessagingProviderType, Encryption } from '@appwrite.io/console';
+import type { MessagingProviderType, SmtpEncryption } from '@appwrite.io/console';
type ProviderParams = {
providerId: string;
@@ -73,7 +73,7 @@ export type SMTPProviderParams = ProviderParams & {
port: number;
username: string;
password: string;
- encryption: Encryption;
+ encryption: SmtpEncryption;
autoTLS: boolean;
mailer: string;
};
@@ -91,6 +91,7 @@ export type APNSProviderParams = ProviderParams & {
authKeyId: string;
teamId: string;
bundleId: string;
+ sandbox: boolean;
};
export type MQTTProviderParams = ProviderParams & {
diff --git a/src/routes/console/project-[project]/messaging/topics/topic-[topic]/subscribers/+page.svelte b/src/routes/console/project-[project]/messaging/topics/topic-[topic]/subscribers/+page.svelte
index 08d6fd58a..c5c308a5e 100644
--- a/src/routes/console/project-[project]/messaging/topics/topic-[topic]/subscribers/+page.svelte
+++ b/src/routes/console/project-[project]/messaging/topics/topic-[topic]/subscribers/+page.svelte
@@ -46,9 +46,14 @@
const targetIds = Object.keys($targetsById).filter(
(targetId) => !(targetId in subscribersByTargetId)
);
- const promises = targetIds.map((targetId) =>
- sdk.forProject.messaging.createSubscriber($page.params.topic, ID.unique(), targetId)
- );
+ const promises = targetIds.map(async (targetId) => {
+ const subscriber = await sdk.forProject.messaging.createSubscriber(
+ $page.params.topic,
+ ID.unique(),
+ targetId
+ );
+ subscribersByTargetId[targetId] = subscriber;
+ });
try {
await Promise.all(promises);
diff --git a/src/routes/console/project-[project]/messaging/topicsModal.svelte b/src/routes/console/project-[project]/messaging/topicsModal.svelte
index 95a03b79c..377b5d1bd 100644
--- a/src/routes/console/project-[project]/messaging/topicsModal.svelte
+++ b/src/routes/console/project-[project]/messaging/topicsModal.svelte
@@ -121,7 +121,7 @@
- ({getTotal(topic)} subscribers)
+ ({getTotal(topic)} targets)
diff --git a/src/routes/console/project-[project]/settings/usage/[[invoice]]/+page.ts b/src/routes/console/project-[project]/settings/usage/[[invoice]]/+page.ts
index d29b1e799..2cb455ae0 100644
--- a/src/routes/console/project-[project]/settings/usage/[[invoice]]/+page.ts
+++ b/src/routes/console/project-[project]/settings/usage/[[invoice]]/+page.ts
@@ -1,24 +1,22 @@
+import type { Aggregation, Invoice } from '$lib/sdk/billing';
+import { accumulateUsage } from '$lib/sdk/usage';
import { getSdkForProject, sdk } from '$lib/stores/sdk';
import { Query } from '@appwrite.io/console';
import type { PageLoad } from './$types';
-import type { Organization } from '$lib/stores/organization';
-import type { Aggregation, Invoice } from '$lib/sdk/billing';
-import { accumulateUsage } from '$lib/sdk/usage';
export const load: PageLoad = async ({ params, parent }) => {
const { invoice, project } = params;
- const parentData = await parent();
- const org = parentData.organization as Organization;
+ const { organization } = await parent();
- let startDate: string = org.billingCurrentInvoiceDate;
- let endDate: string = org.billingNextInvoiceDate;
+ let startDate: string = organization.billingCurrentInvoiceDate;
+ let endDate: string = organization.billingNextInvoiceDate;
let currentInvoice: Invoice = undefined;
let currentAggregation: Aggregation = undefined;
if (invoice) {
- currentInvoice = await sdk.forConsole.billing.getInvoice(org.$id, invoice);
+ currentInvoice = await sdk.forConsole.billing.getInvoice(organization.$id, invoice);
currentAggregation = await sdk.forConsole.billing.getAggregation(
- org.$id,
+ organization.$id,
currentInvoice.aggregationId
);
@@ -27,7 +25,7 @@ export const load: PageLoad = async ({ params, parent }) => {
}
const [invoices, usage] = await Promise.all([
- sdk.forConsole.billing.listInvoices(org.$id, [Query.orderDesc('from')]),
+ sdk.forConsole.billing.listInvoices(organization.$id, [Query.orderDesc('from')]),
/**
* Workaround because project id might not be populated yet.
*/
diff --git a/src/routes/login/+page.svelte b/src/routes/login/+page.svelte
index 4d49845ae..e60e5811b 100644
--- a/src/routes/login/+page.svelte
+++ b/src/routes/login/+page.svelte
@@ -75,7 +75,6 @@
OAuthProvider.Github,
window.location.origin + url,
window.location.origin,
- undefined,
['read:user', 'user:email']
);
}
diff --git a/src/routes/mfa/+page.svelte b/src/routes/mfa/+page.svelte
index 1e804f5d4..eedc50900 100644
--- a/src/routes/mfa/+page.svelte
+++ b/src/routes/mfa/+page.svelte
@@ -16,7 +16,7 @@
async function verify() {
try {
disabled = true;
- const challenge = await sdk.forConsole.account.create2FAChallenge(
+ const challenge = await sdk.forConsole.account.createChallenge(
AuthenticationFactor.Totp
);
await sdk.forConsole.account.updateChallenge(challenge.$id, code);
diff --git a/src/routes/register/+page.svelte b/src/routes/register/+page.svelte
index 5344cea31..ccc179174 100644
--- a/src/routes/register/+page.svelte
+++ b/src/routes/register/+page.svelte
@@ -64,7 +64,6 @@
OAuthProvider.Github,
window.location.origin,
window.location.origin,
- undefined,
['read:user', 'user:email']
);
}