@appwrite.io/console 4.0.0 → 5.0.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/CHANGELOG.md +18 -0
- package/README.md +1 -1
- package/dist/cjs/sdk.js +172 -34
- package/dist/cjs/sdk.js.map +1 -1
- package/dist/esm/sdk.js +173 -35
- package/dist/esm/sdk.js.map +1 -1
- package/dist/iife/sdk.js +172 -34
- package/docs/examples/domains/confirm-purchase.md +16 -0
- package/docs/examples/domains/confirm-transfer-in.md +16 -0
- package/docs/examples/functions/create.md +3 -1
- package/docs/examples/functions/update.md +3 -1
- package/docs/examples/sites/create.md +4 -1
- package/docs/examples/sites/update.md +4 -1
- package/package.json +1 -1
- package/src/client.ts +5 -1
- package/src/enums/appwrite-migration-resource.ts +4 -0
- package/src/enums/build-runtime.ts +3 -0
- package/src/enums/domain-purchase-payment-status.ts +10 -0
- package/src/enums/runtime.ts +3 -0
- package/src/enums/runtimes.ts +3 -0
- package/src/index.ts +1 -0
- package/src/models.ts +90 -5
- package/src/services/account.ts +2 -2
- package/src/services/domains.ts +126 -0
- package/src/services/functions.ts +52 -24
- package/src/services/organizations.ts +2 -2
- package/src/services/sites.ts +83 -41
- package/types/enums/appwrite-migration-resource.d.ts +4 -0
- package/types/enums/build-runtime.d.ts +3 -0
- package/types/enums/domain-purchase-payment-status.d.ts +10 -0
- package/types/enums/runtime.d.ts +3 -0
- package/types/enums/runtimes.d.ts +3 -0
- package/types/index.d.ts +1 -0
- package/types/models.d.ts +90 -5
- package/types/services/account.d.ts +2 -2
- package/types/services/domains.d.ts +44 -0
- package/types/services/functions.d.ts +20 -8
- package/types/services/organizations.d.ts +2 -2
- package/types/services/sites.d.ts +26 -8
package/src/models.ts
CHANGED
|
@@ -12,6 +12,7 @@ import { ProxyRuleDeploymentResourceType } from "./enums/proxy-rule-deployment-r
|
|
|
12
12
|
import { ProxyRuleStatus } from "./enums/proxy-rule-status"
|
|
13
13
|
import { MessageStatus } from "./enums/message-status"
|
|
14
14
|
import { BillingPlanGroup } from "./enums/billing-plan-group"
|
|
15
|
+
import { DomainPurchasePaymentStatus } from "./enums/domain-purchase-payment-status"
|
|
15
16
|
import { DomainTransferStatusStatus } from "./enums/domain-transfer-status-status"
|
|
16
17
|
|
|
17
18
|
/**
|
|
@@ -3524,6 +3525,10 @@ export namespace Models {
|
|
|
3524
3525
|
* Site framework.
|
|
3525
3526
|
*/
|
|
3526
3527
|
framework: string;
|
|
3528
|
+
/**
|
|
3529
|
+
* How many days to keep the non-active deployments before they will be automatically deleted.
|
|
3530
|
+
*/
|
|
3531
|
+
deploymentRetention: number;
|
|
3527
3532
|
/**
|
|
3528
3533
|
* Site's active deployment ID.
|
|
3529
3534
|
*/
|
|
@@ -3568,6 +3573,10 @@ export namespace Models {
|
|
|
3568
3573
|
* The build command used to build the site.
|
|
3569
3574
|
*/
|
|
3570
3575
|
buildCommand: string;
|
|
3576
|
+
/**
|
|
3577
|
+
* Custom command to use when starting site runtime.
|
|
3578
|
+
*/
|
|
3579
|
+
startCommand: string;
|
|
3571
3580
|
/**
|
|
3572
3581
|
* The directory where the site build output is located.
|
|
3573
3582
|
*/
|
|
@@ -3593,9 +3602,13 @@ export namespace Models {
|
|
|
3593
3602
|
*/
|
|
3594
3603
|
providerSilentMode: boolean;
|
|
3595
3604
|
/**
|
|
3596
|
-
* Machine specification for builds
|
|
3605
|
+
* Machine specification for deployment builds.
|
|
3606
|
+
*/
|
|
3607
|
+
buildSpecification: string;
|
|
3608
|
+
/**
|
|
3609
|
+
* Machine specification for SSR executions.
|
|
3597
3610
|
*/
|
|
3598
|
-
|
|
3611
|
+
runtimeSpecification: string;
|
|
3599
3612
|
/**
|
|
3600
3613
|
* Site build runtime.
|
|
3601
3614
|
*/
|
|
@@ -3750,6 +3763,10 @@ export namespace Models {
|
|
|
3750
3763
|
* Function execution and build runtime.
|
|
3751
3764
|
*/
|
|
3752
3765
|
runtime: string;
|
|
3766
|
+
/**
|
|
3767
|
+
* How many days to keep the non-active deployments before they will be automatically deleted.
|
|
3768
|
+
*/
|
|
3769
|
+
deploymentRetention: number;
|
|
3753
3770
|
/**
|
|
3754
3771
|
* Function's active deployment ID.
|
|
3755
3772
|
*/
|
|
@@ -3823,9 +3840,13 @@ export namespace Models {
|
|
|
3823
3840
|
*/
|
|
3824
3841
|
providerSilentMode: boolean;
|
|
3825
3842
|
/**
|
|
3826
|
-
* Machine specification for builds
|
|
3843
|
+
* Machine specification for deployment builds.
|
|
3844
|
+
*/
|
|
3845
|
+
buildSpecification: string;
|
|
3846
|
+
/**
|
|
3847
|
+
* Machine specification for executions.
|
|
3827
3848
|
*/
|
|
3828
|
-
|
|
3849
|
+
runtimeSpecification: string;
|
|
3829
3850
|
}
|
|
3830
3851
|
|
|
3831
3852
|
/**
|
|
@@ -6136,6 +6157,22 @@ export namespace Models {
|
|
|
6136
6157
|
* Total aggregated number of image transformations.
|
|
6137
6158
|
*/
|
|
6138
6159
|
imageTransformationsTotal: number;
|
|
6160
|
+
/**
|
|
6161
|
+
* Aggregated number of function executions per period.
|
|
6162
|
+
*/
|
|
6163
|
+
functionsExecutions: Metric[];
|
|
6164
|
+
/**
|
|
6165
|
+
* Total aggregated number of function executions.
|
|
6166
|
+
*/
|
|
6167
|
+
functionsExecutionsTotal: number;
|
|
6168
|
+
/**
|
|
6169
|
+
* Aggregated number of site executions per period.
|
|
6170
|
+
*/
|
|
6171
|
+
sitesExecutions: Metric[];
|
|
6172
|
+
/**
|
|
6173
|
+
* Total aggregated number of site executions.
|
|
6174
|
+
*/
|
|
6175
|
+
sitesExecutionsTotal: number;
|
|
6139
6176
|
/**
|
|
6140
6177
|
* Aggregated stats for total network bandwidth.
|
|
6141
6178
|
*/
|
|
@@ -6160,6 +6197,30 @@ export namespace Models {
|
|
|
6160
6197
|
* Total aggregated number of Imagine credits.
|
|
6161
6198
|
*/
|
|
6162
6199
|
imagineCreditsTotal: number;
|
|
6200
|
+
/**
|
|
6201
|
+
* Current aggregated number of open Realtime connections.
|
|
6202
|
+
*/
|
|
6203
|
+
realtimeConnectionsTotal: number;
|
|
6204
|
+
/**
|
|
6205
|
+
* Total number of Realtime messages sent to clients.
|
|
6206
|
+
*/
|
|
6207
|
+
realtimeMessagesTotal: number;
|
|
6208
|
+
/**
|
|
6209
|
+
* Total consumed Realtime bandwidth (in bytes).
|
|
6210
|
+
*/
|
|
6211
|
+
realtimeBandwidthTotal: number;
|
|
6212
|
+
/**
|
|
6213
|
+
* Aggregated number of open Realtime connections per period.
|
|
6214
|
+
*/
|
|
6215
|
+
realtimeConnections: Metric[];
|
|
6216
|
+
/**
|
|
6217
|
+
* Aggregated number of Realtime messages sent to clients per period.
|
|
6218
|
+
*/
|
|
6219
|
+
realtimeMessages: Metric[];
|
|
6220
|
+
/**
|
|
6221
|
+
* Aggregated consumed Realtime bandwidth (in bytes) per period.
|
|
6222
|
+
*/
|
|
6223
|
+
realtimeBandwidth: Metric[];
|
|
6163
6224
|
}
|
|
6164
6225
|
|
|
6165
6226
|
/**
|
|
@@ -6890,6 +6951,22 @@ export namespace Models {
|
|
|
6890
6951
|
* Number of sites to be migrated.
|
|
6891
6952
|
*/
|
|
6892
6953
|
site: number;
|
|
6954
|
+
/**
|
|
6955
|
+
* Number of providers to be migrated.
|
|
6956
|
+
*/
|
|
6957
|
+
provider: number;
|
|
6958
|
+
/**
|
|
6959
|
+
* Number of topics to be migrated.
|
|
6960
|
+
*/
|
|
6961
|
+
topic: number;
|
|
6962
|
+
/**
|
|
6963
|
+
* Number of subscribers to be migrated.
|
|
6964
|
+
*/
|
|
6965
|
+
subscriber: number;
|
|
6966
|
+
/**
|
|
6967
|
+
* Number of messages to be migrated.
|
|
6968
|
+
*/
|
|
6969
|
+
message: number;
|
|
6893
6970
|
/**
|
|
6894
6971
|
* Size of files to be migrated in mb.
|
|
6895
6972
|
*/
|
|
@@ -8651,7 +8728,11 @@ export namespace Models {
|
|
|
8651
8728
|
/**
|
|
8652
8729
|
* Payment status for domain purchase.
|
|
8653
8730
|
*/
|
|
8654
|
-
paymentStatus:
|
|
8731
|
+
paymentStatus: DomainPurchasePaymentStatus;
|
|
8732
|
+
/**
|
|
8733
|
+
* Client secret for payment confirmation. Present only when paymentStatus is pending_confirmation.
|
|
8734
|
+
*/
|
|
8735
|
+
clientSecret: string;
|
|
8655
8736
|
/**
|
|
8656
8737
|
* Nameservers setting. "Appwrite" or empty string.
|
|
8657
8738
|
*/
|
|
@@ -8684,6 +8765,10 @@ export namespace Models {
|
|
|
8684
8765
|
* Domain transfer status (e.g., "pending", "completed", "failed").
|
|
8685
8766
|
*/
|
|
8686
8767
|
transferStatus: string;
|
|
8768
|
+
/**
|
|
8769
|
+
* Retry attempts for the current domain payment flow. Development only.
|
|
8770
|
+
*/
|
|
8771
|
+
attempts: number;
|
|
8687
8772
|
}
|
|
8688
8773
|
|
|
8689
8774
|
/**
|
package/src/services/account.ts
CHANGED
|
@@ -734,7 +734,7 @@ export class Account {
|
|
|
734
734
|
/**
|
|
735
735
|
* List all invoices tied to an account.
|
|
736
736
|
*
|
|
737
|
-
* @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: teamId, aggregationId, amount, currency, from, to, dueAt, attempts, status, grossAmount
|
|
737
|
+
* @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: teamId, aggregationId, type, amount, currency, from, to, dueAt, attempts, status, grossAmount
|
|
738
738
|
* @throws {AppwriteException}
|
|
739
739
|
* @returns {Promise<Models.InvoiceList>}
|
|
740
740
|
*/
|
|
@@ -742,7 +742,7 @@ export class Account {
|
|
|
742
742
|
/**
|
|
743
743
|
* List all invoices tied to an account.
|
|
744
744
|
*
|
|
745
|
-
* @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: teamId, aggregationId, amount, currency, from, to, dueAt, attempts, status, grossAmount
|
|
745
|
+
* @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: teamId, aggregationId, type, amount, currency, from, to, dueAt, attempts, status, grossAmount
|
|
746
746
|
* @throws {AppwriteException}
|
|
747
747
|
* @returns {Promise<Models.InvoiceList>}
|
|
748
748
|
* @deprecated Use the object parameter style method for a better developer experience.
|
package/src/services/domains.ts
CHANGED
|
@@ -353,6 +353,69 @@ export class Domains {
|
|
|
353
353
|
);
|
|
354
354
|
}
|
|
355
355
|
|
|
356
|
+
/**
|
|
357
|
+
* Confirm a domain purchase after payment authentication. Call this after the client has confirmed the payment via Stripe.js.
|
|
358
|
+
*
|
|
359
|
+
* @param {string} params.domainId - Domain ID to confirm purchase for.
|
|
360
|
+
* @param {string} params.organizationId - Team ID that owns the domain.
|
|
361
|
+
* @throws {AppwriteException}
|
|
362
|
+
* @returns {Promise<Models.Domain>}
|
|
363
|
+
*/
|
|
364
|
+
confirmPurchase(params: { domainId: string, organizationId: string }): Promise<Models.Domain>;
|
|
365
|
+
/**
|
|
366
|
+
* Confirm a domain purchase after payment authentication. Call this after the client has confirmed the payment via Stripe.js.
|
|
367
|
+
*
|
|
368
|
+
* @param {string} domainId - Domain ID to confirm purchase for.
|
|
369
|
+
* @param {string} organizationId - Team ID that owns the domain.
|
|
370
|
+
* @throws {AppwriteException}
|
|
371
|
+
* @returns {Promise<Models.Domain>}
|
|
372
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
373
|
+
*/
|
|
374
|
+
confirmPurchase(domainId: string, organizationId: string): Promise<Models.Domain>;
|
|
375
|
+
confirmPurchase(
|
|
376
|
+
paramsOrFirst: { domainId: string, organizationId: string } | string,
|
|
377
|
+
...rest: [(string)?]
|
|
378
|
+
): Promise<Models.Domain> {
|
|
379
|
+
let params: { domainId: string, organizationId: string };
|
|
380
|
+
|
|
381
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
382
|
+
params = (paramsOrFirst || {}) as { domainId: string, organizationId: string };
|
|
383
|
+
} else {
|
|
384
|
+
params = {
|
|
385
|
+
domainId: paramsOrFirst as string,
|
|
386
|
+
organizationId: rest[0] as string
|
|
387
|
+
};
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
const domainId = params.domainId;
|
|
391
|
+
const organizationId = params.organizationId;
|
|
392
|
+
|
|
393
|
+
if (typeof domainId === 'undefined') {
|
|
394
|
+
throw new AppwriteException('Missing required parameter: "domainId"');
|
|
395
|
+
}
|
|
396
|
+
if (typeof organizationId === 'undefined') {
|
|
397
|
+
throw new AppwriteException('Missing required parameter: "organizationId"');
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
const apiPath = '/domains/purchases/{domainId}/confirm'.replace('{domainId}', domainId);
|
|
401
|
+
const payload: Payload = {};
|
|
402
|
+
if (typeof organizationId !== 'undefined') {
|
|
403
|
+
payload['organizationId'] = organizationId;
|
|
404
|
+
}
|
|
405
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
406
|
+
|
|
407
|
+
const apiHeaders: { [header: string]: string } = {
|
|
408
|
+
'content-type': 'application/json',
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
return this.client.call(
|
|
412
|
+
'post',
|
|
413
|
+
uri,
|
|
414
|
+
apiHeaders,
|
|
415
|
+
payload
|
|
416
|
+
);
|
|
417
|
+
}
|
|
418
|
+
|
|
356
419
|
/**
|
|
357
420
|
* List domain suggestions.
|
|
358
421
|
*
|
|
@@ -529,6 +592,69 @@ export class Domains {
|
|
|
529
592
|
);
|
|
530
593
|
}
|
|
531
594
|
|
|
595
|
+
/**
|
|
596
|
+
* Confirm a domain transfer in after payment authentication. Call this after the client has confirmed the payment via Stripe.js.
|
|
597
|
+
*
|
|
598
|
+
* @param {string} params.domainId - Domain ID to confirm transfer for.
|
|
599
|
+
* @param {string} params.organizationId - Team ID that owns the domain.
|
|
600
|
+
* @throws {AppwriteException}
|
|
601
|
+
* @returns {Promise<Models.Domain>}
|
|
602
|
+
*/
|
|
603
|
+
confirmTransferIn(params: { domainId: string, organizationId: string }): Promise<Models.Domain>;
|
|
604
|
+
/**
|
|
605
|
+
* Confirm a domain transfer in after payment authentication. Call this after the client has confirmed the payment via Stripe.js.
|
|
606
|
+
*
|
|
607
|
+
* @param {string} domainId - Domain ID to confirm transfer for.
|
|
608
|
+
* @param {string} organizationId - Team ID that owns the domain.
|
|
609
|
+
* @throws {AppwriteException}
|
|
610
|
+
* @returns {Promise<Models.Domain>}
|
|
611
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
612
|
+
*/
|
|
613
|
+
confirmTransferIn(domainId: string, organizationId: string): Promise<Models.Domain>;
|
|
614
|
+
confirmTransferIn(
|
|
615
|
+
paramsOrFirst: { domainId: string, organizationId: string } | string,
|
|
616
|
+
...rest: [(string)?]
|
|
617
|
+
): Promise<Models.Domain> {
|
|
618
|
+
let params: { domainId: string, organizationId: string };
|
|
619
|
+
|
|
620
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
621
|
+
params = (paramsOrFirst || {}) as { domainId: string, organizationId: string };
|
|
622
|
+
} else {
|
|
623
|
+
params = {
|
|
624
|
+
domainId: paramsOrFirst as string,
|
|
625
|
+
organizationId: rest[0] as string
|
|
626
|
+
};
|
|
627
|
+
}
|
|
628
|
+
|
|
629
|
+
const domainId = params.domainId;
|
|
630
|
+
const organizationId = params.organizationId;
|
|
631
|
+
|
|
632
|
+
if (typeof domainId === 'undefined') {
|
|
633
|
+
throw new AppwriteException('Missing required parameter: "domainId"');
|
|
634
|
+
}
|
|
635
|
+
if (typeof organizationId === 'undefined') {
|
|
636
|
+
throw new AppwriteException('Missing required parameter: "organizationId"');
|
|
637
|
+
}
|
|
638
|
+
|
|
639
|
+
const apiPath = '/domains/transfers/in/{domainId}/confirm'.replace('{domainId}', domainId);
|
|
640
|
+
const payload: Payload = {};
|
|
641
|
+
if (typeof organizationId !== 'undefined') {
|
|
642
|
+
payload['organizationId'] = organizationId;
|
|
643
|
+
}
|
|
644
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
645
|
+
|
|
646
|
+
const apiHeaders: { [header: string]: string } = {
|
|
647
|
+
'content-type': 'application/json',
|
|
648
|
+
}
|
|
649
|
+
|
|
650
|
+
return this.client.call(
|
|
651
|
+
'post',
|
|
652
|
+
uri,
|
|
653
|
+
apiHeaders,
|
|
654
|
+
payload
|
|
655
|
+
);
|
|
656
|
+
}
|
|
657
|
+
|
|
532
658
|
/**
|
|
533
659
|
* Create a domain transfer out and return the authorization code.
|
|
534
660
|
*
|
|
@@ -105,11 +105,13 @@ export class Functions {
|
|
|
105
105
|
* @param {string} params.providerBranch - Production branch for the repo linked to the function.
|
|
106
106
|
* @param {boolean} params.providerSilentMode - Is the VCS (Version Control System) connection in silent mode for the repo linked to the function? In silent mode, comments will not be made on commits and pull requests.
|
|
107
107
|
* @param {string} params.providerRootDirectory - Path to function code in the linked repo.
|
|
108
|
-
* @param {string} params.
|
|
108
|
+
* @param {string} params.buildSpecification - Build specification for the function deployments.
|
|
109
|
+
* @param {string} params.runtimeSpecification - Runtime specification for the function executions.
|
|
110
|
+
* @param {number} params.deploymentRetention - Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.
|
|
109
111
|
* @throws {AppwriteException}
|
|
110
112
|
* @returns {Promise<Models.Function>}
|
|
111
113
|
*/
|
|
112
|
-
create(params: { functionId: string, name: string, runtime: Runtime, execute?: string[], events?: string[], schedule?: string, timeout?: number, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, scopes?: Scopes[], installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string,
|
|
114
|
+
create(params: { functionId: string, name: string, runtime: Runtime, execute?: string[], events?: string[], schedule?: string, timeout?: number, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, scopes?: Scopes[], installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, buildSpecification?: string, runtimeSpecification?: string, deploymentRetention?: number }): Promise<Models.Function>;
|
|
113
115
|
/**
|
|
114
116
|
* Create a new function. You can pass a list of [permissions](https://appwrite.io/docs/permissions) to allow different project users or team with access to execute the function using the client API.
|
|
115
117
|
*
|
|
@@ -130,20 +132,22 @@ export class Functions {
|
|
|
130
132
|
* @param {string} providerBranch - Production branch for the repo linked to the function.
|
|
131
133
|
* @param {boolean} providerSilentMode - Is the VCS (Version Control System) connection in silent mode for the repo linked to the function? In silent mode, comments will not be made on commits and pull requests.
|
|
132
134
|
* @param {string} providerRootDirectory - Path to function code in the linked repo.
|
|
133
|
-
* @param {string}
|
|
135
|
+
* @param {string} buildSpecification - Build specification for the function deployments.
|
|
136
|
+
* @param {string} runtimeSpecification - Runtime specification for the function executions.
|
|
137
|
+
* @param {number} deploymentRetention - Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.
|
|
134
138
|
* @throws {AppwriteException}
|
|
135
139
|
* @returns {Promise<Models.Function>}
|
|
136
140
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
137
141
|
*/
|
|
138
|
-
create(functionId: string, name: string, runtime: Runtime, execute?: string[], events?: string[], schedule?: string, timeout?: number, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, scopes?: Scopes[], installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string,
|
|
142
|
+
create(functionId: string, name: string, runtime: Runtime, execute?: string[], events?: string[], schedule?: string, timeout?: number, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, scopes?: Scopes[], installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, buildSpecification?: string, runtimeSpecification?: string, deploymentRetention?: number): Promise<Models.Function>;
|
|
139
143
|
create(
|
|
140
|
-
paramsOrFirst: { functionId: string, name: string, runtime: Runtime, execute?: string[], events?: string[], schedule?: string, timeout?: number, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, scopes?: Scopes[], installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string,
|
|
141
|
-
...rest: [(string)?, (Runtime)?, (string[])?, (string[])?, (string)?, (number)?, (boolean)?, (boolean)?, (string)?, (string)?, (Scopes[])?, (string)?, (string)?, (string)?, (boolean)?, (string)?, (string)?]
|
|
144
|
+
paramsOrFirst: { functionId: string, name: string, runtime: Runtime, execute?: string[], events?: string[], schedule?: string, timeout?: number, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, scopes?: Scopes[], installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, buildSpecification?: string, runtimeSpecification?: string, deploymentRetention?: number } | string,
|
|
145
|
+
...rest: [(string)?, (Runtime)?, (string[])?, (string[])?, (string)?, (number)?, (boolean)?, (boolean)?, (string)?, (string)?, (Scopes[])?, (string)?, (string)?, (string)?, (boolean)?, (string)?, (string)?, (string)?, (number)?]
|
|
142
146
|
): Promise<Models.Function> {
|
|
143
|
-
let params: { functionId: string, name: string, runtime: Runtime, execute?: string[], events?: string[], schedule?: string, timeout?: number, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, scopes?: Scopes[], installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string,
|
|
147
|
+
let params: { functionId: string, name: string, runtime: Runtime, execute?: string[], events?: string[], schedule?: string, timeout?: number, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, scopes?: Scopes[], installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, buildSpecification?: string, runtimeSpecification?: string, deploymentRetention?: number };
|
|
144
148
|
|
|
145
149
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
146
|
-
params = (paramsOrFirst || {}) as { functionId: string, name: string, runtime: Runtime, execute?: string[], events?: string[], schedule?: string, timeout?: number, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, scopes?: Scopes[], installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string,
|
|
150
|
+
params = (paramsOrFirst || {}) as { functionId: string, name: string, runtime: Runtime, execute?: string[], events?: string[], schedule?: string, timeout?: number, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, scopes?: Scopes[], installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, buildSpecification?: string, runtimeSpecification?: string, deploymentRetention?: number };
|
|
147
151
|
} else {
|
|
148
152
|
params = {
|
|
149
153
|
functionId: paramsOrFirst as string,
|
|
@@ -163,7 +167,9 @@ export class Functions {
|
|
|
163
167
|
providerBranch: rest[13] as string,
|
|
164
168
|
providerSilentMode: rest[14] as boolean,
|
|
165
169
|
providerRootDirectory: rest[15] as string,
|
|
166
|
-
|
|
170
|
+
buildSpecification: rest[16] as string,
|
|
171
|
+
runtimeSpecification: rest[17] as string,
|
|
172
|
+
deploymentRetention: rest[18] as number
|
|
167
173
|
};
|
|
168
174
|
}
|
|
169
175
|
|
|
@@ -184,7 +190,9 @@ export class Functions {
|
|
|
184
190
|
const providerBranch = params.providerBranch;
|
|
185
191
|
const providerSilentMode = params.providerSilentMode;
|
|
186
192
|
const providerRootDirectory = params.providerRootDirectory;
|
|
187
|
-
const
|
|
193
|
+
const buildSpecification = params.buildSpecification;
|
|
194
|
+
const runtimeSpecification = params.runtimeSpecification;
|
|
195
|
+
const deploymentRetention = params.deploymentRetention;
|
|
188
196
|
|
|
189
197
|
if (typeof functionId === 'undefined') {
|
|
190
198
|
throw new AppwriteException('Missing required parameter: "functionId"');
|
|
@@ -249,8 +257,14 @@ export class Functions {
|
|
|
249
257
|
if (typeof providerRootDirectory !== 'undefined') {
|
|
250
258
|
payload['providerRootDirectory'] = providerRootDirectory;
|
|
251
259
|
}
|
|
252
|
-
if (typeof
|
|
253
|
-
payload['
|
|
260
|
+
if (typeof buildSpecification !== 'undefined') {
|
|
261
|
+
payload['buildSpecification'] = buildSpecification;
|
|
262
|
+
}
|
|
263
|
+
if (typeof runtimeSpecification !== 'undefined') {
|
|
264
|
+
payload['runtimeSpecification'] = runtimeSpecification;
|
|
265
|
+
}
|
|
266
|
+
if (typeof deploymentRetention !== 'undefined') {
|
|
267
|
+
payload['deploymentRetention'] = deploymentRetention;
|
|
254
268
|
}
|
|
255
269
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
256
270
|
|
|
@@ -565,11 +579,13 @@ export class Functions {
|
|
|
565
579
|
* @param {string} params.providerBranch - Production branch for the repo linked to the function
|
|
566
580
|
* @param {boolean} params.providerSilentMode - Is the VCS (Version Control System) connection in silent mode for the repo linked to the function? In silent mode, comments will not be made on commits and pull requests.
|
|
567
581
|
* @param {string} params.providerRootDirectory - Path to function code in the linked repo.
|
|
568
|
-
* @param {string} params.
|
|
582
|
+
* @param {string} params.buildSpecification - Build specification for the function deployments.
|
|
583
|
+
* @param {string} params.runtimeSpecification - Runtime specification for the function executions.
|
|
584
|
+
* @param {number} params.deploymentRetention - Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.
|
|
569
585
|
* @throws {AppwriteException}
|
|
570
586
|
* @returns {Promise<Models.Function>}
|
|
571
587
|
*/
|
|
572
|
-
update(params: { functionId: string, name: string, runtime?: Runtime, execute?: string[], events?: string[], schedule?: string, timeout?: number, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, scopes?: Scopes[], installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string,
|
|
588
|
+
update(params: { functionId: string, name: string, runtime?: Runtime, execute?: string[], events?: string[], schedule?: string, timeout?: number, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, scopes?: Scopes[], installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, buildSpecification?: string, runtimeSpecification?: string, deploymentRetention?: number }): Promise<Models.Function>;
|
|
573
589
|
/**
|
|
574
590
|
* Update function by its unique ID.
|
|
575
591
|
*
|
|
@@ -590,20 +606,22 @@ export class Functions {
|
|
|
590
606
|
* @param {string} providerBranch - Production branch for the repo linked to the function
|
|
591
607
|
* @param {boolean} providerSilentMode - Is the VCS (Version Control System) connection in silent mode for the repo linked to the function? In silent mode, comments will not be made on commits and pull requests.
|
|
592
608
|
* @param {string} providerRootDirectory - Path to function code in the linked repo.
|
|
593
|
-
* @param {string}
|
|
609
|
+
* @param {string} buildSpecification - Build specification for the function deployments.
|
|
610
|
+
* @param {string} runtimeSpecification - Runtime specification for the function executions.
|
|
611
|
+
* @param {number} deploymentRetention - Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.
|
|
594
612
|
* @throws {AppwriteException}
|
|
595
613
|
* @returns {Promise<Models.Function>}
|
|
596
614
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
597
615
|
*/
|
|
598
|
-
update(functionId: string, name: string, runtime?: Runtime, execute?: string[], events?: string[], schedule?: string, timeout?: number, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, scopes?: Scopes[], installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string,
|
|
616
|
+
update(functionId: string, name: string, runtime?: Runtime, execute?: string[], events?: string[], schedule?: string, timeout?: number, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, scopes?: Scopes[], installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, buildSpecification?: string, runtimeSpecification?: string, deploymentRetention?: number): Promise<Models.Function>;
|
|
599
617
|
update(
|
|
600
|
-
paramsOrFirst: { functionId: string, name: string, runtime?: Runtime, execute?: string[], events?: string[], schedule?: string, timeout?: number, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, scopes?: Scopes[], installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string,
|
|
601
|
-
...rest: [(string)?, (Runtime)?, (string[])?, (string[])?, (string)?, (number)?, (boolean)?, (boolean)?, (string)?, (string)?, (Scopes[])?, (string)?, (string)?, (string)?, (boolean)?, (string)?, (string)?]
|
|
618
|
+
paramsOrFirst: { functionId: string, name: string, runtime?: Runtime, execute?: string[], events?: string[], schedule?: string, timeout?: number, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, scopes?: Scopes[], installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, buildSpecification?: string, runtimeSpecification?: string, deploymentRetention?: number } | string,
|
|
619
|
+
...rest: [(string)?, (Runtime)?, (string[])?, (string[])?, (string)?, (number)?, (boolean)?, (boolean)?, (string)?, (string)?, (Scopes[])?, (string)?, (string)?, (string)?, (boolean)?, (string)?, (string)?, (string)?, (number)?]
|
|
602
620
|
): Promise<Models.Function> {
|
|
603
|
-
let params: { functionId: string, name: string, runtime?: Runtime, execute?: string[], events?: string[], schedule?: string, timeout?: number, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, scopes?: Scopes[], installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string,
|
|
621
|
+
let params: { functionId: string, name: string, runtime?: Runtime, execute?: string[], events?: string[], schedule?: string, timeout?: number, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, scopes?: Scopes[], installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, buildSpecification?: string, runtimeSpecification?: string, deploymentRetention?: number };
|
|
604
622
|
|
|
605
623
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
606
|
-
params = (paramsOrFirst || {}) as { functionId: string, name: string, runtime?: Runtime, execute?: string[], events?: string[], schedule?: string, timeout?: number, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, scopes?: Scopes[], installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string,
|
|
624
|
+
params = (paramsOrFirst || {}) as { functionId: string, name: string, runtime?: Runtime, execute?: string[], events?: string[], schedule?: string, timeout?: number, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, scopes?: Scopes[], installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, buildSpecification?: string, runtimeSpecification?: string, deploymentRetention?: number };
|
|
607
625
|
} else {
|
|
608
626
|
params = {
|
|
609
627
|
functionId: paramsOrFirst as string,
|
|
@@ -623,7 +641,9 @@ export class Functions {
|
|
|
623
641
|
providerBranch: rest[13] as string,
|
|
624
642
|
providerSilentMode: rest[14] as boolean,
|
|
625
643
|
providerRootDirectory: rest[15] as string,
|
|
626
|
-
|
|
644
|
+
buildSpecification: rest[16] as string,
|
|
645
|
+
runtimeSpecification: rest[17] as string,
|
|
646
|
+
deploymentRetention: rest[18] as number
|
|
627
647
|
};
|
|
628
648
|
}
|
|
629
649
|
|
|
@@ -644,7 +664,9 @@ export class Functions {
|
|
|
644
664
|
const providerBranch = params.providerBranch;
|
|
645
665
|
const providerSilentMode = params.providerSilentMode;
|
|
646
666
|
const providerRootDirectory = params.providerRootDirectory;
|
|
647
|
-
const
|
|
667
|
+
const buildSpecification = params.buildSpecification;
|
|
668
|
+
const runtimeSpecification = params.runtimeSpecification;
|
|
669
|
+
const deploymentRetention = params.deploymentRetention;
|
|
648
670
|
|
|
649
671
|
if (typeof functionId === 'undefined') {
|
|
650
672
|
throw new AppwriteException('Missing required parameter: "functionId"');
|
|
@@ -703,8 +725,14 @@ export class Functions {
|
|
|
703
725
|
if (typeof providerRootDirectory !== 'undefined') {
|
|
704
726
|
payload['providerRootDirectory'] = providerRootDirectory;
|
|
705
727
|
}
|
|
706
|
-
if (typeof
|
|
707
|
-
payload['
|
|
728
|
+
if (typeof buildSpecification !== 'undefined') {
|
|
729
|
+
payload['buildSpecification'] = buildSpecification;
|
|
730
|
+
}
|
|
731
|
+
if (typeof runtimeSpecification !== 'undefined') {
|
|
732
|
+
payload['runtimeSpecification'] = runtimeSpecification;
|
|
733
|
+
}
|
|
734
|
+
if (typeof deploymentRetention !== 'undefined') {
|
|
735
|
+
payload['deploymentRetention'] = deploymentRetention;
|
|
708
736
|
}
|
|
709
737
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
710
738
|
|
|
@@ -1235,7 +1235,7 @@ export class Organizations {
|
|
|
1235
1235
|
* List all invoices for an organization.
|
|
1236
1236
|
*
|
|
1237
1237
|
* @param {string} params.organizationId - Organization ID
|
|
1238
|
-
* @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: teamId, aggregationId, amount, currency, from, to, dueAt, attempts, status, grossAmount
|
|
1238
|
+
* @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: teamId, aggregationId, type, amount, currency, from, to, dueAt, attempts, status, grossAmount
|
|
1239
1239
|
* @throws {AppwriteException}
|
|
1240
1240
|
* @returns {Promise<Models.InvoiceList>}
|
|
1241
1241
|
*/
|
|
@@ -1244,7 +1244,7 @@ export class Organizations {
|
|
|
1244
1244
|
* List all invoices for an organization.
|
|
1245
1245
|
*
|
|
1246
1246
|
* @param {string} organizationId - Organization ID
|
|
1247
|
-
* @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: teamId, aggregationId, amount, currency, from, to, dueAt, attempts, status, grossAmount
|
|
1247
|
+
* @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: teamId, aggregationId, type, amount, currency, from, to, dueAt, attempts, status, grossAmount
|
|
1248
1248
|
* @throws {AppwriteException}
|
|
1249
1249
|
* @returns {Promise<Models.InvoiceList>}
|
|
1250
1250
|
* @deprecated Use the object parameter style method for a better developer experience.
|