react-native-appwrite 0.11.0 → 0.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (125) hide show
  1. package/README.md +84 -3
  2. package/dist/cjs/sdk.js +1741 -1120
  3. package/dist/cjs/sdk.js.map +1 -1
  4. package/dist/esm/sdk.js +1741 -1121
  5. package/dist/esm/sdk.js.map +1 -1
  6. package/docs/examples/account/create-email-password-session.md +4 -4
  7. package/docs/examples/account/create-email-token.md +5 -5
  8. package/docs/examples/account/{create-magic-u-r-l-token.md → create-magic-url-token.md} +6 -6
  9. package/docs/examples/account/create-mfa-authenticator.md +3 -3
  10. package/docs/examples/account/create-mfa-challenge.md +3 -3
  11. package/docs/examples/account/create-mfa-recovery-codes.md +1 -1
  12. package/docs/examples/account/{create-o-auth2token.md → create-o-auth-2-session.md} +6 -6
  13. package/docs/examples/account/{create-o-auth2session.md → create-o-auth-2-token.md} +6 -6
  14. package/docs/examples/account/create-phone-token.md +4 -4
  15. package/docs/examples/account/create-push-target.md +5 -5
  16. package/docs/examples/account/create-recovery.md +4 -4
  17. package/docs/examples/account/create-session.md +4 -4
  18. package/docs/examples/account/create-verification.md +3 -3
  19. package/docs/examples/account/create.md +6 -6
  20. package/docs/examples/account/delete-identity.md +3 -3
  21. package/docs/examples/account/delete-mfa-authenticator.md +3 -3
  22. package/docs/examples/account/delete-push-target.md +3 -3
  23. package/docs/examples/account/delete-session.md +3 -3
  24. package/docs/examples/account/get-mfa-recovery-codes.md +1 -1
  25. package/docs/examples/account/get-session.md +3 -3
  26. package/docs/examples/account/list-identities.md +3 -3
  27. package/docs/examples/account/list-logs.md +3 -3
  28. package/docs/examples/account/list-mfa-factors.md +1 -1
  29. package/docs/examples/account/update-email.md +4 -4
  30. package/docs/examples/account/{update-magic-u-r-l-session.md → update-magic-url-session.md} +4 -4
  31. package/docs/examples/account/update-mfa-authenticator.md +4 -4
  32. package/docs/examples/account/update-mfa-challenge.md +4 -4
  33. package/docs/examples/account/update-mfa-recovery-codes.md +1 -1
  34. package/docs/examples/account/{update-m-f-a.md → update-mfa.md} +3 -3
  35. package/docs/examples/account/update-name.md +3 -3
  36. package/docs/examples/account/update-password.md +4 -4
  37. package/docs/examples/account/update-phone-session.md +4 -4
  38. package/docs/examples/account/update-phone-verification.md +4 -4
  39. package/docs/examples/account/update-phone.md +4 -4
  40. package/docs/examples/account/update-prefs.md +3 -3
  41. package/docs/examples/account/update-push-target.md +4 -4
  42. package/docs/examples/account/update-recovery.md +5 -5
  43. package/docs/examples/account/update-session.md +3 -3
  44. package/docs/examples/account/update-verification.md +4 -4
  45. package/docs/examples/avatars/get-browser.md +6 -6
  46. package/docs/examples/avatars/get-credit-card.md +6 -6
  47. package/docs/examples/avatars/get-favicon.md +3 -3
  48. package/docs/examples/avatars/get-flag.md +6 -6
  49. package/docs/examples/avatars/get-image.md +5 -5
  50. package/docs/examples/avatars/get-initials.md +6 -6
  51. package/docs/examples/avatars/{get-q-r.md → get-qr.md} +6 -6
  52. package/docs/examples/databases/create-document.md +7 -7
  53. package/docs/examples/databases/decrement-document-attribute.md +8 -8
  54. package/docs/examples/databases/delete-document.md +5 -5
  55. package/docs/examples/databases/get-document.md +6 -6
  56. package/docs/examples/databases/increment-document-attribute.md +8 -8
  57. package/docs/examples/databases/list-documents.md +5 -5
  58. package/docs/examples/databases/update-document.md +7 -7
  59. package/docs/examples/databases/upsert-document.md +7 -7
  60. package/docs/examples/functions/create-execution.md +9 -9
  61. package/docs/examples/functions/get-execution.md +4 -4
  62. package/docs/examples/functions/list-executions.md +4 -4
  63. package/docs/examples/graphql/mutation.md +3 -3
  64. package/docs/examples/graphql/query.md +3 -3
  65. package/docs/examples/messaging/create-subscriber.md +5 -5
  66. package/docs/examples/messaging/delete-subscriber.md +4 -4
  67. package/docs/examples/storage/create-file.md +6 -6
  68. package/docs/examples/storage/delete-file.md +4 -4
  69. package/docs/examples/storage/get-file-download.md +5 -5
  70. package/docs/examples/storage/get-file-preview.md +16 -16
  71. package/docs/examples/storage/get-file-view.md +5 -5
  72. package/docs/examples/storage/get-file.md +4 -4
  73. package/docs/examples/storage/list-files.md +5 -5
  74. package/docs/examples/storage/update-file.md +6 -6
  75. package/docs/examples/tablesdb/create-row.md +17 -0
  76. package/docs/examples/tablesdb/decrement-row-column.md +18 -0
  77. package/docs/examples/tablesdb/delete-row.md +15 -0
  78. package/docs/examples/tablesdb/get-row.md +16 -0
  79. package/docs/examples/tablesdb/increment-row-column.md +18 -0
  80. package/docs/examples/tablesdb/list-rows.md +15 -0
  81. package/docs/examples/tablesdb/update-row.md +17 -0
  82. package/docs/examples/tablesdb/upsert-row.md +17 -0
  83. package/docs/examples/teams/create-membership.md +9 -9
  84. package/docs/examples/teams/create.md +5 -5
  85. package/docs/examples/teams/delete-membership.md +4 -4
  86. package/docs/examples/teams/delete.md +3 -3
  87. package/docs/examples/teams/get-membership.md +4 -4
  88. package/docs/examples/teams/get-prefs.md +3 -3
  89. package/docs/examples/teams/get.md +3 -3
  90. package/docs/examples/teams/list-memberships.md +5 -5
  91. package/docs/examples/teams/list.md +4 -4
  92. package/docs/examples/teams/update-membership-status.md +6 -6
  93. package/docs/examples/teams/update-membership.md +5 -5
  94. package/docs/examples/teams/update-name.md +4 -4
  95. package/docs/examples/teams/update-prefs.md +4 -4
  96. package/package.json +1 -1
  97. package/src/client.ts +2 -2
  98. package/src/index.ts +1 -0
  99. package/src/models.ts +72 -27
  100. package/src/query.ts +95 -0
  101. package/src/services/account.ts +1469 -315
  102. package/src/services/avatars.ts +289 -80
  103. package/src/services/databases.ts +354 -63
  104. package/src/services/functions.ts +115 -20
  105. package/src/services/graphql.ts +52 -4
  106. package/src/services/locale.ts +8 -19
  107. package/src/services/messaging.ts +66 -7
  108. package/src/services/storage.ts +345 -76
  109. package/src/services/tables-db.ts +621 -0
  110. package/src/services/teams.ts +454 -93
  111. package/types/index.d.ts +1 -0
  112. package/types/models.d.ts +69 -25
  113. package/types/query.d.ts +77 -0
  114. package/types/services/account.d.ts +734 -280
  115. package/types/services/avatars.d.ts +168 -73
  116. package/types/services/databases.d.ts +199 -58
  117. package/types/services/functions.d.ts +62 -17
  118. package/types/services/graphql.d.ts +24 -2
  119. package/types/services/locale.d.ts +8 -19
  120. package/types/services/messaging.d.ts +33 -5
  121. package/types/services/storage.d.ts +201 -68
  122. package/types/services/tables-db.d.ts +245 -0
  123. package/types/services/teams.d.ts +242 -80
  124. /package/docs/examples/account/{create-j-w-t.md → create-jwt.md} +0 -0
  125. /package/docs/examples/locale/{list-countries-e-u.md → list-countries-eu.md} +0 -0
