Merge branch '1.8.x' into chore-php-types

This commit is contained in:
Matej Bačo 2025-12-27 19:18:45 +01:00
commit 44d8c66e95
31 changed files with 2703 additions and 2411 deletions

View file

@ -407,8 +407,8 @@
"cookies": false,
"type": "",
"demo": "account\/create-jwt.md",
"rate-limit": 100,
"rate-time": 3600,
"rate-limit": 120,
"rate-time": 60,
"rate-key": "url:{url},userId:{userId}",
"scope": "account",
"platforms": [
@ -429,7 +429,23 @@
"Session": [],
"JWT": []
}
]
],
"requestBody": {
"content": {
"application\/json": {
"schema": {
"type": "object",
"properties": {
"duration": {
"type": "integer",
"description": "Time in seconds before JWT expires. Default duration is 900 seconds, and maximum is 3600 seconds.",
"x-example": 0
}
}
}
}
}
}
}
},
"\/account\/logs": {
@ -535,7 +551,7 @@
"x-appwrite": {
"method": "updateMFA",
"group": "mfa",
"weight": 306,
"weight": 307,
"cookies": false,
"type": "",
"demo": "account\/update-mfa.md",
@ -607,7 +623,7 @@
"x-appwrite": {
"method": "createMfaAuthenticator",
"group": "mfa",
"weight": 308,
"weight": 309,
"cookies": false,
"type": "",
"demo": "account\/create-mfa-authenticator.md",
@ -731,7 +747,7 @@
"x-appwrite": {
"method": "updateMfaAuthenticator",
"group": "mfa",
"weight": 309,
"weight": 310,
"cookies": false,
"type": "",
"demo": "account\/update-mfa-authenticator.md",
@ -871,7 +887,7 @@
"x-appwrite": {
"method": "deleteMfaAuthenticator",
"group": "mfa",
"weight": 310,
"weight": 311,
"cookies": false,
"type": "",
"demo": "account\/delete-mfa-authenticator.md",
@ -995,7 +1011,7 @@
"x-appwrite": {
"method": "createMfaChallenge",
"group": "mfa",
"weight": 314,
"weight": 315,
"cookies": false,
"type": "",
"demo": "account\/create-mfa-challenge.md",
@ -1129,7 +1145,7 @@
"x-appwrite": {
"method": "updateMfaChallenge",
"group": "mfa",
"weight": 315,
"weight": 316,
"cookies": false,
"type": "",
"demo": "account\/update-mfa-challenge.md",
@ -1267,7 +1283,7 @@
"x-appwrite": {
"method": "listMfaFactors",
"group": "mfa",
"weight": 307,
"weight": 308,
"cookies": false,
"type": "",
"demo": "account\/list-mfa-factors.md",
@ -1368,7 +1384,7 @@
"x-appwrite": {
"method": "getMfaRecoveryCodes",
"group": "mfa",
"weight": 313,
"weight": 314,
"cookies": false,
"type": "",
"demo": "account\/get-mfa-recovery-codes.md",
@ -1467,7 +1483,7 @@
"x-appwrite": {
"method": "createMfaRecoveryCodes",
"group": "mfa",
"weight": 311,
"weight": 312,
"cookies": false,
"type": "",
"demo": "account\/create-mfa-recovery-codes.md",
@ -1566,7 +1582,7 @@
"x-appwrite": {
"method": "updateMfaRecoveryCodes",
"group": "mfa",
"weight": 312,
"weight": 313,
"cookies": false,
"type": "",
"demo": "account\/update-mfa-recovery-codes.md",
@ -2558,7 +2574,8 @@
"yandex",
"zoho",
"zoom",
"mock"
"mock",
"mock-unverified"
],
"x-enum-name": "OAuthProvider",
"x-enum-keys": []
@ -3488,7 +3505,8 @@
"yandex",
"zoho",
"zoom",
"mock"
"mock",
"mock-unverified"
],
"x-enum-name": "OAuthProvider",
"x-enum-keys": []
@ -5825,7 +5843,7 @@
"avif",
"gif"
],
"x-enum-name": null,
"x-enum-name": "ImageFormat",
"x-enum-keys": [],
"default": ""
},
@ -5858,7 +5876,7 @@
"x-appwrite": {
"method": "listTransactions",
"group": "transactions",
"weight": 380,
"weight": 381,
"cookies": false,
"type": "",
"demo": "databases\/list-transactions.md",
@ -5925,7 +5943,7 @@
"x-appwrite": {
"method": "createTransaction",
"group": "transactions",
"weight": 376,
"weight": 377,
"cookies": false,
"type": "",
"demo": "databases\/create-transaction.md",
@ -5995,7 +6013,7 @@
"x-appwrite": {
"method": "getTransaction",
"group": "transactions",
"weight": 377,
"weight": 378,
"cookies": false,
"type": "",
"demo": "databases\/get-transaction.md",
@ -6059,7 +6077,7 @@
"x-appwrite": {
"method": "updateTransaction",
"group": "transactions",
"weight": 378,
"weight": 379,
"cookies": false,
"type": "",
"demo": "databases\/update-transaction.md",
@ -6137,7 +6155,7 @@
"x-appwrite": {
"method": "deleteTransaction",
"group": "transactions",
"weight": 379,
"weight": 380,
"cookies": false,
"type": "",
"demo": "databases\/delete-transaction.md",
@ -6203,7 +6221,7 @@
"x-appwrite": {
"method": "createOperations",
"group": "transactions",
"weight": 381,
"weight": 382,
"cookies": false,
"type": "",
"demo": "databases\/create-operations.md",
@ -6288,7 +6306,7 @@
"x-appwrite": {
"method": "listDocuments",
"group": "documents",
"weight": 339,
"weight": 340,
"cookies": false,
"type": "",
"demo": "databases\/list-documents.md",
@ -6400,7 +6418,7 @@
"x-appwrite": {
"method": "createDocument",
"group": "documents",
"weight": 331,
"weight": 332,
"cookies": false,
"type": "",
"demo": "databases\/create-document.md",
@ -6561,7 +6579,7 @@
"x-appwrite": {
"method": "getDocument",
"group": "documents",
"weight": 332,
"weight": 333,
"cookies": false,
"type": "",
"demo": "databases\/get-document.md",
@ -6672,7 +6690,7 @@
"x-appwrite": {
"method": "upsertDocument",
"group": "documents",
"weight": 335,
"weight": 336,
"cookies": false,
"type": "",
"demo": "databases\/upsert-document.md",
@ -6827,7 +6845,7 @@
"x-appwrite": {
"method": "updateDocument",
"group": "documents",
"weight": 333,
"weight": 334,
"cookies": false,
"type": "",
"demo": "databases\/update-document.md",
@ -6939,7 +6957,7 @@
"x-appwrite": {
"method": "deleteDocument",
"group": "documents",
"weight": 337,
"weight": 338,
"cookies": false,
"type": "",
"demo": "databases\/delete-document.md",
@ -7046,7 +7064,7 @@
"x-appwrite": {
"method": "decrementDocumentAttribute",
"group": "documents",
"weight": 342,
"weight": 343,
"cookies": false,
"type": "",
"demo": "databases\/decrement-document-attribute.md",
@ -7173,7 +7191,7 @@
"x-appwrite": {
"method": "incrementDocumentAttribute",
"group": "documents",
"weight": 341,
"weight": 342,
"cookies": false,
"type": "",
"demo": "databases\/increment-document-attribute.md",
@ -7300,7 +7318,7 @@
"x-appwrite": {
"method": "listExecutions",
"group": "executions",
"weight": 472,
"weight": 473,
"cookies": false,
"type": "",
"demo": "functions\/list-executions.md",
@ -7387,7 +7405,7 @@
"x-appwrite": {
"method": "createExecution",
"group": "executions",
"weight": 470,
"weight": 471,
"cookies": false,
"type": "",
"demo": "functions\/create-execution.md",
@ -7505,7 +7523,7 @@
"x-appwrite": {
"method": "getExecution",
"group": "executions",
"weight": 471,
"weight": 472,
"cookies": false,
"type": "",
"demo": "functions\/get-execution.md",
@ -7580,7 +7598,7 @@
"x-appwrite": {
"method": "query",
"group": "graphql",
"weight": 241,
"weight": 242,
"cookies": false,
"type": "graphql",
"demo": "graphql\/query.md",
@ -7634,7 +7652,7 @@
"x-appwrite": {
"method": "mutation",
"group": "graphql",
"weight": 240,
"weight": 241,
"cookies": false,
"type": "graphql",
"demo": "graphql\/mutation.md",
@ -8120,7 +8138,7 @@
"x-appwrite": {
"method": "createSubscriber",
"group": "subscribers",
"weight": 290,
"weight": 291,
"cookies": false,
"type": "",
"demo": "messaging\/create-subscriber.md",
@ -8204,7 +8222,7 @@
"x-appwrite": {
"method": "deleteSubscriber",
"group": "subscribers",
"weight": 294,
"weight": 295,
"cookies": false,
"type": "",
"demo": "messaging\/delete-subscriber.md",
@ -9113,7 +9131,7 @@
"x-appwrite": {
"method": "listTransactions",
"group": "transactions",
"weight": 445,
"weight": 446,
"cookies": false,
"type": "",
"demo": "tablesdb\/list-transactions.md",
@ -9183,7 +9201,7 @@
"x-appwrite": {
"method": "createTransaction",
"group": "transactions",
"weight": 441,
"weight": 442,
"cookies": false,
"type": "",
"demo": "tablesdb\/create-transaction.md",
@ -9256,7 +9274,7 @@
"x-appwrite": {
"method": "getTransaction",
"group": "transactions",
"weight": 442,
"weight": 443,
"cookies": false,
"type": "",
"demo": "tablesdb\/get-transaction.md",
@ -9323,7 +9341,7 @@
"x-appwrite": {
"method": "updateTransaction",
"group": "transactions",
"weight": 443,
"weight": 444,
"cookies": false,
"type": "",
"demo": "tablesdb\/update-transaction.md",
@ -9404,7 +9422,7 @@
"x-appwrite": {
"method": "deleteTransaction",
"group": "transactions",
"weight": 444,
"weight": 445,
"cookies": false,
"type": "",
"demo": "tablesdb\/delete-transaction.md",
@ -9473,7 +9491,7 @@
"x-appwrite": {
"method": "createOperations",
"group": "transactions",
"weight": 446,
"weight": 447,
"cookies": false,
"type": "",
"demo": "tablesdb\/create-operations.md",
@ -9561,7 +9579,7 @@
"x-appwrite": {
"method": "listRows",
"group": "rows",
"weight": 437,
"weight": 438,
"cookies": false,
"type": "",
"demo": "tablesdb\/list-rows.md",
@ -9672,7 +9690,7 @@
"x-appwrite": {
"method": "createRow",
"group": "rows",
"weight": 429,
"weight": 430,
"cookies": false,
"type": "",
"demo": "tablesdb\/create-row.md",
@ -9828,7 +9846,7 @@
"x-appwrite": {
"method": "getRow",
"group": "rows",
"weight": 430,
"weight": 431,
"cookies": false,
"type": "",
"demo": "tablesdb\/get-row.md",
@ -9938,7 +9956,7 @@
"x-appwrite": {
"method": "upsertRow",
"group": "rows",
"weight": 433,
"weight": 434,
"cookies": false,
"type": "",
"demo": "tablesdb\/upsert-row.md",
@ -10088,7 +10106,7 @@
"x-appwrite": {
"method": "updateRow",
"group": "rows",
"weight": 431,
"weight": 432,
"cookies": false,
"type": "",
"demo": "tablesdb\/update-row.md",
@ -10199,7 +10217,7 @@
"x-appwrite": {
"method": "deleteRow",
"group": "rows",
"weight": 435,
"weight": 436,
"cookies": false,
"type": "",
"demo": "tablesdb\/delete-row.md",
@ -10305,7 +10323,7 @@
"x-appwrite": {
"method": "decrementRowColumn",
"group": "rows",
"weight": 440,
"weight": 441,
"cookies": false,
"type": "",
"demo": "tablesdb\/decrement-row-column.md",
@ -10431,7 +10449,7 @@
"x-appwrite": {
"method": "incrementRowColumn",
"group": "rows",
"weight": 439,
"weight": 440,
"cookies": false,
"type": "",
"demo": "tablesdb\/increment-row-column.md",

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -407,8 +407,8 @@
"cookies": false,
"type": "",
"demo": "account\/create-jwt.md",
"rate-limit": 100,
"rate-time": 3600,
"rate-limit": 120,
"rate-time": 60,
"rate-key": "url:{url},userId:{userId}",
"scope": "account",
"platforms": [
@ -429,7 +429,23 @@
"Session": [],
"JWT": []
}
]
],
"requestBody": {
"content": {
"application\/json": {
"schema": {
"type": "object",
"properties": {
"duration": {
"type": "integer",
"description": "Time in seconds before JWT expires. Default duration is 900 seconds, and maximum is 3600 seconds.",
"x-example": 0
}
}
}
}
}
}
}
},
"\/account\/logs": {
@ -535,7 +551,7 @@
"x-appwrite": {
"method": "updateMFA",
"group": "mfa",
"weight": 306,
"weight": 307,
"cookies": false,
"type": "",
"demo": "account\/update-mfa.md",
@ -607,7 +623,7 @@
"x-appwrite": {
"method": "createMfaAuthenticator",
"group": "mfa",
"weight": 308,
"weight": 309,
"cookies": false,
"type": "",
"demo": "account\/create-mfa-authenticator.md",
@ -731,7 +747,7 @@
"x-appwrite": {
"method": "updateMfaAuthenticator",
"group": "mfa",
"weight": 309,
"weight": 310,
"cookies": false,
"type": "",
"demo": "account\/update-mfa-authenticator.md",
@ -871,7 +887,7 @@
"x-appwrite": {
"method": "deleteMfaAuthenticator",
"group": "mfa",
"weight": 310,
"weight": 311,
"cookies": false,
"type": "",
"demo": "account\/delete-mfa-authenticator.md",
@ -995,7 +1011,7 @@
"x-appwrite": {
"method": "createMfaChallenge",
"group": "mfa",
"weight": 314,
"weight": 315,
"cookies": false,
"type": "",
"demo": "account\/create-mfa-challenge.md",
@ -1129,7 +1145,7 @@
"x-appwrite": {
"method": "updateMfaChallenge",
"group": "mfa",
"weight": 315,
"weight": 316,
"cookies": false,
"type": "",
"demo": "account\/update-mfa-challenge.md",
@ -1267,7 +1283,7 @@
"x-appwrite": {
"method": "listMfaFactors",
"group": "mfa",
"weight": 307,
"weight": 308,
"cookies": false,
"type": "",
"demo": "account\/list-mfa-factors.md",
@ -1368,7 +1384,7 @@
"x-appwrite": {
"method": "getMfaRecoveryCodes",
"group": "mfa",
"weight": 313,
"weight": 314,
"cookies": false,
"type": "",
"demo": "account\/get-mfa-recovery-codes.md",
@ -1467,7 +1483,7 @@
"x-appwrite": {
"method": "createMfaRecoveryCodes",
"group": "mfa",
"weight": 311,
"weight": 312,
"cookies": false,
"type": "",
"demo": "account\/create-mfa-recovery-codes.md",
@ -1566,7 +1582,7 @@
"x-appwrite": {
"method": "updateMfaRecoveryCodes",
"group": "mfa",
"weight": 312,
"weight": 313,
"cookies": false,
"type": "",
"demo": "account\/update-mfa-recovery-codes.md",
@ -2558,7 +2574,8 @@
"yandex",
"zoho",
"zoom",
"mock"
"mock",
"mock-unverified"
],
"x-enum-name": "OAuthProvider",
"x-enum-keys": []
@ -3488,7 +3505,8 @@
"yandex",
"zoho",
"zoom",
"mock"
"mock",
"mock-unverified"
],
"x-enum-name": "OAuthProvider",
"x-enum-keys": []
@ -5825,7 +5843,7 @@
"avif",
"gif"
],
"x-enum-name": null,
"x-enum-name": "ImageFormat",
"x-enum-keys": [],
"default": ""
},
@ -5858,7 +5876,7 @@
"x-appwrite": {
"method": "listTransactions",
"group": "transactions",
"weight": 380,
"weight": 381,
"cookies": false,
"type": "",
"demo": "databases\/list-transactions.md",
@ -5925,7 +5943,7 @@
"x-appwrite": {
"method": "createTransaction",
"group": "transactions",
"weight": 376,
"weight": 377,
"cookies": false,
"type": "",
"demo": "databases\/create-transaction.md",
@ -5995,7 +6013,7 @@
"x-appwrite": {
"method": "getTransaction",
"group": "transactions",
"weight": 377,
"weight": 378,
"cookies": false,
"type": "",
"demo": "databases\/get-transaction.md",
@ -6059,7 +6077,7 @@
"x-appwrite": {
"method": "updateTransaction",
"group": "transactions",
"weight": 378,
"weight": 379,
"cookies": false,
"type": "",
"demo": "databases\/update-transaction.md",
@ -6137,7 +6155,7 @@
"x-appwrite": {
"method": "deleteTransaction",
"group": "transactions",
"weight": 379,
"weight": 380,
"cookies": false,
"type": "",
"demo": "databases\/delete-transaction.md",
@ -6203,7 +6221,7 @@
"x-appwrite": {
"method": "createOperations",
"group": "transactions",
"weight": 381,
"weight": 382,
"cookies": false,
"type": "",
"demo": "databases\/create-operations.md",
@ -6288,7 +6306,7 @@
"x-appwrite": {
"method": "listDocuments",
"group": "documents",
"weight": 339,
"weight": 340,
"cookies": false,
"type": "",
"demo": "databases\/list-documents.md",
@ -6400,7 +6418,7 @@
"x-appwrite": {
"method": "createDocument",
"group": "documents",
"weight": 331,
"weight": 332,
"cookies": false,
"type": "",
"demo": "databases\/create-document.md",
@ -6561,7 +6579,7 @@
"x-appwrite": {
"method": "getDocument",
"group": "documents",
"weight": 332,
"weight": 333,
"cookies": false,
"type": "",
"demo": "databases\/get-document.md",
@ -6672,7 +6690,7 @@
"x-appwrite": {
"method": "upsertDocument",
"group": "documents",
"weight": 335,
"weight": 336,
"cookies": false,
"type": "",
"demo": "databases\/upsert-document.md",
@ -6827,7 +6845,7 @@
"x-appwrite": {
"method": "updateDocument",
"group": "documents",
"weight": 333,
"weight": 334,
"cookies": false,
"type": "",
"demo": "databases\/update-document.md",
@ -6939,7 +6957,7 @@
"x-appwrite": {
"method": "deleteDocument",
"group": "documents",
"weight": 337,
"weight": 338,
"cookies": false,
"type": "",
"demo": "databases\/delete-document.md",
@ -7046,7 +7064,7 @@
"x-appwrite": {
"method": "decrementDocumentAttribute",
"group": "documents",
"weight": 342,
"weight": 343,
"cookies": false,
"type": "",
"demo": "databases\/decrement-document-attribute.md",
@ -7173,7 +7191,7 @@
"x-appwrite": {
"method": "incrementDocumentAttribute",
"group": "documents",
"weight": 341,
"weight": 342,
"cookies": false,
"type": "",
"demo": "databases\/increment-document-attribute.md",
@ -7300,7 +7318,7 @@
"x-appwrite": {
"method": "listExecutions",
"group": "executions",
"weight": 472,
"weight": 473,
"cookies": false,
"type": "",
"demo": "functions\/list-executions.md",
@ -7387,7 +7405,7 @@
"x-appwrite": {
"method": "createExecution",
"group": "executions",
"weight": 470,
"weight": 471,
"cookies": false,
"type": "",
"demo": "functions\/create-execution.md",
@ -7505,7 +7523,7 @@
"x-appwrite": {
"method": "getExecution",
"group": "executions",
"weight": 471,
"weight": 472,
"cookies": false,
"type": "",
"demo": "functions\/get-execution.md",
@ -7580,7 +7598,7 @@
"x-appwrite": {
"method": "query",
"group": "graphql",
"weight": 241,
"weight": 242,
"cookies": false,
"type": "graphql",
"demo": "graphql\/query.md",
@ -7634,7 +7652,7 @@
"x-appwrite": {
"method": "mutation",
"group": "graphql",
"weight": 240,
"weight": 241,
"cookies": false,
"type": "graphql",
"demo": "graphql\/mutation.md",
@ -8120,7 +8138,7 @@
"x-appwrite": {
"method": "createSubscriber",
"group": "subscribers",
"weight": 290,
"weight": 291,
"cookies": false,
"type": "",
"demo": "messaging\/create-subscriber.md",
@ -8204,7 +8222,7 @@
"x-appwrite": {
"method": "deleteSubscriber",
"group": "subscribers",
"weight": 294,
"weight": 295,
"cookies": false,
"type": "",
"demo": "messaging\/delete-subscriber.md",
@ -9113,7 +9131,7 @@
"x-appwrite": {
"method": "listTransactions",
"group": "transactions",
"weight": 445,
"weight": 446,
"cookies": false,
"type": "",
"demo": "tablesdb\/list-transactions.md",
@ -9183,7 +9201,7 @@
"x-appwrite": {
"method": "createTransaction",
"group": "transactions",
"weight": 441,
"weight": 442,
"cookies": false,
"type": "",
"demo": "tablesdb\/create-transaction.md",
@ -9256,7 +9274,7 @@
"x-appwrite": {
"method": "getTransaction",
"group": "transactions",
"weight": 442,
"weight": 443,
"cookies": false,
"type": "",
"demo": "tablesdb\/get-transaction.md",
@ -9323,7 +9341,7 @@
"x-appwrite": {
"method": "updateTransaction",
"group": "transactions",
"weight": 443,
"weight": 444,
"cookies": false,
"type": "",
"demo": "tablesdb\/update-transaction.md",
@ -9404,7 +9422,7 @@
"x-appwrite": {
"method": "deleteTransaction",
"group": "transactions",
"weight": 444,
"weight": 445,
"cookies": false,
"type": "",
"demo": "tablesdb\/delete-transaction.md",
@ -9473,7 +9491,7 @@
"x-appwrite": {
"method": "createOperations",
"group": "transactions",
"weight": 446,
"weight": 447,
"cookies": false,
"type": "",
"demo": "tablesdb\/create-operations.md",
@ -9561,7 +9579,7 @@
"x-appwrite": {
"method": "listRows",
"group": "rows",
"weight": 437,
"weight": 438,
"cookies": false,
"type": "",
"demo": "tablesdb\/list-rows.md",
@ -9672,7 +9690,7 @@
"x-appwrite": {
"method": "createRow",
"group": "rows",
"weight": 429,
"weight": 430,
"cookies": false,
"type": "",
"demo": "tablesdb\/create-row.md",
@ -9828,7 +9846,7 @@
"x-appwrite": {
"method": "getRow",
"group": "rows",
"weight": 430,
"weight": 431,
"cookies": false,
"type": "",
"demo": "tablesdb\/get-row.md",
@ -9938,7 +9956,7 @@
"x-appwrite": {
"method": "upsertRow",
"group": "rows",
"weight": 433,
"weight": 434,
"cookies": false,
"type": "",
"demo": "tablesdb\/upsert-row.md",
@ -10088,7 +10106,7 @@
"x-appwrite": {
"method": "updateRow",
"group": "rows",
"weight": 431,
"weight": 432,
"cookies": false,
"type": "",
"demo": "tablesdb\/update-row.md",
@ -10199,7 +10217,7 @@
"x-appwrite": {
"method": "deleteRow",
"group": "rows",
"weight": 435,
"weight": 436,
"cookies": false,
"type": "",
"demo": "tablesdb\/delete-row.md",
@ -10305,7 +10323,7 @@
"x-appwrite": {
"method": "decrementRowColumn",
"group": "rows",
"weight": 440,
"weight": 441,
"cookies": false,
"type": "",
"demo": "tablesdb\/decrement-row-column.md",
@ -10431,7 +10449,7 @@
"x-appwrite": {
"method": "incrementRowColumn",
"group": "rows",
"weight": 439,
"weight": 440,
"cookies": false,
"type": "",
"demo": "tablesdb\/increment-row-column.md",

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -464,8 +464,8 @@
"cookies": false,
"type": "",
"demo": "account\/create-jwt.md",
"rate-limit": 100,
"rate-time": 3600,
"rate-limit": 120,
"rate-time": 60,
"rate-key": "url:{url},userId:{userId}",
"scope": "account",
"platforms": [
@ -486,6 +486,23 @@
"Session": [],
"JWT": []
}
],
"parameters": [
{
"name": "payload",
"in": "body",
"schema": {
"type": "object",
"properties": {
"duration": {
"type": "integer",
"description": "Time in seconds before JWT expires. Default duration is 900 seconds, and maximum is 3600 seconds.",
"default": 900,
"x-example": 0
}
}
}
}
]
}
},
@ -591,7 +608,7 @@
"x-appwrite": {
"method": "updateMFA",
"group": "mfa",
"weight": 306,
"weight": 307,
"cookies": false,
"type": "",
"demo": "account\/update-mfa.md",
@ -666,7 +683,7 @@
"x-appwrite": {
"method": "createMfaAuthenticator",
"group": "mfa",
"weight": 308,
"weight": 309,
"cookies": false,
"type": "",
"demo": "account\/create-mfa-authenticator.md",
@ -790,7 +807,7 @@
"x-appwrite": {
"method": "updateMfaAuthenticator",
"group": "mfa",
"weight": 309,
"weight": 310,
"cookies": false,
"type": "",
"demo": "account\/update-mfa-authenticator.md",
@ -931,7 +948,7 @@
"x-appwrite": {
"method": "deleteMfaAuthenticator",
"group": "mfa",
"weight": 310,
"weight": 311,
"cookies": false,
"type": "",
"demo": "account\/delete-mfa-authenticator.md",
@ -1055,7 +1072,7 @@
"x-appwrite": {
"method": "createMfaChallenge",
"group": "mfa",
"weight": 314,
"weight": 315,
"cookies": false,
"type": "",
"demo": "account\/create-mfa-challenge.md",
@ -1192,7 +1209,7 @@
"x-appwrite": {
"method": "updateMfaChallenge",
"group": "mfa",
"weight": 315,
"weight": 316,
"cookies": false,
"type": "",
"demo": "account\/update-mfa-challenge.md",
@ -1332,7 +1349,7 @@
"x-appwrite": {
"method": "listMfaFactors",
"group": "mfa",
"weight": 307,
"weight": 308,
"cookies": false,
"type": "",
"demo": "account\/list-mfa-factors.md",
@ -1433,7 +1450,7 @@
"x-appwrite": {
"method": "getMfaRecoveryCodes",
"group": "mfa",
"weight": 313,
"weight": 314,
"cookies": false,
"type": "",
"demo": "account\/get-mfa-recovery-codes.md",
@ -1534,7 +1551,7 @@
"x-appwrite": {
"method": "createMfaRecoveryCodes",
"group": "mfa",
"weight": 311,
"weight": 312,
"cookies": false,
"type": "",
"demo": "account\/create-mfa-recovery-codes.md",
@ -1635,7 +1652,7 @@
"x-appwrite": {
"method": "updateMfaRecoveryCodes",
"group": "mfa",
"weight": 312,
"weight": 313,
"cookies": false,
"type": "",
"demo": "account\/update-mfa-recovery-codes.md",
@ -2667,7 +2684,8 @@
"yandex",
"zoho",
"zoom",
"mock"
"mock",
"mock-unverified"
],
"x-enum-name": "OAuthProvider",
"x-enum-keys": [],
@ -3621,7 +3639,8 @@
"yandex",
"zoho",
"zoom",
"mock"
"mock",
"mock-unverified"
],
"x-enum-name": "OAuthProvider",
"x-enum-keys": [],
@ -5931,7 +5950,7 @@
"avif",
"gif"
],
"x-enum-name": null,
"x-enum-name": "ImageFormat",
"x-enum-keys": [],
"default": "",
"in": "query"
@ -5963,7 +5982,7 @@
"x-appwrite": {
"method": "listTransactions",
"group": "transactions",
"weight": 380,
"weight": 381,
"cookies": false,
"type": "",
"demo": "databases\/list-transactions.md",
@ -6030,7 +6049,7 @@
"x-appwrite": {
"method": "createTransaction",
"group": "transactions",
"weight": 376,
"weight": 377,
"cookies": false,
"type": "",
"demo": "databases\/create-transaction.md",
@ -6100,7 +6119,7 @@
"x-appwrite": {
"method": "getTransaction",
"group": "transactions",
"weight": 377,
"weight": 378,
"cookies": false,
"type": "",
"demo": "databases\/get-transaction.md",
@ -6163,7 +6182,7 @@
"x-appwrite": {
"method": "updateTransaction",
"group": "transactions",
"weight": 378,
"weight": 379,
"cookies": false,
"type": "",
"demo": "databases\/update-transaction.md",
@ -6242,7 +6261,7 @@
"x-appwrite": {
"method": "deleteTransaction",
"group": "transactions",
"weight": 379,
"weight": 380,
"cookies": false,
"type": "",
"demo": "databases\/delete-transaction.md",
@ -6307,7 +6326,7 @@
"x-appwrite": {
"method": "createOperations",
"group": "transactions",
"weight": 381,
"weight": 382,
"cookies": false,
"type": "",
"demo": "databases\/create-operations.md",
@ -6388,7 +6407,7 @@
"x-appwrite": {
"method": "listDocuments",
"group": "documents",
"weight": 339,
"weight": 340,
"cookies": false,
"type": "",
"demo": "databases\/list-documents.md",
@ -6492,7 +6511,7 @@
"x-appwrite": {
"method": "createDocument",
"group": "documents",
"weight": 331,
"weight": 332,
"cookies": false,
"type": "",
"demo": "databases\/create-document.md",
@ -6651,7 +6670,7 @@
"x-appwrite": {
"method": "getDocument",
"group": "documents",
"weight": 332,
"weight": 333,
"cookies": false,
"type": "",
"demo": "databases\/get-document.md",
@ -6754,7 +6773,7 @@
"x-appwrite": {
"method": "upsertDocument",
"group": "documents",
"weight": 335,
"weight": 336,
"cookies": false,
"type": "",
"demo": "databases\/upsert-document.md",
@ -6905,7 +6924,7 @@
"x-appwrite": {
"method": "updateDocument",
"group": "documents",
"weight": 333,
"weight": 334,
"cookies": false,
"type": "",
"demo": "databases\/update-document.md",
@ -7015,7 +7034,7 @@
"x-appwrite": {
"method": "deleteDocument",
"group": "documents",
"weight": 337,
"weight": 338,
"cookies": false,
"type": "",
"demo": "databases\/delete-document.md",
@ -7116,7 +7135,7 @@
"x-appwrite": {
"method": "decrementDocumentAttribute",
"group": "documents",
"weight": 342,
"weight": 343,
"cookies": false,
"type": "",
"demo": "databases\/decrement-document-attribute.md",
@ -7237,7 +7256,7 @@
"x-appwrite": {
"method": "incrementDocumentAttribute",
"group": "documents",
"weight": 341,
"weight": 342,
"cookies": false,
"type": "",
"demo": "databases\/increment-document-attribute.md",
@ -7356,7 +7375,7 @@
"x-appwrite": {
"method": "listExecutions",
"group": "executions",
"weight": 472,
"weight": 473,
"cookies": false,
"type": "",
"demo": "functions\/list-executions.md",
@ -7439,7 +7458,7 @@
"x-appwrite": {
"method": "createExecution",
"group": "executions",
"weight": 470,
"weight": 471,
"cookies": false,
"type": "",
"demo": "functions\/create-execution.md",
@ -7558,7 +7577,7 @@
"x-appwrite": {
"method": "getExecution",
"group": "executions",
"weight": 471,
"weight": 472,
"cookies": false,
"type": "",
"demo": "functions\/get-execution.md",
@ -7630,7 +7649,7 @@
"x-appwrite": {
"method": "query",
"group": "graphql",
"weight": 241,
"weight": 242,
"cookies": false,
"type": "graphql",
"demo": "graphql\/query.md",
@ -7705,7 +7724,7 @@
"x-appwrite": {
"method": "mutation",
"group": "graphql",
"weight": 240,
"weight": 241,
"cookies": false,
"type": "graphql",
"demo": "graphql\/mutation.md",
@ -8204,7 +8223,7 @@
"x-appwrite": {
"method": "createSubscriber",
"group": "subscribers",
"weight": 290,
"weight": 291,
"cookies": false,
"type": "",
"demo": "messaging\/create-subscriber.md",
@ -8289,7 +8308,7 @@
"x-appwrite": {
"method": "deleteSubscriber",
"group": "subscribers",
"weight": 294,
"weight": 295,
"cookies": false,
"type": "",
"demo": "messaging\/delete-subscriber.md",
@ -9146,7 +9165,7 @@
"x-appwrite": {
"method": "listTransactions",
"group": "transactions",
"weight": 445,
"weight": 446,
"cookies": false,
"type": "",
"demo": "tablesdb\/list-transactions.md",
@ -9216,7 +9235,7 @@
"x-appwrite": {
"method": "createTransaction",
"group": "transactions",
"weight": 441,
"weight": 442,
"cookies": false,
"type": "",
"demo": "tablesdb\/create-transaction.md",
@ -9289,7 +9308,7 @@
"x-appwrite": {
"method": "getTransaction",
"group": "transactions",
"weight": 442,
"weight": 443,
"cookies": false,
"type": "",
"demo": "tablesdb\/get-transaction.md",
@ -9355,7 +9374,7 @@
"x-appwrite": {
"method": "updateTransaction",
"group": "transactions",
"weight": 443,
"weight": 444,
"cookies": false,
"type": "",
"demo": "tablesdb\/update-transaction.md",
@ -9437,7 +9456,7 @@
"x-appwrite": {
"method": "deleteTransaction",
"group": "transactions",
"weight": 444,
"weight": 445,
"cookies": false,
"type": "",
"demo": "tablesdb\/delete-transaction.md",
@ -9505,7 +9524,7 @@
"x-appwrite": {
"method": "createOperations",
"group": "transactions",
"weight": 446,
"weight": 447,
"cookies": false,
"type": "",
"demo": "tablesdb\/create-operations.md",
@ -9589,7 +9608,7 @@
"x-appwrite": {
"method": "listRows",
"group": "rows",
"weight": 437,
"weight": 438,
"cookies": false,
"type": "",
"demo": "tablesdb\/list-rows.md",
@ -9692,7 +9711,7 @@
"x-appwrite": {
"method": "createRow",
"group": "rows",
"weight": 429,
"weight": 430,
"cookies": false,
"type": "",
"demo": "tablesdb\/create-row.md",
@ -9846,7 +9865,7 @@
"x-appwrite": {
"method": "getRow",
"group": "rows",
"weight": 430,
"weight": 431,
"cookies": false,
"type": "",
"demo": "tablesdb\/get-row.md",
@ -9948,7 +9967,7 @@
"x-appwrite": {
"method": "upsertRow",
"group": "rows",
"weight": 433,
"weight": 434,
"cookies": false,
"type": "",
"demo": "tablesdb\/upsert-row.md",
@ -10094,7 +10113,7 @@
"x-appwrite": {
"method": "updateRow",
"group": "rows",
"weight": 431,
"weight": 432,
"cookies": false,
"type": "",
"demo": "tablesdb\/update-row.md",
@ -10203,7 +10222,7 @@
"x-appwrite": {
"method": "deleteRow",
"group": "rows",
"weight": 435,
"weight": 436,
"cookies": false,
"type": "",
"demo": "tablesdb\/delete-row.md",
@ -10303,7 +10322,7 @@
"x-appwrite": {
"method": "decrementRowColumn",
"group": "rows",
"weight": 440,
"weight": 441,
"cookies": false,
"type": "",
"demo": "tablesdb\/decrement-row-column.md",
@ -10423,7 +10442,7 @@
"x-appwrite": {
"method": "incrementRowColumn",
"group": "rows",
"weight": 439,
"weight": 440,
"cookies": false,
"type": "",
"demo": "tablesdb\/increment-row-column.md",

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -464,8 +464,8 @@
"cookies": false,
"type": "",
"demo": "account\/create-jwt.md",
"rate-limit": 100,
"rate-time": 3600,
"rate-limit": 120,
"rate-time": 60,
"rate-key": "url:{url},userId:{userId}",
"scope": "account",
"platforms": [
@ -486,6 +486,23 @@
"Session": [],
"JWT": []
}
],
"parameters": [
{
"name": "payload",
"in": "body",
"schema": {
"type": "object",
"properties": {
"duration": {
"type": "integer",
"description": "Time in seconds before JWT expires. Default duration is 900 seconds, and maximum is 3600 seconds.",
"default": 900,
"x-example": 0
}
}
}
}
]
}
},
@ -591,7 +608,7 @@
"x-appwrite": {
"method": "updateMFA",
"group": "mfa",
"weight": 306,
"weight": 307,
"cookies": false,
"type": "",
"demo": "account\/update-mfa.md",
@ -666,7 +683,7 @@
"x-appwrite": {
"method": "createMfaAuthenticator",
"group": "mfa",
"weight": 308,
"weight": 309,
"cookies": false,
"type": "",
"demo": "account\/create-mfa-authenticator.md",
@ -790,7 +807,7 @@
"x-appwrite": {
"method": "updateMfaAuthenticator",
"group": "mfa",
"weight": 309,
"weight": 310,
"cookies": false,
"type": "",
"demo": "account\/update-mfa-authenticator.md",
@ -931,7 +948,7 @@
"x-appwrite": {
"method": "deleteMfaAuthenticator",
"group": "mfa",
"weight": 310,
"weight": 311,
"cookies": false,
"type": "",
"demo": "account\/delete-mfa-authenticator.md",
@ -1055,7 +1072,7 @@
"x-appwrite": {
"method": "createMfaChallenge",
"group": "mfa",
"weight": 314,
"weight": 315,
"cookies": false,
"type": "",
"demo": "account\/create-mfa-challenge.md",
@ -1192,7 +1209,7 @@
"x-appwrite": {
"method": "updateMfaChallenge",
"group": "mfa",
"weight": 315,
"weight": 316,
"cookies": false,
"type": "",
"demo": "account\/update-mfa-challenge.md",
@ -1332,7 +1349,7 @@
"x-appwrite": {
"method": "listMfaFactors",
"group": "mfa",
"weight": 307,
"weight": 308,
"cookies": false,
"type": "",
"demo": "account\/list-mfa-factors.md",
@ -1433,7 +1450,7 @@
"x-appwrite": {
"method": "getMfaRecoveryCodes",
"group": "mfa",
"weight": 313,
"weight": 314,
"cookies": false,
"type": "",
"demo": "account\/get-mfa-recovery-codes.md",
@ -1534,7 +1551,7 @@
"x-appwrite": {
"method": "createMfaRecoveryCodes",
"group": "mfa",
"weight": 311,
"weight": 312,
"cookies": false,
"type": "",
"demo": "account\/create-mfa-recovery-codes.md",
@ -1635,7 +1652,7 @@
"x-appwrite": {
"method": "updateMfaRecoveryCodes",
"group": "mfa",
"weight": 312,
"weight": 313,
"cookies": false,
"type": "",
"demo": "account\/update-mfa-recovery-codes.md",
@ -2667,7 +2684,8 @@
"yandex",
"zoho",
"zoom",
"mock"
"mock",
"mock-unverified"
],
"x-enum-name": "OAuthProvider",
"x-enum-keys": [],
@ -3621,7 +3639,8 @@
"yandex",
"zoho",
"zoom",
"mock"
"mock",
"mock-unverified"
],
"x-enum-name": "OAuthProvider",
"x-enum-keys": [],
@ -5931,7 +5950,7 @@
"avif",
"gif"
],
"x-enum-name": null,
"x-enum-name": "ImageFormat",
"x-enum-keys": [],
"default": "",
"in": "query"
@ -5963,7 +5982,7 @@
"x-appwrite": {
"method": "listTransactions",
"group": "transactions",
"weight": 380,
"weight": 381,
"cookies": false,
"type": "",
"demo": "databases\/list-transactions.md",
@ -6030,7 +6049,7 @@
"x-appwrite": {
"method": "createTransaction",
"group": "transactions",
"weight": 376,
"weight": 377,
"cookies": false,
"type": "",
"demo": "databases\/create-transaction.md",
@ -6100,7 +6119,7 @@
"x-appwrite": {
"method": "getTransaction",
"group": "transactions",
"weight": 377,
"weight": 378,
"cookies": false,
"type": "",
"demo": "databases\/get-transaction.md",
@ -6163,7 +6182,7 @@
"x-appwrite": {
"method": "updateTransaction",
"group": "transactions",
"weight": 378,
"weight": 379,
"cookies": false,
"type": "",
"demo": "databases\/update-transaction.md",
@ -6242,7 +6261,7 @@
"x-appwrite": {
"method": "deleteTransaction",
"group": "transactions",
"weight": 379,
"weight": 380,
"cookies": false,
"type": "",
"demo": "databases\/delete-transaction.md",
@ -6307,7 +6326,7 @@
"x-appwrite": {
"method": "createOperations",
"group": "transactions",
"weight": 381,
"weight": 382,
"cookies": false,
"type": "",
"demo": "databases\/create-operations.md",
@ -6388,7 +6407,7 @@
"x-appwrite": {
"method": "listDocuments",
"group": "documents",
"weight": 339,
"weight": 340,
"cookies": false,
"type": "",
"demo": "databases\/list-documents.md",
@ -6492,7 +6511,7 @@
"x-appwrite": {
"method": "createDocument",
"group": "documents",
"weight": 331,
"weight": 332,
"cookies": false,
"type": "",
"demo": "databases\/create-document.md",
@ -6651,7 +6670,7 @@
"x-appwrite": {
"method": "getDocument",
"group": "documents",
"weight": 332,
"weight": 333,
"cookies": false,
"type": "",
"demo": "databases\/get-document.md",
@ -6754,7 +6773,7 @@
"x-appwrite": {
"method": "upsertDocument",
"group": "documents",
"weight": 335,
"weight": 336,
"cookies": false,
"type": "",
"demo": "databases\/upsert-document.md",
@ -6905,7 +6924,7 @@
"x-appwrite": {
"method": "updateDocument",
"group": "documents",
"weight": 333,
"weight": 334,
"cookies": false,
"type": "",
"demo": "databases\/update-document.md",
@ -7015,7 +7034,7 @@
"x-appwrite": {
"method": "deleteDocument",
"group": "documents",
"weight": 337,
"weight": 338,
"cookies": false,
"type": "",
"demo": "databases\/delete-document.md",
@ -7116,7 +7135,7 @@
"x-appwrite": {
"method": "decrementDocumentAttribute",
"group": "documents",
"weight": 342,
"weight": 343,
"cookies": false,
"type": "",
"demo": "databases\/decrement-document-attribute.md",
@ -7237,7 +7256,7 @@
"x-appwrite": {
"method": "incrementDocumentAttribute",
"group": "documents",
"weight": 341,
"weight": 342,
"cookies": false,
"type": "",
"demo": "databases\/increment-document-attribute.md",
@ -7356,7 +7375,7 @@
"x-appwrite": {
"method": "listExecutions",
"group": "executions",
"weight": 472,
"weight": 473,
"cookies": false,
"type": "",
"demo": "functions\/list-executions.md",
@ -7439,7 +7458,7 @@
"x-appwrite": {
"method": "createExecution",
"group": "executions",
"weight": 470,
"weight": 471,
"cookies": false,
"type": "",
"demo": "functions\/create-execution.md",
@ -7558,7 +7577,7 @@
"x-appwrite": {
"method": "getExecution",
"group": "executions",
"weight": 471,
"weight": 472,
"cookies": false,
"type": "",
"demo": "functions\/get-execution.md",
@ -7630,7 +7649,7 @@
"x-appwrite": {
"method": "query",
"group": "graphql",
"weight": 241,
"weight": 242,
"cookies": false,
"type": "graphql",
"demo": "graphql\/query.md",
@ -7705,7 +7724,7 @@
"x-appwrite": {
"method": "mutation",
"group": "graphql",
"weight": 240,
"weight": 241,
"cookies": false,
"type": "graphql",
"demo": "graphql\/mutation.md",
@ -8204,7 +8223,7 @@
"x-appwrite": {
"method": "createSubscriber",
"group": "subscribers",
"weight": 290,
"weight": 291,
"cookies": false,
"type": "",
"demo": "messaging\/create-subscriber.md",
@ -8289,7 +8308,7 @@
"x-appwrite": {
"method": "deleteSubscriber",
"group": "subscribers",
"weight": 294,
"weight": 295,
"cookies": false,
"type": "",
"demo": "messaging\/delete-subscriber.md",
@ -9146,7 +9165,7 @@
"x-appwrite": {
"method": "listTransactions",
"group": "transactions",
"weight": 445,
"weight": 446,
"cookies": false,
"type": "",
"demo": "tablesdb\/list-transactions.md",
@ -9216,7 +9235,7 @@
"x-appwrite": {
"method": "createTransaction",
"group": "transactions",
"weight": 441,
"weight": 442,
"cookies": false,
"type": "",
"demo": "tablesdb\/create-transaction.md",
@ -9289,7 +9308,7 @@
"x-appwrite": {
"method": "getTransaction",
"group": "transactions",
"weight": 442,
"weight": 443,
"cookies": false,
"type": "",
"demo": "tablesdb\/get-transaction.md",
@ -9355,7 +9374,7 @@
"x-appwrite": {
"method": "updateTransaction",
"group": "transactions",
"weight": 443,
"weight": 444,
"cookies": false,
"type": "",
"demo": "tablesdb\/update-transaction.md",
@ -9437,7 +9456,7 @@
"x-appwrite": {
"method": "deleteTransaction",
"group": "transactions",
"weight": 444,
"weight": 445,
"cookies": false,
"type": "",
"demo": "tablesdb\/delete-transaction.md",
@ -9505,7 +9524,7 @@
"x-appwrite": {
"method": "createOperations",
"group": "transactions",
"weight": 446,
"weight": 447,
"cookies": false,
"type": "",
"demo": "tablesdb\/create-operations.md",
@ -9589,7 +9608,7 @@
"x-appwrite": {
"method": "listRows",
"group": "rows",
"weight": 437,
"weight": 438,
"cookies": false,
"type": "",
"demo": "tablesdb\/list-rows.md",
@ -9692,7 +9711,7 @@
"x-appwrite": {
"method": "createRow",
"group": "rows",
"weight": 429,
"weight": 430,
"cookies": false,
"type": "",
"demo": "tablesdb\/create-row.md",
@ -9846,7 +9865,7 @@
"x-appwrite": {
"method": "getRow",
"group": "rows",
"weight": 430,
"weight": 431,
"cookies": false,
"type": "",
"demo": "tablesdb\/get-row.md",
@ -9948,7 +9967,7 @@
"x-appwrite": {
"method": "upsertRow",
"group": "rows",
"weight": 433,
"weight": 434,
"cookies": false,
"type": "",
"demo": "tablesdb\/upsert-row.md",
@ -10094,7 +10113,7 @@
"x-appwrite": {
"method": "updateRow",
"group": "rows",
"weight": 431,
"weight": 432,
"cookies": false,
"type": "",
"demo": "tablesdb\/update-row.md",
@ -10203,7 +10222,7 @@
"x-appwrite": {
"method": "deleteRow",
"group": "rows",
"weight": 435,
"weight": 436,
"cookies": false,
"type": "",
"demo": "tablesdb\/delete-row.md",
@ -10303,7 +10322,7 @@
"x-appwrite": {
"method": "decrementRowColumn",
"group": "rows",
"weight": 440,
"weight": 441,
"cookies": false,
"type": "",
"demo": "tablesdb\/decrement-row-column.md",
@ -10423,7 +10442,7 @@
"x-appwrite": {
"method": "incrementRowColumn",
"group": "rows",
"weight": 439,
"weight": 440,
"cookies": false,
"type": "",
"demo": "tablesdb\/increment-row-column.md",

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -68,6 +68,7 @@ use Utopia\Validator;
use Utopia\Validator\ArrayList;
use Utopia\Validator\Assoc;
use Utopia\Validator\Boolean;
use Utopia\Validator\Range;
use Utopia\Validator\Text;
use Utopia\Validator\WhiteList;
@ -2953,20 +2954,22 @@ App::post('/v1/account/jwts')
],
contentType: ContentType::JSON,
))
->label('abuse-limit', 100)
->param('duration', 900, new Range(0, 3600), 'Time in seconds before JWT expires. Default duration is 900 seconds, and maximum is 3600 seconds.', true)
->label('abuse-limit', APP_LIMIT_WRITE_RATE_DEFAULT * 2)
->label('abuse-time', APP_LIMIT_WRITE_RATE_PERIOD_DEFAULT)
->label('abuse-key', 'url:{url},userId:{userId}')
->inject('response')
->inject('user')
->inject('store')
->inject('proofForToken')
->action(function (Response $response, User $user, Store $store, ProofsToken $proofForToken) {
->action(function (int $duration, Response $response, User $user, Store $store, ProofsToken $proofForToken) {
$sessionId = $user->sessionVerify($store->getProperty('secret', ''), $proofForToken);
if (!$sessionId) {
throw new Exception(Exception::USER_SESSION_NOT_FOUND);
}
$jwt = new JWT(System::getEnv('_APP_OPENSSL_KEY_V1'), 'HS256', 900, 0);
$jwt = new JWT(System::getEnv('_APP_OPENSSL_KEY_V1'), 'HS256', $duration, 0);
$response
->setStatusCode(Response::STATUS_CODE_CREATED)

View file

@ -945,18 +945,18 @@ App::get('/v1/health/queue/failed/:name')
contentType: ContentType::JSON
))
->param('name', '', new WhiteList([
Event::DATABASE_QUEUE_NAME,
Event::DELETE_QUEUE_NAME,
Event::AUDITS_QUEUE_NAME,
Event::MAILS_QUEUE_NAME,
Event::FUNCTIONS_QUEUE_NAME,
Event::STATS_RESOURCES_QUEUE_NAME,
Event::STATS_USAGE_QUEUE_NAME,
Event::WEBHOOK_QUEUE_NAME,
Event::CERTIFICATES_QUEUE_NAME,
Event::BUILDS_QUEUE_NAME,
Event::MESSAGING_QUEUE_NAME,
Event::MIGRATIONS_QUEUE_NAME
System::getEnv('_APP_DATABASE_QUEUE_NAME', Event::DATABASE_QUEUE_NAME),
System::getEnv('_APP_DELETE_QUEUE_NAME', Event::DELETE_QUEUE_NAME),
System::getEnv('_APP_AUDITS_QUEUE_NAME', Event::AUDITS_QUEUE_NAME),
System::getEnv('_APP_MAILS_QUEUE_NAME', Event::MAILS_QUEUE_NAME),
System::getEnv('_APP_FUNCTIONS_QUEUE_NAME', Event::FUNCTIONS_QUEUE_NAME),
System::getEnv('_APP_STATS_RESOURCES_QUEUE_NAME', Event::STATS_RESOURCES_QUEUE_NAME),
System::getEnv('_APP_STATS_USAGE_QUEUE_NAME', Event::STATS_USAGE_QUEUE_NAME),
System::getEnv('_APP_WEBHOOK_QUEUE_NAME', Event::WEBHOOK_QUEUE_NAME),
System::getEnv('_APP_CERTIFICATES_QUEUE_NAME', Event::CERTIFICATES_QUEUE_NAME),
System::getEnv('_APP_BUILDS_QUEUE_NAME', Event::BUILDS_QUEUE_NAME),
System::getEnv('_APP_MESSAGING_QUEUE_NAME', Event::MESSAGING_QUEUE_NAME),
System::getEnv('_APP_MIGRATIONS_QUEUE_NAME', Event::MIGRATIONS_QUEUE_NAME)
]), 'The name of the queue')
->param('threshold', 5000, new Integer(true), 'Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.', true)
->inject('response')
@ -993,18 +993,18 @@ App::get('/v1/health/queue/failed/:name')
/** @var Event $queue */
$queue = match ($name) {
Event::DATABASE_QUEUE_NAME => $queueForDatabase,
Event::DELETE_QUEUE_NAME => $queueForDeletes,
Event::AUDITS_QUEUE_NAME => $queueForAudits,
Event::MAILS_QUEUE_NAME => $queueForMails,
Event::FUNCTIONS_QUEUE_NAME => $queueForFunctions,
Event::STATS_RESOURCES_QUEUE_NAME => $queueForStatsResources,
Event::STATS_USAGE_QUEUE_NAME => $queueForStatsUsage,
Event::WEBHOOK_QUEUE_NAME => $queueForWebhooks,
Event::CERTIFICATES_QUEUE_NAME => $queueForCertificates,
Event::BUILDS_QUEUE_NAME => $queueForBuilds,
Event::MESSAGING_QUEUE_NAME => $queueForMessaging,
Event::MIGRATIONS_QUEUE_NAME => $queueForMigrations,
System::getEnv('_APP_DATABASE_QUEUE_NAME', Event::DATABASE_QUEUE_NAME) => $queueForDatabase,
System::getEnv('_APP_DELETE_QUEUE_NAME', Event::DELETE_QUEUE_NAME) => $queueForDeletes,
System::getEnv('_APP_AUDITS_QUEUE_NAME', Event::AUDITS_QUEUE_NAME) => $queueForAudits,
System::getEnv('_APP_MAILS_QUEUE_NAME', Event::MAILS_QUEUE_NAME) => $queueForMails,
System::getEnv('_APP_FUNCTIONS_QUEUE_NAME', Event::FUNCTIONS_QUEUE_NAME) => $queueForFunctions,
System::getEnv('_APP_STATS_RESOURCES_QUEUE_NAME', Event::STATS_RESOURCES_QUEUE_NAME) => $queueForStatsResources,
System::getEnv('_APP_STATS_USAGE_QUEUE_NAME', Event::STATS_USAGE_QUEUE_NAME) => $queueForStatsUsage,
System::getEnv('_APP_WEBHOOK_QUEUE_NAME', Event::WEBHOOK_QUEUE_NAME) => $queueForWebhooks,
System::getEnv('_APP_CERTIFICATES_QUEUE_NAME', Event::CERTIFICATES_QUEUE_NAME) => $queueForCertificates,
System::getEnv('_APP_BUILDS_QUEUE_NAME', Event::BUILDS_QUEUE_NAME) => $queueForBuilds,
System::getEnv('_APP_MESSAGING_QUEUE_NAME', Event::MESSAGING_QUEUE_NAME) => $queueForMessaging,
System::getEnv('_APP_MIGRATIONS_QUEUE_NAME', Event::MIGRATIONS_QUEUE_NAME) => $queueForMigrations,
};
$failed = $queue->getSize(failed: true);

View file

@ -1048,18 +1048,15 @@ App::init()
if (empty($domain->get()) || !$domain->isKnown() || $domain->isTest()) {
$cache[$domain->get()] = false;
Config::setParam('hostnames', $cache);
Console::warning($domain->get() . ' is not a publicly accessible domain. Skipping SSL certificate generation.');
return;
}
if (str_starts_with($request->getURI(), '/.well-known/acme-challenge')) {
Console::warning('Skipping SSL certificates generation on ACME challenge.');
return;
}
// 3. Check if domain is a main domain
if (!in_array($domain->get(), $platformHostnames)) {
Console::warning($domain->get() . ' is not a main domain. Skipping SSL certificate generation.');
return;
}

View file

@ -3,6 +3,7 @@
namespace Appwrite\Event;
use Utopia\Queue\Publisher;
use Utopia\System\System;
class Audit extends Event
{
@ -19,8 +20,8 @@ class Audit extends Event
parent::__construct($publisher);
$this
->setQueue(Event::AUDITS_QUEUE_NAME)
->setClass(Event::AUDITS_CLASS_NAME);
->setQueue(System::getEnv('_APP_AUDITS_QUEUE_NAME', Event::AUDITS_QUEUE_NAME))
->setClass(System::getEnv('_APP_AUDITS_CLASS_NAME', Event::AUDITS_CLASS_NAME));
}
/**

View file

@ -5,6 +5,7 @@ namespace Appwrite\Event;
use Utopia\Config\Config;
use Utopia\Database\Document;
use Utopia\Queue\Publisher;
use Utopia\System\System;
class Build extends Event
{
@ -18,8 +19,8 @@ class Build extends Event
parent::__construct($publisher);
$this
->setQueue(Event::BUILDS_QUEUE_NAME)
->setClass(Event::BUILDS_CLASS_NAME);
->setQueue(System::getEnv('_APP_BUILDS_QUEUE_NAME', Event::BUILDS_QUEUE_NAME))
->setClass(System::getEnv('_APP_BUILDS_CLASS_NAME', Event::BUILDS_CLASS_NAME));
}
/**

View file

@ -4,6 +4,7 @@ namespace Appwrite\Event;
use Utopia\Database\Document;
use Utopia\Queue\Publisher;
use Utopia\System\System;
class Certificate extends Event
{
@ -16,8 +17,8 @@ class Certificate extends Event
parent::__construct($publisher);
$this
->setQueue(Event::CERTIFICATES_QUEUE_NAME)
->setClass(Event::CERTIFICATES_CLASS_NAME);
->setQueue(System::getEnv('_APP_CERTIFICATES_QUEUE_NAME', Event::CERTIFICATES_QUEUE_NAME))
->setClass(System::getEnv('_APP_CERTIFICATES_CLASS_NAME', Event::CERTIFICATES_CLASS_NAME));
}
/**

View file

@ -5,6 +5,7 @@ namespace Appwrite\Event;
use Utopia\Database\Document;
use Utopia\DSN\DSN;
use Utopia\Queue\Publisher;
use Utopia\System\System;
class Database extends Event
{
@ -24,7 +25,7 @@ class Database extends Event
{
parent::__construct($publisher);
$this->setClass(Event::DATABASE_CLASS_NAME);
$this->setClass(System::getEnv('_APP_DATABASE_CLASS_NAME', Event::DATABASE_CLASS_NAME));
}
/**

View file

@ -4,6 +4,7 @@ namespace Appwrite\Event;
use Utopia\Database\Document;
use Utopia\Queue\Publisher;
use Utopia\System\System;
class Delete extends Event
{
@ -20,8 +21,8 @@ class Delete extends Event
parent::__construct($publisher);
$this
->setQueue(Event::DELETE_QUEUE_NAME)
->setClass(Event::DELETE_CLASS_NAME);
->setQueue(System::getEnv('_APP_DELETE_QUEUE_NAME', Event::DELETE_QUEUE_NAME))
->setClass(System::getEnv('_APP_DELETE_CLASS_NAME', Event::DELETE_CLASS_NAME));
}
/**

View file

@ -5,6 +5,7 @@ namespace Appwrite\Event;
use Utopia\Config\Config;
use Utopia\Database\Document;
use Utopia\Queue\Publisher;
use Utopia\System\System;
class Func extends Event
{
@ -25,8 +26,8 @@ class Func extends Event
parent::__construct($publisher);
$this
->setQueue(Event::FUNCTIONS_QUEUE_NAME)
->setClass(Event::FUNCTIONS_CLASS_NAME);
->setQueue(System::getEnv('_APP_FUNCTIONS_QUEUE_NAME', Event::FUNCTIONS_QUEUE_NAME))
->setClass(System::getEnv('_APP_FUNCTIONS_CLASS_NAME', Event::FUNCTIONS_CLASS_NAME));
}
/**

View file

@ -4,6 +4,7 @@ namespace Appwrite\Event;
use Utopia\Config\Config;
use Utopia\Queue\Publisher;
use Utopia\System\System;
class Mail extends Event
{
@ -24,8 +25,8 @@ class Mail extends Event
parent::__construct($publisher);
$this
->setQueue(Event::MAILS_QUEUE_NAME)
->setClass(Event::MAILS_CLASS_NAME);
->setQueue(System::getEnv('_APP_MAILS_QUEUE_NAME', Event::MAILS_QUEUE_NAME))
->setClass(System::getEnv('_APP_MAILS_CLASS_NAME', Event::MAILS_CLASS_NAME));
}
/**

View file

@ -4,6 +4,7 @@ namespace Appwrite\Event;
use Utopia\Database\Document;
use Utopia\Queue\Publisher;
use Utopia\System\System;
class Messaging extends Event
{
@ -19,8 +20,8 @@ class Messaging extends Event
parent::__construct($publisher);
$this
->setQueue(Event::MESSAGING_QUEUE_NAME)
->setClass(Event::MESSAGING_CLASS_NAME);
->setQueue(System::getEnv('_APP_MESSAGING_QUEUE_NAME', Event::MESSAGING_QUEUE_NAME))
->setClass(System::getEnv('_APP_MESSAGING_CLASS_NAME', Event::MESSAGING_CLASS_NAME));
}
/**

View file

@ -5,6 +5,7 @@ namespace Appwrite\Event;
use Utopia\Config\Config;
use Utopia\Database\Document;
use Utopia\Queue\Publisher;
use Utopia\System\System;
class Migration extends Event
{
@ -16,8 +17,8 @@ class Migration extends Event
parent::__construct($publisher);
$this
->setQueue(Event::MIGRATIONS_QUEUE_NAME)
->setClass(Event::MIGRATIONS_CLASS_NAME);
->setQueue(System::getEnv('_APP_MIGRATIONS_QUEUE_NAME', Event::MIGRATIONS_QUEUE_NAME))
->setClass(System::getEnv('_APP_MIGRATIONS_CLASS_NAME', Event::MIGRATIONS_CLASS_NAME));
}
/**

View file

@ -3,6 +3,7 @@
namespace Appwrite\Event;
use Utopia\Queue\Publisher;
use Utopia\System\System;
class StatsResources extends Event
{
@ -13,8 +14,8 @@ class StatsResources extends Event
parent::__construct($publisher);
$this
->setQueue(Event::STATS_RESOURCES_QUEUE_NAME)
->setClass(Event::STATS_RESOURCES_CLASS_NAME);
->setQueue(System::getEnv('_APP_STATS_RESOURCES_QUEUE_NAME', Event::STATS_RESOURCES_QUEUE_NAME))
->setClass(System::getEnv('_APP_STATS_RESOURCES_CLASS_NAME', Event::STATS_RESOURCES_CLASS_NAME));
}
/**

View file

@ -4,6 +4,7 @@ namespace Appwrite\Event;
use Utopia\Database\Document;
use Utopia\Queue\Publisher;
use Utopia\System\System;
class StatsUsage extends Event
{
@ -18,8 +19,8 @@ class StatsUsage extends Event
parent::__construct($publisher);
$this
->setQueue(Event::STATS_USAGE_QUEUE_NAME)
->setClass(Event::STATS_USAGE_CLASS_NAME);
->setQueue(System::getEnv('_APP_STATS_USAGE_QUEUE_NAME', Event::STATS_USAGE_QUEUE_NAME))
->setClass(System::getEnv('_APP_STATS_USAGE_CLASS_NAME', Event::STATS_USAGE_CLASS_NAME));
}
/**

View file

@ -3,6 +3,7 @@
namespace Appwrite\Event;
use Utopia\Queue\Publisher;
use Utopia\System\System;
class Webhook extends Event
{
@ -11,8 +12,8 @@ class Webhook extends Event
parent::__construct($publisher);
$this
->setQueue(Event::WEBHOOK_QUEUE_NAME)
->setClass(Event::WEBHOOK_CLASS_NAME);
->setQueue(System::getEnv('_APP_WEBHOOK_QUEUE_NAME', Event::WEBHOOK_QUEUE_NAME))
->setClass(System::getEnv('_APP_WEBHOOK_CLASS_NAME', Event::WEBHOOK_CLASS_NAME));
}
/**

View file

@ -36,6 +36,11 @@ class SDKs extends Action
return 'sdks';
}
public static function getPlatforms(): array
{
return Specs::getPlatforms();
}
public function __construct()
{
$this
@ -55,7 +60,7 @@ class SDKs extends Action
public function action(?string $selectedPlatform, ?string $selectedSDK, ?string $version, ?string $git, ?string $production, ?string $message, ?string $release, ?string $commit, ?string $sdks): void
{
if (!$sdks) {
$selectedPlatform ??= Console::confirm('Choose Platform ("' . APP_SDK_PLATFORM_CLIENT . '", "' . APP_SDK_PLATFORM_SERVER . '", "' . APP_SDK_PLATFORM_CONSOLE . '" or "*" for all):');
$selectedPlatform ??= Console::confirm('Choose Platform ("' . implode('", "', static::getPlatforms()) . '" or "*" for all):');
$selectedSDK ??= \strtolower(Console::confirm('Choose SDK ("*" for all):'));
} else {
$sdks = explode(',', $sdks);

View file

@ -66,7 +66,7 @@ class Specs extends Action
*
* @return array<string>
*/
protected function getPlatforms(): array
public static function getPlatforms(): array
{
return [
APP_SDK_PLATFORM_CLIENT,
@ -239,7 +239,7 @@ class Specs extends Action
App::setResource('dbForPlatform', fn () => new Database(new MySQL(''), new Cache(new None())));
App::setResource('dbForProject', fn () => new Database(new MySQL(''), new Cache(new None())));
$platforms = $this->getPlatforms();
$platforms = static::getPlatforms();
$authCounts = $this->getAuthCounts();
$keys = $this->getKeys();

View file

@ -204,6 +204,8 @@ abstract class Format
switch ($param) {
case 'permissions':
return 'BrowserPermission';
case 'output':
return 'ImageFormat';
}
break;
}

View file

@ -1845,7 +1845,7 @@ class AccountCustomClientTest extends Scope
]));
$this->assertEquals(201, $response['headers']['status-code']);
$this->assertEquals(99, $response['headers']['x-ratelimit-remaining']);
$this->assertEquals(119, $response['headers']['x-ratelimit-remaining']);
$this->assertNotEmpty($response['body']['jwt']);
$this->assertIsString($response['body']['jwt']);
@ -1887,6 +1887,57 @@ class AccountCustomClientTest extends Scope
$this->assertEquals(401, $response['headers']['status-code']);
// Test JWT with custom duration
$response = $this->client->call(Client::METHOD_POST, '/account/sessions/email', array_merge([
'origin' => 'http://localhost',
'content-type' => 'application/json',
'x-appwrite-project' => $this->getProject()['$id'],
]), [
'email' => $email,
'password' => $password,
]);
$this->assertEquals(201, $response['headers']['status-code']);
$session = $response['cookies']['a_session_' . $this->getProject()['$id']];
$response = $this->client->call(Client::METHOD_POST, '/account/jwt', array_merge([
'origin' => 'http://localhost',
'content-type' => 'application/json',
'x-appwrite-project' => $this->getProject()['$id'],
'cookie' => 'a_session_' . $this->getProject()['$id'] . '=' . $session,
]), [
'duration' => 5
]);
$this->assertEquals(201, $response['headers']['status-code']);
$this->assertNotEmpty($response['body']['jwt']);
$jwt = $response['body']['jwt'];
// Ensure JWT works before expiration
$response = $this->client->call(Client::METHOD_GET, '/account', array_merge([
'origin' => 'http://localhost',
'content-type' => 'application/json',
'x-appwrite-project' => $this->getProject()['$id'],
'x-appwrite-jwt' => $jwt,
]));
$this->assertEquals(200, $response['headers']['status-code']);
// Wait for JWT to expire
\sleep(6);
// Ensure JWT no longer works after expiration
$response = $this->client->call(Client::METHOD_GET, '/account', array_merge([
'origin' => 'http://localhost',
'content-type' => 'application/json',
'x-appwrite-project' => $this->getProject()['$id'],
'x-appwrite-jwt' => $jwt,
]));
$this->assertEquals(401, $response['headers']['status-code']);
return [];
}