mirror of
https://github.com/appwrite/console.git
synced 2026-06-06 19:27:48 +00:00
feat: new sdk
This commit is contained in:
+1
-1
@@ -19,7 +19,7 @@
|
||||
"e2e:ui": "playwright test tests/e2e --ui"
|
||||
},
|
||||
"dependencies": {
|
||||
"@appwrite.io/console": "^1.3.2",
|
||||
"@appwrite.io/console": "^1.4.0",
|
||||
"@appwrite.io/pink": "0.25.0",
|
||||
"@appwrite.io/pink-icons": "0.25.0",
|
||||
"@popperjs/core": "^2.11.8",
|
||||
|
||||
Generated
+5
-5
@@ -9,8 +9,8 @@ importers:
|
||||
.:
|
||||
dependencies:
|
||||
'@appwrite.io/console':
|
||||
specifier: ^1.3.2
|
||||
version: 1.3.2
|
||||
specifier: ^1.4.0
|
||||
version: 1.4.0
|
||||
'@appwrite.io/pink':
|
||||
specifier: 0.25.0
|
||||
version: 0.25.0
|
||||
@@ -193,8 +193,8 @@ packages:
|
||||
'@analytics/type-utils@0.6.2':
|
||||
resolution: {integrity: sha512-TD+xbmsBLyYy/IxFimW/YL/9L2IEnM7/EoV9Aeh56U64Ify8o27HJcKjo38XY9Tcn0uOq1AX3thkKgvtWvwFQg==}
|
||||
|
||||
'@appwrite.io/console@1.3.2':
|
||||
resolution: {integrity: sha512-3OKKlhXbEqgWPZxdJjmzVZkOoBbJBkOiTqqQWP9ZnuBNEXwIkaXsneMjkPYS3IEBLkJ9zNMON7rH8kkEgMnEgw==}
|
||||
'@appwrite.io/console@1.4.0':
|
||||
resolution: {integrity: sha512-hN4UWdXff/9Xmy53hhglTFBe7TUC7BEJXqjoiewupLWIpcMq90dY4f00t0VncVZW3amUsQUYHbCgUuAHatLA/Q==}
|
||||
|
||||
'@appwrite.io/pink-icons@0.25.0':
|
||||
resolution: {integrity: sha512-0O3i2oEuh5mWvjO80i+X6rbzrWLJ1m5wmv2/M3a1p2PyBJsFxN8xQMTEmTn3Wl/D26SsM7SpzbdW6gmfgoVU9Q==}
|
||||
@@ -3723,7 +3723,7 @@ snapshots:
|
||||
|
||||
'@analytics/type-utils@0.6.2': {}
|
||||
|
||||
'@appwrite.io/console@1.3.2': {}
|
||||
'@appwrite.io/console@1.4.0': {}
|
||||
|
||||
'@appwrite.io/pink-icons@0.25.0': {}
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
async function addCoupon() {
|
||||
try {
|
||||
const response = await sdk.forConsole.console.getCopon(coupon);
|
||||
const response = await sdk.forConsole.console.getCoupon(coupon);
|
||||
couponData = response;
|
||||
dispatch('validation', couponData);
|
||||
coupon = null;
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
async function addCoupon() {
|
||||
try {
|
||||
const response = await sdk.forConsole.console.getCopon(coupon);
|
||||
const response = await sdk.forConsole.console.getCoupon(coupon);
|
||||
couponData = response;
|
||||
dispatch('validation', couponData);
|
||||
coupon = null;
|
||||
|
||||
@@ -3,17 +3,17 @@
|
||||
import { upgradeURL } from '$lib/stores/billing';
|
||||
import { isCloud } from '$lib/system';
|
||||
import { organization } from '$lib/stores/organization';
|
||||
import { BillingPlan } from '$lib/constants';
|
||||
import { BillingPlan } from '@appwrite.io/console';
|
||||
import Button from '$lib/elements/forms/button.svelte';
|
||||
</script>
|
||||
|
||||
<Base>
|
||||
{#if isCloud}
|
||||
{#if $organization?.billingPlan !== BillingPlan.FREE}
|
||||
{#if $organization?.billingPlan !== BillingPlan.Tier0}
|
||||
<div class="u-flex-vertical u-gap-8">
|
||||
<p>
|
||||
<span class="u-bold">Roles</span>
|
||||
{#if $organization?.billingPlan === BillingPlan.FREE}
|
||||
{#if $organization?.billingPlan === BillingPlan.Tier0}
|
||||
<span class="inline-tag u-normal u-x-small">Pro plan</span>
|
||||
{/if}
|
||||
</p>
|
||||
@@ -27,7 +27,7 @@
|
||||
<div class="u-flex-vertical u-gap-8">
|
||||
<p>
|
||||
<span class="u-bold">Roles</span>
|
||||
{#if $organization?.billingPlan === BillingPlan.FREE}
|
||||
{#if $organization?.billingPlan === BillingPlan.Tier0}
|
||||
<span class="inline-tag u-normal u-x-small">Pro plan</span>
|
||||
{/if}
|
||||
</p>
|
||||
|
||||
@@ -416,8 +416,8 @@ export async function checkForMissingPaymentMethod() {
|
||||
Query.isNull('paymentMethodId'),
|
||||
Query.isNull('backupPaymentMethodId')
|
||||
]);
|
||||
if (orgs?.total) {
|
||||
orgMissingPaymentMethod.set(orgs.teams[0] as Organization);
|
||||
if (orgs?.teams.length > 0) {
|
||||
orgMissingPaymentMethod.set(orgs.teams[0] as unknown as Organization);
|
||||
headerAlert.add({
|
||||
id: 'missingPaymentMethod',
|
||||
component: MissingPaymentMethod,
|
||||
|
||||
@@ -81,7 +81,7 @@
|
||||
<Pill class="eyebrow-heading-3">FREE</Pill>
|
||||
</div>
|
||||
{/if}
|
||||
{#if organization?.billingTrialStartDate && $daysLeftInTrial > 0 && organization.billingPlan !== BillingPlan.Tier0 && $plansInfo.get(organization.billingPlan)?.trialDays}
|
||||
{#if organization?.billingTrialStartDate && $daysLeftInTrial > 0 && organization.billingPlan !== BillingPlan.Tier0 && $plansInfo.get(organization.billingPlan)?.trial}
|
||||
<div
|
||||
class="u-flex u-cross-center"
|
||||
use:tooltip={{
|
||||
|
||||
@@ -171,7 +171,7 @@
|
||||
|
||||
async function addCoupon() {
|
||||
try {
|
||||
const response = await sdk.forConsole.console.getCopon(coupon);
|
||||
const response = await sdk.forConsole.console.getCoupon(coupon);
|
||||
couponData = response;
|
||||
coupon = null;
|
||||
addNotification({
|
||||
|
||||
@@ -11,7 +11,7 @@ export const load: PageLoad = async ({ url }) => {
|
||||
let couponData: Coupon;
|
||||
const code = url.searchParams.get('code');
|
||||
try {
|
||||
couponData = await sdk.forConsole.console.getCopon(code);
|
||||
couponData = await sdk.forConsole.console.getCoupon(code);
|
||||
} catch (e) {
|
||||
redirect(303, base);
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
if ($page.url.searchParams.has('coupon')) {
|
||||
const coupon = $page.url.searchParams.get('coupon');
|
||||
try {
|
||||
const response = await sdk.forConsole.console.getCopon(coupon);
|
||||
const response = await sdk.forConsole.console.getCoupon(coupon);
|
||||
couponData = response;
|
||||
} catch (e) {
|
||||
couponData = {
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
import type { Models } from '@appwrite.io/console';
|
||||
|
||||
export let show = false;
|
||||
let addresses: Models.BillingAddress;
|
||||
let addresses: Models.BillingAddressList;
|
||||
let selectedAddress: string;
|
||||
let error: string;
|
||||
let country: string;
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
async function validateCoupon() {
|
||||
if (couponData?.status === 'active') return;
|
||||
try {
|
||||
const response = await sdk.forConsole.console.getCopon(coupon);
|
||||
const response = await sdk.forConsole.console.getCoupon(coupon);
|
||||
couponData = response;
|
||||
$addCreditWizardStore.coupon = coupon;
|
||||
coupon = null;
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
if ($page.url.searchParams.has('code')) {
|
||||
const coupon = $page.url.searchParams.get('code');
|
||||
try {
|
||||
const response = await sdk.forConsole.console.getCopon(coupon);
|
||||
const response = await sdk.forConsole.console.getCoupon(coupon);
|
||||
couponData = response;
|
||||
} catch (e) {
|
||||
couponData = {
|
||||
|
||||
@@ -8,7 +8,7 @@ export const load: PageLoad = async ({ url }) => {
|
||||
if (url.searchParams.has('code')) {
|
||||
const code = url.searchParams.get('code');
|
||||
try {
|
||||
const couponData = await sdk.forConsole.console.getCopon(code);
|
||||
const couponData = await sdk.forConsole.console.getCoupon(code);
|
||||
if (couponData?.campaign && campaigns.has(couponData.campaign)) {
|
||||
return {
|
||||
couponData
|
||||
|
||||
@@ -8,7 +8,7 @@ export const load: PageLoad = async ({ url }) => {
|
||||
if (url.searchParams.has('code')) {
|
||||
const code = url.searchParams.get('code');
|
||||
try {
|
||||
const couponData = await sdk.forConsole.console.getCopon(code);
|
||||
const couponData = await sdk.forConsole.console.getCoupon(code);
|
||||
if (couponData?.campaign && campaigns.has(couponData.campaign)) {
|
||||
return {
|
||||
couponData
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
|
||||
if ($page.url.searchParams.has('code')) {
|
||||
const code = $page.url.searchParams.get('code');
|
||||
const coupon = await sdk.forConsole.console.getCopon(code).catch<null>(() => null);
|
||||
const coupon = await sdk.forConsole.console.getCoupon(code).catch<null>(() => null);
|
||||
if (coupon?.campaign && campaigns.has(coupon.campaign)) {
|
||||
if ($user) {
|
||||
goto(`${base}/apply-credit?code=${code}`);
|
||||
|
||||
Reference in New Issue
Block a user