@@ -6,10 +6,10 @@ const client = new Client()
6
6
 
7
7
  const teams = new Teams(client);
8
8
 
9
- const result = await teams.create(
10
- '<TEAM_ID>', // teamId
11
- '<NAME>', // name
12
- [] // roles (optional)
13
- );
9
+ const result = await teams.create({
10
+ teamId: '<TEAM_ID>',
11
+ name: '<NAME>',
12
+ roles: [] // optional
13
+ });
14
14
 
15
15
  console.log(result);
@@ -6,9 +6,9 @@ const client = new Client()
6
6
 
7
7
  const teams = new Teams(client);
8
8
 
9
- const result = await teams.deleteMembership(
10
- '<TEAM_ID>', // teamId
11
- '<MEMBERSHIP_ID>' // membershipId
12
- );
9
+ const result = await teams.deleteMembership({
10
+ teamId: '<TEAM_ID>',
11
+ membershipId: '<MEMBERSHIP_ID>'
12
+ });
13
13
 
14
14
  console.log(result);
@@ -6,8 +6,8 @@ const client = new Client()
6
6
 
7
7
  const teams = new Teams(client);
8
8
 
9
- const result = await teams.delete(
10
- '<TEAM_ID>' // teamId
11
- );
9
+ const result = await teams.delete({
10
+ teamId: '<TEAM_ID>'
11
+ });
12
12
 
