From be1e681aa8950b90e3f09d7f1ed8cc4450792585 Mon Sep 17 00:00:00 2001 From: Atharva Deosthale Date: Mon, 29 Sep 2025 16:44:11 +0530 Subject: [PATCH] init payments --- .env | 3 +- INSTRUCTIONS.md | 237 ++ TEMP_SCHEMA.md | 688 ++++++ app/config/collections.php | 3 +- app/config/collections/auth_plans.php | 227 ++ app/config/collections/common.php | 109 + app/config/collections/platform.php | 66 + app/config/services.php | 13 + app/config/specs/open-api3-latest-client.json | 475 +++- .../specs/open-api3-latest-console.json | 1951 ++++++++++++---- app/config/specs/open-api3-latest-server.json | 1082 ++++++--- app/config/specs/swagger2-latest-client.json | 489 +++- app/config/specs/swagger2-latest-console.json | 1966 +++++++++++++---- app/config/specs/swagger2-latest-server.json | 1096 ++++++--- app/controllers/api/account.php | 333 +++ app/controllers/api/auth-plans.php | 388 ++++ app/controllers/api/projects.php | 182 +- app/controllers/api/users.php | 176 +- app/controllers/general.php | 61 +- docker-compose.yml | 1 + .../Exception/SubscriptionException.php | 13 + .../Auth/Subscription/StripeService.php | 854 +++++++ src/Appwrite/Auth/Validator/PlanData.php | 78 + src/Appwrite/Auth/Validator/StripeKey.php | 58 + .../Auth/Validator/SubscriptionStatus.php | 58 + src/Appwrite/Extend/Exception.php | 1 + src/Appwrite/Utopia/Response/Model/User.php | 14 + 27 files changed, 8999 insertions(+), 1623 deletions(-) create mode 100644 INSTRUCTIONS.md create mode 100644 TEMP_SCHEMA.md create mode 100644 app/config/collections/auth_plans.php create mode 100644 app/controllers/api/auth-plans.php create mode 100644 src/Appwrite/Auth/Subscription/Exception/SubscriptionException.php create mode 100644 src/Appwrite/Auth/Subscription/StripeService.php create mode 100644 src/Appwrite/Auth/Validator/PlanData.php create mode 100644 src/Appwrite/Auth/Validator/StripeKey.php create mode 100644 src/Appwrite/Auth/Validator/SubscriptionStatus.php diff --git a/.env b/.env index 4d7c038a6b..500fcad8d4 100644 --- a/.env +++ b/.env @@ -123,4 +123,5 @@ _APP_MESSAGE_PUSH_TEST_DSN= _APP_WEBHOOK_MAX_FAILED_ATTEMPTS=10 _APP_PROJECT_REGIONS=default _APP_FUNCTIONS_CREATION_ABUSE_LIMIT=5000 -_APP_STATS_USAGE_DUAL_WRITING_DBS=database_db_main \ No newline at end of file +_APP_STATS_USAGE_DUAL_WRITING_DBS=database_db_main +_APP_AUTH_STRIPE_WEBHOOK_URL=https://1f9644c53fc9.ngrok-free.app/v1/webhooks/stripe/auth/:projectId \ No newline at end of file diff --git a/INSTRUCTIONS.md b/INSTRUCTIONS.md new file mode 100644 index 0000000000..07c22994d9 --- /dev/null +++ b/INSTRUCTIONS.md @@ -0,0 +1,237 @@ +This is Appwrite backend. I want to develop a new feature into it. + +This feature is inspired by Clerk Billing and BetterAuth Payment Plugins, where your auth is associated with plans. You can add plans and set a price for them. The users can then just purchase the plan. + +I want to add such functionality to the Auth product of Appwrite. The setup for a project should be to input a Stripe secret key, which will then set the stripe account up with necessary stuff, like webhooks, etc. Store this key in the DB, I don't know where such stuff is stored about the project, but find it. + +Then, setup a webhook using the stripe API and point towards a webhook endpoint that you'll create. Process should be automatic and frictionless. + +The the project owner should be able to set plans. Plan should have options like plan name, ID, default (true/false) which should be true for the first one and if default is true, everyone gets the plan if it's the free one. First plan should be the free one. + +The products should immediately be created on Stripe. Keep track of product ID in internal DB. + +Then user can add more plans. The currency should be auto fetched using the key. + +Then add API routes for people to create checkout URLs to subscribe. + +Make sure you have CRUD because this needs to later reflect on console. Every route you create, create a schema in a TEMP_SCHEMA.md file. + +Write no comments in code. + +No summaries at end of message + +## IMPLEMENTATION PLAN + +### Phase 1: Database Schema & Collections + +1. **Extend Projects Collection** + - Add subscription configuration to existing projects collection + - New fields in `app/config/collections/projects.php`: + - `authStripeSecretKey`: Encrypted Stripe secret key + - `authStripePublishableKey`: Stripe publishable key + - `authStripeWebhookSecret`: Webhook endpoint secret + - `authStripeWebhookEndpointId`: Stripe webhook endpoint ID + - `authStripeCurrency`: Default currency (auto-detected from Stripe account) + - `authSubscriptionsEnabled`: Boolean flag + +2. **Auth Plans Collection** (`auth_plans`) + - Store plan definitions tied to auth + - Fields: + - `projectId`: Reference to project + - `planId`: Unique plan identifier + - `name`: Plan display name + - `description`: Plan description + - `stripePriceId`: Stripe price ID + - `stripeProductId`: Stripe product ID + - `price`: Amount in cents + - `currency`: Currency code + - `interval`: billing interval (month/year) + - `features`: JSON array of features + - `isDefault`: Boolean (first plan defaults to true) + - `isFree`: Boolean (free tier flag) + - `maxUsers`: User limit (null for unlimited) + - `active`: Boolean status + - `createdAt`, `updatedAt`: Timestamps + +3. **Extend Users Collection** + - Add subscription fields to existing users collection + - New fields: + - `planId`: Current plan ID + - `stripeCustomerId`: Stripe customer ID + - `stripeSubscriptionId`: Stripe subscription ID + - `subscriptionStatus`: Status (active/canceled/past_due/trialing/none) + - `subscriptionCurrentPeriodStart`: Period start + - `subscriptionCurrentPeriodEnd`: Period end + - `subscriptionCancelAtPeriodEnd`: Boolean for pending cancellation + - `subscriptionTrialEnd`: Trial end date (if applicable) + +### Phase 2: API Routes Structure (Integrated into Auth) + +1. **Project Auth Configuration** (extend `/v1/projects/{projectId}`) + - `PUT /auth/subscriptions` - Configure Stripe for auth subscriptions + - `GET /auth/subscriptions` - Get subscription configuration + - `DELETE /auth/subscriptions` - Remove subscription configuration + +2. **Auth Plans Management** (`/v1/projects/{projectId}/auth/plans`) + - `POST /` - Create new auth plan (auto-creates Stripe product/price) + - `GET /` - List all auth plans + - `GET /{planId}` - Get specific plan details + - `PUT /{planId}` - Update plan (metadata only) + - `DELETE /{planId}` - Deactivate plan + +3. **User Auth Subscription** (extend `/v1/account` and `/v1/users`) + - `GET /subscription` - Get current user's subscription + - `POST /subscription/checkout` - Create Stripe checkout session URL + - `POST /subscription/portal` - Create customer portal session URL + - `PUT /subscription` - Update subscription (change plan) + - `DELETE /subscription` - Cancel subscription + +4. **Webhook Handler** (`/v1/webhooks/stripe/auth`) + - `POST /` - Handle Stripe webhook events for auth subscriptions + - Events to handle: + - `checkout.session.completed` + - `customer.subscription.created` + - `customer.subscription.updated` + - `customer.subscription.deleted` + - `invoice.payment_failed` + - `invoice.payment_succeeded` + +### Phase 3: Core Implementation Components + +1. **Auth Subscription Service** (`src/Appwrite/Auth/Subscription/StripeService.php`) + - Manage Stripe API interactions for auth subscriptions + - Methods: + - `initializeAccount()` - Setup webhook, validate key + - `createProduct()` - Create Stripe product + - `createPrice()` - Create Stripe price + - `createCheckoutSession()` - Generate checkout URL + - `createPortalSession()` - Generate customer portal URL + - `handleWebhook()` - Process webhook events + - `syncSubscriptionStatus()` - Update user subscription state + +2. **Auth Subscription Validators** + - `src/Appwrite/Auth/Validator/StripeKey.php` - Validate Stripe keys + - `src/Appwrite/Auth/Validator/PlanData.php` - Validate plan creation + - `src/Appwrite/Auth/Validator/SubscriptionStatus.php` - Validate status updates + +3. **Permission & Access Control** + - Plan management: Project owners/admins only + - Subscription viewing: User can view own subscription + - Checkout creation: Authenticated users + - Webhook processing: Stripe signature verification + +### Phase 4: Integration Points + +1. **User Authentication Flow** + - Check subscription status on login + - Assign default free plan on user registration if no plan exists + - Apply plan-based permissions and limits + - Include plan details in JWT tokens + +2. **Account Endpoints Integration** + - Extend `/v1/account` response to include subscription details + - Add subscription info to user sessions + - Plan-based rate limiting + +3. **User Management Integration** + - Show subscription status in user details + - Allow admins to view/manage user subscriptions + - Bulk subscription operations for teams + +### Phase 5: Security Considerations + +1. **Encryption** + - Stripe keys encrypted at rest using project encryption key + - Webhook secrets stored encrypted + - No sensitive data in logs + +2. **Validation** + - Webhook signature verification mandatory + - Rate limiting on checkout creation + - CSRF protection on auth subscription endpoints + +3. **Permissions** + - Project-level isolation of subscription data + - User can only manage own subscriptions + - Admin override capabilities + +### Phase 6: Error Handling & Recovery + +1. **Webhook Failures** + - Implement retry mechanism + - Dead letter queue for failed events + - Manual sync capability + +2. **Subscription Failures** + - Grace period implementation + - Notification system integration + - Automatic retry logic + +3. **Plan Migration** + - Handle upgrades/downgrades + - Proration calculation + - Feature access transitions + +### Phase 7: Testing Strategy + +1. **Unit Tests** + - Stripe service methods + - Validators + - Database operations + +2. **Integration Tests** + - Webhook processing + - Checkout flow + - Subscription lifecycle + +3. **End-to-End Tests** + - Complete signup with subscription + - Plan changes + - Cancellation flow + +### Implementation Order + +1. Database schema creation (collections) +2. Stripe service class implementation +3. Project auth subscription configuration endpoints +4. Plan management endpoints +5. Webhook handler implementation +6. User subscription endpoints +7. Integration with auth system +8. Testing and validation +9. Documentation and examples + +### File Structure + +``` +app/ + config/ + collections/ + (extend projects.php - add auth subscription fields) + auth_plans.php (new - auth plans collection) + controllers/ + api/ + (extend account.php - add subscription endpoints) + (extend users.php - add subscription management) + (extend projects.php - add auth/plans endpoints) + +src/ + Appwrite/ + Auth/ + Subscription/ + StripeService.php + Exception/ + SubscriptionException.php + Validator/ + StripeKey.php + PlanData.php + SubscriptionStatus.php +``` + +### Environment Variables + +``` +_APP_AUTH_SUBSCRIPTIONS_ENABLED=true +_APP_AUTH_STRIPE_WEBHOOK_URL=https://[domain]/v1/webhooks/stripe/auth +_APP_ENCRYPTION_KEY=[existing project encryption key] +``` diff --git a/TEMP_SCHEMA.md b/TEMP_SCHEMA.md new file mode 100644 index 0000000000..98a87b467e --- /dev/null +++ b/TEMP_SCHEMA.md @@ -0,0 +1,688 @@ +# Appwrite Auth Subscriptions API Schema + +## Project Auth Configuration Endpoints + +### 1. Configure Stripe for Auth Subscriptions + +`PUT /v1/projects/{projectId}/auth/subscriptions` + +**Description:** Initialize Stripe integration for auth subscriptions. Automatically creates webhook endpoint in Stripe and stores configuration. + +**Authentication:** Admin API Key + +**Path Parameters:** +| Parameter | Type | Description | Required | +|-----------|------|-------------|----------| +| projectId | string | Project unique ID | Yes | + +**Request Body:** +| Field | Type | Description | Required | Validation | +|-------|------|-------------|----------|------------| +| stripeSecretKey | string | Stripe secret API key | Yes | Must match pattern: `sk_(test\|live)_[0-9a-zA-Z]{24,}` | + +**Response (200 OK):** + +```json +{ + "$id": "5e5ea5c16897e", + "$createdAt": "2020-10-15T06:38:00.000+00:00", + "$updatedAt": "2020-10-15T06:38:00.000+00:00", + "name": "My Project", + "teamId": "5e5ea5c16897f", + // ... other project fields ... + "authSubscriptionsEnabled": true, + "authStripeSecretKey": "sk_test_...", // encrypted in DB + "authStripePublishableKey": "pk_test_...", + "authStripeWebhookSecret": "whsec_...", // encrypted in DB + "authStripeWebhookEndpointId": "we_1234567890", + "authStripeCurrency": "usd" +} +``` + +**Errors:** + +- `400` - Invalid Stripe key format +- `401` - Unauthorized (invalid API key) +- `404` - Project not found +- `500` - Failed to connect to Stripe or create webhook + +--- + +### 2. Get Auth Subscription Configuration + +`GET /v1/projects/{projectId}/auth/subscriptions` + +**Description:** Retrieve current auth subscription configuration for the project. + +**Authentication:** Admin API Key + +**Path Parameters:** +| Parameter | Type | Description | Required | +|-----------|------|-------------|----------| +| projectId | string | Project unique ID | Yes | + +**Response (200 OK):** + +```json +{ + "enabled": true, + "publishableKey": "pk_test_51ABC...", + "currency": "usd" +} +``` + +**Errors:** + +- `401` - Unauthorized +- `404` - Project not found + +--- + +### 3. Remove Auth Subscription Configuration + +`DELETE /v1/projects/{projectId}/auth/subscriptions` + +**Description:** Remove Stripe configuration and disable auth subscriptions for the project. + +**Authentication:** Admin API Key + +**Path Parameters:** +| Parameter | Type | Description | Required | +|-----------|------|-------------|----------| +| projectId | string | Project unique ID | Yes | + +**Response (200 OK):** Updated project object with null subscription fields + +**Errors:** + +- `401` - Unauthorized +- `404` - Project not found + +--- + +## Auth Plans Management Endpoints + +### 4. Create Auth Plan + +`POST /v1/projects/{projectId}/auth/plans` + +**Description:** Create a new subscription plan. Automatically creates corresponding product and price in Stripe for paid plans. + +**Authentication:** Admin API Key + +**Path Parameters:** +| Parameter | Type | Description | Required | +|-----------|------|-------------|----------| +| projectId | string | Project unique ID | Yes | + +**Request Body:** +| Field | Type | Description | Required | Default | Validation | +|-------|------|-------------|----------|---------|------------| +| planId | string | Unique plan identifier | Yes | - | Max 128 chars, alphanumeric + hyphen/underscore | +| name | string | Plan display name | Yes | - | Max 128 chars | +| price | integer | Price in cents (e.g., 999 = $9.99) | Yes | 0 | Min 0 | +| currency | string | ISO 4217 currency code | Yes | - | 3 letter code (e.g., usd, eur) | +| interval | string | Billing interval | No | null | `month`, `year`, `week`, `day` | +| description | string | Plan description | No | "" | Max 256 chars | +| features | array | List of plan features | No | [] | Array of strings, max 256 chars each | +| maxUsers | integer | Max users allowed on plan | No | null | Min 1, null = unlimited | +| isDefault | boolean | Set as default plan for new users | No | false | Only one plan can be default | +| isFree | boolean | Mark as free tier | No | false | Free plans don't create Stripe products | + +**Response (201 Created):** + +```json +{ + "$id": "64a5f8e7c3d2a", + "$createdAt": "2024-01-15T10:30:00.000+00:00", + "$updatedAt": "2024-01-15T10:30:00.000+00:00", + "projectInternalId": "64a5f8e7c3d2b", + "projectId": "my-project", + "planId": "premium", + "name": "Premium Plan", + "description": "Our best plan with all features", + "stripeProductId": "prod_ABC123", + "stripePriceId": "price_DEF456", + "price": 2999, + "currency": "usd", + "interval": "month", + "features": ["Unlimited users", "Priority support", "Advanced analytics"], + "isDefault": false, + "isFree": false, + "maxUsers": null, + "active": true, + "search": "premium Premium Plan Our best plan with all features" +} +``` + +**Errors:** + +- `400` - Auth subscriptions not configured for project +- `400` - Invalid plan data +- `401` - Unauthorized +- `404` - Project not found +- `409` - Plan ID already exists +- `500` - Failed to create Stripe product/price + +--- + +### 5. List Auth Plans + +`GET /v1/projects/{projectId}/auth/plans` + +**Description:** List all subscription plans for the project. + +**Authentication:** Admin API Key + +**Path Parameters:** +| Parameter | Type | Description | Required | +|-----------|------|-------------|----------| +| projectId | string | Project unique ID | Yes | + +**Query Parameters:** +| Parameter | Type | Description | Required | Default | +|-----------|------|-------------|----------|---------| +| queries[] | array | Query filters | No | [] | + +**Available Query Filters:** + +- `Query::equal('active', [true])` - Only active plans +- `Query::equal('isFree', [true])` - Only free plans +- `Query::equal('isDefault', [true])` - Only default plan +- `Query::orderAsc('price')` - Sort by price ascending +- `Query::orderDesc('price')` - Sort by price descending +- `Query::limit(25)` - Limit results +- `Query::offset(0)` - Pagination offset + +**Response (200 OK):** + +```json +{ + "total": 3, + "plans": [ + { + "$id": "64a5f8e7c3d2a", + "planId": "free", + "name": "Free Plan", + "price": 0, + "isFree": true, + "isDefault": true + // ... other plan fields + }, + { + "$id": "64a5f8e7c3d2b", + "planId": "basic", + "name": "Basic Plan", + "price": 999 + // ... other plan fields + } + ] +} +``` + +**Errors:** + +- `401` - Unauthorized +- `404` - Project not found + +--- + +### 6. Get Auth Plan + +`GET /v1/projects/{projectId}/auth/plans/{planId}` + +**Description:** Get details of a specific subscription plan. + +**Authentication:** Admin API Key + +**Path Parameters:** +| Parameter | Type | Description | Required | +|-----------|------|-------------|----------| +| projectId | string | Project unique ID | Yes | +| planId | string | Plan ID | Yes | + +**Response (200 OK):** Plan object (same as create response) + +**Errors:** + +- `401` - Unauthorized +- `404` - Project not found +- `404` - Plan not found + +--- + +### 7. Update Auth Plan + +`PUT /v1/projects/{projectId}/auth/plans/{planId}` + +**Description:** Update plan metadata. Note: Cannot update price, currency, or interval after creation. + +**Authentication:** Admin API Key + +**Path Parameters:** +| Parameter | Type | Description | Required | +|-----------|------|-------------|----------| +| projectId | string | Project unique ID | Yes | +| planId | string | Plan ID | Yes | + +**Request Body:** +| Field | Type | Description | Required | +|-------|------|-------------|----------| +| name | string | Plan display name | No | +| description | string | Plan description | No | +| features | array | List of plan features | No | +| maxUsers | integer | Max users allowed | No | +| isDefault | boolean | Set as default plan | No | + +**Response (200 OK):** Updated plan object + +**Errors:** + +- `401` - Unauthorized +- `404` - Project not found +- `404` - Plan not found + +--- + +### 8. Delete Auth Plan + +`DELETE /v1/projects/{projectId}/auth/plans/{planId}` + +**Description:** Soft delete a plan (sets active=false). Users on this plan keep it but new users can't subscribe. + +**Authentication:** Admin API Key + +**Path Parameters:** +| Parameter | Type | Description | Required | +|-----------|------|-------------|----------| +| projectId | string | Project unique ID | Yes | +| planId | string | Plan ID | Yes | + +**Response (204 No Content):** Empty response + +**Errors:** + +- `401` - Unauthorized +- `404` - Project not found +- `404` - Plan not found + +--- + +## User Subscription Endpoints + +### 9. Get Account Subscription + +`GET /v1/account/subscription` + +**Description:** Get current user's subscription details. + +**Authentication:** Session or JWT + +**Response (200 OK):** + +```json +{ + "planId": "premium", + "planName": "Premium Plan", + "status": "active", + "currentPeriodStart": "2024-01-01T00:00:00.000+00:00", + "currentPeriodEnd": "2024-02-01T00:00:00.000+00:00", + "cancelAtPeriodEnd": false, + "trialEnd": null +} +``` + +**Status Values:** + +- `none` - No subscription +- `active` - Subscription is active +- `canceled` - Subscription canceled (may still be active until period end) +- `incomplete` - First payment pending +- `incomplete_expired` - First payment failed +- `past_due` - Payment failed, retrying +- `trialing` - In trial period +- `unpaid` - Subscription suspended due to non-payment +- `paused` - Subscription paused + +**Errors:** + +- `401` - Unauthorized + +--- + +### 10. Create Checkout Session + +`POST /v1/account/subscription/checkout` + +**Description:** Create a Stripe Checkout session to subscribe to a plan. + +**Authentication:** Session or JWT + +**Request Body:** +| Field | Type | Description | Required | Validation | +|-------|------|-------------|----------|------------| +| planId | string | Plan to subscribe to | Yes | Must be active plan | +| successUrl | string | URL to redirect after success | Yes | Valid URL | +| cancelUrl | string | URL to redirect on cancel | Yes | Valid URL | + +**Response (200 OK):** + +```json +{ + "checkoutUrl": "https://checkout.stripe.com/c/pay/cs_test_a1b2c3..." +} +``` + +**Errors:** + +- `400` - Subscriptions not enabled for project +- `400` - Cannot checkout for free plan +- `401` - Unauthorized +- `404` - Plan not found +- `500` - Failed to create checkout session + +--- + +### 11. Create Customer Portal Session + +`POST /v1/account/subscription/portal` + +**Description:** Create a Stripe Customer Portal session for billing management. + +**Authentication:** Session or JWT + +**Request Body:** +| Field | Type | Description | Required | +|-------|------|-------------|----------| +| returnUrl | string | URL to return to after portal | Yes | + +**Response (200 OK):** + +```json +{ + "portalUrl": "https://billing.stripe.com/p/session/test_YWNjdF8..." +} +``` + +**Errors:** + +- `400` - Subscriptions not enabled +- `400` - No active subscription found +- `401` - Unauthorized +- `500` - Failed to create portal session + +--- + +### 11.a Assign Plan to User (Admin) + +`POST /v1/users/{userId}/plan` + +**Description:** Manually assign a plan to a user from the admin panel. Optionally creates a complimentary Stripe subscription for one billing interval and auto-cancels at period end. The plan is applied immediately without payment. + +**Authentication:** Admin API Key + +**Path Parameters:** +| Parameter | Type | Description | Required | +|-----------|------|-------------|----------| +| userId | string | User ID | Yes | + +**Request Body:** +| Field | Type | Description | Required | Default | +|-------|------|-------------|----------|---------| +| planId | string | Plan ID to assign | Yes | - | +| complimentary | boolean | Create complimentary Stripe subscription for one billing interval | No | true | + +**Behavior:** + +- Sets `user.planId` and subscription fields immediately: + - `subscriptionStatus: 'active'` + - `subscriptionCurrentPeriodStart`: now + - `subscriptionCurrentPeriodEnd`: now + plan interval + - `subscriptionCancelAtPeriodEnd: true` + - `subscriptionTrialEnd`: end of the complimentary period +- If `complimentary=true`, plan is paid, and subscriptions are enabled: + - Ensures Stripe customer exists + - Creates trial subscription for one interval and schedules cancel at period end + +**Response (200 OK):** Updated user object (includes embedded `plan`) + +**Errors:** + +- `400` - Subscriptions not enabled (only for paid complimentary) +- `401` - Unauthorized + |- `404` - User or Plan not found +- `500` - Stripe error while creating complimentary subscription + +--- + +### 12. Update Subscription + +`PUT /v1/account/subscription` + +**Description:** Change subscription plan (upgrade/downgrade). + +**Authentication:** Session or JWT + +**Request Body:** +| Field | Type | Description | Required | +|-------|------|-------------|----------| +| planId | string | New plan ID | Yes | + +**Response (200 OK):** + +```json +{ + "success": true +} +``` + +**Notes:** + +- Upgrades happen immediately with proration +- Downgrades happen at period end by default +- Cannot change to/from free plans via this endpoint + +**Errors:** + +- `400` - Subscriptions not enabled +- `400` - No active subscription +- `401` - Unauthorized +- `404` - Plan not found +- `500` - Failed to update subscription + +--- + +### 13. Cancel Subscription + +`DELETE /v1/account/subscription` + +**Description:** Cancel current subscription. + +**Authentication:** Session or JWT + +**Query Parameters:** +| Parameter | Type | Description | Required | Default | +|-----------|------|-------------|----------|---------| +| atPeriodEnd | boolean | Cancel at period end vs immediately | No | true | + +**Response (200 OK):** + +```json +{ + "success": true, + "cancelAtPeriodEnd": true +} +``` + +**Errors:** + +- `400` - Subscriptions not enabled +- `400` - No active subscription +- `401` - Unauthorized +- `500` - Failed to cancel subscription + +--- + +## Webhook Handler + +### 14. Stripe Webhook Handler + +`POST /v1/webhooks/stripe/auth` + +**Description:** Handle Stripe webhook events for subscription lifecycle. + +**Authentication:** Stripe webhook signature + +**Headers:** +| Header | Description | Required | +|--------|-------------|----------| +| stripe-signature | Stripe webhook signature for verification | Yes | + +**Request Body:** Raw Stripe event JSON + +**Response (200 OK):** + +```json +{ + "success": true +} +``` + +**Handled Events:** + +| Event | Description | Actions | +| ------------------------------- | ------------------------ | -------------------------------------------------- | +| `checkout.session.completed` | Checkout successful | Create customer, update user with subscription IDs | +| `customer.subscription.created` | New subscription created | Sync subscription status to user | +| `customer.subscription.updated` | Subscription changed | Update user's plan and status | +| `customer.subscription.deleted` | Subscription canceled | Remove subscription, assign default free plan | +| `invoice.payment_failed` | Payment failed | Update status to `past_due` | +| `invoice.payment_succeeded` | Payment successful | Update status to `active` | + +**Errors:** + +- `400` - Missing Stripe signature +- `400` - Invalid webhook payload +- `403` - Invalid signature +- `404` - Project not found +- `500` - Processing error + +--- + +## Database Schema + +### Projects Collection Extensions + +| Field | Type | Description | Encrypted | +| --------------------------- | ------- | ------------------------------------ | --------- | +| authSubscriptionsEnabled | boolean | Whether subscriptions are enabled | No | +| authStripeSecretKey | string | Stripe secret API key | Yes | +| authStripePublishableKey | string | Stripe publishable key | No | +| authStripeWebhookSecret | string | Webhook endpoint secret | Yes | +| authStripeWebhookEndpointId | string | Stripe webhook endpoint ID | No | +| authStripeCurrency | string | Default currency from Stripe account | No | + +### Auth Plans Collection + +| Field | Type | Description | Index | Unique | +| ----------------- | ----------- | ----------------------------- | -------- | -------------- | +| $id | string | Document ID | Primary | Yes | +| projectInternalId | string | Internal project reference | Yes | No | +| projectId | string | Project ID | Yes | No | +| planId | string | Plan identifier | Yes | With projectId | +| name | string(128) | Plan display name | No | No | +| description | string(256) | Plan description | No | No | +| stripeProductId | string(256) | Stripe product ID | No | No | +| stripePriceId | string(256) | Stripe price ID | No | No | +| price | integer | Price in cents | No | No | +| currency | string(3) | ISO 4217 currency code | No | No | +| interval | string(10) | Billing interval | No | No | +| features | array | JSON array of features | No | No | +| isDefault | boolean | Default plan flag | Yes | No | +| isFree | boolean | Free tier flag | No | No | +| maxUsers | integer | User limit (null = unlimited) | No | No | +| active | boolean | Active status | Yes | No | +| search | string | Full-text search field | Fulltext | No | +| $createdAt | datetime | Creation timestamp | No | No | +| $updatedAt | datetime | Last update timestamp | No | No | + +**Indexes:** + +- `_key_project`: projectId +- `_key_project_planId`: projectId + planId (unique) +- `_key_project_default`: projectId + isDefault +- `_key_project_active`: projectId + active +- `_fulltext_search`: search + +### Users Collection Extensions + +| Field | Type | Description | Index | +| ------------------------------ | ----------- | ---------------------------- | ----- | +| planId | string | Current plan ID | Yes | +| stripeCustomerId | string(256) | Stripe customer ID | Yes | +| stripeSubscriptionId | string(256) | Stripe subscription ID | No | +| subscriptionStatus | string(20) | Subscription status | Yes | +| subscriptionCurrentPeriodStart | datetime | Current billing period start | No | +| subscriptionCurrentPeriodEnd | datetime | Current billing period end | No | +| subscriptionCancelAtPeriodEnd | boolean | Pending cancellation flag | No | +| subscriptionTrialEnd | datetime | Trial end date | No | + +**Indexes:** + +- `_key_planId`: planId +- `_key_stripeCustomerId`: stripeCustomerId +- `_key_subscriptionStatus`: subscriptionStatus + +--- + +## Implementation Notes + +### Security Considerations + +1. **API Key Storage**: Stripe secret keys are encrypted using project encryption key +2. **Webhook Verification**: All webhook requests verified using Stripe signature +3. **Permission Checks**: + - Project endpoints require admin API key + - User endpoints require authenticated session + - Webhook endpoint validates signature only + +### Rate Limiting + +- Checkout session creation: 10 per minute per user +- Portal session creation: 5 per minute per user +- Subscription updates: 10 per hour per user + +### Error Handling + +All errors follow Appwrite's standard error format: + +```json +{ + "message": "Human readable error message", + "code": 400, + "type": "general_bad_request", + "version": "1.5.0" +} +``` + +### Stripe Integration Flow + +1. **Setup**: Admin configures Stripe key → Webhook created automatically +2. **Plan Creation**: Admin creates plan → Stripe product/price created +3. **User Subscription**: User initiates checkout → Redirected to Stripe +4. **Webhook Processing**: Stripe sends events → User record updated +5. **Management**: User uses portal or API → Subscription modified in Stripe + +### Migration Considerations + +- Existing users get `subscriptionStatus: 'none'` by default +- First plan marked as default automatically assigns to new users +- Free plan recommended as first/default plan + +### Testing + +Test mode keys (`sk_test_*`) recommended for development: + +- Use Stripe test cards for checkout +- Webhook events can be simulated via Stripe CLI +- Test and live keys stored separately diff --git a/app/config/collections.php b/app/config/collections.php index 533dee57a8..c812322c7a 100644 --- a/app/config/collections.php +++ b/app/config/collections.php @@ -5,6 +5,7 @@ $common = include __DIR__ . '/collections/common.php'; $projects = include __DIR__ . '/collections/projects.php'; $databases = include __DIR__ . '/collections/databases.php'; $platform = include __DIR__ . '/collections/platform.php'; +$authPlans = include __DIR__ . '/collections/auth_plans.php'; $logs = include __DIR__ . '/collections/logs.php'; // see - http.php#245 @@ -27,7 +28,7 @@ $collections = [ 'buckets' => $buckets, 'databases' => $databases, 'projects' => array_merge($projects, $common), - 'console' => array_merge($platform, $common), + 'console' => array_merge($platform, $authPlans, $common), 'logs' => $logs, ]; diff --git a/app/config/collections/auth_plans.php b/app/config/collections/auth_plans.php new file mode 100644 index 0000000000..4d736a21f2 --- /dev/null +++ b/app/config/collections/auth_plans.php @@ -0,0 +1,227 @@ + [ + '$collection' => ID::custom(Database::METADATA), + '$id' => ID::custom('auth_plans'), + 'name' => 'Auth Plans', + 'attributes' => [ + [ + '$id' => ID::custom('projectInternalId'), + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => Database::LENGTH_KEY, + 'signed' => true, + 'required' => true, + 'default' => null, + 'array' => false, + 'filters' => [], + ], + [ + '$id' => ID::custom('projectId'), + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => Database::LENGTH_KEY, + 'signed' => true, + 'required' => true, + 'default' => null, + 'array' => false, + 'filters' => [], + ], + [ + '$id' => ID::custom('planId'), + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => Database::LENGTH_KEY, + 'signed' => true, + 'required' => true, + 'default' => null, + 'array' => false, + 'filters' => [], + ], + [ + '$id' => ID::custom('name'), + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => 128, + 'signed' => true, + 'required' => true, + 'default' => null, + 'array' => false, + 'filters' => [], + ], + [ + '$id' => ID::custom('description'), + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => 256, + 'signed' => true, + 'required' => false, + 'default' => null, + 'array' => false, + 'filters' => [], + ], + [ + '$id' => ID::custom('stripePriceId'), + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => 256, + 'signed' => true, + 'required' => false, + 'default' => null, + 'array' => false, + 'filters' => [], + ], + [ + '$id' => ID::custom('stripeProductId'), + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => 256, + 'signed' => true, + 'required' => false, + 'default' => null, + 'array' => false, + 'filters' => [], + ], + [ + '$id' => ID::custom('price'), + 'type' => Database::VAR_INTEGER, + 'format' => '', + 'size' => 0, + 'signed' => false, + 'required' => true, + 'default' => 0, + 'array' => false, + 'filters' => [], + ], + [ + '$id' => ID::custom('currency'), + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => 3, + 'signed' => true, + 'required' => true, + 'default' => 'usd', + 'array' => false, + 'filters' => [], + ], + [ + '$id' => ID::custom('interval'), + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => 10, + 'signed' => true, + 'required' => false, + 'default' => null, + 'array' => false, + 'filters' => [], + ], + [ + '$id' => ID::custom('features'), + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => 16384, + 'signed' => true, + 'required' => false, + 'default' => [], + 'array' => false, + 'filters' => ['json'], + ], + [ + '$id' => ID::custom('isDefault'), + 'type' => Database::VAR_BOOLEAN, + 'signed' => true, + 'size' => 0, + 'format' => '', + 'filters' => [], + 'required' => false, + 'default' => false, + 'array' => false, + ], + [ + '$id' => ID::custom('isFree'), + 'type' => Database::VAR_BOOLEAN, + 'signed' => true, + 'size' => 0, + 'format' => '', + 'filters' => [], + 'required' => false, + 'default' => false, + 'array' => false, + ], + [ + '$id' => ID::custom('maxUsers'), + 'type' => Database::VAR_INTEGER, + 'format' => '', + 'size' => 0, + 'signed' => false, + 'required' => false, + 'default' => null, + 'array' => false, + 'filters' => [], + ], + [ + '$id' => ID::custom('active'), + 'type' => Database::VAR_BOOLEAN, + 'signed' => true, + 'size' => 0, + 'format' => '', + 'filters' => [], + 'required' => false, + 'default' => true, + 'array' => false, + ], + [ + '$id' => ID::custom('search'), + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => 16384, + 'signed' => true, + 'required' => false, + 'default' => null, + 'array' => false, + 'filters' => [], + ] + ], + 'indexes' => [ + [ + '$id' => ID::custom('_key_project'), + 'type' => Database::INDEX_KEY, + 'attributes' => ['projectId'], + 'lengths' => [Database::LENGTH_KEY], + 'orders' => [Database::ORDER_ASC], + ], + [ + '$id' => ID::custom('_key_project_planId'), + 'type' => Database::INDEX_UNIQUE, + 'attributes' => ['projectId', 'planId'], + 'lengths' => [Database::LENGTH_KEY, Database::LENGTH_KEY], + 'orders' => [Database::ORDER_ASC, Database::ORDER_ASC], + ], + [ + '$id' => ID::custom('_key_project_default'), + 'type' => Database::INDEX_KEY, + 'attributes' => ['projectId', 'isDefault'], + 'lengths' => [Database::LENGTH_KEY, 0], + 'orders' => [Database::ORDER_ASC, Database::ORDER_ASC], + ], + [ + '$id' => ID::custom('_key_project_active'), + 'type' => Database::INDEX_KEY, + 'attributes' => ['projectId', 'active'], + 'lengths' => [Database::LENGTH_KEY, 0], + 'orders' => [Database::ORDER_ASC, Database::ORDER_ASC], + ], + [ + '$id' => ID::custom('_fulltext_search'), + 'type' => Database::INDEX_FULLTEXT, + 'attributes' => ['search'], + 'lengths' => [], + 'orders' => [], + ], + ], + ], +]; \ No newline at end of file diff --git a/app/config/collections/common.php b/app/config/collections/common.php index 6de7eb224b..47f68728b3 100644 --- a/app/config/collections/common.php +++ b/app/config/collections/common.php @@ -364,6 +364,94 @@ return [ 'array' => false, 'filters' => ['datetime'], ], + [ + '$id' => ID::custom('planId'), + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => Database::LENGTH_KEY, + 'signed' => true, + 'required' => false, + 'default' => null, + 'array' => false, + 'filters' => [], + ], + [ + '$id' => ID::custom('stripeCustomerId'), + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => 256, + 'signed' => true, + 'required' => false, + 'default' => null, + 'array' => false, + 'filters' => [], + ], + [ + '$id' => ID::custom('stripeSubscriptionId'), + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => 256, + 'signed' => true, + 'required' => false, + 'default' => null, + 'array' => false, + 'filters' => [], + ], + [ + '$id' => ID::custom('subscriptionStatus'), + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => 20, + 'signed' => true, + 'required' => false, + 'default' => 'none', + 'array' => false, + 'filters' => [], + ], + [ + '$id' => ID::custom('subscriptionCurrentPeriodStart'), + 'type' => Database::VAR_DATETIME, + 'format' => '', + 'size' => 0, + 'signed' => false, + 'required' => false, + 'default' => null, + 'array' => false, + 'filters' => ['datetime'], + ], + [ + '$id' => ID::custom('subscriptionCurrentPeriodEnd'), + 'type' => Database::VAR_DATETIME, + 'format' => '', + 'size' => 0, + 'signed' => false, + 'required' => false, + 'default' => null, + 'array' => false, + 'filters' => ['datetime'], + ], + [ + '$id' => ID::custom('subscriptionCancelAtPeriodEnd'), + 'type' => Database::VAR_BOOLEAN, + 'signed' => true, + 'size' => 0, + 'format' => '', + 'filters' => [], + 'required' => false, + 'default' => false, + 'array' => false, + ], + [ + '$id' => ID::custom('subscriptionTrialEnd'), + 'type' => Database::VAR_DATETIME, + 'format' => '', + 'size' => 0, + 'signed' => false, + 'required' => false, + 'default' => null, + 'array' => false, + 'filters' => ['datetime'], + ], ], 'indexes' => [ [ @@ -436,6 +524,27 @@ return [ 'lengths' => [], 'orders' => [], ], + [ + '$id' => ID::custom('_key_planId'), + 'type' => Database::INDEX_KEY, + 'attributes' => ['planId'], + 'lengths' => [Database::LENGTH_KEY], + 'orders' => [Database::ORDER_ASC], + ], + [ + '$id' => ID::custom('_key_stripeCustomerId'), + 'type' => Database::INDEX_KEY, + 'attributes' => ['stripeCustomerId'], + 'lengths' => [256], + 'orders' => [Database::ORDER_ASC], + ], + [ + '$id' => ID::custom('_key_subscriptionStatus'), + 'type' => Database::INDEX_KEY, + 'attributes' => ['subscriptionStatus'], + 'lengths' => [20], + 'orders' => [Database::ORDER_ASC], + ], ], ], diff --git a/app/config/collections/platform.php b/app/config/collections/platform.php index b839e51622..fcc1631ff1 100644 --- a/app/config/collections/platform.php +++ b/app/config/collections/platform.php @@ -330,6 +330,72 @@ return [ 'default' => null, 'array' => false, 'filters' => ['datetime'], + ], + [ + '$id' => ID::custom('authSubscriptionsEnabled'), + 'type' => Database::VAR_BOOLEAN, + 'signed' => true, + 'size' => 0, + 'format' => '', + 'filters' => [], + 'required' => false, + 'default' => false, + 'array' => false, + ], + [ + '$id' => ID::custom('authStripeSecretKey'), + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => 512, + 'signed' => true, + 'required' => false, + 'default' => null, + 'array' => false, + 'filters' => ['encrypt'], + ], + [ + '$id' => ID::custom('authStripePublishableKey'), + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => 512, + 'signed' => true, + 'required' => false, + 'default' => null, + 'array' => false, + 'filters' => [], + ], + [ + '$id' => ID::custom('authStripeWebhookSecret'), + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => 512, + 'signed' => true, + 'required' => false, + 'default' => null, + 'array' => false, + 'filters' => ['encrypt'], + ], + [ + '$id' => ID::custom('authStripeWebhookEndpointId'), + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => 512, + 'signed' => true, + 'required' => false, + 'default' => null, + 'array' => false, + 'filters' => [], + ], + [ + '$id' => ID::custom('authStripeCurrency'), + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => 3, + 'signed' => true, + 'required' => false, + 'default' => null, + 'array' => false, + 'filters' => [], ] ], 'indexes' => [ diff --git a/app/config/services.php b/app/config/services.php index 5f8651e59f..e6f73d5f05 100644 --- a/app/config/services.php +++ b/app/config/services.php @@ -261,6 +261,19 @@ return [ 'optional' => false, 'icon' => '', ], + 'authPlans' => [ + 'key' => 'authPlans', + 'name' => 'Auth Plans', + 'subtitle' => 'The Auth Plans service allows you to manage subscription plans for authentication.', + 'description' => '', + 'controller' => 'api/auth-plans.php', + 'sdk' => false, + 'docs' => false, + 'docsUrl' => '', + 'tests' => false, + 'optional' => true, + 'icon' => '', + ], 'migrations' => [ 'key' => 'migrations', 'name' => 'Migrations', diff --git a/app/config/specs/open-api3-latest-client.json b/app/config/specs/open-api3-latest-client.json index d57b9f83b2..035e978d52 100644 --- a/app/config/specs/open-api3-latest-client.json +++ b/app/config/specs/open-api3-latest-client.json @@ -2872,6 +2872,342 @@ ] } }, + "\/account\/subscription": { + "get": { + "summary": "Get account subscription", + "operationId": "accountGetSubscription", + "tags": [ + "account" + ], + "description": false, + "responses": { + "200": { + "description": "Any", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/any" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getSubscription", + "group": "subscription", + "weight": 60, + "cookies": false, + "type": "", + "demo": "account\/get-subscription.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-subscription.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ] + }, + "put": { + "summary": "Update subscription", + "operationId": "accountUpdateSubscription", + "tags": [ + "account" + ], + "description": false, + "responses": { + "200": { + "description": "Any", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/any" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateSubscription", + "group": "subscription", + "weight": 63, + "cookies": false, + "type": "", + "demo": "account\/update-subscription.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-subscription.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "planId": { + "type": "string", + "description": "New plan ID.", + "x-example": "" + } + }, + "required": [ + "planId" + ] + } + } + } + } + }, + "delete": { + "summary": "Cancel subscription", + "operationId": "accountCancelSubscription", + "tags": [ + "account" + ], + "description": false, + "responses": { + "200": { + "description": "Any", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/any" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "cancelSubscription", + "group": "subscription", + "weight": 64, + "cookies": false, + "type": "", + "demo": "account\/cancel-subscription.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/cancel-subscription.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "atPeriodEnd": { + "type": "boolean", + "description": "Cancel at period end.", + "x-example": false + } + } + } + } + } + } + } + }, + "\/account\/subscription\/checkout": { + "post": { + "summary": "Create checkout session", + "operationId": "accountCreateSubscriptionCheckout", + "tags": [ + "account" + ], + "description": false, + "responses": { + "200": { + "description": "Any", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/any" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createSubscriptionCheckout", + "group": "subscription", + "weight": 61, + "cookies": false, + "type": "", + "demo": "account\/create-subscription-checkout.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-checkout.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "planId": { + "type": "string", + "description": "Plan ID to subscribe to.", + "x-example": "" + }, + "successUrl": { + "type": "string", + "description": "URL to redirect on success.", + "x-example": "https:\/\/example.com" + }, + "cancelUrl": { + "type": "string", + "description": "URL to redirect on cancel.", + "x-example": "https:\/\/example.com" + } + }, + "required": [ + "planId", + "successUrl", + "cancelUrl" + ] + } + } + } + } + } + }, + "\/account\/subscription\/portal": { + "post": { + "summary": "Create customer portal session", + "operationId": "accountCreateSubscriptionPortal", + "tags": [ + "account" + ], + "description": false, + "responses": { + "200": { + "description": "Any", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/any" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createSubscriptionPortal", + "group": "subscription", + "weight": 62, + "cookies": false, + "type": "", + "demo": "account\/create-subscription-portal.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-portal.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "returnUrl": { + "type": "string", + "description": "URL to return to.", + "x-example": "https:\/\/example.com" + } + }, + "required": [ + "returnUrl" + ] + } + } + } + } + } + }, "\/account\/targets\/push": { "post": { "summary": "Create push target", @@ -3753,7 +4089,7 @@ "x-appwrite": { "method": "getBrowser", "group": null, - "weight": 61, + "weight": 66, "cookies": false, "type": "location", "demo": "avatars\/get-browser.md", @@ -3879,7 +4215,7 @@ "x-appwrite": { "method": "getCreditCard", "group": null, - "weight": 60, + "weight": 65, "cookies": false, "type": "location", "demo": "avatars\/get-credit-card.md", @@ -4011,7 +4347,7 @@ "x-appwrite": { "method": "getFavicon", "group": null, - "weight": 64, + "weight": 69, "cookies": false, "type": "location", "demo": "avatars\/get-favicon.md", @@ -4069,7 +4405,7 @@ "x-appwrite": { "method": "getFlag", "group": null, - "weight": 62, + "weight": 67, "cookies": false, "type": "location", "demo": "avatars\/get-flag.md", @@ -4557,7 +4893,7 @@ "x-appwrite": { "method": "getImage", "group": null, - "weight": 63, + "weight": 68, "cookies": false, "type": "location", "demo": "avatars\/get-image.md", @@ -4639,7 +4975,7 @@ "x-appwrite": { "method": "getInitials", "group": null, - "weight": 66, + "weight": 71, "cookies": false, "type": "location", "demo": "avatars\/get-initials.md", @@ -4731,7 +5067,7 @@ "x-appwrite": { "method": "getQR", "group": null, - "weight": 65, + "weight": 70, "cookies": false, "type": "location", "demo": "avatars\/get-qr.md", @@ -4830,7 +5166,7 @@ "x-appwrite": { "method": "listDocuments", "group": "documents", - "weight": 335, + "weight": 349, "cookies": false, "type": "", "demo": "databases\/list-documents.md", @@ -4919,7 +5255,7 @@ "x-appwrite": { "method": "createDocument", "group": "documents", - "weight": 327, + "weight": 341, "cookies": false, "type": "", "demo": "databases\/create-document.md", @@ -5069,7 +5405,7 @@ "x-appwrite": { "method": "getDocument", "group": "documents", - "weight": 328, + "weight": 342, "cookies": false, "type": "", "demo": "databases\/get-document.md", @@ -5168,7 +5504,7 @@ "x-appwrite": { "method": "upsertDocument", "group": "documents", - "weight": 331, + "weight": 345, "cookies": false, "type": "", "demo": "databases\/upsert-document.md", @@ -5316,7 +5652,7 @@ "x-appwrite": { "method": "updateDocument", "group": "documents", - "weight": 329, + "weight": 343, "cookies": false, "type": "", "demo": "databases\/update-document.md", @@ -5419,7 +5755,7 @@ "x-appwrite": { "method": "deleteDocument", "group": "documents", - "weight": 333, + "weight": 347, "cookies": false, "type": "", "demo": "databases\/delete-document.md", @@ -5507,7 +5843,7 @@ "x-appwrite": { "method": "decrementDocumentAttribute", "group": "documents", - "weight": 338, + "weight": 352, "cookies": false, "type": "", "demo": "databases\/decrement-document-attribute.md", @@ -5626,7 +5962,7 @@ "x-appwrite": { "method": "incrementDocumentAttribute", "group": "documents", - "weight": 337, + "weight": 351, "cookies": false, "type": "", "demo": "databases\/increment-document-attribute.md", @@ -5745,7 +6081,7 @@ "x-appwrite": { "method": "listExecutions", "group": "executions", - "weight": 456, + "weight": 470, "cookies": false, "type": "", "demo": "functions\/list-executions.md", @@ -5820,7 +6156,7 @@ "x-appwrite": { "method": "createExecution", "group": "executions", - "weight": 454, + "weight": 468, "cookies": false, "type": "", "demo": "functions\/create-execution.md", @@ -5936,7 +6272,7 @@ "x-appwrite": { "method": "getExecution", "group": "executions", - "weight": 455, + "weight": 469, "cookies": false, "type": "", "demo": "functions\/get-execution.md", @@ -6010,7 +6346,7 @@ "x-appwrite": { "method": "query", "group": "graphql", - "weight": 250, + "weight": 259, "cookies": false, "type": "graphql", "demo": "graphql\/query.md", @@ -6062,7 +6398,7 @@ "x-appwrite": { "method": "mutation", "group": "graphql", - "weight": 249, + "weight": 258, "cookies": false, "type": "graphql", "demo": "graphql\/mutation.md", @@ -6114,7 +6450,7 @@ "x-appwrite": { "method": "get", "group": null, - "weight": 70, + "weight": 75, "cookies": false, "type": "", "demo": "locale\/get.md", @@ -6166,7 +6502,7 @@ "x-appwrite": { "method": "listCodes", "group": null, - "weight": 71, + "weight": 76, "cookies": false, "type": "", "demo": "locale\/list-codes.md", @@ -6218,7 +6554,7 @@ "x-appwrite": { "method": "listContinents", "group": null, - "weight": 75, + "weight": 80, "cookies": false, "type": "", "demo": "locale\/list-continents.md", @@ -6270,7 +6606,7 @@ "x-appwrite": { "method": "listCountries", "group": null, - "weight": 72, + "weight": 77, "cookies": false, "type": "", "demo": "locale\/list-countries.md", @@ -6322,7 +6658,7 @@ "x-appwrite": { "method": "listCountriesEU", "group": null, - "weight": 73, + "weight": 78, "cookies": false, "type": "", "demo": "locale\/list-countries-eu.md", @@ -6374,7 +6710,7 @@ "x-appwrite": { "method": "listCountriesPhones", "group": null, - "weight": 74, + "weight": 79, "cookies": false, "type": "", "demo": "locale\/list-countries-phones.md", @@ -6426,7 +6762,7 @@ "x-appwrite": { "method": "listCurrencies", "group": null, - "weight": 76, + "weight": 81, "cookies": false, "type": "", "demo": "locale\/list-currencies.md", @@ -6478,7 +6814,7 @@ "x-appwrite": { "method": "listLanguages", "group": null, - "weight": 77, + "weight": 82, "cookies": false, "type": "", "demo": "locale\/list-languages.md", @@ -6530,7 +6866,7 @@ "x-appwrite": { "method": "createSubscriber", "group": "subscribers", - "weight": 296, + "weight": 310, "cookies": false, "type": "", "demo": "messaging\/create-subscriber.md", @@ -6613,7 +6949,7 @@ "x-appwrite": { "method": "deleteSubscriber", "group": "subscribers", - "weight": 300, + "weight": 314, "cookies": false, "type": "", "demo": "messaging\/delete-subscriber.md", @@ -6688,7 +7024,7 @@ "x-appwrite": { "method": "listFiles", "group": "files", - "weight": 160, + "weight": 168, "cookies": false, "type": "", "demo": "storage\/list-files.md", @@ -6774,7 +7110,7 @@ "x-appwrite": { "method": "createFile", "group": "files", - "weight": 159, + "weight": 167, "cookies": false, "type": "upload", "demo": "storage\/create-file.md", @@ -6872,7 +7208,7 @@ "x-appwrite": { "method": "getFile", "group": "files", - "weight": 161, + "weight": 169, "cookies": false, "type": "", "demo": "storage\/get-file.md", @@ -6944,7 +7280,7 @@ "x-appwrite": { "method": "updateFile", "group": "files", - "weight": 166, + "weight": 174, "cookies": false, "type": "", "demo": "storage\/update-file.md", @@ -7033,7 +7369,7 @@ "x-appwrite": { "method": "deleteFile", "group": "files", - "weight": 167, + "weight": 175, "cookies": false, "type": "", "demo": "storage\/delete-file.md", @@ -7100,7 +7436,7 @@ "x-appwrite": { "method": "getFileDownload", "group": "files", - "weight": 163, + "weight": 171, "cookies": false, "type": "location", "demo": "storage\/get-file-download.md", @@ -7178,7 +7514,7 @@ "x-appwrite": { "method": "getFilePreview", "group": "files", - "weight": 162, + "weight": 170, "cookies": false, "type": "location", "demo": "storage\/get-file-preview.md", @@ -7406,7 +7742,7 @@ "x-appwrite": { "method": "getFileView", "group": "files", - "weight": 164, + "weight": 172, "cookies": false, "type": "location", "demo": "storage\/get-file-view.md", @@ -7491,7 +7827,7 @@ "x-appwrite": { "method": "listRows", "group": "rows", - "weight": 427, + "weight": 441, "cookies": false, "type": "", "demo": "tablesdb\/list-rows.md", @@ -7579,7 +7915,7 @@ "x-appwrite": { "method": "createRow", "group": "rows", - "weight": 419, + "weight": 433, "cookies": false, "type": "", "demo": "tablesdb\/create-row.md", @@ -7724,7 +8060,7 @@ "x-appwrite": { "method": "getRow", "group": "rows", - "weight": 420, + "weight": 434, "cookies": false, "type": "", "demo": "tablesdb\/get-row.md", @@ -7822,7 +8158,7 @@ "x-appwrite": { "method": "upsertRow", "group": "rows", - "weight": 423, + "weight": 437, "cookies": false, "type": "", "demo": "tablesdb\/upsert-row.md", @@ -7961,7 +8297,7 @@ "x-appwrite": { "method": "updateRow", "group": "rows", - "weight": 421, + "weight": 435, "cookies": false, "type": "", "demo": "tablesdb\/update-row.md", @@ -8063,7 +8399,7 @@ "x-appwrite": { "method": "deleteRow", "group": "rows", - "weight": 425, + "weight": 439, "cookies": false, "type": "", "demo": "tablesdb\/delete-row.md", @@ -8150,7 +8486,7 @@ "x-appwrite": { "method": "decrementRowColumn", "group": "rows", - "weight": 430, + "weight": 444, "cookies": false, "type": "", "demo": "tablesdb\/decrement-row-column.md", @@ -8268,7 +8604,7 @@ "x-appwrite": { "method": "incrementRowColumn", "group": "rows", - "weight": 429, + "weight": 443, "cookies": false, "type": "", "demo": "tablesdb\/increment-row-column.md", @@ -8386,7 +8722,7 @@ "x-appwrite": { "method": "list", "group": "teams", - "weight": 171, + "weight": 179, "cookies": false, "type": "", "demo": "teams\/list.md", @@ -8462,7 +8798,7 @@ "x-appwrite": { "method": "create", "group": "teams", - "weight": 170, + "weight": 178, "cookies": false, "type": "", "demo": "teams\/create.md", @@ -8547,7 +8883,7 @@ "x-appwrite": { "method": "get", "group": "teams", - "weight": 172, + "weight": 180, "cookies": false, "type": "", "demo": "teams\/get.md", @@ -8609,7 +8945,7 @@ "x-appwrite": { "method": "updateName", "group": "teams", - "weight": 174, + "weight": 182, "cookies": false, "type": "", "demo": "teams\/update-name.md", @@ -8683,7 +9019,7 @@ "x-appwrite": { "method": "delete", "group": "teams", - "weight": 176, + "weight": 184, "cookies": false, "type": "", "demo": "teams\/delete.md", @@ -8747,7 +9083,7 @@ "x-appwrite": { "method": "listMemberships", "group": "memberships", - "weight": 178, + "weight": 186, "cookies": false, "type": "", "demo": "teams\/list-memberships.md", @@ -8833,7 +9169,7 @@ "x-appwrite": { "method": "createMembership", "group": "memberships", - "weight": 177, + "weight": 185, "cookies": false, "type": "", "demo": "teams\/create-membership.md", @@ -8944,7 +9280,7 @@ "x-appwrite": { "method": "getMembership", "group": "memberships", - "weight": 179, + "weight": 187, "cookies": false, "type": "", "demo": "teams\/get-membership.md", @@ -9016,7 +9352,7 @@ "x-appwrite": { "method": "updateMembership", "group": "memberships", - "weight": 180, + "weight": 188, "cookies": false, "type": "", "demo": "teams\/update-membership.md", @@ -9103,7 +9439,7 @@ "x-appwrite": { "method": "deleteMembership", "group": "memberships", - "weight": 182, + "weight": 190, "cookies": false, "type": "", "demo": "teams\/delete-membership.md", @@ -9177,7 +9513,7 @@ "x-appwrite": { "method": "updateMembershipStatus", "group": "memberships", - "weight": 181, + "weight": 189, "cookies": false, "type": "", "demo": "teams\/update-membership-status.md", @@ -9275,7 +9611,7 @@ "x-appwrite": { "method": "getPrefs", "group": "teams", - "weight": 173, + "weight": 181, "cookies": false, "type": "", "demo": "teams\/get-prefs.md", @@ -9336,7 +9672,7 @@ "x-appwrite": { "method": "updatePrefs", "group": "teams", - "weight": 175, + "weight": 183, "cookies": false, "type": "", "demo": "teams\/update-prefs.md", @@ -10375,6 +10711,19 @@ }, "x-example": [] }, + "plan": { + "type": "object", + "description": "User subscription plan details.", + "x-example": { + "id": "basic", + "name": "Basic", + "price": 999, + "currency": "usd", + "interval": "month", + "isFree": false + }, + "nullable": true + }, "accessedAt": { "type": "string", "description": "Most recent access date in ISO 8601 format. This attribute is only updated again after 24 hours.", @@ -10423,6 +10772,14 @@ "timezone": "UTC" }, "targets": [], + "plan": { + "id": "basic", + "name": "Basic", + "price": 999, + "currency": "usd", + "interval": "month", + "isFree": false + }, "accessedAt": "2020-10-15T06:38:00.000+00:00" } }, diff --git a/app/config/specs/open-api3-latest-console.json b/app/config/specs/open-api3-latest-console.json index ab36ae475c..b9f51b5d0f 100644 --- a/app/config/specs/open-api3-latest-console.json +++ b/app/config/specs/open-api3-latest-console.json @@ -2884,6 +2884,337 @@ ] } }, + "\/account\/subscription": { + "get": { + "summary": "Get account subscription", + "operationId": "accountGetSubscription", + "tags": [ + "account" + ], + "description": false, + "responses": { + "200": { + "description": "Any", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/any" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getSubscription", + "group": "subscription", + "weight": 60, + "cookies": false, + "type": "", + "demo": "account\/get-subscription.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-subscription.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [] + } + ] + }, + "put": { + "summary": "Update subscription", + "operationId": "accountUpdateSubscription", + "tags": [ + "account" + ], + "description": false, + "responses": { + "200": { + "description": "Any", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/any" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateSubscription", + "group": "subscription", + "weight": 63, + "cookies": false, + "type": "", + "demo": "account\/update-subscription.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-subscription.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "planId": { + "type": "string", + "description": "New plan ID.", + "x-example": "" + } + }, + "required": [ + "planId" + ] + } + } + } + } + }, + "delete": { + "summary": "Cancel subscription", + "operationId": "accountCancelSubscription", + "tags": [ + "account" + ], + "description": false, + "responses": { + "200": { + "description": "Any", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/any" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "cancelSubscription", + "group": "subscription", + "weight": 64, + "cookies": false, + "type": "", + "demo": "account\/cancel-subscription.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/cancel-subscription.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "atPeriodEnd": { + "type": "boolean", + "description": "Cancel at period end.", + "x-example": false + } + } + } + } + } + } + } + }, + "\/account\/subscription\/checkout": { + "post": { + "summary": "Create checkout session", + "operationId": "accountCreateSubscriptionCheckout", + "tags": [ + "account" + ], + "description": false, + "responses": { + "200": { + "description": "Any", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/any" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createSubscriptionCheckout", + "group": "subscription", + "weight": 61, + "cookies": false, + "type": "", + "demo": "account\/create-subscription-checkout.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-checkout.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "planId": { + "type": "string", + "description": "Plan ID to subscribe to.", + "x-example": "" + }, + "successUrl": { + "type": "string", + "description": "URL to redirect on success.", + "x-example": "https:\/\/example.com" + }, + "cancelUrl": { + "type": "string", + "description": "URL to redirect on cancel.", + "x-example": "https:\/\/example.com" + } + }, + "required": [ + "planId", + "successUrl", + "cancelUrl" + ] + } + } + } + } + } + }, + "\/account\/subscription\/portal": { + "post": { + "summary": "Create customer portal session", + "operationId": "accountCreateSubscriptionPortal", + "tags": [ + "account" + ], + "description": false, + "responses": { + "200": { + "description": "Any", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/any" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createSubscriptionPortal", + "group": "subscription", + "weight": 62, + "cookies": false, + "type": "", + "demo": "account\/create-subscription-portal.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-portal.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "returnUrl": { + "type": "string", + "description": "URL to return to.", + "x-example": "https:\/\/example.com" + } + }, + "required": [ + "returnUrl" + ] + } + } + } + } + } + }, "\/account\/targets\/push": { "post": { "summary": "Create push target", @@ -3758,7 +4089,7 @@ "x-appwrite": { "method": "getBrowser", "group": null, - "weight": 61, + "weight": 66, "cookies": false, "type": "location", "demo": "avatars\/get-browser.md", @@ -3884,7 +4215,7 @@ "x-appwrite": { "method": "getCreditCard", "group": null, - "weight": 60, + "weight": 65, "cookies": false, "type": "location", "demo": "avatars\/get-credit-card.md", @@ -4016,7 +4347,7 @@ "x-appwrite": { "method": "getFavicon", "group": null, - "weight": 64, + "weight": 69, "cookies": false, "type": "location", "demo": "avatars\/get-favicon.md", @@ -4074,7 +4405,7 @@ "x-appwrite": { "method": "getFlag", "group": null, - "weight": 62, + "weight": 67, "cookies": false, "type": "location", "demo": "avatars\/get-flag.md", @@ -4562,7 +4893,7 @@ "x-appwrite": { "method": "getImage", "group": null, - "weight": 63, + "weight": 68, "cookies": false, "type": "location", "demo": "avatars\/get-image.md", @@ -4644,7 +4975,7 @@ "x-appwrite": { "method": "getInitials", "group": null, - "weight": 66, + "weight": 71, "cookies": false, "type": "location", "demo": "avatars\/get-initials.md", @@ -4736,7 +5067,7 @@ "x-appwrite": { "method": "getQR", "group": null, - "weight": 65, + "weight": 70, "cookies": false, "type": "location", "demo": "avatars\/get-qr.md", @@ -4828,7 +5159,7 @@ "x-appwrite": { "method": "chat", "group": "console", - "weight": 252, + "weight": 261, "cookies": false, "type": "", "demo": "assistant\/chat.md", @@ -4888,7 +5219,7 @@ "x-appwrite": { "method": "getResource", "group": null, - "weight": 496, + "weight": 510, "cookies": false, "type": "", "demo": "console\/get-resource.md", @@ -4963,7 +5294,7 @@ "x-appwrite": { "method": "variables", "group": "console", - "weight": 251, + "weight": 260, "cookies": false, "type": "", "demo": "console\/variables.md", @@ -5011,7 +5342,7 @@ "x-appwrite": { "method": "list", "group": "databases", - "weight": 316, + "weight": 330, "cookies": false, "type": "", "demo": "databases\/list.md", @@ -5115,7 +5446,7 @@ "x-appwrite": { "method": "create", "group": "databases", - "weight": 312, + "weight": 326, "cookies": false, "type": "", "demo": "databases\/create.md", @@ -5229,7 +5560,7 @@ "x-appwrite": { "method": "listUsage", "group": null, - "weight": 319, + "weight": 333, "cookies": false, "type": "", "demo": "databases\/list-usage.md", @@ -5331,7 +5662,7 @@ "x-appwrite": { "method": "get", "group": "databases", - "weight": 313, + "weight": 327, "cookies": false, "type": "", "demo": "databases\/get.md", @@ -5422,7 +5753,7 @@ "x-appwrite": { "method": "update", "group": "databases", - "weight": 314, + "weight": 328, "cookies": false, "type": "", "demo": "databases\/update.md", @@ -5533,7 +5864,7 @@ "x-appwrite": { "method": "delete", "group": "databases", - "weight": 315, + "weight": 329, "cookies": false, "type": "", "demo": "databases\/delete.md", @@ -5625,7 +5956,7 @@ "x-appwrite": { "method": "listCollections", "group": "collections", - "weight": 324, + "weight": 338, "cookies": false, "type": "", "demo": "databases\/list-collections.md", @@ -5712,7 +6043,7 @@ "x-appwrite": { "method": "createCollection", "group": "collections", - "weight": 320, + "weight": 334, "cookies": false, "type": "", "demo": "databases\/create-collection.md", @@ -5820,7 +6151,7 @@ "x-appwrite": { "method": "getCollection", "group": "collections", - "weight": 321, + "weight": 335, "cookies": false, "type": "", "demo": "databases\/get-collection.md", @@ -5893,7 +6224,7 @@ "x-appwrite": { "method": "updateCollection", "group": "collections", - "weight": 322, + "weight": 336, "cookies": false, "type": "", "demo": "databases\/update-collection.md", @@ -5996,7 +6327,7 @@ "x-appwrite": { "method": "deleteCollection", "group": "collections", - "weight": 323, + "weight": 337, "cookies": false, "type": "", "demo": "databases\/delete-collection.md", @@ -6071,7 +6402,7 @@ "x-appwrite": { "method": "listAttributes", "group": "attributes", - "weight": 341, + "weight": 355, "cookies": false, "type": "", "demo": "databases\/list-attributes.md", @@ -6159,7 +6490,7 @@ "x-appwrite": { "method": "createBooleanAttribute", "group": "attributes", - "weight": 342, + "weight": 356, "cookies": false, "type": "", "demo": "databases\/create-boolean-attribute.md", @@ -6269,7 +6600,7 @@ "x-appwrite": { "method": "updateBooleanAttribute", "group": "attributes", - "weight": 343, + "weight": 357, "cookies": false, "type": "", "demo": "databases\/update-boolean-attribute.md", @@ -6384,7 +6715,7 @@ "x-appwrite": { "method": "createDatetimeAttribute", "group": "attributes", - "weight": 344, + "weight": 358, "cookies": false, "type": "", "demo": "databases\/create-datetime-attribute.md", @@ -6494,7 +6825,7 @@ "x-appwrite": { "method": "updateDatetimeAttribute", "group": "attributes", - "weight": 345, + "weight": 359, "cookies": false, "type": "", "demo": "databases\/update-datetime-attribute.md", @@ -6609,7 +6940,7 @@ "x-appwrite": { "method": "createEmailAttribute", "group": "attributes", - "weight": 346, + "weight": 360, "cookies": false, "type": "", "demo": "databases\/create-email-attribute.md", @@ -6719,7 +7050,7 @@ "x-appwrite": { "method": "updateEmailAttribute", "group": "attributes", - "weight": 347, + "weight": 361, "cookies": false, "type": "", "demo": "databases\/update-email-attribute.md", @@ -6834,7 +7165,7 @@ "x-appwrite": { "method": "createEnumAttribute", "group": "attributes", - "weight": 348, + "weight": 362, "cookies": false, "type": "", "demo": "databases\/create-enum-attribute.md", @@ -6953,7 +7284,7 @@ "x-appwrite": { "method": "updateEnumAttribute", "group": "attributes", - "weight": 349, + "weight": 363, "cookies": false, "type": "", "demo": "databases\/update-enum-attribute.md", @@ -7077,7 +7408,7 @@ "x-appwrite": { "method": "createFloatAttribute", "group": "attributes", - "weight": 350, + "weight": 364, "cookies": false, "type": "", "demo": "databases\/create-float-attribute.md", @@ -7197,7 +7528,7 @@ "x-appwrite": { "method": "updateFloatAttribute", "group": "attributes", - "weight": 351, + "weight": 365, "cookies": false, "type": "", "demo": "databases\/update-float-attribute.md", @@ -7322,7 +7653,7 @@ "x-appwrite": { "method": "createIntegerAttribute", "group": "attributes", - "weight": 352, + "weight": 366, "cookies": false, "type": "", "demo": "databases\/create-integer-attribute.md", @@ -7442,7 +7773,7 @@ "x-appwrite": { "method": "updateIntegerAttribute", "group": "attributes", - "weight": 353, + "weight": 367, "cookies": false, "type": "", "demo": "databases\/update-integer-attribute.md", @@ -7567,7 +7898,7 @@ "x-appwrite": { "method": "createIpAttribute", "group": "attributes", - "weight": 354, + "weight": 368, "cookies": false, "type": "", "demo": "databases\/create-ip-attribute.md", @@ -7677,7 +8008,7 @@ "x-appwrite": { "method": "updateIpAttribute", "group": "attributes", - "weight": 355, + "weight": 369, "cookies": false, "type": "", "demo": "databases\/update-ip-attribute.md", @@ -7792,7 +8123,7 @@ "x-appwrite": { "method": "createLineAttribute", "group": "attributes", - "weight": 356, + "weight": 370, "cookies": false, "type": "", "demo": "databases\/create-line-attribute.md", @@ -7905,7 +8236,7 @@ "x-appwrite": { "method": "updateLineAttribute", "group": "attributes", - "weight": 357, + "weight": 371, "cookies": false, "type": "", "demo": "databases\/update-line-attribute.md", @@ -8026,7 +8357,7 @@ "x-appwrite": { "method": "createPointAttribute", "group": "attributes", - "weight": 358, + "weight": 372, "cookies": false, "type": "", "demo": "databases\/create-point-attribute.md", @@ -8139,7 +8470,7 @@ "x-appwrite": { "method": "updatePointAttribute", "group": "attributes", - "weight": 359, + "weight": 373, "cookies": false, "type": "", "demo": "databases\/update-point-attribute.md", @@ -8260,7 +8591,7 @@ "x-appwrite": { "method": "createPolygonAttribute", "group": "attributes", - "weight": 360, + "weight": 374, "cookies": false, "type": "", "demo": "databases\/create-polygon-attribute.md", @@ -8373,7 +8704,7 @@ "x-appwrite": { "method": "updatePolygonAttribute", "group": "attributes", - "weight": 361, + "weight": 375, "cookies": false, "type": "", "demo": "databases\/update-polygon-attribute.md", @@ -8494,7 +8825,7 @@ "x-appwrite": { "method": "createRelationshipAttribute", "group": "attributes", - "weight": 362, + "weight": 376, "cookies": false, "type": "", "demo": "databases\/create-relationship-attribute.md", @@ -8629,7 +8960,7 @@ "x-appwrite": { "method": "createStringAttribute", "group": "attributes", - "weight": 364, + "weight": 378, "cookies": false, "type": "", "demo": "databases\/create-string-attribute.md", @@ -8750,7 +9081,7 @@ "x-appwrite": { "method": "updateStringAttribute", "group": "attributes", - "weight": 365, + "weight": 379, "cookies": false, "type": "", "demo": "databases\/update-string-attribute.md", @@ -8870,7 +9201,7 @@ "x-appwrite": { "method": "createUrlAttribute", "group": "attributes", - "weight": 366, + "weight": 380, "cookies": false, "type": "", "demo": "databases\/create-url-attribute.md", @@ -8980,7 +9311,7 @@ "x-appwrite": { "method": "updateUrlAttribute", "group": "attributes", - "weight": 367, + "weight": 381, "cookies": false, "type": "", "demo": "databases\/update-url-attribute.md", @@ -9126,7 +9457,7 @@ "x-appwrite": { "method": "getAttribute", "group": "attributes", - "weight": 339, + "weight": 353, "cookies": false, "type": "", "demo": "databases\/get-attribute.md", @@ -9201,7 +9532,7 @@ "x-appwrite": { "method": "deleteAttribute", "group": "attributes", - "weight": 340, + "weight": 354, "cookies": false, "type": "", "demo": "databases\/delete-attribute.md", @@ -9285,7 +9616,7 @@ "x-appwrite": { "method": "updateRelationshipAttribute", "group": "attributes", - "weight": 363, + "weight": 377, "cookies": false, "type": "", "demo": "databases\/update-relationship-attribute.md", @@ -9397,7 +9728,7 @@ "x-appwrite": { "method": "listDocuments", "group": "documents", - "weight": 335, + "weight": 349, "cookies": false, "type": "", "demo": "databases\/list-documents.md", @@ -9486,7 +9817,7 @@ "x-appwrite": { "method": "createDocument", "group": "documents", - "weight": 327, + "weight": 341, "cookies": false, "type": "", "demo": "databases\/create-document.md", @@ -9664,7 +9995,7 @@ "x-appwrite": { "method": "upsertDocuments", "group": "documents", - "weight": 332, + "weight": 346, "cookies": false, "type": "", "demo": "databases\/upsert-documents.md", @@ -9792,7 +10123,7 @@ "x-appwrite": { "method": "updateDocuments", "group": "documents", - "weight": 330, + "weight": 344, "cookies": false, "type": "", "demo": "databases\/update-documents.md", @@ -9890,7 +10221,7 @@ "x-appwrite": { "method": "deleteDocuments", "group": "documents", - "weight": 334, + "weight": 348, "cookies": false, "type": "", "demo": "databases\/delete-documents.md", @@ -9985,7 +10316,7 @@ "x-appwrite": { "method": "getDocument", "group": "documents", - "weight": 328, + "weight": 342, "cookies": false, "type": "", "demo": "databases\/get-document.md", @@ -10084,7 +10415,7 @@ "x-appwrite": { "method": "upsertDocument", "group": "documents", - "weight": 331, + "weight": 345, "cookies": false, "type": "", "demo": "databases\/upsert-document.md", @@ -10232,7 +10563,7 @@ "x-appwrite": { "method": "updateDocument", "group": "documents", - "weight": 329, + "weight": 343, "cookies": false, "type": "", "demo": "databases\/update-document.md", @@ -10335,7 +10666,7 @@ "x-appwrite": { "method": "deleteDocument", "group": "documents", - "weight": 333, + "weight": 347, "cookies": false, "type": "", "demo": "databases\/delete-document.md", @@ -10423,7 +10754,7 @@ "x-appwrite": { "method": "listDocumentLogs", "group": "logs", - "weight": 336, + "weight": 350, "cookies": false, "type": "", "demo": "databases\/list-document-logs.md", @@ -10520,7 +10851,7 @@ "x-appwrite": { "method": "decrementDocumentAttribute", "group": "documents", - "weight": 338, + "weight": 352, "cookies": false, "type": "", "demo": "databases\/decrement-document-attribute.md", @@ -10639,7 +10970,7 @@ "x-appwrite": { "method": "incrementDocumentAttribute", "group": "documents", - "weight": 337, + "weight": 351, "cookies": false, "type": "", "demo": "databases\/increment-document-attribute.md", @@ -10758,7 +11089,7 @@ "x-appwrite": { "method": "listIndexes", "group": "indexes", - "weight": 371, + "weight": 385, "cookies": false, "type": "", "demo": "databases\/list-indexes.md", @@ -10844,7 +11175,7 @@ "x-appwrite": { "method": "createIndex", "group": "indexes", - "weight": 368, + "weight": 382, "cookies": false, "type": "", "demo": "databases\/create-index.md", @@ -10977,7 +11308,7 @@ "x-appwrite": { "method": "getIndex", "group": "indexes", - "weight": 369, + "weight": 383, "cookies": false, "type": "", "demo": "databases\/get-index.md", @@ -11052,7 +11383,7 @@ "x-appwrite": { "method": "deleteIndex", "group": "indexes", - "weight": 370, + "weight": 384, "cookies": false, "type": "", "demo": "databases\/delete-index.md", @@ -11136,7 +11467,7 @@ "x-appwrite": { "method": "listCollectionLogs", "group": "collections", - "weight": 325, + "weight": 339, "cookies": false, "type": "", "demo": "databases\/list-collection-logs.md", @@ -11223,7 +11554,7 @@ "x-appwrite": { "method": "getCollectionUsage", "group": null, - "weight": 326, + "weight": 340, "cookies": false, "type": "", "demo": "databases\/get-collection-usage.md", @@ -11319,7 +11650,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 317, + "weight": 331, "cookies": false, "type": "", "demo": "databases\/list-logs.md", @@ -11425,7 +11756,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 318, + "weight": 332, "cookies": false, "type": "", "demo": "databases\/get-usage.md", @@ -11540,7 +11871,7 @@ "x-appwrite": { "method": "list", "group": "functions", - "weight": 440, + "weight": 454, "cookies": false, "type": "", "demo": "functions\/list.md", @@ -11613,7 +11944,7 @@ "x-appwrite": { "method": "create", "group": "functions", - "weight": 437, + "weight": 451, "cookies": false, "type": "", "demo": "functions\/create.md", @@ -11846,7 +12177,7 @@ "x-appwrite": { "method": "listRuntimes", "group": "runtimes", - "weight": 442, + "weight": 456, "cookies": false, "type": "", "demo": "functions\/list-runtimes.md", @@ -11895,7 +12226,7 @@ "x-appwrite": { "method": "listSpecifications", "group": "runtimes", - "weight": 443, + "weight": 457, "cookies": false, "type": "", "demo": "functions\/list-specifications.md", @@ -11945,7 +12276,7 @@ "x-appwrite": { "method": "listTemplates", "group": "templates", - "weight": 466, + "weight": 480, "cookies": false, "type": "", "demo": "functions\/list-templates.md", @@ -12045,7 +12376,7 @@ "x-appwrite": { "method": "getTemplate", "group": "templates", - "weight": 465, + "weight": 479, "cookies": false, "type": "", "demo": "functions\/get-template.md", @@ -12105,7 +12436,7 @@ "x-appwrite": { "method": "listUsage", "group": null, - "weight": 459, + "weight": 473, "cookies": false, "type": "", "demo": "functions\/list-usage.md", @@ -12177,7 +12508,7 @@ "x-appwrite": { "method": "get", "group": "functions", - "weight": 438, + "weight": 452, "cookies": false, "type": "", "demo": "functions\/get.md", @@ -12236,7 +12567,7 @@ "x-appwrite": { "method": "update", "group": "functions", - "weight": 439, + "weight": 453, "cookies": false, "type": "", "demo": "functions\/update.md", @@ -12466,7 +12797,7 @@ "x-appwrite": { "method": "delete", "group": "functions", - "weight": 441, + "weight": 455, "cookies": false, "type": "", "demo": "functions\/delete.md", @@ -12527,7 +12858,7 @@ "x-appwrite": { "method": "updateFunctionDeployment", "group": "functions", - "weight": 446, + "weight": 460, "cookies": false, "type": "", "demo": "functions\/update-function-deployment.md", @@ -12607,7 +12938,7 @@ "x-appwrite": { "method": "listDeployments", "group": "deployments", - "weight": 447, + "weight": 461, "cookies": false, "type": "", "demo": "functions\/list-deployments.md", @@ -12690,7 +13021,7 @@ "x-appwrite": { "method": "createDeployment", "group": "deployments", - "weight": 444, + "weight": 458, "cookies": false, "type": "upload", "demo": "functions\/create-deployment.md", @@ -12786,7 +13117,7 @@ "x-appwrite": { "method": "createDuplicateDeployment", "group": "deployments", - "weight": 452, + "weight": 466, "cookies": false, "type": "", "demo": "functions\/create-duplicate-deployment.md", @@ -12871,7 +13202,7 @@ "x-appwrite": { "method": "createTemplateDeployment", "group": "deployments", - "weight": 449, + "weight": 463, "cookies": false, "type": "", "demo": "functions\/create-template-deployment.md", @@ -12974,7 +13305,7 @@ "x-appwrite": { "method": "createVcsDeployment", "group": "deployments", - "weight": 450, + "weight": 464, "cookies": false, "type": "", "demo": "functions\/create-vcs-deployment.md", @@ -13071,7 +13402,7 @@ "x-appwrite": { "method": "getDeployment", "group": "deployments", - "weight": 445, + "weight": 459, "cookies": false, "type": "", "demo": "functions\/get-deployment.md", @@ -13133,7 +13464,7 @@ "x-appwrite": { "method": "deleteDeployment", "group": "deployments", - "weight": 448, + "weight": 462, "cookies": false, "type": "", "demo": "functions\/delete-deployment.md", @@ -13197,7 +13528,7 @@ "x-appwrite": { "method": "getDeploymentDownload", "group": "deployments", - "weight": 451, + "weight": 465, "cookies": false, "type": "location", "demo": "functions\/get-deployment-download.md", @@ -13287,7 +13618,7 @@ "x-appwrite": { "method": "updateDeploymentStatus", "group": "deployments", - "weight": 453, + "weight": 467, "cookies": false, "type": "", "demo": "functions\/update-deployment-status.md", @@ -13358,7 +13689,7 @@ "x-appwrite": { "method": "listExecutions", "group": "executions", - "weight": 456, + "weight": 470, "cookies": false, "type": "", "demo": "functions\/list-executions.md", @@ -13433,7 +13764,7 @@ "x-appwrite": { "method": "createExecution", "group": "executions", - "weight": 454, + "weight": 468, "cookies": false, "type": "", "demo": "functions\/create-execution.md", @@ -13549,7 +13880,7 @@ "x-appwrite": { "method": "getExecution", "group": "executions", - "weight": 455, + "weight": 469, "cookies": false, "type": "", "demo": "functions\/get-execution.md", @@ -13614,7 +13945,7 @@ "x-appwrite": { "method": "deleteExecution", "group": "executions", - "weight": 457, + "weight": 471, "cookies": false, "type": "", "demo": "functions\/delete-execution.md", @@ -13685,7 +14016,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 458, + "weight": 472, "cookies": false, "type": "", "demo": "functions\/get-usage.md", @@ -13767,7 +14098,7 @@ "x-appwrite": { "method": "listVariables", "group": "variables", - "weight": 462, + "weight": 476, "cookies": false, "type": "", "demo": "functions\/list-variables.md", @@ -13826,7 +14157,7 @@ "x-appwrite": { "method": "createVariable", "group": "variables", - "weight": 460, + "weight": 474, "cookies": false, "type": "", "demo": "functions\/create-variable.md", @@ -13917,7 +14248,7 @@ "x-appwrite": { "method": "getVariable", "group": "variables", - "weight": 461, + "weight": 475, "cookies": false, "type": "", "demo": "functions\/get-variable.md", @@ -13986,7 +14317,7 @@ "x-appwrite": { "method": "updateVariable", "group": "variables", - "weight": 463, + "weight": 477, "cookies": false, "type": "", "demo": "functions\/update-variable.md", @@ -14077,7 +14408,7 @@ "x-appwrite": { "method": "deleteVariable", "group": "variables", - "weight": 464, + "weight": 478, "cookies": false, "type": "", "demo": "functions\/delete-variable.md", @@ -14148,7 +14479,7 @@ "x-appwrite": { "method": "query", "group": "graphql", - "weight": 250, + "weight": 259, "cookies": false, "type": "graphql", "demo": "graphql\/query.md", @@ -14200,7 +14531,7 @@ "x-appwrite": { "method": "mutation", "group": "graphql", - "weight": 249, + "weight": 258, "cookies": false, "type": "graphql", "demo": "graphql\/mutation.md", @@ -14252,7 +14583,7 @@ "x-appwrite": { "method": "get", "group": "health", - "weight": 78, + "weight": 83, "cookies": false, "type": "", "demo": "health\/get.md", @@ -14301,7 +14632,7 @@ "x-appwrite": { "method": "getAntivirus", "group": "health", - "weight": 99, + "weight": 104, "cookies": false, "type": "", "demo": "health\/get-antivirus.md", @@ -14350,7 +14681,7 @@ "x-appwrite": { "method": "getCache", "group": "health", - "weight": 81, + "weight": 86, "cookies": false, "type": "", "demo": "health\/get-cache.md", @@ -14399,7 +14730,7 @@ "x-appwrite": { "method": "getCertificate", "group": "health", - "weight": 86, + "weight": 91, "cookies": false, "type": "", "demo": "health\/get-certificate.md", @@ -14459,7 +14790,7 @@ "x-appwrite": { "method": "getDB", "group": "health", - "weight": 80, + "weight": 85, "cookies": false, "type": "", "demo": "health\/get-db.md", @@ -14508,7 +14839,7 @@ "x-appwrite": { "method": "getPubSub", "group": "health", - "weight": 82, + "weight": 87, "cookies": false, "type": "", "demo": "health\/get-pub-sub.md", @@ -14557,7 +14888,7 @@ "x-appwrite": { "method": "getQueueBuilds", "group": "queue", - "weight": 88, + "weight": 93, "cookies": false, "type": "", "demo": "health\/get-queue-builds.md", @@ -14619,7 +14950,7 @@ "x-appwrite": { "method": "getQueueCertificates", "group": "queue", - "weight": 87, + "weight": 92, "cookies": false, "type": "", "demo": "health\/get-queue-certificates.md", @@ -14681,7 +15012,7 @@ "x-appwrite": { "method": "getQueueDatabases", "group": "queue", - "weight": 89, + "weight": 94, "cookies": false, "type": "", "demo": "health\/get-queue-databases.md", @@ -14754,7 +15085,7 @@ "x-appwrite": { "method": "getQueueDeletes", "group": "queue", - "weight": 90, + "weight": 95, "cookies": false, "type": "", "demo": "health\/get-queue-deletes.md", @@ -14816,7 +15147,7 @@ "x-appwrite": { "method": "getFailedJobs", "group": "queue", - "weight": 100, + "weight": 105, "cookies": false, "type": "", "demo": "health\/get-failed-jobs.md", @@ -14904,7 +15235,7 @@ "x-appwrite": { "method": "getQueueFunctions", "group": "queue", - "weight": 94, + "weight": 99, "cookies": false, "type": "", "demo": "health\/get-queue-functions.md", @@ -14966,7 +15297,7 @@ "x-appwrite": { "method": "getQueueLogs", "group": "queue", - "weight": 85, + "weight": 90, "cookies": false, "type": "", "demo": "health\/get-queue-logs.md", @@ -15028,7 +15359,7 @@ "x-appwrite": { "method": "getQueueMails", "group": "queue", - "weight": 91, + "weight": 96, "cookies": false, "type": "", "demo": "health\/get-queue-mails.md", @@ -15090,7 +15421,7 @@ "x-appwrite": { "method": "getQueueMessaging", "group": "queue", - "weight": 92, + "weight": 97, "cookies": false, "type": "", "demo": "health\/get-queue-messaging.md", @@ -15152,7 +15483,7 @@ "x-appwrite": { "method": "getQueueMigrations", "group": "queue", - "weight": 93, + "weight": 98, "cookies": false, "type": "", "demo": "health\/get-queue-migrations.md", @@ -15214,7 +15545,7 @@ "x-appwrite": { "method": "getQueueStatsResources", "group": "queue", - "weight": 95, + "weight": 100, "cookies": false, "type": "", "demo": "health\/get-queue-stats-resources.md", @@ -15276,7 +15607,7 @@ "x-appwrite": { "method": "getQueueUsage", "group": "queue", - "weight": 96, + "weight": 101, "cookies": false, "type": "", "demo": "health\/get-queue-usage.md", @@ -15338,7 +15669,7 @@ "x-appwrite": { "method": "getQueueWebhooks", "group": "queue", - "weight": 84, + "weight": 89, "cookies": false, "type": "", "demo": "health\/get-queue-webhooks.md", @@ -15400,7 +15731,7 @@ "x-appwrite": { "method": "getStorage", "group": "storage", - "weight": 98, + "weight": 103, "cookies": false, "type": "", "demo": "health\/get-storage.md", @@ -15449,7 +15780,7 @@ "x-appwrite": { "method": "getStorageLocal", "group": "storage", - "weight": 97, + "weight": 102, "cookies": false, "type": "", "demo": "health\/get-storage-local.md", @@ -15498,7 +15829,7 @@ "x-appwrite": { "method": "getTime", "group": "health", - "weight": 83, + "weight": 88, "cookies": false, "type": "", "demo": "health\/get-time.md", @@ -15547,7 +15878,7 @@ "x-appwrite": { "method": "get", "group": null, - "weight": 70, + "weight": 75, "cookies": false, "type": "", "demo": "locale\/get.md", @@ -15599,7 +15930,7 @@ "x-appwrite": { "method": "listCodes", "group": null, - "weight": 71, + "weight": 76, "cookies": false, "type": "", "demo": "locale\/list-codes.md", @@ -15651,7 +15982,7 @@ "x-appwrite": { "method": "listContinents", "group": null, - "weight": 75, + "weight": 80, "cookies": false, "type": "", "demo": "locale\/list-continents.md", @@ -15703,7 +16034,7 @@ "x-appwrite": { "method": "listCountries", "group": null, - "weight": 72, + "weight": 77, "cookies": false, "type": "", "demo": "locale\/list-countries.md", @@ -15755,7 +16086,7 @@ "x-appwrite": { "method": "listCountriesEU", "group": null, - "weight": 73, + "weight": 78, "cookies": false, "type": "", "demo": "locale\/list-countries-eu.md", @@ -15807,7 +16138,7 @@ "x-appwrite": { "method": "listCountriesPhones", "group": null, - "weight": 74, + "weight": 79, "cookies": false, "type": "", "demo": "locale\/list-countries-phones.md", @@ -15859,7 +16190,7 @@ "x-appwrite": { "method": "listCurrencies", "group": null, - "weight": 76, + "weight": 81, "cookies": false, "type": "", "demo": "locale\/list-currencies.md", @@ -15911,7 +16242,7 @@ "x-appwrite": { "method": "listLanguages", "group": null, - "weight": 77, + "weight": 82, "cookies": false, "type": "", "demo": "locale\/list-languages.md", @@ -15963,7 +16294,7 @@ "x-appwrite": { "method": "listMessages", "group": "messages", - "weight": 304, + "weight": 318, "cookies": false, "type": "", "demo": "messaging\/list-messages.md", @@ -16039,7 +16370,7 @@ "x-appwrite": { "method": "createEmail", "group": "messages", - "weight": 301, + "weight": 315, "cookies": false, "type": "", "demo": "messaging\/create-email.md", @@ -16183,7 +16514,7 @@ "x-appwrite": { "method": "updateEmail", "group": "messages", - "weight": 308, + "weight": 322, "cookies": false, "type": "", "demo": "messaging\/update-email.md", @@ -16329,7 +16660,7 @@ "x-appwrite": { "method": "createPush", "group": "messages", - "weight": 303, + "weight": 317, "cookies": false, "type": "", "demo": "messaging\/create-push.md", @@ -16503,7 +16834,7 @@ "x-appwrite": { "method": "updatePush", "group": "messages", - "weight": 310, + "weight": 324, "cookies": false, "type": "", "demo": "messaging\/update-push.md", @@ -16681,7 +17012,7 @@ "x-appwrite": { "method": "createSms", "group": "messages", - "weight": 302, + "weight": 316, "cookies": false, "type": "", "demo": "messaging\/create-sms.md", @@ -16858,7 +17189,7 @@ "x-appwrite": { "method": "updateSms", "group": "messages", - "weight": 309, + "weight": 323, "cookies": false, "type": "", "demo": "messaging\/update-sms.md", @@ -17036,7 +17367,7 @@ "x-appwrite": { "method": "getMessage", "group": "messages", - "weight": 307, + "weight": 321, "cookies": false, "type": "", "demo": "messaging\/get-message.md", @@ -17089,7 +17420,7 @@ "x-appwrite": { "method": "delete", "group": "messages", - "weight": 311, + "weight": 325, "cookies": false, "type": "", "demo": "messaging\/delete.md", @@ -17151,7 +17482,7 @@ "x-appwrite": { "method": "listMessageLogs", "group": "logs", - "weight": 305, + "weight": 319, "cookies": false, "type": "", "demo": "messaging\/list-message-logs.md", @@ -17226,7 +17557,7 @@ "x-appwrite": { "method": "listTargets", "group": "messages", - "weight": 306, + "weight": 320, "cookies": false, "type": "", "demo": "messaging\/list-targets.md", @@ -17301,7 +17632,7 @@ "x-appwrite": { "method": "listProviders", "group": "providers", - "weight": 276, + "weight": 290, "cookies": false, "type": "", "demo": "messaging\/list-providers.md", @@ -17377,7 +17708,7 @@ "x-appwrite": { "method": "createApnsProvider", "group": "providers", - "weight": 275, + "weight": 289, "cookies": false, "type": "", "demo": "messaging\/create-apns-provider.md", @@ -17552,7 +17883,7 @@ "x-appwrite": { "method": "updateApnsProvider", "group": "providers", - "weight": 288, + "weight": 302, "cookies": false, "type": "", "demo": "messaging\/update-apns-provider.md", @@ -17728,7 +18059,7 @@ "x-appwrite": { "method": "createFcmProvider", "group": "providers", - "weight": 274, + "weight": 288, "cookies": false, "type": "", "demo": "messaging\/create-fcm-provider.md", @@ -17875,7 +18206,7 @@ "x-appwrite": { "method": "updateFcmProvider", "group": "providers", - "weight": 287, + "weight": 301, "cookies": false, "type": "", "demo": "messaging\/update-fcm-provider.md", @@ -18023,7 +18354,7 @@ "x-appwrite": { "method": "createMailgunProvider", "group": "providers", - "weight": 266, + "weight": 280, "cookies": false, "type": "", "demo": "messaging\/create-mailgun-provider.md", @@ -18138,7 +18469,7 @@ "x-appwrite": { "method": "updateMailgunProvider", "group": "providers", - "weight": 279, + "weight": 293, "cookies": false, "type": "", "demo": "messaging\/update-mailgun-provider.md", @@ -18256,7 +18587,7 @@ "x-appwrite": { "method": "createMsg91Provider", "group": "providers", - "weight": 269, + "weight": 283, "cookies": false, "type": "", "demo": "messaging\/create-msg-91-provider.md", @@ -18351,7 +18682,7 @@ "x-appwrite": { "method": "updateMsg91Provider", "group": "providers", - "weight": 282, + "weight": 296, "cookies": false, "type": "", "demo": "messaging\/update-msg-91-provider.md", @@ -18449,7 +18780,7 @@ "x-appwrite": { "method": "createSendgridProvider", "group": "providers", - "weight": 267, + "weight": 281, "cookies": false, "type": "", "demo": "messaging\/create-sendgrid-provider.md", @@ -18554,7 +18885,7 @@ "x-appwrite": { "method": "updateSendgridProvider", "group": "providers", - "weight": 280, + "weight": 294, "cookies": false, "type": "", "demo": "messaging\/update-sendgrid-provider.md", @@ -18662,7 +18993,7 @@ "x-appwrite": { "method": "createSmtpProvider", "group": "providers", - "weight": 268, + "weight": 282, "cookies": false, "type": "", "demo": "messaging\/create-smtp-provider.md", @@ -18889,7 +19220,7 @@ "x-appwrite": { "method": "updateSmtpProvider", "group": "providers", - "weight": 281, + "weight": 295, "cookies": false, "type": "", "demo": "messaging\/update-smtp-provider.md", @@ -19114,7 +19445,7 @@ "x-appwrite": { "method": "createTelesignProvider", "group": "providers", - "weight": 270, + "weight": 284, "cookies": false, "type": "", "demo": "messaging\/create-telesign-provider.md", @@ -19209,7 +19540,7 @@ "x-appwrite": { "method": "updateTelesignProvider", "group": "providers", - "weight": 283, + "weight": 297, "cookies": false, "type": "", "demo": "messaging\/update-telesign-provider.md", @@ -19307,7 +19638,7 @@ "x-appwrite": { "method": "createTextmagicProvider", "group": "providers", - "weight": 271, + "weight": 285, "cookies": false, "type": "", "demo": "messaging\/create-textmagic-provider.md", @@ -19402,7 +19733,7 @@ "x-appwrite": { "method": "updateTextmagicProvider", "group": "providers", - "weight": 284, + "weight": 298, "cookies": false, "type": "", "demo": "messaging\/update-textmagic-provider.md", @@ -19500,7 +19831,7 @@ "x-appwrite": { "method": "createTwilioProvider", "group": "providers", - "weight": 272, + "weight": 286, "cookies": false, "type": "", "demo": "messaging\/create-twilio-provider.md", @@ -19595,7 +19926,7 @@ "x-appwrite": { "method": "updateTwilioProvider", "group": "providers", - "weight": 285, + "weight": 299, "cookies": false, "type": "", "demo": "messaging\/update-twilio-provider.md", @@ -19693,7 +20024,7 @@ "x-appwrite": { "method": "createVonageProvider", "group": "providers", - "weight": 273, + "weight": 287, "cookies": false, "type": "", "demo": "messaging\/create-vonage-provider.md", @@ -19788,7 +20119,7 @@ "x-appwrite": { "method": "updateVonageProvider", "group": "providers", - "weight": 286, + "weight": 300, "cookies": false, "type": "", "demo": "messaging\/update-vonage-provider.md", @@ -19886,7 +20217,7 @@ "x-appwrite": { "method": "getProvider", "group": "providers", - "weight": 278, + "weight": 292, "cookies": false, "type": "", "demo": "messaging\/get-provider.md", @@ -19939,7 +20270,7 @@ "x-appwrite": { "method": "deleteProvider", "group": "providers", - "weight": 289, + "weight": 303, "cookies": false, "type": "", "demo": "messaging\/delete-provider.md", @@ -20001,7 +20332,7 @@ "x-appwrite": { "method": "listProviderLogs", "group": "providers", - "weight": 277, + "weight": 291, "cookies": false, "type": "", "demo": "messaging\/list-provider-logs.md", @@ -20076,7 +20407,7 @@ "x-appwrite": { "method": "listSubscriberLogs", "group": "subscribers", - "weight": 298, + "weight": 312, "cookies": false, "type": "", "demo": "messaging\/list-subscriber-logs.md", @@ -20151,7 +20482,7 @@ "x-appwrite": { "method": "listTopics", "group": "topics", - "weight": 291, + "weight": 305, "cookies": false, "type": "", "demo": "messaging\/list-topics.md", @@ -20225,7 +20556,7 @@ "x-appwrite": { "method": "createTopic", "group": "topics", - "weight": 290, + "weight": 304, "cookies": false, "type": "", "demo": "messaging\/create-topic.md", @@ -20308,7 +20639,7 @@ "x-appwrite": { "method": "getTopic", "group": "topics", - "weight": 293, + "weight": 307, "cookies": false, "type": "", "demo": "messaging\/get-topic.md", @@ -20368,7 +20699,7 @@ "x-appwrite": { "method": "updateTopic", "group": "topics", - "weight": 294, + "weight": 308, "cookies": false, "type": "", "demo": "messaging\/update-topic.md", @@ -20445,7 +20776,7 @@ "x-appwrite": { "method": "deleteTopic", "group": "topics", - "weight": 295, + "weight": 309, "cookies": false, "type": "", "demo": "messaging\/delete-topic.md", @@ -20507,7 +20838,7 @@ "x-appwrite": { "method": "listTopicLogs", "group": "topics", - "weight": 292, + "weight": 306, "cookies": false, "type": "", "demo": "messaging\/list-topic-logs.md", @@ -20582,7 +20913,7 @@ "x-appwrite": { "method": "listSubscribers", "group": "subscribers", - "weight": 297, + "weight": 311, "cookies": false, "type": "", "demo": "messaging\/list-subscribers.md", @@ -20666,7 +20997,7 @@ "x-appwrite": { "method": "createSubscriber", "group": "subscribers", - "weight": 296, + "weight": 310, "cookies": false, "type": "", "demo": "messaging\/create-subscriber.md", @@ -20756,7 +21087,7 @@ "x-appwrite": { "method": "getSubscriber", "group": "subscribers", - "weight": 299, + "weight": 313, "cookies": false, "type": "", "demo": "messaging\/get-subscriber.md", @@ -20819,7 +21150,7 @@ "x-appwrite": { "method": "deleteSubscriber", "group": "subscribers", - "weight": 300, + "weight": 314, "cookies": false, "type": "", "demo": "messaging\/delete-subscriber.md", @@ -20894,7 +21225,7 @@ "x-appwrite": { "method": "list", "group": null, - "weight": 258, + "weight": 272, "cookies": false, "type": "", "demo": "migrations\/list.md", @@ -20968,7 +21299,7 @@ "x-appwrite": { "method": "createAppwriteMigration", "group": null, - "weight": 253, + "weight": 267, "cookies": false, "type": "", "demo": "migrations\/create-appwrite-migration.md", @@ -21056,7 +21387,7 @@ "x-appwrite": { "method": "getAppwriteReport", "group": null, - "weight": 260, + "weight": 274, "cookies": false, "type": "", "demo": "migrations\/get-appwrite-report.md", @@ -21149,7 +21480,7 @@ "x-appwrite": { "method": "createCsvMigration", "group": null, - "weight": 257, + "weight": 271, "cookies": false, "type": "", "demo": "migrations\/create-csv-migration.md", @@ -21233,7 +21564,7 @@ "x-appwrite": { "method": "createFirebaseMigration", "group": null, - "weight": 254, + "weight": 268, "cookies": false, "type": "", "demo": "migrations\/create-firebase-migration.md", @@ -21309,7 +21640,7 @@ "x-appwrite": { "method": "getFirebaseReport", "group": null, - "weight": 261, + "weight": 275, "cookies": false, "type": "", "demo": "migrations\/get-firebase-report.md", @@ -21381,7 +21712,7 @@ "x-appwrite": { "method": "createNHostMigration", "group": null, - "weight": 256, + "weight": 270, "cookies": false, "type": "", "demo": "migrations\/create-n-host-migration.md", @@ -21492,7 +21823,7 @@ "x-appwrite": { "method": "getNHostReport", "group": null, - "weight": 263, + "weight": 277, "cookies": false, "type": "", "demo": "migrations\/get-n-host-report.md", @@ -21625,7 +21956,7 @@ "x-appwrite": { "method": "createSupabaseMigration", "group": null, - "weight": 255, + "weight": 269, "cookies": false, "type": "", "demo": "migrations\/create-supabase-migration.md", @@ -21730,7 +22061,7 @@ "x-appwrite": { "method": "getSupabaseReport", "group": null, - "weight": 262, + "weight": 276, "cookies": false, "type": "", "demo": "migrations\/get-supabase-report.md", @@ -21854,7 +22185,7 @@ "x-appwrite": { "method": "get", "group": null, - "weight": 259, + "weight": 273, "cookies": false, "type": "", "demo": "migrations\/get.md", @@ -21912,7 +22243,7 @@ "x-appwrite": { "method": "retry", "group": null, - "weight": 264, + "weight": 278, "cookies": false, "type": "", "demo": "migrations\/retry.md", @@ -21963,7 +22294,7 @@ "x-appwrite": { "method": "delete", "group": null, - "weight": 265, + "weight": 279, "cookies": false, "type": "", "demo": "migrations\/delete.md", @@ -22023,7 +22354,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 148, + "weight": 156, "cookies": false, "type": "", "demo": "project\/get-usage.md", @@ -22111,7 +22442,7 @@ "x-appwrite": { "method": "listVariables", "group": null, - "weight": 150, + "weight": 158, "cookies": false, "type": "", "demo": "project\/list-variables.md", @@ -22157,7 +22488,7 @@ "x-appwrite": { "method": "createVariable", "group": null, - "weight": 149, + "weight": 157, "cookies": false, "type": "", "demo": "project\/create-variable.md", @@ -22235,7 +22566,7 @@ "x-appwrite": { "method": "getVariable", "group": null, - "weight": 151, + "weight": 159, "cookies": false, "type": "", "demo": "project\/get-variable.md", @@ -22293,7 +22624,7 @@ "x-appwrite": { "method": "updateVariable", "group": null, - "weight": 152, + "weight": 160, "cookies": false, "type": "", "demo": "project\/update-variable.md", @@ -22373,7 +22704,7 @@ "x-appwrite": { "method": "deleteVariable", "group": null, - "weight": 153, + "weight": 161, "cookies": false, "type": "", "demo": "project\/delete-variable.md", @@ -22433,7 +22764,7 @@ "x-appwrite": { "method": "list", "group": "projects", - "weight": 436, + "weight": 450, "cookies": false, "type": "", "demo": "projects\/list.md", @@ -22505,7 +22836,7 @@ "x-appwrite": { "method": "create", "group": "projects", - "weight": 102, + "weight": 107, "cookies": false, "type": "", "demo": "projects\/create.md", @@ -22639,7 +22970,7 @@ "x-appwrite": { "method": "get", "group": "projects", - "weight": 103, + "weight": 108, "cookies": false, "type": "", "demo": "projects\/get.md", @@ -22697,7 +23028,7 @@ "x-appwrite": { "method": "update", "group": "projects", - "weight": 104, + "weight": 109, "cookies": false, "type": "", "demo": "projects\/update.md", @@ -22812,7 +23143,7 @@ "x-appwrite": { "method": "delete", "group": "projects", - "weight": 121, + "weight": 126, "cookies": false, "type": "", "demo": "projects\/delete.md", @@ -22872,7 +23203,7 @@ "x-appwrite": { "method": "updateApiStatus", "group": "projects", - "weight": 108, + "weight": 113, "cookies": false, "type": "", "demo": "projects\/update-api-status.md", @@ -23026,7 +23357,7 @@ "x-appwrite": { "method": "updateApiStatusAll", "group": "projects", - "weight": 109, + "weight": 114, "cookies": false, "type": "", "demo": "projects\/update-api-status-all.md", @@ -23163,7 +23494,7 @@ "x-appwrite": { "method": "updateAuthDuration", "group": "auth", - "weight": 114, + "weight": 119, "cookies": false, "type": "", "demo": "projects\/update-auth-duration.md", @@ -23242,7 +23573,7 @@ "x-appwrite": { "method": "updateAuthLimit", "group": "auth", - "weight": 113, + "weight": 118, "cookies": false, "type": "", "demo": "projects\/update-auth-limit.md", @@ -23321,7 +23652,7 @@ "x-appwrite": { "method": "updateAuthSessionsLimit", "group": "auth", - "weight": 119, + "weight": 124, "cookies": false, "type": "", "demo": "projects\/update-auth-sessions-limit.md", @@ -23400,7 +23731,7 @@ "x-appwrite": { "method": "updateMembershipsPrivacy", "group": "auth", - "weight": 112, + "weight": 117, "cookies": false, "type": "", "demo": "projects\/update-memberships-privacy.md", @@ -23491,7 +23822,7 @@ "x-appwrite": { "method": "updateMockNumbers", "group": "auth", - "weight": 120, + "weight": 125, "cookies": false, "type": "", "demo": "projects\/update-mock-numbers.md", @@ -23573,7 +23904,7 @@ "x-appwrite": { "method": "updateAuthPasswordDictionary", "group": "auth", - "weight": 117, + "weight": 122, "cookies": false, "type": "", "demo": "projects\/update-auth-password-dictionary.md", @@ -23652,7 +23983,7 @@ "x-appwrite": { "method": "updateAuthPasswordHistory", "group": "auth", - "weight": 116, + "weight": 121, "cookies": false, "type": "", "demo": "projects\/update-auth-password-history.md", @@ -23731,7 +24062,7 @@ "x-appwrite": { "method": "updatePersonalDataCheck", "group": "auth", - "weight": 118, + "weight": 123, "cookies": false, "type": "", "demo": "projects\/update-personal-data-check.md", @@ -23786,6 +24117,453 @@ } } }, + "\/projects\/{projectId}\/auth\/plans": { + "get": { + "summary": "List auth plans", + "operationId": "projectsListAuthPlans", + "tags": [ + "projects" + ], + "description": false, + "responses": { + "200": { + "description": "Documents List", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/documentList" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listAuthPlans", + "group": "authPlans", + "weight": 263, + "cookies": false, + "type": "", + "demo": "projects\/list-auth-plans.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/list-auth-plans.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "projects.read", + "platforms": [ + "console" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "projectId", + "description": "Project unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "default": [] + }, + "in": "query" + } + ] + }, + "post": { + "summary": "Create auth plan", + "operationId": "projectsCreateAuthPlan", + "tags": [ + "projects" + ], + "description": false, + "responses": { + "201": { + "description": "Any", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/any" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createAuthPlan", + "group": "authPlans", + "weight": 262, + "cookies": false, + "type": "", + "demo": "projects\/create-auth-plan.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/create-auth-plan.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "projects.write", + "platforms": [ + "console" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "projectId", + "description": "Project unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "planId": { + "type": "string", + "description": "Plan unique ID.", + "x-example": "" + }, + "name": { + "type": "string", + "description": "Plan name.", + "x-example": "" + }, + "price": { + "type": "integer", + "description": "Price in cents.", + "x-example": null + }, + "currency": { + "type": "string", + "description": "Currency code (3 letters).", + "x-example": "" + }, + "interval": { + "type": "string", + "description": "Billing interval.", + "x-example": "month", + "enum": [ + "month", + "year", + "week", + "day" + ], + "x-enum-name": null, + "x-enum-keys": [] + }, + "description": { + "type": "string", + "description": "Plan description.", + "x-example": "" + }, + "features": { + "type": "array", + "description": "Plan features list.", + "x-example": null, + "items": { + "type": "string" + } + }, + "maxUsers": { + "type": "integer", + "description": "Maximum users allowed.", + "x-example": null + }, + "isDefault": { + "type": "boolean", + "description": "Is this the default plan.", + "x-example": false + }, + "isFree": { + "type": "boolean", + "description": "Is this a free plan.", + "x-example": false + } + }, + "required": [ + "planId", + "name", + "price", + "currency" + ] + } + } + } + } + } + }, + "\/projects\/{projectId}\/auth\/plans\/{planId}": { + "get": { + "summary": "Get auth plan", + "operationId": "projectsGetAuthPlan", + "tags": [ + "projects" + ], + "description": false, + "responses": { + "200": { + "description": "Any", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/any" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getAuthPlan", + "group": "authPlans", + "weight": 264, + "cookies": false, + "type": "", + "demo": "projects\/get-auth-plan.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/get-auth-plan.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "projects.read", + "platforms": [ + "console" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "projectId", + "description": "Project unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "planId", + "description": "Plan ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + }, + "put": { + "summary": "Update auth plan", + "operationId": "projectsUpdateAuthPlan", + "tags": [ + "projects" + ], + "description": false, + "responses": { + "200": { + "description": "Any", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/any" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateAuthPlan", + "group": "authPlans", + "weight": 265, + "cookies": false, + "type": "", + "demo": "projects\/update-auth-plan.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-auth-plan.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "projects.write", + "platforms": [ + "console" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "projectId", + "description": "Project unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "planId", + "description": "Plan ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Plan name.", + "x-example": "" + }, + "description": { + "type": "string", + "description": "Plan description.", + "x-example": "" + }, + "features": { + "type": "array", + "description": "Plan features list.", + "x-example": null, + "items": { + "type": "string" + } + }, + "maxUsers": { + "type": "integer", + "description": "Maximum users allowed.", + "x-example": null + }, + "isDefault": { + "type": "boolean", + "description": "Is this the default plan.", + "x-example": false + } + } + } + } + } + } + }, + "delete": { + "summary": "Delete auth plan", + "operationId": "projectsDeleteAuthPlan", + "tags": [ + "projects" + ], + "description": false, + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteAuthPlan", + "group": "authPlans", + "weight": 266, + "cookies": false, + "type": "", + "demo": "projects\/delete-auth-plan.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/delete-auth-plan.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "projects.write", + "platforms": [ + "console" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "projectId", + "description": "Project unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + }, + { + "name": "planId", + "description": "Plan ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + } + }, "\/projects\/{projectId}\/auth\/session-alerts": { "patch": { "summary": "Update project sessions emails", @@ -23810,7 +24588,7 @@ "x-appwrite": { "method": "updateSessionAlerts", "group": "auth", - "weight": 111, + "weight": 116, "cookies": false, "type": "", "demo": "projects\/update-session-alerts.md", @@ -23889,7 +24667,7 @@ "x-appwrite": { "method": "updateSessionInvalidation", "group": "auth", - "weight": 147, + "weight": 152, "cookies": false, "type": "", "demo": "projects\/update-session-invalidation.md", @@ -23944,6 +24722,201 @@ } } }, + "\/projects\/{projectId}\/auth\/subscriptions": { + "get": { + "summary": "Get auth subscription configuration", + "operationId": "projectsGetSubscriptionsConfig", + "tags": [ + "projects" + ], + "description": false, + "responses": { + "200": { + "description": "Project", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/project" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getSubscriptionsConfig", + "group": "auth", + "weight": 154, + "cookies": false, + "type": "", + "demo": "projects\/get-subscriptions-config.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/get-subscriptions-config.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "projects.read", + "platforms": [ + "console" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "projectId", + "description": "Project unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + }, + "put": { + "summary": "Configure auth subscriptions", + "operationId": "projectsConfigureSubscriptions", + "tags": [ + "projects" + ], + "description": false, + "responses": { + "200": { + "description": "Project", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/project" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "configureSubscriptions", + "group": "auth", + "weight": 153, + "cookies": false, + "type": "", + "demo": "projects\/configure-subscriptions.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/configure-subscriptions.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "projects.write", + "platforms": [ + "console" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "projectId", + "description": "Project unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "stripeSecretKey": { + "type": "string", + "description": "Stripe secret key.", + "x-example": null + } + }, + "required": [ + "stripeSecretKey" + ] + } + } + } + } + }, + "delete": { + "summary": "Remove auth subscription configuration", + "operationId": "projectsRemoveSubscriptionsConfig", + "tags": [ + "projects" + ], + "description": false, + "responses": { + "200": { + "description": "Project", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/project" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "removeSubscriptionsConfig", + "group": "auth", + "weight": 155, + "cookies": false, + "type": "", + "demo": "projects\/remove-subscriptions-config.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/remove-subscriptions-config.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "projects.write", + "platforms": [ + "console" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "projectId", + "description": "Project unique ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ] + } + }, "\/projects\/{projectId}\/auth\/{method}": { "patch": { "summary": "Update project auth method status. Use this endpoint to enable or disable a given auth method for this project.", @@ -23968,7 +24941,7 @@ "x-appwrite": { "method": "updateAuthStatus", "group": "auth", - "weight": 115, + "weight": 120, "cookies": false, "type": "", "demo": "projects\/update-auth-status.md", @@ -24068,7 +25041,7 @@ "x-appwrite": { "method": "listDevKeys", "group": "devKeys", - "weight": 434, + "weight": 448, "cookies": false, "type": "", "demo": "projects\/list-dev-keys.md", @@ -24136,7 +25109,7 @@ "x-appwrite": { "method": "createDevKey", "group": "devKeys", - "weight": 431, + "weight": 445, "cookies": false, "type": "", "demo": "projects\/create-dev-key.md", @@ -24221,7 +25194,7 @@ "x-appwrite": { "method": "getDevKey", "group": "devKeys", - "weight": 433, + "weight": 447, "cookies": false, "type": "", "demo": "projects\/get-dev-key.md", @@ -24289,7 +25262,7 @@ "x-appwrite": { "method": "updateDevKey", "group": "devKeys", - "weight": 432, + "weight": 446, "cookies": false, "type": "", "demo": "projects\/update-dev-key.md", @@ -24375,7 +25348,7 @@ "x-appwrite": { "method": "deleteDevKey", "group": "devKeys", - "weight": 435, + "weight": 449, "cookies": false, "type": "", "demo": "projects\/delete-dev-key.md", @@ -24445,7 +25418,7 @@ "x-appwrite": { "method": "createJWT", "group": "auth", - "weight": 133, + "weight": 138, "cookies": false, "type": "", "demo": "projects\/create-jwt.md", @@ -24532,7 +25505,7 @@ "x-appwrite": { "method": "listKeys", "group": "keys", - "weight": 129, + "weight": 134, "cookies": false, "type": "", "demo": "projects\/list-keys.md", @@ -24590,7 +25563,7 @@ "x-appwrite": { "method": "createKey", "group": "keys", - "weight": 128, + "weight": 133, "cookies": false, "type": "", "demo": "projects\/create-key.md", @@ -24683,7 +25656,7 @@ "x-appwrite": { "method": "getKey", "group": "keys", - "weight": 130, + "weight": 135, "cookies": false, "type": "", "demo": "projects\/get-key.md", @@ -24751,7 +25724,7 @@ "x-appwrite": { "method": "updateKey", "group": "keys", - "weight": 131, + "weight": 136, "cookies": false, "type": "", "demo": "projects\/update-key.md", @@ -24845,7 +25818,7 @@ "x-appwrite": { "method": "deleteKey", "group": "keys", - "weight": 132, + "weight": 137, "cookies": false, "type": "", "demo": "projects\/delete-key.md", @@ -24915,7 +25888,7 @@ "x-appwrite": { "method": "updateOAuth2", "group": "auth", - "weight": 110, + "weight": 115, "cookies": false, "type": "", "demo": "projects\/update-o-auth-2.md", @@ -25053,7 +26026,7 @@ "x-appwrite": { "method": "listPlatforms", "group": "platforms", - "weight": 135, + "weight": 140, "cookies": false, "type": "", "demo": "projects\/list-platforms.md", @@ -25111,7 +26084,7 @@ "x-appwrite": { "method": "createPlatform", "group": "platforms", - "weight": 134, + "weight": 139, "cookies": false, "type": "", "demo": "projects\/create-platform.md", @@ -25230,7 +26203,7 @@ "x-appwrite": { "method": "getPlatform", "group": "platforms", - "weight": 136, + "weight": 141, "cookies": false, "type": "", "demo": "projects\/get-platform.md", @@ -25298,7 +26271,7 @@ "x-appwrite": { "method": "updatePlatform", "group": "platforms", - "weight": 137, + "weight": 142, "cookies": false, "type": "", "demo": "projects\/update-platform.md", @@ -25393,7 +26366,7 @@ "x-appwrite": { "method": "deletePlatform", "group": "platforms", - "weight": 138, + "weight": 143, "cookies": false, "type": "", "demo": "projects\/delete-platform.md", @@ -25463,7 +26436,7 @@ "x-appwrite": { "method": "updateServiceStatus", "group": "projects", - "weight": 106, + "weight": 111, "cookies": false, "type": "", "demo": "projects\/update-service-status.md", @@ -25520,6 +26493,7 @@ "sites", "functions", "graphql", + "authPlans", "messaging" ], "x-enum-name": "ApiService", @@ -25565,7 +26539,7 @@ "x-appwrite": { "method": "updateServiceStatusAll", "group": "projects", - "weight": 107, + "weight": 112, "cookies": false, "type": "", "demo": "projects\/update-service-status-all.md", @@ -25644,7 +26618,7 @@ "x-appwrite": { "method": "updateSmtp", "group": "templates", - "weight": 139, + "weight": 144, "cookies": false, "type": "", "demo": "projects\/update-smtp.md", @@ -25836,7 +26810,7 @@ "x-appwrite": { "method": "createSmtpTest", "group": "templates", - "weight": 140, + "weight": 145, "cookies": false, "type": "", "demo": "projects\/create-smtp-test.md", @@ -26045,7 +27019,7 @@ "x-appwrite": { "method": "updateTeam", "group": "projects", - "weight": 105, + "weight": 110, "cookies": false, "type": "", "demo": "projects\/update-team.md", @@ -26124,7 +27098,7 @@ "x-appwrite": { "method": "getEmailTemplate", "group": "templates", - "weight": 142, + "weight": 147, "cookies": false, "type": "", "demo": "projects\/get-email-template.md", @@ -26348,7 +27322,7 @@ "x-appwrite": { "method": "updateEmailTemplate", "group": "templates", - "weight": 144, + "weight": 149, "cookies": false, "type": "", "demo": "projects\/update-email-template.md", @@ -26612,7 +27586,7 @@ "x-appwrite": { "method": "deleteEmailTemplate", "group": "templates", - "weight": 146, + "weight": 151, "cookies": false, "type": "", "demo": "projects\/delete-email-template.md", @@ -26838,7 +27812,7 @@ "x-appwrite": { "method": "getSmsTemplate", "group": "templates", - "weight": 141, + "weight": 146, "cookies": false, "type": "", "demo": "projects\/get-sms-template.md", @@ -27121,7 +28095,7 @@ "x-appwrite": { "method": "updateSmsTemplate", "group": "templates", - "weight": 143, + "weight": 148, "cookies": false, "type": "", "demo": "projects\/update-sms-template.md", @@ -27427,7 +28401,7 @@ "x-appwrite": { "method": "deleteSmsTemplate", "group": "templates", - "weight": 145, + "weight": 150, "cookies": false, "type": "", "demo": "projects\/delete-sms-template.md", @@ -27712,7 +28686,7 @@ "x-appwrite": { "method": "listWebhooks", "group": "webhooks", - "weight": 123, + "weight": 128, "cookies": false, "type": "", "demo": "projects\/list-webhooks.md", @@ -27770,7 +28744,7 @@ "x-appwrite": { "method": "createWebhook", "group": "webhooks", - "weight": 122, + "weight": 127, "cookies": false, "type": "", "demo": "projects\/create-webhook.md", @@ -27885,7 +28859,7 @@ "x-appwrite": { "method": "getWebhook", "group": "webhooks", - "weight": 124, + "weight": 129, "cookies": false, "type": "", "demo": "projects\/get-webhook.md", @@ -27953,7 +28927,7 @@ "x-appwrite": { "method": "updateWebhook", "group": "webhooks", - "weight": 125, + "weight": 130, "cookies": false, "type": "", "demo": "projects\/update-webhook.md", @@ -28069,7 +29043,7 @@ "x-appwrite": { "method": "deleteWebhook", "group": "webhooks", - "weight": 127, + "weight": 132, "cookies": false, "type": "", "demo": "projects\/delete-webhook.md", @@ -28139,7 +29113,7 @@ "x-appwrite": { "method": "updateWebhookSignature", "group": "webhooks", - "weight": 126, + "weight": 131, "cookies": false, "type": "", "demo": "projects\/update-webhook-signature.md", @@ -28209,7 +29183,7 @@ "x-appwrite": { "method": "listRules", "group": null, - "weight": 502, + "weight": 516, "cookies": false, "type": "", "demo": "proxy\/list-rules.md", @@ -28283,7 +29257,7 @@ "x-appwrite": { "method": "createAPIRule", "group": null, - "weight": 497, + "weight": 511, "cookies": false, "type": "", "demo": "proxy\/create-api-rule.md", @@ -28350,7 +29324,7 @@ "x-appwrite": { "method": "createFunctionRule", "group": null, - "weight": 499, + "weight": 513, "cookies": false, "type": "", "demo": "proxy\/create-function-rule.md", @@ -28428,7 +29402,7 @@ "x-appwrite": { "method": "createRedirectRule", "group": null, - "weight": 500, + "weight": 514, "cookies": false, "type": "", "demo": "proxy\/create-redirect-rule.md", @@ -28541,7 +29515,7 @@ "x-appwrite": { "method": "createSiteRule", "group": null, - "weight": 498, + "weight": 512, "cookies": false, "type": "", "demo": "proxy\/create-site-rule.md", @@ -28619,7 +29593,7 @@ "x-appwrite": { "method": "getRule", "group": null, - "weight": 501, + "weight": 515, "cookies": false, "type": "", "demo": "proxy\/get-rule.md", @@ -28670,7 +29644,7 @@ "x-appwrite": { "method": "deleteRule", "group": null, - "weight": 503, + "weight": 517, "cookies": false, "type": "", "demo": "proxy\/delete-rule.md", @@ -28730,7 +29704,7 @@ "x-appwrite": { "method": "updateRuleVerification", "group": null, - "weight": 504, + "weight": 518, "cookies": false, "type": "", "demo": "proxy\/update-rule-verification.md", @@ -28790,7 +29764,7 @@ "x-appwrite": { "method": "list", "group": "sites", - "weight": 469, + "weight": 483, "cookies": false, "type": "", "demo": "sites\/list.md", @@ -28860,7 +29834,7 @@ "x-appwrite": { "method": "create", "group": "sites", - "weight": 467, + "weight": 481, "cookies": false, "type": "", "demo": "sites\/create.md", @@ -29109,7 +30083,7 @@ "x-appwrite": { "method": "listFrameworks", "group": "frameworks", - "weight": 472, + "weight": 486, "cookies": false, "type": "", "demo": "sites\/list-frameworks.md", @@ -29158,7 +30132,7 @@ "x-appwrite": { "method": "listSpecifications", "group": "frameworks", - "weight": 495, + "weight": 509, "cookies": false, "type": "", "demo": "sites\/list-specifications.md", @@ -29208,7 +30182,7 @@ "x-appwrite": { "method": "listTemplates", "group": "templates", - "weight": 491, + "weight": 505, "cookies": false, "type": "", "demo": "sites\/list-templates.md", @@ -29308,7 +30282,7 @@ "x-appwrite": { "method": "getTemplate", "group": "templates", - "weight": 492, + "weight": 506, "cookies": false, "type": "", "demo": "sites\/get-template.md", @@ -29368,7 +30342,7 @@ "x-appwrite": { "method": "listUsage", "group": null, - "weight": 493, + "weight": 507, "cookies": false, "type": "", "demo": "sites\/list-usage.md", @@ -29440,7 +30414,7 @@ "x-appwrite": { "method": "get", "group": "sites", - "weight": 468, + "weight": 482, "cookies": false, "type": "", "demo": "sites\/get.md", @@ -29499,7 +30473,7 @@ "x-appwrite": { "method": "update", "group": "sites", - "weight": 470, + "weight": 484, "cookies": false, "type": "", "demo": "sites\/update.md", @@ -29744,7 +30718,7 @@ "x-appwrite": { "method": "delete", "group": "sites", - "weight": 471, + "weight": 485, "cookies": false, "type": "", "demo": "sites\/delete.md", @@ -29805,7 +30779,7 @@ "x-appwrite": { "method": "updateSiteDeployment", "group": "sites", - "weight": 478, + "weight": 492, "cookies": false, "type": "", "demo": "sites\/update-site-deployment.md", @@ -29885,7 +30859,7 @@ "x-appwrite": { "method": "listDeployments", "group": "deployments", - "weight": 477, + "weight": 491, "cookies": false, "type": "", "demo": "sites\/list-deployments.md", @@ -29968,7 +30942,7 @@ "x-appwrite": { "method": "createDeployment", "group": "deployments", - "weight": 473, + "weight": 487, "cookies": false, "type": "upload", "demo": "sites\/create-deployment.md", @@ -30069,7 +31043,7 @@ "x-appwrite": { "method": "createDuplicateDeployment", "group": "deployments", - "weight": 481, + "weight": 495, "cookies": false, "type": "", "demo": "sites\/create-duplicate-deployment.md", @@ -30149,7 +31123,7 @@ "x-appwrite": { "method": "createTemplateDeployment", "group": "deployments", - "weight": 474, + "weight": 488, "cookies": false, "type": "", "demo": "sites\/create-template-deployment.md", @@ -30252,7 +31226,7 @@ "x-appwrite": { "method": "createVcsDeployment", "group": "deployments", - "weight": 475, + "weight": 489, "cookies": false, "type": "", "demo": "sites\/create-vcs-deployment.md", @@ -30350,7 +31324,7 @@ "x-appwrite": { "method": "getDeployment", "group": "deployments", - "weight": 476, + "weight": 490, "cookies": false, "type": "", "demo": "sites\/get-deployment.md", @@ -30412,7 +31386,7 @@ "x-appwrite": { "method": "deleteDeployment", "group": "deployments", - "weight": 479, + "weight": 493, "cookies": false, "type": "", "demo": "sites\/delete-deployment.md", @@ -30476,7 +31450,7 @@ "x-appwrite": { "method": "getDeploymentDownload", "group": "deployments", - "weight": 480, + "weight": 494, "cookies": false, "type": "location", "demo": "sites\/get-deployment-download.md", @@ -30566,7 +31540,7 @@ "x-appwrite": { "method": "updateDeploymentStatus", "group": "deployments", - "weight": 482, + "weight": 496, "cookies": false, "type": "", "demo": "sites\/update-deployment-status.md", @@ -30637,7 +31611,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 484, + "weight": 498, "cookies": false, "type": "", "demo": "sites\/list-logs.md", @@ -30708,7 +31682,7 @@ "x-appwrite": { "method": "getLog", "group": "logs", - "weight": 483, + "weight": 497, "cookies": false, "type": "", "demo": "sites\/get-log.md", @@ -30770,7 +31744,7 @@ "x-appwrite": { "method": "deleteLog", "group": "logs", - "weight": 485, + "weight": 499, "cookies": false, "type": "", "demo": "sites\/delete-log.md", @@ -30841,7 +31815,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 494, + "weight": 508, "cookies": false, "type": "", "demo": "sites\/get-usage.md", @@ -30923,7 +31897,7 @@ "x-appwrite": { "method": "listVariables", "group": "variables", - "weight": 488, + "weight": 502, "cookies": false, "type": "", "demo": "sites\/list-variables.md", @@ -30982,7 +31956,7 @@ "x-appwrite": { "method": "createVariable", "group": "variables", - "weight": 486, + "weight": 500, "cookies": false, "type": "", "demo": "sites\/create-variable.md", @@ -31073,7 +32047,7 @@ "x-appwrite": { "method": "getVariable", "group": "variables", - "weight": 487, + "weight": 501, "cookies": false, "type": "", "demo": "sites\/get-variable.md", @@ -31142,7 +32116,7 @@ "x-appwrite": { "method": "updateVariable", "group": "variables", - "weight": 489, + "weight": 503, "cookies": false, "type": "", "demo": "sites\/update-variable.md", @@ -31233,7 +32207,7 @@ "x-appwrite": { "method": "deleteVariable", "group": "variables", - "weight": 490, + "weight": 504, "cookies": false, "type": "", "demo": "sites\/delete-variable.md", @@ -31304,7 +32278,7 @@ "x-appwrite": { "method": "listBuckets", "group": "buckets", - "weight": 155, + "weight": 163, "cookies": false, "type": "", "demo": "storage\/list-buckets.md", @@ -31377,7 +32351,7 @@ "x-appwrite": { "method": "createBucket", "group": "buckets", - "weight": 154, + "weight": 162, "cookies": false, "type": "", "demo": "storage\/create-bucket.md", @@ -31504,7 +32478,7 @@ "x-appwrite": { "method": "getBucket", "group": "buckets", - "weight": 156, + "weight": 164, "cookies": false, "type": "", "demo": "storage\/get-bucket.md", @@ -31563,7 +32537,7 @@ "x-appwrite": { "method": "updateBucket", "group": "buckets", - "weight": 157, + "weight": 165, "cookies": false, "type": "", "demo": "storage\/update-bucket.md", @@ -31687,7 +32661,7 @@ "x-appwrite": { "method": "deleteBucket", "group": "buckets", - "weight": 158, + "weight": 166, "cookies": false, "type": "", "demo": "storage\/delete-bucket.md", @@ -31748,7 +32722,7 @@ "x-appwrite": { "method": "listFiles", "group": "files", - "weight": 160, + "weight": 168, "cookies": false, "type": "", "demo": "storage\/list-files.md", @@ -31834,7 +32808,7 @@ "x-appwrite": { "method": "createFile", "group": "files", - "weight": 159, + "weight": 167, "cookies": false, "type": "upload", "demo": "storage\/create-file.md", @@ -31932,7 +32906,7 @@ "x-appwrite": { "method": "getFile", "group": "files", - "weight": 161, + "weight": 169, "cookies": false, "type": "", "demo": "storage\/get-file.md", @@ -32004,7 +32978,7 @@ "x-appwrite": { "method": "updateFile", "group": "files", - "weight": 166, + "weight": 174, "cookies": false, "type": "", "demo": "storage\/update-file.md", @@ -32093,7 +33067,7 @@ "x-appwrite": { "method": "deleteFile", "group": "files", - "weight": 167, + "weight": 175, "cookies": false, "type": "", "demo": "storage\/delete-file.md", @@ -32160,7 +33134,7 @@ "x-appwrite": { "method": "getFileDownload", "group": "files", - "weight": 163, + "weight": 171, "cookies": false, "type": "location", "demo": "storage\/get-file-download.md", @@ -32238,7 +33212,7 @@ "x-appwrite": { "method": "getFilePreview", "group": "files", - "weight": 162, + "weight": 170, "cookies": false, "type": "location", "demo": "storage\/get-file-preview.md", @@ -32466,7 +33440,7 @@ "x-appwrite": { "method": "getFileView", "group": "files", - "weight": 164, + "weight": 172, "cookies": false, "type": "location", "demo": "storage\/get-file-view.md", @@ -32551,7 +33525,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 168, + "weight": 176, "cookies": false, "type": "", "demo": "storage\/get-usage.md", @@ -32623,7 +33597,7 @@ "x-appwrite": { "method": "getBucketUsage", "group": null, - "weight": 169, + "weight": 177, "cookies": false, "type": "", "demo": "storage\/get-bucket-usage.md", @@ -32705,7 +33679,7 @@ "x-appwrite": { "method": "list", "group": "tablesdb", - "weight": 376, + "weight": 390, "cookies": false, "type": "", "demo": "tablesdb\/list.md", @@ -32778,7 +33752,7 @@ "x-appwrite": { "method": "create", "group": "tablesdb", - "weight": 372, + "weight": 386, "cookies": false, "type": "", "demo": "tablesdb\/create.md", @@ -32857,7 +33831,7 @@ "x-appwrite": { "method": "listUsage", "group": null, - "weight": 378, + "weight": 392, "cookies": false, "type": "", "demo": "tablesdb\/list-usage.md", @@ -32954,7 +33928,7 @@ "x-appwrite": { "method": "get", "group": "tablesdb", - "weight": 373, + "weight": 387, "cookies": false, "type": "", "demo": "tablesdb\/get.md", @@ -33013,7 +33987,7 @@ "x-appwrite": { "method": "update", "group": "tablesdb", - "weight": 374, + "weight": 388, "cookies": false, "type": "", "demo": "tablesdb\/update.md", @@ -33089,7 +34063,7 @@ "x-appwrite": { "method": "delete", "group": "tablesdb", - "weight": 375, + "weight": 389, "cookies": false, "type": "", "demo": "tablesdb\/delete.md", @@ -33150,7 +34124,7 @@ "x-appwrite": { "method": "listTables", "group": "tables", - "weight": 383, + "weight": 397, "cookies": false, "type": "", "demo": "tablesdb\/list-tables.md", @@ -33236,7 +34210,7 @@ "x-appwrite": { "method": "createTable", "group": "tables", - "weight": 379, + "weight": 393, "cookies": false, "type": "", "demo": "tablesdb\/create-table.md", @@ -33343,7 +34317,7 @@ "x-appwrite": { "method": "getTable", "group": "tables", - "weight": 380, + "weight": 394, "cookies": false, "type": "", "demo": "tablesdb\/get-table.md", @@ -33415,7 +34389,7 @@ "x-appwrite": { "method": "updateTable", "group": "tables", - "weight": 381, + "weight": 395, "cookies": false, "type": "", "demo": "tablesdb\/update-table.md", @@ -33517,7 +34491,7 @@ "x-appwrite": { "method": "deleteTable", "group": "tables", - "weight": 382, + "weight": 396, "cookies": false, "type": "", "demo": "tablesdb\/delete-table.md", @@ -33591,7 +34565,7 @@ "x-appwrite": { "method": "listColumns", "group": "columns", - "weight": 388, + "weight": 402, "cookies": false, "type": "", "demo": "tablesdb\/list-columns.md", @@ -33678,7 +34652,7 @@ "x-appwrite": { "method": "createBooleanColumn", "group": "columns", - "weight": 389, + "weight": 403, "cookies": false, "type": "", "demo": "tablesdb\/create-boolean-column.md", @@ -33787,7 +34761,7 @@ "x-appwrite": { "method": "updateBooleanColumn", "group": "columns", - "weight": 390, + "weight": 404, "cookies": false, "type": "", "demo": "tablesdb\/update-boolean-column.md", @@ -33901,7 +34875,7 @@ "x-appwrite": { "method": "createDatetimeColumn", "group": "columns", - "weight": 391, + "weight": 405, "cookies": false, "type": "", "demo": "tablesdb\/create-datetime-column.md", @@ -34010,7 +34984,7 @@ "x-appwrite": { "method": "updateDatetimeColumn", "group": "columns", - "weight": 392, + "weight": 406, "cookies": false, "type": "", "demo": "tablesdb\/update-datetime-column.md", @@ -34124,7 +35098,7 @@ "x-appwrite": { "method": "createEmailColumn", "group": "columns", - "weight": 393, + "weight": 407, "cookies": false, "type": "", "demo": "tablesdb\/create-email-column.md", @@ -34233,7 +35207,7 @@ "x-appwrite": { "method": "updateEmailColumn", "group": "columns", - "weight": 394, + "weight": 408, "cookies": false, "type": "", "demo": "tablesdb\/update-email-column.md", @@ -34347,7 +35321,7 @@ "x-appwrite": { "method": "createEnumColumn", "group": "columns", - "weight": 395, + "weight": 409, "cookies": false, "type": "", "demo": "tablesdb\/create-enum-column.md", @@ -34465,7 +35439,7 @@ "x-appwrite": { "method": "updateEnumColumn", "group": "columns", - "weight": 396, + "weight": 410, "cookies": false, "type": "", "demo": "tablesdb\/update-enum-column.md", @@ -34588,7 +35562,7 @@ "x-appwrite": { "method": "createFloatColumn", "group": "columns", - "weight": 397, + "weight": 411, "cookies": false, "type": "", "demo": "tablesdb\/create-float-column.md", @@ -34707,7 +35681,7 @@ "x-appwrite": { "method": "updateFloatColumn", "group": "columns", - "weight": 398, + "weight": 412, "cookies": false, "type": "", "demo": "tablesdb\/update-float-column.md", @@ -34831,7 +35805,7 @@ "x-appwrite": { "method": "createIntegerColumn", "group": "columns", - "weight": 399, + "weight": 413, "cookies": false, "type": "", "demo": "tablesdb\/create-integer-column.md", @@ -34950,7 +35924,7 @@ "x-appwrite": { "method": "updateIntegerColumn", "group": "columns", - "weight": 400, + "weight": 414, "cookies": false, "type": "", "demo": "tablesdb\/update-integer-column.md", @@ -35074,7 +36048,7 @@ "x-appwrite": { "method": "createIpColumn", "group": "columns", - "weight": 401, + "weight": 415, "cookies": false, "type": "", "demo": "tablesdb\/create-ip-column.md", @@ -35183,7 +36157,7 @@ "x-appwrite": { "method": "updateIpColumn", "group": "columns", - "weight": 402, + "weight": 416, "cookies": false, "type": "", "demo": "tablesdb\/update-ip-column.md", @@ -35297,7 +36271,7 @@ "x-appwrite": { "method": "createLineColumn", "group": "columns", - "weight": 403, + "weight": 417, "cookies": false, "type": "", "demo": "tablesdb\/create-line-column.md", @@ -35409,7 +36383,7 @@ "x-appwrite": { "method": "updateLineColumn", "group": "columns", - "weight": 404, + "weight": 418, "cookies": false, "type": "", "demo": "tablesdb\/update-line-column.md", @@ -35529,7 +36503,7 @@ "x-appwrite": { "method": "createPointColumn", "group": "columns", - "weight": 405, + "weight": 419, "cookies": false, "type": "", "demo": "tablesdb\/create-point-column.md", @@ -35641,7 +36615,7 @@ "x-appwrite": { "method": "updatePointColumn", "group": "columns", - "weight": 406, + "weight": 420, "cookies": false, "type": "", "demo": "tablesdb\/update-point-column.md", @@ -35761,7 +36735,7 @@ "x-appwrite": { "method": "createPolygonColumn", "group": "columns", - "weight": 407, + "weight": 421, "cookies": false, "type": "", "demo": "tablesdb\/create-polygon-column.md", @@ -35873,7 +36847,7 @@ "x-appwrite": { "method": "updatePolygonColumn", "group": "columns", - "weight": 408, + "weight": 422, "cookies": false, "type": "", "demo": "tablesdb\/update-polygon-column.md", @@ -35993,7 +36967,7 @@ "x-appwrite": { "method": "createRelationshipColumn", "group": "columns", - "weight": 409, + "weight": 423, "cookies": false, "type": "", "demo": "tablesdb\/create-relationship-column.md", @@ -36127,7 +37101,7 @@ "x-appwrite": { "method": "createStringColumn", "group": "columns", - "weight": 411, + "weight": 425, "cookies": false, "type": "", "demo": "tablesdb\/create-string-column.md", @@ -36247,7 +37221,7 @@ "x-appwrite": { "method": "updateStringColumn", "group": "columns", - "weight": 412, + "weight": 426, "cookies": false, "type": "", "demo": "tablesdb\/update-string-column.md", @@ -36366,7 +37340,7 @@ "x-appwrite": { "method": "createUrlColumn", "group": "columns", - "weight": 413, + "weight": 427, "cookies": false, "type": "", "demo": "tablesdb\/create-url-column.md", @@ -36475,7 +37449,7 @@ "x-appwrite": { "method": "updateUrlColumn", "group": "columns", - "weight": 414, + "weight": 428, "cookies": false, "type": "", "demo": "tablesdb\/update-url-column.md", @@ -36620,7 +37594,7 @@ "x-appwrite": { "method": "getColumn", "group": "columns", - "weight": 386, + "weight": 400, "cookies": false, "type": "", "demo": "tablesdb\/get-column.md", @@ -36694,7 +37668,7 @@ "x-appwrite": { "method": "deleteColumn", "group": "columns", - "weight": 387, + "weight": 401, "cookies": false, "type": "", "demo": "tablesdb\/delete-column.md", @@ -36777,7 +37751,7 @@ "x-appwrite": { "method": "updateRelationshipColumn", "group": "columns", - "weight": 410, + "weight": 424, "cookies": false, "type": "", "demo": "tablesdb\/update-relationship-column.md", @@ -36888,7 +37862,7 @@ "x-appwrite": { "method": "listIndexes", "group": "indexes", - "weight": 418, + "weight": 432, "cookies": false, "type": "", "demo": "tablesdb\/list-indexes.md", @@ -36973,7 +37947,7 @@ "x-appwrite": { "method": "createIndex", "group": "indexes", - "weight": 415, + "weight": 429, "cookies": false, "type": "", "demo": "tablesdb\/create-index.md", @@ -37105,7 +38079,7 @@ "x-appwrite": { "method": "getIndex", "group": "indexes", - "weight": 416, + "weight": 430, "cookies": false, "type": "", "demo": "tablesdb\/get-index.md", @@ -37179,7 +38153,7 @@ "x-appwrite": { "method": "deleteIndex", "group": "indexes", - "weight": 417, + "weight": 431, "cookies": false, "type": "", "demo": "tablesdb\/delete-index.md", @@ -37262,7 +38236,7 @@ "x-appwrite": { "method": "listTableLogs", "group": "tables", - "weight": 384, + "weight": 398, "cookies": false, "type": "", "demo": "tablesdb\/list-table-logs.md", @@ -37348,7 +38322,7 @@ "x-appwrite": { "method": "listRows", "group": "rows", - "weight": 427, + "weight": 441, "cookies": false, "type": "", "demo": "tablesdb\/list-rows.md", @@ -37436,7 +38410,7 @@ "x-appwrite": { "method": "createRow", "group": "rows", - "weight": 419, + "weight": 433, "cookies": false, "type": "", "demo": "tablesdb\/create-row.md", @@ -37605,7 +38579,7 @@ "x-appwrite": { "method": "upsertRows", "group": "rows", - "weight": 424, + "weight": 438, "cookies": false, "type": "", "demo": "tablesdb\/upsert-rows.md", @@ -37728,7 +38702,7 @@ "x-appwrite": { "method": "updateRows", "group": "rows", - "weight": 422, + "weight": 436, "cookies": false, "type": "", "demo": "tablesdb\/update-rows.md", @@ -37825,7 +38799,7 @@ "x-appwrite": { "method": "deleteRows", "group": "rows", - "weight": 426, + "weight": 440, "cookies": false, "type": "", "demo": "tablesdb\/delete-rows.md", @@ -37919,7 +38893,7 @@ "x-appwrite": { "method": "getRow", "group": "rows", - "weight": 420, + "weight": 434, "cookies": false, "type": "", "demo": "tablesdb\/get-row.md", @@ -38017,7 +38991,7 @@ "x-appwrite": { "method": "upsertRow", "group": "rows", - "weight": 423, + "weight": 437, "cookies": false, "type": "", "demo": "tablesdb\/upsert-row.md", @@ -38156,7 +39130,7 @@ "x-appwrite": { "method": "updateRow", "group": "rows", - "weight": 421, + "weight": 435, "cookies": false, "type": "", "demo": "tablesdb\/update-row.md", @@ -38258,7 +39232,7 @@ "x-appwrite": { "method": "deleteRow", "group": "rows", - "weight": 425, + "weight": 439, "cookies": false, "type": "", "demo": "tablesdb\/delete-row.md", @@ -38345,7 +39319,7 @@ "x-appwrite": { "method": "listRowLogs", "group": "logs", - "weight": 428, + "weight": 442, "cookies": false, "type": "", "demo": "tablesdb\/list-row-logs.md", @@ -38441,7 +39415,7 @@ "x-appwrite": { "method": "decrementRowColumn", "group": "rows", - "weight": 430, + "weight": 444, "cookies": false, "type": "", "demo": "tablesdb\/decrement-row-column.md", @@ -38559,7 +39533,7 @@ "x-appwrite": { "method": "incrementRowColumn", "group": "rows", - "weight": 429, + "weight": 443, "cookies": false, "type": "", "demo": "tablesdb\/increment-row-column.md", @@ -38677,7 +39651,7 @@ "x-appwrite": { "method": "getTableUsage", "group": null, - "weight": 385, + "weight": 399, "cookies": false, "type": "", "demo": "tablesdb\/get-table-usage.md", @@ -38772,7 +39746,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 377, + "weight": 391, "cookies": false, "type": "", "demo": "tablesdb\/get-usage.md", @@ -38882,7 +39856,7 @@ "x-appwrite": { "method": "list", "group": "teams", - "weight": 171, + "weight": 179, "cookies": false, "type": "", "demo": "teams\/list.md", @@ -38958,7 +39932,7 @@ "x-appwrite": { "method": "create", "group": "teams", - "weight": 170, + "weight": 178, "cookies": false, "type": "", "demo": "teams\/create.md", @@ -39043,7 +40017,7 @@ "x-appwrite": { "method": "get", "group": "teams", - "weight": 172, + "weight": 180, "cookies": false, "type": "", "demo": "teams\/get.md", @@ -39105,7 +40079,7 @@ "x-appwrite": { "method": "updateName", "group": "teams", - "weight": 174, + "weight": 182, "cookies": false, "type": "", "demo": "teams\/update-name.md", @@ -39179,7 +40153,7 @@ "x-appwrite": { "method": "delete", "group": "teams", - "weight": 176, + "weight": 184, "cookies": false, "type": "", "demo": "teams\/delete.md", @@ -39243,7 +40217,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 183, + "weight": 191, "cookies": false, "type": "", "demo": "teams\/list-logs.md", @@ -39316,7 +40290,7 @@ "x-appwrite": { "method": "listMemberships", "group": "memberships", - "weight": 178, + "weight": 186, "cookies": false, "type": "", "demo": "teams\/list-memberships.md", @@ -39402,7 +40376,7 @@ "x-appwrite": { "method": "createMembership", "group": "memberships", - "weight": 177, + "weight": 185, "cookies": false, "type": "", "demo": "teams\/create-membership.md", @@ -39513,7 +40487,7 @@ "x-appwrite": { "method": "getMembership", "group": "memberships", - "weight": 179, + "weight": 187, "cookies": false, "type": "", "demo": "teams\/get-membership.md", @@ -39585,7 +40559,7 @@ "x-appwrite": { "method": "updateMembership", "group": "memberships", - "weight": 180, + "weight": 188, "cookies": false, "type": "", "demo": "teams\/update-membership.md", @@ -39672,7 +40646,7 @@ "x-appwrite": { "method": "deleteMembership", "group": "memberships", - "weight": 182, + "weight": 190, "cookies": false, "type": "", "demo": "teams\/delete-membership.md", @@ -39746,7 +40720,7 @@ "x-appwrite": { "method": "updateMembershipStatus", "group": "memberships", - "weight": 181, + "weight": 189, "cookies": false, "type": "", "demo": "teams\/update-membership-status.md", @@ -39843,7 +40817,7 @@ "x-appwrite": { "method": "getPrefs", "group": "teams", - "weight": 173, + "weight": 181, "cookies": false, "type": "", "demo": "teams\/get-prefs.md", @@ -39903,7 +40877,7 @@ "x-appwrite": { "method": "updatePrefs", "group": "teams", - "weight": 175, + "weight": 183, "cookies": false, "type": "", "demo": "teams\/update-prefs.md", @@ -39984,7 +40958,7 @@ "x-appwrite": { "method": "list", "group": "files", - "weight": 507, + "weight": 521, "cookies": false, "type": "", "demo": "tokens\/list.md", @@ -40064,7 +41038,7 @@ "x-appwrite": { "method": "createFileToken", "group": "files", - "weight": 505, + "weight": 519, "cookies": false, "type": "", "demo": "tokens\/create-file-token.md", @@ -40153,7 +41127,7 @@ "x-appwrite": { "method": "get", "group": "tokens", - "weight": 506, + "weight": 520, "cookies": false, "type": "", "demo": "tokens\/get.md", @@ -40213,7 +41187,7 @@ "x-appwrite": { "method": "update", "group": "tokens", - "weight": 508, + "weight": 522, "cookies": false, "type": "", "demo": "tokens\/update.md", @@ -40283,7 +41257,7 @@ "x-appwrite": { "method": "delete", "group": "tokens", - "weight": 509, + "weight": 523, "cookies": false, "type": "", "demo": "tokens\/delete.md", @@ -40345,7 +41319,7 @@ "x-appwrite": { "method": "list", "group": "users", - "weight": 193, + "weight": 201, "cookies": false, "type": "", "demo": "users\/list.md", @@ -40418,7 +41392,7 @@ "x-appwrite": { "method": "create", "group": "users", - "weight": 184, + "weight": 192, "cookies": false, "type": "", "demo": "users\/create.md", @@ -40506,7 +41480,7 @@ "x-appwrite": { "method": "createArgon2User", "group": "users", - "weight": 187, + "weight": 195, "cookies": false, "type": "", "demo": "users\/create-argon-2-user.md", @@ -40591,7 +41565,7 @@ "x-appwrite": { "method": "createBcryptUser", "group": "users", - "weight": 185, + "weight": 193, "cookies": false, "type": "", "demo": "users\/create-bcrypt-user.md", @@ -40676,7 +41650,7 @@ "x-appwrite": { "method": "listIdentities", "group": "identities", - "weight": 201, + "weight": 210, "cookies": false, "type": "", "demo": "users\/list-identities.md", @@ -40744,7 +41718,7 @@ "x-appwrite": { "method": "deleteIdentity", "group": "identities", - "weight": 224, + "weight": 233, "cookies": false, "type": "", "demo": "users\/delete-identity.md", @@ -40805,7 +41779,7 @@ "x-appwrite": { "method": "createMD5User", "group": "users", - "weight": 186, + "weight": 194, "cookies": false, "type": "", "demo": "users\/create-md-5-user.md", @@ -40890,7 +41864,7 @@ "x-appwrite": { "method": "createPHPassUser", "group": "users", - "weight": 189, + "weight": 197, "cookies": false, "type": "", "demo": "users\/create-ph-pass-user.md", @@ -40975,7 +41949,7 @@ "x-appwrite": { "method": "createScryptUser", "group": "users", - "weight": 190, + "weight": 198, "cookies": false, "type": "", "demo": "users\/create-scrypt-user.md", @@ -41090,7 +42064,7 @@ "x-appwrite": { "method": "createScryptModifiedUser", "group": "users", - "weight": 191, + "weight": 199, "cookies": false, "type": "", "demo": "users\/create-scrypt-modified-user.md", @@ -41193,7 +42167,7 @@ "x-appwrite": { "method": "createSHAUser", "group": "users", - "weight": 188, + "weight": 196, "cookies": false, "type": "", "demo": "users\/create-sha-user.md", @@ -41298,7 +42272,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 226, + "weight": 235, "cookies": false, "type": "", "demo": "users\/get-usage.md", @@ -41370,7 +42344,7 @@ "x-appwrite": { "method": "get", "group": "users", - "weight": 194, + "weight": 202, "cookies": false, "type": "", "demo": "users\/get.md", @@ -41422,7 +42396,7 @@ "x-appwrite": { "method": "delete", "group": "users", - "weight": 222, + "weight": 231, "cookies": false, "type": "", "demo": "users\/delete.md", @@ -41483,7 +42457,7 @@ "x-appwrite": { "method": "updateEmail", "group": "users", - "weight": 207, + "weight": 216, "cookies": false, "type": "", "demo": "users\/update-email.md", @@ -41563,7 +42537,7 @@ "x-appwrite": { "method": "createJWT", "group": "sessions", - "weight": 225, + "weight": 234, "cookies": false, "type": "", "demo": "users\/create-jwt.md", @@ -41645,7 +42619,7 @@ "x-appwrite": { "method": "updateLabels", "group": "users", - "weight": 203, + "weight": 212, "cookies": false, "type": "", "demo": "users\/update-labels.md", @@ -41728,7 +42702,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 199, + "weight": 208, "cookies": false, "type": "", "demo": "users\/list-logs.md", @@ -41802,7 +42776,7 @@ "x-appwrite": { "method": "listMemberships", "group": "memberships", - "weight": 198, + "weight": 207, "cookies": false, "type": "", "demo": "users\/list-memberships.md", @@ -41887,7 +42861,7 @@ "x-appwrite": { "method": "updateMfa", "group": "users", - "weight": 212, + "weight": 221, "cookies": false, "type": "", "demo": "users\/update-mfa.md", @@ -42018,7 +42992,7 @@ "x-appwrite": { "method": "deleteMfaAuthenticator", "group": "mfa", - "weight": 217, + "weight": 226, "cookies": false, "type": "", "demo": "users\/delete-mfa-authenticator.md", @@ -42150,7 +43124,7 @@ "x-appwrite": { "method": "listMfaFactors", "group": "mfa", - "weight": 213, + "weight": 222, "cookies": false, "type": "", "demo": "users\/list-mfa-factors.md", @@ -42265,7 +43239,7 @@ "x-appwrite": { "method": "getMfaRecoveryCodes", "group": "mfa", - "weight": 214, + "weight": 223, "cookies": false, "type": "", "demo": "users\/get-mfa-recovery-codes.md", @@ -42378,7 +43352,7 @@ "x-appwrite": { "method": "updateMfaRecoveryCodes", "group": "mfa", - "weight": 216, + "weight": 225, "cookies": false, "type": "", "demo": "users\/update-mfa-recovery-codes.md", @@ -42491,7 +43465,7 @@ "x-appwrite": { "method": "createMfaRecoveryCodes", "group": "mfa", - "weight": 215, + "weight": 224, "cookies": false, "type": "", "demo": "users\/create-mfa-recovery-codes.md", @@ -42606,7 +43580,7 @@ "x-appwrite": { "method": "updateName", "group": "users", - "weight": 205, + "weight": 214, "cookies": false, "type": "", "demo": "users\/update-name.md", @@ -42686,7 +43660,7 @@ "x-appwrite": { "method": "updatePassword", "group": "users", - "weight": 206, + "weight": 215, "cookies": false, "type": "", "demo": "users\/update-password.md", @@ -42766,7 +43740,7 @@ "x-appwrite": { "method": "updatePhone", "group": "users", - "weight": 208, + "weight": 217, "cookies": false, "type": "", "demo": "users\/update-phone.md", @@ -42822,6 +43796,91 @@ } } }, + "\/users\/{userId}\/plan": { + "post": { + "summary": "Assign plan to user (admin)", + "operationId": "usersAssignPlan", + "tags": [ + "users" + ], + "description": false, + "responses": { + "200": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "assignPlan", + "group": "users", + "weight": 203, + "cookies": false, + "type": "", + "demo": "users\/assign-plan.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/assign-plan.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "planId": { + "type": "string", + "description": "Plan ID to assign.", + "x-example": "" + }, + "complimentary": { + "type": "boolean", + "description": "If true, create a complimentary Stripe subscription for one billing interval.", + "x-example": false + } + }, + "required": [ + "planId" + ] + } + } + } + } + } + }, "\/users\/{userId}\/prefs": { "get": { "summary": "Get user preferences", @@ -42846,7 +43905,7 @@ "x-appwrite": { "method": "getPrefs", "group": "users", - "weight": 195, + "weight": 204, "cookies": false, "type": "", "demo": "users\/get-prefs.md", @@ -42905,7 +43964,7 @@ "x-appwrite": { "method": "updatePrefs", "group": "users", - "weight": 210, + "weight": 219, "cookies": false, "type": "", "demo": "users\/update-prefs.md", @@ -42985,7 +44044,7 @@ "x-appwrite": { "method": "listSessions", "group": "sessions", - "weight": 197, + "weight": 206, "cookies": false, "type": "", "demo": "users\/list-sessions.md", @@ -43044,7 +44103,7 @@ "x-appwrite": { "method": "createSession", "group": "sessions", - "weight": 218, + "weight": 227, "cookies": false, "type": "", "demo": "users\/create-session.md", @@ -43096,7 +44155,7 @@ "x-appwrite": { "method": "deleteSessions", "group": "sessions", - "weight": 221, + "weight": 230, "cookies": false, "type": "", "demo": "users\/delete-sessions.md", @@ -43150,7 +44209,7 @@ "x-appwrite": { "method": "deleteSession", "group": "sessions", - "weight": 220, + "weight": 229, "cookies": false, "type": "", "demo": "users\/delete-session.md", @@ -43221,7 +44280,7 @@ "x-appwrite": { "method": "updateStatus", "group": "users", - "weight": 202, + "weight": 211, "cookies": false, "type": "", "demo": "users\/update-status.md", @@ -43301,7 +44360,7 @@ "x-appwrite": { "method": "listTargets", "group": "targets", - "weight": 200, + "weight": 209, "cookies": false, "type": "", "demo": "users\/list-targets.md", @@ -43374,7 +44433,7 @@ "x-appwrite": { "method": "createTarget", "group": "targets", - "weight": 192, + "weight": 200, "cookies": false, "type": "", "demo": "users\/create-target.md", @@ -43484,7 +44543,7 @@ "x-appwrite": { "method": "getTarget", "group": "targets", - "weight": 196, + "weight": 205, "cookies": false, "type": "", "demo": "users\/get-target.md", @@ -43554,7 +44613,7 @@ "x-appwrite": { "method": "updateTarget", "group": "targets", - "weight": 211, + "weight": 220, "cookies": false, "type": "", "demo": "users\/update-target.md", @@ -43643,7 +44702,7 @@ "x-appwrite": { "method": "deleteTarget", "group": "targets", - "weight": 223, + "weight": 232, "cookies": false, "type": "", "demo": "users\/delete-target.md", @@ -43715,7 +44774,7 @@ "x-appwrite": { "method": "createToken", "group": "sessions", - "weight": 219, + "weight": 228, "cookies": false, "type": "", "demo": "users\/create-token.md", @@ -43797,7 +44856,7 @@ "x-appwrite": { "method": "updateEmailVerification", "group": "users", - "weight": 209, + "weight": 218, "cookies": false, "type": "", "demo": "users\/update-email-verification.md", @@ -43877,7 +44936,7 @@ "x-appwrite": { "method": "updatePhoneVerification", "group": "users", - "weight": 204, + "weight": 213, "cookies": false, "type": "", "demo": "users\/update-phone-verification.md", @@ -43957,7 +45016,7 @@ "x-appwrite": { "method": "createRepositoryDetection", "group": "repositories", - "weight": 230, + "weight": 239, "cookies": false, "type": "", "demo": "vcs\/create-repository-detection.md", @@ -44053,7 +45112,7 @@ "x-appwrite": { "method": "listRepositories", "group": "repositories", - "weight": 231, + "weight": 240, "cookies": false, "type": "", "demo": "vcs\/list-repositories.md", @@ -44138,7 +45197,7 @@ "x-appwrite": { "method": "createRepository", "group": "repositories", - "weight": 232, + "weight": 241, "cookies": false, "type": "", "demo": "vcs\/create-repository.md", @@ -44223,7 +45282,7 @@ "x-appwrite": { "method": "getRepository", "group": "repositories", - "weight": 233, + "weight": 242, "cookies": false, "type": "", "demo": "vcs\/get-repository.md", @@ -44293,7 +45352,7 @@ "x-appwrite": { "method": "listRepositoryBranches", "group": "repositories", - "weight": 234, + "weight": 243, "cookies": false, "type": "", "demo": "vcs\/list-repository-branches.md", @@ -44363,7 +45422,7 @@ "x-appwrite": { "method": "getRepositoryContents", "group": "repositories", - "weight": 229, + "weight": 238, "cookies": false, "type": "", "demo": "vcs\/get-repository-contents.md", @@ -44448,7 +45507,7 @@ "x-appwrite": { "method": "updateExternalDeployments", "group": "repositories", - "weight": 239, + "weight": 248, "cookies": false, "type": "", "demo": "vcs\/update-external-deployments.md", @@ -44537,7 +45596,7 @@ "x-appwrite": { "method": "listInstallations", "group": "installations", - "weight": 236, + "weight": 245, "cookies": false, "type": "", "demo": "vcs\/list-installations.md", @@ -44611,7 +45670,7 @@ "x-appwrite": { "method": "getInstallation", "group": "installations", - "weight": 237, + "weight": 246, "cookies": false, "type": "", "demo": "vcs\/get-installation.md", @@ -44662,7 +45721,7 @@ "x-appwrite": { "method": "deleteInstallation", "group": "installations", - "weight": 238, + "weight": 247, "cookies": false, "type": "", "demo": "vcs\/delete-installation.md", @@ -49664,6 +50723,19 @@ }, "x-example": [] }, + "plan": { + "type": "object", + "description": "User subscription plan details.", + "x-example": { + "id": "basic", + "name": "Basic", + "price": 999, + "currency": "usd", + "interval": "month", + "isFree": false + }, + "nullable": true + }, "accessedAt": { "type": "string", "description": "Most recent access date in ISO 8601 format. This attribute is only updated again after 24 hours.", @@ -49712,6 +50784,14 @@ "timezone": "UTC" }, "targets": [], + "plan": { + "id": "basic", + "name": "Basic", + "price": 999, + "currency": "usd", + "interval": "month", + "isFree": false + }, "accessedAt": "2020-10-15T06:38:00.000+00:00" } }, @@ -52947,6 +54027,11 @@ "description": "GraphQL service status", "x-example": true }, + "serviceStatusForAuthPlans": { + "type": "boolean", + "description": "Auth Plans service status", + "x-example": true + }, "serviceStatusForMessaging": { "type": "boolean", "description": "Messaging service status", @@ -53015,6 +54100,7 @@ "serviceStatusForSites", "serviceStatusForFunctions", "serviceStatusForGraphql", + "serviceStatusForAuthPlans", "serviceStatusForMessaging" ], "example": { @@ -53083,6 +54169,7 @@ "serviceStatusForSites": true, "serviceStatusForFunctions": true, "serviceStatusForGraphql": true, + "serviceStatusForAuthPlans": true, "serviceStatusForMessaging": true } }, diff --git a/app/config/specs/open-api3-latest-server.json b/app/config/specs/open-api3-latest-server.json index 93a0d9d46b..d156eba756 100644 --- a/app/config/specs/open-api3-latest-server.json +++ b/app/config/specs/open-api3-latest-server.json @@ -2780,6 +2780,347 @@ ] } }, + "\/account\/subscription": { + "get": { + "summary": "Get account subscription", + "operationId": "accountGetSubscription", + "tags": [ + "account" + ], + "description": false, + "responses": { + "200": { + "description": "Any", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/any" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getSubscription", + "group": "subscription", + "weight": 60, + "cookies": false, + "type": "", + "demo": "account\/get-subscription.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-subscription.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ] + }, + "put": { + "summary": "Update subscription", + "operationId": "accountUpdateSubscription", + "tags": [ + "account" + ], + "description": false, + "responses": { + "200": { + "description": "Any", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/any" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateSubscription", + "group": "subscription", + "weight": 63, + "cookies": false, + "type": "", + "demo": "account\/update-subscription.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-subscription.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "planId": { + "type": "string", + "description": "New plan ID.", + "x-example": "" + } + }, + "required": [ + "planId" + ] + } + } + } + } + }, + "delete": { + "summary": "Cancel subscription", + "operationId": "accountCancelSubscription", + "tags": [ + "account" + ], + "description": false, + "responses": { + "200": { + "description": "Any", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/any" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "cancelSubscription", + "group": "subscription", + "weight": 64, + "cookies": false, + "type": "", + "demo": "account\/cancel-subscription.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/cancel-subscription.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "atPeriodEnd": { + "type": "boolean", + "description": "Cancel at period end.", + "x-example": false + } + } + } + } + } + } + } + }, + "\/account\/subscription\/checkout": { + "post": { + "summary": "Create checkout session", + "operationId": "accountCreateSubscriptionCheckout", + "tags": [ + "account" + ], + "description": false, + "responses": { + "200": { + "description": "Any", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/any" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createSubscriptionCheckout", + "group": "subscription", + "weight": 61, + "cookies": false, + "type": "", + "demo": "account\/create-subscription-checkout.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-checkout.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "planId": { + "type": "string", + "description": "Plan ID to subscribe to.", + "x-example": "" + }, + "successUrl": { + "type": "string", + "description": "URL to redirect on success.", + "x-example": "https:\/\/example.com" + }, + "cancelUrl": { + "type": "string", + "description": "URL to redirect on cancel.", + "x-example": "https:\/\/example.com" + } + }, + "required": [ + "planId", + "successUrl", + "cancelUrl" + ] + } + } + } + } + } + }, + "\/account\/subscription\/portal": { + "post": { + "summary": "Create customer portal session", + "operationId": "accountCreateSubscriptionPortal", + "tags": [ + "account" + ], + "description": false, + "responses": { + "200": { + "description": "Any", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/any" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createSubscriptionPortal", + "group": "subscription", + "weight": 62, + "cookies": false, + "type": "", + "demo": "account\/create-subscription-portal.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-portal.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "returnUrl": { + "type": "string", + "description": "URL to return to.", + "x-example": "https:\/\/example.com" + } + }, + "required": [ + "returnUrl" + ] + } + } + } + } + } + }, "\/account\/tokens\/email": { "post": { "summary": "Create email token (OTP)", @@ -3454,7 +3795,7 @@ "x-appwrite": { "method": "getBrowser", "group": null, - "weight": 61, + "weight": 66, "cookies": false, "type": "location", "demo": "avatars\/get-browser.md", @@ -3582,7 +3923,7 @@ "x-appwrite": { "method": "getCreditCard", "group": null, - "weight": 60, + "weight": 65, "cookies": false, "type": "location", "demo": "avatars\/get-credit-card.md", @@ -3716,7 +4057,7 @@ "x-appwrite": { "method": "getFavicon", "group": null, - "weight": 64, + "weight": 69, "cookies": false, "type": "location", "demo": "avatars\/get-favicon.md", @@ -3776,7 +4117,7 @@ "x-appwrite": { "method": "getFlag", "group": null, - "weight": 62, + "weight": 67, "cookies": false, "type": "location", "demo": "avatars\/get-flag.md", @@ -4266,7 +4607,7 @@ "x-appwrite": { "method": "getImage", "group": null, - "weight": 63, + "weight": 68, "cookies": false, "type": "location", "demo": "avatars\/get-image.md", @@ -4350,7 +4691,7 @@ "x-appwrite": { "method": "getInitials", "group": null, - "weight": 66, + "weight": 71, "cookies": false, "type": "location", "demo": "avatars\/get-initials.md", @@ -4444,7 +4785,7 @@ "x-appwrite": { "method": "getQR", "group": null, - "weight": 65, + "weight": 70, "cookies": false, "type": "location", "demo": "avatars\/get-qr.md", @@ -4545,7 +4886,7 @@ "x-appwrite": { "method": "list", "group": "databases", - "weight": 316, + "weight": 330, "cookies": false, "type": "", "demo": "databases\/list.md", @@ -4651,7 +4992,7 @@ "x-appwrite": { "method": "create", "group": "databases", - "weight": 312, + "weight": 326, "cookies": false, "type": "", "demo": "databases\/create.md", @@ -4767,7 +5108,7 @@ "x-appwrite": { "method": "get", "group": "databases", - "weight": 313, + "weight": 327, "cookies": false, "type": "", "demo": "databases\/get.md", @@ -4860,7 +5201,7 @@ "x-appwrite": { "method": "update", "group": "databases", - "weight": 314, + "weight": 328, "cookies": false, "type": "", "demo": "databases\/update.md", @@ -4973,7 +5314,7 @@ "x-appwrite": { "method": "delete", "group": "databases", - "weight": 315, + "weight": 329, "cookies": false, "type": "", "demo": "databases\/delete.md", @@ -5067,7 +5408,7 @@ "x-appwrite": { "method": "listCollections", "group": "collections", - "weight": 324, + "weight": 338, "cookies": false, "type": "", "demo": "databases\/list-collections.md", @@ -5155,7 +5496,7 @@ "x-appwrite": { "method": "createCollection", "group": "collections", - "weight": 320, + "weight": 334, "cookies": false, "type": "", "demo": "databases\/create-collection.md", @@ -5264,7 +5605,7 @@ "x-appwrite": { "method": "getCollection", "group": "collections", - "weight": 321, + "weight": 335, "cookies": false, "type": "", "demo": "databases\/get-collection.md", @@ -5338,7 +5679,7 @@ "x-appwrite": { "method": "updateCollection", "group": "collections", - "weight": 322, + "weight": 336, "cookies": false, "type": "", "demo": "databases\/update-collection.md", @@ -5442,7 +5783,7 @@ "x-appwrite": { "method": "deleteCollection", "group": "collections", - "weight": 323, + "weight": 337, "cookies": false, "type": "", "demo": "databases\/delete-collection.md", @@ -5518,7 +5859,7 @@ "x-appwrite": { "method": "listAttributes", "group": "attributes", - "weight": 341, + "weight": 355, "cookies": false, "type": "", "demo": "databases\/list-attributes.md", @@ -5607,7 +5948,7 @@ "x-appwrite": { "method": "createBooleanAttribute", "group": "attributes", - "weight": 342, + "weight": 356, "cookies": false, "type": "", "demo": "databases\/create-boolean-attribute.md", @@ -5718,7 +6059,7 @@ "x-appwrite": { "method": "updateBooleanAttribute", "group": "attributes", - "weight": 343, + "weight": 357, "cookies": false, "type": "", "demo": "databases\/update-boolean-attribute.md", @@ -5834,7 +6175,7 @@ "x-appwrite": { "method": "createDatetimeAttribute", "group": "attributes", - "weight": 344, + "weight": 358, "cookies": false, "type": "", "demo": "databases\/create-datetime-attribute.md", @@ -5945,7 +6286,7 @@ "x-appwrite": { "method": "updateDatetimeAttribute", "group": "attributes", - "weight": 345, + "weight": 359, "cookies": false, "type": "", "demo": "databases\/update-datetime-attribute.md", @@ -6061,7 +6402,7 @@ "x-appwrite": { "method": "createEmailAttribute", "group": "attributes", - "weight": 346, + "weight": 360, "cookies": false, "type": "", "demo": "databases\/create-email-attribute.md", @@ -6172,7 +6513,7 @@ "x-appwrite": { "method": "updateEmailAttribute", "group": "attributes", - "weight": 347, + "weight": 361, "cookies": false, "type": "", "demo": "databases\/update-email-attribute.md", @@ -6288,7 +6629,7 @@ "x-appwrite": { "method": "createEnumAttribute", "group": "attributes", - "weight": 348, + "weight": 362, "cookies": false, "type": "", "demo": "databases\/create-enum-attribute.md", @@ -6408,7 +6749,7 @@ "x-appwrite": { "method": "updateEnumAttribute", "group": "attributes", - "weight": 349, + "weight": 363, "cookies": false, "type": "", "demo": "databases\/update-enum-attribute.md", @@ -6533,7 +6874,7 @@ "x-appwrite": { "method": "createFloatAttribute", "group": "attributes", - "weight": 350, + "weight": 364, "cookies": false, "type": "", "demo": "databases\/create-float-attribute.md", @@ -6654,7 +6995,7 @@ "x-appwrite": { "method": "updateFloatAttribute", "group": "attributes", - "weight": 351, + "weight": 365, "cookies": false, "type": "", "demo": "databases\/update-float-attribute.md", @@ -6780,7 +7121,7 @@ "x-appwrite": { "method": "createIntegerAttribute", "group": "attributes", - "weight": 352, + "weight": 366, "cookies": false, "type": "", "demo": "databases\/create-integer-attribute.md", @@ -6901,7 +7242,7 @@ "x-appwrite": { "method": "updateIntegerAttribute", "group": "attributes", - "weight": 353, + "weight": 367, "cookies": false, "type": "", "demo": "databases\/update-integer-attribute.md", @@ -7027,7 +7368,7 @@ "x-appwrite": { "method": "createIpAttribute", "group": "attributes", - "weight": 354, + "weight": 368, "cookies": false, "type": "", "demo": "databases\/create-ip-attribute.md", @@ -7138,7 +7479,7 @@ "x-appwrite": { "method": "updateIpAttribute", "group": "attributes", - "weight": 355, + "weight": 369, "cookies": false, "type": "", "demo": "databases\/update-ip-attribute.md", @@ -7254,7 +7595,7 @@ "x-appwrite": { "method": "createLineAttribute", "group": "attributes", - "weight": 356, + "weight": 370, "cookies": false, "type": "", "demo": "databases\/create-line-attribute.md", @@ -7368,7 +7709,7 @@ "x-appwrite": { "method": "updateLineAttribute", "group": "attributes", - "weight": 357, + "weight": 371, "cookies": false, "type": "", "demo": "databases\/update-line-attribute.md", @@ -7490,7 +7831,7 @@ "x-appwrite": { "method": "createPointAttribute", "group": "attributes", - "weight": 358, + "weight": 372, "cookies": false, "type": "", "demo": "databases\/create-point-attribute.md", @@ -7604,7 +7945,7 @@ "x-appwrite": { "method": "updatePointAttribute", "group": "attributes", - "weight": 359, + "weight": 373, "cookies": false, "type": "", "demo": "databases\/update-point-attribute.md", @@ -7726,7 +8067,7 @@ "x-appwrite": { "method": "createPolygonAttribute", "group": "attributes", - "weight": 360, + "weight": 374, "cookies": false, "type": "", "demo": "databases\/create-polygon-attribute.md", @@ -7840,7 +8181,7 @@ "x-appwrite": { "method": "updatePolygonAttribute", "group": "attributes", - "weight": 361, + "weight": 375, "cookies": false, "type": "", "demo": "databases\/update-polygon-attribute.md", @@ -7962,7 +8303,7 @@ "x-appwrite": { "method": "createRelationshipAttribute", "group": "attributes", - "weight": 362, + "weight": 376, "cookies": false, "type": "", "demo": "databases\/create-relationship-attribute.md", @@ -8098,7 +8439,7 @@ "x-appwrite": { "method": "createStringAttribute", "group": "attributes", - "weight": 364, + "weight": 378, "cookies": false, "type": "", "demo": "databases\/create-string-attribute.md", @@ -8220,7 +8561,7 @@ "x-appwrite": { "method": "updateStringAttribute", "group": "attributes", - "weight": 365, + "weight": 379, "cookies": false, "type": "", "demo": "databases\/update-string-attribute.md", @@ -8341,7 +8682,7 @@ "x-appwrite": { "method": "createUrlAttribute", "group": "attributes", - "weight": 366, + "weight": 380, "cookies": false, "type": "", "demo": "databases\/create-url-attribute.md", @@ -8452,7 +8793,7 @@ "x-appwrite": { "method": "updateUrlAttribute", "group": "attributes", - "weight": 367, + "weight": 381, "cookies": false, "type": "", "demo": "databases\/update-url-attribute.md", @@ -8599,7 +8940,7 @@ "x-appwrite": { "method": "getAttribute", "group": "attributes", - "weight": 339, + "weight": 353, "cookies": false, "type": "", "demo": "databases\/get-attribute.md", @@ -8675,7 +9016,7 @@ "x-appwrite": { "method": "deleteAttribute", "group": "attributes", - "weight": 340, + "weight": 354, "cookies": false, "type": "", "demo": "databases\/delete-attribute.md", @@ -8760,7 +9101,7 @@ "x-appwrite": { "method": "updateRelationshipAttribute", "group": "attributes", - "weight": 363, + "weight": 377, "cookies": false, "type": "", "demo": "databases\/update-relationship-attribute.md", @@ -8873,7 +9214,7 @@ "x-appwrite": { "method": "listDocuments", "group": "documents", - "weight": 335, + "weight": 349, "cookies": false, "type": "", "demo": "databases\/list-documents.md", @@ -8964,7 +9305,7 @@ "x-appwrite": { "method": "createDocument", "group": "documents", - "weight": 327, + "weight": 341, "cookies": false, "type": "", "demo": "databases\/create-document.md", @@ -9146,7 +9487,7 @@ "x-appwrite": { "method": "upsertDocuments", "group": "documents", - "weight": 332, + "weight": 346, "cookies": false, "type": "", "demo": "databases\/upsert-documents.md", @@ -9276,7 +9617,7 @@ "x-appwrite": { "method": "updateDocuments", "group": "documents", - "weight": 330, + "weight": 344, "cookies": false, "type": "", "demo": "databases\/update-documents.md", @@ -9375,7 +9716,7 @@ "x-appwrite": { "method": "deleteDocuments", "group": "documents", - "weight": 334, + "weight": 348, "cookies": false, "type": "", "demo": "databases\/delete-documents.md", @@ -9471,7 +9812,7 @@ "x-appwrite": { "method": "getDocument", "group": "documents", - "weight": 328, + "weight": 342, "cookies": false, "type": "", "demo": "databases\/get-document.md", @@ -9572,7 +9913,7 @@ "x-appwrite": { "method": "upsertDocument", "group": "documents", - "weight": 331, + "weight": 345, "cookies": false, "type": "", "demo": "databases\/upsert-document.md", @@ -9723,7 +10064,7 @@ "x-appwrite": { "method": "updateDocument", "group": "documents", - "weight": 329, + "weight": 343, "cookies": false, "type": "", "demo": "databases\/update-document.md", @@ -9828,7 +10169,7 @@ "x-appwrite": { "method": "deleteDocument", "group": "documents", - "weight": 333, + "weight": 347, "cookies": false, "type": "", "demo": "databases\/delete-document.md", @@ -9918,7 +10259,7 @@ "x-appwrite": { "method": "decrementDocumentAttribute", "group": "documents", - "weight": 338, + "weight": 352, "cookies": false, "type": "", "demo": "databases\/decrement-document-attribute.md", @@ -10039,7 +10380,7 @@ "x-appwrite": { "method": "incrementDocumentAttribute", "group": "documents", - "weight": 337, + "weight": 351, "cookies": false, "type": "", "demo": "databases\/increment-document-attribute.md", @@ -10160,7 +10501,7 @@ "x-appwrite": { "method": "listIndexes", "group": "indexes", - "weight": 371, + "weight": 385, "cookies": false, "type": "", "demo": "databases\/list-indexes.md", @@ -10247,7 +10588,7 @@ "x-appwrite": { "method": "createIndex", "group": "indexes", - "weight": 368, + "weight": 382, "cookies": false, "type": "", "demo": "databases\/create-index.md", @@ -10381,7 +10722,7 @@ "x-appwrite": { "method": "getIndex", "group": "indexes", - "weight": 369, + "weight": 383, "cookies": false, "type": "", "demo": "databases\/get-index.md", @@ -10457,7 +10798,7 @@ "x-appwrite": { "method": "deleteIndex", "group": "indexes", - "weight": 370, + "weight": 384, "cookies": false, "type": "", "demo": "databases\/delete-index.md", @@ -10542,7 +10883,7 @@ "x-appwrite": { "method": "list", "group": "functions", - "weight": 440, + "weight": 454, "cookies": false, "type": "", "demo": "functions\/list.md", @@ -10616,7 +10957,7 @@ "x-appwrite": { "method": "create", "group": "functions", - "weight": 437, + "weight": 451, "cookies": false, "type": "", "demo": "functions\/create.md", @@ -10850,7 +11191,7 @@ "x-appwrite": { "method": "listRuntimes", "group": "runtimes", - "weight": 442, + "weight": 456, "cookies": false, "type": "", "demo": "functions\/list-runtimes.md", @@ -10900,7 +11241,7 @@ "x-appwrite": { "method": "listSpecifications", "group": "runtimes", - "weight": 443, + "weight": 457, "cookies": false, "type": "", "demo": "functions\/list-specifications.md", @@ -10951,7 +11292,7 @@ "x-appwrite": { "method": "get", "group": "functions", - "weight": 438, + "weight": 452, "cookies": false, "type": "", "demo": "functions\/get.md", @@ -11011,7 +11352,7 @@ "x-appwrite": { "method": "update", "group": "functions", - "weight": 439, + "weight": 453, "cookies": false, "type": "", "demo": "functions\/update.md", @@ -11242,7 +11583,7 @@ "x-appwrite": { "method": "delete", "group": "functions", - "weight": 441, + "weight": 455, "cookies": false, "type": "", "demo": "functions\/delete.md", @@ -11304,7 +11645,7 @@ "x-appwrite": { "method": "updateFunctionDeployment", "group": "functions", - "weight": 446, + "weight": 460, "cookies": false, "type": "", "demo": "functions\/update-function-deployment.md", @@ -11385,7 +11726,7 @@ "x-appwrite": { "method": "listDeployments", "group": "deployments", - "weight": 447, + "weight": 461, "cookies": false, "type": "", "demo": "functions\/list-deployments.md", @@ -11469,7 +11810,7 @@ "x-appwrite": { "method": "createDeployment", "group": "deployments", - "weight": 444, + "weight": 458, "cookies": false, "type": "upload", "demo": "functions\/create-deployment.md", @@ -11566,7 +11907,7 @@ "x-appwrite": { "method": "createDuplicateDeployment", "group": "deployments", - "weight": 452, + "weight": 466, "cookies": false, "type": "", "demo": "functions\/create-duplicate-deployment.md", @@ -11652,7 +11993,7 @@ "x-appwrite": { "method": "createTemplateDeployment", "group": "deployments", - "weight": 449, + "weight": 463, "cookies": false, "type": "", "demo": "functions\/create-template-deployment.md", @@ -11756,7 +12097,7 @@ "x-appwrite": { "method": "createVcsDeployment", "group": "deployments", - "weight": 450, + "weight": 464, "cookies": false, "type": "", "demo": "functions\/create-vcs-deployment.md", @@ -11854,7 +12195,7 @@ "x-appwrite": { "method": "getDeployment", "group": "deployments", - "weight": 445, + "weight": 459, "cookies": false, "type": "", "demo": "functions\/get-deployment.md", @@ -11917,7 +12258,7 @@ "x-appwrite": { "method": "deleteDeployment", "group": "deployments", - "weight": 448, + "weight": 462, "cookies": false, "type": "", "demo": "functions\/delete-deployment.md", @@ -11982,7 +12323,7 @@ "x-appwrite": { "method": "getDeploymentDownload", "group": "deployments", - "weight": 451, + "weight": 465, "cookies": false, "type": "location", "demo": "functions\/get-deployment-download.md", @@ -12073,7 +12414,7 @@ "x-appwrite": { "method": "updateDeploymentStatus", "group": "deployments", - "weight": 453, + "weight": 467, "cookies": false, "type": "", "demo": "functions\/update-deployment-status.md", @@ -12145,7 +12486,7 @@ "x-appwrite": { "method": "listExecutions", "group": "executions", - "weight": 456, + "weight": 470, "cookies": false, "type": "", "demo": "functions\/list-executions.md", @@ -12222,7 +12563,7 @@ "x-appwrite": { "method": "createExecution", "group": "executions", - "weight": 454, + "weight": 468, "cookies": false, "type": "", "demo": "functions\/create-execution.md", @@ -12340,7 +12681,7 @@ "x-appwrite": { "method": "getExecution", "group": "executions", - "weight": 455, + "weight": 469, "cookies": false, "type": "", "demo": "functions\/get-execution.md", @@ -12407,7 +12748,7 @@ "x-appwrite": { "method": "deleteExecution", "group": "executions", - "weight": 457, + "weight": 471, "cookies": false, "type": "", "demo": "functions\/delete-execution.md", @@ -12479,7 +12820,7 @@ "x-appwrite": { "method": "listVariables", "group": "variables", - "weight": 462, + "weight": 476, "cookies": false, "type": "", "demo": "functions\/list-variables.md", @@ -12539,7 +12880,7 @@ "x-appwrite": { "method": "createVariable", "group": "variables", - "weight": 460, + "weight": 474, "cookies": false, "type": "", "demo": "functions\/create-variable.md", @@ -12631,7 +12972,7 @@ "x-appwrite": { "method": "getVariable", "group": "variables", - "weight": 461, + "weight": 475, "cookies": false, "type": "", "demo": "functions\/get-variable.md", @@ -12701,7 +13042,7 @@ "x-appwrite": { "method": "updateVariable", "group": "variables", - "weight": 463, + "weight": 477, "cookies": false, "type": "", "demo": "functions\/update-variable.md", @@ -12793,7 +13134,7 @@ "x-appwrite": { "method": "deleteVariable", "group": "variables", - "weight": 464, + "weight": 478, "cookies": false, "type": "", "demo": "functions\/delete-variable.md", @@ -12865,7 +13206,7 @@ "x-appwrite": { "method": "query", "group": "graphql", - "weight": 250, + "weight": 259, "cookies": false, "type": "graphql", "demo": "graphql\/query.md", @@ -12919,7 +13260,7 @@ "x-appwrite": { "method": "mutation", "group": "graphql", - "weight": 249, + "weight": 258, "cookies": false, "type": "graphql", "demo": "graphql\/mutation.md", @@ -12973,7 +13314,7 @@ "x-appwrite": { "method": "get", "group": "health", - "weight": 78, + "weight": 83, "cookies": false, "type": "", "demo": "health\/get.md", @@ -13023,7 +13364,7 @@ "x-appwrite": { "method": "getAntivirus", "group": "health", - "weight": 99, + "weight": 104, "cookies": false, "type": "", "demo": "health\/get-antivirus.md", @@ -13073,7 +13414,7 @@ "x-appwrite": { "method": "getCache", "group": "health", - "weight": 81, + "weight": 86, "cookies": false, "type": "", "demo": "health\/get-cache.md", @@ -13123,7 +13464,7 @@ "x-appwrite": { "method": "getCertificate", "group": "health", - "weight": 86, + "weight": 91, "cookies": false, "type": "", "demo": "health\/get-certificate.md", @@ -13184,7 +13525,7 @@ "x-appwrite": { "method": "getDB", "group": "health", - "weight": 80, + "weight": 85, "cookies": false, "type": "", "demo": "health\/get-db.md", @@ -13234,7 +13575,7 @@ "x-appwrite": { "method": "getPubSub", "group": "health", - "weight": 82, + "weight": 87, "cookies": false, "type": "", "demo": "health\/get-pub-sub.md", @@ -13284,7 +13625,7 @@ "x-appwrite": { "method": "getQueueBuilds", "group": "queue", - "weight": 88, + "weight": 93, "cookies": false, "type": "", "demo": "health\/get-queue-builds.md", @@ -13347,7 +13688,7 @@ "x-appwrite": { "method": "getQueueCertificates", "group": "queue", - "weight": 87, + "weight": 92, "cookies": false, "type": "", "demo": "health\/get-queue-certificates.md", @@ -13410,7 +13751,7 @@ "x-appwrite": { "method": "getQueueDatabases", "group": "queue", - "weight": 89, + "weight": 94, "cookies": false, "type": "", "demo": "health\/get-queue-databases.md", @@ -13484,7 +13825,7 @@ "x-appwrite": { "method": "getQueueDeletes", "group": "queue", - "weight": 90, + "weight": 95, "cookies": false, "type": "", "demo": "health\/get-queue-deletes.md", @@ -13547,7 +13888,7 @@ "x-appwrite": { "method": "getFailedJobs", "group": "queue", - "weight": 100, + "weight": 105, "cookies": false, "type": "", "demo": "health\/get-failed-jobs.md", @@ -13636,7 +13977,7 @@ "x-appwrite": { "method": "getQueueFunctions", "group": "queue", - "weight": 94, + "weight": 99, "cookies": false, "type": "", "demo": "health\/get-queue-functions.md", @@ -13699,7 +14040,7 @@ "x-appwrite": { "method": "getQueueLogs", "group": "queue", - "weight": 85, + "weight": 90, "cookies": false, "type": "", "demo": "health\/get-queue-logs.md", @@ -13762,7 +14103,7 @@ "x-appwrite": { "method": "getQueueMails", "group": "queue", - "weight": 91, + "weight": 96, "cookies": false, "type": "", "demo": "health\/get-queue-mails.md", @@ -13825,7 +14166,7 @@ "x-appwrite": { "method": "getQueueMessaging", "group": "queue", - "weight": 92, + "weight": 97, "cookies": false, "type": "", "demo": "health\/get-queue-messaging.md", @@ -13888,7 +14229,7 @@ "x-appwrite": { "method": "getQueueMigrations", "group": "queue", - "weight": 93, + "weight": 98, "cookies": false, "type": "", "demo": "health\/get-queue-migrations.md", @@ -13951,7 +14292,7 @@ "x-appwrite": { "method": "getQueueStatsResources", "group": "queue", - "weight": 95, + "weight": 100, "cookies": false, "type": "", "demo": "health\/get-queue-stats-resources.md", @@ -14014,7 +14355,7 @@ "x-appwrite": { "method": "getQueueUsage", "group": "queue", - "weight": 96, + "weight": 101, "cookies": false, "type": "", "demo": "health\/get-queue-usage.md", @@ -14077,7 +14418,7 @@ "x-appwrite": { "method": "getQueueWebhooks", "group": "queue", - "weight": 84, + "weight": 89, "cookies": false, "type": "", "demo": "health\/get-queue-webhooks.md", @@ -14140,7 +14481,7 @@ "x-appwrite": { "method": "getStorage", "group": "storage", - "weight": 98, + "weight": 103, "cookies": false, "type": "", "demo": "health\/get-storage.md", @@ -14190,7 +14531,7 @@ "x-appwrite": { "method": "getStorageLocal", "group": "storage", - "weight": 97, + "weight": 102, "cookies": false, "type": "", "demo": "health\/get-storage-local.md", @@ -14240,7 +14581,7 @@ "x-appwrite": { "method": "getTime", "group": "health", - "weight": 83, + "weight": 88, "cookies": false, "type": "", "demo": "health\/get-time.md", @@ -14290,7 +14631,7 @@ "x-appwrite": { "method": "get", "group": null, - "weight": 70, + "weight": 75, "cookies": false, "type": "", "demo": "locale\/get.md", @@ -14344,7 +14685,7 @@ "x-appwrite": { "method": "listCodes", "group": null, - "weight": 71, + "weight": 76, "cookies": false, "type": "", "demo": "locale\/list-codes.md", @@ -14398,7 +14739,7 @@ "x-appwrite": { "method": "listContinents", "group": null, - "weight": 75, + "weight": 80, "cookies": false, "type": "", "demo": "locale\/list-continents.md", @@ -14452,7 +14793,7 @@ "x-appwrite": { "method": "listCountries", "group": null, - "weight": 72, + "weight": 77, "cookies": false, "type": "", "demo": "locale\/list-countries.md", @@ -14506,7 +14847,7 @@ "x-appwrite": { "method": "listCountriesEU", "group": null, - "weight": 73, + "weight": 78, "cookies": false, "type": "", "demo": "locale\/list-countries-eu.md", @@ -14560,7 +14901,7 @@ "x-appwrite": { "method": "listCountriesPhones", "group": null, - "weight": 74, + "weight": 79, "cookies": false, "type": "", "demo": "locale\/list-countries-phones.md", @@ -14614,7 +14955,7 @@ "x-appwrite": { "method": "listCurrencies", "group": null, - "weight": 76, + "weight": 81, "cookies": false, "type": "", "demo": "locale\/list-currencies.md", @@ -14668,7 +15009,7 @@ "x-appwrite": { "method": "listLanguages", "group": null, - "weight": 77, + "weight": 82, "cookies": false, "type": "", "demo": "locale\/list-languages.md", @@ -14722,7 +15063,7 @@ "x-appwrite": { "method": "listMessages", "group": "messages", - "weight": 304, + "weight": 318, "cookies": false, "type": "", "demo": "messaging\/list-messages.md", @@ -14799,7 +15140,7 @@ "x-appwrite": { "method": "createEmail", "group": "messages", - "weight": 301, + "weight": 315, "cookies": false, "type": "", "demo": "messaging\/create-email.md", @@ -14944,7 +15285,7 @@ "x-appwrite": { "method": "updateEmail", "group": "messages", - "weight": 308, + "weight": 322, "cookies": false, "type": "", "demo": "messaging\/update-email.md", @@ -15091,7 +15432,7 @@ "x-appwrite": { "method": "createPush", "group": "messages", - "weight": 303, + "weight": 317, "cookies": false, "type": "", "demo": "messaging\/create-push.md", @@ -15266,7 +15607,7 @@ "x-appwrite": { "method": "updatePush", "group": "messages", - "weight": 310, + "weight": 324, "cookies": false, "type": "", "demo": "messaging\/update-push.md", @@ -15445,7 +15786,7 @@ "x-appwrite": { "method": "createSms", "group": "messages", - "weight": 302, + "weight": 316, "cookies": false, "type": "", "demo": "messaging\/create-sms.md", @@ -15625,7 +15966,7 @@ "x-appwrite": { "method": "updateSms", "group": "messages", - "weight": 309, + "weight": 323, "cookies": false, "type": "", "demo": "messaging\/update-sms.md", @@ -15806,7 +16147,7 @@ "x-appwrite": { "method": "getMessage", "group": "messages", - "weight": 307, + "weight": 321, "cookies": false, "type": "", "demo": "messaging\/get-message.md", @@ -15860,7 +16201,7 @@ "x-appwrite": { "method": "delete", "group": "messages", - "weight": 311, + "weight": 325, "cookies": false, "type": "", "demo": "messaging\/delete.md", @@ -15923,7 +16264,7 @@ "x-appwrite": { "method": "listMessageLogs", "group": "logs", - "weight": 305, + "weight": 319, "cookies": false, "type": "", "demo": "messaging\/list-message-logs.md", @@ -15999,7 +16340,7 @@ "x-appwrite": { "method": "listTargets", "group": "messages", - "weight": 306, + "weight": 320, "cookies": false, "type": "", "demo": "messaging\/list-targets.md", @@ -16075,7 +16416,7 @@ "x-appwrite": { "method": "listProviders", "group": "providers", - "weight": 276, + "weight": 290, "cookies": false, "type": "", "demo": "messaging\/list-providers.md", @@ -16152,7 +16493,7 @@ "x-appwrite": { "method": "createApnsProvider", "group": "providers", - "weight": 275, + "weight": 289, "cookies": false, "type": "", "demo": "messaging\/create-apns-provider.md", @@ -16330,7 +16671,7 @@ "x-appwrite": { "method": "updateApnsProvider", "group": "providers", - "weight": 288, + "weight": 302, "cookies": false, "type": "", "demo": "messaging\/update-apns-provider.md", @@ -16509,7 +16850,7 @@ "x-appwrite": { "method": "createFcmProvider", "group": "providers", - "weight": 274, + "weight": 288, "cookies": false, "type": "", "demo": "messaging\/create-fcm-provider.md", @@ -16659,7 +17000,7 @@ "x-appwrite": { "method": "updateFcmProvider", "group": "providers", - "weight": 287, + "weight": 301, "cookies": false, "type": "", "demo": "messaging\/update-fcm-provider.md", @@ -16810,7 +17151,7 @@ "x-appwrite": { "method": "createMailgunProvider", "group": "providers", - "weight": 266, + "weight": 280, "cookies": false, "type": "", "demo": "messaging\/create-mailgun-provider.md", @@ -16926,7 +17267,7 @@ "x-appwrite": { "method": "updateMailgunProvider", "group": "providers", - "weight": 279, + "weight": 293, "cookies": false, "type": "", "demo": "messaging\/update-mailgun-provider.md", @@ -17045,7 +17386,7 @@ "x-appwrite": { "method": "createMsg91Provider", "group": "providers", - "weight": 269, + "weight": 283, "cookies": false, "type": "", "demo": "messaging\/create-msg-91-provider.md", @@ -17141,7 +17482,7 @@ "x-appwrite": { "method": "updateMsg91Provider", "group": "providers", - "weight": 282, + "weight": 296, "cookies": false, "type": "", "demo": "messaging\/update-msg-91-provider.md", @@ -17240,7 +17581,7 @@ "x-appwrite": { "method": "createSendgridProvider", "group": "providers", - "weight": 267, + "weight": 281, "cookies": false, "type": "", "demo": "messaging\/create-sendgrid-provider.md", @@ -17346,7 +17687,7 @@ "x-appwrite": { "method": "updateSendgridProvider", "group": "providers", - "weight": 280, + "weight": 294, "cookies": false, "type": "", "demo": "messaging\/update-sendgrid-provider.md", @@ -17455,7 +17796,7 @@ "x-appwrite": { "method": "createSmtpProvider", "group": "providers", - "weight": 268, + "weight": 282, "cookies": false, "type": "", "demo": "messaging\/create-smtp-provider.md", @@ -17685,7 +18026,7 @@ "x-appwrite": { "method": "updateSmtpProvider", "group": "providers", - "weight": 281, + "weight": 295, "cookies": false, "type": "", "demo": "messaging\/update-smtp-provider.md", @@ -17913,7 +18254,7 @@ "x-appwrite": { "method": "createTelesignProvider", "group": "providers", - "weight": 270, + "weight": 284, "cookies": false, "type": "", "demo": "messaging\/create-telesign-provider.md", @@ -18009,7 +18350,7 @@ "x-appwrite": { "method": "updateTelesignProvider", "group": "providers", - "weight": 283, + "weight": 297, "cookies": false, "type": "", "demo": "messaging\/update-telesign-provider.md", @@ -18108,7 +18449,7 @@ "x-appwrite": { "method": "createTextmagicProvider", "group": "providers", - "weight": 271, + "weight": 285, "cookies": false, "type": "", "demo": "messaging\/create-textmagic-provider.md", @@ -18204,7 +18545,7 @@ "x-appwrite": { "method": "updateTextmagicProvider", "group": "providers", - "weight": 284, + "weight": 298, "cookies": false, "type": "", "demo": "messaging\/update-textmagic-provider.md", @@ -18303,7 +18644,7 @@ "x-appwrite": { "method": "createTwilioProvider", "group": "providers", - "weight": 272, + "weight": 286, "cookies": false, "type": "", "demo": "messaging\/create-twilio-provider.md", @@ -18399,7 +18740,7 @@ "x-appwrite": { "method": "updateTwilioProvider", "group": "providers", - "weight": 285, + "weight": 299, "cookies": false, "type": "", "demo": "messaging\/update-twilio-provider.md", @@ -18498,7 +18839,7 @@ "x-appwrite": { "method": "createVonageProvider", "group": "providers", - "weight": 273, + "weight": 287, "cookies": false, "type": "", "demo": "messaging\/create-vonage-provider.md", @@ -18594,7 +18935,7 @@ "x-appwrite": { "method": "updateVonageProvider", "group": "providers", - "weight": 286, + "weight": 300, "cookies": false, "type": "", "demo": "messaging\/update-vonage-provider.md", @@ -18693,7 +19034,7 @@ "x-appwrite": { "method": "getProvider", "group": "providers", - "weight": 278, + "weight": 292, "cookies": false, "type": "", "demo": "messaging\/get-provider.md", @@ -18747,7 +19088,7 @@ "x-appwrite": { "method": "deleteProvider", "group": "providers", - "weight": 289, + "weight": 303, "cookies": false, "type": "", "demo": "messaging\/delete-provider.md", @@ -18810,7 +19151,7 @@ "x-appwrite": { "method": "listProviderLogs", "group": "providers", - "weight": 277, + "weight": 291, "cookies": false, "type": "", "demo": "messaging\/list-provider-logs.md", @@ -18886,7 +19227,7 @@ "x-appwrite": { "method": "listSubscriberLogs", "group": "subscribers", - "weight": 298, + "weight": 312, "cookies": false, "type": "", "demo": "messaging\/list-subscriber-logs.md", @@ -18962,7 +19303,7 @@ "x-appwrite": { "method": "listTopics", "group": "topics", - "weight": 291, + "weight": 305, "cookies": false, "type": "", "demo": "messaging\/list-topics.md", @@ -19037,7 +19378,7 @@ "x-appwrite": { "method": "createTopic", "group": "topics", - "weight": 290, + "weight": 304, "cookies": false, "type": "", "demo": "messaging\/create-topic.md", @@ -19121,7 +19462,7 @@ "x-appwrite": { "method": "getTopic", "group": "topics", - "weight": 293, + "weight": 307, "cookies": false, "type": "", "demo": "messaging\/get-topic.md", @@ -19182,7 +19523,7 @@ "x-appwrite": { "method": "updateTopic", "group": "topics", - "weight": 294, + "weight": 308, "cookies": false, "type": "", "demo": "messaging\/update-topic.md", @@ -19260,7 +19601,7 @@ "x-appwrite": { "method": "deleteTopic", "group": "topics", - "weight": 295, + "weight": 309, "cookies": false, "type": "", "demo": "messaging\/delete-topic.md", @@ -19323,7 +19664,7 @@ "x-appwrite": { "method": "listTopicLogs", "group": "topics", - "weight": 292, + "weight": 306, "cookies": false, "type": "", "demo": "messaging\/list-topic-logs.md", @@ -19399,7 +19740,7 @@ "x-appwrite": { "method": "listSubscribers", "group": "subscribers", - "weight": 297, + "weight": 311, "cookies": false, "type": "", "demo": "messaging\/list-subscribers.md", @@ -19484,7 +19825,7 @@ "x-appwrite": { "method": "createSubscriber", "group": "subscribers", - "weight": 296, + "weight": 310, "cookies": false, "type": "", "demo": "messaging\/create-subscriber.md", @@ -19576,7 +19917,7 @@ "x-appwrite": { "method": "getSubscriber", "group": "subscribers", - "weight": 299, + "weight": 313, "cookies": false, "type": "", "demo": "messaging\/get-subscriber.md", @@ -19640,7 +19981,7 @@ "x-appwrite": { "method": "deleteSubscriber", "group": "subscribers", - "weight": 300, + "weight": 314, "cookies": false, "type": "", "demo": "messaging\/delete-subscriber.md", @@ -19717,7 +20058,7 @@ "x-appwrite": { "method": "list", "group": "sites", - "weight": 469, + "weight": 483, "cookies": false, "type": "", "demo": "sites\/list.md", @@ -19788,7 +20129,7 @@ "x-appwrite": { "method": "create", "group": "sites", - "weight": 467, + "weight": 481, "cookies": false, "type": "", "demo": "sites\/create.md", @@ -20038,7 +20379,7 @@ "x-appwrite": { "method": "listFrameworks", "group": "frameworks", - "weight": 472, + "weight": 486, "cookies": false, "type": "", "demo": "sites\/list-frameworks.md", @@ -20088,7 +20429,7 @@ "x-appwrite": { "method": "listSpecifications", "group": "frameworks", - "weight": 495, + "weight": 509, "cookies": false, "type": "", "demo": "sites\/list-specifications.md", @@ -20139,7 +20480,7 @@ "x-appwrite": { "method": "get", "group": "sites", - "weight": 468, + "weight": 482, "cookies": false, "type": "", "demo": "sites\/get.md", @@ -20199,7 +20540,7 @@ "x-appwrite": { "method": "update", "group": "sites", - "weight": 470, + "weight": 484, "cookies": false, "type": "", "demo": "sites\/update.md", @@ -20445,7 +20786,7 @@ "x-appwrite": { "method": "delete", "group": "sites", - "weight": 471, + "weight": 485, "cookies": false, "type": "", "demo": "sites\/delete.md", @@ -20507,7 +20848,7 @@ "x-appwrite": { "method": "updateSiteDeployment", "group": "sites", - "weight": 478, + "weight": 492, "cookies": false, "type": "", "demo": "sites\/update-site-deployment.md", @@ -20588,7 +20929,7 @@ "x-appwrite": { "method": "listDeployments", "group": "deployments", - "weight": 477, + "weight": 491, "cookies": false, "type": "", "demo": "sites\/list-deployments.md", @@ -20672,7 +21013,7 @@ "x-appwrite": { "method": "createDeployment", "group": "deployments", - "weight": 473, + "weight": 487, "cookies": false, "type": "upload", "demo": "sites\/create-deployment.md", @@ -20774,7 +21115,7 @@ "x-appwrite": { "method": "createDuplicateDeployment", "group": "deployments", - "weight": 481, + "weight": 495, "cookies": false, "type": "", "demo": "sites\/create-duplicate-deployment.md", @@ -20855,7 +21196,7 @@ "x-appwrite": { "method": "createTemplateDeployment", "group": "deployments", - "weight": 474, + "weight": 488, "cookies": false, "type": "", "demo": "sites\/create-template-deployment.md", @@ -20959,7 +21300,7 @@ "x-appwrite": { "method": "createVcsDeployment", "group": "deployments", - "weight": 475, + "weight": 489, "cookies": false, "type": "", "demo": "sites\/create-vcs-deployment.md", @@ -21058,7 +21399,7 @@ "x-appwrite": { "method": "getDeployment", "group": "deployments", - "weight": 476, + "weight": 490, "cookies": false, "type": "", "demo": "sites\/get-deployment.md", @@ -21121,7 +21462,7 @@ "x-appwrite": { "method": "deleteDeployment", "group": "deployments", - "weight": 479, + "weight": 493, "cookies": false, "type": "", "demo": "sites\/delete-deployment.md", @@ -21186,7 +21527,7 @@ "x-appwrite": { "method": "getDeploymentDownload", "group": "deployments", - "weight": 480, + "weight": 494, "cookies": false, "type": "location", "demo": "sites\/get-deployment-download.md", @@ -21277,7 +21618,7 @@ "x-appwrite": { "method": "updateDeploymentStatus", "group": "deployments", - "weight": 482, + "weight": 496, "cookies": false, "type": "", "demo": "sites\/update-deployment-status.md", @@ -21349,7 +21690,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 484, + "weight": 498, "cookies": false, "type": "", "demo": "sites\/list-logs.md", @@ -21421,7 +21762,7 @@ "x-appwrite": { "method": "getLog", "group": "logs", - "weight": 483, + "weight": 497, "cookies": false, "type": "", "demo": "sites\/get-log.md", @@ -21484,7 +21825,7 @@ "x-appwrite": { "method": "deleteLog", "group": "logs", - "weight": 485, + "weight": 499, "cookies": false, "type": "", "demo": "sites\/delete-log.md", @@ -21556,7 +21897,7 @@ "x-appwrite": { "method": "listVariables", "group": "variables", - "weight": 488, + "weight": 502, "cookies": false, "type": "", "demo": "sites\/list-variables.md", @@ -21616,7 +21957,7 @@ "x-appwrite": { "method": "createVariable", "group": "variables", - "weight": 486, + "weight": 500, "cookies": false, "type": "", "demo": "sites\/create-variable.md", @@ -21708,7 +22049,7 @@ "x-appwrite": { "method": "getVariable", "group": "variables", - "weight": 487, + "weight": 501, "cookies": false, "type": "", "demo": "sites\/get-variable.md", @@ -21778,7 +22119,7 @@ "x-appwrite": { "method": "updateVariable", "group": "variables", - "weight": 489, + "weight": 503, "cookies": false, "type": "", "demo": "sites\/update-variable.md", @@ -21870,7 +22211,7 @@ "x-appwrite": { "method": "deleteVariable", "group": "variables", - "weight": 490, + "weight": 504, "cookies": false, "type": "", "demo": "sites\/delete-variable.md", @@ -21942,7 +22283,7 @@ "x-appwrite": { "method": "listBuckets", "group": "buckets", - "weight": 155, + "weight": 163, "cookies": false, "type": "", "demo": "storage\/list-buckets.md", @@ -22016,7 +22357,7 @@ "x-appwrite": { "method": "createBucket", "group": "buckets", - "weight": 154, + "weight": 162, "cookies": false, "type": "", "demo": "storage\/create-bucket.md", @@ -22144,7 +22485,7 @@ "x-appwrite": { "method": "getBucket", "group": "buckets", - "weight": 156, + "weight": 164, "cookies": false, "type": "", "demo": "storage\/get-bucket.md", @@ -22204,7 +22545,7 @@ "x-appwrite": { "method": "updateBucket", "group": "buckets", - "weight": 157, + "weight": 165, "cookies": false, "type": "", "demo": "storage\/update-bucket.md", @@ -22329,7 +22670,7 @@ "x-appwrite": { "method": "deleteBucket", "group": "buckets", - "weight": 158, + "weight": 166, "cookies": false, "type": "", "demo": "storage\/delete-bucket.md", @@ -22391,7 +22732,7 @@ "x-appwrite": { "method": "listFiles", "group": "files", - "weight": 160, + "weight": 168, "cookies": false, "type": "", "demo": "storage\/list-files.md", @@ -22479,7 +22820,7 @@ "x-appwrite": { "method": "createFile", "group": "files", - "weight": 159, + "weight": 167, "cookies": false, "type": "upload", "demo": "storage\/create-file.md", @@ -22579,7 +22920,7 @@ "x-appwrite": { "method": "getFile", "group": "files", - "weight": 161, + "weight": 169, "cookies": false, "type": "", "demo": "storage\/get-file.md", @@ -22653,7 +22994,7 @@ "x-appwrite": { "method": "updateFile", "group": "files", - "weight": 166, + "weight": 174, "cookies": false, "type": "", "demo": "storage\/update-file.md", @@ -22744,7 +23085,7 @@ "x-appwrite": { "method": "deleteFile", "group": "files", - "weight": 167, + "weight": 175, "cookies": false, "type": "", "demo": "storage\/delete-file.md", @@ -22813,7 +23154,7 @@ "x-appwrite": { "method": "getFileDownload", "group": "files", - "weight": 163, + "weight": 171, "cookies": false, "type": "location", "demo": "storage\/get-file-download.md", @@ -22893,7 +23234,7 @@ "x-appwrite": { "method": "getFilePreview", "group": "files", - "weight": 162, + "weight": 170, "cookies": false, "type": "location", "demo": "storage\/get-file-preview.md", @@ -23123,7 +23464,7 @@ "x-appwrite": { "method": "getFileView", "group": "files", - "weight": 164, + "weight": 172, "cookies": false, "type": "location", "demo": "storage\/get-file-view.md", @@ -23210,7 +23551,7 @@ "x-appwrite": { "method": "list", "group": "tablesdb", - "weight": 376, + "weight": 390, "cookies": false, "type": "", "demo": "tablesdb\/list.md", @@ -23284,7 +23625,7 @@ "x-appwrite": { "method": "create", "group": "tablesdb", - "weight": 372, + "weight": 386, "cookies": false, "type": "", "demo": "tablesdb\/create.md", @@ -23364,7 +23705,7 @@ "x-appwrite": { "method": "get", "group": "tablesdb", - "weight": 373, + "weight": 387, "cookies": false, "type": "", "demo": "tablesdb\/get.md", @@ -23424,7 +23765,7 @@ "x-appwrite": { "method": "update", "group": "tablesdb", - "weight": 374, + "weight": 388, "cookies": false, "type": "", "demo": "tablesdb\/update.md", @@ -23501,7 +23842,7 @@ "x-appwrite": { "method": "delete", "group": "tablesdb", - "weight": 375, + "weight": 389, "cookies": false, "type": "", "demo": "tablesdb\/delete.md", @@ -23563,7 +23904,7 @@ "x-appwrite": { "method": "listTables", "group": "tables", - "weight": 383, + "weight": 397, "cookies": false, "type": "", "demo": "tablesdb\/list-tables.md", @@ -23650,7 +23991,7 @@ "x-appwrite": { "method": "createTable", "group": "tables", - "weight": 379, + "weight": 393, "cookies": false, "type": "", "demo": "tablesdb\/create-table.md", @@ -23758,7 +24099,7 @@ "x-appwrite": { "method": "getTable", "group": "tables", - "weight": 380, + "weight": 394, "cookies": false, "type": "", "demo": "tablesdb\/get-table.md", @@ -23831,7 +24172,7 @@ "x-appwrite": { "method": "updateTable", "group": "tables", - "weight": 381, + "weight": 395, "cookies": false, "type": "", "demo": "tablesdb\/update-table.md", @@ -23934,7 +24275,7 @@ "x-appwrite": { "method": "deleteTable", "group": "tables", - "weight": 382, + "weight": 396, "cookies": false, "type": "", "demo": "tablesdb\/delete-table.md", @@ -24009,7 +24350,7 @@ "x-appwrite": { "method": "listColumns", "group": "columns", - "weight": 388, + "weight": 402, "cookies": false, "type": "", "demo": "tablesdb\/list-columns.md", @@ -24097,7 +24438,7 @@ "x-appwrite": { "method": "createBooleanColumn", "group": "columns", - "weight": 389, + "weight": 403, "cookies": false, "type": "", "demo": "tablesdb\/create-boolean-column.md", @@ -24207,7 +24548,7 @@ "x-appwrite": { "method": "updateBooleanColumn", "group": "columns", - "weight": 390, + "weight": 404, "cookies": false, "type": "", "demo": "tablesdb\/update-boolean-column.md", @@ -24322,7 +24663,7 @@ "x-appwrite": { "method": "createDatetimeColumn", "group": "columns", - "weight": 391, + "weight": 405, "cookies": false, "type": "", "demo": "tablesdb\/create-datetime-column.md", @@ -24432,7 +24773,7 @@ "x-appwrite": { "method": "updateDatetimeColumn", "group": "columns", - "weight": 392, + "weight": 406, "cookies": false, "type": "", "demo": "tablesdb\/update-datetime-column.md", @@ -24547,7 +24888,7 @@ "x-appwrite": { "method": "createEmailColumn", "group": "columns", - "weight": 393, + "weight": 407, "cookies": false, "type": "", "demo": "tablesdb\/create-email-column.md", @@ -24657,7 +24998,7 @@ "x-appwrite": { "method": "updateEmailColumn", "group": "columns", - "weight": 394, + "weight": 408, "cookies": false, "type": "", "demo": "tablesdb\/update-email-column.md", @@ -24772,7 +25113,7 @@ "x-appwrite": { "method": "createEnumColumn", "group": "columns", - "weight": 395, + "weight": 409, "cookies": false, "type": "", "demo": "tablesdb\/create-enum-column.md", @@ -24891,7 +25232,7 @@ "x-appwrite": { "method": "updateEnumColumn", "group": "columns", - "weight": 396, + "weight": 410, "cookies": false, "type": "", "demo": "tablesdb\/update-enum-column.md", @@ -25015,7 +25356,7 @@ "x-appwrite": { "method": "createFloatColumn", "group": "columns", - "weight": 397, + "weight": 411, "cookies": false, "type": "", "demo": "tablesdb\/create-float-column.md", @@ -25135,7 +25476,7 @@ "x-appwrite": { "method": "updateFloatColumn", "group": "columns", - "weight": 398, + "weight": 412, "cookies": false, "type": "", "demo": "tablesdb\/update-float-column.md", @@ -25260,7 +25601,7 @@ "x-appwrite": { "method": "createIntegerColumn", "group": "columns", - "weight": 399, + "weight": 413, "cookies": false, "type": "", "demo": "tablesdb\/create-integer-column.md", @@ -25380,7 +25721,7 @@ "x-appwrite": { "method": "updateIntegerColumn", "group": "columns", - "weight": 400, + "weight": 414, "cookies": false, "type": "", "demo": "tablesdb\/update-integer-column.md", @@ -25505,7 +25846,7 @@ "x-appwrite": { "method": "createIpColumn", "group": "columns", - "weight": 401, + "weight": 415, "cookies": false, "type": "", "demo": "tablesdb\/create-ip-column.md", @@ -25615,7 +25956,7 @@ "x-appwrite": { "method": "updateIpColumn", "group": "columns", - "weight": 402, + "weight": 416, "cookies": false, "type": "", "demo": "tablesdb\/update-ip-column.md", @@ -25730,7 +26071,7 @@ "x-appwrite": { "method": "createLineColumn", "group": "columns", - "weight": 403, + "weight": 417, "cookies": false, "type": "", "demo": "tablesdb\/create-line-column.md", @@ -25843,7 +26184,7 @@ "x-appwrite": { "method": "updateLineColumn", "group": "columns", - "weight": 404, + "weight": 418, "cookies": false, "type": "", "demo": "tablesdb\/update-line-column.md", @@ -25964,7 +26305,7 @@ "x-appwrite": { "method": "createPointColumn", "group": "columns", - "weight": 405, + "weight": 419, "cookies": false, "type": "", "demo": "tablesdb\/create-point-column.md", @@ -26077,7 +26418,7 @@ "x-appwrite": { "method": "updatePointColumn", "group": "columns", - "weight": 406, + "weight": 420, "cookies": false, "type": "", "demo": "tablesdb\/update-point-column.md", @@ -26198,7 +26539,7 @@ "x-appwrite": { "method": "createPolygonColumn", "group": "columns", - "weight": 407, + "weight": 421, "cookies": false, "type": "", "demo": "tablesdb\/create-polygon-column.md", @@ -26311,7 +26652,7 @@ "x-appwrite": { "method": "updatePolygonColumn", "group": "columns", - "weight": 408, + "weight": 422, "cookies": false, "type": "", "demo": "tablesdb\/update-polygon-column.md", @@ -26432,7 +26773,7 @@ "x-appwrite": { "method": "createRelationshipColumn", "group": "columns", - "weight": 409, + "weight": 423, "cookies": false, "type": "", "demo": "tablesdb\/create-relationship-column.md", @@ -26567,7 +26908,7 @@ "x-appwrite": { "method": "createStringColumn", "group": "columns", - "weight": 411, + "weight": 425, "cookies": false, "type": "", "demo": "tablesdb\/create-string-column.md", @@ -26688,7 +27029,7 @@ "x-appwrite": { "method": "updateStringColumn", "group": "columns", - "weight": 412, + "weight": 426, "cookies": false, "type": "", "demo": "tablesdb\/update-string-column.md", @@ -26808,7 +27149,7 @@ "x-appwrite": { "method": "createUrlColumn", "group": "columns", - "weight": 413, + "weight": 427, "cookies": false, "type": "", "demo": "tablesdb\/create-url-column.md", @@ -26918,7 +27259,7 @@ "x-appwrite": { "method": "updateUrlColumn", "group": "columns", - "weight": 414, + "weight": 428, "cookies": false, "type": "", "demo": "tablesdb\/update-url-column.md", @@ -27064,7 +27405,7 @@ "x-appwrite": { "method": "getColumn", "group": "columns", - "weight": 386, + "weight": 400, "cookies": false, "type": "", "demo": "tablesdb\/get-column.md", @@ -27139,7 +27480,7 @@ "x-appwrite": { "method": "deleteColumn", "group": "columns", - "weight": 387, + "weight": 401, "cookies": false, "type": "", "demo": "tablesdb\/delete-column.md", @@ -27223,7 +27564,7 @@ "x-appwrite": { "method": "updateRelationshipColumn", "group": "columns", - "weight": 410, + "weight": 424, "cookies": false, "type": "", "demo": "tablesdb\/update-relationship-column.md", @@ -27335,7 +27676,7 @@ "x-appwrite": { "method": "listIndexes", "group": "indexes", - "weight": 418, + "weight": 432, "cookies": false, "type": "", "demo": "tablesdb\/list-indexes.md", @@ -27421,7 +27762,7 @@ "x-appwrite": { "method": "createIndex", "group": "indexes", - "weight": 415, + "weight": 429, "cookies": false, "type": "", "demo": "tablesdb\/create-index.md", @@ -27554,7 +27895,7 @@ "x-appwrite": { "method": "getIndex", "group": "indexes", - "weight": 416, + "weight": 430, "cookies": false, "type": "", "demo": "tablesdb\/get-index.md", @@ -27629,7 +27970,7 @@ "x-appwrite": { "method": "deleteIndex", "group": "indexes", - "weight": 417, + "weight": 431, "cookies": false, "type": "", "demo": "tablesdb\/delete-index.md", @@ -27713,7 +28054,7 @@ "x-appwrite": { "method": "listRows", "group": "rows", - "weight": 427, + "weight": 441, "cookies": false, "type": "", "demo": "tablesdb\/list-rows.md", @@ -27803,7 +28144,7 @@ "x-appwrite": { "method": "createRow", "group": "rows", - "weight": 419, + "weight": 433, "cookies": false, "type": "", "demo": "tablesdb\/create-row.md", @@ -27976,7 +28317,7 @@ "x-appwrite": { "method": "upsertRows", "group": "rows", - "weight": 424, + "weight": 438, "cookies": false, "type": "", "demo": "tablesdb\/upsert-rows.md", @@ -28101,7 +28442,7 @@ "x-appwrite": { "method": "updateRows", "group": "rows", - "weight": 422, + "weight": 436, "cookies": false, "type": "", "demo": "tablesdb\/update-rows.md", @@ -28199,7 +28540,7 @@ "x-appwrite": { "method": "deleteRows", "group": "rows", - "weight": 426, + "weight": 440, "cookies": false, "type": "", "demo": "tablesdb\/delete-rows.md", @@ -28294,7 +28635,7 @@ "x-appwrite": { "method": "getRow", "group": "rows", - "weight": 420, + "weight": 434, "cookies": false, "type": "", "demo": "tablesdb\/get-row.md", @@ -28394,7 +28735,7 @@ "x-appwrite": { "method": "upsertRow", "group": "rows", - "weight": 423, + "weight": 437, "cookies": false, "type": "", "demo": "tablesdb\/upsert-row.md", @@ -28536,7 +28877,7 @@ "x-appwrite": { "method": "updateRow", "group": "rows", - "weight": 421, + "weight": 435, "cookies": false, "type": "", "demo": "tablesdb\/update-row.md", @@ -28640,7 +28981,7 @@ "x-appwrite": { "method": "deleteRow", "group": "rows", - "weight": 425, + "weight": 439, "cookies": false, "type": "", "demo": "tablesdb\/delete-row.md", @@ -28729,7 +29070,7 @@ "x-appwrite": { "method": "decrementRowColumn", "group": "rows", - "weight": 430, + "weight": 444, "cookies": false, "type": "", "demo": "tablesdb\/decrement-row-column.md", @@ -28849,7 +29190,7 @@ "x-appwrite": { "method": "incrementRowColumn", "group": "rows", - "weight": 429, + "weight": 443, "cookies": false, "type": "", "demo": "tablesdb\/increment-row-column.md", @@ -28969,7 +29310,7 @@ "x-appwrite": { "method": "list", "group": "teams", - "weight": 171, + "weight": 179, "cookies": false, "type": "", "demo": "teams\/list.md", @@ -29047,7 +29388,7 @@ "x-appwrite": { "method": "create", "group": "teams", - "weight": 170, + "weight": 178, "cookies": false, "type": "", "demo": "teams\/create.md", @@ -29134,7 +29475,7 @@ "x-appwrite": { "method": "get", "group": "teams", - "weight": 172, + "weight": 180, "cookies": false, "type": "", "demo": "teams\/get.md", @@ -29198,7 +29539,7 @@ "x-appwrite": { "method": "updateName", "group": "teams", - "weight": 174, + "weight": 182, "cookies": false, "type": "", "demo": "teams\/update-name.md", @@ -29274,7 +29615,7 @@ "x-appwrite": { "method": "delete", "group": "teams", - "weight": 176, + "weight": 184, "cookies": false, "type": "", "demo": "teams\/delete.md", @@ -29340,7 +29681,7 @@ "x-appwrite": { "method": "listMemberships", "group": "memberships", - "weight": 178, + "weight": 186, "cookies": false, "type": "", "demo": "teams\/list-memberships.md", @@ -29428,7 +29769,7 @@ "x-appwrite": { "method": "createMembership", "group": "memberships", - "weight": 177, + "weight": 185, "cookies": false, "type": "", "demo": "teams\/create-membership.md", @@ -29541,7 +29882,7 @@ "x-appwrite": { "method": "getMembership", "group": "memberships", - "weight": 179, + "weight": 187, "cookies": false, "type": "", "demo": "teams\/get-membership.md", @@ -29615,7 +29956,7 @@ "x-appwrite": { "method": "updateMembership", "group": "memberships", - "weight": 180, + "weight": 188, "cookies": false, "type": "", "demo": "teams\/update-membership.md", @@ -29704,7 +30045,7 @@ "x-appwrite": { "method": "deleteMembership", "group": "memberships", - "weight": 182, + "weight": 190, "cookies": false, "type": "", "demo": "teams\/delete-membership.md", @@ -29780,7 +30121,7 @@ "x-appwrite": { "method": "updateMembershipStatus", "group": "memberships", - "weight": 181, + "weight": 189, "cookies": false, "type": "", "demo": "teams\/update-membership-status.md", @@ -29879,7 +30220,7 @@ "x-appwrite": { "method": "getPrefs", "group": "teams", - "weight": 173, + "weight": 181, "cookies": false, "type": "", "demo": "teams\/get-prefs.md", @@ -29941,7 +30282,7 @@ "x-appwrite": { "method": "updatePrefs", "group": "teams", - "weight": 175, + "weight": 183, "cookies": false, "type": "", "demo": "teams\/update-prefs.md", @@ -30024,7 +30365,7 @@ "x-appwrite": { "method": "list", "group": "files", - "weight": 507, + "weight": 521, "cookies": false, "type": "", "demo": "tokens\/list.md", @@ -30105,7 +30446,7 @@ "x-appwrite": { "method": "createFileToken", "group": "files", - "weight": 505, + "weight": 519, "cookies": false, "type": "", "demo": "tokens\/create-file-token.md", @@ -30195,7 +30536,7 @@ "x-appwrite": { "method": "get", "group": "tokens", - "weight": 506, + "weight": 520, "cookies": false, "type": "", "demo": "tokens\/get.md", @@ -30256,7 +30597,7 @@ "x-appwrite": { "method": "update", "group": "tokens", - "weight": 508, + "weight": 522, "cookies": false, "type": "", "demo": "tokens\/update.md", @@ -30327,7 +30668,7 @@ "x-appwrite": { "method": "delete", "group": "tokens", - "weight": 509, + "weight": 523, "cookies": false, "type": "", "demo": "tokens\/delete.md", @@ -30390,7 +30731,7 @@ "x-appwrite": { "method": "list", "group": "users", - "weight": 193, + "weight": 201, "cookies": false, "type": "", "demo": "users\/list.md", @@ -30464,7 +30805,7 @@ "x-appwrite": { "method": "create", "group": "users", - "weight": 184, + "weight": 192, "cookies": false, "type": "", "demo": "users\/create.md", @@ -30553,7 +30894,7 @@ "x-appwrite": { "method": "createArgon2User", "group": "users", - "weight": 187, + "weight": 195, "cookies": false, "type": "", "demo": "users\/create-argon-2-user.md", @@ -30639,7 +30980,7 @@ "x-appwrite": { "method": "createBcryptUser", "group": "users", - "weight": 185, + "weight": 193, "cookies": false, "type": "", "demo": "users\/create-bcrypt-user.md", @@ -30725,7 +31066,7 @@ "x-appwrite": { "method": "listIdentities", "group": "identities", - "weight": 201, + "weight": 210, "cookies": false, "type": "", "demo": "users\/list-identities.md", @@ -30794,7 +31135,7 @@ "x-appwrite": { "method": "deleteIdentity", "group": "identities", - "weight": 224, + "weight": 233, "cookies": false, "type": "", "demo": "users\/delete-identity.md", @@ -30856,7 +31197,7 @@ "x-appwrite": { "method": "createMD5User", "group": "users", - "weight": 186, + "weight": 194, "cookies": false, "type": "", "demo": "users\/create-md-5-user.md", @@ -30942,7 +31283,7 @@ "x-appwrite": { "method": "createPHPassUser", "group": "users", - "weight": 189, + "weight": 197, "cookies": false, "type": "", "demo": "users\/create-ph-pass-user.md", @@ -31028,7 +31369,7 @@ "x-appwrite": { "method": "createScryptUser", "group": "users", - "weight": 190, + "weight": 198, "cookies": false, "type": "", "demo": "users\/create-scrypt-user.md", @@ -31144,7 +31485,7 @@ "x-appwrite": { "method": "createScryptModifiedUser", "group": "users", - "weight": 191, + "weight": 199, "cookies": false, "type": "", "demo": "users\/create-scrypt-modified-user.md", @@ -31248,7 +31589,7 @@ "x-appwrite": { "method": "createSHAUser", "group": "users", - "weight": 188, + "weight": 196, "cookies": false, "type": "", "demo": "users\/create-sha-user.md", @@ -31354,7 +31695,7 @@ "x-appwrite": { "method": "get", "group": "users", - "weight": 194, + "weight": 202, "cookies": false, "type": "", "demo": "users\/get.md", @@ -31407,7 +31748,7 @@ "x-appwrite": { "method": "delete", "group": "users", - "weight": 222, + "weight": 231, "cookies": false, "type": "", "demo": "users\/delete.md", @@ -31469,7 +31810,7 @@ "x-appwrite": { "method": "updateEmail", "group": "users", - "weight": 207, + "weight": 216, "cookies": false, "type": "", "demo": "users\/update-email.md", @@ -31550,7 +31891,7 @@ "x-appwrite": { "method": "createJWT", "group": "sessions", - "weight": 225, + "weight": 234, "cookies": false, "type": "", "demo": "users\/create-jwt.md", @@ -31633,7 +31974,7 @@ "x-appwrite": { "method": "updateLabels", "group": "users", - "weight": 203, + "weight": 212, "cookies": false, "type": "", "demo": "users\/update-labels.md", @@ -31717,7 +32058,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 199, + "weight": 208, "cookies": false, "type": "", "demo": "users\/list-logs.md", @@ -31792,7 +32133,7 @@ "x-appwrite": { "method": "listMemberships", "group": "memberships", - "weight": 198, + "weight": 207, "cookies": false, "type": "", "demo": "users\/list-memberships.md", @@ -31878,7 +32219,7 @@ "x-appwrite": { "method": "updateMfa", "group": "users", - "weight": 212, + "weight": 221, "cookies": false, "type": "", "demo": "users\/update-mfa.md", @@ -32012,7 +32353,7 @@ "x-appwrite": { "method": "deleteMfaAuthenticator", "group": "mfa", - "weight": 217, + "weight": 226, "cookies": false, "type": "", "demo": "users\/delete-mfa-authenticator.md", @@ -32147,7 +32488,7 @@ "x-appwrite": { "method": "listMfaFactors", "group": "mfa", - "weight": 213, + "weight": 222, "cookies": false, "type": "", "demo": "users\/list-mfa-factors.md", @@ -32265,7 +32606,7 @@ "x-appwrite": { "method": "getMfaRecoveryCodes", "group": "mfa", - "weight": 214, + "weight": 223, "cookies": false, "type": "", "demo": "users\/get-mfa-recovery-codes.md", @@ -32381,7 +32722,7 @@ "x-appwrite": { "method": "updateMfaRecoveryCodes", "group": "mfa", - "weight": 216, + "weight": 225, "cookies": false, "type": "", "demo": "users\/update-mfa-recovery-codes.md", @@ -32497,7 +32838,7 @@ "x-appwrite": { "method": "createMfaRecoveryCodes", "group": "mfa", - "weight": 215, + "weight": 224, "cookies": false, "type": "", "demo": "users\/create-mfa-recovery-codes.md", @@ -32615,7 +32956,7 @@ "x-appwrite": { "method": "updateName", "group": "users", - "weight": 205, + "weight": 214, "cookies": false, "type": "", "demo": "users\/update-name.md", @@ -32696,7 +33037,7 @@ "x-appwrite": { "method": "updatePassword", "group": "users", - "weight": 206, + "weight": 215, "cookies": false, "type": "", "demo": "users\/update-password.md", @@ -32777,7 +33118,7 @@ "x-appwrite": { "method": "updatePhone", "group": "users", - "weight": 208, + "weight": 217, "cookies": false, "type": "", "demo": "users\/update-phone.md", @@ -32834,6 +33175,92 @@ } } }, + "\/users\/{userId}\/plan": { + "post": { + "summary": "Assign plan to user (admin)", + "operationId": "usersAssignPlan", + "tags": [ + "users" + ], + "description": false, + "responses": { + "200": { + "description": "User", + "content": { + "application\/json": { + "schema": { + "$ref": "#\/components\/schemas\/user" + } + } + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "assignPlan", + "group": "users", + "weight": 203, + "cookies": false, + "type": "", + "demo": "users\/assign-plan.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/assign-plan.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "schema": { + "type": "string", + "x-example": "" + }, + "in": "path" + } + ], + "requestBody": { + "content": { + "application\/json": { + "schema": { + "type": "object", + "properties": { + "planId": { + "type": "string", + "description": "Plan ID to assign.", + "x-example": "" + }, + "complimentary": { + "type": "boolean", + "description": "If true, create a complimentary Stripe subscription for one billing interval.", + "x-example": false + } + }, + "required": [ + "planId" + ] + } + } + } + } + } + }, "\/users\/{userId}\/prefs": { "get": { "summary": "Get user preferences", @@ -32858,7 +33285,7 @@ "x-appwrite": { "method": "getPrefs", "group": "users", - "weight": 195, + "weight": 204, "cookies": false, "type": "", "demo": "users\/get-prefs.md", @@ -32918,7 +33345,7 @@ "x-appwrite": { "method": "updatePrefs", "group": "users", - "weight": 210, + "weight": 219, "cookies": false, "type": "", "demo": "users\/update-prefs.md", @@ -32999,7 +33426,7 @@ "x-appwrite": { "method": "listSessions", "group": "sessions", - "weight": 197, + "weight": 206, "cookies": false, "type": "", "demo": "users\/list-sessions.md", @@ -33059,7 +33486,7 @@ "x-appwrite": { "method": "createSession", "group": "sessions", - "weight": 218, + "weight": 227, "cookies": false, "type": "", "demo": "users\/create-session.md", @@ -33112,7 +33539,7 @@ "x-appwrite": { "method": "deleteSessions", "group": "sessions", - "weight": 221, + "weight": 230, "cookies": false, "type": "", "demo": "users\/delete-sessions.md", @@ -33167,7 +33594,7 @@ "x-appwrite": { "method": "deleteSession", "group": "sessions", - "weight": 220, + "weight": 229, "cookies": false, "type": "", "demo": "users\/delete-session.md", @@ -33239,7 +33666,7 @@ "x-appwrite": { "method": "updateStatus", "group": "users", - "weight": 202, + "weight": 211, "cookies": false, "type": "", "demo": "users\/update-status.md", @@ -33320,7 +33747,7 @@ "x-appwrite": { "method": "listTargets", "group": "targets", - "weight": 200, + "weight": 209, "cookies": false, "type": "", "demo": "users\/list-targets.md", @@ -33394,7 +33821,7 @@ "x-appwrite": { "method": "createTarget", "group": "targets", - "weight": 192, + "weight": 200, "cookies": false, "type": "", "demo": "users\/create-target.md", @@ -33505,7 +33932,7 @@ "x-appwrite": { "method": "getTarget", "group": "targets", - "weight": 196, + "weight": 205, "cookies": false, "type": "", "demo": "users\/get-target.md", @@ -33576,7 +34003,7 @@ "x-appwrite": { "method": "updateTarget", "group": "targets", - "weight": 211, + "weight": 220, "cookies": false, "type": "", "demo": "users\/update-target.md", @@ -33666,7 +34093,7 @@ "x-appwrite": { "method": "deleteTarget", "group": "targets", - "weight": 223, + "weight": 232, "cookies": false, "type": "", "demo": "users\/delete-target.md", @@ -33739,7 +34166,7 @@ "x-appwrite": { "method": "createToken", "group": "sessions", - "weight": 219, + "weight": 228, "cookies": false, "type": "", "demo": "users\/create-token.md", @@ -33822,7 +34249,7 @@ "x-appwrite": { "method": "updateEmailVerification", "group": "users", - "weight": 209, + "weight": 218, "cookies": false, "type": "", "demo": "users\/update-email-verification.md", @@ -33903,7 +34330,7 @@ "x-appwrite": { "method": "updatePhoneVerification", "group": "users", - "weight": 204, + "weight": 213, "cookies": false, "type": "", "demo": "users\/update-phone-verification.md", @@ -38534,6 +38961,19 @@ }, "x-example": [] }, + "plan": { + "type": "object", + "description": "User subscription plan details.", + "x-example": { + "id": "basic", + "name": "Basic", + "price": 999, + "currency": "usd", + "interval": "month", + "isFree": false + }, + "nullable": true + }, "accessedAt": { "type": "string", "description": "Most recent access date in ISO 8601 format. This attribute is only updated again after 24 hours.", @@ -38582,6 +39022,14 @@ "timezone": "UTC" }, "targets": [], + "plan": { + "id": "basic", + "name": "Basic", + "price": 999, + "currency": "usd", + "interval": "month", + "isFree": false + }, "accessedAt": "2020-10-15T06:38:00.000+00:00" } }, diff --git a/app/config/specs/swagger2-latest-client.json b/app/config/specs/swagger2-latest-client.json index c2628533d0..771800d9c1 100644 --- a/app/config/specs/swagger2-latest-client.json +++ b/app/config/specs/swagger2-latest-client.json @@ -2989,6 +2989,356 @@ ] } }, + "\/account\/subscription": { + "get": { + "summary": "Get account subscription", + "operationId": "accountGetSubscription", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": false, + "responses": { + "200": { + "description": "Any", + "schema": { + "$ref": "#\/definitions\/any" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getSubscription", + "group": "subscription", + "weight": 60, + "cookies": false, + "type": "", + "demo": "account\/get-subscription.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-subscription.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ] + }, + "put": { + "summary": "Update subscription", + "operationId": "accountUpdateSubscription", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": false, + "responses": { + "200": { + "description": "Any", + "schema": { + "$ref": "#\/definitions\/any" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateSubscription", + "group": "subscription", + "weight": 63, + "cookies": false, + "type": "", + "demo": "account\/update-subscription.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-subscription.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "planId": { + "type": "string", + "description": "New plan ID.", + "default": null, + "x-example": "" + } + }, + "required": [ + "planId" + ] + } + } + ] + }, + "delete": { + "summary": "Cancel subscription", + "operationId": "accountCancelSubscription", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": false, + "responses": { + "200": { + "description": "Any", + "schema": { + "$ref": "#\/definitions\/any" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "cancelSubscription", + "group": "subscription", + "weight": 64, + "cookies": false, + "type": "", + "demo": "account\/cancel-subscription.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/cancel-subscription.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "atPeriodEnd": { + "type": "boolean", + "description": "Cancel at period end.", + "default": true, + "x-example": false + } + } + } + } + ] + } + }, + "\/account\/subscription\/checkout": { + "post": { + "summary": "Create checkout session", + "operationId": "accountCreateSubscriptionCheckout", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": false, + "responses": { + "200": { + "description": "Any", + "schema": { + "$ref": "#\/definitions\/any" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createSubscriptionCheckout", + "group": "subscription", + "weight": 61, + "cookies": false, + "type": "", + "demo": "account\/create-subscription-checkout.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-checkout.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "planId": { + "type": "string", + "description": "Plan ID to subscribe to.", + "default": null, + "x-example": "" + }, + "successUrl": { + "type": "string", + "description": "URL to redirect on success.", + "default": null, + "x-example": "https:\/\/example.com" + }, + "cancelUrl": { + "type": "string", + "description": "URL to redirect on cancel.", + "default": null, + "x-example": "https:\/\/example.com" + } + }, + "required": [ + "planId", + "successUrl", + "cancelUrl" + ] + } + } + ] + } + }, + "\/account\/subscription\/portal": { + "post": { + "summary": "Create customer portal session", + "operationId": "accountCreateSubscriptionPortal", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": false, + "responses": { + "200": { + "description": "Any", + "schema": { + "$ref": "#\/definitions\/any" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createSubscriptionPortal", + "group": "subscription", + "weight": 62, + "cookies": false, + "type": "", + "demo": "account\/create-subscription-portal.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-portal.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "returnUrl": { + "type": "string", + "description": "URL to return to.", + "default": null, + "x-example": "https:\/\/example.com" + } + }, + "required": [ + "returnUrl" + ] + } + } + ] + } + }, "\/account\/targets\/push": { "post": { "summary": "Create push target", @@ -3908,7 +4258,7 @@ "x-appwrite": { "method": "getBrowser", "group": null, - "weight": 61, + "weight": 66, "cookies": false, "type": "location", "demo": "avatars\/get-browser.md", @@ -4032,7 +4382,7 @@ "x-appwrite": { "method": "getCreditCard", "group": null, - "weight": 60, + "weight": 65, "cookies": false, "type": "location", "demo": "avatars\/get-credit-card.md", @@ -4162,7 +4512,7 @@ "x-appwrite": { "method": "getFavicon", "group": null, - "weight": 64, + "weight": 69, "cookies": false, "type": "location", "demo": "avatars\/get-favicon.md", @@ -4224,7 +4574,7 @@ "x-appwrite": { "method": "getFlag", "group": null, - "weight": 62, + "weight": 67, "cookies": false, "type": "location", "demo": "avatars\/get-flag.md", @@ -4710,7 +5060,7 @@ "x-appwrite": { "method": "getImage", "group": null, - "weight": 63, + "weight": 68, "cookies": false, "type": "location", "demo": "avatars\/get-image.md", @@ -4792,7 +5142,7 @@ "x-appwrite": { "method": "getInitials", "group": null, - "weight": 66, + "weight": 71, "cookies": false, "type": "location", "demo": "avatars\/get-initials.md", @@ -4882,7 +5232,7 @@ "x-appwrite": { "method": "getQR", "group": null, - "weight": 65, + "weight": 70, "cookies": false, "type": "location", "demo": "avatars\/get-qr.md", @@ -4972,7 +5322,7 @@ "x-appwrite": { "method": "listDocuments", "group": "documents", - "weight": 335, + "weight": 349, "cookies": false, "type": "", "demo": "databases\/list-documents.md", @@ -5057,7 +5407,7 @@ "x-appwrite": { "method": "createDocument", "group": "documents", - "weight": 327, + "weight": 341, "cookies": false, "type": "", "demo": "databases\/create-document.md", @@ -5204,7 +5554,7 @@ "x-appwrite": { "method": "getDocument", "group": "documents", - "weight": 328, + "weight": 342, "cookies": false, "type": "", "demo": "databases\/get-document.md", @@ -5297,7 +5647,7 @@ "x-appwrite": { "method": "upsertDocument", "group": "documents", - "weight": 331, + "weight": 345, "cookies": false, "type": "", "demo": "databases\/upsert-document.md", @@ -5440,7 +5790,7 @@ "x-appwrite": { "method": "updateDocument", "group": "documents", - "weight": 329, + "weight": 343, "cookies": false, "type": "", "demo": "databases\/update-document.md", @@ -5540,7 +5890,7 @@ "x-appwrite": { "method": "deleteDocument", "group": "documents", - "weight": 333, + "weight": 347, "cookies": false, "type": "", "demo": "databases\/delete-document.md", @@ -5623,7 +5973,7 @@ "x-appwrite": { "method": "decrementDocumentAttribute", "group": "documents", - "weight": 338, + "weight": 352, "cookies": false, "type": "", "demo": "databases\/decrement-document-attribute.md", @@ -5735,7 +6085,7 @@ "x-appwrite": { "method": "incrementDocumentAttribute", "group": "documents", - "weight": 337, + "weight": 351, "cookies": false, "type": "", "demo": "databases\/increment-document-attribute.md", @@ -5845,7 +6195,7 @@ "x-appwrite": { "method": "listExecutions", "group": "executions", - "weight": 456, + "weight": 470, "cookies": false, "type": "", "demo": "functions\/list-executions.md", @@ -5918,7 +6268,7 @@ "x-appwrite": { "method": "createExecution", "group": "executions", - "weight": 454, + "weight": 468, "cookies": false, "type": "", "demo": "functions\/create-execution.md", @@ -6035,7 +6385,7 @@ "x-appwrite": { "method": "getExecution", "group": "executions", - "weight": 455, + "weight": 469, "cookies": false, "type": "", "demo": "functions\/get-execution.md", @@ -6106,7 +6456,7 @@ "x-appwrite": { "method": "query", "group": "graphql", - "weight": 250, + "weight": 259, "cookies": false, "type": "graphql", "demo": "graphql\/query.md", @@ -6179,7 +6529,7 @@ "x-appwrite": { "method": "mutation", "group": "graphql", - "weight": 249, + "weight": 258, "cookies": false, "type": "graphql", "demo": "graphql\/mutation.md", @@ -6250,7 +6600,7 @@ "x-appwrite": { "method": "get", "group": null, - "weight": 70, + "weight": 75, "cookies": false, "type": "", "demo": "locale\/get.md", @@ -6301,7 +6651,7 @@ "x-appwrite": { "method": "listCodes", "group": null, - "weight": 71, + "weight": 76, "cookies": false, "type": "", "demo": "locale\/list-codes.md", @@ -6352,7 +6702,7 @@ "x-appwrite": { "method": "listContinents", "group": null, - "weight": 75, + "weight": 80, "cookies": false, "type": "", "demo": "locale\/list-continents.md", @@ -6403,7 +6753,7 @@ "x-appwrite": { "method": "listCountries", "group": null, - "weight": 72, + "weight": 77, "cookies": false, "type": "", "demo": "locale\/list-countries.md", @@ -6454,7 +6804,7 @@ "x-appwrite": { "method": "listCountriesEU", "group": null, - "weight": 73, + "weight": 78, "cookies": false, "type": "", "demo": "locale\/list-countries-eu.md", @@ -6505,7 +6855,7 @@ "x-appwrite": { "method": "listCountriesPhones", "group": null, - "weight": 74, + "weight": 79, "cookies": false, "type": "", "demo": "locale\/list-countries-phones.md", @@ -6556,7 +6906,7 @@ "x-appwrite": { "method": "listCurrencies", "group": null, - "weight": 76, + "weight": 81, "cookies": false, "type": "", "demo": "locale\/list-currencies.md", @@ -6607,7 +6957,7 @@ "x-appwrite": { "method": "listLanguages", "group": null, - "weight": 77, + "weight": 82, "cookies": false, "type": "", "demo": "locale\/list-languages.md", @@ -6660,7 +7010,7 @@ "x-appwrite": { "method": "createSubscriber", "group": "subscribers", - "weight": 296, + "weight": 310, "cookies": false, "type": "", "demo": "messaging\/create-subscriber.md", @@ -6744,7 +7094,7 @@ "x-appwrite": { "method": "deleteSubscriber", "group": "subscribers", - "weight": 300, + "weight": 314, "cookies": false, "type": "", "demo": "messaging\/delete-subscriber.md", @@ -6814,7 +7164,7 @@ "x-appwrite": { "method": "listFiles", "group": "files", - "weight": 160, + "weight": 168, "cookies": false, "type": "", "demo": "storage\/list-files.md", @@ -6896,7 +7246,7 @@ "x-appwrite": { "method": "createFile", "group": "files", - "weight": 159, + "weight": 167, "cookies": false, "type": "upload", "demo": "storage\/create-file.md", @@ -6985,7 +7335,7 @@ "x-appwrite": { "method": "getFile", "group": "files", - "weight": 161, + "weight": 169, "cookies": false, "type": "", "demo": "storage\/get-file.md", @@ -7054,7 +7404,7 @@ "x-appwrite": { "method": "updateFile", "group": "files", - "weight": 166, + "weight": 174, "cookies": false, "type": "", "demo": "storage\/update-file.md", @@ -7142,7 +7492,7 @@ "x-appwrite": { "method": "deleteFile", "group": "files", - "weight": 167, + "weight": 175, "cookies": false, "type": "", "demo": "storage\/delete-file.md", @@ -7211,7 +7561,7 @@ "x-appwrite": { "method": "getFileDownload", "group": "files", - "weight": 163, + "weight": 171, "cookies": false, "type": "location", "demo": "storage\/get-file-download.md", @@ -7289,7 +7639,7 @@ "x-appwrite": { "method": "getFilePreview", "group": "files", - "weight": 162, + "weight": 170, "cookies": false, "type": "location", "demo": "storage\/get-file-preview.md", @@ -7495,7 +7845,7 @@ "x-appwrite": { "method": "getFileView", "group": "files", - "weight": 164, + "weight": 172, "cookies": false, "type": "location", "demo": "storage\/get-file-view.md", @@ -7573,7 +7923,7 @@ "x-appwrite": { "method": "listRows", "group": "rows", - "weight": 427, + "weight": 441, "cookies": false, "type": "", "demo": "tablesdb\/list-rows.md", @@ -7657,7 +8007,7 @@ "x-appwrite": { "method": "createRow", "group": "rows", - "weight": 419, + "weight": 433, "cookies": false, "type": "", "demo": "tablesdb\/create-row.md", @@ -7799,7 +8149,7 @@ "x-appwrite": { "method": "getRow", "group": "rows", - "weight": 420, + "weight": 434, "cookies": false, "type": "", "demo": "tablesdb\/get-row.md", @@ -7891,7 +8241,7 @@ "x-appwrite": { "method": "upsertRow", "group": "rows", - "weight": 423, + "weight": 437, "cookies": false, "type": "", "demo": "tablesdb\/upsert-row.md", @@ -8025,7 +8375,7 @@ "x-appwrite": { "method": "updateRow", "group": "rows", - "weight": 421, + "weight": 435, "cookies": false, "type": "", "demo": "tablesdb\/update-row.md", @@ -8124,7 +8474,7 @@ "x-appwrite": { "method": "deleteRow", "group": "rows", - "weight": 425, + "weight": 439, "cookies": false, "type": "", "demo": "tablesdb\/delete-row.md", @@ -8206,7 +8556,7 @@ "x-appwrite": { "method": "decrementRowColumn", "group": "rows", - "weight": 430, + "weight": 444, "cookies": false, "type": "", "demo": "tablesdb\/decrement-row-column.md", @@ -8317,7 +8667,7 @@ "x-appwrite": { "method": "incrementRowColumn", "group": "rows", - "weight": 429, + "weight": 443, "cookies": false, "type": "", "demo": "tablesdb\/increment-row-column.md", @@ -8426,7 +8776,7 @@ "x-appwrite": { "method": "list", "group": "teams", - "weight": 171, + "weight": 179, "cookies": false, "type": "", "demo": "teams\/list.md", @@ -8500,7 +8850,7 @@ "x-appwrite": { "method": "create", "group": "teams", - "weight": 170, + "weight": 178, "cookies": false, "type": "", "demo": "teams\/create.md", @@ -8589,7 +8939,7 @@ "x-appwrite": { "method": "get", "group": "teams", - "weight": 172, + "weight": 180, "cookies": false, "type": "", "demo": "teams\/get.md", @@ -8650,7 +9000,7 @@ "x-appwrite": { "method": "updateName", "group": "teams", - "weight": 174, + "weight": 182, "cookies": false, "type": "", "demo": "teams\/update-name.md", @@ -8724,7 +9074,7 @@ "x-appwrite": { "method": "delete", "group": "teams", - "weight": 176, + "weight": 184, "cookies": false, "type": "", "demo": "teams\/delete.md", @@ -8785,7 +9135,7 @@ "x-appwrite": { "method": "listMemberships", "group": "memberships", - "weight": 178, + "weight": 186, "cookies": false, "type": "", "demo": "teams\/list-memberships.md", @@ -8867,7 +9217,7 @@ "x-appwrite": { "method": "createMembership", "group": "memberships", - "weight": 177, + "weight": 185, "cookies": false, "type": "", "demo": "teams\/create-membership.md", @@ -8979,7 +9329,7 @@ "x-appwrite": { "method": "getMembership", "group": "memberships", - "weight": 179, + "weight": 187, "cookies": false, "type": "", "demo": "teams\/get-membership.md", @@ -9048,7 +9398,7 @@ "x-appwrite": { "method": "updateMembership", "group": "memberships", - "weight": 180, + "weight": 188, "cookies": false, "type": "", "demo": "teams\/update-membership.md", @@ -9133,7 +9483,7 @@ "x-appwrite": { "method": "deleteMembership", "group": "memberships", - "weight": 182, + "weight": 190, "cookies": false, "type": "", "demo": "teams\/delete-membership.md", @@ -9204,7 +9554,7 @@ "x-appwrite": { "method": "updateMembershipStatus", "group": "memberships", - "weight": 181, + "weight": 189, "cookies": false, "type": "", "demo": "teams\/update-membership-status.md", @@ -9298,7 +9648,7 @@ "x-appwrite": { "method": "getPrefs", "group": "teams", - "weight": 173, + "weight": 181, "cookies": false, "type": "", "demo": "teams\/get-prefs.md", @@ -9359,7 +9709,7 @@ "x-appwrite": { "method": "updatePrefs", "group": "teams", - "weight": 175, + "weight": 183, "cookies": false, "type": "", "demo": "teams\/update-prefs.md", @@ -10373,6 +10723,19 @@ }, "x-example": [] }, + "plan": { + "type": "object", + "additionalProperties": true, + "description": "User subscription plan details.", + "x-example": { + "id": "basic", + "name": "Basic", + "price": 999, + "currency": "usd", + "interval": "month", + "isFree": false + } + }, "accessedAt": { "type": "string", "description": "Most recent access date in ISO 8601 format. This attribute is only updated again after 24 hours.", @@ -10421,6 +10784,14 @@ "timezone": "UTC" }, "targets": [], + "plan": { + "id": "basic", + "name": "Basic", + "price": 999, + "currency": "usd", + "interval": "month", + "isFree": false + }, "accessedAt": "2020-10-15T06:38:00.000+00:00" } }, diff --git a/app/config/specs/swagger2-latest-console.json b/app/config/specs/swagger2-latest-console.json index e830f768be..8ec643800b 100644 --- a/app/config/specs/swagger2-latest-console.json +++ b/app/config/specs/swagger2-latest-console.json @@ -3011,6 +3011,351 @@ ] } }, + "\/account\/subscription": { + "get": { + "summary": "Get account subscription", + "operationId": "accountGetSubscription", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": false, + "responses": { + "200": { + "description": "Any", + "schema": { + "$ref": "#\/definitions\/any" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getSubscription", + "group": "subscription", + "weight": 60, + "cookies": false, + "type": "", + "demo": "account\/get-subscription.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-subscription.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [] + } + ] + }, + "put": { + "summary": "Update subscription", + "operationId": "accountUpdateSubscription", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": false, + "responses": { + "200": { + "description": "Any", + "schema": { + "$ref": "#\/definitions\/any" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateSubscription", + "group": "subscription", + "weight": 63, + "cookies": false, + "type": "", + "demo": "account\/update-subscription.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-subscription.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "planId": { + "type": "string", + "description": "New plan ID.", + "default": null, + "x-example": "" + } + }, + "required": [ + "planId" + ] + } + } + ] + }, + "delete": { + "summary": "Cancel subscription", + "operationId": "accountCancelSubscription", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": false, + "responses": { + "200": { + "description": "Any", + "schema": { + "$ref": "#\/definitions\/any" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "cancelSubscription", + "group": "subscription", + "weight": 64, + "cookies": false, + "type": "", + "demo": "account\/cancel-subscription.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/cancel-subscription.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "atPeriodEnd": { + "type": "boolean", + "description": "Cancel at period end.", + "default": true, + "x-example": false + } + } + } + } + ] + } + }, + "\/account\/subscription\/checkout": { + "post": { + "summary": "Create checkout session", + "operationId": "accountCreateSubscriptionCheckout", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": false, + "responses": { + "200": { + "description": "Any", + "schema": { + "$ref": "#\/definitions\/any" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createSubscriptionCheckout", + "group": "subscription", + "weight": 61, + "cookies": false, + "type": "", + "demo": "account\/create-subscription-checkout.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-checkout.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "planId": { + "type": "string", + "description": "Plan ID to subscribe to.", + "default": null, + "x-example": "" + }, + "successUrl": { + "type": "string", + "description": "URL to redirect on success.", + "default": null, + "x-example": "https:\/\/example.com" + }, + "cancelUrl": { + "type": "string", + "description": "URL to redirect on cancel.", + "default": null, + "x-example": "https:\/\/example.com" + } + }, + "required": [ + "planId", + "successUrl", + "cancelUrl" + ] + } + } + ] + } + }, + "\/account\/subscription\/portal": { + "post": { + "summary": "Create customer portal session", + "operationId": "accountCreateSubscriptionPortal", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": false, + "responses": { + "200": { + "description": "Any", + "schema": { + "$ref": "#\/definitions\/any" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createSubscriptionPortal", + "group": "subscription", + "weight": 62, + "cookies": false, + "type": "", + "demo": "account\/create-subscription-portal.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-portal.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "returnUrl": { + "type": "string", + "description": "URL to return to.", + "default": null, + "x-example": "https:\/\/example.com" + } + }, + "required": [ + "returnUrl" + ] + } + } + ] + } + }, "\/account\/targets\/push": { "post": { "summary": "Create push target", @@ -3923,7 +4268,7 @@ "x-appwrite": { "method": "getBrowser", "group": null, - "weight": 61, + "weight": 66, "cookies": false, "type": "location", "demo": "avatars\/get-browser.md", @@ -4047,7 +4392,7 @@ "x-appwrite": { "method": "getCreditCard", "group": null, - "weight": 60, + "weight": 65, "cookies": false, "type": "location", "demo": "avatars\/get-credit-card.md", @@ -4177,7 +4522,7 @@ "x-appwrite": { "method": "getFavicon", "group": null, - "weight": 64, + "weight": 69, "cookies": false, "type": "location", "demo": "avatars\/get-favicon.md", @@ -4239,7 +4584,7 @@ "x-appwrite": { "method": "getFlag", "group": null, - "weight": 62, + "weight": 67, "cookies": false, "type": "location", "demo": "avatars\/get-flag.md", @@ -4725,7 +5070,7 @@ "x-appwrite": { "method": "getImage", "group": null, - "weight": 63, + "weight": 68, "cookies": false, "type": "location", "demo": "avatars\/get-image.md", @@ -4807,7 +5152,7 @@ "x-appwrite": { "method": "getInitials", "group": null, - "weight": 66, + "weight": 71, "cookies": false, "type": "location", "demo": "avatars\/get-initials.md", @@ -4897,7 +5242,7 @@ "x-appwrite": { "method": "getQR", "group": null, - "weight": 65, + "weight": 70, "cookies": false, "type": "location", "demo": "avatars\/get-qr.md", @@ -4989,7 +5334,7 @@ "x-appwrite": { "method": "chat", "group": "console", - "weight": 252, + "weight": 261, "cookies": false, "type": "", "demo": "assistant\/chat.md", @@ -5052,7 +5397,7 @@ "x-appwrite": { "method": "getResource", "group": null, - "weight": 496, + "weight": 510, "cookies": false, "type": "", "demo": "console\/get-resource.md", @@ -5123,7 +5468,7 @@ "x-appwrite": { "method": "variables", "group": "console", - "weight": 251, + "weight": 260, "cookies": false, "type": "", "demo": "console\/variables.md", @@ -5171,7 +5516,7 @@ "x-appwrite": { "method": "list", "group": "databases", - "weight": 316, + "weight": 330, "cookies": false, "type": "", "demo": "databases\/list.md", @@ -5274,7 +5619,7 @@ "x-appwrite": { "method": "create", "group": "databases", - "weight": 312, + "weight": 326, "cookies": false, "type": "", "demo": "databases\/create.md", @@ -5391,7 +5736,7 @@ "x-appwrite": { "method": "listUsage", "group": null, - "weight": 319, + "weight": 333, "cookies": false, "type": "", "demo": "databases\/list-usage.md", @@ -5491,7 +5836,7 @@ "x-appwrite": { "method": "get", "group": "databases", - "weight": 313, + "weight": 327, "cookies": false, "type": "", "demo": "databases\/get.md", @@ -5582,7 +5927,7 @@ "x-appwrite": { "method": "update", "group": "databases", - "weight": 314, + "weight": 328, "cookies": false, "type": "", "demo": "databases\/update.md", @@ -5695,7 +6040,7 @@ "x-appwrite": { "method": "delete", "group": "databases", - "weight": 315, + "weight": 329, "cookies": false, "type": "", "demo": "databases\/delete.md", @@ -5785,7 +6130,7 @@ "x-appwrite": { "method": "listCollections", "group": "collections", - "weight": 324, + "weight": 338, "cookies": false, "type": "", "demo": "databases\/list-collections.md", @@ -5869,7 +6214,7 @@ "x-appwrite": { "method": "createCollection", "group": "collections", - "weight": 320, + "weight": 334, "cookies": false, "type": "", "demo": "databases\/create-collection.md", @@ -5978,7 +6323,7 @@ "x-appwrite": { "method": "getCollection", "group": "collections", - "weight": 321, + "weight": 335, "cookies": false, "type": "", "demo": "databases\/get-collection.md", @@ -6049,7 +6394,7 @@ "x-appwrite": { "method": "updateCollection", "group": "collections", - "weight": 322, + "weight": 336, "cookies": false, "type": "", "demo": "databases\/update-collection.md", @@ -6154,7 +6499,7 @@ "x-appwrite": { "method": "deleteCollection", "group": "collections", - "weight": 323, + "weight": 337, "cookies": false, "type": "", "demo": "databases\/delete-collection.md", @@ -6225,7 +6570,7 @@ "x-appwrite": { "method": "listAttributes", "group": "attributes", - "weight": 341, + "weight": 355, "cookies": false, "type": "", "demo": "databases\/list-attributes.md", @@ -6310,7 +6655,7 @@ "x-appwrite": { "method": "createBooleanAttribute", "group": "attributes", - "weight": 342, + "weight": 356, "cookies": false, "type": "", "demo": "databases\/create-boolean-attribute.md", @@ -6420,7 +6765,7 @@ "x-appwrite": { "method": "updateBooleanAttribute", "group": "attributes", - "weight": 343, + "weight": 357, "cookies": false, "type": "", "demo": "databases\/update-boolean-attribute.md", @@ -6532,7 +6877,7 @@ "x-appwrite": { "method": "createDatetimeAttribute", "group": "attributes", - "weight": 344, + "weight": 358, "cookies": false, "type": "", "demo": "databases\/create-datetime-attribute.md", @@ -6642,7 +6987,7 @@ "x-appwrite": { "method": "updateDatetimeAttribute", "group": "attributes", - "weight": 345, + "weight": 359, "cookies": false, "type": "", "demo": "databases\/update-datetime-attribute.md", @@ -6754,7 +7099,7 @@ "x-appwrite": { "method": "createEmailAttribute", "group": "attributes", - "weight": 346, + "weight": 360, "cookies": false, "type": "", "demo": "databases\/create-email-attribute.md", @@ -6864,7 +7209,7 @@ "x-appwrite": { "method": "updateEmailAttribute", "group": "attributes", - "weight": 347, + "weight": 361, "cookies": false, "type": "", "demo": "databases\/update-email-attribute.md", @@ -6976,7 +7321,7 @@ "x-appwrite": { "method": "createEnumAttribute", "group": "attributes", - "weight": 348, + "weight": 362, "cookies": false, "type": "", "demo": "databases\/create-enum-attribute.md", @@ -7096,7 +7441,7 @@ "x-appwrite": { "method": "updateEnumAttribute", "group": "attributes", - "weight": 349, + "weight": 363, "cookies": false, "type": "", "demo": "databases\/update-enum-attribute.md", @@ -7218,7 +7563,7 @@ "x-appwrite": { "method": "createFloatAttribute", "group": "attributes", - "weight": 350, + "weight": 364, "cookies": false, "type": "", "demo": "databases\/create-float-attribute.md", @@ -7340,7 +7685,7 @@ "x-appwrite": { "method": "updateFloatAttribute", "group": "attributes", - "weight": 351, + "weight": 365, "cookies": false, "type": "", "demo": "databases\/update-float-attribute.md", @@ -7464,7 +7809,7 @@ "x-appwrite": { "method": "createIntegerAttribute", "group": "attributes", - "weight": 352, + "weight": 366, "cookies": false, "type": "", "demo": "databases\/create-integer-attribute.md", @@ -7586,7 +7931,7 @@ "x-appwrite": { "method": "updateIntegerAttribute", "group": "attributes", - "weight": 353, + "weight": 367, "cookies": false, "type": "", "demo": "databases\/update-integer-attribute.md", @@ -7710,7 +8055,7 @@ "x-appwrite": { "method": "createIpAttribute", "group": "attributes", - "weight": 354, + "weight": 368, "cookies": false, "type": "", "demo": "databases\/create-ip-attribute.md", @@ -7820,7 +8165,7 @@ "x-appwrite": { "method": "updateIpAttribute", "group": "attributes", - "weight": 355, + "weight": 369, "cookies": false, "type": "", "demo": "databases\/update-ip-attribute.md", @@ -7932,7 +8277,7 @@ "x-appwrite": { "method": "createLineAttribute", "group": "attributes", - "weight": 356, + "weight": 370, "cookies": false, "type": "", "demo": "databases\/create-line-attribute.md", @@ -8037,7 +8382,7 @@ "x-appwrite": { "method": "updateLineAttribute", "group": "attributes", - "weight": 357, + "weight": 371, "cookies": false, "type": "", "demo": "databases\/update-line-attribute.md", @@ -8148,7 +8493,7 @@ "x-appwrite": { "method": "createPointAttribute", "group": "attributes", - "weight": 358, + "weight": 372, "cookies": false, "type": "", "demo": "databases\/create-point-attribute.md", @@ -8253,7 +8598,7 @@ "x-appwrite": { "method": "updatePointAttribute", "group": "attributes", - "weight": 359, + "weight": 373, "cookies": false, "type": "", "demo": "databases\/update-point-attribute.md", @@ -8364,7 +8709,7 @@ "x-appwrite": { "method": "createPolygonAttribute", "group": "attributes", - "weight": 360, + "weight": 374, "cookies": false, "type": "", "demo": "databases\/create-polygon-attribute.md", @@ -8469,7 +8814,7 @@ "x-appwrite": { "method": "updatePolygonAttribute", "group": "attributes", - "weight": 361, + "weight": 375, "cookies": false, "type": "", "demo": "databases\/update-polygon-attribute.md", @@ -8580,7 +8925,7 @@ "x-appwrite": { "method": "createRelationshipAttribute", "group": "attributes", - "weight": 362, + "weight": 376, "cookies": false, "type": "", "demo": "databases\/create-relationship-attribute.md", @@ -8717,7 +9062,7 @@ "x-appwrite": { "method": "createStringAttribute", "group": "attributes", - "weight": 364, + "weight": 378, "cookies": false, "type": "", "demo": "databases\/create-string-attribute.md", @@ -8840,7 +9185,7 @@ "x-appwrite": { "method": "updateStringAttribute", "group": "attributes", - "weight": 365, + "weight": 379, "cookies": false, "type": "", "demo": "databases\/update-string-attribute.md", @@ -8958,7 +9303,7 @@ "x-appwrite": { "method": "createUrlAttribute", "group": "attributes", - "weight": 366, + "weight": 380, "cookies": false, "type": "", "demo": "databases\/create-url-attribute.md", @@ -9068,7 +9413,7 @@ "x-appwrite": { "method": "updateUrlAttribute", "group": "attributes", - "weight": 367, + "weight": 381, "cookies": false, "type": "", "demo": "databases\/update-url-attribute.md", @@ -9209,7 +9554,7 @@ "x-appwrite": { "method": "getAttribute", "group": "attributes", - "weight": 339, + "weight": 353, "cookies": false, "type": "", "demo": "databases\/get-attribute.md", @@ -9282,7 +9627,7 @@ "x-appwrite": { "method": "deleteAttribute", "group": "attributes", - "weight": 340, + "weight": 354, "cookies": false, "type": "", "demo": "databases\/delete-attribute.md", @@ -9362,7 +9707,7 @@ "x-appwrite": { "method": "updateRelationshipAttribute", "group": "attributes", - "weight": 363, + "weight": 377, "cookies": false, "type": "", "demo": "databases\/update-relationship-attribute.md", @@ -9468,7 +9813,7 @@ "x-appwrite": { "method": "listDocuments", "group": "documents", - "weight": 335, + "weight": 349, "cookies": false, "type": "", "demo": "databases\/list-documents.md", @@ -9553,7 +9898,7 @@ "x-appwrite": { "method": "createDocument", "group": "documents", - "weight": 327, + "weight": 341, "cookies": false, "type": "", "demo": "databases\/create-document.md", @@ -9730,7 +10075,7 @@ "x-appwrite": { "method": "upsertDocuments", "group": "documents", - "weight": 332, + "weight": 346, "cookies": false, "type": "", "demo": "databases\/upsert-documents.md", @@ -9855,7 +10200,7 @@ "x-appwrite": { "method": "updateDocuments", "group": "documents", - "weight": 330, + "weight": 344, "cookies": false, "type": "", "demo": "databases\/update-documents.md", @@ -9951,7 +10296,7 @@ "x-appwrite": { "method": "deleteDocuments", "group": "documents", - "weight": 334, + "weight": 348, "cookies": false, "type": "", "demo": "databases\/delete-documents.md", @@ -10041,7 +10386,7 @@ "x-appwrite": { "method": "getDocument", "group": "documents", - "weight": 328, + "weight": 342, "cookies": false, "type": "", "demo": "databases\/get-document.md", @@ -10134,7 +10479,7 @@ "x-appwrite": { "method": "upsertDocument", "group": "documents", - "weight": 331, + "weight": 345, "cookies": false, "type": "", "demo": "databases\/upsert-document.md", @@ -10277,7 +10622,7 @@ "x-appwrite": { "method": "updateDocument", "group": "documents", - "weight": 329, + "weight": 343, "cookies": false, "type": "", "demo": "databases\/update-document.md", @@ -10377,7 +10722,7 @@ "x-appwrite": { "method": "deleteDocument", "group": "documents", - "weight": 333, + "weight": 347, "cookies": false, "type": "", "demo": "databases\/delete-document.md", @@ -10458,7 +10803,7 @@ "x-appwrite": { "method": "listDocumentLogs", "group": "logs", - "weight": 336, + "weight": 350, "cookies": false, "type": "", "demo": "databases\/list-document-logs.md", @@ -10550,7 +10895,7 @@ "x-appwrite": { "method": "decrementDocumentAttribute", "group": "documents", - "weight": 338, + "weight": 352, "cookies": false, "type": "", "demo": "databases\/decrement-document-attribute.md", @@ -10662,7 +11007,7 @@ "x-appwrite": { "method": "incrementDocumentAttribute", "group": "documents", - "weight": 337, + "weight": 351, "cookies": false, "type": "", "demo": "databases\/increment-document-attribute.md", @@ -10772,7 +11117,7 @@ "x-appwrite": { "method": "listIndexes", "group": "indexes", - "weight": 371, + "weight": 385, "cookies": false, "type": "", "demo": "databases\/list-indexes.md", @@ -10855,7 +11200,7 @@ "x-appwrite": { "method": "createIndex", "group": "indexes", - "weight": 368, + "weight": 382, "cookies": false, "type": "", "demo": "databases\/create-index.md", @@ -10987,7 +11332,7 @@ "x-appwrite": { "method": "getIndex", "group": "indexes", - "weight": 369, + "weight": 383, "cookies": false, "type": "", "demo": "databases\/get-index.md", @@ -11060,7 +11405,7 @@ "x-appwrite": { "method": "deleteIndex", "group": "indexes", - "weight": 370, + "weight": 384, "cookies": false, "type": "", "demo": "databases\/delete-index.md", @@ -11138,7 +11483,7 @@ "x-appwrite": { "method": "listCollectionLogs", "group": "collections", - "weight": 325, + "weight": 339, "cookies": false, "type": "", "demo": "databases\/list-collection-logs.md", @@ -11220,7 +11565,7 @@ "x-appwrite": { "method": "getCollectionUsage", "group": null, - "weight": 326, + "weight": 340, "cookies": false, "type": "", "demo": "databases\/get-collection-usage.md", @@ -11310,7 +11655,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 317, + "weight": 331, "cookies": false, "type": "", "demo": "databases\/list-logs.md", @@ -11413,7 +11758,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 318, + "weight": 332, "cookies": false, "type": "", "demo": "databases\/get-usage.md", @@ -11524,7 +11869,7 @@ "x-appwrite": { "method": "list", "group": "functions", - "weight": 440, + "weight": 454, "cookies": false, "type": "", "demo": "functions\/list.md", @@ -11596,7 +11941,7 @@ "x-appwrite": { "method": "create", "group": "functions", - "weight": 437, + "weight": 451, "cookies": false, "type": "", "demo": "functions\/create.md", @@ -11847,7 +12192,7 @@ "x-appwrite": { "method": "listRuntimes", "group": "runtimes", - "weight": 442, + "weight": 456, "cookies": false, "type": "", "demo": "functions\/list-runtimes.md", @@ -11896,7 +12241,7 @@ "x-appwrite": { "method": "listSpecifications", "group": "runtimes", - "weight": 443, + "weight": 457, "cookies": false, "type": "", "demo": "functions\/list-specifications.md", @@ -11946,7 +12291,7 @@ "x-appwrite": { "method": "listTemplates", "group": "templates", - "weight": 466, + "weight": 480, "cookies": false, "type": "", "demo": "functions\/list-templates.md", @@ -12040,7 +12385,7 @@ "x-appwrite": { "method": "getTemplate", "group": "templates", - "weight": 465, + "weight": 479, "cookies": false, "type": "", "demo": "functions\/get-template.md", @@ -12098,7 +12443,7 @@ "x-appwrite": { "method": "listUsage", "group": null, - "weight": 459, + "weight": 473, "cookies": false, "type": "", "demo": "functions\/list-usage.md", @@ -12168,7 +12513,7 @@ "x-appwrite": { "method": "get", "group": "functions", - "weight": 438, + "weight": 452, "cookies": false, "type": "", "demo": "functions\/get.md", @@ -12227,7 +12572,7 @@ "x-appwrite": { "method": "update", "group": "functions", - "weight": 439, + "weight": 453, "cookies": false, "type": "", "demo": "functions\/update.md", @@ -12474,7 +12819,7 @@ "x-appwrite": { "method": "delete", "group": "functions", - "weight": 441, + "weight": 455, "cookies": false, "type": "", "demo": "functions\/delete.md", @@ -12535,7 +12880,7 @@ "x-appwrite": { "method": "updateFunctionDeployment", "group": "functions", - "weight": 446, + "weight": 460, "cookies": false, "type": "", "demo": "functions\/update-function-deployment.md", @@ -12612,7 +12957,7 @@ "x-appwrite": { "method": "listDeployments", "group": "deployments", - "weight": 447, + "weight": 461, "cookies": false, "type": "", "demo": "functions\/list-deployments.md", @@ -12692,7 +13037,7 @@ "x-appwrite": { "method": "createDeployment", "group": "deployments", - "weight": 444, + "weight": 458, "cookies": false, "type": "upload", "demo": "functions\/create-deployment.md", @@ -12784,7 +13129,7 @@ "x-appwrite": { "method": "createDuplicateDeployment", "group": "deployments", - "weight": 452, + "weight": 466, "cookies": false, "type": "", "demo": "functions\/create-duplicate-deployment.md", @@ -12869,7 +13214,7 @@ "x-appwrite": { "method": "createTemplateDeployment", "group": "deployments", - "weight": 449, + "weight": 463, "cookies": false, "type": "", "demo": "functions\/create-template-deployment.md", @@ -12975,7 +13320,7 @@ "x-appwrite": { "method": "createVcsDeployment", "group": "deployments", - "weight": 450, + "weight": 464, "cookies": false, "type": "", "demo": "functions\/create-vcs-deployment.md", @@ -13071,7 +13416,7 @@ "x-appwrite": { "method": "getDeployment", "group": "deployments", - "weight": 445, + "weight": 459, "cookies": false, "type": "", "demo": "functions\/get-deployment.md", @@ -13133,7 +13478,7 @@ "x-appwrite": { "method": "deleteDeployment", "group": "deployments", - "weight": 448, + "weight": 462, "cookies": false, "type": "", "demo": "functions\/delete-deployment.md", @@ -13200,7 +13545,7 @@ "x-appwrite": { "method": "getDeploymentDownload", "group": "deployments", - "weight": 451, + "weight": 465, "cookies": false, "type": "location", "demo": "functions\/get-deployment-download.md", @@ -13285,7 +13630,7 @@ "x-appwrite": { "method": "updateDeploymentStatus", "group": "deployments", - "weight": 453, + "weight": 467, "cookies": false, "type": "", "demo": "functions\/update-deployment-status.md", @@ -13352,7 +13697,7 @@ "x-appwrite": { "method": "listExecutions", "group": "executions", - "weight": 456, + "weight": 470, "cookies": false, "type": "", "demo": "functions\/list-executions.md", @@ -13425,7 +13770,7 @@ "x-appwrite": { "method": "createExecution", "group": "executions", - "weight": 454, + "weight": 468, "cookies": false, "type": "", "demo": "functions\/create-execution.md", @@ -13542,7 +13887,7 @@ "x-appwrite": { "method": "getExecution", "group": "executions", - "weight": 455, + "weight": 469, "cookies": false, "type": "", "demo": "functions\/get-execution.md", @@ -13606,7 +13951,7 @@ "x-appwrite": { "method": "deleteExecution", "group": "executions", - "weight": 457, + "weight": 471, "cookies": false, "type": "", "demo": "functions\/delete-execution.md", @@ -13673,7 +14018,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 458, + "weight": 472, "cookies": false, "type": "", "demo": "functions\/get-usage.md", @@ -13751,7 +14096,7 @@ "x-appwrite": { "method": "listVariables", "group": "variables", - "weight": 462, + "weight": 476, "cookies": false, "type": "", "demo": "functions\/list-variables.md", @@ -13810,7 +14155,7 @@ "x-appwrite": { "method": "createVariable", "group": "variables", - "weight": 460, + "weight": 474, "cookies": false, "type": "", "demo": "functions\/create-variable.md", @@ -13900,7 +14245,7 @@ "x-appwrite": { "method": "getVariable", "group": "variables", - "weight": 461, + "weight": 475, "cookies": false, "type": "", "demo": "functions\/get-variable.md", @@ -13967,7 +14312,7 @@ "x-appwrite": { "method": "updateVariable", "group": "variables", - "weight": 463, + "weight": 477, "cookies": false, "type": "", "demo": "functions\/update-variable.md", @@ -14059,7 +14404,7 @@ "x-appwrite": { "method": "deleteVariable", "group": "variables", - "weight": 464, + "weight": 478, "cookies": false, "type": "", "demo": "functions\/delete-variable.md", @@ -14128,7 +14473,7 @@ "x-appwrite": { "method": "query", "group": "graphql", - "weight": 250, + "weight": 259, "cookies": false, "type": "graphql", "demo": "graphql\/query.md", @@ -14201,7 +14546,7 @@ "x-appwrite": { "method": "mutation", "group": "graphql", - "weight": 249, + "weight": 258, "cookies": false, "type": "graphql", "demo": "graphql\/mutation.md", @@ -14272,7 +14617,7 @@ "x-appwrite": { "method": "get", "group": "health", - "weight": 78, + "weight": 83, "cookies": false, "type": "", "demo": "health\/get.md", @@ -14321,7 +14666,7 @@ "x-appwrite": { "method": "getAntivirus", "group": "health", - "weight": 99, + "weight": 104, "cookies": false, "type": "", "demo": "health\/get-antivirus.md", @@ -14370,7 +14715,7 @@ "x-appwrite": { "method": "getCache", "group": "health", - "weight": 81, + "weight": 86, "cookies": false, "type": "", "demo": "health\/get-cache.md", @@ -14419,7 +14764,7 @@ "x-appwrite": { "method": "getCertificate", "group": "health", - "weight": 86, + "weight": 91, "cookies": false, "type": "", "demo": "health\/get-certificate.md", @@ -14477,7 +14822,7 @@ "x-appwrite": { "method": "getDB", "group": "health", - "weight": 80, + "weight": 85, "cookies": false, "type": "", "demo": "health\/get-db.md", @@ -14526,7 +14871,7 @@ "x-appwrite": { "method": "getPubSub", "group": "health", - "weight": 82, + "weight": 87, "cookies": false, "type": "", "demo": "health\/get-pub-sub.md", @@ -14575,7 +14920,7 @@ "x-appwrite": { "method": "getQueueBuilds", "group": "queue", - "weight": 88, + "weight": 93, "cookies": false, "type": "", "demo": "health\/get-queue-builds.md", @@ -14635,7 +14980,7 @@ "x-appwrite": { "method": "getQueueCertificates", "group": "queue", - "weight": 87, + "weight": 92, "cookies": false, "type": "", "demo": "health\/get-queue-certificates.md", @@ -14695,7 +15040,7 @@ "x-appwrite": { "method": "getQueueDatabases", "group": "queue", - "weight": 89, + "weight": 94, "cookies": false, "type": "", "demo": "health\/get-queue-databases.md", @@ -14764,7 +15109,7 @@ "x-appwrite": { "method": "getQueueDeletes", "group": "queue", - "weight": 90, + "weight": 95, "cookies": false, "type": "", "demo": "health\/get-queue-deletes.md", @@ -14824,7 +15169,7 @@ "x-appwrite": { "method": "getFailedJobs", "group": "queue", - "weight": 100, + "weight": 105, "cookies": false, "type": "", "demo": "health\/get-failed-jobs.md", @@ -14908,7 +15253,7 @@ "x-appwrite": { "method": "getQueueFunctions", "group": "queue", - "weight": 94, + "weight": 99, "cookies": false, "type": "", "demo": "health\/get-queue-functions.md", @@ -14968,7 +15313,7 @@ "x-appwrite": { "method": "getQueueLogs", "group": "queue", - "weight": 85, + "weight": 90, "cookies": false, "type": "", "demo": "health\/get-queue-logs.md", @@ -15028,7 +15373,7 @@ "x-appwrite": { "method": "getQueueMails", "group": "queue", - "weight": 91, + "weight": 96, "cookies": false, "type": "", "demo": "health\/get-queue-mails.md", @@ -15088,7 +15433,7 @@ "x-appwrite": { "method": "getQueueMessaging", "group": "queue", - "weight": 92, + "weight": 97, "cookies": false, "type": "", "demo": "health\/get-queue-messaging.md", @@ -15148,7 +15493,7 @@ "x-appwrite": { "method": "getQueueMigrations", "group": "queue", - "weight": 93, + "weight": 98, "cookies": false, "type": "", "demo": "health\/get-queue-migrations.md", @@ -15208,7 +15553,7 @@ "x-appwrite": { "method": "getQueueStatsResources", "group": "queue", - "weight": 95, + "weight": 100, "cookies": false, "type": "", "demo": "health\/get-queue-stats-resources.md", @@ -15268,7 +15613,7 @@ "x-appwrite": { "method": "getQueueUsage", "group": "queue", - "weight": 96, + "weight": 101, "cookies": false, "type": "", "demo": "health\/get-queue-usage.md", @@ -15328,7 +15673,7 @@ "x-appwrite": { "method": "getQueueWebhooks", "group": "queue", - "weight": 84, + "weight": 89, "cookies": false, "type": "", "demo": "health\/get-queue-webhooks.md", @@ -15388,7 +15733,7 @@ "x-appwrite": { "method": "getStorage", "group": "storage", - "weight": 98, + "weight": 103, "cookies": false, "type": "", "demo": "health\/get-storage.md", @@ -15437,7 +15782,7 @@ "x-appwrite": { "method": "getStorageLocal", "group": "storage", - "weight": 97, + "weight": 102, "cookies": false, "type": "", "demo": "health\/get-storage-local.md", @@ -15486,7 +15831,7 @@ "x-appwrite": { "method": "getTime", "group": "health", - "weight": 83, + "weight": 88, "cookies": false, "type": "", "demo": "health\/get-time.md", @@ -15535,7 +15880,7 @@ "x-appwrite": { "method": "get", "group": null, - "weight": 70, + "weight": 75, "cookies": false, "type": "", "demo": "locale\/get.md", @@ -15586,7 +15931,7 @@ "x-appwrite": { "method": "listCodes", "group": null, - "weight": 71, + "weight": 76, "cookies": false, "type": "", "demo": "locale\/list-codes.md", @@ -15637,7 +15982,7 @@ "x-appwrite": { "method": "listContinents", "group": null, - "weight": 75, + "weight": 80, "cookies": false, "type": "", "demo": "locale\/list-continents.md", @@ -15688,7 +16033,7 @@ "x-appwrite": { "method": "listCountries", "group": null, - "weight": 72, + "weight": 77, "cookies": false, "type": "", "demo": "locale\/list-countries.md", @@ -15739,7 +16084,7 @@ "x-appwrite": { "method": "listCountriesEU", "group": null, - "weight": 73, + "weight": 78, "cookies": false, "type": "", "demo": "locale\/list-countries-eu.md", @@ -15790,7 +16135,7 @@ "x-appwrite": { "method": "listCountriesPhones", "group": null, - "weight": 74, + "weight": 79, "cookies": false, "type": "", "demo": "locale\/list-countries-phones.md", @@ -15841,7 +16186,7 @@ "x-appwrite": { "method": "listCurrencies", "group": null, - "weight": 76, + "weight": 81, "cookies": false, "type": "", "demo": "locale\/list-currencies.md", @@ -15892,7 +16237,7 @@ "x-appwrite": { "method": "listLanguages", "group": null, - "weight": 77, + "weight": 82, "cookies": false, "type": "", "demo": "locale\/list-languages.md", @@ -15943,7 +16288,7 @@ "x-appwrite": { "method": "listMessages", "group": "messages", - "weight": 304, + "weight": 318, "cookies": false, "type": "", "demo": "messaging\/list-messages.md", @@ -16018,7 +16363,7 @@ "x-appwrite": { "method": "createEmail", "group": "messages", - "weight": 301, + "weight": 315, "cookies": false, "type": "", "demo": "messaging\/create-email.md", @@ -16176,7 +16521,7 @@ "x-appwrite": { "method": "updateEmail", "group": "messages", - "weight": 308, + "weight": 322, "cookies": false, "type": "", "demo": "messaging\/update-email.md", @@ -16331,7 +16676,7 @@ "x-appwrite": { "method": "createPush", "group": "messages", - "weight": 303, + "weight": 317, "cookies": false, "type": "", "demo": "messaging\/create-push.md", @@ -16526,7 +16871,7 @@ "x-appwrite": { "method": "updatePush", "group": "messages", - "weight": 310, + "weight": 324, "cookies": false, "type": "", "demo": "messaging\/update-push.md", @@ -16720,7 +17065,7 @@ "x-appwrite": { "method": "createSms", "group": "messages", - "weight": 302, + "weight": 316, "cookies": false, "type": "", "demo": "messaging\/create-sms.md", @@ -16906,7 +17251,7 @@ "x-appwrite": { "method": "updateSms", "group": "messages", - "weight": 309, + "weight": 323, "cookies": false, "type": "", "demo": "messaging\/update-sms.md", @@ -17086,7 +17431,7 @@ "x-appwrite": { "method": "getMessage", "group": "messages", - "weight": 307, + "weight": 321, "cookies": false, "type": "", "demo": "messaging\/get-message.md", @@ -17141,7 +17486,7 @@ "x-appwrite": { "method": "delete", "group": "messages", - "weight": 311, + "weight": 325, "cookies": false, "type": "", "demo": "messaging\/delete.md", @@ -17201,7 +17546,7 @@ "x-appwrite": { "method": "listMessageLogs", "group": "logs", - "weight": 305, + "weight": 319, "cookies": false, "type": "", "demo": "messaging\/list-message-logs.md", @@ -17273,7 +17618,7 @@ "x-appwrite": { "method": "listTargets", "group": "messages", - "weight": 306, + "weight": 320, "cookies": false, "type": "", "demo": "messaging\/list-targets.md", @@ -17345,7 +17690,7 @@ "x-appwrite": { "method": "listProviders", "group": "providers", - "weight": 276, + "weight": 290, "cookies": false, "type": "", "demo": "messaging\/list-providers.md", @@ -17420,7 +17765,7 @@ "x-appwrite": { "method": "createApnsProvider", "group": "providers", - "weight": 275, + "weight": 289, "cookies": false, "type": "", "demo": "messaging\/create-apns-provider.md", @@ -17605,7 +17950,7 @@ "x-appwrite": { "method": "updateApnsProvider", "group": "providers", - "weight": 288, + "weight": 302, "cookies": false, "type": "", "demo": "messaging\/update-apns-provider.md", @@ -17786,7 +18131,7 @@ "x-appwrite": { "method": "createFcmProvider", "group": "providers", - "weight": 274, + "weight": 288, "cookies": false, "type": "", "demo": "messaging\/create-fcm-provider.md", @@ -17939,7 +18284,7 @@ "x-appwrite": { "method": "updateFcmProvider", "group": "providers", - "weight": 287, + "weight": 301, "cookies": false, "type": "", "demo": "messaging\/update-fcm-provider.md", @@ -18088,7 +18433,7 @@ "x-appwrite": { "method": "createMailgunProvider", "group": "providers", - "weight": 266, + "weight": 280, "cookies": false, "type": "", "demo": "messaging\/create-mailgun-provider.md", @@ -18215,7 +18560,7 @@ "x-appwrite": { "method": "updateMailgunProvider", "group": "providers", - "weight": 279, + "weight": 293, "cookies": false, "type": "", "demo": "messaging\/update-mailgun-provider.md", @@ -18340,7 +18685,7 @@ "x-appwrite": { "method": "createMsg91Provider", "group": "providers", - "weight": 269, + "weight": 283, "cookies": false, "type": "", "demo": "messaging\/create-msg-91-provider.md", @@ -18443,7 +18788,7 @@ "x-appwrite": { "method": "updateMsg91Provider", "group": "providers", - "weight": 282, + "weight": 296, "cookies": false, "type": "", "demo": "messaging\/update-msg-91-provider.md", @@ -18544,7 +18889,7 @@ "x-appwrite": { "method": "createSendgridProvider", "group": "providers", - "weight": 267, + "weight": 281, "cookies": false, "type": "", "demo": "messaging\/create-sendgrid-provider.md", @@ -18659,7 +19004,7 @@ "x-appwrite": { "method": "updateSendgridProvider", "group": "providers", - "weight": 280, + "weight": 294, "cookies": false, "type": "", "demo": "messaging\/update-sendgrid-provider.md", @@ -18772,7 +19117,7 @@ "x-appwrite": { "method": "createSmtpProvider", "group": "providers", - "weight": 268, + "weight": 282, "cookies": false, "type": "", "demo": "messaging\/create-smtp-provider.md", @@ -19015,7 +19360,7 @@ "x-appwrite": { "method": "updateSmtpProvider", "group": "providers", - "weight": 281, + "weight": 295, "cookies": false, "type": "", "demo": "messaging\/update-smtp-provider.md", @@ -19251,7 +19596,7 @@ "x-appwrite": { "method": "createTelesignProvider", "group": "providers", - "weight": 270, + "weight": 284, "cookies": false, "type": "", "demo": "messaging\/create-telesign-provider.md", @@ -19354,7 +19699,7 @@ "x-appwrite": { "method": "updateTelesignProvider", "group": "providers", - "weight": 283, + "weight": 297, "cookies": false, "type": "", "demo": "messaging\/update-telesign-provider.md", @@ -19455,7 +19800,7 @@ "x-appwrite": { "method": "createTextmagicProvider", "group": "providers", - "weight": 271, + "weight": 285, "cookies": false, "type": "", "demo": "messaging\/create-textmagic-provider.md", @@ -19558,7 +19903,7 @@ "x-appwrite": { "method": "updateTextmagicProvider", "group": "providers", - "weight": 284, + "weight": 298, "cookies": false, "type": "", "demo": "messaging\/update-textmagic-provider.md", @@ -19659,7 +20004,7 @@ "x-appwrite": { "method": "createTwilioProvider", "group": "providers", - "weight": 272, + "weight": 286, "cookies": false, "type": "", "demo": "messaging\/create-twilio-provider.md", @@ -19762,7 +20107,7 @@ "x-appwrite": { "method": "updateTwilioProvider", "group": "providers", - "weight": 285, + "weight": 299, "cookies": false, "type": "", "demo": "messaging\/update-twilio-provider.md", @@ -19863,7 +20208,7 @@ "x-appwrite": { "method": "createVonageProvider", "group": "providers", - "weight": 273, + "weight": 287, "cookies": false, "type": "", "demo": "messaging\/create-vonage-provider.md", @@ -19966,7 +20311,7 @@ "x-appwrite": { "method": "updateVonageProvider", "group": "providers", - "weight": 286, + "weight": 300, "cookies": false, "type": "", "demo": "messaging\/update-vonage-provider.md", @@ -20065,7 +20410,7 @@ "x-appwrite": { "method": "getProvider", "group": "providers", - "weight": 278, + "weight": 292, "cookies": false, "type": "", "demo": "messaging\/get-provider.md", @@ -20120,7 +20465,7 @@ "x-appwrite": { "method": "deleteProvider", "group": "providers", - "weight": 289, + "weight": 303, "cookies": false, "type": "", "demo": "messaging\/delete-provider.md", @@ -20180,7 +20525,7 @@ "x-appwrite": { "method": "listProviderLogs", "group": "providers", - "weight": 277, + "weight": 291, "cookies": false, "type": "", "demo": "messaging\/list-provider-logs.md", @@ -20252,7 +20597,7 @@ "x-appwrite": { "method": "listSubscriberLogs", "group": "subscribers", - "weight": 298, + "weight": 312, "cookies": false, "type": "", "demo": "messaging\/list-subscriber-logs.md", @@ -20324,7 +20669,7 @@ "x-appwrite": { "method": "listTopics", "group": "topics", - "weight": 291, + "weight": 305, "cookies": false, "type": "", "demo": "messaging\/list-topics.md", @@ -20397,7 +20742,7 @@ "x-appwrite": { "method": "createTopic", "group": "topics", - "weight": 290, + "weight": 304, "cookies": false, "type": "", "demo": "messaging\/create-topic.md", @@ -20485,7 +20830,7 @@ "x-appwrite": { "method": "getTopic", "group": "topics", - "weight": 293, + "weight": 307, "cookies": false, "type": "", "demo": "messaging\/get-topic.md", @@ -20545,7 +20890,7 @@ "x-appwrite": { "method": "updateTopic", "group": "topics", - "weight": 294, + "weight": 308, "cookies": false, "type": "", "demo": "messaging\/update-topic.md", @@ -20624,7 +20969,7 @@ "x-appwrite": { "method": "deleteTopic", "group": "topics", - "weight": 295, + "weight": 309, "cookies": false, "type": "", "demo": "messaging\/delete-topic.md", @@ -20684,7 +21029,7 @@ "x-appwrite": { "method": "listTopicLogs", "group": "topics", - "weight": 292, + "weight": 306, "cookies": false, "type": "", "demo": "messaging\/list-topic-logs.md", @@ -20756,7 +21101,7 @@ "x-appwrite": { "method": "listSubscribers", "group": "subscribers", - "weight": 297, + "weight": 311, "cookies": false, "type": "", "demo": "messaging\/list-subscribers.md", @@ -20837,7 +21182,7 @@ "x-appwrite": { "method": "createSubscriber", "group": "subscribers", - "weight": 296, + "weight": 310, "cookies": false, "type": "", "demo": "messaging\/create-subscriber.md", @@ -20924,7 +21269,7 @@ "x-appwrite": { "method": "getSubscriber", "group": "subscribers", - "weight": 299, + "weight": 313, "cookies": false, "type": "", "demo": "messaging\/get-subscriber.md", @@ -20987,7 +21332,7 @@ "x-appwrite": { "method": "deleteSubscriber", "group": "subscribers", - "weight": 300, + "weight": 314, "cookies": false, "type": "", "demo": "messaging\/delete-subscriber.md", @@ -21057,7 +21402,7 @@ "x-appwrite": { "method": "list", "group": null, - "weight": 258, + "weight": 272, "cookies": false, "type": "", "demo": "migrations\/list.md", @@ -21130,7 +21475,7 @@ "x-appwrite": { "method": "createAppwriteMigration", "group": null, - "weight": 253, + "weight": 267, "cookies": false, "type": "", "demo": "migrations\/create-appwrite-migration.md", @@ -21222,7 +21567,7 @@ "x-appwrite": { "method": "getAppwriteReport", "group": null, - "weight": 260, + "weight": 274, "cookies": false, "type": "", "demo": "migrations\/get-appwrite-report.md", @@ -21310,7 +21655,7 @@ "x-appwrite": { "method": "createCsvMigration", "group": null, - "weight": 257, + "weight": 271, "cookies": false, "type": "", "demo": "migrations\/create-csv-migration.md", @@ -21400,7 +21745,7 @@ "x-appwrite": { "method": "createFirebaseMigration", "group": null, - "weight": 254, + "weight": 268, "cookies": false, "type": "", "demo": "migrations\/create-firebase-migration.md", @@ -21478,7 +21823,7 @@ "x-appwrite": { "method": "getFirebaseReport", "group": null, - "weight": 261, + "weight": 275, "cookies": false, "type": "", "demo": "migrations\/get-firebase-report.md", @@ -21549,7 +21894,7 @@ "x-appwrite": { "method": "createNHostMigration", "group": null, - "weight": 256, + "weight": 270, "cookies": false, "type": "", "demo": "migrations\/create-n-host-migration.md", @@ -21668,7 +22013,7 @@ "x-appwrite": { "method": "getNHostReport", "group": null, - "weight": 263, + "weight": 277, "cookies": false, "type": "", "demo": "migrations\/get-n-host-report.md", @@ -21788,7 +22133,7 @@ "x-appwrite": { "method": "createSupabaseMigration", "group": null, - "weight": 255, + "weight": 269, "cookies": false, "type": "", "demo": "migrations\/create-supabase-migration.md", @@ -21900,7 +22245,7 @@ "x-appwrite": { "method": "getSupabaseReport", "group": null, - "weight": 262, + "weight": 276, "cookies": false, "type": "", "demo": "migrations\/get-supabase-report.md", @@ -22011,7 +22356,7 @@ "x-appwrite": { "method": "get", "group": null, - "weight": 259, + "weight": 273, "cookies": false, "type": "", "demo": "migrations\/get.md", @@ -22069,7 +22414,7 @@ "x-appwrite": { "method": "retry", "group": null, - "weight": 264, + "weight": 278, "cookies": false, "type": "", "demo": "migrations\/retry.md", @@ -22122,7 +22467,7 @@ "x-appwrite": { "method": "delete", "group": null, - "weight": 265, + "weight": 279, "cookies": false, "type": "", "demo": "migrations\/delete.md", @@ -22180,7 +22525,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 148, + "weight": 156, "cookies": false, "type": "", "demo": "project\/get-usage.md", @@ -22262,7 +22607,7 @@ "x-appwrite": { "method": "listVariables", "group": null, - "weight": 150, + "weight": 158, "cookies": false, "type": "", "demo": "project\/list-variables.md", @@ -22310,7 +22655,7 @@ "x-appwrite": { "method": "createVariable", "group": null, - "weight": 149, + "weight": 157, "cookies": false, "type": "", "demo": "project\/create-variable.md", @@ -22391,7 +22736,7 @@ "x-appwrite": { "method": "getVariable", "group": null, - "weight": 151, + "weight": 159, "cookies": false, "type": "", "demo": "project\/get-variable.md", @@ -22449,7 +22794,7 @@ "x-appwrite": { "method": "updateVariable", "group": null, - "weight": 152, + "weight": 160, "cookies": false, "type": "", "demo": "project\/update-variable.md", @@ -22532,7 +22877,7 @@ "x-appwrite": { "method": "deleteVariable", "group": null, - "weight": 153, + "weight": 161, "cookies": false, "type": "", "demo": "project\/delete-variable.md", @@ -22590,7 +22935,7 @@ "x-appwrite": { "method": "list", "group": "projects", - "weight": 436, + "weight": 450, "cookies": false, "type": "", "demo": "projects\/list.md", @@ -22661,7 +23006,7 @@ "x-appwrite": { "method": "create", "group": "projects", - "weight": 102, + "weight": 107, "cookies": false, "type": "", "demo": "projects\/create.md", @@ -22808,7 +23153,7 @@ "x-appwrite": { "method": "get", "group": "projects", - "weight": 103, + "weight": 108, "cookies": false, "type": "", "demo": "projects\/get.md", @@ -22866,7 +23211,7 @@ "x-appwrite": { "method": "update", "group": "projects", - "weight": 104, + "weight": 109, "cookies": false, "type": "", "demo": "projects\/update.md", @@ -22991,7 +23336,7 @@ "x-appwrite": { "method": "delete", "group": "projects", - "weight": 121, + "weight": 126, "cookies": false, "type": "", "demo": "projects\/delete.md", @@ -23051,7 +23396,7 @@ "x-appwrite": { "method": "updateApiStatus", "group": "projects", - "weight": 108, + "weight": 113, "cookies": false, "type": "", "demo": "projects\/update-api-status.md", @@ -23205,7 +23550,7 @@ "x-appwrite": { "method": "updateApiStatusAll", "group": "projects", - "weight": 109, + "weight": 114, "cookies": false, "type": "", "demo": "projects\/update-api-status-all.md", @@ -23341,7 +23686,7 @@ "x-appwrite": { "method": "updateAuthDuration", "group": "auth", - "weight": 114, + "weight": 119, "cookies": false, "type": "", "demo": "projects\/update-auth-duration.md", @@ -23419,7 +23764,7 @@ "x-appwrite": { "method": "updateAuthLimit", "group": "auth", - "weight": 113, + "weight": 118, "cookies": false, "type": "", "demo": "projects\/update-auth-limit.md", @@ -23497,7 +23842,7 @@ "x-appwrite": { "method": "updateAuthSessionsLimit", "group": "auth", - "weight": 119, + "weight": 124, "cookies": false, "type": "", "demo": "projects\/update-auth-sessions-limit.md", @@ -23575,7 +23920,7 @@ "x-appwrite": { "method": "updateMembershipsPrivacy", "group": "auth", - "weight": 112, + "weight": 117, "cookies": false, "type": "", "demo": "projects\/update-memberships-privacy.md", @@ -23667,7 +24012,7 @@ "x-appwrite": { "method": "updateMockNumbers", "group": "auth", - "weight": 120, + "weight": 125, "cookies": false, "type": "", "demo": "projects\/update-mock-numbers.md", @@ -23748,7 +24093,7 @@ "x-appwrite": { "method": "updateAuthPasswordDictionary", "group": "auth", - "weight": 117, + "weight": 122, "cookies": false, "type": "", "demo": "projects\/update-auth-password-dictionary.md", @@ -23826,7 +24171,7 @@ "x-appwrite": { "method": "updateAuthPasswordHistory", "group": "auth", - "weight": 116, + "weight": 121, "cookies": false, "type": "", "demo": "projects\/update-auth-password-history.md", @@ -23904,7 +24249,7 @@ "x-appwrite": { "method": "updatePersonalDataCheck", "group": "auth", - "weight": 118, + "weight": 123, "cookies": false, "type": "", "demo": "projects\/update-personal-data-check.md", @@ -23956,6 +24301,457 @@ ] } }, + "\/projects\/{projectId}\/auth\/plans": { + "get": { + "summary": "List auth plans", + "operationId": "projectsListAuthPlans", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "projects" + ], + "description": false, + "responses": { + "200": { + "description": "Documents List", + "schema": { + "$ref": "#\/definitions\/documentList" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "listAuthPlans", + "group": "authPlans", + "weight": 263, + "cookies": false, + "type": "", + "demo": "projects\/list-auth-plans.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/list-auth-plans.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "projects.read", + "platforms": [ + "console" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "projectId", + "description": "Project unique ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "queries", + "description": "Array of query strings.", + "required": false, + "type": "array", + "collectionFormat": "multi", + "items": { + "type": "string" + }, + "default": [], + "in": "query" + } + ] + }, + "post": { + "summary": "Create auth plan", + "operationId": "projectsCreateAuthPlan", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "projects" + ], + "description": false, + "responses": { + "201": { + "description": "Any", + "schema": { + "$ref": "#\/definitions\/any" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createAuthPlan", + "group": "authPlans", + "weight": 262, + "cookies": false, + "type": "", + "demo": "projects\/create-auth-plan.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/create-auth-plan.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "projects.write", + "platforms": [ + "console" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "projectId", + "description": "Project unique ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "planId": { + "type": "string", + "description": "Plan unique ID.", + "default": null, + "x-example": "" + }, + "name": { + "type": "string", + "description": "Plan name.", + "default": null, + "x-example": "" + }, + "price": { + "type": "integer", + "description": "Price in cents.", + "default": null, + "x-example": null + }, + "currency": { + "type": "string", + "description": "Currency code (3 letters).", + "default": null, + "x-example": "" + }, + "interval": { + "type": "string", + "description": "Billing interval.", + "default": null, + "x-example": "month", + "enum": [ + "month", + "year", + "week", + "day" + ], + "x-enum-name": null, + "x-enum-keys": [] + }, + "description": { + "type": "string", + "description": "Plan description.", + "default": "", + "x-example": "" + }, + "features": { + "type": "array", + "description": "Plan features list.", + "default": [], + "x-example": null, + "items": { + "type": "string" + } + }, + "maxUsers": { + "type": "integer", + "description": "Maximum users allowed.", + "default": null, + "x-example": null + }, + "isDefault": { + "type": "boolean", + "description": "Is this the default plan.", + "default": false, + "x-example": false + }, + "isFree": { + "type": "boolean", + "description": "Is this a free plan.", + "default": false, + "x-example": false + } + }, + "required": [ + "planId", + "name", + "price", + "currency" + ] + } + } + ] + } + }, + "\/projects\/{projectId}\/auth\/plans\/{planId}": { + "get": { + "summary": "Get auth plan", + "operationId": "projectsGetAuthPlan", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "projects" + ], + "description": false, + "responses": { + "200": { + "description": "Any", + "schema": { + "$ref": "#\/definitions\/any" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getAuthPlan", + "group": "authPlans", + "weight": 264, + "cookies": false, + "type": "", + "demo": "projects\/get-auth-plan.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/get-auth-plan.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "projects.read", + "platforms": [ + "console" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "projectId", + "description": "Project unique ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "planId", + "description": "Plan ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + } + ] + }, + "put": { + "summary": "Update auth plan", + "operationId": "projectsUpdateAuthPlan", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "projects" + ], + "description": false, + "responses": { + "200": { + "description": "Any", + "schema": { + "$ref": "#\/definitions\/any" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateAuthPlan", + "group": "authPlans", + "weight": 265, + "cookies": false, + "type": "", + "demo": "projects\/update-auth-plan.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/update-auth-plan.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "projects.write", + "platforms": [ + "console" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "projectId", + "description": "Project unique ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "planId", + "description": "Plan ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Plan name.", + "default": null, + "x-example": "" + }, + "description": { + "type": "string", + "description": "Plan description.", + "default": null, + "x-example": "" + }, + "features": { + "type": "array", + "description": "Plan features list.", + "default": null, + "x-example": null, + "items": { + "type": "string" + } + }, + "maxUsers": { + "type": "integer", + "description": "Maximum users allowed.", + "default": null, + "x-example": null + }, + "isDefault": { + "type": "boolean", + "description": "Is this the default plan.", + "default": null, + "x-example": false + } + } + } + } + ] + }, + "delete": { + "summary": "Delete auth plan", + "operationId": "projectsDeleteAuthPlan", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "projects" + ], + "description": false, + "responses": { + "204": { + "description": "No content" + } + }, + "deprecated": false, + "x-appwrite": { + "method": "deleteAuthPlan", + "group": "authPlans", + "weight": 266, + "cookies": false, + "type": "", + "demo": "projects\/delete-auth-plan.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/delete-auth-plan.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "projects.write", + "platforms": [ + "console" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "projectId", + "description": "Project unique ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "planId", + "description": "Plan ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + } + ] + } + }, "\/projects\/{projectId}\/auth\/session-alerts": { "patch": { "summary": "Update project sessions emails", @@ -23982,7 +24778,7 @@ "x-appwrite": { "method": "updateSessionAlerts", "group": "auth", - "weight": 111, + "weight": 116, "cookies": false, "type": "", "demo": "projects\/update-session-alerts.md", @@ -24060,7 +24856,7 @@ "x-appwrite": { "method": "updateSessionInvalidation", "group": "auth", - "weight": 147, + "weight": 152, "cookies": false, "type": "", "demo": "projects\/update-session-invalidation.md", @@ -24112,6 +24908,198 @@ ] } }, + "\/projects\/{projectId}\/auth\/subscriptions": { + "get": { + "summary": "Get auth subscription configuration", + "operationId": "projectsGetSubscriptionsConfig", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "projects" + ], + "description": false, + "responses": { + "200": { + "description": "Project", + "schema": { + "$ref": "#\/definitions\/project" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getSubscriptionsConfig", + "group": "auth", + "weight": 154, + "cookies": false, + "type": "", + "demo": "projects\/get-subscriptions-config.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/get-subscriptions-config.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "projects.read", + "platforms": [ + "console" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "projectId", + "description": "Project unique ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + } + ] + }, + "put": { + "summary": "Configure auth subscriptions", + "operationId": "projectsConfigureSubscriptions", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "projects" + ], + "description": false, + "responses": { + "200": { + "description": "Project", + "schema": { + "$ref": "#\/definitions\/project" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "configureSubscriptions", + "group": "auth", + "weight": 153, + "cookies": false, + "type": "", + "demo": "projects\/configure-subscriptions.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/configure-subscriptions.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "projects.write", + "platforms": [ + "console" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "projectId", + "description": "Project unique ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "stripeSecretKey": { + "type": "string", + "description": "Stripe secret key.", + "default": null, + "x-example": null + } + }, + "required": [ + "stripeSecretKey" + ] + } + } + ] + }, + "delete": { + "summary": "Remove auth subscription configuration", + "operationId": "projectsRemoveSubscriptionsConfig", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "projects" + ], + "description": false, + "responses": { + "200": { + "description": "Project", + "schema": { + "$ref": "#\/definitions\/project" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "removeSubscriptionsConfig", + "group": "auth", + "weight": 155, + "cookies": false, + "type": "", + "demo": "projects\/remove-subscriptions-config.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/projects\/remove-subscriptions-config.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "projects.write", + "platforms": [ + "console" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [] + } + ], + "parameters": [ + { + "name": "projectId", + "description": "Project unique ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + } + ] + } + }, "\/projects\/{projectId}\/auth\/{method}": { "patch": { "summary": "Update project auth method status. Use this endpoint to enable or disable a given auth method for this project.", @@ -24138,7 +25126,7 @@ "x-appwrite": { "method": "updateAuthStatus", "group": "auth", - "weight": 115, + "weight": 120, "cookies": false, "type": "", "demo": "projects\/update-auth-status.md", @@ -24233,7 +25221,7 @@ "x-appwrite": { "method": "listDevKeys", "group": "devKeys", - "weight": 434, + "weight": 448, "cookies": false, "type": "", "demo": "projects\/list-dev-keys.md", @@ -24303,7 +25291,7 @@ "x-appwrite": { "method": "createDevKey", "group": "devKeys", - "weight": 431, + "weight": 445, "cookies": false, "type": "", "demo": "projects\/create-dev-key.md", @@ -24386,7 +25374,7 @@ "x-appwrite": { "method": "getDevKey", "group": "devKeys", - "weight": 433, + "weight": 447, "cookies": false, "type": "", "demo": "projects\/get-dev-key.md", @@ -24452,7 +25440,7 @@ "x-appwrite": { "method": "updateDevKey", "group": "devKeys", - "weight": 432, + "weight": 446, "cookies": false, "type": "", "demo": "projects\/update-dev-key.md", @@ -24538,7 +25526,7 @@ "x-appwrite": { "method": "deleteDevKey", "group": "devKeys", - "weight": 435, + "weight": 449, "cookies": false, "type": "", "demo": "projects\/delete-dev-key.md", @@ -24606,7 +25594,7 @@ "x-appwrite": { "method": "createJWT", "group": "auth", - "weight": 133, + "weight": 138, "cookies": false, "type": "", "demo": "projects\/create-jwt.md", @@ -24691,7 +25679,7 @@ "x-appwrite": { "method": "listKeys", "group": "keys", - "weight": 129, + "weight": 134, "cookies": false, "type": "", "demo": "projects\/list-keys.md", @@ -24749,7 +25737,7 @@ "x-appwrite": { "method": "createKey", "group": "keys", - "weight": 128, + "weight": 133, "cookies": false, "type": "", "demo": "projects\/create-key.md", @@ -24841,7 +25829,7 @@ "x-appwrite": { "method": "getKey", "group": "keys", - "weight": 130, + "weight": 135, "cookies": false, "type": "", "demo": "projects\/get-key.md", @@ -24907,7 +25895,7 @@ "x-appwrite": { "method": "updateKey", "group": "keys", - "weight": 131, + "weight": 136, "cookies": false, "type": "", "demo": "projects\/update-key.md", @@ -25002,7 +25990,7 @@ "x-appwrite": { "method": "deleteKey", "group": "keys", - "weight": 132, + "weight": 137, "cookies": false, "type": "", "demo": "projects\/delete-key.md", @@ -25070,7 +26058,7 @@ "x-appwrite": { "method": "updateOAuth2", "group": "auth", - "weight": 110, + "weight": 115, "cookies": false, "type": "", "demo": "projects\/update-o-auth-2.md", @@ -25208,7 +26196,7 @@ "x-appwrite": { "method": "listPlatforms", "group": "platforms", - "weight": 135, + "weight": 140, "cookies": false, "type": "", "demo": "projects\/list-platforms.md", @@ -25266,7 +26254,7 @@ "x-appwrite": { "method": "createPlatform", "group": "platforms", - "weight": 134, + "weight": 139, "cookies": false, "type": "", "demo": "projects\/create-platform.md", @@ -25386,7 +26374,7 @@ "x-appwrite": { "method": "getPlatform", "group": "platforms", - "weight": 136, + "weight": 141, "cookies": false, "type": "", "demo": "projects\/get-platform.md", @@ -25452,7 +26440,7 @@ "x-appwrite": { "method": "updatePlatform", "group": "platforms", - "weight": 137, + "weight": 142, "cookies": false, "type": "", "demo": "projects\/update-platform.md", @@ -25549,7 +26537,7 @@ "x-appwrite": { "method": "deletePlatform", "group": "platforms", - "weight": 138, + "weight": 143, "cookies": false, "type": "", "demo": "projects\/delete-platform.md", @@ -25617,7 +26605,7 @@ "x-appwrite": { "method": "updateServiceStatus", "group": "projects", - "weight": 106, + "weight": 111, "cookies": false, "type": "", "demo": "projects\/update-service-status.md", @@ -25672,6 +26660,7 @@ "sites", "functions", "graphql", + "authPlans", "messaging" ], "x-enum-name": "ApiService", @@ -25719,7 +26708,7 @@ "x-appwrite": { "method": "updateServiceStatusAll", "group": "projects", - "weight": 107, + "weight": 112, "cookies": false, "type": "", "demo": "projects\/update-service-status-all.md", @@ -25797,7 +26786,7 @@ "x-appwrite": { "method": "updateSmtp", "group": "templates", - "weight": 139, + "weight": 144, "cookies": false, "type": "", "demo": "projects\/update-smtp.md", @@ -26000,7 +26989,7 @@ "x-appwrite": { "method": "createSmtpTest", "group": "templates", - "weight": 140, + "weight": 145, "cookies": false, "type": "", "demo": "projects\/create-smtp-test.md", @@ -26216,7 +27205,7 @@ "x-appwrite": { "method": "updateTeam", "group": "projects", - "weight": 105, + "weight": 110, "cookies": false, "type": "", "demo": "projects\/update-team.md", @@ -26292,7 +27281,7 @@ "x-appwrite": { "method": "getEmailTemplate", "group": "templates", - "weight": 142, + "weight": 147, "cookies": false, "type": "", "demo": "projects\/get-email-template.md", @@ -26512,7 +27501,7 @@ "x-appwrite": { "method": "updateEmailTemplate", "group": "templates", - "weight": 144, + "weight": 149, "cookies": false, "type": "", "demo": "projects\/update-email-template.md", @@ -26775,7 +27764,7 @@ "x-appwrite": { "method": "deleteEmailTemplate", "group": "templates", - "weight": 146, + "weight": 151, "cookies": false, "type": "", "demo": "projects\/delete-email-template.md", @@ -26995,7 +27984,7 @@ "x-appwrite": { "method": "getSmsTemplate", "group": "templates", - "weight": 141, + "weight": 146, "cookies": false, "type": "", "demo": "projects\/get-sms-template.md", @@ -27274,7 +28263,7 @@ "x-appwrite": { "method": "updateSmsTemplate", "group": "templates", - "weight": 143, + "weight": 148, "cookies": false, "type": "", "demo": "projects\/update-sms-template.md", @@ -27575,7 +28564,7 @@ "x-appwrite": { "method": "deleteSmsTemplate", "group": "templates", - "weight": 145, + "weight": 150, "cookies": false, "type": "", "demo": "projects\/delete-sms-template.md", @@ -27854,7 +28843,7 @@ "x-appwrite": { "method": "listWebhooks", "group": "webhooks", - "weight": 123, + "weight": 128, "cookies": false, "type": "", "demo": "projects\/list-webhooks.md", @@ -27912,7 +28901,7 @@ "x-appwrite": { "method": "createWebhook", "group": "webhooks", - "weight": 122, + "weight": 127, "cookies": false, "type": "", "demo": "projects\/create-webhook.md", @@ -28030,7 +29019,7 @@ "x-appwrite": { "method": "getWebhook", "group": "webhooks", - "weight": 124, + "weight": 129, "cookies": false, "type": "", "demo": "projects\/get-webhook.md", @@ -28096,7 +29085,7 @@ "x-appwrite": { "method": "updateWebhook", "group": "webhooks", - "weight": 125, + "weight": 130, "cookies": false, "type": "", "demo": "projects\/update-webhook.md", @@ -28217,7 +29206,7 @@ "x-appwrite": { "method": "deleteWebhook", "group": "webhooks", - "weight": 127, + "weight": 132, "cookies": false, "type": "", "demo": "projects\/delete-webhook.md", @@ -28285,7 +29274,7 @@ "x-appwrite": { "method": "updateWebhookSignature", "group": "webhooks", - "weight": 126, + "weight": 131, "cookies": false, "type": "", "demo": "projects\/update-webhook-signature.md", @@ -28351,7 +29340,7 @@ "x-appwrite": { "method": "listRules", "group": null, - "weight": 502, + "weight": 516, "cookies": false, "type": "", "demo": "proxy\/list-rules.md", @@ -28424,7 +29413,7 @@ "x-appwrite": { "method": "createAPIRule", "group": null, - "weight": 497, + "weight": 511, "cookies": false, "type": "", "demo": "proxy\/create-api-rule.md", @@ -28494,7 +29483,7 @@ "x-appwrite": { "method": "createFunctionRule", "group": null, - "weight": 499, + "weight": 513, "cookies": false, "type": "", "demo": "proxy\/create-function-rule.md", @@ -28577,7 +29566,7 @@ "x-appwrite": { "method": "createRedirectRule", "group": null, - "weight": 500, + "weight": 514, "cookies": false, "type": "", "demo": "proxy\/create-redirect-rule.md", @@ -28697,7 +29686,7 @@ "x-appwrite": { "method": "createSiteRule", "group": null, - "weight": 498, + "weight": 512, "cookies": false, "type": "", "demo": "proxy\/create-site-rule.md", @@ -28778,7 +29767,7 @@ "x-appwrite": { "method": "getRule", "group": null, - "weight": 501, + "weight": 515, "cookies": false, "type": "", "demo": "proxy\/get-rule.md", @@ -28831,7 +29820,7 @@ "x-appwrite": { "method": "deleteRule", "group": null, - "weight": 503, + "weight": 517, "cookies": false, "type": "", "demo": "proxy\/delete-rule.md", @@ -28891,7 +29880,7 @@ "x-appwrite": { "method": "updateRuleVerification", "group": null, - "weight": 504, + "weight": 518, "cookies": false, "type": "", "demo": "proxy\/update-rule-verification.md", @@ -28949,7 +29938,7 @@ "x-appwrite": { "method": "list", "group": "sites", - "weight": 469, + "weight": 483, "cookies": false, "type": "", "demo": "sites\/list.md", @@ -29021,7 +30010,7 @@ "x-appwrite": { "method": "create", "group": "sites", - "weight": 467, + "weight": 481, "cookies": false, "type": "", "demo": "sites\/create.md", @@ -29288,7 +30277,7 @@ "x-appwrite": { "method": "listFrameworks", "group": "frameworks", - "weight": 472, + "weight": 486, "cookies": false, "type": "", "demo": "sites\/list-frameworks.md", @@ -29337,7 +30326,7 @@ "x-appwrite": { "method": "listSpecifications", "group": "frameworks", - "weight": 495, + "weight": 509, "cookies": false, "type": "", "demo": "sites\/list-specifications.md", @@ -29387,7 +30376,7 @@ "x-appwrite": { "method": "listTemplates", "group": "templates", - "weight": 491, + "weight": 505, "cookies": false, "type": "", "demo": "sites\/list-templates.md", @@ -29481,7 +30470,7 @@ "x-appwrite": { "method": "getTemplate", "group": "templates", - "weight": 492, + "weight": 506, "cookies": false, "type": "", "demo": "sites\/get-template.md", @@ -29539,7 +30528,7 @@ "x-appwrite": { "method": "listUsage", "group": null, - "weight": 493, + "weight": 507, "cookies": false, "type": "", "demo": "sites\/list-usage.md", @@ -29609,7 +30598,7 @@ "x-appwrite": { "method": "get", "group": "sites", - "weight": 468, + "weight": 482, "cookies": false, "type": "", "demo": "sites\/get.md", @@ -29668,7 +30657,7 @@ "x-appwrite": { "method": "update", "group": "sites", - "weight": 470, + "weight": 484, "cookies": false, "type": "", "demo": "sites\/update.md", @@ -29930,7 +30919,7 @@ "x-appwrite": { "method": "delete", "group": "sites", - "weight": 471, + "weight": 485, "cookies": false, "type": "", "demo": "sites\/delete.md", @@ -29991,7 +30980,7 @@ "x-appwrite": { "method": "updateSiteDeployment", "group": "sites", - "weight": 478, + "weight": 492, "cookies": false, "type": "", "demo": "sites\/update-site-deployment.md", @@ -30068,7 +31057,7 @@ "x-appwrite": { "method": "listDeployments", "group": "deployments", - "weight": 477, + "weight": 491, "cookies": false, "type": "", "demo": "sites\/list-deployments.md", @@ -30148,7 +31137,7 @@ "x-appwrite": { "method": "createDeployment", "group": "deployments", - "weight": 473, + "weight": 487, "cookies": false, "type": "upload", "demo": "sites\/create-deployment.md", @@ -30248,7 +31237,7 @@ "x-appwrite": { "method": "createDuplicateDeployment", "group": "deployments", - "weight": 481, + "weight": 495, "cookies": false, "type": "", "demo": "sites\/create-duplicate-deployment.md", @@ -30327,7 +31316,7 @@ "x-appwrite": { "method": "createTemplateDeployment", "group": "deployments", - "weight": 474, + "weight": 488, "cookies": false, "type": "", "demo": "sites\/create-template-deployment.md", @@ -30433,7 +31422,7 @@ "x-appwrite": { "method": "createVcsDeployment", "group": "deployments", - "weight": 475, + "weight": 489, "cookies": false, "type": "", "demo": "sites\/create-vcs-deployment.md", @@ -30530,7 +31519,7 @@ "x-appwrite": { "method": "getDeployment", "group": "deployments", - "weight": 476, + "weight": 490, "cookies": false, "type": "", "demo": "sites\/get-deployment.md", @@ -30592,7 +31581,7 @@ "x-appwrite": { "method": "deleteDeployment", "group": "deployments", - "weight": 479, + "weight": 493, "cookies": false, "type": "", "demo": "sites\/delete-deployment.md", @@ -30659,7 +31648,7 @@ "x-appwrite": { "method": "getDeploymentDownload", "group": "deployments", - "weight": 480, + "weight": 494, "cookies": false, "type": "location", "demo": "sites\/get-deployment-download.md", @@ -30744,7 +31733,7 @@ "x-appwrite": { "method": "updateDeploymentStatus", "group": "deployments", - "weight": 482, + "weight": 496, "cookies": false, "type": "", "demo": "sites\/update-deployment-status.md", @@ -30811,7 +31800,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 484, + "weight": 498, "cookies": false, "type": "", "demo": "sites\/list-logs.md", @@ -30882,7 +31871,7 @@ "x-appwrite": { "method": "getLog", "group": "logs", - "weight": 483, + "weight": 497, "cookies": false, "type": "", "demo": "sites\/get-log.md", @@ -30946,7 +31935,7 @@ "x-appwrite": { "method": "deleteLog", "group": "logs", - "weight": 485, + "weight": 499, "cookies": false, "type": "", "demo": "sites\/delete-log.md", @@ -31013,7 +32002,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 494, + "weight": 508, "cookies": false, "type": "", "demo": "sites\/get-usage.md", @@ -31091,7 +32080,7 @@ "x-appwrite": { "method": "listVariables", "group": "variables", - "weight": 488, + "weight": 502, "cookies": false, "type": "", "demo": "sites\/list-variables.md", @@ -31150,7 +32139,7 @@ "x-appwrite": { "method": "createVariable", "group": "variables", - "weight": 486, + "weight": 500, "cookies": false, "type": "", "demo": "sites\/create-variable.md", @@ -31240,7 +32229,7 @@ "x-appwrite": { "method": "getVariable", "group": "variables", - "weight": 487, + "weight": 501, "cookies": false, "type": "", "demo": "sites\/get-variable.md", @@ -31307,7 +32296,7 @@ "x-appwrite": { "method": "updateVariable", "group": "variables", - "weight": 489, + "weight": 503, "cookies": false, "type": "", "demo": "sites\/update-variable.md", @@ -31399,7 +32388,7 @@ "x-appwrite": { "method": "deleteVariable", "group": "variables", - "weight": 490, + "weight": 504, "cookies": false, "type": "", "demo": "sites\/delete-variable.md", @@ -31466,7 +32455,7 @@ "x-appwrite": { "method": "listBuckets", "group": "buckets", - "weight": 155, + "weight": 163, "cookies": false, "type": "", "demo": "storage\/list-buckets.md", @@ -31538,7 +32527,7 @@ "x-appwrite": { "method": "createBucket", "group": "buckets", - "weight": 154, + "weight": 162, "cookies": false, "type": "", "demo": "storage\/create-bucket.md", @@ -31675,7 +32664,7 @@ "x-appwrite": { "method": "getBucket", "group": "buckets", - "weight": 156, + "weight": 164, "cookies": false, "type": "", "demo": "storage\/get-bucket.md", @@ -31734,7 +32723,7 @@ "x-appwrite": { "method": "updateBucket", "group": "buckets", - "weight": 157, + "weight": 165, "cookies": false, "type": "", "demo": "storage\/update-bucket.md", @@ -31867,7 +32856,7 @@ "x-appwrite": { "method": "deleteBucket", "group": "buckets", - "weight": 158, + "weight": 166, "cookies": false, "type": "", "demo": "storage\/delete-bucket.md", @@ -31926,7 +32915,7 @@ "x-appwrite": { "method": "listFiles", "group": "files", - "weight": 160, + "weight": 168, "cookies": false, "type": "", "demo": "storage\/list-files.md", @@ -32008,7 +32997,7 @@ "x-appwrite": { "method": "createFile", "group": "files", - "weight": 159, + "weight": 167, "cookies": false, "type": "upload", "demo": "storage\/create-file.md", @@ -32097,7 +33086,7 @@ "x-appwrite": { "method": "getFile", "group": "files", - "weight": 161, + "weight": 169, "cookies": false, "type": "", "demo": "storage\/get-file.md", @@ -32166,7 +33155,7 @@ "x-appwrite": { "method": "updateFile", "group": "files", - "weight": 166, + "weight": 174, "cookies": false, "type": "", "demo": "storage\/update-file.md", @@ -32254,7 +33243,7 @@ "x-appwrite": { "method": "deleteFile", "group": "files", - "weight": 167, + "weight": 175, "cookies": false, "type": "", "demo": "storage\/delete-file.md", @@ -32323,7 +33312,7 @@ "x-appwrite": { "method": "getFileDownload", "group": "files", - "weight": 163, + "weight": 171, "cookies": false, "type": "location", "demo": "storage\/get-file-download.md", @@ -32401,7 +33390,7 @@ "x-appwrite": { "method": "getFilePreview", "group": "files", - "weight": 162, + "weight": 170, "cookies": false, "type": "location", "demo": "storage\/get-file-preview.md", @@ -32607,7 +33596,7 @@ "x-appwrite": { "method": "getFileView", "group": "files", - "weight": 164, + "weight": 172, "cookies": false, "type": "location", "demo": "storage\/get-file-view.md", @@ -32685,7 +33674,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 168, + "weight": 176, "cookies": false, "type": "", "demo": "storage\/get-usage.md", @@ -32755,7 +33744,7 @@ "x-appwrite": { "method": "getBucketUsage", "group": null, - "weight": 169, + "weight": 177, "cookies": false, "type": "", "demo": "storage\/get-bucket-usage.md", @@ -32833,7 +33822,7 @@ "x-appwrite": { "method": "list", "group": "tablesdb", - "weight": 376, + "weight": 390, "cookies": false, "type": "", "demo": "tablesdb\/list.md", @@ -32905,7 +33894,7 @@ "x-appwrite": { "method": "create", "group": "tablesdb", - "weight": 372, + "weight": 386, "cookies": false, "type": "", "demo": "tablesdb\/create.md", @@ -32987,7 +33976,7 @@ "x-appwrite": { "method": "listUsage", "group": null, - "weight": 378, + "weight": 392, "cookies": false, "type": "", "demo": "tablesdb\/list-usage.md", @@ -33082,7 +34071,7 @@ "x-appwrite": { "method": "get", "group": "tablesdb", - "weight": 373, + "weight": 387, "cookies": false, "type": "", "demo": "tablesdb\/get.md", @@ -33141,7 +34130,7 @@ "x-appwrite": { "method": "update", "group": "tablesdb", - "weight": 374, + "weight": 388, "cookies": false, "type": "", "demo": "tablesdb\/update.md", @@ -33219,7 +34208,7 @@ "x-appwrite": { "method": "delete", "group": "tablesdb", - "weight": 375, + "weight": 389, "cookies": false, "type": "", "demo": "tablesdb\/delete.md", @@ -33278,7 +34267,7 @@ "x-appwrite": { "method": "listTables", "group": "tables", - "weight": 383, + "weight": 397, "cookies": false, "type": "", "demo": "tablesdb\/list-tables.md", @@ -33361,7 +34350,7 @@ "x-appwrite": { "method": "createTable", "group": "tables", - "weight": 379, + "weight": 393, "cookies": false, "type": "", "demo": "tablesdb\/create-table.md", @@ -33469,7 +34458,7 @@ "x-appwrite": { "method": "getTable", "group": "tables", - "weight": 380, + "weight": 394, "cookies": false, "type": "", "demo": "tablesdb\/get-table.md", @@ -33539,7 +34528,7 @@ "x-appwrite": { "method": "updateTable", "group": "tables", - "weight": 381, + "weight": 395, "cookies": false, "type": "", "demo": "tablesdb\/update-table.md", @@ -33643,7 +34632,7 @@ "x-appwrite": { "method": "deleteTable", "group": "tables", - "weight": 382, + "weight": 396, "cookies": false, "type": "", "demo": "tablesdb\/delete-table.md", @@ -33713,7 +34702,7 @@ "x-appwrite": { "method": "listColumns", "group": "columns", - "weight": 388, + "weight": 402, "cookies": false, "type": "", "demo": "tablesdb\/list-columns.md", @@ -33797,7 +34786,7 @@ "x-appwrite": { "method": "createBooleanColumn", "group": "columns", - "weight": 389, + "weight": 403, "cookies": false, "type": "", "demo": "tablesdb\/create-boolean-column.md", @@ -33906,7 +34895,7 @@ "x-appwrite": { "method": "updateBooleanColumn", "group": "columns", - "weight": 390, + "weight": 404, "cookies": false, "type": "", "demo": "tablesdb\/update-boolean-column.md", @@ -34017,7 +35006,7 @@ "x-appwrite": { "method": "createDatetimeColumn", "group": "columns", - "weight": 391, + "weight": 405, "cookies": false, "type": "", "demo": "tablesdb\/create-datetime-column.md", @@ -34126,7 +35115,7 @@ "x-appwrite": { "method": "updateDatetimeColumn", "group": "columns", - "weight": 392, + "weight": 406, "cookies": false, "type": "", "demo": "tablesdb\/update-datetime-column.md", @@ -34237,7 +35226,7 @@ "x-appwrite": { "method": "createEmailColumn", "group": "columns", - "weight": 393, + "weight": 407, "cookies": false, "type": "", "demo": "tablesdb\/create-email-column.md", @@ -34346,7 +35335,7 @@ "x-appwrite": { "method": "updateEmailColumn", "group": "columns", - "weight": 394, + "weight": 408, "cookies": false, "type": "", "demo": "tablesdb\/update-email-column.md", @@ -34457,7 +35446,7 @@ "x-appwrite": { "method": "createEnumColumn", "group": "columns", - "weight": 395, + "weight": 409, "cookies": false, "type": "", "demo": "tablesdb\/create-enum-column.md", @@ -34576,7 +35565,7 @@ "x-appwrite": { "method": "updateEnumColumn", "group": "columns", - "weight": 396, + "weight": 410, "cookies": false, "type": "", "demo": "tablesdb\/update-enum-column.md", @@ -34697,7 +35686,7 @@ "x-appwrite": { "method": "createFloatColumn", "group": "columns", - "weight": 397, + "weight": 411, "cookies": false, "type": "", "demo": "tablesdb\/create-float-column.md", @@ -34818,7 +35807,7 @@ "x-appwrite": { "method": "updateFloatColumn", "group": "columns", - "weight": 398, + "weight": 412, "cookies": false, "type": "", "demo": "tablesdb\/update-float-column.md", @@ -34941,7 +35930,7 @@ "x-appwrite": { "method": "createIntegerColumn", "group": "columns", - "weight": 399, + "weight": 413, "cookies": false, "type": "", "demo": "tablesdb\/create-integer-column.md", @@ -35062,7 +36051,7 @@ "x-appwrite": { "method": "updateIntegerColumn", "group": "columns", - "weight": 400, + "weight": 414, "cookies": false, "type": "", "demo": "tablesdb\/update-integer-column.md", @@ -35185,7 +36174,7 @@ "x-appwrite": { "method": "createIpColumn", "group": "columns", - "weight": 401, + "weight": 415, "cookies": false, "type": "", "demo": "tablesdb\/create-ip-column.md", @@ -35294,7 +36283,7 @@ "x-appwrite": { "method": "updateIpColumn", "group": "columns", - "weight": 402, + "weight": 416, "cookies": false, "type": "", "demo": "tablesdb\/update-ip-column.md", @@ -35405,7 +36394,7 @@ "x-appwrite": { "method": "createLineColumn", "group": "columns", - "weight": 403, + "weight": 417, "cookies": false, "type": "", "demo": "tablesdb\/create-line-column.md", @@ -35509,7 +36498,7 @@ "x-appwrite": { "method": "updateLineColumn", "group": "columns", - "weight": 404, + "weight": 418, "cookies": false, "type": "", "demo": "tablesdb\/update-line-column.md", @@ -35619,7 +36608,7 @@ "x-appwrite": { "method": "createPointColumn", "group": "columns", - "weight": 405, + "weight": 419, "cookies": false, "type": "", "demo": "tablesdb\/create-point-column.md", @@ -35723,7 +36712,7 @@ "x-appwrite": { "method": "updatePointColumn", "group": "columns", - "weight": 406, + "weight": 420, "cookies": false, "type": "", "demo": "tablesdb\/update-point-column.md", @@ -35833,7 +36822,7 @@ "x-appwrite": { "method": "createPolygonColumn", "group": "columns", - "weight": 407, + "weight": 421, "cookies": false, "type": "", "demo": "tablesdb\/create-polygon-column.md", @@ -35937,7 +36926,7 @@ "x-appwrite": { "method": "updatePolygonColumn", "group": "columns", - "weight": 408, + "weight": 422, "cookies": false, "type": "", "demo": "tablesdb\/update-polygon-column.md", @@ -36047,7 +37036,7 @@ "x-appwrite": { "method": "createRelationshipColumn", "group": "columns", - "weight": 409, + "weight": 423, "cookies": false, "type": "", "demo": "tablesdb\/create-relationship-column.md", @@ -36183,7 +37172,7 @@ "x-appwrite": { "method": "createStringColumn", "group": "columns", - "weight": 411, + "weight": 425, "cookies": false, "type": "", "demo": "tablesdb\/create-string-column.md", @@ -36305,7 +37294,7 @@ "x-appwrite": { "method": "updateStringColumn", "group": "columns", - "weight": 412, + "weight": 426, "cookies": false, "type": "", "demo": "tablesdb\/update-string-column.md", @@ -36422,7 +37411,7 @@ "x-appwrite": { "method": "createUrlColumn", "group": "columns", - "weight": 413, + "weight": 427, "cookies": false, "type": "", "demo": "tablesdb\/create-url-column.md", @@ -36531,7 +37520,7 @@ "x-appwrite": { "method": "updateUrlColumn", "group": "columns", - "weight": 414, + "weight": 428, "cookies": false, "type": "", "demo": "tablesdb\/update-url-column.md", @@ -36671,7 +37660,7 @@ "x-appwrite": { "method": "getColumn", "group": "columns", - "weight": 386, + "weight": 400, "cookies": false, "type": "", "demo": "tablesdb\/get-column.md", @@ -36743,7 +37732,7 @@ "x-appwrite": { "method": "deleteColumn", "group": "columns", - "weight": 387, + "weight": 401, "cookies": false, "type": "", "demo": "tablesdb\/delete-column.md", @@ -36822,7 +37811,7 @@ "x-appwrite": { "method": "updateRelationshipColumn", "group": "columns", - "weight": 410, + "weight": 424, "cookies": false, "type": "", "demo": "tablesdb\/update-relationship-column.md", @@ -36927,7 +37916,7 @@ "x-appwrite": { "method": "listIndexes", "group": "indexes", - "weight": 418, + "weight": 432, "cookies": false, "type": "", "demo": "tablesdb\/list-indexes.md", @@ -37009,7 +37998,7 @@ "x-appwrite": { "method": "createIndex", "group": "indexes", - "weight": 415, + "weight": 429, "cookies": false, "type": "", "demo": "tablesdb\/create-index.md", @@ -37140,7 +38129,7 @@ "x-appwrite": { "method": "getIndex", "group": "indexes", - "weight": 416, + "weight": 430, "cookies": false, "type": "", "demo": "tablesdb\/get-index.md", @@ -37212,7 +38201,7 @@ "x-appwrite": { "method": "deleteIndex", "group": "indexes", - "weight": 417, + "weight": 431, "cookies": false, "type": "", "demo": "tablesdb\/delete-index.md", @@ -37289,7 +38278,7 @@ "x-appwrite": { "method": "listTableLogs", "group": "tables", - "weight": 384, + "weight": 398, "cookies": false, "type": "", "demo": "tablesdb\/list-table-logs.md", @@ -37370,7 +38359,7 @@ "x-appwrite": { "method": "listRows", "group": "rows", - "weight": 427, + "weight": 441, "cookies": false, "type": "", "demo": "tablesdb\/list-rows.md", @@ -37454,7 +38443,7 @@ "x-appwrite": { "method": "createRow", "group": "rows", - "weight": 419, + "weight": 433, "cookies": false, "type": "", "demo": "tablesdb\/create-row.md", @@ -37622,7 +38611,7 @@ "x-appwrite": { "method": "upsertRows", "group": "rows", - "weight": 424, + "weight": 438, "cookies": false, "type": "", "demo": "tablesdb\/upsert-rows.md", @@ -37742,7 +38731,7 @@ "x-appwrite": { "method": "updateRows", "group": "rows", - "weight": 422, + "weight": 436, "cookies": false, "type": "", "demo": "tablesdb\/update-rows.md", @@ -37837,7 +38826,7 @@ "x-appwrite": { "method": "deleteRows", "group": "rows", - "weight": 426, + "weight": 440, "cookies": false, "type": "", "demo": "tablesdb\/delete-rows.md", @@ -37926,7 +38915,7 @@ "x-appwrite": { "method": "getRow", "group": "rows", - "weight": 420, + "weight": 434, "cookies": false, "type": "", "demo": "tablesdb\/get-row.md", @@ -38018,7 +39007,7 @@ "x-appwrite": { "method": "upsertRow", "group": "rows", - "weight": 423, + "weight": 437, "cookies": false, "type": "", "demo": "tablesdb\/upsert-row.md", @@ -38152,7 +39141,7 @@ "x-appwrite": { "method": "updateRow", "group": "rows", - "weight": 421, + "weight": 435, "cookies": false, "type": "", "demo": "tablesdb\/update-row.md", @@ -38251,7 +39240,7 @@ "x-appwrite": { "method": "deleteRow", "group": "rows", - "weight": 425, + "weight": 439, "cookies": false, "type": "", "demo": "tablesdb\/delete-row.md", @@ -38331,7 +39320,7 @@ "x-appwrite": { "method": "listRowLogs", "group": "logs", - "weight": 428, + "weight": 442, "cookies": false, "type": "", "demo": "tablesdb\/list-row-logs.md", @@ -38422,7 +39411,7 @@ "x-appwrite": { "method": "decrementRowColumn", "group": "rows", - "weight": 430, + "weight": 444, "cookies": false, "type": "", "demo": "tablesdb\/decrement-row-column.md", @@ -38533,7 +39522,7 @@ "x-appwrite": { "method": "incrementRowColumn", "group": "rows", - "weight": 429, + "weight": 443, "cookies": false, "type": "", "demo": "tablesdb\/increment-row-column.md", @@ -38642,7 +39631,7 @@ "x-appwrite": { "method": "getTableUsage", "group": null, - "weight": 385, + "weight": 399, "cookies": false, "type": "", "demo": "tablesdb\/get-table-usage.md", @@ -38731,7 +39720,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 377, + "weight": 391, "cookies": false, "type": "", "demo": "tablesdb\/get-usage.md", @@ -38837,7 +39826,7 @@ "x-appwrite": { "method": "list", "group": "teams", - "weight": 171, + "weight": 179, "cookies": false, "type": "", "demo": "teams\/list.md", @@ -38911,7 +39900,7 @@ "x-appwrite": { "method": "create", "group": "teams", - "weight": 170, + "weight": 178, "cookies": false, "type": "", "demo": "teams\/create.md", @@ -39000,7 +39989,7 @@ "x-appwrite": { "method": "get", "group": "teams", - "weight": 172, + "weight": 180, "cookies": false, "type": "", "demo": "teams\/get.md", @@ -39061,7 +40050,7 @@ "x-appwrite": { "method": "updateName", "group": "teams", - "weight": 174, + "weight": 182, "cookies": false, "type": "", "demo": "teams\/update-name.md", @@ -39135,7 +40124,7 @@ "x-appwrite": { "method": "delete", "group": "teams", - "weight": 176, + "weight": 184, "cookies": false, "type": "", "demo": "teams\/delete.md", @@ -39196,7 +40185,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 183, + "weight": 191, "cookies": false, "type": "", "demo": "teams\/list-logs.md", @@ -39266,7 +40255,7 @@ "x-appwrite": { "method": "listMemberships", "group": "memberships", - "weight": 178, + "weight": 186, "cookies": false, "type": "", "demo": "teams\/list-memberships.md", @@ -39348,7 +40337,7 @@ "x-appwrite": { "method": "createMembership", "group": "memberships", - "weight": 177, + "weight": 185, "cookies": false, "type": "", "demo": "teams\/create-membership.md", @@ -39460,7 +40449,7 @@ "x-appwrite": { "method": "getMembership", "group": "memberships", - "weight": 179, + "weight": 187, "cookies": false, "type": "", "demo": "teams\/get-membership.md", @@ -39529,7 +40518,7 @@ "x-appwrite": { "method": "updateMembership", "group": "memberships", - "weight": 180, + "weight": 188, "cookies": false, "type": "", "demo": "teams\/update-membership.md", @@ -39614,7 +40603,7 @@ "x-appwrite": { "method": "deleteMembership", "group": "memberships", - "weight": 182, + "weight": 190, "cookies": false, "type": "", "demo": "teams\/delete-membership.md", @@ -39685,7 +40674,7 @@ "x-appwrite": { "method": "updateMembershipStatus", "group": "memberships", - "weight": 181, + "weight": 189, "cookies": false, "type": "", "demo": "teams\/update-membership-status.md", @@ -39778,7 +40767,7 @@ "x-appwrite": { "method": "getPrefs", "group": "teams", - "weight": 173, + "weight": 181, "cookies": false, "type": "", "demo": "teams\/get-prefs.md", @@ -39838,7 +40827,7 @@ "x-appwrite": { "method": "updatePrefs", "group": "teams", - "weight": 175, + "weight": 183, "cookies": false, "type": "", "demo": "teams\/update-prefs.md", @@ -39916,7 +40905,7 @@ "x-appwrite": { "method": "list", "group": "files", - "weight": 507, + "weight": 521, "cookies": false, "type": "", "demo": "tokens\/list.md", @@ -39996,7 +40985,7 @@ "x-appwrite": { "method": "createFileToken", "group": "files", - "weight": 505, + "weight": 519, "cookies": false, "type": "", "demo": "tokens\/create-file-token.md", @@ -40080,7 +41069,7 @@ "x-appwrite": { "method": "get", "group": "tokens", - "weight": 506, + "weight": 520, "cookies": false, "type": "", "demo": "tokens\/get.md", @@ -40140,7 +41129,7 @@ "x-appwrite": { "method": "update", "group": "tokens", - "weight": 508, + "weight": 522, "cookies": false, "type": "", "demo": "tokens\/update.md", @@ -40211,7 +41200,7 @@ "x-appwrite": { "method": "delete", "group": "tokens", - "weight": 509, + "weight": 523, "cookies": false, "type": "", "demo": "tokens\/delete.md", @@ -40271,7 +41260,7 @@ "x-appwrite": { "method": "list", "group": "users", - "weight": 193, + "weight": 201, "cookies": false, "type": "", "demo": "users\/list.md", @@ -40343,7 +41332,7 @@ "x-appwrite": { "method": "create", "group": "users", - "weight": 184, + "weight": 192, "cookies": false, "type": "", "demo": "users\/create.md", @@ -40438,7 +41427,7 @@ "x-appwrite": { "method": "createArgon2User", "group": "users", - "weight": 187, + "weight": 195, "cookies": false, "type": "", "demo": "users\/create-argon-2-user.md", @@ -40529,7 +41518,7 @@ "x-appwrite": { "method": "createBcryptUser", "group": "users", - "weight": 185, + "weight": 193, "cookies": false, "type": "", "demo": "users\/create-bcrypt-user.md", @@ -40618,7 +41607,7 @@ "x-appwrite": { "method": "listIdentities", "group": "identities", - "weight": 201, + "weight": 210, "cookies": false, "type": "", "demo": "users\/list-identities.md", @@ -40687,7 +41676,7 @@ "x-appwrite": { "method": "deleteIdentity", "group": "identities", - "weight": 224, + "weight": 233, "cookies": false, "type": "", "demo": "users\/delete-identity.md", @@ -40748,7 +41737,7 @@ "x-appwrite": { "method": "createMD5User", "group": "users", - "weight": 186, + "weight": 194, "cookies": false, "type": "", "demo": "users\/create-md-5-user.md", @@ -40839,7 +41828,7 @@ "x-appwrite": { "method": "createPHPassUser", "group": "users", - "weight": 189, + "weight": 197, "cookies": false, "type": "", "demo": "users\/create-ph-pass-user.md", @@ -40930,7 +41919,7 @@ "x-appwrite": { "method": "createScryptUser", "group": "users", - "weight": 190, + "weight": 198, "cookies": false, "type": "", "demo": "users\/create-scrypt-user.md", @@ -41056,7 +42045,7 @@ "x-appwrite": { "method": "createScryptModifiedUser", "group": "users", - "weight": 191, + "weight": 199, "cookies": false, "type": "", "demo": "users\/create-scrypt-modified-user.md", @@ -41168,7 +42157,7 @@ "x-appwrite": { "method": "createSHAUser", "group": "users", - "weight": 188, + "weight": 196, "cookies": false, "type": "", "demo": "users\/create-sha-user.md", @@ -41278,7 +42267,7 @@ "x-appwrite": { "method": "getUsage", "group": null, - "weight": 226, + "weight": 235, "cookies": false, "type": "", "demo": "users\/get-usage.md", @@ -41348,7 +42337,7 @@ "x-appwrite": { "method": "get", "group": "users", - "weight": 194, + "weight": 202, "cookies": false, "type": "", "demo": "users\/get.md", @@ -41402,7 +42391,7 @@ "x-appwrite": { "method": "delete", "group": "users", - "weight": 222, + "weight": 231, "cookies": false, "type": "", "demo": "users\/delete.md", @@ -41463,7 +42452,7 @@ "x-appwrite": { "method": "updateEmail", "group": "users", - "weight": 207, + "weight": 216, "cookies": false, "type": "", "demo": "users\/update-email.md", @@ -41542,7 +42531,7 @@ "x-appwrite": { "method": "createJWT", "group": "sessions", - "weight": 225, + "weight": 234, "cookies": false, "type": "", "demo": "users\/create-jwt.md", @@ -41624,7 +42613,7 @@ "x-appwrite": { "method": "updateLabels", "group": "users", - "weight": 203, + "weight": 212, "cookies": false, "type": "", "demo": "users\/update-labels.md", @@ -41704,7 +42693,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 199, + "weight": 208, "cookies": false, "type": "", "demo": "users\/list-logs.md", @@ -41775,7 +42764,7 @@ "x-appwrite": { "method": "listMemberships", "group": "memberships", - "weight": 198, + "weight": 207, "cookies": false, "type": "", "demo": "users\/list-memberships.md", @@ -41857,7 +42846,7 @@ "x-appwrite": { "method": "updateMfa", "group": "users", - "weight": 212, + "weight": 221, "cookies": false, "type": "", "demo": "users\/update-mfa.md", @@ -41989,7 +42978,7 @@ "x-appwrite": { "method": "deleteMfaAuthenticator", "group": "mfa", - "weight": 217, + "weight": 226, "cookies": false, "type": "", "demo": "users\/delete-mfa-authenticator.md", @@ -42117,7 +43106,7 @@ "x-appwrite": { "method": "listMfaFactors", "group": "mfa", - "weight": 213, + "weight": 222, "cookies": false, "type": "", "demo": "users\/list-mfa-factors.md", @@ -42230,7 +43219,7 @@ "x-appwrite": { "method": "getMfaRecoveryCodes", "group": "mfa", - "weight": 214, + "weight": 223, "cookies": false, "type": "", "demo": "users\/get-mfa-recovery-codes.md", @@ -42343,7 +43332,7 @@ "x-appwrite": { "method": "updateMfaRecoveryCodes", "group": "mfa", - "weight": 216, + "weight": 225, "cookies": false, "type": "", "demo": "users\/update-mfa-recovery-codes.md", @@ -42456,7 +43445,7 @@ "x-appwrite": { "method": "createMfaRecoveryCodes", "group": "mfa", - "weight": 215, + "weight": 224, "cookies": false, "type": "", "demo": "users\/create-mfa-recovery-codes.md", @@ -42571,7 +43560,7 @@ "x-appwrite": { "method": "updateName", "group": "users", - "weight": 205, + "weight": 214, "cookies": false, "type": "", "demo": "users\/update-name.md", @@ -42650,7 +43639,7 @@ "x-appwrite": { "method": "updatePassword", "group": "users", - "weight": 206, + "weight": 215, "cookies": false, "type": "", "demo": "users\/update-password.md", @@ -42729,7 +43718,7 @@ "x-appwrite": { "method": "updatePhone", "group": "users", - "weight": 208, + "weight": 217, "cookies": false, "type": "", "demo": "users\/update-phone.md", @@ -42782,6 +43771,91 @@ ] } }, + "\/users\/{userId}\/plan": { + "post": { + "summary": "Assign plan to user (admin)", + "operationId": "usersAssignPlan", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": false, + "responses": { + "200": { + "description": "User", + "schema": { + "$ref": "#\/definitions\/user" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "assignPlan", + "group": "users", + "weight": 203, + "cookies": false, + "type": "", + "demo": "users\/assign-plan.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/assign-plan.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "planId": { + "type": "string", + "description": "Plan ID to assign.", + "default": null, + "x-example": "" + }, + "complimentary": { + "type": "boolean", + "description": "If true, create a complimentary Stripe subscription for one billing interval.", + "default": true, + "x-example": false + } + }, + "required": [ + "planId" + ] + } + } + ] + } + }, "\/users\/{userId}\/prefs": { "get": { "summary": "Get user preferences", @@ -42806,7 +43880,7 @@ "x-appwrite": { "method": "getPrefs", "group": "users", - "weight": 195, + "weight": 204, "cookies": false, "type": "", "demo": "users\/get-prefs.md", @@ -42865,7 +43939,7 @@ "x-appwrite": { "method": "updatePrefs", "group": "users", - "weight": 210, + "weight": 219, "cookies": false, "type": "", "demo": "users\/update-prefs.md", @@ -42942,7 +44016,7 @@ "x-appwrite": { "method": "listSessions", "group": "sessions", - "weight": 197, + "weight": 206, "cookies": false, "type": "", "demo": "users\/list-sessions.md", @@ -43001,7 +44075,7 @@ "x-appwrite": { "method": "createSession", "group": "sessions", - "weight": 218, + "weight": 227, "cookies": false, "type": "", "demo": "users\/create-session.md", @@ -43055,7 +44129,7 @@ "x-appwrite": { "method": "deleteSessions", "group": "sessions", - "weight": 221, + "weight": 230, "cookies": false, "type": "", "demo": "users\/delete-sessions.md", @@ -43111,7 +44185,7 @@ "x-appwrite": { "method": "deleteSession", "group": "sessions", - "weight": 220, + "weight": 229, "cookies": false, "type": "", "demo": "users\/delete-session.md", @@ -43180,7 +44254,7 @@ "x-appwrite": { "method": "updateStatus", "group": "users", - "weight": 202, + "weight": 211, "cookies": false, "type": "", "demo": "users\/update-status.md", @@ -43257,7 +44331,7 @@ "x-appwrite": { "method": "listTargets", "group": "targets", - "weight": 200, + "weight": 209, "cookies": false, "type": "", "demo": "users\/list-targets.md", @@ -43329,7 +44403,7 @@ "x-appwrite": { "method": "createTarget", "group": "targets", - "weight": 192, + "weight": 200, "cookies": false, "type": "", "demo": "users\/create-target.md", @@ -43440,7 +44514,7 @@ "x-appwrite": { "method": "getTarget", "group": "targets", - "weight": 196, + "weight": 205, "cookies": false, "type": "", "demo": "users\/get-target.md", @@ -43508,7 +44582,7 @@ "x-appwrite": { "method": "updateTarget", "group": "targets", - "weight": 211, + "weight": 220, "cookies": false, "type": "", "demo": "users\/update-target.md", @@ -43598,7 +44672,7 @@ "x-appwrite": { "method": "deleteTarget", "group": "targets", - "weight": 223, + "weight": 232, "cookies": false, "type": "", "demo": "users\/delete-target.md", @@ -43668,7 +44742,7 @@ "x-appwrite": { "method": "createToken", "group": "sessions", - "weight": 219, + "weight": 228, "cookies": false, "type": "", "demo": "users\/create-token.md", @@ -43750,7 +44824,7 @@ "x-appwrite": { "method": "updateEmailVerification", "group": "users", - "weight": 209, + "weight": 218, "cookies": false, "type": "", "demo": "users\/update-email-verification.md", @@ -43829,7 +44903,7 @@ "x-appwrite": { "method": "updatePhoneVerification", "group": "users", - "weight": 204, + "weight": 213, "cookies": false, "type": "", "demo": "users\/update-phone-verification.md", @@ -43908,7 +44982,7 @@ "x-appwrite": { "method": "createRepositoryDetection", "group": "repositories", - "weight": 230, + "weight": 239, "cookies": false, "type": "", "demo": "vcs\/create-repository-detection.md", @@ -44003,7 +45077,7 @@ "x-appwrite": { "method": "listRepositories", "group": "repositories", - "weight": 231, + "weight": 240, "cookies": false, "type": "", "demo": "vcs\/list-repositories.md", @@ -44084,7 +45158,7 @@ "x-appwrite": { "method": "createRepository", "group": "repositories", - "weight": 232, + "weight": 241, "cookies": false, "type": "", "demo": "vcs\/create-repository.md", @@ -44167,7 +45241,7 @@ "x-appwrite": { "method": "getRepository", "group": "repositories", - "weight": 233, + "weight": 242, "cookies": false, "type": "", "demo": "vcs\/get-repository.md", @@ -44233,7 +45307,7 @@ "x-appwrite": { "method": "listRepositoryBranches", "group": "repositories", - "weight": 234, + "weight": 243, "cookies": false, "type": "", "demo": "vcs\/list-repository-branches.md", @@ -44299,7 +45373,7 @@ "x-appwrite": { "method": "getRepositoryContents", "group": "repositories", - "weight": 229, + "weight": 238, "cookies": false, "type": "", "demo": "vcs\/get-repository-contents.md", @@ -44382,7 +45456,7 @@ "x-appwrite": { "method": "updateExternalDeployments", "group": "repositories", - "weight": 239, + "weight": 248, "cookies": false, "type": "", "demo": "vcs\/update-external-deployments.md", @@ -44466,7 +45540,7 @@ "x-appwrite": { "method": "listInstallations", "group": "installations", - "weight": 236, + "weight": 245, "cookies": false, "type": "", "demo": "vcs\/list-installations.md", @@ -44537,7 +45611,7 @@ "x-appwrite": { "method": "getInstallation", "group": "installations", - "weight": 237, + "weight": 246, "cookies": false, "type": "", "demo": "vcs\/get-installation.md", @@ -44590,7 +45664,7 @@ "x-appwrite": { "method": "deleteInstallation", "group": "installations", - "weight": 238, + "weight": 247, "cookies": false, "type": "", "demo": "vcs\/delete-installation.md", @@ -49604,6 +50678,19 @@ }, "x-example": [] }, + "plan": { + "type": "object", + "additionalProperties": true, + "description": "User subscription plan details.", + "x-example": { + "id": "basic", + "name": "Basic", + "price": 999, + "currency": "usd", + "interval": "month", + "isFree": false + } + }, "accessedAt": { "type": "string", "description": "Most recent access date in ISO 8601 format. This attribute is only updated again after 24 hours.", @@ -49652,6 +50739,14 @@ "timezone": "UTC" }, "targets": [], + "plan": { + "id": "basic", + "name": "Basic", + "price": 999, + "currency": "usd", + "interval": "month", + "isFree": false + }, "accessedAt": "2020-10-15T06:38:00.000+00:00" } }, @@ -52903,6 +53998,11 @@ "description": "GraphQL service status", "x-example": true }, + "serviceStatusForAuthPlans": { + "type": "boolean", + "description": "Auth Plans service status", + "x-example": true + }, "serviceStatusForMessaging": { "type": "boolean", "description": "Messaging service status", @@ -52971,6 +54071,7 @@ "serviceStatusForSites", "serviceStatusForFunctions", "serviceStatusForGraphql", + "serviceStatusForAuthPlans", "serviceStatusForMessaging" ], "example": { @@ -53039,6 +54140,7 @@ "serviceStatusForSites": true, "serviceStatusForFunctions": true, "serviceStatusForGraphql": true, + "serviceStatusForAuthPlans": true, "serviceStatusForMessaging": true } }, diff --git a/app/config/specs/swagger2-latest-server.json b/app/config/specs/swagger2-latest-server.json index 0a5fc8fe95..c188910e18 100644 --- a/app/config/specs/swagger2-latest-server.json +++ b/app/config/specs/swagger2-latest-server.json @@ -2909,6 +2909,361 @@ ] } }, + "\/account\/subscription": { + "get": { + "summary": "Get account subscription", + "operationId": "accountGetSubscription", + "consumes": [], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": false, + "responses": { + "200": { + "description": "Any", + "schema": { + "$ref": "#\/definitions\/any" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "getSubscription", + "group": "subscription", + "weight": 60, + "cookies": false, + "type": "", + "demo": "account\/get-subscription.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/get-subscription.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ] + }, + "put": { + "summary": "Update subscription", + "operationId": "accountUpdateSubscription", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": false, + "responses": { + "200": { + "description": "Any", + "schema": { + "$ref": "#\/definitions\/any" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "updateSubscription", + "group": "subscription", + "weight": 63, + "cookies": false, + "type": "", + "demo": "account\/update-subscription.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/update-subscription.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "planId": { + "type": "string", + "description": "New plan ID.", + "default": null, + "x-example": "" + } + }, + "required": [ + "planId" + ] + } + } + ] + }, + "delete": { + "summary": "Cancel subscription", + "operationId": "accountCancelSubscription", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": false, + "responses": { + "200": { + "description": "Any", + "schema": { + "$ref": "#\/definitions\/any" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "cancelSubscription", + "group": "subscription", + "weight": 64, + "cookies": false, + "type": "", + "demo": "account\/cancel-subscription.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/cancel-subscription.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "atPeriodEnd": { + "type": "boolean", + "description": "Cancel at period end.", + "default": true, + "x-example": false + } + } + } + } + ] + } + }, + "\/account\/subscription\/checkout": { + "post": { + "summary": "Create checkout session", + "operationId": "accountCreateSubscriptionCheckout", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": false, + "responses": { + "200": { + "description": "Any", + "schema": { + "$ref": "#\/definitions\/any" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createSubscriptionCheckout", + "group": "subscription", + "weight": 61, + "cookies": false, + "type": "", + "demo": "account\/create-subscription-checkout.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-checkout.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "planId": { + "type": "string", + "description": "Plan ID to subscribe to.", + "default": null, + "x-example": "" + }, + "successUrl": { + "type": "string", + "description": "URL to redirect on success.", + "default": null, + "x-example": "https:\/\/example.com" + }, + "cancelUrl": { + "type": "string", + "description": "URL to redirect on cancel.", + "default": null, + "x-example": "https:\/\/example.com" + } + }, + "required": [ + "planId", + "successUrl", + "cancelUrl" + ] + } + } + ] + } + }, + "\/account\/subscription\/portal": { + "post": { + "summary": "Create customer portal session", + "operationId": "accountCreateSubscriptionPortal", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "account" + ], + "description": false, + "responses": { + "200": { + "description": "Any", + "schema": { + "$ref": "#\/definitions\/any" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "createSubscriptionPortal", + "group": "subscription", + "weight": 62, + "cookies": false, + "type": "", + "demo": "account\/create-subscription-portal.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/account\/create-portal.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "account", + "platforms": [ + "client", + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Session": [] + } + }, + "security": [ + { + "Project": [], + "Session": [], + "JWT": [] + } + ], + "parameters": [ + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "returnUrl": { + "type": "string", + "description": "URL to return to.", + "default": null, + "x-example": "https:\/\/example.com" + } + }, + "required": [ + "returnUrl" + ] + } + } + ] + } + }, "\/account\/tokens\/email": { "post": { "summary": "Create email token (OTP)", @@ -3615,7 +3970,7 @@ "x-appwrite": { "method": "getBrowser", "group": null, - "weight": 61, + "weight": 66, "cookies": false, "type": "location", "demo": "avatars\/get-browser.md", @@ -3741,7 +4096,7 @@ "x-appwrite": { "method": "getCreditCard", "group": null, - "weight": 60, + "weight": 65, "cookies": false, "type": "location", "demo": "avatars\/get-credit-card.md", @@ -3873,7 +4228,7 @@ "x-appwrite": { "method": "getFavicon", "group": null, - "weight": 64, + "weight": 69, "cookies": false, "type": "location", "demo": "avatars\/get-favicon.md", @@ -3937,7 +4292,7 @@ "x-appwrite": { "method": "getFlag", "group": null, - "weight": 62, + "weight": 67, "cookies": false, "type": "location", "demo": "avatars\/get-flag.md", @@ -4425,7 +4780,7 @@ "x-appwrite": { "method": "getImage", "group": null, - "weight": 63, + "weight": 68, "cookies": false, "type": "location", "demo": "avatars\/get-image.md", @@ -4509,7 +4864,7 @@ "x-appwrite": { "method": "getInitials", "group": null, - "weight": 66, + "weight": 71, "cookies": false, "type": "location", "demo": "avatars\/get-initials.md", @@ -4601,7 +4956,7 @@ "x-appwrite": { "method": "getQR", "group": null, - "weight": 65, + "weight": 70, "cookies": false, "type": "location", "demo": "avatars\/get-qr.md", @@ -4693,7 +5048,7 @@ "x-appwrite": { "method": "list", "group": "databases", - "weight": 316, + "weight": 330, "cookies": false, "type": "", "demo": "databases\/list.md", @@ -4798,7 +5153,7 @@ "x-appwrite": { "method": "create", "group": "databases", - "weight": 312, + "weight": 326, "cookies": false, "type": "", "demo": "databases\/create.md", @@ -4917,7 +5272,7 @@ "x-appwrite": { "method": "get", "group": "databases", - "weight": 313, + "weight": 327, "cookies": false, "type": "", "demo": "databases\/get.md", @@ -5010,7 +5365,7 @@ "x-appwrite": { "method": "update", "group": "databases", - "weight": 314, + "weight": 328, "cookies": false, "type": "", "demo": "databases\/update.md", @@ -5125,7 +5480,7 @@ "x-appwrite": { "method": "delete", "group": "databases", - "weight": 315, + "weight": 329, "cookies": false, "type": "", "demo": "databases\/delete.md", @@ -5217,7 +5572,7 @@ "x-appwrite": { "method": "listCollections", "group": "collections", - "weight": 324, + "weight": 338, "cookies": false, "type": "", "demo": "databases\/list-collections.md", @@ -5302,7 +5657,7 @@ "x-appwrite": { "method": "createCollection", "group": "collections", - "weight": 320, + "weight": 334, "cookies": false, "type": "", "demo": "databases\/create-collection.md", @@ -5412,7 +5767,7 @@ "x-appwrite": { "method": "getCollection", "group": "collections", - "weight": 321, + "weight": 335, "cookies": false, "type": "", "demo": "databases\/get-collection.md", @@ -5484,7 +5839,7 @@ "x-appwrite": { "method": "updateCollection", "group": "collections", - "weight": 322, + "weight": 336, "cookies": false, "type": "", "demo": "databases\/update-collection.md", @@ -5590,7 +5945,7 @@ "x-appwrite": { "method": "deleteCollection", "group": "collections", - "weight": 323, + "weight": 337, "cookies": false, "type": "", "demo": "databases\/delete-collection.md", @@ -5662,7 +6017,7 @@ "x-appwrite": { "method": "listAttributes", "group": "attributes", - "weight": 341, + "weight": 355, "cookies": false, "type": "", "demo": "databases\/list-attributes.md", @@ -5748,7 +6103,7 @@ "x-appwrite": { "method": "createBooleanAttribute", "group": "attributes", - "weight": 342, + "weight": 356, "cookies": false, "type": "", "demo": "databases\/create-boolean-attribute.md", @@ -5859,7 +6214,7 @@ "x-appwrite": { "method": "updateBooleanAttribute", "group": "attributes", - "weight": 343, + "weight": 357, "cookies": false, "type": "", "demo": "databases\/update-boolean-attribute.md", @@ -5972,7 +6327,7 @@ "x-appwrite": { "method": "createDatetimeAttribute", "group": "attributes", - "weight": 344, + "weight": 358, "cookies": false, "type": "", "demo": "databases\/create-datetime-attribute.md", @@ -6083,7 +6438,7 @@ "x-appwrite": { "method": "updateDatetimeAttribute", "group": "attributes", - "weight": 345, + "weight": 359, "cookies": false, "type": "", "demo": "databases\/update-datetime-attribute.md", @@ -6196,7 +6551,7 @@ "x-appwrite": { "method": "createEmailAttribute", "group": "attributes", - "weight": 346, + "weight": 360, "cookies": false, "type": "", "demo": "databases\/create-email-attribute.md", @@ -6307,7 +6662,7 @@ "x-appwrite": { "method": "updateEmailAttribute", "group": "attributes", - "weight": 347, + "weight": 361, "cookies": false, "type": "", "demo": "databases\/update-email-attribute.md", @@ -6420,7 +6775,7 @@ "x-appwrite": { "method": "createEnumAttribute", "group": "attributes", - "weight": 348, + "weight": 362, "cookies": false, "type": "", "demo": "databases\/create-enum-attribute.md", @@ -6541,7 +6896,7 @@ "x-appwrite": { "method": "updateEnumAttribute", "group": "attributes", - "weight": 349, + "weight": 363, "cookies": false, "type": "", "demo": "databases\/update-enum-attribute.md", @@ -6664,7 +7019,7 @@ "x-appwrite": { "method": "createFloatAttribute", "group": "attributes", - "weight": 350, + "weight": 364, "cookies": false, "type": "", "demo": "databases\/create-float-attribute.md", @@ -6787,7 +7142,7 @@ "x-appwrite": { "method": "updateFloatAttribute", "group": "attributes", - "weight": 351, + "weight": 365, "cookies": false, "type": "", "demo": "databases\/update-float-attribute.md", @@ -6912,7 +7267,7 @@ "x-appwrite": { "method": "createIntegerAttribute", "group": "attributes", - "weight": 352, + "weight": 366, "cookies": false, "type": "", "demo": "databases\/create-integer-attribute.md", @@ -7035,7 +7390,7 @@ "x-appwrite": { "method": "updateIntegerAttribute", "group": "attributes", - "weight": 353, + "weight": 367, "cookies": false, "type": "", "demo": "databases\/update-integer-attribute.md", @@ -7160,7 +7515,7 @@ "x-appwrite": { "method": "createIpAttribute", "group": "attributes", - "weight": 354, + "weight": 368, "cookies": false, "type": "", "demo": "databases\/create-ip-attribute.md", @@ -7271,7 +7626,7 @@ "x-appwrite": { "method": "updateIpAttribute", "group": "attributes", - "weight": 355, + "weight": 369, "cookies": false, "type": "", "demo": "databases\/update-ip-attribute.md", @@ -7384,7 +7739,7 @@ "x-appwrite": { "method": "createLineAttribute", "group": "attributes", - "weight": 356, + "weight": 370, "cookies": false, "type": "", "demo": "databases\/create-line-attribute.md", @@ -7490,7 +7845,7 @@ "x-appwrite": { "method": "updateLineAttribute", "group": "attributes", - "weight": 357, + "weight": 371, "cookies": false, "type": "", "demo": "databases\/update-line-attribute.md", @@ -7602,7 +7957,7 @@ "x-appwrite": { "method": "createPointAttribute", "group": "attributes", - "weight": 358, + "weight": 372, "cookies": false, "type": "", "demo": "databases\/create-point-attribute.md", @@ -7708,7 +8063,7 @@ "x-appwrite": { "method": "updatePointAttribute", "group": "attributes", - "weight": 359, + "weight": 373, "cookies": false, "type": "", "demo": "databases\/update-point-attribute.md", @@ -7820,7 +8175,7 @@ "x-appwrite": { "method": "createPolygonAttribute", "group": "attributes", - "weight": 360, + "weight": 374, "cookies": false, "type": "", "demo": "databases\/create-polygon-attribute.md", @@ -7926,7 +8281,7 @@ "x-appwrite": { "method": "updatePolygonAttribute", "group": "attributes", - "weight": 361, + "weight": 375, "cookies": false, "type": "", "demo": "databases\/update-polygon-attribute.md", @@ -8038,7 +8393,7 @@ "x-appwrite": { "method": "createRelationshipAttribute", "group": "attributes", - "weight": 362, + "weight": 376, "cookies": false, "type": "", "demo": "databases\/create-relationship-attribute.md", @@ -8176,7 +8531,7 @@ "x-appwrite": { "method": "createStringAttribute", "group": "attributes", - "weight": 364, + "weight": 378, "cookies": false, "type": "", "demo": "databases\/create-string-attribute.md", @@ -8300,7 +8655,7 @@ "x-appwrite": { "method": "updateStringAttribute", "group": "attributes", - "weight": 365, + "weight": 379, "cookies": false, "type": "", "demo": "databases\/update-string-attribute.md", @@ -8419,7 +8774,7 @@ "x-appwrite": { "method": "createUrlAttribute", "group": "attributes", - "weight": 366, + "weight": 380, "cookies": false, "type": "", "demo": "databases\/create-url-attribute.md", @@ -8530,7 +8885,7 @@ "x-appwrite": { "method": "updateUrlAttribute", "group": "attributes", - "weight": 367, + "weight": 381, "cookies": false, "type": "", "demo": "databases\/update-url-attribute.md", @@ -8672,7 +9027,7 @@ "x-appwrite": { "method": "getAttribute", "group": "attributes", - "weight": 339, + "weight": 353, "cookies": false, "type": "", "demo": "databases\/get-attribute.md", @@ -8746,7 +9101,7 @@ "x-appwrite": { "method": "deleteAttribute", "group": "attributes", - "weight": 340, + "weight": 354, "cookies": false, "type": "", "demo": "databases\/delete-attribute.md", @@ -8827,7 +9182,7 @@ "x-appwrite": { "method": "updateRelationshipAttribute", "group": "attributes", - "weight": 363, + "weight": 377, "cookies": false, "type": "", "demo": "databases\/update-relationship-attribute.md", @@ -8934,7 +9289,7 @@ "x-appwrite": { "method": "listDocuments", "group": "documents", - "weight": 335, + "weight": 349, "cookies": false, "type": "", "demo": "databases\/list-documents.md", @@ -9021,7 +9376,7 @@ "x-appwrite": { "method": "createDocument", "group": "documents", - "weight": 327, + "weight": 341, "cookies": false, "type": "", "demo": "databases\/create-document.md", @@ -9202,7 +9557,7 @@ "x-appwrite": { "method": "upsertDocuments", "group": "documents", - "weight": 332, + "weight": 346, "cookies": false, "type": "", "demo": "databases\/upsert-documents.md", @@ -9329,7 +9684,7 @@ "x-appwrite": { "method": "updateDocuments", "group": "documents", - "weight": 330, + "weight": 344, "cookies": false, "type": "", "demo": "databases\/update-documents.md", @@ -9426,7 +9781,7 @@ "x-appwrite": { "method": "deleteDocuments", "group": "documents", - "weight": 334, + "weight": 348, "cookies": false, "type": "", "demo": "databases\/delete-documents.md", @@ -9517,7 +9872,7 @@ "x-appwrite": { "method": "getDocument", "group": "documents", - "weight": 328, + "weight": 342, "cookies": false, "type": "", "demo": "databases\/get-document.md", @@ -9612,7 +9967,7 @@ "x-appwrite": { "method": "upsertDocument", "group": "documents", - "weight": 331, + "weight": 345, "cookies": false, "type": "", "demo": "databases\/upsert-document.md", @@ -9758,7 +10113,7 @@ "x-appwrite": { "method": "updateDocument", "group": "documents", - "weight": 329, + "weight": 343, "cookies": false, "type": "", "demo": "databases\/update-document.md", @@ -9860,7 +10215,7 @@ "x-appwrite": { "method": "deleteDocument", "group": "documents", - "weight": 333, + "weight": 347, "cookies": false, "type": "", "demo": "databases\/delete-document.md", @@ -9945,7 +10300,7 @@ "x-appwrite": { "method": "decrementDocumentAttribute", "group": "documents", - "weight": 338, + "weight": 352, "cookies": false, "type": "", "demo": "databases\/decrement-document-attribute.md", @@ -10059,7 +10414,7 @@ "x-appwrite": { "method": "incrementDocumentAttribute", "group": "documents", - "weight": 337, + "weight": 351, "cookies": false, "type": "", "demo": "databases\/increment-document-attribute.md", @@ -10171,7 +10526,7 @@ "x-appwrite": { "method": "listIndexes", "group": "indexes", - "weight": 371, + "weight": 385, "cookies": false, "type": "", "demo": "databases\/list-indexes.md", @@ -10255,7 +10610,7 @@ "x-appwrite": { "method": "createIndex", "group": "indexes", - "weight": 368, + "weight": 382, "cookies": false, "type": "", "demo": "databases\/create-index.md", @@ -10388,7 +10743,7 @@ "x-appwrite": { "method": "getIndex", "group": "indexes", - "weight": 369, + "weight": 383, "cookies": false, "type": "", "demo": "databases\/get-index.md", @@ -10462,7 +10817,7 @@ "x-appwrite": { "method": "deleteIndex", "group": "indexes", - "weight": 370, + "weight": 384, "cookies": false, "type": "", "demo": "databases\/delete-index.md", @@ -10541,7 +10896,7 @@ "x-appwrite": { "method": "list", "group": "functions", - "weight": 440, + "weight": 454, "cookies": false, "type": "", "demo": "functions\/list.md", @@ -10614,7 +10969,7 @@ "x-appwrite": { "method": "create", "group": "functions", - "weight": 437, + "weight": 451, "cookies": false, "type": "", "demo": "functions\/create.md", @@ -10866,7 +11221,7 @@ "x-appwrite": { "method": "listRuntimes", "group": "runtimes", - "weight": 442, + "weight": 456, "cookies": false, "type": "", "demo": "functions\/list-runtimes.md", @@ -10916,7 +11271,7 @@ "x-appwrite": { "method": "listSpecifications", "group": "runtimes", - "weight": 443, + "weight": 457, "cookies": false, "type": "", "demo": "functions\/list-specifications.md", @@ -10967,7 +11322,7 @@ "x-appwrite": { "method": "get", "group": "functions", - "weight": 438, + "weight": 452, "cookies": false, "type": "", "demo": "functions\/get.md", @@ -11027,7 +11382,7 @@ "x-appwrite": { "method": "update", "group": "functions", - "weight": 439, + "weight": 453, "cookies": false, "type": "", "demo": "functions\/update.md", @@ -11275,7 +11630,7 @@ "x-appwrite": { "method": "delete", "group": "functions", - "weight": 441, + "weight": 455, "cookies": false, "type": "", "demo": "functions\/delete.md", @@ -11337,7 +11692,7 @@ "x-appwrite": { "method": "updateFunctionDeployment", "group": "functions", - "weight": 446, + "weight": 460, "cookies": false, "type": "", "demo": "functions\/update-function-deployment.md", @@ -11415,7 +11770,7 @@ "x-appwrite": { "method": "listDeployments", "group": "deployments", - "weight": 447, + "weight": 461, "cookies": false, "type": "", "demo": "functions\/list-deployments.md", @@ -11496,7 +11851,7 @@ "x-appwrite": { "method": "createDeployment", "group": "deployments", - "weight": 444, + "weight": 458, "cookies": false, "type": "upload", "demo": "functions\/create-deployment.md", @@ -11589,7 +11944,7 @@ "x-appwrite": { "method": "createDuplicateDeployment", "group": "deployments", - "weight": 452, + "weight": 466, "cookies": false, "type": "", "demo": "functions\/create-duplicate-deployment.md", @@ -11675,7 +12030,7 @@ "x-appwrite": { "method": "createTemplateDeployment", "group": "deployments", - "weight": 449, + "weight": 463, "cookies": false, "type": "", "demo": "functions\/create-template-deployment.md", @@ -11782,7 +12137,7 @@ "x-appwrite": { "method": "createVcsDeployment", "group": "deployments", - "weight": 450, + "weight": 464, "cookies": false, "type": "", "demo": "functions\/create-vcs-deployment.md", @@ -11879,7 +12234,7 @@ "x-appwrite": { "method": "getDeployment", "group": "deployments", - "weight": 445, + "weight": 459, "cookies": false, "type": "", "demo": "functions\/get-deployment.md", @@ -11942,7 +12297,7 @@ "x-appwrite": { "method": "deleteDeployment", "group": "deployments", - "weight": 448, + "weight": 462, "cookies": false, "type": "", "demo": "functions\/delete-deployment.md", @@ -12010,7 +12365,7 @@ "x-appwrite": { "method": "getDeploymentDownload", "group": "deployments", - "weight": 451, + "weight": 465, "cookies": false, "type": "location", "demo": "functions\/get-deployment-download.md", @@ -12096,7 +12451,7 @@ "x-appwrite": { "method": "updateDeploymentStatus", "group": "deployments", - "weight": 453, + "weight": 467, "cookies": false, "type": "", "demo": "functions\/update-deployment-status.md", @@ -12164,7 +12519,7 @@ "x-appwrite": { "method": "listExecutions", "group": "executions", - "weight": 456, + "weight": 470, "cookies": false, "type": "", "demo": "functions\/list-executions.md", @@ -12239,7 +12594,7 @@ "x-appwrite": { "method": "createExecution", "group": "executions", - "weight": 454, + "weight": 468, "cookies": false, "type": "", "demo": "functions\/create-execution.md", @@ -12358,7 +12713,7 @@ "x-appwrite": { "method": "getExecution", "group": "executions", - "weight": 455, + "weight": 469, "cookies": false, "type": "", "demo": "functions\/get-execution.md", @@ -12424,7 +12779,7 @@ "x-appwrite": { "method": "deleteExecution", "group": "executions", - "weight": 457, + "weight": 471, "cookies": false, "type": "", "demo": "functions\/delete-execution.md", @@ -12492,7 +12847,7 @@ "x-appwrite": { "method": "listVariables", "group": "variables", - "weight": 462, + "weight": 476, "cookies": false, "type": "", "demo": "functions\/list-variables.md", @@ -12552,7 +12907,7 @@ "x-appwrite": { "method": "createVariable", "group": "variables", - "weight": 460, + "weight": 474, "cookies": false, "type": "", "demo": "functions\/create-variable.md", @@ -12643,7 +12998,7 @@ "x-appwrite": { "method": "getVariable", "group": "variables", - "weight": 461, + "weight": 475, "cookies": false, "type": "", "demo": "functions\/get-variable.md", @@ -12711,7 +13066,7 @@ "x-appwrite": { "method": "updateVariable", "group": "variables", - "weight": 463, + "weight": 477, "cookies": false, "type": "", "demo": "functions\/update-variable.md", @@ -12804,7 +13159,7 @@ "x-appwrite": { "method": "deleteVariable", "group": "variables", - "weight": 464, + "weight": 478, "cookies": false, "type": "", "demo": "functions\/delete-variable.md", @@ -12874,7 +13229,7 @@ "x-appwrite": { "method": "query", "group": "graphql", - "weight": 250, + "weight": 259, "cookies": false, "type": "graphql", "demo": "graphql\/query.md", @@ -12949,7 +13304,7 @@ "x-appwrite": { "method": "mutation", "group": "graphql", - "weight": 249, + "weight": 258, "cookies": false, "type": "graphql", "demo": "graphql\/mutation.md", @@ -13022,7 +13377,7 @@ "x-appwrite": { "method": "get", "group": "health", - "weight": 78, + "weight": 83, "cookies": false, "type": "", "demo": "health\/get.md", @@ -13072,7 +13427,7 @@ "x-appwrite": { "method": "getAntivirus", "group": "health", - "weight": 99, + "weight": 104, "cookies": false, "type": "", "demo": "health\/get-antivirus.md", @@ -13122,7 +13477,7 @@ "x-appwrite": { "method": "getCache", "group": "health", - "weight": 81, + "weight": 86, "cookies": false, "type": "", "demo": "health\/get-cache.md", @@ -13172,7 +13527,7 @@ "x-appwrite": { "method": "getCertificate", "group": "health", - "weight": 86, + "weight": 91, "cookies": false, "type": "", "demo": "health\/get-certificate.md", @@ -13231,7 +13586,7 @@ "x-appwrite": { "method": "getDB", "group": "health", - "weight": 80, + "weight": 85, "cookies": false, "type": "", "demo": "health\/get-db.md", @@ -13281,7 +13636,7 @@ "x-appwrite": { "method": "getPubSub", "group": "health", - "weight": 82, + "weight": 87, "cookies": false, "type": "", "demo": "health\/get-pub-sub.md", @@ -13331,7 +13686,7 @@ "x-appwrite": { "method": "getQueueBuilds", "group": "queue", - "weight": 88, + "weight": 93, "cookies": false, "type": "", "demo": "health\/get-queue-builds.md", @@ -13392,7 +13747,7 @@ "x-appwrite": { "method": "getQueueCertificates", "group": "queue", - "weight": 87, + "weight": 92, "cookies": false, "type": "", "demo": "health\/get-queue-certificates.md", @@ -13453,7 +13808,7 @@ "x-appwrite": { "method": "getQueueDatabases", "group": "queue", - "weight": 89, + "weight": 94, "cookies": false, "type": "", "demo": "health\/get-queue-databases.md", @@ -13523,7 +13878,7 @@ "x-appwrite": { "method": "getQueueDeletes", "group": "queue", - "weight": 90, + "weight": 95, "cookies": false, "type": "", "demo": "health\/get-queue-deletes.md", @@ -13584,7 +13939,7 @@ "x-appwrite": { "method": "getFailedJobs", "group": "queue", - "weight": 100, + "weight": 105, "cookies": false, "type": "", "demo": "health\/get-failed-jobs.md", @@ -13669,7 +14024,7 @@ "x-appwrite": { "method": "getQueueFunctions", "group": "queue", - "weight": 94, + "weight": 99, "cookies": false, "type": "", "demo": "health\/get-queue-functions.md", @@ -13730,7 +14085,7 @@ "x-appwrite": { "method": "getQueueLogs", "group": "queue", - "weight": 85, + "weight": 90, "cookies": false, "type": "", "demo": "health\/get-queue-logs.md", @@ -13791,7 +14146,7 @@ "x-appwrite": { "method": "getQueueMails", "group": "queue", - "weight": 91, + "weight": 96, "cookies": false, "type": "", "demo": "health\/get-queue-mails.md", @@ -13852,7 +14207,7 @@ "x-appwrite": { "method": "getQueueMessaging", "group": "queue", - "weight": 92, + "weight": 97, "cookies": false, "type": "", "demo": "health\/get-queue-messaging.md", @@ -13913,7 +14268,7 @@ "x-appwrite": { "method": "getQueueMigrations", "group": "queue", - "weight": 93, + "weight": 98, "cookies": false, "type": "", "demo": "health\/get-queue-migrations.md", @@ -13974,7 +14329,7 @@ "x-appwrite": { "method": "getQueueStatsResources", "group": "queue", - "weight": 95, + "weight": 100, "cookies": false, "type": "", "demo": "health\/get-queue-stats-resources.md", @@ -14035,7 +14390,7 @@ "x-appwrite": { "method": "getQueueUsage", "group": "queue", - "weight": 96, + "weight": 101, "cookies": false, "type": "", "demo": "health\/get-queue-usage.md", @@ -14096,7 +14451,7 @@ "x-appwrite": { "method": "getQueueWebhooks", "group": "queue", - "weight": 84, + "weight": 89, "cookies": false, "type": "", "demo": "health\/get-queue-webhooks.md", @@ -14157,7 +14512,7 @@ "x-appwrite": { "method": "getStorage", "group": "storage", - "weight": 98, + "weight": 103, "cookies": false, "type": "", "demo": "health\/get-storage.md", @@ -14207,7 +14562,7 @@ "x-appwrite": { "method": "getStorageLocal", "group": "storage", - "weight": 97, + "weight": 102, "cookies": false, "type": "", "demo": "health\/get-storage-local.md", @@ -14257,7 +14612,7 @@ "x-appwrite": { "method": "getTime", "group": "health", - "weight": 83, + "weight": 88, "cookies": false, "type": "", "demo": "health\/get-time.md", @@ -14307,7 +14662,7 @@ "x-appwrite": { "method": "get", "group": null, - "weight": 70, + "weight": 75, "cookies": false, "type": "", "demo": "locale\/get.md", @@ -14360,7 +14715,7 @@ "x-appwrite": { "method": "listCodes", "group": null, - "weight": 71, + "weight": 76, "cookies": false, "type": "", "demo": "locale\/list-codes.md", @@ -14413,7 +14768,7 @@ "x-appwrite": { "method": "listContinents", "group": null, - "weight": 75, + "weight": 80, "cookies": false, "type": "", "demo": "locale\/list-continents.md", @@ -14466,7 +14821,7 @@ "x-appwrite": { "method": "listCountries", "group": null, - "weight": 72, + "weight": 77, "cookies": false, "type": "", "demo": "locale\/list-countries.md", @@ -14519,7 +14874,7 @@ "x-appwrite": { "method": "listCountriesEU", "group": null, - "weight": 73, + "weight": 78, "cookies": false, "type": "", "demo": "locale\/list-countries-eu.md", @@ -14572,7 +14927,7 @@ "x-appwrite": { "method": "listCountriesPhones", "group": null, - "weight": 74, + "weight": 79, "cookies": false, "type": "", "demo": "locale\/list-countries-phones.md", @@ -14625,7 +14980,7 @@ "x-appwrite": { "method": "listCurrencies", "group": null, - "weight": 76, + "weight": 81, "cookies": false, "type": "", "demo": "locale\/list-currencies.md", @@ -14678,7 +15033,7 @@ "x-appwrite": { "method": "listLanguages", "group": null, - "weight": 77, + "weight": 82, "cookies": false, "type": "", "demo": "locale\/list-languages.md", @@ -14731,7 +15086,7 @@ "x-appwrite": { "method": "listMessages", "group": "messages", - "weight": 304, + "weight": 318, "cookies": false, "type": "", "demo": "messaging\/list-messages.md", @@ -14807,7 +15162,7 @@ "x-appwrite": { "method": "createEmail", "group": "messages", - "weight": 301, + "weight": 315, "cookies": false, "type": "", "demo": "messaging\/create-email.md", @@ -14966,7 +15321,7 @@ "x-appwrite": { "method": "updateEmail", "group": "messages", - "weight": 308, + "weight": 322, "cookies": false, "type": "", "demo": "messaging\/update-email.md", @@ -15122,7 +15477,7 @@ "x-appwrite": { "method": "createPush", "group": "messages", - "weight": 303, + "weight": 317, "cookies": false, "type": "", "demo": "messaging\/create-push.md", @@ -15318,7 +15673,7 @@ "x-appwrite": { "method": "updatePush", "group": "messages", - "weight": 310, + "weight": 324, "cookies": false, "type": "", "demo": "messaging\/update-push.md", @@ -15513,7 +15868,7 @@ "x-appwrite": { "method": "createSms", "group": "messages", - "weight": 302, + "weight": 316, "cookies": false, "type": "", "demo": "messaging\/create-sms.md", @@ -15702,7 +16057,7 @@ "x-appwrite": { "method": "updateSms", "group": "messages", - "weight": 309, + "weight": 323, "cookies": false, "type": "", "demo": "messaging\/update-sms.md", @@ -15885,7 +16240,7 @@ "x-appwrite": { "method": "getMessage", "group": "messages", - "weight": 307, + "weight": 321, "cookies": false, "type": "", "demo": "messaging\/get-message.md", @@ -15941,7 +16296,7 @@ "x-appwrite": { "method": "delete", "group": "messages", - "weight": 311, + "weight": 325, "cookies": false, "type": "", "demo": "messaging\/delete.md", @@ -16002,7 +16357,7 @@ "x-appwrite": { "method": "listMessageLogs", "group": "logs", - "weight": 305, + "weight": 319, "cookies": false, "type": "", "demo": "messaging\/list-message-logs.md", @@ -16075,7 +16430,7 @@ "x-appwrite": { "method": "listTargets", "group": "messages", - "weight": 306, + "weight": 320, "cookies": false, "type": "", "demo": "messaging\/list-targets.md", @@ -16148,7 +16503,7 @@ "x-appwrite": { "method": "listProviders", "group": "providers", - "weight": 276, + "weight": 290, "cookies": false, "type": "", "demo": "messaging\/list-providers.md", @@ -16224,7 +16579,7 @@ "x-appwrite": { "method": "createApnsProvider", "group": "providers", - "weight": 275, + "weight": 289, "cookies": false, "type": "", "demo": "messaging\/create-apns-provider.md", @@ -16412,7 +16767,7 @@ "x-appwrite": { "method": "updateApnsProvider", "group": "providers", - "weight": 288, + "weight": 302, "cookies": false, "type": "", "demo": "messaging\/update-apns-provider.md", @@ -16596,7 +16951,7 @@ "x-appwrite": { "method": "createFcmProvider", "group": "providers", - "weight": 274, + "weight": 288, "cookies": false, "type": "", "demo": "messaging\/create-fcm-provider.md", @@ -16752,7 +17107,7 @@ "x-appwrite": { "method": "updateFcmProvider", "group": "providers", - "weight": 287, + "weight": 301, "cookies": false, "type": "", "demo": "messaging\/update-fcm-provider.md", @@ -16904,7 +17259,7 @@ "x-appwrite": { "method": "createMailgunProvider", "group": "providers", - "weight": 266, + "weight": 280, "cookies": false, "type": "", "demo": "messaging\/create-mailgun-provider.md", @@ -17032,7 +17387,7 @@ "x-appwrite": { "method": "updateMailgunProvider", "group": "providers", - "weight": 279, + "weight": 293, "cookies": false, "type": "", "demo": "messaging\/update-mailgun-provider.md", @@ -17158,7 +17513,7 @@ "x-appwrite": { "method": "createMsg91Provider", "group": "providers", - "weight": 269, + "weight": 283, "cookies": false, "type": "", "demo": "messaging\/create-msg-91-provider.md", @@ -17262,7 +17617,7 @@ "x-appwrite": { "method": "updateMsg91Provider", "group": "providers", - "weight": 282, + "weight": 296, "cookies": false, "type": "", "demo": "messaging\/update-msg-91-provider.md", @@ -17364,7 +17719,7 @@ "x-appwrite": { "method": "createSendgridProvider", "group": "providers", - "weight": 267, + "weight": 281, "cookies": false, "type": "", "demo": "messaging\/create-sendgrid-provider.md", @@ -17480,7 +17835,7 @@ "x-appwrite": { "method": "updateSendgridProvider", "group": "providers", - "weight": 280, + "weight": 294, "cookies": false, "type": "", "demo": "messaging\/update-sendgrid-provider.md", @@ -17594,7 +17949,7 @@ "x-appwrite": { "method": "createSmtpProvider", "group": "providers", - "weight": 268, + "weight": 282, "cookies": false, "type": "", "demo": "messaging\/create-smtp-provider.md", @@ -17840,7 +18195,7 @@ "x-appwrite": { "method": "updateSmtpProvider", "group": "providers", - "weight": 281, + "weight": 295, "cookies": false, "type": "", "demo": "messaging\/update-smtp-provider.md", @@ -18079,7 +18434,7 @@ "x-appwrite": { "method": "createTelesignProvider", "group": "providers", - "weight": 270, + "weight": 284, "cookies": false, "type": "", "demo": "messaging\/create-telesign-provider.md", @@ -18183,7 +18538,7 @@ "x-appwrite": { "method": "updateTelesignProvider", "group": "providers", - "weight": 283, + "weight": 297, "cookies": false, "type": "", "demo": "messaging\/update-telesign-provider.md", @@ -18285,7 +18640,7 @@ "x-appwrite": { "method": "createTextmagicProvider", "group": "providers", - "weight": 271, + "weight": 285, "cookies": false, "type": "", "demo": "messaging\/create-textmagic-provider.md", @@ -18389,7 +18744,7 @@ "x-appwrite": { "method": "updateTextmagicProvider", "group": "providers", - "weight": 284, + "weight": 298, "cookies": false, "type": "", "demo": "messaging\/update-textmagic-provider.md", @@ -18491,7 +18846,7 @@ "x-appwrite": { "method": "createTwilioProvider", "group": "providers", - "weight": 272, + "weight": 286, "cookies": false, "type": "", "demo": "messaging\/create-twilio-provider.md", @@ -18595,7 +18950,7 @@ "x-appwrite": { "method": "updateTwilioProvider", "group": "providers", - "weight": 285, + "weight": 299, "cookies": false, "type": "", "demo": "messaging\/update-twilio-provider.md", @@ -18697,7 +19052,7 @@ "x-appwrite": { "method": "createVonageProvider", "group": "providers", - "weight": 273, + "weight": 287, "cookies": false, "type": "", "demo": "messaging\/create-vonage-provider.md", @@ -18801,7 +19156,7 @@ "x-appwrite": { "method": "updateVonageProvider", "group": "providers", - "weight": 286, + "weight": 300, "cookies": false, "type": "", "demo": "messaging\/update-vonage-provider.md", @@ -18901,7 +19256,7 @@ "x-appwrite": { "method": "getProvider", "group": "providers", - "weight": 278, + "weight": 292, "cookies": false, "type": "", "demo": "messaging\/get-provider.md", @@ -18957,7 +19312,7 @@ "x-appwrite": { "method": "deleteProvider", "group": "providers", - "weight": 289, + "weight": 303, "cookies": false, "type": "", "demo": "messaging\/delete-provider.md", @@ -19018,7 +19373,7 @@ "x-appwrite": { "method": "listProviderLogs", "group": "providers", - "weight": 277, + "weight": 291, "cookies": false, "type": "", "demo": "messaging\/list-provider-logs.md", @@ -19091,7 +19446,7 @@ "x-appwrite": { "method": "listSubscriberLogs", "group": "subscribers", - "weight": 298, + "weight": 312, "cookies": false, "type": "", "demo": "messaging\/list-subscriber-logs.md", @@ -19164,7 +19519,7 @@ "x-appwrite": { "method": "listTopics", "group": "topics", - "weight": 291, + "weight": 305, "cookies": false, "type": "", "demo": "messaging\/list-topics.md", @@ -19238,7 +19593,7 @@ "x-appwrite": { "method": "createTopic", "group": "topics", - "weight": 290, + "weight": 304, "cookies": false, "type": "", "demo": "messaging\/create-topic.md", @@ -19327,7 +19682,7 @@ "x-appwrite": { "method": "getTopic", "group": "topics", - "weight": 293, + "weight": 307, "cookies": false, "type": "", "demo": "messaging\/get-topic.md", @@ -19388,7 +19743,7 @@ "x-appwrite": { "method": "updateTopic", "group": "topics", - "weight": 294, + "weight": 308, "cookies": false, "type": "", "demo": "messaging\/update-topic.md", @@ -19468,7 +19823,7 @@ "x-appwrite": { "method": "deleteTopic", "group": "topics", - "weight": 295, + "weight": 309, "cookies": false, "type": "", "demo": "messaging\/delete-topic.md", @@ -19529,7 +19884,7 @@ "x-appwrite": { "method": "listTopicLogs", "group": "topics", - "weight": 292, + "weight": 306, "cookies": false, "type": "", "demo": "messaging\/list-topic-logs.md", @@ -19602,7 +19957,7 @@ "x-appwrite": { "method": "listSubscribers", "group": "subscribers", - "weight": 297, + "weight": 311, "cookies": false, "type": "", "demo": "messaging\/list-subscribers.md", @@ -19684,7 +20039,7 @@ "x-appwrite": { "method": "createSubscriber", "group": "subscribers", - "weight": 296, + "weight": 310, "cookies": false, "type": "", "demo": "messaging\/create-subscriber.md", @@ -19773,7 +20128,7 @@ "x-appwrite": { "method": "getSubscriber", "group": "subscribers", - "weight": 299, + "weight": 313, "cookies": false, "type": "", "demo": "messaging\/get-subscriber.md", @@ -19837,7 +20192,7 @@ "x-appwrite": { "method": "deleteSubscriber", "group": "subscribers", - "weight": 300, + "weight": 314, "cookies": false, "type": "", "demo": "messaging\/delete-subscriber.md", @@ -19909,7 +20264,7 @@ "x-appwrite": { "method": "list", "group": "sites", - "weight": 469, + "weight": 483, "cookies": false, "type": "", "demo": "sites\/list.md", @@ -19982,7 +20337,7 @@ "x-appwrite": { "method": "create", "group": "sites", - "weight": 467, + "weight": 481, "cookies": false, "type": "", "demo": "sites\/create.md", @@ -20250,7 +20605,7 @@ "x-appwrite": { "method": "listFrameworks", "group": "frameworks", - "weight": 472, + "weight": 486, "cookies": false, "type": "", "demo": "sites\/list-frameworks.md", @@ -20300,7 +20655,7 @@ "x-appwrite": { "method": "listSpecifications", "group": "frameworks", - "weight": 495, + "weight": 509, "cookies": false, "type": "", "demo": "sites\/list-specifications.md", @@ -20351,7 +20706,7 @@ "x-appwrite": { "method": "get", "group": "sites", - "weight": 468, + "weight": 482, "cookies": false, "type": "", "demo": "sites\/get.md", @@ -20411,7 +20766,7 @@ "x-appwrite": { "method": "update", "group": "sites", - "weight": 470, + "weight": 484, "cookies": false, "type": "", "demo": "sites\/update.md", @@ -20674,7 +21029,7 @@ "x-appwrite": { "method": "delete", "group": "sites", - "weight": 471, + "weight": 485, "cookies": false, "type": "", "demo": "sites\/delete.md", @@ -20736,7 +21091,7 @@ "x-appwrite": { "method": "updateSiteDeployment", "group": "sites", - "weight": 478, + "weight": 492, "cookies": false, "type": "", "demo": "sites\/update-site-deployment.md", @@ -20814,7 +21169,7 @@ "x-appwrite": { "method": "listDeployments", "group": "deployments", - "weight": 477, + "weight": 491, "cookies": false, "type": "", "demo": "sites\/list-deployments.md", @@ -20895,7 +21250,7 @@ "x-appwrite": { "method": "createDeployment", "group": "deployments", - "weight": 473, + "weight": 487, "cookies": false, "type": "upload", "demo": "sites\/create-deployment.md", @@ -20996,7 +21351,7 @@ "x-appwrite": { "method": "createDuplicateDeployment", "group": "deployments", - "weight": 481, + "weight": 495, "cookies": false, "type": "", "demo": "sites\/create-duplicate-deployment.md", @@ -21076,7 +21431,7 @@ "x-appwrite": { "method": "createTemplateDeployment", "group": "deployments", - "weight": 474, + "weight": 488, "cookies": false, "type": "", "demo": "sites\/create-template-deployment.md", @@ -21183,7 +21538,7 @@ "x-appwrite": { "method": "createVcsDeployment", "group": "deployments", - "weight": 475, + "weight": 489, "cookies": false, "type": "", "demo": "sites\/create-vcs-deployment.md", @@ -21281,7 +21636,7 @@ "x-appwrite": { "method": "getDeployment", "group": "deployments", - "weight": 476, + "weight": 490, "cookies": false, "type": "", "demo": "sites\/get-deployment.md", @@ -21344,7 +21699,7 @@ "x-appwrite": { "method": "deleteDeployment", "group": "deployments", - "weight": 479, + "weight": 493, "cookies": false, "type": "", "demo": "sites\/delete-deployment.md", @@ -21412,7 +21767,7 @@ "x-appwrite": { "method": "getDeploymentDownload", "group": "deployments", - "weight": 480, + "weight": 494, "cookies": false, "type": "location", "demo": "sites\/get-deployment-download.md", @@ -21498,7 +21853,7 @@ "x-appwrite": { "method": "updateDeploymentStatus", "group": "deployments", - "weight": 482, + "weight": 496, "cookies": false, "type": "", "demo": "sites\/update-deployment-status.md", @@ -21566,7 +21921,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 484, + "weight": 498, "cookies": false, "type": "", "demo": "sites\/list-logs.md", @@ -21638,7 +21993,7 @@ "x-appwrite": { "method": "getLog", "group": "logs", - "weight": 483, + "weight": 497, "cookies": false, "type": "", "demo": "sites\/get-log.md", @@ -21703,7 +22058,7 @@ "x-appwrite": { "method": "deleteLog", "group": "logs", - "weight": 485, + "weight": 499, "cookies": false, "type": "", "demo": "sites\/delete-log.md", @@ -21771,7 +22126,7 @@ "x-appwrite": { "method": "listVariables", "group": "variables", - "weight": 488, + "weight": 502, "cookies": false, "type": "", "demo": "sites\/list-variables.md", @@ -21831,7 +22186,7 @@ "x-appwrite": { "method": "createVariable", "group": "variables", - "weight": 486, + "weight": 500, "cookies": false, "type": "", "demo": "sites\/create-variable.md", @@ -21922,7 +22277,7 @@ "x-appwrite": { "method": "getVariable", "group": "variables", - "weight": 487, + "weight": 501, "cookies": false, "type": "", "demo": "sites\/get-variable.md", @@ -21990,7 +22345,7 @@ "x-appwrite": { "method": "updateVariable", "group": "variables", - "weight": 489, + "weight": 503, "cookies": false, "type": "", "demo": "sites\/update-variable.md", @@ -22083,7 +22438,7 @@ "x-appwrite": { "method": "deleteVariable", "group": "variables", - "weight": 490, + "weight": 504, "cookies": false, "type": "", "demo": "sites\/delete-variable.md", @@ -22151,7 +22506,7 @@ "x-appwrite": { "method": "listBuckets", "group": "buckets", - "weight": 155, + "weight": 163, "cookies": false, "type": "", "demo": "storage\/list-buckets.md", @@ -22224,7 +22579,7 @@ "x-appwrite": { "method": "createBucket", "group": "buckets", - "weight": 154, + "weight": 162, "cookies": false, "type": "", "demo": "storage\/create-bucket.md", @@ -22362,7 +22717,7 @@ "x-appwrite": { "method": "getBucket", "group": "buckets", - "weight": 156, + "weight": 164, "cookies": false, "type": "", "demo": "storage\/get-bucket.md", @@ -22422,7 +22777,7 @@ "x-appwrite": { "method": "updateBucket", "group": "buckets", - "weight": 157, + "weight": 165, "cookies": false, "type": "", "demo": "storage\/update-bucket.md", @@ -22556,7 +22911,7 @@ "x-appwrite": { "method": "deleteBucket", "group": "buckets", - "weight": 158, + "weight": 166, "cookies": false, "type": "", "demo": "storage\/delete-bucket.md", @@ -22616,7 +22971,7 @@ "x-appwrite": { "method": "listFiles", "group": "files", - "weight": 160, + "weight": 168, "cookies": false, "type": "", "demo": "storage\/list-files.md", @@ -22700,7 +23055,7 @@ "x-appwrite": { "method": "createFile", "group": "files", - "weight": 159, + "weight": 167, "cookies": false, "type": "upload", "demo": "storage\/create-file.md", @@ -22791,7 +23146,7 @@ "x-appwrite": { "method": "getFile", "group": "files", - "weight": 161, + "weight": 169, "cookies": false, "type": "", "demo": "storage\/get-file.md", @@ -22862,7 +23217,7 @@ "x-appwrite": { "method": "updateFile", "group": "files", - "weight": 166, + "weight": 174, "cookies": false, "type": "", "demo": "storage\/update-file.md", @@ -22952,7 +23307,7 @@ "x-appwrite": { "method": "deleteFile", "group": "files", - "weight": 167, + "weight": 175, "cookies": false, "type": "", "demo": "storage\/delete-file.md", @@ -23023,7 +23378,7 @@ "x-appwrite": { "method": "getFileDownload", "group": "files", - "weight": 163, + "weight": 171, "cookies": false, "type": "location", "demo": "storage\/get-file-download.md", @@ -23103,7 +23458,7 @@ "x-appwrite": { "method": "getFilePreview", "group": "files", - "weight": 162, + "weight": 170, "cookies": false, "type": "location", "demo": "storage\/get-file-preview.md", @@ -23311,7 +23666,7 @@ "x-appwrite": { "method": "getFileView", "group": "files", - "weight": 164, + "weight": 172, "cookies": false, "type": "location", "demo": "storage\/get-file-view.md", @@ -23391,7 +23746,7 @@ "x-appwrite": { "method": "list", "group": "tablesdb", - "weight": 376, + "weight": 390, "cookies": false, "type": "", "demo": "tablesdb\/list.md", @@ -23464,7 +23819,7 @@ "x-appwrite": { "method": "create", "group": "tablesdb", - "weight": 372, + "weight": 386, "cookies": false, "type": "", "demo": "tablesdb\/create.md", @@ -23547,7 +23902,7 @@ "x-appwrite": { "method": "get", "group": "tablesdb", - "weight": 373, + "weight": 387, "cookies": false, "type": "", "demo": "tablesdb\/get.md", @@ -23607,7 +23962,7 @@ "x-appwrite": { "method": "update", "group": "tablesdb", - "weight": 374, + "weight": 388, "cookies": false, "type": "", "demo": "tablesdb\/update.md", @@ -23686,7 +24041,7 @@ "x-appwrite": { "method": "delete", "group": "tablesdb", - "weight": 375, + "weight": 389, "cookies": false, "type": "", "demo": "tablesdb\/delete.md", @@ -23746,7 +24101,7 @@ "x-appwrite": { "method": "listTables", "group": "tables", - "weight": 383, + "weight": 397, "cookies": false, "type": "", "demo": "tablesdb\/list-tables.md", @@ -23830,7 +24185,7 @@ "x-appwrite": { "method": "createTable", "group": "tables", - "weight": 379, + "weight": 393, "cookies": false, "type": "", "demo": "tablesdb\/create-table.md", @@ -23939,7 +24294,7 @@ "x-appwrite": { "method": "getTable", "group": "tables", - "weight": 380, + "weight": 394, "cookies": false, "type": "", "demo": "tablesdb\/get-table.md", @@ -24010,7 +24365,7 @@ "x-appwrite": { "method": "updateTable", "group": "tables", - "weight": 381, + "weight": 395, "cookies": false, "type": "", "demo": "tablesdb\/update-table.md", @@ -24115,7 +24470,7 @@ "x-appwrite": { "method": "deleteTable", "group": "tables", - "weight": 382, + "weight": 396, "cookies": false, "type": "", "demo": "tablesdb\/delete-table.md", @@ -24186,7 +24541,7 @@ "x-appwrite": { "method": "listColumns", "group": "columns", - "weight": 388, + "weight": 402, "cookies": false, "type": "", "demo": "tablesdb\/list-columns.md", @@ -24271,7 +24626,7 @@ "x-appwrite": { "method": "createBooleanColumn", "group": "columns", - "weight": 389, + "weight": 403, "cookies": false, "type": "", "demo": "tablesdb\/create-boolean-column.md", @@ -24381,7 +24736,7 @@ "x-appwrite": { "method": "updateBooleanColumn", "group": "columns", - "weight": 390, + "weight": 404, "cookies": false, "type": "", "demo": "tablesdb\/update-boolean-column.md", @@ -24493,7 +24848,7 @@ "x-appwrite": { "method": "createDatetimeColumn", "group": "columns", - "weight": 391, + "weight": 405, "cookies": false, "type": "", "demo": "tablesdb\/create-datetime-column.md", @@ -24603,7 +24958,7 @@ "x-appwrite": { "method": "updateDatetimeColumn", "group": "columns", - "weight": 392, + "weight": 406, "cookies": false, "type": "", "demo": "tablesdb\/update-datetime-column.md", @@ -24715,7 +25070,7 @@ "x-appwrite": { "method": "createEmailColumn", "group": "columns", - "weight": 393, + "weight": 407, "cookies": false, "type": "", "demo": "tablesdb\/create-email-column.md", @@ -24825,7 +25180,7 @@ "x-appwrite": { "method": "updateEmailColumn", "group": "columns", - "weight": 394, + "weight": 408, "cookies": false, "type": "", "demo": "tablesdb\/update-email-column.md", @@ -24937,7 +25292,7 @@ "x-appwrite": { "method": "createEnumColumn", "group": "columns", - "weight": 395, + "weight": 409, "cookies": false, "type": "", "demo": "tablesdb\/create-enum-column.md", @@ -25057,7 +25412,7 @@ "x-appwrite": { "method": "updateEnumColumn", "group": "columns", - "weight": 396, + "weight": 410, "cookies": false, "type": "", "demo": "tablesdb\/update-enum-column.md", @@ -25179,7 +25534,7 @@ "x-appwrite": { "method": "createFloatColumn", "group": "columns", - "weight": 397, + "weight": 411, "cookies": false, "type": "", "demo": "tablesdb\/create-float-column.md", @@ -25301,7 +25656,7 @@ "x-appwrite": { "method": "updateFloatColumn", "group": "columns", - "weight": 398, + "weight": 412, "cookies": false, "type": "", "demo": "tablesdb\/update-float-column.md", @@ -25425,7 +25780,7 @@ "x-appwrite": { "method": "createIntegerColumn", "group": "columns", - "weight": 399, + "weight": 413, "cookies": false, "type": "", "demo": "tablesdb\/create-integer-column.md", @@ -25547,7 +25902,7 @@ "x-appwrite": { "method": "updateIntegerColumn", "group": "columns", - "weight": 400, + "weight": 414, "cookies": false, "type": "", "demo": "tablesdb\/update-integer-column.md", @@ -25671,7 +26026,7 @@ "x-appwrite": { "method": "createIpColumn", "group": "columns", - "weight": 401, + "weight": 415, "cookies": false, "type": "", "demo": "tablesdb\/create-ip-column.md", @@ -25781,7 +26136,7 @@ "x-appwrite": { "method": "updateIpColumn", "group": "columns", - "weight": 402, + "weight": 416, "cookies": false, "type": "", "demo": "tablesdb\/update-ip-column.md", @@ -25893,7 +26248,7 @@ "x-appwrite": { "method": "createLineColumn", "group": "columns", - "weight": 403, + "weight": 417, "cookies": false, "type": "", "demo": "tablesdb\/create-line-column.md", @@ -25998,7 +26353,7 @@ "x-appwrite": { "method": "updateLineColumn", "group": "columns", - "weight": 404, + "weight": 418, "cookies": false, "type": "", "demo": "tablesdb\/update-line-column.md", @@ -26109,7 +26464,7 @@ "x-appwrite": { "method": "createPointColumn", "group": "columns", - "weight": 405, + "weight": 419, "cookies": false, "type": "", "demo": "tablesdb\/create-point-column.md", @@ -26214,7 +26569,7 @@ "x-appwrite": { "method": "updatePointColumn", "group": "columns", - "weight": 406, + "weight": 420, "cookies": false, "type": "", "demo": "tablesdb\/update-point-column.md", @@ -26325,7 +26680,7 @@ "x-appwrite": { "method": "createPolygonColumn", "group": "columns", - "weight": 407, + "weight": 421, "cookies": false, "type": "", "demo": "tablesdb\/create-polygon-column.md", @@ -26430,7 +26785,7 @@ "x-appwrite": { "method": "updatePolygonColumn", "group": "columns", - "weight": 408, + "weight": 422, "cookies": false, "type": "", "demo": "tablesdb\/update-polygon-column.md", @@ -26541,7 +26896,7 @@ "x-appwrite": { "method": "createRelationshipColumn", "group": "columns", - "weight": 409, + "weight": 423, "cookies": false, "type": "", "demo": "tablesdb\/create-relationship-column.md", @@ -26678,7 +27033,7 @@ "x-appwrite": { "method": "createStringColumn", "group": "columns", - "weight": 411, + "weight": 425, "cookies": false, "type": "", "demo": "tablesdb\/create-string-column.md", @@ -26801,7 +27156,7 @@ "x-appwrite": { "method": "updateStringColumn", "group": "columns", - "weight": 412, + "weight": 426, "cookies": false, "type": "", "demo": "tablesdb\/update-string-column.md", @@ -26919,7 +27274,7 @@ "x-appwrite": { "method": "createUrlColumn", "group": "columns", - "weight": 413, + "weight": 427, "cookies": false, "type": "", "demo": "tablesdb\/create-url-column.md", @@ -27029,7 +27384,7 @@ "x-appwrite": { "method": "updateUrlColumn", "group": "columns", - "weight": 414, + "weight": 428, "cookies": false, "type": "", "demo": "tablesdb\/update-url-column.md", @@ -27170,7 +27525,7 @@ "x-appwrite": { "method": "getColumn", "group": "columns", - "weight": 386, + "weight": 400, "cookies": false, "type": "", "demo": "tablesdb\/get-column.md", @@ -27243,7 +27598,7 @@ "x-appwrite": { "method": "deleteColumn", "group": "columns", - "weight": 387, + "weight": 401, "cookies": false, "type": "", "demo": "tablesdb\/delete-column.md", @@ -27323,7 +27678,7 @@ "x-appwrite": { "method": "updateRelationshipColumn", "group": "columns", - "weight": 410, + "weight": 424, "cookies": false, "type": "", "demo": "tablesdb\/update-relationship-column.md", @@ -27429,7 +27784,7 @@ "x-appwrite": { "method": "listIndexes", "group": "indexes", - "weight": 418, + "weight": 432, "cookies": false, "type": "", "demo": "tablesdb\/list-indexes.md", @@ -27512,7 +27867,7 @@ "x-appwrite": { "method": "createIndex", "group": "indexes", - "weight": 415, + "weight": 429, "cookies": false, "type": "", "demo": "tablesdb\/create-index.md", @@ -27644,7 +27999,7 @@ "x-appwrite": { "method": "getIndex", "group": "indexes", - "weight": 416, + "weight": 430, "cookies": false, "type": "", "demo": "tablesdb\/get-index.md", @@ -27717,7 +28072,7 @@ "x-appwrite": { "method": "deleteIndex", "group": "indexes", - "weight": 417, + "weight": 431, "cookies": false, "type": "", "demo": "tablesdb\/delete-index.md", @@ -27795,7 +28150,7 @@ "x-appwrite": { "method": "listRows", "group": "rows", - "weight": 427, + "weight": 441, "cookies": false, "type": "", "demo": "tablesdb\/list-rows.md", @@ -27881,7 +28236,7 @@ "x-appwrite": { "method": "createRow", "group": "rows", - "weight": 419, + "weight": 433, "cookies": false, "type": "", "demo": "tablesdb\/create-row.md", @@ -28053,7 +28408,7 @@ "x-appwrite": { "method": "upsertRows", "group": "rows", - "weight": 424, + "weight": 438, "cookies": false, "type": "", "demo": "tablesdb\/upsert-rows.md", @@ -28175,7 +28530,7 @@ "x-appwrite": { "method": "updateRows", "group": "rows", - "weight": 422, + "weight": 436, "cookies": false, "type": "", "demo": "tablesdb\/update-rows.md", @@ -28271,7 +28626,7 @@ "x-appwrite": { "method": "deleteRows", "group": "rows", - "weight": 426, + "weight": 440, "cookies": false, "type": "", "demo": "tablesdb\/delete-rows.md", @@ -28361,7 +28716,7 @@ "x-appwrite": { "method": "getRow", "group": "rows", - "weight": 420, + "weight": 434, "cookies": false, "type": "", "demo": "tablesdb\/get-row.md", @@ -28455,7 +28810,7 @@ "x-appwrite": { "method": "upsertRow", "group": "rows", - "weight": 423, + "weight": 437, "cookies": false, "type": "", "demo": "tablesdb\/upsert-row.md", @@ -28592,7 +28947,7 @@ "x-appwrite": { "method": "updateRow", "group": "rows", - "weight": 421, + "weight": 435, "cookies": false, "type": "", "demo": "tablesdb\/update-row.md", @@ -28693,7 +29048,7 @@ "x-appwrite": { "method": "deleteRow", "group": "rows", - "weight": 425, + "weight": 439, "cookies": false, "type": "", "demo": "tablesdb\/delete-row.md", @@ -28777,7 +29132,7 @@ "x-appwrite": { "method": "decrementRowColumn", "group": "rows", - "weight": 430, + "weight": 444, "cookies": false, "type": "", "demo": "tablesdb\/decrement-row-column.md", @@ -28890,7 +29245,7 @@ "x-appwrite": { "method": "incrementRowColumn", "group": "rows", - "weight": 429, + "weight": 443, "cookies": false, "type": "", "demo": "tablesdb\/increment-row-column.md", @@ -29001,7 +29356,7 @@ "x-appwrite": { "method": "list", "group": "teams", - "weight": 171, + "weight": 179, "cookies": false, "type": "", "demo": "teams\/list.md", @@ -29077,7 +29432,7 @@ "x-appwrite": { "method": "create", "group": "teams", - "weight": 170, + "weight": 178, "cookies": false, "type": "", "demo": "teams\/create.md", @@ -29168,7 +29523,7 @@ "x-appwrite": { "method": "get", "group": "teams", - "weight": 172, + "weight": 180, "cookies": false, "type": "", "demo": "teams\/get.md", @@ -29231,7 +29586,7 @@ "x-appwrite": { "method": "updateName", "group": "teams", - "weight": 174, + "weight": 182, "cookies": false, "type": "", "demo": "teams\/update-name.md", @@ -29307,7 +29662,7 @@ "x-appwrite": { "method": "delete", "group": "teams", - "weight": 176, + "weight": 184, "cookies": false, "type": "", "demo": "teams\/delete.md", @@ -29370,7 +29725,7 @@ "x-appwrite": { "method": "listMemberships", "group": "memberships", - "weight": 178, + "weight": 186, "cookies": false, "type": "", "demo": "teams\/list-memberships.md", @@ -29454,7 +29809,7 @@ "x-appwrite": { "method": "createMembership", "group": "memberships", - "weight": 177, + "weight": 185, "cookies": false, "type": "", "demo": "teams\/create-membership.md", @@ -29568,7 +29923,7 @@ "x-appwrite": { "method": "getMembership", "group": "memberships", - "weight": 179, + "weight": 187, "cookies": false, "type": "", "demo": "teams\/get-membership.md", @@ -29639,7 +29994,7 @@ "x-appwrite": { "method": "updateMembership", "group": "memberships", - "weight": 180, + "weight": 188, "cookies": false, "type": "", "demo": "teams\/update-membership.md", @@ -29726,7 +30081,7 @@ "x-appwrite": { "method": "deleteMembership", "group": "memberships", - "weight": 182, + "weight": 190, "cookies": false, "type": "", "demo": "teams\/delete-membership.md", @@ -29799,7 +30154,7 @@ "x-appwrite": { "method": "updateMembershipStatus", "group": "memberships", - "weight": 181, + "weight": 189, "cookies": false, "type": "", "demo": "teams\/update-membership-status.md", @@ -29894,7 +30249,7 @@ "x-appwrite": { "method": "getPrefs", "group": "teams", - "weight": 173, + "weight": 181, "cookies": false, "type": "", "demo": "teams\/get-prefs.md", @@ -29956,7 +30311,7 @@ "x-appwrite": { "method": "updatePrefs", "group": "teams", - "weight": 175, + "weight": 183, "cookies": false, "type": "", "demo": "teams\/update-prefs.md", @@ -30036,7 +30391,7 @@ "x-appwrite": { "method": "list", "group": "files", - "weight": 507, + "weight": 521, "cookies": false, "type": "", "demo": "tokens\/list.md", @@ -30117,7 +30472,7 @@ "x-appwrite": { "method": "createFileToken", "group": "files", - "weight": 505, + "weight": 519, "cookies": false, "type": "", "demo": "tokens\/create-file-token.md", @@ -30202,7 +30557,7 @@ "x-appwrite": { "method": "get", "group": "tokens", - "weight": 506, + "weight": 520, "cookies": false, "type": "", "demo": "tokens\/get.md", @@ -30263,7 +30618,7 @@ "x-appwrite": { "method": "update", "group": "tokens", - "weight": 508, + "weight": 522, "cookies": false, "type": "", "demo": "tokens\/update.md", @@ -30335,7 +30690,7 @@ "x-appwrite": { "method": "delete", "group": "tokens", - "weight": 509, + "weight": 523, "cookies": false, "type": "", "demo": "tokens\/delete.md", @@ -30396,7 +30751,7 @@ "x-appwrite": { "method": "list", "group": "users", - "weight": 193, + "weight": 201, "cookies": false, "type": "", "demo": "users\/list.md", @@ -30469,7 +30824,7 @@ "x-appwrite": { "method": "create", "group": "users", - "weight": 184, + "weight": 192, "cookies": false, "type": "", "demo": "users\/create.md", @@ -30565,7 +30920,7 @@ "x-appwrite": { "method": "createArgon2User", "group": "users", - "weight": 187, + "weight": 195, "cookies": false, "type": "", "demo": "users\/create-argon-2-user.md", @@ -30657,7 +31012,7 @@ "x-appwrite": { "method": "createBcryptUser", "group": "users", - "weight": 185, + "weight": 193, "cookies": false, "type": "", "demo": "users\/create-bcrypt-user.md", @@ -30747,7 +31102,7 @@ "x-appwrite": { "method": "listIdentities", "group": "identities", - "weight": 201, + "weight": 210, "cookies": false, "type": "", "demo": "users\/list-identities.md", @@ -30817,7 +31172,7 @@ "x-appwrite": { "method": "deleteIdentity", "group": "identities", - "weight": 224, + "weight": 233, "cookies": false, "type": "", "demo": "users\/delete-identity.md", @@ -30879,7 +31234,7 @@ "x-appwrite": { "method": "createMD5User", "group": "users", - "weight": 186, + "weight": 194, "cookies": false, "type": "", "demo": "users\/create-md-5-user.md", @@ -30971,7 +31326,7 @@ "x-appwrite": { "method": "createPHPassUser", "group": "users", - "weight": 189, + "weight": 197, "cookies": false, "type": "", "demo": "users\/create-ph-pass-user.md", @@ -31063,7 +31418,7 @@ "x-appwrite": { "method": "createScryptUser", "group": "users", - "weight": 190, + "weight": 198, "cookies": false, "type": "", "demo": "users\/create-scrypt-user.md", @@ -31190,7 +31545,7 @@ "x-appwrite": { "method": "createScryptModifiedUser", "group": "users", - "weight": 191, + "weight": 199, "cookies": false, "type": "", "demo": "users\/create-scrypt-modified-user.md", @@ -31303,7 +31658,7 @@ "x-appwrite": { "method": "createSHAUser", "group": "users", - "weight": 188, + "weight": 196, "cookies": false, "type": "", "demo": "users\/create-sha-user.md", @@ -31414,7 +31769,7 @@ "x-appwrite": { "method": "get", "group": "users", - "weight": 194, + "weight": 202, "cookies": false, "type": "", "demo": "users\/get.md", @@ -31469,7 +31824,7 @@ "x-appwrite": { "method": "delete", "group": "users", - "weight": 222, + "weight": 231, "cookies": false, "type": "", "demo": "users\/delete.md", @@ -31531,7 +31886,7 @@ "x-appwrite": { "method": "updateEmail", "group": "users", - "weight": 207, + "weight": 216, "cookies": false, "type": "", "demo": "users\/update-email.md", @@ -31611,7 +31966,7 @@ "x-appwrite": { "method": "createJWT", "group": "sessions", - "weight": 225, + "weight": 234, "cookies": false, "type": "", "demo": "users\/create-jwt.md", @@ -31694,7 +32049,7 @@ "x-appwrite": { "method": "updateLabels", "group": "users", - "weight": 203, + "weight": 212, "cookies": false, "type": "", "demo": "users\/update-labels.md", @@ -31775,7 +32130,7 @@ "x-appwrite": { "method": "listLogs", "group": "logs", - "weight": 199, + "weight": 208, "cookies": false, "type": "", "demo": "users\/list-logs.md", @@ -31847,7 +32202,7 @@ "x-appwrite": { "method": "listMemberships", "group": "memberships", - "weight": 198, + "weight": 207, "cookies": false, "type": "", "demo": "users\/list-memberships.md", @@ -31930,7 +32285,7 @@ "x-appwrite": { "method": "updateMfa", "group": "users", - "weight": 212, + "weight": 221, "cookies": false, "type": "", "demo": "users\/update-mfa.md", @@ -32065,7 +32420,7 @@ "x-appwrite": { "method": "deleteMfaAuthenticator", "group": "mfa", - "weight": 217, + "weight": 226, "cookies": false, "type": "", "demo": "users\/delete-mfa-authenticator.md", @@ -32196,7 +32551,7 @@ "x-appwrite": { "method": "listMfaFactors", "group": "mfa", - "weight": 213, + "weight": 222, "cookies": false, "type": "", "demo": "users\/list-mfa-factors.md", @@ -32312,7 +32667,7 @@ "x-appwrite": { "method": "getMfaRecoveryCodes", "group": "mfa", - "weight": 214, + "weight": 223, "cookies": false, "type": "", "demo": "users\/get-mfa-recovery-codes.md", @@ -32428,7 +32783,7 @@ "x-appwrite": { "method": "updateMfaRecoveryCodes", "group": "mfa", - "weight": 216, + "weight": 225, "cookies": false, "type": "", "demo": "users\/update-mfa-recovery-codes.md", @@ -32544,7 +32899,7 @@ "x-appwrite": { "method": "createMfaRecoveryCodes", "group": "mfa", - "weight": 215, + "weight": 224, "cookies": false, "type": "", "demo": "users\/create-mfa-recovery-codes.md", @@ -32662,7 +33017,7 @@ "x-appwrite": { "method": "updateName", "group": "users", - "weight": 205, + "weight": 214, "cookies": false, "type": "", "demo": "users\/update-name.md", @@ -32742,7 +33097,7 @@ "x-appwrite": { "method": "updatePassword", "group": "users", - "weight": 206, + "weight": 215, "cookies": false, "type": "", "demo": "users\/update-password.md", @@ -32822,7 +33177,7 @@ "x-appwrite": { "method": "updatePhone", "group": "users", - "weight": 208, + "weight": 217, "cookies": false, "type": "", "demo": "users\/update-phone.md", @@ -32876,6 +33231,92 @@ ] } }, + "\/users\/{userId}\/plan": { + "post": { + "summary": "Assign plan to user (admin)", + "operationId": "usersAssignPlan", + "consumes": [ + "application\/json" + ], + "produces": [ + "application\/json" + ], + "tags": [ + "users" + ], + "description": false, + "responses": { + "200": { + "description": "User", + "schema": { + "$ref": "#\/definitions\/user" + } + } + }, + "deprecated": false, + "x-appwrite": { + "method": "assignPlan", + "group": "users", + "weight": 203, + "cookies": false, + "type": "", + "demo": "users\/assign-plan.md", + "edit": "https:\/\/github.com\/appwrite\/appwrite\/edit\/master\/docs\/references\/users\/assign-plan.md", + "rate-limit": 0, + "rate-time": 3600, + "rate-key": "url:{url},ip:{ip}", + "scope": "users.write", + "platforms": [ + "server" + ], + "packaging": false, + "auth": { + "Project": [], + "Key": [] + } + }, + "security": [ + { + "Project": [], + "Key": [] + } + ], + "parameters": [ + { + "name": "userId", + "description": "User ID.", + "required": true, + "type": "string", + "x-example": "", + "in": "path" + }, + { + "name": "payload", + "in": "body", + "schema": { + "type": "object", + "properties": { + "planId": { + "type": "string", + "description": "Plan ID to assign.", + "default": null, + "x-example": "" + }, + "complimentary": { + "type": "boolean", + "description": "If true, create a complimentary Stripe subscription for one billing interval.", + "default": true, + "x-example": false + } + }, + "required": [ + "planId" + ] + } + } + ] + } + }, "\/users\/{userId}\/prefs": { "get": { "summary": "Get user preferences", @@ -32900,7 +33341,7 @@ "x-appwrite": { "method": "getPrefs", "group": "users", - "weight": 195, + "weight": 204, "cookies": false, "type": "", "demo": "users\/get-prefs.md", @@ -32960,7 +33401,7 @@ "x-appwrite": { "method": "updatePrefs", "group": "users", - "weight": 210, + "weight": 219, "cookies": false, "type": "", "demo": "users\/update-prefs.md", @@ -33038,7 +33479,7 @@ "x-appwrite": { "method": "listSessions", "group": "sessions", - "weight": 197, + "weight": 206, "cookies": false, "type": "", "demo": "users\/list-sessions.md", @@ -33098,7 +33539,7 @@ "x-appwrite": { "method": "createSession", "group": "sessions", - "weight": 218, + "weight": 227, "cookies": false, "type": "", "demo": "users\/create-session.md", @@ -33153,7 +33594,7 @@ "x-appwrite": { "method": "deleteSessions", "group": "sessions", - "weight": 221, + "weight": 230, "cookies": false, "type": "", "demo": "users\/delete-sessions.md", @@ -33210,7 +33651,7 @@ "x-appwrite": { "method": "deleteSession", "group": "sessions", - "weight": 220, + "weight": 229, "cookies": false, "type": "", "demo": "users\/delete-session.md", @@ -33280,7 +33721,7 @@ "x-appwrite": { "method": "updateStatus", "group": "users", - "weight": 202, + "weight": 211, "cookies": false, "type": "", "demo": "users\/update-status.md", @@ -33358,7 +33799,7 @@ "x-appwrite": { "method": "listTargets", "group": "targets", - "weight": 200, + "weight": 209, "cookies": false, "type": "", "demo": "users\/list-targets.md", @@ -33431,7 +33872,7 @@ "x-appwrite": { "method": "createTarget", "group": "targets", - "weight": 192, + "weight": 200, "cookies": false, "type": "", "demo": "users\/create-target.md", @@ -33543,7 +33984,7 @@ "x-appwrite": { "method": "getTarget", "group": "targets", - "weight": 196, + "weight": 205, "cookies": false, "type": "", "demo": "users\/get-target.md", @@ -33612,7 +34053,7 @@ "x-appwrite": { "method": "updateTarget", "group": "targets", - "weight": 211, + "weight": 220, "cookies": false, "type": "", "demo": "users\/update-target.md", @@ -33703,7 +34144,7 @@ "x-appwrite": { "method": "deleteTarget", "group": "targets", - "weight": 223, + "weight": 232, "cookies": false, "type": "", "demo": "users\/delete-target.md", @@ -33774,7 +34215,7 @@ "x-appwrite": { "method": "createToken", "group": "sessions", - "weight": 219, + "weight": 228, "cookies": false, "type": "", "demo": "users\/create-token.md", @@ -33857,7 +34298,7 @@ "x-appwrite": { "method": "updateEmailVerification", "group": "users", - "weight": 209, + "weight": 218, "cookies": false, "type": "", "demo": "users\/update-email-verification.md", @@ -33937,7 +34378,7 @@ "x-appwrite": { "method": "updatePhoneVerification", "group": "users", - "weight": 204, + "weight": 213, "cookies": false, "type": "", "demo": "users\/update-phone-verification.md", @@ -38565,6 +39006,19 @@ }, "x-example": [] }, + "plan": { + "type": "object", + "additionalProperties": true, + "description": "User subscription plan details.", + "x-example": { + "id": "basic", + "name": "Basic", + "price": 999, + "currency": "usd", + "interval": "month", + "isFree": false + } + }, "accessedAt": { "type": "string", "description": "Most recent access date in ISO 8601 format. This attribute is only updated again after 24 hours.", @@ -38613,6 +39067,14 @@ "timezone": "UTC" }, "targets": [], + "plan": { + "id": "basic", + "name": "Basic", + "price": 999, + "currency": "usd", + "interval": "month", + "isFree": false + }, "accessedAt": "2020-10-15T06:38:00.000+00:00" } }, diff --git a/app/controllers/api/account.php b/app/controllers/api/account.php index 8aaa5283c4..7d2f64475d 100644 --- a/app/controllers/api/account.php +++ b/app/controllers/api/account.php @@ -5180,3 +5180,336 @@ App::delete('/v1/account/identities/:identityId') return $response->noContent(); }); + +App::get('/v1/account/subscription') + ->desc('Get account subscription') + ->groups(['api', 'account']) + ->label('scope', 'account') + ->label('sdk', new Method( + namespace: 'account', + group: 'subscription', + name: 'getSubscription', + description: '/docs/references/account/get-subscription.md', + auth: [AuthType::SESSION, AuthType::JWT], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_ANY, + ) + ] + )) + ->inject('response') + ->inject('user') + ->inject('project') + ->inject('dbForProject') + ->inject('dbForPlatform') + ->action(function (Response $response, Document $user, Document $project, Database $dbForProject, Database $dbForPlatform) { + if (!$project->getAttribute('authSubscriptionsEnabled')) { + throw new Exception(Exception::GENERAL_BAD_REQUEST, 'Subscriptions not enabled for this project'); + } + + $planId = (string) $user->getAttribute('planId', ''); + $plan = null; + + if ($planId !== '') { + $candidate = Authorization::skip(fn () => $dbForPlatform->findOne('auth_plans', [ + Query::equal('projectId', [$project->getId()]), + Query::equal('planId', [$planId]), + Query::equal('active', [true]) + ])); + $plan = ($candidate instanceof \Utopia\Database\Document && !$candidate->isEmpty()) ? $candidate : null; + } + + if (!$plan) { + $candidate = Authorization::skip(fn () => $dbForPlatform->findOne('auth_plans', [ + Query::equal('projectId', [$project->getId()]), + Query::equal('isDefault', [true]), + Query::equal('active', [true]) + ])); + $plan = ($candidate instanceof \Utopia\Database\Document && !$candidate->isEmpty()) ? $candidate : null; + } + + // Final safeguard: return default even if not explicitly marked active + if (!$plan) { + $candidate = Authorization::skip(fn () => $dbForPlatform->findOne('auth_plans', [ + Query::equal('projectId', [$project->getId()]), + Query::equal('isDefault', [true]) + ])); + $plan = ($candidate instanceof \Utopia\Database\Document && !$candidate->isEmpty()) ? $candidate : null; + } + + if ($plan) { + $planId = (string) $plan->getAttribute('planId'); + } + + + $response->dynamic(new Document([ + 'planId' => $planId !== '' ? $planId : null, + 'planName' => $plan ? $plan->getAttribute('name') : null, + 'status' => $user->getAttribute('subscriptionStatus', 'none'), + 'currentPeriodStart' => $user->getAttribute('subscriptionCurrentPeriodStart'), + 'currentPeriodEnd' => $user->getAttribute('subscriptionCurrentPeriodEnd'), + 'cancelAtPeriodEnd' => $user->getAttribute('subscriptionCancelAtPeriodEnd', false), + 'trialEnd' => $user->getAttribute('subscriptionTrialEnd') + ]), Response::MODEL_ANY); + }); + +App::post('/v1/account/subscription/checkout') + ->desc('Create checkout session') + ->groups(['api', 'account']) + ->label('scope', 'account') + ->label('sdk', new Method( + namespace: 'account', + group: 'subscription', + name: 'createSubscriptionCheckout', + description: '/docs/references/account/create-checkout.md', + auth: [AuthType::SESSION, AuthType::JWT], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_ANY, + ) + ] + )) + ->param('planId', '', new Text(128), 'Plan ID to subscribe to.') + ->param('successUrl', '', new URL(), 'URL to redirect on success.') + ->param('cancelUrl', '', new URL(), 'URL to redirect on cancel.') + ->inject('response') + ->inject('user') + ->inject('project') + ->inject('dbForProject') + ->inject('dbForPlatform') + ->action(function ( + string $planId, + string $successUrl, + string $cancelUrl, + Response $response, + Document $user, + Document $project, + Database $dbForProject, + Database $dbForPlatform + ) { + if (!$project->getAttribute('authSubscriptionsEnabled')) { + throw new Exception(Exception::GENERAL_BAD_REQUEST, 'Subscriptions not enabled for this project'); + } + + $plan = Authorization::skip(fn () => $dbForPlatform->findOne('auth_plans', [ + Query::equal('projectId', [$project->getId()]), + Query::equal('planId', [$planId]), + Query::equal('active', [true]) + ])); + + if (!$plan) { + throw new Exception(Exception::GENERAL_NOT_FOUND, 'Plan not found'); + } + + if ($plan->getAttribute('isFree')) { + throw new Exception(Exception::GENERAL_BAD_REQUEST, 'Cannot checkout for free plan'); + } + + $stripeService = new \Appwrite\Auth\Subscription\StripeService( + $project->getAttribute('authStripeSecretKey'), + $dbForProject, + $project + ); + + try { + $session = $stripeService->createCheckoutSession($user, $plan->getAttribute('stripePriceId'), $successUrl, $cancelUrl, (string) $plan->getAttribute('planId')); + + $response->dynamic(new Document([ + 'checkoutUrl' => $session['url'] + ]), Response::MODEL_ANY); + } catch (\Appwrite\Auth\Subscription\Exception\SubscriptionException $e) { + throw new Exception(Exception::GENERAL_SERVER_ERROR, $e->getMessage()); + } + }); + +App::post('/v1/account/subscription/portal') + ->desc('Create customer portal session') + ->groups(['api', 'account']) + ->label('scope', 'account') + ->label('sdk', new Method( + namespace: 'account', + group: 'subscription', + name: 'createSubscriptionPortal', + description: '/docs/references/account/create-portal.md', + auth: [AuthType::SESSION, AuthType::JWT], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_ANY, + ) + ] + )) + ->param('returnUrl', '', new URL(), 'URL to return to.') + ->inject('response') + ->inject('user') + ->inject('project') + ->inject('dbForProject') + ->action(function ( + string $returnUrl, + Response $response, + Document $user, + Document $project, + Database $dbForProject + ) { + if (!$project->getAttribute('authSubscriptionsEnabled')) { + throw new Exception(Exception::GENERAL_BAD_REQUEST, 'Subscriptions not enabled for this project'); + } + + $customerId = $user->getAttribute('stripeCustomerId'); + + if (!$customerId) { + throw new Exception(Exception::GENERAL_BAD_REQUEST, 'No active subscription found'); + } + + $stripeService = new \Appwrite\Auth\Subscription\StripeService( + $project->getAttribute('authStripeSecretKey'), + $dbForProject, + $project + ); + + try { + $session = $stripeService->createPortalSession($customerId, $returnUrl); + + $response->dynamic(new Document([ + 'portalUrl' => $session['url'] + ]), Response::MODEL_ANY); + } catch (\Appwrite\Auth\Subscription\Exception\SubscriptionException $e) { + throw new Exception(Exception::GENERAL_SERVER_ERROR, $e->getMessage()); + } + }); + +App::put('/v1/account/subscription') + ->desc('Update subscription') + ->groups(['api', 'account']) + ->label('scope', 'account') + ->label('sdk', new Method( + namespace: 'account', + group: 'subscription', + name: 'updateSubscription', + description: '/docs/references/account/update-subscription.md', + auth: [AuthType::SESSION, AuthType::JWT], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_ANY, + ) + ] + )) + ->param('planId', '', new Text(128), 'New plan ID.') + ->inject('response') + ->inject('user') + ->inject('project') + ->inject('dbForProject') + ->inject('dbForPlatform') + ->action(function ( + string $planId, + Response $response, + Document $user, + Document $project, + Database $dbForProject, + Database $dbForPlatform + ) { + if (!$project->getAttribute('authSubscriptionsEnabled')) { + throw new Exception(Exception::GENERAL_BAD_REQUEST, 'Subscriptions not enabled for this project'); + } + + $subscriptionId = $user->getAttribute('stripeSubscriptionId'); + + if (!$subscriptionId) { + throw new Exception(Exception::GENERAL_BAD_REQUEST, 'No active subscription found'); + } + + $plan = Authorization::skip(fn () => $dbForPlatform->findOne('auth_plans', [ + Query::equal('projectId', [$project->getId()]), + Query::equal('planId', [$planId]), + Query::equal('active', [true]) + ])); + + if (!$plan) { + throw new Exception(Exception::GENERAL_NOT_FOUND, 'Plan not found'); + } + + $stripeService = new \Appwrite\Auth\Subscription\StripeService( + $project->getAttribute('authStripeSecretKey'), + $dbForProject, + $project + ); + + try { + $subscription = $stripeService->updateSubscription( + $subscriptionId, + $plan->getAttribute('stripePriceId') + ); + + $stripeService->syncSubscriptionStatus($user->getId(), $subscription); + + $response->dynamic(new Document([ + 'success' => true + ]), Response::MODEL_ANY); + } catch (\Appwrite\Auth\Subscription\Exception\SubscriptionException $e) { + throw new Exception(Exception::GENERAL_SERVER_ERROR, $e->getMessage()); + } + }); + +App::delete('/v1/account/subscription') + ->desc('Cancel subscription') + ->groups(['api', 'account']) + ->label('scope', 'account') + ->label('sdk', new Method( + namespace: 'account', + group: 'subscription', + name: 'cancelSubscription', + description: '/docs/references/account/cancel-subscription.md', + auth: [AuthType::SESSION, AuthType::JWT], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_ANY, + ) + ] + )) + ->param('atPeriodEnd', true, new Boolean(), 'Cancel at period end.', true) + ->inject('response') + ->inject('user') + ->inject('project') + ->inject('dbForProject') + ->action(function ( + bool $atPeriodEnd, + Response $response, + Document $user, + Document $project, + Database $dbForProject + ) { + if (!$project->getAttribute('authSubscriptionsEnabled')) { + throw new Exception(Exception::GENERAL_BAD_REQUEST, 'Subscriptions not enabled for this project'); + } + + $subscriptionId = $user->getAttribute('stripeSubscriptionId'); + + if (!$subscriptionId) { + throw new Exception(Exception::GENERAL_BAD_REQUEST, 'No active subscription found'); + } + + $stripeService = new \Appwrite\Auth\Subscription\StripeService( + $project->getAttribute('authStripeSecretKey'), + $dbForProject, + $project + ); + + try { + $subscription = $stripeService->cancelSubscription($subscriptionId, $atPeriodEnd); + + if ($atPeriodEnd) { + $stripeService->syncSubscriptionStatus($user->getId(), $subscription); + } + + $response->dynamic(new Document([ + 'success' => true, + 'cancelAtPeriodEnd' => $atPeriodEnd + ]), Response::MODEL_ANY); + } catch (\Appwrite\Auth\Subscription\Exception\SubscriptionException $e) { + throw new Exception(Exception::GENERAL_SERVER_ERROR, $e->getMessage()); + } + }); diff --git a/app/controllers/api/auth-plans.php b/app/controllers/api/auth-plans.php new file mode 100644 index 0000000000..f31cb64428 --- /dev/null +++ b/app/controllers/api/auth-plans.php @@ -0,0 +1,388 @@ +desc('Create auth plan') + ->groups(['api']) + ->label('scope', 'projects.write') + ->label('sdk', new Method( + namespace: 'projects', + group: 'authPlans', + name: 'createAuthPlan', + description: '/docs/references/projects/create-auth-plan.md', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_CREATED, + model: Response::MODEL_ANY, + ) + ] + )) + ->param('projectId', '', new UID(), 'Project unique ID.') + ->param('planId', '', new Text(128), 'Plan unique ID.') + ->param('name', '', new Text(128), 'Plan name.') + ->param('price', 0, new Integer(true), 'Price in cents.') + ->param('currency', '', new Text(3), 'Currency code (3 letters).') + ->param('interval', null, new WhiteList(['month', 'year', 'week', 'day'], true), 'Billing interval.', true) + ->param('description', '', new Text(256), 'Plan description.', true) + ->param('features', [], new ArrayList(new Text(256)), 'Plan features list.', true) + ->param('maxUsers', null, new Integer(true), 'Maximum users allowed.', true) + ->param('isDefault', false, new Boolean(), 'Is this the default plan.', true) + ->param('isFree', false, new Boolean(), 'Is this a free plan.', true) + ->inject('response') + ->inject('dbForPlatform') + ->inject('dbForProject') + ->action(function ( + string $projectId, + string $planId, + string $name, + int $price, + string $currency, + ?string $interval, + string $description, + array $features, + ?int $maxUsers, + bool $isDefault, + bool $isFree, + Response $response, + Database $dbForPlatform, + Database $dbForProject + ) { + $project = $dbForPlatform->getDocument('projects', $projectId); + + if ($project->isEmpty()) { + throw new Exception(Exception::PROJECT_NOT_FOUND); + } + + if (!$project->getAttribute('authSubscriptionsEnabled')) { + throw new Exception(Exception::GENERAL_BAD_REQUEST, 'Auth subscriptions not configured for this project'); + } + + $stripeProductId = null; + $stripePriceId = null; + + if (!$isFree) { + try { + $stripeService = new StripeService( + $project->getAttribute('authStripeSecretKey'), + $dbForProject, + $project + ); + + $product = $stripeService->createProduct($name, $description, $planId); + $stripeProductId = $product['id']; + + $priceData = $stripeService->createPrice($stripeProductId, $price, $currency, $interval, $planId); + $stripePriceId = $priceData['id']; + } catch (SubscriptionException $e) { + throw new Exception(Exception::GENERAL_SERVER_ERROR, $e->getMessage()); + } + } + + if ($isDefault) { + $existingDefault = $dbForPlatform->findOne('auth_plans', [ + Query::equal('projectId', [$projectId]), + Query::equal('isDefault', [true]) + ]); + + if ($existingDefault instanceof Document) { + $existingId = $existingDefault->getId(); + if (!empty($existingId)) { + $dbForPlatform->updateDocument('auth_plans', $existingId, $existingDefault + ->setAttribute('isDefault', false)); + } + } + } + + $plan = $dbForPlatform->createDocument('auth_plans', new Document([ + '$id' => ID::unique(), + 'projectInternalId' => $project->getSequence(), + 'projectId' => $projectId, + 'planId' => $planId, + 'name' => $name, + 'description' => $description, + 'stripeProductId' => $stripeProductId, + 'stripePriceId' => $stripePriceId, + 'price' => $price, + 'currency' => $currency, + 'interval' => $interval, + 'features' => $features, + 'isDefault' => $isDefault, + 'isFree' => $isFree, + 'maxUsers' => $maxUsers, + 'active' => true, + 'search' => implode(' ', [$planId, $name, $description]) + ])); + + $response->setStatusCode(Response::STATUS_CODE_CREATED); + $response->dynamic($plan, Response::MODEL_ANY); + }); + +App::get('/v1/projects/:projectId/auth/plans') + ->desc('List auth plans') + ->groups(['api']) + ->label('scope', 'projects.read') + ->label('sdk', new Method( + namespace: 'projects', + group: 'authPlans', + name: 'listAuthPlans', + description: '/docs/references/projects/list-auth-plans.md', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_DOCUMENT_LIST, + ) + ] + )) + ->param('projectId', '', new UID(), 'Project unique ID.') + ->param('queries', [], new ArrayList(new Text(256)), 'Array of query strings.', true) + ->inject('response') + ->inject('dbForPlatform') + ->action(function (string $projectId, array $queries, Response $response, Database $dbForPlatform) { + $project = $dbForPlatform->getDocument('projects', $projectId); + + if ($project->isEmpty()) { + throw new Exception(Exception::PROJECT_NOT_FOUND); + } + + $queries[] = Query::equal('projectId', [$projectId]); + $queries[] = Query::equal('active', [true]); + + $plans = $dbForPlatform->find('auth_plans', $queries); + + $response->dynamic(new Document([ + 'total' => count($plans), + 'documents' => $plans + ]), Response::MODEL_DOCUMENT_LIST); + }); + +App::get('/v1/projects/:projectId/auth/plans/:planId') + ->desc('Get auth plan') + ->groups(['api']) + ->label('scope', 'projects.read') + ->label('sdk', new Method( + namespace: 'projects', + group: 'authPlans', + name: 'getAuthPlan', + description: '/docs/references/projects/get-auth-plan.md', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_ANY, + ) + ] + )) + ->param('projectId', '', new UID(), 'Project unique ID.') + ->param('planId', '', new Text(128), 'Plan ID.') + ->inject('response') + ->inject('dbForPlatform') + ->inject('dbForProject') + ->action(function (string $projectId, string $planId, Response $response, Database $dbForPlatform, Database $dbForProject) { + $project = $dbForPlatform->getDocument('projects', $projectId); + + if ($project->isEmpty()) { + throw new Exception(Exception::PROJECT_NOT_FOUND); + } + + $plan = $dbForPlatform->findOne('auth_plans', [ + Query::equal('projectId', [$projectId]), + Query::equal('planId', [$planId]) + ]); + + if (!$plan || !$plan->getAttribute('active', true)) { + throw new Exception(Exception::GENERAL_NOT_FOUND, 'Plan not found'); + } + + $response->dynamic($plan, Response::MODEL_ANY); + }); + +App::put('/v1/projects/:projectId/auth/plans/:planId') + ->desc('Update auth plan') + ->groups(['api']) + ->label('scope', 'projects.write') + ->label('sdk', new Method( + namespace: 'projects', + group: 'authPlans', + name: 'updateAuthPlan', + description: '/docs/references/projects/update-auth-plan.md', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_ANY, + ) + ] + )) + ->param('projectId', '', new UID(), 'Project unique ID.') + ->param('planId', '', new Text(128), 'Plan ID.') + ->param('name', null, new Text(128), 'Plan name.', true) + ->param('description', null, new Text(256), 'Plan description.', true) + ->param('features', null, new ArrayList(new Text(256)), 'Plan features list.', true) + ->param('maxUsers', null, new Integer(true), 'Maximum users allowed.', true) + ->param('isDefault', null, new Boolean(), 'Is this the default plan.', true) + ->inject('response') + ->inject('dbForPlatform') + ->action(function ( + string $projectId, + string $planId, + ?string $name, + ?string $description, + ?array $features, + ?int $maxUsers, + ?bool $isDefault, + Response $response, + Database $dbForPlatform + ) { + $project = $dbForPlatform->getDocument('projects', $projectId); + + if ($project->isEmpty()) { + throw new Exception(Exception::PROJECT_NOT_FOUND); + } + + $plan = $dbForPlatform->findOne('auth_plans', [ + Query::equal('projectId', [$projectId]), + Query::equal('planId', [$planId]) + ]); + + if (!$plan) { + throw new Exception(Exception::GENERAL_NOT_FOUND, 'Plan not found'); + } + + if ($plan->getAttribute('isDefault', false) === true) { + throw new Exception(Exception::GENERAL_BAD_REQUEST, 'Cannot delete default plan'); + } + + if ($isDefault === true) { + $existingDefault = $dbForPlatform->findOne('auth_plans', [ + Query::equal('projectId', [$projectId]), + Query::equal('isDefault', [true]), + Query::notEqual('$id', [$plan->getId()]) + ]); + + if ($existingDefault) { + $dbForPlatform->updateDocument('auth_plans', $existingDefault->getId(), $existingDefault + ->setAttribute('isDefault', false)); + } + } + + // Prevent removing the only default plan + if ($isDefault === false && $plan->getAttribute('isDefault', false) === true) { + $otherDefault = $dbForPlatform->findOne('auth_plans', [ + Query::equal('projectId', [$projectId]), + Query::equal('isDefault', [true]), + Query::notEqual('$id', [$plan->getId()]) + ]); + if (!$otherDefault) { + throw new Exception(Exception::GENERAL_BAD_REQUEST, 'Cannot unset default plan without another default'); + } + } + + if ($name !== null) $plan->setAttribute('name', $name); + if ($description !== null) $plan->setAttribute('description', $description); + if ($features !== null) $plan->setAttribute('features', $features); + if ($maxUsers !== null) $plan->setAttribute('maxUsers', $maxUsers); + if ($isDefault !== null) $plan->setAttribute('isDefault', $isDefault); + + $plan->setAttribute('search', implode(' ', [ + $plan->getAttribute('planId'), + $plan->getAttribute('name'), + $plan->getAttribute('description') + ])); + + $plan = $dbForPlatform->updateDocument('auth_plans', $plan->getId(), $plan); + + $response->dynamic($plan, Response::MODEL_ANY); + }); + +App::delete('/v1/projects/:projectId/auth/plans/:planId') + ->desc('Delete auth plan') + ->groups(['api']) + ->label('scope', 'projects.write') + ->label('sdk', new Method( + namespace: 'projects', + group: 'authPlans', + name: 'deleteAuthPlan', + description: '/docs/references/projects/delete-auth-plan.md', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_NOCONTENT, + model: Response::MODEL_NONE, + ) + ] + )) + ->param('projectId', '', new UID(), 'Project unique ID.') + ->param('planId', '', new Text(128), 'Plan ID.') + ->inject('response') + ->inject('dbForPlatform') + ->inject('dbForProject') + ->action(function (string $projectId, string $planId, Response $response, Database $dbForPlatform, Database $dbForProject) { + $project = $dbForPlatform->getDocument('projects', $projectId); + + if ($project->isEmpty()) { + throw new Exception(Exception::PROJECT_NOT_FOUND); + } + + $plan = $dbForPlatform->findOne('auth_plans', [ + Query::equal('projectId', [$projectId]), + Query::equal('planId', [$planId]) + ]); + + if (!$plan) { + throw new Exception(Exception::GENERAL_NOT_FOUND, 'Plan not found'); + } + + // Archive on Stripe first if non-free and keys configured + if (!$plan->getAttribute('isFree', false) && $project->getAttribute('authSubscriptionsEnabled')) { + try { + $stripeService = new StripeService( + $project->getAttribute('authStripeSecretKey'), + $dbForProject, + $project + ); + $priceId = $plan->getAttribute('stripePriceId'); + $productId = $plan->getAttribute('stripeProductId'); + if ($priceId) { + // Deactivate price + $stripeServicePrivate = new \ReflectionClass(StripeService::class); + $method = $stripeServicePrivate->getMethod('makeRequest'); + $method->setAccessible(true); + $method->invoke($stripeService, 'POST', '/prices/' . $priceId, ['active' => 'false']); + } + if ($productId) { + // Deactivate product + $stripeServicePrivate = new \ReflectionClass(StripeService::class); + $method = $stripeServicePrivate->getMethod('makeRequest'); + $method->setAccessible(true); + $method->invoke($stripeService, 'POST', '/products/' . $productId, ['active' => 'false']); + } + } catch (\Throwable $_) { + // Swallow Stripe errors on delete to ensure local cleanup + } + } + + $dbForPlatform->deleteDocument('auth_plans', $plan->getId()); + + $response->noContent(); + }); \ No newline at end of file diff --git a/app/controllers/api/projects.php b/app/controllers/api/projects.php index ea3a00dcb6..4ee15466a5 100644 --- a/app/controllers/api/projects.php +++ b/app/controllers/api/projects.php @@ -3,6 +3,10 @@ use Ahc\Jwt\JWT; use Appwrite\Auth\Auth; use Appwrite\Auth\Validator\MockNumber; +use Appwrite\Auth\Validator\StripeKey; +use Appwrite\Auth\Validator\PlanData; +use Appwrite\Auth\Subscription\StripeService; +use Appwrite\Auth\Subscription\Exception\SubscriptionException; use Appwrite\Event\Delete; use Appwrite\Event\Mail; use Appwrite\Event\Validator\Event; @@ -321,7 +325,8 @@ App::get('/v1/projects/:projectId') ->param('projectId', '', new UID(), 'Project unique ID.') ->inject('response') ->inject('dbForPlatform') - ->action(function (string $projectId, Response $response, Database $dbForPlatform) { + ->inject('dbForProject') + ->action(function (string $projectId, Response $response, Database $dbForPlatform, Database $dbForProject) { $project = $dbForPlatform->getDocument('projects', $projectId); @@ -1236,7 +1241,8 @@ App::get('/v1/projects/:projectId/webhooks') ->param('projectId', '', new UID(), 'Project unique ID.') ->inject('response') ->inject('dbForPlatform') - ->action(function (string $projectId, Response $response, Database $dbForPlatform) { + ->inject('dbForProject') + ->action(function (string $projectId, Response $response, Database $dbForPlatform, Database $dbForProject) { $project = $dbForPlatform->getDocument('projects', $projectId); @@ -2638,3 +2644,175 @@ App::patch('/v1/projects/:projectId/auth/session-invalidation') $response->dynamic($project, Response::MODEL_PROJECT); }); + +App::put('/v1/projects/:projectId/auth/subscriptions') + ->desc('Configure auth subscriptions') + ->groups(['api']) + ->label('scope', 'projects.write') + ->label('sdk', new Method( + namespace: 'projects', + group: 'auth', + name: 'configureSubscriptions', + description: '/docs/references/projects/configure-subscriptions.md', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_PROJECT, + ) + ] + )) + ->param('projectId', '', new UID(), 'Project unique ID.') + ->param('stripeSecretKey', '', new StripeKey(), 'Stripe secret key.') + ->inject('response') + ->inject('dbForPlatform') + ->inject('dbForProject') + ->action(function (string $projectId, string $stripeSecretKey, Response $response, Database $dbForPlatform, Database $dbForProject) { + $project = $dbForPlatform->getDocument('projects', $projectId); + + if ($project->isEmpty()) { + throw new Exception(Exception::PROJECT_NOT_FOUND); + } + + try { + $stripeService = new StripeService($stripeSecretKey, $dbForProject, $project); + $config = $stripeService->initializeAccount(); + + $project = $dbForPlatform->updateDocument('projects', $project->getId(), $project + ->setAttribute('authSubscriptionsEnabled', true) + ->setAttribute('authStripeSecretKey', $stripeSecretKey) + ->setAttribute('authStripePublishableKey', $config['publishableKey']) + ->setAttribute('authStripeWebhookSecret', $config['webhookSecret']) + ->setAttribute('authStripeWebhookEndpointId', $config['webhookEndpointId']) + ->setAttribute('authStripeCurrency', $config['currency'])); + + // Ensure a default free plan exists + $existingDefault = $dbForPlatform->findOne('auth_plans', [ + \Utopia\Database\Query::equal('projectId', [$projectId]), + \Utopia\Database\Query::equal('isDefault', [true]) + ]); + if (!$existingDefault) { + $dbForPlatform->createDocument('auth_plans', new \Utopia\Database\Document([ + '$id' => null, + 'projectInternalId' => $project->getSequence(), + 'projectId' => $projectId, + 'planId' => 'free', + 'name' => 'Free', + 'description' => 'Default free plan', + 'stripeProductId' => null, + 'stripePriceId' => null, + 'price' => 0, + 'currency' => $config['currency'], + 'interval' => null, + 'features' => [], + 'isDefault' => true, + 'isFree' => true, + 'maxUsers' => null, + 'active' => true, + 'search' => 'free Default free plan' + ])); + } + + $response->dynamic($project, Response::MODEL_PROJECT); + } catch (SubscriptionException $e) { + throw new Exception(Exception::GENERAL_SERVER_ERROR, $e->getMessage()); + } + }); + +App::get('/v1/projects/:projectId/auth/subscriptions') + ->desc('Get auth subscription configuration') + ->groups(['api']) + ->label('scope', 'projects.read') + ->label('sdk', new Method( + namespace: 'projects', + group: 'auth', + name: 'getSubscriptionsConfig', + description: '/docs/references/projects/get-subscriptions-config.md', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_PROJECT, + ) + ] + )) + ->param('projectId', '', new UID(), 'Project unique ID.') + ->inject('response') + ->inject('dbForPlatform') + ->action(function (string $projectId, Response $response, Database $dbForPlatform) { + $project = $dbForPlatform->getDocument('projects', $projectId); + + if ($project->isEmpty()) { + throw new Exception(Exception::PROJECT_NOT_FOUND); + } + + $response->dynamic(new Document([ + 'enabled' => $project->getAttribute('authSubscriptionsEnabled', false), + 'publishableKey' => $project->getAttribute('authStripePublishableKey'), + 'currency' => $project->getAttribute('authStripeCurrency'), + ]), Response::MODEL_ANY); + }); + +App::delete('/v1/projects/:projectId/auth/subscriptions') + ->desc('Remove auth subscription configuration') + ->groups(['api']) + ->label('scope', 'projects.write') + ->label('sdk', new Method( + namespace: 'projects', + group: 'auth', + name: 'removeSubscriptionsConfig', + description: '/docs/references/projects/remove-subscriptions-config.md', + auth: [AuthType::ADMIN], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_PROJECT, + ) + ] + )) + ->param('projectId', '', new UID(), 'Project unique ID.') + ->inject('response') + ->inject('dbForPlatform') + ->inject('dbForProject') + ->action(function (string $projectId, Response $response, Database $dbForPlatform, Database $dbForProject) { + $project = $dbForPlatform->getDocument('projects', $projectId); + + if ($project->isEmpty()) { + throw new Exception(Exception::PROJECT_NOT_FOUND); + } + + if ($project->getAttribute('authSubscriptionsEnabled')) { + try { + $stripe = new \Appwrite\Auth\Subscription\StripeService( + $project->getAttribute('authStripeSecretKey'), + $dbForProject, + $project, + $dbForPlatform + ); + $endpointId = $project->getAttribute('authStripeWebhookEndpointId'); + if (!empty($endpointId)) { + $stripe->deleteWebhookEndpoint($endpointId); + } + $plans = $dbForPlatform->find('auth_plans', [ + \Utopia\Database\Query::equal('projectId', [$projectId]) + ]); + foreach ($plans as $plan) { + $priceId = $plan->getAttribute('stripePriceId'); + $productId = $plan->getAttribute('stripeProductId'); + try { if ($priceId) { $stripe->deactivatePrice($priceId); } } catch (\Throwable $_) {} + try { if ($productId) { $stripe->deactivateProduct($productId); } } catch (\Throwable $_) {} + $dbForPlatform->deleteDocument('auth_plans', $plan->getId()); + } + } catch (\Throwable $_) {} + } + + $project = $dbForPlatform->updateDocument('projects', $project->getId(), $project + ->setAttribute('authSubscriptionsEnabled', false) + ->setAttribute('authStripeSecretKey', null) + ->setAttribute('authStripePublishableKey', null) + ->setAttribute('authStripeWebhookSecret', null) + ->setAttribute('authStripeWebhookEndpointId', null) + ->setAttribute('authStripeCurrency', null)); + + $response->dynamic($project, Response::MODEL_PROJECT); + }); diff --git a/app/controllers/api/users.php b/app/controllers/api/users.php index 5498a33bf5..c54c4ed186 100644 --- a/app/controllers/api/users.php +++ b/app/controllers/api/users.php @@ -607,7 +607,9 @@ App::get('/v1/users') ->param('search', '', new Text(256), 'Search term to filter your list results. Max length: 256 chars.', true) ->inject('response') ->inject('dbForProject') - ->action(function (array $queries, string $search, Response $response, Database $dbForProject) { + ->inject('dbForPlatform') + ->inject('project') + ->action(function (array $queries, string $search, Response $response, Database $dbForProject, Database $dbForPlatform, Document $project) { try { $queries = Query::parseQueries($queries); @@ -658,6 +660,49 @@ App::get('/v1/users') } }, ['subQueryAuthenticators', 'subQuerySessions', 'subQueryTokens', 'subQueryChallenges', 'subQueryMemberships']); + $planIds = []; + foreach ($users as $u) { + $pid = (string) $u->getAttribute('planId', ''); + if ($pid !== '') { + $planIds[$pid] = true; + } + } + $planMap = []; + if (!empty($planIds)) { + $plans = $dbForPlatform->find('auth_plans', [ + Query::equal('projectId', [$project->getId()]), + Query::equal('planId', array_keys($planIds)), + Query::equal('active', [true]) + ]); + foreach ($plans as $p) { + $planMap[(string) $p->getAttribute('planId')] = $p; + } + } + $defaultPlan = $dbForPlatform->findOne('auth_plans', [ + Query::equal('projectId', [$project->getId()]), + Query::equal('isDefault', [true]), + Query::equal('active', [true]) + ]); + foreach ($users as $u) { + $pid = (string) $u->getAttribute('planId', ''); + $p = null; + if ($pid !== '' && isset($planMap[$pid])) { + $p = $planMap[$pid]; + } elseif ($defaultPlan) { + $p = $defaultPlan; + } + if ($p) { + $u->setAttribute('plan', [ + 'id' => $p->getAttribute('planId'), + 'name' => $p->getAttribute('name'), + 'price' => $p->getAttribute('price'), + 'currency' => $p->getAttribute('currency'), + 'interval' => $p->getAttribute('interval'), + 'isFree' => $p->getAttribute('isFree', false) + ]); + } + } + $response->dynamic(new Document([ 'users' => $users, 'total' => $total, @@ -684,7 +729,9 @@ App::get('/v1/users/:userId') ->param('userId', '', new UID(), 'User ID.') ->inject('response') ->inject('dbForProject') - ->action(function (string $userId, Response $response, Database $dbForProject) { + ->inject('dbForPlatform') + ->inject('project') + ->action(function (string $userId, Response $response, Database $dbForProject, Database $dbForPlatform, Document $project) { $user = $dbForProject->getDocument('users', $userId); @@ -692,6 +739,131 @@ App::get('/v1/users/:userId') throw new Exception(Exception::USER_NOT_FOUND); } + $pid = (string) $user->getAttribute('planId', ''); + $plan = null; + if ($pid !== '') { + $plan = $dbForPlatform->findOne('auth_plans', [ + Query::equal('projectId', [$project->getId()]), + Query::equal('planId', [$pid]), + Query::equal('active', [true]) + ]); + } else { + $plan = $dbForPlatform->findOne('auth_plans', [ + Query::equal('projectId', [$project->getId()]), + Query::equal('isDefault', [true]), + Query::equal('active', [true]) + ]); + } + if ($plan) { + $user->setAttribute('plan', [ + 'id' => $plan->getAttribute('planId'), + 'name' => $plan->getAttribute('name'), + 'price' => $plan->getAttribute('price'), + 'currency' => $plan->getAttribute('currency'), + 'interval' => $plan->getAttribute('interval'), + 'isFree' => $plan->getAttribute('isFree', false) + ]); + } + + $response->dynamic($user, Response::MODEL_USER); + }); + +App::post('/v1/users/:userId/plan') + ->desc('Assign plan to user (admin)') + ->groups(['api', 'users']) + ->label('scope', 'users.write') + ->label('sdk', new Method( + namespace: 'users', + group: 'users', + name: 'assignPlan', + description: '/docs/references/users/assign-plan.md', + auth: [AuthType::KEY], + responses: [ + new SDKResponse( + code: Response::STATUS_CODE_OK, + model: Response::MODEL_USER, + ) + ] + )) + ->param('userId', '', new UID(), 'User ID.') + ->param('planId', '', new Text(128), 'Plan ID to assign.') + ->param('complimentary', true, new Boolean(), 'If true, create a complimentary Stripe subscription for one billing interval.', true) + ->inject('response') + ->inject('project') + ->inject('dbForProject') + ->inject('dbForPlatform') + ->action(function (string $userId, string $planId, bool $complimentary, Response $response, Document $project, Database $dbForProject, Database $dbForPlatform) { + $user = $dbForProject->getDocument('users', $userId); + if ($user->isEmpty()) { + throw new Exception(Exception::USER_NOT_FOUND); + } + + $plan = $dbForPlatform->findOne('auth_plans', [ + Query::equal('projectId', [$project->getId()]), + Query::equal('planId', [$planId]), + Query::equal('active', [true]) + ]); + if (!$plan) { + throw new Exception(Exception::GENERAL_NOT_FOUND, 'Plan not found'); + } + + $user->setAttribute('planId', $planId); + $now = time(); + $interval = (string) $plan->getAttribute('interval', 'month'); + $seconds = match ($interval) { + 'day' => 86400, + 'week' => 86400 * 7, + 'year' => 86400 * 365, + default => 86400 * 30, + }; + $user->setAttribute('subscriptionStatus', 'active'); + $user->setAttribute('subscriptionCurrentPeriodStart', DateTime::format(new \DateTime('@' . $now))); + $user->setAttribute('subscriptionCurrentPeriodEnd', DateTime::format(new \DateTime('@' . ($now + $seconds)))); + $user->setAttribute('subscriptionCancelAtPeriodEnd', true); + $user->setAttribute('subscriptionTrialEnd', DateTime::format(new \DateTime('@' . ($now + $seconds)))); + + if ($plan->getAttribute('isFree', false) && $project->getAttribute('authSubscriptionsEnabled')) { + $stripe = new \Appwrite\Auth\Subscription\StripeService( + $project->getAttribute('authStripeSecretKey'), + $dbForProject, + $project + ); + $subscriptionId = (string) $user->getAttribute('stripeSubscriptionId', ''); + if ($subscriptionId === '') { + $customerId = (string) $user->getAttribute('stripeCustomerId', ''); + if ($customerId !== '') { + try { + $found = $stripe->findActiveSubscriptionId($customerId); + if (!empty($found)) { + $subscriptionId = (string) $found; + } + } catch (\Throwable $_) { + } + } + } + if ($subscriptionId !== '') { + try { + $stripe->cancelSubscription($subscriptionId, false); + } catch (\Throwable $_) { + } + $user->setAttribute('stripeSubscriptionId', null); + } + } elseif ($complimentary && !$plan->getAttribute('isFree', false) && $project->getAttribute('authSubscriptionsEnabled')) { + $stripe = new \Appwrite\Auth\Subscription\StripeService( + $project->getAttribute('authStripeSecretKey'), + $dbForProject, + $project + ); + $customerId = (string) $user->getAttribute('stripeCustomerId', ''); + if ($customerId === '') { + $customerId = $stripe->ensureCustomer($user); + $user->setAttribute('stripeCustomerId', $customerId); + } + $stripe->createComplimentarySubscription($customerId, (string) $plan->getAttribute('stripePriceId'), $interval, $user->getId()); + } + + $user = $dbForProject->updateDocument('users', $userId, $user); + $response->dynamic($user, Response::MODEL_USER); }); diff --git a/app/controllers/general.php b/app/controllers/general.php index 8abca96742..6d9de60e96 100644 --- a/app/controllers/general.php +++ b/app/controllers/general.php @@ -51,6 +51,7 @@ use Utopia\Logger\Logger; use Utopia\Platform\Service; use Utopia\System\System; use Utopia\Validator\Text; +use Utopia\Database\Validator\UID; Config::setParam('domainVerification', false); Config::setParam('cookieDomain', 'localhost'); @@ -191,7 +192,7 @@ function router(App $utopia, Database $dbForPlatform, callable $getProjectDB, Sw $resourceId = $rule->getAttribute('deploymentResourceId', ''); $type = ($resourceType === 'site') ? 'sites' : 'functions'; $exception = new AppwriteException(AppwriteException::DEPLOYMENT_NOT_FOUND, view: $errorView); - $exception->addCTA('View deployments', $url . '/console/project-' . $project->getAttribute('region', 'default') . '-' . $projectId . '/' . $type . '/' . $resourceType . '-' . $resourceId); + $exception->addCTA('View deployments', $url . '/console/project-' . $project->getAttribute('region', 'default') . '-' . $project->getId() . '/' . $type . '/' . $resourceType . '-' . $resourceId); throw $exception; } @@ -1640,3 +1641,61 @@ if (!empty(Method::getErrors())) { $platform = new Appwrite(); $platform->init(Service::TYPE_HTTP); + +App::post('/v1/webhooks/stripe/auth/:projectId') + ->desc('Handle Stripe webhook for auth subscriptions') + ->groups(['webhooks']) + ->label('scope', 'public') + ->inject('request') + ->inject('response') + ->inject('dbForPlatform') + ->inject('getProjectDB') + ->param('projectId', '', new UID(), 'Project unique ID.') + ->action(function (string $projectId, $request, $response, $dbForPlatform, callable $getProjectDB) { + $payload = $request->getRawPayload(); + $signature = $request->getHeader('stripe-signature') ?: $request->getHeader('Stripe-Signature') ?: ($_SERVER['HTTP_STRIPE_SIGNATURE'] ?? ''); + + if (empty($signature)) { + throw new AppwriteException(AppwriteException::GENERAL_BAD_REQUEST, 'Missing Stripe signature'); + } + + $event = json_decode($payload, true); + + $project = Authorization::skip(fn () => $dbForPlatform->getDocument('projects', $projectId)); + if ($project->isEmpty()) { + throw new AppwriteException(AppwriteException::PROJECT_NOT_FOUND); + } + $dbForProject = $getProjectDB($project); + + $webhookSecret = $project->getAttribute('authStripeWebhookSecret'); + if (empty($webhookSecret)) { + throw new AppwriteException(AppwriteException::GENERAL_BAD_REQUEST, 'Webhook not configured'); + } + + $tmpService = new \Appwrite\Auth\Subscription\StripeService( + $project->getAttribute('authStripeSecretKey'), + $dbForProject, + $project + ); + if (!$tmpService->verifyWebhookSignature($payload, $signature, $webhookSecret)) { + throw new AppwriteException(AppwriteException::GENERAL_ACCESS_FORBIDDEN, 'Invalid webhook signature'); + } + + $platformDb = $dbForPlatform; + $stripeService = new \Appwrite\Auth\Subscription\StripeService( + $project->getAttribute('authStripeSecretKey'), + $dbForProject, + $project, + $platformDb + ); + + + + try { + $stripeService->handleWebhook($event ?? []); + $response->json(['success' => true]); + } catch (\Appwrite\Auth\Subscription\Exception\SubscriptionException $e) { + throw new AppwriteException(AppwriteException::GENERAL_SERVER_ERROR, $e->getMessage()); + } + }); + diff --git a/docker-compose.yml b/docker-compose.yml index da6362b4c4..bec15852ec 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -213,6 +213,7 @@ services: - _APP_DATABASE_SHARED_NAMESPACE - _APP_FUNCTIONS_CREATION_ABUSE_LIMIT - _APP_CUSTOM_DOMAIN_DENY_LIST + - _APP_AUTH_STRIPE_WEBHOOK_URL extra_hosts: - "host.docker.internal:host-gateway" diff --git a/src/Appwrite/Auth/Subscription/Exception/SubscriptionException.php b/src/Appwrite/Auth/Subscription/Exception/SubscriptionException.php new file mode 100644 index 0000000000..d3a96a73c5 --- /dev/null +++ b/src/Appwrite/Auth/Subscription/Exception/SubscriptionException.php @@ -0,0 +1,13 @@ +apiKey = $apiKey; + $this->database = $database; + $this->project = $project; + $this->platformDb = $platformDb; + } + + /** + * Initialize Stripe account for the project + * @throws SubscriptionException + */ + public function initializeAccount(): array + { + $account = $this->getAccount(); + + $currency = $account['default_currency'] ?? 'usd'; + + $webhookEndpoint = $this->createWebhookEndpoint(); + + return [ + 'currency' => $currency, + 'webhookEndpointId' => $webhookEndpoint['id'], + 'webhookSecret' => $webhookEndpoint['secret'], + 'publishableKey' => $this->extractPublishableKey() + ]; + } + + /** + * Get Stripe account details + * @throws SubscriptionException + */ + private function getAccount(): array + { + $response = $this->makeRequest('GET', '/account'); + + if (isset($response['error'])) { + throw new SubscriptionException($response['error']['message'] ?? 'Failed to get Stripe account'); + } + + return $response; + } + + /** + * Extract publishable key from secret key + */ + private function extractPublishableKey(): string + { + if (strpos($this->apiKey, 'sk_test_') === 0) { + return 'pk_test_' . substr($this->apiKey, 8); + } elseif (strpos($this->apiKey, 'sk_live_') === 0) { + return 'pk_live_' . substr($this->apiKey, 8); + } + + throw new SubscriptionException('Invalid Stripe secret key format'); + } + + /** + * Create webhook endpoint + * @throws SubscriptionException + */ + private function createWebhookEndpoint(): array + { + $base = getenv('_APP_AUTH_STRIPE_WEBHOOK_URL'); + if (!$base) { + $host = $_SERVER['HTTP_HOST'] ?? ''; + $base = 'https://' . $host; + } + if (strpos($base, '{projectId}') !== false || strpos($base, ':projectId') !== false) { + $webhookUrl = str_replace(['{projectId}', ':projectId'], $this->project->getId(), $base); + } else { + $normalized = rtrim($base, '/'); + if (str_ends_with($normalized, '/v1/webhooks/stripe/auth')) { + $webhookUrl = $normalized . '/' . $this->project->getId(); + } else { + $webhookUrl = $normalized . '/v1/webhooks/stripe/auth/' . $this->project->getId(); + } + } + + $params = [ + 'url' => $webhookUrl, + 'enabled_events' => [ + 'checkout.session.completed', + 'customer.subscription.created', + 'customer.subscription.updated', + 'customer.subscription.deleted', + 'invoice.payment_failed', + 'invoice.payment_succeeded', + 'product.updated', + 'product.deleted', + 'price.updated', + 'price.deleted' + ], + 'description' => 'Appwrite Auth Subscription Webhook for Project ' . $this->project->getId() + ]; + + $response = $this->makeRequest('POST', '/webhook_endpoints', $params); + + if (isset($response['error'])) { + throw new SubscriptionException($response['error']['message'] ?? 'Failed to create webhook endpoint'); + } + + return $response; + } + + public function deleteWebhookEndpoint(string $endpointId): array + { + return $this->makeRequest('DELETE', '/webhook_endpoints/' . $endpointId); + } + + /** + * Create Stripe product + * @throws SubscriptionException + */ + public function createProduct(string $name, string $description = '', ?string $planId = null): array + { + $params = [ + 'name' => $name, + 'description' => $description, + 'metadata' => [ + 'project_id' => $this->project->getId(), + 'plan_id' => $planId, + 'type' => 'auth_plan' + ] + ]; + + $response = $this->makeRequest('POST', '/products', $params); + + if (isset($response['error'])) { + throw new SubscriptionException($response['error']['message'] ?? 'Failed to create product'); + } + + return $response; + } + + /** + * Create Stripe price + * @throws SubscriptionException + */ + public function createPrice(string $productId, int $amount, string $currency, ?string $interval = null, ?string $planId = null): array + { + $params = [ + 'product' => $productId, + 'unit_amount' => $amount, + 'currency' => $currency, + 'metadata' => [ + 'project_id' => $this->project->getId(), + 'plan_id' => $planId, + 'type' => 'auth_plan_price' + ] + ]; + + if ($interval) { + $params['recurring'] = ['interval' => $interval]; + } + + $response = $this->makeRequest('POST', '/prices', $params); + + if (isset($response['error'])) { + throw new SubscriptionException($response['error']['message'] ?? 'Failed to create price'); + } + + return $response; + } + + /** + * Deactivate a Stripe price + * @throws SubscriptionException + */ + public function deactivatePrice(string $priceId): array + { + return $this->makeRequest('POST', '/prices/' . $priceId, ['active' => 'false']); + } + + /** + * Deactivate a Stripe product + * @throws SubscriptionException + */ + public function deactivateProduct(string $productId): array + { + return $this->makeRequest('POST', '/products/' . $productId, ['active' => 'false']); + } + + /** + * Create checkout session + * @throws SubscriptionException + */ + public function createCheckoutSession(Document $user, string $priceId, string $successUrl, string $cancelUrl, ?string $planId = null): array + { + $params = [ + 'mode' => 'subscription', + 'line_items' => [ + [ + 'price' => $priceId, + 'quantity' => 1 + ] + ], + 'success_url' => $successUrl, + 'cancel_url' => $cancelUrl, + 'customer_email' => $user->getAttribute('email'), + 'client_reference_id' => $user->getId(), + 'metadata' => array_filter([ + 'user_id' => $user->getId(), + 'project_id' => $this->project->getId(), + 'plan_id' => $planId, + ]), + 'subscription_data' => [ + 'metadata' => array_filter([ + 'user_id' => $user->getId(), + 'project_id' => $this->project->getId(), + 'plan_id' => $planId, + ]) + ] + ]; + + if ($user->getAttribute('stripeCustomerId')) { + $params['customer'] = $user->getAttribute('stripeCustomerId'); + unset($params['customer_email']); + } + + $response = $this->makeRequest('POST', '/checkout/sessions', $params); + + if (isset($response['error'])) { + throw new SubscriptionException($response['error']['message'] ?? 'Failed to create checkout session'); + } + + return $response; + } + + /** + * Create customer portal session + * @throws SubscriptionException + */ + public function createPortalSession(string $customerId, string $returnUrl): array + { + $params = [ + 'customer' => $customerId, + 'return_url' => $returnUrl + ]; + + $response = $this->makeRequest('POST', '/billing_portal/sessions', $params); + + if (isset($response['error'])) { + throw new SubscriptionException($response['error']['message'] ?? 'Failed to create portal session'); + } + + return $response; + } + + /** + * Ensure Stripe customer exists for user, return customer ID + */ + public function ensureCustomer(Document $user): string + { + $customerId = (string) $user->getAttribute('stripeCustomerId', ''); + if ($customerId !== '') { + return $customerId; + } + + $params = [ + 'email' => $user->getAttribute('email'), + 'metadata' => [ + 'project_id' => $this->project->getId(), + 'user_id' => $user->getId() + ] + ]; + $response = $this->makeRequest('POST', '/customers', $params); + if (isset($response['error'])) { + throw new SubscriptionException($response['error']['message'] ?? 'Failed to create customer'); + } + return (string) ($response['id'] ?? ''); + } + + /** + * Create a complimentary subscription (trial for one interval, auto-cancel) + */ + public function createComplimentarySubscription(string $customerId, string $priceId, string $interval, ?string $userId = null): array + { + $now = time(); + $seconds = 0; + switch ($interval) { + case 'day': + $seconds = 86400; break; + case 'week': + $seconds = 86400 * 7; break; + case 'year': + $seconds = 86400 * 365; break; + case 'month': + default: + $seconds = 86400 * 30; break; + } + $trialEnd = $now + $seconds; + + $params = [ + 'customer' => $customerId, + 'items' => [[ 'price' => $priceId ]], + 'trial_end' => $trialEnd, + 'cancel_at' => $trialEnd, + 'payment_behavior' => 'default_incomplete', + 'metadata' => [ + 'project_id' => $this->project->getId(), + 'user_id' => $userId + ] + ]; + + $response = $this->makeRequest('POST', '/subscriptions', $params); + + if (isset($response['error'])) { + throw new SubscriptionException($response['error']['message'] ?? 'Failed to create subscription'); + } + + return $response; + } + + /** + * Cancel active subscription immediately or at period end + */ + public function cancelSubscription(string $subscriptionId, bool $atPeriodEnd = true): array + { + $params = [ 'cancel_at_period_end' => $atPeriodEnd ? 'true' : 'false' ]; + $response = $this->makeRequest('DELETE', '/subscriptions/' . $subscriptionId, $params); + + if (isset($response['error'])) { + throw new SubscriptionException($response['error']['message'] ?? 'Failed to cancel subscription'); + } + + return $response; + } + + /** + * Find an active (or trialing) subscription ID for a customer + */ + public function findActiveSubscriptionId(string $customerId): ?string + { + $params = [ + 'customer' => $customerId, + 'limit' => 100 + ]; + + $response = $this->makeRequest('GET', '/subscriptions', $params); + + if (!isset($response['data']) || !is_array($response['data'])) { + return null; + } + + foreach ($response['data'] as $sub) { + $status = (string) ($sub['status'] ?? ''); + if (in_array($status, ['active', 'trialing', 'past_due', 'unpaid'], true)) { + return (string) ($sub['id'] ?? ''); + } + } + + return null; + } + + /** + * Get subscription details + * @throws SubscriptionException + */ + public function getSubscription(string $subscriptionId): array + { + $response = $this->makeRequest('GET', '/subscriptions/' . $subscriptionId); + + if (isset($response['error'])) { + throw new SubscriptionException($response['error']['message'] ?? 'Failed to get subscription'); + } + + return $response; + } + + // duplicate removed + + /** + * Update subscription (change plan) + * @throws SubscriptionException + */ + public function updateSubscription(string $subscriptionId, string $newPriceId): array + { + $subscription = $this->getSubscription($subscriptionId); + + $params = [ + 'items' => [ + [ + 'id' => $subscription['items']['data'][0]['id'], + 'price' => $newPriceId + ] + ], + 'proration_behavior' => 'create_prorations' + ]; + + $response = $this->makeRequest('POST', '/subscriptions/' . $subscriptionId, $params); + + if (isset($response['error'])) { + throw new SubscriptionException($response['error']['message'] ?? 'Failed to update subscription'); + } + + return $response; + } + + /** + * Verify webhook signature + */ + public function verifyWebhookSignature(string $payload, string $signature, string $secret): bool + { + $timestamp = null; + $v1Signatures = []; + + foreach (explode(',', (string) $signature) as $segment) { + $segment = trim($segment); + $parts = explode('=', $segment, 2); + if (count($parts) !== 2) { + continue; + } + if ($parts[0] === 't') { + $timestamp = $parts[1]; + } + if ($parts[0] === 'v1') { + $v1Signatures[] = $parts[1]; + } + } + + if (!$timestamp || empty($v1Signatures)) { + return false; + } + + $signedPayload = $timestamp . '.' . $payload; + $expected = hash_hmac('sha256', $signedPayload, trim((string) $secret)); + + foreach ($v1Signatures as $sig) { + if (hash_equals($expected, $sig)) { + return true; + } + } + + return false; + } + + /** + * Handle webhook event + * @throws SubscriptionException + */ + public function handleWebhook(array $event): void + { + switch ($event['type']) { + case 'checkout.session.completed': + $this->handleCheckoutCompleted($event['data']['object']); + break; + + case 'customer.subscription.created': + case 'customer.subscription.updated': + $this->handleSubscriptionUpdate($event['data']['object']); + break; + + case 'customer.subscription.deleted': + $this->handleSubscriptionDeleted($event['data']['object']); + break; + + case 'invoice.payment_failed': + $this->handlePaymentFailed($event['data']['object']); + break; + + case 'invoice.payment_succeeded': + $this->handlePaymentSucceeded($event['data']['object']); + break; + + // Keep Appwrite in sync with Stripe-side changes + case 'product.updated': + $this->handleProductUpdated($event['data']['object']); + break; + case 'product.deleted': + $this->handleProductDeleted($event['data']['object']); + break; + case 'price.updated': + $this->handlePriceUpdated($event['data']['object']); + break; + case 'price.deleted': + $this->handlePriceDeleted($event['data']['object']); + break; + } + } + + /** + * Product updated + */ + private function handleProductUpdated(array $product): void + { + if ($this->platformDb === null) return; + $stripeProductId = $product['id'] ?? ''; + if (empty($stripeProductId)) return; + $plan = $this->platformDb->findOne('auth_plans', [ + Query::equal('stripeProductId', [$stripeProductId]), + Query::equal('projectId', [$this->project->getId()]) + ]); + if (!$plan) return; + $plan->setAttribute('name', $product['name'] ?? $plan->getAttribute('name')); + if (isset($product['active']) && $product['active'] === false) { + // If product deactivated, mark plan inactive + $plan->setAttribute('active', false); + } + $this->platformDb->updateDocument('auth_plans', $plan->getId(), $plan); + } + + /** + * Product deleted + */ + private function handleProductDeleted(array $product): void + { + if ($this->platformDb === null) return; + $stripeProductId = $product['id'] ?? ''; + if (empty($stripeProductId)) return; + $plan = $this->platformDb->findOne('auth_plans', [ + Query::equal('stripeProductId', [$stripeProductId]), + Query::equal('projectId', [$this->project->getId()]) + ]); + if ($plan) { + $this->platformDb->deleteDocument('auth_plans', $plan->getId()); + } + } + + /** + * Price updated + */ + private function handlePriceUpdated(array $price): void + { + if ($this->platformDb === null) return; + $stripePriceId = $price['id'] ?? ''; + if (empty($stripePriceId)) return; + $plan = $this->platformDb->findOne('auth_plans', [ + Query::equal('stripePriceId', [$stripePriceId]), + Query::equal('projectId', [$this->project->getId()]) + ]); + if (!$plan) return; + if (isset($price['active']) && $price['active'] === false) { + $plan->setAttribute('active', false); + } + if (isset($price['unit_amount'])) { + $plan->setAttribute('price', (int)$price['unit_amount']); + } + if (isset($price['currency'])) { + $plan->setAttribute('currency', $price['currency']); + } + if (isset($price['recurring']['interval'])) { + $plan->setAttribute('interval', $price['recurring']['interval']); + } + $this->platformDb->updateDocument('auth_plans', $plan->getId(), $plan); + } + + /** + * Price deleted + */ + private function handlePriceDeleted(array $price): void + { + if ($this->platformDb === null) return; + $stripePriceId = $price['id'] ?? ''; + if (empty($stripePriceId)) return; + $plan = $this->platformDb->findOne('auth_plans', [ + Query::equal('stripePriceId', [$stripePriceId]), + Query::equal('projectId', [$this->project->getId()]) + ]); + if ($plan) { + $this->platformDb->deleteDocument('auth_plans', $plan->getId()); + } + } + + /** + * Handle checkout completed + */ + private function handleCheckoutCompleted(array $session): void + { + $userId = $session['metadata']['user_id'] ?? null; + if (!$userId) { + return; + } + + $user = Authorization::skip(fn () => $this->database->getDocument('users', $userId)); + if ($user->isEmpty()) { + return; + } + + $updated = $user + ->setAttribute('stripeCustomerId', $session['customer']) + ->setAttribute('stripeSubscriptionId', $session['subscription']); + Authorization::skip(fn () => $this->database->updateDocument('users', $userId, $updated)); + + if ($session['subscription']) { + $subscription = $this->getSubscription($session['subscription']); + $this->syncSubscriptionStatus($userId, $subscription); + } + } + + /** + * Handle subscription update + */ + private function handleSubscriptionUpdate(array $subscription): void + { + $userId = $subscription['metadata']['user_id'] ?? null; + if (!$userId) { + return; + } + + $full = isset($subscription['id']) ? $this->getSubscription($subscription['id']) : $subscription; + $this->syncSubscriptionStatus($userId, $full); + } + + /** + * Handle subscription deleted + */ + private function handleSubscriptionDeleted(array $subscription): void + { + $userId = $subscription['metadata']['user_id'] ?? null; + if (!$userId) { + return; + } + + $user = Authorization::skip(fn () => $this->database->getDocument('users', $userId)); + if ($user->isEmpty()) { + return; + } + + $defaultPlan = null; + if ($this->platformDb) { + $defaultPlan = $this->platformDb->findOne('auth_plans', [ + Query::equal('projectId', [$this->project->getId()]), + Query::equal('isDefault', [true]), + Query::equal('isFree', [true]) + ]); + } + + $updated = $user + ->setAttribute('stripeSubscriptionId', null) + ->setAttribute('subscriptionStatus', 'none') + ->setAttribute('subscriptionCurrentPeriodStart', null) + ->setAttribute('subscriptionCurrentPeriodEnd', null) + ->setAttribute('subscriptionCancelAtPeriodEnd', false) + ->setAttribute('planId', $defaultPlan ? $defaultPlan->getAttribute('planId') : null); + Authorization::skip(fn () => $this->database->updateDocument('users', $userId, $updated)); + } + + /** + * Handle payment failed + */ + private function handlePaymentFailed(array $invoice): void + { + $subscriptionId = $invoice['subscription'] ?? null; + if (!$subscriptionId) { + return; + } + + $subscription = $this->getSubscription($subscriptionId); + $userId = $subscription['metadata']['user_id'] ?? null; + + if ($userId) { + $user = Authorization::skip(fn () => $this->database->getDocument('users', $userId)); + if (!$user->isEmpty()) { + $updated = $user->setAttribute('subscriptionStatus', 'past_due'); + Authorization::skip(fn () => $this->database->updateDocument('users', $userId, $updated)); + } + } + } + + /** + * Handle payment succeeded + */ + private function handlePaymentSucceeded(array $invoice): void + { + $subscriptionId = $invoice['subscription'] ?? null; + if (!$subscriptionId) { + return; + } + + $subscription = $this->getSubscription($subscriptionId); + $userId = $subscription['metadata']['user_id'] ?? null; + + if ($userId) { + $this->syncSubscriptionStatus($userId, $subscription); + } + } + + /** + * Sync subscription status to user + */ + public function syncSubscriptionStatus(string $userId, array $subscription): void + { + $user = Authorization::skip(fn () => $this->database->getDocument('users', $userId)); + if ($user->isEmpty()) { + return; + } + + $priceId = $subscription['items']['data'][0]['price']['id'] ?? null; + $status = (string) ($subscription['status'] ?? ''); + $cancelAtPeriodEnd = (bool) ($subscription['cancel_at_period_end'] ?? false); + $periodStart = isset($subscription['current_period_start']) ? date('c', $subscription['current_period_start']) : null; + $periodEndTs = $subscription['current_period_end'] ?? null; + $periodEnd = $periodEndTs ? date('c', $periodEndTs) : null; + + $plan = null; + if ($priceId && $this->platformDb) { + $plan = Authorization::skip(fn () => $this->platformDb->findOne('auth_plans', [ + Query::equal('stripePriceId', [$priceId]), + Query::equal('projectId', [$this->project->getId()]) + ])); + } + if (!$plan && $this->platformDb) { + $productId = $subscription['items']['data'][0]['price']['product'] ?? null; + if (!empty($productId)) { + $fallback = Authorization::skip(fn () => $this->platformDb->findOne('auth_plans', [ + Query::equal('stripeProductId', [$productId]), + Query::equal('projectId', [$this->project->getId()]) + ])); + if ($fallback) { + $plan = $fallback; + } + } + } + if (!$plan && $this->platformDb) { + $metaPlanId = $subscription['metadata']['plan_id'] ?? null; + if (!empty($metaPlanId)) { + $fallback = Authorization::skip(fn () => $this->platformDb->findOne('auth_plans', [ + Query::equal('planId', [$metaPlanId]), + Query::equal('projectId', [$this->project->getId()]) + ])); + if ($fallback) { + $plan = $fallback; + } + } + } + + + $fallbackToFree = ($status === 'canceled' || $status === 'incomplete_expired' || ($cancelAtPeriodEnd && $periodEndTs && time() >= (int) $periodEndTs)); + $defaultPlan = null; + if ($fallbackToFree && $this->platformDb) { + $defaultPlan = Authorization::skip(fn () => $this->platformDb->findOne('auth_plans', [ + Query::equal('projectId', [$this->project->getId()]), + Query::equal('isDefault', [true]), + Query::equal('isFree', [true]) + ])); + } + + $updated = $user + ->setAttribute('planId', $fallbackToFree && $defaultPlan ? $defaultPlan->getAttribute('planId') : ($plan ? $plan->getAttribute('planId') : null)) + ->setAttribute('subscriptionStatus', $status) + ->setAttribute('subscriptionCurrentPeriodStart', $periodStart) + ->setAttribute('subscriptionCurrentPeriodEnd', $periodEnd) + ->setAttribute('subscriptionCancelAtPeriodEnd', $cancelAtPeriodEnd) + ->setAttribute('subscriptionTrialEnd', isset($subscription['trial_end']) ? date('c', $subscription['trial_end']) : null); + Authorization::skip(fn () => $this->database->updateDocument('users', $userId, $updated)); + } + + /** + * Make request to Stripe API + */ + private function makeRequest(string $method, string $path, array $params = []): array + { + $ch = curl_init(); + + $url = $this->apiUrl . $path; + + curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + curl_setopt($ch, CURLOPT_HTTPHEADER, [ + 'Authorization: Bearer ' . $this->apiKey, + 'Content-Type: application/x-www-form-urlencoded' + ]); + + switch ($method) { + case 'GET': + if (!empty($params)) { + $url .= '?' . http_build_query($params); + } + break; + + case 'POST': + curl_setopt($ch, CURLOPT_POST, true); + if (!empty($params)) { + curl_setopt($ch, CURLOPT_POSTFIELDS, $this->buildFormData($params)); + } + break; + + case 'DELETE': + curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'DELETE'); + break; + } + + curl_setopt($ch, CURLOPT_URL, $url); + + $response = curl_exec($ch); + $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE); + + curl_close($ch); + + if ($response === false) { + throw new SubscriptionException('Failed to connect to Stripe API'); + } + + $data = json_decode($response, true); + + if ($httpCode >= 400) { + if (isset($data['error'])) { + throw new SubscriptionException($data['error']['message'] ?? 'Stripe API error', $httpCode); + } + throw new SubscriptionException('Stripe API request failed', $httpCode); + } + + return $data; + } + + /** + * Build form data for nested arrays + */ + private function buildFormData(array $params, string $prefix = ''): string + { + $data = []; + + foreach ($params as $key => $value) { + $key = $prefix ? "{$prefix}[{$key}]" : $key; + + if (is_array($value)) { + if (isset($value[0])) { + foreach ($value as $index => $item) { + if (is_array($item)) { + $data[] = $this->buildFormData($item, "{$key}[{$index}]"); + } else { + $data[] = urlencode("{$key}[{$index}]") . '=' . urlencode($item); + } + } + } else { + $data[] = $this->buildFormData($value, $key); + } + } else { + $data[] = urlencode($key) . '=' . urlencode($value); + } + } + + return implode('&', $data); + } +} \ No newline at end of file diff --git a/src/Appwrite/Auth/Validator/PlanData.php b/src/Appwrite/Auth/Validator/PlanData.php new file mode 100644 index 0000000000..19d4cc60b0 --- /dev/null +++ b/src/Appwrite/Auth/Validator/PlanData.php @@ -0,0 +1,78 @@ + true, 'example' => [], ]) + ->addRule('plan', [ + 'type' => self::TYPE_JSON, + 'description' => 'User subscription plan details.', + 'required' => false, + 'default' => new \stdClass(), + 'example' => [ + 'id' => 'basic', + 'name' => 'Basic', + 'price' => 999, + 'currency' => 'usd', + 'interval' => 'month', + 'isFree' => false + ], + ]) ->addRule('accessedAt', [ 'type' => self::TYPE_DATETIME, 'description' => 'Most recent access date in ISO 8601 format. This attribute is only updated again after ' . APP_USER_ACCESS / 60 / 60 . ' hours.',