@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/dist/esm/sdk.js
CHANGED
|
@@ -278,7 +278,7 @@ class Client {
|
|
|
278
278
|
'x-sdk-name': 'Console',
|
|
279
279
|
'x-sdk-platform': 'console',
|
|
280
280
|
'x-sdk-language': 'web',
|
|
281
|
-
'x-sdk-version': '1.
|
|
281
|
+
'x-sdk-version': '1.9.0',
|
|
282
282
|
'X-Appwrite-Response-Format': '1.7.0',
|
|
283
283
|
};
|
|
284
284
|
this.realtime = {
|
|
@@ -613,9 +613,10 @@ class Client {
|
|
|
613
613
|
return { uri: url.toString(), options };
|
|
614
614
|
}
|
|
615
615
|
chunkedUpload(method, url, headers = {}, originalPayload = {}, onProgress) {
|
|
616
|
+
var _a;
|
|
616
617
|
return __awaiter(this, void 0, void 0, function* () {
|
|
617
|
-
const file = Object.
|
|
618
|
-
if (!file) {
|
|
618
|
+
const [fileParam, file] = (_a = Object.entries(originalPayload).find(([_, value]) => value instanceof File)) !== null && _a !== void 0 ? _a : [];
|
|
619
|
+
if (!file || !fileParam) {
|
|
619
620
|
throw new Error('File not found in payload');
|
|
620
621
|
}
|
|
621
622
|
if (file.size <= Client.CHUNK_SIZE) {
|
|
@@ -630,7 +631,8 @@ class Client {
|
|
|
630
631
|
}
|
|
631
632
|
headers['content-range'] = `bytes ${start}-${end - 1}/${file.size}`;
|
|
632
633
|
const chunk = file.slice(start, end);
|
|
633
|
-
let payload = Object.assign(
|
|
634
|
+
let payload = Object.assign({}, originalPayload);
|
|
635
|
+
payload[fileParam] = new File([chunk], file.name);
|
|
634
636
|
response = yield this.call(method, url, headers, payload);
|
|
635
637
|
if (onProgress && typeof onProgress === 'function') {
|
|
636
638
|
onProgress({
|
|
@@ -4419,6 +4421,9 @@ class Databases {
|
|
|
4419
4421
|
if (typeof collectionId === 'undefined') {
|
|
4420
4422
|
throw new AppwriteException('Missing required parameter: "collectionId"');
|
|
4421
4423
|
}
|
|
4424
|
+
if (typeof documents === 'undefined') {
|
|
4425
|
+
throw new AppwriteException('Missing required parameter: "documents"');
|
|
4426
|
+
}
|
|
4422
4427
|
const apiPath = '/databases/{databaseId}/collections/{collectionId}/documents'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId);
|
|
4423
4428
|
const payload = {};
|
|
4424
4429
|
if (typeof documents !== 'undefined') {
|
|
@@ -4646,6 +4651,84 @@ class Databases {
|
|
|
4646
4651
|
const apiHeaders = {};
|
|
4647
4652
|
return this.client.call('get', uri, apiHeaders, payload);
|
|
4648
4653
|
}
|
|
4654
|
+
/**
|
|
4655
|
+
* Decrement a specific attribute of a document by a given value.
|
|
4656
|
+
*
|
|
4657
|
+
* @param {string} databaseId
|
|
4658
|
+
* @param {string} collectionId
|
|
4659
|
+
* @param {string} documentId
|
|
4660
|
+
* @param {string} attribute
|
|
4661
|
+
* @param {number} value
|
|
4662
|
+
* @param {number} min
|
|
4663
|
+
* @throws {AppwriteException}
|
|
4664
|
+
* @returns {Promise<Document>}
|
|
4665
|
+
*/
|
|
4666
|
+
decrementDocumentAttribute(databaseId, collectionId, documentId, attribute, value, min) {
|
|
4667
|
+
if (typeof databaseId === 'undefined') {
|
|
4668
|
+
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
4669
|
+
}
|
|
4670
|
+
if (typeof collectionId === 'undefined') {
|
|
4671
|
+
throw new AppwriteException('Missing required parameter: "collectionId"');
|
|
4672
|
+
}
|
|
4673
|
+
if (typeof documentId === 'undefined') {
|
|
4674
|
+
throw new AppwriteException('Missing required parameter: "documentId"');
|
|
4675
|
+
}
|
|
4676
|
+
if (typeof attribute === 'undefined') {
|
|
4677
|
+
throw new AppwriteException('Missing required parameter: "attribute"');
|
|
4678
|
+
}
|
|
4679
|
+
const apiPath = '/databases/{databaseId}/collections/{collectionId}/documents/{documentId}/{attribute}/decrement'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{documentId}', documentId).replace('{attribute}', attribute);
|
|
4680
|
+
const payload = {};
|
|
4681
|
+
if (typeof value !== 'undefined') {
|
|
4682
|
+
payload['value'] = value;
|
|
4683
|
+
}
|
|
4684
|
+
if (typeof min !== 'undefined') {
|
|
4685
|
+
payload['min'] = min;
|
|
4686
|
+
}
|
|
4687
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
4688
|
+
const apiHeaders = {
|
|
4689
|
+
'content-type': 'application/json',
|
|
4690
|
+
};
|
|
4691
|
+
return this.client.call('patch', uri, apiHeaders, payload);
|
|
4692
|
+
}
|
|
4693
|
+
/**
|
|
4694
|
+
* Increment a specific attribute of a document by a given value.
|
|
4695
|
+
*
|
|
4696
|
+
* @param {string} databaseId
|
|
4697
|
+
* @param {string} collectionId
|
|
4698
|
+
* @param {string} documentId
|
|
4699
|
+
* @param {string} attribute
|
|
4700
|
+
* @param {number} value
|
|
4701
|
+
* @param {number} max
|
|
4702
|
+
* @throws {AppwriteException}
|
|
4703
|
+
* @returns {Promise<Document>}
|
|
4704
|
+
*/
|
|
4705
|
+
incrementDocumentAttribute(databaseId, collectionId, documentId, attribute, value, max) {
|
|
4706
|
+
if (typeof databaseId === 'undefined') {
|
|
4707
|
+
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
4708
|
+
}
|
|
4709
|
+
if (typeof collectionId === 'undefined') {
|
|
4710
|
+
throw new AppwriteException('Missing required parameter: "collectionId"');
|
|
4711
|
+
}
|
|
4712
|
+
if (typeof documentId === 'undefined') {
|
|
4713
|
+
throw new AppwriteException('Missing required parameter: "documentId"');
|
|
4714
|
+
}
|
|
4715
|
+
if (typeof attribute === 'undefined') {
|
|
4716
|
+
throw new AppwriteException('Missing required parameter: "attribute"');
|
|
4717
|
+
}
|
|
4718
|
+
const apiPath = '/databases/{databaseId}/collections/{collectionId}/documents/{documentId}/{attribute}/increment'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{documentId}', documentId).replace('{attribute}', attribute);
|
|
4719
|
+
const payload = {};
|
|
4720
|
+
if (typeof value !== 'undefined') {
|
|
4721
|
+
payload['value'] = value;
|
|
4722
|
+
}
|
|
4723
|
+
if (typeof max !== 'undefined') {
|
|
4724
|
+
payload['max'] = max;
|
|
4725
|
+
}
|
|
4726
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
4727
|
+
const apiHeaders = {
|
|
4728
|
+
'content-type': 'application/json',
|
|
4729
|
+
};
|
|
4730
|
+
return this.client.call('patch', uri, apiHeaders, payload);
|
|
4731
|
+
}
|
|
4649
4732
|
/**
|
|
4650
4733
|
* List indexes in the collection.
|
|
4651
4734
|
*
|
|
@@ -7428,14 +7511,31 @@ class Health {
|
|
|
7428
7511
|
return this.client.call('get', uri, apiHeaders, payload);
|
|
7429
7512
|
}
|
|
7430
7513
|
/**
|
|
7431
|
-
* Get billing aggregation queue
|
|
7514
|
+
* Get billing project aggregation queue
|
|
7515
|
+
*
|
|
7516
|
+
* @param {number} threshold
|
|
7517
|
+
* @throws {AppwriteException}
|
|
7518
|
+
* @returns {Promise<Models.HealthQueue>}
|
|
7519
|
+
*/
|
|
7520
|
+
getQueueBillingProjectAggregation(threshold) {
|
|
7521
|
+
const apiPath = '/health/queue/billing-project-aggregation';
|
|
7522
|
+
const payload = {};
|
|
7523
|
+
if (typeof threshold !== 'undefined') {
|
|
7524
|
+
payload['threshold'] = threshold;
|
|
7525
|
+
}
|
|
7526
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
7527
|
+
const apiHeaders = {};
|
|
7528
|
+
return this.client.call('get', uri, apiHeaders, payload);
|
|
7529
|
+
}
|
|
7530
|
+
/**
|
|
7531
|
+
* Get billing team aggregation queue
|
|
7432
7532
|
*
|
|
7433
7533
|
* @param {number} threshold
|
|
7434
7534
|
* @throws {AppwriteException}
|
|
7435
7535
|
* @returns {Promise<Models.HealthQueue>}
|
|
7436
7536
|
*/
|
|
7437
|
-
|
|
7438
|
-
const apiPath = '/health/queue/billing-aggregation';
|
|
7537
|
+
getQueueBillingTeamAggregation(threshold) {
|
|
7538
|
+
const apiPath = '/health/queue/billing-team-aggregation';
|
|
7439
7539
|
const payload = {};
|
|
7440
7540
|
if (typeof threshold !== 'undefined') {
|
|
7441
7541
|
payload['threshold'] = threshold;
|
|
@@ -10278,6 +10378,40 @@ class Organizations {
|
|
|
10278
10378
|
};
|
|
10279
10379
|
return this.client.call('post', uri, apiHeaders, payload);
|
|
10280
10380
|
}
|
|
10381
|
+
/**
|
|
10382
|
+
* Get estimation for creating an organization.
|
|
10383
|
+
*
|
|
10384
|
+
* @param {BillingPlan} billingPlan
|
|
10385
|
+
* @param {string} paymentMethodId
|
|
10386
|
+
* @param {string[]} invites
|
|
10387
|
+
* @param {string} couponId
|
|
10388
|
+
* @throws {AppwriteException}
|
|
10389
|
+
* @returns {Promise<Models.Estimation>}
|
|
10390
|
+
*/
|
|
10391
|
+
estimationCreateOrganization(billingPlan, paymentMethodId, invites, couponId) {
|
|
10392
|
+
if (typeof billingPlan === 'undefined') {
|
|
10393
|
+
throw new AppwriteException('Missing required parameter: "billingPlan"');
|
|
10394
|
+
}
|
|
10395
|
+
const apiPath = '/organizations/estimations/create-organization';
|
|
10396
|
+
const payload = {};
|
|
10397
|
+
if (typeof billingPlan !== 'undefined') {
|
|
10398
|
+
payload['billingPlan'] = billingPlan;
|
|
10399
|
+
}
|
|
10400
|
+
if (typeof paymentMethodId !== 'undefined') {
|
|
10401
|
+
payload['paymentMethodId'] = paymentMethodId;
|
|
10402
|
+
}
|
|
10403
|
+
if (typeof invites !== 'undefined') {
|
|
10404
|
+
payload['invites'] = invites;
|
|
10405
|
+
}
|
|
10406
|
+
if (typeof couponId !== 'undefined') {
|
|
10407
|
+
payload['couponId'] = couponId;
|
|
10408
|
+
}
|
|
10409
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
10410
|
+
const apiHeaders = {
|
|
10411
|
+
'content-type': 'application/json',
|
|
10412
|
+
};
|
|
10413
|
+
return this.client.call('patch', uri, apiHeaders, payload);
|
|
10414
|
+
}
|
|
10281
10415
|
/**
|
|
10282
10416
|
* Delete an organization.
|
|
10283
10417
|
*
|
|
@@ -10530,6 +10664,59 @@ class Organizations {
|
|
|
10530
10664
|
const apiHeaders = {};
|
|
10531
10665
|
return this.client.call('get', uri, apiHeaders, payload);
|
|
10532
10666
|
}
|
|
10667
|
+
/**
|
|
10668
|
+
* Get estimation for deleting an organization.
|
|
10669
|
+
*
|
|
10670
|
+
* @param {string} organizationId
|
|
10671
|
+
* @throws {AppwriteException}
|
|
10672
|
+
* @returns {Promise<Models.EstimationDeleteOrganization>}
|
|
10673
|
+
*/
|
|
10674
|
+
estimationDeleteOrganization(organizationId) {
|
|
10675
|
+
if (typeof organizationId === 'undefined') {
|
|
10676
|
+
throw new AppwriteException('Missing required parameter: "organizationId"');
|
|
10677
|
+
}
|
|
10678
|
+
const apiPath = '/organizations/{organizationId}/estimations/delete-organization'.replace('{organizationId}', organizationId);
|
|
10679
|
+
const payload = {};
|
|
10680
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
10681
|
+
const apiHeaders = {
|
|
10682
|
+
'content-type': 'application/json',
|
|
10683
|
+
};
|
|
10684
|
+
return this.client.call('patch', uri, apiHeaders, payload);
|
|
10685
|
+
}
|
|
10686
|
+
/**
|
|
10687
|
+
* Get estimation for updating the organization plan.
|
|
10688
|
+
*
|
|
10689
|
+
* @param {string} organizationId
|
|
10690
|
+
* @param {BillingPlan} billingPlan
|
|
10691
|
+
* @param {string[]} invites
|
|
10692
|
+
* @param {string} couponId
|
|
10693
|
+
* @throws {AppwriteException}
|
|
10694
|
+
* @returns {Promise<Models.EstimationUpdatePlan>}
|
|
10695
|
+
*/
|
|
10696
|
+
estimationUpdatePlan(organizationId, billingPlan, invites, couponId) {
|
|
10697
|
+
if (typeof organizationId === 'undefined') {
|
|
10698
|
+
throw new AppwriteException('Missing required parameter: "organizationId"');
|
|
10699
|
+
}
|
|
10700
|
+
if (typeof billingPlan === 'undefined') {
|
|
10701
|
+
throw new AppwriteException('Missing required parameter: "billingPlan"');
|
|
10702
|
+
}
|
|
10703
|
+
const apiPath = '/organizations/{organizationId}/estimations/update-plan'.replace('{organizationId}', organizationId);
|
|
10704
|
+
const payload = {};
|
|
10705
|
+
if (typeof billingPlan !== 'undefined') {
|
|
10706
|
+
payload['billingPlan'] = billingPlan;
|
|
10707
|
+
}
|
|
10708
|
+
if (typeof invites !== 'undefined') {
|
|
10709
|
+
payload['invites'] = invites;
|
|
10710
|
+
}
|
|
10711
|
+
if (typeof couponId !== 'undefined') {
|
|
10712
|
+
payload['couponId'] = couponId;
|
|
10713
|
+
}
|
|
10714
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
10715
|
+
const apiHeaders = {
|
|
10716
|
+
'content-type': 'application/json',
|
|
10717
|
+
};
|
|
10718
|
+
return this.client.call('patch', uri, apiHeaders, payload);
|
|
10719
|
+
}
|
|
10533
10720
|
/**
|
|
10534
10721
|
* List all invoices for an organization.
|
|
10535
10722
|
*
|
|
@@ -10846,6 +11033,25 @@ class Organizations {
|
|
|
10846
11033
|
};
|
|
10847
11034
|
return this.client.call('patch', uri, apiHeaders, payload);
|
|
10848
11035
|
}
|
|
11036
|
+
/**
|
|
11037
|
+
* Cancel the downgrade initiated for an organization.
|
|
11038
|
+
*
|
|
11039
|
+
* @param {string} organizationId
|
|
11040
|
+
* @throws {AppwriteException}
|
|
11041
|
+
* @returns {Promise<Models.Organization<Preferences>>}
|
|
11042
|
+
*/
|
|
11043
|
+
cancelDowngrade(organizationId) {
|
|
11044
|
+
if (typeof organizationId === 'undefined') {
|
|
11045
|
+
throw new AppwriteException('Missing required parameter: "organizationId"');
|
|
11046
|
+
}
|
|
11047
|
+
const apiPath = '/organizations/{organizationId}/plan/cancel'.replace('{organizationId}', organizationId);
|
|
11048
|
+
const payload = {};
|
|
11049
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
11050
|
+
const apiHeaders = {
|
|
11051
|
+
'content-type': 'application/json',
|
|
11052
|
+
};
|
|
11053
|
+
return this.client.call('patch', uri, apiHeaders, payload);
|
|
11054
|
+
}
|
|
10849
11055
|
/**
|
|
10850
11056
|
* Get Scopes
|
|
10851
11057
|
*
|
|
@@ -10889,6 +11095,54 @@ class Organizations {
|
|
|
10889
11095
|
};
|
|
10890
11096
|
return this.client.call('patch', uri, apiHeaders, payload);
|
|
10891
11097
|
}
|
|
11098
|
+
/**
|
|
11099
|
+
* Get the usage data for an organization.
|
|
11100
|
+
*
|
|
11101
|
+
* @param {string} organizationId
|
|
11102
|
+
* @param {string} startDate
|
|
11103
|
+
* @param {string} endDate
|
|
11104
|
+
* @throws {AppwriteException}
|
|
11105
|
+
* @returns {Promise<Models.UsageOrganization>}
|
|
11106
|
+
*/
|
|
11107
|
+
getUsage(organizationId, startDate, endDate) {
|
|
11108
|
+
if (typeof organizationId === 'undefined') {
|
|
11109
|
+
throw new AppwriteException('Missing required parameter: "organizationId"');
|
|
11110
|
+
}
|
|
11111
|
+
const apiPath = '/organizations/{organizationId}/usage'.replace('{organizationId}', organizationId);
|
|
11112
|
+
const payload = {};
|
|
11113
|
+
if (typeof startDate !== 'undefined') {
|
|
11114
|
+
payload['startDate'] = startDate;
|
|
11115
|
+
}
|
|
11116
|
+
if (typeof endDate !== 'undefined') {
|
|
11117
|
+
payload['endDate'] = endDate;
|
|
11118
|
+
}
|
|
11119
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
11120
|
+
const apiHeaders = {};
|
|
11121
|
+
return this.client.call('get', uri, apiHeaders, payload);
|
|
11122
|
+
}
|
|
11123
|
+
/**
|
|
11124
|
+
* Validate payment for team after creation or upgrade.
|
|
11125
|
+
*
|
|
11126
|
+
* @param {string} organizationId
|
|
11127
|
+
* @param {string[]} invites
|
|
11128
|
+
* @throws {AppwriteException}
|
|
11129
|
+
* @returns {Promise<Models.Organization<Preferences>>}
|
|
11130
|
+
*/
|
|
11131
|
+
validatePayment(organizationId, invites) {
|
|
11132
|
+
if (typeof organizationId === 'undefined') {
|
|
11133
|
+
throw new AppwriteException('Missing required parameter: "organizationId"');
|
|
11134
|
+
}
|
|
11135
|
+
const apiPath = '/organizations/{organizationId}/validate'.replace('{organizationId}', organizationId);
|
|
11136
|
+
const payload = {};
|
|
11137
|
+
if (typeof invites !== 'undefined') {
|
|
11138
|
+
payload['invites'] = invites;
|
|
11139
|
+
}
|
|
11140
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
11141
|
+
const apiHeaders = {
|
|
11142
|
+
'content-type': 'application/json',
|
|
11143
|
+
};
|
|
11144
|
+
return this.client.call('patch', uri, apiHeaders, payload);
|
|
11145
|
+
}
|
|
10892
11146
|
}
|
|
10893
11147
|
|
|
10894
11148
|
class Project {
|
|
@@ -12765,10 +13019,12 @@ class Proxy {
|
|
|
12765
13019
|
* @param {string} domain
|
|
12766
13020
|
* @param {string} url
|
|
12767
13021
|
* @param {StatusCode} statusCode
|
|
13022
|
+
* @param {string} resourceId
|
|
13023
|
+
* @param {ProxyResourceType} resourceType
|
|
12768
13024
|
* @throws {AppwriteException}
|
|
12769
13025
|
* @returns {Promise<Models.ProxyRule>}
|
|
12770
13026
|
*/
|
|
12771
|
-
createRedirectRule(domain, url, statusCode) {
|
|
13027
|
+
createRedirectRule(domain, url, statusCode, resourceId, resourceType) {
|
|
12772
13028
|
if (typeof domain === 'undefined') {
|
|
12773
13029
|
throw new AppwriteException('Missing required parameter: "domain"');
|
|
12774
13030
|
}
|
|
@@ -12778,6 +13034,12 @@ class Proxy {
|
|
|
12778
13034
|
if (typeof statusCode === 'undefined') {
|
|
12779
13035
|
throw new AppwriteException('Missing required parameter: "statusCode"');
|
|
12780
13036
|
}
|
|
13037
|
+
if (typeof resourceId === 'undefined') {
|
|
13038
|
+
throw new AppwriteException('Missing required parameter: "resourceId"');
|
|
13039
|
+
}
|
|
13040
|
+
if (typeof resourceType === 'undefined') {
|
|
13041
|
+
throw new AppwriteException('Missing required parameter: "resourceType"');
|
|
13042
|
+
}
|
|
12781
13043
|
const apiPath = '/proxy/rules/redirect';
|
|
12782
13044
|
const payload = {};
|
|
12783
13045
|
if (typeof domain !== 'undefined') {
|
|
@@ -12789,6 +13051,12 @@ class Proxy {
|
|
|
12789
13051
|
if (typeof statusCode !== 'undefined') {
|
|
12790
13052
|
payload['statusCode'] = statusCode;
|
|
12791
13053
|
}
|
|
13054
|
+
if (typeof resourceId !== 'undefined') {
|
|
13055
|
+
payload['resourceId'] = resourceId;
|
|
13056
|
+
}
|
|
13057
|
+
if (typeof resourceType !== 'undefined') {
|
|
13058
|
+
payload['resourceType'] = resourceType;
|
|
13059
|
+
}
|
|
12792
13060
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
12793
13061
|
const apiHeaders = {
|
|
12794
13062
|
'content-type': 'application/json',
|
|
@@ -16766,6 +17034,7 @@ var Runtime;
|
|
|
16766
17034
|
Runtime["Dart31"] = "dart-3.1";
|
|
16767
17035
|
Runtime["Dart33"] = "dart-3.3";
|
|
16768
17036
|
Runtime["Dart35"] = "dart-3.5";
|
|
17037
|
+
Runtime["Dart38"] = "dart-3.8";
|
|
16769
17038
|
Runtime["Dotnet60"] = "dotnet-6.0";
|
|
16770
17039
|
Runtime["Dotnet70"] = "dotnet-7.0";
|
|
16771
17040
|
Runtime["Dotnet80"] = "dotnet-8.0";
|
|
@@ -16792,6 +17061,7 @@ var Runtime;
|
|
|
16792
17061
|
Runtime["Flutter324"] = "flutter-3.24";
|
|
16793
17062
|
Runtime["Flutter327"] = "flutter-3.27";
|
|
16794
17063
|
Runtime["Flutter329"] = "flutter-3.29";
|
|
17064
|
+
Runtime["Flutter332"] = "flutter-3.32";
|
|
16795
17065
|
})(Runtime || (Runtime = {}));
|
|
16796
17066
|
|
|
16797
17067
|
var FunctionUsageRange;
|
|
@@ -17229,6 +17499,12 @@ var StatusCode;
|
|
|
17229
17499
|
StatusCode["PermanentRedirect308"] = "308";
|
|
17230
17500
|
})(StatusCode || (StatusCode = {}));
|
|
17231
17501
|
|
|
17502
|
+
var ProxyResourceType;
|
|
17503
|
+
(function (ProxyResourceType) {
|
|
17504
|
+
ProxyResourceType["Site"] = "site";
|
|
17505
|
+
ProxyResourceType["Function"] = "function";
|
|
17506
|
+
})(ProxyResourceType || (ProxyResourceType = {}));
|
|
17507
|
+
|
|
17232
17508
|
var Framework;
|
|
17233
17509
|
(function (Framework) {
|
|
17234
17510
|
Framework["Analog"] = "analog";
|
|
@@ -17283,6 +17559,7 @@ var BuildRuntime;
|
|
|
17283
17559
|
BuildRuntime["Dart31"] = "dart-3.1";
|
|
17284
17560
|
BuildRuntime["Dart33"] = "dart-3.3";
|
|
17285
17561
|
BuildRuntime["Dart35"] = "dart-3.5";
|
|
17562
|
+
BuildRuntime["Dart38"] = "dart-3.8";
|
|
17286
17563
|
BuildRuntime["Dotnet60"] = "dotnet-6.0";
|
|
17287
17564
|
BuildRuntime["Dotnet70"] = "dotnet-7.0";
|
|
17288
17565
|
BuildRuntime["Dotnet80"] = "dotnet-8.0";
|
|
@@ -17309,6 +17586,7 @@ var BuildRuntime;
|
|
|
17309
17586
|
BuildRuntime["Flutter324"] = "flutter-3.24";
|
|
17310
17587
|
BuildRuntime["Flutter327"] = "flutter-3.27";
|
|
17311
17588
|
BuildRuntime["Flutter329"] = "flutter-3.29";
|
|
17589
|
+
BuildRuntime["Flutter332"] = "flutter-3.32";
|
|
17312
17590
|
})(BuildRuntime || (BuildRuntime = {}));
|
|
17313
17591
|
|
|
17314
17592
|
var Adapter;
|
|
@@ -17352,6 +17630,7 @@ var ImageFormat;
|
|
|
17352
17630
|
ImageFormat["Webp"] = "webp";
|
|
17353
17631
|
ImageFormat["Heic"] = "heic";
|
|
17354
17632
|
ImageFormat["Avif"] = "avif";
|
|
17633
|
+
ImageFormat["Gif"] = "gif";
|
|
17355
17634
|
})(ImageFormat || (ImageFormat = {}));
|
|
17356
17635
|
|
|
17357
17636
|
var StorageUsageRange;
|
|
@@ -17396,5 +17675,5 @@ var VCSDetectionType;
|
|
|
17396
17675
|
VCSDetectionType["Framework"] = "framework";
|
|
17397
17676
|
})(VCSDetectionType || (VCSDetectionType = {}));
|
|
17398
17677
|
|
|
17399
|
-
export { Account, Adapter, Api, ApiService, AppwriteException, Assistant, AuthMethod, AuthenticationFactor, AuthenticatorType, Avatars, Backups, BillingPlan, Browser, BuildRuntime, Client, Compression, Console, ConsoleResourceType, CreditCard, DatabaseUsageRange, Databases, DeploymentDownloadType, Domains, EmailTemplateLocale, EmailTemplateType, ExecutionMethod, Flag, Framework, FunctionUsageRange, Functions, Graphql, Health, ID, ImageFormat, ImageGravity, IndexType, Locale, MessagePriority, Messaging, MessagingProviderType, Migrations, Name, OAuthProvider, Organizations, PasswordHash, Permission, PlatformType, Project, ProjectUsageRange, Projects, Proxy, Query, Region, RelationMutate, RelationshipType, Role, Runtime, SMTPSecure, SiteUsageRange, Sites, SmsTemplateLocale, SmsTemplateType, SmtpEncryption, StatusCode, Storage, StorageUsageRange, Teams, Tokens, UserUsageRange, Users, VCSDeploymentType, VCSDetectionType, Vcs };
|
|
17678
|
+
export { Account, Adapter, Api, ApiService, AppwriteException, Assistant, AuthMethod, AuthenticationFactor, AuthenticatorType, Avatars, Backups, BillingPlan, Browser, BuildRuntime, Client, Compression, Console, ConsoleResourceType, CreditCard, DatabaseUsageRange, Databases, DeploymentDownloadType, Domains, EmailTemplateLocale, EmailTemplateType, ExecutionMethod, Flag, Framework, FunctionUsageRange, Functions, Graphql, Health, ID, ImageFormat, ImageGravity, IndexType, Locale, MessagePriority, Messaging, MessagingProviderType, Migrations, Name, OAuthProvider, Organizations, PasswordHash, Permission, PlatformType, Project, ProjectUsageRange, Projects, Proxy, ProxyResourceType, Query, Region, RelationMutate, RelationshipType, Role, Runtime, SMTPSecure, SiteUsageRange, Sites, SmsTemplateLocale, SmsTemplateType, SmtpEncryption, StatusCode, Storage, StorageUsageRange, Teams, Tokens, UserUsageRange, Users, VCSDeploymentType, VCSDetectionType, Vcs };
|
|
17400
17679
|
//# sourceMappingURL=sdk.js.map
|