mirror of
https://github.com/appwrite/console.git
synced 2026-06-06 19:27:48 +00:00
Merge pull request #869 from appwrite/feat-apns-sandbox
APNS sandbox server support
This commit is contained in:
Generated
+4
-4
@@ -6,7 +6,7 @@
|
||||
"": {
|
||||
"name": "@appwrite/console",
|
||||
"dependencies": {
|
||||
"@appwrite.io/console": "^0.6.0-rc.12",
|
||||
"@appwrite.io/console": "^0.6.0-rc.13",
|
||||
"@appwrite.io/pink": "0.4.0",
|
||||
"@appwrite.io/pink-icons": "0.4.0",
|
||||
"@popperjs/core": "^2.11.8",
|
||||
@@ -158,9 +158,9 @@
|
||||
"integrity": "sha512-TD+xbmsBLyYy/IxFimW/YL/9L2IEnM7/EoV9Aeh56U64Ify8o27HJcKjo38XY9Tcn0uOq1AX3thkKgvtWvwFQg=="
|
||||
},
|
||||
"node_modules/@appwrite.io/console": {
|
||||
"version": "0.6.0-rc.12",
|
||||
"resolved": "https://registry.npmjs.org/@appwrite.io/console/-/console-0.6.0-rc.12.tgz",
|
||||
"integrity": "sha512-pDov75TCkBmJdUPrWuzRW7uM28HYqiMFtVFrUoavDd/lMPBS7RnPXL4sBHsGY8AUldHE3oBcGVPkNoQfEAgLlw==",
|
||||
"version": "0.6.0-rc.13",
|
||||
"resolved": "https://registry.npmjs.org/@appwrite.io/console/-/console-0.6.0-rc.13.tgz",
|
||||
"integrity": "sha512-/c+HGkqdqWjjlzVgOmC6vb4t2jsHgbmX/aaDLoQHXFmaakEDWzK1cgVYRHoU3o14xIEpBupteh3KzOoqdLvvsQ==",
|
||||
"dependencies": {
|
||||
"cross-fetch": "3.1.5",
|
||||
"isomorphic-form-data": "2.0.0"
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@
|
||||
"e2e": "playwright test tests/e2e"
|
||||
},
|
||||
"dependencies": {
|
||||
"@appwrite.io/console": "^0.6.0-rc.12",
|
||||
"@appwrite.io/console": "^0.6.0-rc.13",
|
||||
"@appwrite.io/pink": "0.4.0",
|
||||
"@appwrite.io/pink-icons": "0.4.0",
|
||||
"@popperjs/core": "^2.11.8",
|
||||
|
||||
@@ -130,6 +130,7 @@
|
||||
$providerParams[$provider].authKeyId,
|
||||
$providerParams[$provider].teamId,
|
||||
$providerParams[$provider].bundleId,
|
||||
$providerParams[$provider].sandbox,
|
||||
$providerParams[$provider].enabled
|
||||
);
|
||||
break;
|
||||
|
||||
+2
-2
@@ -69,13 +69,13 @@
|
||||
);
|
||||
break;
|
||||
case Providers.FCM:
|
||||
response = await sdk.forProject.messaging.updateFCMProvider(
|
||||
response = await sdk.forProject.messaging.updateFcmProvider(
|
||||
providerId,
|
||||
providerName
|
||||
);
|
||||
break;
|
||||
case Providers.APNS:
|
||||
response = await sdk.forProject.messaging.updateAPNSProvider(
|
||||
response = await sdk.forProject.messaging.updateApnsProvider(
|
||||
providerId,
|
||||
providerName
|
||||
);
|
||||
|
||||
+4
-3
@@ -153,7 +153,8 @@
|
||||
authKey: $provider.credentials['authKey'],
|
||||
authKeyId: $provider.credentials['authKeyId'],
|
||||
teamId: $provider.credentials['teamId'],
|
||||
bundleId: $provider.credentials['bundleId']
|
||||
bundleId: $provider.credentials['bundleId'],
|
||||
sandbox: $provider.options['sandbox']
|
||||
};
|
||||
break;
|
||||
}
|
||||
@@ -237,14 +238,14 @@
|
||||
);
|
||||
break;
|
||||
case Providers.FCM:
|
||||
response = await sdk.forProject.messaging.updateFCMProvider(
|
||||
response = await sdk.forProject.messaging.updateFcmProvider(
|
||||
providerId,
|
||||
undefined,
|
||||
enabled
|
||||
);
|
||||
break;
|
||||
case Providers.APNS:
|
||||
response = await sdk.forProject.messaging.updateAPNSProvider(
|
||||
response = await sdk.forProject.messaging.updateApnsProvider(
|
||||
providerId,
|
||||
undefined,
|
||||
enabled
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { Column } from '$lib/helpers/types';
|
||||
import { writable } from 'svelte/store';
|
||||
import { Providers } from '../provider.svelte';
|
||||
import { MessagingProviderType, Encryption } from '@appwrite.io/console';
|
||||
import { MessagingProviderType, SmtpEncryption } from '@appwrite.io/console';
|
||||
|
||||
export const columns = writable<Column[]>([
|
||||
{ id: '$id', title: 'Provider ID', type: 'string', show: true },
|
||||
@@ -142,6 +142,12 @@ export const providers: ProvidersMap = {
|
||||
'Head to <b><a class="link" href="https://idmsa.apple.com/IDMSWebAuth/signin?appIdKey=891bd3417a7776362562d2197f89480a8547b108fd934911bcbea0110d07f757&path=%2Faccount%2F&rv=1" target="_blank" rel="noopener noreferrer">Apple Developer Member Center</a></b> (under Program resources) <b>-> Certificates, Identifiers & Profiles -> Keys.</b>',
|
||||
'Create a key and give it a name. Enable the Apple Push Notifications service (APNS), and register your key.'
|
||||
]
|
||||
},
|
||||
{
|
||||
label: 'Sandbox',
|
||||
name: 'sandbox',
|
||||
type: 'switch',
|
||||
description: 'Use the development APNS server.'
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -328,9 +334,9 @@ export const providers: ProvidersMap = {
|
||||
name: 'encryption',
|
||||
type: 'select',
|
||||
options: [
|
||||
{ label: 'None', value: Encryption.None },
|
||||
{ label: 'SSL', value: Encryption.Ssl },
|
||||
{ label: 'TLS', value: Encryption.Tls }
|
||||
{ label: 'None', value: SmtpEncryption.None },
|
||||
{ label: 'SSL', value: SmtpEncryption.Ssl },
|
||||
{ label: 'TLS', value: SmtpEncryption.Tls }
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
@@ -114,7 +114,7 @@
|
||||
);
|
||||
break;
|
||||
case Providers.FCM:
|
||||
response = await sdk.forProject.messaging.updateFCMProvider(
|
||||
response = await sdk.forProject.messaging.updateFcmProvider(
|
||||
providerId,
|
||||
$providerParams[$provider].name,
|
||||
$providerParams[$provider].enabled,
|
||||
@@ -122,14 +122,15 @@
|
||||
);
|
||||
break;
|
||||
case Providers.APNS:
|
||||
response = await sdk.forProject.messaging.updateAPNSProvider(
|
||||
response = await sdk.forProject.messaging.updateApnsProvider(
|
||||
providerId,
|
||||
$providerParams[$provider].name,
|
||||
$providerParams[$provider].enabled,
|
||||
$providerParams[$provider].authKey,
|
||||
$providerParams[$provider].authKeyId,
|
||||
$providerParams[$provider].teamId,
|
||||
$providerParams[$provider].bundleId
|
||||
$providerParams[$provider].bundleId,
|
||||
$providerParams[$provider].sandbox
|
||||
);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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 & {
|
||||
|
||||
@@ -75,7 +75,6 @@
|
||||
OAuthProvider.Github,
|
||||
window.location.origin + url,
|
||||
window.location.origin,
|
||||
undefined,
|
||||
['read:user', 'user:email']
|
||||
);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -64,7 +64,6 @@
|
||||
OAuthProvider.Github,
|
||||
window.location.origin,
|
||||
window.location.origin,
|
||||
undefined,
|
||||
['read:user', 'user:email']
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user