Skip to content

Commit 223da5d

Browse files
Merge branch 'master' into patch-1
2 parents e4b8b13 + 89f8035 commit 223da5d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+636
-1379
lines changed

composer.lock

Lines changed: 80 additions & 79 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

example.php

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ function getSSLPage($url) {
4141
// $platform = 'console';
4242
// $platform = 'server';
4343

44-
$spec = getSSLPage("https://raw.githubusercontent.com/appwrite/appwrite/master/app/config/specs/swagger2-latest-${platform}.json");
44+
$spec = getSSLPage("https://raw.githubusercontent.com/appwrite/appwrite/master/app/config/specs/swagger2-latest-{$platform}.json");
4545

4646
if(empty($spec)) {
4747
throw new Exception('Failed to fetch spec from Appwrite server');
@@ -68,7 +68,7 @@ function getSSLPage($url) {
6868
->setTwitter('appwrite_io')
6969
->setDiscord('564160730845151244', 'https://appwrite.io/discord')
7070
->setDefaultHeaders([
71-
'X-Appwrite-Response-Format' => '0.7.0',
71+
'X-Appwrite-Response-Format' => '1.2.0',
7272
])
7373
;
7474

@@ -93,7 +93,7 @@ function getSSLPage($url) {
9393
->setTwitter('appwrite_io')
9494
->setDiscord('564160730845151244', 'https://appwrite.io/discord')
9595
->setDefaultHeaders([
96-
'X-Appwrite-Response-Format' => '0.7.0',
96+
'X-Appwrite-Response-Format' => '1.2.0',
9797
])
9898
;
9999

@@ -117,7 +117,7 @@ function getSSLPage($url) {
117117
->setTwitter('appwrite_io')
118118
->setDiscord('564160730845151244', 'https://appwrite.io/discord')
119119
->setDefaultHeaders([
120-
'X-Appwrite-Response-Format' => '0.7.0',
120+
'X-Appwrite-Response-Format' => '1.2.0',
121121
])
122122
;
123123

@@ -140,7 +140,7 @@ function getSSLPage($url) {
140140
->setTwitter('appwrite_io')
141141
->setDiscord('564160730845151244', 'https://appwrite.io/discord')
142142
->setDefaultHeaders([
143-
'X-Appwrite-Response-Format' => '0.7.0',
143+
'X-Appwrite-Response-Format' => '1.2.0',
144144
])
145145
;
146146

@@ -208,7 +208,7 @@ function getSSLPage($url) {
208208
->setTwitter('appwrite_io')
209209
->setDiscord('564160730845151244', 'https://appwrite.io/discord')
210210
->setDefaultHeaders([
211-
'X-Appwrite-Response-Format' => '0.7.0',
211+
'X-Appwrite-Response-Format' => '1.2.0',
212212
])
213213
;
214214

@@ -231,7 +231,7 @@ function getSSLPage($url) {
231231
->setTwitter('appwrite_io')
232232
->setDiscord('564160730845151244', 'https://appwrite.io/discord')
233233
->setDefaultHeaders([
234-
'X-Appwrite-Response-Format' => '0.7.0',
234+
'X-Appwrite-Response-Format' => '1.2.0',
235235
])
236236
;
237237

@@ -259,7 +259,7 @@ function getSSLPage($url) {
259259
->setTwitter('appwrite_io')
260260
->setDiscord('564160730845151244', 'https://appwrite.io/discord')
261261
->setDefaultHeaders([
262-
'X-Appwrite-Response-Format' => '0.7.0',
262+
'X-Appwrite-Response-Format' => '1.2.0',
263263
])
264264
;
265265

@@ -286,7 +286,7 @@ function getSSLPage($url) {
286286
->setTwitter('appwrite_io')
287287
->setDiscord('564160730845151244', 'https://appwrite.io/discord')
288288
->setDefaultHeaders([
289-
'X-Appwrite-Response-Format' => '0.7.0',
289+
'X-Appwrite-Response-Format' => '1.2.0',
290290
])
291291
;
292292

@@ -311,7 +311,7 @@ function getSSLPage($url) {
311311
->setTwitter('appwrite_io')
312312
->setDiscord('564160730845151244', 'https://appwrite.io/discord')
313313
->setDefaultHeaders([
314-
'X-Appwrite-Response-Format' => '0.7.0',
314+
'X-Appwrite-Response-Format' => '1.2.0',
315315
])
316316
;
317317

@@ -336,7 +336,7 @@ function getSSLPage($url) {
336336
->setTwitter('appwrite_io')
337337
->setDiscord('564160730845151244', 'https://appwrite.io/discord')
338338
->setDefaultHeaders([
339-
'X-Appwrite-Response-Format' => '0.7.0',
339+
'X-Appwrite-Response-Format' => '1.2.0',
340340
])
341341
;
342342

@@ -360,7 +360,7 @@ function getSSLPage($url) {
360360
->setTwitter('appwrite_io')
361361
->setDiscord('564160730845151244', 'https://appwrite.io/discord')
362362
->setDefaultHeaders([
363-
'X-Appwrite-Response-Format' => '0.7.0',
363+
'X-Appwrite-Response-Format' => '1.2.0',
364364
])
365365
;
366366

@@ -384,7 +384,7 @@ function getSSLPage($url) {
384384
->setTwitter('appwrite_io')
385385
->setDiscord('564160730845151244', 'https://appwrite.io/discord')
386386
->setDefaultHeaders([
387-
'X-Appwrite-Response-Format' => '0.7.0',
387+
'X-Appwrite-Response-Format' => '1.2.0',
388388
])
389389
;
390390

src/SDK/Language/Flutter.php

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -205,26 +205,6 @@ public function getFiles(): array
205205
'destination' => '/lib/src/interceptor.dart',
206206
'template' => 'flutter/lib/src/interceptor.dart.twig',
207207
],
208-
[
209-
'scope' => 'default',
210-
'destination' => '/lib/src/offline_db_io.dart',
211-
'template' => 'flutter/lib/src/offline_db_io.dart.twig',
212-
],
213-
[
214-
'scope' => 'default',
215-
'destination' => '/lib/src/offline_db_stub.dart',
216-
'template' => 'flutter/lib/src/offline_db_stub.dart.twig',
217-
],
218-
[
219-
'scope' => 'default',
220-
'destination' => '/lib/src/offline_db_web.dart',
221-
'template' => 'flutter/lib/src/offline_db_web.dart.twig',
222-
],
223-
[
224-
'scope' => 'default',
225-
'destination' => '/lib/src/client_offline_mixin.dart',
226-
'template' => 'flutter/lib/src/client_offline_mixin.dart.twig',
227-
],
228208
[
229209
'scope' => 'default',
230210
'destination' => '/lib/{{ language.params.packageName }}.dart',

src/Spec/Swagger2.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -184,11 +184,6 @@ public function getMethods($service)
184184
'query' => [],
185185
'body' => [],
186186
],
187-
'offline' => [
188-
'model' => $method['x-appwrite']['offline-model'] ?? '',
189-
'key' => $method['x-appwrite']['offline-key'] ?? '',
190-
'response-key' => $method['x-appwrite']['offline-response-key'] ?? '$id',
191-
],
192187
'emptyResponse' => $emptyResponse,
193188
'responseModel' => $responseModel,
194189
];

templates/android/build.gradle.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apply plugin: 'io.github.gradle-nexus.publish-plugin'
22

33
// Top-level build file where you can add configuration options common to all sub-projects/modules.
44
buildscript {
5-
ext.kotlin_version = "1.7.10"
5+
ext.kotlin_version = "1.8.0"
66
version System.getenv("SDK_VERSION")
77
repositories {
88
maven { url "https://plugins.gradle.org/m2/" }

templates/android/example-java/build.gradle.twig

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ plugins {
33
}
44

55
android {
6-
compileSdkVersion 31
6+
compileSdkVersion 33
77

88
defaultConfig {
99
applicationId "{{ sdk.namespace | caseDot }}.example_java"
1010
minSdkVersion 23
11-
targetSdkVersion 31
11+
targetSdkVersion 33
1212
versionCode 1
1313
versionName "1.0"
1414

@@ -30,10 +30,10 @@ android {
3030
dependencies {
3131
implementation project(path: ':library')
3232

33-
implementation 'androidx.appcompat:appcompat:1.3.0'
34-
implementation 'com.google.android.material:material:1.3.0'
35-
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
36-
testImplementation 'junit:junit:4.+'
37-
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
38-
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
33+
implementation 'androidx.appcompat:appcompat:1.6.0'
34+
implementation 'com.google.android.material:material:1.8.0'
35+
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
36+
testImplementation 'junit:junit:4.13.2'
37+
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
38+
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
3939
}

templates/android/example/build.gradle.twig

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ plugins {
44
}
55

66
android {
7-
compileSdkVersion 31
7+
compileSdkVersion 33
88

99
defaultConfig {
1010
applicationId "{{ sdk.namespace | caseDot }}.android"
1111
minSdkVersion 21
12-
targetSdkVersion 31
12+
targetSdkVersion 33
1313
versionCode 1
1414
versionName "1.0"
1515

@@ -39,20 +39,20 @@ dependencies {
3939
implementation project(path: ':library')
4040

4141
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
42-
implementation 'androidx.core:core-ktx:1.6.0'
43-
implementation 'androidx.appcompat:appcompat:1.3.1'
44-
implementation 'com.google.android.material:material:1.4.0'
45-
implementation 'androidx.constraintlayout:constraintlayout:2.1.1'
46-
implementation 'androidx.navigation:navigation-fragment-ktx:2.3.5'
47-
implementation "androidx.fragment:fragment-ktx:1.3.6"
48-
implementation 'androidx.navigation:navigation-ui-ktx:2.3.5'
49-
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.3.1'
50-
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.1'
51-
implementation 'androidx.navigation:navigation-fragment-ktx:2.3.5'
52-
implementation 'androidx.navigation:navigation-ui-ktx:2.3.5'
42+
implementation 'androidx.core:core-ktx:1.9.0'
43+
implementation 'androidx.appcompat:appcompat:1.6.0'
44+
implementation 'com.google.android.material:material:1.8.0'
45+
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
46+
implementation 'androidx.navigation:navigation-fragment-ktx:2.5.3'
47+
implementation "androidx.fragment:fragment-ktx:1.5.5"
48+
implementation 'androidx.navigation:navigation-ui-ktx:2.5.3'
49+
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.5.1'
50+
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.5.1'
51+
implementation 'androidx.navigation:navigation-fragment-ktx:2.5.3'
52+
implementation 'androidx.navigation:navigation-ui-ktx:2.5.3'
5353
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.2"
54-
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.2"
55-
testImplementation 'junit:junit:4.+'
56-
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
57-
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
54+
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.1"
55+
testImplementation 'junit:junit:4.13.2'
56+
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
57+
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
5858
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#Tue Jun 01 15:55:54 IST 2021
22
distributionBase=GRADLE_USER_HOME
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip
44
distributionPath=wrapper/dists
55
zipStorePath=wrapper/dists
66
zipStoreBase=GRADLE_USER_HOME

templates/android/library/build.gradle.twig

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ android {
5353
}
5454

5555
dependencies {
56-
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:${org.jetbrains.kotlin.config.KotlinCompilerVersion.VERSION}")
56+
implementation("org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version")
5757
api("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.1")
5858
api("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.1")
5959

@@ -65,14 +65,14 @@ dependencies {
6565

6666
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.5.1")
6767
implementation("androidx.lifecycle:lifecycle-common-java8:2.5.1")
68-
implementation("androidx.appcompat:appcompat:1.5.1")
69-
implementation("androidx.fragment:fragment-ktx:1.5.3")
70-
implementation("androidx.activity:activity-ktx:1.6.0")
68+
implementation("androidx.appcompat:appcompat:1.6.0")
69+
implementation("androidx.fragment:fragment-ktx:1.5.5")
70+
implementation("androidx.activity:activity-ktx:1.6.1")
7171
implementation("androidx.browser:browser:1.4.0")
7272

73-
testImplementation 'junit:junit:4.+'
74-
testImplementation "androidx.test.ext:junit-ktx:1.1.3"
75-
testImplementation "androidx.test:core-ktx:1.4.0"
73+
testImplementation 'junit:junit:4.13.2'
74+
testImplementation "androidx.test.ext:junit-ktx:1.1.5"
75+
testImplementation "androidx.test:core-ktx:1.5.0"
7676
testImplementation "org.robolectric:robolectric:4.5.1"
7777
testApi("org.jetbrains.kotlinx:kotlinx-coroutines-test:1.6.1")
7878
}

templates/android/library/src/main/java/io/appwrite/Query.kt.twig

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,22 @@ class Query {
1616

1717
fun search(attribute: String, value: String) = Query.addQuery(attribute, "search", value)
1818

19+
fun isNull(attribute: String) = "isNull(\"${attribute}\")"
20+
21+
fun isNotNull(attribute: String) = "isNotNull(\"${attribute}\")"
22+
23+
fun between(attribute: String, start: Int, end: Int) = Query.addQuery(attribute, "between", listOf(start, end))
24+
25+
fun between(attribute: String, start: Double, end: Double) = Query.addQuery(attribute, "between", listOf(start, end))
26+
27+
fun between(attribute: String, start: String, end: String) = Query.addQuery(attribute, "between", listOf(start, end))
28+
29+
fun startsWith(attribute: String, value: String) = Query.addQuery(attribute, "startsWith", value)
30+
31+
fun endsWith(attribute: String, value: String) = Query.addQuery(attribute, "endsWith", value)
32+
33+
fun select(attributes: List<String>) = "select([${attributes.joinToString(",") { "\"$it\"" }}])"
34+
1935
fun orderAsc(attribute: String) = "orderAsc(\"${attribute}\")"
2036

2137
fun orderDesc(attribute: String) = "orderDesc(\"${attribute}\")"

0 commit comments

Comments
 (0)