Skip to content

Commit

Permalink
Merge pull request #18 from appwrite/backups
Browse files Browse the repository at this point in the history
Backups
  • Loading branch information
abnegate authored Oct 10, 2024
2 parents 9b464d1 + fae0fb2 commit 523c2e5
Show file tree
Hide file tree
Showing 71 changed files with 3,808 additions and 40 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/autoclose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ jobs:
auto_close:
uses: appwrite/.github/.github/workflows/autoclose.yml@main
secrets:
GH_AUTO_CLOSE_PR_TOKEN: ${{ secrets.GH_AUTO_CLOSE_PR_TOKEN }}
GH_AUTO_CLOSE_PR_TOKEN: ${{ secrets.GH_AUTO_CLOSE_PR_TOKEN }}
32 changes: 0 additions & 32 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import { Client, Account } from "@appwrite.io/console";
To install with a CDN (content delivery network) add the following scripts to the bottom of your <body> tag, but before you use any Appwrite services:

```html
<script src="https://cdn.jsdelivr.net/npm/@appwrite.io/console@1.2.2"></script>
<script src="https://cdn.jsdelivr.net/npm/@appwrite.io/console@1.3.2"></script>
```


Expand Down
11 changes: 11 additions & 0 deletions docs/examples/account/create-payment-method.md
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);
13 changes: 13 additions & 0 deletions docs/examples/account/delete-payment-method.md
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);
13 changes: 13 additions & 0 deletions docs/examples/account/get-billing-address.md
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);
13 changes: 13 additions & 0 deletions docs/examples/account/get-payment-method.md
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);
13 changes: 13 additions & 0 deletions docs/examples/account/list-billing-addresses.md
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);
14 changes: 14 additions & 0 deletions docs/examples/account/list-credits.md
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);
13 changes: 13 additions & 0 deletions docs/examples/account/list-invoices.md
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);
13 changes: 13 additions & 0 deletions docs/examples/account/list-payment-methods.md
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 docs/examples/account/update-payment-method-mandate-options.md
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);
15 changes: 15 additions & 0 deletions docs/examples/account/update-payment-method-provider.md
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);
15 changes: 15 additions & 0 deletions docs/examples/account/update-payment-method.md
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);
14 changes: 14 additions & 0 deletions docs/examples/backups/create-archive.md
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);
19 changes: 19 additions & 0 deletions docs/examples/backups/create-policy.md
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);
16 changes: 16 additions & 0 deletions docs/examples/backups/create-restoration.md
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);
13 changes: 13 additions & 0 deletions docs/examples/backups/delete-archive.md
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);
13 changes: 13 additions & 0 deletions docs/examples/backups/delete-policy.md
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);
13 changes: 13 additions & 0 deletions docs/examples/backups/get-archive.md
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);
13 changes: 13 additions & 0 deletions docs/examples/backups/get-policy.md
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);
13 changes: 13 additions & 0 deletions docs/examples/backups/get-restoration.md
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);
13 changes: 13 additions & 0 deletions docs/examples/backups/list-archives.md
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);
13 changes: 13 additions & 0 deletions docs/examples/backups/list-policies.md
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);
13 changes: 13 additions & 0 deletions docs/examples/backups/list-restorations.md
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);
17 changes: 17 additions & 0 deletions docs/examples/backups/update-policy.md
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);
Loading

0 comments on commit 523c2e5

Please sign in to comment.