@appwrite.io/console 1.8.0 → 1.9.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.
- package/README.md +3 -3
- package/dist/cjs/sdk.js +287 -8
- package/dist/cjs/sdk.js.map +1 -1
- package/dist/esm/sdk.js +288 -9
- package/dist/esm/sdk.js.map +1 -1
- package/dist/iife/sdk.js +287 -8
- package/docs/examples/databases/decrement-document-attribute.md +18 -0
- package/docs/examples/databases/increment-document-attribute.md +18 -0
- package/docs/examples/databases/upsert-documents.md +1 -1
- package/docs/examples/domains/create-record-a-a-a-a.md +1 -1
- package/docs/examples/domains/create-record-a.md +1 -1
- package/docs/examples/domains/create-record-alias.md +1 -1
- package/docs/examples/domains/create-record-c-a-a.md +1 -1
- package/docs/examples/domains/create-record-c-n-a-m-e.md +1 -1
- package/docs/examples/domains/create-record-h-t-t-p-s.md +1 -1
- package/docs/examples/domains/create-record-m-x.md +1 -1
- package/docs/examples/domains/create-record-n-s.md +1 -1
- package/docs/examples/domains/create-record-s-r-v.md +1 -1
- package/docs/examples/domains/create-record-t-x-t.md +1 -1
- package/docs/examples/domains/update-record-a-a-a-a.md +1 -1
- package/docs/examples/domains/update-record-a.md +1 -1
- package/docs/examples/domains/update-record-alias.md +1 -1
- package/docs/examples/domains/update-record-c-a-a.md +1 -1
- package/docs/examples/domains/update-record-c-n-a-m-e.md +1 -1
- package/docs/examples/domains/update-record-h-t-t-p-s.md +1 -1
- package/docs/examples/domains/update-record-m-x.md +1 -1
- package/docs/examples/domains/update-record-n-s.md +1 -1
- package/docs/examples/domains/update-record-s-r-v.md +1 -1
- package/docs/examples/domains/update-record-t-x-t.md +1 -1
- package/docs/examples/health/{get-queue-stats-usage-dump.md → get-queue-billing-project-aggregation.md} +2 -2
- package/docs/examples/health/{get-queue-billing-aggregation.md → get-queue-billing-team-aggregation.md} +1 -1
- package/docs/examples/organizations/cancel-downgrade.md +13 -0
- package/docs/examples/organizations/estimation-create-organization.md +16 -0
- package/docs/examples/organizations/estimation-delete-organization.md +13 -0
- package/docs/examples/organizations/estimation-update-plan.md +16 -0
- package/docs/examples/organizations/get-usage.md +1 -1
- package/docs/examples/organizations/validate-payment.md +14 -0
- package/docs/examples/proxy/create-redirect-rule.md +4 -2
- package/package.json +1 -1
- package/src/client.ts +5 -4
- package/src/enums/build-runtime.ts +2 -0
- package/src/enums/image-format.ts +1 -0
- package/src/enums/proxy-resource-type.ts +4 -0
- package/src/enums/runtime.ts +2 -0
- package/src/index.ts +1 -0
- package/src/models.ts +272 -2
- package/src/services/databases.ts +96 -1
- package/src/services/health.ts +28 -3
- package/src/services/organizations.ts +197 -0
- package/src/services/proxy.ts +16 -1
- package/types/enums/build-runtime.d.ts +3 -1
- package/types/enums/image-format.d.ts +2 -1
- package/types/enums/proxy-resource-type.d.ts +4 -0
- package/types/enums/runtime.d.ts +3 -1
- package/types/index.d.ts +1 -0
- package/types/models.d.ts +272 -2
- package/types/services/databases.d.ts +27 -1
- package/types/services/health.d.ts +10 -2
- package/types/services/organizations.d.ts +57 -0
- package/types/services/proxy.d.ts +4 -1
- package/docs/examples/functions/create-build.md +0 -15
- package/docs/examples/functions/get-function-usage.md +0 -14
- package/docs/examples/functions/update-deployment-build.md +0 -14
- package/docs/examples/functions/update-deployment.md +0 -14
- package/docs/examples/proxy/create-rule.md +0 -15
- package/src/enums/resource-type.ts +0 -4
- package/types/enums/resource-type.d.ts +0 -4
package/README.md
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
# Appwrite Console SDK
|
|
2
2
|
|
|
3
3
|

