@appwrite.io/console 18.3.0-rc.1 → 18.3.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 +2 -2
- package/dist/cjs/sdk.js +59 -1095
- package/dist/cjs/sdk.js.map +1 -1
- package/dist/esm/sdk.js +60 -1094
- package/dist/esm/sdk.js.map +1 -1
- package/dist/iife/sdk.js +59 -1095
- package/package.json +1 -1
- package/types/enums/project-key-scopes.d.ts +1 -3
- package/types/enums/proxy-rule-deployment-resource-type.d.ts +1 -2
- package/types/enums/query-suggestion-resource.d.ts +0 -1
- package/types/enums/usage-event-metric.d.ts +0 -3
- package/types/enums/usage-gauge-metric.d.ts +0 -1
- package/types/index.d.ts +0 -5
- package/types/models.d.ts +25 -141
- package/types/service.d.ts +11 -0
- package/types/services/functions.d.ts +12 -6
- package/types/services/projects.d.ts +7 -4
- package/types/services/push.d.ts +2 -2
- package/types/enums/analytics-dimension.d.ts +0 -24
- package/types/enums/analytics-interval.d.ts +0 -6
- package/types/services/analytics-tracking.d.ts +0 -211
- package/types/services/analytics.d.ts +0 -254
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@appwrite.io/console",
|
|
3
3
|
"homepage": "https://appwrite.io/support",
|
|
4
4
|
"description": "Appwrite is an open-source self-hosted backend server that abstracts and simplifies complex and repetitive development tasks behind a very simple REST API",
|
|
5
|
-
"version": "18.3.0
|
|
5
|
+
"version": "18.3.0",
|
|
6
6
|
"license": "BSD-3-Clause",
|
|
7
7
|
"main": "dist/cjs/sdk.js",
|
|
8
8
|
"exports": {
|
|
@@ -121,7 +121,5 @@ export declare enum ProjectKeyScopes {
|
|
|
121
121
|
AppsWrite = "apps.write",
|
|
122
122
|
Oauth2Read = "oauth2.read",
|
|
123
123
|
Oauth2Write = "oauth2.write",
|
|
124
|
-
Oauth2Introspect = "oauth2.introspect"
|
|
125
|
-
AnalyticsRead = "analytics.read",
|
|
126
|
-
AnalyticsWrite = "analytics.write"
|
|
124
|
+
Oauth2Introspect = "oauth2.introspect"
|
|
127
125
|
}
|
|
@@ -88,7 +88,6 @@ export declare enum QuerySuggestionResource {
|
|
|
88
88
|
ResourceTokens = "resourcetokens",
|
|
89
89
|
Transactions = "transactions",
|
|
90
90
|
TransactionLogs = "transactionlogs",
|
|
91
|
-
AnalyticsProperties = "analyticsproperties",
|
|
92
91
|
DedicatedDatabases = "dedicateddatabases",
|
|
93
92
|
DedicatedDatabaseConfigs = "dedicateddatabaseconfigs",
|
|
94
93
|
DedicatedDatabaseRuntimes = "dedicateddatabaseruntimes",
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
export declare enum UsageEventMetric {
|
|
2
|
-
AnalyticsEvents = "analytics.events",
|
|
3
|
-
AnalyticsPageviews = "analytics.pageviews",
|
|
4
|
-
AnalyticsBotsEvents = "analytics.bots.events",
|
|
5
2
|
NetworkRequests = "network.requests",
|
|
6
3
|
NetworkInbound = "network.inbound",
|
|
7
4
|
NetworkOutbound = "network.outbound",
|
package/types/index.d.ts
CHANGED
|
@@ -11,7 +11,6 @@ export { Client, Query, AppwriteException } from './client';
|
|
|
11
11
|
export { Account } from './services/account';
|
|
12
12
|
export { Activities } from './services/activities';
|
|
13
13
|
export { Affiliates } from './services/affiliates';
|
|
14
|
-
export { Analytics } from './services/analytics';
|
|
15
14
|
export { Apps } from './services/apps';
|
|
16
15
|
export { Avatars } from './services/avatars';
|
|
17
16
|
export { Backups } from './services/backups';
|
|
@@ -53,11 +52,9 @@ export { Waf } from './services/waf';
|
|
|
53
52
|
export { Webhooks } from './services/webhooks';
|
|
54
53
|
export { Realtime } from './services/realtime';
|
|
55
54
|
export { Push } from './services/push';
|
|
56
|
-
export { AnalyticsTracking } from './services/analytics-tracking';
|
|
57
55
|
export type { Models, Payload, RealtimeResponseEvent, UploadProgress, } from './client';
|
|
58
56
|
export type { RealtimeSubscription } from './services/realtime';
|
|
59
57
|
export type { PushMessage, PushSubscription, SubscribeOptions, MessageCallback, } from './services/push';
|
|
60
|
-
export type { AnalyticsEventEmitter, AnalyticsEventOptions, AnalyticsTrackingOptions, DownloadTrackingOptions, OutboundTrackingOptions, } from './services/analytics-tracking';
|
|
61
58
|
export type { QueryTypes, QueryTypesList } from './query';
|
|
62
59
|
export { Permission } from './permission';
|
|
63
60
|
export { Role } from './role';
|
|
@@ -70,8 +67,6 @@ export { AuthenticatorType } from './enums/authenticator-type';
|
|
|
70
67
|
export { AuthenticationFactor } from './enums/authentication-factor';
|
|
71
68
|
export { IdTokenProvider } from './enums/id-token-provider';
|
|
72
69
|
export { OAuthProvider } from './enums/o-auth-provider';
|
|
73
|
-
export { AnalyticsInterval } from './enums/analytics-interval';
|
|
74
|
-
export { AnalyticsDimension } from './enums/analytics-dimension';
|
|
75
70
|
export { Browser } from './enums/browser';
|
|
76
71
|
export { CreditCard } from './enums/credit-card';
|
|
77
72
|
export { Flag } from './enums/flag';
|
package/types/models.d.ts
CHANGED
|
@@ -4328,6 +4328,10 @@ export declare namespace Models {
|
|
|
4328
4328
|
* Function execution schedule in CRON format.
|
|
4329
4329
|
*/
|
|
4330
4330
|
schedule: string;
|
|
4331
|
+
/**
|
|
4332
|
+
* Minutes between scheduled executions. 0 when the function has no interval.
|
|
4333
|
+
*/
|
|
4334
|
+
interval?: number;
|
|
4331
4335
|
/**
|
|
4332
4336
|
* Function execution timeout in seconds.
|
|
4333
4337
|
*/
|
|
@@ -7448,7 +7452,7 @@ export declare namespace Models {
|
|
|
7448
7452
|
*/
|
|
7449
7453
|
deploymentId: string;
|
|
7450
7454
|
/**
|
|
7451
|
-
* Type of deployment
|
|
7455
|
+
* Type of deployment. Possible values are "function", "site". Used if rule's type is "deployment".
|
|
7452
7456
|
*/
|
|
7453
7457
|
deploymentResourceType?: ProxyRuleDeploymentResourceType;
|
|
7454
7458
|
/**
|
|
@@ -7508,6 +7512,10 @@ export declare namespace Models {
|
|
|
7508
7512
|
* The CRON schedule expression.
|
|
7509
7513
|
*/
|
|
7510
7514
|
schedule: string;
|
|
7515
|
+
/**
|
|
7516
|
+
* Minutes between runs. 0 when the schedule has no interval.
|
|
7517
|
+
*/
|
|
7518
|
+
interval?: number;
|
|
7511
7519
|
/**
|
|
7512
7520
|
* Schedule data used to store resource-specific context needed for execution.
|
|
7513
7521
|
*/
|
|
@@ -8904,117 +8912,6 @@ export declare namespace Models {
|
|
|
8904
8912
|
*/
|
|
8905
8913
|
resources: UsageResources[];
|
|
8906
8914
|
};
|
|
8907
|
-
/**
|
|
8908
|
-
* AnalyticsMetric
|
|
8909
|
-
*/
|
|
8910
|
-
export type AnalyticsMetric = {
|
|
8911
|
-
/**
|
|
8912
|
-
* Dimension value this row covers. Null when no dimension was requested, empty when the dimension could not be derived for those events.
|
|
8913
|
-
*/
|
|
8914
|
-
value?: string;
|
|
8915
|
-
/**
|
|
8916
|
-
* Start of the time bucket this row covers, in ISO 8601. Null when no interval was requested.
|
|
8917
|
-
*/
|
|
8918
|
-
date?: string;
|
|
8919
|
-
/**
|
|
8920
|
-
* Unique visitors in the requested range.
|
|
8921
|
-
*/
|
|
8922
|
-
visitors: number;
|
|
8923
|
-
/**
|
|
8924
|
-
* Unique sessions in the requested range.
|
|
8925
|
-
*/
|
|
8926
|
-
sessions: number;
|
|
8927
|
-
/**
|
|
8928
|
-
* Total pageview events (events with name="pageview") in the requested range. Only the flat aggregate computes it; null on breakdown and time-series rows.
|
|
8929
|
-
*/
|
|
8930
|
-
pageviews?: number;
|
|
8931
|
-
/**
|
|
8932
|
-
* Total events in the requested range.
|
|
8933
|
-
*/
|
|
8934
|
-
events: number;
|
|
8935
|
-
/**
|
|
8936
|
-
* Total sessions with activity in the requested range. Only the flat aggregate computes it; null on breakdown and time-series rows.
|
|
8937
|
-
*/
|
|
8938
|
-
visits?: number;
|
|
8939
|
-
/**
|
|
8940
|
-
* Share of single-event sessions, as a percentage. Only the flat aggregate computes it; null on breakdown and time-series rows.
|
|
8941
|
-
*/
|
|
8942
|
-
bounceRate?: number;
|
|
8943
|
-
/**
|
|
8944
|
-
* Average session length in seconds, measured first event to last event. Single-event sessions count as 0. Only the flat aggregate computes it; null on breakdown and time-series rows.
|
|
8945
|
-
*/
|
|
8946
|
-
visitDuration?: number;
|
|
8947
|
-
/**
|
|
8948
|
-
* Average pageviews per session (pageviews divided by visits). Only the flat aggregate computes it; null on breakdown and time-series rows.
|
|
8949
|
-
*/
|
|
8950
|
-
viewsPerVisit?: number;
|
|
8951
|
-
/**
|
|
8952
|
-
* Average scroll depth across events, as a percentage. Only the flat aggregate computes it; null on breakdown and time-series rows.
|
|
8953
|
-
*/
|
|
8954
|
-
scrollDepth?: number;
|
|
8955
|
-
/**
|
|
8956
|
-
* Average engaged time per session in seconds, counting only foreground time. Sessions that reported no engagement are excluded. Only the flat aggregate computes it; null on breakdown and time-series rows.
|
|
8957
|
-
*/
|
|
8958
|
-
engagementTime?: number;
|
|
8959
|
-
};
|
|
8960
|
-
/**
|
|
8961
|
-
* AnalyticsMetricList
|
|
8962
|
-
*/
|
|
8963
|
-
export type AnalyticsMetricList = {
|
|
8964
|
-
/**
|
|
8965
|
-
* Total number of metric rows returned.
|
|
8966
|
-
*/
|
|
8967
|
-
total: number;
|
|
8968
|
-
/**
|
|
8969
|
-
* Metric rows: one per time bucket, one per dimension value, or a single row for the flat aggregate.
|
|
8970
|
-
*/
|
|
8971
|
-
metrics: AnalyticsMetric[];
|
|
8972
|
-
};
|
|
8973
|
-
/**
|
|
8974
|
-
* AnalyticsProperty
|
|
8975
|
-
*/
|
|
8976
|
-
export type AnalyticsProperty = {
|
|
8977
|
-
/**
|
|
8978
|
-
* Analytics property ID.
|
|
8979
|
-
*/
|
|
8980
|
-
$id: string;
|
|
8981
|
-
/**
|
|
8982
|
-
* Property creation date in ISO 8601 format.
|
|
8983
|
-
*/
|
|
8984
|
-
$createdAt: string;
|
|
8985
|
-
/**
|
|
8986
|
-
* Property update date in ISO 8601 format.
|
|
8987
|
-
*/
|
|
8988
|
-
$updatedAt: string;
|
|
8989
|
-
/**
|
|
8990
|
-
* Human-readable name of the tracked website or application.
|
|
8991
|
-
*/
|
|
8992
|
-
name: string;
|
|
8993
|
-
/**
|
|
8994
|
-
* Primary domain being tracked (e.g. example.com). May be empty for native apps.
|
|
8995
|
-
*/
|
|
8996
|
-
domain: string;
|
|
8997
|
-
/**
|
|
8998
|
-
* IANA timezone used to define the daily boundary for stats.
|
|
8999
|
-
*/
|
|
9000
|
-
timezone: string;
|
|
9001
|
-
/**
|
|
9002
|
-
* Whether tracking is currently active.
|
|
9003
|
-
*/
|
|
9004
|
-
enabled: boolean;
|
|
9005
|
-
/**
|
|
9006
|
-
* Whether stats for this property are publicly viewable.
|
|
9007
|
-
*/
|
|
9008
|
-
public: boolean;
|
|
9009
|
-
/**
|
|
9010
|
-
* List of origins allowed to send tracking events. Use ["*"] to allow all.
|
|
9011
|
-
*/
|
|
9012
|
-
allowedOrigins: string[];
|
|
9013
|
-
/**
|
|
9014
|
-
* Unique identifier for the tracking script snippet.
|
|
9015
|
-
*/
|
|
9016
|
-
snippetId: string;
|
|
9017
|
-
};
|
|
9018
8915
|
/**
|
|
9019
8916
|
* Team
|
|
9020
8917
|
*/
|
|
@@ -9165,17 +9062,17 @@ export declare namespace Models {
|
|
|
9165
9062
|
*/
|
|
9166
9063
|
policyId: string;
|
|
9167
9064
|
/**
|
|
9168
|
-
* Archive size in bytes.
|
|
9065
|
+
* Archive size in bytes.
|
|
9169
9066
|
*/
|
|
9170
|
-
size
|
|
9067
|
+
size: number;
|
|
9171
9068
|
/**
|
|
9172
9069
|
* The status of the archive creation. Possible values: pending, processing, uploading, completed, failed, skipped.
|
|
9173
9070
|
*/
|
|
9174
9071
|
status: string;
|
|
9175
9072
|
/**
|
|
9176
|
-
* The backup start time.
|
|
9073
|
+
* The backup start time.
|
|
9177
9074
|
*/
|
|
9178
|
-
startedAt
|
|
9075
|
+
startedAt: string;
|
|
9179
9076
|
/**
|
|
9180
9077
|
* Migration ID.
|
|
9181
9078
|
*/
|
|
@@ -9547,9 +9444,9 @@ export declare namespace Models {
|
|
|
9547
9444
|
*/
|
|
9548
9445
|
alertLimit: number;
|
|
9549
9446
|
/**
|
|
9550
|
-
* Additional resources
|
|
9447
|
+
* Additional resources
|
|
9551
9448
|
*/
|
|
9552
|
-
usage
|
|
9449
|
+
usage: UsageBillingPlan;
|
|
9553
9450
|
/**
|
|
9554
9451
|
* Addons
|
|
9555
9452
|
*/
|
|
@@ -9654,6 +9551,10 @@ export declare namespace Models {
|
|
|
9654
9551
|
* Maximum function and site deployment size in MB
|
|
9655
9552
|
*/
|
|
9656
9553
|
buildSize: number;
|
|
9554
|
+
/**
|
|
9555
|
+
* Shortest function schedule interval allowed, in minutes. 0 allows every interval.
|
|
9556
|
+
*/
|
|
9557
|
+
functionsIntervalMinimum: number;
|
|
9657
9558
|
/**
|
|
9658
9559
|
* Does the plan support encrypted string attributes or not.
|
|
9659
9560
|
*/
|
|
@@ -10502,9 +10403,9 @@ export declare namespace Models {
|
|
|
10502
10403
|
*/
|
|
10503
10404
|
uptime: number;
|
|
10504
10405
|
/**
|
|
10505
|
-
* Connection statistics.
|
|
10406
|
+
* Connection statistics.
|
|
10506
10407
|
*/
|
|
10507
|
-
connections
|
|
10408
|
+
connections: DatabaseStatusConnections;
|
|
10508
10409
|
/**
|
|
10509
10410
|
* Requested replication sync mode. Possible values: async, sync, quorum. Compare with effectiveSyncMode for what the primary is enforcing.
|
|
10510
10411
|
*/
|
|
@@ -11903,9 +11804,9 @@ export declare namespace Models {
|
|
|
11903
11804
|
*/
|
|
11904
11805
|
status: string;
|
|
11905
11806
|
/**
|
|
11906
|
-
* The
|
|
11807
|
+
* The backup start time.
|
|
11907
11808
|
*/
|
|
11908
|
-
startedAt
|
|
11809
|
+
startedAt: string;
|
|
11909
11810
|
/**
|
|
11910
11811
|
* Migration ID.
|
|
11911
11812
|
*/
|
|
@@ -11919,9 +11820,9 @@ export declare namespace Models {
|
|
|
11919
11820
|
*/
|
|
11920
11821
|
resources: string[];
|
|
11921
11822
|
/**
|
|
11922
|
-
*
|
|
11823
|
+
* Optional data in key-value object.
|
|
11923
11824
|
*/
|
|
11924
|
-
options:
|
|
11825
|
+
options: string;
|
|
11925
11826
|
};
|
|
11926
11827
|
/**
|
|
11927
11828
|
* Dedicated database restorations list
|
|
@@ -12232,10 +12133,6 @@ export declare namespace Models {
|
|
|
12232
12133
|
* Aggregated stats for total backups storage.
|
|
12233
12134
|
*/
|
|
12234
12135
|
backupsStorageTotal: number;
|
|
12235
|
-
/**
|
|
12236
|
-
* Aggregated stats for total custom user photos storage.
|
|
12237
|
-
*/
|
|
12238
|
-
avatarsStorageTotal: number;
|
|
12239
12136
|
/**
|
|
12240
12137
|
* Aggregated stats for total storage.
|
|
12241
12138
|
*/
|
|
@@ -13477,19 +13374,6 @@ export declare namespace Models {
|
|
|
13477
13374
|
*/
|
|
13478
13375
|
addons: Addon[];
|
|
13479
13376
|
};
|
|
13480
|
-
/**
|
|
13481
|
-
* Analytics properties list
|
|
13482
|
-
*/
|
|
13483
|
-
export type AnalyticsPropertyList = {
|
|
13484
|
-
/**
|
|
13485
|
-
* Total number of properties that matched your query.
|
|
13486
|
-
*/
|
|
13487
|
-
total: number;
|
|
13488
|
-
/**
|
|
13489
|
-
* List of properties.
|
|
13490
|
-
*/
|
|
13491
|
-
properties: AnalyticsProperty[];
|
|
13492
|
-
};
|
|
13493
13377
|
/**
|
|
13494
13378
|
* Aggregation team list
|
|
13495
13379
|
*/
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Client } from './client';
|
|
2
|
+
import type { Payload } from './client';
|
|
3
|
+
export declare class Service {
|
|
4
|
+
/**
|
|
5
|
+
* The size for chunked uploads in bytes.
|
|
6
|
+
*/
|
|
7
|
+
static CHUNK_SIZE: number;
|
|
8
|
+
client: Client;
|
|
9
|
+
constructor(client: Client);
|
|
10
|
+
static flatten(data: Payload, prefix?: string): Payload;
|
|
11
|
+
}
|
|
@@ -43,7 +43,7 @@ export declare class Functions {
|
|
|
43
43
|
* @param {Runtime} params.runtime - Execution runtime.
|
|
44
44
|
* @param {string[]} params.execute - An array of role strings with execution permissions. By default no user is granted with any execute permissions. [learn more about roles](https://appwrite.io/docs/permissions#permission-roles). Maximum of 100 roles are allowed, each 64 characters long.
|
|
45
45
|
* @param {string[]} params.events - Events list. Maximum of 100 events are allowed.
|
|
46
|
-
* @param {string} params.schedule - Schedule CRON syntax.
|
|
46
|
+
* @param {string} params.schedule - Schedule CRON syntax. Cannot be combined with interval.
|
|
47
47
|
* @param {number} params.timeout - Function maximum execution time in seconds.
|
|
48
48
|
* @param {boolean} params.enabled - Is function enabled? When set to 'disabled', users cannot access the function but Server SDKs with and API key can still access the function. No data is lost when this is toggled.
|
|
49
49
|
* @param {boolean} params.logging - When disabled, executions will exclude logs and errors, and will be slightly faster.
|
|
@@ -60,6 +60,7 @@ export declare class Functions {
|
|
|
60
60
|
* @param {string} params.buildSpecification - Build specification for the function deployments.
|
|
61
61
|
* @param {string} params.runtimeSpecification - Runtime specification for the function executions.
|
|
62
62
|
* @param {number} params.deploymentRetention - Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.
|
|
63
|
+
* @param {number} params.interval - Minutes between scheduled executions. Appwrite picks when within each interval the function runs. Use 0 to disable. Cannot be combined with schedule.
|
|
63
64
|
* @throws {AppwriteException}
|
|
64
65
|
* @returns {Promise<Models.Function>}
|
|
65
66
|
*/
|
|
@@ -86,6 +87,7 @@ export declare class Functions {
|
|
|
86
87
|
buildSpecification?: string;
|
|
87
88
|
runtimeSpecification?: string;
|
|
88
89
|
deploymentRetention?: number;
|
|
90
|
+
interval?: number;
|
|
89
91
|
}): Promise<Models.Function>;
|
|
90
92
|
/**
|
|
91
93
|
* 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.
|
|
@@ -95,7 +97,7 @@ export declare class Functions {
|
|
|
95
97
|
* @param {Runtime} runtime - Execution runtime.
|
|
96
98
|
* @param {string[]} execute - An array of role strings with execution permissions. By default no user is granted with any execute permissions. [learn more about roles](https://appwrite.io/docs/permissions#permission-roles). Maximum of 100 roles are allowed, each 64 characters long.
|
|
97
99
|
* @param {string[]} events - Events list. Maximum of 100 events are allowed.
|
|
98
|
-
* @param {string} schedule - Schedule CRON syntax.
|
|
100
|
+
* @param {string} schedule - Schedule CRON syntax. Cannot be combined with interval.
|
|
99
101
|
* @param {number} timeout - Function maximum execution time in seconds.
|
|
100
102
|
* @param {boolean} enabled - Is function enabled? When set to 'disabled', users cannot access the function but Server SDKs with and API key can still access the function. No data is lost when this is toggled.
|
|
101
103
|
* @param {boolean} logging - When disabled, executions will exclude logs and errors, and will be slightly faster.
|
|
@@ -112,11 +114,12 @@ export declare class Functions {
|
|
|
112
114
|
* @param {string} buildSpecification - Build specification for the function deployments.
|
|
113
115
|
* @param {string} runtimeSpecification - Runtime specification for the function executions.
|
|
114
116
|
* @param {number} deploymentRetention - Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.
|
|
117
|
+
* @param {number} interval - Minutes between scheduled executions. Appwrite picks when within each interval the function runs. Use 0 to disable. Cannot be combined with schedule.
|
|
115
118
|
* @throws {AppwriteException}
|
|
116
119
|
* @returns {Promise<Models.Function>}
|
|
117
120
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
118
121
|
*/
|
|
119
|
-
create(functionId: string, name: string, runtime: Runtime, execute?: string[], events?: string[], schedule?: string, timeout?: number, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, scopes?: ProjectKeyScopes[], installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, providerBranches?: string[], providerPaths?: string[], buildSpecification?: string, runtimeSpecification?: string, deploymentRetention?: number): Promise<Models.Function>;
|
|
122
|
+
create(functionId: string, name: string, runtime: Runtime, execute?: string[], events?: string[], schedule?: string, timeout?: number, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, scopes?: ProjectKeyScopes[], installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, providerBranches?: string[], providerPaths?: string[], buildSpecification?: string, runtimeSpecification?: string, deploymentRetention?: number, interval?: number): Promise<Models.Function>;
|
|
120
123
|
/**
|
|
121
124
|
* Get a list of all runtimes that are currently active on your instance.
|
|
122
125
|
*
|
|
@@ -235,7 +238,7 @@ export declare class Functions {
|
|
|
235
238
|
* @param {Runtime} params.runtime - Execution runtime.
|
|
236
239
|
* @param {string[]} params.execute - An array of role strings with execution permissions. By default no user is granted with any execute permissions. [learn more about roles](https://appwrite.io/docs/permissions#permission-roles). Maximum of 100 roles are allowed, each 64 characters long.
|
|
237
240
|
* @param {string[]} params.events - Events list. Maximum of 100 events are allowed.
|
|
238
|
-
* @param {string} params.schedule - Schedule CRON syntax.
|
|
241
|
+
* @param {string} params.schedule - Schedule CRON syntax. Cannot be combined with interval.
|
|
239
242
|
* @param {number} params.timeout - Maximum execution time in seconds.
|
|
240
243
|
* @param {boolean} params.enabled - Is function enabled? When set to 'disabled', users cannot access the function but Server SDKs with and API key can still access the function. No data is lost when this is toggled.
|
|
241
244
|
* @param {boolean} params.logging - When disabled, executions will exclude logs and errors, and will be slightly faster.
|
|
@@ -252,6 +255,7 @@ export declare class Functions {
|
|
|
252
255
|
* @param {string} params.buildSpecification - Build specification for the function deployments.
|
|
253
256
|
* @param {string} params.runtimeSpecification - Runtime specification for the function executions.
|
|
254
257
|
* @param {number} params.deploymentRetention - Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.
|
|
258
|
+
* @param {number} params.interval - Minutes between scheduled executions. Appwrite picks when within each interval the function runs. Use 0 to disable. Cannot be combined with schedule. When omitted, the current interval is kept unless schedule is set.
|
|
255
259
|
* @throws {AppwriteException}
|
|
256
260
|
* @returns {Promise<Models.Function>}
|
|
257
261
|
*/
|
|
@@ -278,6 +282,7 @@ export declare class Functions {
|
|
|
278
282
|
buildSpecification?: string;
|
|
279
283
|
runtimeSpecification?: string;
|
|
280
284
|
deploymentRetention?: number;
|
|
285
|
+
interval?: number;
|
|
281
286
|
}): Promise<Models.Function>;
|
|
282
287
|
/**
|
|
283
288
|
* Update function by its unique ID.
|
|
@@ -287,7 +292,7 @@ export declare class Functions {
|
|
|
287
292
|
* @param {Runtime} runtime - Execution runtime.
|
|
288
293
|
* @param {string[]} execute - An array of role strings with execution permissions. By default no user is granted with any execute permissions. [learn more about roles](https://appwrite.io/docs/permissions#permission-roles). Maximum of 100 roles are allowed, each 64 characters long.
|
|
289
294
|
* @param {string[]} events - Events list. Maximum of 100 events are allowed.
|
|
290
|
-
* @param {string} schedule - Schedule CRON syntax.
|
|
295
|
+
* @param {string} schedule - Schedule CRON syntax. Cannot be combined with interval.
|
|
291
296
|
* @param {number} timeout - Maximum execution time in seconds.
|
|
292
297
|
* @param {boolean} enabled - Is function enabled? When set to 'disabled', users cannot access the function but Server SDKs with and API key can still access the function. No data is lost when this is toggled.
|
|
293
298
|
* @param {boolean} logging - When disabled, executions will exclude logs and errors, and will be slightly faster.
|
|
@@ -304,11 +309,12 @@ export declare class Functions {
|
|
|
304
309
|
* @param {string} buildSpecification - Build specification for the function deployments.
|
|
305
310
|
* @param {string} runtimeSpecification - Runtime specification for the function executions.
|
|
306
311
|
* @param {number} deploymentRetention - Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.
|
|
312
|
+
* @param {number} interval - Minutes between scheduled executions. Appwrite picks when within each interval the function runs. Use 0 to disable. Cannot be combined with schedule. When omitted, the current interval is kept unless schedule is set.
|
|
307
313
|
* @throws {AppwriteException}
|
|
308
314
|
* @returns {Promise<Models.Function>}
|
|
309
315
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
310
316
|
*/
|
|
311
|
-
update(functionId: string, name: string, runtime?: Runtime, execute?: string[], events?: string[], schedule?: string, timeout?: number, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, scopes?: ProjectKeyScopes[], installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, providerBranches?: string[], providerPaths?: string[], buildSpecification?: string, runtimeSpecification?: string, deploymentRetention?: number): Promise<Models.Function>;
|
|
317
|
+
update(functionId: string, name: string, runtime?: Runtime, execute?: string[], events?: string[], schedule?: string, timeout?: number, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, scopes?: ProjectKeyScopes[], installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, providerBranches?: string[], providerPaths?: string[], buildSpecification?: string, runtimeSpecification?: string, deploymentRetention?: number, interval?: number): Promise<Models.Function>;
|
|
312
318
|
/**
|
|
313
319
|
* Delete a function by its unique ID.
|
|
314
320
|
*
|
|
@@ -195,9 +195,10 @@ export declare class Projects {
|
|
|
195
195
|
* @param {string} params.projectId - Project unique ID.
|
|
196
196
|
* @param {ScheduleResourceType} params.resourceType - The resource type for the schedule. Possible values: function, execution, message, backup.
|
|
197
197
|
* @param {string} params.resourceId - The resource ID to associate with this schedule.
|
|
198
|
-
* @param {string} params.schedule - Schedule CRON expression.
|
|
198
|
+
* @param {string} params.schedule - Schedule CRON expression. Cannot be combined with interval.
|
|
199
199
|
* @param {boolean} params.active - Whether the schedule is active.
|
|
200
200
|
* @param {object} params.data - Schedule data as a JSON string. Used to store resource-specific context needed for execution.
|
|
201
|
+
* @param {number} params.interval - Minutes between runs, for function schedules only. Use 0 to disable. Cannot be combined with schedule.
|
|
201
202
|
* @throws {AppwriteException}
|
|
202
203
|
* @returns {Promise<Models.Schedule>}
|
|
203
204
|
*/
|
|
@@ -205,9 +206,10 @@ export declare class Projects {
|
|
|
205
206
|
projectId: string;
|
|
206
207
|
resourceType: ScheduleResourceType;
|
|
207
208
|
resourceId: string;
|
|
208
|
-
schedule
|
|
209
|
+
schedule?: string;
|
|
209
210
|
active?: boolean;
|
|
210
211
|
data?: object;
|
|
212
|
+
interval?: number;
|
|
211
213
|
}): Promise<Models.Schedule>;
|
|
212
214
|
/**
|
|
213
215
|
* Create a new schedule for a resource.
|
|
@@ -215,14 +217,15 @@ export declare class Projects {
|
|
|
215
217
|
* @param {string} projectId - Project unique ID.
|
|
216
218
|
* @param {ScheduleResourceType} resourceType - The resource type for the schedule. Possible values: function, execution, message, backup.
|
|
217
219
|
* @param {string} resourceId - The resource ID to associate with this schedule.
|
|
218
|
-
* @param {string} schedule - Schedule CRON expression.
|
|
220
|
+
* @param {string} schedule - Schedule CRON expression. Cannot be combined with interval.
|
|
219
221
|
* @param {boolean} active - Whether the schedule is active.
|
|
220
222
|
* @param {object} data - Schedule data as a JSON string. Used to store resource-specific context needed for execution.
|
|
223
|
+
* @param {number} interval - Minutes between runs, for function schedules only. Use 0 to disable. Cannot be combined with schedule.
|
|
221
224
|
* @throws {AppwriteException}
|
|
222
225
|
* @returns {Promise<Models.Schedule>}
|
|
223
226
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
224
227
|
*/
|
|
225
|
-
createSchedule(projectId: string, resourceType: ScheduleResourceType, resourceId: string, schedule
|
|
228
|
+
createSchedule(projectId: string, resourceType: ScheduleResourceType, resourceId: string, schedule?: string, active?: boolean, data?: object, interval?: number): Promise<Models.Schedule>;
|
|
226
229
|
/**
|
|
227
230
|
* Get a schedule by its unique ID.
|
|
228
231
|
*
|
package/types/services/push.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Client } from '../client';
|
|
2
|
+
import { Service } from '../service';
|
|
2
3
|
import type { ResolvedTopic, Topic } from '../topic';
|
|
3
4
|
/** A message delivered on a subscribed topic (the MQTT analog of a Realtime event). */
|
|
4
5
|
export interface PushMessage {
|
|
@@ -57,8 +58,7 @@ export interface PushSubscription {
|
|
|
57
58
|
* );
|
|
58
59
|
* // sub.update({ background: true }); sub.unsubscribe();
|
|
59
60
|
*/
|
|
60
|
-
export declare class Push {
|
|
61
|
-
client: Client;
|
|
61
|
+
export declare class Push extends Service {
|
|
62
62
|
private mqtt;
|
|
63
63
|
private connecting;
|
|
64
64
|
private Buffer;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
export declare enum AnalyticsDimension {
|
|
2
|
-
Country = "country",
|
|
3
|
-
Region = "region",
|
|
4
|
-
City = "city",
|
|
5
|
-
Browser = "browser",
|
|
6
|
-
OperatingSystem = "operatingSystem",
|
|
7
|
-
Device = "device",
|
|
8
|
-
ScreenSize = "screenSize",
|
|
9
|
-
ReferrerSource = "referrerSource",
|
|
10
|
-
Channel = "channel",
|
|
11
|
-
UtmSource = "utmSource",
|
|
12
|
-
UtmMedium = "utmMedium",
|
|
13
|
-
UtmCampaign = "utmCampaign",
|
|
14
|
-
UtmContent = "utmContent",
|
|
15
|
-
UtmTerm = "utmTerm",
|
|
16
|
-
Page = "page",
|
|
17
|
-
Hostname = "hostname",
|
|
18
|
-
EntryPage = "entryPage",
|
|
19
|
-
ExitPage = "exitPage",
|
|
20
|
-
TrafficType = "trafficType",
|
|
21
|
-
BotName = "botName",
|
|
22
|
-
BotCategory = "botCategory",
|
|
23
|
-
EventName = "eventName"
|
|
24
|
-
}
|