13
13
  console.log(result);
@@ -6,9 +6,9 @@ const client = new Client()
6
6
 
7
7
  const teams = new Teams(client);
8
8
 
9
- const result = await teams.getMembership(
10
- '<TEAM_ID>', // teamId
11
- '<MEMBERSHIP_ID>' // membershipId
12
- );
9
+ const result = await teams.getMembership({
10
+ teamId: '<TEAM_ID>',
11
+ membershipId: '<MEMBERSHIP_ID>'
12
+ });
13
13
 
14
14
  console.log(result);
@@ -6,8 +6,8 @@ const client = new Client()
6
6
 
7
7
  const teams = new Teams(client);
8
8
 
9
- const result = await teams.getPrefs(
10
- '<TEAM_ID>' // teamId
11
- );
9
+ const result = await teams.getPrefs({
10
+ teamId: '<TEAM_ID>'
11
+ });
12
12
 
13
13
  console.log(result);
@@ -6,8 +6,8 @@ const client = new Client()
6
6
 
7
7
  const teams = new Teams(client);
8
8
 
9
- const result = await teams.get(
10
- '<TEAM_ID>' // teamId
11
- );
9
+ const result = await teams.get({
10
+ teamId: '<TEAM_ID>'
11
+ });
12
12
 
13
13
  console.log(result);
@@ -6,10 +6,10 @@ const client = new Client()
6
6
 
7
7
  const teams = new Teams(client);
8
8
 
9
- const result = await teams.listMemberships(
10
- '<TEAM_ID>', // teamId
11
- [], // queries (optional)
12
- '<SEARCH>' // search (optional)
13
- );
9
+ const result = await teams.listMemberships({
10
+ teamId: '<TEAM_ID>',
11
+ queries: [], // optional
12
+ search: '<SEARCH>' // optional
13
+ });
14
14
 
15
15
  console.log(result);
@@ -6,9 +6,9 @@ const client = new Client()
6
6
 
7
7
  const teams = new Teams(client);
8
8
 
9
- const result = await teams.list(
10
- [], // queries (optional)
11
- '<SEARCH>' // search (optional)
12
- );
9
+ const result = await teams.list({
10
+ queries: [], // optional
11
+ search: '<SEARCH>' // optional
12
+ });
13
13
 
14
14
  console.log(result);
@@ -6,11 +6,11 @@ const client = new Client()
6
6
 
7
7
  const teams = new Teams(client);
8
8
 
9
- const result = await teams.updateMembershipStatus(
10
- '<TEAM_ID>', // teamId
11
- '<MEMBERSHIP_ID>', // membershipId
12
- '<USER_ID>', // userId
13
- '<SECRET>' // secret
14
- );
9
+ const result = await teams.updateMembershipStatus({
10
+ teamId: '<TEAM_ID>',
11
+ membershipId: '<MEMBERSHIP_ID>',
12
+ userId: '<USER_ID>',
13
+ secret: '<SECRET>'
14
+ });
15
15
 
16
16
  console.log(result);
@@ -6,10 +6,10 @@ const client = new Client()
6
6
 
7
7
  const teams = new Teams(client);
8
8
 
9
- const result = await teams.updateMembership(
10
- '<TEAM_ID>', // teamId
11
- '<MEMBERSHIP_ID>', // membershipId
12
- [] // roles
13
- );
9
+ const result = await teams.updateMembership({
10
+ teamId: '<TEAM_ID>',
11
+ membershipId: '<MEMBERSHIP_ID>',
12
+ roles: []
13
+ });
14
14
 
15
15
  console.log(result);
@@ -6,9 +6,9 @@ const client = new Client()
6
6
 