|
|
4
|
-

|
|
5
5
|
[](https://travis-ci.com/appwrite/sdk-generator)
|
|
6
6
|
[](https://twitter.com/appwrite)
|
|
7
7
|
[](https://appwrite.io/discord)
|
|
8
8
|
|
|
9
|
-
**This SDK is compatible with Appwrite server version 1.
|
|
9
|
+
**This SDK is compatible with Appwrite server version 1.8.x. For older versions, please check [previous releases](https://github.com/appwrite/sdk-for-console/releases).**
|
|
10
10
|
|
|
11
11
|
Appwrite is an open-source backend as a service server that abstract and simplify complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way. Use the Console SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools. For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs)
|
|
12
12
|
|
|
@@ -33,7 +33,7 @@ import { Client, Account } from "@appwrite.io/console";
|
|
|
33
33
|
To install with a CDN (content delivery network) add the following scripts to the bottom of your <body> tag, but before you use any Appwrite services:
|
|
34
34
|
|
|
35
35
|
```html
|
|
36
|
-
<script src="https://cdn.jsdelivr.net/npm/@appwrite.io/console@1.
|
|
36
|
+
<script src="https://cdn.jsdelivr.net/npm/@appwrite.io/console@1.9.0"></script>
|
|
37
37
|
```
|
|
38
38
|
|
|
39
39
|
|
package/dist/cjs/sdk.js
CHANGED
|
@@ -280,7 +280,7 @@ class Client {
|
|
|
280
280
|
'x-sdk-name': 'Console',
|
|
281
281
|
'x-sdk-platform': 'console',
|
|
282
282
|
'x-sdk-language': 'web',
|
|
283
|
-
'x-sdk-version': '1.
|
|
283
|
+
'x-sdk-version': '1.9.0',
|
|
284
284
|
'X-Appwrite-Response-Format': '1.7.0',
|
|
285
285
|
};
|
|
286
286
|
this.realtime = {
|
|
@@ -615,9 +615,10 @@ class Client {
|
|
|
615
615
|
return { uri: url.toString(), options };
|
|
616
616
|
}
|
|
617
617
|
chunkedUpload(method, url, headers = {}, originalPayload = {}, onProgress) {
|
|
618
|
+
var _a;
|
|
618
619
|
return __awaiter(this, void 0, void 0, function* () {
|
|
619
|
-
const file = Object.
|
|
620
|
-
if (!file) {
|
|
620
|
+
const [fileParam, file] = (_a = Object.entries(originalPayload).find(([_, value]) => value instanceof File)) !== null && _a !== void 0 ? _a : [];
|
|
621
|
+
if (!file || !fileParam) {
|
|
621
622
|
throw new Error('File not found in payload');
|
|
622
623
|
}
|
|
623
624
|
if (file.size <= Client.CHUNK_SIZE) {
|
|
@@ -632,7 +633,8 @@ class Client {
|
|
|
632
633
|
}
|
|
633
634
|
headers['content-range'] = `bytes ${start}-${end - 1}/${file.size}`;
|
|
634
635
|
const chunk = file.slice(start, end);
|
|
635
|
-
let payload = Object.assign(
|
|
636
|
+
let payload = Object.assign({}, originalPayload);
|
|
637
|
+
payload[fileParam] = new File([chunk], file.name);
|
|
636
638
|
response = yield this.call(method, url, headers, payload);
|
|
637
639
|
if (onProgress && typeof onProgress === 'function') {
|
|
638
640
|
onProgress({
|
|
@@ -4421,6 +4423,9 @@ class Databases {
|
|
|
4421
4423
|
if (typeof collectionId === 'undefined') {
|
|
4422
4424
|
throw new AppwriteException('Missing required parameter: "collectionId"');
|
|
4423
4425
|
}
|
|
4426
|
+
if (typeof documents === 'undefined') {
|
|
4427
|
+
throw new AppwriteException('Missing required parameter: "documents"');
|
|
4428
|
+
}
|
|
4424
4429
|
const apiPath = '/databases/{databaseId}/collections/{collectionId}/documents'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
|
|
4425
4430
|
const payload = {};
|
|
4426
4431
|
if (typeof documents !== 'undefined') {
|
|
@@ -4648,6 +4653,84 @@ class Databases {
|
|
|
4648
4653
|
const apiHeaders = {};
|
|
4649
4654
|
return this.client.call('get', uri, apiHeaders, payload);
|
|
4650
4655
|
}
|
|
4656
|
+
/**
|
|
4657
|
+
* Decrement a specific attribute of a document by a given value.
|
|
4658
|
+
*
|
|
4659
|
+
* @param {string} databaseId
|
|
4660
|
+
* @param {string} collectionId
|
|
4661
|
+
* @param {string} documentId
|
|
4662
|
+
* @param {string} attribute
|
|
4663
|
+
* @param {number} value
|
|
4664
|
+
* @param {number} min
|
|
4665
|
+
* @throws {AppwriteException}
|
|
4666
|
+
* @returns {Promise<Document>}
|
|
4667
|
+
*/
|
|
4668
|
+
decrementDocumentAttribute(databaseId, collectionId, documentId, attribute, value, min) {
|
|
4669
|
+
if (typeof databaseId === 'undefined') {
|
|
4670
|
+
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
4671
|
+
}
|
|
4672
|
+
if (typeof collectionId === 'undefined') {
|
|
4673
|
+
throw new AppwriteException('Missing required parameter: "collectionId"');
|
|
4674
|
+
}
|
|
4675
|
+
if (typeof documentId === 'undefined') {
|
|
4676
|
+
throw new AppwriteException('Missing required parameter: "documentId"');
|
|
4677
|
+
}
|
|
4678
|
+
if (typeof attribute === 'undefined') {
|
|
4679
|
+
throw new AppwriteException('Missing required parameter: "attribute"');
|
|
4680
|
+
}
|
|
4681
|
+
const apiPath = '/databases/{databaseId}/collections/{collectionId}/documents/{documentId}/{attribute}/decrement'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{documentId}', documentId).replace('{attribute}', attribute);
|
|
4682
|
+
const payload = {};
|
|
4683
|
+
if (typeof value !== 'undefined') {
|
|
4684
|
+
payload['value'] = value;
|
|
4685
|
+
}
|
|
4686
|
+
if (typeof min !== 'undefined') {
|
|
4687
|
+
payload['min'] = min;
|
|
4688
|
+
}
|
|
4689
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
4690
|
+
const apiHeaders = {
|
|
4691
|
+
'content-type': 'application/json',
|
|
4692
|
+
};
|
|
4693
|
+
return this.client.call('patch', uri, apiHeaders, payload);
|
|
4694
|
+
}
|
|
4695
|
+
/**
|
|
4696
|
+
* Increment a specific attribute of a document by a given value.
|
|
4697
|
+
*
|
|
4698
|
+
* @param {string} databaseId
|
|
4699
|
+
* @param {string} collectionId
|
|
4700
|
+
* @param {string} documentId
|
|
4701
|
+
* @param {string} attribute
|
|
4702
|
+
* @param {number} value
|
|
4703
|
+
* @param {number} max
|
|
4704
|
+
* @throws {AppwriteException}
|
|
4705
|
+
* @returns {Promise<Document>}
|
|
4706
|
+
*/
|
|
4707
|
+
incrementDocumentAttribute(databaseId, collectionId, documentId, attribute, value, max) {
|
|
4708
|
+
if (typeof databaseId === 'undefined') {
|
|
4709
|
+
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
4710
|
+
}
|
|
4711
|
+
if (typeof collectionId === 'undefined') {
|
|
4712
|
+
throw new AppwriteException('Missing required parameter: "collectionId"');
|
|
4713
|
+
}
|
|
4714
|
+
if (typeof documentId === 'undefined') {
|
|
4715
|
+
throw new AppwriteException('Missing required parameter: "documentId"');
|
|
4716
|
+
}
|
|
4717
|
+
if (typeof attribute === 'undefined') {
|
|
4718
|
+
throw new AppwriteException('Missing required parameter: "attribute"');
|
|
4719
|
+
}
|
|
4720
|
+
const apiPath = '/databases/{databaseId}/collections/{collectionId}/documents/{documentId}/{attribute}/increment'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{documentId}', documentId).replace('{attribute}', attribute);
|
|
4721
|
+
const payload = {};
|
|
4722
|
+
if (typeof value !== 'undefined') {
|
|
4723
|
+
payload['value'] = value;
|
|
4724
|
+
}
|
|
4725
|
+
if (typeof max !== 'undefined') {
|
|
4726
|
+
payload['max'] = max;
|
|
4727
|
+
}
|
|
4728
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
4729
|
+
const apiHeaders = {
|
|
4730
|
+
'content-type': 'application/json',
|
|
4731
|
+
};
|
|
4732
|
+
return this.client.call('patch', uri, apiHeaders, payload);
|
|
4733
|
+
}
|
|
4651
4734
|
/**
|
|
4652
4735
|
* List indexes in the collection.
|
|
4653
4736
|
*
|
|
@@ -7430,14 +7513,31 @@ class Health {
|
|
|
7430
7513
|
return this.client.call('get', uri, apiHeaders, payload);
|
|
7431
7514
|
}
|
|
7432
7515
|
/**
|
|
7433
|
-
* Get billing aggregation queue
|
|
7516
|
+
* Get billing project aggregation queue
|
|
7517
|
+
*
|
|
7518
|
+
* @param {number} threshold
|
|
7519
|
+
* @throws {AppwriteException}
|
|
7520
|
+
* @returns {Promise<Models.HealthQueue>}
|
|
7521
|
+
*/
|
|
7522
|
+
getQueueBillingProjectAggregation(threshold) {
|
|
7523
|
+
const apiPath = '/health/queue/billing-project-aggregation';
|
|
7524
|
+
const payload = {};
|
|
7525
|
+
if (typeof threshold !== 'undefined') {
|
|
7526
|
+
payload['threshold'] = threshold;
|
|
7527
|
+
}
|
|
7528
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
7529
|
+
const apiHeaders = {};
|
|
7530
|
+
return this.client.call('get', uri, apiHeaders, payload);
|
|
7531
|
+
}
|
|
7532
|
+
/**
|
|
7533
|
+
* Get billing team aggregation queue
|
|
7434
7534
|
*
|
|
7435
7535
|
* @param {number} threshold
|
|
7436
7536
|
* @throws {AppwriteException}
|
|
7437
7537
|
* @returns {Promise<Models.HealthQueue>}
|
|
7438
7538
|
*/
|
|
7439
|
-
|
|
7440
|
-
const apiPath = '/health/queue/billing-aggregation';
|
|
7539
|
+
getQueueBillingTeamAggregation(threshold) {
|
|
7540
|
+
const apiPath = '/health/queue/billing-team-aggregation';
|
|
7441
7541
|
const payload = {};
|
|
7442
7542
|
if (typeof threshold !== 'undefined') {
|
|
7443
7543
|
payload['threshold'] = threshold;
|
|
@@ -10280,6 +10380,40 @@ class Organizations {
|
|
|
10280
10380
|
};
|
|
10281
10381
|
return this.client.call('post', uri, apiHeaders, payload);
|
|
10282
10382
|
}
|
|
10383
|
+
/**
|
|
10384
|
+
* Get estimation for creating an organization.
|
|
10385
|
+
*
|
|
10386
|
+
* @param {BillingPlan} billingPlan
|
|
10387
|
+
* @param {string} paymentMethodId
|
|
10388
|
+
* @param {string[]} invites
|
|
10389
|
+
* @param {string} couponId
|
|
10390
|
+
* @throws {AppwriteException}
|
|
10391
|
+
* @returns {Promise<Models.Estimation>}
|
|
10392
|
+
*/
|
|
10393
|
+
estimationCreateOrganization(billingPlan, paymentMethodId, invites, couponId) {
|
|
10394
|
+
if (typeof billingPlan === 'undefined') {
|
|
10395
|
+
throw new AppwriteException('Missing required parameter: "billingPlan"');
|
|
10396
|
+
}
|
|
10397
|
+
const apiPath = '/organizations/estimations/create-organization';
|
|
10398
|
+
const payload = {};
|
|
10399
|
+
if (typeof billingPlan !== 'undefined') {
|
|
10400
|
+
payload['billingPlan'] = billingPlan;
|
|
10401
|
+
}
|
|
10402
|
+
if (typeof paymentMethodId !== 'undefined') {
|
|
10403
|
+
payload['paymentMethodId'] = paymentMethodId;
|
|
10404
|
+
}
|
|
10405
|
+
if (typeof invites !== 'undefined') {
|
|
10406
|
+
payload['invites'] = invites;
|
|
10407
|
+
}
|
|
10408
|
+
if (typeof couponId !== 'undefined') {
|
|
10409
|
+
payload['couponId'] = couponId;
|
|
10410
|
+
}
|
|
10411
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
10412
|
+
const apiHeaders = {
|
|
10413
|
+
'content-type': 'application/json',
|
|
10414
|
+
};
|
|
10415
|
+
return this.client.call('patch', uri, apiHeaders, payload);
|
|
10416
|
+
}
|
|
10283
10417
|
/**
|
|
10284
10418
|
* Delete an organization.
|
|
10285
10419
|
*
|
|
@@ -10532,6 +10666,59 @@ class Organizations {
|
|
|
10532
10666
|
const apiHeaders = {};
|
|
10533
10667
|
return this.client.call('get', uri, apiHeaders, payload);
|
|
10534
10668
|
}
|
|
10669
|
+
/**
|
|
10670
|
+
* Get estimation for deleting an organization.
|
|
10671
|
+
*
|
|
10672
|
+
* @param {string} organizationId
|
|
10673
|
+
* @throws {AppwriteException}
|
|
10674
|
+
* @returns {Promise<Models.EstimationDeleteOrganization>}
|
|
10675
|
+
*/
|
|
10676
|
+
estimationDeleteOrganization(organizationId) {
|
|
10677
|
+
if (typeof organizationId === 'undefined') {
|
|
10678
|
+
throw new AppwriteException('Missing required parameter: "organizationId"');
|
|
10679
|
+
}
|
|
10680
|
+
const apiPath = '/organizations/{organizationId}/estimations/delete-organization'.replace('{organizationId}', organizationId);
|
|
10681
|
+
const payload = {};
|
|
10682
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
10683
|
+
const apiHeaders = {
|
|
10684
|
+
'content-type': 'application/json',
|
|
10685
|
+
};
|
|
10686
|
+
return this.client.call('patch', uri, apiHeaders, payload);
|
|
10687
|
+
}
|
|
10688
|
+
/**
|
|
10689
|
+
* Get estimation for updating the organization plan.
|
|
10690
|
+
*
|
|
10691
|
+
* @param {string} organizationId
|
|
10692
|
+
* @param {BillingPlan} billingPlan
|
|
10693
|
+
* @param {string[]} invites
|
|
10694
|
+
* @param {string} couponId
|
|
10695
|
+
* @throws {AppwriteException}
|
|
10696
|
+
* @returns {Promise<Models.EstimationUpdatePlan>}
|
|
10697
|
+
*/
|
|
10698
|
+
estimationUpdatePlan(organizationId, billingPlan, invites, couponId) {
|
|
10699
|
+
if (typeof organizationId === 'undefined') {
|
|
10700
|
+
throw new AppwriteException('Missing required parameter: "organizationId"');
|
|
10701
|
+
}
|
|
10702
|
+
if (typeof billingPlan === 'undefined') {
|
|
10703
|
+
throw new AppwriteException('Missing required parameter: "billingPlan"');
|
|
10704
|
+
}
|
|
10705
|
+
const apiPath = '/organizations/{organizationId}/estimations/update-plan'.replace('{organizationId}', organizationId);
|
|
10706
|
+
const payload = {};
|
|
10707
|
+
if (typeof billingPlan !== 'undefined') {
|
|
10708
|
+
payload['billingPlan'] = billingPlan;
|
|
10709
|
+
}
|
|
10710
|
+
if (typeof invites !== 'undefined') {
|
|
10711
|
+
payload['invites'] = invites;
|
|
10712
|
+
}
|
|
10713
|
+
if (typeof couponId !== 'undefined') {
|
|
10714
|
+
payload['couponId'] = couponId;
|
|
10715
|
+
}
|
|
10716
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
10717
|
+
const apiHeaders = {
|
|
10718
|
+
'content-type': 'application/json',
|
|
10719
|
+
};
|
|
10720
|
+
return this.client.call('patch', uri, apiHeaders, payload);
|
|
10721
|
+
}
|
|
10535
10722
|
/**
|
|
10536
10723
|
* List all invoices for an organization.
|
|
10537
10724
|
*
|
|
@@ -10848,6 +11035,25 @@ class Organizations {
|
|
|
10848
11035
|
};
|
|
10849
11036
|
return this.client.call('patch', uri, apiHeaders, payload);
|
|
10850
11037
|
}
|
|
11038
|
+
/**
|
|
11039
|
+
* Cancel the downgrade initiated for an organization.
|
|
11040
|
+
*
|
|
11041
|
+
* @param {string} organizationId
|
|
11042
|
+
* @throws {AppwriteException}
|
|
11043
|
+
* @returns {Promise<Models.Organization<Preferences>>}
|
|
11044
|
+
*/
|
|
11045
|
+
cancelDowngrade(organizationId) {
|
|
11046
|
+
if (typeof organizationId === 'undefined') {
|
|
11047
|
+
throw new AppwriteException('Missing required parameter: "organizationId"');
|
|
11048
|
+
}
|
|
11049
|
+
const apiPath = '/organizations/{organizationId}/plan/cancel'.replace('{organizationId}', organizationId);
|
|
11050
|
+
const payload = {};
|
|
11051
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
11052
|
+
const apiHeaders = {
|
|
11053
|
+
'content-type': 'application/json',
|
|
11054
|
+
};
|
|
11055
|
+
return this.client.call('patch', uri, apiHeaders, payload);
|
|
11056
|
+
}
|
|
10851
11057
|
/**
|
|
10852
11058
|
* Get Scopes
|
|
10853
11059
|
*
|
|
@@ -10891,6 +11097,54 @@ class Organizations {
|
|
|
10891
11097
|
};
|
|
10892
11098
|
return this.client.call('patch', uri, apiHeaders, payload);
|
|
10893
11099
|
}
|
|
11100
|
+
/**
|
|
11101
|
+
* Get the usage data for an organization.
|
|
11102
|
+
*
|
|
11103
|
+
* @param {string} organizationId
|
|
11104
|
+
* @param {string} startDate
|
|
11105
|
+
* @param {string} endDate
|
|
11106
|
+
* @throws {AppwriteException}
|
|
11107
|
+
* @returns {Promise<Models.UsageOrganization>}
|
|
11108
|
+
*/
|
|
11109
|
+
getUsage(organizationId, startDate, endDate) {
|
|
11110
|
+
if (typeof organizationId === 'undefined') {
|
|
11111
|
+
throw new AppwriteException('Missing required parameter: "organizationId"');
|
|
11112
|
+
}
|
|
11113
|
+
const apiPath = '/organizations/{organizationId}/usage'.replace('{organizationId}', organizationId);
|
|
11114
|
+
const payload = {};
|
|
11115
|
+
if (typeof startDate !== 'undefined') {
|
|
11116
|
+
payload['startDate'] = startDate;
|
|
11117
|
+
}
|
|
11118
|
+
if (typeof endDate !== 'undefined') {
|
|
11119
|
+
payload['endDate'] = endDate;
|
|
11120
|
+
}
|
|
11121
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
11122
|
+
const apiHeaders = {};
|
|
11123
|
+
return this.client.call('get', uri, apiHeaders, payload);
|
|
11124
|
+
}
|
|
11125
|
+
/**
|
|
11126
|
+
* Validate payment for team after creation or upgrade.
|
|
11127
|
+
*
|
|
11128
|
+
* @param {string} organizationId
|
|
11129
|
+
* @param {string[]} invites
|
|
11130
|
+
* @throws {AppwriteException}
|
|
11131
|
+
* @returns {Promise<Models.Organization<Preferences>>}
|
|
11132
|
+
*/
|
|
11133
|
+
validatePayment(organizationId, invites) {
|
|
11134
|
+
if (typeof organizationId === 'undefined') {
|
|
11135
|
+
throw new AppwriteException('Missing required parameter: "organizationId"');
|
|
11136
|
+
}
|
|
11137
|
+
const apiPath = '/organizations/{organizationId}/validate'.replace('{organizationId}', organizationId);
|
|
11138
|
+
const payload = {};
|
|
11139
|
+
if (typeof invites !== 'undefined') {
|
|
11140
|
+
payload['invites'] = invites;
|
|
11141
|
+
}
|
|
11142
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
11143
|
+
const apiHeaders = {
|
|
11144
|
+
'content-type': 'application/json',
|
|
11145
|
+
};
|
|
11146
|
+
return this.client.call('patch', uri, apiHeaders, payload);
|
|
11147
|
+
}
|
|
10894
11148
|
}
|
|
10895
11149
|
|
|
10896
11150
|
class Project {
|
|
@@ -12767,10 +13021,12 @@ class Proxy {
|
|
|
12767
13021
|
* @param {string} domain
|
|
12768
13022
|
* @param {string} url
|
|
12769
13023
|
* @param {StatusCode} statusCode
|
|
13024
|
+
* @param {string} resourceId
|
|
13025
|
+
* @param {ProxyResourceType} resourceType
|
|
12770
13026
|
* @throws {AppwriteException}
|
|
12771
13027
|
* @returns {Promise<Models.ProxyRule>}
|
|
12772
13028
|
*/
|
|
12773
|
-
createRedirectRule(domain, url, statusCode) {
|
|
13029
|
+
createRedirectRule(domain, url, statusCode, resourceId, resourceType) {
|
|
12774
13030
|
if (typeof domain === 'undefined') {
|
|
12775
13031
|
throw new AppwriteException('Missing required parameter: "domain"');
|
|
12776
13032
|
}
|
|
@@ -12780,6 +13036,12 @@ class Proxy {
|
|
|
12780
13036
|
if (typeof statusCode === 'undefined') {
|
|
12781
13037
|
throw new AppwriteException('Missing required parameter: "statusCode"');
|
|
12782
13038
|
}
|
|
13039
|
+
if (typeof resourceId === 'undefined') {
|
|
13040
|
+
throw new AppwriteException('Missing required parameter: "resourceId"');
|
|
13041
|
+
}
|
|
13042
|
+
if (typeof resourceType === 'undefined') {
|
|
13043
|
+
throw new AppwriteException('Missing required parameter: "resourceType"');
|
|
13044
|
+
}
|
|
12783
13045
|
const apiPath = '/proxy/rules/redirect';
|
|
12784
13046
|
const payload = {};
|
|
12785
13047
|
if (typeof domain !== 'undefined') {
|
|
@@ -12791,6 +13053,12 @@ class Proxy {
|
|
|
12791
13053
|
if (typeof statusCode !== 'undefined') {
|
|
12792
13054
|
payload['statusCode'] = statusCode;
|
|
12793
13055
|
}
|
|
13056
|
+
if (typeof resourceId !== 'undefined') {
|
|
13057
|
+
payload['resourceId'] = resourceId;
|
|
13058
|
+
}
|
|
13059
|
+
if (typeof resourceType !== 'undefined') {
|
|
13060
|
+
payload['resourceType'] = resourceType;
|
|
13061
|
+
}
|
|
12794
13062
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
12795
13063
|
const apiHeaders = {
|
|
12796
13064
|
'content-type': 'application/json',
|
|
@@ -16768,6 +17036,7 @@ exports.Runtime = void 0;
|
|
|
16768
17036
|
Runtime["Dart31"] = "dart-3.1";
|
|
16769
17037
|
Runtime["Dart33"] = "dart-3.3";
|
|
16770
17038
|
Runtime["Dart35"] = "dart-3.5";
|
|
17039
|
+
Runtime["Dart38"] = "dart-3.8";
|
|
16771
17040
|
Runtime["Dotnet60"] = "dotnet-6.0";
|
|
16772
17041
|
Runtime["Dotnet70"] = "dotnet-7.0";
|
|
16773
17042
|
Runtime["Dotnet80"] = "dotnet-8.0";
|
|
@@ -16794,6 +17063,7 @@ exports.Runtime = void 0;
|
|
|
16794
17063
|
Runtime["Flutter324"] = "flutter-3.24";
|
|
16795
17064
|
Runtime["Flutter327"] = "flutter-3.27";
|
|
16796
17065
|
Runtime["Flutter329"] = "flutter-3.29";
|
|
17066
|
+
Runtime["Flutter332"] = "flutter-3.32";
|
|
16797
17067
|
})(exports.Runtime || (exports.Runtime = {}));
|
|
16798
17068
|
|
|
16799
17069
|
exports.FunctionUsageRange = void 0;
|
|
@@ -17231,6 +17501,12 @@ exports.StatusCode = void 0;
|
|
|
17231
17501
|
StatusCode["PermanentRedirect308"] = "308";
|
|
17232
17502
|
})(exports.StatusCode || (exports.StatusCode = {}));
|
|
17233
17503
|
|
|
17504
|
+
exports.ProxyResourceType = void 0;
|
|
17505
|
+
(function (ProxyResourceType) {
|
|
17506
|
+
ProxyResourceType["Site"] = "site";
|
|
17507
|
+
ProxyResourceType["Function"] = "function";
|
|
17508
|
+
})(exports.ProxyResourceType || (exports.ProxyResourceType = {}));
|
|
17509
|
+
|
|
17234
17510
|
exports.Framework = void 0;
|
|
17235
17511
|
(function (Framework) {
|
|
17236
17512
|
Framework["Analog"] = "analog";
|
|
@@ -17285,6 +17561,7 @@ exports.BuildRuntime = void 0;
|
|
|
17285
17561
|
BuildRuntime["Dart31"] = "dart-3.1";
|
|
17286
17562
|
BuildRuntime["Dart33"] = "dart-3.3";
|
|
17287
17563
|
BuildRuntime["Dart35"] = "dart-3.5";
|
|
17564
|
+
BuildRuntime["Dart38"] = "dart-3.8";
|
|
17288
17565
|
BuildRuntime["Dotnet60"] = "dotnet-6.0";
|
|
17289
17566
|
BuildRuntime["Dotnet70"] = "dotnet-7.0";
|
|
17290
17567
|
BuildRuntime["Dotnet80"] = "dotnet-8.0";
|
|
@@ -17311,6 +17588,7 @@ exports.BuildRuntime = void 0;
|
|
|
17311
17588
|
BuildRuntime["Flutter324"] = "flutter-3.24";
|
|
17312
17589
|
BuildRuntime["Flutter327"] = "flutter-3.27";
|
|
17313
17590
|
BuildRuntime["Flutter329"] = "flutter-3.29";
|
|
17591
|
+
BuildRuntime["Flutter332"] = "flutter-3.32";
|
|
17314
17592
|
})(exports.BuildRuntime || (exports.BuildRuntime = {}));
|
|
17315
17593
|
|
|
17316
17594
|
exports.Adapter = void 0;
|
|
@@ -17354,6 +17632,7 @@ exports.ImageFormat = void 0;
|
|
|
17354
17632
|
ImageFormat["Webp"] = "webp";
|
|
17355
17633
|
ImageFormat["Heic"] = "heic";
|
|
17356
17634
|
ImageFormat["Avif"] = "avif";
|
|
17635
|
+
ImageFormat["Gif"] = "gif";
|
|
17357
17636
|
})(exports.ImageFormat || (exports.ImageFormat = {}));
|
|
17358
17637
|
|
|
17359
17638
|
exports.StorageUsageRange = void 0;
|