-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #18 from appwrite/backups
Backups
- Loading branch information
Showing
71 changed files
with
3,808 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { Client, Account } from "@appwrite.io/console"; | ||
|
||
const client = new Client() | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('<YOUR_PROJECT_ID>'); // Your project ID | ||
|
||
const account = new Account(client); | ||
|
||
const result = await account.createPaymentMethod(); | ||
|
||
console.log(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { Client, Account } from "@appwrite.io/console"; | ||
|
||
const client = new Client() | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('<YOUR_PROJECT_ID>'); // Your project ID | ||
|
||
const account = new Account(client); | ||
|
||
const result = await account.deletePaymentMethod( | ||
'<PAYMENT_METHOD_ID>' // paymentMethodId | ||
); | ||
|
||
console.log(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { Client, Account } from "@appwrite.io/console"; | ||
|
||
const client = new Client() | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('<YOUR_PROJECT_ID>'); // Your project ID | ||
|
||
const account = new Account(client); | ||
|
||
const result = await account.getBillingAddress( | ||
'<BILLING_ADDRESS_ID>' // billingAddressId | ||
); | ||
|
||
console.log(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { Client, Account } from "@appwrite.io/console"; | ||
|
||
const client = new Client() | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('<YOUR_PROJECT_ID>'); // Your project ID | ||
|
||
const account = new Account(client); | ||
|
||
const result = await account.getPaymentMethod( | ||
'<PAYMENT_METHOD_ID>' // paymentMethodId | ||
); | ||
|
||
console.log(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { Client, Account } from "@appwrite.io/console"; | ||
|
||
const client = new Client() | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('<YOUR_PROJECT_ID>'); // Your project ID | ||
|
||
const account = new Account(client); | ||
|
||
const result = await account.listBillingAddresses( | ||
[] // queries (optional) | ||
); | ||
|
||
console.log(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { Client, Account } from "@appwrite.io/console"; | ||
|
||
const client = new Client() | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('<YOUR_PROJECT_ID>'); // Your project ID | ||
|
||
const account = new Account(client); | ||
|
||
const result = await account.listCredits( | ||
'<ORGANIZATION_ID>', // organizationId | ||
[] // queries (optional) | ||
); | ||
|
||
console.log(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { Client, Account } from "@appwrite.io/console"; | ||
|
||
const client = new Client() | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('<YOUR_PROJECT_ID>'); // Your project ID | ||
|
||
const account = new Account(client); | ||
|
||
const result = await account.listInvoices( | ||
[] // queries (optional) | ||
); | ||
|
||
console.log(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { Client, Account } from "@appwrite.io/console"; | ||
|
||
const client = new Client() | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('<YOUR_PROJECT_ID>'); // Your project ID | ||
|
||
const account = new Account(client); | ||
|
||
const result = await account.listPaymentMethods( | ||
[] // queries (optional) | ||
); | ||
|
||
console.log(result); |
13 changes: 13 additions & 0 deletions
13
docs/examples/account/update-payment-method-mandate-options.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { Client, Account } from "@appwrite.io/console"; | ||
|
||
const client = new Client() | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('<YOUR_PROJECT_ID>'); // Your project ID | ||
|
||
const account = new Account(client); | ||
|
||
const result = await account.updatePaymentMethodMandateOptions( | ||
'<PAYMENT_METHOD_ID>' // paymentMethodId | ||
); | ||
|
||
console.log(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { Client, Account } from "@appwrite.io/console"; | ||
|
||
const client = new Client() | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('<YOUR_PROJECT_ID>'); // Your project ID | ||
|
||
const account = new Account(client); | ||
|
||
const result = await account.updatePaymentMethodProvider( | ||
'<PAYMENT_METHOD_ID>', // paymentMethodId | ||
'<PROVIDER_METHOD_ID>', // providerMethodId | ||
'<NAME>' // name | ||
); | ||
|
||
console.log(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { Client, Account } from "@appwrite.io/console"; | ||
|
||
const client = new Client() | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('<YOUR_PROJECT_ID>'); // Your project ID | ||
|
||
const account = new Account(client); | ||
|
||
const result = await account.updatePaymentMethod( | ||
'<PAYMENT_METHOD_ID>', // paymentMethodId | ||
1, // expiryMonth | ||
2024 // expiryYear | ||
); | ||
|
||
console.log(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { Client, Backups } from "@appwrite.io/console"; | ||
|
||
const client = new Client() | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('<YOUR_PROJECT_ID>'); // Your project ID | ||
|
||
const backups = new Backups(client); | ||
|
||
const result = await backups.createArchive( | ||
[], // services | ||
'<RESOURCE_ID>' // resourceId (optional) | ||
); | ||
|
||
console.log(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { Client, Backups } from "@appwrite.io/console"; | ||
|
||
const client = new Client() | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('<YOUR_PROJECT_ID>'); // Your project ID | ||
|
||
const backups = new Backups(client); | ||
|
||
const result = await backups.createPolicy( | ||
'<POLICY_ID>', // policyId | ||
[], // services | ||
1, // retention | ||
'', // schedule | ||
'<NAME>', // name (optional) | ||
'<RESOURCE_ID>', // resourceId (optional) | ||
false // enabled (optional) | ||
); | ||
|
||
console.log(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { Client, Backups } from "@appwrite.io/console"; | ||
|
||
const client = new Client() | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('<YOUR_PROJECT_ID>'); // Your project ID | ||
|
||
const backups = new Backups(client); | ||
|
||
const result = await backups.createRestoration( | ||
'<ARCHIVE_ID>', // archiveId | ||
[], // services | ||
'<NEW_RESOURCE_ID>', // newResourceId (optional) | ||
'<NEW_RESOURCE_NAME>' // newResourceName (optional) | ||
); | ||
|
||
console.log(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { Client, Backups } from "@appwrite.io/console"; | ||
|
||
const client = new Client() | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('<YOUR_PROJECT_ID>'); // Your project ID | ||
|
||
const backups = new Backups(client); | ||
|
||
const result = await backups.deleteArchive( | ||
'<ARCHIVE_ID>' // archiveId | ||
); | ||
|
||
console.log(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { Client, Backups } from "@appwrite.io/console"; | ||
|
||
const client = new Client() | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('<YOUR_PROJECT_ID>'); // Your project ID | ||
|
||
const backups = new Backups(client); | ||
|
||
const result = await backups.deletePolicy( | ||
'<POLICY_ID>' // policyId | ||
); | ||
|
||
console.log(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { Client, Backups } from "@appwrite.io/console"; | ||
|
||
const client = new Client() | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('<YOUR_PROJECT_ID>'); // Your project ID | ||
|
||
const backups = new Backups(client); | ||
|
||
const result = await backups.getArchive( | ||
'<ARCHIVE_ID>' // archiveId | ||
); | ||
|
||
console.log(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { Client, Backups } from "@appwrite.io/console"; | ||
|
||
const client = new Client() | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('<YOUR_PROJECT_ID>'); // Your project ID | ||
|
||
const backups = new Backups(client); | ||
|
||
const result = await backups.getPolicy( | ||
'<POLICY_ID>' // policyId | ||
); | ||
|
||
console.log(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { Client, Backups } from "@appwrite.io/console"; | ||
|
||
const client = new Client() | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('<YOUR_PROJECT_ID>'); // Your project ID | ||
|
||
const backups = new Backups(client); | ||
|
||
const result = await backups.getRestoration( | ||
'<RESTORATION_ID>' // restorationId | ||
); | ||
|
||
console.log(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { Client, Backups } from "@appwrite.io/console"; | ||
|
||
const client = new Client() | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('<YOUR_PROJECT_ID>'); // Your project ID | ||
|
||
const backups = new Backups(client); | ||
|
||
const result = await backups.listArchives( | ||
[] // queries (optional) | ||
); | ||
|
||
console.log(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { Client, Backups } from "@appwrite.io/console"; | ||
|
||
const client = new Client() | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('<YOUR_PROJECT_ID>'); // Your project ID | ||
|
||
const backups = new Backups(client); | ||
|
||
const result = await backups.listPolicies( | ||
[] // queries (optional) | ||
); | ||
|
||
console.log(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { Client, Backups } from "@appwrite.io/console"; | ||
|
||
const client = new Client() | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('<YOUR_PROJECT_ID>'); // Your project ID | ||
|
||
const backups = new Backups(client); | ||
|
||
const result = await backups.listRestorations( | ||
[] // queries (optional) | ||
); | ||
|
||
console.log(result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { Client, Backups } from "@appwrite.io/console"; | ||
|
||
const client = new Client() | ||
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint | ||
.setProject('<YOUR_PROJECT_ID>'); // Your project ID | ||
|
||
const backups = new Backups(client); | ||
|
||
const result = await backups.updatePolicy( | ||
'<POLICY_ID>', // policyId | ||
'<NAME>', // name (optional) | ||
1, // retention (optional) | ||
'', // schedule (optional) | ||
false // enabled (optional) | ||
); | ||
|
||
console.log(result); |
Oops, something went wrong.