7
7
  const teams = new Teams(client);
8
8
 
9
- const result = await teams.updateName(
10
- '<TEAM_ID>', // teamId
11
- '<NAME>' // name
12
- );
9
+ const result = await teams.updateName({
10
+ teamId: '<TEAM_ID>',
11
+ name: '<NAME>'
12
+ });
13
13
 
14
14
  console.log(result);
@@ -6,9 +6,9 @@ const client = new Client()
6
6
 
7
7
  const teams = new Teams(client);
8
8
 
9
- const result = await teams.updatePrefs(
10
- '<TEAM_ID>', // teamId
11
- {} // prefs
12
- );
9
+ const result = await teams.updatePrefs({
10
+ teamId: '<TEAM_ID>',
11
+ prefs: {}
12
+ });
13
13
 
14
14
  console.log(result);
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "react-native-appwrite",
3
3
  "homepage": "https://appwrite.io/support",
4
4
  "description": "Appwrite is an open-source self-hosted backend server that abstract and simplify complex and repetitive development tasks behind a very simple REST API",
5
- "version": "0.11.0",
5
+ "version": "0.12.0",
6
6
  "license": "BSD-3-Clause",
7
7
  "main": "dist/cjs/sdk.js",
8
8
  "exports": {
package/src/client.ts CHANGED
@@ -115,8 +115,8 @@ class Client {
115
115
  'x-sdk-name': 'React Native',
116
116
  'x-sdk-platform': 'client',
117
117
  'x-sdk-language': 'reactnative',
118
- 'x-sdk-version': '0.11.0',
119
- 'X-Appwrite-Response-Format': '1.7.0',
118
+ 'x-sdk-version': '0.12.0',
119
+ 'X-Appwrite-Response-Format': '1.8.0',
120
120
  };
121
121
 
122
122
  /**
package/src/index.ts CHANGED
@@ -7,6 +7,7 @@ export { Graphql } from './services/graphql';
7
7
  export { Locale } from './services/locale';
8
8
  export { Messaging } from './services/messaging';
9
9
  export { Storage } from './services/storage';
10
+ export { TablesDB } from './services/tables-db';
10
11
  export { Teams } from './services/teams';
11
12
  export type { Models, Payload, RealtimeResponseEvent, UploadProgress } from './client';
12
13
  export type { QueryTypes, QueryTypesList } from './query';
package/src/models.ts CHANGED
@@ -2,12 +2,26 @@ export namespace Models {
2
2
 
3
3
  declare const __default: unique symbol;
4
4
 
5
+ /**
6
+ * Rows List
7
+ */
8
+ export type RowList<Row extends Models.Row = Models.DefaultRow> = {
9
+ /**
10
+ * Total number of rows that matched your query.
11
+ */
12
+ total: number;
13
+ /**
14
+ * List of rows.
15
+ */
16
+ rows: Row[];
17
+ }
18
+
5
19
  /**
6
20
  * Documents List
7
21
  */
8
22
  export type DocumentList<Document extends Models.Document = Models.DefaultDocument> = {
9
23
  /**
10
- * Total number of documents documents that matched your query.
24
+ * Total number of documents that matched your query.
11
25
  */
12
26
  total: number;
13
27
  /**
@@ -21,7 +35,7 @@ export namespace Models {
21
35
  */
22
36
  export type SessionList = {
23
37
  /**
24
- * Total number of sessions documents that matched your query.
38
+ * Total number of sessions that matched your query.
25
39
  */
26
40
  total: number;
27
41
  /**
@@ -35,7 +49,7 @@ export namespace Models {
35
49
  */
36
50
  export type IdentityList = {
37
51
  /**
38
- * Total number of identities documents that matched your query.
52
+ * Total number of identities that matched your query.
39
53
  */
40
54
  total: number;
41
55
  /**
@@ -49,7 +63,7 @@ export namespace Models {
49
63
  */
50
64
  export type LogList = {
51
65
  /**
52
- * Total number of logs documents that matched your query.
66
+ * Total number of logs that matched your query.
53
67
  */
54
68
  total: number;
55
69
  /**
@@ -63,7 +77,7 @@ export namespace Models {
63
77
  */
64
78
  export type FileList = {
65
79
  /**
66
- * Total number of files documents that matched your query.
80
+ * Total number of files that matched your query.
67
81
  */
68
82
  total: number;
69
83
  /**
@@ -77,7 +91,7 @@ export namespace Models {
77
91
  */
78
92
  export type TeamList<Preferences extends Models.Preferences = Models.DefaultPreferences> = {
79
93
  /**
80
- * Total number of teams documents that matched your query.
94
+ * Total number of teams that matched your query.
81
95
  */
82
96
  total: number;
83
97
  /**
@@ -91,7 +105,7 @@ export namespace Models {
91
105
  */
92
106
  export type MembershipList = {
93
107
  /**
94
- * Total number of memberships documents that matched your query.
108
+ * Total number of memberships that matched your query.
95
109
  */
96
110
  total: number;
97
111
  /**
@@ -105,7 +119,7 @@ export namespace Models {
105
119
  */
106
120
  export type ExecutionList = {
107
121
  /**
108
- * Total number of executions documents that matched your query.
122
+ * Total number of executions that matched your query.
109
123
  */
110
124
  total: number;
111
125
  /**
@@ -119,7 +133,7 @@ export namespace Models {
119
133
  */
120
134
  export type CountryList = {
121
135
  /**
122
- * Total number of countries documents that matched your query.
136
+ * Total number of countries that matched your query.
123
137
  */
124
138
  total: number;
125
139
  /**
@@ -133,7 +147,7 @@ export namespace Models {
133
147
  */
134
148
  export type ContinentList = {
135
149
  /**
136
- * Total number of continents documents that matched your query.
150
+ * Total number of continents that matched your query.
137
151
  */
138
152
  total: number;
139
153
  /**
@@ -147,7 +161,7 @@ export namespace Models {
147
161
  */
148
162
  export type LanguageList = {
149
163
  /**
150
- * Total number of languages documents that matched your query.
164
+ * Total number of languages that matched your query.
151
165
  */
152
166
  total: number;
153
167
  /**
@@ -161,7 +175,7 @@ export namespace Models {
161
175
  */
162
176
  export type CurrencyList = {
163
177
  /**
164
- * Total number of currencies documents that matched your query.
178
+ * Total number of currencies that matched your query.
165
179
  */
166
180
  total: number;
167
181
  /**
@@ -175,7 +189,7 @@ export namespace Models {
175
189
  */
176
190
  export type PhoneList = {
177
191
  /**
178
- * Total number of phones documents that matched your query.
192
+ * Total number of phones that matched your query.
179
193
  */
180
194
  total: number;
181
195
  /**
@@ -189,7 +203,7 @@ export namespace Models {
189
203
  */
190
204
  export type LocaleCodeList = {
191
205
  /**
192
- * Total number of localeCodes documents that matched your query.
206
+ * Total number of localeCodes that matched your query.
193
207
  */
194
208
  total: number;
195
209
  /**
@@ -198,6 +212,45 @@ export namespace Models {
198
212
  localeCodes: LocaleCode[];
199
213
  }
200
214
 
215
+ /**
216
+ * Row
217
+ */
218
+ export type Row = {
219
+ /**
220
+ * Row ID.
221
+ */
222
+ $id: string;
223
+ /**
224
+ * Row automatically incrementing ID.
225
+ */
226
+ $sequence: number;
227
+ /**
228
+ * Table ID.
229
+ */
230
+ $tableId: string;
231
+ /**
232
+ * Database ID.
233
+ */
234
+ $databaseId: string;
235
+ /**
236
+ * Row creation date in ISO 8601 format.
237
+ */
238
+ $createdAt: string;
239
+ /**
240
+ * Row update date in ISO 8601 format.
241
+ */
242
+ $updatedAt: string;
243
+ /**
244
+ * Row permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).
245
+ */
246
+ $permissions: string[];
247
+ }
248
+
249
+ export type DefaultRow = Row & {
250
+ [key: string]: any;
251
+ [__default]: true;
252
+ };
253
+
201
254
  /**
202
255
  * Document
203
256
  */
@@ -237,12 +290,6 @@ export namespace Models {
237
290
  [__default]: true;
238
291
  };
239
292
 
240
- export type DataWithoutDocumentKeys = {
241
- [K in string]: any;
242
- } & {
243
- [K in keyof Document]?: never;
244
- };
245
-
246
293
  /**
247
294
  * Log
248
295
  */
@@ -536,12 +583,6 @@ export namespace Models {
536
583
  [__default]: true;
537
584
  };
538
585
 
539
- export type DataWithoutPreferencesKeys = {
540
- [K in string]: any;
541
- } & {
542
- [K in keyof Preferences]?: never;
543
- };
544
-
545
586
  /**
546
587
  * Session
547
588
  */
@@ -949,7 +990,7 @@ export namespace Models {
949
990
  */
950
991
  $createdAt: string;
951
992
  /**
952
- * Execution upate date in ISO 8601 format.
993
+ * Execution update date in ISO 8601 format.
953
994
  */
954
995
  $updatedAt: string;
955
996
  /**
@@ -960,6 +1001,10 @@ export namespace Models {
960
1001
  * Function ID.
961
1002
  */
962
1003
  functionId: string;
1004
+ /**
1005
+ * Function&#039;s deployment ID used to create the execution.
1006
+ */
1007
+ deploymentId: string;
963
1008
  /**
964
1009
  * The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.
965
1010
  */
package/src/query.ts CHANGED
@@ -90,9 +90,104 @@ export class Query {
90
90
  static offset = (offset: number): string =>
91
91
  new Query("offset", undefined, offset).toString();
92
92
 
93
+ /**
94
+ * Filter resources where attribute contains the specified value.
95
+ *
96
+ * @param {string} attribute
97
+ * @param {string | string[]} value
98
+ * @returns {string}
99
+ */
93
100
  static contains = (attribute: string, value: string | string[]): string =>
94
101
  new Query("contains", attribute, value).toString();
95
102
 
103
+ /**
104
+ * Filter resources where attribute does not contain the specified value.
105
+ *
106
+ * @param {string} attribute
107
+ * @param {string | string[]} value
108
+ * @returns {string}
109
+ */
110
+ static notContains = (attribute: string, value: string | string[]): string =>
111
+ new Query("notContains", attribute, value).toString();
112
+
113
+ /**
114
+ * Filter resources by searching attribute for value (inverse of search).
115
+ * A fulltext index on attribute is required for this query to work.
116
+ *
117
+ * @param {string} attribute
118
+ * @param {string} value
119
+ * @returns {string}
120
+ */
121
+ static notSearch = (attribute: string, value: string): string =>
122
+ new Query("notSearch", attribute, value).toString();
123
+
124
+ /**
125
+ * Filter resources where attribute is not between start and end (exclusive).
126
+ *
127
+ * @param {string} attribute
128
+ * @param {string | number} start
129
+ * @param {string | number} end
130
+ * @returns {string}
131
+ */
132
+ static notBetween = (attribute: string, start: string | number, end: string | number): string =>
133
+ new Query("notBetween", attribute, [start, end] as QueryTypesList).toString();
134
+
135
+ /**
136
+ * Filter resources where attribute does not start with value.
137
+ *
138
+ * @param {string} attribute
139
+ * @param {string} value
140
+ * @returns {string}
141
+ */
142
+ static notStartsWith = (attribute: string, value: string): string =>
143
+ new Query("notStartsWith", attribute, value).toString();
144
+
145
+ /**
146
+ * Filter resources where attribute does not end with value.
147
+ *
148
+ * @param {string} attribute
149
+ * @param {string} value
150
+ * @returns {string}
151
+ */
152
+ static notEndsWith = (attribute: string, value: string): string =>
153
+ new Query("notEndsWith", attribute, value).toString();
154
+
155
+ /**
156
+ * Filter resources where document was created before date.
157
+ *
158
+ * @param {string} value
159
+ * @returns {string}
160
+ */
161
+ static createdBefore = (value: string): string =>
162
+ new Query("createdBefore", undefined, value).toString();
163
+
164
+ /**
165
+ * Filter resources where document was created after date.
166
+ *
167
+ * @param {string} value
168
+ * @returns {string}
169
+ */
170
+ static createdAfter = (value: string): string =>
171
+ new Query("createdAfter", undefined, value).toString();
172
+
173
+ /**
174
+ * Filter resources where document was updated before date.
175
+ *
176
+ * @param {string} value
177
+ * @returns {string}
178
+ */
179
+ static updatedBefore = (value: string): string =>
180
+ new Query("updatedBefore", undefined, value).toString();
181
+
182
+ /**
183
+ * Filter resources where document was updated after date.
184
+ *
185
+ * @param {string} value
186
+ * @returns {string}
187
+ */
188
+ static updatedAfter = (value: string): string =>
189
+ new Query("updatedAfter", undefined, value).toString();
190
+
96
191
  static or = (queries: string[]) =>
97
192
  new Query("or", undefined, queries.map((query) => JSON.parse(query))).toString();
98
193