From 735cc77a92eb9c61a49da22e166aa392bb795f11 Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Tue, 26 Aug 2025 13:04:08 +0530 Subject: [PATCH 01/29] chore: switch Union China Pay to just Union Pay --- app/config/avatars/credit-cards.php | 2 +- .../{union-china-pay.png => unionpay.png} | Bin 2 files changed, 1 insertion(+), 1 deletion(-) rename app/config/avatars/credit-cards/{union-china-pay.png => unionpay.png} (100%) diff --git a/app/config/avatars/credit-cards.php b/app/config/avatars/credit-cards.php index 52760bf9dc..b693e99fb2 100644 --- a/app/config/avatars/credit-cards.php +++ b/app/config/avatars/credit-cards.php @@ -13,7 +13,7 @@ return [ 'mastercard' => ['name' => 'Mastercard', 'path' => __DIR__ . '/credit-cards/mastercard.png'], 'naranja' => ['name' => 'Naranja', 'path' => __DIR__ . '/credit-cards/naranja.png'], 'targeta-shopping' => ['name' => 'Tarjeta Shopping', 'path' => __DIR__ . '/credit-cards/tarjeta-shopping.png'], - 'union-china-pay' => ['name' => 'Union China Pay', 'path' => __DIR__ . '/credit-cards/union-china-pay.png'], + 'unionpay' => ['name' => 'Union Pay', 'path' => __DIR__ . '/credit-cards/unionpay.png'], 'visa' => ['name' => 'Visa', 'path' => __DIR__ . '/credit-cards/visa.png'], 'mir' => ['name' => 'MIR', 'path' => __DIR__ . '/credit-cards/mir.png'], 'maestro' => ['name' => 'Maestro', 'path' => __DIR__ . '/credit-cards/maestro.png'], diff --git a/app/config/avatars/credit-cards/union-china-pay.png b/app/config/avatars/credit-cards/unionpay.png similarity index 100% rename from app/config/avatars/credit-cards/union-china-pay.png rename to app/config/avatars/credit-cards/unionpay.png From e57e9142ab15b4c2c93702255e6824ff37de9a76 Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Tue, 26 Aug 2025 13:13:26 +0530 Subject: [PATCH 02/29] update specs --- app/config/specs/open-api3-1.7.x-client.json | 21 ++++++++++++------- app/config/specs/open-api3-1.7.x-console.json | 21 ++++++++++++------- app/config/specs/open-api3-1.7.x-server.json | 21 ++++++++++++------- app/config/specs/open-api3-latest-client.json | 21 ++++++++++++------- .../specs/open-api3-latest-console.json | 21 ++++++++++++------- app/config/specs/open-api3-latest-server.json | 21 ++++++++++++------- app/config/specs/swagger2-1.7.x-client.json | 21 ++++++++++++------- app/config/specs/swagger2-1.7.x-console.json | 21 ++++++++++++------- app/config/specs/swagger2-1.7.x-server.json | 21 ++++++++++++------- app/config/specs/swagger2-latest-client.json | 21 ++++++++++++------- app/config/specs/swagger2-latest-console.json | 21 ++++++++++++------- app/config/specs/swagger2-latest-server.json | 21 ++++++++++++------- 12 files changed, 168 insertions(+), 84 deletions(-) diff --git a/app/config/specs/open-api3-1.7.x-client.json b/app/config/specs/open-api3-1.7.x-client.json index 0bf589cb5a..c7de6a31af 100644 --- a/app/config/specs/open-api3-1.7.x-client.json +++ b/app/config/specs/open-api3-1.7.x-client.json @@ -2622,7 +2622,7 @@ "tags": [ "account" ], - "description": "Sends the user an email with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The secret sent to the user's email is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", + "description": "Sends the user an email with a secret key for creating a session. If the email address has never been used, a **new account is created** using the provided `userId`. Otherwise, if the email address is already attached to an account, the **user ID is ignored**. Then, the user will receive an email with the one-time password. Use the returned user ID and secret and submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The secret sent to the user's email is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).\n", "responses": { "201": { "description": "Token", @@ -2673,7 +2673,7 @@ "properties": { "userId": { "type": "string", - "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.", "x-example": "" }, "email": { @@ -2755,7 +2755,7 @@ "properties": { "userId": { "type": "string", - "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.", "x-example": "" }, "email": { @@ -2977,7 +2977,7 @@ "properties": { "userId": { "type": "string", - "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the phone number has never been used, a new account is created using the provided userId. Otherwise, if the phone number is already attached to an account, the user ID is ignored.", "x-example": "" }, "phone": { @@ -3440,7 +3440,7 @@ "parameters": [ { "name": "code", - "description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro, rupay.", + "description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, unionpay, visa, mir, maestro, rupay.", "required": true, "schema": { "type": "string", @@ -3458,7 +3458,7 @@ "mastercard", "naranja", "targeta-shopping", - "union-china-pay", + "unionpay", "visa", "mir", "maestro", @@ -3478,7 +3478,7 @@ "Mastercard", "Naranja", "Tarjeta Shopping", - "Union China Pay", + "Union Pay", "Visa", "MIR", "Maestro", @@ -9847,6 +9847,11 @@ "description": "Function ID.", "x-example": "5e5ea6g16897e" }, + "deploymentId": { + "type": "string", + "description": "Function's deployment ID used to create the execution.", + "x-example": "5e5ea5c16897e" + }, "trigger": { "type": "string", "description": "The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.", @@ -9931,6 +9936,7 @@ "$updatedAt", "$permissions", "functionId", + "deploymentId", "trigger", "status", "requestMethod", @@ -9951,6 +9957,7 @@ "any" ], "functionId": "5e5ea6g16897e", + "deploymentId": "5e5ea5c16897e", "trigger": "http", "status": "processing", "requestMethod": "GET", diff --git a/app/config/specs/open-api3-1.7.x-console.json b/app/config/specs/open-api3-1.7.x-console.json index 5c6880a396..2554b7282c 100644 --- a/app/config/specs/open-api3-1.7.x-console.json +++ b/app/config/specs/open-api3-1.7.x-console.json @@ -2631,7 +2631,7 @@ "tags": [ "account" ], - "description": "Sends the user an email with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The secret sent to the user's email is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", + "description": "Sends the user an email with a secret key for creating a session. If the email address has never been used, a **new account is created** using the provided `userId`. Otherwise, if the email address is already attached to an account, the **user ID is ignored**. Then, the user will receive an email with the one-time password. Use the returned user ID and secret and submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The secret sent to the user's email is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).\n", "responses": { "201": { "description": "Token", @@ -2682,7 +2682,7 @@ "properties": { "userId": { "type": "string", - "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.", "x-example": "" }, "email": { @@ -2764,7 +2764,7 @@ "properties": { "userId": { "type": "string", - "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.", "x-example": "" }, "email": { @@ -2986,7 +2986,7 @@ "properties": { "userId": { "type": "string", - "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the phone number has never been used, a new account is created using the provided userId. Otherwise, if the phone number is already attached to an account, the user ID is ignored.", "x-example": "" }, "phone": { @@ -3445,7 +3445,7 @@ "parameters": [ { "name": "code", - "description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro, rupay.", + "description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, unionpay, visa, mir, maestro, rupay.", "required": true, "schema": { "type": "string", @@ -3463,7 +3463,7 @@ "mastercard", "naranja", "targeta-shopping", - "union-china-pay", + "unionpay", "visa", "mir", "maestro", @@ -3483,7 +3483,7 @@ "Mastercard", "Naranja", "Tarjeta Shopping", - "Union China Pay", + "Union Pay", "Visa", "MIR", "Maestro", @@ -41133,6 +41133,11 @@ "description": "Function ID.", "x-example": "5e5ea6g16897e" }, + "deploymentId": { + "type": "string", + "description": "Function's deployment ID used to create the execution.", + "x-example": "5e5ea5c16897e" + }, "trigger": { "type": "string", "description": "The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.", @@ -41217,6 +41222,7 @@ "$updatedAt", "$permissions", "functionId", + "deploymentId", "trigger", "status", "requestMethod", @@ -41237,6 +41243,7 @@ "any" ], "functionId": "5e5ea6g16897e", + "deploymentId": "5e5ea5c16897e", "trigger": "http", "status": "processing", "requestMethod": "GET", diff --git a/app/config/specs/open-api3-1.7.x-server.json b/app/config/specs/open-api3-1.7.x-server.json index 35e3f14595..65eb2b29d0 100644 --- a/app/config/specs/open-api3-1.7.x-server.json +++ b/app/config/specs/open-api3-1.7.x-server.json @@ -2303,7 +2303,7 @@ "tags": [ "account" ], - "description": "Sends the user an email with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The secret sent to the user's email is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", + "description": "Sends the user an email with a secret key for creating a session. If the email address has never been used, a **new account is created** using the provided `userId`. Otherwise, if the email address is already attached to an account, the **user ID is ignored**. Then, the user will receive an email with the one-time password. Use the returned user ID and secret and submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The secret sent to the user's email is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).\n", "responses": { "201": { "description": "Token", @@ -2354,7 +2354,7 @@ "properties": { "userId": { "type": "string", - "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.", "x-example": "" }, "email": { @@ -2436,7 +2436,7 @@ "properties": { "userId": { "type": "string", - "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.", "x-example": "" }, "email": { @@ -2658,7 +2658,7 @@ "properties": { "userId": { "type": "string", - "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the phone number has never been used, a new account is created using the provided userId. Otherwise, if the phone number is already attached to an account, the user ID is ignored.", "x-example": "" }, "phone": { @@ -3129,7 +3129,7 @@ "parameters": [ { "name": "code", - "description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro, rupay.", + "description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, unionpay, visa, mir, maestro, rupay.", "required": true, "schema": { "type": "string", @@ -3147,7 +3147,7 @@ "mastercard", "naranja", "targeta-shopping", - "union-china-pay", + "unionpay", "visa", "mir", "maestro", @@ -3167,7 +3167,7 @@ "Mastercard", "Naranja", "Tarjeta Shopping", - "Union China Pay", + "Union Pay", "Visa", "MIR", "Maestro", @@ -30230,6 +30230,11 @@ "description": "Function ID.", "x-example": "5e5ea6g16897e" }, + "deploymentId": { + "type": "string", + "description": "Function's deployment ID used to create the execution.", + "x-example": "5e5ea5c16897e" + }, "trigger": { "type": "string", "description": "The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.", @@ -30314,6 +30319,7 @@ "$updatedAt", "$permissions", "functionId", + "deploymentId", "trigger", "status", "requestMethod", @@ -30334,6 +30340,7 @@ "any" ], "functionId": "5e5ea6g16897e", + "deploymentId": "5e5ea5c16897e", "trigger": "http", "status": "processing", "requestMethod": "GET", diff --git a/app/config/specs/open-api3-latest-client.json b/app/config/specs/open-api3-latest-client.json index 0bf589cb5a..c7de6a31af 100644 --- a/app/config/specs/open-api3-latest-client.json +++ b/app/config/specs/open-api3-latest-client.json @@ -2622,7 +2622,7 @@ "tags": [ "account" ], - "description": "Sends the user an email with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The secret sent to the user's email is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", + "description": "Sends the user an email with a secret key for creating a session. If the email address has never been used, a **new account is created** using the provided `userId`. Otherwise, if the email address is already attached to an account, the **user ID is ignored**. Then, the user will receive an email with the one-time password. Use the returned user ID and secret and submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The secret sent to the user's email is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).\n", "responses": { "201": { "description": "Token", @@ -2673,7 +2673,7 @@ "properties": { "userId": { "type": "string", - "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.", "x-example": "" }, "email": { @@ -2755,7 +2755,7 @@ "properties": { "userId": { "type": "string", - "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.", "x-example": "" }, "email": { @@ -2977,7 +2977,7 @@ "properties": { "userId": { "type": "string", - "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the phone number has never been used, a new account is created using the provided userId. Otherwise, if the phone number is already attached to an account, the user ID is ignored.", "x-example": "" }, "phone": { @@ -3440,7 +3440,7 @@ "parameters": [ { "name": "code", - "description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro, rupay.", + "description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, unionpay, visa, mir, maestro, rupay.", "required": true, "schema": { "type": "string", @@ -3458,7 +3458,7 @@ "mastercard", "naranja", "targeta-shopping", - "union-china-pay", + "unionpay", "visa", "mir", "maestro", @@ -3478,7 +3478,7 @@ "Mastercard", "Naranja", "Tarjeta Shopping", - "Union China Pay", + "Union Pay", "Visa", "MIR", "Maestro", @@ -9847,6 +9847,11 @@ "description": "Function ID.", "x-example": "5e5ea6g16897e" }, + "deploymentId": { + "type": "string", + "description": "Function's deployment ID used to create the execution.", + "x-example": "5e5ea5c16897e" + }, "trigger": { "type": "string", "description": "The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.", @@ -9931,6 +9936,7 @@ "$updatedAt", "$permissions", "functionId", + "deploymentId", "trigger", "status", "requestMethod", @@ -9951,6 +9957,7 @@ "any" ], "functionId": "5e5ea6g16897e", + "deploymentId": "5e5ea5c16897e", "trigger": "http", "status": "processing", "requestMethod": "GET", diff --git a/app/config/specs/open-api3-latest-console.json b/app/config/specs/open-api3-latest-console.json index 5c6880a396..2554b7282c 100644 --- a/app/config/specs/open-api3-latest-console.json +++ b/app/config/specs/open-api3-latest-console.json @@ -2631,7 +2631,7 @@ "tags": [ "account" ], - "description": "Sends the user an email with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The secret sent to the user's email is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", + "description": "Sends the user an email with a secret key for creating a session. If the email address has never been used, a **new account is created** using the provided `userId`. Otherwise, if the email address is already attached to an account, the **user ID is ignored**. Then, the user will receive an email with the one-time password. Use the returned user ID and secret and submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The secret sent to the user's email is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).\n", "responses": { "201": { "description": "Token", @@ -2682,7 +2682,7 @@ "properties": { "userId": { "type": "string", - "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.", "x-example": "" }, "email": { @@ -2764,7 +2764,7 @@ "properties": { "userId": { "type": "string", - "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.", "x-example": "" }, "email": { @@ -2986,7 +2986,7 @@ "properties": { "userId": { "type": "string", - "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the phone number has never been used, a new account is created using the provided userId. Otherwise, if the phone number is already attached to an account, the user ID is ignored.", "x-example": "" }, "phone": { @@ -3445,7 +3445,7 @@ "parameters": [ { "name": "code", - "description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro, rupay.", + "description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, unionpay, visa, mir, maestro, rupay.", "required": true, "schema": { "type": "string", @@ -3463,7 +3463,7 @@ "mastercard", "naranja", "targeta-shopping", - "union-china-pay", + "unionpay", "visa", "mir", "maestro", @@ -3483,7 +3483,7 @@ "Mastercard", "Naranja", "Tarjeta Shopping", - "Union China Pay", + "Union Pay", "Visa", "MIR", "Maestro", @@ -41133,6 +41133,11 @@ "description": "Function ID.", "x-example": "5e5ea6g16897e" }, + "deploymentId": { + "type": "string", + "description": "Function's deployment ID used to create the execution.", + "x-example": "5e5ea5c16897e" + }, "trigger": { "type": "string", "description": "The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.", @@ -41217,6 +41222,7 @@ "$updatedAt", "$permissions", "functionId", + "deploymentId", "trigger", "status", "requestMethod", @@ -41237,6 +41243,7 @@ "any" ], "functionId": "5e5ea6g16897e", + "deploymentId": "5e5ea5c16897e", "trigger": "http", "status": "processing", "requestMethod": "GET", diff --git a/app/config/specs/open-api3-latest-server.json b/app/config/specs/open-api3-latest-server.json index 35e3f14595..65eb2b29d0 100644 --- a/app/config/specs/open-api3-latest-server.json +++ b/app/config/specs/open-api3-latest-server.json @@ -2303,7 +2303,7 @@ "tags": [ "account" ], - "description": "Sends the user an email with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The secret sent to the user's email is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", + "description": "Sends the user an email with a secret key for creating a session. If the email address has never been used, a **new account is created** using the provided `userId`. Otherwise, if the email address is already attached to an account, the **user ID is ignored**. Then, the user will receive an email with the one-time password. Use the returned user ID and secret and submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The secret sent to the user's email is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).\n", "responses": { "201": { "description": "Token", @@ -2354,7 +2354,7 @@ "properties": { "userId": { "type": "string", - "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.", "x-example": "" }, "email": { @@ -2436,7 +2436,7 @@ "properties": { "userId": { "type": "string", - "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.", "x-example": "" }, "email": { @@ -2658,7 +2658,7 @@ "properties": { "userId": { "type": "string", - "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the phone number has never been used, a new account is created using the provided userId. Otherwise, if the phone number is already attached to an account, the user ID is ignored.", "x-example": "" }, "phone": { @@ -3129,7 +3129,7 @@ "parameters": [ { "name": "code", - "description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro, rupay.", + "description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, unionpay, visa, mir, maestro, rupay.", "required": true, "schema": { "type": "string", @@ -3147,7 +3147,7 @@ "mastercard", "naranja", "targeta-shopping", - "union-china-pay", + "unionpay", "visa", "mir", "maestro", @@ -3167,7 +3167,7 @@ "Mastercard", "Naranja", "Tarjeta Shopping", - "Union China Pay", + "Union Pay", "Visa", "MIR", "Maestro", @@ -30230,6 +30230,11 @@ "description": "Function ID.", "x-example": "5e5ea6g16897e" }, + "deploymentId": { + "type": "string", + "description": "Function's deployment ID used to create the execution.", + "x-example": "5e5ea5c16897e" + }, "trigger": { "type": "string", "description": "The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.", @@ -30314,6 +30319,7 @@ "$updatedAt", "$permissions", "functionId", + "deploymentId", "trigger", "status", "requestMethod", @@ -30334,6 +30340,7 @@ "any" ], "functionId": "5e5ea6g16897e", + "deploymentId": "5e5ea5c16897e", "trigger": "http", "status": "processing", "requestMethod": "GET", diff --git a/app/config/specs/swagger2-1.7.x-client.json b/app/config/specs/swagger2-1.7.x-client.json index 386e5875f2..ff6b6d8984 100644 --- a/app/config/specs/swagger2-1.7.x-client.json +++ b/app/config/specs/swagger2-1.7.x-client.json @@ -2751,7 +2751,7 @@ "tags": [ "account" ], - "description": "Sends the user an email with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The secret sent to the user's email is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", + "description": "Sends the user an email with a secret key for creating a session. If the email address has never been used, a **new account is created** using the provided `userId`. Otherwise, if the email address is already attached to an account, the **user ID is ignored**. Then, the user will receive an email with the one-time password. Use the returned user ID and secret and submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The secret sent to the user's email is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).\n", "responses": { "201": { "description": "Token", @@ -2799,7 +2799,7 @@ "properties": { "userId": { "type": "string", - "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.", "default": null, "x-example": "" }, @@ -2886,7 +2886,7 @@ "properties": { "userId": { "type": "string", - "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.", "default": null, "x-example": "" }, @@ -3111,7 +3111,7 @@ "properties": { "userId": { "type": "string", - "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the phone number has never been used, a new account is created using the provided userId. Otherwise, if the phone number is already attached to an account, the user ID is ignored.", "default": null, "x-example": "" }, @@ -3592,7 +3592,7 @@ "parameters": [ { "name": "code", - "description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro, rupay.", + "description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, unionpay, visa, mir, maestro, rupay.", "required": true, "type": "string", "x-example": "amex", @@ -3609,7 +3609,7 @@ "mastercard", "naranja", "targeta-shopping", - "union-china-pay", + "unionpay", "visa", "mir", "maestro", @@ -3629,7 +3629,7 @@ "Mastercard", "Naranja", "Tarjeta Shopping", - "Union China Pay", + "Union Pay", "Visa", "MIR", "Maestro", @@ -9885,6 +9885,11 @@ "description": "Function ID.", "x-example": "5e5ea6g16897e" }, + "deploymentId": { + "type": "string", + "description": "Function's deployment ID used to create the execution.", + "x-example": "5e5ea5c16897e" + }, "trigger": { "type": "string", "description": "The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.", @@ -9971,6 +9976,7 @@ "$updatedAt", "$permissions", "functionId", + "deploymentId", "trigger", "status", "requestMethod", @@ -9991,6 +9997,7 @@ "any" ], "functionId": "5e5ea6g16897e", + "deploymentId": "5e5ea5c16897e", "trigger": "http", "status": "processing", "requestMethod": "GET", diff --git a/app/config/specs/swagger2-1.7.x-console.json b/app/config/specs/swagger2-1.7.x-console.json index 44bd326a43..26862c78bc 100644 --- a/app/config/specs/swagger2-1.7.x-console.json +++ b/app/config/specs/swagger2-1.7.x-console.json @@ -2770,7 +2770,7 @@ "tags": [ "account" ], - "description": "Sends the user an email with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The secret sent to the user's email is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", + "description": "Sends the user an email with a secret key for creating a session. If the email address has never been used, a **new account is created** using the provided `userId`. Otherwise, if the email address is already attached to an account, the **user ID is ignored**. Then, the user will receive an email with the one-time password. Use the returned user ID and secret and submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The secret sent to the user's email is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).\n", "responses": { "201": { "description": "Token", @@ -2818,7 +2818,7 @@ "properties": { "userId": { "type": "string", - "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.", "default": null, "x-example": "" }, @@ -2905,7 +2905,7 @@ "properties": { "userId": { "type": "string", - "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.", "default": null, "x-example": "" }, @@ -3130,7 +3130,7 @@ "properties": { "userId": { "type": "string", - "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the phone number has never been used, a new account is created using the provided userId. Otherwise, if the phone number is already attached to an account, the user ID is ignored.", "default": null, "x-example": "" }, @@ -3607,7 +3607,7 @@ "parameters": [ { "name": "code", - "description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro, rupay.", + "description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, unionpay, visa, mir, maestro, rupay.", "required": true, "type": "string", "x-example": "amex", @@ -3624,7 +3624,7 @@ "mastercard", "naranja", "targeta-shopping", - "union-china-pay", + "unionpay", "visa", "mir", "maestro", @@ -3644,7 +3644,7 @@ "Mastercard", "Naranja", "Tarjeta Shopping", - "Union China Pay", + "Union Pay", "Visa", "MIR", "Maestro", @@ -41300,6 +41300,11 @@ "description": "Function ID.", "x-example": "5e5ea6g16897e" }, + "deploymentId": { + "type": "string", + "description": "Function's deployment ID used to create the execution.", + "x-example": "5e5ea5c16897e" + }, "trigger": { "type": "string", "description": "The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.", @@ -41386,6 +41391,7 @@ "$updatedAt", "$permissions", "functionId", + "deploymentId", "trigger", "status", "requestMethod", @@ -41406,6 +41412,7 @@ "any" ], "functionId": "5e5ea6g16897e", + "deploymentId": "5e5ea5c16897e", "trigger": "http", "status": "processing", "requestMethod": "GET", diff --git a/app/config/specs/swagger2-1.7.x-server.json b/app/config/specs/swagger2-1.7.x-server.json index 2a04908c06..2a0035dec7 100644 --- a/app/config/specs/swagger2-1.7.x-server.json +++ b/app/config/specs/swagger2-1.7.x-server.json @@ -2438,7 +2438,7 @@ "tags": [ "account" ], - "description": "Sends the user an email with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The secret sent to the user's email is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", + "description": "Sends the user an email with a secret key for creating a session. If the email address has never been used, a **new account is created** using the provided `userId`. Otherwise, if the email address is already attached to an account, the **user ID is ignored**. Then, the user will receive an email with the one-time password. Use the returned user ID and secret and submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The secret sent to the user's email is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).\n", "responses": { "201": { "description": "Token", @@ -2486,7 +2486,7 @@ "properties": { "userId": { "type": "string", - "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.", "default": null, "x-example": "" }, @@ -2573,7 +2573,7 @@ "properties": { "userId": { "type": "string", - "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.", "default": null, "x-example": "" }, @@ -2798,7 +2798,7 @@ "properties": { "userId": { "type": "string", - "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the phone number has never been used, a new account is created using the provided userId. Otherwise, if the phone number is already attached to an account, the user ID is ignored.", "default": null, "x-example": "" }, @@ -3287,7 +3287,7 @@ "parameters": [ { "name": "code", - "description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro, rupay.", + "description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, unionpay, visa, mir, maestro, rupay.", "required": true, "type": "string", "x-example": "amex", @@ -3304,7 +3304,7 @@ "mastercard", "naranja", "targeta-shopping", - "union-china-pay", + "unionpay", "visa", "mir", "maestro", @@ -3324,7 +3324,7 @@ "Mastercard", "Naranja", "Tarjeta Shopping", - "Union China Pay", + "Union Pay", "Visa", "MIR", "Maestro", @@ -30460,6 +30460,11 @@ "description": "Function ID.", "x-example": "5e5ea6g16897e" }, + "deploymentId": { + "type": "string", + "description": "Function's deployment ID used to create the execution.", + "x-example": "5e5ea5c16897e" + }, "trigger": { "type": "string", "description": "The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.", @@ -30546,6 +30551,7 @@ "$updatedAt", "$permissions", "functionId", + "deploymentId", "trigger", "status", "requestMethod", @@ -30566,6 +30572,7 @@ "any" ], "functionId": "5e5ea6g16897e", + "deploymentId": "5e5ea5c16897e", "trigger": "http", "status": "processing", "requestMethod": "GET", diff --git a/app/config/specs/swagger2-latest-client.json b/app/config/specs/swagger2-latest-client.json index 386e5875f2..ff6b6d8984 100644 --- a/app/config/specs/swagger2-latest-client.json +++ b/app/config/specs/swagger2-latest-client.json @@ -2751,7 +2751,7 @@ "tags": [ "account" ], - "description": "Sends the user an email with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The secret sent to the user's email is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", + "description": "Sends the user an email with a secret key for creating a session. If the email address has never been used, a **new account is created** using the provided `userId`. Otherwise, if the email address is already attached to an account, the **user ID is ignored**. Then, the user will receive an email with the one-time password. Use the returned user ID and secret and submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The secret sent to the user's email is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).\n", "responses": { "201": { "description": "Token", @@ -2799,7 +2799,7 @@ "properties": { "userId": { "type": "string", - "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.", "default": null, "x-example": "" }, @@ -2886,7 +2886,7 @@ "properties": { "userId": { "type": "string", - "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.", "default": null, "x-example": "" }, @@ -3111,7 +3111,7 @@ "properties": { "userId": { "type": "string", - "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the phone number has never been used, a new account is created using the provided userId. Otherwise, if the phone number is already attached to an account, the user ID is ignored.", "default": null, "x-example": "" }, @@ -3592,7 +3592,7 @@ "parameters": [ { "name": "code", - "description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro, rupay.", + "description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, unionpay, visa, mir, maestro, rupay.", "required": true, "type": "string", "x-example": "amex", @@ -3609,7 +3609,7 @@ "mastercard", "naranja", "targeta-shopping", - "union-china-pay", + "unionpay", "visa", "mir", "maestro", @@ -3629,7 +3629,7 @@ "Mastercard", "Naranja", "Tarjeta Shopping", - "Union China Pay", + "Union Pay", "Visa", "MIR", "Maestro", @@ -9885,6 +9885,11 @@ "description": "Function ID.", "x-example": "5e5ea6g16897e" }, + "deploymentId": { + "type": "string", + "description": "Function's deployment ID used to create the execution.", + "x-example": "5e5ea5c16897e" + }, "trigger": { "type": "string", "description": "The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.", @@ -9971,6 +9976,7 @@ "$updatedAt", "$permissions", "functionId", + "deploymentId", "trigger", "status", "requestMethod", @@ -9991,6 +9997,7 @@ "any" ], "functionId": "5e5ea6g16897e", + "deploymentId": "5e5ea5c16897e", "trigger": "http", "status": "processing", "requestMethod": "GET", diff --git a/app/config/specs/swagger2-latest-console.json b/app/config/specs/swagger2-latest-console.json index 44bd326a43..26862c78bc 100644 --- a/app/config/specs/swagger2-latest-console.json +++ b/app/config/specs/swagger2-latest-console.json @@ -2770,7 +2770,7 @@ "tags": [ "account" ], - "description": "Sends the user an email with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The secret sent to the user's email is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", + "description": "Sends the user an email with a secret key for creating a session. If the email address has never been used, a **new account is created** using the provided `userId`. Otherwise, if the email address is already attached to an account, the **user ID is ignored**. Then, the user will receive an email with the one-time password. Use the returned user ID and secret and submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The secret sent to the user's email is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).\n", "responses": { "201": { "description": "Token", @@ -2818,7 +2818,7 @@ "properties": { "userId": { "type": "string", - "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.", "default": null, "x-example": "" }, @@ -2905,7 +2905,7 @@ "properties": { "userId": { "type": "string", - "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.", "default": null, "x-example": "" }, @@ -3130,7 +3130,7 @@ "properties": { "userId": { "type": "string", - "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the phone number has never been used, a new account is created using the provided userId. Otherwise, if the phone number is already attached to an account, the user ID is ignored.", "default": null, "x-example": "" }, @@ -3607,7 +3607,7 @@ "parameters": [ { "name": "code", - "description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro, rupay.", + "description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, unionpay, visa, mir, maestro, rupay.", "required": true, "type": "string", "x-example": "amex", @@ -3624,7 +3624,7 @@ "mastercard", "naranja", "targeta-shopping", - "union-china-pay", + "unionpay", "visa", "mir", "maestro", @@ -3644,7 +3644,7 @@ "Mastercard", "Naranja", "Tarjeta Shopping", - "Union China Pay", + "Union Pay", "Visa", "MIR", "Maestro", @@ -41300,6 +41300,11 @@ "description": "Function ID.", "x-example": "5e5ea6g16897e" }, + "deploymentId": { + "type": "string", + "description": "Function's deployment ID used to create the execution.", + "x-example": "5e5ea5c16897e" + }, "trigger": { "type": "string", "description": "The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.", @@ -41386,6 +41391,7 @@ "$updatedAt", "$permissions", "functionId", + "deploymentId", "trigger", "status", "requestMethod", @@ -41406,6 +41412,7 @@ "any" ], "functionId": "5e5ea6g16897e", + "deploymentId": "5e5ea5c16897e", "trigger": "http", "status": "processing", "requestMethod": "GET", diff --git a/app/config/specs/swagger2-latest-server.json b/app/config/specs/swagger2-latest-server.json index 2a04908c06..2a0035dec7 100644 --- a/app/config/specs/swagger2-latest-server.json +++ b/app/config/specs/swagger2-latest-server.json @@ -2438,7 +2438,7 @@ "tags": [ "account" ], - "description": "Sends the user an email with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The secret sent to the user's email is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).", + "description": "Sends the user an email with a secret key for creating a session. If the email address has never been used, a **new account is created** using the provided `userId`. Otherwise, if the email address is already attached to an account, the **user ID is ignored**. Then, the user will receive an email with the one-time password. Use the returned user ID and secret and submit a request to the [POST \/v1\/account\/sessions\/token](https:\/\/appwrite.io\/docs\/references\/cloud\/client-web\/account#createSession) endpoint to complete the login process. The secret sent to the user's email is valid for 15 minutes.\n\nA user is limited to 10 active sessions at a time by default. [Learn more about session limits](https:\/\/appwrite.io\/docs\/authentication-security#limits).\n", "responses": { "201": { "description": "Token", @@ -2486,7 +2486,7 @@ "properties": { "userId": { "type": "string", - "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "description": "User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.", "default": null, "x-example": "" }, @@ -2573,7 +2573,7 @@ "properties": { "userId": { "type": "string", - "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.", "default": null, "x-example": "" }, @@ -2798,7 +2798,7 @@ "properties": { "userId": { "type": "string", - "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.", + "description": "Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the phone number has never been used, a new account is created using the provided userId. Otherwise, if the phone number is already attached to an account, the user ID is ignored.", "default": null, "x-example": "" }, @@ -3287,7 +3287,7 @@ "parameters": [ { "name": "code", - "description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro, rupay.", + "description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, unionpay, visa, mir, maestro, rupay.", "required": true, "type": "string", "x-example": "amex", @@ -3304,7 +3304,7 @@ "mastercard", "naranja", "targeta-shopping", - "union-china-pay", + "unionpay", "visa", "mir", "maestro", @@ -3324,7 +3324,7 @@ "Mastercard", "Naranja", "Tarjeta Shopping", - "Union China Pay", + "Union Pay", "Visa", "MIR", "Maestro", @@ -30460,6 +30460,11 @@ "description": "Function ID.", "x-example": "5e5ea6g16897e" }, + "deploymentId": { + "type": "string", + "description": "Function's deployment ID used to create the execution.", + "x-example": "5e5ea5c16897e" + }, "trigger": { "type": "string", "description": "The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.", @@ -30546,6 +30551,7 @@ "$updatedAt", "$permissions", "functionId", + "deploymentId", "trigger", "status", "requestMethod", @@ -30566,6 +30572,7 @@ "any" ], "functionId": "5e5ea6g16897e", + "deploymentId": "5e5ea5c16897e", "trigger": "http", "status": "processing", "requestMethod": "GET", From 6ee95186ce26626021c388809375566a42f54f82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Ba=C4=8Do?= Date: Tue, 26 Aug 2025 11:48:54 +0200 Subject: [PATCH 03/29] Apply improved domain validator --- composer.json | 2 +- composer.lock | 29 ++++++---- .../Modules/Console/Http/Resources/Get.php | 55 ++++++++++++++++++- .../Modules/Proxy/Http/Rules/API/Create.php | 24 ++++++-- .../Proxy/Http/Rules/Function/Create.php | 24 ++++++-- .../Proxy/Http/Rules/Redirect/Create.php | 24 ++++++-- .../Modules/Proxy/Http/Rules/Site/Create.php | 24 ++++++-- 7 files changed, 144 insertions(+), 38 deletions(-) diff --git a/composer.json b/composer.json index cf9540c8e5..5cfb6202cf 100644 --- a/composer.json +++ b/composer.json @@ -57,7 +57,7 @@ "utopia-php/domains": "0.8.*", "utopia-php/dns": "0.3.*", "utopia-php/dsn": "0.2.1", - "utopia-php/framework": "0.33.*", + "utopia-php/framework": "dev-feat-domain-restrictions as 0.33.88", "utopia-php/fetch": "0.4.*", "utopia-php/image": "0.8.*", "utopia-php/locale": "0.8.*", diff --git a/composer.lock b/composer.lock index de48072614..8c4c947501 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "73ce235556fcb80b52ba92b0670b66e8", + "content-hash": "13f580eba5642949316d81d524996ba8", "packages": [ { "name": "adhocore/jwt", @@ -3856,16 +3856,16 @@ }, { "name": "utopia-php/framework", - "version": "0.33.21", + "version": "dev-feat-domain-restrictions", "source": { "type": "git", "url": "https://github.com/utopia-php/http.git", - "reference": "eb0e82e90b8fa493f99b8d131bdd25173422c493" + "reference": "4a029c13b374c6daa13cd1cbc043ccd713fc6d79" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/http/zipball/eb0e82e90b8fa493f99b8d131bdd25173422c493", - "reference": "eb0e82e90b8fa493f99b8d131bdd25173422c493", + "url": "https://api.github.com/repos/utopia-php/http/zipball/4a029c13b374c6daa13cd1cbc043ccd713fc6d79", + "reference": "4a029c13b374c6daa13cd1cbc043ccd713fc6d79", "shasum": "" }, "require": { @@ -3897,9 +3897,9 @@ ], "support": { "issues": "https://github.com/utopia-php/http/issues", - "source": "https://github.com/utopia-php/http/tree/0.33.21" + "source": "https://github.com/utopia-php/http/tree/feat-domain-restrictions" }, - "time": "2025-08-19T10:52:15+00:00" + "time": "2025-08-26T09:28:47+00:00" }, { "name": "utopia-php/image", @@ -8420,9 +8420,18 @@ "time": "2024-03-07T20:33:40+00:00" } ], - "aliases": [], + "aliases": [ + { + "package": "utopia-php/framework", + "version": "dev-feat-domain-restrictions", + "alias": "0.33.88", + "alias_normalized": "0.33.88.0" + } + ], "minimum-stability": "stable", - "stability-flags": [], + "stability-flags": { + "utopia-php/framework": 20 + }, "prefer-stable": false, "prefer-lowest": false, "platform": { @@ -8446,5 +8455,5 @@ "platform-overrides": { "php": "8.3" }, - "plugin-api-version": "2.6.0" + "plugin-api-version": "2.3.0" } diff --git a/src/Appwrite/Platform/Modules/Console/Http/Resources/Get.php b/src/Appwrite/Platform/Modules/Console/Http/Resources/Get.php index 114a24ef22..4f197fcd79 100644 --- a/src/Appwrite/Platform/Modules/Console/Http/Resources/Get.php +++ b/src/Appwrite/Platform/Modules/Console/Http/Resources/Get.php @@ -11,9 +11,11 @@ use Appwrite\Utopia\Response; use Utopia\Database\Database; use Utopia\Database\Query; use Utopia\Database\Validator\Authorization; +use Utopia\Domains\Domain as Domain; use Utopia\Platform\Action; use Utopia\Platform\Scope\HTTP; -use Utopia\Validator\Domain; +use Utopia\System\System; +use Utopia\Validator\Domain as DomainValidator; use Utopia\Validator\Text; use Utopia\Validator\WhiteList; @@ -67,10 +69,57 @@ class Get extends Action Database $dbForPlatform ) { if ($type === 'rules') { - $validator = new Domain($value); + $sitesDomain = System::getEnv('_APP_DOMAIN_SITES', ''); + $functionsDomain = System::getEnv('_APP_DOMAIN_FUNCTIONS', ''); + + $restrictions = []; + if (!empty($sitesDomain)) { + $domainLevel = \count(\explode('.', $sitesDomain)); + $restrictions[] = DomainValidator::createRestriction($sitesDomain, $domainLevel + 1, ['commit-', 'branch-']); + } + if (!empty($functionsDomain)) { + $domainLevel = \count(\explode('.', $functionsDomain)); + $restrictions[] = DomainValidator::createRestriction($functionsDomain, $domainLevel + 1); + } + $validator = new DomainValidator($restrictions); if (!$validator->isValid($value)) { - throw new Exception(Exception::GENERAL_ARGUMENT_INVALID, $validator->getDescription()); + throw new Exception(Exception::GENERAL_ARGUMENT_INVALID, 'This domain name is not allowed. Please use a different domain.'); + } + + $deniedDomains = [ + 'localhost', + APP_HOSTNAME_INTERNAL + ]; + + $mainDomain = System::getEnv('_APP_DOMAIN', ''); + $deniedDomains[] = $mainDomain; + + if (!empty($sitesDomain)) { + $deniedDomains[] = $sitesDomain; + } + + if (!empty($functionsDomain)) { + $deniedDomains[] = $functionsDomain; + } + + $denyListDomains = System::getEnv('_APP_CUSTOM_DOMAIN_DENY_LIST', ''); + $denyListDomains = \array_map('trim', explode(',', $denyListDomains)); + foreach ($denyListDomains as $denyListDomain) { + if (empty($denyListDomain)) { + continue; + } + $deniedDomains[] = $denyListDomain; + } + + if (\in_array($value, $deniedDomains)) { + throw new Exception(Exception::GENERAL_ARGUMENT_INVALID, 'This domain name is not allowed. Please use a different domain.'); + } + + try { + $domain = new Domain($value); + } catch (\Throwable) { + throw new Exception(Exception::GENERAL_ARGUMENT_INVALID, 'Domain may not start with http:// or https://.'); } $document = Authorization::skip(fn () => $dbForPlatform->findOne('rules', [ diff --git a/src/Appwrite/Platform/Modules/Proxy/Http/Rules/API/Create.php b/src/Appwrite/Platform/Modules/Proxy/Http/Rules/API/Create.php index 4efe8176f6..4cc8f48e7c 100644 --- a/src/Appwrite/Platform/Modules/Proxy/Http/Rules/API/Create.php +++ b/src/Appwrite/Platform/Modules/Proxy/Http/Rules/API/Create.php @@ -71,6 +71,24 @@ class Create extends Action public function action(string $domain, Response $response, Document $project, Certificate $queueForCertificates, Event $queueForEvents, Database $dbForPlatform) { + $sitesDomain = System::getEnv('_APP_DOMAIN_SITES', ''); + $functionsDomain = System::getEnv('_APP_DOMAIN_FUNCTIONS', ''); + + $restrictions = []; + if (!empty($sitesDomain)) { + $domainLevel = \count(\explode('.', $sitesDomain)); + $restrictions[] = ValidatorDomain::createRestriction($sitesDomain, $domainLevel + 1, ['commit-', 'branch-']); + } + if (!empty($functionsDomain)) { + $domainLevel = \count(\explode('.', $functionsDomain)); + $restrictions[] = ValidatorDomain::createRestriction($functionsDomain, $domainLevel + 1); + } + $validator = new ValidatorDomain($restrictions); + + if (!$validator->isValid($domain)) { + throw new Exception(Exception::GENERAL_ARGUMENT_INVALID, 'This domain name is not allowed. Please use a different domain.'); + } + $deniedDomains = [ 'localhost', APP_HOSTNAME_INTERNAL @@ -79,12 +97,10 @@ class Create extends Action $mainDomain = System::getEnv('_APP_DOMAIN', ''); $deniedDomains[] = $mainDomain; - $sitesDomain = System::getEnv('_APP_DOMAIN_SITES', ''); if (!empty($sitesDomain)) { $deniedDomains[] = $sitesDomain; } - $functionsDomain = System::getEnv('_APP_DOMAIN_FUNCTIONS', ''); if (!empty($functionsDomain)) { $deniedDomains[] = $functionsDomain; } @@ -102,10 +118,6 @@ class Create extends Action throw new Exception(Exception::GENERAL_ARGUMENT_INVALID, 'This domain name is not allowed. Please use a different domain.'); } - if (\str_starts_with($domain, 'commit-') || \str_starts_with($domain, 'branch-')) { - throw new Exception(Exception::GENERAL_ARGUMENT_INVALID, 'This domain name is not allowed. Please use a different domain.'); - } - try { $domain = new Domain($domain); } catch (\Throwable) { diff --git a/src/Appwrite/Platform/Modules/Proxy/Http/Rules/Function/Create.php b/src/Appwrite/Platform/Modules/Proxy/Http/Rules/Function/Create.php index 1c8fe7b04d..5839e03e25 100644 --- a/src/Appwrite/Platform/Modules/Proxy/Http/Rules/Function/Create.php +++ b/src/Appwrite/Platform/Modules/Proxy/Http/Rules/Function/Create.php @@ -76,6 +76,24 @@ class Create extends Action public function action(string $domain, string $functionId, string $branch, Response $response, Document $project, Certificate $queueForCertificates, Event $queueForEvents, Database $dbForPlatform, Database $dbForProject) { + $sitesDomain = System::getEnv('_APP_DOMAIN_SITES', ''); + $functionsDomain = System::getEnv('_APP_DOMAIN_FUNCTIONS', ''); + + $restrictions = []; + if (!empty($sitesDomain)) { + $domainLevel = \count(\explode('.', $sitesDomain)); + $restrictions[] = ValidatorDomain::createRestriction($sitesDomain, $domainLevel + 1, ['commit-', 'branch-']); + } + if (!empty($functionsDomain)) { + $domainLevel = \count(\explode('.', $functionsDomain)); + $restrictions[] = ValidatorDomain::createRestriction($functionsDomain, $domainLevel + 1); + } + $validator = new ValidatorDomain($restrictions); + + if (!$validator->isValid($domain)) { + throw new Exception(Exception::GENERAL_ARGUMENT_INVALID, 'This domain name is not allowed. Please use a different domain.'); + } + $deniedDomains = [ 'localhost', APP_HOSTNAME_INTERNAL @@ -84,12 +102,10 @@ class Create extends Action $mainDomain = System::getEnv('_APP_DOMAIN', ''); $deniedDomains[] = $mainDomain; - $sitesDomain = System::getEnv('_APP_DOMAIN_SITES', ''); if (!empty($sitesDomain)) { $deniedDomains[] = $sitesDomain; } - $functionsDomain = System::getEnv('_APP_DOMAIN_FUNCTIONS', ''); if (!empty($functionsDomain)) { $deniedDomains[] = $functionsDomain; } @@ -107,10 +123,6 @@ class Create extends Action throw new Exception(Exception::GENERAL_ARGUMENT_INVALID, 'This domain name is not allowed. Please use a different domain.'); } - if (\str_starts_with($domain, 'commit-') || \str_starts_with($domain, 'branch-')) { - throw new Exception(Exception::GENERAL_ARGUMENT_INVALID, 'This domain name is not allowed. Please use a different domain.'); - } - try { $domain = new Domain($domain); } catch (\Throwable) { diff --git a/src/Appwrite/Platform/Modules/Proxy/Http/Rules/Redirect/Create.php b/src/Appwrite/Platform/Modules/Proxy/Http/Rules/Redirect/Create.php index 580d92bc74..1dfef8bcc7 100644 --- a/src/Appwrite/Platform/Modules/Proxy/Http/Rules/Redirect/Create.php +++ b/src/Appwrite/Platform/Modules/Proxy/Http/Rules/Redirect/Create.php @@ -79,6 +79,24 @@ class Create extends Action public function action(string $domain, string $url, int $statusCode, string $resourceId, string $resourceType, Response $response, Document $project, Certificate $queueForCertificates, Event $queueForEvents, Database $dbForPlatform, Database $dbForProject) { + $sitesDomain = System::getEnv('_APP_DOMAIN_SITES', ''); + $functionsDomain = System::getEnv('_APP_DOMAIN_FUNCTIONS', ''); + + $restrictions = []; + if (!empty($sitesDomain)) { + $domainLevel = \count(\explode('.', $sitesDomain)); + $restrictions[] = ValidatorDomain::createRestriction($sitesDomain, $domainLevel + 1, ['commit-', 'branch-']); + } + if (!empty($functionsDomain)) { + $domainLevel = \count(\explode('.', $functionsDomain)); + $restrictions[] = ValidatorDomain::createRestriction($functionsDomain, $domainLevel + 1); + } + $validator = new ValidatorDomain($restrictions); + + if (!$validator->isValid($domain)) { + throw new Exception(Exception::GENERAL_ARGUMENT_INVALID, 'This domain name is not allowed. Please use a different domain.'); + } + $deniedDomains = [ 'localhost', APP_HOSTNAME_INTERNAL @@ -87,12 +105,10 @@ class Create extends Action $mainDomain = System::getEnv('_APP_DOMAIN', ''); $deniedDomains[] = $mainDomain; - $sitesDomain = System::getEnv('_APP_DOMAIN_SITES', ''); if (!empty($sitesDomain)) { $deniedDomains[] = $sitesDomain; } - $functionsDomain = System::getEnv('_APP_DOMAIN_FUNCTIONS', ''); if (!empty($functionsDomain)) { $deniedDomains[] = $functionsDomain; } @@ -110,10 +126,6 @@ class Create extends Action throw new Exception(Exception::GENERAL_ARGUMENT_INVALID, 'This domain name is not allowed. Please use a different domain.'); } - if (\str_starts_with($domain, 'commit-') || \str_starts_with($domain, 'branch-')) { - throw new Exception(Exception::GENERAL_ARGUMENT_INVALID, 'This domain name is not allowed. Please use a different domain.'); - } - try { $domain = new Domain($domain); } catch (\Throwable) { diff --git a/src/Appwrite/Platform/Modules/Proxy/Http/Rules/Site/Create.php b/src/Appwrite/Platform/Modules/Proxy/Http/Rules/Site/Create.php index 7a5a1f4952..43cf09eaca 100644 --- a/src/Appwrite/Platform/Modules/Proxy/Http/Rules/Site/Create.php +++ b/src/Appwrite/Platform/Modules/Proxy/Http/Rules/Site/Create.php @@ -76,6 +76,24 @@ class Create extends Action public function action(string $domain, string $siteId, string $branch, Response $response, Document $project, Certificate $queueForCertificates, Event $queueForEvents, Database $dbForPlatform, Database $dbForProject) { + $sitesDomain = System::getEnv('_APP_DOMAIN_SITES', ''); + $functionsDomain = System::getEnv('_APP_DOMAIN_FUNCTIONS', ''); + + $restrictions = []; + if (!empty($sitesDomain)) { + $domainLevel = \count(\explode('.', $sitesDomain)); + $restrictions[] = ValidatorDomain::createRestriction($sitesDomain, $domainLevel + 1, ['commit-', 'branch-']); + } + if (!empty($functionsDomain)) { + $domainLevel = \count(\explode('.', $functionsDomain)); + $restrictions[] = ValidatorDomain::createRestriction($functionsDomain, $domainLevel + 1); + } + $validator = new ValidatorDomain($restrictions); + + if (!$validator->isValid($domain)) { + throw new Exception(Exception::GENERAL_ARGUMENT_INVALID, 'This domain name is not allowed. Please use a different domain.'); + } + $deniedDomains = [ 'localhost', APP_HOSTNAME_INTERNAL @@ -84,12 +102,10 @@ class Create extends Action $mainDomain = System::getEnv('_APP_DOMAIN', ''); $deniedDomains[] = $mainDomain; - $sitesDomain = System::getEnv('_APP_DOMAIN_SITES', ''); if (!empty($sitesDomain)) { $deniedDomains[] = $sitesDomain; } - $functionsDomain = System::getEnv('_APP_DOMAIN_FUNCTIONS', ''); if (!empty($functionsDomain)) { $deniedDomains[] = $functionsDomain; } @@ -107,10 +123,6 @@ class Create extends Action throw new Exception(Exception::GENERAL_ARGUMENT_INVALID, 'This domain name is not allowed. Please use a different domain.'); } - if (\str_starts_with($domain, 'commit-') || \str_starts_with($domain, 'branch-')) { - throw new Exception(Exception::GENERAL_ARGUMENT_INVALID, 'This domain name is not allowed. Please use a different domain.'); - } - try { $domain = new Domain($domain); } catch (\Throwable) { From 01ea91dd977c29b6fadf7f16ead50b15755bb74d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Ba=C4=8Do?= Date: Tue, 26 Aug 2025 12:26:38 +0200 Subject: [PATCH 04/29] fix tests --- tests/e2e/General/UsageTest.php | 2 +- tests/e2e/Services/Proxy/ProxyCustomServerTest.php | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/tests/e2e/General/UsageTest.php b/tests/e2e/General/UsageTest.php index 6389258e3a..92c5f75504 100644 --- a/tests/e2e/General/UsageTest.php +++ b/tests/e2e/General/UsageTest.php @@ -1040,7 +1040,7 @@ class UsageTest extends Scope 'x-appwrite-project' => $this->getProject()['$id'], ], $this->getHeaders()), [ - 'domain' => 'test-' . ID::unique() . System::getEnv('_APP_DOMAIN_FUNCTIONS'), + 'domain' => 'test-' . ID::unique() . '.' . System::getEnv('_APP_DOMAIN_FUNCTIONS'), 'functionId' => $functionId, ], ); diff --git a/tests/e2e/Services/Proxy/ProxyCustomServerTest.php b/tests/e2e/Services/Proxy/ProxyCustomServerTest.php index da23b9ab7c..e250bec8ab 100644 --- a/tests/e2e/Services/Proxy/ProxyCustomServerTest.php +++ b/tests/e2e/Services/Proxy/ProxyCustomServerTest.php @@ -70,6 +70,20 @@ class ProxyCustomServerTest extends Scope $this->assertNotEmpty($siteId); $this->assertNotEmpty($deploymentId); + $rule = $this->createSiteRule('commit-' . $domain, $siteId); + $this->assertEquals(201, $rule['headers']['status-code']); + $this->cleanupRule($rule['body']['$id']); + + $rule = $this->createSiteRule('branch-' . $domain, $siteId); + $this->assertEquals(201, $rule['headers']['status-code']); + $this->cleanupRule($rule['body']['$id']); + + $rule = $this->createSiteRule('anything-' . $domain, $siteId); + $this->assertEquals(201, $rule['headers']['status-code']); + $this->cleanupRule($rule['body']['$id']); + + $domain = \uniqid() . '-vcs.' . System::getEnv('_APP_DOMAIN_SITES', ''); + $rule = $this->createSiteRule('commit-' . $domain, $siteId); $this->assertEquals(400, $rule['headers']['status-code']); From afc0a908ef3749a899b64e5a65bb60ebf34c2e8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Ba=C4=8Do?= Date: Tue, 26 Aug 2025 12:34:14 +0200 Subject: [PATCH 05/29] Add new tests --- composer.json | 2 +- composer.lock | 27 +++++++------------ .../Services/Proxy/ProxyCustomServerTest.php | 3 +++ 3 files changed, 13 insertions(+), 19 deletions(-) diff --git a/composer.json b/composer.json index 5cfb6202cf..cf9540c8e5 100644 --- a/composer.json +++ b/composer.json @@ -57,7 +57,7 @@ "utopia-php/domains": "0.8.*", "utopia-php/dns": "0.3.*", "utopia-php/dsn": "0.2.1", - "utopia-php/framework": "dev-feat-domain-restrictions as 0.33.88", + "utopia-php/framework": "0.33.*", "utopia-php/fetch": "0.4.*", "utopia-php/image": "0.8.*", "utopia-php/locale": "0.8.*", diff --git a/composer.lock b/composer.lock index 8c4c947501..a6986d0816 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "13f580eba5642949316d81d524996ba8", + "content-hash": "73ce235556fcb80b52ba92b0670b66e8", "packages": [ { "name": "adhocore/jwt", @@ -3856,16 +3856,16 @@ }, { "name": "utopia-php/framework", - "version": "dev-feat-domain-restrictions", + "version": "0.33.22", "source": { "type": "git", "url": "https://github.com/utopia-php/http.git", - "reference": "4a029c13b374c6daa13cd1cbc043ccd713fc6d79" + "reference": "c01a815cb976c9255e045fc3bcc3f5fcf477e0bc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/http/zipball/4a029c13b374c6daa13cd1cbc043ccd713fc6d79", - "reference": "4a029c13b374c6daa13cd1cbc043ccd713fc6d79", + "url": "https://api.github.com/repos/utopia-php/http/zipball/c01a815cb976c9255e045fc3bcc3f5fcf477e0bc", + "reference": "c01a815cb976c9255e045fc3bcc3f5fcf477e0bc", "shasum": "" }, "require": { @@ -3897,9 +3897,9 @@ ], "support": { "issues": "https://github.com/utopia-php/http/issues", - "source": "https://github.com/utopia-php/http/tree/feat-domain-restrictions" + "source": "https://github.com/utopia-php/http/tree/0.33.22" }, - "time": "2025-08-26T09:28:47+00:00" + "time": "2025-08-26T10:29:50+00:00" }, { "name": "utopia-php/image", @@ -8420,18 +8420,9 @@ "time": "2024-03-07T20:33:40+00:00" } ], - "aliases": [ - { - "package": "utopia-php/framework", - "version": "dev-feat-domain-restrictions", - "alias": "0.33.88", - "alias_normalized": "0.33.88.0" - } - ], + "aliases": [], "minimum-stability": "stable", - "stability-flags": { - "utopia-php/framework": 20 - }, + "stability-flags": [], "prefer-stable": false, "prefer-lowest": false, "platform": { diff --git a/tests/e2e/Services/Proxy/ProxyCustomServerTest.php b/tests/e2e/Services/Proxy/ProxyCustomServerTest.php index e250bec8ab..5a1cd1dea6 100644 --- a/tests/e2e/Services/Proxy/ProxyCustomServerTest.php +++ b/tests/e2e/Services/Proxy/ProxyCustomServerTest.php @@ -90,6 +90,9 @@ class ProxyCustomServerTest extends Scope $rule = $this->createSiteRule('branch-' . $domain, $siteId); $this->assertEquals(400, $rule['headers']['status-code']); + $rule = $this->createSiteRule('subdomain.anything-' . $domain, $siteId); + $this->assertEquals(400, $rule['headers']['status-code']); + $rule = $this->createSiteRule('anything-' . $domain, $siteId); $this->assertEquals(201, $rule['headers']['status-code']); $this->cleanupRule($rule['body']['$id']); From 901a924af75572fde3eab4a7b368394e3c5767c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Ba=C4=8Do?= Date: Tue, 26 Aug 2025 12:53:25 +0200 Subject: [PATCH 06/29] PR review changes --- src/Appwrite/Platform/Modules/Console/Http/Resources/Get.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Appwrite/Platform/Modules/Console/Http/Resources/Get.php b/src/Appwrite/Platform/Modules/Console/Http/Resources/Get.php index 4f197fcd79..b67a42adb1 100644 --- a/src/Appwrite/Platform/Modules/Console/Http/Resources/Get.php +++ b/src/Appwrite/Platform/Modules/Console/Http/Resources/Get.php @@ -74,10 +74,12 @@ class Get extends Action $restrictions = []; if (!empty($sitesDomain)) { + // Ensure site domains are exactly 1 subdomain, and dont start with reserved prefix $domainLevel = \count(\explode('.', $sitesDomain)); $restrictions[] = DomainValidator::createRestriction($sitesDomain, $domainLevel + 1, ['commit-', 'branch-']); } if (!empty($functionsDomain)) { + // Ensure function domains are exactly 1 subdomain $domainLevel = \count(\explode('.', $functionsDomain)); $restrictions[] = DomainValidator::createRestriction($functionsDomain, $domainLevel + 1); } From 26228e96d9290772743a11dcc6710415a20da1c7 Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Tue, 26 Aug 2025 17:21:47 +0530 Subject: [PATCH 07/29] chore: add replacewith and deprecated since to updatePhoneSession and updateMagicURLSession --- app/config/specs/open-api3-1.8.x-client.json | 8 ++++++++ app/config/specs/open-api3-1.8.x-console.json | 12 ++++++++++-- app/config/specs/open-api3-1.8.x-server.json | 12 ++++++++++-- app/config/specs/open-api3-latest-client.json | 8 ++++++++ app/config/specs/open-api3-latest-console.json | 12 ++++++++++-- app/config/specs/open-api3-latest-server.json | 12 ++++++++++-- app/config/specs/swagger2-1.8.x-client.json | 8 ++++++++ app/config/specs/swagger2-1.8.x-console.json | 12 ++++++++++-- app/config/specs/swagger2-1.8.x-server.json | 12 ++++++++++-- app/config/specs/swagger2-latest-client.json | 8 ++++++++ app/config/specs/swagger2-latest-console.json | 12 ++++++++++-- app/config/specs/swagger2-latest-server.json | 12 ++++++++++-- app/controllers/api/account.php | 10 ++++++++-- 13 files changed, 120 insertions(+), 18 deletions(-) diff --git a/app/config/specs/open-api3-1.8.x-client.json b/app/config/specs/open-api3-1.8.x-client.json index 7d0107fa02..f8b17b590d 100644 --- a/app/config/specs/open-api3-1.8.x-client.json +++ b/app/config/specs/open-api3-1.8.x-client.json @@ -2316,6 +2316,10 @@ "client" ], "packaging": false, + "deprecated": { + "since": "0.16.0", + "replaceWith": "account.createSession" + }, "auth": { "Project": [] } @@ -2525,6 +2529,10 @@ "client" ], "packaging": false, + "deprecated": { + "since": "0.16.0", + "replaceWith": "account.createSession" + }, "auth": { "Project": [] } diff --git a/app/config/specs/open-api3-1.8.x-console.json b/app/config/specs/open-api3-1.8.x-console.json index 2c6aee60a3..eece5ea7db 100644 --- a/app/config/specs/open-api3-1.8.x-console.json +++ b/app/config/specs/open-api3-1.8.x-console.json @@ -2332,6 +2332,10 @@ "client" ], "packaging": false, + "deprecated": { + "since": "0.16.0", + "replaceWith": "account.createSession" + }, "auth": { "Project": [] } @@ -2541,6 +2545,10 @@ "client" ], "packaging": false, + "deprecated": { + "since": "0.16.0", + "replaceWith": "account.createSession" + }, "auth": { "Project": [] } @@ -5122,7 +5130,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tablesDB.createDatabase" + "replaceWith": "tablesDB.create" }, "methods": [ { @@ -5151,7 +5159,7 @@ "demo": "databases\/create.md", "deprecated": { "since": "1.8.0", - "replaceWith": "tablesDB.createDatabase" + "replaceWith": "tablesDB.create" } } ], diff --git a/app/config/specs/open-api3-1.8.x-server.json b/app/config/specs/open-api3-1.8.x-server.json index 7ff41e8be6..20355e9710 100644 --- a/app/config/specs/open-api3-1.8.x-server.json +++ b/app/config/specs/open-api3-1.8.x-server.json @@ -2355,6 +2355,10 @@ "client" ], "packaging": false, + "deprecated": { + "since": "0.16.0", + "replaceWith": "account.createSession" + }, "auth": { "Project": [] } @@ -2429,6 +2433,10 @@ "client" ], "packaging": false, + "deprecated": { + "since": "0.16.0", + "replaceWith": "account.createSession" + }, "auth": { "Project": [] } @@ -4658,7 +4666,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tablesDB.createDatabase" + "replaceWith": "tablesDB.create" }, "methods": [ { @@ -4688,7 +4696,7 @@ "demo": "databases\/create.md", "deprecated": { "since": "1.8.0", - "replaceWith": "tablesDB.createDatabase" + "replaceWith": "tablesDB.create" } } ], diff --git a/app/config/specs/open-api3-latest-client.json b/app/config/specs/open-api3-latest-client.json index 7d0107fa02..f8b17b590d 100644 --- a/app/config/specs/open-api3-latest-client.json +++ b/app/config/specs/open-api3-latest-client.json @@ -2316,6 +2316,10 @@ "client" ], "packaging": false, + "deprecated": { + "since": "0.16.0", + "replaceWith": "account.createSession" + }, "auth": { "Project": [] } @@ -2525,6 +2529,10 @@ "client" ], "packaging": false, + "deprecated": { + "since": "0.16.0", + "replaceWith": "account.createSession" + }, "auth": { "Project": [] } diff --git a/app/config/specs/open-api3-latest-console.json b/app/config/specs/open-api3-latest-console.json index 2c6aee60a3..eece5ea7db 100644 --- a/app/config/specs/open-api3-latest-console.json +++ b/app/config/specs/open-api3-latest-console.json @@ -2332,6 +2332,10 @@ "client" ], "packaging": false, + "deprecated": { + "since": "0.16.0", + "replaceWith": "account.createSession" + }, "auth": { "Project": [] } @@ -2541,6 +2545,10 @@ "client" ], "packaging": false, + "deprecated": { + "since": "0.16.0", + "replaceWith": "account.createSession" + }, "auth": { "Project": [] } @@ -5122,7 +5130,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tablesDB.createDatabase" + "replaceWith": "tablesDB.create" }, "methods": [ { @@ -5151,7 +5159,7 @@ "demo": "databases\/create.md", "deprecated": { "since": "1.8.0", - "replaceWith": "tablesDB.createDatabase" + "replaceWith": "tablesDB.create" } } ], diff --git a/app/config/specs/open-api3-latest-server.json b/app/config/specs/open-api3-latest-server.json index 7ff41e8be6..20355e9710 100644 --- a/app/config/specs/open-api3-latest-server.json +++ b/app/config/specs/open-api3-latest-server.json @@ -2355,6 +2355,10 @@ "client" ], "packaging": false, + "deprecated": { + "since": "0.16.0", + "replaceWith": "account.createSession" + }, "auth": { "Project": [] } @@ -2429,6 +2433,10 @@ "client" ], "packaging": false, + "deprecated": { + "since": "0.16.0", + "replaceWith": "account.createSession" + }, "auth": { "Project": [] } @@ -4658,7 +4666,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tablesDB.createDatabase" + "replaceWith": "tablesDB.create" }, "methods": [ { @@ -4688,7 +4696,7 @@ "demo": "databases\/create.md", "deprecated": { "since": "1.8.0", - "replaceWith": "tablesDB.createDatabase" + "replaceWith": "tablesDB.create" } } ], diff --git a/app/config/specs/swagger2-1.8.x-client.json b/app/config/specs/swagger2-1.8.x-client.json index 29cfd281c1..053bf87387 100644 --- a/app/config/specs/swagger2-1.8.x-client.json +++ b/app/config/specs/swagger2-1.8.x-client.json @@ -2424,6 +2424,10 @@ "client" ], "packaging": false, + "deprecated": { + "since": "0.16.0", + "replaceWith": "account.createSession" + }, "auth": { "Project": [] } @@ -2634,6 +2638,10 @@ "client" ], "packaging": false, + "deprecated": { + "since": "0.16.0", + "replaceWith": "account.createSession" + }, "auth": { "Project": [] } diff --git a/app/config/specs/swagger2-1.8.x-console.json b/app/config/specs/swagger2-1.8.x-console.json index cf4c425874..76f810bf49 100644 --- a/app/config/specs/swagger2-1.8.x-console.json +++ b/app/config/specs/swagger2-1.8.x-console.json @@ -2450,6 +2450,10 @@ "client" ], "packaging": false, + "deprecated": { + "since": "0.16.0", + "replaceWith": "account.createSession" + }, "auth": { "Project": [] } @@ -2660,6 +2664,10 @@ "client" ], "packaging": false, + "deprecated": { + "since": "0.16.0", + "replaceWith": "account.createSession" + }, "auth": { "Project": [] } @@ -5281,7 +5289,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tablesDB.createDatabase" + "replaceWith": "tablesDB.create" }, "methods": [ { @@ -5310,7 +5318,7 @@ "demo": "databases\/create.md", "deprecated": { "since": "1.8.0", - "replaceWith": "tablesDB.createDatabase" + "replaceWith": "tablesDB.create" } } ], diff --git a/app/config/specs/swagger2-1.8.x-server.json b/app/config/specs/swagger2-1.8.x-server.json index 2c56aa09f3..3ef33e30ee 100644 --- a/app/config/specs/swagger2-1.8.x-server.json +++ b/app/config/specs/swagger2-1.8.x-server.json @@ -2472,6 +2472,10 @@ "client" ], "packaging": false, + "deprecated": { + "since": "0.16.0", + "replaceWith": "account.createSession" + }, "auth": { "Project": [] } @@ -2550,6 +2554,10 @@ "client" ], "packaging": false, + "deprecated": { + "since": "0.16.0", + "replaceWith": "account.createSession" + }, "auth": { "Project": [] } @@ -4805,7 +4813,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tablesDB.createDatabase" + "replaceWith": "tablesDB.create" }, "methods": [ { @@ -4835,7 +4843,7 @@ "demo": "databases\/create.md", "deprecated": { "since": "1.8.0", - "replaceWith": "tablesDB.createDatabase" + "replaceWith": "tablesDB.create" } } ], diff --git a/app/config/specs/swagger2-latest-client.json b/app/config/specs/swagger2-latest-client.json index 29cfd281c1..053bf87387 100644 --- a/app/config/specs/swagger2-latest-client.json +++ b/app/config/specs/swagger2-latest-client.json @@ -2424,6 +2424,10 @@ "client" ], "packaging": false, + "deprecated": { + "since": "0.16.0", + "replaceWith": "account.createSession" + }, "auth": { "Project": [] } @@ -2634,6 +2638,10 @@ "client" ], "packaging": false, + "deprecated": { + "since": "0.16.0", + "replaceWith": "account.createSession" + }, "auth": { "Project": [] } diff --git a/app/config/specs/swagger2-latest-console.json b/app/config/specs/swagger2-latest-console.json index cf4c425874..76f810bf49 100644 --- a/app/config/specs/swagger2-latest-console.json +++ b/app/config/specs/swagger2-latest-console.json @@ -2450,6 +2450,10 @@ "client" ], "packaging": false, + "deprecated": { + "since": "0.16.0", + "replaceWith": "account.createSession" + }, "auth": { "Project": [] } @@ -2660,6 +2664,10 @@ "client" ], "packaging": false, + "deprecated": { + "since": "0.16.0", + "replaceWith": "account.createSession" + }, "auth": { "Project": [] } @@ -5281,7 +5289,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tablesDB.createDatabase" + "replaceWith": "tablesDB.create" }, "methods": [ { @@ -5310,7 +5318,7 @@ "demo": "databases\/create.md", "deprecated": { "since": "1.8.0", - "replaceWith": "tablesDB.createDatabase" + "replaceWith": "tablesDB.create" } } ], diff --git a/app/config/specs/swagger2-latest-server.json b/app/config/specs/swagger2-latest-server.json index 2c56aa09f3..3ef33e30ee 100644 --- a/app/config/specs/swagger2-latest-server.json +++ b/app/config/specs/swagger2-latest-server.json @@ -2472,6 +2472,10 @@ "client" ], "packaging": false, + "deprecated": { + "since": "0.16.0", + "replaceWith": "account.createSession" + }, "auth": { "Project": [] } @@ -2550,6 +2554,10 @@ "client" ], "packaging": false, + "deprecated": { + "since": "0.16.0", + "replaceWith": "account.createSession" + }, "auth": { "Project": [] } @@ -4805,7 +4813,7 @@ "packaging": false, "deprecated": { "since": "1.8.0", - "replaceWith": "tablesDB.createDatabase" + "replaceWith": "tablesDB.create" }, "methods": [ { @@ -4835,7 +4843,7 @@ "demo": "databases\/create.md", "deprecated": { "since": "1.8.0", - "replaceWith": "tablesDB.createDatabase" + "replaceWith": "tablesDB.create" } } ], diff --git a/app/controllers/api/account.php b/app/controllers/api/account.php index dcb51aee33..7265d2910c 100644 --- a/app/controllers/api/account.php +++ b/app/controllers/api/account.php @@ -2419,7 +2419,10 @@ App::put('/v1/account/sessions/magic-url') ) ], contentType: ContentType::JSON, - deprecated: true, + deprecated: new Deprecated( + since: '0.16.0', + replaceWith: 'account.createSession' + ), )) ->label('abuse-limit', 10) ->label('abuse-key', 'ip:{ip},userId:{param-userId}') @@ -2457,7 +2460,10 @@ App::put('/v1/account/sessions/phone') ) ], contentType: ContentType::JSON, - deprecated: true, + deprecated: new Deprecated( + since: '0.16.0', + replaceWith: 'account.createSession' + ), )) ->label('abuse-limit', 10) ->label('abuse-key', 'ip:{ip},userId:{param-userId}') From 5a35f1313b6022dfb4163f0e80ab7caae5e5e085 Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Tue, 26 Aug 2025 17:33:49 +0530 Subject: [PATCH 08/29] fix: version, remove boolean --- app/config/specs/open-api3-1.8.x-client.json | 4 ++-- app/config/specs/open-api3-1.8.x-console.json | 4 ++-- app/config/specs/open-api3-1.8.x-server.json | 4 ++-- app/config/specs/open-api3-latest-client.json | 4 ++-- app/config/specs/open-api3-latest-console.json | 4 ++-- app/config/specs/open-api3-latest-server.json | 4 ++-- app/config/specs/swagger2-1.8.x-client.json | 4 ++-- app/config/specs/swagger2-1.8.x-console.json | 4 ++-- app/config/specs/swagger2-1.8.x-server.json | 4 ++-- app/config/specs/swagger2-latest-client.json | 4 ++-- app/config/specs/swagger2-latest-console.json | 4 ++-- app/config/specs/swagger2-latest-server.json | 4 ++-- app/controllers/api/account.php | 4 ++-- src/Appwrite/SDK/Method.php | 8 ++++---- src/Appwrite/SDK/Specification/Format/OpenAPI3.php | 2 +- src/Appwrite/SDK/Specification/Format/Swagger2.php | 4 ++-- 16 files changed, 33 insertions(+), 33 deletions(-) diff --git a/app/config/specs/open-api3-1.8.x-client.json b/app/config/specs/open-api3-1.8.x-client.json index f8b17b590d..2ae5797aa5 100644 --- a/app/config/specs/open-api3-1.8.x-client.json +++ b/app/config/specs/open-api3-1.8.x-client.json @@ -2317,7 +2317,7 @@ ], "packaging": false, "deprecated": { - "since": "0.16.0", + "since": "1.6.0", "replaceWith": "account.createSession" }, "auth": { @@ -2530,7 +2530,7 @@ ], "packaging": false, "deprecated": { - "since": "0.16.0", + "since": "1.6.0", "replaceWith": "account.createSession" }, "auth": { diff --git a/app/config/specs/open-api3-1.8.x-console.json b/app/config/specs/open-api3-1.8.x-console.json index eece5ea7db..921a2e7c6a 100644 --- a/app/config/specs/open-api3-1.8.x-console.json +++ b/app/config/specs/open-api3-1.8.x-console.json @@ -2333,7 +2333,7 @@ ], "packaging": false, "deprecated": { - "since": "0.16.0", + "since": "1.6.0", "replaceWith": "account.createSession" }, "auth": { @@ -2546,7 +2546,7 @@ ], "packaging": false, "deprecated": { - "since": "0.16.0", + "since": "1.6.0", "replaceWith": "account.createSession" }, "auth": { diff --git a/app/config/specs/open-api3-1.8.x-server.json b/app/config/specs/open-api3-1.8.x-server.json index 20355e9710..a78fb7d74a 100644 --- a/app/config/specs/open-api3-1.8.x-server.json +++ b/app/config/specs/open-api3-1.8.x-server.json @@ -2356,7 +2356,7 @@ ], "packaging": false, "deprecated": { - "since": "0.16.0", + "since": "1.6.0", "replaceWith": "account.createSession" }, "auth": { @@ -2434,7 +2434,7 @@ ], "packaging": false, "deprecated": { - "since": "0.16.0", + "since": "1.6.0", "replaceWith": "account.createSession" }, "auth": { diff --git a/app/config/specs/open-api3-latest-client.json b/app/config/specs/open-api3-latest-client.json index f8b17b590d..2ae5797aa5 100644 --- a/app/config/specs/open-api3-latest-client.json +++ b/app/config/specs/open-api3-latest-client.json @@ -2317,7 +2317,7 @@ ], "packaging": false, "deprecated": { - "since": "0.16.0", + "since": "1.6.0", "replaceWith": "account.createSession" }, "auth": { @@ -2530,7 +2530,7 @@ ], "packaging": false, "deprecated": { - "since": "0.16.0", + "since": "1.6.0", "replaceWith": "account.createSession" }, "auth": { diff --git a/app/config/specs/open-api3-latest-console.json b/app/config/specs/open-api3-latest-console.json index eece5ea7db..921a2e7c6a 100644 --- a/app/config/specs/open-api3-latest-console.json +++ b/app/config/specs/open-api3-latest-console.json @@ -2333,7 +2333,7 @@ ], "packaging": false, "deprecated": { - "since": "0.16.0", + "since": "1.6.0", "replaceWith": "account.createSession" }, "auth": { @@ -2546,7 +2546,7 @@ ], "packaging": false, "deprecated": { - "since": "0.16.0", + "since": "1.6.0", "replaceWith": "account.createSession" }, "auth": { diff --git a/app/config/specs/open-api3-latest-server.json b/app/config/specs/open-api3-latest-server.json index 20355e9710..a78fb7d74a 100644 --- a/app/config/specs/open-api3-latest-server.json +++ b/app/config/specs/open-api3-latest-server.json @@ -2356,7 +2356,7 @@ ], "packaging": false, "deprecated": { - "since": "0.16.0", + "since": "1.6.0", "replaceWith": "account.createSession" }, "auth": { @@ -2434,7 +2434,7 @@ ], "packaging": false, "deprecated": { - "since": "0.16.0", + "since": "1.6.0", "replaceWith": "account.createSession" }, "auth": { diff --git a/app/config/specs/swagger2-1.8.x-client.json b/app/config/specs/swagger2-1.8.x-client.json index 053bf87387..e14b8f2db7 100644 --- a/app/config/specs/swagger2-1.8.x-client.json +++ b/app/config/specs/swagger2-1.8.x-client.json @@ -2425,7 +2425,7 @@ ], "packaging": false, "deprecated": { - "since": "0.16.0", + "since": "1.6.0", "replaceWith": "account.createSession" }, "auth": { @@ -2639,7 +2639,7 @@ ], "packaging": false, "deprecated": { - "since": "0.16.0", + "since": "1.6.0", "replaceWith": "account.createSession" }, "auth": { diff --git a/app/config/specs/swagger2-1.8.x-console.json b/app/config/specs/swagger2-1.8.x-console.json index 76f810bf49..786dc6c586 100644 --- a/app/config/specs/swagger2-1.8.x-console.json +++ b/app/config/specs/swagger2-1.8.x-console.json @@ -2451,7 +2451,7 @@ ], "packaging": false, "deprecated": { - "since": "0.16.0", + "since": "1.6.0", "replaceWith": "account.createSession" }, "auth": { @@ -2665,7 +2665,7 @@ ], "packaging": false, "deprecated": { - "since": "0.16.0", + "since": "1.6.0", "replaceWith": "account.createSession" }, "auth": { diff --git a/app/config/specs/swagger2-1.8.x-server.json b/app/config/specs/swagger2-1.8.x-server.json index 3ef33e30ee..55b0acc255 100644 --- a/app/config/specs/swagger2-1.8.x-server.json +++ b/app/config/specs/swagger2-1.8.x-server.json @@ -2473,7 +2473,7 @@ ], "packaging": false, "deprecated": { - "since": "0.16.0", + "since": "1.6.0", "replaceWith": "account.createSession" }, "auth": { @@ -2555,7 +2555,7 @@ ], "packaging": false, "deprecated": { - "since": "0.16.0", + "since": "1.6.0", "replaceWith": "account.createSession" }, "auth": { diff --git a/app/config/specs/swagger2-latest-client.json b/app/config/specs/swagger2-latest-client.json index 053bf87387..e14b8f2db7 100644 --- a/app/config/specs/swagger2-latest-client.json +++ b/app/config/specs/swagger2-latest-client.json @@ -2425,7 +2425,7 @@ ], "packaging": false, "deprecated": { - "since": "0.16.0", + "since": "1.6.0", "replaceWith": "account.createSession" }, "auth": { @@ -2639,7 +2639,7 @@ ], "packaging": false, "deprecated": { - "since": "0.16.0", + "since": "1.6.0", "replaceWith": "account.createSession" }, "auth": { diff --git a/app/config/specs/swagger2-latest-console.json b/app/config/specs/swagger2-latest-console.json index 76f810bf49..786dc6c586 100644 --- a/app/config/specs/swagger2-latest-console.json +++ b/app/config/specs/swagger2-latest-console.json @@ -2451,7 +2451,7 @@ ], "packaging": false, "deprecated": { - "since": "0.16.0", + "since": "1.6.0", "replaceWith": "account.createSession" }, "auth": { @@ -2665,7 +2665,7 @@ ], "packaging": false, "deprecated": { - "since": "0.16.0", + "since": "1.6.0", "replaceWith": "account.createSession" }, "auth": { diff --git a/app/config/specs/swagger2-latest-server.json b/app/config/specs/swagger2-latest-server.json index 3ef33e30ee..55b0acc255 100644 --- a/app/config/specs/swagger2-latest-server.json +++ b/app/config/specs/swagger2-latest-server.json @@ -2473,7 +2473,7 @@ ], "packaging": false, "deprecated": { - "since": "0.16.0", + "since": "1.6.0", "replaceWith": "account.createSession" }, "auth": { @@ -2555,7 +2555,7 @@ ], "packaging": false, "deprecated": { - "since": "0.16.0", + "since": "1.6.0", "replaceWith": "account.createSession" }, "auth": { diff --git a/app/controllers/api/account.php b/app/controllers/api/account.php index 7265d2910c..24cc116aed 100644 --- a/app/controllers/api/account.php +++ b/app/controllers/api/account.php @@ -2420,7 +2420,7 @@ App::put('/v1/account/sessions/magic-url') ], contentType: ContentType::JSON, deprecated: new Deprecated( - since: '0.16.0', + since: '1.6.0', replaceWith: 'account.createSession' ), )) @@ -2461,7 +2461,7 @@ App::put('/v1/account/sessions/phone') ], contentType: ContentType::JSON, deprecated: new Deprecated( - since: '0.16.0', + since: '1.6.0', replaceWith: 'account.createSession' ), )) diff --git a/src/Appwrite/SDK/Method.php b/src/Appwrite/SDK/Method.php index 77e3e1f1af..8d11b07198 100644 --- a/src/Appwrite/SDK/Method.php +++ b/src/Appwrite/SDK/Method.php @@ -24,7 +24,7 @@ class Method * @param array $responses * @param ContentType $contentType * @param MethodType|null $type - * @param bool|Deprecated $deprecated + * @param Deprecated|null $deprecated * @param array|bool $hide * @param bool $packaging * @param ContentType $requestType @@ -41,7 +41,7 @@ class Method protected array $responses, protected ContentType $contentType = ContentType::JSON, protected ?MethodType $type = null, - protected bool|Deprecated $deprecated = false, + protected ?Deprecated $deprecated = null, protected array|bool $hide = false, protected bool $packaging = false, protected ContentType $requestType = ContentType::JSON, @@ -185,10 +185,10 @@ class Method public function isDeprecated(): bool { - return $this->deprecated !== false; + return $this->deprecated !== null; } - public function getDeprecated(): bool|Deprecated + public function getDeprecated(): ?Deprecated { return $this->deprecated; } diff --git a/src/Appwrite/SDK/Specification/Format/OpenAPI3.php b/src/Appwrite/SDK/Specification/Format/OpenAPI3.php index 4bc8093187..8a50ba0246 100644 --- a/src/Appwrite/SDK/Specification/Format/OpenAPI3.php +++ b/src/Appwrite/SDK/Specification/Format/OpenAPI3.php @@ -226,7 +226,7 @@ class OpenAPI3 extends Format ]; // add deprecation only if method has it! - if ($methodObj->getDeprecated() instanceof Deprecated) { + if ($methodObj->getDeprecated()) { $additionalMethod['deprecated'] = [ 'since' => $methodObj->getDeprecated()->getSince(), 'replaceWith' => $methodObj->getDeprecated()->getReplaceWith(), diff --git a/src/Appwrite/SDK/Specification/Format/Swagger2.php b/src/Appwrite/SDK/Specification/Format/Swagger2.php index 225ede4f00..6ee3bcd40f 100644 --- a/src/Appwrite/SDK/Specification/Format/Swagger2.php +++ b/src/Appwrite/SDK/Specification/Format/Swagger2.php @@ -171,7 +171,7 @@ class Swagger2 extends Format ], ]; - if ($sdk->getDeprecated() instanceof Deprecated) { + if ($sdk->getDeprecated()) { $temp['x-appwrite']['deprecated'] = [ 'since' => $sdk->getDeprecated()->getSince(), 'replaceWith' => $sdk->getDeprecated()->getReplaceWith(), @@ -235,7 +235,7 @@ class Swagger2 extends Format ]; // add deprecation only if method has it! - if ($methodObj->getDeprecated() instanceof Deprecated) { + if ($methodObj->getDeprecated()) { $additionalMethod['deprecated'] = [ 'since' => $methodObj->getDeprecated()->getSince(), 'replaceWith' => $methodObj->getDeprecated()->getReplaceWith(), From 6acde0b33528177843952b38e832209dec534af0 Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Tue, 26 Aug 2025 17:38:05 +0530 Subject: [PATCH 09/29] format --- src/Appwrite/SDK/Specification/Format/Swagger2.php | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Appwrite/SDK/Specification/Format/Swagger2.php b/src/Appwrite/SDK/Specification/Format/Swagger2.php index 6ee3bcd40f..0dcea14af5 100644 --- a/src/Appwrite/SDK/Specification/Format/Swagger2.php +++ b/src/Appwrite/SDK/Specification/Format/Swagger2.php @@ -3,7 +3,6 @@ namespace Appwrite\SDK\Specification\Format; use Appwrite\SDK\AuthType; -use Appwrite\SDK\Deprecated; use Appwrite\SDK\Method; use Appwrite\SDK\MethodType; use Appwrite\SDK\Response; From 53f778dc12603c643cd39a4bd6f7e8be3a1a0e81 Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Tue, 26 Aug 2025 17:43:11 +0530 Subject: [PATCH 10/29] remove instance of --- src/Appwrite/SDK/Specification/Format/OpenAPI3.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Appwrite/SDK/Specification/Format/OpenAPI3.php b/src/Appwrite/SDK/Specification/Format/OpenAPI3.php index 8a50ba0246..489b3825af 100644 --- a/src/Appwrite/SDK/Specification/Format/OpenAPI3.php +++ b/src/Appwrite/SDK/Specification/Format/OpenAPI3.php @@ -3,7 +3,6 @@ namespace Appwrite\SDK\Specification\Format; use Appwrite\SDK\AuthType; -use Appwrite\SDK\Deprecated; use Appwrite\SDK\Method; use Appwrite\SDK\MethodType; use Appwrite\SDK\Response; @@ -167,7 +166,7 @@ class OpenAPI3 extends Format ], ]; - if ($sdk->getDeprecated() instanceof Deprecated) { + if ($sdk->getDeprecated()) { $temp['x-appwrite']['deprecated'] = [ 'since' => $sdk->getDeprecated()->getSince(), 'replaceWith' => $sdk->getDeprecated()->getReplaceWith(), From b7633969b465881434f1f1e58c616388a18405cc Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Wed, 27 Aug 2025 03:44:27 +1200 Subject: [PATCH 11/29] Fix request filter for selections --- src/Appwrite/Utopia/Request/Filters/V20.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Appwrite/Utopia/Request/Filters/V20.php b/src/Appwrite/Utopia/Request/Filters/V20.php index bb25f39c8e..939eeeabe7 100644 --- a/src/Appwrite/Utopia/Request/Filters/V20.php +++ b/src/Appwrite/Utopia/Request/Filters/V20.php @@ -33,7 +33,7 @@ class V20 extends Filter protected function manageSelectQueries(array $content): array { $hasWildcard = false; - if (! isset($content['queries'])) { + if (!isset($content['queries'])) { $hasWildcard = true; // only query, make it json encoded! $content['queries'] = [Query::select(['*'])->toString()]; @@ -48,7 +48,11 @@ class V20 extends Filter $selections = Query::groupByType($parsed)['selections'] ?? []; - if (! $hasWildcard) { + // If there are no select queries at all, add wildcard + if (empty($selections)) { + $hasWildcard = true; + $parsed[] = Query::select(['*']); + } else if (!$hasWildcard) { // check if any select includes a wildcard as we added one above foreach ($selections as $select) { if (\in_array('*', $select->getValues(), true)) { From 505cff5b9fdeb7a33168d3098778c9c2a7da42bc Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Tue, 26 Aug 2025 21:38:55 +0530 Subject: [PATCH 12/29] chore: update union china pay to just unionpay --- app/config/avatars/credit-cards.php | 2 +- .../{union-china-pay.png => unionpay.png} | Bin 2 files changed, 1 insertion(+), 1 deletion(-) rename app/config/avatars/credit-cards/{union-china-pay.png => unionpay.png} (100%) diff --git a/app/config/avatars/credit-cards.php b/app/config/avatars/credit-cards.php index 52760bf9dc..b693e99fb2 100644 --- a/app/config/avatars/credit-cards.php +++ b/app/config/avatars/credit-cards.php @@ -13,7 +13,7 @@ return [ 'mastercard' => ['name' => 'Mastercard', 'path' => __DIR__ . '/credit-cards/mastercard.png'], 'naranja' => ['name' => 'Naranja', 'path' => __DIR__ . '/credit-cards/naranja.png'], 'targeta-shopping' => ['name' => 'Tarjeta Shopping', 'path' => __DIR__ . '/credit-cards/tarjeta-shopping.png'], - 'union-china-pay' => ['name' => 'Union China Pay', 'path' => __DIR__ . '/credit-cards/union-china-pay.png'], + 'unionpay' => ['name' => 'Union Pay', 'path' => __DIR__ . '/credit-cards/unionpay.png'], 'visa' => ['name' => 'Visa', 'path' => __DIR__ . '/credit-cards/visa.png'], 'mir' => ['name' => 'MIR', 'path' => __DIR__ . '/credit-cards/mir.png'], 'maestro' => ['name' => 'Maestro', 'path' => __DIR__ . '/credit-cards/maestro.png'], diff --git a/app/config/avatars/credit-cards/union-china-pay.png b/app/config/avatars/credit-cards/unionpay.png similarity index 100% rename from app/config/avatars/credit-cards/union-china-pay.png rename to app/config/avatars/credit-cards/unionpay.png From 005f405507a7210761c66a50224e8dc660531c6e Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Tue, 26 Aug 2025 21:40:43 +0530 Subject: [PATCH 13/29] chore: update specs --- app/config/specs/open-api3-1.8.x-client.json | 6 +++--- app/config/specs/open-api3-1.8.x-console.json | 6 +++--- app/config/specs/open-api3-1.8.x-server.json | 6 +++--- app/config/specs/open-api3-latest-client.json | 6 +++--- app/config/specs/open-api3-latest-console.json | 6 +++--- app/config/specs/open-api3-latest-server.json | 6 +++--- app/config/specs/swagger2-1.8.x-client.json | 6 +++--- app/config/specs/swagger2-1.8.x-console.json | 6 +++--- app/config/specs/swagger2-1.8.x-server.json | 6 +++--- app/config/specs/swagger2-latest-client.json | 6 +++--- app/config/specs/swagger2-latest-console.json | 6 +++--- app/config/specs/swagger2-latest-server.json | 6 +++--- 12 files changed, 36 insertions(+), 36 deletions(-) diff --git a/app/config/specs/open-api3-1.8.x-client.json b/app/config/specs/open-api3-1.8.x-client.json index 5d80f25da5..0c5e34b811 100644 --- a/app/config/specs/open-api3-1.8.x-client.json +++ b/app/config/specs/open-api3-1.8.x-client.json @@ -3908,7 +3908,7 @@ "parameters": [ { "name": "code", - "description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro, rupay.", + "description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, unionpay, visa, mir, maestro, rupay.", "required": true, "schema": { "type": "string", @@ -3926,7 +3926,7 @@ "mastercard", "naranja", "targeta-shopping", - "union-china-pay", + "unionpay", "visa", "mir", "maestro", @@ -3946,7 +3946,7 @@ "Mastercard", "Naranja", "Tarjeta Shopping", - "Union China Pay", + "Union Pay", "Visa", "MIR", "Maestro", diff --git a/app/config/specs/open-api3-1.8.x-console.json b/app/config/specs/open-api3-1.8.x-console.json index 3013857712..bf44bf0f4d 100644 --- a/app/config/specs/open-api3-1.8.x-console.json +++ b/app/config/specs/open-api3-1.8.x-console.json @@ -3913,7 +3913,7 @@ "parameters": [ { "name": "code", - "description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro, rupay.", + "description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, unionpay, visa, mir, maestro, rupay.", "required": true, "schema": { "type": "string", @@ -3931,7 +3931,7 @@ "mastercard", "naranja", "targeta-shopping", - "union-china-pay", + "unionpay", "visa", "mir", "maestro", @@ -3951,7 +3951,7 @@ "Mastercard", "Naranja", "Tarjeta Shopping", - "Union China Pay", + "Union Pay", "Visa", "MIR", "Maestro", diff --git a/app/config/specs/open-api3-1.8.x-server.json b/app/config/specs/open-api3-1.8.x-server.json index ce383d596c..ed7db10725 100644 --- a/app/config/specs/open-api3-1.8.x-server.json +++ b/app/config/specs/open-api3-1.8.x-server.json @@ -3613,7 +3613,7 @@ "parameters": [ { "name": "code", - "description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro, rupay.", + "description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, unionpay, visa, mir, maestro, rupay.", "required": true, "schema": { "type": "string", @@ -3631,7 +3631,7 @@ "mastercard", "naranja", "targeta-shopping", - "union-china-pay", + "unionpay", "visa", "mir", "maestro", @@ -3651,7 +3651,7 @@ "Mastercard", "Naranja", "Tarjeta Shopping", - "Union China Pay", + "Union Pay", "Visa", "MIR", "Maestro", diff --git a/app/config/specs/open-api3-latest-client.json b/app/config/specs/open-api3-latest-client.json index 5d80f25da5..0c5e34b811 100644 --- a/app/config/specs/open-api3-latest-client.json +++ b/app/config/specs/open-api3-latest-client.json @@ -3908,7 +3908,7 @@ "parameters": [ { "name": "code", - "description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro, rupay.", + "description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, unionpay, visa, mir, maestro, rupay.", "required": true, "schema": { "type": "string", @@ -3926,7 +3926,7 @@ "mastercard", "naranja", "targeta-shopping", - "union-china-pay", + "unionpay", "visa", "mir", "maestro", @@ -3946,7 +3946,7 @@ "Mastercard", "Naranja", "Tarjeta Shopping", - "Union China Pay", + "Union Pay", "Visa", "MIR", "Maestro", diff --git a/app/config/specs/open-api3-latest-console.json b/app/config/specs/open-api3-latest-console.json index 3013857712..bf44bf0f4d 100644 --- a/app/config/specs/open-api3-latest-console.json +++ b/app/config/specs/open-api3-latest-console.json @@ -3913,7 +3913,7 @@ "parameters": [ { "name": "code", - "description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro, rupay.", + "description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, unionpay, visa, mir, maestro, rupay.", "required": true, "schema": { "type": "string", @@ -3931,7 +3931,7 @@ "mastercard", "naranja", "targeta-shopping", - "union-china-pay", + "unionpay", "visa", "mir", "maestro", @@ -3951,7 +3951,7 @@ "Mastercard", "Naranja", "Tarjeta Shopping", - "Union China Pay", + "Union Pay", "Visa", "MIR", "Maestro", diff --git a/app/config/specs/open-api3-latest-server.json b/app/config/specs/open-api3-latest-server.json index ce383d596c..ed7db10725 100644 --- a/app/config/specs/open-api3-latest-server.json +++ b/app/config/specs/open-api3-latest-server.json @@ -3613,7 +3613,7 @@ "parameters": [ { "name": "code", - "description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro, rupay.", + "description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, unionpay, visa, mir, maestro, rupay.", "required": true, "schema": { "type": "string", @@ -3631,7 +3631,7 @@ "mastercard", "naranja", "targeta-shopping", - "union-china-pay", + "unionpay", "visa", "mir", "maestro", @@ -3651,7 +3651,7 @@ "Mastercard", "Naranja", "Tarjeta Shopping", - "Union China Pay", + "Union Pay", "Visa", "MIR", "Maestro", diff --git a/app/config/specs/swagger2-1.8.x-client.json b/app/config/specs/swagger2-1.8.x-client.json index de6564edaa..d46fd7c0a2 100644 --- a/app/config/specs/swagger2-1.8.x-client.json +++ b/app/config/specs/swagger2-1.8.x-client.json @@ -4060,7 +4060,7 @@ "parameters": [ { "name": "code", - "description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro, rupay.", + "description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, unionpay, visa, mir, maestro, rupay.", "required": true, "type": "string", "x-example": "amex", @@ -4077,7 +4077,7 @@ "mastercard", "naranja", "targeta-shopping", - "union-china-pay", + "unionpay", "visa", "mir", "maestro", @@ -4097,7 +4097,7 @@ "Mastercard", "Naranja", "Tarjeta Shopping", - "Union China Pay", + "Union Pay", "Visa", "MIR", "Maestro", diff --git a/app/config/specs/swagger2-1.8.x-console.json b/app/config/specs/swagger2-1.8.x-console.json index c247b9d63d..bebfa89881 100644 --- a/app/config/specs/swagger2-1.8.x-console.json +++ b/app/config/specs/swagger2-1.8.x-console.json @@ -4075,7 +4075,7 @@ "parameters": [ { "name": "code", - "description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro, rupay.", + "description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, unionpay, visa, mir, maestro, rupay.", "required": true, "type": "string", "x-example": "amex", @@ -4092,7 +4092,7 @@ "mastercard", "naranja", "targeta-shopping", - "union-china-pay", + "unionpay", "visa", "mir", "maestro", @@ -4112,7 +4112,7 @@ "Mastercard", "Naranja", "Tarjeta Shopping", - "Union China Pay", + "Union Pay", "Visa", "MIR", "Maestro", diff --git a/app/config/specs/swagger2-1.8.x-server.json b/app/config/specs/swagger2-1.8.x-server.json index aac613600e..c3be4b8853 100644 --- a/app/config/specs/swagger2-1.8.x-server.json +++ b/app/config/specs/swagger2-1.8.x-server.json @@ -3771,7 +3771,7 @@ "parameters": [ { "name": "code", - "description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro, rupay.", + "description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, unionpay, visa, mir, maestro, rupay.", "required": true, "type": "string", "x-example": "amex", @@ -3788,7 +3788,7 @@ "mastercard", "naranja", "targeta-shopping", - "union-china-pay", + "unionpay", "visa", "mir", "maestro", @@ -3808,7 +3808,7 @@ "Mastercard", "Naranja", "Tarjeta Shopping", - "Union China Pay", + "Union Pay", "Visa", "MIR", "Maestro", diff --git a/app/config/specs/swagger2-latest-client.json b/app/config/specs/swagger2-latest-client.json index de6564edaa..d46fd7c0a2 100644 --- a/app/config/specs/swagger2-latest-client.json +++ b/app/config/specs/swagger2-latest-client.json @@ -4060,7 +4060,7 @@ "parameters": [ { "name": "code", - "description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro, rupay.", + "description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, unionpay, visa, mir, maestro, rupay.", "required": true, "type": "string", "x-example": "amex", @@ -4077,7 +4077,7 @@ "mastercard", "naranja", "targeta-shopping", - "union-china-pay", + "unionpay", "visa", "mir", "maestro", @@ -4097,7 +4097,7 @@ "Mastercard", "Naranja", "Tarjeta Shopping", - "Union China Pay", + "Union Pay", "Visa", "MIR", "Maestro", diff --git a/app/config/specs/swagger2-latest-console.json b/app/config/specs/swagger2-latest-console.json index c247b9d63d..bebfa89881 100644 --- a/app/config/specs/swagger2-latest-console.json +++ b/app/config/specs/swagger2-latest-console.json @@ -4075,7 +4075,7 @@ "parameters": [ { "name": "code", - "description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro, rupay.", + "description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, unionpay, visa, mir, maestro, rupay.", "required": true, "type": "string", "x-example": "amex", @@ -4092,7 +4092,7 @@ "mastercard", "naranja", "targeta-shopping", - "union-china-pay", + "unionpay", "visa", "mir", "maestro", @@ -4112,7 +4112,7 @@ "Mastercard", "Naranja", "Tarjeta Shopping", - "Union China Pay", + "Union Pay", "Visa", "MIR", "Maestro", diff --git a/app/config/specs/swagger2-latest-server.json b/app/config/specs/swagger2-latest-server.json index aac613600e..c3be4b8853 100644 --- a/app/config/specs/swagger2-latest-server.json +++ b/app/config/specs/swagger2-latest-server.json @@ -3771,7 +3771,7 @@ "parameters": [ { "name": "code", - "description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, union-china-pay, visa, mir, maestro, rupay.", + "description": "Credit Card Code. Possible values: amex, argencard, cabal, cencosud, diners, discover, elo, hipercard, jcb, mastercard, naranja, targeta-shopping, unionpay, visa, mir, maestro, rupay.", "required": true, "type": "string", "x-example": "amex", @@ -3788,7 +3788,7 @@ "mastercard", "naranja", "targeta-shopping", - "union-china-pay", + "unionpay", "visa", "mir", "maestro", @@ -3808,7 +3808,7 @@ "Mastercard", "Naranja", "Tarjeta Shopping", - "Union China Pay", + "Union Pay", "Visa", "MIR", "Maestro", From abc775787167b00adc95721654d530db8f9e6e5d Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Tue, 26 Aug 2025 21:45:53 +0530 Subject: [PATCH 14/29] fomat --- src/Appwrite/Utopia/Request/Filters/V20.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Appwrite/Utopia/Request/Filters/V20.php b/src/Appwrite/Utopia/Request/Filters/V20.php index 939eeeabe7..30de1fb2d3 100644 --- a/src/Appwrite/Utopia/Request/Filters/V20.php +++ b/src/Appwrite/Utopia/Request/Filters/V20.php @@ -52,7 +52,7 @@ class V20 extends Filter if (empty($selections)) { $hasWildcard = true; $parsed[] = Query::select(['*']); - } else if (!$hasWildcard) { + } elseif (!$hasWildcard) { // check if any select includes a wildcard as we added one above foreach ($selections as $select) { if (\in_array('*', $select->getValues(), true)) { From 61f9bd90e50117d29c41cb4d430da3750b2af800 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 26 Aug 2025 20:01:34 +0000 Subject: [PATCH 15/29] Initial plan From 6763b8ecb6142798f5931641f8b83f7e7e577117 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 26 Aug 2025 20:06:26 +0000 Subject: [PATCH 16/29] Apply sequence integer casting fix to Row.php and add test assertion Co-authored-by: stnguyen90 <1477010+stnguyen90@users.noreply.github.com> --- src/Appwrite/Utopia/Response/Model/Row.php | 1 + tests/e2e/Services/Databases/TablesDB/DatabasesBase.php | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/Appwrite/Utopia/Response/Model/Row.php b/src/Appwrite/Utopia/Response/Model/Row.php index 77df48ce89..370d3065ba 100644 --- a/src/Appwrite/Utopia/Response/Model/Row.php +++ b/src/Appwrite/Utopia/Response/Model/Row.php @@ -79,6 +79,7 @@ class Row extends Any { $document->removeAttribute('$collection'); $document->removeAttribute('$tenant'); + $document->setAttribute('$sequence', (int)$document->getAttribute('$sequence', 0)); foreach ($document->getAttributes() as $column) { if (\is_array($column)) { diff --git a/tests/e2e/Services/Databases/TablesDB/DatabasesBase.php b/tests/e2e/Services/Databases/TablesDB/DatabasesBase.php index 0b92208c95..c57421c384 100644 --- a/tests/e2e/Services/Databases/TablesDB/DatabasesBase.php +++ b/tests/e2e/Services/Databases/TablesDB/DatabasesBase.php @@ -1625,6 +1625,8 @@ trait DatabasesBase $this->assertEquals($row1['body']['actors'][0], 'Chris Evans'); $this->assertEquals($row1['body']['actors'][1], 'Samuel Jackson'); $this->assertEquals($row1['body']['birthDay'], '1975-06-12T12:12:55.000+00:00'); + $this->assertTrue(array_key_exists('$sequence', $row1['body'])); + $this->assertIsInt($row1['body']['$sequence']); $this->assertEquals(201, $row2['headers']['status-code']); $this->assertEquals($data['moviesId'], $row2['body']['$tableId']); From bfd8b554cdd49ba7b96f5ffa06962e9f9decfdb3 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 26 Aug 2025 20:37:33 +0000 Subject: [PATCH 17/29] Add $tenant attribute removal to Action.php processDocument method Co-authored-by: stnguyen90 <1477010+stnguyen90@users.noreply.github.com> --- .../Databases/Http/Databases/Collections/Documents/Action.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Action.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Action.php index ca5dc91cb4..541d8edece 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Action.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Action.php @@ -232,6 +232,7 @@ abstract class Action extends AppwriteAction $collectionId = $collection->getId(); $document->removeAttribute('$collection'); + $document->removeAttribute('$tenant'); $document->setAttribute('$databaseId', $database->getId()); $document->setAttribute('$' . $this->getCollectionsEventsContext() . 'Id', $collectionId); From 737e2f86241f255c9f42ad151767a28da99176c2 Mon Sep 17 00:00:00 2001 From: Steven Nguyen Date: Tue, 26 Aug 2025 15:10:23 -0700 Subject: [PATCH 18/29] fix: Remove $sequence attribute from documents on create and update Including attribute can cause a invalid structure error as the incoming data may be an int but the database expects a string. --- .../Databases/Http/Databases/Collections/Documents/Action.php | 3 +-- .../Http/Databases/Collections/Documents/Bulk/Update.php | 3 +++ .../Databases/Http/Databases/Collections/Documents/Create.php | 3 +++ .../Databases/Http/Databases/Collections/Documents/Update.php | 3 +++ 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Action.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Action.php index 541d8edece..78df15b0c1 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Action.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Action.php @@ -29,7 +29,7 @@ abstract class Action extends AppwriteAction // Use the same helper method to ensure consistency $contextId = '$' . $this->getCollectionsEventsContext() . 'Id'; - $this->removableAttributes = ['$databaseId', $contextId]; + $this->removableAttributes = ['$databaseId', $contextId, '$sequence']; return parent::setHttpPath($path); } @@ -232,7 +232,6 @@ abstract class Action extends AppwriteAction $collectionId = $collection->getId(); $document->removeAttribute('$collection'); - $document->removeAttribute('$tenant'); $document->setAttribute('$databaseId', $database->getId()); $document->setAttribute('$' . $this->getCollectionsEventsContext() . 'Id', $collectionId); diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Update.php index b5a4750c4f..a9f9c3f76d 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Bulk/Update.php @@ -127,6 +127,9 @@ class Update extends Action } } + // Remove sequence if set + unset($document['$sequence']); + $documents = []; try { diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php index f2d678f411..04c90c4ec1 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php @@ -351,6 +351,9 @@ class Create extends Action } } + // Remove sequence if set + unset($document['$sequence']); + // Assign a unique ID if needed, otherwise use the provided ID. $document['$id'] = $sourceId === 'unique()' ? ID::unique() : $sourceId; diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Update.php index 4f5055abc4..334bcb8448 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Update.php @@ -159,6 +159,9 @@ class Update extends Action $permissions = $document->getPermissions() ?? []; } + // Remove sequence if set + unset($document['$sequence']); + $data['$id'] = $documentId; $data['$permissions'] = $permissions; $newDocument = new Document($data); From b57bef2d0c220a4b584ed1e494e8d966c26b5f43 Mon Sep 17 00:00:00 2001 From: Steven Nguyen Date: Tue, 26 Aug 2025 15:11:27 -0700 Subject: [PATCH 19/29] chore: fix lint error --- src/Appwrite/Utopia/Request/Filters/V20.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Appwrite/Utopia/Request/Filters/V20.php b/src/Appwrite/Utopia/Request/Filters/V20.php index 939eeeabe7..30de1fb2d3 100644 --- a/src/Appwrite/Utopia/Request/Filters/V20.php +++ b/src/Appwrite/Utopia/Request/Filters/V20.php @@ -52,7 +52,7 @@ class V20 extends Filter if (empty($selections)) { $hasWildcard = true; $parsed[] = Query::select(['*']); - } else if (!$hasWildcard) { + } elseif (!$hasWildcard) { // check if any select includes a wildcard as we added one above foreach ($selections as $select) { if (\in_array('*', $select->getValues(), true)) { From 35579bfda146ba3a206913b45a037c440b5c472c Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Wed, 27 Aug 2025 14:21:22 +1200 Subject: [PATCH 20/29] Fix domain validator --- src/Appwrite/Platform/Modules/Console/Http/Resources/Get.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Appwrite/Platform/Modules/Console/Http/Resources/Get.php b/src/Appwrite/Platform/Modules/Console/Http/Resources/Get.php index 114a24ef22..1c1b93ac89 100644 --- a/src/Appwrite/Platform/Modules/Console/Http/Resources/Get.php +++ b/src/Appwrite/Platform/Modules/Console/Http/Resources/Get.php @@ -67,8 +67,7 @@ class Get extends Action Database $dbForPlatform ) { if ($type === 'rules') { - $validator = new Domain($value); - + $validator = new Domain(); if (!$validator->isValid($value)) { throw new Exception(Exception::GENERAL_ARGUMENT_INVALID, $validator->getDescription()); } From c1676bcffd95393ecb6b6b0ba2db107acd4cac72 Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Wed, 27 Aug 2025 14:43:34 +1200 Subject: [PATCH 21/29] Array scopes --- app/controllers/shared/api.php | 6 +++--- .../Http/TablesDB/Tables/Columns/Boolean/Create.php | 2 +- .../Http/TablesDB/Tables/Columns/Boolean/Update.php | 2 +- .../Http/TablesDB/Tables/Columns/Datetime/Create.php | 2 +- .../Http/TablesDB/Tables/Columns/Datetime/Update.php | 2 +- .../Databases/Http/TablesDB/Tables/Columns/Delete.php | 2 +- .../Databases/Http/TablesDB/Tables/Columns/Email/Create.php | 2 +- .../Databases/Http/TablesDB/Tables/Columns/Email/Update.php | 2 +- .../Databases/Http/TablesDB/Tables/Columns/Enum/Create.php | 2 +- .../Databases/Http/TablesDB/Tables/Columns/Enum/Update.php | 2 +- .../Databases/Http/TablesDB/Tables/Columns/Float/Create.php | 2 +- .../Databases/Http/TablesDB/Tables/Columns/Float/Update.php | 2 +- .../Modules/Databases/Http/TablesDB/Tables/Columns/Get.php | 2 +- .../Databases/Http/TablesDB/Tables/Columns/IP/Create.php | 2 +- .../Databases/Http/TablesDB/Tables/Columns/IP/Update.php | 2 +- .../Http/TablesDB/Tables/Columns/Integer/Create.php | 2 +- .../Http/TablesDB/Tables/Columns/Integer/Update.php | 2 +- .../Http/TablesDB/Tables/Columns/Relationship/Create.php | 2 +- .../Http/TablesDB/Tables/Columns/Relationship/Update.php | 2 +- .../Http/TablesDB/Tables/Columns/String/Create.php | 2 +- .../Http/TablesDB/Tables/Columns/String/Update.php | 2 +- .../Databases/Http/TablesDB/Tables/Columns/URL/Create.php | 2 +- .../Databases/Http/TablesDB/Tables/Columns/URL/Update.php | 2 +- .../Databases/Http/TablesDB/Tables/Columns/XList.php | 2 +- .../Modules/Databases/Http/TablesDB/Tables/Create.php | 2 +- .../Modules/Databases/Http/TablesDB/Tables/Delete.php | 2 +- .../Platform/Modules/Databases/Http/TablesDB/Tables/Get.php | 2 +- .../Databases/Http/TablesDB/Tables/Indexes/Create.php | 2 +- .../Databases/Http/TablesDB/Tables/Indexes/Delete.php | 2 +- .../Modules/Databases/Http/TablesDB/Tables/Indexes/Get.php | 2 +- .../Databases/Http/TablesDB/Tables/Indexes/XList.php | 2 +- .../Modules/Databases/Http/TablesDB/Tables/Logs/XList.php | 2 +- .../Databases/Http/TablesDB/Tables/Rows/Bulk/Delete.php | 2 +- .../Databases/Http/TablesDB/Tables/Rows/Bulk/Update.php | 2 +- .../Databases/Http/TablesDB/Tables/Rows/Bulk/Upsert.php | 2 +- .../Http/TablesDB/Tables/Rows/Column/Decrement.php | 2 +- .../Http/TablesDB/Tables/Rows/Column/Increment.php | 2 +- .../Modules/Databases/Http/TablesDB/Tables/Rows/Create.php | 2 +- .../Modules/Databases/Http/TablesDB/Tables/Rows/Delete.php | 2 +- .../Modules/Databases/Http/TablesDB/Tables/Rows/Get.php | 2 +- .../Databases/Http/TablesDB/Tables/Rows/Logs/XList.php | 2 +- .../Modules/Databases/Http/TablesDB/Tables/Rows/Update.php | 2 +- .../Modules/Databases/Http/TablesDB/Tables/Rows/Upsert.php | 2 +- .../Modules/Databases/Http/TablesDB/Tables/Rows/XList.php | 2 +- .../Modules/Databases/Http/TablesDB/Tables/Update.php | 2 +- .../Modules/Databases/Http/TablesDB/Tables/Usage/Get.php | 2 +- .../Modules/Databases/Http/TablesDB/Tables/XList.php | 2 +- .../Platform/Modules/Databases/Http/TablesDB/Usage/Get.php | 2 +- .../Modules/Databases/Http/TablesDB/Usage/XList.php | 2 +- src/Appwrite/SDK/Specification/Format/Swagger2.php | 3 +-- 50 files changed, 52 insertions(+), 53 deletions(-) diff --git a/app/controllers/shared/api.php b/app/controllers/shared/api.php index 8fe9e747b2..40eddf574f 100644 --- a/app/controllers/shared/api.php +++ b/app/controllers/shared/api.php @@ -379,9 +379,9 @@ App::init() } // Do now allow access if scope is not allowed - $scope = $route->getLabel('scope', 'none'); - if (!\in_array($scope, $scopes)) { - throw new Exception(Exception::GENERAL_UNAUTHORIZED_SCOPE, $user->getAttribute('email', 'User') . ' (role: ' . \strtolower($roles[$role]['label']) . ') missing scope (' . $scope . ')'); + $allowed = (array)$route->getLabel('scope', 'none'); + if (empty(\array_intersect($allowed, $scopes))) { + throw new Exception(Exception::GENERAL_UNAUTHORIZED_SCOPE, $user->getAttribute('email', 'User') . ' (role: ' . \strtolower($roles[$role]['label']) . ') missing scopes (' . \json_encode($allowed) . ')'); } // Do not allow access to blocked accounts diff --git a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Boolean/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Boolean/Create.php index cd4f7fb84d..5222d2e133 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Boolean/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Boolean/Create.php @@ -32,7 +32,7 @@ class Create extends BooleanCreate ->desc('Create boolean column') ->groups(['api', 'database', 'schema']) ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].create') - ->label('scope', 'tables.write') + ->label('scope', ['tables.write', 'collections.write']) ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('audits.event', 'column.create') ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Boolean/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Boolean/Update.php index d8fb48fba1..3c6ef50813 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Boolean/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Boolean/Update.php @@ -33,7 +33,7 @@ class Update extends BooleanUpdate ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId/columns/boolean/:key') ->desc('Update boolean column') ->groups(['api', 'database', 'schema']) - ->label('scope', 'tables.write') + ->label('scope', ['tables.write', 'collections.write']) ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].update') ->label('audits.event', 'column.update') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Datetime/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Datetime/Create.php index e060e04d7d..9598278ffc 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Datetime/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Datetime/Create.php @@ -33,7 +33,7 @@ class Create extends DatetimeCreate ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId/columns/datetime') ->desc('Create datetime column') ->groups(['api', 'database']) - ->label('scope', 'tables.write') + ->label('scope', ['tables.write', 'collections.write']) ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].create') ->label('audits.event', 'column.create') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Datetime/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Datetime/Update.php index bfba375443..d7b5ec2448 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Datetime/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Datetime/Update.php @@ -35,7 +35,7 @@ class Update extends DatetimeUpdate ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId/columns/datetime/:key') ->desc('Update dateTime column') ->groups(['api', 'database', 'schema']) - ->label('scope', 'tables.write') + ->label('scope', ['tables.write', 'collections.write']) ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].update') ->label('audits.event', 'column.update') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Delete.php index 555af833df..50a148ce19 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Delete.php @@ -32,7 +32,7 @@ class Delete extends AttributesDelete ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId/columns/:key') ->desc('Delete column') ->groups(['api', 'database', 'schema']) - ->label('scope', 'tables.write') + ->label('scope', ['tables.write', 'collections.write']) ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].update') ->label('audits.event', 'column.delete') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Email/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Email/Create.php index b2d09d4511..e28a216fff 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Email/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Email/Create.php @@ -32,7 +32,7 @@ class Create extends EmailCreate ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId/columns/email') ->desc('Create email column') ->groups(['api', 'database', 'schema']) - ->label('scope', 'tables.write') + ->label('scope', ['tables.write', 'collections.write']) ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].create') ->label('audits.event', 'column.create') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Email/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Email/Update.php index 15f85eef81..0fb856acb9 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Email/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Email/Update.php @@ -34,7 +34,7 @@ class Update extends EmailUpdate ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId/columns/email/:key') ->desc('Update email column') ->groups(['api', 'database', 'schema']) - ->label('scope', 'tables.write') + ->label('scope', ['tables.write', 'collections.write']) ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].update') ->label('audits.event', 'column.update') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Enum/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Enum/Create.php index 52972deadf..5b9d89c7e9 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Enum/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Enum/Create.php @@ -34,7 +34,7 @@ class Create extends EnumCreate ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId/columns/enum') ->desc('Create enum column') ->groups(['api', 'database', 'schema']) - ->label('scope', 'tables.write') + ->label('scope', ['tables.write', 'collections.write']) ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].create') ->label('audits.event', 'column.create') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Enum/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Enum/Update.php index cd9c111812..0c00e3f268 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Enum/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Enum/Update.php @@ -36,7 +36,7 @@ class Update extends EnumUpdate ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId/columns/enum/:key') ->desc('Update enum column') ->groups(['api', 'database', 'schema']) - ->label('scope', 'tables.write') + ->label('scope', ['tables.write', 'collections.write']) ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].update') ->label('audits.event', 'column.update') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Float/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Float/Create.php index 0a60796679..5967b00196 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Float/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Float/Create.php @@ -32,7 +32,7 @@ class Create extends FloatCreate ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId/columns/float') ->desc('Create float column') ->groups(['api', 'database', 'schema']) - ->label('scope', 'tables.write') + ->label('scope', ['tables.write', 'collections.write']) ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].create') ->label('audits.event', 'column.create') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Float/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Float/Update.php index d4f8328e30..9486b3a75c 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Float/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Float/Update.php @@ -34,7 +34,7 @@ class Update extends FloatUpdate ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId/columns/float/:key') ->desc('Update float column') ->groups(['api', 'database', 'schema']) - ->label('scope', 'tables.write') + ->label('scope', ['tables.write', 'collections.write']) ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].update') ->label('audits.event', 'column.update') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Get.php index 8debcb11f3..d536a7aaf2 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Get.php @@ -41,7 +41,7 @@ class Get extends AttributesGet ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId/columns/:key') ->desc('Get column') ->groups(['api', 'database']) - ->label('scope', 'tables.read') + ->label('scope', ['tables.read', 'collections.read']) ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('sdk', new Method( namespace: $this->getSdkNamespace(), diff --git a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/IP/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/IP/Create.php index eca17b037d..325a9382e5 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/IP/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/IP/Create.php @@ -32,7 +32,7 @@ class Create extends IPCreate ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId/columns/ip') ->desc('Create IP address column') ->groups(['api', 'database', 'schema']) - ->label('scope', 'tables.write') + ->label('scope', ['tables.write', 'collections.write']) ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].create') ->label('audits.event', 'column.create') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/IP/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/IP/Update.php index 501de3659a..b9e6368307 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/IP/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/IP/Update.php @@ -34,7 +34,7 @@ class Update extends IPUpdate ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId/columns/ip/:key') ->desc('Update IP address column') ->groups(['api', 'database', 'schema']) - ->label('scope', 'tables.write') + ->label('scope', ['tables.write', 'collections.write']) ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].update') ->label('audits.event', 'column.update') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Integer/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Integer/Create.php index 0201ebda87..bd6fec3f53 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Integer/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Integer/Create.php @@ -32,7 +32,7 @@ class Create extends IntegerCreate ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId/columns/integer') ->desc('Create integer column') ->groups(['api', 'database', 'schema']) - ->label('scope', 'tables.write') + ->label('scope', ['tables.write', 'collections.write']) ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].create') ->label('audits.event', 'column.create') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Integer/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Integer/Update.php index 0667069a39..be92811d1b 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Integer/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Integer/Update.php @@ -34,7 +34,7 @@ class Update extends IntegerUpdate ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId/columns/integer/:key') ->desc('Update integer column') ->groups(['api', 'database', 'schema']) - ->label('scope', 'tables.write') + ->label('scope', ['tables.write', 'collections.write']) ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].update') ->label('audits.event', 'column.update') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Relationship/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Relationship/Create.php index 4b94ee2d21..b6f9663f77 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Relationship/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Relationship/Create.php @@ -33,7 +33,7 @@ class Create extends RelationshipCreate ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId/columns/relationship') ->desc('Create relationship column') ->groups(['api', 'database']) - ->label('scope', 'tables.write') + ->label('scope', ['tables.write', 'collections.write']) ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].create') ->label('audits.event', 'column.create') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Relationship/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Relationship/Update.php index 47269fc329..421e11af91 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Relationship/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/Relationship/Update.php @@ -33,7 +33,7 @@ class Update extends RelationshipUpdate ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId/columns/:key/relationship') ->desc('Update relationship column') ->groups(['api', 'database', 'schema']) - ->label('scope', 'tables.write') + ->label('scope', ['tables.write', 'collections.write']) ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].update') ->label('audits.event', 'column.update') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/String/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/String/Create.php index a16c3cde28..14f0c8321e 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/String/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/String/Create.php @@ -34,7 +34,7 @@ class Create extends StringCreate ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId/columns/string') ->desc('Create string column') ->groups(['api', 'database', 'schema']) - ->label('scope', 'tables.write') + ->label('scope', ['tables.write', 'collections.write']) ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].create') ->label('audits.event', 'column.create') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/String/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/String/Update.php index adf1fbae4a..fc45557f3b 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/String/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/String/Update.php @@ -36,7 +36,7 @@ class Update extends StringUpdate ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId/columns/string/:key') ->desc('Update string column') ->groups(['api', 'database', 'schema']) - ->label('scope', 'tables.write') + ->label('scope', ['tables.write', 'collections.write']) ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].update') ->label('audits.event', 'column.update') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/URL/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/URL/Create.php index ea2271b85a..bc53ad5250 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/URL/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/URL/Create.php @@ -32,7 +32,7 @@ class Create extends URLCreate ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId/columns/url') ->desc('Create URL column') ->groups(['api', 'database', 'schema']) - ->label('scope', 'tables.write') + ->label('scope', ['tables.write', 'collections.write']) ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].create') ->label('audits.event', 'column.create') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/URL/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/URL/Update.php index 565cc91680..36bd7dc054 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/URL/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/URL/Update.php @@ -34,7 +34,7 @@ class Update extends URLUpdate ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId/columns/url/:key') ->desc('Update URL column') ->groups(['api', 'database', 'schema']) - ->label('scope', 'tables.write') + ->label('scope', ['tables.write', 'collections.write']) ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].columns.[columnId].update') ->label('audits.event', 'column.update') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/XList.php index 3c2e54878e..ca41bb024d 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Columns/XList.php @@ -30,7 +30,7 @@ class XList extends AttributesXList ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId/columns') ->desc('List columns') ->groups(['api', 'database']) - ->label('scope', 'tables.read') + ->label('scope', ['tables.read', 'collections.read']) ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('sdk', new Method( namespace: $this->getSdkNamespace(), diff --git a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Create.php index d3216d4dd4..a3c387aba9 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Create.php @@ -35,7 +35,7 @@ class Create extends CollectionCreate ->desc('Create table') ->groups(['api', 'database']) ->label('event', 'databases.[databaseId].tables.[tableId].create') - ->label('scope', 'tables.write') + ->label('scope', ['tables.write', 'collections.write']) ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('audits.event', 'table.create') ->label('audits.resource', 'database/{request.databaseId}/table/{response.$id}') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Delete.php index 51779d71c7..8312b53f40 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Delete.php @@ -30,7 +30,7 @@ class Delete extends CollectionDelete ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId') ->desc('Delete table') ->groups(['api', 'database', 'schema']) - ->label('scope', 'tables.write') + ->label('scope', ['tables.write', 'collections.write']) ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].delete') ->label('audits.event', 'table.delete') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Get.php index d14a15da51..ce29a24097 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Get.php @@ -30,7 +30,7 @@ class Get extends CollectionGet ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId') ->desc('Get table') ->groups(['api', 'database']) - ->label('scope', 'tables.read') + ->label('scope', ['tables.read', 'collections.read']) ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('sdk', new Method( namespace: $this->getSdkNamespace(), diff --git a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Indexes/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Indexes/Create.php index 34d594bebd..022eeb4e3a 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Indexes/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Indexes/Create.php @@ -37,7 +37,7 @@ class Create extends IndexCreate ->desc('Create index') ->groups(['api', 'database']) ->label('event', 'databases.[databaseId].tables.[tableId].indexes.[indexId].create') - ->label('scope', 'tables.write') + ->label('scope', ['tables.write', 'collections.write']) ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('audits.event', 'index.create') ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Indexes/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Indexes/Delete.php index d3040da62f..586bad78f4 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Indexes/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Indexes/Delete.php @@ -35,7 +35,7 @@ class Delete extends IndexDelete ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId/indexes/:key') ->desc('Delete index') ->groups(['api', 'database']) - ->label('scope', 'tables.write') + ->label('scope', ['tables.write', 'collections.write']) ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].indexes.[indexId].update') ->label('audits.event', 'index.delete') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Indexes/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Indexes/Get.php index c4bdd5d2cf..3f2978b547 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Indexes/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Indexes/Get.php @@ -31,7 +31,7 @@ class Get extends IndexGet ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId/indexes/:key') ->desc('Get index') ->groups(['api', 'database']) - ->label('scope', 'tables.read') + ->label('scope', ['tables.read', 'collections.read']) ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('sdk', new Method( namespace: $this->getSdkNamespace(), diff --git a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Indexes/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Indexes/XList.php index 7be32d88a6..c275fd2771 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Indexes/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Indexes/XList.php @@ -31,7 +31,7 @@ class XList extends IndexXList ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId/indexes') ->desc('List indexes') ->groups(['api', 'database']) - ->label('scope', 'tables.read') + ->label('scope', ['tables.read', 'collections.read']) ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('sdk', new Method( namespace: $this->getSdkNamespace(), diff --git a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Logs/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Logs/XList.php index a659f1b23b..6d386df4f6 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Logs/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Logs/XList.php @@ -27,7 +27,7 @@ class XList extends CollectionLogXList ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId/logs') ->desc('List table logs') ->groups(['api', 'database']) - ->label('scope', 'tables.read') + ->label('scope', ['tables.read', 'collections.read']) ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('sdk', new Method( namespace: $this->getSdkNamespace(), diff --git a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Bulk/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Bulk/Delete.php index c80d2d6827..c9729d714d 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Bulk/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Bulk/Delete.php @@ -32,7 +32,7 @@ class Delete extends DocumentsDelete ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId/rows') ->desc('Delete rows') ->groups(['api', 'database']) - ->label('scope', 'rows.write') + ->label('scope', ['rows.write', 'documents.write']) ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('audits.event', 'rows.delete') ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Bulk/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Bulk/Update.php index bc9d4ee0aa..13778b9474 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Bulk/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Bulk/Update.php @@ -33,7 +33,7 @@ class Update extends DocumentsUpdate ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId/rows') ->desc('Update rows') ->groups(['api', 'database']) - ->label('scope', 'rows.write') + ->label('scope', ['rows.write', 'documents.write']) ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('audits.event', 'rows.update') ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Bulk/Upsert.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Bulk/Upsert.php index ca0511c9c2..7b0d53da74 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Bulk/Upsert.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Bulk/Upsert.php @@ -32,7 +32,7 @@ class Upsert extends DocumentsUpsert ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId/rows') ->desc('Create or update rows') ->groups(['api', 'database']) - ->label('scope', 'rows.write') + ->label('scope', ['rows.write', 'documents.write']) ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('audits.event', 'row.create') ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Column/Decrement.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Column/Decrement.php index 08769ae86a..46e9c8d6af 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Column/Decrement.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Column/Decrement.php @@ -33,7 +33,7 @@ class Decrement extends DecrementDocumentAttribute ->desc('Decrement row column') ->groups(['api', 'database']) ->label('event', 'databases.[databaseId].tables.[tableId].rows.[rowId].update') - ->label('scope', 'rows.write') + ->label('scope', ['rows.write', 'documents.write']) ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('audits.event', 'rows.update') ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Column/Increment.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Column/Increment.php index 22e396e6bd..d921e9b8be 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Column/Increment.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Column/Increment.php @@ -33,7 +33,7 @@ class Increment extends IncrementDocumentAttribute ->desc('Increment row column') ->groups(['api', 'database']) ->label('event', 'databases.[databaseId].tables.[tableId].rows.[rowId].update') - ->label('scope', 'rows.write') + ->label('scope', ['rows.write', 'documents.write']) ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('audits.event', 'rows.update') ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Create.php index c099c2ce27..5290131dd1 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Create.php @@ -41,7 +41,7 @@ class Create extends DocumentCreate ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId/rows') ->desc('Create row') ->groups(['api', 'database']) - ->label('scope', 'rows.write') + ->label('scope', ['rows.write', 'documents.write']) ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('audits.event', 'row.create') ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Delete.php index 672efd28f5..7ac954c5dd 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Delete.php @@ -36,7 +36,7 @@ class Delete extends DocumentDelete ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId/rows/:rowId') ->desc('Delete row') ->groups(['api', 'database']) - ->label('scope', 'rows.write') + ->label('scope', ['rows.write', 'documents.write']) ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].rows.[rowId].delete') ->label('audits.event', 'row.delete') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Get.php index af9567d848..5704f75d82 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Get.php @@ -32,7 +32,7 @@ class Get extends DocumentGet ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId/rows/:rowId') ->desc('Get row') ->groups(['api', 'database']) - ->label('scope', 'rows.read') + ->label('scope', ['rows.read', 'documents.read']) ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('sdk', new Method( namespace: $this->getSdkNamespace(), diff --git a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Logs/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Logs/XList.php index 24b664d812..a80249070b 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Logs/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Logs/XList.php @@ -27,7 +27,7 @@ class XList extends DocumentLogXList ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId/rows/:rowId/logs') ->desc('List row logs') ->groups(['api', 'database']) - ->label('scope', 'rows.read') + ->label('scope', ['rows.read', 'documents.read']) ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('sdk', new Method( namespace: $this->getSdkNamespace(), diff --git a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Update.php index a38ae37b58..b0e321b262 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Update.php @@ -34,7 +34,7 @@ class Update extends DocumentUpdate ->desc('Update row') ->groups(['api', 'database']) ->label('event', 'databases.[databaseId].tables.[tableId].rows.[rowId].update') - ->label('scope', 'rows.write') + ->label('scope', ['rows.write', 'documents.write']) ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('audits.event', 'row.update') ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}/row/{response.$id}') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Upsert.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Upsert.php index 234e504916..36ca9709e1 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Upsert.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/Upsert.php @@ -34,7 +34,7 @@ class Upsert extends DocumentUpsert ->desc('Create or update a row') ->groups(['api', 'database']) ->label('event', 'databases.[databaseId].tables.[tableId].rows.[rowId].upsert') - ->label('scope', 'rows.write') + ->label('scope', ['rows.write', 'documents.write']) ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('audits.event', 'row.upsert') ->label('audits.resource', 'database/{request.databaseId}/table/{request.tableId}/row/{response.$id}') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/XList.php index e86f0e0dd6..5d503f1c59 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Rows/XList.php @@ -32,7 +32,7 @@ class XList extends DocumentXList ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId/rows') ->desc('List rows') ->groups(['api', 'database']) - ->label('scope', 'rows.read') + ->label('scope', ['rows.read', 'documents.read']) ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('sdk', new Method( namespace: $this->getSdkNamespace(), diff --git a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Update.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Update.php index 22adc17dc8..8bc44bd212 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Update.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Update.php @@ -33,7 +33,7 @@ class Update extends CollectionUpdate ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId') ->desc('Update table') ->groups(['api', 'database', 'schema']) - ->label('scope', 'tables.write') + ->label('scope', ['tables.write', 'collections.write']) ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('event', 'databases.[databaseId].tables.[tableId].update') ->label('audits.event', 'table.update') diff --git a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Usage/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Usage/Get.php index 0cda3770f9..87f720e689 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Usage/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/Usage/Get.php @@ -31,7 +31,7 @@ class Get extends CollectionUsageGet ->setHttpPath('/v1/tablesdb/:databaseId/tables/:tableId/usage') ->desc('Get table usage stats') ->groups(['api', 'database', 'usage']) - ->label('scope', 'tables.read') + ->label('scope', ['tables.read', 'collections.read']) ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('sdk', new Method( namespace: $this->getSdkNamespace(), diff --git a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/XList.php index 4bb4bb0d27..9a91a0ef36 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Tables/XList.php @@ -32,7 +32,7 @@ class XList extends CollectionXList ->setHttpPath('/v1/tablesdb/:databaseId/tables') ->desc('List tables') ->groups(['api', 'database']) - ->label('scope', 'tables.read') + ->label('scope', ['tables.read', 'collections.read']) ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('sdk', new Method( namespace: $this->getSdkNamespace(), diff --git a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Usage/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Usage/Get.php index dba7feee31..89b9fbd8c2 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Usage/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Usage/Get.php @@ -26,7 +26,7 @@ class Get extends DatabaseUsageGet ->setHttpPath('/v1/tablesdb/:databaseId/usage') ->desc('Get TablesDB usage stats') ->groups(['api', 'database', 'usage']) - ->label('scope', 'tables.read') + ->label('scope', ['tables.read', 'collections.read']) ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('sdk', [ new Method( diff --git a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Usage/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Usage/XList.php index a67976211c..0bd96fc40a 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Usage/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/TablesDB/Usage/XList.php @@ -25,7 +25,7 @@ class XList extends DatabaseUsageXList ->setHttpPath('/v1/tablesdb/usage') ->desc('Get TablesDB usage stats') ->groups(['api', 'database', 'usage']) - ->label('scope', 'tables.read') + ->label('scope', ['tables.read', 'collections.read']) ->label('resourceType', RESOURCE_TYPE_DATABASES) ->label('sdk', [ new Method( diff --git a/src/Appwrite/SDK/Specification/Format/Swagger2.php b/src/Appwrite/SDK/Specification/Format/Swagger2.php index 397d8400fe..2a50f6fd9c 100644 --- a/src/Appwrite/SDK/Specification/Format/Swagger2.php +++ b/src/Appwrite/SDK/Specification/Format/Swagger2.php @@ -349,11 +349,10 @@ class Swagger2 extends Format } } - if (!empty($scope)) { // && 'public' != $scope + if (!empty($scope)) { $securities = ['Project' => []]; foreach ($sdk->getAuth() as $security) { - /** @var AuthType $security */ if (\array_key_exists($security->value, $this->keys)) { $securities[$security->value] = []; } From 4d675530d6499394e9ca7f9347bda3de43f0a6f2 Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Wed, 27 Aug 2025 14:47:40 +1200 Subject: [PATCH 22/29] Remove response filter --- app/controllers/general.php | 3 --- src/Appwrite/Utopia/Response/Filters/V20.php | 5 +---- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/app/controllers/general.php b/app/controllers/general.php index a4f89d14c7..1a4b6a6f8d 100644 --- a/app/controllers/general.php +++ b/app/controllers/general.php @@ -1015,9 +1015,6 @@ App::init() if (version_compare($responseFormat, '1.7.0', '<')) { $response->addFilter(new ResponseV19()); } - if (version_compare($responseFormat, '1.8.0', '<')) { - $response->addFilter(new ResponseV20()); - } if (version_compare($responseFormat, APP_VERSION_STABLE, '>')) { $warnings[] = "The current SDK is built for Appwrite " . $responseFormat . ". However, the current Appwrite server version is " . APP_VERSION_STABLE . ". Please downgrade your SDK to match the Appwrite version: https://appwrite.io/docs/sdks"; } diff --git a/src/Appwrite/Utopia/Response/Filters/V20.php b/src/Appwrite/Utopia/Response/Filters/V20.php index 96e847fa1f..8bccd3ea1d 100644 --- a/src/Appwrite/Utopia/Response/Filters/V20.php +++ b/src/Appwrite/Utopia/Response/Filters/V20.php @@ -12,18 +12,15 @@ class V20 extends Filter { $parsedResponse = $content; - $parsedResponse = match($model) { + return match($model) { Response::MODEL_DOCUMENT => $this->parseDocument($content), Response::MODEL_DOCUMENT_LIST => $this->handleList($content, 'documents', fn ($item) => $this->parseDocument($item)), default => $parsedResponse, }; - - return $parsedResponse; } protected function parseDocument(array $content): array { - unset($content['$sequence']); return $content; } } From 1f2d659d761b4b606fcaa94493bb1f4db549e47e Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Wed, 27 Aug 2025 14:58:22 +1200 Subject: [PATCH 23/29] Format --- app/controllers/general.php | 1 - 1 file changed, 1 deletion(-) diff --git a/app/controllers/general.php b/app/controllers/general.php index 1a4b6a6f8d..6c6a05794f 100644 --- a/app/controllers/general.php +++ b/app/controllers/general.php @@ -28,7 +28,6 @@ use Appwrite\Utopia\Response\Filters\V16 as ResponseV16; use Appwrite\Utopia\Response\Filters\V17 as ResponseV17; use Appwrite\Utopia\Response\Filters\V18 as ResponseV18; use Appwrite\Utopia\Response\Filters\V19 as ResponseV19; -use Appwrite\Utopia\Response\Filters\V20 as ResponseV20; use Appwrite\Utopia\View; use Executor\Executor; use MaxMind\Db\Reader; From 76db65583d36420e7a2ff24c92ee2d43cf2488df Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Wed, 27 Aug 2025 15:21:23 +1200 Subject: [PATCH 24/29] Fix GQL test --- tests/e2e/Services/GraphQL/ScopeTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/e2e/Services/GraphQL/ScopeTest.php b/tests/e2e/Services/GraphQL/ScopeTest.php index e5b3385030..4020e8330a 100644 --- a/tests/e2e/Services/GraphQL/ScopeTest.php +++ b/tests/e2e/Services/GraphQL/ScopeTest.php @@ -33,7 +33,7 @@ class ScopeTest extends Scope 'x-appwrite-key' => $apiKey, ], $gqlPayload); - $message = "app.{$projectId}@service.localhost (role: applications) missing scope (databases.write)"; + $message = "app.{$projectId}@service.localhost (role: applications) missing scopes ([\"databases.write\"])"; $this->assertArrayHasKey('errors', $database['body']); $this->assertEquals($message, $database['body']['errors'][0]['message']); } From 2111aab8ed6a909ae1bbf8b08e27509286b3a35f Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Wed, 27 Aug 2025 16:09:56 +1200 Subject: [PATCH 25/29] Fix relationship request filter --- app/controllers/general.php | 2 +- src/Appwrite/Utopia/Request/Filters/V20.php | 70 ++++++++++++++++----- 2 files changed, 54 insertions(+), 18 deletions(-) diff --git a/app/controllers/general.php b/app/controllers/general.php index a4f89d14c7..87f855ca19 100644 --- a/app/controllers/general.php +++ b/app/controllers/general.php @@ -875,7 +875,7 @@ App::init() } if (version_compare($requestFormat, '1.8.0', '<')) { $dbForProject = $getProjectDB($project); - $request->addFilter(new RequestV20($dbForProject, $request->getParams())); + $request->addFilter(new RequestV20($dbForProject, $route->getPathValues($request))); } } diff --git a/src/Appwrite/Utopia/Request/Filters/V20.php b/src/Appwrite/Utopia/Request/Filters/V20.php index 30de1fb2d3..e4d803b2a8 100644 --- a/src/Appwrite/Utopia/Request/Filters/V20.php +++ b/src/Appwrite/Utopia/Request/Filters/V20.php @@ -96,36 +96,72 @@ class V20 extends Filter /** * Returns all relationship attribute keys in `key.*` format for use with `Query::select`. */ - private function getRelatedCollectionKeys(): array + private function getRelatedCollectionKeys( + ?string $databaseId = null, + ?string $collectionId = null, + ?string $prefix = null, + int $depth = 1, + ): array { - $dbForProject = $this->getDbForProject(); + $databaseId ??= $this->getParamValue('databaseId'); + $collectionId ??= $this->getParamValue('collectionId'); + if ( + empty($databaseId) || + empty($collectionId) || + $depth > Database::RELATION_MAX_DEPTH + ) { + return []; + } + + $dbForProject = $this->getDbForProject(); if ($dbForProject === null) { return []; } - $databaseId = $this->getParamValue('databaseId'); - $collectionId = $this->getParamValue('collectionId'); - - if (empty($databaseId) || empty($collectionId)) { + $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); + if ($database->isEmpty()) { return []; } - $database = Authorization::skip(fn () => $dbForProject->getDocument('databases', $databaseId)); - - $collection = $dbForProject->getDocument( + $collection = Authorization::skip(fn () => $dbForProject->getDocument( 'database_' . $database->getSequence(), $collectionId - ); + )); + if ($collection->isEmpty()) { + return []; + } $attributes = $collection->getAttribute('attributes', []); + $relationshipKeys = []; - return \array_values(\array_map( - fn ($attr) => $attr['key'] . '.*', - \array_filter( - $attributes, - fn ($attr) => ($attr['type'] ?? null) === Database::VAR_RELATIONSHIP - ) - )); + foreach ($attributes as $attr) { + if (($attr['type'] ?? null) !== Database::VAR_RELATIONSHIP) { + continue; + } + + $key = $attr['key']; + $fullKey = $prefix ? $prefix . '.' . $key : $key; + + // Add the wildcard select for this relationship + $relationshipKeys[] = $fullKey . '.*'; + + // Get the related collection for nested relationships + $relatedCollectionId = $attr['relatedCollection'] ?? null; + + if ($relatedCollectionId) { + // Recursively get nested relationship keys + $nestedKeys = $this->getRelatedCollectionKeys( + $databaseId, + $relatedCollectionId, + $fullKey, + $depth + 1, + ); + + $relationshipKeys = \array_merge($relationshipKeys, $nestedKeys); + } + } + + return \array_values(\array_unique($relationshipKeys)); } } From 0e9cdc68b11ce322e551da932ed110f904594b07 Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Wed, 27 Aug 2025 16:10:10 +1200 Subject: [PATCH 26/29] Bump console --- app/views/install/compose.phtml | 2 +- docker-compose.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/install/compose.phtml b/app/views/install/compose.phtml index 8e165e45e5..ed4de38d2b 100644 --- a/app/views/install/compose.phtml +++ b/app/views/install/compose.phtml @@ -179,7 +179,7 @@ $image = $this->getParam('image', ''); appwrite-console: <<: *x-logging container_name: appwrite-console - image: /console:6.2.0 + image: /console:7.0.2 restart: unless-stopped networks: - appwrite diff --git a/docker-compose.yml b/docker-compose.yml index 3471690a5b..87385aa086 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -219,7 +219,7 @@ services: appwrite-console: <<: *x-logging container_name: appwrite-console - image: appwrite/console:7.0.0-qa.8 + image: appwrite/console:7.0.2 restart: unless-stopped networks: - appwrite From f4c56ad7572e66b748346f5bac27c127ba8b4aba Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Wed, 27 Aug 2025 16:21:29 +1200 Subject: [PATCH 27/29] Format --- src/Appwrite/Utopia/Request/Filters/V20.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/Appwrite/Utopia/Request/Filters/V20.php b/src/Appwrite/Utopia/Request/Filters/V20.php index e4d803b2a8..6ca6171eb9 100644 --- a/src/Appwrite/Utopia/Request/Filters/V20.php +++ b/src/Appwrite/Utopia/Request/Filters/V20.php @@ -101,8 +101,7 @@ class V20 extends Filter ?string $collectionId = null, ?string $prefix = null, int $depth = 1, - ): array - { + ): array { $databaseId ??= $this->getParamValue('databaseId'); $collectionId ??= $this->getParamValue('collectionId'); @@ -142,13 +141,13 @@ class V20 extends Filter $key = $attr['key']; $fullKey = $prefix ? $prefix . '.' . $key : $key; - + // Add the wildcard select for this relationship $relationshipKeys[] = $fullKey . '.*'; // Get the related collection for nested relationships $relatedCollectionId = $attr['relatedCollection'] ?? null; - + if ($relatedCollectionId) { // Recursively get nested relationship keys $nestedKeys = $this->getRelatedCollectionKeys( @@ -157,7 +156,7 @@ class V20 extends Filter $fullKey, $depth + 1, ); - + $relationshipKeys = \array_merge($relationshipKeys, $nestedKeys); } } From 4daad1b775d87537488aae8836502eb74b7adbb4 Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Wed, 27 Aug 2025 16:48:08 +1200 Subject: [PATCH 28/29] Ignore relationships that are not available --- src/Appwrite/Utopia/Request/Filters/V20.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Appwrite/Utopia/Request/Filters/V20.php b/src/Appwrite/Utopia/Request/Filters/V20.php index 6ca6171eb9..2683d600ef 100644 --- a/src/Appwrite/Utopia/Request/Filters/V20.php +++ b/src/Appwrite/Utopia/Request/Filters/V20.php @@ -135,7 +135,10 @@ class V20 extends Filter $relationshipKeys = []; foreach ($attributes as $attr) { - if (($attr['type'] ?? null) !== Database::VAR_RELATIONSHIP) { + if ( + ($attr['type'] ?? null) !== Database::VAR_RELATIONSHIP || + $attr['status'] !== 'available' + ) { continue; } From 71a8eaf48b8001fa44df4022f37e0f3b151a90dd Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Wed, 27 Aug 2025 17:19:13 +1200 Subject: [PATCH 29/29] Update CLI --- app/config/platforms.php | 2 +- app/config/specs/open-api3-1.8.x-client.json | 40 ++- app/config/specs/open-api3-1.8.x-console.json | 240 ++++++++++++++---- app/config/specs/open-api3-1.8.x-server.json | 215 ++++++++++++---- app/config/specs/open-api3-latest-client.json | 40 ++- .../specs/open-api3-latest-console.json | 240 ++++++++++++++---- app/config/specs/open-api3-latest-server.json | 215 ++++++++++++---- app/config/specs/swagger2-1.8.x-client.json | 40 ++- app/config/specs/swagger2-1.8.x-console.json | 240 ++++++++++++++---- app/config/specs/swagger2-1.8.x-server.json | 215 ++++++++++++---- app/config/specs/swagger2-latest-client.json | 40 ++- app/config/specs/swagger2-latest-console.json | 240 ++++++++++++++---- app/config/specs/swagger2-latest-server.json | 215 ++++++++++++---- composer.lock | 26 +- 14 files changed, 1598 insertions(+), 410 deletions(-) diff --git a/app/config/platforms.php b/app/config/platforms.php index 3d30f7fb75..a67381b596 100644 --- a/app/config/platforms.php +++ b/app/config/platforms.php @@ -226,7 +226,7 @@ return [ [ 'key' => 'cli', 'name' => 'Command Line', - 'version' => '9.0.1', + 'version' => '9.0.2', 'url' => 'https://github.com/appwrite/sdk-for-cli', 'package' => 'https://www.npmjs.com/package/appwrite-cli', 'enabled' => true, diff --git a/app/config/specs/open-api3-1.8.x-client.json b/app/config/specs/open-api3-1.8.x-client.json index 0c5e34b811..1ccf7d82ab 100644 --- a/app/config/specs/open-api3-1.8.x-client.json +++ b/app/config/specs/open-api3-1.8.x-client.json @@ -7498,7 +7498,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "rows.read", + "scope": [ + "rows.read", + "documents.read" + ], "platforms": [ "client", "server", @@ -7583,7 +7586,10 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", + "scope": [ + "rows.write", + "documents.write" + ], "platforms": [ "client", "server", @@ -7725,7 +7731,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "rows.read", + "scope": [ + "rows.read", + "documents.read" + ], "platforms": [ "client", "server", @@ -7820,7 +7829,10 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", + "scope": [ + "rows.write", + "documents.write" + ], "platforms": [ "client", "server", @@ -7956,7 +7968,10 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", + "scope": [ + "rows.write", + "documents.write" + ], "platforms": [ "client", "server", @@ -8055,7 +8070,10 @@ "rate-limit": 60, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", + "scope": [ + "rows.write", + "documents.write" + ], "platforms": [ "client", "server", @@ -8139,7 +8157,10 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", + "scope": [ + "rows.write", + "documents.write" + ], "platforms": [ "client", "server", @@ -8254,7 +8275,10 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", + "scope": [ + "rows.write", + "documents.write" + ], "platforms": [ "client", "server", diff --git a/app/config/specs/open-api3-1.8.x-console.json b/app/config/specs/open-api3-1.8.x-console.json index bf44bf0f4d..cd2bb95ee6 100644 --- a/app/config/specs/open-api3-1.8.x-console.json +++ b/app/config/specs/open-api3-1.8.x-console.json @@ -32161,7 +32161,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.read", + "scope": [ + "tables.read", + "collections.read" + ], "platforms": [ "console" ], @@ -32451,7 +32454,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.read", + "scope": [ + "tables.read", + "collections.read" + ], "platforms": [ "server" ], @@ -32534,7 +32540,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -32638,7 +32647,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.read", + "scope": [ + "tables.read", + "collections.read" + ], "platforms": [ "server" ], @@ -32707,7 +32719,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -32806,7 +32821,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -32877,7 +32895,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.read", + "scope": [ + "tables.read", + "collections.read" + ], "platforms": [ "server" ], @@ -32961,7 +32982,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -33067,7 +33091,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -33178,7 +33205,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -33284,7 +33314,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -33395,7 +33428,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -33501,7 +33537,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -33612,7 +33651,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -33727,7 +33769,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -33847,7 +33892,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -33963,7 +34011,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -34084,7 +34135,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -34200,7 +34254,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -34321,7 +34378,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -34427,7 +34487,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -34538,7 +34601,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -34669,7 +34735,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -34786,7 +34855,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -34902,7 +34974,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -35008,7 +35083,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -35150,7 +35228,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.read", + "scope": [ + "tables.read", + "collections.read" + ], "platforms": [ "server" ], @@ -35221,7 +35302,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -35301,7 +35385,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -35409,7 +35496,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.read", + "scope": [ + "tables.read", + "collections.read" + ], "platforms": [ "server" ], @@ -35491,7 +35581,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -35619,7 +35712,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.read", + "scope": [ + "tables.read", + "collections.read" + ], "platforms": [ "server" ], @@ -35690,7 +35786,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -35770,7 +35869,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.read", + "scope": [ + "tables.read", + "collections.read" + ], "platforms": [ "console" ], @@ -35853,7 +35955,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "rows.read", + "scope": [ + "rows.read", + "documents.read" + ], "platforms": [ "client", "server", @@ -35938,7 +36043,10 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", + "scope": [ + "rows.write", + "documents.write" + ], "platforms": [ "client", "server", @@ -36104,7 +36212,10 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", + "scope": [ + "rows.write", + "documents.write" + ], "platforms": [ "console", "server" @@ -36224,7 +36335,10 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", + "scope": [ + "rows.write", + "documents.write" + ], "platforms": [ "console", "server" @@ -36318,7 +36432,10 @@ "rate-limit": 60, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", + "scope": [ + "rows.write", + "documents.write" + ], "platforms": [ "console", "server" @@ -36409,7 +36526,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "rows.read", + "scope": [ + "rows.read", + "documents.read" + ], "platforms": [ "client", "server", @@ -36504,7 +36624,10 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", + "scope": [ + "rows.write", + "documents.write" + ], "platforms": [ "client", "server", @@ -36640,7 +36763,10 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", + "scope": [ + "rows.write", + "documents.write" + ], "platforms": [ "client", "server", @@ -36739,7 +36865,10 @@ "rate-limit": 60, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", + "scope": [ + "rows.write", + "documents.write" + ], "platforms": [ "client", "server", @@ -36823,7 +36952,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "rows.read", + "scope": [ + "rows.read", + "documents.read" + ], "platforms": [ "console" ], @@ -36916,7 +37048,10 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", + "scope": [ + "rows.write", + "documents.write" + ], "platforms": [ "client", "server", @@ -37031,7 +37166,10 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", + "scope": [ + "rows.write", + "documents.write" + ], "platforms": [ "client", "server", @@ -37146,7 +37284,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.read", + "scope": [ + "tables.read", + "collections.read" + ], "platforms": [ "console" ], @@ -37238,7 +37379,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.read", + "scope": [ + "tables.read", + "collections.read" + ], "platforms": [ "console" ], diff --git a/app/config/specs/open-api3-1.8.x-server.json b/app/config/specs/open-api3-1.8.x-server.json index ed7db10725..7e5847f94c 100644 --- a/app/config/specs/open-api3-1.8.x-server.json +++ b/app/config/specs/open-api3-1.8.x-server.json @@ -22861,7 +22861,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.read", + "scope": [ + "tables.read", + "collections.read" + ], "platforms": [ "server" ], @@ -22945,7 +22948,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -23050,7 +23056,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.read", + "scope": [ + "tables.read", + "collections.read" + ], "platforms": [ "server" ], @@ -23120,7 +23129,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -23220,7 +23232,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -23292,7 +23307,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.read", + "scope": [ + "tables.read", + "collections.read" + ], "platforms": [ "server" ], @@ -23377,7 +23395,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -23484,7 +23505,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -23596,7 +23620,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -23703,7 +23730,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -23815,7 +23845,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -23922,7 +23955,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -24034,7 +24070,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -24150,7 +24189,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -24271,7 +24313,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -24388,7 +24433,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -24510,7 +24558,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -24627,7 +24678,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -24749,7 +24803,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -24856,7 +24913,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -24968,7 +25028,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -25100,7 +25163,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -25218,7 +25284,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -25335,7 +25404,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -25442,7 +25514,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -25585,7 +25660,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.read", + "scope": [ + "tables.read", + "collections.read" + ], "platforms": [ "server" ], @@ -25657,7 +25735,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -25738,7 +25819,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -25847,7 +25931,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.read", + "scope": [ + "tables.read", + "collections.read" + ], "platforms": [ "server" ], @@ -25930,7 +26017,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -26059,7 +26149,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.read", + "scope": [ + "tables.read", + "collections.read" + ], "platforms": [ "server" ], @@ -26131,7 +26224,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -26212,7 +26308,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "rows.read", + "scope": [ + "rows.read", + "documents.read" + ], "platforms": [ "client", "server", @@ -26299,7 +26398,10 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", + "scope": [ + "rows.write", + "documents.write" + ], "platforms": [ "client", "server", @@ -26469,7 +26571,10 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", + "scope": [ + "rows.write", + "documents.write" + ], "platforms": [ "console", "server" @@ -26591,7 +26696,10 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", + "scope": [ + "rows.write", + "documents.write" + ], "platforms": [ "console", "server" @@ -26686,7 +26794,10 @@ "rate-limit": 60, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", + "scope": [ + "rows.write", + "documents.write" + ], "platforms": [ "console", "server" @@ -26778,7 +26889,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "rows.read", + "scope": [ + "rows.read", + "documents.read" + ], "platforms": [ "client", "server", @@ -26875,7 +26989,10 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", + "scope": [ + "rows.write", + "documents.write" + ], "platforms": [ "client", "server", @@ -27014,7 +27131,10 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", + "scope": [ + "rows.write", + "documents.write" + ], "platforms": [ "client", "server", @@ -27115,7 +27235,10 @@ "rate-limit": 60, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", + "scope": [ + "rows.write", + "documents.write" + ], "platforms": [ "client", "server", @@ -27201,7 +27324,10 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", + "scope": [ + "rows.write", + "documents.write" + ], "platforms": [ "client", "server", @@ -27318,7 +27444,10 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", + "scope": [ + "rows.write", + "documents.write" + ], "platforms": [ "client", "server", diff --git a/app/config/specs/open-api3-latest-client.json b/app/config/specs/open-api3-latest-client.json index 0c5e34b811..1ccf7d82ab 100644 --- a/app/config/specs/open-api3-latest-client.json +++ b/app/config/specs/open-api3-latest-client.json @@ -7498,7 +7498,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "rows.read", + "scope": [ + "rows.read", + "documents.read" + ], "platforms": [ "client", "server", @@ -7583,7 +7586,10 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", + "scope": [ + "rows.write", + "documents.write" + ], "platforms": [ "client", "server", @@ -7725,7 +7731,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "rows.read", + "scope": [ + "rows.read", + "documents.read" + ], "platforms": [ "client", "server", @@ -7820,7 +7829,10 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", + "scope": [ + "rows.write", + "documents.write" + ], "platforms": [ "client", "server", @@ -7956,7 +7968,10 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", + "scope": [ + "rows.write", + "documents.write" + ], "platforms": [ "client", "server", @@ -8055,7 +8070,10 @@ "rate-limit": 60, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", + "scope": [ + "rows.write", + "documents.write" + ], "platforms": [ "client", "server", @@ -8139,7 +8157,10 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", + "scope": [ + "rows.write", + "documents.write" + ], "platforms": [ "client", "server", @@ -8254,7 +8275,10 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", + "scope": [ + "rows.write", + "documents.write" + ], "platforms": [ "client", "server", diff --git a/app/config/specs/open-api3-latest-console.json b/app/config/specs/open-api3-latest-console.json index bf44bf0f4d..cd2bb95ee6 100644 --- a/app/config/specs/open-api3-latest-console.json +++ b/app/config/specs/open-api3-latest-console.json @@ -32161,7 +32161,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.read", + "scope": [ + "tables.read", + "collections.read" + ], "platforms": [ "console" ], @@ -32451,7 +32454,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.read", + "scope": [ + "tables.read", + "collections.read" + ], "platforms": [ "server" ], @@ -32534,7 +32540,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -32638,7 +32647,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.read", + "scope": [ + "tables.read", + "collections.read" + ], "platforms": [ "server" ], @@ -32707,7 +32719,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -32806,7 +32821,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -32877,7 +32895,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.read", + "scope": [ + "tables.read", + "collections.read" + ], "platforms": [ "server" ], @@ -32961,7 +32982,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -33067,7 +33091,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -33178,7 +33205,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -33284,7 +33314,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -33395,7 +33428,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -33501,7 +33537,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -33612,7 +33651,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -33727,7 +33769,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -33847,7 +33892,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -33963,7 +34011,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -34084,7 +34135,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -34200,7 +34254,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -34321,7 +34378,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -34427,7 +34487,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -34538,7 +34601,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -34669,7 +34735,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -34786,7 +34855,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -34902,7 +34974,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -35008,7 +35083,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -35150,7 +35228,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.read", + "scope": [ + "tables.read", + "collections.read" + ], "platforms": [ "server" ], @@ -35221,7 +35302,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -35301,7 +35385,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -35409,7 +35496,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.read", + "scope": [ + "tables.read", + "collections.read" + ], "platforms": [ "server" ], @@ -35491,7 +35581,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -35619,7 +35712,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.read", + "scope": [ + "tables.read", + "collections.read" + ], "platforms": [ "server" ], @@ -35690,7 +35786,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -35770,7 +35869,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.read", + "scope": [ + "tables.read", + "collections.read" + ], "platforms": [ "console" ], @@ -35853,7 +35955,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "rows.read", + "scope": [ + "rows.read", + "documents.read" + ], "platforms": [ "client", "server", @@ -35938,7 +36043,10 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", + "scope": [ + "rows.write", + "documents.write" + ], "platforms": [ "client", "server", @@ -36104,7 +36212,10 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", + "scope": [ + "rows.write", + "documents.write" + ], "platforms": [ "console", "server" @@ -36224,7 +36335,10 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", + "scope": [ + "rows.write", + "documents.write" + ], "platforms": [ "console", "server" @@ -36318,7 +36432,10 @@ "rate-limit": 60, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", + "scope": [ + "rows.write", + "documents.write" + ], "platforms": [ "console", "server" @@ -36409,7 +36526,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "rows.read", + "scope": [ + "rows.read", + "documents.read" + ], "platforms": [ "client", "server", @@ -36504,7 +36624,10 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", + "scope": [ + "rows.write", + "documents.write" + ], "platforms": [ "client", "server", @@ -36640,7 +36763,10 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", + "scope": [ + "rows.write", + "documents.write" + ], "platforms": [ "client", "server", @@ -36739,7 +36865,10 @@ "rate-limit": 60, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", + "scope": [ + "rows.write", + "documents.write" + ], "platforms": [ "client", "server", @@ -36823,7 +36952,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "rows.read", + "scope": [ + "rows.read", + "documents.read" + ], "platforms": [ "console" ], @@ -36916,7 +37048,10 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", + "scope": [ + "rows.write", + "documents.write" + ], "platforms": [ "client", "server", @@ -37031,7 +37166,10 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", + "scope": [ + "rows.write", + "documents.write" + ], "platforms": [ "client", "server", @@ -37146,7 +37284,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.read", + "scope": [ + "tables.read", + "collections.read" + ], "platforms": [ "console" ], @@ -37238,7 +37379,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.read", + "scope": [ + "tables.read", + "collections.read" + ], "platforms": [ "console" ], diff --git a/app/config/specs/open-api3-latest-server.json b/app/config/specs/open-api3-latest-server.json index ed7db10725..7e5847f94c 100644 --- a/app/config/specs/open-api3-latest-server.json +++ b/app/config/specs/open-api3-latest-server.json @@ -22861,7 +22861,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.read", + "scope": [ + "tables.read", + "collections.read" + ], "platforms": [ "server" ], @@ -22945,7 +22948,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -23050,7 +23056,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.read", + "scope": [ + "tables.read", + "collections.read" + ], "platforms": [ "server" ], @@ -23120,7 +23129,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -23220,7 +23232,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -23292,7 +23307,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.read", + "scope": [ + "tables.read", + "collections.read" + ], "platforms": [ "server" ], @@ -23377,7 +23395,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -23484,7 +23505,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -23596,7 +23620,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -23703,7 +23730,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -23815,7 +23845,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -23922,7 +23955,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -24034,7 +24070,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -24150,7 +24189,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -24271,7 +24313,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -24388,7 +24433,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -24510,7 +24558,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -24627,7 +24678,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -24749,7 +24803,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -24856,7 +24913,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -24968,7 +25028,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -25100,7 +25163,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -25218,7 +25284,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -25335,7 +25404,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -25442,7 +25514,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -25585,7 +25660,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.read", + "scope": [ + "tables.read", + "collections.read" + ], "platforms": [ "server" ], @@ -25657,7 +25735,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -25738,7 +25819,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -25847,7 +25931,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.read", + "scope": [ + "tables.read", + "collections.read" + ], "platforms": [ "server" ], @@ -25930,7 +26017,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -26059,7 +26149,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.read", + "scope": [ + "tables.read", + "collections.read" + ], "platforms": [ "server" ], @@ -26131,7 +26224,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -26212,7 +26308,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "rows.read", + "scope": [ + "rows.read", + "documents.read" + ], "platforms": [ "client", "server", @@ -26299,7 +26398,10 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", + "scope": [ + "rows.write", + "documents.write" + ], "platforms": [ "client", "server", @@ -26469,7 +26571,10 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", + "scope": [ + "rows.write", + "documents.write" + ], "platforms": [ "console", "server" @@ -26591,7 +26696,10 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", + "scope": [ + "rows.write", + "documents.write" + ], "platforms": [ "console", "server" @@ -26686,7 +26794,10 @@ "rate-limit": 60, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", + "scope": [ + "rows.write", + "documents.write" + ], "platforms": [ "console", "server" @@ -26778,7 +26889,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "rows.read", + "scope": [ + "rows.read", + "documents.read" + ], "platforms": [ "client", "server", @@ -26875,7 +26989,10 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", + "scope": [ + "rows.write", + "documents.write" + ], "platforms": [ "client", "server", @@ -27014,7 +27131,10 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", + "scope": [ + "rows.write", + "documents.write" + ], "platforms": [ "client", "server", @@ -27115,7 +27235,10 @@ "rate-limit": 60, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", + "scope": [ + "rows.write", + "documents.write" + ], "platforms": [ "client", "server", @@ -27201,7 +27324,10 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", + "scope": [ + "rows.write", + "documents.write" + ], "platforms": [ "client", "server", @@ -27318,7 +27444,10 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", + "scope": [ + "rows.write", + "documents.write" + ], "platforms": [ "client", "server", diff --git a/app/config/specs/swagger2-1.8.x-client.json b/app/config/specs/swagger2-1.8.x-client.json index d46fd7c0a2..b08d8b0036 100644 --- a/app/config/specs/swagger2-1.8.x-client.json +++ b/app/config/specs/swagger2-1.8.x-client.json @@ -7580,7 +7580,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "rows.read", + "scope": [ + "rows.read", + "documents.read" + ], "platforms": [ "client", "server" @@ -7661,7 +7664,10 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", + "scope": [ + "rows.write", + "documents.write" + ], "platforms": [ "client", "server" @@ -7800,7 +7806,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "rows.read", + "scope": [ + "rows.read", + "documents.read" + ], "platforms": [ "client", "server" @@ -7889,7 +7898,10 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", + "scope": [ + "rows.write", + "documents.write" + ], "platforms": [ "client", "server" @@ -8020,7 +8032,10 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", + "scope": [ + "rows.write", + "documents.write" + ], "platforms": [ "client", "server" @@ -8116,7 +8131,10 @@ "rate-limit": 60, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", + "scope": [ + "rows.write", + "documents.write" + ], "platforms": [ "client", "server" @@ -8195,7 +8213,10 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", + "scope": [ + "rows.write", + "documents.write" + ], "platforms": [ "client", "server", @@ -8303,7 +8324,10 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", + "scope": [ + "rows.write", + "documents.write" + ], "platforms": [ "client", "server", diff --git a/app/config/specs/swagger2-1.8.x-console.json b/app/config/specs/swagger2-1.8.x-console.json index bebfa89881..b4dfbb8ca6 100644 --- a/app/config/specs/swagger2-1.8.x-console.json +++ b/app/config/specs/swagger2-1.8.x-console.json @@ -32345,7 +32345,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.read", + "scope": [ + "tables.read", + "collections.read" + ], "platforms": [ "console" ], @@ -32633,7 +32636,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.read", + "scope": [ + "tables.read", + "collections.read" + ], "platforms": [ "server" ], @@ -32713,7 +32719,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -32818,7 +32827,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.read", + "scope": [ + "tables.read", + "collections.read" + ], "platforms": [ "server" ], @@ -32885,7 +32897,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -32986,7 +33001,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -33053,7 +33071,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.read", + "scope": [ + "tables.read", + "collections.read" + ], "platforms": [ "server" ], @@ -33134,7 +33155,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -33240,7 +33264,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -33348,7 +33375,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -33454,7 +33484,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -33562,7 +33595,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -33668,7 +33704,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -33776,7 +33815,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -33892,7 +33934,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -34010,7 +34055,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -34128,7 +34176,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -34248,7 +34299,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -34366,7 +34420,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -34486,7 +34543,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -34592,7 +34652,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -34700,7 +34763,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -34833,7 +34899,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -34952,7 +35021,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -35066,7 +35138,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -35172,7 +35247,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -35309,7 +35387,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.read", + "scope": [ + "tables.read", + "collections.read" + ], "platforms": [ "server" ], @@ -35378,7 +35459,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -35454,7 +35538,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -35556,7 +35643,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.read", + "scope": [ + "tables.read", + "collections.read" + ], "platforms": [ "server" ], @@ -35635,7 +35725,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -35762,7 +35855,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.read", + "scope": [ + "tables.read", + "collections.read" + ], "platforms": [ "server" ], @@ -35831,7 +35927,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -35905,7 +36004,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.read", + "scope": [ + "tables.read", + "collections.read" + ], "platforms": [ "console" ], @@ -35983,7 +36085,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "rows.read", + "scope": [ + "rows.read", + "documents.read" + ], "platforms": [ "client", "server" @@ -36064,7 +36169,10 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", + "scope": [ + "rows.write", + "documents.write" + ], "platforms": [ "client", "server" @@ -36229,7 +36337,10 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", + "scope": [ + "rows.write", + "documents.write" + ], "platforms": [ "console", "server" @@ -36346,7 +36457,10 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", + "scope": [ + "rows.write", + "documents.write" + ], "platforms": [ "console", "server" @@ -36438,7 +36552,10 @@ "rate-limit": 60, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", + "scope": [ + "rows.write", + "documents.write" + ], "platforms": [ "console", "server" @@ -36524,7 +36641,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "rows.read", + "scope": [ + "rows.read", + "documents.read" + ], "platforms": [ "client", "server" @@ -36613,7 +36733,10 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", + "scope": [ + "rows.write", + "documents.write" + ], "platforms": [ "client", "server" @@ -36744,7 +36867,10 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", + "scope": [ + "rows.write", + "documents.write" + ], "platforms": [ "client", "server" @@ -36840,7 +36966,10 @@ "rate-limit": 60, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", + "scope": [ + "rows.write", + "documents.write" + ], "platforms": [ "client", "server" @@ -36917,7 +37046,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "rows.read", + "scope": [ + "rows.read", + "documents.read" + ], "platforms": [ "console" ], @@ -37005,7 +37137,10 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", + "scope": [ + "rows.write", + "documents.write" + ], "platforms": [ "client", "server", @@ -37113,7 +37248,10 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", + "scope": [ + "rows.write", + "documents.write" + ], "platforms": [ "client", "server", @@ -37219,7 +37357,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.read", + "scope": [ + "tables.read", + "collections.read" + ], "platforms": [ "console" ], @@ -37305,7 +37446,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.read", + "scope": [ + "tables.read", + "collections.read" + ], "platforms": [ "console" ], diff --git a/app/config/specs/swagger2-1.8.x-server.json b/app/config/specs/swagger2-1.8.x-server.json index c3be4b8853..2c358475f8 100644 --- a/app/config/specs/swagger2-1.8.x-server.json +++ b/app/config/specs/swagger2-1.8.x-server.json @@ -23098,7 +23098,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.read", + "scope": [ + "tables.read", + "collections.read" + ], "platforms": [ "server" ], @@ -23179,7 +23182,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -23285,7 +23291,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.read", + "scope": [ + "tables.read", + "collections.read" + ], "platforms": [ "server" ], @@ -23353,7 +23362,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -23455,7 +23467,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -23523,7 +23538,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.read", + "scope": [ + "tables.read", + "collections.read" + ], "platforms": [ "server" ], @@ -23605,7 +23623,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -23712,7 +23733,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -23821,7 +23845,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -23928,7 +23955,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -24037,7 +24067,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -24144,7 +24177,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -24253,7 +24289,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -24370,7 +24409,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -24489,7 +24531,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -24608,7 +24653,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -24729,7 +24777,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -24848,7 +24899,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -24969,7 +25023,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -25076,7 +25133,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -25185,7 +25245,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -25319,7 +25382,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -25439,7 +25505,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -25554,7 +25623,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -25661,7 +25733,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -25799,7 +25874,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.read", + "scope": [ + "tables.read", + "collections.read" + ], "platforms": [ "server" ], @@ -25869,7 +25947,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -25946,7 +26027,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -26049,7 +26133,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.read", + "scope": [ + "tables.read", + "collections.read" + ], "platforms": [ "server" ], @@ -26129,7 +26216,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -26257,7 +26347,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.read", + "scope": [ + "tables.read", + "collections.read" + ], "platforms": [ "server" ], @@ -26327,7 +26420,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -26402,7 +26498,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "rows.read", + "scope": [ + "rows.read", + "documents.read" + ], "platforms": [ "client", "server" @@ -26485,7 +26584,10 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", + "scope": [ + "rows.write", + "documents.write" + ], "platforms": [ "client", "server" @@ -26654,7 +26756,10 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", + "scope": [ + "rows.write", + "documents.write" + ], "platforms": [ "console", "server" @@ -26773,7 +26878,10 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", + "scope": [ + "rows.write", + "documents.write" + ], "platforms": [ "console", "server" @@ -26866,7 +26974,10 @@ "rate-limit": 60, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", + "scope": [ + "rows.write", + "documents.write" + ], "platforms": [ "console", "server" @@ -26953,7 +27064,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "rows.read", + "scope": [ + "rows.read", + "documents.read" + ], "platforms": [ "client", "server" @@ -27044,7 +27158,10 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", + "scope": [ + "rows.write", + "documents.write" + ], "platforms": [ "client", "server" @@ -27178,7 +27295,10 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", + "scope": [ + "rows.write", + "documents.write" + ], "platforms": [ "client", "server" @@ -27276,7 +27396,10 @@ "rate-limit": 60, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", + "scope": [ + "rows.write", + "documents.write" + ], "platforms": [ "client", "server" @@ -27357,7 +27480,10 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", + "scope": [ + "rows.write", + "documents.write" + ], "platforms": [ "client", "server", @@ -27467,7 +27593,10 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", + "scope": [ + "rows.write", + "documents.write" + ], "platforms": [ "client", "server", diff --git a/app/config/specs/swagger2-latest-client.json b/app/config/specs/swagger2-latest-client.json index d46fd7c0a2..b08d8b0036 100644 --- a/app/config/specs/swagger2-latest-client.json +++ b/app/config/specs/swagger2-latest-client.json @@ -7580,7 +7580,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "rows.read", + "scope": [ + "rows.read", + "documents.read" + ], "platforms": [ "client", "server" @@ -7661,7 +7664,10 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", + "scope": [ + "rows.write", + "documents.write" + ], "platforms": [ "client", "server" @@ -7800,7 +7806,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "rows.read", + "scope": [ + "rows.read", + "documents.read" + ], "platforms": [ "client", "server" @@ -7889,7 +7898,10 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", + "scope": [ + "rows.write", + "documents.write" + ], "platforms": [ "client", "server" @@ -8020,7 +8032,10 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", + "scope": [ + "rows.write", + "documents.write" + ], "platforms": [ "client", "server" @@ -8116,7 +8131,10 @@ "rate-limit": 60, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", + "scope": [ + "rows.write", + "documents.write" + ], "platforms": [ "client", "server" @@ -8195,7 +8213,10 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", + "scope": [ + "rows.write", + "documents.write" + ], "platforms": [ "client", "server", @@ -8303,7 +8324,10 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", + "scope": [ + "rows.write", + "documents.write" + ], "platforms": [ "client", "server", diff --git a/app/config/specs/swagger2-latest-console.json b/app/config/specs/swagger2-latest-console.json index bebfa89881..b4dfbb8ca6 100644 --- a/app/config/specs/swagger2-latest-console.json +++ b/app/config/specs/swagger2-latest-console.json @@ -32345,7 +32345,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.read", + "scope": [ + "tables.read", + "collections.read" + ], "platforms": [ "console" ], @@ -32633,7 +32636,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.read", + "scope": [ + "tables.read", + "collections.read" + ], "platforms": [ "server" ], @@ -32713,7 +32719,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -32818,7 +32827,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.read", + "scope": [ + "tables.read", + "collections.read" + ], "platforms": [ "server" ], @@ -32885,7 +32897,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -32986,7 +33001,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -33053,7 +33071,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.read", + "scope": [ + "tables.read", + "collections.read" + ], "platforms": [ "server" ], @@ -33134,7 +33155,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -33240,7 +33264,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -33348,7 +33375,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -33454,7 +33484,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -33562,7 +33595,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -33668,7 +33704,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -33776,7 +33815,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -33892,7 +33934,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -34010,7 +34055,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -34128,7 +34176,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -34248,7 +34299,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -34366,7 +34420,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -34486,7 +34543,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -34592,7 +34652,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -34700,7 +34763,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -34833,7 +34899,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -34952,7 +35021,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -35066,7 +35138,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -35172,7 +35247,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -35309,7 +35387,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.read", + "scope": [ + "tables.read", + "collections.read" + ], "platforms": [ "server" ], @@ -35378,7 +35459,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -35454,7 +35538,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -35556,7 +35643,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.read", + "scope": [ + "tables.read", + "collections.read" + ], "platforms": [ "server" ], @@ -35635,7 +35725,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -35762,7 +35855,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.read", + "scope": [ + "tables.read", + "collections.read" + ], "platforms": [ "server" ], @@ -35831,7 +35927,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -35905,7 +36004,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.read", + "scope": [ + "tables.read", + "collections.read" + ], "platforms": [ "console" ], @@ -35983,7 +36085,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "rows.read", + "scope": [ + "rows.read", + "documents.read" + ], "platforms": [ "client", "server" @@ -36064,7 +36169,10 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", + "scope": [ + "rows.write", + "documents.write" + ], "platforms": [ "client", "server" @@ -36229,7 +36337,10 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", + "scope": [ + "rows.write", + "documents.write" + ], "platforms": [ "console", "server" @@ -36346,7 +36457,10 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", + "scope": [ + "rows.write", + "documents.write" + ], "platforms": [ "console", "server" @@ -36438,7 +36552,10 @@ "rate-limit": 60, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", + "scope": [ + "rows.write", + "documents.write" + ], "platforms": [ "console", "server" @@ -36524,7 +36641,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "rows.read", + "scope": [ + "rows.read", + "documents.read" + ], "platforms": [ "client", "server" @@ -36613,7 +36733,10 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", + "scope": [ + "rows.write", + "documents.write" + ], "platforms": [ "client", "server" @@ -36744,7 +36867,10 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", + "scope": [ + "rows.write", + "documents.write" + ], "platforms": [ "client", "server" @@ -36840,7 +36966,10 @@ "rate-limit": 60, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", + "scope": [ + "rows.write", + "documents.write" + ], "platforms": [ "client", "server" @@ -36917,7 +37046,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "rows.read", + "scope": [ + "rows.read", + "documents.read" + ], "platforms": [ "console" ], @@ -37005,7 +37137,10 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", + "scope": [ + "rows.write", + "documents.write" + ], "platforms": [ "client", "server", @@ -37113,7 +37248,10 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", + "scope": [ + "rows.write", + "documents.write" + ], "platforms": [ "client", "server", @@ -37219,7 +37357,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.read", + "scope": [ + "tables.read", + "collections.read" + ], "platforms": [ "console" ], @@ -37305,7 +37446,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.read", + "scope": [ + "tables.read", + "collections.read" + ], "platforms": [ "console" ], diff --git a/app/config/specs/swagger2-latest-server.json b/app/config/specs/swagger2-latest-server.json index c3be4b8853..2c358475f8 100644 --- a/app/config/specs/swagger2-latest-server.json +++ b/app/config/specs/swagger2-latest-server.json @@ -23098,7 +23098,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.read", + "scope": [ + "tables.read", + "collections.read" + ], "platforms": [ "server" ], @@ -23179,7 +23182,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -23285,7 +23291,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.read", + "scope": [ + "tables.read", + "collections.read" + ], "platforms": [ "server" ], @@ -23353,7 +23362,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -23455,7 +23467,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -23523,7 +23538,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.read", + "scope": [ + "tables.read", + "collections.read" + ], "platforms": [ "server" ], @@ -23605,7 +23623,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -23712,7 +23733,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -23821,7 +23845,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -23928,7 +23955,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -24037,7 +24067,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -24144,7 +24177,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -24253,7 +24289,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -24370,7 +24409,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -24489,7 +24531,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -24608,7 +24653,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -24729,7 +24777,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -24848,7 +24899,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -24969,7 +25023,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -25076,7 +25133,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -25185,7 +25245,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -25319,7 +25382,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -25439,7 +25505,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -25554,7 +25623,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -25661,7 +25733,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -25799,7 +25874,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.read", + "scope": [ + "tables.read", + "collections.read" + ], "platforms": [ "server" ], @@ -25869,7 +25947,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -25946,7 +26027,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -26049,7 +26133,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.read", + "scope": [ + "tables.read", + "collections.read" + ], "platforms": [ "server" ], @@ -26129,7 +26216,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -26257,7 +26347,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.read", + "scope": [ + "tables.read", + "collections.read" + ], "platforms": [ "server" ], @@ -26327,7 +26420,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "tables.write", + "scope": [ + "tables.write", + "collections.write" + ], "platforms": [ "server" ], @@ -26402,7 +26498,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "rows.read", + "scope": [ + "rows.read", + "documents.read" + ], "platforms": [ "client", "server" @@ -26485,7 +26584,10 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", + "scope": [ + "rows.write", + "documents.write" + ], "platforms": [ "client", "server" @@ -26654,7 +26756,10 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", + "scope": [ + "rows.write", + "documents.write" + ], "platforms": [ "console", "server" @@ -26773,7 +26878,10 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", + "scope": [ + "rows.write", + "documents.write" + ], "platforms": [ "console", "server" @@ -26866,7 +26974,10 @@ "rate-limit": 60, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", + "scope": [ + "rows.write", + "documents.write" + ], "platforms": [ "console", "server" @@ -26953,7 +27064,10 @@ "rate-limit": 0, "rate-time": 3600, "rate-key": "url:{url},ip:{ip}", - "scope": "rows.read", + "scope": [ + "rows.read", + "documents.read" + ], "platforms": [ "client", "server" @@ -27044,7 +27158,10 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", + "scope": [ + "rows.write", + "documents.write" + ], "platforms": [ "client", "server" @@ -27178,7 +27295,10 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", + "scope": [ + "rows.write", + "documents.write" + ], "platforms": [ "client", "server" @@ -27276,7 +27396,10 @@ "rate-limit": 60, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", + "scope": [ + "rows.write", + "documents.write" + ], "platforms": [ "client", "server" @@ -27357,7 +27480,10 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", + "scope": [ + "rows.write", + "documents.write" + ], "platforms": [ "client", "server", @@ -27467,7 +27593,10 @@ "rate-limit": 120, "rate-time": 60, "rate-key": "ip:{ip},method:{method},url:{url},userId:{userId}", - "scope": "rows.write", + "scope": [ + "rows.write", + "documents.write" + ], "platforms": [ "client", "server", diff --git a/composer.lock b/composer.lock index c97a2896f5..077f5204d1 100644 --- a/composer.lock +++ b/composer.lock @@ -3557,16 +3557,16 @@ }, { "name": "utopia-php/database", - "version": "1.2.0", + "version": "1.2.1", "source": { "type": "git", "url": "https://github.com/utopia-php/database.git", - "reference": "653e19d26c5607b9dce917c50737824772cd3dd8" + "reference": "99beaf1dd6dc3561c8332f9893325777553644a4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/database/zipball/653e19d26c5607b9dce917c50737824772cd3dd8", - "reference": "653e19d26c5607b9dce917c50737824772cd3dd8", + "url": "https://api.github.com/repos/utopia-php/database/zipball/99beaf1dd6dc3561c8332f9893325777553644a4", + "reference": "99beaf1dd6dc3561c8332f9893325777553644a4", "shasum": "" }, "require": { @@ -3607,9 +3607,9 @@ ], "support": { "issues": "https://github.com/utopia-php/database/issues", - "source": "https://github.com/utopia-php/database/tree/1.2.0" + "source": "https://github.com/utopia-php/database/tree/1.2.1" }, - "time": "2025-08-26T12:51:42+00:00" + "time": "2025-08-26T16:05:26+00:00" }, { "name": "utopia-php/detector", @@ -4926,16 +4926,16 @@ "packages-dev": [ { "name": "appwrite/sdk-generator", - "version": "1.1.14", + "version": "1.1.15", "source": { "type": "git", "url": "https://github.com/appwrite/sdk-generator.git", - "reference": "662c7a53e683ed941c7d1374cfd32533bf54fbca" + "reference": "8e8e39634ba7558704522959d88f3542563a5444" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/662c7a53e683ed941c7d1374cfd32533bf54fbca", - "reference": "662c7a53e683ed941c7d1374cfd32533bf54fbca", + "url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/8e8e39634ba7558704522959d88f3542563a5444", + "reference": "8e8e39634ba7558704522959d88f3542563a5444", "shasum": "" }, "require": { @@ -4971,9 +4971,9 @@ "description": "Appwrite PHP library for generating API SDKs for multiple programming languages and platforms", "support": { "issues": "https://github.com/appwrite/sdk-generator/issues", - "source": "https://github.com/appwrite/sdk-generator/tree/1.1.14" + "source": "https://github.com/appwrite/sdk-generator/tree/1.1.15" }, - "time": "2025-08-26T13:17:07+00:00" + "time": "2025-08-27T04:59:35+00:00" }, { "name": "doctrine/annotations", @@ -8451,5 +8451,5 @@ "platform-overrides": { "php": "8.3" }, - "plugin-api-version": "2.3.0" + "plugin-api-version": "2.6.0" }