@appconda/nextjs 1.0.38 → 1.0.40

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 (124) hide show
  1. package/dist/actions/actionClient.d.ts +1 -1
  2. package/dist/actions/actionClient.js +6 -3
  3. package/dist/actions/index.js +17 -1
  4. package/dist/actions/nodes.d.ts +1 -1
  5. package/dist/actions/nodes.js +7 -4
  6. package/dist/client.js +39 -33
  7. package/dist/decorators/Cache.js +7 -4
  8. package/dist/decorators/CacheKey.js +4 -1
  9. package/dist/decorators/Invalidate.js +7 -4
  10. package/dist/enums/api-service.js +5 -2
  11. package/dist/enums/api.js +5 -2
  12. package/dist/enums/auth-method.js +5 -2
  13. package/dist/enums/authentication-factor.js +5 -2
  14. package/dist/enums/authenticator-type.js +5 -2
  15. package/dist/enums/browser.js +5 -2
  16. package/dist/enums/compression.js +5 -2
  17. package/dist/enums/credit-card.js +5 -2
  18. package/dist/enums/database-usage-range.js +5 -2
  19. package/dist/enums/email-template-locale.js +5 -2
  20. package/dist/enums/email-template-type.js +5 -2
  21. package/dist/enums/entities/EntityLimitType.js +5 -2
  22. package/dist/enums/entities/PropertyAttributeName.js +5 -2
  23. package/dist/enums/entities/PropertyCondition.js +5 -2
  24. package/dist/enums/entities/PropertyType.js +5 -2
  25. package/dist/enums/entities/PropertyValueType.js +5 -2
  26. package/dist/enums/entities/RowAccess.js +4 -1
  27. package/dist/enums/entities/ViewFilterCondition.js +5 -2
  28. package/dist/enums/execution-method.js +5 -2
  29. package/dist/enums/flag.js +5 -2
  30. package/dist/enums/function-usage-range.js +5 -2
  31. package/dist/enums/image-format.js +5 -2
  32. package/dist/enums/image-gravity.js +5 -2
  33. package/dist/enums/index-type.js +5 -2
  34. package/dist/enums/messaging-provider-type.js +5 -2
  35. package/dist/enums/name.js +5 -2
  36. package/dist/enums/o-auth-provider copy.js +5 -2
  37. package/dist/enums/o-auth-provider.js +5 -2
  38. package/dist/enums/password-hash.js +5 -2
  39. package/dist/enums/platform-type.js +5 -2
  40. package/dist/enums/project-usage-range.js +5 -2
  41. package/dist/enums/region.js +5 -2
  42. package/dist/enums/relation-mutate.js +5 -2
  43. package/dist/enums/relationship-type.js +5 -2
  44. package/dist/enums/resource-type.js +5 -2
  45. package/dist/enums/runtime.js +5 -2
  46. package/dist/enums/s-m-t-p-secure.js +5 -2
  47. package/dist/enums/shared/ApplicationLayout.js +5 -2
  48. package/dist/enums/shared/Colors.js +5 -2
  49. package/dist/enums/shared/InputType.js +5 -2
  50. package/dist/enums/shared/Periodicity.js +5 -2
  51. package/dist/enums/shared/SvgIcon.js +5 -2
  52. package/dist/enums/shared/Theme.js +5 -2
  53. package/dist/enums/sms-template-locale.js +5 -2
  54. package/dist/enums/sms-template-type.js +5 -2
  55. package/dist/enums/smtp-encryption.js +5 -2
  56. package/dist/enums/storage-usage-range.js +5 -2
  57. package/dist/enums/subscriptions/PricingModel.js +7 -4
  58. package/dist/enums/subscriptions/SubscriptionBillingPeriod.js +7 -4
  59. package/dist/enums/subscriptions/SubscriptionFeatureLimitType.js +7 -4
  60. package/dist/enums/subscriptions/SubscriptionPriceType.js +7 -4
  61. package/dist/enums/tenants/LinkedAccountStatus.js +5 -2
  62. package/dist/enums/tenants/TenantUserJoined.js +5 -2
  63. package/dist/enums/tenants/TenantUserStatus.js +5 -2
  64. package/dist/enums/tenants/TenantUserType.js +5 -2
  65. package/dist/enums/user-usage-range.js +5 -2
  66. package/dist/getAppcondaClient.js +6 -3
  67. package/dist/getSDKForCurrentUser.js +40 -37
  68. package/dist/id.js +20 -16
  69. package/dist/index.d.ts +1 -1
  70. package/dist/index.js +91 -38
  71. package/dist/inputFile.js +10 -6
  72. package/dist/lib/Cache/Adapter.js +2 -1
  73. package/dist/lib/Cache/Adapters/Filesystem.js +6 -2
  74. package/dist/lib/Cache/Adapters/Memory.js +7 -4
  75. package/dist/lib/Cache/Adapters/None.js +5 -1
  76. package/dist/lib/Cache/Adapters/Sharding.js +19 -14
  77. package/dist/lib/Cache/Cache.js +7 -2
  78. package/dist/lib/Cache/index.js +20 -4
  79. package/dist/lib/Cache/test.d.ts +1 -0
  80. package/dist/lib/Cache/test.js +2 -0
  81. package/dist/lib/Registry/Registry.js +23 -21
  82. package/dist/lib/Registry/index.js +17 -1
  83. package/dist/lib/Services.js +12 -8
  84. package/dist/models.js +2 -1
  85. package/dist/modules/index.js +17 -1
  86. package/dist/modules/waitlist/action.d.ts +2 -2
  87. package/dist/modules/waitlist/action.js +11 -8
  88. package/dist/modules/waitlist/index.js +19 -3
  89. package/dist/modules/waitlist/schema.js +6 -3
  90. package/dist/modules/waitlist/service.js +6 -2
  91. package/dist/permission.js +53 -49
  92. package/dist/query.js +175 -168
  93. package/dist/role.js +5 -1
  94. package/dist/schemas/nodes.d.ts +1 -0
  95. package/dist/schemas/nodes.js +2 -0
  96. package/dist/service-client.js +6 -1
  97. package/dist/service.js +10 -5
  98. package/dist/services/account.js +63 -58
  99. package/dist/services/applets.js +9 -4
  100. package/dist/services/avatars.js +13 -8
  101. package/dist/services/community.js +10 -5
  102. package/dist/services/configuration.js +6 -2
  103. package/dist/services/databases.js +155 -150
  104. package/dist/services/functions.js +47 -42
  105. package/dist/services/graphql.js +9 -4
  106. package/dist/services/health.js +8 -3
  107. package/dist/services/locale.js +6 -1
  108. package/dist/services/messaging.js +71 -66
  109. package/dist/services/node.js +8 -4
  110. package/dist/services/permissions.js +12 -7
  111. package/dist/services/pricing.js +6 -2
  112. package/dist/services/projects.js +118 -113
  113. package/dist/services/roles.js +11 -6
  114. package/dist/services/schema.js +10 -5
  115. package/dist/services/storage.js +29 -24
  116. package/dist/services/subscription.js +6 -2
  117. package/dist/services/teams.js +30 -25
  118. package/dist/services/tenant-subscription.js +10 -5
  119. package/dist/services/tenant.js +13 -9
  120. package/dist/services/users.js +87 -82
  121. package/package.json +1 -1
  122. package/src/index.ts +1 -1
  123. package/src/modules/waitlist/action.ts +2 -1
  124. package/tsconfig.json +30 -26
