Merge remote-tracking branch 'origin/feat-database-indexing' into feat-db-refactor-enable-strict-query-matching
This commit is contained in:
commit
8743756126
1
.github/ISSUE_TEMPLATE/bug.yaml
vendored
1
.github/ISSUE_TEMPLATE/bug.yaml
vendored
|
@ -37,6 +37,7 @@ body:
|
||||||
label: "🎲 Appwrite version"
|
label: "🎲 Appwrite version"
|
||||||
description: "What version of Appwrite are you running?"
|
description: "What version of Appwrite are you running?"
|
||||||
options:
|
options:
|
||||||
|
- Version 0.11.x
|
||||||
- Version 0.10.x
|
- Version 0.10.x
|
||||||
- Version 0.9.x
|
- Version 0.9.x
|
||||||
- Version 0.8.x
|
- Version 0.8.x
|
||||||
|
|
|
@ -102,7 +102,6 @@ Getting started with Appwrite is as easy as creating a new project, choosing you
|
||||||
* [Getting Started for Android](https://appwrite.io/docs/getting-started-for-android)
|
* [Getting Started for Android](https://appwrite.io/docs/getting-started-for-android)
|
||||||
* [Getting Started for Server](https://appwrite.io/docs/getting-started-for-server)
|
* [Getting Started for Server](https://appwrite.io/docs/getting-started-for-server)
|
||||||
* [Getting Started for CLI](https://appwrite.io/docs/command-line)
|
* [Getting Started for CLI](https://appwrite.io/docs/command-line)
|
||||||
* Getting Started for iOS (Coming soon...)
|
|
||||||
|
|
||||||
### Services
|
### Services
|
||||||
|
|
||||||
|
@ -139,8 +138,9 @@ Below is a list of currently supported platforms and languages. If you wish to h
|
||||||
* ✅ [.NET](https://github.com/appwrite/sdk-for-dotnet) - **Experimental** (Maintained by the Appwrite Team)
|
* ✅ [.NET](https://github.com/appwrite/sdk-for-dotnet) - **Experimental** (Maintained by the Appwrite Team)
|
||||||
|
|
||||||
#### Community
|
#### Community
|
||||||
* ✅ [Appcelerator Titanium](https://github.com/m1ga/ti.appwrite) (Maintained by [Michael Gangolf](https://github.com/m1ga/))
|
* ✅ [Appcelerator Titanium](https://github.com/m1ga/ti.appwrite) (Maintained by [Michael Gangolf](https://github.com/m1ga/))
|
||||||
|
* ✅ [Godot Engine](https://github.com/GodotNuts/appwrite-sdk) (Maintained by [fenix-hub @GodotNuts](https://github.com/fenix-hub))
|
||||||
|
|
||||||
Looking for more SDKs? - Help us by contributing a pull request to our [SDK Generator](https://github.com/appwrite/sdk-generator)!
|
Looking for more SDKs? - Help us by contributing a pull request to our [SDK Generator](https://github.com/appwrite/sdk-generator)!
|
||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
|
|
|
@ -1,24 +1,24 @@
|
||||||
{
|
{
|
||||||
"settings.inspire": "\"هنر خردمند بودن، هنر دانستن چیزی است که باید از آن غافل شد.\"",
|
"settings.inspire": "\"هنر خردمند بودن این است که بدانید چه چیزی را نادیده بگیرید.\"",
|
||||||
"settings.locale": "fa",
|
"settings.locale": "fa",
|
||||||
"settings.direction": "rtl",
|
"settings.direction": "rtl",
|
||||||
"emails.sender": "تیم %s",
|
"emails.sender": "تیم %s",
|
||||||
"emails.verification.subject": "تأیید حساب",
|
"emails.verification.subject": "تأیید حساب",
|
||||||
"emails.verification.hello": "سلام {{name}}",
|
"emails.verification.hello": "سلام {{name}}",
|
||||||
"emails.verification.body": "برای تأیید حسابتان پیوند زیر را دنبال کنید.",
|
"emails.verification.body": "برای تأیید ایمیلتان پیوند زیر را دنبال کنید.",
|
||||||
"emails.verification.footer": "اگر شما درخواست تأیید حساب ندادهاید، میتوانید این ایمیل را نادیده بگیرید.",
|
"emails.verification.footer": "اگر شما درخواست تأیید حساب ندادهاید، میتوانید این پیام را نادیده بگیرید.",
|
||||||
"emails.verification.thanks": "سپاس فراوان",
|
"emails.verification.thanks": "سپاس فراوان",
|
||||||
"emails.verification.signature": "تیم {{name}}",
|
"emails.verification.signature": "تیم {{name}}",
|
||||||
"emails.magicSession.subject": "ورود به حساب کاربری",
|
"emails.magicSession.subject": "ورود به حساب کاربری",
|
||||||
"emails.magicSession.hello": "سلام،",
|
"emails.magicSession.hello": "سلام،",
|
||||||
"emails.magicSession.body": "برای ورود به حسابتان پیوند زیر را دنبال کنید.",
|
"emails.magicSession.body": "برای ورود به حسابتان پیوند زیر را دنبال کنید.",
|
||||||
"emails.magicSession.footer": "اگر شما درخواست ورود به حساب کاربری ندادهاید، میتوانید این ایمیل را نادیده بگیرید.",
|
"emails.magicSession.footer": "اگر شما درخواست ورود به حساب کاربری با استفاده از این ایمیل را ندادهاید، میتوانید این پیام را نادیده بگیرید.",
|
||||||
"emails.magicSession.thanks": "سپاس فراوان",
|
"emails.magicSession.thanks": "سپاس فراوان",
|
||||||
"emails.magicSession.signature": "تیم {{name}}",
|
"emails.magicSession.signature": "تیم {{name}}",
|
||||||
"emails.recovery.subject": "بازیابی گذرواژه",
|
"emails.recovery.subject": "بازیابی گذرواژه",
|
||||||
"emails.recovery.hello": "سلام {{name}}",
|
"emails.recovery.hello": "سلام {{name}}",
|
||||||
"emails.recovery.body": "برای بازیابی گذرواژهتان پیوند زیر را دنبال کنید.",
|
"emails.recovery.body": "برای بازیابی گذرواژهتان پیوند زیر را دنبال کنید.",
|
||||||
"emails.recovery.footer": "اگر شما درخواست بازیابی گذرواژه ندادهاید، میتوانید این ایمیل را نادیده بگیرید.",
|
"emails.recovery.footer": "اگر شما درخواست بازیابی گذرواژه ندادهاید، میتوانید این پیام را نادیده بگیرید.",
|
||||||
"emails.recovery.thanks": "سپاس فراوان",
|
"emails.recovery.thanks": "سپاس فراوان",
|
||||||
"emails.recovery.signature": "تیم {{name}}",
|
"emails.recovery.signature": "تیم {{name}}",
|
||||||
"emails.invitation.subject": "دعوت به تیم %s در %s",
|
"emails.invitation.subject": "دعوت به تیم %s در %s",
|
||||||
|
|
|
@ -28,205 +28,205 @@
|
||||||
"emails.invitation.thanks": "Go raibh maith agat",
|
"emails.invitation.thanks": "Go raibh maith agat",
|
||||||
"emails.invitation.signature": "{{project}} foireann",
|
"emails.invitation.signature": "{{project}} foireann",
|
||||||
"locale.country.unknown": "Neamhaithnid",
|
"locale.country.unknown": "Neamhaithnid",
|
||||||
"countries.af": "Afghanistan",
|
"countries.af": "An Afganastáin",
|
||||||
"countries.ao": "Angola",
|
"countries.ao": "Angóla",
|
||||||
"countries.al": "Albania",
|
"countries.al": "Albáin",
|
||||||
"countries.ad": "Andorra",
|
"countries.ad": "Andóra",
|
||||||
"countries.ae": "United Arab Emirates",
|
"countries.ae": "Aontas na nÉimíríochtaí Arabacha",
|
||||||
"countries.ar": "Argentina",
|
"countries.ar": "Airgintín",
|
||||||
"countries.am": "Armenia",
|
"countries.am": "Airméin",
|
||||||
"countries.ag": "Antigua and Barbuda",
|
"countries.ag": "Antigua agus Barbúda",
|
||||||
"countries.au": "Australia",
|
"countries.au": "Astráil",
|
||||||
"countries.at": "Austria",
|
"countries.at": "Ostair",
|
||||||
"countries.az": "Azerbaijan",
|
"countries.az": "Asarbaiseáin",
|
||||||
"countries.bi": "Burundi",
|
"countries.bi": "An Bhurúin",
|
||||||
"countries.be": "Belgium",
|
"countries.be": "An Bheilg",
|
||||||
"countries.bj": "Benin",
|
"countries.bj": "Beinin",
|
||||||
"countries.bf": "Burkina Faso",
|
"countries.bf": "Buircíne Fasó",
|
||||||
"countries.bd": "Bangladesh",
|
"countries.bd": "An Bhanglaidéis",
|
||||||
"countries.bg": "Bulgaria",
|
"countries.bg": "An Bhulgáir",
|
||||||
"countries.bh": "Bahrain",
|
"countries.bh": "Bairéin",
|
||||||
"countries.bs": "Bahamas",
|
"countries.bs": "Na Bahámaí",
|
||||||
"countries.ba": "Bosnia and Herzegovina",
|
"countries.ba": "An Bhoisnia agus an Heirseagaivéin",
|
||||||
"countries.by": "Belarus",
|
"countries.by": "An Bhealarúis",
|
||||||
"countries.bz": "Belize",
|
"countries.bz": "An Bheilís",
|
||||||
"countries.bo": "Bolivia",
|
"countries.bo": "An Bholaiv",
|
||||||
"countries.br": "Brazil",
|
"countries.br": "An Bhrasaíl",
|
||||||
"countries.bb": "Barbados",
|
"countries.bb": "Barbadós",
|
||||||
"countries.bn": "Brunei",
|
"countries.bn": "Brúiné",
|
||||||
"countries.bt": "Bhutan",
|
"countries.bt": "An Bhútáin",
|
||||||
"countries.bw": "Botswana",
|
"countries.bw": "An Bhotsuáin",
|
||||||
"countries.cf": "Central African Republic",
|
"countries.cf": "Poblacht na hAfraice Láir",
|
||||||
"countries.ca": "Canada",
|
"countries.ca": "Ceanada",
|
||||||
"countries.ch": "Switzerland",
|
"countries.ch": "An Eilvéis",
|
||||||
"countries.cl": "Chile",
|
"countries.cl": "An tSile",
|
||||||
"countries.cn": "China",
|
"countries.cn": "An tSín",
|
||||||
"countries.ci": "Ivory Coast",
|
"countries.ci": "Poblacht Côte d’Ivoire",
|
||||||
"countries.cm": "Cameroon",
|
"countries.cm": "Camarún",
|
||||||
"countries.cd": "DR Congo",
|
"countries.cd": "Poblacht Dhaonlathach an Chongó",
|
||||||
"countries.cg": "Republic of the Congo",
|
"countries.cg": "Poblacht an Chongó",
|
||||||
"countries.co": "Colombia",
|
"countries.co": "An Cholóim",
|
||||||
"countries.km": "Comoros",
|
"countries.km": "Oileáin Chomóra",
|
||||||
"countries.cv": "Cape Verde",
|
"countries.cv": "Cape Verde",
|
||||||
"countries.cr": "Costa Rica",
|
"countries.cr": "Cósta Ríce",
|
||||||
"countries.cu": "Cuba",
|
"countries.cu": "Cúba",
|
||||||
"countries.cy": "Cyprus",
|
"countries.cy": "An Chipir",
|
||||||
"countries.cz": "Czechia",
|
"countries.cz": "An tSeicia",
|
||||||
"countries.de": "Germany",
|
"countries.de": "An Ghearmáin",
|
||||||
"countries.dj": "Djibouti",
|
"countries.dj": "Djibouti",
|
||||||
"countries.dm": "Dominica",
|
"countries.dm": "Doiminice",
|
||||||
"countries.dk": "Denmark",
|
"countries.dk": "An Danmhairg",
|
||||||
"countries.do": "Dominican Republic",
|
"countries.do": "An Phoblacht Dhoiminiceach",
|
||||||
"countries.dz": "Algeria",
|
"countries.dz": "An Ailgéir",
|
||||||
"countries.ec": "Ecuador",
|
"countries.ec": "Eacuadór",
|
||||||
"countries.eg": "Egypt",
|
"countries.eg": "An Éigipt",
|
||||||
"countries.er": "Eritrea",
|
"countries.er": "An Eiritré",
|
||||||
"countries.es": "Spain",
|
"countries.es": "An Spáinn",
|
||||||
"countries.ee": "Estonia",
|
"countries.ee": "An Eastóin",
|
||||||
"countries.et": "Ethiopia",
|
"countries.et": "An Aetóip",
|
||||||
"countries.fi": "Finland",
|
"countries.fi": "An Fhionlainn",
|
||||||
"countries.fj": "Fiji",
|
"countries.fj": "Fidsí",
|
||||||
"countries.fr": "France",
|
"countries.fr": "An Fhrainc",
|
||||||
"countries.fm": "Micronesia",
|
"countries.fm": "An Mhicrinéis",
|
||||||
"countries.ga": "Gabon",
|
"countries.ga": "An Ghabúin",
|
||||||
"countries.gb": "United Kingdom",
|
"countries.gb": "An Ríocht Aontaithe",
|
||||||
"countries.ge": "Georgia",
|
"countries.ge": "An tSeoirsia",
|
||||||
"countries.gh": "Ghana",
|
"countries.gh": "Gána",
|
||||||
"countries.gn": "Guinea",
|
"countries.gn": "An Ghuine",
|
||||||
"countries.gm": "Gambia",
|
"countries.gm": "An Ghaimbia",
|
||||||
"countries.gw": "Guinea-Bissau",
|
"countries.gw": "Guine Bissau",
|
||||||
"countries.gq": "Equatorial Guinea",
|
"countries.gq": "An Ghuine Mheánchiorclach",
|
||||||
"countries.gr": "Greece",
|
"countries.gr": "An Ghréig",
|
||||||
"countries.gd": "Grenada",
|
"countries.gd": "Greanáda",
|
||||||
"countries.gt": "Guatemala",
|
"countries.gt": "Guatamala",
|
||||||
"countries.gy": "Guyana",
|
"countries.gy": "An Ghuáin",
|
||||||
"countries.hn": "Honduras",
|
"countries.hn": "Hondúras",
|
||||||
"countries.hr": "Croatia",
|
"countries.hr": "An Chróit",
|
||||||
"countries.ht": "Haiti",
|
"countries.ht": "Háítí",
|
||||||
"countries.hu": "Hungary",
|
"countries.hu": "An Ungáir",
|
||||||
"countries.id": "Indonesia",
|
"countries.id": "An Indinéis",
|
||||||
"countries.in": "India",
|
"countries.in": "India",
|
||||||
"countries.ie": "Ireland",
|
"countries.ie": "Éire",
|
||||||
"countries.ir": "Iran",
|
"countries.ir": "An Iaráin",
|
||||||
"countries.iq": "Iraq",
|
"countries.iq": "An Iaráic",
|
||||||
"countries.is": "Iceland",
|
"countries.is": "An Íoslainn",
|
||||||
"countries.il": "Israel",
|
"countries.il": "Iosrael",
|
||||||
"countries.it": "Italy",
|
"countries.it": "An Iodáil",
|
||||||
"countries.jm": "Jamaica",
|
"countries.jm": "Iamáice",
|
||||||
"countries.jo": "Jordan",
|
"countries.jo": "An Iordáin",
|
||||||
"countries.jp": "Japan",
|
"countries.jp": "An tSeapáin",
|
||||||
"countries.kz": "Kazakhstan",
|
"countries.kz": "An Chasacstáin",
|
||||||
"countries.ke": "Kenya",
|
"countries.ke": "An Chéinia",
|
||||||
"countries.kg": "Kyrgyzstan",
|
"countries.kg": "An Chirgeastáin",
|
||||||
"countries.kh": "Cambodia",
|
"countries.kh": "An Chambóid",
|
||||||
"countries.ki": "Kiribati",
|
"countries.ki": "Ciribeas",
|
||||||
"countries.kn": "Saint Kitts and Nevis",
|
"countries.kn": "San Críostóir-Nimheas",
|
||||||
"countries.kr": "South Korea",
|
"countries.kr": "An Chóiré Theas",
|
||||||
"countries.kw": "Kuwait",
|
"countries.kw": "Cuáit",
|
||||||
"countries.la": "Laos",
|
"countries.la": "Laos",
|
||||||
"countries.lb": "Lebanon",
|
"countries.lb": "An Liobáin",
|
||||||
"countries.lr": "Liberia",
|
"countries.lr": "An Libéir",
|
||||||
"countries.ly": "Libya",
|
"countries.ly": "An Libia",
|
||||||
"countries.lc": "Saint Lucia",
|
"countries.lc": "Saint Lucia",
|
||||||
"countries.li": "Liechtenstein",
|
"countries.li": "Lichtinstéin",
|
||||||
"countries.lk": "Sri Lanka",
|
"countries.lk": "Srí Lanca",
|
||||||
"countries.ls": "Lesotho",
|
"countries.ls": "Leosóta",
|
||||||
"countries.lt": "Lithuania",
|
"countries.lt": "An Liotuáin",
|
||||||
"countries.lu": "Luxembourg",
|
"countries.lu": "Lucsamburg",
|
||||||
"countries.lv": "Latvia",
|
"countries.lv": "An Laitvia",
|
||||||
"countries.ma": "Morocco",
|
"countries.ma": "Maracó",
|
||||||
"countries.mc": "Monaco",
|
"countries.mc": "Monacó",
|
||||||
"countries.md": "Moldova",
|
"countries.md": "An Mholdóiv",
|
||||||
"countries.mg": "Madagascar",
|
"countries.mg": "Madagascar",
|
||||||
"countries.mv": "Maldives",
|
"countries.mv": "Oileáin Mhaildíve",
|
||||||
"countries.mx": "Mexico",
|
"countries.mx": "Meicsiceo",
|
||||||
"countries.mh": "Marshall Islands",
|
"countries.mh": "Oileáin Marshall",
|
||||||
"countries.mk": "Macedonia",
|
"countries.mk": "An Mhacadóin",
|
||||||
"countries.ml": "Mali",
|
"countries.ml": "Mailí",
|
||||||
"countries.mt": "Malta",
|
"countries.mt": "Málta",
|
||||||
"countries.mm": "Myanmar",
|
"countries.mm": "Maenmar",
|
||||||
"countries.me": "Montenegro",
|
"countries.me": "Montainéagró",
|
||||||
"countries.mn": "Mongolia",
|
"countries.mn": "An Mhongóil",
|
||||||
"countries.mz": "Mozambique",
|
"countries.mz": "Mósaimbíc",
|
||||||
"countries.mr": "Mauritania",
|
"countries.mr": "An Mháratáin",
|
||||||
"countries.mu": "Mauritius",
|
"countries.mu": "Oileán Mhuirís",
|
||||||
"countries.mw": "Malawi",
|
"countries.mw": "Malávach",
|
||||||
"countries.my": "Malaysia",
|
"countries.my": "An Mhalaeisia",
|
||||||
"countries.na": "Namibia",
|
"countries.na": "An Namaib",
|
||||||
"countries.ne": "Niger",
|
"countries.ne": "Niger",
|
||||||
"countries.ng": "Nigeria",
|
"countries.ng": "An Nigéir",
|
||||||
"countries.ni": "Nicaragua",
|
"countries.ni": "Nicearagua",
|
||||||
"countries.nl": "Netherlands",
|
"countries.nl": "An Ísiltír",
|
||||||
"countries.no": "Norway",
|
"countries.no": "An Iorua",
|
||||||
"countries.np": "Nepal",
|
"countries.np": "Neipeal",
|
||||||
"countries.nr": "Nauru",
|
"countries.nr": "Nárú",
|
||||||
"countries.nz": "New Zealand",
|
"countries.nz": "An Nua-Shéalainn",
|
||||||
"countries.om": "Oman",
|
"countries.om": "Óman",
|
||||||
"countries.pk": "Pakistan",
|
"countries.pk": "An Phacastáin",
|
||||||
"countries.pa": "Panama",
|
"countries.pa": "Panama",
|
||||||
"countries.pe": "Peru",
|
"countries.pe": "Peiriú",
|
||||||
"countries.ph": "Philippines",
|
"countries.ph": "Na hOileáin Fhilipíneacha",
|
||||||
"countries.pw": "Palau",
|
"countries.pw": "Oileáin Palau",
|
||||||
"countries.pg": "Papua New Guinea",
|
"countries.pg": "Nua-Ghuine Phapua",
|
||||||
"countries.pl": "Poland",
|
"countries.pl": "An Pholainn",
|
||||||
"countries.kp": "North Korea",
|
"countries.kp": "An Chóiré Thuaidh",
|
||||||
"countries.pt": "Portugal",
|
"countries.pt": "An Phortaingéil",
|
||||||
"countries.py": "Paraguay",
|
"countries.py": "Paragua",
|
||||||
"countries.qa": "Qatar",
|
"countries.qa": "Catar",
|
||||||
"countries.ro": "Romania",
|
"countries.ro": "An Rómáin",
|
||||||
"countries.ru": "Russia",
|
"countries.ru": "An Rúis",
|
||||||
"countries.rw": "Rwanda",
|
"countries.rw": "Ruanda",
|
||||||
"countries.sa": "Saudi Arabia",
|
"countries.sa": "An Araib Shádach",
|
||||||
"countries.sd": "Sudan",
|
"countries.sd": "An tSúdáin",
|
||||||
"countries.sn": "Senegal",
|
"countries.sn": "An tSeineagáil",
|
||||||
"countries.sg": "Singapore",
|
"countries.sg": "Singeapór",
|
||||||
"countries.sb": "Solomon Islands",
|
"countries.sb": "Oileáin Sholaimh",
|
||||||
"countries.sl": "Sierra Leone",
|
"countries.sl": "Siarra Leon",
|
||||||
"countries.sv": "El Salvador",
|
"countries.sv": "An tSalvadóir",
|
||||||
"countries.sm": "San Marino",
|
"countries.sm": "San Mairíne",
|
||||||
"countries.so": "Somalia",
|
"countries.so": "An tSomáil",
|
||||||
"countries.rs": "Serbia",
|
"countries.rs": "An tSeirbia",
|
||||||
"countries.ss": "South Sudan",
|
"countries.ss": "An tSúdáin Theas",
|
||||||
"countries.st": "São Tomé and Príncipe",
|
"countries.st": "São Tomé agus Príncipe",
|
||||||
"countries.sr": "Suriname",
|
"countries.sr": "Suranam",
|
||||||
"countries.sk": "Slovakia",
|
"countries.sk": "An tSlóvaic",
|
||||||
"countries.si": "Slovenia",
|
"countries.si": "An tSlóivéin",
|
||||||
"countries.se": "Sweden",
|
"countries.se": "An tSualainn",
|
||||||
"countries.sz": "Swaziland",
|
"countries.sz": "An tSuasalainn",
|
||||||
"countries.sc": "Seychelles",
|
"countries.sc": "Na Séiséil",
|
||||||
"countries.sy": "Syria",
|
"countries.sy": "An tSiria",
|
||||||
"countries.td": "Chad",
|
"countries.td": "Sead",
|
||||||
"countries.tg": "Togo",
|
"countries.tg": "Tóga",
|
||||||
"countries.th": "Thailand",
|
"countries.th": "An Téalainn",
|
||||||
"countries.tj": "Tajikistan",
|
"countries.tj": "An Táidsíceastáin",
|
||||||
"countries.tm": "Turkmenistan",
|
"countries.tm": "An Tuircméanastáin",
|
||||||
"countries.tl": "Timor-Leste",
|
"countries.tl": "Tíomór Thoir",
|
||||||
"countries.to": "Tonga",
|
"countries.to": "Tonga",
|
||||||
"countries.tt": "Trinidad and Tobago",
|
"countries.tt": "Oileán na Tríonóide agus Tobága",
|
||||||
"countries.tn": "Tunisia",
|
"countries.tn": "An Túinéis",
|
||||||
"countries.tr": "Turkey",
|
"countries.tr": "An Tuirc",
|
||||||
"countries.tv": "Tuvalu",
|
"countries.tv": "Túvalú",
|
||||||
"countries.tz": "Tanzania",
|
"countries.tz": "An Tansáin",
|
||||||
"countries.ug": "Uganda",
|
"countries.ug": "Uganda",
|
||||||
"countries.ua": "Ukraine",
|
"countries.ua": "An Úcráin",
|
||||||
"countries.uy": "Uruguay",
|
"countries.uy": "Uragua",
|
||||||
"countries.us": "United States",
|
"countries.us": "Na Stáit Aontaithe",
|
||||||
"countries.uz": "Uzbekistan",
|
"countries.uz": "An Úisbéiceastáin",
|
||||||
"countries.va": "Vatican City",
|
"countries.va": "Cathair na Vatacáine",
|
||||||
"countries.vc": "Saint Vincent and the Grenadines",
|
"countries.vc": "San Uinseann agus na Greanáidíní",
|
||||||
"countries.ve": "Venezuela",
|
"countries.ve": "Veiniséala",
|
||||||
"countries.vn": "Vietnam",
|
"countries.vn": "Vítneam",
|
||||||
"countries.vu": "Vanuatu",
|
"countries.vu": "Vanuatú",
|
||||||
"countries.ws": "Samoa",
|
"countries.ws": "Samó",
|
||||||
"countries.ye": "Yemen",
|
"countries.ye": "Éimin",
|
||||||
"countries.za": "South Africa",
|
"countries.za": "An Afraic Theas",
|
||||||
"countries.zm": "Zambia",
|
"countries.zm": "An tSaimbia",
|
||||||
"countries.zw": "Zimbabwe",
|
"countries.zw": "An tSiombáib",
|
||||||
"continents.af": "Africa",
|
"continents.af": "An Afraic",
|
||||||
"continents.an": "Antarctica",
|
"continents.an": "Antartaice",
|
||||||
"continents.as": "Asia",
|
"continents.as": "An Áise",
|
||||||
"continents.eu": "Europe",
|
"continents.eu": "An Eoraip",
|
||||||
"continents.na": "North America",
|
"continents.na": "Meiriceá Thuaidh",
|
||||||
"continents.oc": "Oceania",
|
"continents.oc": "An Aigéine",
|
||||||
"continents.sa": "South America"
|
"continents.sa": "Meiriceá Theas"
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,30 +3,30 @@
|
||||||
"settings.locale": "jv",
|
"settings.locale": "jv",
|
||||||
"settings.direction": "ltr",
|
"settings.direction": "ltr",
|
||||||
"emails.sender": "Tim %s",
|
"emails.sender": "Tim %s",
|
||||||
"emails.verification.subject": "",
|
"emails.verification.subject": "Verifikasi Akun",
|
||||||
"emails.verification.hello": "",
|
"emails.verification.hello": "Hai {{name}}",
|
||||||
"emails.verification.body": "",
|
"emails.verification.body": "Klik link iki kanggo verifikasi alamat email sampeyan.",
|
||||||
"emails.verification.footer": "",
|
"emails.verification.footer": "Yen sampeyan ora njaluk verifikasi alamat iki, sampeyan iso nglirwakake pesen iki.",
|
||||||
"emails.verification.thanks": "",
|
"emails.verification.thanks": "Matur nuwun",
|
||||||
"emails.verification.signature": "",
|
"emails.verification.signature": "Tim {{project}}",
|
||||||
"emails.magicSession.subject": "",
|
"emails.magicSession.subject": "Masuk",
|
||||||
"emails.magicSession.hello": "",
|
"emails.magicSession.hello": "Hai,",
|
||||||
"emails.magicSession.body": "",
|
"emails.magicSession.body": "Klik link iki kanggo masuk.",
|
||||||
"emails.magicSession.footer": "",
|
"emails.magicSession.footer": "Yen sampeyan ora njaluk masuk nggunakake alamat email iki, sampeyan iso nglirwakake pesen iki.",
|
||||||
"emails.magicSession.thanks": "",
|
"emails.magicSession.thanks": "Matur nuwun",
|
||||||
"emails.magicSession.signature": "",
|
"emails.magicSession.signature": "Tim {{project}}",
|
||||||
"emails.recovery.subject": "",
|
"emails.recovery.subject": "Setel ulang sandi",
|
||||||
"emails.recovery.hello": "",
|
"emails.recovery.hello": "Halo {{name}}",
|
||||||
"emails.recovery.body": "",
|
"emails.recovery.body": "Klik link iki kanggo setel ulang sandi {{project}}.",
|
||||||
"emails.recovery.footer": "",
|
"emails.recovery.footer": "Yen sampeyan ora njaluk setel ulang sandi, sampeyan iso nglirwakake pesen iki.",
|
||||||
"emails.recovery.thanks": "",
|
"emails.recovery.thanks": "Matur nuwun",
|
||||||
"emails.recovery.signature": "",
|
"emails.recovery.signature": "Tim {{project}}",
|
||||||
"emails.invitation.subject": "",
|
"emails.invitation.subject": "Undangan ke Tim %s di %s",
|
||||||
"emails.invitation.hello": "",
|
"emails.invitation.hello": "Halo",
|
||||||
"emails.invitation.body": "",
|
"emails.invitation.body": "Email iki dikirim menyang sampeyan amarga {{owner}} pengin ngajak sampeyan dadi anggota tim {{team}} di {{project}}.",
|
||||||
"emails.invitation.footer": "",
|
"emails.invitation.footer": "Yen sampeyan ora tertarik, sampeyan iso nglirwakake pesen iki.",
|
||||||
"emails.invitation.thanks": "",
|
"emails.invitation.thanks": "Matur nuwun",
|
||||||
"emails.invitation.signature": "",
|
"emails.invitation.signature": "Tim {{project}}",
|
||||||
"locale.country.unknown": "Ora dingerteni",
|
"locale.country.unknown": "Ora dingerteni",
|
||||||
"countries.af": "Afghanistan",
|
"countries.af": "Afghanistan",
|
||||||
"countries.ao": "Angola",
|
"countries.ao": "Angola",
|
||||||
|
|
|
@ -3,30 +3,30 @@
|
||||||
"settings.locale": "mr",
|
"settings.locale": "mr",
|
||||||
"settings.direction": "ltr",
|
"settings.direction": "ltr",
|
||||||
"emails.sender": "%s टीम",
|
"emails.sender": "%s टीम",
|
||||||
"emails.verification.subject": "",
|
"emails.verification.subject": "खाते सत्यापन",
|
||||||
"emails.verification.hello": "",
|
"emails.verification.hello": "नमस्कार {{name}}",
|
||||||
"emails.verification.body": "",
|
"emails.verification.body": "आपला ईमेल पत्ता सत्यापित करण्यासाठी या दुव्याचे अनुसरण करा.",
|
||||||
"emails.verification.footer": "",
|
"emails.verification.footer": "आपण या पत्त्याची पडताळणी करण्यास सांगितले नसल्यास, आपण या संदेशाकडे दुर्लक्ष करू शकता.",
|
||||||
"emails.verification.thanks": "",
|
"emails.verification.thanks": "धन्यवाद",
|
||||||
"emails.verification.signature": "",
|
"emails.verification.signature": "{{project}} संघ",
|
||||||
"emails.magicSession.subject": "",
|
"emails.magicSession.subject": "लॉगिन करा",
|
||||||
"emails.magicSession.hello": "",
|
"emails.magicSession.hello": "नमस्कार ,",
|
||||||
"emails.magicSession.body": "",
|
"emails.magicSession.body": "लॉगिन करण्यासाठी या लिंकचे अनुसरण करा.",
|
||||||
"emails.magicSession.footer": "",
|
"emails.magicSession.footer": "आपण या ईमेलचा वापर करून लॉगिन करण्यास सांगितले नसल्यास, आपण या संदेशाकडे दुर्लक्ष करू शकता.",
|
||||||
"emails.magicSession.thanks": "",
|
"emails.magicSession.thanks": "धन्यवाद",
|
||||||
"emails.magicSession.signature": "",
|
"emails.magicSession.signature": "{{project}} संघ",
|
||||||
"emails.recovery.subject": "",
|
"emails.recovery.subject": "पासवर्ड रीसेट",
|
||||||
"emails.recovery.hello": "",
|
"emails.recovery.hello": "नमस्कार {{name}}",
|
||||||
"emails.recovery.body": "",
|
"emails.recovery.body": "आपला {{project}}चे पासवर्ड रीसेट करण्यासाठी या लिंकचे अनुसरण करा",
|
||||||
"emails.recovery.footer": "",
|
"emails.recovery.footer": "आपण आपला पासवर्ड रीसेट करण्यास सांगितले नसल्यास, आपण या संदेशाकडे दुर्लक्ष करू शकता.",
|
||||||
"emails.recovery.thanks": "",
|
"emails.recovery.thanks": "धन्यवाद",
|
||||||
"emails.recovery.signature": "",
|
"emails.recovery.signature": "{{project}} संघ",
|
||||||
"emails.invitation.subject": "",
|
"emails.invitation.subject": "%s संघ %s येथे सामील होण्यासाठी आमंत्रण",
|
||||||
"emails.invitation.hello": "",
|
"emails.invitation.hello": "नमस्कार",
|
||||||
"emails.invitation.body": "",
|
"emails.invitation.body": "हा मेल तुम्हाला पाठवला होता कारण {{owner}} तुम्हाला {{project}} येथे {{team}} टीमचे सदस्य होण्यासाठी आमंत्रित करू इच्छित होते.",
|
||||||
"emails.invitation.footer": "",
|
"emails.invitation.footer": "आपल्याला स्वारस्य नसल्यास, आपण या संदेशाकडे दुर्लक्ष करू शकता.",
|
||||||
"emails.invitation.thanks": "",
|
"emails.invitation.thanks": "धन्यवाद",
|
||||||
"emails.invitation.signature": "",
|
"emails.invitation.signature": "{{project}} संघ",
|
||||||
"locale.country.unknown": "अज्ञात",
|
"locale.country.unknown": "अज्ञात",
|
||||||
"countries.af": "अफगानिस्तान",
|
"countries.af": "अफगानिस्तान",
|
||||||
"countries.ao": "अंगोला",
|
"countries.ao": "अंगोला",
|
||||||
|
|
|
@ -15,7 +15,7 @@ return [
|
||||||
[
|
[
|
||||||
'key' => 'web',
|
'key' => 'web',
|
||||||
'name' => 'Web',
|
'name' => 'Web',
|
||||||
'version' => '4.0.4',
|
'version' => '5.0.0',
|
||||||
'url' => 'https://github.com/appwrite/sdk-for-web',
|
'url' => 'https://github.com/appwrite/sdk-for-web',
|
||||||
'package' => 'https://www.npmjs.com/package/appwrite',
|
'package' => 'https://www.npmjs.com/package/appwrite',
|
||||||
'enabled' => true,
|
'enabled' => true,
|
||||||
|
@ -190,7 +190,7 @@ return [
|
||||||
[
|
[
|
||||||
'key' => 'nodejs',
|
'key' => 'nodejs',
|
||||||
'name' => 'Node.js',
|
'name' => 'Node.js',
|
||||||
'version' => '2.5.1',
|
'version' => '3.0.0',
|
||||||
'url' => 'https://github.com/appwrite/sdk-for-node',
|
'url' => 'https://github.com/appwrite/sdk-for-node',
|
||||||
'package' => 'https://www.npmjs.com/package/node-appwrite',
|
'package' => 'https://www.npmjs.com/package/node-appwrite',
|
||||||
'enabled' => true,
|
'enabled' => true,
|
||||||
|
@ -208,11 +208,11 @@ return [
|
||||||
[
|
[
|
||||||
'key' => 'deno',
|
'key' => 'deno',
|
||||||
'name' => 'Deno',
|
'name' => 'Deno',
|
||||||
'version' => '0.4.1',
|
'version' => '1.0.0',
|
||||||
'url' => 'https://github.com/appwrite/sdk-for-deno',
|
'url' => 'https://github.com/appwrite/sdk-for-deno',
|
||||||
'package' => 'https://deno.land/x/appwrite',
|
'package' => 'https://deno.land/x/appwrite',
|
||||||
'enabled' => true,
|
'enabled' => true,
|
||||||
'beta' => true,
|
'beta' => false,
|
||||||
'dev' => false,
|
'dev' => false,
|
||||||
'hidden' => false,
|
'hidden' => false,
|
||||||
'family' => APP_PLATFORM_SERVER,
|
'family' => APP_PLATFORM_SERVER,
|
||||||
|
|
|
@ -23,6 +23,7 @@ use Utopia\Database\Validator\UID;
|
||||||
use Utopia\Exception;
|
use Utopia\Exception;
|
||||||
use Utopia\Validator\ArrayList;
|
use Utopia\Validator\ArrayList;
|
||||||
use Utopia\Validator\Assoc;
|
use Utopia\Validator\Assoc;
|
||||||
|
use Utopia\Validator\Range;
|
||||||
use Utopia\Validator\Text;
|
use Utopia\Validator\Text;
|
||||||
use Utopia\Validator\WhiteList;
|
use Utopia\Validator\WhiteList;
|
||||||
|
|
||||||
|
@ -1182,13 +1183,15 @@ App::get('/v1/account/logs')
|
||||||
->label('sdk.response.code', Response::STATUS_CODE_OK)
|
->label('sdk.response.code', Response::STATUS_CODE_OK)
|
||||||
->label('sdk.response.type', Response::CONTENT_TYPE_JSON)
|
->label('sdk.response.type', Response::CONTENT_TYPE_JSON)
|
||||||
->label('sdk.response.model', Response::MODEL_LOG_LIST)
|
->label('sdk.response.model', Response::MODEL_LOG_LIST)
|
||||||
|
->param('limit', 25, new Range(0, 100), 'Maximum number of logs to return in response. Use this value to manage pagination. By default will return maximum 25 results. Maximum of 100 results allowed per request.', true)
|
||||||
|
->param('offset', 0, new Range(0, 900000000), 'Offset value. The default value is 0. Use this param to manage pagination.', true)
|
||||||
->inject('response')
|
->inject('response')
|
||||||
->inject('user')
|
->inject('user')
|
||||||
->inject('locale')
|
->inject('locale')
|
||||||
->inject('geodb')
|
->inject('geodb')
|
||||||
->inject('dbForInternal')
|
->inject('dbForInternal')
|
||||||
->inject('usage')
|
->inject('usage')
|
||||||
->action(function ($response, $user, $locale, $geodb, $dbForInternal, $usage) {
|
->action(function ($limit, $offset, $response, $user, $locale, $geodb, $dbForInternal, $usage) {
|
||||||
/** @var Appwrite\Utopia\Response $response */
|
/** @var Appwrite\Utopia\Response $response */
|
||||||
/** @var Utopia\Database\Document $project */
|
/** @var Utopia\Database\Document $project */
|
||||||
/** @var Utopia\Database\Document $user */
|
/** @var Utopia\Database\Document $user */
|
||||||
|
@ -1198,8 +1201,7 @@ App::get('/v1/account/logs')
|
||||||
/** @var Appwrite\Stats\Stats $usage */
|
/** @var Appwrite\Stats\Stats $usage */
|
||||||
|
|
||||||
$audit = new Audit($dbForInternal);
|
$audit = new Audit($dbForInternal);
|
||||||
|
$auditEvents = [
|
||||||
$logs = $audit->getLogsByUserAndEvents($user->getId(), [
|
|
||||||
'account.create',
|
'account.create',
|
||||||
'account.delete',
|
'account.delete',
|
||||||
'account.update.name',
|
'account.update.name',
|
||||||
|
@ -1215,7 +1217,9 @@ App::get('/v1/account/logs')
|
||||||
'teams.membership.create',
|
'teams.membership.create',
|
||||||
'teams.membership.update',
|
'teams.membership.update',
|
||||||
'teams.membership.delete',
|
'teams.membership.delete',
|
||||||
]);
|
];
|
||||||
|
|
||||||
|
$logs = $audit->getLogsByUserAndEvents($user->getId(), $auditEvents, $limit, $offset);
|
||||||
|
|
||||||
$output = [];
|
$output = [];
|
||||||
|
|
||||||
|
@ -1245,7 +1249,11 @@ App::get('/v1/account/logs')
|
||||||
$usage
|
$usage
|
||||||
->setParam('users.read', 1)
|
->setParam('users.read', 1)
|
||||||
;
|
;
|
||||||
$response->dynamic(new Document(['logs' => $output]), Response::MODEL_LOG_LIST);
|
|
||||||
|
$response->dynamic(new Document([
|
||||||
|
'sum' => $audit->countLogsByUserAndEvents($user->getId(), $auditEvents),
|
||||||
|
'logs' => $output,
|
||||||
|
]), Response::MODEL_LOG_LIST);
|
||||||
});
|
});
|
||||||
|
|
||||||
App::get('/v1/account/sessions/:sessionId')
|
App::get('/v1/account/sessions/:sessionId')
|
||||||
|
|
|
@ -40,13 +40,14 @@ use DeviceDetector\DeviceDetector;
|
||||||
* @param Utopia\Database\Document $attribute
|
* @param Utopia\Database\Document $attribute
|
||||||
* @param Appwrite\Utopia\Response $response
|
* @param Appwrite\Utopia\Response $response
|
||||||
* @param Utopia\Database\Database $dbForInternal
|
* @param Utopia\Database\Database $dbForInternal
|
||||||
|
* @param Utopia\Database\Database $dbForExternal
|
||||||
* @param Appwrite\Event\Event $database
|
* @param Appwrite\Event\Event $database
|
||||||
* @param Appwrite\Event\Event $audits
|
* @param Appwrite\Event\Event $audits
|
||||||
* @param Appwrite\Stats\Stats $usage
|
* @param Appwrite\Stats\Stats $usage
|
||||||
*
|
*
|
||||||
* @return Document Newly created attribute document
|
* @return Document Newly created attribute document
|
||||||
*/
|
*/
|
||||||
function createAttribute($collectionId, $attribute, $response, $dbForInternal, $database, $audits, $usage): Document
|
function createAttribute($collectionId, $attribute, $response, $dbForInternal, $dbForExternal, $database, $audits, $usage): Document
|
||||||
{
|
{
|
||||||
$attributeId = $attribute->getId();
|
$attributeId = $attribute->getId();
|
||||||
$type = $attribute->getAttribute('type', '');
|
$type = $attribute->getAttribute('type', '');
|
||||||
|
@ -107,6 +108,7 @@ function createAttribute($collectionId, $attribute, $response, $dbForInternal, $
|
||||||
}
|
}
|
||||||
|
|
||||||
$dbForInternal->deleteCachedDocument('collections', $collectionId);
|
$dbForInternal->deleteCachedDocument('collections', $collectionId);
|
||||||
|
$dbForExternal->deleteCachedCollection($collectionId);
|
||||||
|
|
||||||
// Pass clone of $attribute object to workers
|
// Pass clone of $attribute object to workers
|
||||||
// so we can later modify Document to fit response model
|
// so we can later modify Document to fit response model
|
||||||
|
@ -458,12 +460,14 @@ App::get('/v1/database/collections/:collectionId/logs')
|
||||||
->label('sdk.response.type', Response::CONTENT_TYPE_JSON)
|
->label('sdk.response.type', Response::CONTENT_TYPE_JSON)
|
||||||
->label('sdk.response.model', Response::MODEL_LOG_LIST)
|
->label('sdk.response.model', Response::MODEL_LOG_LIST)
|
||||||
->param('collectionId', '', new UID(), 'Collection unique ID.')
|
->param('collectionId', '', new UID(), 'Collection unique ID.')
|
||||||
|
->param('limit', 25, new Range(0, 100), 'Maximum number of logs to return in response. Use this value to manage pagination. By default will return maximum 25 results. Maximum of 100 results allowed per request.', true)
|
||||||
|
->param('offset', 0, new Range(0, 900000000), 'Offset value. The default value is 0. Use this param to manage pagination.', true)
|
||||||
->inject('response')
|
->inject('response')
|
||||||
->inject('dbForInternal')
|
->inject('dbForInternal')
|
||||||
->inject('dbForExternal')
|
->inject('dbForExternal')
|
||||||
->inject('locale')
|
->inject('locale')
|
||||||
->inject('geodb')
|
->inject('geodb')
|
||||||
->action(function ($collectionId, $response, $dbForInternal, $dbForExternal, $locale, $geodb) {
|
->action(function ($collectionId, $limit, $offset, $response, $dbForInternal, $dbForExternal, $locale, $geodb) {
|
||||||
/** @var Appwrite\Utopia\Response $response */
|
/** @var Appwrite\Utopia\Response $response */
|
||||||
/** @var Utopia\Database\Document $project */
|
/** @var Utopia\Database\Document $project */
|
||||||
/** @var Utopia\Database\Database $dbForInternal */
|
/** @var Utopia\Database\Database $dbForInternal */
|
||||||
|
@ -478,8 +482,8 @@ App::get('/v1/database/collections/:collectionId/logs')
|
||||||
}
|
}
|
||||||
|
|
||||||
$audit = new Audit($dbForInternal);
|
$audit = new Audit($dbForInternal);
|
||||||
|
$resource = 'collection/'.$collection->getId();
|
||||||
$logs = $audit->getLogsByResource('collection/'.$collection->getId());
|
$logs = $audit->getLogsByResource($resource, $limit, $offset);
|
||||||
|
|
||||||
$output = [];
|
$output = [];
|
||||||
|
|
||||||
|
@ -539,7 +543,10 @@ App::get('/v1/database/collections/:collectionId/logs')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$response->dynamic(new Document(['logs' => $output]), Response::MODEL_LOG_LIST);
|
$response->dynamic(new Document([
|
||||||
|
'sum' => $audit->countLogsByResource($resource),
|
||||||
|
'logs' => $output,
|
||||||
|
]), Response::MODEL_LOG_LIST);
|
||||||
});
|
});
|
||||||
|
|
||||||
App::put('/v1/database/collections/:collectionId')
|
App::put('/v1/database/collections/:collectionId')
|
||||||
|
@ -683,12 +690,14 @@ App::post('/v1/database/collections/:collectionId/attributes/string')
|
||||||
->param('array', false, new Boolean(), 'Is attribute an array?', true)
|
->param('array', false, new Boolean(), 'Is attribute an array?', true)
|
||||||
->inject('response')
|
->inject('response')
|
||||||
->inject('dbForInternal')
|
->inject('dbForInternal')
|
||||||
|
->inject('dbForExternal')
|
||||||
->inject('database')
|
->inject('database')
|
||||||
->inject('audits')
|
->inject('audits')
|
||||||
->inject('usage')
|
->inject('usage')
|
||||||
->action(function ($collectionId, $attributeId, $size, $required, $default, $array, $response, $dbForInternal, $database, $audits, $usage) {
|
->action(function ($collectionId, $attributeId, $size, $required, $default, $array, $response, $dbForInternal, $dbForExternal, $database, $audits, $usage) {
|
||||||
/** @var Appwrite\Utopia\Response $response */
|
/** @var Appwrite\Utopia\Response $response */
|
||||||
/** @var Utopia\Database\Database $dbForInternal*/
|
/** @var Utopia\Database\Database $dbForInternal*/
|
||||||
|
/** @var Utopia\Database\Database $dbForExternal*/
|
||||||
/** @var Appwrite\Event\Event $database */
|
/** @var Appwrite\Event\Event $database */
|
||||||
/** @var Appwrite\Event\Event $audits */
|
/** @var Appwrite\Event\Event $audits */
|
||||||
/** @var Appwrite\Stats\Stats $usage */
|
/** @var Appwrite\Stats\Stats $usage */
|
||||||
|
@ -706,7 +715,7 @@ App::post('/v1/database/collections/:collectionId/attributes/string')
|
||||||
'required' => $required,
|
'required' => $required,
|
||||||
'default' => $default,
|
'default' => $default,
|
||||||
'array' => $array,
|
'array' => $array,
|
||||||
]), $response, $dbForInternal, $database, $audits, $usage);
|
]), $response, $dbForInternal, $dbForExternal, $database, $audits, $usage);
|
||||||
|
|
||||||
$response->dynamic($attribute, Response::MODEL_ATTRIBUTE_STRING);
|
$response->dynamic($attribute, Response::MODEL_ATTRIBUTE_STRING);
|
||||||
});
|
});
|
||||||
|
@ -730,12 +739,14 @@ App::post('/v1/database/collections/:collectionId/attributes/email')
|
||||||
->param('array', false, new Boolean(), 'Is attribute an array?', true)
|
->param('array', false, new Boolean(), 'Is attribute an array?', true)
|
||||||
->inject('response')
|
->inject('response')
|
||||||
->inject('dbForInternal')
|
->inject('dbForInternal')
|
||||||
|
->inject('dbForExternal')
|
||||||
->inject('database')
|
->inject('database')
|
||||||
->inject('audits')
|
->inject('audits')
|
||||||
->inject('usage')
|
->inject('usage')
|
||||||
->action(function ($collectionId, $attributeId, $required, $default, $array, $response, $dbForInternal, $database, $audits, $usage) {
|
->action(function ($collectionId, $attributeId, $required, $default, $array, $response, $dbForInternal, $dbForExternal, $database, $audits, $usage) {
|
||||||
/** @var Appwrite\Utopia\Response $response */
|
/** @var Appwrite\Utopia\Response $response */
|
||||||
/** @var Utopia\Database\Database $dbForInternal*/
|
/** @var Utopia\Database\Database $dbForInternal*/
|
||||||
|
/** @var Utopia\Database\Database $dbForExternal*/
|
||||||
/** @var Appwrite\Event\Event $database */
|
/** @var Appwrite\Event\Event $database */
|
||||||
/** @var Appwrite\Event\Event $audits */
|
/** @var Appwrite\Event\Event $audits */
|
||||||
/** @var Appwrite\Stats\Stats $usage */
|
/** @var Appwrite\Stats\Stats $usage */
|
||||||
|
@ -748,7 +759,7 @@ App::post('/v1/database/collections/:collectionId/attributes/email')
|
||||||
'default' => $default,
|
'default' => $default,
|
||||||
'array' => $array,
|
'array' => $array,
|
||||||
'format' => APP_DATABASE_ATTRIBUTE_EMAIL,
|
'format' => APP_DATABASE_ATTRIBUTE_EMAIL,
|
||||||
]), $response, $dbForInternal, $database, $audits, $usage);
|
]), $response, $dbForInternal, $dbForExternal, $database, $audits, $usage);
|
||||||
|
|
||||||
$response->dynamic($attribute, Response::MODEL_ATTRIBUTE_EMAIL);
|
$response->dynamic($attribute, Response::MODEL_ATTRIBUTE_EMAIL);
|
||||||
});
|
});
|
||||||
|
@ -773,12 +784,14 @@ App::post('/v1/database/collections/:collectionId/attributes/enum')
|
||||||
->param('array', false, new Boolean(), 'Is attribute an array?', true)
|
->param('array', false, new Boolean(), 'Is attribute an array?', true)
|
||||||
->inject('response')
|
->inject('response')
|
||||||
->inject('dbForInternal')
|
->inject('dbForInternal')
|
||||||
|
->inject('dbForExternal')
|
||||||
->inject('database')
|
->inject('database')
|
||||||
->inject('audits')
|
->inject('audits')
|
||||||
->inject('usage')
|
->inject('usage')
|
||||||
->action(function ($collectionId, $attributeId, $elements, $required, $default, $array, $response, $dbForInternal, $database, $audits, $usage) {
|
->action(function ($collectionId, $attributeId, $elements, $required, $default, $array, $response, $dbForInternal, $dbForExternal, $database, $audits, $usage) {
|
||||||
/** @var Appwrite\Utopia\Response $response */
|
/** @var Appwrite\Utopia\Response $response */
|
||||||
/** @var Utopia\Database\Database $dbForInternal*/
|
/** @var Utopia\Database\Database $dbForInternal*/
|
||||||
|
/** @var Utopia\Database\Database $dbForExternal*/
|
||||||
/** @var Appwrite\Event\Event $database */
|
/** @var Appwrite\Event\Event $database */
|
||||||
/** @var Appwrite\Event\Event $audits */
|
/** @var Appwrite\Event\Event $audits */
|
||||||
/** @var Appwrite\Stats\Stats $usage */
|
/** @var Appwrite\Stats\Stats $usage */
|
||||||
|
@ -803,7 +816,7 @@ App::post('/v1/database/collections/:collectionId/attributes/enum')
|
||||||
'array' => $array,
|
'array' => $array,
|
||||||
'format' => APP_DATABASE_ATTRIBUTE_ENUM,
|
'format' => APP_DATABASE_ATTRIBUTE_ENUM,
|
||||||
'formatOptions' => ['elements' => $elements],
|
'formatOptions' => ['elements' => $elements],
|
||||||
]), $response, $dbForInternal, $database, $audits, $usage);
|
]), $response, $dbForInternal, $dbForExternal, $database, $audits, $usage);
|
||||||
|
|
||||||
$response->dynamic($attribute, Response::MODEL_ATTRIBUTE_ENUM);
|
$response->dynamic($attribute, Response::MODEL_ATTRIBUTE_ENUM);
|
||||||
});
|
});
|
||||||
|
@ -827,12 +840,14 @@ App::post('/v1/database/collections/:collectionId/attributes/ip')
|
||||||
->param('array', false, new Boolean(), 'Is attribute an array?', true)
|
->param('array', false, new Boolean(), 'Is attribute an array?', true)
|
||||||
->inject('response')
|
->inject('response')
|
||||||
->inject('dbForInternal')
|
->inject('dbForInternal')
|
||||||
|
->inject('dbForExternal')
|
||||||
->inject('database')
|
->inject('database')
|
||||||
->inject('audits')
|
->inject('audits')
|
||||||
->inject('usage')
|
->inject('usage')
|
||||||
->action(function ($collectionId, $attributeId, $required, $default, $array, $response, $dbForInternal, $database, $audits, $usage) {
|
->action(function ($collectionId, $attributeId, $required, $default, $array, $response, $dbForInternal, $dbForExternal, $database, $audits, $usage) {
|
||||||
/** @var Appwrite\Utopia\Response $response */
|
/** @var Appwrite\Utopia\Response $response */
|
||||||
/** @var Utopia\Database\Database $dbForInternal*/
|
/** @var Utopia\Database\Database $dbForInternal*/
|
||||||
|
/** @var Utopia\Database\Database $dbForExternal*/
|
||||||
/** @var Appwrite\Event\Event $database */
|
/** @var Appwrite\Event\Event $database */
|
||||||
/** @var Appwrite\Event\Event $audits */
|
/** @var Appwrite\Event\Event $audits */
|
||||||
/** @var Appwrite\Stats\Stats $usage */
|
/** @var Appwrite\Stats\Stats $usage */
|
||||||
|
@ -845,7 +860,7 @@ App::post('/v1/database/collections/:collectionId/attributes/ip')
|
||||||
'default' => $default,
|
'default' => $default,
|
||||||
'array' => $array,
|
'array' => $array,
|
||||||
'format' => APP_DATABASE_ATTRIBUTE_IP,
|
'format' => APP_DATABASE_ATTRIBUTE_IP,
|
||||||
]), $response, $dbForInternal, $database, $audits, $usage);
|
]), $response, $dbForInternal, $dbForExternal, $database, $audits, $usage);
|
||||||
|
|
||||||
$response->dynamic($attribute, Response::MODEL_ATTRIBUTE_IP);
|
$response->dynamic($attribute, Response::MODEL_ATTRIBUTE_IP);
|
||||||
});
|
});
|
||||||
|
@ -869,10 +884,11 @@ App::post('/v1/database/collections/:collectionId/attributes/url')
|
||||||
->param('array', false, new Boolean(), 'Is attribute an array?', true)
|
->param('array', false, new Boolean(), 'Is attribute an array?', true)
|
||||||
->inject('response')
|
->inject('response')
|
||||||
->inject('dbForInternal')
|
->inject('dbForInternal')
|
||||||
|
->inject('dbForExternal')
|
||||||
->inject('database')
|
->inject('database')
|
||||||
->inject('audits')
|
->inject('audits')
|
||||||
->inject('usage')
|
->inject('usage')
|
||||||
->action(function ($collectionId, $attributeId, $required, $default, $array, $response, $dbForInternal, $database, $audits, $usage) {
|
->action(function ($collectionId, $attributeId, $required, $default, $array, $response, $dbForInternal, $dbForExternal, $database, $audits, $usage) {
|
||||||
/** @var Appwrite\Utopia\Response $response */
|
/** @var Appwrite\Utopia\Response $response */
|
||||||
/** @var Utopia\Database\Database $dbForExternal*/
|
/** @var Utopia\Database\Database $dbForExternal*/
|
||||||
/** @var Appwrite\Event\Event $database */
|
/** @var Appwrite\Event\Event $database */
|
||||||
|
@ -887,7 +903,7 @@ App::post('/v1/database/collections/:collectionId/attributes/url')
|
||||||
'default' => $default,
|
'default' => $default,
|
||||||
'array' => $array,
|
'array' => $array,
|
||||||
'format' => APP_DATABASE_ATTRIBUTE_URL,
|
'format' => APP_DATABASE_ATTRIBUTE_URL,
|
||||||
]), $response, $dbForInternal, $database, $audits, $usage);
|
]), $response, $dbForInternal, $dbForExternal, $database, $audits, $usage);
|
||||||
|
|
||||||
$response->dynamic($attribute, Response::MODEL_ATTRIBUTE_URL);
|
$response->dynamic($attribute, Response::MODEL_ATTRIBUTE_URL);
|
||||||
});
|
});
|
||||||
|
@ -913,12 +929,14 @@ App::post('/v1/database/collections/:collectionId/attributes/integer')
|
||||||
->param('array', false, new Boolean(), 'Is attribute an array?', true)
|
->param('array', false, new Boolean(), 'Is attribute an array?', true)
|
||||||
->inject('response')
|
->inject('response')
|
||||||
->inject('dbForInternal')
|
->inject('dbForInternal')
|
||||||
|
->inject('dbForExternal')
|
||||||
->inject('database')
|
->inject('database')
|
||||||
->inject('audits')
|
->inject('audits')
|
||||||
->inject('usage')
|
->inject('usage')
|
||||||
->action(function ($collectionId, $attributeId, $required, $min, $max, $default, $array, $response, $dbForInternal, $database, $audits, $usage) {
|
->action(function ($collectionId, $attributeId, $required, $min, $max, $default, $array, $response, $dbForInternal, $dbForExternal, $database, $audits, $usage) {
|
||||||
/** @var Appwrite\Utopia\Response $response */
|
/** @var Appwrite\Utopia\Response $response */
|
||||||
/** @var Utopia\Database\Database $dbForInternal*/
|
/** @var Utopia\Database\Database $dbForInternal*/
|
||||||
|
/** @var Utopia\Database\Database $dbForExternal*/
|
||||||
/** @var Appwrite\Event\Event $database */
|
/** @var Appwrite\Event\Event $database */
|
||||||
/** @var Appwrite\Event\Event $audits */
|
/** @var Appwrite\Event\Event $audits */
|
||||||
/** @var Appwrite\Stats\Stats $usage */
|
/** @var Appwrite\Stats\Stats $usage */
|
||||||
|
@ -949,7 +967,7 @@ App::post('/v1/database/collections/:collectionId/attributes/integer')
|
||||||
'min' => $min,
|
'min' => $min,
|
||||||
'max' => $max,
|
'max' => $max,
|
||||||
],
|
],
|
||||||
]), $response, $dbForInternal, $database, $audits, $usage);
|
]), $response, $dbForInternal, $dbForExternal, $database, $audits, $usage);
|
||||||
|
|
||||||
$formatOptions = $attribute->getAttribute('formatOptions', []);
|
$formatOptions = $attribute->getAttribute('formatOptions', []);
|
||||||
|
|
||||||
|
@ -982,12 +1000,14 @@ App::post('/v1/database/collections/:collectionId/attributes/float')
|
||||||
->param('array', false, new Boolean(), 'Is attribute an array?', true)
|
->param('array', false, new Boolean(), 'Is attribute an array?', true)
|
||||||
->inject('response')
|
->inject('response')
|
||||||
->inject('dbForInternal')
|
->inject('dbForInternal')
|
||||||
|
->inject('dbForExternal')
|
||||||
->inject('database')
|
->inject('database')
|
||||||
->inject('audits')
|
->inject('audits')
|
||||||
->inject('usage')
|
->inject('usage')
|
||||||
->action(function ($collectionId, $attributeId, $required, $min, $max, $default, $array, $response, $dbForInternal, $database, $audits, $usage) {
|
->action(function ($collectionId, $attributeId, $required, $min, $max, $default, $array, $response, $dbForInternal, $dbForExternal,$database, $audits, $usage) {
|
||||||
/** @var Appwrite\Utopia\Response $response */
|
/** @var Appwrite\Utopia\Response $response */
|
||||||
/** @var Utopia\Database\Database $dbForInternal*/
|
/** @var Utopia\Database\Database $dbForInternal*/
|
||||||
|
/** @var Utopia\Database\Database $dbForExternal*/
|
||||||
/** @var Appwrite\Event\Event $database */
|
/** @var Appwrite\Event\Event $database */
|
||||||
/** @var Appwrite\Event\Event $audits */
|
/** @var Appwrite\Event\Event $audits */
|
||||||
/** @var Appwrite\Stats\Stats $usage */
|
/** @var Appwrite\Stats\Stats $usage */
|
||||||
|
@ -1018,7 +1038,7 @@ App::post('/v1/database/collections/:collectionId/attributes/float')
|
||||||
'min' => $min,
|
'min' => $min,
|
||||||
'max' => $max,
|
'max' => $max,
|
||||||
],
|
],
|
||||||
]), $response, $dbForInternal, $database, $audits, $usage);
|
]), $response, $dbForInternal, $dbForExternal, $database, $audits, $usage);
|
||||||
|
|
||||||
$formatOptions = $attribute->getAttribute('formatOptions', []);
|
$formatOptions = $attribute->getAttribute('formatOptions', []);
|
||||||
|
|
||||||
|
@ -1049,10 +1069,11 @@ App::post('/v1/database/collections/:collectionId/attributes/boolean')
|
||||||
->param('array', false, new Boolean(), 'Is attribute an array?', true)
|
->param('array', false, new Boolean(), 'Is attribute an array?', true)
|
||||||
->inject('response')
|
->inject('response')
|
||||||
->inject('dbForInternal')
|
->inject('dbForInternal')
|
||||||
|
->inject('dbForExternal')
|
||||||
->inject('database')
|
->inject('database')
|
||||||
->inject('audits')
|
->inject('audits')
|
||||||
->inject('usage')
|
->inject('usage')
|
||||||
->action(function ($collectionId, $attributeId, $required, $default, $array, $response, $dbForInternal, $database, $audits, $usage) {
|
->action(function ($collectionId, $attributeId, $required, $default, $array, $response, $dbForInternal, $dbForExternal, $database, $audits, $usage) {
|
||||||
/** @var Appwrite\Utopia\Response $response */
|
/** @var Appwrite\Utopia\Response $response */
|
||||||
/** @var Utopia\Database\Database $dbForInternal*/
|
/** @var Utopia\Database\Database $dbForInternal*/
|
||||||
/** @var Appwrite\Event\Event $database */
|
/** @var Appwrite\Event\Event $database */
|
||||||
|
@ -1066,7 +1087,7 @@ App::post('/v1/database/collections/:collectionId/attributes/boolean')
|
||||||
'required' => $required,
|
'required' => $required,
|
||||||
'default' => $default,
|
'default' => $default,
|
||||||
'array' => $array,
|
'array' => $array,
|
||||||
]), $response, $dbForInternal, $database, $audits, $usage);
|
]), $response, $dbForInternal, $dbForExternal, $database, $audits, $usage);
|
||||||
|
|
||||||
$response->dynamic($attribute, Response::MODEL_ATTRIBUTE_BOOLEAN);
|
$response->dynamic($attribute, Response::MODEL_ATTRIBUTE_BOOLEAN);
|
||||||
});
|
});
|
||||||
|
@ -1184,13 +1205,15 @@ App::delete('/v1/database/collections/:collectionId/attributes/:attributeId')
|
||||||
->param('attributeId', '', new Key(), 'Attribute ID.')
|
->param('attributeId', '', new Key(), 'Attribute ID.')
|
||||||
->inject('response')
|
->inject('response')
|
||||||
->inject('dbForInternal')
|
->inject('dbForInternal')
|
||||||
|
->inject('dbForExternal')
|
||||||
->inject('database')
|
->inject('database')
|
||||||
->inject('events')
|
->inject('events')
|
||||||
->inject('audits')
|
->inject('audits')
|
||||||
->inject('usage')
|
->inject('usage')
|
||||||
->action(function ($collectionId, $attributeId, $response, $dbForInternal, $database, $events, $audits, $usage) {
|
->action(function ($collectionId, $attributeId, $response, $dbForInternal, $dbForExternal, $database, $events, $audits, $usage) {
|
||||||
/** @var Appwrite\Utopia\Response $response */
|
/** @var Appwrite\Utopia\Response $response */
|
||||||
/** @var Utopia\Database\Database $dbForInternal */
|
/** @var Utopia\Database\Database $dbForInternal */
|
||||||
|
/** @var Utopia\Database\Database $dbForExternal */
|
||||||
/** @var Appwrite\Event\Event $database */
|
/** @var Appwrite\Event\Event $database */
|
||||||
/** @var Appwrite\Event\Event $events */
|
/** @var Appwrite\Event\Event $events */
|
||||||
/** @var Appwrite\Event\Event $audits */
|
/** @var Appwrite\Event\Event $audits */
|
||||||
|
@ -1214,6 +1237,7 @@ App::delete('/v1/database/collections/:collectionId/attributes/:attributeId')
|
||||||
}
|
}
|
||||||
|
|
||||||
$dbForInternal->deleteCachedDocument('collections', $collectionId);
|
$dbForInternal->deleteCachedDocument('collections', $collectionId);
|
||||||
|
$dbForExternal->deleteCachedCollection($collection->getId());
|
||||||
|
|
||||||
$database
|
$database
|
||||||
->setParam('type', DATABASE_TYPE_DELETE_ATTRIBUTE)
|
->setParam('type', DATABASE_TYPE_DELETE_ATTRIBUTE)
|
||||||
|
|
|
@ -46,9 +46,20 @@ App::get('/v1/health/db')
|
||||||
->action(function ($response, $utopia) {
|
->action(function ($response, $utopia) {
|
||||||
/** @var Appwrite\Utopia\Response $response */
|
/** @var Appwrite\Utopia\Response $response */
|
||||||
/** @var Utopia\App $utopia */
|
/** @var Utopia\App $utopia */
|
||||||
$utopia->getResource('db');
|
try {
|
||||||
|
$db = $utopia->getResource('db'); /* @var $db PDO */
|
||||||
|
|
||||||
$response->json(['status' => 'OK']);
|
// Run a small test to check the connection
|
||||||
|
$statement = $db->prepare("SELECT 1;");
|
||||||
|
|
||||||
|
$statement->closeCursor();
|
||||||
|
|
||||||
|
$statement->execute();
|
||||||
|
} catch (Exception $_e) {
|
||||||
|
throw new Exception('Database is not available', 500);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $response->json(['status' => 'OK']);
|
||||||
});
|
});
|
||||||
|
|
||||||
App::get('/v1/health/cache')
|
App::get('/v1/health/cache')
|
||||||
|
@ -64,9 +75,14 @@ App::get('/v1/health/cache')
|
||||||
->action(function ($response, $utopia) {
|
->action(function ($response, $utopia) {
|
||||||
/** @var Appwrite\Utopia\Response $response */
|
/** @var Appwrite\Utopia\Response $response */
|
||||||
/** @var Utopia\App $utopia */
|
/** @var Utopia\App $utopia */
|
||||||
$utopia->getResource('cache');
|
/** @var Redis */
|
||||||
|
$redis = $utopia->getResource('cache');
|
||||||
|
|
||||||
$response->json(['status' => 'OK']);
|
if ($redis->ping(true)) {
|
||||||
|
return $response->json(['status' => 'OK']);
|
||||||
|
} else {
|
||||||
|
throw new Exception('Cache is not available', 500);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
App::get('/v1/health/time')
|
App::get('/v1/health/time')
|
||||||
|
|
|
@ -259,12 +259,14 @@ App::get('/v1/users/:userId/logs')
|
||||||
->label('sdk.response.type', Response::CONTENT_TYPE_JSON)
|
->label('sdk.response.type', Response::CONTENT_TYPE_JSON)
|
||||||
->label('sdk.response.model', Response::MODEL_LOG_LIST)
|
->label('sdk.response.model', Response::MODEL_LOG_LIST)
|
||||||
->param('userId', '', new UID(), 'User unique ID.')
|
->param('userId', '', new UID(), 'User unique ID.')
|
||||||
|
->param('limit', 25, new Range(0, 100), 'Maximum number of logs to return in response. Use this value to manage pagination. By default will return maximum 25 results. Maximum of 100 results allowed per request.', true)
|
||||||
|
->param('offset', 0, new Range(0, 900000000), 'Offset value. The default value is 0. Use this param to manage pagination.', true)
|
||||||
->inject('response')
|
->inject('response')
|
||||||
->inject('dbForInternal')
|
->inject('dbForInternal')
|
||||||
->inject('locale')
|
->inject('locale')
|
||||||
->inject('geodb')
|
->inject('geodb')
|
||||||
->inject('usage')
|
->inject('usage')
|
||||||
->action(function ($userId, $response, $dbForInternal, $locale, $geodb, $usage) {
|
->action(function ($userId, $limit, $offset, $response, $dbForInternal, $locale, $geodb, $usage) {
|
||||||
/** @var Appwrite\Utopia\Response $response */
|
/** @var Appwrite\Utopia\Response $response */
|
||||||
/** @var Utopia\Database\Document $project */
|
/** @var Utopia\Database\Document $project */
|
||||||
/** @var Utopia\Database\Database $dbForInternal */
|
/** @var Utopia\Database\Database $dbForInternal */
|
||||||
|
@ -279,8 +281,7 @@ App::get('/v1/users/:userId/logs')
|
||||||
}
|
}
|
||||||
|
|
||||||
$audit = new Audit($dbForInternal);
|
$audit = new Audit($dbForInternal);
|
||||||
|
$auditEvents = [
|
||||||
$logs = $audit->getLogsByUserAndEvents($user->getId(), [
|
|
||||||
'account.create',
|
'account.create',
|
||||||
'account.delete',
|
'account.delete',
|
||||||
'account.update.name',
|
'account.update.name',
|
||||||
|
@ -296,7 +297,9 @@ App::get('/v1/users/:userId/logs')
|
||||||
'teams.membership.create',
|
'teams.membership.create',
|
||||||
'teams.membership.update',
|
'teams.membership.update',
|
||||||
'teams.membership.delete',
|
'teams.membership.delete',
|
||||||
]);
|
];
|
||||||
|
|
||||||
|
$logs = $audit->getLogsByUserAndEvents($user->getId(), $auditEvents, $limit, $offset);
|
||||||
|
|
||||||
$output = [];
|
$output = [];
|
||||||
|
|
||||||
|
@ -355,7 +358,11 @@ App::get('/v1/users/:userId/logs')
|
||||||
$usage
|
$usage
|
||||||
->setParam('users.read', 1)
|
->setParam('users.read', 1)
|
||||||
;
|
;
|
||||||
$response->dynamic(new Document(['logs' => $output]), Response::MODEL_LOG_LIST);
|
|
||||||
|
$response->dynamic(new Document([
|
||||||
|
'sum' => $audit->countLogsByUserAndEvents($user->getId(), $auditEvents),
|
||||||
|
'logs' => $output,
|
||||||
|
]), Response::MODEL_LOG_LIST);
|
||||||
});
|
});
|
||||||
|
|
||||||
App::patch('/v1/users/:userId/status')
|
App::patch('/v1/users/:userId/status')
|
||||||
|
|
|
@ -234,29 +234,74 @@ App::post('/v1/mock/tests/general/upload')
|
||||||
->param('z', null, new ArrayList(new Text(256)), 'Sample array param')
|
->param('z', null, new ArrayList(new Text(256)), 'Sample array param')
|
||||||
->param('file', [], new File(), 'Sample file param', false)
|
->param('file', [], new File(), 'Sample file param', false)
|
||||||
->inject('request')
|
->inject('request')
|
||||||
->action(function ($x, $y, $z, $file, $request) {
|
->inject('response')
|
||||||
|
->action(function ($x, $y, $z, $file, $request, $response) {
|
||||||
/** @var Utopia\Swoole\Request $request */
|
/** @var Utopia\Swoole\Request $request */
|
||||||
|
/** @var Utopia\Swoole\Response $response */
|
||||||
|
|
||||||
$file = $request->getFiles('file');
|
$file = $request->getFiles('file');
|
||||||
$file['tmp_name'] = (\is_array($file['tmp_name'])) ? $file['tmp_name'] : [$file['tmp_name']];
|
|
||||||
$file['name'] = (\is_array($file['name'])) ? $file['name'] : [$file['name']];
|
$contentRange = $request->getHeader('content-range');
|
||||||
$file['size'] = (\is_array($file['size'])) ? $file['size'] : [$file['size']];
|
if(!empty($contentRange)) {
|
||||||
|
$start = $request->getContentRangeStart();
|
||||||
|
$end = $request->getContentRangeEnd();
|
||||||
|
$size = $request->getContentRangeSize();
|
||||||
|
$id = $request->getHeader('x-appwrite-id', '');
|
||||||
|
$file['size'] = (\is_array($file['size'])) ? $file['size'] : [$file['size']];
|
||||||
|
|
||||||
foreach ($file['name'] as $i => $name) {
|
if(is_null($start) || is_null($end) || is_null($size)) {
|
||||||
if ($name !== 'file.png') {
|
throw new Exception('Invalid content-range header', 400);
|
||||||
throw new Exception('Wrong file name', 400);
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
foreach ($file['size'] as $i => $size) {
|
if($start > $end || $end > $size) {
|
||||||
if ($size !== 38756) {
|
throw new Exception('Invalid content-range header', 400);
|
||||||
throw new Exception('Wrong file size', 400);
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
foreach ($file['tmp_name'] as $i => $tmpName) {
|
if($start === 0 && !empty($id)) {
|
||||||
if (\md5(\file_get_contents($tmpName)) !== 'd80e7e6999a3eb2ae0d631a96fe135a4') {
|
throw new Exception('First chunked request cannot have id header', 400);
|
||||||
throw new Exception('Wrong file uploaded', 400);
|
}
|
||||||
|
|
||||||
|
if($start !== 0 && $id !== 'newfileid') {
|
||||||
|
throw new Exception('All chunked request must have id header (except first)', 400);
|
||||||
|
}
|
||||||
|
|
||||||
|
if($end !== $size && $end-$start+1 !== 5*1024*1024) {
|
||||||
|
throw new Exception('Chunk size must be 5MB (except last chunk)', 400);
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach ($file['size'] as $i => $sz) {
|
||||||
|
if ($end !== $size && $sz !== 5*1024*1024) {
|
||||||
|
throw new Exception('Wrong chunk size', 400);
|
||||||
|
}
|
||||||
|
|
||||||
|
if($sz > 5*1024*1024) {
|
||||||
|
throw new Exception('Chunk size must be 5MB or less', 400);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if($end !== $size) {
|
||||||
|
$response->json(['$id'=> 'newfileid']);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$file['tmp_name'] = (\is_array($file['tmp_name'])) ? $file['tmp_name'] : [$file['tmp_name']];
|
||||||
|
$file['name'] = (\is_array($file['name'])) ? $file['name'] : [$file['name']];
|
||||||
|
$file['size'] = (\is_array($file['size'])) ? $file['size'] : [$file['size']];
|
||||||
|
|
||||||
|
foreach ($file['name'] as $i => $name) {
|
||||||
|
if ($name !== 'file.png') {
|
||||||
|
throw new Exception('Wrong file name', 400);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach ($file['size'] as $i => $size) {
|
||||||
|
if ($size !== 38756) {
|
||||||
|
throw new Exception('Wrong file size', 400);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach ($file['tmp_name'] as $i => $tmpName) {
|
||||||
|
if (\md5(\file_get_contents($tmpName)) !== 'd80e7e6999a3eb2ae0d631a96fe135a4') {
|
||||||
|
throw new Exception('Wrong file uploaded', 400);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -246,17 +246,19 @@ $cli
|
||||||
$max = 10;
|
$max = 10;
|
||||||
$sleep = 1;
|
$sleep = 1;
|
||||||
|
|
||||||
$database = $client->selectDB('telegraf');
|
|
||||||
do { // check if telegraf database is ready
|
do { // check if telegraf database is ready
|
||||||
$attempts++;
|
try {
|
||||||
if(!in_array('telegraf', $client->listDatabases())) {
|
$attempts++;
|
||||||
|
$database = $client->selectDB('telegraf');
|
||||||
|
if(in_array('telegraf', $client->listDatabases())) {
|
||||||
|
break; // leave the do-while if successful
|
||||||
|
}
|
||||||
|
} catch (\Throwable $th) {
|
||||||
Console::warning("InfluxDB not ready. Retrying connection ({$attempts})...");
|
Console::warning("InfluxDB not ready. Retrying connection ({$attempts})...");
|
||||||
if($attempts >= $max) {
|
if($attempts >= $max) {
|
||||||
throw new \Exception('InfluxDB database not ready yet');
|
throw new \Exception('InfluxDB database not ready yet');
|
||||||
}
|
}
|
||||||
sleep($sleep);
|
sleep($sleep);
|
||||||
} else {
|
|
||||||
break; // leave the do-while if successful
|
|
||||||
}
|
}
|
||||||
} while ($attempts < $max);
|
} while ($attempts < $max);
|
||||||
|
|
||||||
|
@ -382,7 +384,7 @@ $cli
|
||||||
$dbForProject->updateDocument('stats', $document->getId(),
|
$dbForProject->updateDocument('stats', $document->getId(),
|
||||||
$document->setAttribute('value', $storageTotal));
|
$document->setAttribute('value', $storageTotal));
|
||||||
}
|
}
|
||||||
|
|
||||||
$time = (int) (floor(time() / 86400) * 86400); // Time rounded to nearest day
|
$time = (int) (floor(time() / 86400) * 86400); // Time rounded to nearest day
|
||||||
$id = \md5($time . '_1d_storage.total'); //Construct unique id for each metric using time, period and metric
|
$id = \md5($time . '_1d_storage.total'); //Construct unique id for each metric using time, period and metric
|
||||||
$document = $dbForProject->getDocument('stats', $id);
|
$document = $dbForProject->getDocument('stats', $id);
|
||||||
|
|
|
@ -11,7 +11,7 @@ use Utopia\Abuse\Adapters\TimeLimit;
|
||||||
use Utopia\CLI\Console;
|
use Utopia\CLI\Console;
|
||||||
use Utopia\Audit\Audit;
|
use Utopia\Audit\Audit;
|
||||||
|
|
||||||
require_once __DIR__.'/../init.php';
|
require_once __DIR__ . '/../init.php';
|
||||||
|
|
||||||
Console::title('Deletes V1 Worker');
|
Console::title('Deletes V1 Worker');
|
||||||
Console::success(APP_NAME . ' deletes worker v1 has started' . "\n");
|
Console::success(APP_NAME . ' deletes worker v1 has started' . "\n");
|
||||||
|
@ -31,12 +31,11 @@ class DeletesV1 extends Worker
|
||||||
{
|
{
|
||||||
$projectId = $this->args['projectId'] ?? '';
|
$projectId = $this->args['projectId'] ?? '';
|
||||||
$type = $this->args['type'] ?? '';
|
$type = $this->args['type'] ?? '';
|
||||||
|
|
||||||
switch (strval($type)) {
|
switch (strval($type)) {
|
||||||
case DELETE_TYPE_DOCUMENT:
|
case DELETE_TYPE_DOCUMENT:
|
||||||
$document = $this->args['document'] ?? [];
|
$document = new Document($this->args['document'] ?? []);
|
||||||
$document = new Document($document);
|
|
||||||
|
|
||||||
switch ($document->getCollection()) {
|
switch ($document->getCollection()) {
|
||||||
case DELETE_TYPE_COLLECTIONS:
|
case DELETE_TYPE_COLLECTIONS:
|
||||||
$this->deleteCollection($document, $projectId);
|
$this->deleteCollection($document, $projectId);
|
||||||
|
@ -72,8 +71,7 @@ class DeletesV1 extends Worker
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case DELETE_TYPE_REALTIME:
|
case DELETE_TYPE_REALTIME:
|
||||||
//$this->deleteRealtimeUsage($this->args['timestamp']);
|
$this->deleteRealtimeUsage($this->args['timestamp']);
|
||||||
//TODO: implement this
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case DELETE_TYPE_CERTIFICATES:
|
case DELETE_TYPE_CERTIFICATES:
|
||||||
|
@ -120,12 +118,10 @@ class DeletesV1 extends Worker
|
||||||
* @param int $timestamp1d
|
* @param int $timestamp1d
|
||||||
* @param int $timestamp30m
|
* @param int $timestamp30m
|
||||||
*/
|
*/
|
||||||
protected function deleteUsageStats(int $timestamp1d, int $timestamp30m) {
|
protected function deleteUsageStats(int $timestamp1d, int $timestamp30m)
|
||||||
$this->deleteForProjectIds(function($projectId) use ($timestamp1d, $timestamp30m) {
|
{
|
||||||
if (!($dbForInternal = $this->getInternalDB($projectId))) {
|
$this->deleteForProjectIds(function (string $projectId) use ($timestamp1d, $timestamp30m) {
|
||||||
throw new Exception('Failed to get projectDB for project '.$projectId);
|
$dbForInternal = $this->getInternalDB($projectId);
|
||||||
}
|
|
||||||
|
|
||||||
// Delete Usage stats
|
// Delete Usage stats
|
||||||
$this->deleteByGroup('stats', [
|
$this->deleteByGroup('stats', [
|
||||||
new Query('time', Query::TYPE_LESSER, [$timestamp1d]),
|
new Query('time', Query::TYPE_LESSER, [$timestamp1d]),
|
||||||
|
@ -138,7 +134,7 @@ class DeletesV1 extends Worker
|
||||||
], $dbForInternal);
|
], $dbForInternal);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param Document $document teams document
|
* @param Document $document teams document
|
||||||
* @param string $projectId
|
* @param string $projectId
|
||||||
|
@ -159,13 +155,14 @@ class DeletesV1 extends Worker
|
||||||
protected function deleteProject(Document $document): void
|
protected function deleteProject(Document $document): void
|
||||||
{
|
{
|
||||||
$projectId = $document->getId();
|
$projectId = $document->getId();
|
||||||
|
|
||||||
// Delete all DBs
|
// Delete all DBs
|
||||||
$this->getExternalDB($projectId)->delete();
|
$this->getExternalDB($projectId)->delete();
|
||||||
$this->getInternalDB($projectId)->delete();
|
$this->getInternalDB($projectId)->delete();
|
||||||
|
|
||||||
// Delete all storage directories
|
// Delete all storage directories
|
||||||
$uploads = new Local(APP_STORAGE_UPLOADS.'/app-'.$document->getId());
|
$uploads = new Local(APP_STORAGE_UPLOADS . '/app-' . $document->getId());
|
||||||
$cache = new Local(APP_STORAGE_CACHE.'/app-'.$document->getId());
|
$cache = new Local(APP_STORAGE_CACHE . '/app-' . $document->getId());
|
||||||
|
|
||||||
$uploads->delete($uploads->getRoot(), true);
|
$uploads->delete($uploads->getRoot(), true);
|
||||||
$cache->delete($cache->getRoot(), true);
|
$cache->delete($cache->getRoot(), true);
|
||||||
|
@ -183,12 +180,12 @@ class DeletesV1 extends Worker
|
||||||
// Delete Memberships and decrement team membership counts
|
// Delete Memberships and decrement team membership counts
|
||||||
$this->deleteByGroup('memberships', [
|
$this->deleteByGroup('memberships', [
|
||||||
new Query('userId', Query::TYPE_EQUAL, [$userId])
|
new Query('userId', Query::TYPE_EQUAL, [$userId])
|
||||||
], $this->getInternalDB($projectId), function(Document $document) use ($projectId, $userId) {
|
], $this->getInternalDB($projectId), function (Document $document) use ($projectId) {
|
||||||
|
|
||||||
if ($document->getAttribute('confirm')) { // Count only confirmed members
|
if ($document->getAttribute('confirm')) { // Count only confirmed members
|
||||||
$teamId = $document->getAttribute('teamId');
|
$teamId = $document->getAttribute('teamId');
|
||||||
$team = $this->getInternalDB($projectId)->getDocument('teams', $teamId);
|
$team = $this->getInternalDB($projectId)->getDocument('teams', $teamId);
|
||||||
if(!$team->isEmpty()) {
|
if (!$team->isEmpty()) {
|
||||||
$team = $this->getInternalDB($projectId)->updateDocument('teams', $teamId, new Document(\array_merge($team->getArrayCopy(), [
|
$team = $this->getInternalDB($projectId)->updateDocument('teams', $teamId, new Document(\array_merge($team->getArrayCopy(), [
|
||||||
'sum' => \max($team->getAttribute('sum', 0) - 1, 0), // Ensure that sum >= 0
|
'sum' => \max($team->getAttribute('sum', 0) - 1, 0), // Ensure that sum >= 0
|
||||||
])));
|
])));
|
||||||
|
@ -202,11 +199,8 @@ class DeletesV1 extends Worker
|
||||||
*/
|
*/
|
||||||
protected function deleteExecutionLogs(int $timestamp): void
|
protected function deleteExecutionLogs(int $timestamp): void
|
||||||
{
|
{
|
||||||
$this->deleteForProjectIds(function(string $projectId) use ($timestamp) {
|
$this->deleteForProjectIds(function (string $projectId) use ($timestamp) {
|
||||||
if (!($dbForInternal = $this->getInternalDB($projectId))) {
|
$dbForInternal = $this->getInternalDB($projectId);
|
||||||
throw new Exception('Failed to get projectDB for project '.$projectId);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Delete Executions
|
// Delete Executions
|
||||||
$this->deleteByGroup('executions', [
|
$this->deleteByGroup('executions', [
|
||||||
new Query('dateCreated', Query::TYPE_LESSER, [$timestamp])
|
new Query('dateCreated', Query::TYPE_LESSER, [$timestamp])
|
||||||
|
@ -214,18 +208,33 @@ class DeletesV1 extends Worker
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param int $timestamp
|
||||||
|
*/
|
||||||
|
protected function deleteRealtimeUsage(int $timestamp): void
|
||||||
|
{
|
||||||
|
$this->deleteForProjectIds(function (string $projectId) use ($timestamp) {
|
||||||
|
$dbForInternal = $this->getInternalDB($projectId);
|
||||||
|
// Delete Dead Realtime Logs
|
||||||
|
$this->deleteByGroup('realtime', [
|
||||||
|
new Query('timestamp', Query::TYPE_LESSER, [$timestamp])
|
||||||
|
], $dbForInternal);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param int $timestamp
|
* @param int $timestamp
|
||||||
*/
|
*/
|
||||||
protected function deleteAbuseLogs(int $timestamp): void
|
protected function deleteAbuseLogs(int $timestamp): void
|
||||||
{
|
{
|
||||||
if($timestamp == 0) {
|
if ($timestamp == 0) {
|
||||||
throw new Exception('Failed to delete audit logs. No timestamp provided');
|
throw new Exception('Failed to delete audit logs. No timestamp provided');
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->deleteForProjectIds(function($projectId) use ($timestamp){
|
$this->deleteForProjectIds(function (string $projectId) use ($timestamp) {
|
||||||
$timeLimit = new TimeLimit("", 0, 1, $this->getInternalDB($projectId));
|
$dbForInternal = $this->getInternalDB($projectId);
|
||||||
$abuse = new Abuse($timeLimit);
|
$timeLimit = new TimeLimit("", 0, 1, $dbForInternal);
|
||||||
|
$abuse = new Abuse($timeLimit);
|
||||||
|
|
||||||
$status = $abuse->cleanup($timestamp);
|
$status = $abuse->cleanup($timestamp);
|
||||||
if (!$status) {
|
if (!$status) {
|
||||||
|
@ -239,11 +248,12 @@ class DeletesV1 extends Worker
|
||||||
*/
|
*/
|
||||||
protected function deleteAuditLogs(int $timestamp): void
|
protected function deleteAuditLogs(int $timestamp): void
|
||||||
{
|
{
|
||||||
if($timestamp == 0) {
|
if ($timestamp == 0) {
|
||||||
throw new Exception('Failed to delete audit logs. No timestamp provided');
|
throw new Exception('Failed to delete audit logs. No timestamp provided');
|
||||||
}
|
}
|
||||||
$this->deleteForProjectIds(function($projectId) use ($timestamp){
|
$this->deleteForProjectIds(function (string $projectId) use ($timestamp) {
|
||||||
$audit = new Audit($this->getInternalDB($projectId));
|
$dbForInternal = $this->getInternalDB($projectId);
|
||||||
|
$audit = new Audit($dbForInternal);
|
||||||
$status = $audit->cleanup($timestamp);
|
$status = $audit->cleanup($timestamp);
|
||||||
if (!$status) {
|
if (!$status) {
|
||||||
throw new Exception('Failed to delete Audit logs for project' . $projectId);
|
throw new Exception('Failed to delete Audit logs for project' . $projectId);
|
||||||
|
@ -258,12 +268,12 @@ class DeletesV1 extends Worker
|
||||||
protected function deleteFunction(Document $document, string $projectId): void
|
protected function deleteFunction(Document $document, string $projectId): void
|
||||||
{
|
{
|
||||||
$dbForInternal = $this->getInternalDB($projectId);
|
$dbForInternal = $this->getInternalDB($projectId);
|
||||||
$device = new Local(APP_STORAGE_FUNCTIONS.'/app-'.$projectId);
|
$device = new Local(APP_STORAGE_FUNCTIONS . '/app-' . $projectId);
|
||||||
|
|
||||||
// Delete Tags
|
// Delete Tags
|
||||||
$this->deleteByGroup('tags', [
|
$this->deleteByGroup('tags', [
|
||||||
new Query('functionId', Query::TYPE_EQUAL, [$document->getId()])
|
new Query('functionId', Query::TYPE_EQUAL, [$document->getId()])
|
||||||
], $dbForInternal, function(Document $document) use ($device) {
|
], $dbForInternal, function (Document $document) use ($device) {
|
||||||
|
|
||||||
if ($device->delete($document->getAttribute('path', ''))) {
|
if ($device->delete($document->getAttribute('path', ''))) {
|
||||||
Console::success('Delete code tag: ' . $document->getAttribute('path', ''));
|
Console::success('Delete code tag: ' . $document->getAttribute('path', ''));
|
||||||
|
@ -290,8 +300,8 @@ class DeletesV1 extends Worker
|
||||||
{
|
{
|
||||||
Authorization::disable();
|
Authorization::disable();
|
||||||
|
|
||||||
if($database->deleteDocument($document->getCollection(), $document->getId())) {
|
if ($database->deleteDocument($document->getCollection(), $document->getId())) {
|
||||||
Console::success('Deleted document "'.$document->getId().'" successfully');
|
Console::success('Deleted document "' . $document->getId() . '" successfully');
|
||||||
|
|
||||||
if (is_callable($callback)) {
|
if (is_callable($callback)) {
|
||||||
$callback($document);
|
$callback($document);
|
||||||
|
@ -319,16 +329,15 @@ class DeletesV1 extends Worker
|
||||||
|
|
||||||
$executionStart = \microtime(true);
|
$executionStart = \microtime(true);
|
||||||
|
|
||||||
while($sum === $limit) {
|
while ($sum === $limit) {
|
||||||
Authorization::disable();
|
Authorization::disable();
|
||||||
$projects = $this->getConsoleDB()->find('projects', [], $limit, ($chunk * $limit));
|
$projects = $this->getConsoleDB()->find('projects', [], $limit, ($chunk * $limit));
|
||||||
Authorization::reset();
|
Authorization::reset();
|
||||||
|
|
||||||
$chunk++;
|
$chunk++;
|
||||||
|
|
||||||
$projectIds = array_map (function ($project) {
|
/** @var string[] $projectIds */
|
||||||
return $project->getId();
|
$projectIds = array_map(fn(Document $project) => $project->getId(), $projects);
|
||||||
}, $projects);
|
|
||||||
|
|
||||||
$sum = count($projects);
|
$sum = count($projects);
|
||||||
|
|
||||||
|
@ -359,7 +368,7 @@ class DeletesV1 extends Worker
|
||||||
|
|
||||||
$executionStart = \microtime(true);
|
$executionStart = \microtime(true);
|
||||||
|
|
||||||
while($sum === $limit) {
|
while ($sum === $limit) {
|
||||||
$chunk++;
|
$chunk++;
|
||||||
|
|
||||||
Authorization::disable();
|
Authorization::disable();
|
||||||
|
|
|
@ -41,11 +41,11 @@
|
||||||
"utopia-php/framework": "0.19.*",
|
"utopia-php/framework": "0.19.*",
|
||||||
"utopia-php/abuse": "0.6.*",
|
"utopia-php/abuse": "0.6.*",
|
||||||
"utopia-php/analytics": "0.2.*",
|
"utopia-php/analytics": "0.2.*",
|
||||||
"utopia-php/audit": "0.6.*",
|
"utopia-php/audit": "0.7.*",
|
||||||
"utopia-php/cache": "0.4.*",
|
"utopia-php/cache": "0.4.*",
|
||||||
"utopia-php/cli": "0.11.*",
|
"utopia-php/cli": "0.11.*",
|
||||||
"utopia-php/config": "0.2.*",
|
"utopia-php/config": "0.2.*",
|
||||||
"utopia-php/database": "dev-fix-query-validator-constructor as 0.10.9",
|
"utopia-php/database": "0.11.*",
|
||||||
"utopia-php/locale": "0.4.*",
|
"utopia-php/locale": "0.4.*",
|
||||||
"utopia-php/orchestration": "0.2.*",
|
"utopia-php/orchestration": "0.2.*",
|
||||||
"utopia-php/registry": "0.5.*",
|
"utopia-php/registry": "0.5.*",
|
||||||
|
@ -67,7 +67,7 @@
|
||||||
},
|
},
|
||||||
"repositories": [],
|
"repositories": [],
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"appwrite/sdk-generator": "0.16.0",
|
"appwrite/sdk-generator": "0.16.2",
|
||||||
"phpunit/phpunit": "9.5.6",
|
"phpunit/phpunit": "9.5.6",
|
||||||
"swoole/ide-helper": "4.6.7",
|
"swoole/ide-helper": "4.6.7",
|
||||||
"textalk/websocket": "1.5.2",
|
"textalk/websocket": "1.5.2",
|
||||||
|
|
153
composer.lock
generated
153
composer.lock
generated
|
@ -4,7 +4,7 @@
|
||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"content-hash": "55ff735e10c409ad5bc05c8793839f06",
|
"content-hash": "8427bbf013694d9771cd09341a81562e",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "adhocore/jwt",
|
"name": "adhocore/jwt",
|
||||||
|
@ -1591,16 +1591,16 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/deprecation-contracts",
|
"name": "symfony/deprecation-contracts",
|
||||||
"version": "v2.4.0",
|
"version": "v2.5.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/deprecation-contracts.git",
|
"url": "https://github.com/symfony/deprecation-contracts.git",
|
||||||
"reference": "5f38c8804a9e97d23e0c8d63341088cd8a22d627"
|
"reference": "6f981ee24cf69ee7ce9736146d1c57c2780598a8"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/5f38c8804a9e97d23e0c8d63341088cd8a22d627",
|
"url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/6f981ee24cf69ee7ce9736146d1c57c2780598a8",
|
||||||
"reference": "5f38c8804a9e97d23e0c8d63341088cd8a22d627",
|
"reference": "6f981ee24cf69ee7ce9736146d1c57c2780598a8",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -1609,7 +1609,7 @@
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
"branch-alias": {
|
"branch-alias": {
|
||||||
"dev-main": "2.4-dev"
|
"dev-main": "2.5-dev"
|
||||||
},
|
},
|
||||||
"thanks": {
|
"thanks": {
|
||||||
"name": "symfony/contracts",
|
"name": "symfony/contracts",
|
||||||
|
@ -1638,7 +1638,7 @@
|
||||||
"description": "A generic function and convention to trigger deprecation notices",
|
"description": "A generic function and convention to trigger deprecation notices",
|
||||||
"homepage": "https://symfony.com",
|
"homepage": "https://symfony.com",
|
||||||
"support": {
|
"support": {
|
||||||
"source": "https://github.com/symfony/deprecation-contracts/tree/v2.4.0"
|
"source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.0"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
|
@ -1654,7 +1654,7 @@
|
||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2021-03-23T23:28:01+00:00"
|
"time": "2021-07-12T14:48:14+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/polyfill-ctype",
|
"name": "symfony/polyfill-ctype",
|
||||||
|
@ -1928,22 +1928,22 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "utopia-php/audit",
|
"name": "utopia-php/audit",
|
||||||
"version": "0.6.3",
|
"version": "0.7.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/utopia-php/audit.git",
|
"url": "https://github.com/utopia-php/audit.git",
|
||||||
"reference": "d79b467fbc7d03e5e02f12cdeb08761507a60ca0"
|
"reference": "485cdd2354db7eb8f7aa74bbe39c39b583e99c04"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/utopia-php/audit/zipball/d79b467fbc7d03e5e02f12cdeb08761507a60ca0",
|
"url": "https://api.github.com/repos/utopia-php/audit/zipball/485cdd2354db7eb8f7aa74bbe39c39b583e99c04",
|
||||||
"reference": "d79b467fbc7d03e5e02f12cdeb08761507a60ca0",
|
"reference": "485cdd2354db7eb8f7aa74bbe39c39b583e99c04",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"ext-pdo": "*",
|
"ext-pdo": "*",
|
||||||
"php": ">=7.4",
|
"php": ">=7.4",
|
||||||
"utopia-php/database": ">=0.6 <1.0"
|
"utopia-php/database": ">=0.11 <1.0"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpunit/phpunit": "^9.3",
|
"phpunit/phpunit": "^9.3",
|
||||||
|
@ -1975,9 +1975,9 @@
|
||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/utopia-php/audit/issues",
|
"issues": "https://github.com/utopia-php/audit/issues",
|
||||||
"source": "https://github.com/utopia-php/audit/tree/0.6.3"
|
"source": "https://github.com/utopia-php/audit/tree/0.7.0"
|
||||||
},
|
},
|
||||||
"time": "2021-08-16T18:49:55+00:00"
|
"time": "2021-11-17T17:23:42+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "utopia-php/cache",
|
"name": "utopia-php/cache",
|
||||||
|
@ -2138,16 +2138,16 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "utopia-php/database",
|
"name": "utopia-php/database",
|
||||||
"version": "dev-fix-query-validator-constructor",
|
"version": "0.11.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/utopia-php/database.git",
|
"url": "https://github.com/utopia-php/database.git",
|
||||||
"reference": "a475b232578389f5c74714bec77c880254802b1c"
|
"reference": "5fc0476d05567d1a156b00e17033f32148c93a38"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/utopia-php/database/zipball/a475b232578389f5c74714bec77c880254802b1c",
|
"url": "https://api.github.com/repos/utopia-php/database/zipball/5fc0476d05567d1a156b00e17033f32148c93a38",
|
||||||
"reference": "a475b232578389f5c74714bec77c880254802b1c",
|
"reference": "5fc0476d05567d1a156b00e17033f32148c93a38",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -2195,9 +2195,9 @@
|
||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/utopia-php/database/issues",
|
"issues": "https://github.com/utopia-php/database/issues",
|
||||||
"source": "https://github.com/utopia-php/database/tree/fix-query-validator-constructor"
|
"source": "https://github.com/utopia-php/database/tree/0.11.0"
|
||||||
},
|
},
|
||||||
"time": "2021-11-02T22:56:56+00:00"
|
"time": "2021-11-17T09:53:02+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "utopia-php/domains",
|
"name": "utopia-php/domains",
|
||||||
|
@ -3014,16 +3014,16 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "appwrite/sdk-generator",
|
"name": "appwrite/sdk-generator",
|
||||||
"version": "0.16.0",
|
"version": "0.16.2",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/appwrite/sdk-generator.git",
|
"url": "https://github.com/appwrite/sdk-generator.git",
|
||||||
"reference": "5a57afe89ded393a3eca8d9ba96b8e2c479f2601"
|
"reference": "e3a20c96a745a9c4aa048fd344650fcfbf41cf6f"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/5a57afe89ded393a3eca8d9ba96b8e2c479f2601",
|
"url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/e3a20c96a745a9c4aa048fd344650fcfbf41cf6f",
|
||||||
"reference": "5a57afe89ded393a3eca8d9ba96b8e2c479f2601",
|
"reference": "e3a20c96a745a9c4aa048fd344650fcfbf41cf6f",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -3057,9 +3057,9 @@
|
||||||
"description": "Appwrite PHP library for generating API SDKs for multiple programming languages and platforms",
|
"description": "Appwrite PHP library for generating API SDKs for multiple programming languages and platforms",
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/appwrite/sdk-generator/issues",
|
"issues": "https://github.com/appwrite/sdk-generator/issues",
|
||||||
"source": "https://github.com/appwrite/sdk-generator/tree/0.16.0"
|
"source": "https://github.com/appwrite/sdk-generator/tree/0.16.2"
|
||||||
},
|
},
|
||||||
"time": "2021-10-21T06:49:55+00:00"
|
"time": "2021-11-12T11:09:38+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "composer/semver",
|
"name": "composer/semver",
|
||||||
|
@ -3655,16 +3655,16 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "nikic/php-parser",
|
"name": "nikic/php-parser",
|
||||||
"version": "v4.13.0",
|
"version": "v4.13.1",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/nikic/PHP-Parser.git",
|
"url": "https://github.com/nikic/PHP-Parser.git",
|
||||||
"reference": "50953a2691a922aa1769461637869a0a2faa3f53"
|
"reference": "63a79e8daa781cac14e5195e63ed8ae231dd10fd"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/50953a2691a922aa1769461637869a0a2faa3f53",
|
"url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/63a79e8daa781cac14e5195e63ed8ae231dd10fd",
|
||||||
"reference": "50953a2691a922aa1769461637869a0a2faa3f53",
|
"reference": "63a79e8daa781cac14e5195e63ed8ae231dd10fd",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -3705,9 +3705,9 @@
|
||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/nikic/PHP-Parser/issues",
|
"issues": "https://github.com/nikic/PHP-Parser/issues",
|
||||||
"source": "https://github.com/nikic/PHP-Parser/tree/v4.13.0"
|
"source": "https://github.com/nikic/PHP-Parser/tree/v4.13.1"
|
||||||
},
|
},
|
||||||
"time": "2021-09-20T12:20:58+00:00"
|
"time": "2021-11-03T20:52:16+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "openlss/lib-array2xml",
|
"name": "openlss/lib-array2xml",
|
||||||
|
@ -4102,16 +4102,16 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "phpunit/php-code-coverage",
|
"name": "phpunit/php-code-coverage",
|
||||||
"version": "9.2.8",
|
"version": "9.2.9",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
|
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
|
||||||
"reference": "cf04e88a2e3c56fc1a65488afd493325b4c1bc3e"
|
"reference": "f301eb1453c9e7a1bc912ee8b0ea9db22c60223b"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/cf04e88a2e3c56fc1a65488afd493325b4c1bc3e",
|
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/f301eb1453c9e7a1bc912ee8b0ea9db22c60223b",
|
||||||
"reference": "cf04e88a2e3c56fc1a65488afd493325b4c1bc3e",
|
"reference": "f301eb1453c9e7a1bc912ee8b0ea9db22c60223b",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -4167,7 +4167,7 @@
|
||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/sebastianbergmann/php-code-coverage/issues",
|
"issues": "https://github.com/sebastianbergmann/php-code-coverage/issues",
|
||||||
"source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.8"
|
"source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.9"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
|
@ -4175,7 +4175,7 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2021-10-30T08:01:38+00:00"
|
"time": "2021-11-19T15:21:02+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "phpunit/php-file-iterator",
|
"name": "phpunit/php-file-iterator",
|
||||||
|
@ -4523,20 +4523,20 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "psr/container",
|
"name": "psr/container",
|
||||||
"version": "1.1.1",
|
"version": "1.1.2",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/php-fig/container.git",
|
"url": "https://github.com/php-fig/container.git",
|
||||||
"reference": "8622567409010282b7aeebe4bb841fe98b58dcaf"
|
"reference": "513e0666f7216c7459170d56df27dfcefe1689ea"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/php-fig/container/zipball/8622567409010282b7aeebe4bb841fe98b58dcaf",
|
"url": "https://api.github.com/repos/php-fig/container/zipball/513e0666f7216c7459170d56df27dfcefe1689ea",
|
||||||
"reference": "8622567409010282b7aeebe4bb841fe98b58dcaf",
|
"reference": "513e0666f7216c7459170d56df27dfcefe1689ea",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=7.2.0"
|
"php": ">=7.4.0"
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
|
@ -4565,9 +4565,9 @@
|
||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/php-fig/container/issues",
|
"issues": "https://github.com/php-fig/container/issues",
|
||||||
"source": "https://github.com/php-fig/container/tree/1.1.1"
|
"source": "https://github.com/php-fig/container/tree/1.1.2"
|
||||||
},
|
},
|
||||||
"time": "2021-03-05T17:36:06+00:00"
|
"time": "2021-11-05T16:50:12+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "sebastian/cli-parser",
|
"name": "sebastian/cli-parser",
|
||||||
|
@ -4998,16 +4998,16 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "sebastian/exporter",
|
"name": "sebastian/exporter",
|
||||||
"version": "4.0.3",
|
"version": "4.0.4",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/sebastianbergmann/exporter.git",
|
"url": "https://github.com/sebastianbergmann/exporter.git",
|
||||||
"reference": "d89cc98761b8cb5a1a235a6b703ae50d34080e65"
|
"reference": "65e8b7db476c5dd267e65eea9cab77584d3cfff9"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/d89cc98761b8cb5a1a235a6b703ae50d34080e65",
|
"url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/65e8b7db476c5dd267e65eea9cab77584d3cfff9",
|
||||||
"reference": "d89cc98761b8cb5a1a235a6b703ae50d34080e65",
|
"reference": "65e8b7db476c5dd267e65eea9cab77584d3cfff9",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -5056,14 +5056,14 @@
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"description": "Provides the functionality to export PHP variables for visualization",
|
"description": "Provides the functionality to export PHP variables for visualization",
|
||||||
"homepage": "http://www.github.com/sebastianbergmann/exporter",
|
"homepage": "https://www.github.com/sebastianbergmann/exporter",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"export",
|
"export",
|
||||||
"exporter"
|
"exporter"
|
||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/sebastianbergmann/exporter/issues",
|
"issues": "https://github.com/sebastianbergmann/exporter/issues",
|
||||||
"source": "https://github.com/sebastianbergmann/exporter/tree/4.0.3"
|
"source": "https://github.com/sebastianbergmann/exporter/tree/4.0.4"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
|
@ -5071,7 +5071,7 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2020-09-28T05:24:23+00:00"
|
"time": "2021-11-11T14:18:36+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "sebastian/global-state",
|
"name": "sebastian/global-state",
|
||||||
|
@ -5587,16 +5587,16 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/console",
|
"name": "symfony/console",
|
||||||
"version": "v5.3.10",
|
"version": "v5.3.11",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/console.git",
|
"url": "https://github.com/symfony/console.git",
|
||||||
"reference": "d4e409d9fbcfbf71af0e5a940abb7b0b4bad0bd3"
|
"reference": "3e7ab8f5905058984899b05a4648096f558bfeba"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/console/zipball/d4e409d9fbcfbf71af0e5a940abb7b0b4bad0bd3",
|
"url": "https://api.github.com/repos/symfony/console/zipball/3e7ab8f5905058984899b05a4648096f558bfeba",
|
||||||
"reference": "d4e409d9fbcfbf71af0e5a940abb7b0b4bad0bd3",
|
"reference": "3e7ab8f5905058984899b05a4648096f558bfeba",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -5609,7 +5609,6 @@
|
||||||
"symfony/string": "^5.1"
|
"symfony/string": "^5.1"
|
||||||
},
|
},
|
||||||
"conflict": {
|
"conflict": {
|
||||||
"psr/log": ">=3",
|
|
||||||
"symfony/dependency-injection": "<4.4",
|
"symfony/dependency-injection": "<4.4",
|
||||||
"symfony/dotenv": "<5.1",
|
"symfony/dotenv": "<5.1",
|
||||||
"symfony/event-dispatcher": "<4.4",
|
"symfony/event-dispatcher": "<4.4",
|
||||||
|
@ -5666,7 +5665,7 @@
|
||||||
"terminal"
|
"terminal"
|
||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"source": "https://github.com/symfony/console/tree/v5.3.10"
|
"source": "https://github.com/symfony/console/tree/v5.3.11"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
|
@ -5682,7 +5681,7 @@
|
||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2021-10-26T09:30:15+00:00"
|
"time": "2021-11-21T19:41:05+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/polyfill-intl-grapheme",
|
"name": "symfony/polyfill-intl-grapheme",
|
||||||
|
@ -6010,21 +6009,25 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/service-contracts",
|
"name": "symfony/service-contracts",
|
||||||
"version": "v2.4.0",
|
"version": "v2.5.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/service-contracts.git",
|
"url": "https://github.com/symfony/service-contracts.git",
|
||||||
"reference": "f040a30e04b57fbcc9c6cbcf4dbaa96bd318b9bb"
|
"reference": "1ab11b933cd6bc5464b08e81e2c5b07dec58b0fc"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/service-contracts/zipball/f040a30e04b57fbcc9c6cbcf4dbaa96bd318b9bb",
|
"url": "https://api.github.com/repos/symfony/service-contracts/zipball/1ab11b933cd6bc5464b08e81e2c5b07dec58b0fc",
|
||||||
"reference": "f040a30e04b57fbcc9c6cbcf4dbaa96bd318b9bb",
|
"reference": "1ab11b933cd6bc5464b08e81e2c5b07dec58b0fc",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=7.2.5",
|
"php": ">=7.2.5",
|
||||||
"psr/container": "^1.1"
|
"psr/container": "^1.1",
|
||||||
|
"symfony/deprecation-contracts": "^2.1"
|
||||||
|
},
|
||||||
|
"conflict": {
|
||||||
|
"ext-psr": "<1.1|>=2"
|
||||||
},
|
},
|
||||||
"suggest": {
|
"suggest": {
|
||||||
"symfony/service-implementation": ""
|
"symfony/service-implementation": ""
|
||||||
|
@ -6032,7 +6035,7 @@
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
"branch-alias": {
|
"branch-alias": {
|
||||||
"dev-main": "2.4-dev"
|
"dev-main": "2.5-dev"
|
||||||
},
|
},
|
||||||
"thanks": {
|
"thanks": {
|
||||||
"name": "symfony/contracts",
|
"name": "symfony/contracts",
|
||||||
|
@ -6069,7 +6072,7 @@
|
||||||
"standards"
|
"standards"
|
||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"source": "https://github.com/symfony/service-contracts/tree/v2.4.0"
|
"source": "https://github.com/symfony/service-contracts/tree/v2.5.0"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
|
@ -6085,7 +6088,7 @@
|
||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2021-04-01T10:43:52+00:00"
|
"time": "2021-11-04T16:48:04+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/string",
|
"name": "symfony/string",
|
||||||
|
@ -6501,21 +6504,13 @@
|
||||||
"issues": "https://github.com/webmozart/path-util/issues",
|
"issues": "https://github.com/webmozart/path-util/issues",
|
||||||
"source": "https://github.com/webmozart/path-util/tree/2.3.0"
|
"source": "https://github.com/webmozart/path-util/tree/2.3.0"
|
||||||
},
|
},
|
||||||
|
"abandoned": "symfony/filesystem",
|
||||||
"time": "2015-12-17T08:42:14+00:00"
|
"time": "2015-12-17T08:42:14+00:00"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"aliases": [
|
"aliases": [],
|
||||||
{
|
|
||||||
"package": "utopia-php/database",
|
|
||||||
"version": "dev-fix-query-validator-constructor",
|
|
||||||
"alias": "0.10.9",
|
|
||||||
"alias_normalized": "0.10.9.0"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"minimum-stability": "stable",
|
"minimum-stability": "stable",
|
||||||
"stability-flags": {
|
"stability-flags": [],
|
||||||
"utopia-php/database": 20
|
|
||||||
},
|
|
||||||
"prefer-stable": false,
|
"prefer-stable": false,
|
||||||
"prefer-lowest": false,
|
"prefer-lowest": false,
|
||||||
"platform": {
|
"platform": {
|
||||||
|
|
|
@ -12,7 +12,6 @@ client
|
||||||
.setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
|
.setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
|
||||||
.setSelfSigned() // Use only on dev mode with a self-signed SSL cert
|
.setSelfSigned() // Use only on dev mode with a self-signed SSL cert
|
||||||
;
|
;
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### Make your first request
|
### Make your first request
|
||||||
|
@ -22,13 +21,8 @@ Once your SDK object is set, create any of the Appwrite service objects and choo
|
||||||
```typescript
|
```typescript
|
||||||
let users = new sdk.Users(client);
|
let users = new sdk.Users(client);
|
||||||
|
|
||||||
let promise = users.create('email@example.com', 'password');
|
let response = await users.create('email@example.com', 'password');
|
||||||
|
console.log(response);
|
||||||
promise.then(function (response) {
|
|
||||||
console.log(response);
|
|
||||||
}, function (error) {
|
|
||||||
console.log(error);
|
|
||||||
});
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### Full Example
|
### Full Example
|
||||||
|
@ -45,13 +39,8 @@ client
|
||||||
.setSelfSigned() // Use only on dev mode with a self-signed SSL cert
|
.setSelfSigned() // Use only on dev mode with a self-signed SSL cert
|
||||||
;
|
;
|
||||||
|
|
||||||
let promise = users.create('email@example.com', 'password');
|
let response = await users.create('email@example.com', 'password');
|
||||||
|
console.log(response);
|
||||||
promise.then(function (response) {
|
|
||||||
console.log(response);
|
|
||||||
}, function (error) {
|
|
||||||
console.log(error);
|
|
||||||
});
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### Error Handling
|
### Error Handling
|
||||||
|
@ -61,7 +50,7 @@ The Appwrite Deno SDK raises `AppwriteException` object with `message`, `code` a
|
||||||
let users = new sdk.Users(client);
|
let users = new sdk.Users(client);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
let res = await users.create('email@example.com', 'password');
|
let response = await users.create('email@example.com', 'password');
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
console.log(e.message);
|
console.log(e.message);
|
||||||
}
|
}
|
||||||
|
|
|
@ -58,14 +58,16 @@ For **Windows** add your app <u>name</u> and <u>package name</u>, Your package n
|
||||||
|
|
||||||
```dart
|
```dart
|
||||||
import 'package:appwrite/appwrite.dart';
|
import 'package:appwrite/appwrite.dart';
|
||||||
Client client = Client();
|
|
||||||
|
|
||||||
|
void main() {
|
||||||
|
Client client = Client();
|
||||||
|
|
||||||
client
|
client
|
||||||
.setEndpoint('https://localhost/v1') // Your Appwrite Endpoint
|
.setEndpoint('https://localhost/v1') // Your Appwrite Endpoint
|
||||||
.setProject('5e8cf4f46b5e8') // Your project ID
|
.setProject('5e8cf4f46b5e8') // Your project ID
|
||||||
.setSelfSigned() // Use only on dev mode with a self-signed SSL cert
|
.setSelfSigned() // Use only on dev mode with a self-signed SSL cert
|
||||||
;
|
;
|
||||||
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
Before starting to send any API calls to your new Appwrite instance, make sure your Android or iOS emulators has network access to the Appwrite server hostname or IP address.
|
Before starting to send any API calls to your new Appwrite instance, make sure your Android or iOS emulators has network access to the Appwrite server hostname or IP address.
|
||||||
|
@ -91,25 +93,28 @@ Response user = await account
|
||||||
|
|
||||||
```dart
|
```dart
|
||||||
import 'package:appwrite/appwrite.dart';
|
import 'package:appwrite/appwrite.dart';
|
||||||
Client client = Client();
|
|
||||||
|
void main() {
|
||||||
|
Client client = Client();
|
||||||
|
|
||||||
|
|
||||||
client
|
client
|
||||||
.setEndpoint('https://localhost/v1') // Your Appwrite Endpoint
|
.setEndpoint('https://localhost/v1') // Your Appwrite Endpoint
|
||||||
.setProject('5e8cf4f46b5e8') // Your project ID
|
.setProject('5e8cf4f46b5e8') // Your project ID
|
||||||
.setSelfSigned() // Use only on dev mode with a self-signed SSL cert
|
.setSelfSigned() // Use only on dev mode with a self-signed SSL cert
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|
||||||
// Register User
|
// Register User
|
||||||
Account account = Account(client);
|
Account account = Account(client);
|
||||||
|
|
||||||
Response user = await account
|
Response user = await account
|
||||||
.create(
|
.create(
|
||||||
email: 'me@appwrite.io',
|
email: 'me@appwrite.io',
|
||||||
password: 'password',
|
password: 'password',
|
||||||
name: 'My Name'
|
name: 'My Name'
|
||||||
);
|
);
|
||||||
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
### Error Handling
|
### Error Handling
|
||||||
|
|
2477
public/dist/scripts/app-all.js
vendored
2477
public/dist/scripts/app-all.js
vendored
File diff suppressed because it is too large
Load diff
2475
public/dist/scripts/app-dep.js
vendored
2475
public/dist/scripts/app-dep.js
vendored
File diff suppressed because it is too large
Load diff
2
public/dist/scripts/app.js
vendored
2
public/dist/scripts/app.js
vendored
|
@ -373,7 +373,7 @@ button.addEventListener("click",function(){var clone=document.createElement(elem
|
||||||
clone.innerHTML=template;clone.className=element.className;var input=clone.querySelector("input, select, textarea");view.render(clone);if(target){target.appendChild(clone);}else{button.parentNode.insertBefore(clone,button);}
|
clone.innerHTML=template;clone.className=element.className;var input=clone.querySelector("input, select, textarea");view.render(clone);if(target){target.appendChild(clone);}else{button.parentNode.insertBefore(clone,button);}
|
||||||
if(input){input.focus();}
|
if(input){input.focus();}
|
||||||
Array.prototype.slice.call(clone.querySelectorAll("[data-remove]")).map(function(obj){obj.addEventListener("click",function(){clone.parentNode.removeChild(clone);obj.scrollIntoView({behavior:"smooth"});});});Array.prototype.slice.call(clone.querySelectorAll("[data-up]")).map(function(obj){obj.addEventListener("click",function(){if(clone.previousElementSibling){clone.parentNode.insertBefore(clone,clone.previousElementSibling);obj.scrollIntoView({behavior:"smooth"});}});});Array.prototype.slice.call(clone.querySelectorAll("[data-down]")).map(function(obj){obj.addEventListener("click",function(){if(clone.nextElementSibling){clone.parentNode.insertBefore(clone.nextElementSibling,clone);obj.scrollIntoView({behavior:"smooth"});}});});});element.parentNode.insertBefore(button,element.nextSibling);element.parentNode.removeChild(element);button.form.addEventListener('reset',function(event){target.innerHTML='';if(first){button.click();}});if(first){button.click();}}});})(window);(function(window){"use strict";window.ls.container.get("view").add({selector:"data-forms-add",repeat:false,controller:function(element,view,container,document){for(var i=0;i<element.children.length;i++){let button=document.createElement("button");let template=element.children[i].cloneNode(true);let as=element.getAttribute('data-ls-as');let counter=0;button.type="button";button.innerText="Add";button.classList.add("reverse");button.classList.add("margin-end-small");button.addEventListener('click',function(){container.addNamespace(as,'new-'+counter++);console.log(container.namespaces,container.get(as),as);container.set(as,null,true,true);let child=template.cloneNode(true);view.render(child);element.appendChild(child);element.style.visibility='visible';let inputs=child.querySelectorAll('input,textarea');for(let index=0;index<inputs.length;++index){if(inputs[index].type!=='hidden'){inputs[index].focus();break;}}});element.after(button);}}});})(window);(function(window){"use strict";window.ls.container.get("view").add({selector:"data-forms-chart",controller:function(element,container,date,document){let wrapper=document.createElement("div");let child=document.createElement("canvas");let sources=element.getAttribute('data-forms-chart');let width=element.getAttribute('data-width')||500;let height=element.getAttribute('data-height')||175;let colors=(element.getAttribute('data-colors')||'blue,green,orange,red').split(',');let themes={'blue':'#29b5d9','green':'#4eb55b','orange':'#fba233','red':'#dc3232',};let range={'24h':'H:i','7d':'d F Y','30d':'d F Y','90d':'d F Y'}
|
Array.prototype.slice.call(clone.querySelectorAll("[data-remove]")).map(function(obj){obj.addEventListener("click",function(){clone.parentNode.removeChild(clone);obj.scrollIntoView({behavior:"smooth"});});});Array.prototype.slice.call(clone.querySelectorAll("[data-up]")).map(function(obj){obj.addEventListener("click",function(){if(clone.previousElementSibling){clone.parentNode.insertBefore(clone,clone.previousElementSibling);obj.scrollIntoView({behavior:"smooth"});}});});Array.prototype.slice.call(clone.querySelectorAll("[data-down]")).map(function(obj){obj.addEventListener("click",function(){if(clone.nextElementSibling){clone.parentNode.insertBefore(clone.nextElementSibling,clone);obj.scrollIntoView({behavior:"smooth"});}});});});element.parentNode.insertBefore(button,element.nextSibling);element.parentNode.removeChild(element);button.form.addEventListener('reset',function(event){target.innerHTML='';if(first){button.click();}});if(first){button.click();}}});})(window);(function(window){"use strict";window.ls.container.get("view").add({selector:"data-forms-add",repeat:false,controller:function(element,view,container,document){for(var i=0;i<element.children.length;i++){let button=document.createElement("button");let template=element.children[i].cloneNode(true);let as=element.getAttribute('data-ls-as');let counter=0;button.type="button";button.innerText="Add";button.classList.add("reverse");button.classList.add("margin-end-small");button.addEventListener('click',function(){container.addNamespace(as,'new-'+counter++);console.log(container.namespaces,container.get(as),as);container.set(as,null,true,true);let child=template.cloneNode(true);view.render(child);element.appendChild(child);element.style.visibility='visible';let inputs=child.querySelectorAll('input,textarea');for(let index=0;index<inputs.length;++index){if(inputs[index].type!=='hidden'){inputs[index].focus();break;}}});element.after(button);}}});})(window);(function(window){"use strict";window.ls.container.get("view").add({selector:"data-forms-chart",controller:function(element,container,date,document){let wrapper=document.createElement("div");let child=document.createElement("canvas");let sources=element.getAttribute('data-forms-chart');let width=element.getAttribute('data-width')||500;let height=element.getAttribute('data-height')||175;let colors=(element.getAttribute('data-colors')||'blue,green,orange,red').split(',');let themes={'blue':'#29b5d9','green':'#4eb55b','orange':'#fba233','red':'#dc3232',};let range={'24h':'H:i','7d':'d F Y','30d':'d F Y','90d':'d F Y'}
|
||||||
element.parentNode.insertBefore(wrapper,element.nextSibling);wrapper.classList.add('content');child.width=width;child.height=height;sources=sources.split(',');wrapper.appendChild(child);let chart=null;let check=function(){let config={type:"line",data:{labels:[],datasets:[]},options:{responsive:true,title:{display:false,text:"Stats"},legend:{display:false},tooltips:{mode:"index",intersect:false,caretPadding:0},hover:{mode:"nearest",intersect:true},scales:{xAxes:[{display:false}],yAxes:[{display:false}]}}};for(let i=0;i<sources.length;i++){let label=sources[i].substring(0,sources[i].indexOf('='));let path=sources[i].substring(sources[i].indexOf('=')+1);let data=container.path(path);let value=JSON.parse(element.value);config.data.labels[i]=label;config.data.datasets[i]={};config.data.datasets[i].label=label;config.data.datasets[i].borderColor=themes[colors[i]];config.data.datasets[i].backgroundColor=themes[colors[i]]+'36';config.data.datasets[i].borderWidth=2;config.data.datasets[i].data=[0,0,0,0,0,0,0];config.data.datasets[i].fill=true;if(!data){return;}
|
element.parentNode.insertBefore(wrapper,element.nextSibling);wrapper.classList.add('content');child.width=width;child.height=height;sources=sources.split(',');wrapper.appendChild(child);let chart=null;let check=function(){let config={type:"line",data:{labels:[],datasets:[]},options:{responsive:true,tooltip:{mode:"index",intersect:false,caretPadding:0},hover:{mode:"nearest",intersect:true},scales:{x:{display:false},y:{display:false}},plugins:{title:{display:false,text:"Stats"},legend:{display:false},}}};for(let i=0;i<sources.length;i++){let label=sources[i].substring(0,sources[i].indexOf('='));let path=sources[i].substring(sources[i].indexOf('=')+1);let data=container.path(path);let value=JSON.parse(element.value);config.data.labels[i]=label;config.data.datasets[i]={};config.data.datasets[i].label=label;config.data.datasets[i].borderColor=themes[colors[i]];config.data.datasets[i].backgroundColor=themes[colors[i]]+'36';config.data.datasets[i].borderWidth=2;config.data.datasets[i].data=[0,0,0,0,0,0,0];config.data.datasets[i].fill=true;if(!data){return;}
|
||||||
let dateFormat=(value.range&&range[value.range])?range[value.range]:'d F Y';for(let x=0;x<data.length;x++){config.data.datasets[i].data[x]=data[x].value;config.data.labels[x]=date.format(dateFormat,data[x].date);}}
|
let dateFormat=(value.range&&range[value.range])?range[value.range]:'d F Y';for(let x=0;x<data.length;x++){config.data.datasets[i].data[x]=data[x].value;config.data.labels[x]=date.format(dateFormat,data[x].date);}}
|
||||||
if(chart){chart.destroy();}
|
if(chart){chart.destroy();}
|
||||||
else{}
|
else{}
|
||||||
|
|
2
public/dist/styles/default-ltr.css
vendored
2
public/dist/styles/default-ltr.css
vendored
File diff suppressed because one or more lines are too long
2
public/dist/styles/default-rtl.css
vendored
2
public/dist/styles/default-rtl.css
vendored
File diff suppressed because one or more lines are too long
Binary file not shown.
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 86 KiB |
File diff suppressed because it is too large
Load diff
|
@ -36,14 +36,7 @@
|
||||||
},
|
},
|
||||||
options: {
|
options: {
|
||||||
responsive: true,
|
responsive: true,
|
||||||
title: {
|
tooltip: {
|
||||||
display: false,
|
|
||||||
text: "Stats"
|
|
||||||
},
|
|
||||||
legend: {
|
|
||||||
display: false
|
|
||||||
},
|
|
||||||
tooltips: {
|
|
||||||
mode: "index",
|
mode: "index",
|
||||||
intersect: false,
|
intersect: false,
|
||||||
caretPadding: 0
|
caretPadding: 0
|
||||||
|
@ -53,16 +46,21 @@
|
||||||
intersect: true
|
intersect: true
|
||||||
},
|
},
|
||||||
scales: {
|
scales: {
|
||||||
xAxes: [
|
x: {
|
||||||
{
|
display: false
|
||||||
display: false
|
},
|
||||||
}
|
y: {
|
||||||
],
|
display: false
|
||||||
yAxes: [
|
}
|
||||||
{
|
},
|
||||||
display: false
|
plugins: {
|
||||||
}
|
title: {
|
||||||
]
|
display: false,
|
||||||
|
text: "Stats"
|
||||||
|
},
|
||||||
|
legend: {
|
||||||
|
display: false
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
--config-width-large: 700px;
|
--config-width-large: 700px;
|
||||||
--config-width-medium: 550px;
|
--config-width-medium: 550px;
|
||||||
--config-width-small: 320px;
|
--config-width-small: 320px;
|
||||||
|
--config-color-primary: #f02e65;
|
||||||
--config-color-link: #1e849e;
|
--config-color-link: #1e849e;
|
||||||
--config-color-background: #eceff1;
|
--config-color-background: #eceff1;
|
||||||
--config-color-background-dark: #dfe2e4;
|
--config-color-background-dark: #dfe2e4;
|
||||||
|
@ -93,6 +94,7 @@
|
||||||
--config-console-nav-switch-arrow: url("data:image/svg+xml;utf8,<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' width='24' height='24' viewBox='0 0 24 24'><path fill='%23868686' d='M7.406 7.828l4.594 4.594 4.594-4.594 1.406 1.406-6 6-6-6z'></path></svg>");
|
--config-console-nav-switch-arrow: url("data:image/svg+xml;utf8,<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' width='24' height='24' viewBox='0 0 24 24'><path fill='%23868686' d='M7.406 7.828l4.594 4.594 4.594-4.594 1.406 1.406-6 6-6-6z'></path></svg>");
|
||||||
|
|
||||||
.theme-dark {
|
.theme-dark {
|
||||||
|
--config-color-primary: #f02e65;
|
||||||
--config-color-background: #061F2F;
|
--config-color-background: #061F2F;
|
||||||
--config-color-background-dark: #262d50;
|
--config-color-background-dark: #262d50;
|
||||||
--config-color-background-fade: #1c223a;
|
--config-color-background-fade: #1c223a;
|
||||||
|
|
|
@ -49,7 +49,7 @@ class PDO extends PDONative
|
||||||
return $this->pdo->setAttribute($attribute, $value);
|
return $this->pdo->setAttribute($attribute, $value);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function prepare($statement, $driver_options = NULL)
|
public function prepare($statement, $driver_options = null)
|
||||||
{
|
{
|
||||||
return new PDOStatement($this, $this->pdo->prepare($statement, []));
|
return new PDOStatement($this, $this->pdo->prepare($statement, []));
|
||||||
}
|
}
|
||||||
|
@ -107,4 +107,4 @@ class PDO extends PDONative
|
||||||
|
|
||||||
return $this->pdo;
|
return $this->pdo;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -100,10 +100,10 @@ class PDOStatement extends PDOStatementNative
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fetch All
|
* Fetch All
|
||||||
*
|
*
|
||||||
* @param int $fetch_style
|
* @param int $fetch_style
|
||||||
* @param mixed $fetch_args
|
* @param mixed $fetch_args
|
||||||
*
|
*
|
||||||
* @return array|false
|
* @return array|false
|
||||||
*/
|
*/
|
||||||
public function fetchAll(int $fetch_style = PDO::FETCH_BOTH, mixed ...$fetch_args)
|
public function fetchAll(int $fetch_style = PDO::FETCH_BOTH, mixed ...$fetch_args)
|
||||||
|
@ -112,4 +112,4 @@ class PDOStatement extends PDOStatementNative
|
||||||
|
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,7 @@ namespace Appwrite\OpenSSL;
|
||||||
|
|
||||||
class OpenSSL
|
class OpenSSL
|
||||||
{
|
{
|
||||||
const CIPHER_AES_128_GCM = 'aes-128-gcm';
|
public const CIPHER_AES_128_GCM = 'aes-128-gcm';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param $data
|
* @param $data
|
||||||
|
|
|
@ -194,7 +194,7 @@ class Response extends SwooleResponse
|
||||||
->setModel(new BaseList('Documents List', self::MODEL_DOCUMENT_LIST, 'documents', self::MODEL_DOCUMENT))
|
->setModel(new BaseList('Documents List', self::MODEL_DOCUMENT_LIST, 'documents', self::MODEL_DOCUMENT))
|
||||||
->setModel(new BaseList('Users List', self::MODEL_USER_LIST, 'users', self::MODEL_USER))
|
->setModel(new BaseList('Users List', self::MODEL_USER_LIST, 'users', self::MODEL_USER))
|
||||||
->setModel(new BaseList('Sessions List', self::MODEL_SESSION_LIST, 'sessions', self::MODEL_SESSION))
|
->setModel(new BaseList('Sessions List', self::MODEL_SESSION_LIST, 'sessions', self::MODEL_SESSION))
|
||||||
->setModel(new BaseList('Logs List', self::MODEL_LOG_LIST, 'logs', self::MODEL_LOG, false))
|
->setModel(new BaseList('Logs List', self::MODEL_LOG_LIST, 'logs', self::MODEL_LOG))
|
||||||
->setModel(new BaseList('Files List', self::MODEL_FILE_LIST, 'files', self::MODEL_FILE))
|
->setModel(new BaseList('Files List', self::MODEL_FILE_LIST, 'files', self::MODEL_FILE))
|
||||||
->setModel(new BaseList('Teams List', self::MODEL_TEAM_LIST, 'teams', self::MODEL_TEAM))
|
->setModel(new BaseList('Teams List', self::MODEL_TEAM_LIST, 'teams', self::MODEL_TEAM))
|
||||||
->setModel(new BaseList('Memberships List', self::MODEL_MEMBERSHIP_LIST, 'memberships', self::MODEL_MEMBERSHIP))
|
->setModel(new BaseList('Memberships List', self::MODEL_MEMBERSHIP_LIST, 'memberships', self::MODEL_MEMBERSHIP))
|
||||||
|
|
|
@ -283,10 +283,10 @@ trait AccountBase
|
||||||
$this->assertEquals('', $response['body']['sessions'][0]['deviceBrand']);
|
$this->assertEquals('', $response['body']['sessions'][0]['deviceBrand']);
|
||||||
$this->assertEquals('', $response['body']['sessions'][0]['deviceModel']);
|
$this->assertEquals('', $response['body']['sessions'][0]['deviceModel']);
|
||||||
$this->assertEquals($response['body']['sessions'][0]['ip'], filter_var($response['body']['sessions'][0]['ip'], FILTER_VALIDATE_IP));
|
$this->assertEquals($response['body']['sessions'][0]['ip'], filter_var($response['body']['sessions'][0]['ip'], FILTER_VALIDATE_IP));
|
||||||
|
|
||||||
$this->assertEquals('--', $response['body']['sessions'][0]['countryCode']);
|
$this->assertEquals('--', $response['body']['sessions'][0]['countryCode']);
|
||||||
$this->assertEquals('Unknown', $response['body']['sessions'][0]['countryName']);
|
$this->assertEquals('Unknown', $response['body']['sessions'][0]['countryName']);
|
||||||
|
|
||||||
$this->assertEquals(true, $response['body']['sessions'][0]['current']);
|
$this->assertEquals(true, $response['body']['sessions'][0]['current']);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -325,7 +325,8 @@ trait AccountBase
|
||||||
$this->assertIsArray($response['body']['logs']);
|
$this->assertIsArray($response['body']['logs']);
|
||||||
$this->assertNotEmpty($response['body']['logs']);
|
$this->assertNotEmpty($response['body']['logs']);
|
||||||
$this->assertCount(2, $response['body']['logs']);
|
$this->assertCount(2, $response['body']['logs']);
|
||||||
|
$this->assertIsNumeric($response['body']['sum']);
|
||||||
|
|
||||||
$this->assertContains($response['body']['logs'][0]['event'], ['account.create', 'account.sessions.create']);
|
$this->assertContains($response['body']['logs'][0]['event'], ['account.create', 'account.sessions.create']);
|
||||||
$this->assertEquals($response['body']['logs'][0]['ip'], filter_var($response['body']['logs'][0]['ip'], FILTER_VALIDATE_IP));
|
$this->assertEquals($response['body']['logs'][0]['ip'], filter_var($response['body']['logs'][0]['ip'], FILTER_VALIDATE_IP));
|
||||||
$this->assertIsNumeric($response['body']['logs'][0]['time']);
|
$this->assertIsNumeric($response['body']['logs'][0]['time']);
|
||||||
|
@ -344,7 +345,7 @@ trait AccountBase
|
||||||
$this->assertEquals('', $response['body']['logs'][0]['deviceBrand']);
|
$this->assertEquals('', $response['body']['logs'][0]['deviceBrand']);
|
||||||
$this->assertEquals('', $response['body']['logs'][0]['deviceModel']);
|
$this->assertEquals('', $response['body']['logs'][0]['deviceModel']);
|
||||||
$this->assertEquals($response['body']['logs'][0]['ip'], filter_var($response['body']['logs'][0]['ip'], FILTER_VALIDATE_IP));
|
$this->assertEquals($response['body']['logs'][0]['ip'], filter_var($response['body']['logs'][0]['ip'], FILTER_VALIDATE_IP));
|
||||||
|
|
||||||
$this->assertEquals('--', $response['body']['logs'][0]['countryCode']);
|
$this->assertEquals('--', $response['body']['logs'][0]['countryCode']);
|
||||||
$this->assertEquals('Unknown', $response['body']['logs'][0]['countryName']);
|
$this->assertEquals('Unknown', $response['body']['logs'][0]['countryName']);
|
||||||
|
|
||||||
|
@ -366,10 +367,61 @@ trait AccountBase
|
||||||
$this->assertEquals('', $response['body']['logs'][1]['deviceBrand']);
|
$this->assertEquals('', $response['body']['logs'][1]['deviceBrand']);
|
||||||
$this->assertEquals('', $response['body']['logs'][1]['deviceModel']);
|
$this->assertEquals('', $response['body']['logs'][1]['deviceModel']);
|
||||||
$this->assertEquals($response['body']['logs'][1]['ip'], filter_var($response['body']['logs'][1]['ip'], FILTER_VALIDATE_IP));
|
$this->assertEquals($response['body']['logs'][1]['ip'], filter_var($response['body']['logs'][1]['ip'], FILTER_VALIDATE_IP));
|
||||||
|
|
||||||
$this->assertEquals('--', $response['body']['logs'][1]['countryCode']);
|
$this->assertEquals('--', $response['body']['logs'][1]['countryCode']);
|
||||||
$this->assertEquals('Unknown', $response['body']['logs'][1]['countryName']);
|
$this->assertEquals('Unknown', $response['body']['logs'][1]['countryName']);
|
||||||
|
|
||||||
|
$responseLimit = $this->client->call(Client::METHOD_GET, '/account/logs', array_merge([
|
||||||
|
'origin' => 'http://localhost',
|
||||||
|
'content-type' => 'application/json',
|
||||||
|
'x-appwrite-project' => $this->getProject()['$id'],
|
||||||
|
'cookie' => 'a_session_'.$this->getProject()['$id'].'=' . $session,
|
||||||
|
]), [
|
||||||
|
'limit' => 1
|
||||||
|
]);
|
||||||
|
|
||||||
|
$this->assertEquals($responseLimit['headers']['status-code'], 200);
|
||||||
|
$this->assertIsArray($responseLimit['body']['logs']);
|
||||||
|
$this->assertNotEmpty($responseLimit['body']['logs']);
|
||||||
|
$this->assertCount(1, $responseLimit['body']['logs']);
|
||||||
|
$this->assertIsNumeric($responseLimit['body']['sum']);
|
||||||
|
|
||||||
|
$this->assertEquals($response['body']['logs'][0], $responseLimit['body']['logs'][0]);
|
||||||
|
|
||||||
|
$responseOffset = $this->client->call(Client::METHOD_GET, '/account/logs', array_merge([
|
||||||
|
'origin' => 'http://localhost',
|
||||||
|
'content-type' => 'application/json',
|
||||||
|
'x-appwrite-project' => $this->getProject()['$id'],
|
||||||
|
'cookie' => 'a_session_'.$this->getProject()['$id'].'=' . $session,
|
||||||
|
]), [
|
||||||
|
'offset' => 1
|
||||||
|
]);
|
||||||
|
|
||||||
|
$this->assertEquals($responseOffset['headers']['status-code'], 200);
|
||||||
|
$this->assertIsArray($responseOffset['body']['logs']);
|
||||||
|
$this->assertNotEmpty($responseOffset['body']['logs']);
|
||||||
|
$this->assertCount(1, $responseOffset['body']['logs']);
|
||||||
|
$this->assertIsNumeric($responseOffset['body']['sum']);
|
||||||
|
|
||||||
|
$this->assertEquals($response['body']['logs'][1], $responseOffset['body']['logs'][0]);
|
||||||
|
|
||||||
|
$responseLimitOffset = $this->client->call(Client::METHOD_GET, '/account/logs', array_merge([
|
||||||
|
'origin' => 'http://localhost',
|
||||||
|
'content-type' => 'application/json',
|
||||||
|
'x-appwrite-project' => $this->getProject()['$id'],
|
||||||
|
'cookie' => 'a_session_'.$this->getProject()['$id'].'=' . $session,
|
||||||
|
]), [
|
||||||
|
'limit' => 1,
|
||||||
|
'offset' => 1
|
||||||
|
]);
|
||||||
|
|
||||||
|
$this->assertEquals($responseLimitOffset['headers']['status-code'], 200);
|
||||||
|
$this->assertIsArray($responseLimitOffset['body']['logs']);
|
||||||
|
$this->assertNotEmpty($responseLimitOffset['body']['logs']);
|
||||||
|
$this->assertCount(1, $responseLimitOffset['body']['logs']);
|
||||||
|
$this->assertIsNumeric($responseLimitOffset['body']['sum']);
|
||||||
|
|
||||||
|
$this->assertEquals($response['body']['logs'][1], $responseLimitOffset['body']['logs'][0]);
|
||||||
/**
|
/**
|
||||||
* Test for FAILURE
|
* Test for FAILURE
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -33,7 +33,7 @@ class DatabaseConsoleClientTest extends Scope
|
||||||
|
|
||||||
return ['moviesId' => $movies['body']['$id']];
|
return ['moviesId' => $movies['body']['$id']];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testGetDatabaseUsage()
|
public function testGetDatabaseUsage()
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
|
@ -48,7 +48,7 @@ class DatabaseConsoleClientTest extends Scope
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$this->assertEquals($response['headers']['status-code'], 400);
|
$this->assertEquals($response['headers']['status-code'], 400);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test for SUCCESS
|
* Test for SUCCESS
|
||||||
*/
|
*/
|
||||||
|
@ -122,4 +122,58 @@ class DatabaseConsoleClientTest extends Scope
|
||||||
$this->assertIsArray($response['body']['documents.update']);
|
$this->assertIsArray($response['body']['documents.update']);
|
||||||
$this->assertIsArray($response['body']['documents.delete']);
|
$this->assertIsArray($response['body']['documents.delete']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @depends testCreateCollection
|
||||||
|
*/
|
||||||
|
public function testGetCollectionLogs(array $data)
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Test for SUCCESS
|
||||||
|
*/
|
||||||
|
$logs = $this->client->call(Client::METHOD_GET, '/database/collections/' . $data['moviesId'] . '/logs', array_merge([
|
||||||
|
'content-type' => 'application/json',
|
||||||
|
'x-appwrite-project' => $this->getProject()['$id'],
|
||||||
|
], $this->getHeaders()));
|
||||||
|
|
||||||
|
$this->assertEquals($logs['headers']['status-code'], 200);
|
||||||
|
$this->assertIsArray($logs['body']['logs']);
|
||||||
|
$this->assertIsNumeric($logs['body']['sum']);
|
||||||
|
|
||||||
|
$logs = $this->client->call(Client::METHOD_GET, '/database/collections/' . $data['moviesId'] . '/logs', array_merge([
|
||||||
|
'content-type' => 'application/json',
|
||||||
|
'x-appwrite-project' => $this->getProject()['$id'],
|
||||||
|
], $this->getHeaders()), [
|
||||||
|
'limit' => 1
|
||||||
|
]);
|
||||||
|
|
||||||
|
$this->assertEquals($logs['headers']['status-code'], 200);
|
||||||
|
$this->assertIsArray($logs['body']['logs']);
|
||||||
|
$this->assertLessThanOrEqual(1, count($logs['body']['logs']));
|
||||||
|
$this->assertIsNumeric($logs['body']['sum']);
|
||||||
|
|
||||||
|
$logs = $this->client->call(Client::METHOD_GET, '/database/collections/' . $data['moviesId'] . '/logs', array_merge([
|
||||||
|
'content-type' => 'application/json',
|
||||||
|
'x-appwrite-project' => $this->getProject()['$id'],
|
||||||
|
], $this->getHeaders()), [
|
||||||
|
'offset' => 1
|
||||||
|
]);
|
||||||
|
|
||||||
|
$this->assertEquals($logs['headers']['status-code'], 200);
|
||||||
|
$this->assertIsArray($logs['body']['logs']);
|
||||||
|
$this->assertIsNumeric($logs['body']['sum']);
|
||||||
|
|
||||||
|
$logs = $this->client->call(Client::METHOD_GET, '/database/collections/' . $data['moviesId'] . '/logs', array_merge([
|
||||||
|
'content-type' => 'application/json',
|
||||||
|
'x-appwrite-project' => $this->getProject()['$id'],
|
||||||
|
], $this->getHeaders()), [
|
||||||
|
'offset' => 1,
|
||||||
|
'limit' => 1
|
||||||
|
]);
|
||||||
|
|
||||||
|
$this->assertEquals($logs['headers']['status-code'], 200);
|
||||||
|
$this->assertIsArray($logs['body']['logs']);
|
||||||
|
$this->assertLessThanOrEqual(1, count($logs['body']['logs']));
|
||||||
|
$this->assertIsNumeric($logs['body']['sum']);
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -193,6 +193,22 @@ class DatabaseCustomServerTest extends Scope
|
||||||
// Wait for database worker to finish creating attributes
|
// Wait for database worker to finish creating attributes
|
||||||
sleep(2);
|
sleep(2);
|
||||||
|
|
||||||
|
// Creating document to ensure cache is purged on schema change
|
||||||
|
$document = $this->client->call(Client::METHOD_POST, '/database/collections/' . $actors['body']['$id'] . '/documents', array_merge([
|
||||||
|
'content-type' => 'application/json',
|
||||||
|
'x-appwrite-project' => $this->getProject()['$id'],
|
||||||
|
'x-appwrite-key' => $this->getProject()['apiKey']
|
||||||
|
]), [
|
||||||
|
'documentId' => 'unique()',
|
||||||
|
'data' => [
|
||||||
|
'firstName' => 'lorem',
|
||||||
|
'lastName' => 'ipsum',
|
||||||
|
'unneeded' => 'dolor'
|
||||||
|
],
|
||||||
|
'read' => ['role:all'],
|
||||||
|
'write' => ['role:all'],
|
||||||
|
]);
|
||||||
|
|
||||||
$index = $this->client->call(Client::METHOD_POST, '/database/collections/' . $actors['body']['$id'] . '/indexes', array_merge([
|
$index = $this->client->call(Client::METHOD_POST, '/database/collections/' . $actors['body']['$id'] . '/indexes', array_merge([
|
||||||
'content-type' => 'application/json',
|
'content-type' => 'application/json',
|
||||||
'x-appwrite-project' => $this->getProject()['$id'],
|
'x-appwrite-project' => $this->getProject()['$id'],
|
||||||
|
@ -236,6 +252,15 @@ class DatabaseCustomServerTest extends Scope
|
||||||
|
|
||||||
sleep(2);
|
sleep(2);
|
||||||
|
|
||||||
|
// Check document to ensure cache is purged on schema change
|
||||||
|
$document = $this->client->call(Client::METHOD_GET, '/database/collections/' . $actors['body']['$id'] . '/documents/' . $document['body']['$id'], array_merge([
|
||||||
|
'content-type' => 'application/json',
|
||||||
|
'x-appwrite-project' => $this->getProject()['$id'],
|
||||||
|
'x-appwrite-key' => $this->getProject()['apiKey']
|
||||||
|
]));
|
||||||
|
|
||||||
|
$this->assertNotContains($unneededId, $document['body']);
|
||||||
|
|
||||||
$collection = $this->client->call(Client::METHOD_GET, '/database/collections/' . $actors['body']['$id'], array_merge([
|
$collection = $this->client->call(Client::METHOD_GET, '/database/collections/' . $actors['body']['$id'], array_merge([
|
||||||
'content-type' => 'application/json',
|
'content-type' => 'application/json',
|
||||||
'x-appwrite-project' => $this->getProject()['$id'],
|
'x-appwrite-project' => $this->getProject()['$id'],
|
||||||
|
|
|
@ -204,14 +204,6 @@ trait UsersBase
|
||||||
$this->assertEquals($sessions['headers']['status-code'], 200);
|
$this->assertEquals($sessions['headers']['status-code'], 200);
|
||||||
$this->assertIsArray($sessions['body']);
|
$this->assertIsArray($sessions['body']);
|
||||||
|
|
||||||
$logs = $this->client->call(Client::METHOD_GET, '/users/' . $data['userId'] . '/logs', array_merge([
|
|
||||||
'content-type' => 'application/json',
|
|
||||||
'x-appwrite-project' => $this->getProject()['$id'],
|
|
||||||
], $this->getHeaders()));
|
|
||||||
|
|
||||||
$this->assertEquals($logs['headers']['status-code'], 200);
|
|
||||||
$this->assertIsArray($logs['body']);
|
|
||||||
|
|
||||||
$users = $this->client->call(Client::METHOD_GET, '/users', array_merge([
|
$users = $this->client->call(Client::METHOD_GET, '/users', array_merge([
|
||||||
'content-type' => 'application/json',
|
'content-type' => 'application/json',
|
||||||
'x-appwrite-project' => $this->getProject()['$id'],
|
'x-appwrite-project' => $this->getProject()['$id'],
|
||||||
|
@ -428,6 +420,61 @@ trait UsersBase
|
||||||
return $data;
|
return $data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @depends testGetUser
|
||||||
|
*/
|
||||||
|
public function testGetLogs(array $data): void
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Test for SUCCESS
|
||||||
|
*/
|
||||||
|
$logs = $this->client->call(Client::METHOD_GET, '/users/' . $data['userId'] . '/logs', array_merge([
|
||||||
|
'content-type' => 'application/json',
|
||||||
|
'x-appwrite-project' => $this->getProject()['$id'],
|
||||||
|
], $this->getHeaders()));
|
||||||
|
|
||||||
|
$this->assertEquals($logs['headers']['status-code'], 200);
|
||||||
|
$this->assertIsArray($logs['body']['logs']);
|
||||||
|
$this->assertIsNumeric($logs['body']['sum']);
|
||||||
|
|
||||||
|
$logs = $this->client->call(Client::METHOD_GET, '/users/' . $data['userId'] . '/logs', array_merge([
|
||||||
|
'content-type' => 'application/json',
|
||||||
|
'x-appwrite-project' => $this->getProject()['$id'],
|
||||||
|
], $this->getHeaders()), [
|
||||||
|
'limit' => 1
|
||||||
|
]);
|
||||||
|
|
||||||
|
$this->assertEquals($logs['headers']['status-code'], 200);
|
||||||
|
$this->assertIsArray($logs['body']['logs']);
|
||||||
|
$this->assertLessThanOrEqual(1, count($logs['body']['logs']));
|
||||||
|
$this->assertIsNumeric($logs['body']['sum']);
|
||||||
|
|
||||||
|
$logs = $this->client->call(Client::METHOD_GET, '/users/' . $data['userId'] . '/logs', array_merge([
|
||||||
|
'content-type' => 'application/json',
|
||||||
|
'x-appwrite-project' => $this->getProject()['$id'],
|
||||||
|
], $this->getHeaders()), [
|
||||||
|
'offset' => 1
|
||||||
|
]);
|
||||||
|
|
||||||
|
$this->assertEquals($logs['headers']['status-code'], 200);
|
||||||
|
$this->assertIsArray($logs['body']['logs']);
|
||||||
|
$this->assertIsNumeric($logs['body']['sum']);
|
||||||
|
|
||||||
|
$logs = $this->client->call(Client::METHOD_GET, '/users/' . $data['userId'] . '/logs', array_merge([
|
||||||
|
'content-type' => 'application/json',
|
||||||
|
'x-appwrite-project' => $this->getProject()['$id'],
|
||||||
|
], $this->getHeaders()), [
|
||||||
|
'offset' => 1,
|
||||||
|
'limit' => 1
|
||||||
|
]);
|
||||||
|
|
||||||
|
$this->assertEquals($logs['headers']['status-code'], 200);
|
||||||
|
$this->assertIsArray($logs['body']['logs']);
|
||||||
|
$this->assertLessThanOrEqual(1, count($logs['body']['logs']));
|
||||||
|
$this->assertIsNumeric($logs['body']['sum']);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @depends testGetUser
|
* @depends testGetUser
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in a new issue