mirror of
https://github.com/appwrite/appwrite
synced 2026-05-24 09:28:40 +00:00
Merge branch '1.8.x' into ser-331
This commit is contained in:
commit
5aff78a619
312 changed files with 1343 additions and 457 deletions
|
|
@ -187,7 +187,7 @@
|
|||
<img
|
||||
height="26px"
|
||||
src="{{logoUrl}}"
|
||||
alt="Appwrite logo"
|
||||
alt="{{platform}} logo"
|
||||
/>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
@ -225,7 +225,7 @@
|
|||
<tr>
|
||||
<td style="padding-left: 4px; padding-right: 4px">
|
||||
<a
|
||||
href="{{twitterUrl}}"
|
||||
href="{{twitter}}"
|
||||
class="social-icon"
|
||||
title="Twitter"
|
||||
>
|
||||
|
|
@ -234,7 +234,7 @@
|
|||
</td>
|
||||
<td style="padding-left: 4px; padding-right: 4px">
|
||||
<a
|
||||
href="{{discordUrl}}"
|
||||
href="{{discord}}"
|
||||
class="social-icon"
|
||||
>
|
||||
<img src="https://cloud.appwrite.io/images/mails/discord.png" height="24" width="24" />
|
||||
|
|
@ -242,7 +242,7 @@
|
|||
</td>
|
||||
<td style="padding-left: 4px; padding-right: 4px">
|
||||
<a
|
||||
href="{{githubUrl}}"
|
||||
href="{{github}}"
|
||||
class="social-icon"
|
||||
>
|
||||
<img src="https://cloud.appwrite.io/images/mails/github.png" height="24" width="24" />
|
||||
|
|
@ -252,15 +252,15 @@
|
|||
</table>
|
||||
<table style="width: auto; margin: 0 auto; margin-top: 60px">
|
||||
<tr>
|
||||
<td><a href="{{termsUrl}}">Terms</a></td>
|
||||
<td><a href="{{terms}}">Terms</a></td>
|
||||
<td style="color: #e8e9f0">
|
||||
<div style="margin: 0 8px">|</div>
|
||||
</td>
|
||||
<td><a href="{{privacyUrl}}">Privacy</a></td>
|
||||
<td><a href="{{privacy}}">Privacy</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
<p style="text-align: center" align="center">
|
||||
© {{year}} Appwrite | 251 Little Falls Drive, Wilmington 19808,
|
||||
© {{year}} {{platform}} | 251 Little Falls Drive, Wilmington 19808,
|
||||
Delaware, United States
|
||||
</p>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -22,4 +22,5 @@ return [
|
|||
'termsUrl' => APP_EMAIL_TERMS_URL,
|
||||
'privacyUrl' => APP_EMAIL_PRIVACY_URL,
|
||||
'websiteUrl' => 'https://' . APP_DOMAIN,
|
||||
'emailSenderName' => APP_EMAIL_PLATFORM_NAME,
|
||||
];
|
||||
|
|
|
|||
|
|
@ -6712,8 +6712,7 @@
|
|||
"required": [
|
||||
"databaseId",
|
||||
"collectionId",
|
||||
"documentId",
|
||||
"data"
|
||||
"documentId"
|
||||
],
|
||||
"responses": [
|
||||
{
|
||||
|
|
@ -6782,7 +6781,7 @@
|
|||
"data": {
|
||||
"type": "object",
|
||||
"description": "Document data as JSON object. Include all required attributes of the document to be created or updated.",
|
||||
"x-example": "{}"
|
||||
"x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}"
|
||||
},
|
||||
"permissions": {
|
||||
"type": "array",
|
||||
|
|
@ -6799,10 +6798,7 @@
|
|||
"x-example": "<TRANSACTION_ID>",
|
||||
"x-nullable": true
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"data"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -6904,7 +6900,7 @@
|
|||
"data": {
|
||||
"type": "object",
|
||||
"description": "Document data as JSON object. Include only attribute and value pairs to be updated.",
|
||||
"x-example": "{}"
|
||||
"x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}"
|
||||
},
|
||||
"permissions": {
|
||||
"type": "array",
|
||||
|
|
@ -10046,7 +10042,7 @@
|
|||
"data": {
|
||||
"type": "object",
|
||||
"description": "Row data as JSON object. Include all required columns of the row to be created or updated.",
|
||||
"x-example": "{}"
|
||||
"x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}"
|
||||
},
|
||||
"permissions": {
|
||||
"type": "array",
|
||||
|
|
@ -10164,7 +10160,7 @@
|
|||
"data": {
|
||||
"type": "object",
|
||||
"description": "Row data as JSON object. Include only columns and value pairs to be updated.",
|
||||
"x-example": "{}"
|
||||
"x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}"
|
||||
},
|
||||
"permissions": {
|
||||
"type": "array",
|
||||
|
|
|
|||
|
|
@ -11516,7 +11516,7 @@
|
|||
"data": {
|
||||
"type": "object",
|
||||
"description": "Document data as JSON object. Include only attribute and value pairs to be updated.",
|
||||
"x-example": "{}"
|
||||
"x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}"
|
||||
},
|
||||
"queries": {
|
||||
"type": "array",
|
||||
|
|
@ -11814,8 +11814,7 @@
|
|||
"required": [
|
||||
"databaseId",
|
||||
"collectionId",
|
||||
"documentId",
|
||||
"data"
|
||||
"documentId"
|
||||
],
|
||||
"responses": [
|
||||
{
|
||||
|
|
@ -11884,7 +11883,7 @@
|
|||
"data": {
|
||||
"type": "object",
|
||||
"description": "Document data as JSON object. Include all required attributes of the document to be created or updated.",
|
||||
"x-example": "{}"
|
||||
"x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}"
|
||||
},
|
||||
"permissions": {
|
||||
"type": "array",
|
||||
|
|
@ -11901,10 +11900,7 @@
|
|||
"x-example": "<TRANSACTION_ID>",
|
||||
"x-nullable": true
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"data"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -12006,7 +12002,7 @@
|
|||
"data": {
|
||||
"type": "object",
|
||||
"description": "Document data as JSON object. Include only attribute and value pairs to be updated.",
|
||||
"x-example": "{}"
|
||||
"x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}"
|
||||
},
|
||||
"permissions": {
|
||||
"type": "array",
|
||||
|
|
@ -41806,7 +41802,7 @@
|
|||
"data": {
|
||||
"type": "object",
|
||||
"description": "Row data as JSON object. Include only column and value pairs to be updated.",
|
||||
"x-example": "{}"
|
||||
"x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}"
|
||||
},
|
||||
"queries": {
|
||||
"type": "array",
|
||||
|
|
@ -42166,7 +42162,7 @@
|
|||
"data": {
|
||||
"type": "object",
|
||||
"description": "Row data as JSON object. Include all required columns of the row to be created or updated.",
|
||||
"x-example": "{}"
|
||||
"x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}"
|
||||
},
|
||||
"permissions": {
|
||||
"type": "array",
|
||||
|
|
@ -42284,7 +42280,7 @@
|
|||
"data": {
|
||||
"type": "object",
|
||||
"description": "Row data as JSON object. Include only columns and value pairs to be updated.",
|
||||
"x-example": "{}"
|
||||
"x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}"
|
||||
},
|
||||
"permissions": {
|
||||
"type": "array",
|
||||
|
|
@ -60634,8 +60630,8 @@
|
|||
},
|
||||
"logs": {
|
||||
"type": "string",
|
||||
"description": "Certificate generation logs. This will return an empty string if generation did not run, or succeeded.",
|
||||
"x-example": "HTTP challegne failed."
|
||||
"description": "Logs from rule verification or certificate generation. Certificate generation logs are prioritized if both are available.",
|
||||
"x-example": "Verification of DNS records failed with DNS resolver 8.8.8.8. Domain stage.myapp.com does not have DNS record."
|
||||
},
|
||||
"renewAt": {
|
||||
"type": "string",
|
||||
|
|
@ -60674,7 +60670,7 @@
|
|||
"deploymentResourceId": "n3u9feiwmf",
|
||||
"deploymentVcsProviderBranch": "main",
|
||||
"status": "verified",
|
||||
"logs": "HTTP challegne failed.",
|
||||
"logs": "Verification of DNS records failed with DNS resolver 8.8.8.8. Domain stage.myapp.com does not have DNS record.",
|
||||
"renewAt": "datetime"
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -11031,7 +11031,7 @@
|
|||
"data": {
|
||||
"type": "object",
|
||||
"description": "Document data as JSON object. Include only attribute and value pairs to be updated.",
|
||||
"x-example": "{}"
|
||||
"x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}"
|
||||
},
|
||||
"queries": {
|
||||
"type": "array",
|
||||
|
|
@ -11333,8 +11333,7 @@
|
|||
"required": [
|
||||
"databaseId",
|
||||
"collectionId",
|
||||
"documentId",
|
||||
"data"
|
||||
"documentId"
|
||||
],
|
||||
"responses": [
|
||||
{
|
||||
|
|
@ -11405,7 +11404,7 @@
|
|||
"data": {
|
||||
"type": "object",
|
||||
"description": "Document data as JSON object. Include all required attributes of the document to be created or updated.",
|
||||
"x-example": "{}"
|
||||
"x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}"
|
||||
},
|
||||
"permissions": {
|
||||
"type": "array",
|
||||
|
|
@ -11422,10 +11421,7 @@
|
|||
"x-example": "<TRANSACTION_ID>",
|
||||
"x-nullable": true
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"data"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -11529,7 +11525,7 @@
|
|||
"data": {
|
||||
"type": "object",
|
||||
"description": "Document data as JSON object. Include only attribute and value pairs to be updated.",
|
||||
"x-example": "{}"
|
||||
"x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}"
|
||||
},
|
||||
"permissions": {
|
||||
"type": "array",
|
||||
|
|
@ -31514,7 +31510,7 @@
|
|||
"data": {
|
||||
"type": "object",
|
||||
"description": "Row data as JSON object. Include only column and value pairs to be updated.",
|
||||
"x-example": "{}"
|
||||
"x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}"
|
||||
},
|
||||
"queries": {
|
||||
"type": "array",
|
||||
|
|
@ -31880,7 +31876,7 @@
|
|||
"data": {
|
||||
"type": "object",
|
||||
"description": "Row data as JSON object. Include all required columns of the row to be created or updated.",
|
||||
"x-example": "{}"
|
||||
"x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}"
|
||||
},
|
||||
"permissions": {
|
||||
"type": "array",
|
||||
|
|
@ -32000,7 +31996,7 @@
|
|||
"data": {
|
||||
"type": "object",
|
||||
"description": "Row data as JSON object. Include only columns and value pairs to be updated.",
|
||||
"x-example": "{}"
|
||||
"x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}"
|
||||
},
|
||||
"permissions": {
|
||||
"type": "array",
|
||||
|
|
|
|||
|
|
@ -6712,8 +6712,7 @@
|
|||
"required": [
|
||||
"databaseId",
|
||||
"collectionId",
|
||||
"documentId",
|
||||
"data"
|
||||
"documentId"
|
||||
],
|
||||
"responses": [
|
||||
{
|
||||
|
|
@ -6782,7 +6781,7 @@
|
|||
"data": {
|
||||
"type": "object",
|
||||
"description": "Document data as JSON object. Include all required attributes of the document to be created or updated.",
|
||||
"x-example": "{}"
|
||||
"x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}"
|
||||
},
|
||||
"permissions": {
|
||||
"type": "array",
|
||||
|
|
@ -6799,10 +6798,7 @@
|
|||
"x-example": "<TRANSACTION_ID>",
|
||||
"x-nullable": true
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"data"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -6904,7 +6900,7 @@
|
|||
"data": {
|
||||
"type": "object",
|
||||
"description": "Document data as JSON object. Include only attribute and value pairs to be updated.",
|
||||
"x-example": "{}"
|
||||
"x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}"
|
||||
},
|
||||
"permissions": {
|
||||
"type": "array",
|
||||
|
|
@ -10046,7 +10042,7 @@
|
|||
"data": {
|
||||
"type": "object",
|
||||
"description": "Row data as JSON object. Include all required columns of the row to be created or updated.",
|
||||
"x-example": "{}"
|
||||
"x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}"
|
||||
},
|
||||
"permissions": {
|
||||
"type": "array",
|
||||
|
|
@ -10164,7 +10160,7 @@
|
|||
"data": {
|
||||
"type": "object",
|
||||
"description": "Row data as JSON object. Include only columns and value pairs to be updated.",
|
||||
"x-example": "{}"
|
||||
"x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}"
|
||||
},
|
||||
"permissions": {
|
||||
"type": "array",
|
||||
|
|
|
|||
|
|
@ -11516,7 +11516,7 @@
|
|||
"data": {
|
||||
"type": "object",
|
||||
"description": "Document data as JSON object. Include only attribute and value pairs to be updated.",
|
||||
"x-example": "{}"
|
||||
"x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}"
|
||||
},
|
||||
"queries": {
|
||||
"type": "array",
|
||||
|
|
@ -11814,8 +11814,7 @@
|
|||
"required": [
|
||||
"databaseId",
|
||||
"collectionId",
|
||||
"documentId",
|
||||
"data"
|
||||
"documentId"
|
||||
],
|
||||
"responses": [
|
||||
{
|
||||
|
|
@ -11884,7 +11883,7 @@
|
|||
"data": {
|
||||
"type": "object",
|
||||
"description": "Document data as JSON object. Include all required attributes of the document to be created or updated.",
|
||||
"x-example": "{}"
|
||||
"x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}"
|
||||
},
|
||||
"permissions": {
|
||||
"type": "array",
|
||||
|
|
@ -11901,10 +11900,7 @@
|
|||
"x-example": "<TRANSACTION_ID>",
|
||||
"x-nullable": true
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"data"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -12006,7 +12002,7 @@
|
|||
"data": {
|
||||
"type": "object",
|
||||
"description": "Document data as JSON object. Include only attribute and value pairs to be updated.",
|
||||
"x-example": "{}"
|
||||
"x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}"
|
||||
},
|
||||
"permissions": {
|
||||
"type": "array",
|
||||
|
|
@ -41806,7 +41802,7 @@
|
|||
"data": {
|
||||
"type": "object",
|
||||
"description": "Row data as JSON object. Include only column and value pairs to be updated.",
|
||||
"x-example": "{}"
|
||||
"x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}"
|
||||
},
|
||||
"queries": {
|
||||
"type": "array",
|
||||
|
|
@ -42166,7 +42162,7 @@
|
|||
"data": {
|
||||
"type": "object",
|
||||
"description": "Row data as JSON object. Include all required columns of the row to be created or updated.",
|
||||
"x-example": "{}"
|
||||
"x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}"
|
||||
},
|
||||
"permissions": {
|
||||
"type": "array",
|
||||
|
|
@ -42284,7 +42280,7 @@
|
|||
"data": {
|
||||
"type": "object",
|
||||
"description": "Row data as JSON object. Include only columns and value pairs to be updated.",
|
||||
"x-example": "{}"
|
||||
"x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}"
|
||||
},
|
||||
"permissions": {
|
||||
"type": "array",
|
||||
|
|
@ -60634,8 +60630,8 @@
|
|||
},
|
||||
"logs": {
|
||||
"type": "string",
|
||||
"description": "Certificate generation logs. This will return an empty string if generation did not run, or succeeded.",
|
||||
"x-example": "HTTP challegne failed."
|
||||
"description": "Logs from rule verification or certificate generation. Certificate generation logs are prioritized if both are available.",
|
||||
"x-example": "Verification of DNS records failed with DNS resolver 8.8.8.8. Domain stage.myapp.com does not have DNS record."
|
||||
},
|
||||
"renewAt": {
|
||||
"type": "string",
|
||||
|
|
@ -60674,7 +60670,7 @@
|
|||
"deploymentResourceId": "n3u9feiwmf",
|
||||
"deploymentVcsProviderBranch": "main",
|
||||
"status": "verified",
|
||||
"logs": "HTTP challegne failed.",
|
||||
"logs": "Verification of DNS records failed with DNS resolver 8.8.8.8. Domain stage.myapp.com does not have DNS record.",
|
||||
"renewAt": "datetime"
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -11031,7 +11031,7 @@
|
|||
"data": {
|
||||
"type": "object",
|
||||
"description": "Document data as JSON object. Include only attribute and value pairs to be updated.",
|
||||
"x-example": "{}"
|
||||
"x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}"
|
||||
},
|
||||
"queries": {
|
||||
"type": "array",
|
||||
|
|
@ -11333,8 +11333,7 @@
|
|||
"required": [
|
||||
"databaseId",
|
||||
"collectionId",
|
||||
"documentId",
|
||||
"data"
|
||||
"documentId"
|
||||
],
|
||||
"responses": [
|
||||
{
|
||||
|
|
@ -11405,7 +11404,7 @@
|
|||
"data": {
|
||||
"type": "object",
|
||||
"description": "Document data as JSON object. Include all required attributes of the document to be created or updated.",
|
||||
"x-example": "{}"
|
||||
"x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}"
|
||||
},
|
||||
"permissions": {
|
||||
"type": "array",
|
||||
|
|
@ -11422,10 +11421,7 @@
|
|||
"x-example": "<TRANSACTION_ID>",
|
||||
"x-nullable": true
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"data"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -11529,7 +11525,7 @@
|
|||
"data": {
|
||||
"type": "object",
|
||||
"description": "Document data as JSON object. Include only attribute and value pairs to be updated.",
|
||||
"x-example": "{}"
|
||||
"x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}"
|
||||
},
|
||||
"permissions": {
|
||||
"type": "array",
|
||||
|
|
@ -31514,7 +31510,7 @@
|
|||
"data": {
|
||||
"type": "object",
|
||||
"description": "Row data as JSON object. Include only column and value pairs to be updated.",
|
||||
"x-example": "{}"
|
||||
"x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}"
|
||||
},
|
||||
"queries": {
|
||||
"type": "array",
|
||||
|
|
@ -31880,7 +31876,7 @@
|
|||
"data": {
|
||||
"type": "object",
|
||||
"description": "Row data as JSON object. Include all required columns of the row to be created or updated.",
|
||||
"x-example": "{}"
|
||||
"x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}"
|
||||
},
|
||||
"permissions": {
|
||||
"type": "array",
|
||||
|
|
@ -32000,7 +31996,7 @@
|
|||
"data": {
|
||||
"type": "object",
|
||||
"description": "Row data as JSON object. Include only columns and value pairs to be updated.",
|
||||
"x-example": "{}"
|
||||
"x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}"
|
||||
},
|
||||
"permissions": {
|
||||
"type": "array",
|
||||
|
|
|
|||
|
|
@ -6793,8 +6793,7 @@
|
|||
"required": [
|
||||
"databaseId",
|
||||
"collectionId",
|
||||
"documentId",
|
||||
"data"
|
||||
"documentId"
|
||||
],
|
||||
"responses": [
|
||||
{
|
||||
|
|
@ -6856,8 +6855,8 @@
|
|||
"data": {
|
||||
"type": "object",
|
||||
"description": "Document data as JSON object. Include all required attributes of the document to be created or updated.",
|
||||
"default": {},
|
||||
"x-example": "{}"
|
||||
"default": [],
|
||||
"x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}"
|
||||
},
|
||||
"permissions": {
|
||||
"type": "array",
|
||||
|
|
@ -6876,10 +6875,7 @@
|
|||
"x-example": "<TRANSACTION_ID>",
|
||||
"x-nullable": true
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"data"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
@ -6975,7 +6971,7 @@
|
|||
"type": "object",
|
||||
"description": "Document data as JSON object. Include only attribute and value pairs to be updated.",
|
||||
"default": [],
|
||||
"x-example": "{}"
|
||||
"x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}"
|
||||
},
|
||||
"permissions": {
|
||||
"type": "array",
|
||||
|
|
@ -10049,7 +10045,7 @@
|
|||
"type": "object",
|
||||
"description": "Row data as JSON object. Include all required columns of the row to be created or updated.",
|
||||
"default": [],
|
||||
"x-example": "{}"
|
||||
"x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}"
|
||||
},
|
||||
"permissions": {
|
||||
"type": "array",
|
||||
|
|
@ -10163,7 +10159,7 @@
|
|||
"type": "object",
|
||||
"description": "Row data as JSON object. Include only columns and value pairs to be updated.",
|
||||
"default": [],
|
||||
"x-example": "{}"
|
||||
"x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}"
|
||||
},
|
||||
"permissions": {
|
||||
"type": "array",
|
||||
|
|
|
|||
|
|
@ -11527,7 +11527,7 @@
|
|||
"type": "object",
|
||||
"description": "Document data as JSON object. Include only attribute and value pairs to be updated.",
|
||||
"default": [],
|
||||
"x-example": "{}"
|
||||
"x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}"
|
||||
},
|
||||
"queries": {
|
||||
"type": "array",
|
||||
|
|
@ -11815,8 +11815,7 @@
|
|||
"required": [
|
||||
"databaseId",
|
||||
"collectionId",
|
||||
"documentId",
|
||||
"data"
|
||||
"documentId"
|
||||
],
|
||||
"responses": [
|
||||
{
|
||||
|
|
@ -11878,8 +11877,8 @@
|
|||
"data": {
|
||||
"type": "object",
|
||||
"description": "Document data as JSON object. Include all required attributes of the document to be created or updated.",
|
||||
"default": {},
|
||||
"x-example": "{}"
|
||||
"default": [],
|
||||
"x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}"
|
||||
},
|
||||
"permissions": {
|
||||
"type": "array",
|
||||
|
|
@ -11898,10 +11897,7 @@
|
|||
"x-example": "<TRANSACTION_ID>",
|
||||
"x-nullable": true
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"data"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
@ -11997,7 +11993,7 @@
|
|||
"type": "object",
|
||||
"description": "Document data as JSON object. Include only attribute and value pairs to be updated.",
|
||||
"default": [],
|
||||
"x-example": "{}"
|
||||
"x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}"
|
||||
},
|
||||
"permissions": {
|
||||
"type": "array",
|
||||
|
|
@ -41723,7 +41719,7 @@
|
|||
"type": "object",
|
||||
"description": "Row data as JSON object. Include only column and value pairs to be updated.",
|
||||
"default": [],
|
||||
"x-example": "{}"
|
||||
"x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}"
|
||||
},
|
||||
"queries": {
|
||||
"type": "array",
|
||||
|
|
@ -42067,7 +42063,7 @@
|
|||
"type": "object",
|
||||
"description": "Row data as JSON object. Include all required columns of the row to be created or updated.",
|
||||
"default": [],
|
||||
"x-example": "{}"
|
||||
"x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}"
|
||||
},
|
||||
"permissions": {
|
||||
"type": "array",
|
||||
|
|
@ -42181,7 +42177,7 @@
|
|||
"type": "object",
|
||||
"description": "Row data as JSON object. Include only columns and value pairs to be updated.",
|
||||
"default": [],
|
||||
"x-example": "{}"
|
||||
"x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}"
|
||||
},
|
||||
"permissions": {
|
||||
"type": "array",
|
||||
|
|
@ -60568,8 +60564,8 @@
|
|||
},
|
||||
"logs": {
|
||||
"type": "string",
|
||||
"description": "Certificate generation logs. This will return an empty string if generation did not run, or succeeded.",
|
||||
"x-example": "HTTP challegne failed."
|
||||
"description": "Logs from rule verification or certificate generation. Certificate generation logs are prioritized if both are available.",
|
||||
"x-example": "Verification of DNS records failed with DNS resolver 8.8.8.8. Domain stage.myapp.com does not have DNS record."
|
||||
},
|
||||
"renewAt": {
|
||||
"type": "string",
|
||||
|
|
@ -60608,7 +60604,7 @@
|
|||
"deploymentResourceId": "n3u9feiwmf",
|
||||
"deploymentVcsProviderBranch": "main",
|
||||
"status": "verified",
|
||||
"logs": "HTTP challegne failed.",
|
||||
"logs": "Verification of DNS records failed with DNS resolver 8.8.8.8. Domain stage.myapp.com does not have DNS record.",
|
||||
"renewAt": "datetime"
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -11032,7 +11032,7 @@
|
|||
"type": "object",
|
||||
"description": "Document data as JSON object. Include only attribute and value pairs to be updated.",
|
||||
"default": [],
|
||||
"x-example": "{}"
|
||||
"x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}"
|
||||
},
|
||||
"queries": {
|
||||
"type": "array",
|
||||
|
|
@ -11324,8 +11324,7 @@
|
|||
"required": [
|
||||
"databaseId",
|
||||
"collectionId",
|
||||
"documentId",
|
||||
"data"
|
||||
"documentId"
|
||||
],
|
||||
"responses": [
|
||||
{
|
||||
|
|
@ -11389,8 +11388,8 @@
|
|||
"data": {
|
||||
"type": "object",
|
||||
"description": "Document data as JSON object. Include all required attributes of the document to be created or updated.",
|
||||
"default": {},
|
||||
"x-example": "{}"
|
||||
"default": [],
|
||||
"x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}"
|
||||
},
|
||||
"permissions": {
|
||||
"type": "array",
|
||||
|
|
@ -11409,10 +11408,7 @@
|
|||
"x-example": "<TRANSACTION_ID>",
|
||||
"x-nullable": true
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"data"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
@ -11510,7 +11506,7 @@
|
|||
"type": "object",
|
||||
"description": "Document data as JSON object. Include only attribute and value pairs to be updated.",
|
||||
"default": [],
|
||||
"x-example": "{}"
|
||||
"x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}"
|
||||
},
|
||||
"permissions": {
|
||||
"type": "array",
|
||||
|
|
@ -31497,7 +31493,7 @@
|
|||
"type": "object",
|
||||
"description": "Row data as JSON object. Include only column and value pairs to be updated.",
|
||||
"default": [],
|
||||
"x-example": "{}"
|
||||
"x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}"
|
||||
},
|
||||
"queries": {
|
||||
"type": "array",
|
||||
|
|
@ -31847,7 +31843,7 @@
|
|||
"type": "object",
|
||||
"description": "Row data as JSON object. Include all required columns of the row to be created or updated.",
|
||||
"default": [],
|
||||
"x-example": "{}"
|
||||
"x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}"
|
||||
},
|
||||
"permissions": {
|
||||
"type": "array",
|
||||
|
|
@ -31963,7 +31959,7 @@
|
|||
"type": "object",
|
||||
"description": "Row data as JSON object. Include only columns and value pairs to be updated.",
|
||||
"default": [],
|
||||
"x-example": "{}"
|
||||
"x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}"
|
||||
},
|
||||
"permissions": {
|
||||
"type": "array",
|
||||
|
|
|
|||
|
|
@ -6793,8 +6793,7 @@
|
|||
"required": [
|
||||
"databaseId",
|
||||
"collectionId",
|
||||
"documentId",
|
||||
"data"
|
||||
"documentId"
|
||||
],
|
||||
"responses": [
|
||||
{
|
||||
|
|
@ -6856,8 +6855,8 @@
|
|||
"data": {
|
||||
"type": "object",
|
||||
"description": "Document data as JSON object. Include all required attributes of the document to be created or updated.",
|
||||
"default": {},
|
||||
"x-example": "{}"
|
||||
"default": [],
|
||||
"x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}"
|
||||
},
|
||||
"permissions": {
|
||||
"type": "array",
|
||||
|
|
@ -6876,10 +6875,7 @@
|
|||
"x-example": "<TRANSACTION_ID>",
|
||||
"x-nullable": true
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"data"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
@ -6975,7 +6971,7 @@
|
|||
"type": "object",
|
||||
"description": "Document data as JSON object. Include only attribute and value pairs to be updated.",
|
||||
"default": [],
|
||||
"x-example": "{}"
|
||||
"x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}"
|
||||
},
|
||||
"permissions": {
|
||||
"type": "array",
|
||||
|
|
@ -10049,7 +10045,7 @@
|
|||
"type": "object",
|
||||
"description": "Row data as JSON object. Include all required columns of the row to be created or updated.",
|
||||
"default": [],
|
||||
"x-example": "{}"
|
||||
"x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}"
|
||||
},
|
||||
"permissions": {
|
||||
"type": "array",
|
||||
|
|
@ -10163,7 +10159,7 @@
|
|||
"type": "object",
|
||||
"description": "Row data as JSON object. Include only columns and value pairs to be updated.",
|
||||
"default": [],
|
||||
"x-example": "{}"
|
||||
"x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}"
|
||||
},
|
||||
"permissions": {
|
||||
"type": "array",
|
||||
|
|
|
|||
|
|
@ -11527,7 +11527,7 @@
|
|||
"type": "object",
|
||||
"description": "Document data as JSON object. Include only attribute and value pairs to be updated.",
|
||||
"default": [],
|
||||
"x-example": "{}"
|
||||
"x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}"
|
||||
},
|
||||
"queries": {
|
||||
"type": "array",
|
||||
|
|
@ -11815,8 +11815,7 @@
|
|||
"required": [
|
||||
"databaseId",
|
||||
"collectionId",
|
||||
"documentId",
|
||||
"data"
|
||||
"documentId"
|
||||
],
|
||||
"responses": [
|
||||
{
|
||||
|
|
@ -11878,8 +11877,8 @@
|
|||
"data": {
|
||||
"type": "object",
|
||||
"description": "Document data as JSON object. Include all required attributes of the document to be created or updated.",
|
||||
"default": {},
|
||||
"x-example": "{}"
|
||||
"default": [],
|
||||
"x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}"
|
||||
},
|
||||
"permissions": {
|
||||
"type": "array",
|
||||
|
|
@ -11898,10 +11897,7 @@
|
|||
"x-example": "<TRANSACTION_ID>",
|
||||
"x-nullable": true
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"data"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
@ -11997,7 +11993,7 @@
|
|||
"type": "object",
|
||||
"description": "Document data as JSON object. Include only attribute and value pairs to be updated.",
|
||||
"default": [],
|
||||
"x-example": "{}"
|
||||
"x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}"
|
||||
},
|
||||
"permissions": {
|
||||
"type": "array",
|
||||
|
|
@ -41723,7 +41719,7 @@
|
|||
"type": "object",
|
||||
"description": "Row data as JSON object. Include only column and value pairs to be updated.",
|
||||
"default": [],
|
||||
"x-example": "{}"
|
||||
"x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}"
|
||||
},
|
||||
"queries": {
|
||||
"type": "array",
|
||||
|
|
@ -42067,7 +42063,7 @@
|
|||
"type": "object",
|
||||
"description": "Row data as JSON object. Include all required columns of the row to be created or updated.",
|
||||
"default": [],
|
||||
"x-example": "{}"
|
||||
"x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}"
|
||||
},
|
||||
"permissions": {
|
||||
"type": "array",
|
||||
|
|
@ -42181,7 +42177,7 @@
|
|||
"type": "object",
|
||||
"description": "Row data as JSON object. Include only columns and value pairs to be updated.",
|
||||
"default": [],
|
||||
"x-example": "{}"
|
||||
"x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}"
|
||||
},
|
||||
"permissions": {
|
||||
"type": "array",
|
||||
|
|
@ -60568,8 +60564,8 @@
|
|||
},
|
||||
"logs": {
|
||||
"type": "string",
|
||||
"description": "Certificate generation logs. This will return an empty string if generation did not run, or succeeded.",
|
||||
"x-example": "HTTP challegne failed."
|
||||
"description": "Logs from rule verification or certificate generation. Certificate generation logs are prioritized if both are available.",
|
||||
"x-example": "Verification of DNS records failed with DNS resolver 8.8.8.8. Domain stage.myapp.com does not have DNS record."
|
||||
},
|
||||
"renewAt": {
|
||||
"type": "string",
|
||||
|
|
@ -60608,7 +60604,7 @@
|
|||
"deploymentResourceId": "n3u9feiwmf",
|
||||
"deploymentVcsProviderBranch": "main",
|
||||
"status": "verified",
|
||||
"logs": "HTTP challegne failed.",
|
||||
"logs": "Verification of DNS records failed with DNS resolver 8.8.8.8. Domain stage.myapp.com does not have DNS record.",
|
||||
"renewAt": "datetime"
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -11032,7 +11032,7 @@
|
|||
"type": "object",
|
||||
"description": "Document data as JSON object. Include only attribute and value pairs to be updated.",
|
||||
"default": [],
|
||||
"x-example": "{}"
|
||||
"x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}"
|
||||
},
|
||||
"queries": {
|
||||
"type": "array",
|
||||
|
|
@ -11324,8 +11324,7 @@
|
|||
"required": [
|
||||
"databaseId",
|
||||
"collectionId",
|
||||
"documentId",
|
||||
"data"
|
||||
"documentId"
|
||||
],
|
||||
"responses": [
|
||||
{
|
||||
|
|
@ -11389,8 +11388,8 @@
|
|||
"data": {
|
||||
"type": "object",
|
||||
"description": "Document data as JSON object. Include all required attributes of the document to be created or updated.",
|
||||
"default": {},
|
||||
"x-example": "{}"
|
||||
"default": [],
|
||||
"x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}"
|
||||
},
|
||||
"permissions": {
|
||||
"type": "array",
|
||||
|
|
@ -11409,10 +11408,7 @@
|
|||
"x-example": "<TRANSACTION_ID>",
|
||||
"x-nullable": true
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"data"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
@ -11510,7 +11506,7 @@
|
|||
"type": "object",
|
||||
"description": "Document data as JSON object. Include only attribute and value pairs to be updated.",
|
||||
"default": [],
|
||||
"x-example": "{}"
|
||||
"x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}"
|
||||
},
|
||||
"permissions": {
|
||||
"type": "array",
|
||||
|
|
@ -31497,7 +31493,7 @@
|
|||
"type": "object",
|
||||
"description": "Row data as JSON object. Include only column and value pairs to be updated.",
|
||||
"default": [],
|
||||
"x-example": "{}"
|
||||
"x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}"
|
||||
},
|
||||
"queries": {
|
||||
"type": "array",
|
||||
|
|
@ -31847,7 +31843,7 @@
|
|||
"type": "object",
|
||||
"description": "Row data as JSON object. Include all required columns of the row to be created or updated.",
|
||||
"default": [],
|
||||
"x-example": "{}"
|
||||
"x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}"
|
||||
},
|
||||
"permissions": {
|
||||
"type": "array",
|
||||
|
|
@ -31963,7 +31959,7 @@
|
|||
"type": "object",
|
||||
"description": "Row data as JSON object. Include only columns and value pairs to be updated.",
|
||||
"default": [],
|
||||
"x-example": "{}"
|
||||
"x-example": "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}"
|
||||
},
|
||||
"permissions": {
|
||||
"type": "array",
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ use Utopia\Validator\WhiteList;
|
|||
$oauthDefaultSuccess = '/console/auth/oauth2/success';
|
||||
$oauthDefaultFailure = '/console/auth/oauth2/failure';
|
||||
|
||||
function sendSessionAlert(Locale $locale, Document $user, Document $project, Document $session, Mail $queueForMails)
|
||||
function sendSessionAlert(Locale $locale, Document $user, Document $project, array $platform, Document $session, Mail $queueForMails)
|
||||
{
|
||||
$subject = $locale->getText("emails.sessionAlert.subject");
|
||||
$preview = $locale->getText("emails.sessionAlert.preview");
|
||||
|
|
@ -157,13 +157,18 @@ function sendSessionAlert(Locale $locale, Document $user, Document $project, Doc
|
|||
$session->setAttribute('clientName', $clientName);
|
||||
}
|
||||
|
||||
$projectName = $project->getAttribute('name');
|
||||
if ($project->getId() === 'console') {
|
||||
$projectName = $platform['platformName'];
|
||||
}
|
||||
|
||||
$emailVariables = [
|
||||
'direction' => $locale->getText('settings.direction'),
|
||||
'date' => (new \DateTime())->format('F j'),
|
||||
'year' => (new \DateTime())->format('YYYY'),
|
||||
'time' => (new \DateTime())->format('H:i:s'),
|
||||
'user' => $user->getAttribute('name'),
|
||||
'project' => $project->getAttribute('name'),
|
||||
'project' => $projectName,
|
||||
'device' => $session->getAttribute('clientName'),
|
||||
'ipAddress' => $session->getAttribute('ip'),
|
||||
'country' => $locale->getText('countries.' . $session->getAttribute('countryCode'), $locale->getText('locale.country.unknown')),
|
||||
|
|
@ -171,13 +176,14 @@ function sendSessionAlert(Locale $locale, Document $user, Document $project, Doc
|
|||
|
||||
if ($smtpBaseTemplate === APP_BRANDED_EMAIL_BASE_TEMPLATE) {
|
||||
$emailVariables = array_merge($emailVariables, [
|
||||
'accentColor' => APP_EMAIL_ACCENT_COLOR,
|
||||
'logoUrl' => APP_EMAIL_LOGO_URL,
|
||||
'twitterUrl' => APP_SOCIAL_TWITTER,
|
||||
'discordUrl' => APP_SOCIAL_DISCORD,
|
||||
'githubUrl' => APP_SOCIAL_GITHUB_APPWRITE,
|
||||
'termsUrl' => APP_EMAIL_TERMS_URL,
|
||||
'privacyUrl' => APP_EMAIL_PRIVACY_URL,
|
||||
'accentColor' => $platform['accentColor'],
|
||||
'logoUrl' => $platform['logoUrl'],
|
||||
'twitter' => $platform['twitterUrl'],
|
||||
'discord' => $platform['discordUrl'],
|
||||
'github' => $platform['githubUrl'],
|
||||
'terms' => $platform['termsUrl'],
|
||||
'privacy' => $platform['privacyUrl'],
|
||||
'platform' => $platform['platformName'],
|
||||
]);
|
||||
}
|
||||
|
||||
|
|
@ -189,12 +195,18 @@ function sendSessionAlert(Locale $locale, Document $user, Document $project, Doc
|
|||
->setBody($body)
|
||||
->setBodyTemplate($bodyTemplate)
|
||||
->setVariables($emailVariables)
|
||||
->setRecipient($email)
|
||||
->trigger();
|
||||
}
|
||||
;
|
||||
->setRecipient($email);
|
||||
|
||||
$createSession = function (string $userId, string $secret, Request $request, Response $response, User $user, Database $dbForProject, Document $project, Locale $locale, Reader $geodb, Event $queueForEvents, Mail $queueForMails, Store $store, ProofsToken $proofForToken, ProofsCode $proofForCode) {
|
||||
// since this is console project, set email sender name!
|
||||
if ($smtpBaseTemplate === APP_BRANDED_EMAIL_BASE_TEMPLATE) {
|
||||
$queueForMails->setSenderName($platform['emailSenderName']);
|
||||
}
|
||||
|
||||
$queueForMails->trigger();
|
||||
}
|
||||
|
||||
|
||||
$createSession = function (string $userId, string $secret, Request $request, Response $response, User $user, Database $dbForProject, Document $project, array $platform, Locale $locale, Reader $geodb, Event $queueForEvents, Mail $queueForMails, Store $store, ProofsToken $proofForToken, ProofsCode $proofForCode) {
|
||||
|
||||
/** @var Appwrite\Utopia\Database\Documents\User $userFromRequest */
|
||||
$userFromRequest = Authorization::skip(fn () => $dbForProject->getDocument('users', $userId));
|
||||
|
|
@ -295,7 +307,7 @@ $createSession = function (string $userId, string $secret, Request $request, Res
|
|||
]) !== 1;
|
||||
|
||||
if ($isAllowedTokenType && $hasUserEmail && $isSessionAlertsEnabled && $isNotFirstSession) {
|
||||
sendSessionAlert($locale, $user, $project, $session, $queueForMails);
|
||||
sendSessionAlert($locale, $user, $project, $platform, $session, $queueForMails);
|
||||
}
|
||||
|
||||
$queueForEvents
|
||||
|
|
@ -953,6 +965,7 @@ App::post('/v1/account/sessions/email')
|
|||
->inject('user')
|
||||
->inject('dbForProject')
|
||||
->inject('project')
|
||||
->inject('platform')
|
||||
->inject('locale')
|
||||
->inject('geodb')
|
||||
->inject('queueForEvents')
|
||||
|
|
@ -961,7 +974,7 @@ App::post('/v1/account/sessions/email')
|
|||
->inject('store')
|
||||
->inject('proofForPassword')
|
||||
->inject('proofForToken')
|
||||
->action(function (string $email, string $password, Request $request, Response $response, User $user, Database $dbForProject, Document $project, Locale $locale, Reader $geodb, Event $queueForEvents, Mail $queueForMails, Hooks $hooks, Store $store, ProofsPassword $proofForPassword, ProofsToken $proofForToken) {
|
||||
->action(function (string $email, string $password, Request $request, Response $response, User $user, Database $dbForProject, Document $project, array $platform, Locale $locale, Reader $geodb, Event $queueForEvents, Mail $queueForMails, Hooks $hooks, Store $store, ProofsPassword $proofForPassword, ProofsToken $proofForToken) {
|
||||
$email = \strtolower($email);
|
||||
$protocol = $request->getProtocol();
|
||||
|
||||
|
|
@ -1062,7 +1075,7 @@ App::post('/v1/account/sessions/email')
|
|||
Query::equal('userId', [$user->getId()]),
|
||||
]) !== 1
|
||||
) {
|
||||
sendSessionAlert($locale, $user, $project, $session, $queueForMails);
|
||||
sendSessionAlert($locale, $user, $project, $platform, $session, $queueForMails);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1250,6 +1263,7 @@ App::post('/v1/account/sessions/token')
|
|||
->inject('user')
|
||||
->inject('dbForProject')
|
||||
->inject('project')
|
||||
->inject('platform')
|
||||
->inject('locale')
|
||||
->inject('geodb')
|
||||
->inject('queueForEvents')
|
||||
|
|
@ -2251,11 +2265,16 @@ App::post('/v1/account/tokens/magic-url')
|
|||
->setSmtpSenderName($senderName);
|
||||
}
|
||||
|
||||
$projectName = $project->getAttribute('name');
|
||||
if ($project->getId() === 'console') {
|
||||
$projectName = $platform['platformName'];
|
||||
}
|
||||
|
||||
$emailVariables = [
|
||||
'direction' => $locale->getText('settings.direction'),
|
||||
// {{user}}, {{redirect}} and {{project}} are required in default and custom templates
|
||||
'user' => $user->getAttribute('name'),
|
||||
'project' => $project->getAttribute('name'),
|
||||
'project' => $projectName,
|
||||
'redirect' => $url,
|
||||
'agentDevice' => $agentDevice['deviceBrand'] ?? $agentDevice['deviceBrand'] ?? 'UNKNOWN',
|
||||
'agentClient' => $agentClient['clientName'] ?? 'UNKNOWN',
|
||||
|
|
@ -2270,8 +2289,13 @@ App::post('/v1/account/tokens/magic-url')
|
|||
->setPreview($preview)
|
||||
->setBody($body)
|
||||
->setVariables($emailVariables)
|
||||
->setRecipient($email)
|
||||
->trigger();
|
||||
->setRecipient($email);
|
||||
|
||||
if ($project->getId() === 'console') {
|
||||
$queueForMails->setSenderName($platform['emailSenderName']);
|
||||
}
|
||||
|
||||
$queueForMails->trigger();
|
||||
|
||||
$token->setAttribute('secret', $tokenSecret);
|
||||
|
||||
|
|
@ -2318,13 +2342,14 @@ App::post('/v1/account/tokens/email')
|
|||
->inject('response')
|
||||
->inject('user')
|
||||
->inject('project')
|
||||
->inject('platform')
|
||||
->inject('dbForProject')
|
||||
->inject('locale')
|
||||
->inject('queueForEvents')
|
||||
->inject('queueForMails')
|
||||
->inject('proofForPassword')
|
||||
->inject('proofForCode')
|
||||
->action(function (string $userId, string $email, bool $phrase, Request $request, Response $response, User $user, Document $project, Database $dbForProject, Locale $locale, Event $queueForEvents, Mail $queueForMails, ProofsPassword $proofForPassword, ProofsCode $proofForCode) {
|
||||
->action(function (string $userId, string $email, bool $phrase, Request $request, Response $response, User $user, Document $project, array $platform, Database $dbForProject, Locale $locale, Event $queueForEvents, Mail $queueForMails, ProofsPassword $proofForPassword, ProofsCode $proofForCode) {
|
||||
if (empty(System::getEnv('_APP_SMTP_HOST'))) {
|
||||
throw new Exception(Exception::GENERAL_SMTP_DISABLED, 'SMTP disabled');
|
||||
}
|
||||
|
|
@ -2525,12 +2550,17 @@ App::post('/v1/account/tokens/email')
|
|||
->setSmtpSenderName($senderName);
|
||||
}
|
||||
|
||||
$projectName = $project->getAttribute('name');
|
||||
if ($project->getId() === 'console') {
|
||||
$projectName = $platform['platformName'];
|
||||
}
|
||||
|
||||
$emailVariables = [
|
||||
'heading' => $heading,
|
||||
'direction' => $locale->getText('settings.direction'),
|
||||
// {{user}}, {{project}} and {{otp}} are required in the templates
|
||||
'user' => $user->getAttribute('name'),
|
||||
'project' => $project->getAttribute('name'),
|
||||
'project' => $projectName,
|
||||
'otp' => $tokenSecret,
|
||||
'agentDevice' => $agentDevice['deviceBrand'] ?? $agentDevice['deviceBrand'] ?? 'UNKNOWN',
|
||||
'agentClient' => $agentClient['clientName'] ?? 'UNKNOWN',
|
||||
|
|
@ -2542,13 +2572,14 @@ App::post('/v1/account/tokens/email')
|
|||
|
||||
if ($smtpBaseTemplate === APP_BRANDED_EMAIL_BASE_TEMPLATE) {
|
||||
$emailVariables = array_merge($emailVariables, [
|
||||
'accentColor' => APP_EMAIL_ACCENT_COLOR,
|
||||
'logoUrl' => APP_EMAIL_LOGO_URL,
|
||||
'twitterUrl' => APP_SOCIAL_TWITTER,
|
||||
'discordUrl' => APP_SOCIAL_DISCORD,
|
||||
'githubUrl' => APP_SOCIAL_GITHUB_APPWRITE,
|
||||
'termsUrl' => APP_EMAIL_TERMS_URL,
|
||||
'privacyUrl' => APP_EMAIL_PRIVACY_URL,
|
||||
'accentColor' => $platform['accentColor'],
|
||||
'logoUrl' => $platform['logoUrl'],
|
||||
'twitter' => $platform['twitterUrl'],
|
||||
'discord' => $platform['discordUrl'],
|
||||
'github' => $platform['githubUrl'],
|
||||
'terms' => $platform['termsUrl'],
|
||||
'privacy' => $platform['privacyUrl'],
|
||||
'platform' => $platform['platformName'],
|
||||
]);
|
||||
}
|
||||
|
||||
|
|
@ -2558,8 +2589,14 @@ App::post('/v1/account/tokens/email')
|
|||
->setBody($body)
|
||||
->setBodyTemplate($bodyTemplate)
|
||||
->setVariables($emailVariables)
|
||||
->setRecipient($email)
|
||||
->trigger();
|
||||
->setRecipient($email);
|
||||
|
||||
// since this is console project, set email sender name!
|
||||
if ($smtpBaseTemplate === APP_BRANDED_EMAIL_BASE_TEMPLATE) {
|
||||
$queueForMails->setSenderName($platform['emailSenderName']);
|
||||
}
|
||||
|
||||
$queueForMails->trigger();
|
||||
|
||||
$token->setAttribute('secret', $tokenSecret);
|
||||
|
||||
|
|
@ -2610,16 +2647,17 @@ App::put('/v1/account/sessions/magic-url')
|
|||
->inject('user')
|
||||
->inject('dbForProject')
|
||||
->inject('project')
|
||||
->inject('platform')
|
||||
->inject('locale')
|
||||
->inject('geodb')
|
||||
->inject('queueForEvents')
|
||||
->inject('queueForMails')
|
||||
->inject('store')
|
||||
->inject('proofForCode')
|
||||
->action(function ($userId, $secret, $request, $response, $user, $dbForProject, $project, $locale, $geodb, $queueForEvents, $queueForMails, $store, $proofForCode) use ($createSession) {
|
||||
->action(function ($userId, $secret, $request, $response, $user, $dbForProject, $project, $platform, $locale, $geodb, $queueForEvents, $queueForMails, $store, $proofForCode) use ($createSession) {
|
||||
$proofForToken = new ProofsToken(TOKEN_LENGTH_MAGIC_URL);
|
||||
$proofForToken->setHash(new Sha());
|
||||
$createSession($userId, $secret, $request, $response, $user, $dbForProject, $project, $locale, $geodb, $queueForEvents, $queueForMails, $store, $proofForToken, $proofForCode);
|
||||
$createSession($userId, $secret, $request, $response, $user, $dbForProject, $project, $platform, $locale, $geodb, $queueForEvents, $queueForMails, $store, $proofForToken, $proofForCode);
|
||||
});
|
||||
|
||||
App::put('/v1/account/sessions/phone')
|
||||
|
|
@ -2657,6 +2695,7 @@ App::put('/v1/account/sessions/phone')
|
|||
->inject('user')
|
||||
->inject('dbForProject')
|
||||
->inject('project')
|
||||
->inject('platform')
|
||||
->inject('locale')
|
||||
->inject('geodb')
|
||||
->inject('queueForEvents')
|
||||
|
|
@ -2697,6 +2736,7 @@ App::post('/v1/account/tokens/phone')
|
|||
->inject('response')
|
||||
->inject('user')
|
||||
->inject('project')
|
||||
->inject('platform')
|
||||
->inject('dbForProject')
|
||||
->inject('queueForEvents')
|
||||
->inject('queueForMessaging')
|
||||
|
|
@ -2706,7 +2746,7 @@ App::post('/v1/account/tokens/phone')
|
|||
->inject('plan')
|
||||
->inject('store')
|
||||
->inject('proofForCode')
|
||||
->action(function (string $userId, string $phone, Request $request, Response $response, User $user, Document $project, Database $dbForProject, Event $queueForEvents, Messaging $queueForMessaging, Locale $locale, callable $timelimit, StatsUsage $queueForStatsUsage, array $plan, Store $store, ProofsCode $proofForCode) {
|
||||
->action(function (string $userId, string $phone, Request $request, Response $response, User $user, Document $project, array $platform, Database $dbForProject, Event $queueForEvents, Messaging $queueForMessaging, Locale $locale, callable $timelimit, StatsUsage $queueForStatsUsage, array $plan, Store $store, ProofsCode $proofForCode) {
|
||||
if (empty(System::getEnv('_APP_SMS_PROVIDER'))) {
|
||||
throw new Exception(Exception::GENERAL_PHONE_DISABLED, 'Phone provider not configured');
|
||||
}
|
||||
|
|
@ -2823,9 +2863,14 @@ App::post('/v1/account/tokens/phone')
|
|||
$message = $customTemplate['message'] ?? $message;
|
||||
}
|
||||
|
||||
$projectName = $project->getAttribute('name');
|
||||
if ($project->getId() === 'console') {
|
||||
$projectName = $platform['platformName'];
|
||||
}
|
||||
|
||||
$messageContent = Template::fromString($locale->getText("sms.verification.body"));
|
||||
$messageContent
|
||||
->setParam('{{project}}', $project->getAttribute('name'))
|
||||
->setParam('{{project}}', $projectName)
|
||||
->setParam('{{secret}}', $secret);
|
||||
$messageContent = \strip_tags($messageContent->render());
|
||||
$message = $message->setParam('{{token}}', $messageContent);
|
||||
|
|
@ -3473,15 +3518,16 @@ App::post('/v1/account/recovery')
|
|||
->inject('user')
|
||||
->inject('dbForProject')
|
||||
->inject('project')
|
||||
->inject('platform')
|
||||
->inject('locale')
|
||||
->inject('queueForMails')
|
||||
->inject('queueForEvents')
|
||||
->inject('proofForToken')
|
||||
->action(function (string $email, string $url, Request $request, Response $response, User $user, Database $dbForProject, Document $project, Locale $locale, Mail $queueForMails, Event $queueForEvents, ProofsToken $proofForToken) {
|
||||
|
||||
->action(function (string $email, string $url, Request $request, Response $response, User $user, Database $dbForProject, Document $project, array $platform, Locale $locale, Mail $queueForMails, Event $queueForEvents, ProofsToken $proofForToken) {
|
||||
if (empty(System::getEnv('_APP_SMTP_HOST'))) {
|
||||
throw new Exception(Exception::GENERAL_SMTP_DISABLED, 'SMTP Disabled');
|
||||
}
|
||||
|
||||
$url = htmlentities($url);
|
||||
$email = \strtolower($email);
|
||||
|
||||
|
|
@ -3528,7 +3574,14 @@ App::post('/v1/account/recovery')
|
|||
$url['query'] = Template::mergeQuery(((isset($url['query'])) ? $url['query'] : ''), ['userId' => $profile->getId(), 'secret' => $secret, 'expire' => $expire]);
|
||||
$url = Template::unParseURL($url);
|
||||
|
||||
$projectName = $project->isEmpty() ? 'Console' : $project->getAttribute('name', '[APP-NAME]');
|
||||
$projectName = $project->isEmpty()
|
||||
? 'Console'
|
||||
: $project->getAttribute('name', '[APP-NAME]');
|
||||
|
||||
if ($project->getId() === 'console') {
|
||||
$projectName = $platform['platformName'];
|
||||
}
|
||||
|
||||
$body = $locale->getText("emails.recovery.body");
|
||||
$subject = $locale->getText("emails.recovery.subject");
|
||||
$preview = $locale->getText("emails.recovery.preview");
|
||||
|
|
@ -3606,8 +3659,13 @@ App::post('/v1/account/recovery')
|
|||
->setBody($body)
|
||||
->setVariables($emailVariables)
|
||||
->setSubject($subject)
|
||||
->setPreview($preview)
|
||||
->trigger();
|
||||
->setPreview($preview);
|
||||
|
||||
if ($project->getId() === 'console') {
|
||||
$queueForMails->setSenderName($platform['emailSenderName']);
|
||||
}
|
||||
|
||||
$queueForMails->trigger();
|
||||
|
||||
$recovery->setAttribute('secret', $secret);
|
||||
|
||||
|
|
@ -3767,13 +3825,14 @@ App::post('/v1/account/verifications/email')
|
|||
->inject('request')
|
||||
->inject('response')
|
||||
->inject('project')
|
||||
->inject('platform')
|
||||
->inject('user')
|
||||
->inject('dbForProject')
|
||||
->inject('locale')
|
||||
->inject('queueForEvents')
|
||||
->inject('queueForMails')
|
||||
->inject('proofForToken')
|
||||
->action(function (string $url, Request $request, Response $response, Document $project, User $user, Database $dbForProject, Locale $locale, Event $queueForEvents, Mail $queueForMails, ProofsToken $proofForToken) {
|
||||
->action(function (string $url, Request $request, Response $response, Document $project, array $platform, User $user, Database $dbForProject, Locale $locale, Event $queueForEvents, Mail $queueForMails, ProofsToken $proofForToken) {
|
||||
|
||||
if (empty(System::getEnv('_APP_SMTP_HOST'))) {
|
||||
throw new Exception(Exception::GENERAL_SMTP_DISABLED, 'SMTP Disabled');
|
||||
|
|
@ -3817,7 +3876,15 @@ App::post('/v1/account/verifications/email')
|
|||
$url['query'] = Template::mergeQuery(((isset($url['query'])) ? $url['query'] : ''), ['userId' => $user->getId(), 'secret' => $verificationSecret, 'expire' => $expire]);
|
||||
$url = Template::unParseURL($url);
|
||||
|
||||
$projectName = $project->isEmpty() ? 'Console' : $project->getAttribute('name', '[APP-NAME]');
|
||||
$projectName = $project->isEmpty()
|
||||
? 'Console'
|
||||
: $project->getAttribute('name', '[APP-NAME]');
|
||||
|
||||
if ($project->getId() === 'console') {
|
||||
$projectName = $platform['platformName'];
|
||||
}
|
||||
|
||||
|
||||
$body = $locale->getText("emails.verification.body");
|
||||
$preview = $locale->getText("emails.verification.preview");
|
||||
$subject = $locale->getText("emails.verification.subject");
|
||||
|
|
@ -3903,13 +3970,14 @@ App::post('/v1/account/verifications/email')
|
|||
|
||||
if ($smtpBaseTemplate === APP_BRANDED_EMAIL_BASE_TEMPLATE) {
|
||||
$emailVariables = array_merge($emailVariables, [
|
||||
'accentColor' => APP_EMAIL_ACCENT_COLOR,
|
||||
'logoUrl' => APP_EMAIL_LOGO_URL,
|
||||
'twitterUrl' => APP_SOCIAL_TWITTER,
|
||||
'discordUrl' => APP_SOCIAL_DISCORD,
|
||||
'githubUrl' => APP_SOCIAL_GITHUB_APPWRITE,
|
||||
'termsUrl' => APP_EMAIL_TERMS_URL,
|
||||
'privacyUrl' => APP_EMAIL_PRIVACY_URL,
|
||||
'accentColor' => $platform['accentColor'],
|
||||
'logoUrl' => $platform['logoUrl'],
|
||||
'twitter' => $platform['twitterUrl'],
|
||||
'discord' => $platform['discordUrl'],
|
||||
'github' => $platform['githubUrl'],
|
||||
'terms' => $platform['termsUrl'],
|
||||
'privacy' => $platform['privacyUrl'],
|
||||
'platform' => $platform['platformName'],
|
||||
]);
|
||||
}
|
||||
|
||||
|
|
@ -3920,8 +3988,13 @@ App::post('/v1/account/verifications/email')
|
|||
->setBodyTemplate($bodyTemplate)
|
||||
->setVariables($emailVariables)
|
||||
->setRecipient($user->getAttribute('email'))
|
||||
->setName($user->getAttribute('name') ?? '')
|
||||
->trigger();
|
||||
->setName($user->getAttribute('name') ?? '');
|
||||
|
||||
if ($project->getId() === 'console') {
|
||||
$queueForMails->setSenderName($platform['emailSenderName']);
|
||||
}
|
||||
|
||||
$queueForMails->trigger();
|
||||
|
||||
$verification->setAttribute('secret', $verificationSecret);
|
||||
|
||||
|
|
|
|||
|
|
@ -69,10 +69,11 @@ App::post('/v1/migrations/appwrite')
|
|||
->inject('response')
|
||||
->inject('dbForProject')
|
||||
->inject('project')
|
||||
->inject('platform')
|
||||
->inject('user')
|
||||
->inject('queueForEvents')
|
||||
->inject('queueForMigrations')
|
||||
->action(function (array $resources, string $endpoint, string $projectId, string $apiKey, Response $response, Database $dbForProject, Document $project, Document $user, Event $queueForEvents, Migration $queueForMigrations) {
|
||||
->action(function (array $resources, string $endpoint, string $projectId, string $apiKey, Response $response, Database $dbForProject, Document $project, array $platform, Document $user, Event $queueForEvents, Migration $queueForMigrations) {
|
||||
$migration = $dbForProject->createDocument('migrations', new Document([
|
||||
'$id' => ID::unique(),
|
||||
'status' => 'pending',
|
||||
|
|
@ -96,6 +97,7 @@ App::post('/v1/migrations/appwrite')
|
|||
$queueForMigrations
|
||||
->setMigration($migration)
|
||||
->setProject($project)
|
||||
->setPlatform($platform)
|
||||
->setUser($user)
|
||||
->trigger();
|
||||
|
||||
|
|
@ -128,10 +130,11 @@ App::post('/v1/migrations/firebase')
|
|||
->inject('response')
|
||||
->inject('dbForProject')
|
||||
->inject('project')
|
||||
->inject('platform')
|
||||
->inject('user')
|
||||
->inject('queueForEvents')
|
||||
->inject('queueForMigrations')
|
||||
->action(function (array $resources, string $serviceAccount, Response $response, Database $dbForProject, Document $project, Document $user, Event $queueForEvents, Migration $queueForMigrations) {
|
||||
->action(function (array $resources, string $serviceAccount, Response $response, Database $dbForProject, Document $project, array $platform, Document $user, Event $queueForEvents, Migration $queueForMigrations) {
|
||||
$serviceAccountData = json_decode($serviceAccount, true);
|
||||
|
||||
if (empty($serviceAccountData)) {
|
||||
|
|
@ -163,6 +166,7 @@ App::post('/v1/migrations/firebase')
|
|||
$queueForMigrations
|
||||
->setMigration($migration)
|
||||
->setProject($project)
|
||||
->setPlatform($platform)
|
||||
->setUser($user)
|
||||
->trigger();
|
||||
|
||||
|
|
@ -200,10 +204,11 @@ App::post('/v1/migrations/supabase')
|
|||
->inject('response')
|
||||
->inject('dbForProject')
|
||||
->inject('project')
|
||||
->inject('platform')
|
||||
->inject('user')
|
||||
->inject('queueForEvents')
|
||||
->inject('queueForMigrations')
|
||||
->action(function (array $resources, string $endpoint, string $apiKey, string $databaseHost, string $username, string $password, int $port, Response $response, Database $dbForProject, Document $project, Document $user, Event $queueForEvents, Migration $queueForMigrations) {
|
||||
->action(function (array $resources, string $endpoint, string $apiKey, string $databaseHost, string $username, string $password, int $port, Response $response, Database $dbForProject, Document $project, array $platform, Document $user, Event $queueForEvents, Migration $queueForMigrations) {
|
||||
$migration = $dbForProject->createDocument('migrations', new Document([
|
||||
'$id' => ID::unique(),
|
||||
'status' => 'pending',
|
||||
|
|
@ -230,6 +235,7 @@ App::post('/v1/migrations/supabase')
|
|||
$queueForMigrations
|
||||
->setMigration($migration)
|
||||
->setProject($project)
|
||||
->setPlatform($platform)
|
||||
->setUser($user)
|
||||
->trigger();
|
||||
|
||||
|
|
@ -268,10 +274,11 @@ App::post('/v1/migrations/nhost')
|
|||
->inject('response')
|
||||
->inject('dbForProject')
|
||||
->inject('project')
|
||||
->inject('platform')
|
||||
->inject('user')
|
||||
->inject('queueForEvents')
|
||||
->inject('queueForMigrations')
|
||||
->action(function (array $resources, string $subdomain, string $region, string $adminSecret, string $database, string $username, string $password, int $port, Response $response, Database $dbForProject, Document $project, Document $user, Event $queueForEvents, Migration $queueForMigrations) {
|
||||
->action(function (array $resources, string $subdomain, string $region, string $adminSecret, string $database, string $username, string $password, int $port, Response $response, Database $dbForProject, Document $project, array $platform, Document $user, Event $queueForEvents, Migration $queueForMigrations) {
|
||||
$migration = $dbForProject->createDocument('migrations', new Document([
|
||||
'$id' => ID::unique(),
|
||||
'status' => 'pending',
|
||||
|
|
@ -299,6 +306,7 @@ App::post('/v1/migrations/nhost')
|
|||
$queueForMigrations
|
||||
->setMigration($migration)
|
||||
->setProject($project)
|
||||
->setPlatform($platform)
|
||||
->setUser($user)
|
||||
->trigger();
|
||||
|
||||
|
|
@ -335,6 +343,7 @@ App::post('/v1/migrations/csv/imports')
|
|||
->inject('dbForProject')
|
||||
->inject('dbForPlatform')
|
||||
->inject('project')
|
||||
->inject('platform')
|
||||
->inject('deviceForFiles')
|
||||
->inject('deviceForMigrations')
|
||||
->inject('queueForEvents')
|
||||
|
|
@ -348,6 +357,7 @@ App::post('/v1/migrations/csv/imports')
|
|||
Database $dbForProject,
|
||||
Database $dbForPlatform,
|
||||
Document $project,
|
||||
array $platform,
|
||||
Device $deviceForFiles,
|
||||
Device $deviceForMigrations,
|
||||
Event $queueForEvents,
|
||||
|
|
@ -441,6 +451,7 @@ App::post('/v1/migrations/csv/imports')
|
|||
$queueForMigrations
|
||||
->setMigration($migration)
|
||||
->setProject($project)
|
||||
->setProject($project)
|
||||
->trigger();
|
||||
|
||||
$response
|
||||
|
|
@ -481,6 +492,7 @@ App::post('/v1/migrations/csv/exports')
|
|||
->inject('dbForProject')
|
||||
->inject('dbForPlatform')
|
||||
->inject('project')
|
||||
->inject('platform')
|
||||
->inject('queueForEvents')
|
||||
->inject('queueForMigrations')
|
||||
->action(function (
|
||||
|
|
@ -498,6 +510,7 @@ App::post('/v1/migrations/csv/exports')
|
|||
Database $dbForProject,
|
||||
Database $dbForPlatform,
|
||||
Document $project,
|
||||
array $platform,
|
||||
Event $queueForEvents,
|
||||
Migration $queueForMigrations
|
||||
) {
|
||||
|
|
@ -571,6 +584,7 @@ App::post('/v1/migrations/csv/exports')
|
|||
$queueForMigrations
|
||||
->setMigration($migration)
|
||||
->setProject($project)
|
||||
->setPlatform($platform)
|
||||
->trigger();
|
||||
|
||||
$response
|
||||
|
|
@ -903,9 +917,10 @@ App::patch('/v1/migrations/:migrationId')
|
|||
->inject('response')
|
||||
->inject('dbForProject')
|
||||
->inject('project')
|
||||
->inject('platform')
|
||||
->inject('user')
|
||||
->inject('queueForMigrations')
|
||||
->action(function (string $migrationId, Response $response, Database $dbForProject, Document $project, Document $user, Migration $queueForMigrations) {
|
||||
->action(function (string $migrationId, Response $response, Database $dbForProject, Document $project, array $platform, Document $user, Migration $queueForMigrations) {
|
||||
$migration = $dbForProject->getDocument('migrations', $migrationId);
|
||||
|
||||
if ($migration->isEmpty()) {
|
||||
|
|
@ -924,6 +939,7 @@ App::patch('/v1/migrations/:migrationId')
|
|||
$queueForMigrations
|
||||
->setMigration($migration)
|
||||
->setProject($project)
|
||||
->setPlatform($platform)
|
||||
->setUser($user)
|
||||
->trigger();
|
||||
|
||||
|
|
|
|||
|
|
@ -60,6 +60,7 @@ const APP_DATABASE_TIMEOUT_MILLISECONDS_API = 15 * 1000; // 15 seconds
|
|||
const APP_DATABASE_TIMEOUT_MILLISECONDS_WORKER = 300 * 1000; // 5 minutes
|
||||
const APP_DATABASE_TIMEOUT_MILLISECONDS_TASK = 300 * 1000; // 5 minutes
|
||||
const APP_DATABASE_QUERY_MAX_VALUES = 500;
|
||||
const APP_DATABASE_QUERY_MAX_VALUES_WORKER = 5000;
|
||||
const APP_DATABASE_ENCRYPT_SIZE_MIN = 150;
|
||||
const APP_DATABASE_TXN_TTL_MIN = 60; // 1 minute
|
||||
const APP_DATABASE_TXN_TTL_MAX = 3600; // 1 hour
|
||||
|
|
|
|||
|
|
@ -281,6 +281,7 @@ App::setResource('cors', fn (array $allowedHostnames) => new Cors(
|
|||
'X-SDK-Language',
|
||||
'X-SDK-Platform',
|
||||
'X-SDK-GraphQL',
|
||||
'X-SDK-Profile',
|
||||
// Caching
|
||||
'Range',
|
||||
'Cache-Control',
|
||||
|
|
|
|||
|
|
@ -183,7 +183,7 @@ Server::setResource('getLogsDB', function (Group $pools, Cache $cache) {
|
|||
->setSharedTables(true)
|
||||
->setNamespace('logsV1')
|
||||
->setTimeout(APP_DATABASE_TIMEOUT_MILLISECONDS_WORKER)
|
||||
->setMaxQueryValues(APP_DATABASE_QUERY_MAX_VALUES);
|
||||
->setMaxQueryValues(APP_DATABASE_QUERY_MAX_VALUES_WORKER);
|
||||
|
||||
// set tenant
|
||||
if ($project !== null && !$project->isEmpty() && $project->getId() !== 'console') {
|
||||
|
|
|
|||
|
|
@ -14,7 +14,13 @@ databases.updateDocument(
|
|||
"<DATABASE_ID>", // databaseId
|
||||
"<COLLECTION_ID>", // collectionId
|
||||
"<DOCUMENT_ID>", // documentId
|
||||
Map.of("a", "b"), // data (optional)
|
||||
Map.of(
|
||||
"username", "walter.obrien",
|
||||
"email", "walter.obrien@example.com",
|
||||
"fullName", "Walter O'Brien",
|
||||
"age", 33,
|
||||
"isAdmin", false
|
||||
), // data (optional)
|
||||
List.of(Permission.read(Role.any())), // permissions (optional)
|
||||
"<TRANSACTION_ID>", // transactionId (optional)
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
|
|
|
|||
|
|
@ -14,7 +14,13 @@ databases.upsertDocument(
|
|||
"<DATABASE_ID>", // databaseId
|
||||
"<COLLECTION_ID>", // collectionId
|
||||
"<DOCUMENT_ID>", // documentId
|
||||
Map.of("a", "b"), // data
|
||||
Map.of(
|
||||
"username", "walter.obrien",
|
||||
"email", "walter.obrien@example.com",
|
||||
"fullName", "Walter O'Brien",
|
||||
"age", 30,
|
||||
"isAdmin", false
|
||||
), // data (optional)
|
||||
List.of(Permission.read(Role.any())), // permissions (optional)
|
||||
"<TRANSACTION_ID>", // transactionId (optional)
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
|
|
|
|||
|
|
@ -14,7 +14,13 @@ tablesDB.updateRow(
|
|||
"<DATABASE_ID>", // databaseId
|
||||
"<TABLE_ID>", // tableId
|
||||
"<ROW_ID>", // rowId
|
||||
Map.of("a", "b"), // data (optional)
|
||||
Map.of(
|
||||
"username", "walter.obrien",
|
||||
"email", "walter.obrien@example.com",
|
||||
"fullName", "Walter O'Brien",
|
||||
"age", 33,
|
||||
"isAdmin", false
|
||||
), // data (optional)
|
||||
List.of(Permission.read(Role.any())), // permissions (optional)
|
||||
"<TRANSACTION_ID>", // transactionId (optional)
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
|
|
|
|||
|
|
@ -14,7 +14,13 @@ tablesDB.upsertRow(
|
|||
"<DATABASE_ID>", // databaseId
|
||||
"<TABLE_ID>", // tableId
|
||||
"<ROW_ID>", // rowId
|
||||
Map.of("a", "b"), // data (optional)
|
||||
Map.of(
|
||||
"username", "walter.obrien",
|
||||
"email", "walter.obrien@example.com",
|
||||
"fullName", "Walter O'Brien",
|
||||
"age", 33,
|
||||
"isAdmin", false
|
||||
), // data (optional)
|
||||
List.of(Permission.read(Role.any())), // permissions (optional)
|
||||
"<TRANSACTION_ID>", // transactionId (optional)
|
||||
new CoroutineCallback<>((result, error) -> {
|
||||
|
|
|
|||
|
|
@ -14,7 +14,13 @@ val result = databases.updateDocument(
|
|||
databaseId = "<DATABASE_ID>",
|
||||
collectionId = "<COLLECTION_ID>",
|
||||
documentId = "<DOCUMENT_ID>",
|
||||
data = mapOf( "a" to "b" ), // (optional)
|
||||
data = mapOf(
|
||||
"username" to "walter.obrien",
|
||||
"email" to "walter.obrien@example.com",
|
||||
"fullName" to "Walter O'Brien",
|
||||
"age" to 33,
|
||||
"isAdmin" to false
|
||||
), // (optional)
|
||||
permissions = listOf(Permission.read(Role.any())), // (optional)
|
||||
transactionId = "<TRANSACTION_ID>", // (optional)
|
||||
)
|
||||
|
|
@ -14,7 +14,13 @@ val result = databases.upsertDocument(
|
|||
databaseId = "<DATABASE_ID>",
|
||||
collectionId = "<COLLECTION_ID>",
|
||||
documentId = "<DOCUMENT_ID>",
|
||||
data = mapOf( "a" to "b" ),
|
||||
data = mapOf(
|
||||
"username" to "walter.obrien",
|
||||
"email" to "walter.obrien@example.com",
|
||||
"fullName" to "Walter O'Brien",
|
||||
"age" to 30,
|
||||
"isAdmin" to false
|
||||
), // (optional)
|
||||
permissions = listOf(Permission.read(Role.any())), // (optional)
|
||||
transactionId = "<TRANSACTION_ID>", // (optional)
|
||||
)
|
||||
|
|
@ -14,7 +14,13 @@ val result = tablesDB.updateRow(
|
|||
databaseId = "<DATABASE_ID>",
|
||||
tableId = "<TABLE_ID>",
|
||||
rowId = "<ROW_ID>",
|
||||
data = mapOf( "a" to "b" ), // (optional)
|
||||
data = mapOf(
|
||||
"username" to "walter.obrien",
|
||||
"email" to "walter.obrien@example.com",
|
||||
"fullName" to "Walter O'Brien",
|
||||
"age" to 33,
|
||||
"isAdmin" to false
|
||||
), // (optional)
|
||||
permissions = listOf(Permission.read(Role.any())), // (optional)
|
||||
transactionId = "<TRANSACTION_ID>", // (optional)
|
||||
)
|
||||
|
|
@ -14,7 +14,13 @@ val result = tablesDB.upsertRow(
|
|||
databaseId = "<DATABASE_ID>",
|
||||
tableId = "<TABLE_ID>",
|
||||
rowId = "<ROW_ID>",
|
||||
data = mapOf( "a" to "b" ), // (optional)
|
||||
data = mapOf(
|
||||
"username" to "walter.obrien",
|
||||
"email" to "walter.obrien@example.com",
|
||||
"fullName" to "Walter O'Brien",
|
||||
"age" to 33,
|
||||
"isAdmin" to false
|
||||
), // (optional)
|
||||
permissions = listOf(Permission.read(Role.any())), // (optional)
|
||||
transactionId = "<TRANSACTION_ID>", // (optional)
|
||||
)
|
||||
|
|
@ -10,7 +10,13 @@ let document = try await databases.updateDocument(
|
|||
databaseId: "<DATABASE_ID>",
|
||||
collectionId: "<COLLECTION_ID>",
|
||||
documentId: "<DOCUMENT_ID>",
|
||||
data: [:], // optional
|
||||
data: [
|
||||
"username": "walter.obrien",
|
||||
"email": "walter.obrien@example.com",
|
||||
"fullName": "Walter O'Brien",
|
||||
"age": 33,
|
||||
"isAdmin": false
|
||||
], // optional
|
||||
permissions: [Permission.read(Role.any())], // optional
|
||||
transactionId: "<TRANSACTION_ID>" // optional
|
||||
)
|
||||
|
|
|
|||
|
|
@ -10,7 +10,13 @@ let document = try await databases.upsertDocument(
|
|||
databaseId: "<DATABASE_ID>",
|
||||
collectionId: "<COLLECTION_ID>",
|
||||
documentId: "<DOCUMENT_ID>",
|
||||
data: [:],
|
||||
data: [
|
||||
"username": "walter.obrien",
|
||||
"email": "walter.obrien@example.com",
|
||||
"fullName": "Walter O'Brien",
|
||||
"age": 30,
|
||||
"isAdmin": false
|
||||
], // optional
|
||||
permissions: [Permission.read(Role.any())], // optional
|
||||
transactionId: "<TRANSACTION_ID>" // optional
|
||||
)
|
||||
|
|
|
|||
|
|
@ -10,7 +10,13 @@ let row = try await tablesDB.updateRow(
|
|||
databaseId: "<DATABASE_ID>",
|
||||
tableId: "<TABLE_ID>",
|
||||
rowId: "<ROW_ID>",
|
||||
data: [:], // optional
|
||||
data: [
|
||||
"username": "walter.obrien",
|
||||
"email": "walter.obrien@example.com",
|
||||
"fullName": "Walter O'Brien",
|
||||
"age": 33,
|
||||
"isAdmin": false
|
||||
], // optional
|
||||
permissions: [Permission.read(Role.any())], // optional
|
||||
transactionId: "<TRANSACTION_ID>" // optional
|
||||
)
|
||||
|
|
|
|||
|
|
@ -10,7 +10,13 @@ let row = try await tablesDB.upsertRow(
|
|||
databaseId: "<DATABASE_ID>",
|
||||
tableId: "<TABLE_ID>",
|
||||
rowId: "<ROW_ID>",
|
||||
data: [:], // optional
|
||||
data: [
|
||||
"username": "walter.obrien",
|
||||
"email": "walter.obrien@example.com",
|
||||
"fullName": "Walter O'Brien",
|
||||
"age": 33,
|
||||
"isAdmin": false
|
||||
], // optional
|
||||
permissions: [Permission.read(Role.any())], // optional
|
||||
transactionId: "<TRANSACTION_ID>" // optional
|
||||
)
|
||||
|
|
|
|||
|
|
@ -12,7 +12,13 @@ Document result = await databases.updateDocument(
|
|||
databaseId: '<DATABASE_ID>',
|
||||
collectionId: '<COLLECTION_ID>',
|
||||
documentId: '<DOCUMENT_ID>',
|
||||
data: {}, // optional
|
||||
data: {
|
||||
"username": "walter.obrien",
|
||||
"email": "walter.obrien@example.com",
|
||||
"fullName": "Walter O'Brien",
|
||||
"age": 33,
|
||||
"isAdmin": false
|
||||
}, // optional
|
||||
permissions: [Permission.read(Role.any())], // optional
|
||||
transactionId: '<TRANSACTION_ID>', // optional
|
||||
);
|
||||
|
|
|
|||
|
|
@ -12,7 +12,13 @@ Document result = await databases.upsertDocument(
|
|||
databaseId: '<DATABASE_ID>',
|
||||
collectionId: '<COLLECTION_ID>',
|
||||
documentId: '<DOCUMENT_ID>',
|
||||
data: {},
|
||||
data: {
|
||||
"username": "walter.obrien",
|
||||
"email": "walter.obrien@example.com",
|
||||
"fullName": "Walter O'Brien",
|
||||
"age": 30,
|
||||
"isAdmin": false
|
||||
}, // optional
|
||||
permissions: [Permission.read(Role.any())], // optional
|
||||
transactionId: '<TRANSACTION_ID>', // optional
|
||||
);
|
||||
|
|
|
|||
|
|
@ -12,7 +12,13 @@ Row result = await tablesDB.updateRow(
|
|||
databaseId: '<DATABASE_ID>',
|
||||
tableId: '<TABLE_ID>',
|
||||
rowId: '<ROW_ID>',
|
||||
data: {}, // optional
|
||||
data: {
|
||||
"username": "walter.obrien",
|
||||
"email": "walter.obrien@example.com",
|
||||
"fullName": "Walter O'Brien",
|
||||
"age": 33,
|
||||
"isAdmin": false
|
||||
}, // optional
|
||||
permissions: [Permission.read(Role.any())], // optional
|
||||
transactionId: '<TRANSACTION_ID>', // optional
|
||||
);
|
||||
|
|
|
|||
|
|
@ -12,7 +12,13 @@ Row result = await tablesDB.upsertRow(
|
|||
databaseId: '<DATABASE_ID>',
|
||||
tableId: '<TABLE_ID>',
|
||||
rowId: '<ROW_ID>',
|
||||
data: {}, // optional
|
||||
data: {
|
||||
"username": "walter.obrien",
|
||||
"email": "walter.obrien@example.com",
|
||||
"fullName": "Walter O'Brien",
|
||||
"age": 33,
|
||||
"isAdmin": false
|
||||
}, // optional
|
||||
permissions: [Permission.read(Role.any())], // optional
|
||||
transactionId: '<TRANSACTION_ID>', // optional
|
||||
);
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ mutation {
|
|||
databaseId: "<DATABASE_ID>",
|
||||
collectionId: "<COLLECTION_ID>",
|
||||
documentId: "<DOCUMENT_ID>",
|
||||
data: "{}",
|
||||
data: "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}",
|
||||
permissions: ["read("any")"],
|
||||
transactionId: "<TRANSACTION_ID>"
|
||||
) {
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ mutation {
|
|||
databaseId: "<DATABASE_ID>",
|
||||
collectionId: "<COLLECTION_ID>",
|
||||
documentId: "<DOCUMENT_ID>",
|
||||
data: "{}",
|
||||
data: "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":30,\"isAdmin\":false}",
|
||||
permissions: ["read("any")"],
|
||||
transactionId: "<TRANSACTION_ID>"
|
||||
) {
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ mutation {
|
|||
databaseId: "<DATABASE_ID>",
|
||||
tableId: "<TABLE_ID>",
|
||||
rowId: "<ROW_ID>",
|
||||
data: "{}",
|
||||
data: "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}",
|
||||
permissions: ["read("any")"],
|
||||
transactionId: "<TRANSACTION_ID>"
|
||||
) {
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ mutation {
|
|||
databaseId: "<DATABASE_ID>",
|
||||
tableId: "<TABLE_ID>",
|
||||
rowId: "<ROW_ID>",
|
||||
data: "{}",
|
||||
data: "{\"username\":\"walter.obrien\",\"email\":\"walter.obrien@example.com\",\"fullName\":\"Walter O'Brien\",\"age\":33,\"isAdmin\":false}",
|
||||
permissions: ["read("any")"],
|
||||
transactionId: "<TRANSACTION_ID>"
|
||||
) {
|
||||
|
|
|
|||
|
|
@ -10,7 +10,13 @@ const result = await databases.updateDocument({
|
|||
databaseId: '<DATABASE_ID>',
|
||||
collectionId: '<COLLECTION_ID>',
|
||||
documentId: '<DOCUMENT_ID>',
|
||||
data: {}, // optional
|
||||
data: {
|
||||
"username": "walter.obrien",
|
||||
"email": "walter.obrien@example.com",
|
||||
"fullName": "Walter O'Brien",
|
||||
"age": 33,
|
||||
"isAdmin": false
|
||||
}, // optional
|
||||
permissions: ["read("any")"], // optional
|
||||
transactionId: '<TRANSACTION_ID>' // optional
|
||||
});
|
||||
|
|
|
|||
|
|
@ -10,7 +10,13 @@ const result = await databases.upsertDocument({
|
|||
databaseId: '<DATABASE_ID>',
|
||||
collectionId: '<COLLECTION_ID>',
|
||||
documentId: '<DOCUMENT_ID>',
|
||||
data: {},
|
||||
data: {
|
||||
"username": "walter.obrien",
|
||||
"email": "walter.obrien@example.com",
|
||||
"fullName": "Walter O'Brien",
|
||||
"age": 30,
|
||||
"isAdmin": false
|
||||
}, // optional
|
||||
permissions: ["read("any")"], // optional
|
||||
transactionId: '<TRANSACTION_ID>' // optional
|
||||
});
|
||||
|
|
|
|||
|
|
@ -10,7 +10,13 @@ const result = await tablesDB.updateRow({
|
|||
databaseId: '<DATABASE_ID>',
|
||||
tableId: '<TABLE_ID>',
|
||||
rowId: '<ROW_ID>',
|
||||
data: {}, // optional
|
||||
data: {
|
||||
"username": "walter.obrien",
|
||||
"email": "walter.obrien@example.com",
|
||||
"fullName": "Walter O'Brien",
|
||||
"age": 33,
|
||||
"isAdmin": false
|
||||
}, // optional
|
||||
permissions: ["read("any")"], // optional
|
||||
transactionId: '<TRANSACTION_ID>' // optional
|
||||
});
|
||||
|
|
|
|||
|
|
@ -10,7 +10,13 @@ const result = await tablesDB.upsertRow({
|
|||
databaseId: '<DATABASE_ID>',
|
||||
tableId: '<TABLE_ID>',
|
||||
rowId: '<ROW_ID>',
|
||||
data: {}, // optional
|
||||
data: {
|
||||
"username": "walter.obrien",
|
||||
"email": "walter.obrien@example.com",
|
||||
"fullName": "Walter O'Brien",
|
||||
"age": 33,
|
||||
"isAdmin": false
|
||||
}, // optional
|
||||
permissions: ["read("any")"], // optional
|
||||
transactionId: '<TRANSACTION_ID>' // optional
|
||||
});
|
||||
|
|
|
|||
|
|
@ -3,4 +3,6 @@ Host: cloud.appwrite.io
|
|||
Content-Type: application/json
|
||||
X-Appwrite-Response-Format: 1.8.0
|
||||
X-Appwrite-Project: <YOUR_PROJECT_ID>
|
||||
X-Appwrite-Session:
|
||||
X-Appwrite-JWT: <YOUR_JWT>
|
||||
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@ Host: cloud.appwrite.io
|
|||
Content-Type: application/json
|
||||
X-Appwrite-Response-Format: 1.8.0
|
||||
X-Appwrite-Project: <YOUR_PROJECT_ID>
|
||||
X-Appwrite-Session:
|
||||
X-Appwrite-JWT: <YOUR_JWT>
|
||||
|
||||
{
|
||||
"email": "email@example.com",
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@ Host: cloud.appwrite.io
|
|||
Content-Type: application/json
|
||||
X-Appwrite-Response-Format: 1.8.0
|
||||
X-Appwrite-Project: <YOUR_PROJECT_ID>
|
||||
X-Appwrite-Session:
|
||||
X-Appwrite-JWT: <YOUR_JWT>
|
||||
|
||||
{
|
||||
"userId": "<USER_ID>",
|
||||
|
|
|
|||
|
|
@ -3,4 +3,6 @@ Host: cloud.appwrite.io
|
|||
Content-Type: application/json
|
||||
X-Appwrite-Response-Format: 1.8.0
|
||||
X-Appwrite-Project: <YOUR_PROJECT_ID>
|
||||
X-Appwrite-Session:
|
||||
X-Appwrite-JWT: <YOUR_JWT>
|
||||
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@ Host: cloud.appwrite.io
|
|||
Content-Type: application/json
|
||||
X-Appwrite-Response-Format: 1.8.0
|
||||
X-Appwrite-Project: <YOUR_PROJECT_ID>
|
||||
X-Appwrite-Session:
|
||||
X-Appwrite-JWT: <YOUR_JWT>
|
||||
|
||||
{
|
||||
"userId": "<USER_ID>",
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@ Host: cloud.appwrite.io
|
|||
Content-Type: application/json
|
||||
X-Appwrite-Response-Format: 1.8.0
|
||||
X-Appwrite-Project: <YOUR_PROJECT_ID>
|
||||
X-Appwrite-Session:
|
||||
X-Appwrite-JWT: <YOUR_JWT>
|
||||
|
||||
{
|
||||
"factor": "email"
|
||||
|
|
|
|||
|
|
@ -2,3 +2,5 @@ GET /v1/account/sessions/oauth2/{provider} HTTP/1.1
|
|||
Host: cloud.appwrite.io
|
||||
X-Appwrite-Response-Format: 1.8.0
|
||||
X-Appwrite-Project: <YOUR_PROJECT_ID>
|
||||
X-Appwrite-Session:
|
||||
X-Appwrite-JWT: <YOUR_JWT>
|
||||
|
|
|
|||
|
|
@ -2,3 +2,5 @@ GET /v1/account/tokens/oauth2/{provider} HTTP/1.1
|
|||
Host: cloud.appwrite.io
|
||||
X-Appwrite-Response-Format: 1.8.0
|
||||
X-Appwrite-Project: <YOUR_PROJECT_ID>
|
||||
X-Appwrite-Session:
|
||||
X-Appwrite-JWT: <YOUR_JWT>
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@ Host: cloud.appwrite.io
|
|||
Content-Type: application/json
|
||||
X-Appwrite-Response-Format: 1.8.0
|
||||
X-Appwrite-Project: <YOUR_PROJECT_ID>
|
||||
X-Appwrite-Session:
|
||||
X-Appwrite-JWT: <YOUR_JWT>
|
||||
|
||||
{
|
||||
"userId": "<USER_ID>",
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@ Host: cloud.appwrite.io
|
|||
Content-Type: application/json
|
||||
X-Appwrite-Response-Format: 1.8.0
|
||||
X-Appwrite-Project: <YOUR_PROJECT_ID>
|
||||
X-Appwrite-Session:
|
||||
X-Appwrite-JWT: <YOUR_JWT>
|
||||
|
||||
{
|
||||
"userId": "<USER_ID>",
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@ Host: cloud.appwrite.io
|
|||
Content-Type: application/json
|
||||
X-Appwrite-Response-Format: 1.8.0
|
||||
X-Appwrite-Project: <YOUR_PROJECT_ID>
|
||||
X-Appwrite-Session:
|
||||
X-Appwrite-JWT: <YOUR_JWT>
|
||||
|
||||
{
|
||||
"userId": "<USER_ID>",
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@ Host: cloud.appwrite.io
|
|||
Content-Type: application/json
|
||||
X-Appwrite-Response-Format: 1.8.0
|
||||
X-Appwrite-Project: <YOUR_PROJECT_ID>
|
||||
X-Appwrite-Session:
|
||||
X-Appwrite-JWT: <YOUR_JWT>
|
||||
|
||||
{
|
||||
"userId": "<USER_ID>",
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@ Host: cloud.appwrite.io
|
|||
Content-Type: application/json
|
||||
X-Appwrite-Response-Format: 1.8.0
|
||||
X-Appwrite-Project: <YOUR_PROJECT_ID>
|
||||
X-Appwrite-Session:
|
||||
X-Appwrite-JWT: <YOUR_JWT>
|
||||
|
||||
{
|
||||
"userId": "<USER_ID>",
|
||||
|
|
|
|||
|
|
@ -7,7 +7,13 @@ X-Appwrite-Session:
|
|||
X-Appwrite-JWT: <YOUR_JWT>
|
||||
|
||||
{
|
||||
"data": {},
|
||||
"data": {
|
||||
"username": "walter.obrien",
|
||||
"email": "walter.obrien@example.com",
|
||||
"fullName": "Walter O'Brien",
|
||||
"age": 33,
|
||||
"isAdmin": false
|
||||
},
|
||||
"permissions": ["read(\"any\")"],
|
||||
"transactionId": "<TRANSACTION_ID>"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,13 @@ X-Appwrite-Session:
|
|||
X-Appwrite-JWT: <YOUR_JWT>
|
||||
|
||||
{
|
||||
"data": {},
|
||||
"data": {
|
||||
"username": "walter.obrien",
|
||||
"email": "walter.obrien@example.com",
|
||||
"fullName": "Walter O'Brien",
|
||||
"age": 30,
|
||||
"isAdmin": false
|
||||
},
|
||||
"permissions": ["read(\"any\")"],
|
||||
"transactionId": "<TRANSACTION_ID>"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,13 @@ X-Appwrite-Session:
|
|||
X-Appwrite-JWT: <YOUR_JWT>
|
||||
|
||||
{
|
||||
"data": {},
|
||||
"data": {
|
||||
"username": "walter.obrien",
|
||||
"email": "walter.obrien@example.com",
|
||||
"fullName": "Walter O'Brien",
|
||||
"age": 33,
|
||||
"isAdmin": false
|
||||
},
|
||||
"permissions": ["read(\"any\")"],
|
||||
"transactionId": "<TRANSACTION_ID>"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,13 @@ X-Appwrite-Session:
|
|||
X-Appwrite-JWT: <YOUR_JWT>
|
||||
|
||||
{
|
||||
"data": {},
|
||||
"data": {
|
||||
"username": "walter.obrien",
|
||||
"email": "walter.obrien@example.com",
|
||||
"fullName": "Walter O'Brien",
|
||||
"age": 33,
|
||||
"isAdmin": false
|
||||
},
|
||||
"permissions": ["read(\"any\")"],
|
||||
"transactionId": "<TRANSACTION_ID>"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,7 +10,13 @@ const result = await databases.updateDocument({
|
|||
databaseId: '<DATABASE_ID>',
|
||||
collectionId: '<COLLECTION_ID>',
|
||||
documentId: '<DOCUMENT_ID>',
|
||||
data: {}, // optional
|
||||
data: {
|
||||
"username": "walter.obrien",
|
||||
"email": "walter.obrien@example.com",
|
||||
"fullName": "Walter O'Brien",
|
||||
"age": 33,
|
||||
"isAdmin": false
|
||||
}, // optional
|
||||
permissions: [Permission.read(Role.any())], // optional
|
||||
transactionId: '<TRANSACTION_ID>' // optional
|
||||
});
|
||||
|
|
|
|||
|
|
@ -10,7 +10,13 @@ const result = await databases.upsertDocument({
|
|||
databaseId: '<DATABASE_ID>',
|
||||
collectionId: '<COLLECTION_ID>',
|
||||
documentId: '<DOCUMENT_ID>',
|
||||
data: {},
|
||||
data: {
|
||||
"username": "walter.obrien",
|
||||
"email": "walter.obrien@example.com",
|
||||
"fullName": "Walter O'Brien",
|
||||
"age": 30,
|
||||
"isAdmin": false
|
||||
}, // optional
|
||||
permissions: [Permission.read(Role.any())], // optional
|
||||
transactionId: '<TRANSACTION_ID>' // optional
|
||||
});
|
||||
|
|
|
|||
|
|
@ -10,7 +10,13 @@ const result = await tablesDB.updateRow({
|
|||
databaseId: '<DATABASE_ID>',
|
||||
tableId: '<TABLE_ID>',
|
||||
rowId: '<ROW_ID>',
|
||||
data: {}, // optional
|
||||
data: {
|
||||
"username": "walter.obrien",
|
||||
"email": "walter.obrien@example.com",
|
||||
"fullName": "Walter O'Brien",
|
||||
"age": 33,
|
||||
"isAdmin": false
|
||||
}, // optional
|
||||
permissions: [Permission.read(Role.any())], // optional
|
||||
transactionId: '<TRANSACTION_ID>' // optional
|
||||
});
|
||||
|
|
|
|||
|
|
@ -10,7 +10,13 @@ const result = await tablesDB.upsertRow({
|
|||
databaseId: '<DATABASE_ID>',
|
||||
tableId: '<TABLE_ID>',
|
||||
rowId: '<ROW_ID>',
|
||||
data: {}, // optional
|
||||
data: {
|
||||
"username": "walter.obrien",
|
||||
"email": "walter.obrien@example.com",
|
||||
"fullName": "Walter O'Brien",
|
||||
"age": 33,
|
||||
"isAdmin": false
|
||||
}, // optional
|
||||
permissions: [Permission.read(Role.any())], // optional
|
||||
transactionId: '<TRANSACTION_ID>' // optional
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
appwrite databases upsert-document \
|
||||
--database-id <DATABASE_ID> \
|
||||
--collection-id <COLLECTION_ID> \
|
||||
--document-id <DOCUMENT_ID> \
|
||||
--data '{ "key": "value" }'
|
||||
--document-id <DOCUMENT_ID>
|
||||
|
|
|
|||
|
|
@ -10,7 +10,13 @@ const result = await databases.updateDocument({
|
|||
databaseId: '<DATABASE_ID>',
|
||||
collectionId: '<COLLECTION_ID>',
|
||||
documentId: '<DOCUMENT_ID>',
|
||||
data: {}, // optional
|
||||
data: {
|
||||
"username": "walter.obrien",
|
||||
"email": "walter.obrien@example.com",
|
||||
"fullName": "Walter O'Brien",
|
||||
"age": 33,
|
||||
"isAdmin": false
|
||||
}, // optional
|
||||
permissions: [Permission.read(Role.any())], // optional
|
||||
transactionId: '<TRANSACTION_ID>' // optional
|
||||
});
|
||||
|
|
|
|||
|
|
@ -9,7 +9,13 @@ const databases = new Databases(client);
|
|||
const result = await databases.updateDocuments({
|
||||
databaseId: '<DATABASE_ID>',
|
||||
collectionId: '<COLLECTION_ID>',
|
||||
data: {}, // optional
|
||||
data: {
|
||||
"username": "walter.obrien",
|
||||
"email": "walter.obrien@example.com",
|
||||
"fullName": "Walter O'Brien",
|
||||
"age": 33,
|
||||
"isAdmin": false
|
||||
}, // optional
|
||||
queries: [], // optional
|
||||
transactionId: '<TRANSACTION_ID>' // optional
|
||||
});
|
||||
|
|
|
|||
|
|
@ -10,7 +10,13 @@ const result = await databases.upsertDocument({
|
|||
databaseId: '<DATABASE_ID>',
|
||||
collectionId: '<COLLECTION_ID>',
|
||||
documentId: '<DOCUMENT_ID>',
|
||||
data: {},
|
||||
data: {
|
||||
"username": "walter.obrien",
|
||||
"email": "walter.obrien@example.com",
|
||||
"fullName": "Walter O'Brien",
|
||||
"age": 30,
|
||||
"isAdmin": false
|
||||
}, // optional
|
||||
permissions: [Permission.read(Role.any())], // optional
|
||||
transactionId: '<TRANSACTION_ID>' // optional
|
||||
});
|
||||
|
|
|
|||
|
|
@ -10,7 +10,13 @@ const result = await tablesDB.updateRow({
|
|||
databaseId: '<DATABASE_ID>',
|
||||
tableId: '<TABLE_ID>',
|
||||
rowId: '<ROW_ID>',
|
||||
data: {}, // optional
|
||||
data: {
|
||||
"username": "walter.obrien",
|
||||
"email": "walter.obrien@example.com",
|
||||
"fullName": "Walter O'Brien",
|
||||
"age": 33,
|
||||
"isAdmin": false
|
||||
}, // optional
|
||||
permissions: [Permission.read(Role.any())], // optional
|
||||
transactionId: '<TRANSACTION_ID>' // optional
|
||||
});
|
||||
|
|
|
|||
|
|
@ -9,7 +9,13 @@ const tablesDB = new TablesDB(client);
|
|||
const result = await tablesDB.updateRows({
|
||||
databaseId: '<DATABASE_ID>',
|
||||
tableId: '<TABLE_ID>',
|
||||
data: {}, // optional
|
||||
data: {
|
||||
"username": "walter.obrien",
|
||||
"email": "walter.obrien@example.com",
|
||||
"fullName": "Walter O'Brien",
|
||||
"age": 33,
|
||||
"isAdmin": false
|
||||
}, // optional
|
||||
queries: [], // optional
|
||||
transactionId: '<TRANSACTION_ID>' // optional
|
||||
});
|
||||
|
|
|
|||
|
|
@ -10,7 +10,13 @@ const result = await tablesDB.upsertRow({
|
|||
databaseId: '<DATABASE_ID>',
|
||||
tableId: '<TABLE_ID>',
|
||||
rowId: '<ROW_ID>',
|
||||
data: {}, // optional
|
||||
data: {
|
||||
"username": "walter.obrien",
|
||||
"email": "walter.obrien@example.com",
|
||||
"fullName": "Walter O'Brien",
|
||||
"age": 33,
|
||||
"isAdmin": false
|
||||
}, // optional
|
||||
permissions: [Permission.read(Role.any())], // optional
|
||||
transactionId: '<TRANSACTION_ID>' // optional
|
||||
});
|
||||
|
|
|
|||
|
|
@ -2,7 +2,8 @@ import 'package:dart_appwrite/dart_appwrite.dart';
|
|||
|
||||
Client client = Client()
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
|
||||
.setProject('<YOUR_PROJECT_ID>') // Your project ID
|
||||
.setSession(''); // The user session to authenticate with
|
||||
|
||||
Account account = Account(client);
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,8 @@ import 'package:dart_appwrite/dart_appwrite.dart';
|
|||
|
||||
Client client = Client()
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
|
||||
.setProject('<YOUR_PROJECT_ID>') // Your project ID
|
||||
.setSession(''); // The user session to authenticate with
|
||||
|
||||
Account account = Account(client);
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,8 @@ import 'package:dart_appwrite/dart_appwrite.dart';
|
|||
|
||||
Client client = Client()
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
|
||||
.setProject('<YOUR_PROJECT_ID>') // Your project ID
|
||||
.setSession(''); // The user session to authenticate with
|
||||
|
||||
Account account = Account(client);
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,8 @@ import 'package:dart_appwrite/dart_appwrite.dart';
|
|||
|
||||
Client client = Client()
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
|
||||
.setProject('<YOUR_PROJECT_ID>') // Your project ID
|
||||
.setSession(''); // The user session to authenticate with
|
||||
|
||||
Account account = Account(client);
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,8 @@ import 'package:dart_appwrite/dart_appwrite.dart';
|
|||
|
||||
Client client = Client()
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
|
||||
.setProject('<YOUR_PROJECT_ID>') // Your project ID
|
||||
.setSession(''); // The user session to authenticate with
|
||||
|
||||
Account account = Account(client);
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,8 @@ import 'package:dart_appwrite/dart_appwrite.dart';
|
|||
|
||||
Client client = Client()
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
|
||||
.setProject('<YOUR_PROJECT_ID>') // Your project ID
|
||||
.setSession(''); // The user session to authenticate with
|
||||
|
||||
Account account = Account(client);
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,8 @@ import 'package:dart_appwrite/dart_appwrite.dart';
|
|||
|
||||
Client client = Client()
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
|
||||
.setProject('<YOUR_PROJECT_ID>') // Your project ID
|
||||
.setSession(''); // The user session to authenticate with
|
||||
|
||||
Account account = Account(client);
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,8 @@ import 'package:dart_appwrite/dart_appwrite.dart';
|
|||
|
||||
Client client = Client()
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
|
||||
.setProject('<YOUR_PROJECT_ID>') // Your project ID
|
||||
.setSession(''); // The user session to authenticate with
|
||||
|
||||
Account account = Account(client);
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,8 @@ import 'package:dart_appwrite/dart_appwrite.dart';
|
|||
|
||||
Client client = Client()
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
|
||||
.setProject('<YOUR_PROJECT_ID>') // Your project ID
|
||||
.setSession(''); // The user session to authenticate with
|
||||
|
||||
Account account = Account(client);
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,8 @@ import 'package:dart_appwrite/dart_appwrite.dart';
|
|||
|
||||
Client client = Client()
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
|
||||
.setProject('<YOUR_PROJECT_ID>') // Your project ID
|
||||
.setSession(''); // The user session to authenticate with
|
||||
|
||||
Account account = Account(client);
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,8 @@ import 'package:dart_appwrite/dart_appwrite.dart';
|
|||
|
||||
Client client = Client()
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
|
||||
.setProject('<YOUR_PROJECT_ID>') // Your project ID
|
||||
.setSession(''); // The user session to authenticate with
|
||||
|
||||
Account account = Account(client);
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,8 @@ import 'package:dart_appwrite/dart_appwrite.dart';
|
|||
|
||||
Client client = Client()
|
||||
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
||||
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
|
||||
.setProject('<YOUR_PROJECT_ID>') // Your project ID
|
||||
.setSession(''); // The user session to authenticate with
|
||||
|
||||
Account account = Account(client);
|
||||
|
||||
|
|
|
|||
|
|
@ -16,4 +16,6 @@ Collection result = await databases.createCollection(
|
|||
permissions: [Permission.read(Role.any())], // (optional)
|
||||
documentSecurity: false, // (optional)
|
||||
enabled: false, // (optional)
|
||||
attributes: [], // (optional)
|
||||
indexes: [], // (optional)
|
||||
);
|
||||
|
|
|
|||
|
|
@ -13,7 +13,13 @@ Document result = await databases.updateDocument(
|
|||
databaseId: '<DATABASE_ID>',
|
||||
collectionId: '<COLLECTION_ID>',
|
||||
documentId: '<DOCUMENT_ID>',
|
||||
data: {}, // (optional)
|
||||
data: {
|
||||
"username": "walter.obrien",
|
||||
"email": "walter.obrien@example.com",
|
||||
"fullName": "Walter O'Brien",
|
||||
"age": 33,
|
||||
"isAdmin": false
|
||||
}, // (optional)
|
||||
permissions: [Permission.read(Role.any())], // (optional)
|
||||
transactionId: '<TRANSACTION_ID>', // (optional)
|
||||
);
|
||||
|
|
|
|||
|
|
@ -10,7 +10,13 @@ Databases databases = Databases(client);
|
|||
DocumentList result = await databases.updateDocuments(
|
||||
databaseId: '<DATABASE_ID>',
|
||||
collectionId: '<COLLECTION_ID>',
|
||||
data: {}, // (optional)
|
||||
data: {
|
||||
"username": "walter.obrien",
|
||||
"email": "walter.obrien@example.com",
|
||||
"fullName": "Walter O'Brien",
|
||||
"age": 33,
|
||||
"isAdmin": false
|
||||
}, // (optional)
|
||||
queries: [], // (optional)
|
||||
transactionId: '<TRANSACTION_ID>', // (optional)
|
||||
);
|
||||
|
|
|
|||
|
|
@ -13,7 +13,13 @@ Document result = await databases.upsertDocument(
|
|||
databaseId: '<DATABASE_ID>',
|
||||
collectionId: '<COLLECTION_ID>',
|
||||
documentId: '<DOCUMENT_ID>',
|
||||
data: {},
|
||||
data: {
|
||||
"username": "walter.obrien",
|
||||
"email": "walter.obrien@example.com",
|
||||
"fullName": "Walter O'Brien",
|
||||
"age": 30,
|
||||
"isAdmin": false
|
||||
}, // (optional)
|
||||
permissions: [Permission.read(Role.any())], // (optional)
|
||||
transactionId: '<TRANSACTION_ID>', // (optional)
|
||||
);
|
||||
|
|
|
|||
|
|
@ -16,4 +16,6 @@ Table result = await tablesDB.createTable(
|
|||
permissions: [Permission.read(Role.any())], // (optional)
|
||||
rowSecurity: false, // (optional)
|
||||
enabled: false, // (optional)
|
||||
columns: [], // (optional)
|
||||
indexes: [], // (optional)
|
||||
);
|
||||
|
|
|
|||
|
|
@ -13,7 +13,13 @@ Row result = await tablesDB.updateRow(
|
|||
databaseId: '<DATABASE_ID>',
|
||||
tableId: '<TABLE_ID>',
|
||||
rowId: '<ROW_ID>',
|
||||
data: {}, // (optional)
|
||||
data: {
|
||||
"username": "walter.obrien",
|
||||
"email": "walter.obrien@example.com",
|
||||
"fullName": "Walter O'Brien",
|
||||
"age": 33,
|
||||
"isAdmin": false
|
||||
}, // (optional)
|
||||
permissions: [Permission.read(Role.any())], // (optional)
|
||||
transactionId: '<TRANSACTION_ID>', // (optional)
|
||||
);
|
||||
|
|
|
|||
|
|
@ -10,7 +10,13 @@ TablesDB tablesDB = TablesDB(client);
|
|||
RowList result = await tablesDB.updateRows(
|
||||
databaseId: '<DATABASE_ID>',
|
||||
tableId: '<TABLE_ID>',
|
||||
data: {}, // (optional)
|
||||
data: {
|
||||
"username": "walter.obrien",
|
||||
"email": "walter.obrien@example.com",
|
||||
"fullName": "Walter O'Brien",
|
||||
"age": 33,
|
||||
"isAdmin": false
|
||||
}, // (optional)
|
||||
queries: [], // (optional)
|
||||
transactionId: '<TRANSACTION_ID>', // (optional)
|
||||
);
|
||||
|
|
|
|||
|
|
@ -13,7 +13,13 @@ Row result = await tablesDB.upsertRow(
|
|||
databaseId: '<DATABASE_ID>',
|
||||
tableId: '<TABLE_ID>',
|
||||
rowId: '<ROW_ID>',
|
||||
data: {}, // (optional)
|
||||
data: {
|
||||
"username": "walter.obrien",
|
||||
"email": "walter.obrien@example.com",
|
||||
"fullName": "Walter O'Brien",
|
||||
"age": 33,
|
||||
"isAdmin": false
|
||||
}, // (optional)
|
||||
permissions: [Permission.read(Role.any())], // (optional)
|
||||
transactionId: '<TRANSACTION_ID>', // (optional)
|
||||
);
|
||||
|
|
|
|||
|
|
@ -4,7 +4,8 @@ using Appwrite.Services;
|
|||
|
||||
Client client = new Client()
|
||||
.SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.SetProject("<YOUR_PROJECT_ID>"); // Your project ID
|
||||
.SetProject("<YOUR_PROJECT_ID>") // Your project ID
|
||||
.SetSession(""); // The user session to authenticate with
|
||||
|
||||
Account account = new Account(client);
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,8 @@ using Appwrite.Services;
|
|||
|
||||
Client client = new Client()
|
||||
.SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.SetProject("<YOUR_PROJECT_ID>"); // Your project ID
|
||||
.SetProject("<YOUR_PROJECT_ID>") // Your project ID
|
||||
.SetSession(""); // The user session to authenticate with
|
||||
|
||||
Account account = new Account(client);
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,8 @@ using Appwrite.Services;
|
|||
|
||||
Client client = new Client()
|
||||
.SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.SetProject("<YOUR_PROJECT_ID>"); // Your project ID
|
||||
.SetProject("<YOUR_PROJECT_ID>") // Your project ID
|
||||
.SetSession(""); // The user session to authenticate with
|
||||
|
||||
Account account = new Account(client);
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,8 @@ using Appwrite.Services;
|
|||
|
||||
Client client = new Client()
|
||||
.SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.SetProject("<YOUR_PROJECT_ID>"); // Your project ID
|
||||
.SetProject("<YOUR_PROJECT_ID>") // Your project ID
|
||||
.SetSession(""); // The user session to authenticate with
|
||||
|
||||
Account account = new Account(client);
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,8 @@ using Appwrite.Services;
|
|||
|
||||
Client client = new Client()
|
||||
.SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.SetProject("<YOUR_PROJECT_ID>"); // Your project ID
|
||||
.SetProject("<YOUR_PROJECT_ID>") // Your project ID
|
||||
.SetSession(""); // The user session to authenticate with
|
||||
|
||||
Account account = new Account(client);
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,8 @@ using Appwrite.Services;
|
|||
|
||||
Client client = new Client()
|
||||
.SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.SetProject("<YOUR_PROJECT_ID>"); // Your project ID
|
||||
.SetProject("<YOUR_PROJECT_ID>") // Your project ID
|
||||
.SetSession(""); // The user session to authenticate with
|
||||
|
||||
Account account = new Account(client);
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,8 @@ using Appwrite.Services;
|
|||
|
||||
Client client = new Client()
|
||||
.SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.SetProject("<YOUR_PROJECT_ID>"); // Your project ID
|
||||
.SetProject("<YOUR_PROJECT_ID>") // Your project ID
|
||||
.SetSession(""); // The user session to authenticate with
|
||||
|
||||
Account account = new Account(client);
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,8 @@ using Appwrite.Services;
|
|||
|
||||
Client client = new Client()
|
||||
.SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.SetProject("<YOUR_PROJECT_ID>"); // Your project ID
|
||||
.SetProject("<YOUR_PROJECT_ID>") // Your project ID
|
||||
.SetSession(""); // The user session to authenticate with
|
||||
|
||||
Account account = new Account(client);
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,8 @@ using Appwrite.Services;
|
|||
|
||||
Client client = new Client()
|
||||
.SetEndPoint("https://<REGION>.cloud.appwrite.io/v1") // Your API Endpoint
|
||||
.SetProject("<YOUR_PROJECT_ID>"); // Your project ID
|
||||
.SetProject("<YOUR_PROJECT_ID>") // Your project ID
|
||||
.SetSession(""); // The user session to authenticate with
|
||||
|
||||
Account account = new Account(client);
|
||||
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue