react-native-appwrite 0.1.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 (109) hide show
  1. package/.github/ISSUE_TEMPLATE/bug.yaml +82 -0
  2. package/.github/ISSUE_TEMPLATE/documentation.yaml +32 -0
  3. package/.github/ISSUE_TEMPLATE/feature.yaml +40 -0
  4. package/.github/workflows/publish.yml +33 -0
  5. package/.gitpod.yml +10 -0
  6. package/CHANGELOG.md +1 -0
  7. package/LICENSE +12 -0
  8. package/README.md +111 -0
  9. package/dist/cjs/sdk.js +3127 -0
  10. package/dist/cjs/sdk.js.map +1 -0
  11. package/dist/esm/sdk.js +3108 -0
  12. package/dist/esm/sdk.js.map +1 -0
  13. package/dist/iife/sdk.js +3126 -0
  14. package/docs/examples/account/create-anonymous-session.md +18 -0
  15. package/docs/examples/account/create-email-session.md +18 -0
  16. package/docs/examples/account/create-j-w-t.md +18 -0
  17. package/docs/examples/account/create-magic-u-r-l-session.md +18 -0
  18. package/docs/examples/account/create-o-auth2session.md +14 -0
  19. package/docs/examples/account/create-phone-session.md +18 -0
  20. package/docs/examples/account/create-phone-verification.md +18 -0
  21. package/docs/examples/account/create-recovery.md +18 -0
  22. package/docs/examples/account/create-verification.md +18 -0
  23. package/docs/examples/account/create.md +18 -0
  24. package/docs/examples/account/delete-identity.md +18 -0
  25. package/docs/examples/account/delete-session.md +18 -0
  26. package/docs/examples/account/delete-sessions.md +18 -0
  27. package/docs/examples/account/get-prefs.md +18 -0
  28. package/docs/examples/account/get-session.md +18 -0
  29. package/docs/examples/account/get.md +18 -0
  30. package/docs/examples/account/list-identities.md +18 -0
  31. package/docs/examples/account/list-logs.md +18 -0
  32. package/docs/examples/account/list-sessions.md +18 -0
  33. package/docs/examples/account/update-email.md +18 -0
  34. package/docs/examples/account/update-magic-u-r-l-session.md +18 -0
  35. package/docs/examples/account/update-name.md +18 -0
  36. package/docs/examples/account/update-password.md +18 -0
  37. package/docs/examples/account/update-phone-session.md +18 -0
  38. package/docs/examples/account/update-phone-verification.md +18 -0
  39. package/docs/examples/account/update-phone.md +18 -0
  40. package/docs/examples/account/update-prefs.md +18 -0
  41. package/docs/examples/account/update-recovery.md +18 -0
  42. package/docs/examples/account/update-session.md +18 -0
  43. package/docs/examples/account/update-status.md +18 -0
  44. package/docs/examples/account/update-verification.md +18 -0
  45. package/docs/examples/avatars/get-browser.md +14 -0
  46. package/docs/examples/avatars/get-credit-card.md +14 -0
  47. package/docs/examples/avatars/get-favicon.md +14 -0
  48. package/docs/examples/avatars/get-flag.md +14 -0
  49. package/docs/examples/avatars/get-image.md +14 -0
  50. package/docs/examples/avatars/get-initials.md +14 -0
  51. package/docs/examples/avatars/get-q-r.md +14 -0
  52. package/docs/examples/databases/create-document.md +18 -0
  53. package/docs/examples/databases/delete-document.md +18 -0
  54. package/docs/examples/databases/get-document.md +18 -0
  55. package/docs/examples/databases/list-documents.md +18 -0
  56. package/docs/examples/databases/update-document.md +18 -0
  57. package/docs/examples/functions/create-execution.md +18 -0
  58. package/docs/examples/functions/get-execution.md +18 -0
  59. package/docs/examples/functions/list-executions.md +18 -0
  60. package/docs/examples/graphql/mutation.md +18 -0
  61. package/docs/examples/graphql/query.md +18 -0
  62. package/docs/examples/locale/get.md +18 -0
  63. package/docs/examples/locale/list-codes.md +18 -0
  64. package/docs/examples/locale/list-continents.md +18 -0
  65. package/docs/examples/locale/list-countries-e-u.md +18 -0
  66. package/docs/examples/locale/list-countries-phones.md +18 -0
  67. package/docs/examples/locale/list-countries.md +18 -0
  68. package/docs/examples/locale/list-currencies.md +18 -0
  69. package/docs/examples/locale/list-languages.md +18 -0
  70. package/docs/examples/storage/create-file.md +18 -0
  71. package/docs/examples/storage/delete-file.md +18 -0
  72. package/docs/examples/storage/get-file-download.md +14 -0
  73. package/docs/examples/storage/get-file-preview.md +14 -0
  74. package/docs/examples/storage/get-file-view.md +14 -0
  75. package/docs/examples/storage/get-file.md +18 -0
  76. package/docs/examples/storage/list-files.md +18 -0
  77. package/docs/examples/storage/update-file.md +18 -0
  78. package/docs/examples/teams/create-membership.md +18 -0
  79. package/docs/examples/teams/create.md +18 -0
  80. package/docs/examples/teams/delete-membership.md +18 -0
  81. package/docs/examples/teams/delete.md +18 -0
  82. package/docs/examples/teams/get-membership.md +18 -0
  83. package/docs/examples/teams/get-prefs.md +18 -0
  84. package/docs/examples/teams/get.md +18 -0
  85. package/docs/examples/teams/list-memberships.md +18 -0
  86. package/docs/examples/teams/list.md +18 -0
  87. package/docs/examples/teams/update-membership-status.md +18 -0
  88. package/docs/examples/teams/update-membership.md +18 -0
  89. package/docs/examples/teams/update-name.md +18 -0
  90. package/docs/examples/teams/update-prefs.md +18 -0
  91. package/package.json +47 -0
  92. package/rollup.config.js +31 -0
  93. package/src/client.ts +437 -0
  94. package/src/id.ts +9 -0
  95. package/src/index.ts +14 -0
  96. package/src/models.ts +1021 -0
  97. package/src/permission.ts +22 -0
  98. package/src/query.ts +74 -0
  99. package/src/role.ts +100 -0
  100. package/src/service.ts +30 -0
  101. package/src/services/account.ts +1066 -0
  102. package/src/services/avatars.ts +352 -0
  103. package/src/services/databases.ts +216 -0
  104. package/src/services/functions.ts +125 -0
  105. package/src/services/graphql.ts +68 -0
  106. package/src/services/locale.ts +169 -0
  107. package/src/services/storage.ts +411 -0
  108. package/src/services/teams.ts +484 -0
  109. package/tsconfig.json +24 -0
package/src/models.ts ADDED
@@ -0,0 +1,1021 @@
1
+ export namespace Models {
2
+ /**
3
+ * Documents List
4
+ */
5
+ export type DocumentList<Document extends Models.Document> = {
6
+ /**
7
+ * Total number of documents documents that matched your query.
8
+ */
9
+ total: number;
10
+ /**
11
+ * List of documents.
12
+ */
13
+ documents: Document[];
14
+ }
15
+ /**
16
+ * Sessions List
17
+ */
18
+ export type SessionList = {
19
+ /**
20
+ * Total number of sessions documents that matched your query.
21
+ */
22
+ total: number;
23
+ /**
24
+ * List of sessions.
25
+ */
26
+ sessions: Session[];
27
+ }
28
+ /**
29
+ * Identities List
30
+ */
31
+ export type IdentityList = {
32
+ /**
33
+ * Total number of identities documents that matched your query.
34
+ */
35
+ total: number;
36
+ /**
37
+ * List of identities.
38
+ */
39
+ identities: Identity[];
40
+ }
41
+ /**
42
+ * Logs List
43
+ */
44
+ export type LogList = {
45
+ /**
46
+ * Total number of logs documents that matched your query.
47
+ */
48
+ total: number;
49
+ /**
50
+ * List of logs.
51
+ */
52
+ logs: Log[];
53
+ }
54
+ /**
55
+ * Files List
56
+ */
57
+ export type FileList = {
58
+ /**
59
+ * Total number of files documents that matched your query.
60
+ */
61
+ total: number;
62
+ /**
63
+ * List of files.
64
+ */
65
+ files: File[];
66
+ }
67
+ /**
68
+ * Teams List
69
+ */
70
+ export type TeamList<Preferences extends Models.Preferences> = {
71
+ /**
72
+ * Total number of teams documents that matched your query.
73
+ */
74
+ total: number;
75
+ /**
76
+ * List of teams.
77
+ */
78
+ teams: Team<Preferences>[];
79
+ }
80
+ /**
81
+ * Memberships List
82
+ */
83
+ export type MembershipList = {
84
+ /**
85
+ * Total number of memberships documents that matched your query.
86
+ */
87
+ total: number;
88
+ /**
89
+ * List of memberships.
90
+ */
91
+ memberships: Membership[];
92
+ }
93
+ /**
94
+ * Executions List
95
+ */
96
+ export type ExecutionList = {
97
+ /**
98
+ * Total number of executions documents that matched your query.
99
+ */
100
+ total: number;
101
+ /**
102
+ * List of executions.
103
+ */
104
+ executions: Execution[];
105
+ }
106
+ /**
107
+ * Countries List
108
+ */
109
+ export type CountryList = {
110
+ /**
111
+ * Total number of countries documents that matched your query.
112
+ */
113
+ total: number;
114
+ /**
115
+ * List of countries.
116
+ */
117
+ countries: Country[];
118
+ }
119
+ /**
120
+ * Continents List
121
+ */
122
+ export type ContinentList = {
123
+ /**
124
+ * Total number of continents documents that matched your query.
125
+ */
126
+ total: number;
127
+ /**
128
+ * List of continents.
129
+ */
130
+ continents: Continent[];
131
+ }
132
+ /**
133
+ * Languages List
134
+ */
135
+ export type LanguageList = {
136
+ /**
137
+ * Total number of languages documents that matched your query.
138
+ */
139
+ total: number;
140
+ /**
141
+ * List of languages.
142
+ */
143
+ languages: Language[];
144
+ }
145
+ /**
146
+ * Currencies List
147
+ */
148
+ export type CurrencyList = {
149
+ /**
150
+ * Total number of currencies documents that matched your query.
151
+ */
152
+ total: number;
153
+ /**
154
+ * List of currencies.
155
+ */
156
+ currencies: Currency[];
157
+ }
158
+ /**
159
+ * Phones List
160
+ */
161
+ export type PhoneList = {
162
+ /**
163
+ * Total number of phones documents that matched your query.
164
+ */
165
+ total: number;
166
+ /**
167
+ * List of phones.
168
+ */
169
+ phones: Phone[];
170
+ }
171
+ /**
172
+ * Locale codes list
173
+ */
174
+ export type LocaleCodeList = {
175
+ /**
176
+ * Total number of localeCodes documents that matched your query.
177
+ */
178
+ total: number;
179
+ /**
180
+ * List of localeCodes.
181
+ */
182
+ localeCodes: LocaleCode[];
183
+ }
184
+ /**
185
+ * Document
186
+ */
187
+ export type Document = {
188
+ /**
189
+ * Document ID.
190
+ */
191
+ $id: string;
192
+ /**
193
+ * Collection ID.
194
+ */
195
+ $collectionId: string;
196
+ /**
197
+ * Database ID.
198
+ */
199
+ $databaseId: string;
200
+ /**
201
+ * Document creation date in ISO 8601 format.
202
+ */
203
+ $createdAt: string;
204
+ /**
205
+ * Document update date in ISO 8601 format.
206
+ */
207
+ $updatedAt: string;
208
+ /**
209
+ * Document permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).
210
+ */
211
+ $permissions: string[];
212
+ [key: string]: any;
213
+ }
214
+ /**
215
+ * Log
216
+ */
217
+ export type Log = {
218
+ /**
219
+ * Event name.
220
+ */
221
+ event: string;
222
+ /**
223
+ * User ID.
224
+ */
225
+ userId: string;
226
+ /**
227
+ * User Email.
228
+ */
229
+ userEmail: string;
230
+ /**
231
+ * User Name.
232
+ */
233
+ userName: string;
234
+ /**
235
+ * API mode when event triggered.
236
+ */
237
+ mode: string;
238
+ /**
239
+ * IP session in use when the session was created.
240
+ */
241
+ ip: string;
242
+ /**
243
+ * Log creation date in ISO 8601 format.
244
+ */
245
+ time: string;
246
+ /**
247
+ * Operating system code name. View list of [available options](https://github.com/appwrite/appwrite/blob/master/docs/lists/os.json).
248
+ */
249
+ osCode: string;
250
+ /**
251
+ * Operating system name.
252
+ */
253
+ osName: string;
254
+ /**
255
+ * Operating system version.
256
+ */
257
+ osVersion: string;
258
+ /**
259
+ * Client type.
260
+ */
261
+ clientType: string;
262
+ /**
263
+ * Client code name. View list of [available options](https://github.com/appwrite/appwrite/blob/master/docs/lists/clients.json).
264
+ */
265
+ clientCode: string;
266
+ /**
267
+ * Client name.
268
+ */
269
+ clientName: string;
270
+ /**
271
+ * Client version.
272
+ */
273
+ clientVersion: string;
274
+ /**
275
+ * Client engine name.
276
+ */
277
+ clientEngine: string;
278
+ /**
279
+ * Client engine name.
280
+ */
281
+ clientEngineVersion: string;
282
+ /**
283
+ * Device name.
284
+ */
285
+ deviceName: string;
286
+ /**
287
+ * Device brand name.
288
+ */
289
+ deviceBrand: string;
290
+ /**
291
+ * Device model name.
292
+ */
293
+ deviceModel: string;
294
+ /**
295
+ * Country two-character ISO 3166-1 alpha code.
296
+ */
297
+ countryCode: string;
298
+ /**
299
+ * Country name.
300
+ */
301
+ countryName: string;
302
+ }
303
+ /**
304
+ * User
305
+ */
306
+ export type User<Preferences extends Models.Preferences> = {
307
+ /**
308
+ * User ID.
309
+ */
310
+ $id: string;
311
+ /**
312
+ * User creation date in ISO 8601 format.
313
+ */
314
+ $createdAt: string;
315
+ /**
316
+ * User update date in ISO 8601 format.
317
+ */
318
+ $updatedAt: string;
319
+ /**
320
+ * User name.
321
+ */
322
+ name: string;
323
+ /**
324
+ * Hashed user password.
325
+ */
326
+ password?: string;
327
+ /**
328
+ * Password hashing algorithm.
329
+ */
330
+ hash?: string;
331
+ /**
332
+ * Password hashing algorithm configuration.
333
+ */
334
+ hashOptions?: object;
335
+ /**
336
+ * User registration date in ISO 8601 format.
337
+ */
338
+ registration: string;
339
+ /**
340
+ * User status. Pass `true` for enabled and `false` for disabled.
341
+ */
342
+ status: boolean;
343
+ /**
344
+ * Labels for the user.
345
+ */
346
+ labels: string[];
347
+ /**
348
+ * Password update time in ISO 8601 format.
349
+ */
350
+ passwordUpdate: string;
351
+ /**
352
+ * User email address.
353
+ */
354
+ email: string;
355
+ /**
356
+ * User phone number in E.164 format.
357
+ */
358
+ phone: string;
359
+ /**
360
+ * Email verification status.
361
+ */
362
+ emailVerification: boolean;
363
+ /**
364
+ * Phone verification status.
365
+ */
366
+ phoneVerification: boolean;
367
+ /**
368
+ * User preferences as a key-value object
369
+ */
370
+ prefs: Preferences;
371
+ /**
372
+ * Most recent access date in ISO 8601 format. This attribute is only updated again after 24 hours.
373
+ */
374
+ accessedAt: string;
375
+ }
376
+ /**
377
+ * AlgoMD5
378
+ */
379
+ export type AlgoMd5 = {
380
+ /**
381
+ * Algo type.
382
+ */
383
+ type: string;
384
+ }
385
+ /**
386
+ * AlgoSHA
387
+ */
388
+ export type AlgoSha = {
389
+ /**
390
+ * Algo type.
391
+ */
392
+ type: string;
393
+ }
394
+ /**
395
+ * AlgoPHPass
396
+ */
397
+ export type AlgoPhpass = {
398
+ /**
399
+ * Algo type.
400
+ */
401
+ type: string;
402
+ }
403
+ /**
404
+ * AlgoBcrypt
405
+ */
406
+ export type AlgoBcrypt = {
407
+ /**
408
+ * Algo type.
409
+ */
410
+ type: string;
411
+ }
412
+ /**
413
+ * AlgoScrypt
414
+ */
415
+ export type AlgoScrypt = {
416
+ /**
417
+ * Algo type.
418
+ */
419
+ type: string;
420
+ /**
421
+ * CPU complexity of computed hash.
422
+ */
423
+ costCpu: number;
424
+ /**
425
+ * Memory complexity of computed hash.
426
+ */
427
+ costMemory: number;
428
+ /**
429
+ * Parallelization of computed hash.
430
+ */
431
+ costParallel: number;
432
+ /**
433
+ * Length used to compute hash.
434
+ */
435
+ length: number;
436
+ }
437
+ /**
438
+ * AlgoScryptModified
439
+ */
440
+ export type AlgoScryptModified = {
441
+ /**
442
+ * Algo type.
443
+ */
444
+ type: string;
445
+ /**
446
+ * Salt used to compute hash.
447
+ */
448
+ salt: string;
449
+ /**
450
+ * Separator used to compute hash.
451
+ */
452
+ saltSeparator: string;
453
+ /**
454
+ * Key used to compute hash.
455
+ */
456
+ signerKey: string;
457
+ }
458
+ /**
459
+ * AlgoArgon2
460
+ */
461
+ export type AlgoArgon2 = {
462
+ /**
463
+ * Algo type.
464
+ */
465
+ type: string;
466
+ /**
467
+ * Memory used to compute hash.
468
+ */
469
+ memoryCost: number;
470
+ /**
471
+ * Amount of time consumed to compute hash
472
+ */
473
+ timeCost: number;
474
+ /**
475
+ * Number of threads used to compute hash.
476
+ */
477
+ threads: number;
478
+ }
479
+ /**
480
+ * Preferences
481
+ */
482
+ export type Preferences = {
483
+ [key: string]: any;
484
+ }
485
+ /**
486
+ * Session
487
+ */
488
+ export type Session = {
489
+ /**
490
+ * Session ID.
491
+ */
492
+ $id: string;
493
+ /**
494
+ * Session creation date in ISO 8601 format.
495
+ */
496
+ $createdAt: string;
497
+ /**
498
+ * User ID.
499
+ */
500
+ userId: string;
501
+ /**
502
+ * Session expiration date in ISO 8601 format.
503
+ */
504
+ expire: string;
505
+ /**
506
+ * Session Provider.
507
+ */
508
+ provider: string;
509
+ /**
510
+ * Session Provider User ID.
511
+ */
512
+ providerUid: string;
513
+ /**
514
+ * Session Provider Access Token.
515
+ */
516
+ providerAccessToken: string;
517
+ /**
518
+ * The date of when the access token expires in ISO 8601 format.
519
+ */
520
+ providerAccessTokenExpiry: string;
521
+ /**
522
+ * Session Provider Refresh Token.
523
+ */
524
+ providerRefreshToken: string;
525
+ /**
526
+ * IP in use when the session was created.
527
+ */
528
+ ip: string;
529
+ /**
530
+ * Operating system code name. View list of [available options](https://github.com/appwrite/appwrite/blob/master/docs/lists/os.json).
531
+ */
532
+ osCode: string;
533
+ /**
534
+ * Operating system name.
535
+ */
536
+ osName: string;
537
+ /**
538
+ * Operating system version.
539
+ */
540
+ osVersion: string;
541
+ /**
542
+ * Client type.
543
+ */
544
+ clientType: string;
545
+ /**
546
+ * Client code name. View list of [available options](https://github.com/appwrite/appwrite/blob/master/docs/lists/clients.json).
547
+ */
548
+ clientCode: string;
549
+ /**
550
+ * Client name.
551
+ */
552
+ clientName: string;
553
+ /**
554
+ * Client version.
555
+ */
556
+ clientVersion: string;
557
+ /**
558
+ * Client engine name.
559
+ */
560
+ clientEngine: string;
561
+ /**
562
+ * Client engine name.
563
+ */
564
+ clientEngineVersion: string;
565
+ /**
566
+ * Device name.
567
+ */
568
+ deviceName: string;
569
+ /**
570
+ * Device brand name.
571
+ */
572
+ deviceBrand: string;
573
+ /**
574
+ * Device model name.
575
+ */
576
+ deviceModel: string;
577
+ /**
578
+ * Country two-character ISO 3166-1 alpha code.
579
+ */
580
+ countryCode: string;
581
+ /**
582
+ * Country name.
583
+ */
584
+ countryName: string;
585
+ /**
586
+ * Returns true if this the current user session.
587
+ */
588
+ current: boolean;
589
+ }
590
+ /**
591
+ * Identity
592
+ */
593
+ export type Identity = {
594
+ /**
595
+ * Identity ID.
596
+ */
597
+ $id: string;
598
+ /**
599
+ * Identity creation date in ISO 8601 format.
600
+ */
601
+ $createdAt: string;
602
+ /**
603
+ * Identity update date in ISO 8601 format.
604
+ */
605
+ $updatedAt: string;
606
+ /**
607
+ * User ID.
608
+ */
609
+ userId: string;
610
+ /**
611
+ * Identity Provider.
612
+ */
613
+ provider: string;
614
+ /**
615
+ * ID of the User in the Identity Provider.
616
+ */
617
+ providerUid: string;
618
+ /**
619
+ * Email of the User in the Identity Provider.
620
+ */
621
+ providerEmail: string;
622
+ /**
623
+ * Identity Provider Access Token.
624
+ */
625
+ providerAccessToken: string;
626
+ /**
627
+ * The date of when the access token expires in ISO 8601 format.
628
+ */
629
+ providerAccessTokenExpiry: string;
630
+ /**
631
+ * Identity Provider Refresh Token.
632
+ */
633
+ providerRefreshToken: string;
634
+ }
635
+ /**
636
+ * Token
637
+ */
638
+ export type Token = {
639
+ /**
640
+ * Token ID.
641
+ */
642
+ $id: string;
643
+ /**
644
+ * Token creation date in ISO 8601 format.
645
+ */
646
+ $createdAt: string;
647
+ /**
648
+ * User ID.
649
+ */
650
+ userId: string;
651
+ /**
652
+ * Token secret key. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.
653
+ */
654
+ secret: string;
655
+ /**
656
+ * Token expiration date in ISO 8601 format.
657
+ */
658
+ expire: string;
659
+ }
660
+ /**
661
+ * JWT
662
+ */
663
+ export type Jwt = {
664
+ /**
665
+ * JWT encoded string.
666
+ */
667
+ jwt: string;
668
+ }
669
+ /**
670
+ * Locale
671
+ */
672
+ export type Locale = {
673
+ /**
674
+ * User IP address.
675
+ */
676
+ ip: string;
677
+ /**
678
+ * Country code in [ISO 3166-1](http://en.wikipedia.org/wiki/ISO_3166-1) two-character format
679
+ */
680
+ countryCode: string;
681
+ /**
682
+ * Country name. This field support localization.
683
+ */
684
+ country: string;
685
+ /**
686
+ * Continent code. A two character continent code &quot;AF&quot; for Africa, &quot;AN&quot; for Antarctica, &quot;AS&quot; for Asia, &quot;EU&quot; for Europe, &quot;NA&quot; for North America, &quot;OC&quot; for Oceania, and &quot;SA&quot; for South America.
687
+ */
688
+ continentCode: string;
689
+ /**
690
+ * Continent name. This field support localization.
691
+ */
692
+ continent: string;
693
+ /**
694
+ * True if country is part of the European Union.
695
+ */
696
+ eu: boolean;
697
+ /**
698
+ * Currency code in [ISO 4217-1](http://en.wikipedia.org/wiki/ISO_4217) three-character format
699
+ */
700
+ currency: string;
701
+ }
702
+ /**
703
+ * LocaleCode
704
+ */
705
+ export type LocaleCode = {
706
+ /**
707
+ * Locale codes in [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes)
708
+ */
709
+ code: string;
710
+ /**
711
+ * Locale name
712
+ */
713
+ name: string;
714
+ }
715
+ /**
716
+ * File
717
+ */
718
+ export type File = {
719
+ /**
720
+ * File ID.
721
+ */
722
+ $id: string;
723
+ /**
724
+ * Bucket ID.
725
+ */
726
+ bucketId: string;
727
+ /**
728
+ * File creation date in ISO 8601 format.
729
+ */
730
+ $createdAt: string;
731
+ /**
732
+ * File update date in ISO 8601 format.
733
+ */
734
+ $updatedAt: string;
735
+ /**
736
+ * File permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).
737
+ */
738
+ $permissions: string[];
739
+ /**
740
+ * File name.
741
+ */
742
+ name: string;
743
+ /**
744
+ * File MD5 signature.
745
+ */
746
+ signature: string;
747
+ /**
748
+ * File mime type.
749
+ */
750
+ mimeType: string;
751
+ /**
752
+ * File original size in bytes.
753
+ */
754
+ sizeOriginal: number;
755
+ /**
756
+ * Total number of chunks available
757
+ */
758
+ chunksTotal: number;
759
+ /**
760
+ * Total number of chunks uploaded
761
+ */
762
+ chunksUploaded: number;
763
+ }
764
+ /**
765
+ * Team
766
+ */
767
+ export type Team<Preferences extends Models.Preferences> = {
768
+ /**
769
+ * Team ID.
770
+ */
771
+ $id: string;
772
+ /**
773
+ * Team creation date in ISO 8601 format.
774
+ */
775
+ $createdAt: string;
776
+ /**
777
+ * Team update date in ISO 8601 format.
778
+ */
779
+ $updatedAt: string;
780
+ /**
781
+ * Team name.
782
+ */
783
+ name: string;
784
+ /**
785
+ * Total number of team members.
786
+ */
787
+ total: number;
788
+ /**
789
+ * Team preferences as a key-value object
790
+ */
791
+ prefs: Preferences;
792
+ }
793
+ /**
794
+ * Membership
795
+ */
796
+ export type Membership = {
797
+ /**
798
+ * Membership ID.
799
+ */
800
+ $id: string;
801
+ /**
802
+ * Membership creation date in ISO 8601 format.
803
+ */
804
+ $createdAt: string;
805
+ /**
806
+ * Membership update date in ISO 8601 format.
807
+ */
808
+ $updatedAt: string;
809
+ /**
810
+ * User ID.
811
+ */
812
+ userId: string;
813
+ /**
814
+ * User name.
815
+ */
816
+ userName: string;
817
+ /**
818
+ * User email address.
819
+ */
820
+ userEmail: string;
821
+ /**
822
+ * Team ID.
823
+ */
824
+ teamId: string;
825
+ /**
826
+ * Team name.
827
+ */
828
+ teamName: string;
829
+ /**
830
+ * Date, the user has been invited to join the team in ISO 8601 format.
831
+ */
832
+ invited: string;
833
+ /**
834
+ * Date, the user has accepted the invitation to join the team in ISO 8601 format.
835
+ */
836
+ joined: string;
837
+ /**
838
+ * User confirmation status, true if the user has joined the team or false otherwise.
839
+ */
840
+ confirm: boolean;
841
+ /**
842
+ * User list of roles
843
+ */
844
+ roles: string[];
845
+ }
846
+ /**
847
+ * Execution
848
+ */
849
+ export type Execution = {
850
+ /**
851
+ * Execution ID.
852
+ */
853
+ $id: string;
854
+ /**
855
+ * Execution creation date in ISO 8601 format.
856
+ */
857
+ $createdAt: string;
858
+ /**
859
+ * Execution upate date in ISO 8601 format.
860
+ */
861
+ $updatedAt: string;
862
+ /**
863
+ * Execution roles.
864
+ */
865
+ $permissions: string[];
866
+ /**
867
+ * Function ID.
868
+ */
869
+ functionId: string;
870
+ /**
871
+ * The trigger that caused the function to execute. Possible values can be: `http`, `schedule`, or `event`.
872
+ */
873
+ trigger: string;
874
+ /**
875
+ * The status of the function execution. Possible values can be: `waiting`, `processing`, `completed`, or `failed`.
876
+ */
877
+ status: string;
878
+ /**
879
+ * HTTP request method type.
880
+ */
881
+ requestMethod: string;
882
+ /**
883
+ * HTTP request path and query.
884
+ */
885
+ requestPath: string;
886
+ /**
887
+ * HTTP response headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.
888
+ */
889
+ requestHeaders: Headers[];
890
+ /**
891
+ * HTTP response status code.
892
+ */
893
+ responseStatusCode: number;
894
+ /**
895
+ * HTTP response body. This will return empty unless execution is created as synchronous.
896
+ */
897
+ responseBody: string;
898
+ /**
899
+ * HTTP response headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.
900
+ */
901
+ responseHeaders: Headers[];
902
+ /**
903
+ * Function logs. Includes the last 4,000 characters. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.
904
+ */
905
+ logs: string;
906
+ /**
907
+ * Function errors. Includes the last 4,000 characters. This will return an empty string unless the response is returned using an API key or as part of a webhook payload.
908
+ */
909
+ errors: string;
910
+ /**
911
+ * Function execution duration in seconds.
912
+ */
913
+ duration: number;
914
+ }
915
+ /**
916
+ * Country
917
+ */
918
+ export type Country = {
919
+ /**
920
+ * Country name.
921
+ */
922
+ name: string;
923
+ /**
924
+ * Country two-character ISO 3166-1 alpha code.
925
+ */
926
+ code: string;
927
+ }
928
+ /**
929
+ * Continent
930
+ */
931
+ export type Continent = {
932
+ /**
933
+ * Continent name.
934
+ */
935
+ name: string;
936
+ /**
937
+ * Continent two letter code.
938
+ */
939
+ code: string;
940
+ }
941
+ /**
942
+ * Language
943
+ */
944
+ export type Language = {
945
+ /**
946
+ * Language name.
947
+ */
948
+ name: string;
949
+ /**
950
+ * Language two-character ISO 639-1 codes.
951
+ */
952
+ code: string;
953
+ /**
954
+ * Language native name.
955
+ */
956
+ nativeName: string;
957
+ }
958
+ /**
959
+ * Currency
960
+ */
961
+ export type Currency = {
962
+ /**
963
+ * Currency symbol.
964
+ */
965
+ symbol: string;
966
+ /**
967
+ * Currency name.
968
+ */
969
+ name: string;
970
+ /**
971
+ * Currency native symbol.
972
+ */
973
+ symbolNative: string;
974
+ /**
975
+ * Number of decimal digits.
976
+ */
977
+ decimalDigits: number;
978
+ /**
979
+ * Currency digit rounding.
980
+ */
981
+ rounding: number;
982
+ /**
983
+ * Currency code in [ISO 4217-1](http://en.wikipedia.org/wiki/ISO_4217) three-character format.
984
+ */
985
+ code: string;
986
+ /**
987
+ * Currency plural name
988
+ */
989
+ namePlural: string;
990
+ }
991
+ /**
992
+ * Phone
993
+ */
994
+ export type Phone = {
995
+ /**
996
+ * Phone code.
997
+ */
998
+ code: string;
999
+ /**
1000
+ * Country two-character ISO 3166-1 alpha code.
1001
+ */
1002
+ countryCode: string;
1003
+ /**
1004
+ * Country name.
1005
+ */
1006
+ countryName: string;
1007
+ }
1008
+ /**
1009
+ * Headers
1010
+ */
1011
+ export type Headers = {
1012
+ /**
1013
+ * Header name.
1014
+ */
1015
+ name: string;
1016
+ /**
1017
+ * Header value.
1018
+ */
1019
+ value: string;
1020
+ }
1021
+ }