@@ -1,5 +1,9 @@
1
- import { AppcondaException } from '../client';
2
- export class Databases {
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Databases = void 0;
4
+ const client_1 = require("../client");
5
+ class Databases {
6
+ client;
3
7
  constructor(client) {
4
8
  this.client = client;
5
9
  }
@@ -42,10 +46,10 @@ export class Databases {
42
46
  */
43
47
  async create(databaseId, name, enabled) {
44
48
  if (typeof databaseId === 'undefined') {
45
- throw new AppcondaException('Missing required parameter: "databaseId"');
49
+ throw new client_1.AppcondaException('Missing required parameter: "databaseId"');
46
50
  }
47
51
  if (typeof name === 'undefined') {
48
- throw new AppcondaException('Missing required parameter: "name"');
52
+ throw new client_1.AppcondaException('Missing required parameter: "name"');
49
53
  }
50
54
  const apiPath = '/databases';
51
55
  const payload = {};
@@ -75,7 +79,7 @@ export class Databases {
75
79
  */
76
80
  async get(databaseId) {
77
81
  if (typeof databaseId === 'undefined') {
78
- throw new AppcondaException('Missing required parameter: "databaseId"');
82
+ throw new client_1.AppcondaException('Missing required parameter: "databaseId"');
79
83
  }
80
84
  const apiPath = '/databases/{databaseId}'.replace('{databaseId}', databaseId);
81
85
  const payload = {};
@@ -98,10 +102,10 @@ export class Databases {
98
102
  */
99
103
  async update(databaseId, name, enabled) {
100
104
  if (typeof databaseId === 'undefined') {
101
- throw new AppcondaException('Missing required parameter: "databaseId"');
105
+ throw new client_1.AppcondaException('Missing required parameter: "databaseId"');
102
106
  }
103
107
  if (typeof name === 'undefined') {
104
- throw new AppcondaException('Missing required parameter: "name"');
108
+ throw new client_1.AppcondaException('Missing required parameter: "name"');
105
109
  }
106
110
  const apiPath = '/databases/{databaseId}'.replace('{databaseId}', databaseId);
107
111
  const payload = {};
@@ -128,7 +132,7 @@ export class Databases {
128
132
  */
129
133
  async delete(databaseId) {
130
134
  if (typeof databaseId === 'undefined') {
131
- throw new AppcondaException('Missing required parameter: "databaseId"');
135
+ throw new client_1.AppcondaException('Missing required parameter: "databaseId"');
132
136
  }
133
137
  const apiPath = '/databases/{databaseId}'.replace('{databaseId}', databaseId);
134
138
  const payload = {};
@@ -151,7 +155,7 @@ export class Databases {
151
155
  */
152
156
  async listCollections(databaseId, queries, search) {
153
157
  if (typeof databaseId === 'undefined') {
154
- throw new AppcondaException('Missing required parameter: "databaseId"');
158
+ throw new client_1.AppcondaException('Missing required parameter: "databaseId"');
155
159
  }
156
160
  const apiPath = '/databases/{databaseId}/collections'.replace('{databaseId}', databaseId);
157
161
  const payload = {};
@@ -183,13 +187,13 @@ export class Databases {
183
187
  */
184
188
  async createCollection(databaseId, collectionId, name, permissions, documentSecurity, enabled) {
185
189
  if (typeof databaseId === 'undefined') {
186
- throw new AppcondaException('Missing required parameter: "databaseId"');
190
+ throw new client_1.AppcondaException('Missing required parameter: "databaseId"');
187
191
  }
188
192
  if (typeof collectionId === 'undefined') {
189
- throw new AppcondaException('Missing required parameter: "collectionId"');
193
+ throw new client_1.AppcondaException('Missing required parameter: "collectionId"');
190
194
  }
191
195
  if (typeof name === 'undefined') {
192
- throw new AppcondaException('Missing required parameter: "name"');
196
+ throw new client_1.AppcondaException('Missing required parameter: "name"');
193
197
  }
194
198
  const apiPath = '/databases/{databaseId}/collections'.replace('{databaseId}', databaseId);
195
199
  const payload = {};
@@ -226,10 +230,10 @@ export class Databases {
226
230
  */
227
231
  async getCollection(databaseId, collectionId) {
228
232
  if (typeof databaseId === 'undefined') {
229
- throw new AppcondaException('Missing required parameter: "databaseId"');
233
+ throw new client_1.AppcondaException('Missing required parameter: "databaseId"');
230
234
  }
231
235
  if (typeof collectionId === 'undefined') {
232
- throw new AppcondaException('Missing required parameter: "collectionId"');
236
+ throw new client_1.AppcondaException('Missing required parameter: "collectionId"');
233
237
  }
234
238
  const apiPath = '/databases/{databaseId}/collections/{collectionId}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
235
239
  const payload = {};
@@ -255,13 +259,13 @@ export class Databases {
255
259
  */
256
260
  async updateCollection(databaseId, collectionId, name, permissions, documentSecurity, enabled) {
257
261
  if (typeof databaseId === 'undefined') {
258
- throw new AppcondaException('Missing required parameter: "databaseId"');
262
+ throw new client_1.AppcondaException('Missing required parameter: "databaseId"');
259
263
  }
260
264
  if (typeof collectionId === 'undefined') {
261
- throw new AppcondaException('Missing required parameter: "collectionId"');
265
+ throw new client_1.AppcondaException('Missing required parameter: "collectionId"');
262
266
  }
263
267
  if (typeof name === 'undefined') {
264
- throw new AppcondaException('Missing required parameter: "name"');
268
+ throw new client_1.AppcondaException('Missing required parameter: "name"');
265
269
  }
266
270
  const apiPath = '/databases/{databaseId}/collections/{collectionId}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
267
271
  const payload = {};
@@ -295,10 +299,10 @@ export class Databases {
295
299
  */
296
300
  async deleteCollection(databaseId, collectionId) {
297
301
  if (typeof databaseId === 'undefined') {
298
- throw new AppcondaException('Missing required parameter: "databaseId"');
302
+ throw new client_1.AppcondaException('Missing required parameter: "databaseId"');
299
303
  }
300
304
  if (typeof collectionId === 'undefined') {
301
- throw new AppcondaException('Missing required parameter: "collectionId"');
305
+ throw new client_1.AppcondaException('Missing required parameter: "collectionId"');
302
306
  }
303
307
  const apiPath = '/databases/{databaseId}/collections/{collectionId}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
304
308
  const payload = {};
@@ -321,10 +325,10 @@ export class Databases {
321
325
  */
322
326
  async listAttributes(databaseId, collectionId, queries) {
323
327
  if (typeof databaseId === 'undefined') {
324
- throw new AppcondaException('Missing required parameter: "databaseId"');
328
+ throw new client_1.AppcondaException('Missing required parameter: "databaseId"');
325
329
  }
326
330
  if (typeof collectionId === 'undefined') {
327
- throw new AppcondaException('Missing required parameter: "collectionId"');
331
+ throw new client_1.AppcondaException('Missing required parameter: "collectionId"');
328
332
  }
329
333
  const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
330
334
  const payload = {};
@@ -354,16 +358,16 @@ export class Databases {
354
358
  */
355
359
  async createBooleanAttribute(databaseId, collectionId, key, required, xdefault, array) {
356
360
  if (typeof databaseId === 'undefined') {
357
- throw new AppcondaException('Missing required parameter: "databaseId"');
361
+ throw new client_1.AppcondaException('Missing required parameter: "databaseId"');
358
362
  }
359
363
  if (typeof collectionId === 'undefined') {
360
- throw new AppcondaException('Missing required parameter: "collectionId"');
364
+ throw new client_1.AppcondaException('Missing required parameter: "collectionId"');
361
365
  }
362
366
  if (typeof key === 'undefined') {
363
- throw new AppcondaException('Missing required parameter: "key"');
367
+ throw new client_1.AppcondaException('Missing required parameter: "key"');
364
368
  }
365
369
  if (typeof required === 'undefined') {
366
- throw new AppcondaException('Missing required parameter: "required"');
370
+ throw new client_1.AppcondaException('Missing required parameter: "required"');
367
371
  }
368
372
  const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/boolean'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
369
373
  const payload = {};
@@ -401,19 +405,19 @@ export class Databases {
401
405
  */
402
406
  async updateBooleanAttribute(databaseId, collectionId, key, required, xdefault, newKey) {
403
407
  if (typeof databaseId === 'undefined') {
404
- throw new AppcondaException('Missing required parameter: "databaseId"');
408
+ throw new client_1.AppcondaException('Missing required parameter: "databaseId"');
405
409
  }
406
410
  if (typeof collectionId === 'undefined') {
407
- throw new AppcondaException('Missing required parameter: "collectionId"');
411
+ throw new client_1.AppcondaException('Missing required parameter: "collectionId"');
408
412
  }
409
413
  if (typeof key === 'undefined') {
410
- throw new AppcondaException('Missing required parameter: "key"');
414
+ throw new client_1.AppcondaException('Missing required parameter: "key"');
411
415
  }
412
416
  if (typeof required === 'undefined') {
413
- throw new AppcondaException('Missing required parameter: "required"');
417
+ throw new client_1.AppcondaException('Missing required parameter: "required"');
414
418
  }
415
419
  if (typeof xdefault === 'undefined') {
416
- throw new AppcondaException('Missing required parameter: "xdefault"');
420
+ throw new client_1.AppcondaException('Missing required parameter: "xdefault"');
417
421
  }
418
422
  const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/boolean/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
419
423
  const payload = {};
@@ -448,16 +452,16 @@ export class Databases {
448
452
  */
449
453
  async createDatetimeAttribute(databaseId, collectionId, key, required, xdefault, array) {
450
454
  if (typeof databaseId === 'undefined') {
451
- throw new AppcondaException('Missing required parameter: "databaseId"');
455
+ throw new client_1.AppcondaException('Missing required parameter: "databaseId"');
452
456
  }
453
457
  if (typeof collectionId === 'undefined') {
454
- throw new AppcondaException('Missing required parameter: "collectionId"');
458
+ throw new client_1.AppcondaException('Missing required parameter: "collectionId"');
455
459
  }
456
460
  if (typeof key === 'undefined') {
457
- throw new AppcondaException('Missing required parameter: "key"');
461
+ throw new client_1.AppcondaException('Missing required parameter: "key"');
458
462
  }
459
463
  if (typeof required === 'undefined') {
460
- throw new AppcondaException('Missing required parameter: "required"');
464
+ throw new client_1.AppcondaException('Missing required parameter: "required"');
461
465
  }
462
466
  const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/datetime'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
463
467
  const payload = {};
@@ -495,19 +499,19 @@ export class Databases {
495
499
  */
496
500
  async updateDatetimeAttribute(databaseId, collectionId, key, required, xdefault, newKey) {
497
501
  if (typeof databaseId === 'undefined') {
498
- throw new AppcondaException('Missing required parameter: "databaseId"');
502
+ throw new client_1.AppcondaException('Missing required parameter: "databaseId"');
499
503
  }
500
504
  if (typeof collectionId === 'undefined') {
501
- throw new AppcondaException('Missing required parameter: "collectionId"');
505
+ throw new client_1.AppcondaException('Missing required parameter: "collectionId"');
502
506
  }
503
507
  if (typeof key === 'undefined') {
504
- throw new AppcondaException('Missing required parameter: "key"');
508
+ throw new client_1.AppcondaException('Missing required parameter: "key"');
505
509
  }
506
510
  if (typeof required === 'undefined') {
507
- throw new AppcondaException('Missing required parameter: "required"');
511
+ throw new client_1.AppcondaException('Missing required parameter: "required"');
508
512
  }
509
513
  if (typeof xdefault === 'undefined') {
510
- throw new AppcondaException('Missing required parameter: "xdefault"');
514
+ throw new client_1.AppcondaException('Missing required parameter: "xdefault"');
511
515
  }
512
516
  const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/datetime/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
513
517
  const payload = {};
@@ -543,16 +547,16 @@ export class Databases {
543
547
  */
544
548
  async createEmailAttribute(databaseId, collectionId, key, required, xdefault, array) {
545
549
  if (typeof databaseId === 'undefined') {
546
- throw new AppcondaException('Missing required parameter: "databaseId"');
550
+ throw new client_1.AppcondaException('Missing required parameter: "databaseId"');
547
551
  }
548
552
  if (typeof collectionId === 'undefined') {
549
- throw new AppcondaException('Missing required parameter: "collectionId"');
553
+ throw new client_1.AppcondaException('Missing required parameter: "collectionId"');
550
554
  }
551
555
  if (typeof key === 'undefined') {
552
- throw new AppcondaException('Missing required parameter: "key"');
556
+ throw new client_1.AppcondaException('Missing required parameter: "key"');
553
557
  }
554
558
  if (typeof required === 'undefined') {
555
- throw new AppcondaException('Missing required parameter: "required"');
559
+ throw new client_1.AppcondaException('Missing required parameter: "required"');
556
560
  }
557
561
  const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/email'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
558
562
  const payload = {};
@@ -591,19 +595,19 @@ export class Databases {
591
595
  */
592
596
  async updateEmailAttribute(databaseId, collectionId, key, required, xdefault, newKey) {
593
597
  if (typeof databaseId === 'undefined') {
594
- throw new AppcondaException('Missing required parameter: "databaseId"');
598
+ throw new client_1.AppcondaException('Missing required parameter: "databaseId"');
595
599
  }
596
600
  if (typeof collectionId === 'undefined') {
597
- throw new AppcondaException('Missing required parameter: "collectionId"');
601
+ throw new client_1.AppcondaException('Missing required parameter: "collectionId"');
598
602
  }
599
603
  if (typeof key === 'undefined') {
600
- throw new AppcondaException('Missing required parameter: "key"');
604
+ throw new client_1.AppcondaException('Missing required parameter: "key"');
601
605
  }
602
606
  if (typeof required === 'undefined') {
603
- throw new AppcondaException('Missing required parameter: "required"');
607
+ throw new client_1.AppcondaException('Missing required parameter: "required"');
604
608
  }
605
609
  if (typeof xdefault === 'undefined') {
606
- throw new AppcondaException('Missing required parameter: "xdefault"');
610
+ throw new client_1.AppcondaException('Missing required parameter: "xdefault"');
607
611
  }
608
612
  const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/email/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
609
613
  const payload = {};
@@ -640,19 +644,19 @@ export class Databases {
640
644
  */
641
645
  async createEnumAttribute(databaseId, collectionId, key, elements, required, xdefault, array) {
642
646
  if (typeof databaseId === 'undefined') {
643
- throw new AppcondaException('Missing required parameter: "databaseId"');
647
+ throw new client_1.AppcondaException('Missing required parameter: "databaseId"');
644
648
  }
645
649
  if (typeof collectionId === 'undefined') {
646
- throw new AppcondaException('Missing required parameter: "collectionId"');
650
+ throw new client_1.AppcondaException('Missing required parameter: "collectionId"');
647
651
  }
648
652
  if (typeof key === 'undefined') {
649
- throw new AppcondaException('Missing required parameter: "key"');
653
+ throw new client_1.AppcondaException('Missing required parameter: "key"');
650
654
  }
651
655
  if (typeof elements === 'undefined') {
652
- throw new AppcondaException('Missing required parameter: "elements"');
656
+ throw new client_1.AppcondaException('Missing required parameter: "elements"');
653
657
  }
654
658
  if (typeof required === 'undefined') {
655
- throw new AppcondaException('Missing required parameter: "required"');
659
+ throw new client_1.AppcondaException('Missing required parameter: "required"');
656
660
  }
657
661
  const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/enum'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
658
662
  const payload = {};
@@ -695,22 +699,22 @@ export class Databases {
695
699
  */
696
700
  async updateEnumAttribute(databaseId, collectionId, key, elements, required, xdefault, newKey) {
697
701
  if (typeof databaseId === 'undefined') {
698
- throw new AppcondaException('Missing required parameter: "databaseId"');
702
+ throw new client_1.AppcondaException('Missing required parameter: "databaseId"');
699
703
  }
700
704
  if (typeof collectionId === 'undefined') {
701
- throw new AppcondaException('Missing required parameter: "collectionId"');
705
+ throw new client_1.AppcondaException('Missing required parameter: "collectionId"');
702
706
  }
703
707
  if (typeof key === 'undefined') {
704
- throw new AppcondaException('Missing required parameter: "key"');
708
+ throw new client_1.AppcondaException('Missing required parameter: "key"');
705
709
  }
706
710
  if (typeof elements === 'undefined') {
707
- throw new AppcondaException('Missing required parameter: "elements"');
711
+ throw new client_1.AppcondaException('Missing required parameter: "elements"');
708
712
  }
709
713
  if (typeof required === 'undefined') {
710
- throw new AppcondaException('Missing required parameter: "required"');
714
+ throw new client_1.AppcondaException('Missing required parameter: "required"');
711
715
  }
712
716
  if (typeof xdefault === 'undefined') {
713
- throw new AppcondaException('Missing required parameter: "xdefault"');
717
+ throw new client_1.AppcondaException('Missing required parameter: "xdefault"');
714
718
  }
715
719
  const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/enum/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
716
720
  const payload = {};
@@ -751,16 +755,16 @@ export class Databases {
751
755
  */
752
756
  async createFloatAttribute(databaseId, collectionId, key, required, min, max, xdefault, array) {
753
757
  if (typeof databaseId === 'undefined') {
754
- throw new AppcondaException('Missing required parameter: "databaseId"');
758
+ throw new client_1.AppcondaException('Missing required parameter: "databaseId"');
755
759
  }
756
760
  if (typeof collectionId === 'undefined') {
757
- throw new AppcondaException('Missing required parameter: "collectionId"');
761
+ throw new client_1.AppcondaException('Missing required parameter: "collectionId"');
758
762
  }
759
763
  if (typeof key === 'undefined') {
760
- throw new AppcondaException('Missing required parameter: "key"');
764
+ throw new client_1.AppcondaException('Missing required parameter: "key"');
761
765
  }
762
766
  if (typeof required === 'undefined') {
763
- throw new AppcondaException('Missing required parameter: "required"');
767
+ throw new client_1.AppcondaException('Missing required parameter: "required"');
764
768
  }
765
769
  const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/float'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
766
770
  const payload = {};
@@ -807,25 +811,25 @@ export class Databases {
807
811
  */
808
812
  async updateFloatAttribute(databaseId, collectionId, key, required, min, max, xdefault, newKey) {
809
813
  if (typeof databaseId === 'undefined') {
810
- throw new AppcondaException('Missing required parameter: "databaseId"');
814
+ throw new client_1.AppcondaException('Missing required parameter: "databaseId"');
811
815
  }
812
816
  if (typeof collectionId === 'undefined') {
813
- throw new AppcondaException('Missing required parameter: "collectionId"');
817
+ throw new client_1.AppcondaException('Missing required parameter: "collectionId"');
814
818
  }
815
819
  if (typeof key === 'undefined') {
816
- throw new AppcondaException('Missing required parameter: "key"');
820
+ throw new client_1.AppcondaException('Missing required parameter: "key"');
817
821
  }
818
822
  if (typeof required === 'undefined') {
819
- throw new AppcondaException('Missing required parameter: "required"');
823
+ throw new client_1.AppcondaException('Missing required parameter: "required"');
820
824
  }
821
825
  if (typeof min === 'undefined') {
822
- throw new AppcondaException('Missing required parameter: "min"');
826
+ throw new client_1.AppcondaException('Missing required parameter: "min"');
823
827
  }
824
828
  if (typeof max === 'undefined') {
825
- throw new AppcondaException('Missing required parameter: "max"');
829
+ throw new client_1.AppcondaException('Missing required parameter: "max"');
826
830
  }
827
831
  if (typeof xdefault === 'undefined') {
828
- throw new AppcondaException('Missing required parameter: "xdefault"');
832
+ throw new client_1.AppcondaException('Missing required parameter: "xdefault"');
829
833
  }
830
834
  const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/float/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
831
835
  const payload = {};
@@ -869,16 +873,16 @@ export class Databases {
869
873
  */
870
874
  async createIntegerAttribute(databaseId, collectionId, key, required, min, max, xdefault, array) {
871
875
  if (typeof databaseId === 'undefined') {
872
- throw new AppcondaException('Missing required parameter: "databaseId"');
876
+ throw new client_1.AppcondaException('Missing required parameter: "databaseId"');
873
877
  }
874
878
  if (typeof collectionId === 'undefined') {
875
- throw new AppcondaException('Missing required parameter: "collectionId"');
879
+ throw new client_1.AppcondaException('Missing required parameter: "collectionId"');
876
880
  }
877
881
  if (typeof key === 'undefined') {
878
- throw new AppcondaException('Missing required parameter: "key"');
882
+ throw new client_1.AppcondaException('Missing required parameter: "key"');
879
883
  }
880
884
  if (typeof required === 'undefined') {
881
- throw new AppcondaException('Missing required parameter: "required"');
885
+ throw new client_1.AppcondaException('Missing required parameter: "required"');
882
886
  }
883
887
  const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/integer'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
884
888
  const payload = {};
@@ -925,25 +929,25 @@ export class Databases {
925
929
  */
926
930
  async updateIntegerAttribute(databaseId, collectionId, key, required, min, max, xdefault, newKey) {
927
931
  if (typeof databaseId === 'undefined') {
928
- throw new AppcondaException('Missing required parameter: "databaseId"');
932
+ throw new client_1.AppcondaException('Missing required parameter: "databaseId"');
929
933
  }
930
934
  if (typeof collectionId === 'undefined') {
931
- throw new AppcondaException('Missing required parameter: "collectionId"');
935
+ throw new client_1.AppcondaException('Missing required parameter: "collectionId"');
932
936
  }
933
937
  if (typeof key === 'undefined') {
934
- throw new AppcondaException('Missing required parameter: "key"');
938
+ throw new client_1.AppcondaException('Missing required parameter: "key"');
935
939
  }
936
940
  if (typeof required === 'undefined') {
937
- throw new AppcondaException('Missing required parameter: "required"');
941
+ throw new client_1.AppcondaException('Missing required parameter: "required"');
938
942
  }
939
943
  if (typeof min === 'undefined') {
940
- throw new AppcondaException('Missing required parameter: "min"');
944
+ throw new client_1.AppcondaException('Missing required parameter: "min"');
941
945
  }
942
946
  if (typeof max === 'undefined') {
943
- throw new AppcondaException('Missing required parameter: "max"');
947
+ throw new client_1.AppcondaException('Missing required parameter: "max"');
944
948
  }
945
949
  if (typeof xdefault === 'undefined') {
946
- throw new AppcondaException('Missing required parameter: "xdefault"');
950
+ throw new client_1.AppcondaException('Missing required parameter: "xdefault"');
947
951
  }
948
952
  const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/integer/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
949
953
  const payload = {};
@@ -985,16 +989,16 @@ export class Databases {
985
989
  */
986
990
  async createIpAttribute(databaseId, collectionId, key, required, xdefault, array) {
987
991
  if (typeof databaseId === 'undefined') {
988
- throw new AppcondaException('Missing required parameter: "databaseId"');
992
+ throw new client_1.AppcondaException('Missing required parameter: "databaseId"');
989
993
  }
990
994
  if (typeof collectionId === 'undefined') {
991
- throw new AppcondaException('Missing required parameter: "collectionId"');
995
+ throw new client_1.AppcondaException('Missing required parameter: "collectionId"');
992
996
  }
993
997
  if (typeof key === 'undefined') {
994
- throw new AppcondaException('Missing required parameter: "key"');
998
+ throw new client_1.AppcondaException('Missing required parameter: "key"');
995
999
  }
996
1000
  if (typeof required === 'undefined') {
997
- throw new AppcondaException('Missing required parameter: "required"');
1001
+ throw new client_1.AppcondaException('Missing required parameter: "required"');
998
1002
  }
999
1003
  const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/ip'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
1000
1004
  const payload = {};
@@ -1033,19 +1037,19 @@ export class Databases {
1033
1037
  */
1034
1038
  async updateIpAttribute(databaseId, collectionId, key, required, xdefault, newKey) {
1035
1039
  if (typeof databaseId === 'undefined') {
1036
- throw new AppcondaException('Missing required parameter: "databaseId"');
1040
+ throw new client_1.AppcondaException('Missing required parameter: "databaseId"');
1037
1041
  }
1038
1042
  if (typeof collectionId === 'undefined') {
1039
- throw new AppcondaException('Missing required parameter: "collectionId"');
1043
+ throw new client_1.AppcondaException('Missing required parameter: "collectionId"');
1040
1044
  }
1041
1045
  if (typeof key === 'undefined') {
1042
- throw new AppcondaException('Missing required parameter: "key"');
1046
+ throw new client_1.AppcondaException('Missing required parameter: "key"');
1043
1047
  }
1044
1048
  if (typeof required === 'undefined') {
1045
- throw new AppcondaException('Missing required parameter: "required"');
1049
+ throw new client_1.AppcondaException('Missing required parameter: "required"');
1046
1050
  }
1047
1051
  if (typeof xdefault === 'undefined') {
1048
- throw new AppcondaException('Missing required parameter: "xdefault"');
1052
+ throw new client_1.AppcondaException('Missing required parameter: "xdefault"');
1049
1053
  }
1050
1054
  const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/ip/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
1051
1055
  const payload = {};
@@ -1083,16 +1087,16 @@ export class Databases {
1083
1087
  */
1084
1088
  async createRelationshipAttribute(databaseId, collectionId, relatedCollectionId, type, twoWay, key, twoWayKey, onDelete) {
1085
1089
  if (typeof databaseId === 'undefined') {
1086
- throw new AppcondaException('Missing required parameter: "databaseId"');
1090
+ throw new client_1.AppcondaException('Missing required parameter: "databaseId"');
1087
1091
  }
1088
1092
  if (typeof collectionId === 'undefined') {
1089
- throw new AppcondaException('Missing required parameter: "collectionId"');
1093
+ throw new client_1.AppcondaException('Missing required parameter: "collectionId"');
1090
1094
  }
1091
1095
  if (typeof relatedCollectionId === 'undefined') {
1092
- throw new AppcondaException('Missing required parameter: "relatedCollectionId"');
1096
+ throw new client_1.AppcondaException('Missing required parameter: "relatedCollectionId"');
1093
1097
  }
1094
1098
  if (typeof type === 'undefined') {
1095
- throw new AppcondaException('Missing required parameter: "type"');
1099
+ throw new client_1.AppcondaException('Missing required parameter: "type"');
1096
1100
  }
1097
1101
  const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/relationship'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
1098
1102
  const payload = {};
@@ -1139,19 +1143,19 @@ export class Databases {
1139
1143
  */
1140
1144
  async createStringAttribute(databaseId, collectionId, key, size, required, xdefault, array, encrypt) {
1141
1145
  if (typeof databaseId === 'undefined') {
1142
- throw new AppcondaException('Missing required parameter: "databaseId"');
1146
+ throw new client_1.AppcondaException('Missing required parameter: "databaseId"');
1143
1147
  }
1144
1148
  if (typeof collectionId === 'undefined') {
1145
- throw new AppcondaException('Missing required parameter: "collectionId"');
1149
+ throw new client_1.AppcondaException('Missing required parameter: "collectionId"');
1146
1150
  }
1147
1151
  if (typeof key === 'undefined') {
1148
- throw new AppcondaException('Missing required parameter: "key"');
1152
+ throw new client_1.AppcondaException('Missing required parameter: "key"');
1149
1153
  }
1150
1154
  if (typeof size === 'undefined') {
1151
- throw new AppcondaException('Missing required parameter: "size"');
1155
+ throw new client_1.AppcondaException('Missing required parameter: "size"');
1152
1156
  }
1153
1157
  if (typeof required === 'undefined') {
1154
- throw new AppcondaException('Missing required parameter: "required"');
1158
+ throw new client_1.AppcondaException('Missing required parameter: "required"');
1155
1159
  }
1156
1160
  const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/string'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
1157
1161
  const payload = {};
@@ -1197,19 +1201,19 @@ export class Databases {
1197
1201
  */
1198
1202
  async updateStringAttribute(databaseId, collectionId, key, required, xdefault, size, newKey) {
1199
1203
  if (typeof databaseId === 'undefined') {
1200
- throw new AppcondaException('Missing required parameter: "databaseId"');
1204
+ throw new client_1.AppcondaException('Missing required parameter: "databaseId"');
1201
1205
  }
1202
1206
  if (typeof collectionId === 'undefined') {
1203
- throw new AppcondaException('Missing required parameter: "collectionId"');
1207
+ throw new client_1.AppcondaException('Missing required parameter: "collectionId"');
1204
1208
  }
1205
1209
  if (typeof key === 'undefined') {
1206
- throw new AppcondaException('Missing required parameter: "key"');
1210
+ throw new client_1.AppcondaException('Missing required parameter: "key"');
1207
1211
  }
1208
1212
  if (typeof required === 'undefined') {
1209
- throw new AppcondaException('Missing required parameter: "required"');
1213
+ throw new client_1.AppcondaException('Missing required parameter: "required"');
1210
1214
  }
1211
1215
  if (typeof xdefault === 'undefined') {
1212
- throw new AppcondaException('Missing required parameter: "xdefault"');
1216
+ throw new client_1.AppcondaException('Missing required parameter: "xdefault"');
1213
1217
  }
1214
1218
  const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/string/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
1215
1219
  const payload = {};
@@ -1248,16 +1252,16 @@ export class Databases {
1248
1252
  */
1249
1253
  async createUrlAttribute(databaseId, collectionId, key, required, xdefault, array) {
1250
1254
  if (typeof databaseId === 'undefined') {
1251
- throw new AppcondaException('Missing required parameter: "databaseId"');
1255
+ throw new client_1.AppcondaException('Missing required parameter: "databaseId"');
1252
1256
  }
1253
1257
  if (typeof collectionId === 'undefined') {
1254
- throw new AppcondaException('Missing required parameter: "collectionId"');
1258
+ throw new client_1.AppcondaException('Missing required parameter: "collectionId"');
1255
1259
  }
1256
1260
  if (typeof key === 'undefined') {
1257
- throw new AppcondaException('Missing required parameter: "key"');
1261
+ throw new client_1.AppcondaException('Missing required parameter: "key"');
1258
1262
  }
1259
1263
  if (typeof required === 'undefined') {
1260
- throw new AppcondaException('Missing required parameter: "required"');
1264
+ throw new client_1.AppcondaException('Missing required parameter: "required"');
1261
1265
  }
1262
1266
  const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/url'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
1263
1267
  const payload = {};
@@ -1296,19 +1300,19 @@ export class Databases {
1296
1300
  */
1297
1301
  async updateUrlAttribute(databaseId, collectionId, key, required, xdefault, newKey) {
1298
1302
  if (typeof databaseId === 'undefined') {
1299
- throw new AppcondaException('Missing required parameter: "databaseId"');
1303
+ throw new client_1.AppcondaException('Missing required parameter: "databaseId"');
1300
1304
  }
1301
1305
  if (typeof collectionId === 'undefined') {
1302
- throw new AppcondaException('Missing required parameter: "collectionId"');
1306
+ throw new client_1.AppcondaException('Missing required parameter: "collectionId"');
1303
1307
  }
1304
1308
  if (typeof key === 'undefined') {
1305
- throw new AppcondaException('Missing required parameter: "key"');
1309
+ throw new client_1.AppcondaException('Missing required parameter: "key"');
1306
1310
  }
1307
1311
  if (typeof required === 'undefined') {
1308
- throw new AppcondaException('Missing required parameter: "required"');
1312
+ throw new client_1.AppcondaException('Missing required parameter: "required"');
1309
1313
  }
1310
1314
  if (typeof xdefault === 'undefined') {
1311
- throw new AppcondaException('Missing required parameter: "xdefault"');
1315
+ throw new client_1.AppcondaException('Missing required parameter: "xdefault"');
1312
1316
  }
1313
1317
  const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/url/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
1314
1318
  const payload = {};
@@ -1340,13 +1344,13 @@ export class Databases {
1340
1344
  */
1341
1345
  async getAttribute(databaseId, collectionId, key) {
1342
1346
  if (typeof databaseId === 'undefined') {
1343
- throw new AppcondaException('Missing required parameter: "databaseId"');
1347
+ throw new client_1.AppcondaException('Missing required parameter: "databaseId"');
1344
1348
  }
1345
1349
  if (typeof collectionId === 'undefined') {
1346
- throw new AppcondaException('Missing required parameter: "collectionId"');
1350
+ throw new client_1.AppcondaException('Missing required parameter: "collectionId"');
1347
1351
  }
1348
1352
  if (typeof key === 'undefined') {
1349
- throw new AppcondaException('Missing required parameter: "key"');
1353
+ throw new client_1.AppcondaException('Missing required parameter: "key"');
1350
1354
  }
1351
1355
  const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
1352
1356
  const payload = {};
@@ -1369,13 +1373,13 @@ export class Databases {
1369
1373
  */
1370
1374
  async deleteAttribute(databaseId, collectionId, key) {
1371
1375
  if (typeof databaseId === 'undefined') {
1372
- throw new AppcondaException('Missing required parameter: "databaseId"');
1376
+ throw new client_1.AppcondaException('Missing required parameter: "databaseId"');
1373
1377
  }
1374
1378
  if (typeof collectionId === 'undefined') {
1375
- throw new AppcondaException('Missing required parameter: "collectionId"');
1379
+ throw new client_1.AppcondaException('Missing required parameter: "collectionId"');
1376
1380
  }
1377
1381
  if (typeof key === 'undefined') {
1378
- throw new AppcondaException('Missing required parameter: "key"');
1382
+ throw new client_1.AppcondaException('Missing required parameter: "key"');
1379
1383
  }
1380
1384
  const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
1381
1385
  const payload = {};
@@ -1401,13 +1405,13 @@ export class Databases {
1401
1405
  */
1402
1406
  async updateRelationshipAttribute(databaseId, collectionId, key, onDelete, newKey) {
1403
1407
  if (typeof databaseId === 'undefined') {
1404
- throw new AppcondaException('Missing required parameter: "databaseId"');
1408
+ throw new client_1.AppcondaException('Missing required parameter: "databaseId"');
1405
1409
  }
1406
1410
  if (typeof collectionId === 'undefined') {
1407
- throw new AppcondaException('Missing required parameter: "collectionId"');
1411
+ throw new client_1.AppcondaException('Missing required parameter: "collectionId"');
1408
1412
  }
1409
1413
  if (typeof key === 'undefined') {
1410
- throw new AppcondaException('Missing required parameter: "key"');
1414
+ throw new client_1.AppcondaException('Missing required parameter: "key"');
1411
1415
  }
1412
1416
  const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/{key}/relationship'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
1413
1417
  const payload = {};
@@ -1436,10 +1440,10 @@ export class Databases {
1436
1440
  */
1437
1441
  async listDocuments(databaseId, collectionId, queries) {
1438
1442
  if (typeof databaseId === 'undefined') {
1439
- throw new AppcondaException('Missing required parameter: "databaseId"');
1443
+ throw new client_1.AppcondaException('Missing required parameter: "databaseId"');
1440
1444
  }
1441
1445
  if (typeof collectionId === 'undefined') {
1442
- throw new AppcondaException('Missing required parameter: "collectionId"');
1446
+ throw new client_1.AppcondaException('Missing required parameter: "collectionId"');
1443
1447
  }
1444
1448
  const apiPath = '/databases/{databaseId}/collections/{collectionId}/documents'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
1445
1449
  const payload = {};
@@ -1467,16 +1471,16 @@ export class Databases {
1467
1471
  */
1468
1472
  async createDocument(databaseId, collectionId, documentId, data, permissions) {
1469
1473
  if (typeof databaseId === 'undefined') {
1470
- throw new AppcondaException('Missing required parameter: "databaseId"');
1474
+ throw new client_1.AppcondaException('Missing required parameter: "databaseId"');
1471
1475
  }
1472
1476
  if (typeof collectionId === 'undefined') {
1473
- throw new AppcondaException('Missing required parameter: "collectionId"');
1477
+ throw new client_1.AppcondaException('Missing required parameter: "collectionId"');
1474
1478
  }
1475
1479
  if (typeof documentId === 'undefined') {
1476
- throw new AppcondaException('Missing required parameter: "documentId"');
1480
+ throw new client_1.AppcondaException('Missing required parameter: "documentId"');
1477
1481
  }
1478
1482
  if (typeof data === 'undefined') {
1479
- throw new AppcondaException('Missing required parameter: "data"');
1483
+ throw new client_1.AppcondaException('Missing required parameter: "data"');
1480
1484
  }
1481
1485
  const apiPath = '/databases/{databaseId}/collections/{collectionId}/documents'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
1482
1486
  const payload = {};
@@ -1509,13 +1513,13 @@ export class Databases {
1509
1513
  */
1510
1514
  async getDocument(databaseId, collectionId, documentId, queries) {
1511
1515
  if (typeof databaseId === 'undefined') {
1512
- throw new AppcondaException('Missing required parameter: "databaseId"');
1516
+ throw new client_1.AppcondaException('Missing required parameter: "databaseId"');
1513
1517
  }
1514
1518
  if (typeof collectionId === 'undefined') {
1515
- throw new AppcondaException('Missing required parameter: "collectionId"');
1519
+ throw new client_1.AppcondaException('Missing required parameter: "collectionId"');
1516
1520
  }
1517
1521
  if (typeof documentId === 'undefined') {
1518
- throw new AppcondaException('Missing required parameter: "documentId"');
1522
+ throw new client_1.AppcondaException('Missing required parameter: "documentId"');
1519
1523
  }
1520
1524
  const apiPath = '/databases/{databaseId}/collections/{collectionId}/documents/{documentId}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{documentId}', documentId);
1521
1525
  const payload = {};
@@ -1543,13 +1547,13 @@ export class Databases {
1543
1547
  */
1544
1548
  async updateDocument(databaseId, collectionId, documentId, data, permissions) {
1545
1549
  if (typeof databaseId === 'undefined') {
1546
- throw new AppcondaException('Missing required parameter: "databaseId"');
1550
+ throw new client_1.AppcondaException('Missing required parameter: "databaseId"');
1547
1551
  }
1548
1552
  if (typeof collectionId === 'undefined') {
1549
- throw new AppcondaException('Missing required parameter: "collectionId"');
1553
+ throw new client_1.AppcondaException('Missing required parameter: "collectionId"');
1550
1554
  }
1551
1555
  if (typeof documentId === 'undefined') {
1552
- throw new AppcondaException('Missing required parameter: "documentId"');
1556
+ throw new client_1.AppcondaException('Missing required parameter: "documentId"');
1553
1557
  }
1554
1558
  const apiPath = '/databases/{databaseId}/collections/{collectionId}/documents/{documentId}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{documentId}', documentId);
1555
1559
  const payload = {};
@@ -1578,13 +1582,13 @@ export class Databases {
1578
1582
  */
1579
1583
  async deleteDocument(databaseId, collectionId, documentId) {
1580
1584
  if (typeof databaseId === 'undefined') {
1581
- throw new AppcondaException('Missing required parameter: "databaseId"');
1585
+ throw new client_1.AppcondaException('Missing required parameter: "databaseId"');
1582
1586
  }
1583
1587
  if (typeof collectionId === 'undefined') {
1584
- throw new AppcondaException('Missing required parameter: "collectionId"');
1588
+ throw new client_1.AppcondaException('Missing required parameter: "collectionId"');
1585
1589
  }
1586
1590
  if (typeof documentId === 'undefined') {
1587
- throw new AppcondaException('Missing required parameter: "documentId"');
1591
+ throw new client_1.AppcondaException('Missing required parameter: "documentId"');
1588
1592
  }
1589
1593
  const apiPath = '/databases/{databaseId}/collections/{collectionId}/documents/{documentId}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{documentId}', documentId);
1590
1594
  const payload = {};
@@ -1607,10 +1611,10 @@ export class Databases {
1607
1611
  */
1608
1612
  async listIndexes(databaseId, collectionId, queries) {
1609
1613
  if (typeof databaseId === 'undefined') {
1610
- throw new AppcondaException('Missing required parameter: "databaseId"');
1614
+ throw new client_1.AppcondaException('Missing required parameter: "databaseId"');
1611
1615
  }
1612
1616
  if (typeof collectionId === 'undefined') {
1613
- throw new AppcondaException('Missing required parameter: "collectionId"');
1617
+ throw new client_1.AppcondaException('Missing required parameter: "collectionId"');
1614
1618
  }
1615
1619
  const apiPath = '/databases/{databaseId}/collections/{collectionId}/indexes'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
1616
1620
  const payload = {};
@@ -1640,19 +1644,19 @@ Attributes can be `key`, `fulltext`, and `unique`.
1640
1644
  */
1641
1645
  async createIndex(databaseId, collectionId, key, type, attributes, orders) {
1642
1646
  if (typeof databaseId === 'undefined') {
1643
- throw new AppcondaException('Missing required parameter: "databaseId"');
1647
+ throw new client_1.AppcondaException('Missing required parameter: "databaseId"');
1644
1648
  }
1645
1649
  if (typeof collectionId === 'undefined') {
1646
- throw new AppcondaException('Missing required parameter: "collectionId"');
1650
+ throw new client_1.AppcondaException('Missing required parameter: "collectionId"');
1647
1651
  }
1648
1652
  if (typeof key === 'undefined') {
1649
- throw new AppcondaException('Missing required parameter: "key"');
1653
+ throw new client_1.AppcondaException('Missing required parameter: "key"');
1650
1654
  }
1651
1655
  if (typeof type === 'undefined') {
1652
- throw new AppcondaException('Missing required parameter: "type"');
1656
+ throw new client_1.AppcondaException('Missing required parameter: "type"');
1653
1657
  }
1654
1658
  if (typeof attributes === 'undefined') {
1655
- throw new AppcondaException('Missing required parameter: "attributes"');
1659
+ throw new client_1.AppcondaException('Missing required parameter: "attributes"');
1656
1660
  }
1657
1661
  const apiPath = '/databases/{databaseId}/collections/{collectionId}/indexes'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
1658
1662
  const payload = {};
@@ -1687,13 +1691,13 @@ Attributes can be `key`, `fulltext`, and `unique`.
1687
1691
  */
1688
1692
  async getIndex(databaseId, collectionId, key) {
1689
1693
  if (typeof databaseId === 'undefined') {
1690
- throw new AppcondaException('Missing required parameter: "databaseId"');
1694
+ throw new client_1.AppcondaException('Missing required parameter: "databaseId"');
1691
1695
  }
1692
1696
  if (typeof collectionId === 'undefined') {
1693
- throw new AppcondaException('Missing required parameter: "collectionId"');
1697
+ throw new client_1.AppcondaException('Missing required parameter: "collectionId"');
1694
1698
  }
1695
1699
  if (typeof key === 'undefined') {
1696
- throw new AppcondaException('Missing required parameter: "key"');
1700
+ throw new client_1.AppcondaException('Missing required parameter: "key"');
1697
1701
  }
1698
1702
  const apiPath = '/databases/{databaseId}/collections/{collectionId}/indexes/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
1699
1703
  const payload = {};
@@ -1716,13 +1720,13 @@ Attributes can be `key`, `fulltext`, and `unique`.
1716
1720
  */
1717
1721
  async deleteIndex(databaseId, collectionId, key) {
1718
1722
  if (typeof databaseId === 'undefined') {
1719
- throw new AppcondaException('Missing required parameter: "databaseId"');
1723
+ throw new client_1.AppcondaException('Missing required parameter: "databaseId"');
1720
1724
  }
1721
1725
  if (typeof collectionId === 'undefined') {
1722
- throw new AppcondaException('Missing required parameter: "collectionId"');
1726
+ throw new client_1.AppcondaException('Missing required parameter: "collectionId"');
1723
1727
  }
1724
1728
  if (typeof key === 'undefined') {
1725
- throw new AppcondaException('Missing required parameter: "key"');
1729
+ throw new client_1.AppcondaException('Missing required parameter: "key"');
1726
1730
  }
1727
1731
  const apiPath = '/databases/{databaseId}/collections/{collectionId}/indexes/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
1728
1732
  const payload = {};
@@ -1733,3 +1737,4 @@ Attributes can be `key`, `fulltext`, and `unique`.
1733
1737
  return await this.client.call('delete', uri, apiHeaders, payload);
1734
1738
  }
1735
1739
  }
1740
+ exports.Databases = Databases;