@appwrite.io/console 18.4.0-rc.1 → 18.4.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 +473 -2809
- package/dist/cjs/sdk.js.map +1 -1
- package/dist/esm/sdk.js +474 -2806
- package/dist/esm/sdk.js.map +1 -1
- package/dist/iife/sdk.js +473 -2809
- package/package.json +1 -1
- package/types/enums/project-auth-method-id.d.ts +1 -2
- package/types/enums/project-key-scopes.d.ts +1 -5
- package/types/enums/project-policy-id.d.ts +1 -2
- package/types/enums/proxy-rule-deployment-resource-type.d.ts +1 -2
- package/types/enums/query-suggestion-resource.d.ts +0 -8
- 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 -11
- package/types/models.d.ts +85 -529
- package/types/service.d.ts +11 -0
- package/types/services/account.d.ts +9 -12
- package/types/services/project.d.ts +15 -18
- package/types/services/push.d.ts +2 -2
- package/types/services/users.d.ts +27 -2
- package/types/enums/analytics-dimension.d.ts +0 -24
- package/types/enums/analytics-interval.d.ts +0 -6
- package/types/enums/platform-resource-type.d.ts +0 -11
- package/types/enums/project-resource-type.d.ts +0 -13
- package/types/enums/video-output.d.ts +0 -5
- package/types/enums/video-rendition-status.d.ts +0 -9
- package/types/services/admin.d.ts +0 -80
- package/types/services/analytics-tracking.d.ts +0 -211
- package/types/services/analytics.d.ts +0 -254
- package/types/services/videos.d.ts +0 -860
|
@@ -1,254 +0,0 @@
|
|
|
1
|
-
import { Client } from '../client';
|
|
2
|
-
import type { Models } from '../models';
|
|
3
|
-
import { AnalyticsInterval } from '../enums/analytics-interval';
|
|
4
|
-
import { AnalyticsDimension } from '../enums/analytics-dimension';
|
|
5
|
-
export declare class Analytics {
|
|
6
|
-
client: Client;
|
|
7
|
-
constructor(client: Client);
|
|
8
|
-
/**
|
|
9
|
-
* List analytics properties for the current project.
|
|
10
|
-
*
|
|
11
|
-
* @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/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, domain, timezone, enabled, public, snippetId
|
|
12
|
-
* @param {string} params.search - Search term to filter your list results. Matches the property ID, name and domain. Max length: 256 chars.
|
|
13
|
-
* @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
14
|
-
* @throws {AppwriteException}
|
|
15
|
-
* @returns {Promise<Models.AnalyticsPropertyList>}
|
|
16
|
-
*/
|
|
17
|
-
listProperties(params?: {
|
|
18
|
-
queries?: string[];
|
|
19
|
-
search?: string;
|
|
20
|
-
total?: boolean;
|
|
21
|
-
}): Promise<Models.AnalyticsPropertyList>;
|
|
22
|
-
/**
|
|
23
|
-
* List analytics properties for the current project.
|
|
24
|
-
*
|
|
25
|
-
* @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, domain, timezone, enabled, public, snippetId
|
|
26
|
-
* @param {string} search - Search term to filter your list results. Matches the property ID, name and domain. Max length: 256 chars.
|
|
27
|
-
* @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
28
|
-
* @throws {AppwriteException}
|
|
29
|
-
* @returns {Promise<Models.AnalyticsPropertyList>}
|
|
30
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
31
|
-
*/
|
|
32
|
-
listProperties(queries?: string[], search?: string, total?: boolean): Promise<Models.AnalyticsPropertyList>;
|
|
33
|
-
/**
|
|
34
|
-
* Create a new analytics property to track a website or application.
|
|
35
|
-
*
|
|
36
|
-
* @param {string} params.propertyId - Unique ID. Choose a custom ID or generate a random ID with `ID.unique()`. Max length is 36 chars.
|
|
37
|
-
* @param {string} params.name - Human-readable name for this property.
|
|
38
|
-
* @param {string} params.domain - Primary domain to track (e.g. example.com). Optional for native apps.
|
|
39
|
-
* @param {string} params.timezone - IANA timezone used for daily boundaries.
|
|
40
|
-
* @param {boolean} params.enabled - Whether tracking is enabled.
|
|
41
|
-
* @param {boolean} params.xpublic - Whether stats are publicly viewable.
|
|
42
|
-
* @param {string[]} params.allowedOrigins - Allowed origins for tracking. Use ["*"] to allow all.
|
|
43
|
-
* @throws {AppwriteException}
|
|
44
|
-
* @returns {Promise<Models.AnalyticsProperty>}
|
|
45
|
-
*/
|
|
46
|
-
createProperty(params: {
|
|
47
|
-
propertyId: string;
|
|
48
|
-
name: string;
|
|
49
|
-
domain?: string;
|
|
50
|
-
timezone?: string;
|
|
51
|
-
enabled?: boolean;
|
|
52
|
-
xpublic?: boolean;
|
|
53
|
-
allowedOrigins?: string[];
|
|
54
|
-
}): Promise<Models.AnalyticsProperty>;
|
|
55
|
-
/**
|
|
56
|
-
* Create a new analytics property to track a website or application.
|
|
57
|
-
*
|
|
58
|
-
* @param {string} propertyId - Unique ID. Choose a custom ID or generate a random ID with `ID.unique()`. Max length is 36 chars.
|
|
59
|
-
* @param {string} name - Human-readable name for this property.
|
|
60
|
-
* @param {string} domain - Primary domain to track (e.g. example.com). Optional for native apps.
|
|
61
|
-
* @param {string} timezone - IANA timezone used for daily boundaries.
|
|
62
|
-
* @param {boolean} enabled - Whether tracking is enabled.
|
|
63
|
-
* @param {boolean} xpublic - Whether stats are publicly viewable.
|
|
64
|
-
* @param {string[]} allowedOrigins - Allowed origins for tracking. Use ["*"] to allow all.
|
|
65
|
-
* @throws {AppwriteException}
|
|
66
|
-
* @returns {Promise<Models.AnalyticsProperty>}
|
|
67
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
68
|
-
*/
|
|
69
|
-
createProperty(propertyId: string, name: string, domain?: string, timezone?: string, enabled?: boolean, xpublic?: boolean, allowedOrigins?: string[]): Promise<Models.AnalyticsProperty>;
|
|
70
|
-
/**
|
|
71
|
-
* Get an analytics property by ID.
|
|
72
|
-
*
|
|
73
|
-
* @param {string} params.propertyId - Analytics property unique ID.
|
|
74
|
-
* @throws {AppwriteException}
|
|
75
|
-
* @returns {Promise<Models.AnalyticsProperty>}
|
|
76
|
-
*/
|
|
77
|
-
getProperty(params: {
|
|
78
|
-
propertyId: string;
|
|
79
|
-
}): Promise<Models.AnalyticsProperty>;
|
|
80
|
-
/**
|
|
81
|
-
* Get an analytics property by ID.
|
|
82
|
-
*
|
|
83
|
-
* @param {string} propertyId - Analytics property unique ID.
|
|
84
|
-
* @throws {AppwriteException}
|
|
85
|
-
* @returns {Promise<Models.AnalyticsProperty>}
|
|
86
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
87
|
-
*/
|
|
88
|
-
getProperty(propertyId: string): Promise<Models.AnalyticsProperty>;
|
|
89
|
-
/**
|
|
90
|
-
* Update an analytics property. Only the attributes you pass are changed; omitted attributes keep their current value.
|
|
91
|
-
*
|
|
92
|
-
* @param {string} params.propertyId - Analytics property unique ID.
|
|
93
|
-
* @param {string} params.name - Human-readable name for this property.
|
|
94
|
-
* @param {string} params.domain - Primary domain to track (e.g. example.com). Pass an empty string to clear it.
|
|
95
|
-
* @param {string} params.timezone - IANA timezone used for daily boundaries.
|
|
96
|
-
* @param {boolean} params.enabled - Whether tracking is enabled.
|
|
97
|
-
* @param {boolean} params.xpublic - Whether stats are publicly viewable.
|
|
98
|
-
* @param {string[]} params.allowedOrigins - Allowed origins for tracking. Use ["*"] to allow all.
|
|
99
|
-
* @throws {AppwriteException}
|
|
100
|
-
* @returns {Promise<Models.AnalyticsProperty>}
|
|
101
|
-
*/
|
|
102
|
-
updateProperty(params: {
|
|
103
|
-
propertyId: string;
|
|
104
|
-
name?: string;
|
|
105
|
-
domain?: string;
|
|
106
|
-
timezone?: string;
|
|
107
|
-
enabled?: boolean;
|
|
108
|
-
xpublic?: boolean;
|
|
109
|
-
allowedOrigins?: string[];
|
|
110
|
-
}): Promise<Models.AnalyticsProperty>;
|
|
111
|
-
/**
|
|
112
|
-
* Update an analytics property. Only the attributes you pass are changed; omitted attributes keep their current value.
|
|
113
|
-
*
|
|
114
|
-
* @param {string} propertyId - Analytics property unique ID.
|
|
115
|
-
* @param {string} name - Human-readable name for this property.
|
|
116
|
-
* @param {string} domain - Primary domain to track (e.g. example.com). Pass an empty string to clear it.
|
|
117
|
-
* @param {string} timezone - IANA timezone used for daily boundaries.
|
|
118
|
-
* @param {boolean} enabled - Whether tracking is enabled.
|
|
119
|
-
* @param {boolean} xpublic - Whether stats are publicly viewable.
|
|
120
|
-
* @param {string[]} allowedOrigins - Allowed origins for tracking. Use ["*"] to allow all.
|
|
121
|
-
* @throws {AppwriteException}
|
|
122
|
-
* @returns {Promise<Models.AnalyticsProperty>}
|
|
123
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
124
|
-
*/
|
|
125
|
-
updateProperty(propertyId: string, name?: string, domain?: string, timezone?: string, enabled?: boolean, xpublic?: boolean, allowedOrigins?: string[]): Promise<Models.AnalyticsProperty>;
|
|
126
|
-
/**
|
|
127
|
-
* Delete an analytics property along with every event and session collected for it. This cannot be undone.
|
|
128
|
-
*
|
|
129
|
-
* @param {string} params.propertyId - Analytics property unique ID.
|
|
130
|
-
* @throws {AppwriteException}
|
|
131
|
-
* @returns {Promise<{}>}
|
|
132
|
-
*/
|
|
133
|
-
deleteProperty(params: {
|
|
134
|
-
propertyId: string;
|
|
135
|
-
}): Promise<{}>;
|
|
136
|
-
/**
|
|
137
|
-
* Delete an analytics property along with every event and session collected for it. This cannot be undone.
|
|
138
|
-
*
|
|
139
|
-
* @param {string} propertyId - Analytics property unique ID.
|
|
140
|
-
* @throws {AppwriteException}
|
|
141
|
-
* @returns {Promise<{}>}
|
|
142
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
143
|
-
*/
|
|
144
|
-
deleteProperty(propertyId: string): Promise<{}>;
|
|
145
|
-
/**
|
|
146
|
-
* Send a tracking event from a browser, native app, or server-side SDK.
|
|
147
|
-
*
|
|
148
|
-
* @param {string} params.propertyId - Analytics property ID or snippet ID identifying the property.
|
|
149
|
-
* @param {string} params.name - Event name. "pageview" is just a conventional event name; events are not modeled specially.
|
|
150
|
-
* @param {string} params.url - Full page URL or screen identifier.
|
|
151
|
-
* @param {string} params.domain - Hostname (e.g. example.com).
|
|
152
|
-
* @param {string} params.referrer - Referrer URL.
|
|
153
|
-
* @param {number} params.screenWidth - Viewport width in CSS pixels.
|
|
154
|
-
* @param {string} params.sessionHash - Optional session hash (provided by SDK).
|
|
155
|
-
* @param {number} params.scrollDepth - Scroll depth percentage 0-100.
|
|
156
|
-
* @param {number} params.engagementTime - Engagement time in seconds, 0-4294967295.
|
|
157
|
-
* @param {string[]} params.props - Custom string properties as a flat key=value list (max 32 entries, alternating key,value).
|
|
158
|
-
* @param {string} params.userId - Override user ID. Requires API-key auth with analytics.write scope.
|
|
159
|
-
* @param {string} params.ip - Override IP address. Requires API-key auth with analytics.write scope.
|
|
160
|
-
* @param {string} params.userAgent - Override user agent. Requires API-key auth with analytics.write scope.
|
|
161
|
-
* @throws {AppwriteException}
|
|
162
|
-
* @returns {Promise<{}>}
|
|
163
|
-
*/
|
|
164
|
-
createEvent(params: {
|
|
165
|
-
propertyId: string;
|
|
166
|
-
name: string;
|
|
167
|
-
url: string;
|
|
168
|
-
domain?: string;
|
|
169
|
-
referrer?: string;
|
|
170
|
-
screenWidth?: number;
|
|
171
|
-
sessionHash?: string;
|
|
172
|
-
scrollDepth?: number;
|
|
173
|
-
engagementTime?: number;
|
|
174
|
-
props?: string[];
|
|
175
|
-
userId?: string;
|
|
176
|
-
ip?: string;
|
|
177
|
-
userAgent?: string;
|
|
178
|
-
}): Promise<{}>;
|
|
179
|
-
/**
|
|
180
|
-
* Send a tracking event from a browser, native app, or server-side SDK.
|
|
181
|
-
*
|
|
182
|
-
* @param {string} propertyId - Analytics property ID or snippet ID identifying the property.
|
|
183
|
-
* @param {string} name - Event name. "pageview" is just a conventional event name; events are not modeled specially.
|
|
184
|
-
* @param {string} url - Full page URL or screen identifier.
|
|
185
|
-
* @param {string} domain - Hostname (e.g. example.com).
|
|
186
|
-
* @param {string} referrer - Referrer URL.
|
|
187
|
-
* @param {number} screenWidth - Viewport width in CSS pixels.
|
|
188
|
-
* @param {string} sessionHash - Optional session hash (provided by SDK).
|
|
189
|
-
* @param {number} scrollDepth - Scroll depth percentage 0-100.
|
|
190
|
-
* @param {number} engagementTime - Engagement time in seconds, 0-4294967295.
|
|
191
|
-
* @param {string[]} props - Custom string properties as a flat key=value list (max 32 entries, alternating key,value).
|
|
192
|
-
* @param {string} userId - Override user ID. Requires API-key auth with analytics.write scope.
|
|
193
|
-
* @param {string} ip - Override IP address. Requires API-key auth with analytics.write scope.
|
|
194
|
-
* @param {string} userAgent - Override user agent. Requires API-key auth with analytics.write scope.
|
|
195
|
-
* @throws {AppwriteException}
|
|
196
|
-
* @returns {Promise<{}>}
|
|
197
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
198
|
-
*/
|
|
199
|
-
createEvent(propertyId: string, name: string, url: string, domain?: string, referrer?: string, screenWidth?: number, sessionHash?: string, scrollDepth?: number, engagementTime?: number, props?: string[], userId?: string, ip?: string, userAgent?: string): Promise<{}>;
|
|
200
|
-
/**
|
|
201
|
-
* Read analytics metrics (visitors, sessions, pageviews, events, bounceRate, …) for a property over a date range.
|
|
202
|
-
*
|
|
203
|
-
* **Three response shapes**, chosen by `dimensions[]` and `interval`:
|
|
204
|
-
* - Neither: one row aggregating the whole window, with `value` and `date` null. Only this shape carries `pageviews`, `visits`, `bounceRate`, `visitDuration`, `viewsPerVisit`, `scrollDepth` and `engagementTime`.
|
|
205
|
-
* - `dimensions[]`: one row per dimension value, ranked by visitors, with `value` set and `date` null.
|
|
206
|
-
* - `interval`: one row per time bucket in chronological order, with `date` set and `value` null.
|
|
207
|
-
*
|
|
208
|
-
* Combining `dimensions[]` with `interval` is not supported yet. `queries[]` filters the underlying events using standard Utopia query syntax.
|
|
209
|
-
*
|
|
210
|
-
* @param {string} params.propertyId - Analytics property unique ID.
|
|
211
|
-
* @param {string[]} params.queries - Up to 10 filter queries in Utopia syntax. Allowed attributes: country, region, city, browser, operatingSystem, device, screenSize, referrerSource, channel, utmSource, utmMedium, utmCampaign, utmContent, utmTerm, page, hostname, botName, botCategory, eventName. page, eventName are only accepted alongside `interval`, or with a breakdown on a dimension other than entryPage, exitPage. Allowed methods: equal, notEqual, contains, startsWith, endsWith. Example: `queries[]=equal("country", ["US"])`.
|
|
212
|
-
* @param {AnalyticsInterval} params.interval - Time bucket size. Omit (null) for a flat aggregate over the whole window. Allowed: 1h, 1d, 1w, 1m.
|
|
213
|
-
* @param {AnalyticsDimension[]} params.dimensions - Dimension to break the metrics down by. One at most for now; the parameter is a list so that cap can be raised without a breaking change. Allowed: country, region, city, browser, operatingSystem, device, screenSize, referrerSource, channel, utmSource, utmMedium, utmCampaign, utmContent, utmTerm, page, hostname, entryPage, exitPage, trafficType, botName, botCategory, eventName.
|
|
214
|
-
* @param {string} params.dateRange - Date range shorthand (e.g. 7d, 30d). Ignored for any bound you supply explicitly via startAt/endAt.
|
|
215
|
-
* @param {string} params.startAt - Explicit window start in ISO 8601. Defaults to endAt minus dateRange.
|
|
216
|
-
* @param {string} params.endAt - Explicit window end in ISO 8601. Defaults to the current time.
|
|
217
|
-
* @param {number} params.limit - Maximum number of ranked values to return.
|
|
218
|
-
* @throws {AppwriteException}
|
|
219
|
-
* @returns {Promise<Models.AnalyticsMetricList>}
|
|
220
|
-
*/
|
|
221
|
-
listMetrics(params: {
|
|
222
|
-
propertyId: string;
|
|
223
|
-
queries?: string[];
|
|
224
|
-
interval?: AnalyticsInterval;
|
|
225
|
-
dimensions?: AnalyticsDimension[];
|
|
226
|
-
dateRange?: string;
|
|
227
|
-
startAt?: string;
|
|
228
|
-
endAt?: string;
|
|
229
|
-
limit?: number;
|
|
230
|
-
}): Promise<Models.AnalyticsMetricList>;
|
|
231
|
-
/**
|
|
232
|
-
* Read analytics metrics (visitors, sessions, pageviews, events, bounceRate, …) for a property over a date range.
|
|
233
|
-
*
|
|
234
|
-
* **Three response shapes**, chosen by `dimensions[]` and `interval`:
|
|
235
|
-
* - Neither: one row aggregating the whole window, with `value` and `date` null. Only this shape carries `pageviews`, `visits`, `bounceRate`, `visitDuration`, `viewsPerVisit`, `scrollDepth` and `engagementTime`.
|
|
236
|
-
* - `dimensions[]`: one row per dimension value, ranked by visitors, with `value` set and `date` null.
|
|
237
|
-
* - `interval`: one row per time bucket in chronological order, with `date` set and `value` null.
|
|
238
|
-
*
|
|
239
|
-
* Combining `dimensions[]` with `interval` is not supported yet. `queries[]` filters the underlying events using standard Utopia query syntax.
|
|
240
|
-
*
|
|
241
|
-
* @param {string} propertyId - Analytics property unique ID.
|
|
242
|
-
* @param {string[]} queries - Up to 10 filter queries in Utopia syntax. Allowed attributes: country, region, city, browser, operatingSystem, device, screenSize, referrerSource, channel, utmSource, utmMedium, utmCampaign, utmContent, utmTerm, page, hostname, botName, botCategory, eventName. page, eventName are only accepted alongside `interval`, or with a breakdown on a dimension other than entryPage, exitPage. Allowed methods: equal, notEqual, contains, startsWith, endsWith. Example: `queries[]=equal("country", ["US"])`.
|
|
243
|
-
* @param {AnalyticsInterval} interval - Time bucket size. Omit (null) for a flat aggregate over the whole window. Allowed: 1h, 1d, 1w, 1m.
|
|
244
|
-
* @param {AnalyticsDimension[]} dimensions - Dimension to break the metrics down by. One at most for now; the parameter is a list so that cap can be raised without a breaking change. Allowed: country, region, city, browser, operatingSystem, device, screenSize, referrerSource, channel, utmSource, utmMedium, utmCampaign, utmContent, utmTerm, page, hostname, entryPage, exitPage, trafficType, botName, botCategory, eventName.
|
|
245
|
-
* @param {string} dateRange - Date range shorthand (e.g. 7d, 30d). Ignored for any bound you supply explicitly via startAt/endAt.
|
|
246
|
-
* @param {string} startAt - Explicit window start in ISO 8601. Defaults to endAt minus dateRange.
|
|
247
|
-
* @param {string} endAt - Explicit window end in ISO 8601. Defaults to the current time.
|
|
248
|
-
* @param {number} limit - Maximum number of ranked values to return.
|
|
249
|
-
* @throws {AppwriteException}
|
|
250
|
-
* @returns {Promise<Models.AnalyticsMetricList>}
|
|
251
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
252
|
-
*/
|
|
253
|
-
listMetrics(propertyId: string, queries?: string[], interval?: AnalyticsInterval, dimensions?: AnalyticsDimension[], dateRange?: string, startAt?: string, endAt?: string, limit?: number): Promise<Models.AnalyticsMetricList>;
|
|
254
|
-
}
|