diff --git a/CHANGES.md b/CHANGES.md index aee5e0ebab..135facb846 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -6,7 +6,7 @@ * Added option to disable abuse check and rate limits * Added input field with the server API endpoint for easy access * Added new OAuth providers for Google and Gitlab -* Added 8 new locales for locale service and email templates (no, pt-br, es, ua, ru, id, fi, cat) +* Added 15 new locales for locale service and email templates (cat, de, es, fi, fr, gr, hi, id, it, nl, pt-br, pt-pt, ro, tr, ua) * Improved test coverage for the project and synced DEV & CI environments settings ## Bug Fixes diff --git a/README.md b/README.md index d6568bc8e0..5133e967d4 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ The easiest way to start running your Appwrite server is by running our docker c ```bash mkdir appwrite-ce && \ cd appwrite-ce && \ -curl -o docker-compose.yml https://appwrite.io/docker-compose.yml?port=80 && \ +curl -o docker-compose.yml https://appwrite.io/docker-compose.yml?version=0.2.0 && \ docker-compose up -d --remove-orphans ``` @@ -111,7 +111,7 @@ Created by [Eldad Fux](https://twitter.com/eldadfux) with the amazing help of ou * 🇫🇮 Pessi Päivärinne ([Github](https://github.com/pessip)) * 🇺🇳 Sergi Vos ([Github](https://github.com/sergivb01), [Twitter](https://twitter.com/sergivb01), [Linkedin](https://www.linkedin.com/in/sergivb01/)) * 🇮🇱 Tomer Cohen ([Github](https://github.com/tomer), [Twitter](https://twitter.com/tomer)) -* 🇧🇷 Tatiana ([Github](https://github.com/tacoelho)) +* 🇮🇹 Tatiana ([Github](https://github.com/tacoelho)) * 🇬🇷 Panagiotis Skarlas ([Github](https://github.com/1qk1), [Twitter](https://twitter.com/qktweets)) * 🇷🇺 Alexey Pyltsyn ([Github](https://github.com/lex111)) * 🇩🇪 Robin C ([Github](https://github.com/Taminoful)) diff --git a/app/config/currencies.php b/app/config/currencies.php index b508d3f035..461230f19a 100644 --- a/app/config/currencies.php +++ b/app/config/currencies.php @@ -1,4 +1,4 @@ - 'Àfrica', - 'AN' => 'Antàrtica', - 'AS' => 'Àsia', - 'EU' => 'Europa', - 'NA' => 'Amèrica del Nord', - 'OC' => 'Oceania', - 'SA' => 'Amèrica del Sud', -]; + 'Àfrica', + 'AN' => 'Antàrtica', + 'AS' => 'Àsia', + 'EU' => 'Europa', + 'NA' => 'Amèrica del Nord', + 'OC' => 'Oceania', + 'SA' => 'Amèrica del Sud', +]; diff --git a/app/config/locale/cat.countries.php b/app/config/locale/cat.countries.php index a6172a9910..3b8f2383be 100644 --- a/app/config/locale/cat.countries.php +++ b/app/config/locale/cat.countries.php @@ -1,197 +1,198 @@ - 'Afganistan', - 'AO' => 'Angola', - 'AL' => 'Albània', - 'AD' => 'Andorra', - 'AE' => 'Unió dels Emirats Àrabs Units', - 'AR' => 'Argentina', - 'AM' => 'Armènia', - 'AG' => 'Antigua o Barbuda', - 'AU' => 'Austràlia', - 'AT' => 'Àustria', - 'AZ' => 'Azerbaidjan', - 'BI' => 'Burundi', - 'BE' => 'Bèlgica', - 'BJ' => 'Benín', - 'BF' => 'Burkina Faso', - 'BD' => 'Bangla Desh', - 'BG' => 'Bulgaria', - 'BH' => 'Bahrain', - 'BS' => 'Bahamas', - 'BA' => 'Bòsnia i Hercegovina', - 'BY' => 'Bielorússia', - 'BZ' => 'Belize', - 'BO' => 'Bolívia', - 'BR' => 'Brasil', - 'BB' => 'Barbados', - 'BN' => 'Brunei', - 'BT' => 'Bhutan', - 'BW' => 'Botswana', - 'CF' => 'República Centreafricana', - 'CA' => 'Canadà', - 'CH' => 'Suïssa', - 'CL' => 'Xile', - 'CN' => 'Xina', - 'CI' => 'Costa d\'Ivori', - 'CM' => 'Camerun', - 'CD' => 'República Democràtica del Congo', - 'CG' => 'República del congo', - 'CO' => 'Colòmbia', - 'KM' => 'Comores', - 'CV' => 'Cap Verd', - 'CR' => 'Costa Rica', - 'CU' => 'Cuba', - 'CY' => 'Xipre', - 'CZ' => 'Txèquia', - 'DE' => 'Alemanya', - 'DJ' => 'Djibouti', - 'DM' => 'Dominica', - 'DK' => 'Dinamarca', - 'DO' => 'República Dominicana', - 'DZ' => 'Argelia', - 'EC' => 'Equador', - 'EG' => 'Egipte', - 'ER' => 'Eritrea', - 'ES' => 'Espanya', - 'EE' => 'Estònia', - 'ET' => 'Etiòpia', - 'FI' => 'Finlàndia', - 'FJ' => 'Fiji', - 'FR' => 'França', - 'FM' => 'Micronèsia', - 'GA' => 'Gabon', - 'GB' => 'Regne Unit', - 'GE' => 'Geòrgia', - 'GH' => 'Ghana', - 'GN' => 'Guinea', - 'GM' => 'Gàmbia', - 'GW' => 'Guinea Bissau', - 'GQ' => 'Guinea Equatorial', - 'GR' => 'Grècia', - 'GD' => 'Granada', - 'GT' => 'Guatemala', - 'GY' => 'Guaiana', - 'HN' => 'Hondures', - 'HR' => 'Croàcia', - 'HT' => 'Haití', - 'HU' => 'Hungria', - 'ID' => 'Indonèsia', - 'IN' => 'Índia', - 'IE' => 'Irlanda', - 'IR' => 'Iran', - 'IQ' => 'Iraq', - 'IS' => 'Islàndia', - 'IL' => 'Israel', - 'IT' => 'Itàlia', - 'JM' => 'Jamaica', - 'JO' => 'Jordà', - 'JP' => 'Japó', - 'KZ' => 'Kazakhstan', - 'KE' => 'Kenya', - 'KG' => 'Kirguizistan', - 'KH' => 'Cambodja', - 'KI' => 'Kiribati', - 'KN' => 'Sant Cristòfol i Neus', - 'KR' => 'Corea del Sud', - 'KW' => 'Kuwait', - 'LA' => 'Laos', - 'LB' => 'Líban', - 'LR' => 'Libèria', - 'LY' => 'Líbia', - 'LC' => 'Santa Llúcia', - 'LI' => 'Liechtenstein', - 'LK' => 'Sri Lanka', - 'LS' => 'Lesoto', - 'LT' => 'Lituània', - 'LU' => 'Luxemburg', - 'LV' => 'Letònia', - 'MA' => 'Marroc', - 'MC' => 'Mònaco', - 'MD' => 'Moldàvia', - 'MG' => 'Madagascar', - 'MV' => 'Maldives', - 'MX' => 'Mèxic', - 'MH' => 'Illes Marshall', - 'MK' => 'Macedònia', - 'ML' => 'Mali', - 'MT' => 'Malta', - 'MM' => 'Myanmar', - 'ME' => 'Montenegro', - 'MN' => 'Mongòlia', - 'MZ' => 'Moçambic', - 'MR' => 'Mauritània', - 'MU' => 'Maurici', - 'MW' => 'Malawi', - 'MY' => 'Malàsia', - 'NA' => 'Namíbia', - 'NE' => 'Níger', - 'NG' => 'Nigèria', - 'NI' => 'Nicaragua', - 'NL' => 'Països Baixos', - 'NO' => 'Noruega', - 'NP' => 'Nepal', - 'NR' => 'Nauru', - 'NZ' => 'Nova Zelanda', - 'OM' => 'Oman', - 'PK' => 'Pakistan', - 'PA' => 'Panamà', - 'PE' => 'Perú', - 'PH' => 'Filipines', - 'PW' => 'Palaos', - 'PG' => 'Papua Nova Guinea', - 'PL' => 'Polònia', - 'KP' => 'Corea del Nord', - 'PT' => 'Portugal', - 'PY' => 'Paraguai', - 'QA' => 'Katar', - 'RO' => 'Romania', - 'RU' => 'Rússia', - 'RW' => 'Rwanda', - 'SA' => 'Aràbia Saudita', - 'SD' => 'Sudan', - 'SN' => 'Senegal', - 'SG' => 'Singapur', - 'SB' => 'Illes Salomó', - 'SL' => 'Sierra Leone', - 'SV' => 'El Salvador', - 'SM' => 'San Marí', - 'SO' => 'Somàlia', - 'RS' => 'Sèrbia', - 'SS' => 'Sudàn del Sud', - 'ST' => 'Santo Tomé y Príncipe', - 'SR' => 'Surinam', - 'SK' => 'Eslovàquia', - 'SI' => 'Eslovènia', - 'SE' => 'Suècia', - 'SZ' => 'Swazilàndia', - 'SC' => 'Seychelles', - 'SY' => 'Síria', - 'TD' => 'Txad', - 'TG' => 'Togo', - 'TH' => 'Tailàndia', - 'TJ' => 'Tadjikistan', - 'TM' => 'Turkmenistan', - 'TL' => 'Timor Oriental', - 'TO' => 'Tonga', - 'TT' => 'Trinitat i Tobago', - 'TN' => 'Tunísia', - 'TR' => 'Turquia', - 'TV' => 'Tuvalu', - 'TZ' => 'Tanzània', - 'UG' => 'Uganda', - 'UA' => 'Ucraïna', - 'UY' => 'Uruguai', - 'US' => 'Estats Units', - 'UZ' => 'Uzbekistan', - 'VA' => 'Ciudat del Vaticà', - 'VC' => 'Saint Vincent i les Grenadines', - 'VE' => 'Veneçuela', - 'VN' => 'Vietnam', - 'VU' => 'Vanuatu', - 'WS' => 'Samoa', - 'YE' => 'Iemen', - 'ZA' => 'Sud-àfrica', - 'ZM' => 'Zàmbia', - 'ZW' => 'Zimbabwe', -]; + 'Afganistan', + 'AO' => 'Angola', + 'AL' => 'Albània', + 'AD' => 'Andorra', + 'AE' => 'Unió dels Emirats Àrabs Units', + 'AR' => 'Argentina', + 'AM' => 'Armènia', + 'AG' => 'Antigua o Barbuda', + 'AU' => 'Austràlia', + 'AT' => 'Àustria', + 'AZ' => 'Azerbaidjan', + 'BI' => 'Burundi', + 'BE' => 'Bèlgica', + 'BJ' => 'Benín', + 'BF' => 'Burkina Faso', + 'BD' => 'Bangla Desh', + 'BG' => 'Bulgaria', + 'BH' => 'Bahrain', + 'BS' => 'Bahamas', + 'BA' => 'Bòsnia i Hercegovina', + 'BY' => 'Bielorússia', + 'BZ' => 'Belize', + 'BO' => 'Bolívia', + 'BR' => 'Brasil', + 'BB' => 'Barbados', + 'BN' => 'Brunei', + 'BT' => 'Bhutan', + 'BW' => 'Botswana', + 'CF' => 'República Centreafricana', + 'CA' => 'Canadà', + 'CH' => 'Suïssa', + 'CL' => 'Xile', + 'CN' => 'Xina', + 'CI' => 'Costa d\'Ivori', + 'CM' => 'Camerun', + 'CD' => 'República Democràtica del Congo', + 'CG' => 'República del congo', + 'CO' => 'Colòmbia', + 'KM' => 'Comores', + 'CV' => 'Cap Verd', + 'CR' => 'Costa Rica', + 'CU' => 'Cuba', + 'CY' => 'Xipre', + 'CZ' => 'Txèquia', + 'DE' => 'Alemanya', + 'DJ' => 'Djibouti', + 'DM' => 'Dominica', + 'DK' => 'Dinamarca', + 'DO' => 'República Dominicana', + 'DZ' => 'Argelia', + 'EC' => 'Equador', + 'EG' => 'Egipte', + 'ER' => 'Eritrea', + 'ES' => 'Espanya', + 'EE' => 'Estònia', + 'ET' => 'Etiòpia', + 'FI' => 'Finlàndia', + 'FJ' => 'Fiji', + 'FR' => 'França', + 'FM' => 'Micronèsia', + 'GA' => 'Gabon', + 'GB' => 'Regne Unit', + 'GE' => 'Geòrgia', + 'GH' => 'Ghana', + 'GN' => 'Guinea', + 'GM' => 'Gàmbia', + 'GW' => 'Guinea Bissau', + 'GQ' => 'Guinea Equatorial', + 'GR' => 'Grècia', + 'GD' => 'Granada', + 'GT' => 'Guatemala', + 'GY' => 'Guaiana', + 'HN' => 'Hondures', + 'HR' => 'Croàcia', + 'HT' => 'Haití', + 'HU' => 'Hungria', + 'ID' => 'Indonèsia', + 'IN' => 'Índia', + 'IE' => 'Irlanda', + 'IR' => 'Iran', + 'IQ' => 'Iraq', + 'IS' => 'Islàndia', + 'IL' => 'Israel', + 'IT' => 'Itàlia', + 'JM' => 'Jamaica', + 'JO' => 'Jordà', + 'JP' => 'Japó', + 'KZ' => 'Kazakhstan', + 'KE' => 'Kenya', + 'KG' => 'Kirguizistan', + 'KH' => 'Cambodja', + 'KI' => 'Kiribati', + 'KN' => 'Sant Cristòfol i Neus', + 'KR' => 'Corea del Sud', + 'KW' => 'Kuwait', + 'LA' => 'Laos', + 'LB' => 'Líban', + 'LR' => 'Libèria', + 'LY' => 'Líbia', + 'LC' => 'Santa Llúcia', + 'LI' => 'Liechtenstein', + 'LK' => 'Sri Lanka', + 'LS' => 'Lesoto', + 'LT' => 'Lituània', + 'LU' => 'Luxemburg', + 'LV' => 'Letònia', + 'MA' => 'Marroc', + 'MC' => 'Mònaco', + 'MD' => 'Moldàvia', + 'MG' => 'Madagascar', + 'MV' => 'Maldives', + 'MX' => 'Mèxic', + 'MH' => 'Illes Marshall', + 'MK' => 'Macedònia', + 'ML' => 'Mali', + 'MT' => 'Malta', + 'MM' => 'Myanmar', + 'ME' => 'Montenegro', + 'MN' => 'Mongòlia', + 'MZ' => 'Moçambic', + 'MR' => 'Mauritània', + 'MU' => 'Maurici', + 'MW' => 'Malawi', + 'MY' => 'Malàsia', + 'NA' => 'Namíbia', + 'NE' => 'Níger', + 'NG' => 'Nigèria', + 'NI' => 'Nicaragua', + 'NL' => 'Països Baixos', + 'NO' => 'Noruega', + 'NP' => 'Nepal', + 'NR' => 'Nauru', + 'NZ' => 'Nova Zelanda', + 'OM' => 'Oman', + 'PK' => 'Pakistan', + 'PA' => 'Panamà', + 'PE' => 'Perú', + 'PH' => 'Filipines', + 'PW' => 'Palaos', + 'PG' => 'Papua Nova Guinea', + 'PL' => 'Polònia', + 'KP' => 'Corea del Nord', + 'PT' => 'Portugal', + 'PY' => 'Paraguai', + 'QA' => 'Katar', + 'RO' => 'Romania', + 'RU' => 'Rússia', + 'RW' => 'Rwanda', + 'SA' => 'Aràbia Saudita', + 'SD' => 'Sudan', + 'SN' => 'Senegal', + 'SG' => 'Singapur', + 'SB' => 'Illes Salomó', + 'SL' => 'Sierra Leone', + 'SV' => 'El Salvador', + 'SM' => 'San Marí', + 'SO' => 'Somàlia', + 'RS' => 'Sèrbia', + 'SS' => 'Sudàn del Sud', + 'ST' => 'Santo Tomé y Príncipe', + 'SR' => 'Surinam', + 'SK' => 'Eslovàquia', + 'SI' => 'Eslovènia', + 'SE' => 'Suècia', + 'SZ' => 'Swazilàndia', + 'SC' => 'Seychelles', + 'SY' => 'Síria', + 'TD' => 'Txad', + 'TG' => 'Togo', + 'TH' => 'Tailàndia', + 'TJ' => 'Tadjikistan', + 'TM' => 'Turkmenistan', + 'TL' => 'Timor Oriental', + 'TO' => 'Tonga', + 'TT' => 'Trinitat i Tobago', + 'TN' => 'Tunísia', + 'TR' => 'Turquia', + 'TV' => 'Tuvalu', + 'TZ' => 'Tanzània', + 'UG' => 'Uganda', + 'UA' => 'Ucraïna', + 'UY' => 'Uruguai', + 'US' => 'Estats Units', + 'UZ' => 'Uzbekistan', + 'VA' => 'Ciudat del Vaticà', + 'VC' => 'Saint Vincent i les Grenadines', + 'VE' => 'Veneçuela', + 'VN' => 'Vietnam', + 'VU' => 'Vanuatu', + 'WS' => 'Samoa', + 'YE' => 'Iemen', + 'ZA' => 'Sud-àfrica', + 'ZM' => 'Zàmbia', + 'ZW' => 'Zimbabwe', +]; diff --git a/app/config/locale/cat.php b/app/config/locale/cat.php index 26b50a57c0..718a790961 100644 --- a/app/config/locale/cat.php +++ b/app/config/locale/cat.php @@ -1,21 +1,21 @@ - '"L\'art de ser sabi és l\'art de saber què passar per alt"', // This is the line printed in the homepage and console 'view-source' - 'settings.locale' => 'cat', - 'settings.direction' => 'ltr', - - // Service - Users - 'auth.emails.team' => '%s Equip', - 'auth.emails.confirm.title' => 'Confirmació del compte', - 'auth.emails.confirm.body' => 'cat.email.auth.confirm.tpl', - 'auth.emails.recovery.title' => 'Restablir contrasenya', - 'auth.emails.recovery.body' => 'cat.email.auth.recovery.tpl', - 'auth.emails.invitation.title' => 'Invitació a l\'Equipo %s a %s', - 'auth.emails.invitation.body' => 'cat.email.auth.invitation.tpl', - - 'locale.country.unknown' => 'Desconegut', - - 'countries' => include 'cat.countries.php', - 'continents' => include 'cat.continents.php', -]; + '"L\'art de ser sabi és l\'art de saber què passar per alt"', // This is the line printed in the homepage and console 'view-source' + 'settings.locale' => 'cat', + 'settings.direction' => 'ltr', + + // Service - Users + 'auth.emails.team' => '%s Equip', + 'auth.emails.confirm.title' => 'Confirmació del compte', + 'auth.emails.confirm.body' => 'cat.email.auth.confirm.tpl', + 'auth.emails.recovery.title' => 'Restablir contrasenya', + 'auth.emails.recovery.body' => 'cat.email.auth.recovery.tpl', + 'auth.emails.invitation.title' => 'Invitació a l\'Equipo %s a %s', + 'auth.emails.invitation.body' => 'cat.email.auth.invitation.tpl', + + 'locale.country.unknown' => 'Desconegut', + + 'countries' => include 'cat.countries.php', + 'continents' => include 'cat.continents.php', +]; diff --git a/app/config/locale/fi.continents.php b/app/config/locale/fi.continents.php index 7b405d7616..6f971fb84d 100644 --- a/app/config/locale/fi.continents.php +++ b/app/config/locale/fi.continents.php @@ -8,4 +8,4 @@ return [ 'NA' => 'Pohjois Amerikka', 'OC' => 'Oceania', 'SA' => 'Etelä Amerikka', -]; \ No newline at end of file +]; diff --git a/app/config/locale/fi.countries.php b/app/config/locale/fi.countries.php index 65b9844138..b1aefe05a9 100644 --- a/app/config/locale/fi.countries.php +++ b/app/config/locale/fi.countries.php @@ -195,4 +195,4 @@ return [ 'ZA' => 'Etelä-Afrikka', 'ZM' => 'Sambia', 'ZW' => 'Zimbabwe', -]; \ No newline at end of file +]; diff --git a/app/config/locale/fi.php b/app/config/locale/fi.php index fac6b5586c..76d8e66cb3 100644 --- a/app/config/locale/fi.php +++ b/app/config/locale/fi.php @@ -18,4 +18,4 @@ return [ 'countries' => include 'fi.countries.php', 'continents' => include 'fi.continents.php', -]; \ No newline at end of file +]; diff --git a/app/config/locale/hi.countries.php b/app/config/locale/hi.countries.php index 05bbb77b53..b87b8ff679 100644 --- a/app/config/locale/hi.countries.php +++ b/app/config/locale/hi.countries.php @@ -9,7 +9,7 @@ return [ 'AI' => 'संयुक्त अरब अमीरात', 'AR' => 'अर्जेंटीना', 'AM' => 'आर्मेनिया', - 'AG' => 'एंटीगुआ और बारबुडा' + 'AG' => 'एंटीगुआ और बारबुडा', 'AU' => 'ऑस्ट्रेलिया', 'AT' => 'ऑस्ट्रिया', 'AZ' => 'अजरबैजान', @@ -17,7 +17,7 @@ return [ 'BI' => 'बुरुंडी', 'BE' => 'बेल्जियम', 'BJ' => 'बेनिन', - 'BF' => 'बुर्किना फ़ासो' + 'BF' => 'बुर्किना फ़ासो', 'BD' => 'बांग्लादेश', 'BG' => 'बुल्गारिया', 'BH' => 'बहरीन', @@ -71,12 +71,12 @@ return [ 'GN' => 'गिनी', 'GM' => 'गाम्बिया', 'GW' => 'गिनी-बिसाऊ', - 'GQ' => 'इक्वेटोरियल गिनी' + 'GQ' => 'इक्वेटोरियल गिनी', 'GR' => 'ग्रीस', 'GD' => 'ग्रेनाडा', 'GT' => 'ग्वाटेमाला', 'GY' => 'गुयाना', - 'HN' => 'होंडुरास' + 'HN' => 'होंडुरास', 'HR' => 'क्रोएशिया', 'HT' => 'हैती', 'HU' => 'हंगरी', diff --git a/app/config/locale/nl.php b/app/config/locale/nl.php index c73341b172..4832cb623a 100644 --- a/app/config/locale/nl.php +++ b/app/config/locale/nl.php @@ -18,4 +18,4 @@ return [ 'countries' => include 'nl.countries.php', 'continents' => include 'nl.continents.php', -]; \ No newline at end of file +]; diff --git a/app/config/locale/pt-pt.countries.php b/app/config/locale/pt-pt.countries.php index 9b628e867f..8378e96ee0 100644 --- a/app/config/locale/pt-pt.countries.php +++ b/app/config/locale/pt-pt.countries.php @@ -7,7 +7,7 @@ return [ 'AD' => 'Andorra', 'AE' => 'Emirados Árabes Unidos', 'AR' => 'Argentina', - 'AM' => 'Armênia', + 'AM' => 'Arménia', 'AG' => 'Antígua e Barbuda', 'AU' => 'Austrália', 'AT' => 'Áustria', @@ -55,7 +55,7 @@ return [ 'EG' => 'Egito', 'ER' => 'Eritreia', 'ES' => 'Espanha', - 'EE' => 'Estônia', + 'EE' => 'Estónia', 'ET' => 'Etiópia', 'FI' => 'Finlândia', 'FJ' => 'Fiji', @@ -89,7 +89,7 @@ return [ 'JO' => 'Jordânia', 'JP' => 'Japão', 'KZ' => 'Cazaquistão', - 'KE' => 'Quênia', + 'KE' => 'Quénia', 'KG' => 'Quirguistão', 'KH' => 'Camboja', 'KI' => 'Quiribati', @@ -106,15 +106,15 @@ return [ 'LS' => 'Lesoto', 'LT' => 'Lituânia', 'LU' => 'Luxemburgo', - 'LV' => 'Letônia', + 'LV' => 'Letónia', 'MA' => 'Marrocos', - 'MC' => 'Mônaco', + 'MC' => 'Mónaco', 'MD' => 'Moldávia', 'MG' => 'Madagáscar', 'MV' => 'Maldivas', 'MX' => 'México', 'MH' => 'Ilhas Marshall', - 'MK' => 'Macedônia', + 'MK' => 'Macedónia', 'ML' => 'Mali', 'MT' => 'Malta', 'MM' => 'Myanmar', @@ -141,7 +141,7 @@ return [ 'PH' => 'Filipinas', 'PW' => 'Palau', 'PG' => 'Papua-Nova Guiné', - 'PL' => 'Polônia', + 'PL' => 'Polónia', 'KP' => 'Coreia do Norte', 'PT' => 'Portugal', 'PY' => 'Paraguai', @@ -163,7 +163,7 @@ return [ 'ST' => 'São Tomé e Príncipe', 'SR' => 'Suriname', 'SK' => 'Eslováquia', - 'SI' => 'Eslovênia', + 'SI' => 'Eslovénia', 'SE' => 'Suécia', 'SZ' => 'Suazilândia', 'SC' => 'Seicheles', @@ -188,10 +188,10 @@ return [ 'VA' => 'Cidade do Vaticano', 'VC' => 'São Vincente e Granadinas', 'VE' => 'Venezuela', - 'VN' => 'Vietnã', + 'VN' => 'Vietname', 'VU' => 'Vanuatu', 'WS' => 'Samoa', - 'YE' => 'Iêmen', + 'YE' => 'Iémen', 'ZA' => 'África do Sul', 'ZM' => 'Zâmbia', 'ZW' => 'Zimbábue', diff --git a/app/config/locale/tr.countries.php b/app/config/locale/tr.countries.php index e2b2f2f22e..5fd899e911 100644 --- a/app/config/locale/tr.countries.php +++ b/app/config/locale/tr.countries.php @@ -1,198 +1,198 @@ 'Afganistan', - 'AO' => 'Angola', - 'AL' => 'Arnavutluk', - 'AD' => 'Andorra', - 'AE' => 'Birleşik Arap Emirlikleri', - 'AR' => 'Arjantin', - 'AM' => 'Ermenistan', - 'AG' => 'Antigua ve Barbuda', - 'AU' => 'Avustralya', - 'AT' => 'Avusturya', - 'AZ' => 'Azerbaycan', - 'BI' => 'Burundi', - 'BE' => 'Belçika', - 'BJ' => 'Benin', - 'BF' => 'Burkina Faso', - 'BD' => 'Bangladeş', - 'BG' => 'Bulgaristan', - 'BH' => 'Bahreyn', - 'BS' => 'Bahamalar', - 'BA' => 'Bosna Hersek', - 'BY' => 'Beyaz Rusya', - 'BZ' => 'Belize', - 'BO' => 'Bolivya', - 'BR' => 'Brezilya', - 'BB' => 'Barbados', - 'BN' => 'Brunei', - 'BT' => 'Butan', - 'BW' => 'Botsvana', - 'CF' => 'Orta Afrika Cumhuriyeti', - 'CA' => 'Kanada', - 'CH' => 'İsviçre', - 'CL' => 'Şili', - 'CN' => 'Çin', - 'CI' => 'Fildişi Sahili', - 'CM' => 'Kamerun', - 'CD' => 'Kongo - Kinşasa', - 'CG' => 'Kongo - Brazavil', - 'CO' => 'Kolombiya', - 'KM' => 'Komorlar', - 'CV' => 'Cape Verde', - 'CR' => 'Kosta Rika', - 'CU' => 'Küba', - 'CY' => 'Güney Kıbrıs Rum Kesimi', - 'CZ' => 'Çek Cumhuriyeti', - 'DE' => 'Almanya', - 'DJ' => 'Cibuti', - 'DM' => 'Dominika', - 'DK' => 'Danimarka', - 'DO' => 'Dominik Cumhuriyeti', - 'DZ' => 'Cezayir', - 'EC' => 'Ekvador', - 'EG' => 'Mısır', - 'ER' => 'Eritre', - 'ES' => 'İspanya', - 'EE' => 'Estonya', - 'ET' => 'Etiyopya', - 'FI' => 'Finlandiya', - 'FJ' => 'Fiji', - 'FR' => 'Fransa', - 'FM' => 'Mikronezya', - 'GA' => 'Gabon', - 'GB' => 'Birleşik Krallık', - 'GE' => 'Gürcistan', - 'GH' => 'Gana', - 'GN' => 'Gine', - 'GM' => 'Gambiya', - 'GW' => 'Gine-Bissau', - 'GQ' => 'Ekvator Ginesi', - 'GR' => 'Yunanistan', - 'GD' => 'Grenada', - 'GT' => 'Guatemala', - 'GY' => 'Guyana', - 'HN' => 'Honduras', - 'HR' => 'Hırvatistan', - 'HT' => 'Haiti', - 'HU' => 'Macaristan', - 'ID' => 'Endonezya', - 'IN' => 'Hindistan', - 'IE' => 'İrlanda', - 'IR' => 'İran', - 'IQ' => 'Irak', - 'IS' => 'İzlanda', - 'IL' => 'İsrail', - 'IT' => 'İtalya', - 'JM' => 'Jamaika', - 'JO' => 'Ürdün', - 'JP' => 'Japonya', - 'KZ' => 'Kazakistan', - 'KE' => 'Kenya', - 'KG' => 'Kırgızistan', - 'KH' => 'Kamboçya', - 'KI' => 'Kiribati', - 'KN' => 'Saint Kitts ve Nevis', - 'KR' => 'Güney Kore', - 'KW' => 'Kuveyt', - 'LA' => 'Laos', - 'LB' => 'Lübnan', - 'LR' => 'Liberya', - 'LY' => 'Libya', - 'LC' => 'Saint Lucia', - 'LI' => 'Liechtenstein', - 'LK' => 'Sri Lanka', - 'LS' => 'Lesoto', - 'LT' => 'Litvanya', - 'LU' => 'Lüksemburg', - 'LV' => 'Letonya', - 'MA' => 'Fas', - 'MC' => 'Monako', - 'MD' => 'Moldova', - 'MG' => 'Madagaskar', - 'MV' => 'Maldivler', - 'MX' => 'Meksika', - 'MH' => 'Marshall Adaları', - 'MK' => 'Makedonya', - 'ML' => 'Mali', - 'MT' => 'Malta', - 'MM' => 'Myanmar (Burma)', - 'ME' => 'Karadağ', - 'MN' => 'Moğolistan', - 'MZ' => 'Mozambik', - 'MR' => 'Moritanya', - 'MU' => 'Mauritius', - 'MW' => 'Malavi', - 'MY' => 'Malezya', - 'NA' => 'Namibya', - 'NE' => 'Nijer', - 'NG' => 'Nijerya', - 'NI' => 'Nikaragua', - 'NL' => 'Hollanda', - 'NO' => 'Norveç', - 'NP' => 'Nepal', - 'NR' => 'Nauru', - 'NZ' => 'Yeni Zelanda', - 'OM' => 'Umman', - 'PK' => 'Pakistan', - 'PA' => 'Panama', - 'PE' => 'Peru', - 'PH' => 'Filipinler', - 'PW' => 'Palau', - 'PG' => 'Papua Yeni Gine', - 'PL' => 'Polonya', - 'KP' => 'Kuzey Kore', - 'PT' => 'Portekiz', - 'PY' => 'Paraguay', - 'QA' => 'Katar', - 'RO' => 'Romanya', - 'RU' => 'Rusya', - 'RW' => 'Ruanda', - 'SA' => 'Suudi Arabistan', - 'SD' => 'Sudan', - 'SN' => 'Senegal', - 'SG' => 'Singapur', - 'SB' => 'Solomon Adaları', - 'SL' => 'Sierra Leone', - 'SV' => 'El Salvador', - 'SM' => 'San Marino', - 'SO' => 'Somali', - 'RS' => 'Sırbistan', - 'SS' => 'Güney Sudan', - 'ST' => 'São Tomé ve Príncipe', - 'SR' => 'Surinam', - 'SK' => 'Slovakya', - 'SI' => 'Slovenya', - 'SE' => 'İsveç', - 'SZ' => 'Svaziland', - 'SC' => 'Seyşeller', - 'SY' => 'Suriye', - 'TD' => 'Çad', - 'TG' => 'Togo', - 'TH' => 'Tayland', - 'TJ' => 'Tacikistan', - 'TM' => 'Türkmenistan', - 'TL' => 'Timor-Leste', - 'TO' => 'Tonga', - 'TT' => 'Trinidad ve Tobago', - 'TN' => 'Tunus', - 'TR' => 'Türkiye', - 'TV' => 'Tuvalu', - 'TZ' => 'Tanzanya', - 'UG' => 'Uganda', - 'UA' => 'Ukrayna', - 'UY' => 'Uruguay', - 'US' => 'ABD', - 'UZ' => 'Özbekistan', - 'VA' => 'Vatikan', - 'VC' => 'Saint Vincent ve Grenadinler', - 'VE' => 'Venezuela', - 'VN' => 'Vietnam', - 'VU' => 'Vanuatu', - 'WS' => 'Samoa', - 'YE' => 'Yemen', - 'ZA' => 'Güney Afrika', - 'ZM' => 'Zambiya', - 'ZW' => 'Zimbabve', + 'AF' => 'Afganistan', + 'AO' => 'Angola', + 'AL' => 'Arnavutluk', + 'AD' => 'Andorra', + 'AE' => 'Birleşik Arap Emirlikleri', + 'AR' => 'Arjantin', + 'AM' => 'Ermenistan', + 'AG' => 'Antigua ve Barbuda', + 'AU' => 'Avustralya', + 'AT' => 'Avusturya', + 'AZ' => 'Azerbaycan', + 'BI' => 'Burundi', + 'BE' => 'Belçika', + 'BJ' => 'Benin', + 'BF' => 'Burkina Faso', + 'BD' => 'Bangladeş', + 'BG' => 'Bulgaristan', + 'BH' => 'Bahreyn', + 'BS' => 'Bahamalar', + 'BA' => 'Bosna Hersek', + 'BY' => 'Beyaz Rusya', + 'BZ' => 'Belize', + 'BO' => 'Bolivya', + 'BR' => 'Brezilya', + 'BB' => 'Barbados', + 'BN' => 'Brunei', + 'BT' => 'Butan', + 'BW' => 'Botsvana', + 'CF' => 'Orta Afrika Cumhuriyeti', + 'CA' => 'Kanada', + 'CH' => 'İsviçre', + 'CL' => 'Şili', + 'CN' => 'Çin', + 'CI' => 'Fildişi Sahili', + 'CM' => 'Kamerun', + 'CD' => 'Kongo - Kinşasa', + 'CG' => 'Kongo - Brazavil', + 'CO' => 'Kolombiya', + 'KM' => 'Komorlar', + 'CV' => 'Cape Verde', + 'CR' => 'Kosta Rika', + 'CU' => 'Küba', + 'CY' => 'Güney Kıbrıs Rum Kesimi', + 'CZ' => 'Çek Cumhuriyeti', + 'DE' => 'Almanya', + 'DJ' => 'Cibuti', + 'DM' => 'Dominika', + 'DK' => 'Danimarka', + 'DO' => 'Dominik Cumhuriyeti', + 'DZ' => 'Cezayir', + 'EC' => 'Ekvador', + 'EG' => 'Mısır', + 'ER' => 'Eritre', + 'ES' => 'İspanya', + 'EE' => 'Estonya', + 'ET' => 'Etiyopya', + 'FI' => 'Finlandiya', + 'FJ' => 'Fiji', + 'FR' => 'Fransa', + 'FM' => 'Mikronezya', + 'GA' => 'Gabon', + 'GB' => 'Birleşik Krallık', + 'GE' => 'Gürcistan', + 'GH' => 'Gana', + 'GN' => 'Gine', + 'GM' => 'Gambiya', + 'GW' => 'Gine-Bissau', + 'GQ' => 'Ekvator Ginesi', + 'GR' => 'Yunanistan', + 'GD' => 'Grenada', + 'GT' => 'Guatemala', + 'GY' => 'Guyana', + 'HN' => 'Honduras', + 'HR' => 'Hırvatistan', + 'HT' => 'Haiti', + 'HU' => 'Macaristan', + 'ID' => 'Endonezya', + 'IN' => 'Hindistan', + 'IE' => 'İrlanda', + 'IR' => 'İran', + 'IQ' => 'Irak', + 'IS' => 'İzlanda', + 'IL' => 'İsrail', + 'IT' => 'İtalya', + 'JM' => 'Jamaika', + 'JO' => 'Ürdün', + 'JP' => 'Japonya', + 'KZ' => 'Kazakistan', + 'KE' => 'Kenya', + 'KG' => 'Kırgızistan', + 'KH' => 'Kamboçya', + 'KI' => 'Kiribati', + 'KN' => 'Saint Kitts ve Nevis', + 'KR' => 'Güney Kore', + 'KW' => 'Kuveyt', + 'LA' => 'Laos', + 'LB' => 'Lübnan', + 'LR' => 'Liberya', + 'LY' => 'Libya', + 'LC' => 'Saint Lucia', + 'LI' => 'Liechtenstein', + 'LK' => 'Sri Lanka', + 'LS' => 'Lesoto', + 'LT' => 'Litvanya', + 'LU' => 'Lüksemburg', + 'LV' => 'Letonya', + 'MA' => 'Fas', + 'MC' => 'Monako', + 'MD' => 'Moldova', + 'MG' => 'Madagaskar', + 'MV' => 'Maldivler', + 'MX' => 'Meksika', + 'MH' => 'Marshall Adaları', + 'MK' => 'Makedonya', + 'ML' => 'Mali', + 'MT' => 'Malta', + 'MM' => 'Myanmar (Burma)', + 'ME' => 'Karadağ', + 'MN' => 'Moğolistan', + 'MZ' => 'Mozambik', + 'MR' => 'Moritanya', + 'MU' => 'Mauritius', + 'MW' => 'Malavi', + 'MY' => 'Malezya', + 'NA' => 'Namibya', + 'NE' => 'Nijer', + 'NG' => 'Nijerya', + 'NI' => 'Nikaragua', + 'NL' => 'Hollanda', + 'NO' => 'Norveç', + 'NP' => 'Nepal', + 'NR' => 'Nauru', + 'NZ' => 'Yeni Zelanda', + 'OM' => 'Umman', + 'PK' => 'Pakistan', + 'PA' => 'Panama', + 'PE' => 'Peru', + 'PH' => 'Filipinler', + 'PW' => 'Palau', + 'PG' => 'Papua Yeni Gine', + 'PL' => 'Polonya', + 'KP' => 'Kuzey Kore', + 'PT' => 'Portekiz', + 'PY' => 'Paraguay', + 'QA' => 'Katar', + 'RO' => 'Romanya', + 'RU' => 'Rusya', + 'RW' => 'Ruanda', + 'SA' => 'Suudi Arabistan', + 'SD' => 'Sudan', + 'SN' => 'Senegal', + 'SG' => 'Singapur', + 'SB' => 'Solomon Adaları', + 'SL' => 'Sierra Leone', + 'SV' => 'El Salvador', + 'SM' => 'San Marino', + 'SO' => 'Somali', + 'RS' => 'Sırbistan', + 'SS' => 'Güney Sudan', + 'ST' => 'São Tomé ve Príncipe', + 'SR' => 'Surinam', + 'SK' => 'Slovakya', + 'SI' => 'Slovenya', + 'SE' => 'İsveç', + 'SZ' => 'Svaziland', + 'SC' => 'Seyşeller', + 'SY' => 'Suriye', + 'TD' => 'Çad', + 'TG' => 'Togo', + 'TH' => 'Tayland', + 'TJ' => 'Tacikistan', + 'TM' => 'Türkmenistan', + 'TL' => 'Timor-Leste', + 'TO' => 'Tonga', + 'TT' => 'Trinidad ve Tobago', + 'TN' => 'Tunus', + 'TR' => 'Türkiye', + 'TV' => 'Tuvalu', + 'TZ' => 'Tanzanya', + 'UG' => 'Uganda', + 'UA' => 'Ukrayna', + 'UY' => 'Uruguay', + 'US' => 'ABD', + 'UZ' => 'Özbekistan', + 'VA' => 'Vatikan', + 'VC' => 'Saint Vincent ve Grenadinler', + 'VE' => 'Venezuela', + 'VN' => 'Vietnam', + 'VU' => 'Vanuatu', + 'WS' => 'Samoa', + 'YE' => 'Yemen', + 'ZA' => 'Güney Afrika', + 'ZM' => 'Zambiya', + 'ZW' => 'Zimbabve', ]; diff --git a/app/config/locale/ua.continents.php b/app/config/locale/ua.continents.php index a9646ca140..6813bc31d4 100644 --- a/app/config/locale/ua.continents.php +++ b/app/config/locale/ua.continents.php @@ -1,4 +1,5 @@ 'Африка', 'AN' => 'Антарктика', @@ -7,4 +8,4 @@ 'NA' => 'Північна Америка', 'OC' => 'Океанія', 'SA' => 'Південна Америка', -]; \ No newline at end of file +]; diff --git a/app/config/locale/ua.countries.php b/app/config/locale/ua.countries.php index eae8e8ebd3..0be63cc7d9 100644 --- a/app/config/locale/ua.countries.php +++ b/app/config/locale/ua.countries.php @@ -1,4 +1,5 @@ 'Афганістан', 'AO' => 'Ангола', @@ -194,4 +195,4 @@ 'ZA' => 'Південна Африка', 'ZM' => 'Замбія', 'ZW' => 'Зімбабве', -]; \ No newline at end of file +]; diff --git a/app/config/providers.php b/app/config/providers.php index 9e5f329ebb..01b7b6b429 100644 --- a/app/config/providers.php +++ b/app/config/providers.php @@ -4,7 +4,7 @@ return [ 'bitbucket' => [ 'developers' => 'https://developer.atlassian.com/bitbucket', 'icon' => 'icon-bitbucket', - 'enabled' => false, + 'enabled' => true, ], 'facebook' => [ 'developers' => 'https://developers.facebook.com/', diff --git a/app/config/version.php b/app/config/version.php index 4f8cb07eaa..3e3d3ee0c3 100644 --- a/app/config/version.php +++ b/app/config/version.php @@ -1,5 +1,5 @@ get('/v1/projects/:projectId/usage') $network = []; if ($client) { - $start = DateTime::createFromFormat('U', strtotime('first day of this month')); + $start = DateTime::createFromFormat('U', strtotime('last day of last month')); $start = $start->format(DateTime::RFC3339); $end = DateTime::createFromFormat('U', strtotime('last day of this month')); $end = $end->format(DateTime::RFC3339); diff --git a/app/init.php b/app/init.php index 98b059b7a7..bd76ad3862 100644 --- a/app/init.php +++ b/app/init.php @@ -24,7 +24,7 @@ const APP_EMAIL_TEAM = 'team@'.APP_DOMAIN; const APP_EMAIL_SECURITY = 'security@'.APP_DOMAIN; const APP_USERAGENT = APP_NAME.'-Server/%s Please report abuse at '.APP_EMAIL_SECURITY; const APP_MODE_ADMIN = 'admin'; -const APP_LOCALES = ['en', 'he', 'pt-br', 'es']; +const APP_LOCALES = ['cat', 'de', 'en', 'es', 'fi', 'fr', 'gr', 'he', 'hi', 'id', 'it', 'nl', /* 'no',*/ 'pt-br', 'pt-pt', 'ro', 'tr', 'ua']; const APP_PAGING_LIMIT = 15; $register = new Registry(); @@ -127,12 +127,25 @@ $locale = $request->getParam('locale', $request->getHeader('X-Appwrite-Locale', Locale::$exceptions = false; -Locale::setLanguage('en', include __DIR__ . '/config/locale/en.php'); -Locale::setLanguage('he', include __DIR__ . '/config/locale/he.php'); -Locale::setLanguage('ua', include __DIR__ . '/config/locale/ua.php'); -Locale::setLanguage('pt-br', include __DIR__ . '/config/locale/pt-br.php'); -Locale::setLanguage('es', include __DIR__ . '/config/locale/es.php'); -Locale::setLanguage('ro', include __DIR__ . '/config/locale/ro.php'); + +Locale::setLanguage('cat', include __DIR__.'/config/locale/cat.php'); +Locale::setLanguage('de', include __DIR__.'/config/locale/de.php'); +Locale::setLanguage('en', include __DIR__.'/config/locale/en.php'); +Locale::setLanguage('es', include __DIR__.'/config/locale/es.php'); +Locale::setLanguage('fi', include __DIR__.'/config/locale/fi.php'); +Locale::setLanguage('fr', include __DIR__.'/config/locale/fr.php'); +Locale::setLanguage('gr', include __DIR__.'/config/locale/gr.php'); +Locale::setLanguage('he', include __DIR__.'/config/locale/he.php'); +Locale::setLanguage('hi', include __DIR__.'/config/locale/hi.php'); +Locale::setLanguage('id', include __DIR__.'/config/locale/id.php'); +Locale::setLanguage('it', include __DIR__.'/config/locale/it.php'); +Locale::setLanguage('nl', include __DIR__.'/config/locale/nl.php'); +//Locale::setLanguage('no', include __DIR__.'/config/locale/no.php'); +Locale::setLanguage('pt-br', include __DIR__.'/config/locale/pt-br.php'); +Locale::setLanguage('pt-pt', include __DIR__.'/config/locale/pt-pt.php'); +Locale::setLanguage('ro', include __DIR__.'/config/locale/ro.php'); +Locale::setLanguage('tr', include __DIR__.'/config/locale/tr.php'); +Locale::setLanguage('ua', include __DIR__.'/config/locale/ua.php'); Locale::setLanguage('si', include __DIR__ . '/config/locale/si.php'); if (in_array($locale, APP_LOCALES)) { diff --git a/app/sdks/dart/lib/services/auth.dart b/app/sdks/dart/lib/services/auth.dart index d476e4333e..45c0be71a7 100644 --- a/app/sdks/dart/lib/services/auth.dart +++ b/app/sdks/dart/lib/services/auth.dart @@ -8,18 +8,18 @@ class Auth extends Service { /// Allow the user to login into his account by providing a valid email and /// password combination. Use the success and failure arguments to provide a - /// redirect URL\'s back to your app when login is completed. + /// redirect URL\'s back to your app when login is completed. /// /// Please notice that in order to avoid a [Redirect /// Attacks](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) - /// the only valid redirect URL's are the once from domains you have set when + /// the only valid redirect URL's are the once from domains you have set when /// added your platforms in the console interface. /// - /// When not using the success or failure redirect arguments this endpoint will - /// result with a 200 status code and the user account object on success and - /// with 401 status error on failure. This behavior was applied to help the web - /// clients deal with browsers who don't allow to set 3rd party HTTP cookies - /// needed for saving the account session token. + /// When accessing this route using Javascript from the browser, success and + /// failure parameter URLs are required. Appwrite server will respond with a + /// 301 redirect status code and will set the user session cookie. This + /// behavior is enforced because modern browsers are limiting 3rd party cookies + /// in XHR of fetch requests to protect user privacy. Future login({email, password, success, failure}) async { String path = '/auth/login'; @@ -54,16 +54,6 @@ class Auth extends Service { return await this.client.call('delete', path: path, params: params); } - Future oauthCallback({projectId, provider, code, state = null}) async { - String path = '/auth/oauth/callback/{provider}/{projectId}'.replaceAll(RegExp('{projectId}'), projectId).replaceAll(RegExp('{provider}'), provider); - - Map params = { - 'code': code, - 'state': state, - }; - - return await this.client.call('get', path: path, params: params); - } Future oauth({provider, success = null, failure = null}) async { String path = '/auth/oauth/{provider}'.replaceAll(RegExp('{provider}'), provider); @@ -80,12 +70,12 @@ class Auth extends Service { /// values attached to the URL query string. Use the query string params to /// submit a request to the /auth/password/reset endpoint to complete the /// process. - Future recovery({email, redirect}) async { + Future recovery({email, reset}) async { String path = '/auth/recovery'; Map params = { 'email': email, - 'redirect': redirect, + 'reset': reset, }; return await this.client.call('post', path: path, params: params); @@ -97,7 +87,7 @@ class Auth extends Service { /// /// Please notice that in order to avoid a [Redirect /// Attacks](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) - /// the only valid redirect URL's are the once from domains you have set when + /// the only valid redirect URL's are the once from domains you have set when /// added your platforms in the console interface. Future recoveryReset({userId, token, passwordA, passwordB}) async { String path = '/auth/recovery/reset'; @@ -112,32 +102,32 @@ class Auth extends Service { return await this.client.call('put', path: path, params: params); } /// Use this endpoint to allow a new user to register an account in your - /// project. Use the success and failure URL's to redirect users back to your + /// project. Use the success and failure URL's to redirect users back to your /// application after signup completes. /// /// If registration completes successfully user will be sent with a /// confirmation email in order to confirm he is the owner of the account email - /// address. Use the redirect parameter to redirect the user from the + /// address. Use the confirmation parameter to redirect the user from the /// confirmation email back to your app. When the user is redirected, use the /// /auth/confirm endpoint to complete the account confirmation. /// /// Please notice that in order to avoid a [Redirect /// Attacks](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) - /// the only valid redirect URL's are the once from domains you have set when + /// the only valid redirect URL's are the once from domains you have set when /// added your platforms in the console interface. /// - /// When not using the success or failure redirect arguments this endpoint will - /// result with a 200 status code and the user account object on success and - /// with 401 status error on failure. This behavior was applied to help the web - /// clients deal with browsers who don't allow to set 3rd party HTTP cookies - /// needed for saving the account session token. - Future register({email, password, redirect, success, failure, name = null}) async { + /// When accessing this route using Javascript from the browser, success and + /// failure parameter URLs are required. Appwrite server will respond with a + /// 301 redirect status code and will set the user session cookie. This + /// behavior is enforced because modern browsers are limiting 3rd party cookies + /// in XHR of fetch requests to protect user privacy. + Future register({email, password, confirm, success = null, failure = null, name = null}) async { String path = '/auth/register'; Map params = { 'email': email, 'password': password, - 'redirect': redirect, + 'confirm': confirm, 'success': success, 'failure': failure, 'name': name, @@ -165,13 +155,13 @@ class Auth extends Service { /// /// Please notice that in order to avoid a [Redirect /// Attacks](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) - /// the only valid redirect URL's are the once from domains you have set when + /// the only valid redirect URL's are the once from domains you have set when /// added your platforms in the console interface. - Future confirmResend({redirect}) async { + Future confirmResend({confirm}) async { String path = '/auth/register/confirm/resend'; Map params = { - 'redirect': redirect, + 'confirm': confirm, }; return await this.client.call('post', path: path, params: params); diff --git a/app/sdks/dart/lib/services/storage.dart b/app/sdks/dart/lib/services/storage.dart index 2da1c1c62b..373cc44193 100644 --- a/app/sdks/dart/lib/services/storage.dart +++ b/app/sdks/dart/lib/services/storage.dart @@ -70,7 +70,7 @@ class Storage extends Service { return await this.client.call('delete', path: path, params: params); } /// Get file content by its unique ID. The endpoint response return with a - /// 'Content-Disposition: attachment' header that tells the browser to start + /// 'Content-Disposition: attachment' header that tells the browser to start /// downloading the file to user downloads directory. Future getFileDownload({fileId}) async { String path = '/storage/files/{fileId}/download'.replaceAll(RegExp('{fileId}'), fileId); @@ -98,7 +98,7 @@ class Storage extends Service { return await this.client.call('get', path: path, params: params); } /// Get file content by its unique ID. This endpoint is similar to the download - /// method but returns with no 'Content-Disposition: attachment' header. + /// method but returns with no 'Content-Disposition: attachment' header. Future getFileView({fileId, as = null}) async { String path = '/storage/files/{fileId}/view'.replaceAll(RegExp('{fileId}'), fileId); diff --git a/app/sdks/dart/lib/services/teams.dart b/app/sdks/dart/lib/services/teams.dart index 9c8cab7fd0..4c126143cd 100644 --- a/app/sdks/dart/lib/services/teams.dart +++ b/app/sdks/dart/lib/services/teams.dart @@ -78,7 +78,7 @@ class Teams extends Service { } /// Use this endpoint to invite a new member to your team. An email with a link /// to join the team will be sent to the new member email address. If member - /// doesn't exists in the project it will be automatically created. + /// doesn't exists in the project it will be automatically created. /// /// Use the redirect parameter to redirect the user from the invitation email /// back to your app. When the user is redirected, use the @@ -87,7 +87,7 @@ class Teams extends Service { /// /// Please notice that in order to avoid a [Redirect /// Attacks](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) - /// the only valid redirect URL's are the once from domains you have set when + /// the only valid redirect URL's are the once from domains you have set when /// added your platforms in the console interface. Future createTeamMembership({teamId, email, roles, redirect, name = null}) async { String path = '/teams/{teamId}/memberships'.replaceAll(RegExp('{teamId}'), teamId); @@ -124,18 +124,18 @@ class Teams extends Service { } /// Use this endpoint to let user accept an invitation to join a team after he /// is being redirect back to your app from the invitation email. Use the - /// success and failure URL's to redirect users back to your application after + /// success and failure URL's to redirect users back to your application after /// the request completes. /// /// Please notice that in order to avoid a [Redirect /// Attacks](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) - /// the only valid redirect URL's are the once from domains you have set when + /// the only valid redirect URL's are the once from domains you have set when /// added your platforms in the console interface. /// /// When not using the success or failure redirect arguments this endpoint will /// result with a 200 status code on success and with 401 status error on /// failure. This behavior was applied to help the web clients deal with - /// browsers who don't allow to set 3rd party HTTP cookies needed for saving + /// browsers who don't allow to set 3rd party HTTP cookies needed for saving /// the account session token. Future updateTeamMembershipStatus({teamId, inviteId, userId, secret, success = null, failure = null}) async { String path = '/teams/{teamId}/memberships/{inviteId}/status'.replaceAll(RegExp('{teamId}'), teamId).replaceAll(RegExp('{inviteId}'), inviteId); diff --git a/app/sdks/js/README.md b/app/sdks/js/README.md index 9cbe04dc15..03802a4e1e 100644 --- a/app/sdks/js/README.md +++ b/app/sdks/js/README.md @@ -3,6 +3,8 @@ ![License](https://img.shields.io/github/license/appwrite/sdk-for-js.svg?v=1) ![Version](https://img.shields.io/badge/api%20version-0.1.15-blue.svg?v=1) +This SDK if compitable with Appwrite server version 0.2.0 for older versions check previous releases. + Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs) diff --git a/app/sdks/js/docs/examples/account/delete.md b/app/sdks/js/docs/examples/account/delete.md index f6c48d9a42..c199f0f719 100644 --- a/app/sdks/js/docs/examples/account/delete.md +++ b/app/sdks/js/docs/examples/account/delete.md @@ -1,7 +1,7 @@ let sdk = new Appwrite(); sdk - setProject('') + .setProject('') ; let promise = sdk.account.delete(); diff --git a/app/sdks/js/docs/examples/account/get-prefs.md b/app/sdks/js/docs/examples/account/get-prefs.md index 1a15c1a9ee..39f8950138 100644 --- a/app/sdks/js/docs/examples/account/get-prefs.md +++ b/app/sdks/js/docs/examples/account/get-prefs.md @@ -1,7 +1,7 @@ let sdk = new Appwrite(); sdk - setProject('') + .setProject('') ; let promise = sdk.account.getPrefs(); diff --git a/app/sdks/js/docs/examples/account/get-security.md b/app/sdks/js/docs/examples/account/get-security.md index 208a431a7f..ab0671da8a 100644 --- a/app/sdks/js/docs/examples/account/get-security.md +++ b/app/sdks/js/docs/examples/account/get-security.md @@ -1,7 +1,7 @@ let sdk = new Appwrite(); sdk - setProject('') + .setProject('') ; let promise = sdk.account.getSecurity(); diff --git a/app/sdks/js/docs/examples/account/get-sessions.md b/app/sdks/js/docs/examples/account/get-sessions.md index 4db0be019b..963400deeb 100644 --- a/app/sdks/js/docs/examples/account/get-sessions.md +++ b/app/sdks/js/docs/examples/account/get-sessions.md @@ -1,7 +1,7 @@ let sdk = new Appwrite(); sdk - setProject('') + .setProject('') ; let promise = sdk.account.getSessions(); diff --git a/app/sdks/js/docs/examples/account/get.md b/app/sdks/js/docs/examples/account/get.md index a4832d7638..682e09fbd8 100644 --- a/app/sdks/js/docs/examples/account/get.md +++ b/app/sdks/js/docs/examples/account/get.md @@ -1,7 +1,7 @@ let sdk = new Appwrite(); sdk - setProject('') + .setProject('') ; let promise = sdk.account.get(); diff --git a/app/sdks/js/docs/examples/account/update-email.md b/app/sdks/js/docs/examples/account/update-email.md index dccea259a6..e9fb9c9ed2 100644 --- a/app/sdks/js/docs/examples/account/update-email.md +++ b/app/sdks/js/docs/examples/account/update-email.md @@ -1,7 +1,7 @@ let sdk = new Appwrite(); sdk - setProject('') + .setProject('') ; let promise = sdk.account.updateEmail('email@example.com', 'password'); diff --git a/app/sdks/js/docs/examples/account/update-name.md b/app/sdks/js/docs/examples/account/update-name.md index 85d7508e82..2e5531e4c3 100644 --- a/app/sdks/js/docs/examples/account/update-name.md +++ b/app/sdks/js/docs/examples/account/update-name.md @@ -1,7 +1,7 @@ let sdk = new Appwrite(); sdk - setProject('') + .setProject('') ; let promise = sdk.account.updateName('[NAME]'); diff --git a/app/sdks/js/docs/examples/account/update-password.md b/app/sdks/js/docs/examples/account/update-password.md index b17f503240..e4ddc7fc49 100644 --- a/app/sdks/js/docs/examples/account/update-password.md +++ b/app/sdks/js/docs/examples/account/update-password.md @@ -1,7 +1,7 @@ let sdk = new Appwrite(); sdk - setProject('') + .setProject('') ; let promise = sdk.account.updatePassword('password', 'password'); diff --git a/app/sdks/js/docs/examples/account/update-prefs.md b/app/sdks/js/docs/examples/account/update-prefs.md index 5e5b2f2cb7..da37ceff8e 100644 --- a/app/sdks/js/docs/examples/account/update-prefs.md +++ b/app/sdks/js/docs/examples/account/update-prefs.md @@ -1,7 +1,7 @@ let sdk = new Appwrite(); sdk - setProject('') + .setProject('') ; let promise = sdk.account.updatePrefs('{}'); diff --git a/app/sdks/js/docs/examples/auth/confirm-resend.md b/app/sdks/js/docs/examples/auth/confirm-resend.md index cddc03e830..4c66e71d93 100644 --- a/app/sdks/js/docs/examples/auth/confirm-resend.md +++ b/app/sdks/js/docs/examples/auth/confirm-resend.md @@ -1,7 +1,7 @@ let sdk = new Appwrite(); sdk - setProject('') + .setProject('') ; let promise = sdk.auth.confirmResend('https://example.com'); diff --git a/app/sdks/js/docs/examples/auth/login.md b/app/sdks/js/docs/examples/auth/login.md index 4fd35197fe..40ff7a46c6 100644 --- a/app/sdks/js/docs/examples/auth/login.md +++ b/app/sdks/js/docs/examples/auth/login.md @@ -1,7 +1,7 @@ let sdk = new Appwrite(); sdk - setProject('') + .setProject('') ; let promise = sdk.auth.login('email@example.com', 'password', 'https://example.com', 'https://example.com'); diff --git a/app/sdks/js/docs/examples/auth/logout-by-session.md b/app/sdks/js/docs/examples/auth/logout-by-session.md index 7a52d1e8eb..ba03feff4a 100644 --- a/app/sdks/js/docs/examples/auth/logout-by-session.md +++ b/app/sdks/js/docs/examples/auth/logout-by-session.md @@ -1,7 +1,7 @@ let sdk = new Appwrite(); sdk - setProject('') + .setProject('') ; let promise = sdk.auth.logoutBySession('[ID]'); diff --git a/app/sdks/js/docs/examples/auth/logout.md b/app/sdks/js/docs/examples/auth/logout.md index 43262a1a07..90f5ff4b18 100644 --- a/app/sdks/js/docs/examples/auth/logout.md +++ b/app/sdks/js/docs/examples/auth/logout.md @@ -1,7 +1,7 @@ let sdk = new Appwrite(); sdk - setProject('') + .setProject('') ; let promise = sdk.auth.logout(); diff --git a/app/sdks/js/docs/examples/auth/oauth.md b/app/sdks/js/docs/examples/auth/oauth.md index 6175c97dee..7eb7c7adca 100644 --- a/app/sdks/js/docs/examples/auth/oauth.md +++ b/app/sdks/js/docs/examples/auth/oauth.md @@ -1,7 +1,7 @@ let sdk = new Appwrite(); sdk - setProject('') + .setProject('') ; let promise = sdk.auth.oauth('bitbucket'); diff --git a/app/sdks/js/docs/examples/auth/recovery-reset.md b/app/sdks/js/docs/examples/auth/recovery-reset.md index 22ffff376b..7830eba1d6 100644 --- a/app/sdks/js/docs/examples/auth/recovery-reset.md +++ b/app/sdks/js/docs/examples/auth/recovery-reset.md @@ -1,7 +1,7 @@ let sdk = new Appwrite(); sdk - setProject('') + .setProject('') ; let promise = sdk.auth.recoveryReset('[USER_ID]', '[TOKEN]', 'password', 'password'); diff --git a/app/sdks/js/docs/examples/auth/recovery.md b/app/sdks/js/docs/examples/auth/recovery.md index 1f269ede15..a313e192f8 100644 --- a/app/sdks/js/docs/examples/auth/recovery.md +++ b/app/sdks/js/docs/examples/auth/recovery.md @@ -1,7 +1,7 @@ let sdk = new Appwrite(); sdk - setProject('') + .setProject('') ; let promise = sdk.auth.recovery('email@example.com', 'https://example.com'); diff --git a/app/sdks/js/docs/examples/auth/register.md b/app/sdks/js/docs/examples/auth/register.md index 2d8e838312..c5205f90cd 100644 --- a/app/sdks/js/docs/examples/auth/register.md +++ b/app/sdks/js/docs/examples/auth/register.md @@ -1,10 +1,10 @@ let sdk = new Appwrite(); sdk - setProject('') + .setProject('') ; -let promise = sdk.auth.register('email@example.com', 'password', 'https://example.com', 'https://example.com', 'https://example.com'); +let promise = sdk.auth.register('email@example.com', 'password', 'https://example.com'); promise.then(function (response) { console.log(response); diff --git a/app/sdks/js/docs/examples/avatars/get-browser.md b/app/sdks/js/docs/examples/avatars/get-browser.md index 4518abb399..84c992621e 100644 --- a/app/sdks/js/docs/examples/avatars/get-browser.md +++ b/app/sdks/js/docs/examples/avatars/get-browser.md @@ -1,7 +1,7 @@ let sdk = new Appwrite(); sdk - setProject('') + .setProject('') ; let promise = sdk.avatars.getBrowser('aa'); diff --git a/app/sdks/js/docs/examples/avatars/get-credit-card.md b/app/sdks/js/docs/examples/avatars/get-credit-card.md index f7daafb174..c9fb87edc7 100644 --- a/app/sdks/js/docs/examples/avatars/get-credit-card.md +++ b/app/sdks/js/docs/examples/avatars/get-credit-card.md @@ -1,7 +1,7 @@ let sdk = new Appwrite(); sdk - setProject('') + .setProject('') ; let promise = sdk.avatars.getCreditCard('amex'); diff --git a/app/sdks/js/docs/examples/avatars/get-favicon.md b/app/sdks/js/docs/examples/avatars/get-favicon.md index 3c8affe04f..5876eb2b5a 100644 --- a/app/sdks/js/docs/examples/avatars/get-favicon.md +++ b/app/sdks/js/docs/examples/avatars/get-favicon.md @@ -1,7 +1,7 @@ let sdk = new Appwrite(); sdk - setProject('') + .setProject('') ; let promise = sdk.avatars.getFavicon('https://example.com'); diff --git a/app/sdks/js/docs/examples/avatars/get-flag.md b/app/sdks/js/docs/examples/avatars/get-flag.md index feefca1535..694c6b399e 100644 --- a/app/sdks/js/docs/examples/avatars/get-flag.md +++ b/app/sdks/js/docs/examples/avatars/get-flag.md @@ -1,7 +1,7 @@ let sdk = new Appwrite(); sdk - setProject('') + .setProject('') ; let promise = sdk.avatars.getFlag('af'); diff --git a/app/sdks/js/docs/examples/avatars/get-image.md b/app/sdks/js/docs/examples/avatars/get-image.md index 2fb152d05a..b807ff734e 100644 --- a/app/sdks/js/docs/examples/avatars/get-image.md +++ b/app/sdks/js/docs/examples/avatars/get-image.md @@ -1,7 +1,7 @@ let sdk = new Appwrite(); sdk - setProject('') + .setProject('') ; let promise = sdk.avatars.getImage('https://example.com'); diff --git a/app/sdks/js/docs/examples/avatars/get-q-r.md b/app/sdks/js/docs/examples/avatars/get-q-r.md index ae6d9aaaa4..e64d83a5c4 100644 --- a/app/sdks/js/docs/examples/avatars/get-q-r.md +++ b/app/sdks/js/docs/examples/avatars/get-q-r.md @@ -1,7 +1,7 @@ let sdk = new Appwrite(); sdk - setProject('') + .setProject('') ; let promise = sdk.avatars.getQR('[TEXT]'); diff --git a/app/sdks/js/docs/examples/database/create-collection.md b/app/sdks/js/docs/examples/database/create-collection.md index 2d05b3273e..f1dbd4a9aa 100644 --- a/app/sdks/js/docs/examples/database/create-collection.md +++ b/app/sdks/js/docs/examples/database/create-collection.md @@ -1,7 +1,7 @@ let sdk = new Appwrite(); sdk - setProject('') + .setProject('') ; let promise = sdk.database.createCollection('[NAME]'); diff --git a/app/sdks/js/docs/examples/database/create-document.md b/app/sdks/js/docs/examples/database/create-document.md index 5ea31c39fe..00bf9e9f85 100644 --- a/app/sdks/js/docs/examples/database/create-document.md +++ b/app/sdks/js/docs/examples/database/create-document.md @@ -1,7 +1,7 @@ let sdk = new Appwrite(); sdk - setProject('') + .setProject('') ; let promise = sdk.database.createDocument('[COLLECTION_ID]', '{}'); diff --git a/app/sdks/js/docs/examples/database/delete-collection.md b/app/sdks/js/docs/examples/database/delete-collection.md index 8793d6c624..1a116c58b9 100644 --- a/app/sdks/js/docs/examples/database/delete-collection.md +++ b/app/sdks/js/docs/examples/database/delete-collection.md @@ -1,7 +1,7 @@ let sdk = new Appwrite(); sdk - setProject('') + .setProject('') ; let promise = sdk.database.deleteCollection('[COLLECTION_ID]'); diff --git a/app/sdks/js/docs/examples/database/delete-document.md b/app/sdks/js/docs/examples/database/delete-document.md index 5c94c02f30..7dd7fc4db4 100644 --- a/app/sdks/js/docs/examples/database/delete-document.md +++ b/app/sdks/js/docs/examples/database/delete-document.md @@ -1,7 +1,7 @@ let sdk = new Appwrite(); sdk - setProject('') + .setProject('') ; let promise = sdk.database.deleteDocument('[COLLECTION_ID]', '[DOCUMENT_ID]'); diff --git a/app/sdks/js/docs/examples/database/get-collection.md b/app/sdks/js/docs/examples/database/get-collection.md index d833845dfb..abe8d482d4 100644 --- a/app/sdks/js/docs/examples/database/get-collection.md +++ b/app/sdks/js/docs/examples/database/get-collection.md @@ -1,7 +1,7 @@ let sdk = new Appwrite(); sdk - setProject('') + .setProject('') ; let promise = sdk.database.getCollection('[COLLECTION_ID]'); diff --git a/app/sdks/js/docs/examples/database/get-document.md b/app/sdks/js/docs/examples/database/get-document.md index 945037a1c5..1bcb5b00ac 100644 --- a/app/sdks/js/docs/examples/database/get-document.md +++ b/app/sdks/js/docs/examples/database/get-document.md @@ -1,7 +1,7 @@ let sdk = new Appwrite(); sdk - setProject('') + .setProject('') ; let promise = sdk.database.getDocument('[COLLECTION_ID]', '[DOCUMENT_ID]'); diff --git a/app/sdks/js/docs/examples/database/list-collections.md b/app/sdks/js/docs/examples/database/list-collections.md index 2d7e064f93..3160903309 100644 --- a/app/sdks/js/docs/examples/database/list-collections.md +++ b/app/sdks/js/docs/examples/database/list-collections.md @@ -1,7 +1,7 @@ let sdk = new Appwrite(); sdk - setProject('') + .setProject('') ; let promise = sdk.database.listCollections(); diff --git a/app/sdks/js/docs/examples/database/list-documents.md b/app/sdks/js/docs/examples/database/list-documents.md index 832da0c389..68ce8d6c23 100644 --- a/app/sdks/js/docs/examples/database/list-documents.md +++ b/app/sdks/js/docs/examples/database/list-documents.md @@ -1,7 +1,7 @@ let sdk = new Appwrite(); sdk - setProject('') + .setProject('') ; let promise = sdk.database.listDocuments('[COLLECTION_ID]'); diff --git a/app/sdks/js/docs/examples/database/update-collection.md b/app/sdks/js/docs/examples/database/update-collection.md index 32ed377d7e..547d554e7f 100644 --- a/app/sdks/js/docs/examples/database/update-collection.md +++ b/app/sdks/js/docs/examples/database/update-collection.md @@ -1,7 +1,7 @@ let sdk = new Appwrite(); sdk - setProject('') + .setProject('') ; let promise = sdk.database.updateCollection('[COLLECTION_ID]', '[NAME]'); diff --git a/app/sdks/js/docs/examples/database/update-document.md b/app/sdks/js/docs/examples/database/update-document.md index ec096cf3b4..3790154d19 100644 --- a/app/sdks/js/docs/examples/database/update-document.md +++ b/app/sdks/js/docs/examples/database/update-document.md @@ -1,7 +1,7 @@ let sdk = new Appwrite(); sdk - setProject('') + .setProject('') ; let promise = sdk.database.updateDocument('[COLLECTION_ID]', '[DOCUMENT_ID]', '{}'); diff --git a/app/sdks/js/docs/examples/locale/get-countries-e-u.md b/app/sdks/js/docs/examples/locale/get-countries-e-u.md index c41c5a1cc2..44ceffd7e7 100644 --- a/app/sdks/js/docs/examples/locale/get-countries-e-u.md +++ b/app/sdks/js/docs/examples/locale/get-countries-e-u.md @@ -1,7 +1,7 @@ let sdk = new Appwrite(); sdk - setProject('') + .setProject('') ; let promise = sdk.locale.getCountriesEU(); diff --git a/app/sdks/js/docs/examples/locale/get-countries-phones.md b/app/sdks/js/docs/examples/locale/get-countries-phones.md index 455759e241..afd084f5d4 100644 --- a/app/sdks/js/docs/examples/locale/get-countries-phones.md +++ b/app/sdks/js/docs/examples/locale/get-countries-phones.md @@ -1,7 +1,7 @@ let sdk = new Appwrite(); sdk - setProject('') + .setProject('') ; let promise = sdk.locale.getCountriesPhones(); diff --git a/app/sdks/js/docs/examples/locale/get-countries.md b/app/sdks/js/docs/examples/locale/get-countries.md index 930dcba0de..521195bfaa 100644 --- a/app/sdks/js/docs/examples/locale/get-countries.md +++ b/app/sdks/js/docs/examples/locale/get-countries.md @@ -1,7 +1,7 @@ let sdk = new Appwrite(); sdk - setProject('') + .setProject('') ; let promise = sdk.locale.getCountries(); diff --git a/app/sdks/js/docs/examples/locale/get-currencies.md b/app/sdks/js/docs/examples/locale/get-currencies.md index b8e19970b3..8032307f86 100644 --- a/app/sdks/js/docs/examples/locale/get-currencies.md +++ b/app/sdks/js/docs/examples/locale/get-currencies.md @@ -1,7 +1,7 @@ let sdk = new Appwrite(); sdk - setProject('') + .setProject('') ; let promise = sdk.locale.getCurrencies(); diff --git a/app/sdks/js/docs/examples/locale/get-locale.md b/app/sdks/js/docs/examples/locale/get-locale.md index 31f8a48ffe..4cc5a3f3b2 100644 --- a/app/sdks/js/docs/examples/locale/get-locale.md +++ b/app/sdks/js/docs/examples/locale/get-locale.md @@ -1,7 +1,7 @@ let sdk = new Appwrite(); sdk - setProject('') + .setProject('') ; let promise = sdk.locale.getLocale(); diff --git a/app/sdks/js/docs/examples/projects/create-key.md b/app/sdks/js/docs/examples/projects/create-key.md index 4c9426f986..3c12c8a8c2 100644 --- a/app/sdks/js/docs/examples/projects/create-key.md +++ b/app/sdks/js/docs/examples/projects/create-key.md @@ -1,7 +1,7 @@ let sdk = new Appwrite(); sdk - setProject('') + .setProject('') ; let promise = sdk.projects.createKey('[PROJECT_ID]', '[NAME]', []); diff --git a/app/sdks/js/docs/examples/projects/create-platform.md b/app/sdks/js/docs/examples/projects/create-platform.md index e94d19f442..b67b84ba56 100644 --- a/app/sdks/js/docs/examples/projects/create-platform.md +++ b/app/sdks/js/docs/examples/projects/create-platform.md @@ -1,7 +1,7 @@ let sdk = new Appwrite(); sdk - setProject('') + .setProject('') ; let promise = sdk.projects.createPlatform('[PROJECT_ID]', 'web', '[NAME]'); diff --git a/app/sdks/js/docs/examples/projects/create-project.md b/app/sdks/js/docs/examples/projects/create-project.md index 6db14f8dd6..a1b6922fed 100644 --- a/app/sdks/js/docs/examples/projects/create-project.md +++ b/app/sdks/js/docs/examples/projects/create-project.md @@ -1,7 +1,7 @@ let sdk = new Appwrite(); sdk - setProject('') + .setProject('') ; let promise = sdk.projects.createProject('[NAME]', '[TEAM_ID]'); diff --git a/app/sdks/js/docs/examples/projects/create-task.md b/app/sdks/js/docs/examples/projects/create-task.md index 5e50e25bc5..4338198465 100644 --- a/app/sdks/js/docs/examples/projects/create-task.md +++ b/app/sdks/js/docs/examples/projects/create-task.md @@ -1,10 +1,10 @@ let sdk = new Appwrite(); sdk - setProject('') + .setProject('') ; -let promise = sdk.projects.createTask('[PROJECT_ID]', '[NAME]', 'play', '', 0, 'GET', 'https://example.com'); +let promise = sdk.projects.createTask('[PROJECT_ID]', '[NAME]', 'play', '', 1, 'GET', 'https://example.com'); promise.then(function (response) { console.log(response); diff --git a/app/sdks/js/docs/examples/projects/create-webhook.md b/app/sdks/js/docs/examples/projects/create-webhook.md index 0596c8fe3e..66a76c26c2 100644 --- a/app/sdks/js/docs/examples/projects/create-webhook.md +++ b/app/sdks/js/docs/examples/projects/create-webhook.md @@ -1,7 +1,7 @@ let sdk = new Appwrite(); sdk - setProject('') + .setProject('') ; let promise = sdk.projects.createWebhook('[PROJECT_ID]', '[NAME]', [], '[URL]', 0); diff --git a/app/sdks/js/docs/examples/projects/delete-key.md b/app/sdks/js/docs/examples/projects/delete-key.md index e1bd06c1dc..e5ae8e426c 100644 --- a/app/sdks/js/docs/examples/projects/delete-key.md +++ b/app/sdks/js/docs/examples/projects/delete-key.md @@ -1,7 +1,7 @@ let sdk = new Appwrite(); sdk - setProject('') + .setProject('') ; let promise = sdk.projects.deleteKey('[PROJECT_ID]', '[KEY_ID]'); diff --git a/app/sdks/js/docs/examples/projects/delete-platform.md b/app/sdks/js/docs/examples/projects/delete-platform.md index 949811151a..450f9cd0a6 100644 --- a/app/sdks/js/docs/examples/projects/delete-platform.md +++ b/app/sdks/js/docs/examples/projects/delete-platform.md @@ -1,7 +1,7 @@ let sdk = new Appwrite(); sdk - setProject('') + .setProject('') ; let promise = sdk.projects.deletePlatform('[PROJECT_ID]', '[PLATFORM_ID]'); diff --git a/app/sdks/js/docs/examples/projects/delete-project.md b/app/sdks/js/docs/examples/projects/delete-project.md index 55de197c18..b60d4de3c9 100644 --- a/app/sdks/js/docs/examples/projects/delete-project.md +++ b/app/sdks/js/docs/examples/projects/delete-project.md @@ -1,7 +1,7 @@ let sdk = new Appwrite(); sdk - setProject('') + .setProject('') ; let promise = sdk.projects.deleteProject('[PROJECT_ID]'); diff --git a/app/sdks/js/docs/examples/projects/delete-task.md b/app/sdks/js/docs/examples/projects/delete-task.md index 03946a9b4a..3208d38bf8 100644 --- a/app/sdks/js/docs/examples/projects/delete-task.md +++ b/app/sdks/js/docs/examples/projects/delete-task.md @@ -1,7 +1,7 @@ let sdk = new Appwrite(); sdk - setProject('') + .setProject('') ; let promise = sdk.projects.deleteTask('[PROJECT_ID]', '[TASK_ID]'); diff --git a/app/sdks/js/docs/examples/projects/delete-webhook.md b/app/sdks/js/docs/examples/projects/delete-webhook.md index 56b2740990..030a3b77f1 100644 --- a/app/sdks/js/docs/examples/projects/delete-webhook.md +++ b/app/sdks/js/docs/examples/projects/delete-webhook.md @@ -1,7 +1,7 @@ let sdk = new Appwrite(); sdk - setProject('') + .setProject('') ; let promise = sdk.projects.deleteWebhook('[PROJECT_ID]', '[WEBHOOK_ID]'); diff --git a/app/sdks/js/docs/examples/projects/get-key.md b/app/sdks/js/docs/examples/projects/get-key.md index 969f749afb..7207b33bf7 100644 --- a/app/sdks/js/docs/examples/projects/get-key.md +++ b/app/sdks/js/docs/examples/projects/get-key.md @@ -1,7 +1,7 @@ let sdk = new Appwrite(); sdk - setProject('') + .setProject('') ; let promise = sdk.projects.getKey('[PROJECT_ID]', '[KEY_ID]'); diff --git a/app/sdks/js/docs/examples/projects/get-platform.md b/app/sdks/js/docs/examples/projects/get-platform.md index ae71adce7b..6f353f3aca 100644 --- a/app/sdks/js/docs/examples/projects/get-platform.md +++ b/app/sdks/js/docs/examples/projects/get-platform.md @@ -1,7 +1,7 @@ let sdk = new Appwrite(); sdk - setProject('') + .setProject('') ; let promise = sdk.projects.getPlatform('[PROJECT_ID]', '[PLATFORM_ID]'); diff --git a/app/sdks/js/docs/examples/projects/get-project-usage.md b/app/sdks/js/docs/examples/projects/get-project-usage.md index ce928cfd5b..87a2e3148a 100644 --- a/app/sdks/js/docs/examples/projects/get-project-usage.md +++ b/app/sdks/js/docs/examples/projects/get-project-usage.md @@ -1,7 +1,7 @@ let sdk = new Appwrite(); sdk - setProject('') + .setProject('') ; let promise = sdk.projects.getProjectUsage('[PROJECT_ID]'); diff --git a/app/sdks/js/docs/examples/projects/get-project.md b/app/sdks/js/docs/examples/projects/get-project.md index 35e1bf8ea6..084e48c253 100644 --- a/app/sdks/js/docs/examples/projects/get-project.md +++ b/app/sdks/js/docs/examples/projects/get-project.md @@ -1,7 +1,7 @@ let sdk = new Appwrite(); sdk - setProject('') + .setProject('') ; let promise = sdk.projects.getProject('[PROJECT_ID]'); diff --git a/app/sdks/js/docs/examples/projects/get-task.md b/app/sdks/js/docs/examples/projects/get-task.md index aed837873e..e5195bce8c 100644 --- a/app/sdks/js/docs/examples/projects/get-task.md +++ b/app/sdks/js/docs/examples/projects/get-task.md @@ -1,7 +1,7 @@ let sdk = new Appwrite(); sdk - setProject('') + .setProject('') ; let promise = sdk.projects.getTask('[PROJECT_ID]', '[TASK_ID]'); diff --git a/app/sdks/js/docs/examples/projects/get-webhook.md b/app/sdks/js/docs/examples/projects/get-webhook.md index a596012fd7..a2b6089c3e 100644 --- a/app/sdks/js/docs/examples/projects/get-webhook.md +++ b/app/sdks/js/docs/examples/projects/get-webhook.md @@ -1,7 +1,7 @@ let sdk = new Appwrite(); sdk - setProject('') + .setProject('') ; let promise = sdk.projects.getWebhook('[PROJECT_ID]', '[WEBHOOK_ID]'); diff --git a/app/sdks/js/docs/examples/projects/list-keys.md b/app/sdks/js/docs/examples/projects/list-keys.md index 112a95dba3..14ef64fb6f 100644 --- a/app/sdks/js/docs/examples/projects/list-keys.md +++ b/app/sdks/js/docs/examples/projects/list-keys.md @@ -1,7 +1,7 @@ let sdk = new Appwrite(); sdk - setProject('') + .setProject('') ; let promise = sdk.projects.listKeys('[PROJECT_ID]'); diff --git a/app/sdks/js/docs/examples/projects/list-platforms.md b/app/sdks/js/docs/examples/projects/list-platforms.md index 363b22f996..7cfd9341a7 100644 --- a/app/sdks/js/docs/examples/projects/list-platforms.md +++ b/app/sdks/js/docs/examples/projects/list-platforms.md @@ -1,7 +1,7 @@ let sdk = new Appwrite(); sdk - setProject('') + .setProject('') ; let promise = sdk.projects.listPlatforms('[PROJECT_ID]'); diff --git a/app/sdks/js/docs/examples/projects/list-projects.md b/app/sdks/js/docs/examples/projects/list-projects.md index 291adf6e57..3ba3afc41e 100644 --- a/app/sdks/js/docs/examples/projects/list-projects.md +++ b/app/sdks/js/docs/examples/projects/list-projects.md @@ -1,7 +1,7 @@ let sdk = new Appwrite(); sdk - setProject('') + .setProject('') ; let promise = sdk.projects.listProjects(); diff --git a/app/sdks/js/docs/examples/projects/list-tasks.md b/app/sdks/js/docs/examples/projects/list-tasks.md index d790139486..fd8ab61ffa 100644 --- a/app/sdks/js/docs/examples/projects/list-tasks.md +++ b/app/sdks/js/docs/examples/projects/list-tasks.md @@ -1,7 +1,7 @@ let sdk = new Appwrite(); sdk - setProject('') + .setProject('') ; let promise = sdk.projects.listTasks('[PROJECT_ID]'); diff --git a/app/sdks/js/docs/examples/projects/list-webhooks.md b/app/sdks/js/docs/examples/projects/list-webhooks.md index 77a6006d50..b19851c8b1 100644 --- a/app/sdks/js/docs/examples/projects/list-webhooks.md +++ b/app/sdks/js/docs/examples/projects/list-webhooks.md @@ -1,7 +1,7 @@ let sdk = new Appwrite(); sdk - setProject('') + .setProject('') ; let promise = sdk.projects.listWebhooks('[PROJECT_ID]'); diff --git a/app/sdks/js/docs/examples/projects/update-key.md b/app/sdks/js/docs/examples/projects/update-key.md index 576a98d2da..063f4daea4 100644 --- a/app/sdks/js/docs/examples/projects/update-key.md +++ b/app/sdks/js/docs/examples/projects/update-key.md @@ -1,7 +1,7 @@ let sdk = new Appwrite(); sdk - setProject('') + .setProject('') ; let promise = sdk.projects.updateKey('[PROJECT_ID]', '[KEY_ID]', '[NAME]', []); diff --git a/app/sdks/js/docs/examples/projects/update-platform.md b/app/sdks/js/docs/examples/projects/update-platform.md index 035726bb89..e28846f050 100644 --- a/app/sdks/js/docs/examples/projects/update-platform.md +++ b/app/sdks/js/docs/examples/projects/update-platform.md @@ -1,7 +1,7 @@ let sdk = new Appwrite(); sdk - setProject('') + .setProject('') ; let promise = sdk.projects.updatePlatform('[PROJECT_ID]', '[PLATFORM_ID]', '[NAME]'); diff --git a/app/sdks/js/docs/examples/projects/update-project-o-auth.md b/app/sdks/js/docs/examples/projects/update-project-o-auth.md index 8a70dd5e03..9ab78a4ea9 100644 --- a/app/sdks/js/docs/examples/projects/update-project-o-auth.md +++ b/app/sdks/js/docs/examples/projects/update-project-o-auth.md @@ -1,7 +1,7 @@ let sdk = new Appwrite(); sdk - setProject('') + .setProject('') ; let promise = sdk.projects.updateProjectOAuth('[PROJECT_ID]', 'bitbucket'); diff --git a/app/sdks/js/docs/examples/projects/update-project.md b/app/sdks/js/docs/examples/projects/update-project.md index e2ef996887..6fcaa49f37 100644 --- a/app/sdks/js/docs/examples/projects/update-project.md +++ b/app/sdks/js/docs/examples/projects/update-project.md @@ -1,7 +1,7 @@ let sdk = new Appwrite(); sdk - setProject('') + .setProject('') ; let promise = sdk.projects.updateProject('[PROJECT_ID]', '[NAME]'); diff --git a/app/sdks/js/docs/examples/projects/update-task.md b/app/sdks/js/docs/examples/projects/update-task.md index c81a0a2781..3544916e3b 100644 --- a/app/sdks/js/docs/examples/projects/update-task.md +++ b/app/sdks/js/docs/examples/projects/update-task.md @@ -1,10 +1,10 @@ let sdk = new Appwrite(); sdk - setProject('') + .setProject('') ; -let promise = sdk.projects.updateTask('[PROJECT_ID]', '[TASK_ID]', '[NAME]', 'play', '', 0, 'GET', 'https://example.com'); +let promise = sdk.projects.updateTask('[PROJECT_ID]', '[TASK_ID]', '[NAME]', 'play', '', 1, 'GET', 'https://example.com'); promise.then(function (response) { console.log(response); diff --git a/app/sdks/js/docs/examples/projects/update-webhook.md b/app/sdks/js/docs/examples/projects/update-webhook.md index aa133aefc0..f580952533 100644 --- a/app/sdks/js/docs/examples/projects/update-webhook.md +++ b/app/sdks/js/docs/examples/projects/update-webhook.md @@ -1,7 +1,7 @@ let sdk = new Appwrite(); sdk - setProject('') + .setProject('') ; let promise = sdk.projects.updateWebhook('[PROJECT_ID]', '[WEBHOOK_ID]', '[NAME]', [], '[URL]', 1); diff --git a/app/sdks/js/docs/examples/storage/create-file.md b/app/sdks/js/docs/examples/storage/create-file.md index 75703db87d..7869e8348b 100644 --- a/app/sdks/js/docs/examples/storage/create-file.md +++ b/app/sdks/js/docs/examples/storage/create-file.md @@ -1,7 +1,7 @@ let sdk = new Appwrite(); sdk - setProject('') + .setProject('') ; let promise = sdk.storage.createFile(document.getElementById('uploader').files[0]); diff --git a/app/sdks/js/docs/examples/storage/delete-file.md b/app/sdks/js/docs/examples/storage/delete-file.md index b5291ef353..4e39bd9811 100644 --- a/app/sdks/js/docs/examples/storage/delete-file.md +++ b/app/sdks/js/docs/examples/storage/delete-file.md @@ -1,7 +1,7 @@ let sdk = new Appwrite(); sdk - setProject('') + .setProject('') ; let promise = sdk.storage.deleteFile('[FILE_ID]'); diff --git a/app/sdks/js/docs/examples/storage/get-file-download.md b/app/sdks/js/docs/examples/storage/get-file-download.md index 3e5d5efa2a..a53142184c 100644 --- a/app/sdks/js/docs/examples/storage/get-file-download.md +++ b/app/sdks/js/docs/examples/storage/get-file-download.md @@ -1,7 +1,7 @@ let sdk = new Appwrite(); sdk - setProject('') + .setProject('') ; let promise = sdk.storage.getFileDownload('[FILE_ID]'); diff --git a/app/sdks/js/docs/examples/storage/get-file-preview.md b/app/sdks/js/docs/examples/storage/get-file-preview.md index 362f2efa77..1cce3acd24 100644 --- a/app/sdks/js/docs/examples/storage/get-file-preview.md +++ b/app/sdks/js/docs/examples/storage/get-file-preview.md @@ -1,7 +1,7 @@ let sdk = new Appwrite(); sdk - setProject('') + .setProject('') ; let promise = sdk.storage.getFilePreview('[FILE_ID]'); diff --git a/app/sdks/js/docs/examples/storage/get-file-view.md b/app/sdks/js/docs/examples/storage/get-file-view.md index 7813693f9d..4844b22ce3 100644 --- a/app/sdks/js/docs/examples/storage/get-file-view.md +++ b/app/sdks/js/docs/examples/storage/get-file-view.md @@ -1,7 +1,7 @@ let sdk = new Appwrite(); sdk - setProject('') + .setProject('') ; let promise = sdk.storage.getFileView('[FILE_ID]'); diff --git a/app/sdks/js/docs/examples/storage/get-file.md b/app/sdks/js/docs/examples/storage/get-file.md index 7ebd418823..32b11a2175 100644 --- a/app/sdks/js/docs/examples/storage/get-file.md +++ b/app/sdks/js/docs/examples/storage/get-file.md @@ -1,7 +1,7 @@ let sdk = new Appwrite(); sdk - setProject('') + .setProject('') ; let promise = sdk.storage.getFile('[FILE_ID]'); diff --git a/app/sdks/js/docs/examples/storage/list-files.md b/app/sdks/js/docs/examples/storage/list-files.md index 25a9ca3517..0033bb254d 100644 --- a/app/sdks/js/docs/examples/storage/list-files.md +++ b/app/sdks/js/docs/examples/storage/list-files.md @@ -1,7 +1,7 @@ let sdk = new Appwrite(); sdk - setProject('') + .setProject('') ; let promise = sdk.storage.listFiles(); diff --git a/app/sdks/js/docs/examples/storage/update-file.md b/app/sdks/js/docs/examples/storage/update-file.md index a238589394..30380a0fbd 100644 --- a/app/sdks/js/docs/examples/storage/update-file.md +++ b/app/sdks/js/docs/examples/storage/update-file.md @@ -1,7 +1,7 @@ let sdk = new Appwrite(); sdk - setProject('') + .setProject('') ; let promise = sdk.storage.updateFile('[FILE_ID]'); diff --git a/app/sdks/js/docs/examples/teams/create-team-membership-resend.md b/app/sdks/js/docs/examples/teams/create-team-membership-resend.md index 415c3bf49c..03ac8240a9 100644 --- a/app/sdks/js/docs/examples/teams/create-team-membership-resend.md +++ b/app/sdks/js/docs/examples/teams/create-team-membership-resend.md @@ -1,7 +1,7 @@ let sdk = new Appwrite(); sdk - setProject('') + .setProject('') ; let promise = sdk.teams.createTeamMembershipResend('[TEAM_ID]', '[INVITE_ID]', 'https://example.com'); diff --git a/app/sdks/js/docs/examples/teams/create-team-membership.md b/app/sdks/js/docs/examples/teams/create-team-membership.md index 2b786589ab..60f996c209 100644 --- a/app/sdks/js/docs/examples/teams/create-team-membership.md +++ b/app/sdks/js/docs/examples/teams/create-team-membership.md @@ -1,7 +1,7 @@ let sdk = new Appwrite(); sdk - setProject('') + .setProject('') ; let promise = sdk.teams.createTeamMembership('[TEAM_ID]', 'email@example.com', [], 'https://example.com'); diff --git a/app/sdks/js/docs/examples/teams/create-team.md b/app/sdks/js/docs/examples/teams/create-team.md index 525c48571e..2dafeac2ab 100644 --- a/app/sdks/js/docs/examples/teams/create-team.md +++ b/app/sdks/js/docs/examples/teams/create-team.md @@ -1,7 +1,7 @@ let sdk = new Appwrite(); sdk - setProject('') + .setProject('') ; let promise = sdk.teams.createTeam('[NAME]'); diff --git a/app/sdks/js/docs/examples/teams/delete-team-membership.md b/app/sdks/js/docs/examples/teams/delete-team-membership.md index d8a3df1b98..551dfd7dbb 100644 --- a/app/sdks/js/docs/examples/teams/delete-team-membership.md +++ b/app/sdks/js/docs/examples/teams/delete-team-membership.md @@ -1,7 +1,7 @@ let sdk = new Appwrite(); sdk - setProject('') + .setProject('') ; let promise = sdk.teams.deleteTeamMembership('[TEAM_ID]', '[INVITE_ID]'); diff --git a/app/sdks/js/docs/examples/teams/delete-team.md b/app/sdks/js/docs/examples/teams/delete-team.md index 5c3c46e994..3f9cd8b6f5 100644 --- a/app/sdks/js/docs/examples/teams/delete-team.md +++ b/app/sdks/js/docs/examples/teams/delete-team.md @@ -1,7 +1,7 @@ let sdk = new Appwrite(); sdk - setProject('') + .setProject('') ; let promise = sdk.teams.deleteTeam('[TEAM_ID]'); diff --git a/app/sdks/js/docs/examples/teams/get-team-members.md b/app/sdks/js/docs/examples/teams/get-team-members.md index 8e1cc217be..f1ba5d9f4a 100644 --- a/app/sdks/js/docs/examples/teams/get-team-members.md +++ b/app/sdks/js/docs/examples/teams/get-team-members.md @@ -1,7 +1,7 @@ let sdk = new Appwrite(); sdk - setProject('') + .setProject('') ; let promise = sdk.teams.getTeamMembers('[TEAM_ID]'); diff --git a/app/sdks/js/docs/examples/teams/get-team.md b/app/sdks/js/docs/examples/teams/get-team.md index 61b5c39ce8..7e1f8254fe 100644 --- a/app/sdks/js/docs/examples/teams/get-team.md +++ b/app/sdks/js/docs/examples/teams/get-team.md @@ -1,7 +1,7 @@ let sdk = new Appwrite(); sdk - setProject('') + .setProject('') ; let promise = sdk.teams.getTeam('[TEAM_ID]'); diff --git a/app/sdks/js/docs/examples/teams/list-teams.md b/app/sdks/js/docs/examples/teams/list-teams.md index 7443ba5ccc..abd4fa420b 100644 --- a/app/sdks/js/docs/examples/teams/list-teams.md +++ b/app/sdks/js/docs/examples/teams/list-teams.md @@ -1,7 +1,7 @@ let sdk = new Appwrite(); sdk - setProject('') + .setProject('') ; let promise = sdk.teams.listTeams(); diff --git a/app/sdks/js/docs/examples/teams/update-team-membership-status.md b/app/sdks/js/docs/examples/teams/update-team-membership-status.md index 5f725d2c8b..15eb72524b 100644 --- a/app/sdks/js/docs/examples/teams/update-team-membership-status.md +++ b/app/sdks/js/docs/examples/teams/update-team-membership-status.md @@ -1,7 +1,7 @@ let sdk = new Appwrite(); sdk - setProject('') + .setProject('') ; let promise = sdk.teams.updateTeamMembershipStatus('[TEAM_ID]', '[INVITE_ID]', '[USER_ID]', '[SECRET]'); diff --git a/app/sdks/js/docs/examples/teams/update-team.md b/app/sdks/js/docs/examples/teams/update-team.md index 6d1b8e74ca..2ec35ec906 100644 --- a/app/sdks/js/docs/examples/teams/update-team.md +++ b/app/sdks/js/docs/examples/teams/update-team.md @@ -1,7 +1,7 @@ let sdk = new Appwrite(); sdk - setProject('') + .setProject('') ; let promise = sdk.teams.updateTeam('[TEAM_ID]', '[NAME]'); diff --git a/app/sdks/js/docs/examples/users/create-user.md b/app/sdks/js/docs/examples/users/create-user.md index 83b5e4c609..1242fe70c2 100644 --- a/app/sdks/js/docs/examples/users/create-user.md +++ b/app/sdks/js/docs/examples/users/create-user.md @@ -1,7 +1,7 @@ let sdk = new Appwrite(); sdk - setProject('') + .setProject('') ; let promise = sdk.users.createUser('email@example.com', 'password'); diff --git a/app/sdks/js/docs/examples/users/delete-user-sessions.md b/app/sdks/js/docs/examples/users/delete-user-sessions.md index c2cbdf8d63..1a6851ce15 100644 --- a/app/sdks/js/docs/examples/users/delete-user-sessions.md +++ b/app/sdks/js/docs/examples/users/delete-user-sessions.md @@ -1,7 +1,7 @@ let sdk = new Appwrite(); sdk - setProject('') + .setProject('') ; let promise = sdk.users.deleteUserSessions('[USER_ID]'); diff --git a/app/sdks/js/docs/examples/users/delete-users-session.md b/app/sdks/js/docs/examples/users/delete-users-session.md index b97cc8b10e..5eac7e2236 100644 --- a/app/sdks/js/docs/examples/users/delete-users-session.md +++ b/app/sdks/js/docs/examples/users/delete-users-session.md @@ -1,7 +1,7 @@ let sdk = new Appwrite(); sdk - setProject('') + .setProject('') ; let promise = sdk.users.deleteUsersSession('[USER_ID]', '[SESSION_ID]'); diff --git a/app/sdks/js/docs/examples/users/get-user-logs.md b/app/sdks/js/docs/examples/users/get-user-logs.md index a55b6e36b8..85175b0e1e 100644 --- a/app/sdks/js/docs/examples/users/get-user-logs.md +++ b/app/sdks/js/docs/examples/users/get-user-logs.md @@ -1,7 +1,7 @@ let sdk = new Appwrite(); sdk - setProject('') + .setProject('') ; let promise = sdk.users.getUserLogs('[USER_ID]'); diff --git a/app/sdks/js/docs/examples/users/get-user-prefs.md b/app/sdks/js/docs/examples/users/get-user-prefs.md index bc8540f0c5..0d9c8dbb22 100644 --- a/app/sdks/js/docs/examples/users/get-user-prefs.md +++ b/app/sdks/js/docs/examples/users/get-user-prefs.md @@ -1,7 +1,7 @@ let sdk = new Appwrite(); sdk - setProject('') + .setProject('') ; let promise = sdk.users.getUserPrefs('[USER_ID]'); diff --git a/app/sdks/js/docs/examples/users/get-user-sessions.md b/app/sdks/js/docs/examples/users/get-user-sessions.md index 213dc6acd8..8cc7b1f85b 100644 --- a/app/sdks/js/docs/examples/users/get-user-sessions.md +++ b/app/sdks/js/docs/examples/users/get-user-sessions.md @@ -1,7 +1,7 @@ let sdk = new Appwrite(); sdk - setProject('') + .setProject('') ; let promise = sdk.users.getUserSessions('[USER_ID]'); diff --git a/app/sdks/js/docs/examples/users/get-user.md b/app/sdks/js/docs/examples/users/get-user.md index f2aa43b984..feb40dff2d 100644 --- a/app/sdks/js/docs/examples/users/get-user.md +++ b/app/sdks/js/docs/examples/users/get-user.md @@ -1,7 +1,7 @@ let sdk = new Appwrite(); sdk - setProject('') + .setProject('') ; let promise = sdk.users.getUser('[USER_ID]'); diff --git a/app/sdks/js/docs/examples/users/list-users.md b/app/sdks/js/docs/examples/users/list-users.md index 5dc833054b..561826cbd1 100644 --- a/app/sdks/js/docs/examples/users/list-users.md +++ b/app/sdks/js/docs/examples/users/list-users.md @@ -1,7 +1,7 @@ let sdk = new Appwrite(); sdk - setProject('') + .setProject('') ; let promise = sdk.users.listUsers(); diff --git a/app/sdks/js/docs/examples/users/update-user-status.md b/app/sdks/js/docs/examples/users/update-user-status.md index 9f62087000..15b7376ca7 100644 --- a/app/sdks/js/docs/examples/users/update-user-status.md +++ b/app/sdks/js/docs/examples/users/update-user-status.md @@ -1,7 +1,7 @@ let sdk = new Appwrite(); sdk - setProject('') + .setProject('') ; let promise = sdk.users.updateUserStatus('[USER_ID]', '1'); diff --git a/app/sdks/js/package.json b/app/sdks/js/package.json index 94cda779b5..13499d41ed 100644 --- a/app/sdks/js/package.json +++ b/app/sdks/js/package.json @@ -2,7 +2,7 @@ "name": "appwrite", "homepage": "https://appwrite.io/support", "description": "Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs)", - "version": "1.0.21", + "version": "1.0.22", "license": "BSD-3-Clause", "main": "src/sdk.js", "repository": { diff --git a/app/sdks/js/src/sdk.js b/app/sdks/js/src/sdk.js index cbe6b03fd5..5c6d2dd8b7 100644 --- a/app/sdks/js/src/sdk.js +++ b/app/sdks/js/src/sdk.js @@ -138,7 +138,7 @@ globalParams.push({key: key, value: value}); }; - addGlobalHeader('x-sdk-version', 'appwrite:javascript:1.0.21'); + addGlobalHeader('x-sdk-version', 'appwrite:javascript:1.0.22'); addGlobalHeader('content-type', ''); /** @@ -500,11 +500,11 @@ * the only valid redirect URL's are the once from domains you have set when * added your platforms in the console interface. * - * When not using the success or failure redirect arguments this endpoint will - * result with a 200 status code and the user account object on success and - * with 401 status error on failure. This behavior was applied to help the web - * clients deal with browsers who don't allow to set 3rd party HTTP cookies - * needed for saving the account session token. + * When accessing this route using Javascript from the browser, success and + * failure parameter URLs are required. Appwrite server will respond with a + * 301 redirect status code and will set the user session cookie. This + * behavior is enforced because modern browsers are limiting 3rd party cookies + * in XHR of fetch requests to protect user privacy. * * @param {string} email * @param {string} password @@ -580,39 +580,6 @@ }); }, - /** - * OAuth Callback - * - * - * @param {string} projectId - * @param {string} provider - * @param {string} code - * @param {string} state - * @throws {Error} - * @return {Promise} */ - oauthCallback: function(projectId, provider, code, state = '') { - if(projectId === undefined) { - throw new Error('Missing required parameter: "projectId"'); - } - - if(provider === undefined) { - throw new Error('Missing required parameter: "provider"'); - } - - if(code === undefined) { - throw new Error('Missing required parameter: "code"'); - } - - let path = '/auth/oauth/callback/{provider}/{projectId}'.replace(new RegExp('{projectId}', 'g'), projectId).replace(new RegExp('{provider}', 'g'), provider); - - return http - .get(path, {'content-type': 'application/json'}, - { - 'code': code, - 'state': state - }); - }, - /** * OAuth Login * @@ -648,16 +615,16 @@ * process. * * @param {string} email - * @param {string} redirect + * @param {string} reset * @throws {Error} * @return {Promise} */ - recovery: function(email, redirect) { + recovery: function(email, reset) { if(email === undefined) { throw new Error('Missing required parameter: "email"'); } - if(redirect === undefined) { - throw new Error('Missing required parameter: "redirect"'); + if(reset === undefined) { + throw new Error('Missing required parameter: "reset"'); } let path = '/auth/recovery'; @@ -666,7 +633,7 @@ .post(path, {'content-type': 'application/json'}, { 'email': email, - 'redirect': redirect + 'reset': reset }); }, @@ -727,7 +694,7 @@ * * If registration completes successfully user will be sent with a * confirmation email in order to confirm he is the owner of the account email - * address. Use the redirect parameter to redirect the user from the + * address. Use the confirmation parameter to redirect the user from the * confirmation email back to your app. When the user is redirected, use the * /auth/confirm endpoint to complete the account confirmation. * @@ -736,21 +703,21 @@ * the only valid redirect URL's are the once from domains you have set when * added your platforms in the console interface. * - * When not using the success or failure redirect arguments this endpoint will - * result with a 200 status code and the user account object on success and - * with 401 status error on failure. This behavior was applied to help the web - * clients deal with browsers who don't allow to set 3rd party HTTP cookies - * needed for saving the account session token. + * When accessing this route using Javascript from the browser, success and + * failure parameter URLs are required. Appwrite server will respond with a + * 301 redirect status code and will set the user session cookie. This + * behavior is enforced because modern browsers are limiting 3rd party cookies + * in XHR of fetch requests to protect user privacy. * * @param {string} email * @param {string} password - * @param {string} redirect + * @param {string} confirm * @param {string} success * @param {string} failure * @param {string} name * @throws {Error} * @return {null} */ - register: function(email, password, redirect, success, failure, name = '') { + register: function(email, password, confirm, success = '', failure = '', name = '') { if(email === undefined) { throw new Error('Missing required parameter: "email"'); } @@ -759,16 +726,8 @@ throw new Error('Missing required parameter: "password"'); } - if(redirect === undefined) { - throw new Error('Missing required parameter: "redirect"'); - } - - if(success === undefined) { - throw new Error('Missing required parameter: "success"'); - } - - if(failure === undefined) { - throw new Error('Missing required parameter: "failure"'); + if(confirm === undefined) { + throw new Error('Missing required parameter: "confirm"'); } let path = '/auth/register'; @@ -776,7 +735,7 @@ return iframe('post', path, {project: config.project, 'email': email, 'password': password, - 'redirect': redirect, + 'confirm': confirm, 'success': success, 'failure': failure, 'name': name @@ -826,12 +785,12 @@ * the only valid redirect URL's are the once from domains you have set when * added your platforms in the console interface. * - * @param {string} redirect + * @param {string} confirm * @throws {Error} * @return {Promise} */ - confirmResend: function(redirect) { - if(redirect === undefined) { - throw new Error('Missing required parameter: "redirect"'); + confirmResend: function(confirm) { + if(confirm === undefined) { + throw new Error('Missing required parameter: "confirm"'); } let path = '/auth/register/confirm/resend'; @@ -839,7 +798,7 @@ return http .post(path, {'content-type': 'application/json'}, { - 'redirect': redirect + 'confirm': confirm }); } }; diff --git a/app/sdks/js/src/sdk.min.js b/app/sdks/js/src/sdk.min.js index 4d65869b69..1b8e4af978 100644 --- a/app/sdks/js/src/sdk.min.js +++ b/app/sdks/js/src/sdk.min.js @@ -1,5 +1,5 @@ (function(window){window.Appwrite=function(){let config={endpoint:'https://appwrite.test/v1',project:'',key:'',locale:'',mode:'',};let setEndpoint=function(endpoint){config.endpoint=endpoint;return this};let setProject=function(value){http.addGlobalHeader('X-Appwrite-Project',value);config.project=value;return this};let setKey=function(value){http.addGlobalHeader('X-Appwrite-Key',value);config.key=value;return this};let setLocale=function(value){http.addGlobalHeader('X-Appwrite-Locale',value);config.locale=value;return this};let setMode=function(value){http.addGlobalHeader('X-Appwrite-Mode',value);config.mode=value;return this};let http=function(document){let globalParams=[],globalHeaders=[];let addParam=function(url,param,value){let a=document.createElement('a'),regex=/(?:\?|&|&)+([^=]+)(?:=([^&]*))*/g;let match,str=[];a.href=url;param=encodeURIComponent(param);while(match=regex.exec(a.search))if(param!==match[1])str.push(match[1]+(match[2]?"="+match[2]:""));str.push(param+(value?"="+encodeURIComponent(value):""));a.search=str.join("&");return a.href};let buildQuery=function(params){let str=[];for(let p in params){if(Array.isArray(params[p])){for(let index=0;indexsetProject('') + ->setKey('') ; $account = new Account($client); diff --git a/app/sdks/php/docs/examples/account/get-prefs.md b/app/sdks/php/docs/examples/account/get-prefs.md index 7fcdb3e880..f3f6d72519 100644 --- a/app/sdks/php/docs/examples/account/get-prefs.md +++ b/app/sdks/php/docs/examples/account/get-prefs.md @@ -6,8 +6,8 @@ use Appwrite\Services\Account; $client = new Client(); $client - setProject('') - setKey('') + ->setProject('') + ->setKey('') ; $account = new Account($client); diff --git a/app/sdks/php/docs/examples/account/get-security.md b/app/sdks/php/docs/examples/account/get-security.md index 504453d88d..381d0bd755 100644 --- a/app/sdks/php/docs/examples/account/get-security.md +++ b/app/sdks/php/docs/examples/account/get-security.md @@ -6,8 +6,8 @@ use Appwrite\Services\Account; $client = new Client(); $client - setProject('') - setKey('') + ->setProject('') + ->setKey('') ; $account = new Account($client); diff --git a/app/sdks/php/docs/examples/account/get-sessions.md b/app/sdks/php/docs/examples/account/get-sessions.md index 9d3d2fcfde..8af7a7cd82 100644 --- a/app/sdks/php/docs/examples/account/get-sessions.md +++ b/app/sdks/php/docs/examples/account/get-sessions.md @@ -6,8 +6,8 @@ use Appwrite\Services\Account; $client = new Client(); $client - setProject('') - setKey('') + ->setProject('') + ->setKey('') ; $account = new Account($client); diff --git a/app/sdks/php/docs/examples/account/get.md b/app/sdks/php/docs/examples/account/get.md index 256b38e1b6..c7241e576f 100644 --- a/app/sdks/php/docs/examples/account/get.md +++ b/app/sdks/php/docs/examples/account/get.md @@ -6,8 +6,8 @@ use Appwrite\Services\Account; $client = new Client(); $client - setProject('') - setKey('') + ->setProject('') + ->setKey('') ; $account = new Account($client); diff --git a/app/sdks/php/docs/examples/account/update-email.md b/app/sdks/php/docs/examples/account/update-email.md index 1755fe1253..66cb6dff4a 100644 --- a/app/sdks/php/docs/examples/account/update-email.md +++ b/app/sdks/php/docs/examples/account/update-email.md @@ -6,8 +6,8 @@ use Appwrite\Services\Account; $client = new Client(); $client - setProject('') - setKey('') + ->setProject('') + ->setKey('') ; $account = new Account($client); diff --git a/app/sdks/php/docs/examples/account/update-name.md b/app/sdks/php/docs/examples/account/update-name.md index e9071ac4c5..068f824863 100644 --- a/app/sdks/php/docs/examples/account/update-name.md +++ b/app/sdks/php/docs/examples/account/update-name.md @@ -6,8 +6,8 @@ use Appwrite\Services\Account; $client = new Client(); $client - setProject('') - setKey('') + ->setProject('') + ->setKey('') ; $account = new Account($client); diff --git a/app/sdks/php/docs/examples/account/update-password.md b/app/sdks/php/docs/examples/account/update-password.md index 3d716cd848..124bc26dab 100644 --- a/app/sdks/php/docs/examples/account/update-password.md +++ b/app/sdks/php/docs/examples/account/update-password.md @@ -6,8 +6,8 @@ use Appwrite\Services\Account; $client = new Client(); $client - setProject('') - setKey('') + ->setProject('') + ->setKey('') ; $account = new Account($client); diff --git a/app/sdks/php/docs/examples/account/update-prefs.md b/app/sdks/php/docs/examples/account/update-prefs.md index 875b3d0a80..df73bac861 100644 --- a/app/sdks/php/docs/examples/account/update-prefs.md +++ b/app/sdks/php/docs/examples/account/update-prefs.md @@ -6,8 +6,8 @@ use Appwrite\Services\Account; $client = new Client(); $client - setProject('') - setKey('') + ->setProject('') + ->setKey('') ; $account = new Account($client); diff --git a/app/sdks/php/docs/examples/auth/confirm-resend.md b/app/sdks/php/docs/examples/auth/confirm-resend.md index 4493681f4d..643e600d2f 100644 --- a/app/sdks/php/docs/examples/auth/confirm-resend.md +++ b/app/sdks/php/docs/examples/auth/confirm-resend.md @@ -6,8 +6,8 @@ use Appwrite\Services\Auth; $client = new Client(); $client - setProject('') - setKey('') + ->setProject('') + ->setKey('') ; $auth = new Auth($client); diff --git a/app/sdks/php/docs/examples/auth/login.md b/app/sdks/php/docs/examples/auth/login.md index 596d31144d..6b50220268 100644 --- a/app/sdks/php/docs/examples/auth/login.md +++ b/app/sdks/php/docs/examples/auth/login.md @@ -6,8 +6,8 @@ use Appwrite\Services\Auth; $client = new Client(); $client - setProject('') - setKey('') + ->setProject('') + ->setKey('') ; $auth = new Auth($client); diff --git a/app/sdks/php/docs/examples/auth/logout-by-session.md b/app/sdks/php/docs/examples/auth/logout-by-session.md index 86538afa30..90a1f23fd6 100644 --- a/app/sdks/php/docs/examples/auth/logout-by-session.md +++ b/app/sdks/php/docs/examples/auth/logout-by-session.md @@ -6,8 +6,8 @@ use Appwrite\Services\Auth; $client = new Client(); $client - setProject('') - setKey('') + ->setProject('') + ->setKey('') ; $auth = new Auth($client); diff --git a/app/sdks/php/docs/examples/auth/logout.md b/app/sdks/php/docs/examples/auth/logout.md index 7eb3371628..78bd0275cc 100644 --- a/app/sdks/php/docs/examples/auth/logout.md +++ b/app/sdks/php/docs/examples/auth/logout.md @@ -6,8 +6,8 @@ use Appwrite\Services\Auth; $client = new Client(); $client - setProject('') - setKey('') + ->setProject('') + ->setKey('') ; $auth = new Auth($client); diff --git a/app/sdks/php/docs/examples/auth/oauth.md b/app/sdks/php/docs/examples/auth/oauth.md index cbb3c99ac5..4bc0a4304f 100644 --- a/app/sdks/php/docs/examples/auth/oauth.md +++ b/app/sdks/php/docs/examples/auth/oauth.md @@ -6,8 +6,8 @@ use Appwrite\Services\Auth; $client = new Client(); $client - setProject('') - setKey('') + ->setProject('') + ->setKey('') ; $auth = new Auth($client); diff --git a/app/sdks/php/docs/examples/auth/recovery-reset.md b/app/sdks/php/docs/examples/auth/recovery-reset.md index d67fa3f706..19a4d83cfc 100644 --- a/app/sdks/php/docs/examples/auth/recovery-reset.md +++ b/app/sdks/php/docs/examples/auth/recovery-reset.md @@ -6,8 +6,8 @@ use Appwrite\Services\Auth; $client = new Client(); $client - setProject('') - setKey('') + ->setProject('') + ->setKey('') ; $auth = new Auth($client); diff --git a/app/sdks/php/docs/examples/auth/recovery.md b/app/sdks/php/docs/examples/auth/recovery.md index b08a698f72..b52ddcb6ed 100644 --- a/app/sdks/php/docs/examples/auth/recovery.md +++ b/app/sdks/php/docs/examples/auth/recovery.md @@ -6,8 +6,8 @@ use Appwrite\Services\Auth; $client = new Client(); $client - setProject('') - setKey('') + ->setProject('') + ->setKey('') ; $auth = new Auth($client); diff --git a/app/sdks/php/docs/examples/auth/register.md b/app/sdks/php/docs/examples/auth/register.md index becd872b12..c34b859808 100644 --- a/app/sdks/php/docs/examples/auth/register.md +++ b/app/sdks/php/docs/examples/auth/register.md @@ -6,10 +6,10 @@ use Appwrite\Services\Auth; $client = new Client(); $client - setProject('') - setKey('') + ->setProject('') + ->setKey('') ; $auth = new Auth($client); -$result = $auth->register('email@example.com', 'password', 'https://example.com', 'https://example.com', 'https://example.com'); \ No newline at end of file +$result = $auth->register('email@example.com', 'password', 'https://example.com'); \ No newline at end of file diff --git a/app/sdks/php/docs/examples/avatars/get-browser.md b/app/sdks/php/docs/examples/avatars/get-browser.md index a5de3c4658..c9a6a6b6c0 100644 --- a/app/sdks/php/docs/examples/avatars/get-browser.md +++ b/app/sdks/php/docs/examples/avatars/get-browser.md @@ -6,8 +6,8 @@ use Appwrite\Services\Avatars; $client = new Client(); $client - setProject('') - setKey('') + ->setProject('') + ->setKey('') ; $avatars = new Avatars($client); diff --git a/app/sdks/php/docs/examples/avatars/get-credit-card.md b/app/sdks/php/docs/examples/avatars/get-credit-card.md index 3c741b0f72..206b0cc8c8 100644 --- a/app/sdks/php/docs/examples/avatars/get-credit-card.md +++ b/app/sdks/php/docs/examples/avatars/get-credit-card.md @@ -6,8 +6,8 @@ use Appwrite\Services\Avatars; $client = new Client(); $client - setProject('') - setKey('') + ->setProject('') + ->setKey('') ; $avatars = new Avatars($client); diff --git a/app/sdks/php/docs/examples/avatars/get-favicon.md b/app/sdks/php/docs/examples/avatars/get-favicon.md index 0b594b1cd5..01f28add89 100644 --- a/app/sdks/php/docs/examples/avatars/get-favicon.md +++ b/app/sdks/php/docs/examples/avatars/get-favicon.md @@ -6,8 +6,8 @@ use Appwrite\Services\Avatars; $client = new Client(); $client - setProject('') - setKey('') + ->setProject('') + ->setKey('') ; $avatars = new Avatars($client); diff --git a/app/sdks/php/docs/examples/avatars/get-flag.md b/app/sdks/php/docs/examples/avatars/get-flag.md index e43b475ea9..26740446cd 100644 --- a/app/sdks/php/docs/examples/avatars/get-flag.md +++ b/app/sdks/php/docs/examples/avatars/get-flag.md @@ -6,8 +6,8 @@ use Appwrite\Services\Avatars; $client = new Client(); $client - setProject('') - setKey('') + ->setProject('') + ->setKey('') ; $avatars = new Avatars($client); diff --git a/app/sdks/php/docs/examples/avatars/get-image.md b/app/sdks/php/docs/examples/avatars/get-image.md index 6ee73c74f1..bbbe68d2d0 100644 --- a/app/sdks/php/docs/examples/avatars/get-image.md +++ b/app/sdks/php/docs/examples/avatars/get-image.md @@ -6,8 +6,8 @@ use Appwrite\Services\Avatars; $client = new Client(); $client - setProject('') - setKey('') + ->setProject('') + ->setKey('') ; $avatars = new Avatars($client); diff --git a/app/sdks/php/docs/examples/avatars/get-q-r.md b/app/sdks/php/docs/examples/avatars/get-q-r.md index 6ca4b9ea19..e10ec33d59 100644 --- a/app/sdks/php/docs/examples/avatars/get-q-r.md +++ b/app/sdks/php/docs/examples/avatars/get-q-r.md @@ -6,8 +6,8 @@ use Appwrite\Services\Avatars; $client = new Client(); $client - setProject('') - setKey('') + ->setProject('') + ->setKey('') ; $avatars = new Avatars($client); diff --git a/app/sdks/php/docs/examples/database/create-collection.md b/app/sdks/php/docs/examples/database/create-collection.md index e1c8c5ecb1..dc964674c1 100644 --- a/app/sdks/php/docs/examples/database/create-collection.md +++ b/app/sdks/php/docs/examples/database/create-collection.md @@ -6,8 +6,8 @@ use Appwrite\Services\Database; $client = new Client(); $client - setProject('') - setKey('') + ->setProject('') + ->setKey('') ; $database = new Database($client); diff --git a/app/sdks/php/docs/examples/database/create-document.md b/app/sdks/php/docs/examples/database/create-document.md index 7d89f05c66..fc40836c0d 100644 --- a/app/sdks/php/docs/examples/database/create-document.md +++ b/app/sdks/php/docs/examples/database/create-document.md @@ -6,8 +6,8 @@ use Appwrite\Services\Database; $client = new Client(); $client - setProject('') - setKey('') + ->setProject('') + ->setKey('') ; $database = new Database($client); diff --git a/app/sdks/php/docs/examples/database/delete-collection.md b/app/sdks/php/docs/examples/database/delete-collection.md index bf1ab48811..2319d52c57 100644 --- a/app/sdks/php/docs/examples/database/delete-collection.md +++ b/app/sdks/php/docs/examples/database/delete-collection.md @@ -6,8 +6,8 @@ use Appwrite\Services\Database; $client = new Client(); $client - setProject('') - setKey('') + ->setProject('') + ->setKey('') ; $database = new Database($client); diff --git a/app/sdks/php/docs/examples/database/delete-document.md b/app/sdks/php/docs/examples/database/delete-document.md index c81833f498..b364e0bcd5 100644 --- a/app/sdks/php/docs/examples/database/delete-document.md +++ b/app/sdks/php/docs/examples/database/delete-document.md @@ -6,8 +6,8 @@ use Appwrite\Services\Database; $client = new Client(); $client - setProject('') - setKey('') + ->setProject('') + ->setKey('') ; $database = new Database($client); diff --git a/app/sdks/php/docs/examples/database/get-collection.md b/app/sdks/php/docs/examples/database/get-collection.md index 35a18dea1d..9daa61ddfc 100644 --- a/app/sdks/php/docs/examples/database/get-collection.md +++ b/app/sdks/php/docs/examples/database/get-collection.md @@ -6,8 +6,8 @@ use Appwrite\Services\Database; $client = new Client(); $client - setProject('') - setKey('') + ->setProject('') + ->setKey('') ; $database = new Database($client); diff --git a/app/sdks/php/docs/examples/database/get-document.md b/app/sdks/php/docs/examples/database/get-document.md index 3aabf0eb7c..da72bd8f1b 100644 --- a/app/sdks/php/docs/examples/database/get-document.md +++ b/app/sdks/php/docs/examples/database/get-document.md @@ -6,8 +6,8 @@ use Appwrite\Services\Database; $client = new Client(); $client - setProject('') - setKey('') + ->setProject('') + ->setKey('') ; $database = new Database($client); diff --git a/app/sdks/php/docs/examples/database/list-collections.md b/app/sdks/php/docs/examples/database/list-collections.md index 0ad67489a3..c46daa2cda 100644 --- a/app/sdks/php/docs/examples/database/list-collections.md +++ b/app/sdks/php/docs/examples/database/list-collections.md @@ -6,8 +6,8 @@ use Appwrite\Services\Database; $client = new Client(); $client - setProject('') - setKey('') + ->setProject('') + ->setKey('') ; $database = new Database($client); diff --git a/app/sdks/php/docs/examples/database/list-documents.md b/app/sdks/php/docs/examples/database/list-documents.md index d72dfe3376..973f9c477e 100644 --- a/app/sdks/php/docs/examples/database/list-documents.md +++ b/app/sdks/php/docs/examples/database/list-documents.md @@ -6,8 +6,8 @@ use Appwrite\Services\Database; $client = new Client(); $client - setProject('') - setKey('') + ->setProject('') + ->setKey('') ; $database = new Database($client); diff --git a/app/sdks/php/docs/examples/database/update-collection.md b/app/sdks/php/docs/examples/database/update-collection.md index 8a854908c2..e6996105cd 100644 --- a/app/sdks/php/docs/examples/database/update-collection.md +++ b/app/sdks/php/docs/examples/database/update-collection.md @@ -6,8 +6,8 @@ use Appwrite\Services\Database; $client = new Client(); $client - setProject('') - setKey('') + ->setProject('') + ->setKey('') ; $database = new Database($client); diff --git a/app/sdks/php/docs/examples/database/update-document.md b/app/sdks/php/docs/examples/database/update-document.md index 1ae05de208..510e38808e 100644 --- a/app/sdks/php/docs/examples/database/update-document.md +++ b/app/sdks/php/docs/examples/database/update-document.md @@ -6,8 +6,8 @@ use Appwrite\Services\Database; $client = new Client(); $client - setProject('') - setKey('') + ->setProject('') + ->setKey('') ; $database = new Database($client); diff --git a/app/sdks/php/docs/examples/locale/get-countries-e-u.md b/app/sdks/php/docs/examples/locale/get-countries-e-u.md index ff1d679a8c..9f0f1973cc 100644 --- a/app/sdks/php/docs/examples/locale/get-countries-e-u.md +++ b/app/sdks/php/docs/examples/locale/get-countries-e-u.md @@ -6,8 +6,8 @@ use Appwrite\Services\Locale; $client = new Client(); $client - setProject('') - setKey('') + ->setProject('') + ->setKey('') ; $locale = new Locale($client); diff --git a/app/sdks/php/docs/examples/locale/get-countries-phones.md b/app/sdks/php/docs/examples/locale/get-countries-phones.md index 521296d162..2478c7c730 100644 --- a/app/sdks/php/docs/examples/locale/get-countries-phones.md +++ b/app/sdks/php/docs/examples/locale/get-countries-phones.md @@ -6,8 +6,8 @@ use Appwrite\Services\Locale; $client = new Client(); $client - setProject('') - setKey('') + ->setProject('') + ->setKey('') ; $locale = new Locale($client); diff --git a/app/sdks/php/docs/examples/locale/get-countries.md b/app/sdks/php/docs/examples/locale/get-countries.md index 981e547323..111dc52777 100644 --- a/app/sdks/php/docs/examples/locale/get-countries.md +++ b/app/sdks/php/docs/examples/locale/get-countries.md @@ -6,8 +6,8 @@ use Appwrite\Services\Locale; $client = new Client(); $client - setProject('') - setKey('') + ->setProject('') + ->setKey('') ; $locale = new Locale($client); diff --git a/app/sdks/php/docs/examples/locale/get-currencies.md b/app/sdks/php/docs/examples/locale/get-currencies.md index 73db986019..e01d5fd623 100644 --- a/app/sdks/php/docs/examples/locale/get-currencies.md +++ b/app/sdks/php/docs/examples/locale/get-currencies.md @@ -6,8 +6,8 @@ use Appwrite\Services\Locale; $client = new Client(); $client - setProject('') - setKey('') + ->setProject('') + ->setKey('') ; $locale = new Locale($client); diff --git a/app/sdks/php/docs/examples/locale/get-locale.md b/app/sdks/php/docs/examples/locale/get-locale.md index 0ef037e360..ac56f068de 100644 --- a/app/sdks/php/docs/examples/locale/get-locale.md +++ b/app/sdks/php/docs/examples/locale/get-locale.md @@ -6,8 +6,8 @@ use Appwrite\Services\Locale; $client = new Client(); $client - setProject('') - setKey('') + ->setProject('') + ->setKey('') ; $locale = new Locale($client); diff --git a/app/sdks/php/docs/examples/projects/create-key.md b/app/sdks/php/docs/examples/projects/create-key.md index e2e4bc87ae..b732c540ab 100644 --- a/app/sdks/php/docs/examples/projects/create-key.md +++ b/app/sdks/php/docs/examples/projects/create-key.md @@ -6,8 +6,8 @@ use Appwrite\Services\Projects; $client = new Client(); $client - setProject('') - setKey('') + ->setProject('') + ->setKey('') ; $projects = new Projects($client); diff --git a/app/sdks/php/docs/examples/projects/create-platform.md b/app/sdks/php/docs/examples/projects/create-platform.md index 2268ac1733..4f5f6a3355 100644 --- a/app/sdks/php/docs/examples/projects/create-platform.md +++ b/app/sdks/php/docs/examples/projects/create-platform.md @@ -6,8 +6,8 @@ use Appwrite\Services\Projects; $client = new Client(); $client - setProject('') - setKey('') + ->setProject('') + ->setKey('') ; $projects = new Projects($client); diff --git a/app/sdks/php/docs/examples/projects/create-project.md b/app/sdks/php/docs/examples/projects/create-project.md index 1be48ef583..c7a36650af 100644 --- a/app/sdks/php/docs/examples/projects/create-project.md +++ b/app/sdks/php/docs/examples/projects/create-project.md @@ -6,8 +6,8 @@ use Appwrite\Services\Projects; $client = new Client(); $client - setProject('') - setKey('') + ->setProject('') + ->setKey('') ; $projects = new Projects($client); diff --git a/app/sdks/php/docs/examples/projects/create-task.md b/app/sdks/php/docs/examples/projects/create-task.md index 900efe40ee..436ebc6f06 100644 --- a/app/sdks/php/docs/examples/projects/create-task.md +++ b/app/sdks/php/docs/examples/projects/create-task.md @@ -6,10 +6,10 @@ use Appwrite\Services\Projects; $client = new Client(); $client - setProject('') - setKey('') + ->setProject('') + ->setKey('') ; $projects = new Projects($client); -$result = $projects->createTask('[PROJECT_ID]', '[NAME]', 'play', '', 0, 'GET', 'https://example.com'); \ No newline at end of file +$result = $projects->createTask('[PROJECT_ID]', '[NAME]', 'play', '', 1, 'GET', 'https://example.com'); \ No newline at end of file diff --git a/app/sdks/php/docs/examples/projects/create-webhook.md b/app/sdks/php/docs/examples/projects/create-webhook.md index 0b6a2213aa..6eacda1fc0 100644 --- a/app/sdks/php/docs/examples/projects/create-webhook.md +++ b/app/sdks/php/docs/examples/projects/create-webhook.md @@ -6,10 +6,10 @@ use Appwrite\Services\Projects; $client = new Client(); $client - setProject('') - setKey('') + ->setProject('') + ->setKey('') ; $projects = new Projects($client); -$result = $projects->createWebhook('[PROJECT_ID]', '[NAME]', [], '[URL]', 1); \ No newline at end of file +$result = $projects->createWebhook('[PROJECT_ID]', '[NAME]', [], '[URL]', 0); \ No newline at end of file diff --git a/app/sdks/php/docs/examples/projects/delete-key.md b/app/sdks/php/docs/examples/projects/delete-key.md index 82800ca9b5..4af28f9929 100644 --- a/app/sdks/php/docs/examples/projects/delete-key.md +++ b/app/sdks/php/docs/examples/projects/delete-key.md @@ -6,8 +6,8 @@ use Appwrite\Services\Projects; $client = new Client(); $client - setProject('') - setKey('') + ->setProject('') + ->setKey('') ; $projects = new Projects($client); diff --git a/app/sdks/php/docs/examples/projects/delete-platform.md b/app/sdks/php/docs/examples/projects/delete-platform.md index ebc253d5f7..cab8785a49 100644 --- a/app/sdks/php/docs/examples/projects/delete-platform.md +++ b/app/sdks/php/docs/examples/projects/delete-platform.md @@ -6,8 +6,8 @@ use Appwrite\Services\Projects; $client = new Client(); $client - setProject('') - setKey('') + ->setProject('') + ->setKey('') ; $projects = new Projects($client); diff --git a/app/sdks/php/docs/examples/projects/delete-project.md b/app/sdks/php/docs/examples/projects/delete-project.md index 9735baea8c..d02ceb6e2b 100644 --- a/app/sdks/php/docs/examples/projects/delete-project.md +++ b/app/sdks/php/docs/examples/projects/delete-project.md @@ -6,8 +6,8 @@ use Appwrite\Services\Projects; $client = new Client(); $client - setProject('') - setKey('') + ->setProject('') + ->setKey('') ; $projects = new Projects($client); diff --git a/app/sdks/php/docs/examples/projects/delete-task.md b/app/sdks/php/docs/examples/projects/delete-task.md index 8f1f5abf77..0e8632cf3f 100644 --- a/app/sdks/php/docs/examples/projects/delete-task.md +++ b/app/sdks/php/docs/examples/projects/delete-task.md @@ -6,8 +6,8 @@ use Appwrite\Services\Projects; $client = new Client(); $client - setProject('') - setKey('') + ->setProject('') + ->setKey('') ; $projects = new Projects($client); diff --git a/app/sdks/php/docs/examples/projects/delete-webhook.md b/app/sdks/php/docs/examples/projects/delete-webhook.md index 8cdff2dbc7..fff5956e0c 100644 --- a/app/sdks/php/docs/examples/projects/delete-webhook.md +++ b/app/sdks/php/docs/examples/projects/delete-webhook.md @@ -6,8 +6,8 @@ use Appwrite\Services\Projects; $client = new Client(); $client - setProject('') - setKey('') + ->setProject('') + ->setKey('') ; $projects = new Projects($client); diff --git a/app/sdks/php/docs/examples/projects/get-key.md b/app/sdks/php/docs/examples/projects/get-key.md index 02a2471b55..4863bc23d4 100644 --- a/app/sdks/php/docs/examples/projects/get-key.md +++ b/app/sdks/php/docs/examples/projects/get-key.md @@ -6,8 +6,8 @@ use Appwrite\Services\Projects; $client = new Client(); $client - setProject('') - setKey('') + ->setProject('') + ->setKey('') ; $projects = new Projects($client); diff --git a/app/sdks/php/docs/examples/projects/get-platform.md b/app/sdks/php/docs/examples/projects/get-platform.md index 6fba922857..94f23656f5 100644 --- a/app/sdks/php/docs/examples/projects/get-platform.md +++ b/app/sdks/php/docs/examples/projects/get-platform.md @@ -6,8 +6,8 @@ use Appwrite\Services\Projects; $client = new Client(); $client - setProject('') - setKey('') + ->setProject('') + ->setKey('') ; $projects = new Projects($client); diff --git a/app/sdks/php/docs/examples/projects/get-project-usage.md b/app/sdks/php/docs/examples/projects/get-project-usage.md index 384982a16d..495ba2fe9f 100644 --- a/app/sdks/php/docs/examples/projects/get-project-usage.md +++ b/app/sdks/php/docs/examples/projects/get-project-usage.md @@ -6,8 +6,8 @@ use Appwrite\Services\Projects; $client = new Client(); $client - setProject('') - setKey('') + ->setProject('') + ->setKey('') ; $projects = new Projects($client); diff --git a/app/sdks/php/docs/examples/projects/get-project.md b/app/sdks/php/docs/examples/projects/get-project.md index b3b056cee8..b64f8a0e26 100644 --- a/app/sdks/php/docs/examples/projects/get-project.md +++ b/app/sdks/php/docs/examples/projects/get-project.md @@ -6,8 +6,8 @@ use Appwrite\Services\Projects; $client = new Client(); $client - setProject('') - setKey('') + ->setProject('') + ->setKey('') ; $projects = new Projects($client); diff --git a/app/sdks/php/docs/examples/projects/get-task.md b/app/sdks/php/docs/examples/projects/get-task.md index 3f682be966..598bba69e5 100644 --- a/app/sdks/php/docs/examples/projects/get-task.md +++ b/app/sdks/php/docs/examples/projects/get-task.md @@ -6,8 +6,8 @@ use Appwrite\Services\Projects; $client = new Client(); $client - setProject('') - setKey('') + ->setProject('') + ->setKey('') ; $projects = new Projects($client); diff --git a/app/sdks/php/docs/examples/projects/get-webhook.md b/app/sdks/php/docs/examples/projects/get-webhook.md index f2f6748aed..c765dfb108 100644 --- a/app/sdks/php/docs/examples/projects/get-webhook.md +++ b/app/sdks/php/docs/examples/projects/get-webhook.md @@ -6,8 +6,8 @@ use Appwrite\Services\Projects; $client = new Client(); $client - setProject('') - setKey('') + ->setProject('') + ->setKey('') ; $projects = new Projects($client); diff --git a/app/sdks/php/docs/examples/projects/list-keys.md b/app/sdks/php/docs/examples/projects/list-keys.md index 19832c8109..69db3fda45 100644 --- a/app/sdks/php/docs/examples/projects/list-keys.md +++ b/app/sdks/php/docs/examples/projects/list-keys.md @@ -6,8 +6,8 @@ use Appwrite\Services\Projects; $client = new Client(); $client - setProject('') - setKey('') + ->setProject('') + ->setKey('') ; $projects = new Projects($client); diff --git a/app/sdks/php/docs/examples/projects/list-platforms.md b/app/sdks/php/docs/examples/projects/list-platforms.md index 522c411dbf..ae0155379e 100644 --- a/app/sdks/php/docs/examples/projects/list-platforms.md +++ b/app/sdks/php/docs/examples/projects/list-platforms.md @@ -6,8 +6,8 @@ use Appwrite\Services\Projects; $client = new Client(); $client - setProject('') - setKey('') + ->setProject('') + ->setKey('') ; $projects = new Projects($client); diff --git a/app/sdks/php/docs/examples/projects/list-projects.md b/app/sdks/php/docs/examples/projects/list-projects.md index 660a5f2183..5e39729bc2 100644 --- a/app/sdks/php/docs/examples/projects/list-projects.md +++ b/app/sdks/php/docs/examples/projects/list-projects.md @@ -6,8 +6,8 @@ use Appwrite\Services\Projects; $client = new Client(); $client - setProject('') - setKey('') + ->setProject('') + ->setKey('') ; $projects = new Projects($client); diff --git a/app/sdks/php/docs/examples/projects/list-tasks.md b/app/sdks/php/docs/examples/projects/list-tasks.md index 813e1c50f3..7f0bc62a5b 100644 --- a/app/sdks/php/docs/examples/projects/list-tasks.md +++ b/app/sdks/php/docs/examples/projects/list-tasks.md @@ -6,8 +6,8 @@ use Appwrite\Services\Projects; $client = new Client(); $client - setProject('') - setKey('') + ->setProject('') + ->setKey('') ; $projects = new Projects($client); diff --git a/app/sdks/php/docs/examples/projects/list-webhooks.md b/app/sdks/php/docs/examples/projects/list-webhooks.md index 3ef4121280..121698a240 100644 --- a/app/sdks/php/docs/examples/projects/list-webhooks.md +++ b/app/sdks/php/docs/examples/projects/list-webhooks.md @@ -6,8 +6,8 @@ use Appwrite\Services\Projects; $client = new Client(); $client - setProject('') - setKey('') + ->setProject('') + ->setKey('') ; $projects = new Projects($client); diff --git a/app/sdks/php/docs/examples/projects/update-key.md b/app/sdks/php/docs/examples/projects/update-key.md index a7b0ab6505..09aa0d2517 100644 --- a/app/sdks/php/docs/examples/projects/update-key.md +++ b/app/sdks/php/docs/examples/projects/update-key.md @@ -6,8 +6,8 @@ use Appwrite\Services\Projects; $client = new Client(); $client - setProject('') - setKey('') + ->setProject('') + ->setKey('') ; $projects = new Projects($client); diff --git a/app/sdks/php/docs/examples/projects/update-platform.md b/app/sdks/php/docs/examples/projects/update-platform.md index 76da95152c..e7c35dd232 100644 --- a/app/sdks/php/docs/examples/projects/update-platform.md +++ b/app/sdks/php/docs/examples/projects/update-platform.md @@ -6,8 +6,8 @@ use Appwrite\Services\Projects; $client = new Client(); $client - setProject('') - setKey('') + ->setProject('') + ->setKey('') ; $projects = new Projects($client); diff --git a/app/sdks/php/docs/examples/projects/update-project-o-auth.md b/app/sdks/php/docs/examples/projects/update-project-o-auth.md index 065b8480ee..cd0ef51f3a 100644 --- a/app/sdks/php/docs/examples/projects/update-project-o-auth.md +++ b/app/sdks/php/docs/examples/projects/update-project-o-auth.md @@ -6,8 +6,8 @@ use Appwrite\Services\Projects; $client = new Client(); $client - setProject('') - setKey('') + ->setProject('') + ->setKey('') ; $projects = new Projects($client); diff --git a/app/sdks/php/docs/examples/projects/update-project.md b/app/sdks/php/docs/examples/projects/update-project.md index 8bf1ad91c2..0d7997c16d 100644 --- a/app/sdks/php/docs/examples/projects/update-project.md +++ b/app/sdks/php/docs/examples/projects/update-project.md @@ -6,8 +6,8 @@ use Appwrite\Services\Projects; $client = new Client(); $client - setProject('') - setKey('') + ->setProject('') + ->setKey('') ; $projects = new Projects($client); diff --git a/app/sdks/php/docs/examples/projects/update-task.md b/app/sdks/php/docs/examples/projects/update-task.md index 409f004868..59308c5d6d 100644 --- a/app/sdks/php/docs/examples/projects/update-task.md +++ b/app/sdks/php/docs/examples/projects/update-task.md @@ -6,10 +6,10 @@ use Appwrite\Services\Projects; $client = new Client(); $client - setProject('') - setKey('') + ->setProject('') + ->setKey('') ; $projects = new Projects($client); -$result = $projects->updateTask('[PROJECT_ID]', '[TASK_ID]', '[NAME]', 'play', '', 1, 'GET', 'https://example.com'); \ No newline at end of file +$result = $projects->updateTask('[PROJECT_ID]', '[TASK_ID]', '[NAME]', 'play', '', 0, 'GET', 'https://example.com'); \ No newline at end of file diff --git a/app/sdks/php/docs/examples/projects/update-webhook.md b/app/sdks/php/docs/examples/projects/update-webhook.md index bf0679261b..6f176a01fb 100644 --- a/app/sdks/php/docs/examples/projects/update-webhook.md +++ b/app/sdks/php/docs/examples/projects/update-webhook.md @@ -6,10 +6,10 @@ use Appwrite\Services\Projects; $client = new Client(); $client - setProject('') - setKey('') + ->setProject('') + ->setKey('') ; $projects = new Projects($client); -$result = $projects->updateWebhook('[PROJECT_ID]', '[WEBHOOK_ID]', '[NAME]', [], '[URL]', 0); \ No newline at end of file +$result = $projects->updateWebhook('[PROJECT_ID]', '[WEBHOOK_ID]', '[NAME]', [], '[URL]', 1); \ No newline at end of file diff --git a/app/sdks/php/docs/examples/storage/create-file.md b/app/sdks/php/docs/examples/storage/create-file.md index 1f0ea733eb..88a37d8e86 100644 --- a/app/sdks/php/docs/examples/storage/create-file.md +++ b/app/sdks/php/docs/examples/storage/create-file.md @@ -6,8 +6,8 @@ use Appwrite\Services\Storage; $client = new Client(); $client - setProject('') - setKey('') + ->setProject('') + ->setKey('') ; $storage = new Storage($client); diff --git a/app/sdks/php/docs/examples/storage/delete-file.md b/app/sdks/php/docs/examples/storage/delete-file.md index f74890360a..74448e5a7c 100644 --- a/app/sdks/php/docs/examples/storage/delete-file.md +++ b/app/sdks/php/docs/examples/storage/delete-file.md @@ -6,8 +6,8 @@ use Appwrite\Services\Storage; $client = new Client(); $client - setProject('') - setKey('') + ->setProject('') + ->setKey('') ; $storage = new Storage($client); diff --git a/app/sdks/php/docs/examples/storage/get-file-download.md b/app/sdks/php/docs/examples/storage/get-file-download.md index 53d8015564..3a6db00081 100644 --- a/app/sdks/php/docs/examples/storage/get-file-download.md +++ b/app/sdks/php/docs/examples/storage/get-file-download.md @@ -6,8 +6,8 @@ use Appwrite\Services\Storage; $client = new Client(); $client - setProject('') - setKey('') + ->setProject('') + ->setKey('') ; $storage = new Storage($client); diff --git a/app/sdks/php/docs/examples/storage/get-file-preview.md b/app/sdks/php/docs/examples/storage/get-file-preview.md index 17a670f9ee..8b02bdd2a9 100644 --- a/app/sdks/php/docs/examples/storage/get-file-preview.md +++ b/app/sdks/php/docs/examples/storage/get-file-preview.md @@ -6,8 +6,8 @@ use Appwrite\Services\Storage; $client = new Client(); $client - setProject('') - setKey('') + ->setProject('') + ->setKey('') ; $storage = new Storage($client); diff --git a/app/sdks/php/docs/examples/storage/get-file-view.md b/app/sdks/php/docs/examples/storage/get-file-view.md index e40419707e..59cc25bc74 100644 --- a/app/sdks/php/docs/examples/storage/get-file-view.md +++ b/app/sdks/php/docs/examples/storage/get-file-view.md @@ -6,8 +6,8 @@ use Appwrite\Services\Storage; $client = new Client(); $client - setProject('') - setKey('') + ->setProject('') + ->setKey('') ; $storage = new Storage($client); diff --git a/app/sdks/php/docs/examples/storage/get-file.md b/app/sdks/php/docs/examples/storage/get-file.md index dd47022851..63fa59b40a 100644 --- a/app/sdks/php/docs/examples/storage/get-file.md +++ b/app/sdks/php/docs/examples/storage/get-file.md @@ -6,8 +6,8 @@ use Appwrite\Services\Storage; $client = new Client(); $client - setProject('') - setKey('') + ->setProject('') + ->setKey('') ; $storage = new Storage($client); diff --git a/app/sdks/php/docs/examples/storage/list-files.md b/app/sdks/php/docs/examples/storage/list-files.md index cd92bed982..434e1fe70d 100644 --- a/app/sdks/php/docs/examples/storage/list-files.md +++ b/app/sdks/php/docs/examples/storage/list-files.md @@ -6,8 +6,8 @@ use Appwrite\Services\Storage; $client = new Client(); $client - setProject('') - setKey('') + ->setProject('') + ->setKey('') ; $storage = new Storage($client); diff --git a/app/sdks/php/docs/examples/storage/update-file.md b/app/sdks/php/docs/examples/storage/update-file.md index 29c834d230..93dc6bb18a 100644 --- a/app/sdks/php/docs/examples/storage/update-file.md +++ b/app/sdks/php/docs/examples/storage/update-file.md @@ -6,8 +6,8 @@ use Appwrite\Services\Storage; $client = new Client(); $client - setProject('') - setKey('') + ->setProject('') + ->setKey('') ; $storage = new Storage($client); diff --git a/app/sdks/php/docs/examples/teams/create-team-membership-resend.md b/app/sdks/php/docs/examples/teams/create-team-membership-resend.md index 28ff0f1719..0789412121 100644 --- a/app/sdks/php/docs/examples/teams/create-team-membership-resend.md +++ b/app/sdks/php/docs/examples/teams/create-team-membership-resend.md @@ -6,8 +6,8 @@ use Appwrite\Services\Teams; $client = new Client(); $client - setProject('') - setKey('') + ->setProject('') + ->setKey('') ; $teams = new Teams($client); diff --git a/app/sdks/php/docs/examples/teams/create-team-membership.md b/app/sdks/php/docs/examples/teams/create-team-membership.md index 024b972b2d..12a47b6f15 100644 --- a/app/sdks/php/docs/examples/teams/create-team-membership.md +++ b/app/sdks/php/docs/examples/teams/create-team-membership.md @@ -6,8 +6,8 @@ use Appwrite\Services\Teams; $client = new Client(); $client - setProject('') - setKey('') + ->setProject('') + ->setKey('') ; $teams = new Teams($client); diff --git a/app/sdks/php/docs/examples/teams/create-team.md b/app/sdks/php/docs/examples/teams/create-team.md index b5cc730fca..11928b37cc 100644 --- a/app/sdks/php/docs/examples/teams/create-team.md +++ b/app/sdks/php/docs/examples/teams/create-team.md @@ -6,8 +6,8 @@ use Appwrite\Services\Teams; $client = new Client(); $client - setProject('') - setKey('') + ->setProject('') + ->setKey('') ; $teams = new Teams($client); diff --git a/app/sdks/php/docs/examples/teams/delete-team-membership.md b/app/sdks/php/docs/examples/teams/delete-team-membership.md index 63afb1bb97..d53e1ed7ce 100644 --- a/app/sdks/php/docs/examples/teams/delete-team-membership.md +++ b/app/sdks/php/docs/examples/teams/delete-team-membership.md @@ -6,8 +6,8 @@ use Appwrite\Services\Teams; $client = new Client(); $client - setProject('') - setKey('') + ->setProject('') + ->setKey('') ; $teams = new Teams($client); diff --git a/app/sdks/php/docs/examples/teams/delete-team.md b/app/sdks/php/docs/examples/teams/delete-team.md index dc7d06cfcf..7fb04015be 100644 --- a/app/sdks/php/docs/examples/teams/delete-team.md +++ b/app/sdks/php/docs/examples/teams/delete-team.md @@ -6,8 +6,8 @@ use Appwrite\Services\Teams; $client = new Client(); $client - setProject('') - setKey('') + ->setProject('') + ->setKey('') ; $teams = new Teams($client); diff --git a/app/sdks/php/docs/examples/teams/get-team-members.md b/app/sdks/php/docs/examples/teams/get-team-members.md index 23bf1e3e51..7f7b4c88bf 100644 --- a/app/sdks/php/docs/examples/teams/get-team-members.md +++ b/app/sdks/php/docs/examples/teams/get-team-members.md @@ -6,8 +6,8 @@ use Appwrite\Services\Teams; $client = new Client(); $client - setProject('') - setKey('') + ->setProject('') + ->setKey('') ; $teams = new Teams($client); diff --git a/app/sdks/php/docs/examples/teams/get-team.md b/app/sdks/php/docs/examples/teams/get-team.md index e08427302b..e58a9d0dc2 100644 --- a/app/sdks/php/docs/examples/teams/get-team.md +++ b/app/sdks/php/docs/examples/teams/get-team.md @@ -6,8 +6,8 @@ use Appwrite\Services\Teams; $client = new Client(); $client - setProject('') - setKey('') + ->setProject('') + ->setKey('') ; $teams = new Teams($client); diff --git a/app/sdks/php/docs/examples/teams/list-teams.md b/app/sdks/php/docs/examples/teams/list-teams.md index f17c934f75..9b753c6d16 100644 --- a/app/sdks/php/docs/examples/teams/list-teams.md +++ b/app/sdks/php/docs/examples/teams/list-teams.md @@ -6,8 +6,8 @@ use Appwrite\Services\Teams; $client = new Client(); $client - setProject('') - setKey('') + ->setProject('') + ->setKey('') ; $teams = new Teams($client); diff --git a/app/sdks/php/docs/examples/teams/update-team-membership-status.md b/app/sdks/php/docs/examples/teams/update-team-membership-status.md index 83907d398f..19f14550e4 100644 --- a/app/sdks/php/docs/examples/teams/update-team-membership-status.md +++ b/app/sdks/php/docs/examples/teams/update-team-membership-status.md @@ -6,8 +6,8 @@ use Appwrite\Services\Teams; $client = new Client(); $client - setProject('') - setKey('') + ->setProject('') + ->setKey('') ; $teams = new Teams($client); diff --git a/app/sdks/php/docs/examples/teams/update-team.md b/app/sdks/php/docs/examples/teams/update-team.md index ba8b6911b8..a76fce3a83 100644 --- a/app/sdks/php/docs/examples/teams/update-team.md +++ b/app/sdks/php/docs/examples/teams/update-team.md @@ -6,8 +6,8 @@ use Appwrite\Services\Teams; $client = new Client(); $client - setProject('') - setKey('') + ->setProject('') + ->setKey('') ; $teams = new Teams($client); diff --git a/app/sdks/php/docs/examples/users/create-user.md b/app/sdks/php/docs/examples/users/create-user.md index 2de6495083..b25a479c89 100644 --- a/app/sdks/php/docs/examples/users/create-user.md +++ b/app/sdks/php/docs/examples/users/create-user.md @@ -6,8 +6,8 @@ use Appwrite\Services\Users; $client = new Client(); $client - setProject('') - setKey('') + ->setProject('') + ->setKey('') ; $users = new Users($client); diff --git a/app/sdks/php/docs/examples/users/delete-user-sessions.md b/app/sdks/php/docs/examples/users/delete-user-sessions.md index 8e086172cc..a83c648f69 100644 --- a/app/sdks/php/docs/examples/users/delete-user-sessions.md +++ b/app/sdks/php/docs/examples/users/delete-user-sessions.md @@ -6,8 +6,8 @@ use Appwrite\Services\Users; $client = new Client(); $client - setProject('') - setKey('') + ->setProject('') + ->setKey('') ; $users = new Users($client); diff --git a/app/sdks/php/docs/examples/users/delete-users-session.md b/app/sdks/php/docs/examples/users/delete-users-session.md index f851fb1d99..f5a9c6fa1b 100644 --- a/app/sdks/php/docs/examples/users/delete-users-session.md +++ b/app/sdks/php/docs/examples/users/delete-users-session.md @@ -6,8 +6,8 @@ use Appwrite\Services\Users; $client = new Client(); $client - setProject('') - setKey('') + ->setProject('') + ->setKey('') ; $users = new Users($client); diff --git a/app/sdks/php/docs/examples/users/get-user-logs.md b/app/sdks/php/docs/examples/users/get-user-logs.md index e0a9a6d62f..bb9a70e975 100644 --- a/app/sdks/php/docs/examples/users/get-user-logs.md +++ b/app/sdks/php/docs/examples/users/get-user-logs.md @@ -6,8 +6,8 @@ use Appwrite\Services\Users; $client = new Client(); $client - setProject('') - setKey('') + ->setProject('') + ->setKey('') ; $users = new Users($client); diff --git a/app/sdks/php/docs/examples/users/get-user-prefs.md b/app/sdks/php/docs/examples/users/get-user-prefs.md index f827e6c2a1..949d206065 100644 --- a/app/sdks/php/docs/examples/users/get-user-prefs.md +++ b/app/sdks/php/docs/examples/users/get-user-prefs.md @@ -6,8 +6,8 @@ use Appwrite\Services\Users; $client = new Client(); $client - setProject('') - setKey('') + ->setProject('') + ->setKey('') ; $users = new Users($client); diff --git a/app/sdks/php/docs/examples/users/get-user-sessions.md b/app/sdks/php/docs/examples/users/get-user-sessions.md index ae18bc0d23..9f29697960 100644 --- a/app/sdks/php/docs/examples/users/get-user-sessions.md +++ b/app/sdks/php/docs/examples/users/get-user-sessions.md @@ -6,8 +6,8 @@ use Appwrite\Services\Users; $client = new Client(); $client - setProject('') - setKey('') + ->setProject('') + ->setKey('') ; $users = new Users($client); diff --git a/app/sdks/php/docs/examples/users/get-user.md b/app/sdks/php/docs/examples/users/get-user.md index f2149c3d09..bc776d4313 100644 --- a/app/sdks/php/docs/examples/users/get-user.md +++ b/app/sdks/php/docs/examples/users/get-user.md @@ -6,8 +6,8 @@ use Appwrite\Services\Users; $client = new Client(); $client - setProject('') - setKey('') + ->setProject('') + ->setKey('') ; $users = new Users($client); diff --git a/app/sdks/php/docs/examples/users/list-users.md b/app/sdks/php/docs/examples/users/list-users.md index 851e9453cd..d3824540fc 100644 --- a/app/sdks/php/docs/examples/users/list-users.md +++ b/app/sdks/php/docs/examples/users/list-users.md @@ -6,8 +6,8 @@ use Appwrite\Services\Users; $client = new Client(); $client - setProject('') - setKey('') + ->setProject('') + ->setKey('') ; $users = new Users($client); diff --git a/app/sdks/php/docs/examples/users/update-user-status.md b/app/sdks/php/docs/examples/users/update-user-status.md index 805ea191f2..918d827962 100644 --- a/app/sdks/php/docs/examples/users/update-user-status.md +++ b/app/sdks/php/docs/examples/users/update-user-status.md @@ -6,8 +6,8 @@ use Appwrite\Services\Users; $client = new Client(); $client - setProject('') - setKey('') + ->setProject('') + ->setKey('') ; $users = new Users($client); diff --git a/app/sdks/php/docs/locale.md b/app/sdks/php/docs/locale.md index e977fa99cf..7635546481 100644 --- a/app/sdks/php/docs/locale.md +++ b/app/sdks/php/docs/locale.md @@ -38,5 +38,5 @@ GET https://appwrite.test/v1/locale/countries/phones GET https://appwrite.test/v1/locale/currencies ``` -** List of all currencies, including currency symbol, name, plural, and decimal digits for all major and minor currencies. You can use the locale header to get the data in supported language. ** +** List of all currencies, including currency symol, name, plural, and decimal digits for all major and minor currencies. You can use the locale header to get the data in supported language. ** diff --git a/app/sdks/php/docs/storage.md b/app/sdks/php/docs/storage.md index d57a9a6ef2..74182191fd 100644 --- a/app/sdks/php/docs/storage.md +++ b/app/sdks/php/docs/storage.md @@ -30,8 +30,8 @@ POST https://appwrite.test/v1/storage/files | Field Name | Type | Description | Default | | --- | --- | --- | --- | | files | file | Binary Files. | | -| read | array | An array of read permissions. [Learn more about permissions and roles](/docs/permissions). | [] | -| write | array | An array of write permissions. [Learn more about permissions and roles](/docs/permissions). | [] | +| read | array | An array of strings with read permissions. [Learn more about permissions and roles](/docs/permissions). | [] | +| write | array | An array of strings with write permissions. [Learn more about permissions and roles](/docs/permissions). | [] | | folderId | string | Folder to associate files with. | | ## Get File @@ -61,8 +61,8 @@ PUT https://appwrite.test/v1/storage/files/{fileId} | Field Name | Type | Description | Default | | --- | --- | --- | --- | | fileId | string | **Required** File unique ID. | | -| read | array | An array of read permissions. [Learn more about permissions and roles](/docs/permissions). | [] | -| write | array | An array of write permissions. [Learn more about permissions and roles](/docs/permissions). | [] | +| read | array | An array of strings with read permissions. [Learn more about permissions and roles](/docs/permissions). | [] | +| write | array | An array of strings with write permissions. [Learn more about permissions and roles](/docs/permissions). | [] | | folderId | string | Folder to associate files with. | | ## Delete File diff --git a/app/sdks/php/src/Appwrite/Client.php b/app/sdks/php/src/Appwrite/Client.php index edd8ec6671..1d6a3faf46 100644 --- a/app/sdks/php/src/Appwrite/Client.php +++ b/app/sdks/php/src/Appwrite/Client.php @@ -37,7 +37,7 @@ class Client */ protected $headers = [ 'content-type' => '', - 'x-sdk-version' => 'appwrite:php:1.0.8', + 'x-sdk-version' => 'appwrite:php:1.0.9', ]; /** @@ -185,7 +185,7 @@ class Client curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_USERAGENT, php_uname('s') . '-' . php_uname('r') . ':php-' . phpversion()); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); - curl_setopt($ch, CURLOPT_HEADERFUNCTION, function ($curl, $header) use (&$responseHeaders) { + curl_setopt($ch, CURLOPT_HEADERFUNCTION, function($curl, $header) use (&$responseHeaders) { $len = strlen($header); $header = explode(':', strtolower($header), 2); @@ -198,12 +198,12 @@ class Client return $len; }); - if ($method != self::METHOD_GET) { + if($method != self::METHOD_GET) { curl_setopt($ch, CURLOPT_POSTFIELDS, $query); } // Allow self signed certificates - if ($this->selfSigned) { + if($this->selfSigned) { curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); } @@ -212,7 +212,7 @@ class Client $responseType = (isset($responseHeaders['content-type'])) ? $responseHeaders['content-type'] : ''; $responseStatus = curl_getinfo($ch, CURLINFO_HTTP_CODE); - switch (substr($responseType, 0, strpos($responseType, ';'))) { + switch(substr($responseType, 0, strpos($responseType, ';'))) { case 'application/json': $responseBody = json_decode($responseBody, true); break; @@ -234,16 +234,16 @@ class Client * @param string $prefix * @return array */ - protected function flatten(array $data, $prefix = '') - { + protected function flatten(array $data, $prefix = '') { $output = []; - foreach ($data as $key => $value) { + foreach($data as $key => $value) { $finalKey = $prefix ? "{$prefix}[{$key}]" : $key; if (is_array($value)) { $output += $this->flatten($value, $finalKey); // @todo: handle name collision here if needed - } else { + } + else { $output[$finalKey] = $value; } } diff --git a/app/sdks/php/src/Appwrite/Service.php b/app/sdks/php/src/Appwrite/Service.php index 4eabee9e76..ea3ad92e2d 100644 --- a/app/sdks/php/src/Appwrite/Service.php +++ b/app/sdks/php/src/Appwrite/Service.php @@ -16,4 +16,4 @@ abstract class Service { $this->client = $client; } -} +} \ No newline at end of file diff --git a/app/sdks/php/src/Appwrite/Services/Account.php b/app/sdks/php/src/Appwrite/Services/Account.php index 90650d4b5e..a1df7cb1ee 100644 --- a/app/sdks/php/src/Appwrite/Services/Account.php +++ b/app/sdks/php/src/Appwrite/Services/Account.php @@ -188,4 +188,5 @@ class Account extends Service return $this->client->call(Client::METHOD_GET, $path, [ ], $params); } -} + +} \ No newline at end of file diff --git a/app/sdks/php/src/Appwrite/Services/Auth.php b/app/sdks/php/src/Appwrite/Services/Auth.php index d19cd05e91..dae305144c 100644 --- a/app/sdks/php/src/Appwrite/Services/Auth.php +++ b/app/sdks/php/src/Appwrite/Services/Auth.php @@ -13,18 +13,18 @@ class Auth extends Service * * Allow the user to login into his account by providing a valid email and * password combination. Use the success and failure arguments to provide a - * redirect URL\'s back to your app when login is completed. - * + * redirect URL\'s back to your app when login is completed. + * * Please notice that in order to avoid a [Redirect * Attacks](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) * the only valid redirect URL's are the once from domains you have set when * added your platforms in the console interface. - * - * When not using the success or failure redirect arguments this endpoint will - * result with a 200 status code and the user account object on success and - * with 401 status error on failure. This behavior was applied to help the web - * clients deal with browsers who don't allow to set 3rd party HTTP cookies - * needed for saving the account session token. + * + * When accessing this route using Javascript from the browser, success and + * failure parameter URLs are required. Appwrite server will respond with a + * 301 redirect status code and will set the user session cookie. This + * behavior is enforced because modern browsers are limiting 3rd party cookies + * in XHR of fetch requests to protect user privacy. * * @param string $email * @param string $password @@ -88,28 +88,6 @@ class Auth extends Service ], $params); } - /** - * OAuth Callback - * - * @param string $projectId - * @param string $provider - * @param string $code - * @param string $state - * @throws Exception - * @return array - */ - public function oauthCallback($projectId, $provider, $code, $state = '') - { - $path = str_replace(['{projectId}', '{provider}'], [$projectId, $provider], '/auth/oauth/callback/{provider}/{projectId}'); - $params = []; - - $params['code'] = $code; - $params['state'] = $state; - - return $this->client->call(Client::METHOD_GET, $path, [ - ], $params); - } - /** * OAuth Login * @@ -142,17 +120,17 @@ class Auth extends Service * process. * * @param string $email - * @param string $redirect + * @param string $reset * @throws Exception * @return array */ - public function recovery($email, $redirect) + public function recovery($email, $reset) { $path = str_replace([], [], '/auth/recovery'); $params = []; $params['email'] = $email; - $params['redirect'] = $redirect; + $params['reset'] = $reset; return $this->client->call(Client::METHOD_POST, $path, [ ], $params); @@ -165,7 +143,7 @@ class Auth extends Service * **userId** and **token** arguments will be passed as query parameters to * the redirect URL you have provided when sending your request to the * /auth/recovery endpoint. - * + * * Please notice that in order to avoid a [Redirect * Attacks](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) * the only valid redirect URL's are the once from domains you have set when @@ -198,41 +176,41 @@ class Auth extends Service * Use this endpoint to allow a new user to register an account in your * project. Use the success and failure URL's to redirect users back to your * application after signup completes. - * + * * If registration completes successfully user will be sent with a * confirmation email in order to confirm he is the owner of the account email - * address. Use the redirect parameter to redirect the user from the + * address. Use the confirmation parameter to redirect the user from the * confirmation email back to your app. When the user is redirected, use the * /auth/confirm endpoint to complete the account confirmation. - * + * * Please notice that in order to avoid a [Redirect * Attacks](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) * the only valid redirect URL's are the once from domains you have set when * added your platforms in the console interface. - * - * When not using the success or failure redirect arguments this endpoint will - * result with a 200 status code and the user account object on success and - * with 401 status error on failure. This behavior was applied to help the web - * clients deal with browsers who don't allow to set 3rd party HTTP cookies - * needed for saving the account session token. + * + * When accessing this route using Javascript from the browser, success and + * failure parameter URLs are required. Appwrite server will respond with a + * 301 redirect status code and will set the user session cookie. This + * behavior is enforced because modern browsers are limiting 3rd party cookies + * in XHR of fetch requests to protect user privacy. * * @param string $email * @param string $password - * @param string $redirect + * @param string $confirm * @param string $success * @param string $failure * @param string $name * @throws Exception * @return array */ - public function register($email, $password, $redirect, $success, $failure, $name = '') + public function register($email, $password, $confirm, $success = '', $failure = '', $name = '') { $path = str_replace([], [], '/auth/register'); $params = []; $params['email'] = $email; $params['password'] = $password; - $params['redirect'] = $redirect; + $params['confirm'] = $confirm; $params['success'] = $success; $params['failure'] = $failure; $params['name'] = $name; @@ -272,24 +250,25 @@ class Auth extends Service * This endpoint allows the user to request your app to resend him his email * confirmation message. The redirect arguments acts the same way as in * /auth/register endpoint. - * + * * Please notice that in order to avoid a [Redirect * Attacks](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) * the only valid redirect URL's are the once from domains you have set when * added your platforms in the console interface. * - * @param string $redirect + * @param string $confirm * @throws Exception * @return array */ - public function confirmResend($redirect) + public function confirmResend($confirm) { $path = str_replace([], [], '/auth/register/confirm/resend'); $params = []; - $params['redirect'] = $redirect; + $params['confirm'] = $confirm; return $this->client->call(Client::METHOD_POST, $path, [ ], $params); } -} + +} \ No newline at end of file diff --git a/app/sdks/php/src/Appwrite/Services/Avatars.php b/app/sdks/php/src/Appwrite/Services/Avatars.php index 9a6dbedca5..8ee781814a 100644 --- a/app/sdks/php/src/Appwrite/Services/Avatars.php +++ b/app/sdks/php/src/Appwrite/Services/Avatars.php @@ -165,4 +165,5 @@ class Avatars extends Service return $this->client->call(Client::METHOD_GET, $path, [ ], $params); } -} + +} \ No newline at end of file diff --git a/app/sdks/php/src/Appwrite/Services/Database.php b/app/sdks/php/src/Appwrite/Services/Database.php index b0e0565512..1310909a54 100644 --- a/app/sdks/php/src/Appwrite/Services/Database.php +++ b/app/sdks/php/src/Appwrite/Services/Database.php @@ -267,4 +267,5 @@ class Database extends Service return $this->client->call(Client::METHOD_DELETE, $path, [ ], $params); } -} + +} \ No newline at end of file diff --git a/app/sdks/php/src/Appwrite/Services/Locale.php b/app/sdks/php/src/Appwrite/Services/Locale.php index e11104c75b..1ae5ae0427 100644 --- a/app/sdks/php/src/Appwrite/Services/Locale.php +++ b/app/sdks/php/src/Appwrite/Services/Locale.php @@ -106,4 +106,5 @@ class Locale extends Service return $this->client->call(Client::METHOD_GET, $path, [ ], $params); } -} + +} \ No newline at end of file diff --git a/app/sdks/php/src/Appwrite/Services/Projects.php b/app/sdks/php/src/Appwrite/Services/Projects.php index f1cf92cc0a..af68cf4e9a 100644 --- a/app/sdks/php/src/Appwrite/Services/Projects.php +++ b/app/sdks/php/src/Appwrite/Services/Projects.php @@ -610,4 +610,5 @@ class Projects extends Service return $this->client->call(Client::METHOD_DELETE, $path, [ ], $params); } -} + +} \ No newline at end of file diff --git a/app/sdks/php/src/Appwrite/Services/Storage.php b/app/sdks/php/src/Appwrite/Services/Storage.php index 26b771a67c..e22622ebed 100644 --- a/app/sdks/php/src/Appwrite/Services/Storage.php +++ b/app/sdks/php/src/Appwrite/Services/Storage.php @@ -205,4 +205,5 @@ class Storage extends Service return $this->client->call(Client::METHOD_GET, $path, [ ], $params); } -} + +} \ No newline at end of file diff --git a/app/sdks/php/src/Appwrite/Services/Teams.php b/app/sdks/php/src/Appwrite/Services/Teams.php index 8b4f5c81a5..2c331b4c79 100644 --- a/app/sdks/php/src/Appwrite/Services/Teams.php +++ b/app/sdks/php/src/Appwrite/Services/Teams.php @@ -149,12 +149,12 @@ class Teams extends Service * Use this endpoint to invite a new member to your team. An email with a link * to join the team will be sent to the new member email address. If member * doesn't exists in the project it will be automatically created. - * + * * Use the redirect parameter to redirect the user from the invitation email * back to your app. When the user is redirected, use the * /teams/{teamId}/memberships/{inviteId}/status endpoint to finally join the * user to the team. - * + * * Please notice that in order to avoid a [Redirect * Attacks](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) * the only valid redirect URL's are the once from domains you have set when @@ -233,12 +233,12 @@ class Teams extends Service * is being redirect back to your app from the invitation email. Use the * success and failure URL's to redirect users back to your application after * the request completes. - * + * * Please notice that in order to avoid a [Redirect * Attacks](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) * the only valid redirect URL's are the once from domains you have set when * added your platforms in the console interface. - * + * * When not using the success or failure redirect arguments this endpoint will * result with a 200 status code on success and with 401 status error on * failure. This behavior was applied to help the web clients deal with @@ -267,4 +267,5 @@ class Teams extends Service return $this->client->call(Client::METHOD_PATCH, $path, [ ], $params); } -} + +} \ No newline at end of file diff --git a/app/sdks/php/src/Appwrite/Services/Users.php b/app/sdks/php/src/Appwrite/Services/Users.php index 9159719e9b..3b893c0e96 100644 --- a/app/sdks/php/src/Appwrite/Services/Users.php +++ b/app/sdks/php/src/Appwrite/Services/Users.php @@ -195,4 +195,5 @@ class Users extends Service return $this->client->call(Client::METHOD_PATCH, $path, [ ], $params); } -} + +} \ No newline at end of file diff --git a/app/sdks/python/appwrite/services/auth.py b/app/sdks/python/appwrite/services/auth.py index f082987d4b..0e8cc6ea19 100644 --- a/app/sdks/python/appwrite/services/auth.py +++ b/app/sdks/python/appwrite/services/auth.py @@ -35,19 +35,6 @@ class Auth(Service): return self.client.call('delete', path, { }, params) - def oauth_callback(self, project_id, provider, code, state=''): - """OAuth Callback""" - - params = {} - path = '/auth/oauth/callback/{provider}/{projectId}' - path.replace('{projectId}', project_id) - path.replace('{provider}', provider) - params['code'] = code - params['state'] = state - - return self.client.call('get', path, { - }, params) - def oauth(self, provider, success='', failure=''): """OAuth Login""" @@ -60,13 +47,13 @@ class Auth(Service): return self.client.call('get', path, { }, params) - def recovery(self, email, redirect): + def recovery(self, email, reset): """Password Recovery""" params = {} path = '/auth/recovery' params['email'] = email - params['redirect'] = redirect + params['reset'] = reset return self.client.call('post', path, { }, params) @@ -84,14 +71,14 @@ class Auth(Service): return self.client.call('put', path, { }, params) - def register(self, email, password, redirect, success, failure, name=''): + def register(self, email, password, confirm, success='', failure='', name=''): """Register User""" params = {} path = '/auth/register' params['email'] = email params['password'] = password - params['redirect'] = redirect + params['confirm'] = confirm params['success'] = success params['failure'] = failure params['name'] = name @@ -110,12 +97,12 @@ class Auth(Service): return self.client.call('post', path, { }, params) - def confirm_resend(self, redirect): + def confirm_resend(self, confirm): """Resend Confirmation""" params = {} path = '/auth/register/confirm/resend' - params['redirect'] = redirect + params['confirm'] = confirm return self.client.call('post', path, { }, params) diff --git a/app/sdks/ruby/lib/appwrite/services/auth.rb b/app/sdks/ruby/lib/appwrite/services/auth.rb index b8b6794c27..540080a5b8 100644 --- a/app/sdks/ruby/lib/appwrite/services/auth.rb +++ b/app/sdks/ruby/lib/appwrite/services/auth.rb @@ -36,20 +36,6 @@ module Appwrite }, params); end - def oauth_callback(project_id:, provider:, code:, state: '') - path = '/auth/oauth/callback/{provider}/{projectId}' - .gsub('{project_id}', project_id) - .gsub('{provider}', provider) - - params = { - 'code': code, - 'state': state - } - - return @client.call('get', path, { - }, params); - end - def oauth(provider:, success: '', failure: '') path = '/auth/oauth/{provider}' .gsub('{provider}', provider) @@ -63,12 +49,12 @@ module Appwrite }, params); end - def recovery(email:, redirect:) + def recovery(email:, reset:) path = '/auth/recovery' params = { 'email': email, - 'redirect': redirect + 'reset': reset } return @client.call('post', path, { @@ -89,13 +75,13 @@ module Appwrite }, params); end - def register(email:, password:, redirect:, success:, failure:, name: '') + def register(email:, password:, confirm:, success: '', failure: '', name: '') path = '/auth/register' params = { 'email': email, 'password': password, - 'redirect': redirect, + 'confirm': confirm, 'success': success, 'failure': failure, 'name': name @@ -117,11 +103,11 @@ module Appwrite }, params); end - def confirm_resend(redirect:) + def confirm_resend(confirm:) path = '/auth/register/confirm/resend' params = { - 'redirect': redirect + 'confirm': confirm } return @client.call('post', path, { diff --git a/app/tasks/sdks.php b/app/tasks/sdks.php index ce7e6fe96e..d1698a0d4c 100644 --- a/app/tasks/sdks.php +++ b/app/tasks/sdks.php @@ -16,9 +16,11 @@ use Appwrite\SDK\Language\Dart; $cli = new CLI(); +$version = '0.2.0'; // Server version + $cli ->task('generate') - ->action(function () { + ->action(function () use ($version) { function getSSLPage($url) { $ch = curl_init(); @@ -35,33 +37,33 @@ $cli $clients = [ 'php' => [ - 'version' => '1.0.8', + 'version' => '1.0.9', 'result' => __DIR__.'/../sdks/php/', 'gitURL' => 'https://github.com/appwrite/sdk-for-php.git', 'gitRepo' => 'git@github.com:appwrite/sdk-for-php.git', 'gitRepoName' => 'sdk-for-php', 'gitUserName' => 'appwrite', - 'warning' => '', + 'warning' => 'This SDK if compitable with Appwrite server version ' . $version . ' for older versions check previous releases.', 'platform' => 'server', ], 'js' => [ - 'version' => '1.0.21', + 'version' => '1.0.22', 'result' => __DIR__.'/../sdks/js/', 'gitURL' => 'https://github.com/appwrite/sdk-for-js.git', 'gitRepo' => 'git@github.com:appwrite/sdk-for-js.git', 'gitRepoName' => 'sdk-for-js', 'gitUserName' => 'appwrite', - 'warning' => '', + 'warning' => 'This SDK if compitable with Appwrite server version ' . $version . ' for older versions check previous releases.', 'platform' => 'client', ], 'node' => [ - 'version' => '1.0.25', + 'version' => '1.0.26', 'result' => __DIR__.'/../sdks/node/', 'gitURL' => 'https://github.com/appwrite/sdk-for-node.git', 'gitRepo' => 'git@github.com:appwrite/sdk-for-node.git', 'gitRepoName' => 'sdk-for-node', 'gitUserName' => 'appwrite', - 'warning' => 'This SDK if compitable with Appwrite server version 0.2.0 for older versions check previous releases.', + 'warning' => 'This SDK if compitable with Appwrite server version ' . $version . ' for older versions check previous releases.', 'platform' => 'server', ], 'python' => [ diff --git a/composer.lock b/composer.lock index c1a3f41e58..40ac77a0cc 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,6 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "cf3e9453a93f3ee5cfec76f6cd6bc139", "content-hash": "470f543ebf989400a43a6269f0b4d60a", "packages": [ { @@ -13,12 +12,12 @@ "source": { "type": "git", "url": "https://github.com/appwrite/sdk-for-php.git", - "reference": "457a20948a7f1e9b8e4cea09205b6fd42f8ca811" + "reference": "456e2f153393bd67b7d706db1ec104ba211cf25a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/appwrite/sdk-for-php/zipball/457a20948a7f1e9b8e4cea09205b6fd42f8ca811", - "reference": "457a20948a7f1e9b8e4cea09205b6fd42f8ca811", + "url": "https://api.github.com/repos/appwrite/sdk-for-php/zipball/456e2f153393bd67b7d706db1ec104ba211cf25a", + "reference": "456e2f153393bd67b7d706db1ec104ba211cf25a", "shasum": "" }, "require": { @@ -40,7 +39,7 @@ "BSD-3-Clause" ], "description": "Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs)", - "time": "2019-09-21T12:46:08+00:00" + "time": "2019-10-01T18:05:56+00:00" }, { "name": "appwrite/php-clamav", @@ -93,15 +92,7 @@ "source": { "type": "git", "url": "https://github.com/appwrite/sdk-generator", -<<<<<<< HEAD -<<<<<<< HEAD - "reference": "2cdf218f735e5c52a47f1d8977f460261fd9017f" -======= - "reference": "22cd594e2406fbcfc64262fdcdfa78069bf29aa0" ->>>>>>> upstream/master -======= - "reference": "22cd594e2406fbcfc64262fdcdfa78069bf29aa0" ->>>>>>> upstream/master + "reference": "21f848c7c8a6f3f721c23d9c8bbdf8fff886863d" }, "require": { "ext-curl": "*", @@ -131,15 +122,7 @@ } ], "description": "Appwrite PHP library for generating API SDKs for multiple programming languages and platforms", -<<<<<<< HEAD -<<<<<<< HEAD - "time": "2019-09-22 12:47:11" -======= - "time": "2019-09-28 23:31:14" ->>>>>>> upstream/master -======= - "time": "2019-09-28 23:31:14" ->>>>>>> upstream/master + "time": "2019-10-01 17:57:36" }, { "name": "bacon/bacon-qr-code", @@ -188,7 +171,7 @@ ], "description": "BaconQrCode is a QR code generator for PHP.", "homepage": "https://github.com/Bacon/BaconQrCode", - "time": "2018-04-25 17:53:56" + "time": "2018-04-25T17:53:56+00:00" }, { "name": "chrisboulton/php-resque", @@ -321,7 +304,7 @@ ], "description": "Credis is a lightweight interface to the Redis key-value store which wraps the phpredis library when available for better performance.", "homepage": "https://github.com/colinmollenhour/credis", - "time": "2019-03-05 16:29:14" + "time": "2019-03-05T16:29:14+00:00" }, { "name": "composer/ca-bundle", @@ -419,7 +402,7 @@ "enum", "map" ], - "time": "2017-10-25 22:45:27" + "time": "2017-10-25T22:45:27+00:00" }, { "name": "domnikl/statsd", @@ -466,7 +449,7 @@ "statsd", "udp" ], - "time": "2014-12-09 09:37:49" + "time": "2014-12-09T09:37:49+00:00" }, { "name": "dragonmantank/cron-expression", @@ -515,7 +498,7 @@ "cron", "schedule" ], - "time": "2018-06-06 03:12:17" + "time": "2018-06-06T03:12:17+00:00" }, { "name": "geoip2/geoip2", @@ -567,7 +550,7 @@ "geolocation", "maxmind" ], - "time": "2018-04-10 15:32:59" + "time": "2018-04-10T15:32:59+00:00" }, { "name": "guzzlehttp/guzzle", @@ -816,7 +799,7 @@ "influxdb library", "time series" ], - "time": "2019-05-30 00:15:14" + "time": "2019-05-30T00:15:14+00:00" }, { "name": "matthiasmullie/minify", @@ -876,7 +859,7 @@ "minifier", "minify" ], - "time": "2018-11-26 23:10:39" + "time": "2018-11-26T23:10:39+00:00" }, { "name": "matthiasmullie/path-converter", @@ -925,29 +908,30 @@ "paths", "relative" ], - "time": "2018-10-25 15:19:41" + "time": "2018-10-25T15:19:41+00:00" }, { "name": "maxmind-db/reader", - "version": "v1.4.1", + "version": "v1.5.0", "source": { "type": "git", "url": "https://github.com/maxmind/MaxMind-DB-Reader-php.git", - "reference": "eb83d0ee1c1f9b8a340206302136bc81ee02ae74" + "reference": "bd436094fc0a9b0558a899fb80b0ae34fe1808a0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/maxmind/MaxMind-DB-Reader-php/zipball/eb83d0ee1c1f9b8a340206302136bc81ee02ae74", - "reference": "eb83d0ee1c1f9b8a340206302136bc81ee02ae74", + "url": "https://api.github.com/repos/maxmind/MaxMind-DB-Reader-php/zipball/bd436094fc0a9b0558a899fb80b0ae34fe1808a0", + "reference": "bd436094fc0a9b0558a899fb80b0ae34fe1808a0", "shasum": "" }, "require": { - "php": ">=5.4" + "php": ">=5.6" }, "require-dev": { "friendsofphp/php-cs-fixer": "2.*", - "phpunit/phpunit": "4.* || 5.*", - "satooshi/php-coveralls": "1.0.*", + "php-coveralls/php-coveralls": "^2.1", + "phpunit/phpcov": "^3.0", + "phpunit/phpunit": "5.*", "squizlabs/php_codesniffer": "3.*" }, "suggest": { @@ -969,7 +953,7 @@ { "name": "Gregory J. Oschwald", "email": "goschwald@maxmind.com", - "homepage": "http://www.maxmind.com/" + "homepage": "https://www.maxmind.com/" } ], "description": "MaxMind DB Reader API", @@ -981,7 +965,7 @@ "geolocation", "maxmind" ], - "time": "2019-01-04 19:55:56" + "time": "2019-09-30T22:56:38+00:00" }, { "name": "maxmind/web-service-common", @@ -1027,7 +1011,7 @@ ], "description": "Internal MaxMind Web Service API", "homepage": "https://github.com/maxmind/web-service-common-php", - "time": "2018-02-12 22:31:54" + "time": "2018-02-12T22:31:54+00:00" }, { "name": "mustangostang/spyc", @@ -1143,7 +1127,7 @@ } ], "description": "PHPMailer is a full-featured email creation and transfer class for PHP", - "time": "2019-02-01 15:04:28" + "time": "2019-02-01T15:04:28+00:00" }, { "name": "piwik/device-detector", @@ -1194,7 +1178,7 @@ "parser", "useragent" ], - "time": "2016-01-21 22:26:37" + "time": "2016-01-21T22:26:37+00:00" }, { "name": "psr/http-message", @@ -1331,7 +1315,7 @@ } ], "description": "A polyfill for getallheaders.", - "time": "2019-03-08 08:55:37" + "time": "2019-03-08T08:55:37+00:00" }, { "name": "symfony/polyfill-ctype", @@ -1456,16 +1440,16 @@ "source": { "type": "git", "url": "https://github.com/twigphp/Twig.git", - "reference": "c2fd9990fcab344b67a12ead04890a88141d5897" + "reference": "4625774716e3737580e407a02e53ff4defd3cdfa" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/c2fd9990fcab344b67a12ead04890a88141d5897", - "reference": "c2fd9990fcab344b67a12ead04890a88141d5897", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/4625774716e3737580e407a02e53ff4defd3cdfa", + "reference": "4625774716e3737580e407a02e53ff4defd3cdfa", "shasum": "" }, "require": { - "php": "^7.1.3", + "php": "^7.0", "symfony/polyfill-ctype": "^1.8", "symfony/polyfill-mbstring": "^1.3" }, @@ -1515,15 +1499,7 @@ "keywords": [ "templating" ], -<<<<<<< HEAD -<<<<<<< HEAD - "time": "2019-09-20 12:53:54" -======= - "time": "2019-09-20T12:53:54+00:00" ->>>>>>> upstream/master -======= - "time": "2019-09-20T12:53:54+00:00" ->>>>>>> upstream/master + "time": "2019-10-01T10:31:38+00:00" }, { "name": "utopia-php/abuse", @@ -1803,8 +1779,6 @@ "utopia" ], "time": "2019-05-08T20:25:57+00:00" -<<<<<<< HEAD -======= } ], "packages-dev": [ @@ -3222,10 +3196,8 @@ "validate" ], "time": "2019-08-24T08:43:50+00:00" ->>>>>>> upstream/master } ], - "packages-dev": null, "aliases": [], "minimum-stability": "dev", "stability-flags": [], diff --git a/docs/AddOAuthProvider.md b/docs/AddOAuthProvider.md index 290f2a91df..bca7d3bc82 100644 --- a/docs/AddOAuthProvider.md +++ b/docs/AddOAuthProvider.md @@ -6,13 +6,13 @@ This document is part of the Appwrite contributors' guide. Before you continue r ### Agenda -OAuth providers help users to log in easily to apps and websites without the need to provide passwords or any other type of credentials. Appwrite goal is to have support to as many **major** OAuth providers as possible. +OAuth providers help users to log in easily to apps and websites without the need to provide passwords or any other type of credentials. Appwrite goal is to have support from as many **major** OAuth providers as possible. -As of the writing of these lines, we do not accept any minor OAuth providers. For us to accept smaller and potentially unlimited number of providers some product design and software architecture changes must be applied first. +As of the writing of these lines, we do not accept any minor OAuth providers. For us to accept some smaller and potentially unlimited number of OAuth providers, some product design and software architecture changes must be applied first. ### List Your new Provider -The first step in adding a new OAuth provider is to list it in providers config file array, located at: +The first step to follow in adding a new OAuth provider is to add it to the list in providers config file array, located at: ``` ./app/config/providers.php @@ -22,28 +22,28 @@ Make sure to fill all data needed and that your provider array key name is in ca ### Add Provider Logo -Add a logo image to your new provider in this path: ./public/images/oauth. Your logo should be a png 100×100px file with the name of your provider (all lowercase). Please make sure to leave about 20px padding around the logo to be consistent with other logos. +Add a logo image to your new provider in this path: `./public/images/oauth`. Your logo should be a png 100×100px file with the name of your provider (all lowercase). Please make sure to leave about 20px padding around the logo to be consistent with other logos. ### Add Provider Class -Once finished setting all the metadata for the new provider you need to start coding. +Once you have finished setting up all the metadata for the new provider, you need to start coding. Create a new class that extends the basic OAuth provider abstract class in this location: ```bash -src/Auth/OAuth/ProviderName +./src/Auth/OAuth/ProviderName ``` Note that the class name should start with a capital letter as PHP FIG standards suggest. -Once created a new class you can start to implement your new provider login flow. The best way to do this right is to have a look at another provider implementation and try to follow the same standards. +Once a new class is created, you can start to implement your new provider's login flow. The best way to do this right is to have a look at another provider's implementation and try to follow the same standards. -Please mention in your documentation what resources or API docs you used to implement the provider OAuth protocol. +Please mention in your documentation what resources or API docs you used to implement the provider's OAuth protocol. ### Test Your Provider -After you finished adding your new provider to Appwrite you should be able to see it in your Appwrite console. Navigate to 'Project>Users>Providers' and check your new provider's settings form. +After you finished adding your new provider to Appwrite you should be able to see it in your Appwrite console. Navigate to 'Project > Users > Providers' and check your new provider's settings form. -Add credentials and check both a successful and a failed login (where user reject integration on provider page). +Add credentials and check both a successful and a failed login (where the user rejects integration on provider page). -If everything goes well, just send us the pull request and be responsive if any feedback arise during our code review. \ No newline at end of file +If everything goes well, just send us the pull request and be ready to respond to any feedback which can arise during our code review. diff --git a/public/images/oauth/bitbucket.png b/public/images/oauth/bitbucket.png new file mode 100644 index 0000000000..8c7442e9e7 Binary files /dev/null and b/public/images/oauth/bitbucket.png differ diff --git a/public/images/oauth/google.png b/public/images/oauth/google.png index cd60f3a111..de66a7b99c 100644 Binary files a/public/images/oauth/google.png and b/public/images/oauth/google.png differ diff --git a/src/Auth/OAuth/Bitbucket.php b/src/Auth/OAuth/Bitbucket.php new file mode 100644 index 0000000000..902c0a4238 --- /dev/null +++ b/src/Auth/OAuth/Bitbucket.php @@ -0,0 +1,129 @@ +appID). + '&state=' . urlencode(json_encode($this->state)). + '&response_type=code'; + } + + /** + * @param string $code + * + * @return string + */ + public function getAccessToken(string $code): string + { + // Required as per Bitbucket Spec. + $headers[] = 'Content-Type: application/x-www-form-urlencoded'; + + $accessToken = $this->request( + 'POST', + 'https://bitbucket.org/site/oauth2/access_token', + $headers, + 'code=' . urlencode($code) . + '&client_id=' . urlencode($this->appID) . + '&client_secret=' . urlencode($this->appSecret). + '&grant_type=authorization_code' + ); + + $accessToken = json_decode($accessToken, true); + + if (isset($accessToken['access_token'])) { + return $accessToken['access_token']; + } + + return ''; + } + + /** + * @param string $accessToken + * + * @return string + */ + public function getUserID(string $accessToken): string + { + $user = $this->getUser($accessToken); + + if (isset($user['uuid'])) { + return $user['uuid']; + } + + return ''; + } + + /** + * @param string $accessToken + * + * @return string + */ + public function getUserEmail(string $accessToken): string + { + $user = $this->getUser($accessToken); + + if (isset($user['email'])) { + return $user['email']; + } + + return ''; + } + + /** + * @param string $accessToken + * + * @return string + */ + public function getUserName(string $accessToken): string + { + $user = $this->getUser($accessToken); + + if (isset($user['display_name'])) { + return $user['display_name']; + } + + return ''; + } + + /** + * @param string $accessToken + * + * @return array + */ + protected function getUser(string $accessToken): array + { + if (empty($this->user)) { + $user = $this->request('GET', 'https://api.bitbucket.org/2.0/user?access_token='.urlencode($accessToken)); + $this->user = json_decode($user, true); + + $email = $this->request('GET', 'https://api.bitbucket.org/2.0/user/emails?access_token='.urlencode($accessToken)); + $this->user['email'] = json_decode($email, true)['values'][0]['email']; + } + return $this->user; + } +} diff --git a/tests/e2e/ConsoleProjectsTest.php b/tests/e2e/ConsoleProjectsTest.php index e0bd1b39be..3a0b2df8e7 100644 --- a/tests/e2e/ConsoleProjectsTest.php +++ b/tests/e2e/ConsoleProjectsTest.php @@ -10,8 +10,10 @@ class ConsoleProjectsTest extends BaseConsole { $response = $this->register(); + var_dump($response); + $this->assertEquals('http://localhost/success', $response['headers']['location']); - $this->assertEquals("\n", $response['body']); + $this->assertEquals("", $response['body']); $session = $this->client->parseCookie($response['headers']['set-cookie'])['a-session-console']; diff --git a/tests/e2e/ConsoleTest.php b/tests/e2e/ConsoleTest.php index 624b15dd75..6d2a6e4ffb 100644 --- a/tests/e2e/ConsoleTest.php +++ b/tests/e2e/ConsoleTest.php @@ -10,10 +10,8 @@ class ConsoleTest extends BaseConsole { $response = $this->register(); - var_dump($_SERVER); - $this->assertEquals('http://localhost/success', $response['headers']['location']); - $this->assertEquals("\n", $response['body']); + $this->assertEquals("", $response['body']); return [ 'email' => $this->demoEmail, @@ -39,7 +37,7 @@ class ConsoleTest extends BaseConsole $session = $this->client->parseCookie($response['headers']['set-cookie'])['a-session-console']; $this->assertEquals('http://localhost/success', $response['headers']['location']); - $this->assertEquals("\n", $response['body']); + $this->assertEquals("", $response['body']); return [ 'email' => $data['email'], diff --git a/tests/e2e/ProjectDatabaseTest.php b/tests/e2e/ProjectDatabaseTest.php index e253e89d53..890795ce42 100644 --- a/tests/e2e/ProjectDatabaseTest.php +++ b/tests/e2e/ProjectDatabaseTest.php @@ -11,7 +11,7 @@ class ProjectDatabaseTest extends BaseProjects $response = $this->register(); $this->assertEquals('http://localhost/success', $response['headers']['location']); - $this->assertEquals("\n", $response['body']); + $this->assertEquals("", $response['body']); $session = $this->client->parseCookie($response['headers']['set-cookie'])['a-session-console']; @@ -64,7 +64,7 @@ class ProjectDatabaseTest extends BaseProjects $user = $this->projectRegister($project['body']['$uid']); $this->assertEquals('http://localhost/success', $user['headers']['location']); - $this->assertEquals("\n", $user['body']); + $this->assertEquals("", $user['body']); return [ 'email' => $this->demoEmail,