chore: update Dart SDK to 22.0.0

This commit is contained in:
root
2026-03-26 05:07:38 +00:00
parent 5ca631eb4c
commit 40d56c3519
374 changed files with 25260 additions and 25083 deletions
+1 -1
View File
@@ -4,7 +4,7 @@ import 'package:dart_appwrite/dart_appwrite.dart';
Client client = Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setSession(''); // The user session to authenticate with
.setKey('<YOUR_API_KEY>'); // Your secret API key
Databases databases = Databases(client);
+1 -1
View File
@@ -1 +1 @@
export 'src/client_browser.dart';
export 'src/client_browser.dart';
+1 -1
View File
@@ -1 +1 @@
export 'src/client_io.dart';
export 'src/client_io.dart';
+7 -4
View File
@@ -31,7 +31,7 @@ class Operator {
result['method'] = method;
if (values != null) {
if(values != null) {
result['values'] = values is List ? values : [values];
}
@@ -147,7 +147,8 @@ class Operator {
Operator._('arrayRemove', [value]).toString();
/// Remove duplicate values from an array attribute.
static String arrayUnique() => Operator._('arrayUnique', []).toString();
static String arrayUnique() =>
Operator._('arrayUnique', []).toString();
/// Keep only values that exist in both the current array and the provided array.
static String arrayIntersect(List<dynamic> values) =>
@@ -172,7 +173,8 @@ class Operator {
Operator._('stringReplace', [search, replace]).toString();
/// Toggle a boolean attribute.
static String toggle() => Operator._('toggle', []).toString();
static String toggle() =>
Operator._('toggle', []).toString();
/// Add days to a date attribute.
static String dateAddDays(int days) =>
@@ -183,5 +185,6 @@ class Operator {
Operator._('dateSubDays', [days]).toString();
/// Set a date attribute to the current date and time.
static String dateSetNow() => Operator._('dateSetNow', []).toString();
static String dateSetNow() =>
Operator._('dateSetNow', []).toString();
}
+40 -51
View File
@@ -10,14 +10,14 @@ class Query {
Map<String, dynamic> toJson() {
final result = <String, dynamic>{};
result['method'] = method;
if (attribute != null) {
if(attribute != null) {
result['attribute'] = attribute;
}
if (values != null) {
if(values != null) {
result['values'] = values is List ? values : [values];
}
@@ -28,7 +28,7 @@ class Query {
String toString() => jsonEncode(toJson());
/// Filter resources where [attribute] is equal to [value].
///
///
/// [value] can be a single value or a list. If a list is used
/// the query will return resources where [attribute] is equal
/// to any of the values in the list.
@@ -140,46 +140,50 @@ class Query {
Query._('notEndsWith', attribute, value).toString();
/// Filter resources where document was created before [value].
static String createdBefore(String value) => lessThan('\$createdAt', value);
static String createdBefore(String value) =>
lessThan('\$createdAt', value);
/// Filter resources where document was created after [value].
static String createdAfter(String value) => greaterThan('\$createdAt', value);
static String createdAfter(String value) =>
greaterThan('\$createdAt', value);
/// Filter resources where document was created between [start] and [end] (inclusive).
static String createdBetween(String start, String end) =>
between('\$createdAt', start, end);
/// Filter resources where document was updated before [value].
static String updatedBefore(String value) => lessThan('\$updatedAt', value);
static String updatedBefore(String value) =>
lessThan('\$updatedAt', value);
/// Filter resources where document was updated after [value].
static String updatedAfter(String value) => greaterThan('\$updatedAt', value);
static String updatedAfter(String value) =>
greaterThan('\$updatedAt', value);
/// Filter resources where document was updated between [start] and [end] (inclusive).
static String updatedBetween(String start, String end) =>
between('\$updatedAt', start, end);
static String or(List<String> queries) => Query._(
'or',
null,
queries.map((query) => jsonDecode(query)).toList(),
).toString();
'or',
null,
queries.map((query) => jsonDecode(query)).toList(),
).toString();
static String and(List<String> queries) => Query._(
'and',
null,
queries.map((query) => jsonDecode(query)).toList(),
).toString();
'and',
null,
queries.map((query) => jsonDecode(query)).toList(),
).toString();
/// Filter array elements where at least one element matches all the specified queries.
///
/// [attribute] The attribute containing the array to filter on.
/// [queries] The list of query strings to match against array elements.
static String elemMatch(String attribute, List<String> queries) => Query._(
'elemMatch',
attribute,
queries.map((query) => jsonDecode(query)).toList(),
).toString();
'elemMatch',
attribute,
queries.map((query) => jsonDecode(query)).toList(),
).toString();
/// Specify which attributes should be returned by the API call.
static String select(List<String> attributes) =>
@@ -194,17 +198,18 @@ class Query {
Query._('orderDesc', attribute).toString();
/// Sort results randomly.
static String orderRandom() => Query._('orderRandom').toString();
static String orderRandom() =>
Query._('orderRandom').toString();
/// Return results before [id].
///
///
/// Refer to the [Cursor Based Pagination](https://appwrite.io/docs/pagination#cursor-pagination)
/// docs for more information.
static String cursorBefore(String id) =>
Query._('cursorBefore', null, id).toString();
/// Return results after [id].
///
///
/// Refer to the [Cursor Based Pagination](https://appwrite.io/docs/pagination#cursor-pagination)
/// docs for more information.
static String cursorAfter(String id) =>
@@ -214,43 +219,27 @@ class Query {
static String limit(int limit) => Query._('limit', null, limit).toString();
/// Return results from [offset].
///
///
/// Refer to the [Offset Pagination](https://appwrite.io/docs/pagination#offset-pagination)
/// docs for more information.
static String offset(int offset) =>
Query._('offset', null, offset).toString();
/// Filter resources where [attribute] is at a specific distance from the given coordinates.
static String distanceEqual(
String attribute, List<dynamic> values, num distance,
[bool meters = true]) =>
Query._('distanceEqual', attribute, [
[values, distance, meters]
]).toString();
static String distanceEqual(String attribute, List<dynamic> values, num distance, [bool meters = true]) =>
Query._('distanceEqual', attribute, [[values, distance, meters]]).toString();
/// Filter resources where [attribute] is not at a specific distance from the given coordinates.
static String distanceNotEqual(
String attribute, List<dynamic> values, num distance,
[bool meters = true]) =>
Query._('distanceNotEqual', attribute, [
[values, distance, meters]
]).toString();
static String distanceNotEqual(String attribute, List<dynamic> values, num distance, [bool meters = true]) =>
Query._('distanceNotEqual', attribute, [[values, distance, meters]]).toString();
/// Filter resources where [attribute] is at a distance greater than the specified value from the given coordinates.
static String distanceGreaterThan(
String attribute, List<dynamic> values, num distance,
[bool meters = true]) =>
Query._('distanceGreaterThan', attribute, [
[values, distance, meters]
]).toString();
static String distanceGreaterThan(String attribute, List<dynamic> values, num distance, [bool meters = true]) =>
Query._('distanceGreaterThan', attribute, [[values, distance, meters]]).toString();
/// Filter resources where [attribute] is at a distance less than the specified value from the given coordinates.
static String distanceLessThan(
String attribute, List<dynamic> values, num distance,
[bool meters = true]) =>
Query._('distanceLessThan', attribute, [
[values, distance, meters]
]).toString();
static String distanceLessThan(String attribute, List<dynamic> values, num distance, [bool meters = true]) =>
Query._('distanceLessThan', attribute, [[values, distance, meters]]).toString();
/// Filter resources where [attribute] intersects with the given geometry.
static String intersects(String attribute, List<dynamic> values) =>
@@ -283,4 +272,4 @@ class Query {
/// Filter resources where [attribute] does not touch the given geometry.
static String notTouches(String attribute, List<dynamic> values) =>
Query._('notTouches', attribute, [values]).toString();
}
}
+1 -1
View File
@@ -63,4 +63,4 @@ class Role {
static String label(String name) {
return 'label:$name';
}
}
}
+561 -428
View File
File diff suppressed because it is too large Load Diff
+25 -17
View File
@@ -1,37 +1,45 @@
part of '../dart_appwrite.dart';
class Activities extends Service {
Activities(super.client);
Activities(super.client);
/// List all events for selected filters.
Future<models.ActivityEventList> listEvents({String? queries}) async {
final String apiPath = '/activities/events';
Future<models.ActivityEventList> listEvents({String? queries}) async {
final String apiPath = '/activities/events';
final Map<String, dynamic> apiParams = {
if (queries != null) 'queries': queries,
};
final Map<String, String> apiHeaders = {};
final Map<String, String> apiHeaders = {
};
final res = await client.call(HttpMethod.get,
path: apiPath, params: apiParams, headers: apiHeaders);
final res = await client.call(HttpMethod.get, path: apiPath, params: apiParams, headers: apiHeaders);
return models.ActivityEventList.fromMap(res.data);
}
}
/// Get event by ID.
///
Future<models.ActivityEvent> getEvent({required String eventId}) async {
final String apiPath =
'/activities/events/{eventId}'.replaceAll('{eventId}', eventId);
///
Future<models.ActivityEvent> getEvent({required String eventId}) async {
final String apiPath = '/activities/events/{eventId}'.replaceAll('{eventId}', eventId);
final Map<String, dynamic> apiParams = {};
final Map<String, dynamic> apiParams = {
};
final Map<String, String> apiHeaders = {};
final Map<String, String> apiHeaders = {
};
final res = await client.call(HttpMethod.get,
path: apiPath, params: apiParams, headers: apiHeaders);
final res = await client.call(HttpMethod.get, path: apiPath, params: apiParams, headers: apiHeaders);
return models.ActivityEvent.fromMap(res.data);
}
}
}
}
+99 -127
View File
@@ -1,261 +1,233 @@
part of '../dart_appwrite.dart';
/// The Avatars service aims to help you complete everyday tasks related to
/// your app image, icons, and avatars.
/// The Avatars service aims to help you complete everyday tasks related to
/// your app image, icons, and avatars.
class Avatars extends Service {
Avatars(super.client);
Avatars(super.client);
/// You can use this endpoint to show different browser icons to your users.
/// The code argument receives the browser code as it appears in your user [GET
/// /account/sessions](https://appwrite.io/docs/references/cloud/client-web/account#getSessions)
/// endpoint. Use width, height and quality arguments to change the output
/// settings.
///
///
/// When one dimension is specified and the other is 0, the image is scaled
/// with preserved aspect ratio. If both dimensions are 0, the API provides an
/// image at source quality. If dimensions are not specified, the default size
/// of image returned is 100x100px.
Future<Uint8List> getBrowser(
{required enums.Browser code,
int? width,
int? height,
int? quality}) async {
final String apiPath =
'/avatars/browsers/{code}'.replaceAll('{code}', code.value);
Future<Uint8List> getBrowser({required enums.Browser code, int? width, int? height, int? quality}) async {
final String apiPath = '/avatars/browsers/{code}'.replaceAll('{code}', code.value);
final Map<String, dynamic> params = {
if (width != null) 'width': width,
if (height != null) 'height': height,
if (quality != null) 'quality': quality,
if (height != null) 'height': height,
if (quality != null) 'quality': quality,
'project': client.config['project'],
'session': client.config['session'],
};
final res = await client.call(HttpMethod.get,
path: apiPath, params: params, responseType: ResponseType.bytes);
final res = await client.call(HttpMethod.get, path: apiPath, params: params, responseType: ResponseType.bytes);
return res.data;
}
}
/// The credit card endpoint will return you the icon of the credit card
/// provider you need. Use width, height and quality arguments to change the
/// output settings.
///
///
/// When one dimension is specified and the other is 0, the image is scaled
/// with preserved aspect ratio. If both dimensions are 0, the API provides an
/// image at source quality. If dimensions are not specified, the default size
/// of image returned is 100x100px.
///
Future<Uint8List> getCreditCard(
{required enums.CreditCard code,
int? width,
int? height,
int? quality}) async {
final String apiPath =
'/avatars/credit-cards/{code}'.replaceAll('{code}', code.value);
///
Future<Uint8List> getCreditCard({required enums.CreditCard code, int? width, int? height, int? quality}) async {
final String apiPath = '/avatars/credit-cards/{code}'.replaceAll('{code}', code.value);
final Map<String, dynamic> params = {
if (width != null) 'width': width,
if (height != null) 'height': height,
if (quality != null) 'quality': quality,
if (height != null) 'height': height,
if (quality != null) 'quality': quality,
'project': client.config['project'],
'session': client.config['session'],
};
final res = await client.call(HttpMethod.get,
path: apiPath, params: params, responseType: ResponseType.bytes);
final res = await client.call(HttpMethod.get, path: apiPath, params: params, responseType: ResponseType.bytes);
return res.data;
}
}
/// Use this endpoint to fetch the favorite icon (AKA favicon) of any remote
/// website URL.
///
///
/// This endpoint does not follow HTTP redirects.
Future<Uint8List> getFavicon({required String url}) async {
final String apiPath = '/avatars/favicon';
Future<Uint8List> getFavicon({required String url}) async {
final String apiPath = '/avatars/favicon';
final Map<String, dynamic> params = {
'url': url,
'project': client.config['project'],
'session': client.config['session'],
};
final res = await client.call(HttpMethod.get,
path: apiPath, params: params, responseType: ResponseType.bytes);
final res = await client.call(HttpMethod.get, path: apiPath, params: params, responseType: ResponseType.bytes);
return res.data;
}
}
/// You can use this endpoint to show different country flags icons to your
/// users. The code argument receives the 2 letter country code. Use width,
/// height and quality arguments to change the output settings. Country codes
/// follow the [ISO 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1) standard.
///
///
/// When one dimension is specified and the other is 0, the image is scaled
/// with preserved aspect ratio. If both dimensions are 0, the API provides an
/// image at source quality. If dimensions are not specified, the default size
/// of image returned is 100x100px.
///
Future<Uint8List> getFlag(
{required enums.Flag code, int? width, int? height, int? quality}) async {
final String apiPath =
'/avatars/flags/{code}'.replaceAll('{code}', code.value);
///
Future<Uint8List> getFlag({required enums.Flag code, int? width, int? height, int? quality}) async {
final String apiPath = '/avatars/flags/{code}'.replaceAll('{code}', code.value);
final Map<String, dynamic> params = {
if (width != null) 'width': width,
if (height != null) 'height': height,
if (quality != null) 'quality': quality,
if (height != null) 'height': height,
if (quality != null) 'quality': quality,
'project': client.config['project'],
'session': client.config['session'],
};
final res = await client.call(HttpMethod.get,
path: apiPath, params: params, responseType: ResponseType.bytes);
final res = await client.call(HttpMethod.get, path: apiPath, params: params, responseType: ResponseType.bytes);
return res.data;
}
}
/// Use this endpoint to fetch a remote image URL and crop it to any image size
/// you want. This endpoint is very useful if you need to crop and display
/// remote images in your app or in case you want to make sure a 3rd party
/// image is properly served using a TLS protocol.
///
///
/// When one dimension is specified and the other is 0, the image is scaled
/// with preserved aspect ratio. If both dimensions are 0, the API provides an
/// image at source quality. If dimensions are not specified, the default size
/// of image returned is 400x400px.
///
///
/// This endpoint does not follow HTTP redirects.
Future<Uint8List> getImage(
{required String url, int? width, int? height}) async {
final String apiPath = '/avatars/image';
Future<Uint8List> getImage({required String url, int? width, int? height}) async {
final String apiPath = '/avatars/image';
final Map<String, dynamic> params = {
'url': url,
if (width != null) 'width': width,
if (height != null) 'height': height,
if (width != null) 'width': width,
if (height != null) 'height': height,
'project': client.config['project'],
'session': client.config['session'],
};
final res = await client.call(HttpMethod.get,
path: apiPath, params: params, responseType: ResponseType.bytes);
final res = await client.call(HttpMethod.get, path: apiPath, params: params, responseType: ResponseType.bytes);
return res.data;
}
}
/// Use this endpoint to show your user initials avatar icon on your website or
/// app. By default, this route will try to print your logged-in user name or
/// email initials. You can also overwrite the user name if you pass the 'name'
/// parameter. If no name is given and no user is logged, an empty avatar will
/// be returned.
///
///
/// You can use the color and background params to change the avatar colors. By
/// default, a random theme will be selected. The random theme will persist for
/// the user's initials when reloading the same theme will always return for
/// the same initials.
///
///
/// When one dimension is specified and the other is 0, the image is scaled
/// with preserved aspect ratio. If both dimensions are 0, the API provides an
/// image at source quality. If dimensions are not specified, the default size
/// of image returned is 100x100px.
///
Future<Uint8List> getInitials(
{String? name, int? width, int? height, String? background}) async {
final String apiPath = '/avatars/initials';
///
Future<Uint8List> getInitials({String? name, int? width, int? height, String? background}) async {
final String apiPath = '/avatars/initials';
final Map<String, dynamic> params = {
if (name != null) 'name': name,
if (width != null) 'width': width,
if (height != null) 'height': height,
if (background != null) 'background': background,
if (width != null) 'width': width,
if (height != null) 'height': height,
if (background != null) 'background': background,
'project': client.config['project'],
'session': client.config['session'],
};
final res = await client.call(HttpMethod.get,
path: apiPath, params: params, responseType: ResponseType.bytes);
final res = await client.call(HttpMethod.get, path: apiPath, params: params, responseType: ResponseType.bytes);
return res.data;
}
}
/// Converts a given plain text to a QR code image. You can use the query
/// parameters to change the size and style of the resulting image.
///
Future<Uint8List> getQR(
{required String text, int? size, int? margin, bool? download}) async {
final String apiPath = '/avatars/qr';
///
Future<Uint8List> getQR({required String text, int? size, int? margin, bool? download}) async {
final String apiPath = '/avatars/qr';
final Map<String, dynamic> params = {
'text': text,
if (size != null) 'size': size,
if (margin != null) 'margin': margin,
if (download != null) 'download': download,
if (size != null) 'size': size,
if (margin != null) 'margin': margin,
if (download != null) 'download': download,
'project': client.config['project'],
'session': client.config['session'],
};
final res = await client.call(HttpMethod.get,
path: apiPath, params: params, responseType: ResponseType.bytes);
final res = await client.call(HttpMethod.get, path: apiPath, params: params, responseType: ResponseType.bytes);
return res.data;
}
}
/// Use this endpoint to capture a screenshot of any website URL. This endpoint
/// uses a headless browser to render the webpage and capture it as an image.
///
///
/// You can configure the browser viewport size, theme, user agent,
/// geolocation, permissions, and more. Capture either just the viewport or the
/// full page scroll.
///
///
/// When width and height are specified, the image is resized accordingly. If
/// both dimensions are 0, the API provides an image at original size. If
/// dimensions are not specified, the default viewport size is 1280x720px.
Future<Uint8List> getScreenshot(
{required String url,
Map? headers,
int? viewportWidth,
int? viewportHeight,
double? scale,
enums.Theme? theme,
String? userAgent,
bool? fullpage,
String? locale,
enums.Timezone? timezone,
double? latitude,
double? longitude,
double? accuracy,
bool? touch,
List<enums.BrowserPermission>? permissions,
int? sleep,
int? width,
int? height,
int? quality,
enums.ImageFormat? output}) async {
final String apiPath = '/avatars/screenshots';
Future<Uint8List> getScreenshot({required String url, Map? headers, int? viewportWidth, int? viewportHeight, double? scale, enums.Theme? theme, String? userAgent, bool? fullpage, String? locale, enums.Timezone? timezone, double? latitude, double? longitude, double? accuracy, bool? touch, List<enums.BrowserPermission>? permissions, int? sleep, int? width, int? height, int? quality, enums.ImageFormat? output}) async {
final String apiPath = '/avatars/screenshots';
final Map<String, dynamic> params = {
'url': url,
if (headers != null) 'headers': headers,
if (viewportWidth != null) 'viewportWidth': viewportWidth,
if (viewportHeight != null) 'viewportHeight': viewportHeight,
if (scale != null) 'scale': scale,
if (theme != null) 'theme': theme.value,
if (userAgent != null) 'userAgent': userAgent,
if (fullpage != null) 'fullpage': fullpage,
if (locale != null) 'locale': locale,
if (timezone != null) 'timezone': timezone.value,
if (latitude != null) 'latitude': latitude,
if (longitude != null) 'longitude': longitude,
if (accuracy != null) 'accuracy': accuracy,
if (touch != null) 'touch': touch,
if (permissions != null)
'permissions': permissions.map((e) => e.value).toList(),
if (sleep != null) 'sleep': sleep,
if (width != null) 'width': width,
if (height != null) 'height': height,
if (quality != null) 'quality': quality,
if (output != null) 'output': output.value,
if (headers != null) 'headers': headers,
if (viewportWidth != null) 'viewportWidth': viewportWidth,
if (viewportHeight != null) 'viewportHeight': viewportHeight,
if (scale != null) 'scale': scale,
if (theme != null) 'theme': theme.value,
if (userAgent != null) 'userAgent': userAgent,
if (fullpage != null) 'fullpage': fullpage,
if (locale != null) 'locale': locale,
if (timezone != null) 'timezone': timezone.value,
if (latitude != null) 'latitude': latitude,
if (longitude != null) 'longitude': longitude,
if (accuracy != null) 'accuracy': accuracy,
if (touch != null) 'touch': touch,
if (permissions != null) 'permissions': permissions.map((e) => e.value).toList(),
if (sleep != null) 'sleep': sleep,
if (width != null) 'width': width,
if (height != null) 'height': height,
if (quality != null) 'quality': quality,
if (output != null) 'output': output.value,
'project': client.config['project'],
'session': client.config['session'],
};
final res = await client.call(HttpMethod.get,
path: apiPath, params: params, responseType: ResponseType.bytes);
final res = await client.call(HttpMethod.get, path: apiPath, params: params, responseType: ResponseType.bytes);
return res.data;
}
}
}
}
+144 -123
View File
@@ -1,238 +1,259 @@
part of '../dart_appwrite.dart';
class Backups extends Service {
Backups(super.client);
Backups(super.client);
/// List all archives for a project.
Future<models.BackupArchiveList> listArchives({List<String>? queries}) async {
final String apiPath = '/backups/archives';
Future<models.BackupArchiveList> listArchives({List<String>? queries}) async {
final String apiPath = '/backups/archives';
final Map<String, dynamic> apiParams = {
if (queries != null) 'queries': queries,
};
final Map<String, String> apiHeaders = {};
final Map<String, String> apiHeaders = {
};
final res = await client.call(HttpMethod.get,
path: apiPath, params: apiParams, headers: apiHeaders);
final res = await client.call(HttpMethod.get, path: apiPath, params: apiParams, headers: apiHeaders);
return models.BackupArchiveList.fromMap(res.data);
}
}
/// Create a new archive asynchronously for a project.
Future<models.BackupArchive> createArchive(
{required List<enums.BackupServices> services,
String? resourceId}) async {
final String apiPath = '/backups/archives';
Future<models.BackupArchive> createArchive({required List<enums.BackupServices> services, String? resourceId}) async {
final String apiPath = '/backups/archives';
final Map<String, dynamic> apiParams = {
'services': services.map((e) => e.value).toList(),
'resourceId': resourceId,
'resourceId': resourceId,
};
final Map<String, String> apiHeaders = {
'content-type': 'application/json',
};
final res = await client.call(HttpMethod.post,
path: apiPath, params: apiParams, headers: apiHeaders);
final res = await client.call(HttpMethod.post, path: apiPath, params: apiParams, headers: apiHeaders);
return models.BackupArchive.fromMap(res.data);
}
}
/// Get a backup archive using it's ID.
Future<models.BackupArchive> getArchive({required String archiveId}) async {
final String apiPath =
'/backups/archives/{archiveId}'.replaceAll('{archiveId}', archiveId);
Future<models.BackupArchive> getArchive({required String archiveId}) async {
final String apiPath = '/backups/archives/{archiveId}'.replaceAll('{archiveId}', archiveId);
final Map<String, dynamic> apiParams = {};
final Map<String, dynamic> apiParams = {
};
final Map<String, String> apiHeaders = {};
final Map<String, String> apiHeaders = {
};
final res = await client.call(HttpMethod.get,
path: apiPath, params: apiParams, headers: apiHeaders);
final res = await client.call(HttpMethod.get, path: apiPath, params: apiParams, headers: apiHeaders);
return models.BackupArchive.fromMap(res.data);
}
}
/// Delete an existing archive for a project.
Future deleteArchive({required String archiveId}) async {
final String apiPath =
'/backups/archives/{archiveId}'.replaceAll('{archiveId}', archiveId);
Future deleteArchive({required String archiveId}) async {
final String apiPath = '/backups/archives/{archiveId}'.replaceAll('{archiveId}', archiveId);
final Map<String, dynamic> apiParams = {};
final Map<String, dynamic> apiParams = {
};
final Map<String, String> apiHeaders = {
'content-type': 'application/json',
};
final res = await client.call(HttpMethod.delete,
path: apiPath, params: apiParams, headers: apiHeaders);
final res = await client.call(HttpMethod.delete, path: apiPath, params: apiParams, headers: apiHeaders);
return res.data;
}
}
/// List all policies for a project.
Future<models.BackupPolicyList> listPolicies({List<String>? queries}) async {
final String apiPath = '/backups/policies';
Future<models.BackupPolicyList> listPolicies({List<String>? queries}) async {
final String apiPath = '/backups/policies';
final Map<String, dynamic> apiParams = {
if (queries != null) 'queries': queries,
};
final Map<String, String> apiHeaders = {};
final Map<String, String> apiHeaders = {
};
final res = await client.call(HttpMethod.get,
path: apiPath, params: apiParams, headers: apiHeaders);
final res = await client.call(HttpMethod.get, path: apiPath, params: apiParams, headers: apiHeaders);
return models.BackupPolicyList.fromMap(res.data);
}
}
/// Create a new backup policy.
Future<models.BackupPolicy> createPolicy(
{required String policyId,
required List<enums.BackupServices> services,
required int retention,
required String schedule,
String? name,
String? resourceId,
bool? enabled}) async {
final String apiPath = '/backups/policies';
Future<models.BackupPolicy> createPolicy({required String policyId, required List<enums.BackupServices> services, required int retention, required String schedule, String? name, String? resourceId, bool? enabled}) async {
final String apiPath = '/backups/policies';
final Map<String, dynamic> apiParams = {
'policyId': policyId,
if (name != null) 'name': name,
'services': services.map((e) => e.value).toList(),
'resourceId': resourceId,
if (enabled != null) 'enabled': enabled,
'retention': retention,
'schedule': schedule,
if (name != null) 'name': name,
'services': services.map((e) => e.value).toList(),
'resourceId': resourceId,
if (enabled != null) 'enabled': enabled,
'retention': retention,
'schedule': schedule,
};
final Map<String, String> apiHeaders = {
'content-type': 'application/json',
};
final res = await client.call(HttpMethod.post,
path: apiPath, params: apiParams, headers: apiHeaders);
final res = await client.call(HttpMethod.post, path: apiPath, params: apiParams, headers: apiHeaders);
return models.BackupPolicy.fromMap(res.data);
}
}
/// Get a backup policy using it's ID.
Future<models.BackupPolicy> getPolicy({required String policyId}) async {
final String apiPath =
'/backups/policies/{policyId}'.replaceAll('{policyId}', policyId);
Future<models.BackupPolicy> getPolicy({required String policyId}) async {
final String apiPath = '/backups/policies/{policyId}'.replaceAll('{policyId}', policyId);
final Map<String, dynamic> apiParams = {};
final Map<String, dynamic> apiParams = {
};
final Map<String, String> apiHeaders = {};
final Map<String, String> apiHeaders = {
};
final res = await client.call(HttpMethod.get,
path: apiPath, params: apiParams, headers: apiHeaders);
final res = await client.call(HttpMethod.get, path: apiPath, params: apiParams, headers: apiHeaders);
return models.BackupPolicy.fromMap(res.data);
}
}
/// Update an existing policy using it's ID.
Future<models.BackupPolicy> updatePolicy(
{required String policyId,
String? name,
int? retention,
String? schedule,
bool? enabled}) async {
final String apiPath =
'/backups/policies/{policyId}'.replaceAll('{policyId}', policyId);
Future<models.BackupPolicy> updatePolicy({required String policyId, String? name, int? retention, String? schedule, bool? enabled}) async {
final String apiPath = '/backups/policies/{policyId}'.replaceAll('{policyId}', policyId);
final Map<String, dynamic> apiParams = {
'name': name,
'retention': retention,
if (schedule != null) 'schedule': schedule,
'enabled': enabled,
'retention': retention,
if (schedule != null) 'schedule': schedule,
'enabled': enabled,
};
final Map<String, String> apiHeaders = {
'content-type': 'application/json',
};
final res = await client.call(HttpMethod.patch,
path: apiPath, params: apiParams, headers: apiHeaders);
final res = await client.call(HttpMethod.patch, path: apiPath, params: apiParams, headers: apiHeaders);
return models.BackupPolicy.fromMap(res.data);
}
}
/// Delete a policy using it's ID.
Future deletePolicy({required String policyId}) async {
final String apiPath =
'/backups/policies/{policyId}'.replaceAll('{policyId}', policyId);
final Map<String, dynamic> apiParams = {};
final Map<String, String> apiHeaders = {
'content-type': 'application/json',
};
final res = await client.call(HttpMethod.delete,
path: apiPath, params: apiParams, headers: apiHeaders);
return res.data;
}
/// Create and trigger a new restoration for a backup on a project.
Future<models.BackupRestoration> createRestoration(
{required String archiveId,
required List<enums.BackupServices> services,
String? newResourceId,
String? newResourceName}) async {
final String apiPath = '/backups/restoration';
Future deletePolicy({required String policyId}) async {
final String apiPath = '/backups/policies/{policyId}'.replaceAll('{policyId}', policyId);
final Map<String, dynamic> apiParams = {
'archiveId': archiveId,
'services': services.map((e) => e.value).toList(),
if (newResourceId != null) 'newResourceId': newResourceId,
if (newResourceName != null) 'newResourceName': newResourceName,
};
final Map<String, String> apiHeaders = {
'content-type': 'application/json',
};
final res = await client.call(HttpMethod.post,
path: apiPath, params: apiParams, headers: apiHeaders);
final res = await client.call(HttpMethod.delete, path: apiPath, params: apiParams, headers: apiHeaders);
return res.data;
}
/// Create and trigger a new restoration for a backup on a project.
Future<models.BackupRestoration> createRestoration({required String archiveId, required List<enums.BackupServices> services, String? newResourceId, String? newResourceName}) async {
final String apiPath = '/backups/restoration';
final Map<String, dynamic> apiParams = {
'archiveId': archiveId,
'services': services.map((e) => e.value).toList(),
if (newResourceId != null) 'newResourceId': newResourceId,
if (newResourceName != null) 'newResourceName': newResourceName,
};
final Map<String, String> apiHeaders = {
'content-type': 'application/json',
};
final res = await client.call(HttpMethod.post, path: apiPath, params: apiParams, headers: apiHeaders);
return models.BackupRestoration.fromMap(res.data);
}
}
/// List all backup restorations for a project.
Future<models.BackupRestorationList> listRestorations(
{List<String>? queries}) async {
final String apiPath = '/backups/restorations';
Future<models.BackupRestorationList> listRestorations({List<String>? queries}) async {
final String apiPath = '/backups/restorations';
final Map<String, dynamic> apiParams = {
if (queries != null) 'queries': queries,
};
final Map<String, String> apiHeaders = {};
final Map<String, String> apiHeaders = {
};
final res = await client.call(HttpMethod.get,
path: apiPath, params: apiParams, headers: apiHeaders);
final res = await client.call(HttpMethod.get, path: apiPath, params: apiParams, headers: apiHeaders);
return models.BackupRestorationList.fromMap(res.data);
}
}
/// Get the current status of a backup restoration.
Future<models.BackupRestoration> getRestoration(
{required String restorationId}) async {
final String apiPath = '/backups/restorations/{restorationId}'
.replaceAll('{restorationId}', restorationId);
Future<models.BackupRestoration> getRestoration({required String restorationId}) async {
final String apiPath = '/backups/restorations/{restorationId}'.replaceAll('{restorationId}', restorationId);
final Map<String, dynamic> apiParams = {};
final Map<String, dynamic> apiParams = {
};
final Map<String, String> apiHeaders = {};
final Map<String, String> apiHeaders = {
};
final res = await client.call(HttpMethod.get,
path: apiPath, params: apiParams, headers: apiHeaders);
final res = await client.call(HttpMethod.get, path: apiPath, params: apiParams, headers: apiHeaders);
return models.BackupRestoration.fromMap(res.data);
}
}
}
}
+853 -1221
View File
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+22 -16
View File
@@ -1,45 +1,51 @@
part of '../dart_appwrite.dart';
/// The GraphQL API allows you to query and mutate your Appwrite server using
/// GraphQL.
/// The GraphQL API allows you to query and mutate your Appwrite server using
/// GraphQL.
class Graphql extends Service {
Graphql(super.client);
Graphql(super.client);
/// Execute a GraphQL mutation.
Future query({required Map query}) async {
final String apiPath = '/graphql';
Future query({required Map query}) async {
final String apiPath = '/graphql';
final Map<String, dynamic> apiParams = {
'query': query,
};
final Map<String, String> apiHeaders = {
'x-sdk-graphql': 'true',
'content-type': 'application/json',
'content-type': 'application/json',
};
final res = await client.call(HttpMethod.post,
path: apiPath, params: apiParams, headers: apiHeaders);
final res = await client.call(HttpMethod.post, path: apiPath, params: apiParams, headers: apiHeaders);
return res.data;
}
}
/// Execute a GraphQL mutation.
Future mutation({required Map query}) async {
final String apiPath = '/graphql/mutation';
Future mutation({required Map query}) async {
final String apiPath = '/graphql/mutation';
final Map<String, dynamic> apiParams = {
'query': query,
};
final Map<String, String> apiHeaders = {
'x-sdk-graphql': 'true',
'content-type': 'application/json',
'content-type': 'application/json',
};
final res = await client.call(HttpMethod.post,
path: apiPath, params: apiParams, headers: apiHeaders);
final res = await client.call(HttpMethod.post, path: apiPath, params: apiParams, headers: apiHeaders);
return res.data;
}
}
}
}
+264 -164
View File
@@ -1,387 +1,482 @@
part of '../dart_appwrite.dart';
/// The Health service allows you to both validate and monitor your Appwrite
/// server&#039;s health.
/// The Health service allows you to both validate and monitor your Appwrite
/// server&#039;s health.
class Health extends Service {
Health(super.client);
Health(super.client);
/// Check the Appwrite HTTP server is up and responsive.
Future<models.HealthStatus> get() async {
final String apiPath = '/health';
Future<models.HealthStatus> get() async {
final String apiPath = '/health';
final Map<String, dynamic> apiParams = {};
final Map<String, dynamic> apiParams = {
};
final Map<String, String> apiHeaders = {};
final Map<String, String> apiHeaders = {
};
final res = await client.call(HttpMethod.get,
path: apiPath, params: apiParams, headers: apiHeaders);
final res = await client.call(HttpMethod.get, path: apiPath, params: apiParams, headers: apiHeaders);
return models.HealthStatus.fromMap(res.data);
}
}
/// Check the Appwrite Antivirus server is up and connection is successful.
Future<models.HealthAntivirus> getAntivirus() async {
final String apiPath = '/health/anti-virus';
Future<models.HealthAntivirus> getAntivirus() async {
final String apiPath = '/health/anti-virus';
final Map<String, dynamic> apiParams = {};
final Map<String, dynamic> apiParams = {
};
final Map<String, String> apiHeaders = {};
final Map<String, String> apiHeaders = {
};
final res = await client.call(HttpMethod.get,
path: apiPath, params: apiParams, headers: apiHeaders);
final res = await client.call(HttpMethod.get, path: apiPath, params: apiParams, headers: apiHeaders);
return models.HealthAntivirus.fromMap(res.data);
}
}
/// Check the Appwrite in-memory cache servers are up and connection is
/// successful.
Future<models.HealthStatusList> getCache() async {
final String apiPath = '/health/cache';
Future<models.HealthStatusList> getCache() async {
final String apiPath = '/health/cache';
final Map<String, dynamic> apiParams = {};
final Map<String, dynamic> apiParams = {
};
final Map<String, String> apiHeaders = {};
final Map<String, String> apiHeaders = {
};
final res = await client.call(HttpMethod.get,
path: apiPath, params: apiParams, headers: apiHeaders);
final res = await client.call(HttpMethod.get, path: apiPath, params: apiParams, headers: apiHeaders);
return models.HealthStatusList.fromMap(res.data);
}
}
/// Get the SSL certificate for a domain
Future<models.HealthCertificate> getCertificate({String? domain}) async {
final String apiPath = '/health/certificate';
Future<models.HealthCertificate> getCertificate({String? domain}) async {
final String apiPath = '/health/certificate';
final Map<String, dynamic> apiParams = {
if (domain != null) 'domain': domain,
};
final Map<String, String> apiHeaders = {};
final Map<String, String> apiHeaders = {
};
final res = await client.call(HttpMethod.get,
path: apiPath, params: apiParams, headers: apiHeaders);
final res = await client.call(HttpMethod.get, path: apiPath, params: apiParams, headers: apiHeaders);
return models.HealthCertificate.fromMap(res.data);
}
}
/// Get console pausing health status. Monitors projects approaching the pause
/// threshold to detect potential issues with console access tracking.
///
Future<models.HealthStatus> getConsolePausing(
{int? threshold, int? inactivityDays}) async {
final String apiPath = '/health/console-pausing';
///
Future<models.HealthStatus> getConsolePausing({int? threshold, int? inactivityDays}) async {
final String apiPath = '/health/console-pausing';
final Map<String, dynamic> apiParams = {
if (threshold != null) 'threshold': threshold,
if (inactivityDays != null) 'inactivityDays': inactivityDays,
if (inactivityDays != null) 'inactivityDays': inactivityDays,
};
final Map<String, String> apiHeaders = {};
final Map<String, String> apiHeaders = {
};
final res = await client.call(HttpMethod.get,
path: apiPath, params: apiParams, headers: apiHeaders);
final res = await client.call(HttpMethod.get, path: apiPath, params: apiParams, headers: apiHeaders);
return models.HealthStatus.fromMap(res.data);
}
}
/// Check the Appwrite database servers are up and connection is successful.
Future<models.HealthStatusList> getDB() async {
final String apiPath = '/health/db';
Future<models.HealthStatusList> getDB() async {
final String apiPath = '/health/db';
final Map<String, dynamic> apiParams = {};
final Map<String, dynamic> apiParams = {
};
final Map<String, String> apiHeaders = {};
final Map<String, String> apiHeaders = {
};
final res = await client.call(HttpMethod.get,
path: apiPath, params: apiParams, headers: apiHeaders);
final res = await client.call(HttpMethod.get, path: apiPath, params: apiParams, headers: apiHeaders);
return models.HealthStatusList.fromMap(res.data);
}
}
/// Check the Appwrite pub-sub servers are up and connection is successful.
Future<models.HealthStatusList> getPubSub() async {
final String apiPath = '/health/pubsub';
Future<models.HealthStatusList> getPubSub() async {
final String apiPath = '/health/pubsub';
final Map<String, dynamic> apiParams = {};
final Map<String, dynamic> apiParams = {
};
final Map<String, String> apiHeaders = {};
final Map<String, String> apiHeaders = {
};
final res = await client.call(HttpMethod.get,
path: apiPath, params: apiParams, headers: apiHeaders);
final res = await client.call(HttpMethod.get, path: apiPath, params: apiParams, headers: apiHeaders);
return models.HealthStatusList.fromMap(res.data);
}
}
/// Get the number of audit logs that are waiting to be processed in the
/// Appwrite internal queue server.
Future<models.HealthQueue> getQueueAudits({int? threshold}) async {
final String apiPath = '/health/queue/audits';
Future<models.HealthQueue> getQueueAudits({int? threshold}) async {
final String apiPath = '/health/queue/audits';
final Map<String, dynamic> apiParams = {
if (threshold != null) 'threshold': threshold,
};
final Map<String, String> apiHeaders = {};
final Map<String, String> apiHeaders = {
};
final res = await client.call(HttpMethod.get,
path: apiPath, params: apiParams, headers: apiHeaders);
final res = await client.call(HttpMethod.get, path: apiPath, params: apiParams, headers: apiHeaders);
return models.HealthQueue.fromMap(res.data);
}
}
/// Get the number of builds that are waiting to be processed in the Appwrite
/// internal queue server.
Future<models.HealthQueue> getQueueBuilds({int? threshold}) async {
final String apiPath = '/health/queue/builds';
Future<models.HealthQueue> getQueueBuilds({int? threshold}) async {
final String apiPath = '/health/queue/builds';
final Map<String, dynamic> apiParams = {
if (threshold != null) 'threshold': threshold,
};
final Map<String, String> apiHeaders = {};
final Map<String, String> apiHeaders = {
};
final res = await client.call(HttpMethod.get,
path: apiPath, params: apiParams, headers: apiHeaders);
final res = await client.call(HttpMethod.get, path: apiPath, params: apiParams, headers: apiHeaders);
return models.HealthQueue.fromMap(res.data);
}
}
/// Get the number of certificates that are waiting to be issued against
/// [Letsencrypt](https://letsencrypt.org/) in the Appwrite internal queue
/// server.
Future<models.HealthQueue> getQueueCertificates({int? threshold}) async {
final String apiPath = '/health/queue/certificates';
Future<models.HealthQueue> getQueueCertificates({int? threshold}) async {
final String apiPath = '/health/queue/certificates';
final Map<String, dynamic> apiParams = {
if (threshold != null) 'threshold': threshold,
};
final Map<String, String> apiHeaders = {};
final Map<String, String> apiHeaders = {
};
final res = await client.call(HttpMethod.get,
path: apiPath, params: apiParams, headers: apiHeaders);
final res = await client.call(HttpMethod.get, path: apiPath, params: apiParams, headers: apiHeaders);
return models.HealthQueue.fromMap(res.data);
}
}
/// Get the number of database changes that are waiting to be processed in the
/// Appwrite internal queue server.
Future<models.HealthQueue> getQueueDatabases(
{String? name, int? threshold}) async {
final String apiPath = '/health/queue/databases';
Future<models.HealthQueue> getQueueDatabases({String? name, int? threshold}) async {
final String apiPath = '/health/queue/databases';
final Map<String, dynamic> apiParams = {
if (name != null) 'name': name,
if (threshold != null) 'threshold': threshold,
if (threshold != null) 'threshold': threshold,
};
final Map<String, String> apiHeaders = {};
final Map<String, String> apiHeaders = {
};
final res = await client.call(HttpMethod.get,
path: apiPath, params: apiParams, headers: apiHeaders);
final res = await client.call(HttpMethod.get, path: apiPath, params: apiParams, headers: apiHeaders);
return models.HealthQueue.fromMap(res.data);
}
}
/// Get the number of background destructive changes that are waiting to be
/// processed in the Appwrite internal queue server.
Future<models.HealthQueue> getQueueDeletes({int? threshold}) async {
final String apiPath = '/health/queue/deletes';
Future<models.HealthQueue> getQueueDeletes({int? threshold}) async {
final String apiPath = '/health/queue/deletes';
final Map<String, dynamic> apiParams = {
if (threshold != null) 'threshold': threshold,
};
final Map<String, String> apiHeaders = {};
final Map<String, String> apiHeaders = {
};
final res = await client.call(HttpMethod.get,
path: apiPath, params: apiParams, headers: apiHeaders);
final res = await client.call(HttpMethod.get, path: apiPath, params: apiParams, headers: apiHeaders);
return models.HealthQueue.fromMap(res.data);
}
}
/// Returns the amount of failed jobs in a given queue.
///
Future<models.HealthQueue> getFailedJobs(
{required enums.Name name, int? threshold}) async {
final String apiPath =
'/health/queue/failed/{name}'.replaceAll('{name}', name.value);
///
Future<models.HealthQueue> getFailedJobs({required enums.Name name, int? threshold}) async {
final String apiPath = '/health/queue/failed/{name}'.replaceAll('{name}', name.value);
final Map<String, dynamic> apiParams = {
if (threshold != null) 'threshold': threshold,
};
final Map<String, String> apiHeaders = {};
final Map<String, String> apiHeaders = {
};
final res = await client.call(HttpMethod.get,
path: apiPath, params: apiParams, headers: apiHeaders);
final res = await client.call(HttpMethod.get, path: apiPath, params: apiParams, headers: apiHeaders);
return models.HealthQueue.fromMap(res.data);
}
}
/// Get the number of function executions that are waiting to be processed in
/// the Appwrite internal queue server.
Future<models.HealthQueue> getQueueFunctions({int? threshold}) async {
final String apiPath = '/health/queue/functions';
Future<models.HealthQueue> getQueueFunctions({int? threshold}) async {
final String apiPath = '/health/queue/functions';
final Map<String, dynamic> apiParams = {
if (threshold != null) 'threshold': threshold,
};
final Map<String, String> apiHeaders = {};
final Map<String, String> apiHeaders = {
};
final res = await client.call(HttpMethod.get,
path: apiPath, params: apiParams, headers: apiHeaders);
final res = await client.call(HttpMethod.get, path: apiPath, params: apiParams, headers: apiHeaders);
return models.HealthQueue.fromMap(res.data);
}
}
/// Get the number of logs that are waiting to be processed in the Appwrite
/// internal queue server.
Future<models.HealthQueue> getQueueLogs({int? threshold}) async {
final String apiPath = '/health/queue/logs';
Future<models.HealthQueue> getQueueLogs({int? threshold}) async {
final String apiPath = '/health/queue/logs';
final Map<String, dynamic> apiParams = {
if (threshold != null) 'threshold': threshold,
};
final Map<String, String> apiHeaders = {};
final Map<String, String> apiHeaders = {
};
final res = await client.call(HttpMethod.get,
path: apiPath, params: apiParams, headers: apiHeaders);
final res = await client.call(HttpMethod.get, path: apiPath, params: apiParams, headers: apiHeaders);
return models.HealthQueue.fromMap(res.data);
}
}
/// Get the number of mails that are waiting to be processed in the Appwrite
/// internal queue server.
Future<models.HealthQueue> getQueueMails({int? threshold}) async {
final String apiPath = '/health/queue/mails';
Future<models.HealthQueue> getQueueMails({int? threshold}) async {
final String apiPath = '/health/queue/mails';
final Map<String, dynamic> apiParams = {
if (threshold != null) 'threshold': threshold,
};
final Map<String, String> apiHeaders = {};
final Map<String, String> apiHeaders = {
};
final res = await client.call(HttpMethod.get,
path: apiPath, params: apiParams, headers: apiHeaders);
final res = await client.call(HttpMethod.get, path: apiPath, params: apiParams, headers: apiHeaders);
return models.HealthQueue.fromMap(res.data);
}
}
/// Get the number of messages that are waiting to be processed in the Appwrite
/// internal queue server.
Future<models.HealthQueue> getQueueMessaging({int? threshold}) async {
final String apiPath = '/health/queue/messaging';
Future<models.HealthQueue> getQueueMessaging({int? threshold}) async {
final String apiPath = '/health/queue/messaging';
final Map<String, dynamic> apiParams = {
if (threshold != null) 'threshold': threshold,
};
final Map<String, String> apiHeaders = {};
final Map<String, String> apiHeaders = {
};
final res = await client.call(HttpMethod.get,
path: apiPath, params: apiParams, headers: apiHeaders);
final res = await client.call(HttpMethod.get, path: apiPath, params: apiParams, headers: apiHeaders);
return models.HealthQueue.fromMap(res.data);
}
}
/// Get the number of migrations that are waiting to be processed in the
/// Appwrite internal queue server.
Future<models.HealthQueue> getQueueMigrations({int? threshold}) async {
final String apiPath = '/health/queue/migrations';
Future<models.HealthQueue> getQueueMigrations({int? threshold}) async {
final String apiPath = '/health/queue/migrations';
final Map<String, dynamic> apiParams = {
if (threshold != null) 'threshold': threshold,
};
final Map<String, String> apiHeaders = {};
final Map<String, String> apiHeaders = {
};
final res = await client.call(HttpMethod.get,
path: apiPath, params: apiParams, headers: apiHeaders);
final res = await client.call(HttpMethod.get, path: apiPath, params: apiParams, headers: apiHeaders);
return models.HealthQueue.fromMap(res.data);
}
}
/// Get the number of metrics that are waiting to be processed in the Appwrite
/// stats resources queue.
Future<models.HealthQueue> getQueueStatsResources({int? threshold}) async {
final String apiPath = '/health/queue/stats-resources';
Future<models.HealthQueue> getQueueStatsResources({int? threshold}) async {
final String apiPath = '/health/queue/stats-resources';
final Map<String, dynamic> apiParams = {
if (threshold != null) 'threshold': threshold,
};
final Map<String, String> apiHeaders = {};
final Map<String, String> apiHeaders = {
};
final res = await client.call(HttpMethod.get,
path: apiPath, params: apiParams, headers: apiHeaders);
final res = await client.call(HttpMethod.get, path: apiPath, params: apiParams, headers: apiHeaders);
return models.HealthQueue.fromMap(res.data);
}
}
/// Get the number of metrics that are waiting to be processed in the Appwrite
/// internal queue server.
Future<models.HealthQueue> getQueueUsage({int? threshold}) async {
final String apiPath = '/health/queue/stats-usage';
Future<models.HealthQueue> getQueueUsage({int? threshold}) async {
final String apiPath = '/health/queue/stats-usage';
final Map<String, dynamic> apiParams = {
if (threshold != null) 'threshold': threshold,
};
final Map<String, String> apiHeaders = {};
final Map<String, String> apiHeaders = {
};
final res = await client.call(HttpMethod.get,
path: apiPath, params: apiParams, headers: apiHeaders);
final res = await client.call(HttpMethod.get, path: apiPath, params: apiParams, headers: apiHeaders);
return models.HealthQueue.fromMap(res.data);
}
}
/// Get the number of webhooks that are waiting to be processed in the Appwrite
/// internal queue server.
Future<models.HealthQueue> getQueueWebhooks({int? threshold}) async {
final String apiPath = '/health/queue/webhooks';
Future<models.HealthQueue> getQueueWebhooks({int? threshold}) async {
final String apiPath = '/health/queue/webhooks';
final Map<String, dynamic> apiParams = {
if (threshold != null) 'threshold': threshold,
};
final Map<String, String> apiHeaders = {};
final Map<String, String> apiHeaders = {
};
final res = await client.call(HttpMethod.get,
path: apiPath, params: apiParams, headers: apiHeaders);
final res = await client.call(HttpMethod.get, path: apiPath, params: apiParams, headers: apiHeaders);
return models.HealthQueue.fromMap(res.data);
}
}
/// Check the Appwrite storage device is up and connection is successful.
Future<models.HealthStatus> getStorage() async {
final String apiPath = '/health/storage';
Future<models.HealthStatus> getStorage() async {
final String apiPath = '/health/storage';
final Map<String, dynamic> apiParams = {};
final Map<String, dynamic> apiParams = {
};
final Map<String, String> apiHeaders = {};
final Map<String, String> apiHeaders = {
};
final res = await client.call(HttpMethod.get,
path: apiPath, params: apiParams, headers: apiHeaders);
final res = await client.call(HttpMethod.get, path: apiPath, params: apiParams, headers: apiHeaders);
return models.HealthStatus.fromMap(res.data);
}
}
/// Check the Appwrite local storage device is up and connection is successful.
Future<models.HealthStatus> getStorageLocal() async {
final String apiPath = '/health/storage/local';
Future<models.HealthStatus> getStorageLocal() async {
final String apiPath = '/health/storage/local';
final Map<String, dynamic> apiParams = {};
final Map<String, dynamic> apiParams = {
};
final Map<String, String> apiHeaders = {};
final Map<String, String> apiHeaders = {
};
final res = await client.call(HttpMethod.get,
path: apiPath, params: apiParams, headers: apiHeaders);
final res = await client.call(HttpMethod.get, path: apiPath, params: apiParams, headers: apiHeaders);
return models.HealthStatus.fromMap(res.data);
}
}
/// Check the Appwrite server time is synced with Google remote NTP server. We
/// use this technology to smoothly handle leap seconds with no disruptive
@@ -390,16 +485,21 @@ class Health extends Service {
/// used by hundreds of millions of computers and devices to synchronize their
/// clocks over the Internet. If your computer sets its own clock, it likely
/// uses NTP.
Future<models.HealthTime> getTime() async {
final String apiPath = '/health/time';
Future<models.HealthTime> getTime() async {
final String apiPath = '/health/time';
final Map<String, dynamic> apiParams = {};
final Map<String, dynamic> apiParams = {
};
final Map<String, String> apiHeaders = {};
final Map<String, String> apiHeaders = {
};
final res = await client.call(HttpMethod.get,
path: apiPath, params: apiParams, headers: apiHeaders);
final res = await client.call(HttpMethod.get, path: apiPath, params: apiParams, headers: apiHeaders);
return models.HealthTime.fromMap(res.data);
}
}
}
}
+101 -61
View File
@@ -1,132 +1,172 @@
part of '../dart_appwrite.dart';
/// The Locale service allows you to customize your app based on your users&#039;
/// location.
/// The Locale service allows you to customize your app based on your users&#039;
/// location.
class Locale extends Service {
Locale(super.client);
Locale(super.client);
/// Get the current user location based on IP. Returns an object with user
/// country code, country name, continent name, continent code, ip address and
/// suggested currency. You can use the locale header to get the data in a
/// supported language.
///
///
/// ([IP Geolocation by DB-IP](https://db-ip.com))
Future<models.Locale> get() async {
final String apiPath = '/locale';
Future<models.Locale> get() async {
final String apiPath = '/locale';
final Map<String, dynamic> apiParams = {};
final Map<String, dynamic> apiParams = {
};
final Map<String, String> apiHeaders = {};
final Map<String, String> apiHeaders = {
};
final res = await client.call(HttpMethod.get,
path: apiPath, params: apiParams, headers: apiHeaders);
final res = await client.call(HttpMethod.get, path: apiPath, params: apiParams, headers: apiHeaders);
return models.Locale.fromMap(res.data);
}
}
/// List of all locale codes in [ISO
/// 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes).
Future<models.LocaleCodeList> listCodes() async {
final String apiPath = '/locale/codes';
Future<models.LocaleCodeList> listCodes() async {
final String apiPath = '/locale/codes';
final Map<String, dynamic> apiParams = {};
final Map<String, dynamic> apiParams = {
};
final Map<String, String> apiHeaders = {};
final Map<String, String> apiHeaders = {
};
final res = await client.call(HttpMethod.get,
path: apiPath, params: apiParams, headers: apiHeaders);
final res = await client.call(HttpMethod.get, path: apiPath, params: apiParams, headers: apiHeaders);
return models.LocaleCodeList.fromMap(res.data);
}
}
/// List of all continents. You can use the locale header to get the data in a
/// supported language.
Future<models.ContinentList> listContinents() async {
final String apiPath = '/locale/continents';
Future<models.ContinentList> listContinents() async {
final String apiPath = '/locale/continents';
final Map<String, dynamic> apiParams = {};
final Map<String, dynamic> apiParams = {
};
final Map<String, String> apiHeaders = {};
final Map<String, String> apiHeaders = {
};
final res = await client.call(HttpMethod.get,
path: apiPath, params: apiParams, headers: apiHeaders);
final res = await client.call(HttpMethod.get, path: apiPath, params: apiParams, headers: apiHeaders);
return models.ContinentList.fromMap(res.data);
}
}
/// List of all countries. You can use the locale header to get the data in a
/// supported language.
Future<models.CountryList> listCountries() async {
final String apiPath = '/locale/countries';
Future<models.CountryList> listCountries() async {
final String apiPath = '/locale/countries';
final Map<String, dynamic> apiParams = {};
final Map<String, dynamic> apiParams = {
};
final Map<String, String> apiHeaders = {};
final Map<String, String> apiHeaders = {
};
final res = await client.call(HttpMethod.get,
path: apiPath, params: apiParams, headers: apiHeaders);
final res = await client.call(HttpMethod.get, path: apiPath, params: apiParams, headers: apiHeaders);
return models.CountryList.fromMap(res.data);
}
}
/// List of all countries that are currently members of the EU. You can use the
/// locale header to get the data in a supported language.
Future<models.CountryList> listCountriesEU() async {
final String apiPath = '/locale/countries/eu';
Future<models.CountryList> listCountriesEU() async {
final String apiPath = '/locale/countries/eu';
final Map<String, dynamic> apiParams = {};
final Map<String, dynamic> apiParams = {
};
final Map<String, String> apiHeaders = {};
final Map<String, String> apiHeaders = {
};
final res = await client.call(HttpMethod.get,
path: apiPath, params: apiParams, headers: apiHeaders);
final res = await client.call(HttpMethod.get, path: apiPath, params: apiParams, headers: apiHeaders);
return models.CountryList.fromMap(res.data);
}
}
/// List of all countries phone codes. You can use the locale header to get the
/// data in a supported language.
Future<models.PhoneList> listCountriesPhones() async {
final String apiPath = '/locale/countries/phones';
Future<models.PhoneList> listCountriesPhones() async {
final String apiPath = '/locale/countries/phones';
final Map<String, dynamic> apiParams = {};
final Map<String, dynamic> apiParams = {
};
final Map<String, String> apiHeaders = {};
final Map<String, String> apiHeaders = {
};
final res = await client.call(HttpMethod.get,
path: apiPath, params: apiParams, headers: apiHeaders);
final res = await client.call(HttpMethod.get, path: apiPath, params: apiParams, headers: apiHeaders);
return models.PhoneList.fromMap(res.data);
}
}
/// List of all currencies, including currency symbol, name, plural, and
/// decimal digits for all major and minor currencies. You can use the locale
/// header to get the data in a supported language.
Future<models.CurrencyList> listCurrencies() async {
final String apiPath = '/locale/currencies';
Future<models.CurrencyList> listCurrencies() async {
final String apiPath = '/locale/currencies';
final Map<String, dynamic> apiParams = {};
final Map<String, dynamic> apiParams = {
};
final Map<String, String> apiHeaders = {};
final Map<String, String> apiHeaders = {
};
final res = await client.call(HttpMethod.get,
path: apiPath, params: apiParams, headers: apiHeaders);
final res = await client.call(HttpMethod.get, path: apiPath, params: apiParams, headers: apiHeaders);
return models.CurrencyList.fromMap(res.data);
}
}
/// List of all languages classified by ISO 639-1 including 2-letter code, name
/// in English, and name in the respective language.
Future<models.LanguageList> listLanguages() async {
final String apiPath = '/locale/languages';
Future<models.LanguageList> listLanguages() async {
final String apiPath = '/locale/languages';
final Map<String, dynamic> apiParams = {};
final Map<String, dynamic> apiParams = {
};
final Map<String, String> apiHeaders = {};
final Map<String, String> apiHeaders = {
};
final res = await client.call(HttpMethod.get,
path: apiPath, params: apiParams, headers: apiHeaders);
final res = await client.call(HttpMethod.get, path: apiPath, params: apiParams, headers: apiHeaders);
return models.LanguageList.fromMap(res.data);
}
}
}
}
File diff suppressed because it is too large Load Diff
+60 -53
View File
@@ -1,108 +1,115 @@
part of '../dart_appwrite.dart';
/// The Project service allows you to manage all the projects in your Appwrite
/// server.
/// The Project service allows you to manage all the projects in your Appwrite
/// server.
class Project extends Service {
Project(super.client);
Project(super.client);
/// Get a list of all project environment variables.
Future<models.VariableList> listVariables(
{List<String>? queries, bool? total}) async {
final String apiPath = '/project/variables';
Future<models.VariableList> listVariables({List<String>? queries, bool? total}) async {
final String apiPath = '/project/variables';
final Map<String, dynamic> apiParams = {
if (queries != null) 'queries': queries,
if (total != null) 'total': total,
if (total != null) 'total': total,
};
final Map<String, String> apiHeaders = {};
final Map<String, String> apiHeaders = {
};
final res = await client.call(HttpMethod.get,
path: apiPath, params: apiParams, headers: apiHeaders);
final res = await client.call(HttpMethod.get, path: apiPath, params: apiParams, headers: apiHeaders);
return models.VariableList.fromMap(res.data);
}
}
/// Create a new project environment variable. These variables can be accessed
/// by all functions and sites in the project.
Future<models.Variable> createVariable(
{required String variableId,
required String key,
required String value,
bool? secret}) async {
final String apiPath = '/project/variables';
Future<models.Variable> createVariable({required String variableId, required String key, required String value, bool? secret}) async {
final String apiPath = '/project/variables';
final Map<String, dynamic> apiParams = {
'variableId': variableId,
'key': key,
'value': value,
if (secret != null) 'secret': secret,
'key': key,
'value': value,
if (secret != null) 'secret': secret,
};
final Map<String, String> apiHeaders = {
'content-type': 'application/json',
};
final res = await client.call(HttpMethod.post,
path: apiPath, params: apiParams, headers: apiHeaders);
final res = await client.call(HttpMethod.post, path: apiPath, params: apiParams, headers: apiHeaders);
return models.Variable.fromMap(res.data);
}
/// Get a variable by its unique ID.
Future<models.Variable> getVariable({required String variableId}) async {
final String apiPath = '/project/variables/{variableId}'
.replaceAll('{variableId}', variableId);
}
final Map<String, dynamic> apiParams = {};
/// Get a variable by its unique ID.
Future<models.Variable> getVariable({required String variableId}) async {
final String apiPath = '/project/variables/{variableId}'.replaceAll('{variableId}', variableId);
final Map<String, String> apiHeaders = {};
final Map<String, dynamic> apiParams = {
};
final res = await client.call(HttpMethod.get,
path: apiPath, params: apiParams, headers: apiHeaders);
final Map<String, String> apiHeaders = {
};
final res = await client.call(HttpMethod.get, path: apiPath, params: apiParams, headers: apiHeaders);
return models.Variable.fromMap(res.data);
}
}
/// Update variable by its unique ID.
Future<models.Variable> updateVariable(
{required String variableId,
String? key,
String? value,
bool? secret}) async {
final String apiPath = '/project/variables/{variableId}'
.replaceAll('{variableId}', variableId);
Future<models.Variable> updateVariable({required String variableId, String? key, String? value, bool? secret}) async {
final String apiPath = '/project/variables/{variableId}'.replaceAll('{variableId}', variableId);
final Map<String, dynamic> apiParams = {
'key': key,
'value': value,
'secret': secret,
'value': value,
'secret': secret,
};
final Map<String, String> apiHeaders = {
'content-type': 'application/json',
};
final res = await client.call(HttpMethod.put,
path: apiPath, params: apiParams, headers: apiHeaders);
final res = await client.call(HttpMethod.put, path: apiPath, params: apiParams, headers: apiHeaders);
return models.Variable.fromMap(res.data);
}
/// Delete a variable by its unique ID.
Future deleteVariable({required String variableId}) async {
final String apiPath = '/project/variables/{variableId}'
.replaceAll('{variableId}', variableId);
}
final Map<String, dynamic> apiParams = {};
/// Delete a variable by its unique ID.
Future deleteVariable({required String variableId}) async {
final String apiPath = '/project/variables/{variableId}'.replaceAll('{variableId}', variableId);
final Map<String, dynamic> apiParams = {
};
final Map<String, String> apiHeaders = {
'content-type': 'application/json',
};
final res = await client.call(HttpMethod.delete,
path: apiPath, params: apiParams, headers: apiHeaders);
final res = await client.call(HttpMethod.delete, path: apiPath, params: apiParams, headers: apiHeaders);
return res.data;
}
}
}
}
+339 -364
View File
@@ -1,282 +1,255 @@
part of '../dart_appwrite.dart';
/// The Sites Service allows you view, create and manage your web applications.
/// The Sites Service allows you view, create and manage your web applications.
class Sites extends Service {
Sites(super.client);
Sites(super.client);
/// Get a list of all the project's sites. You can use the query params to
/// filter your results.
Future<models.SiteList> list(
{List<String>? queries, String? search, bool? total}) async {
final String apiPath = '/sites';
Future<models.SiteList> list({List<String>? queries, String? search, bool? total}) async {
final String apiPath = '/sites';
final Map<String, dynamic> apiParams = {
if (queries != null) 'queries': queries,
if (search != null) 'search': search,
if (total != null) 'total': total,
if (search != null) 'search': search,
if (total != null) 'total': total,
};
final Map<String, String> apiHeaders = {};
final Map<String, String> apiHeaders = {
};
final res = await client.call(HttpMethod.get,
path: apiPath, params: apiParams, headers: apiHeaders);
final res = await client.call(HttpMethod.get, path: apiPath, params: apiParams, headers: apiHeaders);
return models.SiteList.fromMap(res.data);
}
}
/// Create a new site.
Future<models.Site> create(
{required String siteId,
required String name,
required enums.Framework framework,
required enums.BuildRuntime buildRuntime,
bool? enabled,
bool? logging,
int? timeout,
String? installCommand,
String? buildCommand,
String? startCommand,
String? outputDirectory,
enums.Adapter? adapter,
String? installationId,
String? fallbackFile,
String? providerRepositoryId,
String? providerBranch,
bool? providerSilentMode,
String? providerRootDirectory,
String? buildSpecification,
String? runtimeSpecification,
int? deploymentRetention}) async {
final String apiPath = '/sites';
Future<models.Site> create({required String siteId, required String name, required enums.Framework framework, required enums.BuildRuntime buildRuntime, bool? enabled, bool? logging, int? timeout, String? installCommand, String? buildCommand, String? startCommand, String? outputDirectory, enums.Adapter? adapter, String? installationId, String? fallbackFile, String? providerRepositoryId, String? providerBranch, bool? providerSilentMode, String? providerRootDirectory, String? buildSpecification, String? runtimeSpecification, int? deploymentRetention}) async {
final String apiPath = '/sites';
final Map<String, dynamic> apiParams = {
'siteId': siteId,
'name': name,
'framework': framework.value,
if (enabled != null) 'enabled': enabled,
if (logging != null) 'logging': logging,
if (timeout != null) 'timeout': timeout,
if (installCommand != null) 'installCommand': installCommand,
if (buildCommand != null) 'buildCommand': buildCommand,
if (startCommand != null) 'startCommand': startCommand,
if (outputDirectory != null) 'outputDirectory': outputDirectory,
'buildRuntime': buildRuntime.value,
if (adapter != null) 'adapter': adapter.value,
if (installationId != null) 'installationId': installationId,
if (fallbackFile != null) 'fallbackFile': fallbackFile,
if (providerRepositoryId != null)
'providerRepositoryId': providerRepositoryId,
if (providerBranch != null) 'providerBranch': providerBranch,
if (providerSilentMode != null) 'providerSilentMode': providerSilentMode,
if (providerRootDirectory != null)
'providerRootDirectory': providerRootDirectory,
if (buildSpecification != null) 'buildSpecification': buildSpecification,
if (runtimeSpecification != null)
'runtimeSpecification': runtimeSpecification,
if (deploymentRetention != null)
'deploymentRetention': deploymentRetention,
'name': name,
'framework': framework.value,
if (enabled != null) 'enabled': enabled,
if (logging != null) 'logging': logging,
if (timeout != null) 'timeout': timeout,
if (installCommand != null) 'installCommand': installCommand,
if (buildCommand != null) 'buildCommand': buildCommand,
if (startCommand != null) 'startCommand': startCommand,
if (outputDirectory != null) 'outputDirectory': outputDirectory,
'buildRuntime': buildRuntime.value,
if (adapter != null) 'adapter': adapter.value,
if (installationId != null) 'installationId': installationId,
if (fallbackFile != null) 'fallbackFile': fallbackFile,
if (providerRepositoryId != null) 'providerRepositoryId': providerRepositoryId,
if (providerBranch != null) 'providerBranch': providerBranch,
if (providerSilentMode != null) 'providerSilentMode': providerSilentMode,
if (providerRootDirectory != null) 'providerRootDirectory': providerRootDirectory,
if (buildSpecification != null) 'buildSpecification': buildSpecification,
if (runtimeSpecification != null) 'runtimeSpecification': runtimeSpecification,
if (deploymentRetention != null) 'deploymentRetention': deploymentRetention,
};
final Map<String, String> apiHeaders = {
'content-type': 'application/json',
};
final res = await client.call(HttpMethod.post,
path: apiPath, params: apiParams, headers: apiHeaders);
final res = await client.call(HttpMethod.post, path: apiPath, params: apiParams, headers: apiHeaders);
return models.Site.fromMap(res.data);
}
}
/// Get a list of all frameworks that are currently available on the server
/// instance.
Future<models.FrameworkList> listFrameworks() async {
final String apiPath = '/sites/frameworks';
final Map<String, dynamic> apiParams = {};
final Map<String, String> apiHeaders = {};
final res = await client.call(HttpMethod.get,
path: apiPath, params: apiParams, headers: apiHeaders);
return models.FrameworkList.fromMap(res.data);
}
/// List allowed site specifications for this instance.
Future<models.SpecificationList> listSpecifications() async {
final String apiPath = '/sites/specifications';
final Map<String, dynamic> apiParams = {};
final Map<String, String> apiHeaders = {};
final res = await client.call(HttpMethod.get,
path: apiPath, params: apiParams, headers: apiHeaders);
return models.SpecificationList.fromMap(res.data);
}
/// Get a site by its unique ID.
Future<models.Site> get({required String siteId}) async {
final String apiPath = '/sites/{siteId}'.replaceAll('{siteId}', siteId);
final Map<String, dynamic> apiParams = {};
final Map<String, String> apiHeaders = {};
final res = await client.call(HttpMethod.get,
path: apiPath, params: apiParams, headers: apiHeaders);
return models.Site.fromMap(res.data);
}
/// Update site by its unique ID.
Future<models.Site> update(
{required String siteId,
required String name,
required enums.Framework framework,
bool? enabled,
bool? logging,
int? timeout,
String? installCommand,
String? buildCommand,
String? startCommand,
String? outputDirectory,
enums.BuildRuntime? buildRuntime,
enums.Adapter? adapter,
String? fallbackFile,
String? installationId,
String? providerRepositoryId,
String? providerBranch,
bool? providerSilentMode,
String? providerRootDirectory,
String? buildSpecification,
String? runtimeSpecification,
int? deploymentRetention}) async {
final String apiPath = '/sites/{siteId}'.replaceAll('{siteId}', siteId);
Future<models.FrameworkList> listFrameworks() async {
final String apiPath = '/sites/frameworks';
final Map<String, dynamic> apiParams = {
'name': name,
'framework': framework.value,
if (enabled != null) 'enabled': enabled,
if (logging != null) 'logging': logging,
if (timeout != null) 'timeout': timeout,
if (installCommand != null) 'installCommand': installCommand,
if (buildCommand != null) 'buildCommand': buildCommand,
if (startCommand != null) 'startCommand': startCommand,
if (outputDirectory != null) 'outputDirectory': outputDirectory,
if (buildRuntime != null) 'buildRuntime': buildRuntime.value,
if (adapter != null) 'adapter': adapter.value,
if (fallbackFile != null) 'fallbackFile': fallbackFile,
if (installationId != null) 'installationId': installationId,
if (providerRepositoryId != null)
'providerRepositoryId': providerRepositoryId,
if (providerBranch != null) 'providerBranch': providerBranch,
if (providerSilentMode != null) 'providerSilentMode': providerSilentMode,
if (providerRootDirectory != null)
'providerRootDirectory': providerRootDirectory,
if (buildSpecification != null) 'buildSpecification': buildSpecification,
if (runtimeSpecification != null)
'runtimeSpecification': runtimeSpecification,
if (deploymentRetention != null)
'deploymentRetention': deploymentRetention,
};
final Map<String, String> apiHeaders = {
'content-type': 'application/json',
};
final res = await client.call(HttpMethod.put,
path: apiPath, params: apiParams, headers: apiHeaders);
final res = await client.call(HttpMethod.get, path: apiPath, params: apiParams, headers: apiHeaders);
return models.FrameworkList.fromMap(res.data);
}
/// List allowed site specifications for this instance.
Future<models.SpecificationList> listSpecifications() async {
final String apiPath = '/sites/specifications';
final Map<String, dynamic> apiParams = {
};
final Map<String, String> apiHeaders = {
};
final res = await client.call(HttpMethod.get, path: apiPath, params: apiParams, headers: apiHeaders);
return models.SpecificationList.fromMap(res.data);
}
/// Get a site by its unique ID.
Future<models.Site> get({required String siteId}) async {
final String apiPath = '/sites/{siteId}'.replaceAll('{siteId}', siteId);
final Map<String, dynamic> apiParams = {
};
final Map<String, String> apiHeaders = {
};
final res = await client.call(HttpMethod.get, path: apiPath, params: apiParams, headers: apiHeaders);
return models.Site.fromMap(res.data);
}
/// Delete a site by its unique ID.
Future delete({required String siteId}) async {
final String apiPath = '/sites/{siteId}'.replaceAll('{siteId}', siteId);
}
final Map<String, dynamic> apiParams = {};
/// Update site by its unique ID.
Future<models.Site> update({required String siteId, required String name, required enums.Framework framework, bool? enabled, bool? logging, int? timeout, String? installCommand, String? buildCommand, String? startCommand, String? outputDirectory, enums.BuildRuntime? buildRuntime, enums.Adapter? adapter, String? fallbackFile, String? installationId, String? providerRepositoryId, String? providerBranch, bool? providerSilentMode, String? providerRootDirectory, String? buildSpecification, String? runtimeSpecification, int? deploymentRetention}) async {
final String apiPath = '/sites/{siteId}'.replaceAll('{siteId}', siteId);
final Map<String, dynamic> apiParams = {
'name': name,
'framework': framework.value,
if (enabled != null) 'enabled': enabled,
if (logging != null) 'logging': logging,
if (timeout != null) 'timeout': timeout,
if (installCommand != null) 'installCommand': installCommand,
if (buildCommand != null) 'buildCommand': buildCommand,
if (startCommand != null) 'startCommand': startCommand,
if (outputDirectory != null) 'outputDirectory': outputDirectory,
if (buildRuntime != null) 'buildRuntime': buildRuntime.value,
if (adapter != null) 'adapter': adapter.value,
if (fallbackFile != null) 'fallbackFile': fallbackFile,
if (installationId != null) 'installationId': installationId,
if (providerRepositoryId != null) 'providerRepositoryId': providerRepositoryId,
if (providerBranch != null) 'providerBranch': providerBranch,
if (providerSilentMode != null) 'providerSilentMode': providerSilentMode,
if (providerRootDirectory != null) 'providerRootDirectory': providerRootDirectory,
if (buildSpecification != null) 'buildSpecification': buildSpecification,
if (runtimeSpecification != null) 'runtimeSpecification': runtimeSpecification,
if (deploymentRetention != null) 'deploymentRetention': deploymentRetention,
};
final Map<String, String> apiHeaders = {
'content-type': 'application/json',
};
final res = await client.call(HttpMethod.delete,
path: apiPath, params: apiParams, headers: apiHeaders);
final res = await client.call(HttpMethod.put, path: apiPath, params: apiParams, headers: apiHeaders);
return models.Site.fromMap(res.data);
}
/// Delete a site by its unique ID.
Future delete({required String siteId}) async {
final String apiPath = '/sites/{siteId}'.replaceAll('{siteId}', siteId);
final Map<String, dynamic> apiParams = {
};
final Map<String, String> apiHeaders = {
'content-type': 'application/json',
};
final res = await client.call(HttpMethod.delete, path: apiPath, params: apiParams, headers: apiHeaders);
return res.data;
}
}
/// Update the site active deployment. Use this endpoint to switch the code
/// deployment that should be used when visitor opens your site.
Future<models.Site> updateSiteDeployment(
{required String siteId, required String deploymentId}) async {
final String apiPath =
'/sites/{siteId}/deployment'.replaceAll('{siteId}', siteId);
Future<models.Site> updateSiteDeployment({required String siteId, required String deploymentId}) async {
final String apiPath = '/sites/{siteId}/deployment'.replaceAll('{siteId}', siteId);
final Map<String, dynamic> apiParams = {
'deploymentId': deploymentId,
};
final Map<String, String> apiHeaders = {
'content-type': 'application/json',
};
final res = await client.call(HttpMethod.patch,
path: apiPath, params: apiParams, headers: apiHeaders);
final res = await client.call(HttpMethod.patch, path: apiPath, params: apiParams, headers: apiHeaders);
return models.Site.fromMap(res.data);
}
}
/// Get a list of all the site's code deployments. You can use the query params
/// to filter your results.
Future<models.DeploymentList> listDeployments(
{required String siteId,
List<String>? queries,
String? search,
bool? total}) async {
final String apiPath =
'/sites/{siteId}/deployments'.replaceAll('{siteId}', siteId);
Future<models.DeploymentList> listDeployments({required String siteId, List<String>? queries, String? search, bool? total}) async {
final String apiPath = '/sites/{siteId}/deployments'.replaceAll('{siteId}', siteId);
final Map<String, dynamic> apiParams = {
if (queries != null) 'queries': queries,
if (search != null) 'search': search,
if (total != null) 'total': total,
if (search != null) 'search': search,
if (total != null) 'total': total,
};
final Map<String, String> apiHeaders = {};
final Map<String, String> apiHeaders = {
};
final res = await client.call(HttpMethod.get,
path: apiPath, params: apiParams, headers: apiHeaders);
final res = await client.call(HttpMethod.get, path: apiPath, params: apiParams, headers: apiHeaders);
return models.DeploymentList.fromMap(res.data);
}
}
/// Create a new site code deployment. Use this endpoint to upload a new
/// version of your site code. To activate your newly uploaded code, you'll
/// need to update the site's deployment to use your new deployment ID.
Future<models.Deployment> createDeployment(
{required String siteId,
required InputFile code,
String? installCommand,
String? buildCommand,
String? outputDirectory,
bool? activate,
Function(UploadProgress)? onProgress}) async {
final String apiPath =
'/sites/{siteId}/deployments'.replaceAll('{siteId}', siteId);
Future<models.Deployment> createDeployment({required String siteId, required InputFile code, String? installCommand, String? buildCommand, String? outputDirectory, bool? activate, Function(UploadProgress)? onProgress}) async {
final String apiPath = '/sites/{siteId}/deployments'.replaceAll('{siteId}', siteId);
final Map<String, dynamic> apiParams = {
if (installCommand != null) 'installCommand': installCommand,
if (buildCommand != null) 'buildCommand': buildCommand,
if (outputDirectory != null) 'outputDirectory': outputDirectory,
'code': code,
if (activate != null) 'activate': activate,
if (buildCommand != null) 'buildCommand': buildCommand,
if (outputDirectory != null) 'outputDirectory': outputDirectory,
'code': code,
if (activate != null) 'activate': activate,
};
final Map<String, String> apiHeaders = {
'content-type': 'multipart/form-data',
};
String idParamName = '';
@@ -291,331 +264,333 @@ class Sites extends Service {
);
return models.Deployment.fromMap(res.data);
}
}
/// Create a new build for an existing site deployment. This endpoint allows
/// you to rebuild a deployment with the updated site configuration, including
/// its commands and output directory if they have been modified. The build
/// process will be queued and executed asynchronously. The original
/// deployment's code will be preserved and used for the new build.
Future<models.Deployment> createDuplicateDeployment(
{required String siteId, required String deploymentId}) async {
final String apiPath =
'/sites/{siteId}/deployments/duplicate'.replaceAll('{siteId}', siteId);
Future<models.Deployment> createDuplicateDeployment({required String siteId, required String deploymentId}) async {
final String apiPath = '/sites/{siteId}/deployments/duplicate'.replaceAll('{siteId}', siteId);
final Map<String, dynamic> apiParams = {
'deploymentId': deploymentId,
};
final Map<String, String> apiHeaders = {
'content-type': 'application/json',
};
final res = await client.call(HttpMethod.post,
path: apiPath, params: apiParams, headers: apiHeaders);
final res = await client.call(HttpMethod.post, path: apiPath, params: apiParams, headers: apiHeaders);
return models.Deployment.fromMap(res.data);
}
}
/// Create a deployment based on a template.
///
///
/// Use this endpoint with combination of
/// [listTemplates](https://appwrite.io/docs/products/sites/templates) to find
/// the template details.
Future<models.Deployment> createTemplateDeployment(
{required String siteId,
required String repository,
required String owner,
required String rootDirectory,
required enums.TemplateReferenceType type,
required String reference,
bool? activate}) async {
final String apiPath =
'/sites/{siteId}/deployments/template'.replaceAll('{siteId}', siteId);
Future<models.Deployment> createTemplateDeployment({required String siteId, required String repository, required String owner, required String rootDirectory, required enums.TemplateReferenceType type, required String reference, bool? activate}) async {
final String apiPath = '/sites/{siteId}/deployments/template'.replaceAll('{siteId}', siteId);
final Map<String, dynamic> apiParams = {
'repository': repository,
'owner': owner,
'rootDirectory': rootDirectory,
'type': type.value,
'reference': reference,
if (activate != null) 'activate': activate,
'owner': owner,
'rootDirectory': rootDirectory,
'type': type.value,
'reference': reference,
if (activate != null) 'activate': activate,
};
final Map<String, String> apiHeaders = {
'content-type': 'application/json',
};
final res = await client.call(HttpMethod.post,
path: apiPath, params: apiParams, headers: apiHeaders);
final res = await client.call(HttpMethod.post, path: apiPath, params: apiParams, headers: apiHeaders);
return models.Deployment.fromMap(res.data);
}
}
/// Create a deployment when a site is connected to VCS.
///
///
/// This endpoint lets you create deployment from a branch, commit, or a tag.
Future<models.Deployment> createVcsDeployment(
{required String siteId,
required enums.VCSReferenceType type,
required String reference,
bool? activate}) async {
final String apiPath =
'/sites/{siteId}/deployments/vcs'.replaceAll('{siteId}', siteId);
Future<models.Deployment> createVcsDeployment({required String siteId, required enums.VCSReferenceType type, required String reference, bool? activate}) async {
final String apiPath = '/sites/{siteId}/deployments/vcs'.replaceAll('{siteId}', siteId);
final Map<String, dynamic> apiParams = {
'type': type.value,
'reference': reference,
if (activate != null) 'activate': activate,
'reference': reference,
if (activate != null) 'activate': activate,
};
final Map<String, String> apiHeaders = {
'content-type': 'application/json',
};
final res = await client.call(HttpMethod.post,
path: apiPath, params: apiParams, headers: apiHeaders);
final res = await client.call(HttpMethod.post, path: apiPath, params: apiParams, headers: apiHeaders);
return models.Deployment.fromMap(res.data);
}
}
/// Get a site deployment by its unique ID.
Future<models.Deployment> getDeployment(
{required String siteId, required String deploymentId}) async {
final String apiPath = '/sites/{siteId}/deployments/{deploymentId}'
.replaceAll('{siteId}', siteId)
.replaceAll('{deploymentId}', deploymentId);
Future<models.Deployment> getDeployment({required String siteId, required String deploymentId}) async {
final String apiPath = '/sites/{siteId}/deployments/{deploymentId}'.replaceAll('{siteId}', siteId).replaceAll('{deploymentId}', deploymentId);
final Map<String, dynamic> apiParams = {};
final Map<String, dynamic> apiParams = {
};
final Map<String, String> apiHeaders = {};
final Map<String, String> apiHeaders = {
};
final res = await client.call(HttpMethod.get,
path: apiPath, params: apiParams, headers: apiHeaders);
final res = await client.call(HttpMethod.get, path: apiPath, params: apiParams, headers: apiHeaders);
return models.Deployment.fromMap(res.data);
}
}
/// Delete a site deployment by its unique ID.
Future deleteDeployment(
{required String siteId, required String deploymentId}) async {
final String apiPath = '/sites/{siteId}/deployments/{deploymentId}'
.replaceAll('{siteId}', siteId)
.replaceAll('{deploymentId}', deploymentId);
Future deleteDeployment({required String siteId, required String deploymentId}) async {
final String apiPath = '/sites/{siteId}/deployments/{deploymentId}'.replaceAll('{siteId}', siteId).replaceAll('{deploymentId}', deploymentId);
final Map<String, dynamic> apiParams = {};
final Map<String, dynamic> apiParams = {
};
final Map<String, String> apiHeaders = {
'content-type': 'application/json',
};
final res = await client.call(HttpMethod.delete,
path: apiPath, params: apiParams, headers: apiHeaders);
final res = await client.call(HttpMethod.delete, path: apiPath, params: apiParams, headers: apiHeaders);
return res.data;
}
}
/// Get a site deployment content by its unique ID. The endpoint response
/// return with a 'Content-Disposition: attachment' header that tells the
/// browser to start downloading the file to user downloads directory.
Future<Uint8List> getDeploymentDownload(
{required String siteId,
required String deploymentId,
enums.DeploymentDownloadType? type}) async {
final String apiPath = '/sites/{siteId}/deployments/{deploymentId}/download'
.replaceAll('{siteId}', siteId)
.replaceAll('{deploymentId}', deploymentId);
Future<Uint8List> getDeploymentDownload({required String siteId, required String deploymentId, enums.DeploymentDownloadType? type}) async {
final String apiPath = '/sites/{siteId}/deployments/{deploymentId}/download'.replaceAll('{siteId}', siteId).replaceAll('{deploymentId}', deploymentId);
final Map<String, dynamic> params = {
if (type != null) 'type': type.value,
'project': client.config['project'],
'key': client.config['key'],
};
final res = await client.call(HttpMethod.get,
path: apiPath, params: params, responseType: ResponseType.bytes);
final res = await client.call(HttpMethod.get, path: apiPath, params: params, responseType: ResponseType.bytes);
return res.data;
}
}
/// Cancel an ongoing site deployment build. If the build is already in
/// progress, it will be stopped and marked as canceled. If the build hasn't
/// started yet, it will be marked as canceled without executing. You cannot
/// cancel builds that have already completed (status 'ready') or failed. The
/// response includes the final build status and details.
Future<models.Deployment> updateDeploymentStatus(
{required String siteId, required String deploymentId}) async {
final String apiPath = '/sites/{siteId}/deployments/{deploymentId}/status'
.replaceAll('{siteId}', siteId)
.replaceAll('{deploymentId}', deploymentId);
Future<models.Deployment> updateDeploymentStatus({required String siteId, required String deploymentId}) async {
final String apiPath = '/sites/{siteId}/deployments/{deploymentId}/status'.replaceAll('{siteId}', siteId).replaceAll('{deploymentId}', deploymentId);
final Map<String, dynamic> apiParams = {};
final Map<String, dynamic> apiParams = {
};
final Map<String, String> apiHeaders = {
'content-type': 'application/json',
};
final res = await client.call(HttpMethod.patch,
path: apiPath, params: apiParams, headers: apiHeaders);
final res = await client.call(HttpMethod.patch, path: apiPath, params: apiParams, headers: apiHeaders);
return models.Deployment.fromMap(res.data);
}
}
/// Get a list of all site logs. You can use the query params to filter your
/// results.
Future<models.ExecutionList> listLogs(
{required String siteId, List<String>? queries, bool? total}) async {
final String apiPath =
'/sites/{siteId}/logs'.replaceAll('{siteId}', siteId);
Future<models.ExecutionList> listLogs({required String siteId, List<String>? queries, bool? total}) async {
final String apiPath = '/sites/{siteId}/logs'.replaceAll('{siteId}', siteId);
final Map<String, dynamic> apiParams = {
if (queries != null) 'queries': queries,
if (total != null) 'total': total,
if (total != null) 'total': total,
};
final Map<String, String> apiHeaders = {};
final Map<String, String> apiHeaders = {
};
final res = await client.call(HttpMethod.get,
path: apiPath, params: apiParams, headers: apiHeaders);
final res = await client.call(HttpMethod.get, path: apiPath, params: apiParams, headers: apiHeaders);
return models.ExecutionList.fromMap(res.data);
}
}
/// Get a site request log by its unique ID.
Future<models.Execution> getLog(
{required String siteId, required String logId}) async {
final String apiPath = '/sites/{siteId}/logs/{logId}'
.replaceAll('{siteId}', siteId)
.replaceAll('{logId}', logId);
Future<models.Execution> getLog({required String siteId, required String logId}) async {
final String apiPath = '/sites/{siteId}/logs/{logId}'.replaceAll('{siteId}', siteId).replaceAll('{logId}', logId);
final Map<String, dynamic> apiParams = {};
final Map<String, dynamic> apiParams = {
};
final Map<String, String> apiHeaders = {};
final Map<String, String> apiHeaders = {
};
final res = await client.call(HttpMethod.get,
path: apiPath, params: apiParams, headers: apiHeaders);
final res = await client.call(HttpMethod.get, path: apiPath, params: apiParams, headers: apiHeaders);
return models.Execution.fromMap(res.data);
}
}
/// Delete a site log by its unique ID.
Future deleteLog({required String siteId, required String logId}) async {
final String apiPath = '/sites/{siteId}/logs/{logId}'
.replaceAll('{siteId}', siteId)
.replaceAll('{logId}', logId);
Future deleteLog({required String siteId, required String logId}) async {
final String apiPath = '/sites/{siteId}/logs/{logId}'.replaceAll('{siteId}', siteId).replaceAll('{logId}', logId);
final Map<String, dynamic> apiParams = {};
final Map<String, dynamic> apiParams = {
};
final Map<String, String> apiHeaders = {
'content-type': 'application/json',
};
final res = await client.call(HttpMethod.delete,
path: apiPath, params: apiParams, headers: apiHeaders);
final res = await client.call(HttpMethod.delete, path: apiPath, params: apiParams, headers: apiHeaders);
return res.data;
}
}
/// Get a list of all variables of a specific site.
Future<models.VariableList> listVariables({required String siteId}) async {
final String apiPath =
'/sites/{siteId}/variables'.replaceAll('{siteId}', siteId);
Future<models.VariableList> listVariables({required String siteId}) async {
final String apiPath = '/sites/{siteId}/variables'.replaceAll('{siteId}', siteId);
final Map<String, dynamic> apiParams = {};
final Map<String, dynamic> apiParams = {
};
final Map<String, String> apiHeaders = {};
final Map<String, String> apiHeaders = {
};
final res = await client.call(HttpMethod.get,
path: apiPath, params: apiParams, headers: apiHeaders);
final res = await client.call(HttpMethod.get, path: apiPath, params: apiParams, headers: apiHeaders);
return models.VariableList.fromMap(res.data);
}
}
/// Create a new site variable. These variables can be accessed during build
/// and runtime (server-side rendering) as environment variables.
Future<models.Variable> createVariable(
{required String siteId,
required String key,
required String value,
bool? secret}) async {
final String apiPath =
'/sites/{siteId}/variables'.replaceAll('{siteId}', siteId);
Future<models.Variable> createVariable({required String siteId, required String key, required String value, bool? secret}) async {
final String apiPath = '/sites/{siteId}/variables'.replaceAll('{siteId}', siteId);
final Map<String, dynamic> apiParams = {
'key': key,
'value': value,
if (secret != null) 'secret': secret,
'value': value,
if (secret != null) 'secret': secret,
};
final Map<String, String> apiHeaders = {
'content-type': 'application/json',
};
final res = await client.call(HttpMethod.post,
path: apiPath, params: apiParams, headers: apiHeaders);
final res = await client.call(HttpMethod.post, path: apiPath, params: apiParams, headers: apiHeaders);
return models.Variable.fromMap(res.data);
}
}
/// Get a variable by its unique ID.
Future<models.Variable> getVariable(
{required String siteId, required String variableId}) async {
final String apiPath = '/sites/{siteId}/variables/{variableId}'
.replaceAll('{siteId}', siteId)
.replaceAll('{variableId}', variableId);
final Map<String, dynamic> apiParams = {};
final Map<String, String> apiHeaders = {};
final res = await client.call(HttpMethod.get,
path: apiPath, params: apiParams, headers: apiHeaders);
return models.Variable.fromMap(res.data);
}
/// Update variable by its unique ID.
Future<models.Variable> updateVariable(
{required String siteId,
required String variableId,
required String key,
String? value,
bool? secret}) async {
final String apiPath = '/sites/{siteId}/variables/{variableId}'
.replaceAll('{siteId}', siteId)
.replaceAll('{variableId}', variableId);
Future<models.Variable> getVariable({required String siteId, required String variableId}) async {
final String apiPath = '/sites/{siteId}/variables/{variableId}'.replaceAll('{siteId}', siteId).replaceAll('{variableId}', variableId);
final Map<String, dynamic> apiParams = {
'key': key,
'value': value,
'secret': secret,
};
final Map<String, String> apiHeaders = {
'content-type': 'application/json',
};
final res = await client.call(HttpMethod.put,
path: apiPath, params: apiParams, headers: apiHeaders);
final res = await client.call(HttpMethod.get, path: apiPath, params: apiParams, headers: apiHeaders);
return models.Variable.fromMap(res.data);
}
/// Delete a variable by its unique ID.
Future deleteVariable(
{required String siteId, required String variableId}) async {
final String apiPath = '/sites/{siteId}/variables/{variableId}'
.replaceAll('{siteId}', siteId)
.replaceAll('{variableId}', variableId);
}
final Map<String, dynamic> apiParams = {};
/// Update variable by its unique ID.
Future<models.Variable> updateVariable({required String siteId, required String variableId, required String key, String? value, bool? secret}) async {
final String apiPath = '/sites/{siteId}/variables/{variableId}'.replaceAll('{siteId}', siteId).replaceAll('{variableId}', variableId);
final Map<String, dynamic> apiParams = {
'key': key,
'value': value,
'secret': secret,
};
final Map<String, String> apiHeaders = {
'content-type': 'application/json',
};
final res = await client.call(HttpMethod.delete,
path: apiPath, params: apiParams, headers: apiHeaders);
final res = await client.call(HttpMethod.put, path: apiPath, params: apiParams, headers: apiHeaders);
return models.Variable.fromMap(res.data);
}
/// Delete a variable by its unique ID.
Future deleteVariable({required String siteId, required String variableId}) async {
final String apiPath = '/sites/{siteId}/variables/{variableId}'.replaceAll('{siteId}', siteId).replaceAll('{variableId}', variableId);
final Map<String, dynamic> apiParams = {
};
final Map<String, String> apiHeaders = {
'content-type': 'application/json',
};
final res = await client.call(HttpMethod.delete, path: apiPath, params: apiParams, headers: apiHeaders);
return res.data;
}
}
}
}
+167 -197
View File
@@ -1,201 +1,188 @@
part of '../dart_appwrite.dart';
/// The Storage service allows you to manage your project files.
/// The Storage service allows you to manage your project files.
class Storage extends Service {
Storage(super.client);
Storage(super.client);
/// Get a list of all the storage buckets. You can use the query params to
/// filter your results.
Future<models.BucketList> listBuckets(
{List<String>? queries, String? search, bool? total}) async {
final String apiPath = '/storage/buckets';
Future<models.BucketList> listBuckets({List<String>? queries, String? search, bool? total}) async {
final String apiPath = '/storage/buckets';
final Map<String, dynamic> apiParams = {
if (queries != null) 'queries': queries,
if (search != null) 'search': search,
if (total != null) 'total': total,
if (search != null) 'search': search,
if (total != null) 'total': total,
};
final Map<String, String> apiHeaders = {};
final Map<String, String> apiHeaders = {
};
final res = await client.call(HttpMethod.get,
path: apiPath, params: apiParams, headers: apiHeaders);
final res = await client.call(HttpMethod.get, path: apiPath, params: apiParams, headers: apiHeaders);
return models.BucketList.fromMap(res.data);
}
}
/// Create a new storage bucket.
Future<models.Bucket> createBucket(
{required String bucketId,
required String name,
List<String>? permissions,
bool? fileSecurity,
bool? enabled,
int? maximumFileSize,
List<String>? allowedFileExtensions,
enums.Compression? compression,
bool? encryption,
bool? antivirus,
bool? transformations}) async {
final String apiPath = '/storage/buckets';
Future<models.Bucket> createBucket({required String bucketId, required String name, List<String>? permissions, bool? fileSecurity, bool? enabled, int? maximumFileSize, List<String>? allowedFileExtensions, enums.Compression? compression, bool? encryption, bool? antivirus, bool? transformations}) async {
final String apiPath = '/storage/buckets';
final Map<String, dynamic> apiParams = {
'bucketId': bucketId,
'name': name,
'permissions': permissions,
if (fileSecurity != null) 'fileSecurity': fileSecurity,
if (enabled != null) 'enabled': enabled,
if (maximumFileSize != null) 'maximumFileSize': maximumFileSize,
if (allowedFileExtensions != null)
'allowedFileExtensions': allowedFileExtensions,
if (compression != null) 'compression': compression.value,
if (encryption != null) 'encryption': encryption,
if (antivirus != null) 'antivirus': antivirus,
if (transformations != null) 'transformations': transformations,
'name': name,
'permissions': permissions,
if (fileSecurity != null) 'fileSecurity': fileSecurity,
if (enabled != null) 'enabled': enabled,
if (maximumFileSize != null) 'maximumFileSize': maximumFileSize,
if (allowedFileExtensions != null) 'allowedFileExtensions': allowedFileExtensions,
if (compression != null) 'compression': compression.value,
if (encryption != null) 'encryption': encryption,
if (antivirus != null) 'antivirus': antivirus,
if (transformations != null) 'transformations': transformations,
};
final Map<String, String> apiHeaders = {
'content-type': 'application/json',
};
final res = await client.call(HttpMethod.post,
path: apiPath, params: apiParams, headers: apiHeaders);
final res = await client.call(HttpMethod.post, path: apiPath, params: apiParams, headers: apiHeaders);
return models.Bucket.fromMap(res.data);
}
}
/// Get a storage bucket by its unique ID. This endpoint response returns a
/// JSON object with the storage bucket metadata.
Future<models.Bucket> getBucket({required String bucketId}) async {
final String apiPath =
'/storage/buckets/{bucketId}'.replaceAll('{bucketId}', bucketId);
final Map<String, dynamic> apiParams = {};
final Map<String, String> apiHeaders = {};
final res = await client.call(HttpMethod.get,
path: apiPath, params: apiParams, headers: apiHeaders);
return models.Bucket.fromMap(res.data);
}
/// Update a storage bucket by its unique ID.
Future<models.Bucket> updateBucket(
{required String bucketId,
required String name,
List<String>? permissions,
bool? fileSecurity,
bool? enabled,
int? maximumFileSize,
List<String>? allowedFileExtensions,
enums.Compression? compression,
bool? encryption,
bool? antivirus,
bool? transformations}) async {
final String apiPath =
'/storage/buckets/{bucketId}'.replaceAll('{bucketId}', bucketId);
Future<models.Bucket> getBucket({required String bucketId}) async {
final String apiPath = '/storage/buckets/{bucketId}'.replaceAll('{bucketId}', bucketId);
final Map<String, dynamic> apiParams = {
'name': name,
'permissions': permissions,
if (fileSecurity != null) 'fileSecurity': fileSecurity,
if (enabled != null) 'enabled': enabled,
if (maximumFileSize != null) 'maximumFileSize': maximumFileSize,
if (allowedFileExtensions != null)
'allowedFileExtensions': allowedFileExtensions,
if (compression != null) 'compression': compression.value,
if (encryption != null) 'encryption': encryption,
if (antivirus != null) 'antivirus': antivirus,
if (transformations != null) 'transformations': transformations,
};
final Map<String, String> apiHeaders = {
'content-type': 'application/json',
};
final res = await client.call(HttpMethod.put,
path: apiPath, params: apiParams, headers: apiHeaders);
final res = await client.call(HttpMethod.get, path: apiPath, params: apiParams, headers: apiHeaders);
return models.Bucket.fromMap(res.data);
}
/// Delete a storage bucket by its unique ID.
Future deleteBucket({required String bucketId}) async {
final String apiPath =
'/storage/buckets/{bucketId}'.replaceAll('{bucketId}', bucketId);
}
final Map<String, dynamic> apiParams = {};
/// Update a storage bucket by its unique ID.
Future<models.Bucket> updateBucket({required String bucketId, required String name, List<String>? permissions, bool? fileSecurity, bool? enabled, int? maximumFileSize, List<String>? allowedFileExtensions, enums.Compression? compression, bool? encryption, bool? antivirus, bool? transformations}) async {
final String apiPath = '/storage/buckets/{bucketId}'.replaceAll('{bucketId}', bucketId);
final Map<String, dynamic> apiParams = {
'name': name,
'permissions': permissions,
if (fileSecurity != null) 'fileSecurity': fileSecurity,
if (enabled != null) 'enabled': enabled,
if (maximumFileSize != null) 'maximumFileSize': maximumFileSize,
if (allowedFileExtensions != null) 'allowedFileExtensions': allowedFileExtensions,
if (compression != null) 'compression': compression.value,
if (encryption != null) 'encryption': encryption,
if (antivirus != null) 'antivirus': antivirus,
if (transformations != null) 'transformations': transformations,
};
final Map<String, String> apiHeaders = {
'content-type': 'application/json',
};
final res = await client.call(HttpMethod.delete,
path: apiPath, params: apiParams, headers: apiHeaders);
final res = await client.call(HttpMethod.put, path: apiPath, params: apiParams, headers: apiHeaders);
return models.Bucket.fromMap(res.data);
}
/// Delete a storage bucket by its unique ID.
Future deleteBucket({required String bucketId}) async {
final String apiPath = '/storage/buckets/{bucketId}'.replaceAll('{bucketId}', bucketId);
final Map<String, dynamic> apiParams = {
};
final Map<String, String> apiHeaders = {
'content-type': 'application/json',
};
final res = await client.call(HttpMethod.delete, path: apiPath, params: apiParams, headers: apiHeaders);
return res.data;
}
}
/// Get a list of all the user files. You can use the query params to filter
/// your results.
Future<models.FileList> listFiles(
{required String bucketId,
List<String>? queries,
String? search,
bool? total}) async {
final String apiPath =
'/storage/buckets/{bucketId}/files'.replaceAll('{bucketId}', bucketId);
Future<models.FileList> listFiles({required String bucketId, List<String>? queries, String? search, bool? total}) async {
final String apiPath = '/storage/buckets/{bucketId}/files'.replaceAll('{bucketId}', bucketId);
final Map<String, dynamic> apiParams = {
if (queries != null) 'queries': queries,
if (search != null) 'search': search,
if (total != null) 'total': total,
if (search != null) 'search': search,
if (total != null) 'total': total,
};
final Map<String, String> apiHeaders = {};
final Map<String, String> apiHeaders = {
};
final res = await client.call(HttpMethod.get,
path: apiPath, params: apiParams, headers: apiHeaders);
final res = await client.call(HttpMethod.get, path: apiPath, params: apiParams, headers: apiHeaders);
return models.FileList.fromMap(res.data);
}
}
/// Create a new file. Before using this route, you should create a new bucket
/// resource using either a [server
/// integration](https://appwrite.io/docs/server/storage#storageCreateBucket)
/// API or directly from your Appwrite console.
///
///
/// Larger files should be uploaded using multiple requests with the
/// [content-range](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Range)
/// header to send a partial request with a maximum supported chunk of `5MB`.
/// The `content-range` header values should always be in bytes.
///
///
/// When the first request is sent, the server will return the **File** object,
/// and the subsequent part request must include the file's **id** in
/// `x-appwrite-id` header to allow the server to know that the partial upload
/// is for the existing file and not for a new one.
///
///
/// If you're creating a new file using one of the Appwrite SDKs, all the
/// chunking logic will be managed by the SDK internally.
///
Future<models.File> createFile(
{required String bucketId,
required String fileId,
required InputFile file,
List<String>? permissions,
Function(UploadProgress)? onProgress}) async {
final String apiPath =
'/storage/buckets/{bucketId}/files'.replaceAll('{bucketId}', bucketId);
///
Future<models.File> createFile({required String bucketId, required String fileId, required InputFile file, List<String>? permissions, Function(UploadProgress)? onProgress}) async {
final String apiPath = '/storage/buckets/{bucketId}/files'.replaceAll('{bucketId}', bucketId);
final Map<String, dynamic> apiParams = {
'fileId': fileId,
'file': file,
if (permissions != null) 'permissions': permissions,
'file': file,
if (permissions != null) 'permissions': permissions,
};
final Map<String, String> apiHeaders = {
'content-type': 'multipart/form-data',
};
String idParamName = '';
@@ -211,154 +198,137 @@ class Storage extends Service {
);
return models.File.fromMap(res.data);
}
}
/// Get a file by its unique ID. This endpoint response returns a JSON object
/// with the file metadata.
Future<models.File> getFile(
{required String bucketId, required String fileId}) async {
final String apiPath = '/storage/buckets/{bucketId}/files/{fileId}'
.replaceAll('{bucketId}', bucketId)
.replaceAll('{fileId}', fileId);
Future<models.File> getFile({required String bucketId, required String fileId}) async {
final String apiPath = '/storage/buckets/{bucketId}/files/{fileId}'.replaceAll('{bucketId}', bucketId).replaceAll('{fileId}', fileId);
final Map<String, dynamic> apiParams = {};
final Map<String, dynamic> apiParams = {
};
final Map<String, String> apiHeaders = {};
final Map<String, String> apiHeaders = {
};
final res = await client.call(HttpMethod.get,
path: apiPath, params: apiParams, headers: apiHeaders);
final res = await client.call(HttpMethod.get, path: apiPath, params: apiParams, headers: apiHeaders);
return models.File.fromMap(res.data);
}
}
/// Update a file by its unique ID. Only users with write permissions have
/// access to update this resource.
Future<models.File> updateFile(
{required String bucketId,
required String fileId,
String? name,
List<String>? permissions}) async {
final String apiPath = '/storage/buckets/{bucketId}/files/{fileId}'
.replaceAll('{bucketId}', bucketId)
.replaceAll('{fileId}', fileId);
Future<models.File> updateFile({required String bucketId, required String fileId, String? name, List<String>? permissions}) async {
final String apiPath = '/storage/buckets/{bucketId}/files/{fileId}'.replaceAll('{bucketId}', bucketId).replaceAll('{fileId}', fileId);
final Map<String, dynamic> apiParams = {
if (name != null) 'name': name,
'permissions': permissions,
'permissions': permissions,
};
final Map<String, String> apiHeaders = {
'content-type': 'application/json',
};
final res = await client.call(HttpMethod.put,
path: apiPath, params: apiParams, headers: apiHeaders);
final res = await client.call(HttpMethod.put, path: apiPath, params: apiParams, headers: apiHeaders);
return models.File.fromMap(res.data);
}
}
/// Delete a file by its unique ID. Only users with write permissions have
/// access to delete this resource.
Future deleteFile({required String bucketId, required String fileId}) async {
final String apiPath = '/storage/buckets/{bucketId}/files/{fileId}'
.replaceAll('{bucketId}', bucketId)
.replaceAll('{fileId}', fileId);
Future deleteFile({required String bucketId, required String fileId}) async {
final String apiPath = '/storage/buckets/{bucketId}/files/{fileId}'.replaceAll('{bucketId}', bucketId).replaceAll('{fileId}', fileId);
final Map<String, dynamic> apiParams = {};
final Map<String, dynamic> apiParams = {
};
final Map<String, String> apiHeaders = {
'content-type': 'application/json',
};
final res = await client.call(HttpMethod.delete,
path: apiPath, params: apiParams, headers: apiHeaders);
final res = await client.call(HttpMethod.delete, path: apiPath, params: apiParams, headers: apiHeaders);
return res.data;
}
}
/// Get a file content by its unique ID. The endpoint response return with a
/// 'Content-Disposition: attachment' header that tells the browser to start
/// downloading the file to user downloads directory.
Future<Uint8List> getFileDownload(
{required String bucketId, required String fileId, String? token}) async {
final String apiPath = '/storage/buckets/{bucketId}/files/{fileId}/download'
.replaceAll('{bucketId}', bucketId)
.replaceAll('{fileId}', fileId);
Future<Uint8List> getFileDownload({required String bucketId, required String fileId, String? token}) async {
final String apiPath = '/storage/buckets/{bucketId}/files/{fileId}/download'.replaceAll('{bucketId}', bucketId).replaceAll('{fileId}', fileId);
final Map<String, dynamic> params = {
if (token != null) 'token': token,
'project': client.config['project'],
'session': client.config['session'],
};
final res = await client.call(HttpMethod.get,
path: apiPath, params: params, responseType: ResponseType.bytes);
final res = await client.call(HttpMethod.get, path: apiPath, params: params, responseType: ResponseType.bytes);
return res.data;
}
}
/// Get a file preview image. Currently, this method supports preview for image
/// files (jpg, png, and gif), other supported formats, like pdf, docs, slides,
/// and spreadsheets, will return the file icon image. You can also pass query
/// string arguments for cutting and resizing your preview image. Preview is
/// supported only for image files smaller than 10MB.
Future<Uint8List> getFilePreview(
{required String bucketId,
required String fileId,
int? width,
int? height,
enums.ImageGravity? gravity,
int? quality,
int? borderWidth,
String? borderColor,
int? borderRadius,
double? opacity,
int? rotation,
String? background,
enums.ImageFormat? output,
String? token}) async {
final String apiPath = '/storage/buckets/{bucketId}/files/{fileId}/preview'
.replaceAll('{bucketId}', bucketId)
.replaceAll('{fileId}', fileId);
Future<Uint8List> getFilePreview({required String bucketId, required String fileId, int? width, int? height, enums.ImageGravity? gravity, int? quality, int? borderWidth, String? borderColor, int? borderRadius, double? opacity, int? rotation, String? background, enums.ImageFormat? output, String? token}) async {
final String apiPath = '/storage/buckets/{bucketId}/files/{fileId}/preview'.replaceAll('{bucketId}', bucketId).replaceAll('{fileId}', fileId);
final Map<String, dynamic> params = {
if (width != null) 'width': width,
if (height != null) 'height': height,
if (gravity != null) 'gravity': gravity.value,
if (quality != null) 'quality': quality,
if (borderWidth != null) 'borderWidth': borderWidth,
if (borderColor != null) 'borderColor': borderColor,
if (borderRadius != null) 'borderRadius': borderRadius,
if (opacity != null) 'opacity': opacity,
if (rotation != null) 'rotation': rotation,
if (background != null) 'background': background,
if (output != null) 'output': output.value,
if (token != null) 'token': token,
if (height != null) 'height': height,
if (gravity != null) 'gravity': gravity.value,
if (quality != null) 'quality': quality,
if (borderWidth != null) 'borderWidth': borderWidth,
if (borderColor != null) 'borderColor': borderColor,
if (borderRadius != null) 'borderRadius': borderRadius,
if (opacity != null) 'opacity': opacity,
if (rotation != null) 'rotation': rotation,
if (background != null) 'background': background,
if (output != null) 'output': output.value,
if (token != null) 'token': token,
'project': client.config['project'],
'session': client.config['session'],
};
final res = await client.call(HttpMethod.get,
path: apiPath, params: params, responseType: ResponseType.bytes);
final res = await client.call(HttpMethod.get, path: apiPath, params: params, responseType: ResponseType.bytes);
return res.data;
}
}
/// Get a file content by its unique ID. This endpoint is similar to the
/// download method but returns with no 'Content-Disposition: attachment'
/// header.
Future<Uint8List> getFileView(
{required String bucketId, required String fileId, String? token}) async {
final String apiPath = '/storage/buckets/{bucketId}/files/{fileId}/view'
.replaceAll('{bucketId}', bucketId)
.replaceAll('{fileId}', fileId);
Future<Uint8List> getFileView({required String bucketId, required String fileId, String? token}) async {
final String apiPath = '/storage/buckets/{bucketId}/files/{fileId}/view'.replaceAll('{bucketId}', bucketId).replaceAll('{fileId}', fileId);
final Map<String, dynamic> params = {
if (token != null) 'token': token,
'project': client.config['project'],
'session': client.config['session'],
};
final res = await client.call(HttpMethod.get,
path: apiPath, params: params, responseType: ResponseType.bytes);
final res = await client.call(HttpMethod.get, path: apiPath, params: params, responseType: ResponseType.bytes);
return res.data;
}
}
}
}
+796 -1100
View File
File diff suppressed because it is too large Load Diff
+155 -144
View File
@@ -1,129 +1,142 @@
part of '../dart_appwrite.dart';
/// The Teams service allows you to group users of your project and to enable
/// them to share read and write access to your project resources
/// The Teams service allows you to group users of your project and to enable
/// them to share read and write access to your project resources
class Teams extends Service {
Teams(super.client);
Teams(super.client);
/// Get a list of all the teams in which the current user is a member. You can
/// use the parameters to filter your results.
Future<models.TeamList> list(
{List<String>? queries, String? search, bool? total}) async {
final String apiPath = '/teams';
Future<models.TeamList> list({List<String>? queries, String? search, bool? total}) async {
final String apiPath = '/teams';
final Map<String, dynamic> apiParams = {
if (queries != null) 'queries': queries,
if (search != null) 'search': search,
if (total != null) 'total': total,
if (search != null) 'search': search,
if (total != null) 'total': total,
};
final Map<String, String> apiHeaders = {};
final Map<String, String> apiHeaders = {
};
final res = await client.call(HttpMethod.get,
path: apiPath, params: apiParams, headers: apiHeaders);
final res = await client.call(HttpMethod.get, path: apiPath, params: apiParams, headers: apiHeaders);
return models.TeamList.fromMap(res.data);
}
}
/// Create a new team. The user who creates the team will automatically be
/// assigned as the owner of the team. Only the users with the owner role can
/// invite new members, add new owners and delete or update the team.
Future<models.Team> create(
{required String teamId,
required String name,
List<String>? roles}) async {
final String apiPath = '/teams';
Future<models.Team> create({required String teamId, required String name, List<String>? roles}) async {
final String apiPath = '/teams';
final Map<String, dynamic> apiParams = {
'teamId': teamId,
'name': name,
if (roles != null) 'roles': roles,
'name': name,
if (roles != null) 'roles': roles,
};
final Map<String, String> apiHeaders = {
'content-type': 'application/json',
};
final res = await client.call(HttpMethod.post,
path: apiPath, params: apiParams, headers: apiHeaders);
final res = await client.call(HttpMethod.post, path: apiPath, params: apiParams, headers: apiHeaders);
return models.Team.fromMap(res.data);
}
}
/// Get a team by its ID. All team members have read access for this resource.
Future<models.Team> get({required String teamId}) async {
final String apiPath = '/teams/{teamId}'.replaceAll('{teamId}', teamId);
final Map<String, dynamic> apiParams = {};
final Map<String, String> apiHeaders = {};
final res = await client.call(HttpMethod.get,
path: apiPath, params: apiParams, headers: apiHeaders);
return models.Team.fromMap(res.data);
}
/// Update the team's name by its unique ID.
Future<models.Team> updateName(
{required String teamId, required String name}) async {
final String apiPath = '/teams/{teamId}'.replaceAll('{teamId}', teamId);
Future<models.Team> get({required String teamId}) async {
final String apiPath = '/teams/{teamId}'.replaceAll('{teamId}', teamId);
final Map<String, dynamic> apiParams = {
};
final Map<String, String> apiHeaders = {
};
final res = await client.call(HttpMethod.get, path: apiPath, params: apiParams, headers: apiHeaders);
return models.Team.fromMap(res.data);
}
/// Update the team's name by its unique ID.
Future<models.Team> updateName({required String teamId, required String name}) async {
final String apiPath = '/teams/{teamId}'.replaceAll('{teamId}', teamId);
final Map<String, dynamic> apiParams = {
'name': name,
};
final Map<String, String> apiHeaders = {
'content-type': 'application/json',
};
final res = await client.call(HttpMethod.put,
path: apiPath, params: apiParams, headers: apiHeaders);
final res = await client.call(HttpMethod.put, path: apiPath, params: apiParams, headers: apiHeaders);
return models.Team.fromMap(res.data);
}
}
/// Delete a team using its ID. Only team members with the owner role can
/// delete the team.
Future delete({required String teamId}) async {
final String apiPath = '/teams/{teamId}'.replaceAll('{teamId}', teamId);
Future delete({required String teamId}) async {
final String apiPath = '/teams/{teamId}'.replaceAll('{teamId}', teamId);
final Map<String, dynamic> apiParams = {};
final Map<String, dynamic> apiParams = {
};
final Map<String, String> apiHeaders = {
'content-type': 'application/json',
};
final res = await client.call(HttpMethod.delete,
path: apiPath, params: apiParams, headers: apiHeaders);
final res = await client.call(HttpMethod.delete, path: apiPath, params: apiParams, headers: apiHeaders);
return res.data;
}
}
/// Use this endpoint to list a team's members using the team's ID. All team
/// members have read access to this endpoint. Hide sensitive attributes from
/// the response by toggling membership privacy in the Console.
Future<models.MembershipList> listMemberships(
{required String teamId,
List<String>? queries,
String? search,
bool? total}) async {
final String apiPath =
'/teams/{teamId}/memberships'.replaceAll('{teamId}', teamId);
Future<models.MembershipList> listMemberships({required String teamId, List<String>? queries, String? search, bool? total}) async {
final String apiPath = '/teams/{teamId}/memberships'.replaceAll('{teamId}', teamId);
final Map<String, dynamic> apiParams = {
if (queries != null) 'queries': queries,
if (search != null) 'search': search,
if (total != null) 'total': total,
if (search != null) 'search': search,
if (total != null) 'total': total,
};
final Map<String, String> apiHeaders = {};
final Map<String, String> apiHeaders = {
};
final res = await client.call(HttpMethod.get,
path: apiPath, params: apiParams, headers: apiHeaders);
final res = await client.call(HttpMethod.get, path: apiPath, params: apiParams, headers: apiHeaders);
return models.MembershipList.fromMap(res.data);
}
}
/// Invite a new member to join your team. Provide an ID for existing users, or
/// invite unregistered users using an email or phone number. If initiated from
@@ -131,184 +144,182 @@ class Teams extends Service {
/// team to the invited user, and an account will be created for them if one
/// doesn't exist. If initiated from a Server SDK, the new member will be added
/// automatically to the team.
///
///
/// You only need to provide one of a user ID, email, or phone number. Appwrite
/// will prioritize accepting the user ID > email > phone number if you provide
/// more than one of these parameters.
///
///
/// Use the `url` parameter to redirect the user from the invitation email to
/// your app. After the user is redirected, use the [Update Team Membership
/// Status](https://appwrite.io/docs/references/cloud/client-web/teams#updateMembershipStatus)
/// endpoint to allow the user to accept the invitation to the team.
///
/// endpoint to allow the user to accept the invitation to the team.
///
/// Please note that to avoid a [Redirect
/// Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md)
/// Appwrite will accept the only redirect URLs under the domains you have
/// added as a platform on the Appwrite Console.
///
Future<models.Membership> createMembership(
{required String teamId,
required List<String> roles,
String? email,
String? userId,
String? phone,
String? url,
String? name}) async {
final String apiPath =
'/teams/{teamId}/memberships'.replaceAll('{teamId}', teamId);
///
Future<models.Membership> createMembership({required String teamId, required List<String> roles, String? email, String? userId, String? phone, String? url, String? name}) async {
final String apiPath = '/teams/{teamId}/memberships'.replaceAll('{teamId}', teamId);
final Map<String, dynamic> apiParams = {
if (email != null) 'email': email,
if (userId != null) 'userId': userId,
if (phone != null) 'phone': phone,
'roles': roles,
if (url != null) 'url': url,
if (name != null) 'name': name,
if (userId != null) 'userId': userId,
if (phone != null) 'phone': phone,
'roles': roles,
if (url != null) 'url': url,
if (name != null) 'name': name,
};
final Map<String, String> apiHeaders = {
'content-type': 'application/json',
};
final res = await client.call(HttpMethod.post,
path: apiPath, params: apiParams, headers: apiHeaders);
final res = await client.call(HttpMethod.post, path: apiPath, params: apiParams, headers: apiHeaders);
return models.Membership.fromMap(res.data);
}
}
/// Get a team member by the membership unique id. All team members have read
/// access for this resource. Hide sensitive attributes from the response by
/// toggling membership privacy in the Console.
Future<models.Membership> getMembership(
{required String teamId, required String membershipId}) async {
final String apiPath = '/teams/{teamId}/memberships/{membershipId}'
.replaceAll('{teamId}', teamId)
.replaceAll('{membershipId}', membershipId);
Future<models.Membership> getMembership({required String teamId, required String membershipId}) async {
final String apiPath = '/teams/{teamId}/memberships/{membershipId}'.replaceAll('{teamId}', teamId).replaceAll('{membershipId}', membershipId);
final Map<String, dynamic> apiParams = {};
final Map<String, dynamic> apiParams = {
};
final Map<String, String> apiHeaders = {};
final Map<String, String> apiHeaders = {
};
final res = await client.call(HttpMethod.get,
path: apiPath, params: apiParams, headers: apiHeaders);
final res = await client.call(HttpMethod.get, path: apiPath, params: apiParams, headers: apiHeaders);
return models.Membership.fromMap(res.data);
}
}
/// Modify the roles of a team member. Only team members with the owner role
/// have access to this endpoint. Learn more about [roles and
/// permissions](https://appwrite.io/docs/permissions).
///
Future<models.Membership> updateMembership(
{required String teamId,
required String membershipId,
required List<String> roles}) async {
final String apiPath = '/teams/{teamId}/memberships/{membershipId}'
.replaceAll('{teamId}', teamId)
.replaceAll('{membershipId}', membershipId);
///
Future<models.Membership> updateMembership({required String teamId, required String membershipId, required List<String> roles}) async {
final String apiPath = '/teams/{teamId}/memberships/{membershipId}'.replaceAll('{teamId}', teamId).replaceAll('{membershipId}', membershipId);
final Map<String, dynamic> apiParams = {
'roles': roles,
};
final Map<String, String> apiHeaders = {
'content-type': 'application/json',
};
final res = await client.call(HttpMethod.patch,
path: apiPath, params: apiParams, headers: apiHeaders);
final res = await client.call(HttpMethod.patch, path: apiPath, params: apiParams, headers: apiHeaders);
return models.Membership.fromMap(res.data);
}
}
/// This endpoint allows a user to leave a team or for a team owner to delete
/// the membership of any other team member. You can also use this endpoint to
/// delete a user membership even if it is not accepted.
Future deleteMembership(
{required String teamId, required String membershipId}) async {
final String apiPath = '/teams/{teamId}/memberships/{membershipId}'
.replaceAll('{teamId}', teamId)
.replaceAll('{membershipId}', membershipId);
Future deleteMembership({required String teamId, required String membershipId}) async {
final String apiPath = '/teams/{teamId}/memberships/{membershipId}'.replaceAll('{teamId}', teamId).replaceAll('{membershipId}', membershipId);
final Map<String, dynamic> apiParams = {};
final Map<String, dynamic> apiParams = {
};
final Map<String, String> apiHeaders = {
'content-type': 'application/json',
};
final res = await client.call(HttpMethod.delete,
path: apiPath, params: apiParams, headers: apiHeaders);
final res = await client.call(HttpMethod.delete, path: apiPath, params: apiParams, headers: apiHeaders);
return res.data;
}
}
/// Use this endpoint to allow a user to accept an invitation to join a team
/// after being redirected back to your app from the invitation email received
/// by the user.
///
///
/// If the request is successful, a session for the user is automatically
/// created.
///
Future<models.Membership> updateMembershipStatus(
{required String teamId,
required String membershipId,
required String userId,
required String secret}) async {
final String apiPath = '/teams/{teamId}/memberships/{membershipId}/status'
.replaceAll('{teamId}', teamId)
.replaceAll('{membershipId}', membershipId);
///
Future<models.Membership> updateMembershipStatus({required String teamId, required String membershipId, required String userId, required String secret}) async {
final String apiPath = '/teams/{teamId}/memberships/{membershipId}/status'.replaceAll('{teamId}', teamId).replaceAll('{membershipId}', membershipId);
final Map<String, dynamic> apiParams = {
'userId': userId,
'secret': secret,
'secret': secret,
};
final Map<String, String> apiHeaders = {
'content-type': 'application/json',
};
final res = await client.call(HttpMethod.patch,
path: apiPath, params: apiParams, headers: apiHeaders);
final res = await client.call(HttpMethod.patch, path: apiPath, params: apiParams, headers: apiHeaders);
return models.Membership.fromMap(res.data);
}
}
/// Get the team's shared preferences by its unique ID. If a preference doesn't
/// need to be shared by all team members, prefer storing them in [user
/// preferences](https://appwrite.io/docs/references/cloud/client-web/account#getPrefs).
Future<models.Preferences> getPrefs({required String teamId}) async {
final String apiPath =
'/teams/{teamId}/prefs'.replaceAll('{teamId}', teamId);
Future<models.Preferences> getPrefs({required String teamId}) async {
final String apiPath = '/teams/{teamId}/prefs'.replaceAll('{teamId}', teamId);
final Map<String, dynamic> apiParams = {};
final Map<String, dynamic> apiParams = {
};
final Map<String, String> apiHeaders = {};
final Map<String, String> apiHeaders = {
};
final res = await client.call(HttpMethod.get,
path: apiPath, params: apiParams, headers: apiHeaders);
final res = await client.call(HttpMethod.get, path: apiPath, params: apiParams, headers: apiHeaders);
return models.Preferences.fromMap(res.data);
}
}
/// Update the team's preferences by its unique ID. The object you pass is
/// stored as is and replaces any previous value. The maximum allowed prefs
/// size is 64kB and throws an error if exceeded.
Future<models.Preferences> updatePrefs(
{required String teamId, required Map prefs}) async {
final String apiPath =
'/teams/{teamId}/prefs'.replaceAll('{teamId}', teamId);
Future<models.Preferences> updatePrefs({required String teamId, required Map prefs}) async {
final String apiPath = '/teams/{teamId}/prefs'.replaceAll('{teamId}', teamId);
final Map<String, dynamic> apiParams = {
'prefs': prefs,
};
final Map<String, String> apiHeaders = {
'content-type': 'application/json',
};
final res = await client.call(HttpMethod.put,
path: apiPath, params: apiParams, headers: apiHeaders);
final res = await client.call(HttpMethod.put, path: apiPath, params: apiParams, headers: apiHeaders);
return models.Preferences.fromMap(res.data);
}
}
}
}
+51 -44
View File
@@ -1,103 +1,110 @@
part of '../dart_appwrite.dart';
class Tokens extends Service {
Tokens(super.client);
Tokens(super.client);
/// List all the tokens created for a specific file or bucket. You can use the
/// query params to filter your results.
Future<models.ResourceTokenList> list(
{required String bucketId,
required String fileId,
List<String>? queries,
bool? total}) async {
final String apiPath = '/tokens/buckets/{bucketId}/files/{fileId}'
.replaceAll('{bucketId}', bucketId)
.replaceAll('{fileId}', fileId);
Future<models.ResourceTokenList> list({required String bucketId, required String fileId, List<String>? queries, bool? total}) async {
final String apiPath = '/tokens/buckets/{bucketId}/files/{fileId}'.replaceAll('{bucketId}', bucketId).replaceAll('{fileId}', fileId);
final Map<String, dynamic> apiParams = {
if (queries != null) 'queries': queries,
if (total != null) 'total': total,
if (total != null) 'total': total,
};
final Map<String, String> apiHeaders = {};
final Map<String, String> apiHeaders = {
};
final res = await client.call(HttpMethod.get,
path: apiPath, params: apiParams, headers: apiHeaders);
final res = await client.call(HttpMethod.get, path: apiPath, params: apiParams, headers: apiHeaders);
return models.ResourceTokenList.fromMap(res.data);
}
}
/// Create a new token. A token is linked to a file. Token can be passed as a
/// request URL search parameter.
Future<models.ResourceToken> createFileToken(
{required String bucketId,
required String fileId,
String? expire}) async {
final String apiPath = '/tokens/buckets/{bucketId}/files/{fileId}'
.replaceAll('{bucketId}', bucketId)
.replaceAll('{fileId}', fileId);
Future<models.ResourceToken> createFileToken({required String bucketId, required String fileId, String? expire}) async {
final String apiPath = '/tokens/buckets/{bucketId}/files/{fileId}'.replaceAll('{bucketId}', bucketId).replaceAll('{fileId}', fileId);
final Map<String, dynamic> apiParams = {
'expire': expire,
};
final Map<String, String> apiHeaders = {
'content-type': 'application/json',
};
final res = await client.call(HttpMethod.post,
path: apiPath, params: apiParams, headers: apiHeaders);
final res = await client.call(HttpMethod.post, path: apiPath, params: apiParams, headers: apiHeaders);
return models.ResourceToken.fromMap(res.data);
}
}
/// Get a token by its unique ID.
Future<models.ResourceToken> get({required String tokenId}) async {
final String apiPath = '/tokens/{tokenId}'.replaceAll('{tokenId}', tokenId);
Future<models.ResourceToken> get({required String tokenId}) async {
final String apiPath = '/tokens/{tokenId}'.replaceAll('{tokenId}', tokenId);
final Map<String, dynamic> apiParams = {};
final Map<String, dynamic> apiParams = {
};
final Map<String, String> apiHeaders = {};
final Map<String, String> apiHeaders = {
};
final res = await client.call(HttpMethod.get,
path: apiPath, params: apiParams, headers: apiHeaders);
final res = await client.call(HttpMethod.get, path: apiPath, params: apiParams, headers: apiHeaders);
return models.ResourceToken.fromMap(res.data);
}
}
/// Update a token by its unique ID. Use this endpoint to update a token's
/// expiry date.
Future<models.ResourceToken> update(
{required String tokenId, String? expire}) async {
final String apiPath = '/tokens/{tokenId}'.replaceAll('{tokenId}', tokenId);
Future<models.ResourceToken> update({required String tokenId, String? expire}) async {
final String apiPath = '/tokens/{tokenId}'.replaceAll('{tokenId}', tokenId);
final Map<String, dynamic> apiParams = {
'expire': expire,
};
final Map<String, String> apiHeaders = {
'content-type': 'application/json',
};
final res = await client.call(HttpMethod.patch,
path: apiPath, params: apiParams, headers: apiHeaders);
final res = await client.call(HttpMethod.patch, path: apiPath, params: apiParams, headers: apiHeaders);
return models.ResourceToken.fromMap(res.data);
}
}
/// Delete a token by its unique ID.
Future delete({required String tokenId}) async {
final String apiPath = '/tokens/{tokenId}'.replaceAll('{tokenId}', tokenId);
Future delete({required String tokenId}) async {
final String apiPath = '/tokens/{tokenId}'.replaceAll('{tokenId}', tokenId);
final Map<String, dynamic> apiParams = {};
final Map<String, dynamic> apiParams = {
};
final Map<String, String> apiHeaders = {
'content-type': 'application/json',
};
final res = await client.call(HttpMethod.delete,
path: apiPath, params: apiParams, headers: apiHeaders);
final res = await client.call(HttpMethod.delete, path: apiPath, params: apiParams, headers: apiHeaders);
return res.data;
}
}
}
}
+541 -496
View File
File diff suppressed because it is too large Load Diff
+76 -73
View File
@@ -1,144 +1,147 @@
part of '../dart_appwrite.dart';
class Webhooks extends Service {
Webhooks(super.client);
Webhooks(super.client);
/// Get a list of all webhooks belonging to the project. You can use the query
/// params to filter your results.
Future<models.WebhookList> list({List<String>? queries, bool? total}) async {
final String apiPath = '/webhooks';
Future<models.WebhookList> list({List<String>? queries, bool? total}) async {
final String apiPath = '/webhooks';
final Map<String, dynamic> apiParams = {
if (queries != null) 'queries': queries,
if (total != null) 'total': total,
if (total != null) 'total': total,
};
final Map<String, String> apiHeaders = {};
final Map<String, String> apiHeaders = {
};
final res = await client.call(HttpMethod.get,
path: apiPath, params: apiParams, headers: apiHeaders);
final res = await client.call(HttpMethod.get, path: apiPath, params: apiParams, headers: apiHeaders);
return models.WebhookList.fromMap(res.data);
}
}
/// Create a new webhook. Use this endpoint to configure a URL that will
/// receive events from Appwrite when specific events occur.
Future<models.Webhook> create(
{required String webhookId,
required String url,
required String name,
required List<String> events,
bool? enabled,
bool? security,
String? httpUser,
String? httpPass}) async {
final String apiPath = '/webhooks';
Future<models.Webhook> create({required String webhookId, required String url, required String name, required List<String> events, bool? enabled, bool? security, String? httpUser, String? httpPass}) async {
final String apiPath = '/webhooks';
final Map<String, dynamic> apiParams = {
'webhookId': webhookId,
'url': url,
'name': name,
'events': events,
if (enabled != null) 'enabled': enabled,
if (security != null) 'security': security,
if (httpUser != null) 'httpUser': httpUser,
if (httpPass != null) 'httpPass': httpPass,
'url': url,
'name': name,
'events': events,
if (enabled != null) 'enabled': enabled,
if (security != null) 'security': security,
if (httpUser != null) 'httpUser': httpUser,
if (httpPass != null) 'httpPass': httpPass,
};
final Map<String, String> apiHeaders = {
'content-type': 'application/json',
};
final res = await client.call(HttpMethod.post,
path: apiPath, params: apiParams, headers: apiHeaders);
final res = await client.call(HttpMethod.post, path: apiPath, params: apiParams, headers: apiHeaders);
return models.Webhook.fromMap(res.data);
}
}
/// Get a webhook by its unique ID. This endpoint returns details about a
/// specific webhook configured for a project.
Future<models.Webhook> get({required String webhookId}) async {
final String apiPath =
'/webhooks/{webhookId}'.replaceAll('{webhookId}', webhookId);
/// specific webhook configured for a project.
Future<models.Webhook> get({required String webhookId}) async {
final String apiPath = '/webhooks/{webhookId}'.replaceAll('{webhookId}', webhookId);
final Map<String, dynamic> apiParams = {};
final Map<String, dynamic> apiParams = {
};
final Map<String, String> apiHeaders = {};
final Map<String, String> apiHeaders = {
};
final res = await client.call(HttpMethod.get,
path: apiPath, params: apiParams, headers: apiHeaders);
final res = await client.call(HttpMethod.get, path: apiPath, params: apiParams, headers: apiHeaders);
return models.Webhook.fromMap(res.data);
}
}
/// Update a webhook by its unique ID. Use this endpoint to update the URL,
/// events, or status of an existing webhook.
Future<models.Webhook> update(
{required String webhookId,
required String name,
required String url,
required List<String> events,
bool? enabled,
bool? security,
String? httpUser,
String? httpPass}) async {
final String apiPath =
'/webhooks/{webhookId}'.replaceAll('{webhookId}', webhookId);
Future<models.Webhook> update({required String webhookId, required String name, required String url, required List<String> events, bool? enabled, bool? security, String? httpUser, String? httpPass}) async {
final String apiPath = '/webhooks/{webhookId}'.replaceAll('{webhookId}', webhookId);
final Map<String, dynamic> apiParams = {
'name': name,
'url': url,
'events': events,
if (enabled != null) 'enabled': enabled,
if (security != null) 'security': security,
if (httpUser != null) 'httpUser': httpUser,
if (httpPass != null) 'httpPass': httpPass,
'url': url,
'events': events,
if (enabled != null) 'enabled': enabled,
if (security != null) 'security': security,
if (httpUser != null) 'httpUser': httpUser,
if (httpPass != null) 'httpPass': httpPass,
};
final Map<String, String> apiHeaders = {
'content-type': 'application/json',
};
final res = await client.call(HttpMethod.put,
path: apiPath, params: apiParams, headers: apiHeaders);
final res = await client.call(HttpMethod.put, path: apiPath, params: apiParams, headers: apiHeaders);
return models.Webhook.fromMap(res.data);
}
}
/// Delete a webhook by its unique ID. Once deleted, the webhook will no longer
/// receive project events.
Future delete({required String webhookId}) async {
final String apiPath =
'/webhooks/{webhookId}'.replaceAll('{webhookId}', webhookId);
/// receive project events.
Future delete({required String webhookId}) async {
final String apiPath = '/webhooks/{webhookId}'.replaceAll('{webhookId}', webhookId);
final Map<String, dynamic> apiParams = {};
final Map<String, dynamic> apiParams = {
};
final Map<String, String> apiHeaders = {
'content-type': 'application/json',
};
final res = await client.call(HttpMethod.delete,
path: apiPath, params: apiParams, headers: apiHeaders);
final res = await client.call(HttpMethod.delete, path: apiPath, params: apiParams, headers: apiHeaders);
return res.data;
}
}
/// Update the webhook signature key. This endpoint can be used to regenerate
/// the signature key used to sign and validate payload deliveries for a
/// specific webhook.
Future<models.Webhook> updateSignature({required String webhookId}) async {
final String apiPath =
'/webhooks/{webhookId}/signature'.replaceAll('{webhookId}', webhookId);
Future<models.Webhook> updateSignature({required String webhookId}) async {
final String apiPath = '/webhooks/{webhookId}/signature'.replaceAll('{webhookId}', webhookId);
final Map<String, dynamic> apiParams = {};
final Map<String, dynamic> apiParams = {
};
final Map<String, String> apiHeaders = {
'content-type': 'application/json',
};
final res = await client.call(HttpMethod.patch,
path: apiPath, params: apiParams, headers: apiHeaders);
final res = await client.call(HttpMethod.patch, path: apiPath, params: apiParams, headers: apiHeaders);
return models.Webhook.fromMap(res.data);
}
}
}
}
+3 -5
View File
@@ -21,14 +21,13 @@ abstract class Client {
factory Client({
String endPoint = 'https://cloud.appwrite.io/v1',
bool selfSigned = false,
}) =>
createClient(endPoint: endPoint, selfSigned: selfSigned);
}) => createClient(endPoint: endPoint, selfSigned: selfSigned);
/// Handle OAuth2 session creation.
Future<String?> webAuth(Uri url);
/// Set self signed to [status].
///
///
/// If self signed is true, [Client] will ignore invalid certificates.
/// This is helpful in environments where your Appwrite
/// instance does not have a valid SSL certificate.
@@ -97,8 +96,7 @@ abstract class Client {
});
/// Send the API request.
Future<Response> call(
HttpMethod method, {
Future<Response> call(HttpMethod method, {
String path = '',
Map<String, String> headers = const {},
Map<String, dynamic> params = const {},
+1 -8
View File
@@ -2,37 +2,30 @@ import 'response.dart';
import 'client.dart';
import 'enums.dart';
abstract class ClientBase implements Client {
abstract class ClientBase implements Client {
/// Your project ID
@override
ClientBase setProject(value);
/// Your secret API key
@override
ClientBase setKey(value);
/// Your secret JSON Web Token
@override
ClientBase setJWT(value);
@override
ClientBase setLocale(value);
/// The user session to authenticate with
@override
ClientBase setSession(value);
/// The user agent string of the client that made the request
@override
ClientBase setForwardedUserAgent(value);
/// Impersonate a user by ID on an already user-authenticated request. Requires the current request to be authenticated as a user with impersonator capability; X-Appwrite-Key alone is not sufficient. Impersonator users are intentionally granted users.read so they can discover a target before impersonation begins. Internal audit logs still attribute actions to the original impersonator and record the impersonated target only in internal audit payload data.
@override
ClientBase setImpersonateUserId(value);
/// Impersonate a user by email on an already user-authenticated request. Requires the current request to be authenticated as a user with impersonator capability; X-Appwrite-Key alone is not sufficient. Impersonator users are intentionally granted users.read so they can discover a target before impersonation begins. Internal audit logs still attribute actions to the original impersonator and record the impersonated target only in internal audit payload data.
@override
ClientBase setImpersonateUserEmail(value);
/// Impersonate a user by phone on an already user-authenticated request. Requires the current request to be authenticated as a user with impersonator capability; X-Appwrite-Key alone is not sufficient. Impersonator users are intentionally granted users.read so they can discover a target before impersonation begins. Internal audit logs still attribute actions to the original impersonator and record the impersonated target only in internal audit payload data.
@override
ClientBase setImpersonateUserPhone(value);
+67 -76
View File
@@ -16,7 +16,7 @@ ClientBase createClient({
ClientBrowser(endPoint: endPoint, selfSigned: selfSigned);
class ClientBrowser extends ClientBase with ClientMixin {
static const int chunkSize = 5 * 1024 * 1024;
static const int chunkSize = 5*1024*1024;
String _endPoint;
Map<String, String>? _headers;
@override
@@ -34,7 +34,7 @@ class ClientBrowser extends ClientBase with ClientMixin {
'x-sdk-platform': 'server',
'x-sdk-language': 'dart',
'x-sdk-version': '22.0.0',
'X-Appwrite-Response-Format': '1.9.0',
'X-Appwrite-Response-Format' : '1.9.0',
};
config = {};
@@ -46,76 +46,68 @@ class ClientBrowser extends ClientBase with ClientMixin {
@override
String get endPoint => _endPoint;
/// Your project ID
@override
ClientBrowser setProject(value) {
config['project'] = value;
addHeader('X-Appwrite-Project', value);
return this;
}
/// Your secret API key
@override
ClientBrowser setKey(value) {
config['key'] = value;
addHeader('X-Appwrite-Key', value);
return this;
}
/// Your secret JSON Web Token
@override
ClientBrowser setJWT(value) {
config['jWT'] = value;
addHeader('X-Appwrite-JWT', value);
return this;
}
@override
ClientBrowser setLocale(value) {
config['locale'] = value;
addHeader('X-Appwrite-Locale', value);
return this;
}
/// The user session to authenticate with
@override
ClientBrowser setSession(value) {
config['session'] = value;
addHeader('X-Appwrite-Session', value);
return this;
}
/// The user agent string of the client that made the request
@override
ClientBrowser setForwardedUserAgent(value) {
config['forwardedUserAgent'] = value;
addHeader('X-Forwarded-User-Agent', value);
return this;
}
/// Impersonate a user by ID on an already user-authenticated request. Requires the current request to be authenticated as a user with impersonator capability; X-Appwrite-Key alone is not sufficient. Impersonator users are intentionally granted users.read so they can discover a target before impersonation begins. Internal audit logs still attribute actions to the original impersonator and record the impersonated target only in internal audit payload data.
@override
ClientBrowser setImpersonateUserId(value) {
config['impersonateUserId'] = value;
addHeader('X-Appwrite-Impersonate-User-Id', value);
return this;
}
/// Impersonate a user by email on an already user-authenticated request. Requires the current request to be authenticated as a user with impersonator capability; X-Appwrite-Key alone is not sufficient. Impersonator users are intentionally granted users.read so they can discover a target before impersonation begins. Internal audit logs still attribute actions to the original impersonator and record the impersonated target only in internal audit payload data.
@override
ClientBrowser setImpersonateUserEmail(value) {
config['impersonateUserEmail'] = value;
addHeader('X-Appwrite-Impersonate-User-Email', value);
return this;
}
/// Impersonate a user by phone on an already user-authenticated request. Requires the current request to be authenticated as a user with impersonator capability; X-Appwrite-Key alone is not sufficient. Impersonator users are intentionally granted users.read so they can discover a target before impersonation begins. Internal audit logs still attribute actions to the original impersonator and record the impersonated target only in internal audit payload data.
@override
ClientBrowser setImpersonateUserPhone(value) {
config['impersonateUserPhone'] = value;
addHeader('X-Appwrite-Impersonate-User-Phone', value);
return this;
}
/// Your project ID
@override
ClientBrowser setProject(value) {
config['project'] = value;
addHeader('X-Appwrite-Project', value);
return this;
}
/// Your secret API key
@override
ClientBrowser setKey(value) {
config['key'] = value;
addHeader('X-Appwrite-Key', value);
return this;
}
/// Your secret JSON Web Token
@override
ClientBrowser setJWT(value) {
config['jWT'] = value;
addHeader('X-Appwrite-JWT', value);
return this;
}
@override
ClientBrowser setLocale(value) {
config['locale'] = value;
addHeader('X-Appwrite-Locale', value);
return this;
}
/// The user session to authenticate with
@override
ClientBrowser setSession(value) {
config['session'] = value;
addHeader('X-Appwrite-Session', value);
return this;
}
/// The user agent string of the client that made the request
@override
ClientBrowser setForwardedUserAgent(value) {
config['forwardedUserAgent'] = value;
addHeader('X-Forwarded-User-Agent', value);
return this;
}
/// Impersonate a user by ID on an already user-authenticated request. Requires the current request to be authenticated as a user with impersonator capability; X-Appwrite-Key alone is not sufficient. Impersonator users are intentionally granted users.read so they can discover a target before impersonation begins. Internal audit logs still attribute actions to the original impersonator and record the impersonated target only in internal audit payload data.
@override
ClientBrowser setImpersonateUserId(value) {
config['impersonateUserId'] = value;
addHeader('X-Appwrite-Impersonate-User-Id', value);
return this;
}
/// Impersonate a user by email on an already user-authenticated request. Requires the current request to be authenticated as a user with impersonator capability; X-Appwrite-Key alone is not sufficient. Impersonator users are intentionally granted users.read so they can discover a target before impersonation begins. Internal audit logs still attribute actions to the original impersonator and record the impersonated target only in internal audit payload data.
@override
ClientBrowser setImpersonateUserEmail(value) {
config['impersonateUserEmail'] = value;
addHeader('X-Appwrite-Impersonate-User-Email', value);
return this;
}
/// Impersonate a user by phone on an already user-authenticated request. Requires the current request to be authenticated as a user with impersonator capability; X-Appwrite-Key alone is not sufficient. Impersonator users are intentionally granted users.read so they can discover a target before impersonation begins. Internal audit logs still attribute actions to the original impersonator and record the impersonated target only in internal audit payload data.
@override
ClientBrowser setImpersonateUserPhone(value) {
config['impersonateUserPhone'] = value;
addHeader('X-Appwrite-Impersonate-User-Phone', value);
return this;
}
@override
ClientBrowser setSelfSigned({bool status = true}) {
@@ -164,8 +156,7 @@ class ClientBrowser extends ClientBase with ClientMixin {
late Response res;
if (size <= chunkSize) {
params[paramName] = http.MultipartFile.fromBytes(paramName, file.bytes!,
filename: file.filename);
params[paramName] = http.MultipartFile.fromBytes(paramName, file.bytes!, filename: file.filename);
return call(
HttpMethod.post,
path: path,
@@ -192,8 +183,8 @@ class ClientBrowser extends ClientBase with ClientMixin {
List<int> chunk = [];
final end = min(offset + chunkSize, size);
chunk = file.bytes!.getRange(offset, end).toList();
params[paramName] = http.MultipartFile.fromBytes(paramName, chunk,
filename: file.filename);
params[paramName] =
http.MultipartFile.fromBytes(paramName, chunk, filename: file.filename);
headers['content-range'] =
'bytes $offset-${min<int>((offset + chunkSize - 1), size - 1)}/$size';
res = await call(HttpMethod.post,
+67 -76
View File
@@ -20,7 +20,7 @@ ClientBase createClient({
);
class ClientIO extends ClientBase with ClientMixin {
static const int chunkSize = 5 * 1024 * 1024;
static const int chunkSize = 5*1024*1024;
String _endPoint;
Map<String, String>? _headers;
@override
@@ -43,9 +43,8 @@ class ClientIO extends ClientBase with ClientMixin {
'x-sdk-platform': 'server',
'x-sdk-language': 'dart',
'x-sdk-version': '22.0.0',
'user-agent':
'AppwriteDartSDK/22.0.0 (${Platform.operatingSystem}; ${Platform.operatingSystemVersion})',
'X-Appwrite-Response-Format': '1.9.0',
'user-agent' : 'AppwriteDartSDK/22.0.0 (${Platform.operatingSystem}; ${Platform.operatingSystemVersion})',
'X-Appwrite-Response-Format' : '1.9.0',
};
config = {};
@@ -57,76 +56,68 @@ class ClientIO extends ClientBase with ClientMixin {
@override
String get endPoint => _endPoint;
/// Your project ID
@override
ClientIO setProject(value) {
config['project'] = value;
addHeader('X-Appwrite-Project', value);
return this;
}
/// Your secret API key
@override
ClientIO setKey(value) {
config['key'] = value;
addHeader('X-Appwrite-Key', value);
return this;
}
/// Your secret JSON Web Token
@override
ClientIO setJWT(value) {
config['jWT'] = value;
addHeader('X-Appwrite-JWT', value);
return this;
}
@override
ClientIO setLocale(value) {
config['locale'] = value;
addHeader('X-Appwrite-Locale', value);
return this;
}
/// The user session to authenticate with
@override
ClientIO setSession(value) {
config['session'] = value;
addHeader('X-Appwrite-Session', value);
return this;
}
/// The user agent string of the client that made the request
@override
ClientIO setForwardedUserAgent(value) {
config['forwardedUserAgent'] = value;
addHeader('X-Forwarded-User-Agent', value);
return this;
}
/// Impersonate a user by ID on an already user-authenticated request. Requires the current request to be authenticated as a user with impersonator capability; X-Appwrite-Key alone is not sufficient. Impersonator users are intentionally granted users.read so they can discover a target before impersonation begins. Internal audit logs still attribute actions to the original impersonator and record the impersonated target only in internal audit payload data.
@override
ClientIO setImpersonateUserId(value) {
config['impersonateUserId'] = value;
addHeader('X-Appwrite-Impersonate-User-Id', value);
return this;
}
/// Impersonate a user by email on an already user-authenticated request. Requires the current request to be authenticated as a user with impersonator capability; X-Appwrite-Key alone is not sufficient. Impersonator users are intentionally granted users.read so they can discover a target before impersonation begins. Internal audit logs still attribute actions to the original impersonator and record the impersonated target only in internal audit payload data.
@override
ClientIO setImpersonateUserEmail(value) {
config['impersonateUserEmail'] = value;
addHeader('X-Appwrite-Impersonate-User-Email', value);
return this;
}
/// Impersonate a user by phone on an already user-authenticated request. Requires the current request to be authenticated as a user with impersonator capability; X-Appwrite-Key alone is not sufficient. Impersonator users are intentionally granted users.read so they can discover a target before impersonation begins. Internal audit logs still attribute actions to the original impersonator and record the impersonated target only in internal audit payload data.
@override
ClientIO setImpersonateUserPhone(value) {
config['impersonateUserPhone'] = value;
addHeader('X-Appwrite-Impersonate-User-Phone', value);
return this;
}
/// Your project ID
@override
ClientIO setProject(value) {
config['project'] = value;
addHeader('X-Appwrite-Project', value);
return this;
}
/// Your secret API key
@override
ClientIO setKey(value) {
config['key'] = value;
addHeader('X-Appwrite-Key', value);
return this;
}
/// Your secret JSON Web Token
@override
ClientIO setJWT(value) {
config['jWT'] = value;
addHeader('X-Appwrite-JWT', value);
return this;
}
@override
ClientIO setLocale(value) {
config['locale'] = value;
addHeader('X-Appwrite-Locale', value);
return this;
}
/// The user session to authenticate with
@override
ClientIO setSession(value) {
config['session'] = value;
addHeader('X-Appwrite-Session', value);
return this;
}
/// The user agent string of the client that made the request
@override
ClientIO setForwardedUserAgent(value) {
config['forwardedUserAgent'] = value;
addHeader('X-Forwarded-User-Agent', value);
return this;
}
/// Impersonate a user by ID on an already user-authenticated request. Requires the current request to be authenticated as a user with impersonator capability; X-Appwrite-Key alone is not sufficient. Impersonator users are intentionally granted users.read so they can discover a target before impersonation begins. Internal audit logs still attribute actions to the original impersonator and record the impersonated target only in internal audit payload data.
@override
ClientIO setImpersonateUserId(value) {
config['impersonateUserId'] = value;
addHeader('X-Appwrite-Impersonate-User-Id', value);
return this;
}
/// Impersonate a user by email on an already user-authenticated request. Requires the current request to be authenticated as a user with impersonator capability; X-Appwrite-Key alone is not sufficient. Impersonator users are intentionally granted users.read so they can discover a target before impersonation begins. Internal audit logs still attribute actions to the original impersonator and record the impersonated target only in internal audit payload data.
@override
ClientIO setImpersonateUserEmail(value) {
config['impersonateUserEmail'] = value;
addHeader('X-Appwrite-Impersonate-User-Email', value);
return this;
}
/// Impersonate a user by phone on an already user-authenticated request. Requires the current request to be authenticated as a user with impersonator capability; X-Appwrite-Key alone is not sufficient. Impersonator users are intentionally granted users.read so they can discover a target before impersonation begins. Internal audit logs still attribute actions to the original impersonator and record the impersonated target only in internal audit payload data.
@override
ClientIO setImpersonateUserPhone(value) {
config['impersonateUserPhone'] = value;
addHeader('X-Appwrite-Impersonate-User-Phone', value);
return this;
}
@override
ClientIO setSelfSigned({bool status = true}) {
@@ -224,8 +215,8 @@ class ClientIO extends ClientBase with ClientMixin {
raf!.setPositionSync(offset);
chunk = raf.readSync(chunkSize);
}
params[paramName] = http.MultipartFile.fromBytes(paramName, chunk,
filename: file.filename);
params[paramName] =
http.MultipartFile.fromBytes(paramName, chunk, filename: file.filename);
headers['content-range'] =
'bytes $offset-${min<int>((offset + chunkSize - 1), size - 1)}/$size';
res = await call(HttpMethod.post,
+15 -20
View File
@@ -12,6 +12,7 @@ mixin ClientMixin {
required Map<String, String> headers,
required Map<String, dynamic> params,
}) {
http.BaseRequest request = http.Request(method.name(), uri);
if (headers['content-type'] == 'multipart/form-data') {
request = http.MultipartRequest(method.name(), uri);
@@ -73,8 +74,7 @@ mixin ClientMixin {
headers['User-Agent'] = Uri.encodeFull(headers['User-Agent']!);
}
if (headers['X-Forwarded-User-Agent'] != null) {
headers['X-Forwarded-User-Agent'] =
Uri.encodeFull(headers['X-Forwarded-User-Agent']!);
headers['X-Forwarded-User-Agent'] = Uri.encodeFull(headers['X-Forwarded-User-Agent']!);
}
request.headers.addAll(headers);
@@ -121,23 +121,18 @@ mixin ClientMixin {
return Response(data: data);
}
Future<http.Response> toResponse(
http.StreamedResponse streamedResponse) async {
if (streamedResponse.statusCode == 204) {
return http.Response(
'',
streamedResponse.statusCode,
headers: streamedResponse.headers.map((k, v) =>
k.toLowerCase() == 'content-type'
? MapEntry(k, 'text/plain')
: MapEntry(k, v)),
request: streamedResponse.request,
isRedirect: streamedResponse.isRedirect,
persistentConnection: streamedResponse.persistentConnection,
reasonPhrase: streamedResponse.reasonPhrase,
);
} else {
return await http.Response.fromStream(streamedResponse);
}
Future<http.Response> toResponse(http.StreamedResponse streamedResponse) async {
if(streamedResponse.statusCode == 204) {
return http.Response('',
streamedResponse.statusCode,
headers: streamedResponse.headers.map((k,v) => k.toLowerCase()=='content-type' ? MapEntry(k, 'text/plain') : MapEntry(k,v)),
request: streamedResponse.request,
isRedirect: streamedResponse.isRedirect,
persistentConnection: streamedResponse.persistentConnection,
reasonPhrase: streamedResponse.reasonPhrase,
);
} else {
return await http.Response.fromStream(streamedResponse);
}
}
}
+8 -6
View File
@@ -1,12 +1,14 @@
part of '../../enums.dart';
enum Adapter {
xstatic(value: 'static'),
ssr(value: 'ssr');
xstatic(value: 'static'),
ssr(value: 'ssr');
const Adapter({required this.value});
const Adapter({
required this.value
});
final String value;
final String value;
String toJson() => value;
}
String toJson() => value;
}
+11 -9
View File
@@ -1,15 +1,17 @@
part of '../../enums.dart';
enum AttributeStatus {
available(value: 'available'),
processing(value: 'processing'),
deleting(value: 'deleting'),
stuck(value: 'stuck'),
failed(value: 'failed');
available(value: 'available'),
processing(value: 'processing'),
deleting(value: 'deleting'),
stuck(value: 'stuck'),
failed(value: 'failed');
const AttributeStatus({required this.value});
const AttributeStatus({
required this.value
});
final String value;
final String value;
String toJson() => value;
}
String toJson() => value;
}
+10 -8
View File
@@ -1,14 +1,16 @@
part of '../../enums.dart';
enum AuthenticationFactor {
email(value: 'email'),
phone(value: 'phone'),
totp(value: 'totp'),
recoverycode(value: 'recoverycode');
email(value: 'email'),
phone(value: 'phone'),
totp(value: 'totp'),
recoverycode(value: 'recoverycode');
const AuthenticationFactor({required this.value});
const AuthenticationFactor({
required this.value
});
final String value;
final String value;
String toJson() => value;
}
String toJson() => value;
}
+7 -5
View File
@@ -1,11 +1,13 @@
part of '../../enums.dart';
enum AuthenticatorType {
totp(value: 'totp');
totp(value: 'totp');
const AuthenticatorType({required this.value});
const AuthenticatorType({
required this.value
});
final String value;
final String value;
String toJson() => value;
}
String toJson() => value;
}
+12 -10
View File
@@ -1,16 +1,18 @@
part of '../../enums.dart';
enum BackupServices {
databases(value: 'databases'),
tablesdb(value: 'tablesdb'),
documentsdb(value: 'documentsdb'),
vectorsdb(value: 'vectorsdb'),
functions(value: 'functions'),
storage(value: 'storage');
databases(value: 'databases'),
tablesdb(value: 'tablesdb'),
documentsdb(value: 'documentsdb'),
vectorsdb(value: 'vectorsdb'),
functions(value: 'functions'),
storage(value: 'storage');
const BackupServices({required this.value});
const BackupServices({
required this.value
});
final String value;
final String value;
String toJson() => value;
}
String toJson() => value;
}
+20 -18
View File
@@ -1,24 +1,26 @@
part of '../../enums.dart';
enum Browser {
avantBrowser(value: 'aa'),
androidWebViewBeta(value: 'an'),
googleChrome(value: 'ch'),
googleChromeIOS(value: 'ci'),
googleChromeMobile(value: 'cm'),
chromium(value: 'cr'),
mozillaFirefox(value: 'ff'),
safari(value: 'sf'),
mobileSafari(value: 'mf'),
microsoftEdge(value: 'ps'),
microsoftEdgeIOS(value: 'oi'),
operaMini(value: 'om'),
opera(value: 'op'),
operaNext(value: 'on');
avantBrowser(value: 'aa'),
androidWebViewBeta(value: 'an'),
googleChrome(value: 'ch'),
googleChromeIOS(value: 'ci'),
googleChromeMobile(value: 'cm'),
chromium(value: 'cr'),
mozillaFirefox(value: 'ff'),
safari(value: 'sf'),
mobileSafari(value: 'mf'),
microsoftEdge(value: 'ps'),
microsoftEdgeIOS(value: 'oi'),
operaMini(value: 'om'),
opera(value: 'op'),
operaNext(value: 'on');
const Browser({required this.value});
const Browser({
required this.value
});
final String value;
final String value;
String toJson() => value;
}
String toJson() => value;
}
+26 -24
View File
@@ -1,30 +1,32 @@
part of '../../enums.dart';
enum BrowserPermission {
geolocation(value: 'geolocation'),
camera(value: 'camera'),
microphone(value: 'microphone'),
notifications(value: 'notifications'),
midi(value: 'midi'),
push(value: 'push'),
clipboardRead(value: 'clipboard-read'),
clipboardWrite(value: 'clipboard-write'),
paymentHandler(value: 'payment-handler'),
usb(value: 'usb'),
bluetooth(value: 'bluetooth'),
accelerometer(value: 'accelerometer'),
gyroscope(value: 'gyroscope'),
magnetometer(value: 'magnetometer'),
ambientLightSensor(value: 'ambient-light-sensor'),
backgroundSync(value: 'background-sync'),
persistentStorage(value: 'persistent-storage'),
screenWakeLock(value: 'screen-wake-lock'),
webShare(value: 'web-share'),
xrSpatialTracking(value: 'xr-spatial-tracking');
geolocation(value: 'geolocation'),
camera(value: 'camera'),
microphone(value: 'microphone'),
notifications(value: 'notifications'),
midi(value: 'midi'),
push(value: 'push'),
clipboardRead(value: 'clipboard-read'),
clipboardWrite(value: 'clipboard-write'),
paymentHandler(value: 'payment-handler'),
usb(value: 'usb'),
bluetooth(value: 'bluetooth'),
accelerometer(value: 'accelerometer'),
gyroscope(value: 'gyroscope'),
magnetometer(value: 'magnetometer'),
ambientLightSensor(value: 'ambient-light-sensor'),
backgroundSync(value: 'background-sync'),
persistentStorage(value: 'persistent-storage'),
screenWakeLock(value: 'screen-wake-lock'),
webShare(value: 'web-share'),
xrSpatialTracking(value: 'xr-spatial-tracking');
const BrowserPermission({required this.value});
const BrowserPermission({
required this.value
});
final String value;
final String value;
String toJson() => value;
}
String toJson() => value;
}
+92 -90
View File
@@ -1,96 +1,98 @@
part of '../../enums.dart';
enum BuildRuntime {
node145(value: 'node-14.5'),
node160(value: 'node-16.0'),
node180(value: 'node-18.0'),
node190(value: 'node-19.0'),
node200(value: 'node-20.0'),
node210(value: 'node-21.0'),
node22(value: 'node-22'),
node23(value: 'node-23'),
node24(value: 'node-24'),
node25(value: 'node-25'),
php80(value: 'php-8.0'),
php81(value: 'php-8.1'),
php82(value: 'php-8.2'),
php83(value: 'php-8.3'),
php84(value: 'php-8.4'),
ruby30(value: 'ruby-3.0'),
ruby31(value: 'ruby-3.1'),
ruby32(value: 'ruby-3.2'),
ruby33(value: 'ruby-3.3'),
ruby34(value: 'ruby-3.4'),
ruby40(value: 'ruby-4.0'),
python38(value: 'python-3.8'),
python39(value: 'python-3.9'),
python310(value: 'python-3.10'),
python311(value: 'python-3.11'),
python312(value: 'python-3.12'),
python313(value: 'python-3.13'),
python314(value: 'python-3.14'),
pythonMl311(value: 'python-ml-3.11'),
pythonMl312(value: 'python-ml-3.12'),
pythonMl313(value: 'python-ml-3.13'),
deno140(value: 'deno-1.40'),
deno146(value: 'deno-1.46'),
deno20(value: 'deno-2.0'),
deno25(value: 'deno-2.5'),
deno26(value: 'deno-2.6'),
dart215(value: 'dart-2.15'),
dart216(value: 'dart-2.16'),
dart217(value: 'dart-2.17'),
dart218(value: 'dart-2.18'),
dart219(value: 'dart-2.19'),
dart30(value: 'dart-3.0'),
dart31(value: 'dart-3.1'),
dart33(value: 'dart-3.3'),
dart35(value: 'dart-3.5'),
dart38(value: 'dart-3.8'),
dart39(value: 'dart-3.9'),
dart310(value: 'dart-3.10'),
dotnet60(value: 'dotnet-6.0'),
dotnet70(value: 'dotnet-7.0'),
dotnet80(value: 'dotnet-8.0'),
dotnet10(value: 'dotnet-10'),
java80(value: 'java-8.0'),
java110(value: 'java-11.0'),
java170(value: 'java-17.0'),
java180(value: 'java-18.0'),
java210(value: 'java-21.0'),
java22(value: 'java-22'),
java25(value: 'java-25'),
swift55(value: 'swift-5.5'),
swift58(value: 'swift-5.8'),
swift59(value: 'swift-5.9'),
swift510(value: 'swift-5.10'),
swift62(value: 'swift-6.2'),
kotlin16(value: 'kotlin-1.6'),
kotlin18(value: 'kotlin-1.8'),
kotlin19(value: 'kotlin-1.9'),
kotlin20(value: 'kotlin-2.0'),
kotlin23(value: 'kotlin-2.3'),
cpp17(value: 'cpp-17'),
cpp20(value: 'cpp-20'),
bun10(value: 'bun-1.0'),
bun11(value: 'bun-1.1'),
bun12(value: 'bun-1.2'),
bun13(value: 'bun-1.3'),
go123(value: 'go-1.23'),
go124(value: 'go-1.24'),
go125(value: 'go-1.25'),
go126(value: 'go-1.26'),
static1(value: 'static-1'),
flutter324(value: 'flutter-3.24'),
flutter327(value: 'flutter-3.27'),
flutter329(value: 'flutter-3.29'),
flutter332(value: 'flutter-3.32'),
flutter335(value: 'flutter-3.35'),
flutter338(value: 'flutter-3.38');
node145(value: 'node-14.5'),
node160(value: 'node-16.0'),
node180(value: 'node-18.0'),
node190(value: 'node-19.0'),
node200(value: 'node-20.0'),
node210(value: 'node-21.0'),
node22(value: 'node-22'),
node23(value: 'node-23'),
node24(value: 'node-24'),
node25(value: 'node-25'),
php80(value: 'php-8.0'),
php81(value: 'php-8.1'),
php82(value: 'php-8.2'),
php83(value: 'php-8.3'),
php84(value: 'php-8.4'),
ruby30(value: 'ruby-3.0'),
ruby31(value: 'ruby-3.1'),
ruby32(value: 'ruby-3.2'),
ruby33(value: 'ruby-3.3'),
ruby34(value: 'ruby-3.4'),
ruby40(value: 'ruby-4.0'),
python38(value: 'python-3.8'),
python39(value: 'python-3.9'),
python310(value: 'python-3.10'),
python311(value: 'python-3.11'),
python312(value: 'python-3.12'),
python313(value: 'python-3.13'),
python314(value: 'python-3.14'),
pythonMl311(value: 'python-ml-3.11'),
pythonMl312(value: 'python-ml-3.12'),
pythonMl313(value: 'python-ml-3.13'),
deno140(value: 'deno-1.40'),
deno146(value: 'deno-1.46'),
deno20(value: 'deno-2.0'),
deno25(value: 'deno-2.5'),
deno26(value: 'deno-2.6'),
dart215(value: 'dart-2.15'),
dart216(value: 'dart-2.16'),
dart217(value: 'dart-2.17'),
dart218(value: 'dart-2.18'),
dart219(value: 'dart-2.19'),
dart30(value: 'dart-3.0'),
dart31(value: 'dart-3.1'),
dart33(value: 'dart-3.3'),
dart35(value: 'dart-3.5'),
dart38(value: 'dart-3.8'),
dart39(value: 'dart-3.9'),
dart310(value: 'dart-3.10'),
dotnet60(value: 'dotnet-6.0'),
dotnet70(value: 'dotnet-7.0'),
dotnet80(value: 'dotnet-8.0'),
dotnet10(value: 'dotnet-10'),
java80(value: 'java-8.0'),
java110(value: 'java-11.0'),
java170(value: 'java-17.0'),
java180(value: 'java-18.0'),
java210(value: 'java-21.0'),
java22(value: 'java-22'),
java25(value: 'java-25'),
swift55(value: 'swift-5.5'),
swift58(value: 'swift-5.8'),
swift59(value: 'swift-5.9'),
swift510(value: 'swift-5.10'),
swift62(value: 'swift-6.2'),
kotlin16(value: 'kotlin-1.6'),
kotlin18(value: 'kotlin-1.8'),
kotlin19(value: 'kotlin-1.9'),
kotlin20(value: 'kotlin-2.0'),
kotlin23(value: 'kotlin-2.3'),
cpp17(value: 'cpp-17'),
cpp20(value: 'cpp-20'),
bun10(value: 'bun-1.0'),
bun11(value: 'bun-1.1'),
bun12(value: 'bun-1.2'),
bun13(value: 'bun-1.3'),
go123(value: 'go-1.23'),
go124(value: 'go-1.24'),
go125(value: 'go-1.25'),
go126(value: 'go-1.26'),
static1(value: 'static-1'),
flutter324(value: 'flutter-3.24'),
flutter327(value: 'flutter-3.27'),
flutter329(value: 'flutter-3.29'),
flutter332(value: 'flutter-3.32'),
flutter335(value: 'flutter-3.35'),
flutter338(value: 'flutter-3.38');
const BuildRuntime({required this.value});
const BuildRuntime({
required this.value
});
final String value;
final String value;
String toJson() => value;
}
String toJson() => value;
}
+11 -9
View File
@@ -1,15 +1,17 @@
part of '../../enums.dart';
enum ColumnStatus {
available(value: 'available'),
processing(value: 'processing'),
deleting(value: 'deleting'),
stuck(value: 'stuck'),
failed(value: 'failed');
available(value: 'available'),
processing(value: 'processing'),
deleting(value: 'deleting'),
stuck(value: 'stuck'),
failed(value: 'failed');
const ColumnStatus({required this.value});
const ColumnStatus({
required this.value
});
final String value;
final String value;
String toJson() => value;
}
String toJson() => value;
}
+9 -7
View File
@@ -1,13 +1,15 @@
part of '../../enums.dart';
enum Compression {
none(value: 'none'),
gzip(value: 'gzip'),
zstd(value: 'zstd');
none(value: 'none'),
gzip(value: 'gzip'),
zstd(value: 'zstd');
const Compression({required this.value});
const Compression({
required this.value
});
final String value;
final String value;
String toJson() => value;
}
String toJson() => value;
}
+23 -21
View File
@@ -1,27 +1,29 @@
part of '../../enums.dart';
enum CreditCard {
americanExpress(value: 'amex'),
argencard(value: 'argencard'),
cabal(value: 'cabal'),
cencosud(value: 'cencosud'),
dinersClub(value: 'diners'),
discover(value: 'discover'),
elo(value: 'elo'),
hipercard(value: 'hipercard'),
jCB(value: 'jcb'),
mastercard(value: 'mastercard'),
naranja(value: 'naranja'),
tarjetaShopping(value: 'targeta-shopping'),
unionPay(value: 'unionpay'),
visa(value: 'visa'),
mIR(value: 'mir'),
maestro(value: 'maestro'),
rupay(value: 'rupay');
americanExpress(value: 'amex'),
argencard(value: 'argencard'),
cabal(value: 'cabal'),
cencosud(value: 'cencosud'),
dinersClub(value: 'diners'),
discover(value: 'discover'),
elo(value: 'elo'),
hipercard(value: 'hipercard'),
jCB(value: 'jcb'),
mastercard(value: 'mastercard'),
naranja(value: 'naranja'),
tarjetaShopping(value: 'targeta-shopping'),
unionPay(value: 'unionpay'),
visa(value: 'visa'),
mIR(value: 'mir'),
maestro(value: 'maestro'),
rupay(value: 'rupay');
const CreditCard({required this.value});
const CreditCard({
required this.value
});
final String value;
final String value;
String toJson() => value;
}
String toJson() => value;
}
+10 -8
View File
@@ -1,14 +1,16 @@
part of '../../enums.dart';
enum DatabaseType {
legacy(value: 'legacy'),
tablesdb(value: 'tablesdb'),
documentsdb(value: 'documentsdb'),
vectorsdb(value: 'vectorsdb');
legacy(value: 'legacy'),
tablesdb(value: 'tablesdb'),
documentsdb(value: 'documentsdb'),
vectorsdb(value: 'vectorsdb');
const DatabaseType({required this.value});
const DatabaseType({
required this.value
});
final String value;
final String value;
String toJson() => value;
}
String toJson() => value;
}
+10 -8
View File
@@ -1,14 +1,16 @@
part of '../../enums.dart';
enum DatabasesIndexType {
key(value: 'key'),
fulltext(value: 'fulltext'),
unique(value: 'unique'),
spatial(value: 'spatial');
key(value: 'key'),
fulltext(value: 'fulltext'),
unique(value: 'unique'),
spatial(value: 'spatial');
const DatabasesIndexType({required this.value});
const DatabasesIndexType({
required this.value
});
final String value;
final String value;
String toJson() => value;
}
String toJson() => value;
}
+8 -6
View File
@@ -1,12 +1,14 @@
part of '../../enums.dart';
enum DeploymentDownloadType {
source(value: 'source'),
output(value: 'output');
source(value: 'source'),
output(value: 'output');
const DeploymentDownloadType({required this.value});
const DeploymentDownloadType({
required this.value
});
final String value;
final String value;
String toJson() => value;
}
String toJson() => value;
}
+12 -10
View File
@@ -1,16 +1,18 @@
part of '../../enums.dart';
enum DeploymentStatus {
waiting(value: 'waiting'),
processing(value: 'processing'),
building(value: 'building'),
ready(value: 'ready'),
canceled(value: 'canceled'),
failed(value: 'failed');
waiting(value: 'waiting'),
processing(value: 'processing'),
building(value: 'building'),
ready(value: 'ready'),
canceled(value: 'canceled'),
failed(value: 'failed');
const DeploymentStatus({required this.value});
const DeploymentStatus({
required this.value
});
final String value;
final String value;
String toJson() => value;
}
String toJson() => value;
}
+13 -11
View File
@@ -1,17 +1,19 @@
part of '../../enums.dart';
enum ExecutionMethod {
gET(value: 'GET'),
pOST(value: 'POST'),
pUT(value: 'PUT'),
pATCH(value: 'PATCH'),
dELETE(value: 'DELETE'),
oPTIONS(value: 'OPTIONS'),
hEAD(value: 'HEAD');
gET(value: 'GET'),
pOST(value: 'POST'),
pUT(value: 'PUT'),
pATCH(value: 'PATCH'),
dELETE(value: 'DELETE'),
oPTIONS(value: 'OPTIONS'),
hEAD(value: 'HEAD');
const ExecutionMethod({required this.value});
const ExecutionMethod({
required this.value
});
final String value;
final String value;
String toJson() => value;
}
String toJson() => value;
}
+11 -9
View File
@@ -1,15 +1,17 @@
part of '../../enums.dart';
enum ExecutionStatus {
waiting(value: 'waiting'),
processing(value: 'processing'),
completed(value: 'completed'),
failed(value: 'failed'),
scheduled(value: 'scheduled');
waiting(value: 'waiting'),
processing(value: 'processing'),
completed(value: 'completed'),
failed(value: 'failed'),
scheduled(value: 'scheduled');
const ExecutionStatus({required this.value});
const ExecutionStatus({
required this.value
});
final String value;
final String value;
String toJson() => value;
}
String toJson() => value;
}
+9 -7
View File
@@ -1,13 +1,15 @@
part of '../../enums.dart';
enum ExecutionTrigger {
http(value: 'http'),
schedule(value: 'schedule'),
event(value: 'event');
http(value: 'http'),
schedule(value: 'schedule'),
event(value: 'event');
const ExecutionTrigger({required this.value});
const ExecutionTrigger({
required this.value
});
final String value;
final String value;
String toJson() => value;
}
String toJson() => value;
}
+201 -199
View File
@@ -1,205 +1,207 @@
part of '../../enums.dart';
enum Flag {
afghanistan(value: 'af'),
angola(value: 'ao'),
albania(value: 'al'),
andorra(value: 'ad'),
unitedArabEmirates(value: 'ae'),
argentina(value: 'ar'),
armenia(value: 'am'),
antiguaAndBarbuda(value: 'ag'),
australia(value: 'au'),
austria(value: 'at'),
azerbaijan(value: 'az'),
burundi(value: 'bi'),
belgium(value: 'be'),
benin(value: 'bj'),
burkinaFaso(value: 'bf'),
bangladesh(value: 'bd'),
bulgaria(value: 'bg'),
bahrain(value: 'bh'),
bahamas(value: 'bs'),
bosniaAndHerzegovina(value: 'ba'),
belarus(value: 'by'),
belize(value: 'bz'),
bolivia(value: 'bo'),
brazil(value: 'br'),
barbados(value: 'bb'),
bruneiDarussalam(value: 'bn'),
bhutan(value: 'bt'),
botswana(value: 'bw'),
centralAfricanRepublic(value: 'cf'),
canada(value: 'ca'),
switzerland(value: 'ch'),
chile(value: 'cl'),
china(value: 'cn'),
coteDIvoire(value: 'ci'),
cameroon(value: 'cm'),
democraticRepublicOfTheCongo(value: 'cd'),
republicOfTheCongo(value: 'cg'),
colombia(value: 'co'),
comoros(value: 'km'),
capeVerde(value: 'cv'),
costaRica(value: 'cr'),
cuba(value: 'cu'),
cyprus(value: 'cy'),
czechRepublic(value: 'cz'),
germany(value: 'de'),
djibouti(value: 'dj'),
dominica(value: 'dm'),
denmark(value: 'dk'),
dominicanRepublic(value: 'do'),
algeria(value: 'dz'),
ecuador(value: 'ec'),
egypt(value: 'eg'),
eritrea(value: 'er'),
spain(value: 'es'),
estonia(value: 'ee'),
ethiopia(value: 'et'),
finland(value: 'fi'),
fiji(value: 'fj'),
france(value: 'fr'),
micronesiaFederatedStatesOf(value: 'fm'),
gabon(value: 'ga'),
unitedKingdom(value: 'gb'),
georgia(value: 'ge'),
ghana(value: 'gh'),
guinea(value: 'gn'),
gambia(value: 'gm'),
guineaBissau(value: 'gw'),
equatorialGuinea(value: 'gq'),
greece(value: 'gr'),
grenada(value: 'gd'),
guatemala(value: 'gt'),
guyana(value: 'gy'),
honduras(value: 'hn'),
croatia(value: 'hr'),
haiti(value: 'ht'),
hungary(value: 'hu'),
indonesia(value: 'id'),
india(value: 'in'),
ireland(value: 'ie'),
iranIslamicRepublicOf(value: 'ir'),
iraq(value: 'iq'),
iceland(value: 'is'),
israel(value: 'il'),
italy(value: 'it'),
jamaica(value: 'jm'),
jordan(value: 'jo'),
japan(value: 'jp'),
kazakhstan(value: 'kz'),
kenya(value: 'ke'),
kyrgyzstan(value: 'kg'),
cambodia(value: 'kh'),
kiribati(value: 'ki'),
saintKittsAndNevis(value: 'kn'),
southKorea(value: 'kr'),
kuwait(value: 'kw'),
laoPeopleSDemocraticRepublic(value: 'la'),
lebanon(value: 'lb'),
liberia(value: 'lr'),
libya(value: 'ly'),
saintLucia(value: 'lc'),
liechtenstein(value: 'li'),
sriLanka(value: 'lk'),
lesotho(value: 'ls'),
lithuania(value: 'lt'),
luxembourg(value: 'lu'),
latvia(value: 'lv'),
morocco(value: 'ma'),
monaco(value: 'mc'),
moldova(value: 'md'),
madagascar(value: 'mg'),
maldives(value: 'mv'),
mexico(value: 'mx'),
marshallIslands(value: 'mh'),
northMacedonia(value: 'mk'),
mali(value: 'ml'),
malta(value: 'mt'),
myanmar(value: 'mm'),
montenegro(value: 'me'),
mongolia(value: 'mn'),
mozambique(value: 'mz'),
mauritania(value: 'mr'),
mauritius(value: 'mu'),
malawi(value: 'mw'),
malaysia(value: 'my'),
namibia(value: 'na'),
niger(value: 'ne'),
nigeria(value: 'ng'),
nicaragua(value: 'ni'),
netherlands(value: 'nl'),
norway(value: 'no'),
nepal(value: 'np'),
nauru(value: 'nr'),
newZealand(value: 'nz'),
oman(value: 'om'),
pakistan(value: 'pk'),
panama(value: 'pa'),
peru(value: 'pe'),
philippines(value: 'ph'),
palau(value: 'pw'),
papuaNewGuinea(value: 'pg'),
poland(value: 'pl'),
frenchPolynesia(value: 'pf'),
northKorea(value: 'kp'),
portugal(value: 'pt'),
paraguay(value: 'py'),
qatar(value: 'qa'),
romania(value: 'ro'),
russia(value: 'ru'),
rwanda(value: 'rw'),
saudiArabia(value: 'sa'),
sudan(value: 'sd'),
senegal(value: 'sn'),
singapore(value: 'sg'),
solomonIslands(value: 'sb'),
sierraLeone(value: 'sl'),
elSalvador(value: 'sv'),
sanMarino(value: 'sm'),
somalia(value: 'so'),
serbia(value: 'rs'),
southSudan(value: 'ss'),
saoTomeAndPrincipe(value: 'st'),
suriname(value: 'sr'),
slovakia(value: 'sk'),
slovenia(value: 'si'),
sweden(value: 'se'),
eswatini(value: 'sz'),
seychelles(value: 'sc'),
syria(value: 'sy'),
chad(value: 'td'),
togo(value: 'tg'),
thailand(value: 'th'),
tajikistan(value: 'tj'),
turkmenistan(value: 'tm'),
timorLeste(value: 'tl'),
tonga(value: 'to'),
trinidadAndTobago(value: 'tt'),
tunisia(value: 'tn'),
turkey(value: 'tr'),
tuvalu(value: 'tv'),
tanzania(value: 'tz'),
uganda(value: 'ug'),
ukraine(value: 'ua'),
uruguay(value: 'uy'),
unitedStates(value: 'us'),
uzbekistan(value: 'uz'),
vaticanCity(value: 'va'),
saintVincentAndTheGrenadines(value: 'vc'),
venezuela(value: 've'),
vietnam(value: 'vn'),
vanuatu(value: 'vu'),
samoa(value: 'ws'),
yemen(value: 'ye'),
southAfrica(value: 'za'),
zambia(value: 'zm'),
zimbabwe(value: 'zw');
afghanistan(value: 'af'),
angola(value: 'ao'),
albania(value: 'al'),
andorra(value: 'ad'),
unitedArabEmirates(value: 'ae'),
argentina(value: 'ar'),
armenia(value: 'am'),
antiguaAndBarbuda(value: 'ag'),
australia(value: 'au'),
austria(value: 'at'),
azerbaijan(value: 'az'),
burundi(value: 'bi'),
belgium(value: 'be'),
benin(value: 'bj'),
burkinaFaso(value: 'bf'),
bangladesh(value: 'bd'),
bulgaria(value: 'bg'),
bahrain(value: 'bh'),
bahamas(value: 'bs'),
bosniaAndHerzegovina(value: 'ba'),
belarus(value: 'by'),
belize(value: 'bz'),
bolivia(value: 'bo'),
brazil(value: 'br'),
barbados(value: 'bb'),
bruneiDarussalam(value: 'bn'),
bhutan(value: 'bt'),
botswana(value: 'bw'),
centralAfricanRepublic(value: 'cf'),
canada(value: 'ca'),
switzerland(value: 'ch'),
chile(value: 'cl'),
china(value: 'cn'),
coteDIvoire(value: 'ci'),
cameroon(value: 'cm'),
democraticRepublicOfTheCongo(value: 'cd'),
republicOfTheCongo(value: 'cg'),
colombia(value: 'co'),
comoros(value: 'km'),
capeVerde(value: 'cv'),
costaRica(value: 'cr'),
cuba(value: 'cu'),
cyprus(value: 'cy'),
czechRepublic(value: 'cz'),
germany(value: 'de'),
djibouti(value: 'dj'),
dominica(value: 'dm'),
denmark(value: 'dk'),
dominicanRepublic(value: 'do'),
algeria(value: 'dz'),
ecuador(value: 'ec'),
egypt(value: 'eg'),
eritrea(value: 'er'),
spain(value: 'es'),
estonia(value: 'ee'),
ethiopia(value: 'et'),
finland(value: 'fi'),
fiji(value: 'fj'),
france(value: 'fr'),
micronesiaFederatedStatesOf(value: 'fm'),
gabon(value: 'ga'),
unitedKingdom(value: 'gb'),
georgia(value: 'ge'),
ghana(value: 'gh'),
guinea(value: 'gn'),
gambia(value: 'gm'),
guineaBissau(value: 'gw'),
equatorialGuinea(value: 'gq'),
greece(value: 'gr'),
grenada(value: 'gd'),
guatemala(value: 'gt'),
guyana(value: 'gy'),
honduras(value: 'hn'),
croatia(value: 'hr'),
haiti(value: 'ht'),
hungary(value: 'hu'),
indonesia(value: 'id'),
india(value: 'in'),
ireland(value: 'ie'),
iranIslamicRepublicOf(value: 'ir'),
iraq(value: 'iq'),
iceland(value: 'is'),
israel(value: 'il'),
italy(value: 'it'),
jamaica(value: 'jm'),
jordan(value: 'jo'),
japan(value: 'jp'),
kazakhstan(value: 'kz'),
kenya(value: 'ke'),
kyrgyzstan(value: 'kg'),
cambodia(value: 'kh'),
kiribati(value: 'ki'),
saintKittsAndNevis(value: 'kn'),
southKorea(value: 'kr'),
kuwait(value: 'kw'),
laoPeopleSDemocraticRepublic(value: 'la'),
lebanon(value: 'lb'),
liberia(value: 'lr'),
libya(value: 'ly'),
saintLucia(value: 'lc'),
liechtenstein(value: 'li'),
sriLanka(value: 'lk'),
lesotho(value: 'ls'),
lithuania(value: 'lt'),
luxembourg(value: 'lu'),
latvia(value: 'lv'),
morocco(value: 'ma'),
monaco(value: 'mc'),
moldova(value: 'md'),
madagascar(value: 'mg'),
maldives(value: 'mv'),
mexico(value: 'mx'),
marshallIslands(value: 'mh'),
northMacedonia(value: 'mk'),
mali(value: 'ml'),
malta(value: 'mt'),
myanmar(value: 'mm'),
montenegro(value: 'me'),
mongolia(value: 'mn'),
mozambique(value: 'mz'),
mauritania(value: 'mr'),
mauritius(value: 'mu'),
malawi(value: 'mw'),
malaysia(value: 'my'),
namibia(value: 'na'),
niger(value: 'ne'),
nigeria(value: 'ng'),
nicaragua(value: 'ni'),
netherlands(value: 'nl'),
norway(value: 'no'),
nepal(value: 'np'),
nauru(value: 'nr'),
newZealand(value: 'nz'),
oman(value: 'om'),
pakistan(value: 'pk'),
panama(value: 'pa'),
peru(value: 'pe'),
philippines(value: 'ph'),
palau(value: 'pw'),
papuaNewGuinea(value: 'pg'),
poland(value: 'pl'),
frenchPolynesia(value: 'pf'),
northKorea(value: 'kp'),
portugal(value: 'pt'),
paraguay(value: 'py'),
qatar(value: 'qa'),
romania(value: 'ro'),
russia(value: 'ru'),
rwanda(value: 'rw'),
saudiArabia(value: 'sa'),
sudan(value: 'sd'),
senegal(value: 'sn'),
singapore(value: 'sg'),
solomonIslands(value: 'sb'),
sierraLeone(value: 'sl'),
elSalvador(value: 'sv'),
sanMarino(value: 'sm'),
somalia(value: 'so'),
serbia(value: 'rs'),
southSudan(value: 'ss'),
saoTomeAndPrincipe(value: 'st'),
suriname(value: 'sr'),
slovakia(value: 'sk'),
slovenia(value: 'si'),
sweden(value: 'se'),
eswatini(value: 'sz'),
seychelles(value: 'sc'),
syria(value: 'sy'),
chad(value: 'td'),
togo(value: 'tg'),
thailand(value: 'th'),
tajikistan(value: 'tj'),
turkmenistan(value: 'tm'),
timorLeste(value: 'tl'),
tonga(value: 'to'),
trinidadAndTobago(value: 'tt'),
tunisia(value: 'tn'),
turkey(value: 'tr'),
tuvalu(value: 'tv'),
tanzania(value: 'tz'),
uganda(value: 'ug'),
ukraine(value: 'ua'),
uruguay(value: 'uy'),
unitedStates(value: 'us'),
uzbekistan(value: 'uz'),
vaticanCity(value: 'va'),
saintVincentAndTheGrenadines(value: 'vc'),
venezuela(value: 've'),
vietnam(value: 'vn'),
vanuatu(value: 'vu'),
samoa(value: 'ws'),
yemen(value: 'ye'),
southAfrica(value: 'za'),
zambia(value: 'zm'),
zimbabwe(value: 'zw');
const Flag({required this.value});
const Flag({
required this.value
});
final String value;
final String value;
String toJson() => value;
}
String toJson() => value;
}
+21 -19
View File
@@ -1,25 +1,27 @@
part of '../../enums.dart';
enum Framework {
analog(value: 'analog'),
angular(value: 'angular'),
nextjs(value: 'nextjs'),
react(value: 'react'),
nuxt(value: 'nuxt'),
vue(value: 'vue'),
sveltekit(value: 'sveltekit'),
astro(value: 'astro'),
tanstackStart(value: 'tanstack-start'),
remix(value: 'remix'),
lynx(value: 'lynx'),
flutter(value: 'flutter'),
reactNative(value: 'react-native'),
vite(value: 'vite'),
other(value: 'other');
analog(value: 'analog'),
angular(value: 'angular'),
nextjs(value: 'nextjs'),
react(value: 'react'),
nuxt(value: 'nuxt'),
vue(value: 'vue'),
sveltekit(value: 'sveltekit'),
astro(value: 'astro'),
tanstackStart(value: 'tanstack-start'),
remix(value: 'remix'),
lynx(value: 'lynx'),
flutter(value: 'flutter'),
reactNative(value: 'react-native'),
vite(value: 'vite'),
other(value: 'other');
const Framework({required this.value});
const Framework({
required this.value
});
final String value;
final String value;
String toJson() => value;
}
String toJson() => value;
}
+9 -7
View File
@@ -1,13 +1,15 @@
part of '../../enums.dart';
enum HealthAntivirusStatus {
disabled(value: 'disabled'),
offline(value: 'offline'),
online(value: 'online');
disabled(value: 'disabled'),
offline(value: 'offline'),
online(value: 'online');
const HealthAntivirusStatus({required this.value});
const HealthAntivirusStatus({
required this.value
});
final String value;
final String value;
String toJson() => value;
}
String toJson() => value;
}
+8 -6
View File
@@ -1,12 +1,14 @@
part of '../../enums.dart';
enum HealthCheckStatus {
pass(value: 'pass'),
fail(value: 'fail');
pass(value: 'pass'),
fail(value: 'fail');
const HealthCheckStatus({required this.value});
const HealthCheckStatus({
required this.value
});
final String value;
final String value;
String toJson() => value;
}
String toJson() => value;
}
+13 -11
View File
@@ -1,17 +1,19 @@
part of '../../enums.dart';
enum ImageFormat {
jpg(value: 'jpg'),
jpeg(value: 'jpeg'),
png(value: 'png'),
webp(value: 'webp'),
heic(value: 'heic'),
avif(value: 'avif'),
gif(value: 'gif');
jpg(value: 'jpg'),
jpeg(value: 'jpeg'),
png(value: 'png'),
webp(value: 'webp'),
heic(value: 'heic'),
avif(value: 'avif'),
gif(value: 'gif');
const ImageFormat({required this.value});
const ImageFormat({
required this.value
});
final String value;
final String value;
String toJson() => value;
}
String toJson() => value;
}
+15 -13
View File
@@ -1,19 +1,21 @@
part of '../../enums.dart';
enum ImageGravity {
center(value: 'center'),
topLeft(value: 'top-left'),
top(value: 'top'),
topRight(value: 'top-right'),
left(value: 'left'),
right(value: 'right'),
bottomLeft(value: 'bottom-left'),
bottom(value: 'bottom'),
bottomRight(value: 'bottom-right');
center(value: 'center'),
topLeft(value: 'top-left'),
top(value: 'top'),
topRight(value: 'top-right'),
left(value: 'left'),
right(value: 'right'),
bottomLeft(value: 'bottom-left'),
bottom(value: 'bottom'),
bottomRight(value: 'bottom-right');
const ImageGravity({required this.value});
const ImageGravity({
required this.value
});
final String value;
final String value;
String toJson() => value;
}
String toJson() => value;
}
+11 -9
View File
@@ -1,15 +1,17 @@
part of '../../enums.dart';
enum IndexStatus {
available(value: 'available'),
processing(value: 'processing'),
deleting(value: 'deleting'),
stuck(value: 'stuck'),
failed(value: 'failed');
available(value: 'available'),
processing(value: 'processing'),
deleting(value: 'deleting'),
stuck(value: 'stuck'),
failed(value: 'failed');
const IndexStatus({required this.value});
const IndexStatus({
required this.value
});
final String value;
final String value;
String toJson() => value;
}
String toJson() => value;
}
+8 -6
View File
@@ -1,12 +1,14 @@
part of '../../enums.dart';
enum MessagePriority {
normal(value: 'normal'),
high(value: 'high');
normal(value: 'normal'),
high(value: 'high');
const MessagePriority({required this.value});
const MessagePriority({
required this.value
});
final String value;
final String value;
String toJson() => value;
}
String toJson() => value;
}
+11 -9
View File
@@ -1,15 +1,17 @@
part of '../../enums.dart';
enum MessageStatus {
draft(value: 'draft'),
processing(value: 'processing'),
scheduled(value: 'scheduled'),
sent(value: 'sent'),
failed(value: 'failed');
draft(value: 'draft'),
processing(value: 'processing'),
scheduled(value: 'scheduled'),
sent(value: 'sent'),
failed(value: 'failed');
const MessageStatus({required this.value});
const MessageStatus({
required this.value
});
final String value;
final String value;
String toJson() => value;
}
String toJson() => value;
}
+9 -7
View File
@@ -1,13 +1,15 @@
part of '../../enums.dart';
enum MessagingProviderType {
email(value: 'email'),
sms(value: 'sms'),
push(value: 'push');
email(value: 'email'),
sms(value: 'sms'),
push(value: 'push');
const MessagingProviderType({required this.value});
const MessagingProviderType({
required this.value
});
final String value;
final String value;
String toJson() => value;
}
String toJson() => value;
}
+19 -17
View File
@@ -1,23 +1,25 @@
part of '../../enums.dart';
enum Name {
v1Database(value: 'v1-database'),
v1Deletes(value: 'v1-deletes'),
v1Audits(value: 'v1-audits'),
v1Mails(value: 'v1-mails'),
v1Functions(value: 'v1-functions'),
v1StatsResources(value: 'v1-stats-resources'),
v1StatsUsage(value: 'v1-stats-usage'),
v1Webhooks(value: 'v1-webhooks'),
v1Certificates(value: 'v1-certificates'),
v1Builds(value: 'v1-builds'),
v1Screenshots(value: 'v1-screenshots'),
v1Messaging(value: 'v1-messaging'),
v1Migrations(value: 'v1-migrations');
v1Database(value: 'v1-database'),
v1Deletes(value: 'v1-deletes'),
v1Audits(value: 'v1-audits'),
v1Mails(value: 'v1-mails'),
v1Functions(value: 'v1-functions'),
v1StatsResources(value: 'v1-stats-resources'),
v1StatsUsage(value: 'v1-stats-usage'),
v1Webhooks(value: 'v1-webhooks'),
v1Certificates(value: 'v1-certificates'),
v1Builds(value: 'v1-builds'),
v1Screenshots(value: 'v1-screenshots'),
v1Messaging(value: 'v1-messaging'),
v1Migrations(value: 'v1-migrations');
const Name({required this.value});
const Name({
required this.value
});
final String value;
final String value;
String toJson() => value;
}
String toJson() => value;
}
+45 -43
View File
@@ -1,49 +1,51 @@
part of '../../enums.dart';
enum OAuthProvider {
amazon(value: 'amazon'),
apple(value: 'apple'),
auth0(value: 'auth0'),
authentik(value: 'authentik'),
autodesk(value: 'autodesk'),
bitbucket(value: 'bitbucket'),
bitly(value: 'bitly'),
box(value: 'box'),
dailymotion(value: 'dailymotion'),
discord(value: 'discord'),
disqus(value: 'disqus'),
dropbox(value: 'dropbox'),
etsy(value: 'etsy'),
facebook(value: 'facebook'),
figma(value: 'figma'),
github(value: 'github'),
gitlab(value: 'gitlab'),
google(value: 'google'),
linkedin(value: 'linkedin'),
microsoft(value: 'microsoft'),
notion(value: 'notion'),
oidc(value: 'oidc'),
okta(value: 'okta'),
paypal(value: 'paypal'),
paypalSandbox(value: 'paypalSandbox'),
podio(value: 'podio'),
salesforce(value: 'salesforce'),
slack(value: 'slack'),
spotify(value: 'spotify'),
stripe(value: 'stripe'),
tradeshift(value: 'tradeshift'),
tradeshiftBox(value: 'tradeshiftBox'),
twitch(value: 'twitch'),
wordpress(value: 'wordpress'),
yahoo(value: 'yahoo'),
yammer(value: 'yammer'),
yandex(value: 'yandex'),
zoho(value: 'zoho'),
zoom(value: 'zoom');
amazon(value: 'amazon'),
apple(value: 'apple'),
auth0(value: 'auth0'),
authentik(value: 'authentik'),
autodesk(value: 'autodesk'),
bitbucket(value: 'bitbucket'),
bitly(value: 'bitly'),
box(value: 'box'),
dailymotion(value: 'dailymotion'),
discord(value: 'discord'),
disqus(value: 'disqus'),
dropbox(value: 'dropbox'),
etsy(value: 'etsy'),
facebook(value: 'facebook'),
figma(value: 'figma'),
github(value: 'github'),
gitlab(value: 'gitlab'),
google(value: 'google'),
linkedin(value: 'linkedin'),
microsoft(value: 'microsoft'),
notion(value: 'notion'),
oidc(value: 'oidc'),
okta(value: 'okta'),
paypal(value: 'paypal'),
paypalSandbox(value: 'paypalSandbox'),
podio(value: 'podio'),
salesforce(value: 'salesforce'),
slack(value: 'slack'),
spotify(value: 'spotify'),
stripe(value: 'stripe'),
tradeshift(value: 'tradeshift'),
tradeshiftBox(value: 'tradeshiftBox'),
twitch(value: 'twitch'),
wordpress(value: 'wordpress'),
yahoo(value: 'yahoo'),
yammer(value: 'yammer'),
yandex(value: 'yandex'),
zoho(value: 'zoho'),
zoom(value: 'zoom');
const OAuthProvider({required this.value});
const OAuthProvider({
required this.value
});
final String value;
final String value;
String toJson() => value;
}
String toJson() => value;
}
+8 -6
View File
@@ -1,12 +1,14 @@
part of '../../enums.dart';
enum OrderBy {
asc(value: 'asc'),
desc(value: 'desc');
asc(value: 'asc'),
desc(value: 'desc');
const OrderBy({required this.value});
const OrderBy({
required this.value
});
final String value;
final String value;
String toJson() => value;
}
String toJson() => value;
}
+17 -15
View File
@@ -1,21 +1,23 @@
part of '../../enums.dart';
enum PasswordHash {
sha1(value: 'sha1'),
sha224(value: 'sha224'),
sha256(value: 'sha256'),
sha384(value: 'sha384'),
sha512224(value: 'sha512/224'),
sha512256(value: 'sha512/256'),
sha512(value: 'sha512'),
sha3224(value: 'sha3-224'),
sha3256(value: 'sha3-256'),
sha3384(value: 'sha3-384'),
sha3512(value: 'sha3-512');
sha1(value: 'sha1'),
sha224(value: 'sha224'),
sha256(value: 'sha256'),
sha384(value: 'sha384'),
sha512224(value: 'sha512/224'),
sha512256(value: 'sha512/256'),
sha512(value: 'sha512'),
sha3224(value: 'sha3-224'),
sha3256(value: 'sha3-256'),
sha3384(value: 'sha3-384'),
sha3512(value: 'sha3-512');
const PasswordHash({required this.value});
const PasswordHash({
required this.value
});
final String value;
final String value;
String toJson() => value;
}
String toJson() => value;
}
+9 -7
View File
@@ -1,13 +1,15 @@
part of '../../enums.dart';
enum RelationMutate {
cascade(value: 'cascade'),
restrict(value: 'restrict'),
setNull(value: 'setNull');
cascade(value: 'cascade'),
restrict(value: 'restrict'),
setNull(value: 'setNull');
const RelationMutate({required this.value});
const RelationMutate({
required this.value
});
final String value;
final String value;
String toJson() => value;
}
String toJson() => value;
}
+10 -8
View File
@@ -1,14 +1,16 @@
part of '../../enums.dart';
enum RelationshipType {
oneToOne(value: 'oneToOne'),
manyToOne(value: 'manyToOne'),
manyToMany(value: 'manyToMany'),
oneToMany(value: 'oneToMany');
oneToOne(value: 'oneToOne'),
manyToOne(value: 'manyToOne'),
manyToMany(value: 'manyToMany'),
oneToMany(value: 'oneToMany');
const RelationshipType({required this.value});
const RelationshipType({
required this.value
});
final String value;
final String value;
String toJson() => value;
}
String toJson() => value;
}
+92 -90
View File
@@ -1,96 +1,98 @@
part of '../../enums.dart';
enum Runtime {
node145(value: 'node-14.5'),
node160(value: 'node-16.0'),
node180(value: 'node-18.0'),
node190(value: 'node-19.0'),
node200(value: 'node-20.0'),
node210(value: 'node-21.0'),
node22(value: 'node-22'),
node23(value: 'node-23'),
node24(value: 'node-24'),
node25(value: 'node-25'),
php80(value: 'php-8.0'),
php81(value: 'php-8.1'),
php82(value: 'php-8.2'),
php83(value: 'php-8.3'),
php84(value: 'php-8.4'),
ruby30(value: 'ruby-3.0'),
ruby31(value: 'ruby-3.1'),
ruby32(value: 'ruby-3.2'),
ruby33(value: 'ruby-3.3'),
ruby34(value: 'ruby-3.4'),
ruby40(value: 'ruby-4.0'),
python38(value: 'python-3.8'),
python39(value: 'python-3.9'),
python310(value: 'python-3.10'),
python311(value: 'python-3.11'),
python312(value: 'python-3.12'),
python313(value: 'python-3.13'),
python314(value: 'python-3.14'),
pythonMl311(value: 'python-ml-3.11'),
pythonMl312(value: 'python-ml-3.12'),
pythonMl313(value: 'python-ml-3.13'),
deno140(value: 'deno-1.40'),
deno146(value: 'deno-1.46'),
deno20(value: 'deno-2.0'),
deno25(value: 'deno-2.5'),
deno26(value: 'deno-2.6'),
dart215(value: 'dart-2.15'),
dart216(value: 'dart-2.16'),
dart217(value: 'dart-2.17'),
dart218(value: 'dart-2.18'),
dart219(value: 'dart-2.19'),
dart30(value: 'dart-3.0'),
dart31(value: 'dart-3.1'),
dart33(value: 'dart-3.3'),
dart35(value: 'dart-3.5'),
dart38(value: 'dart-3.8'),
dart39(value: 'dart-3.9'),
dart310(value: 'dart-3.10'),
dotnet60(value: 'dotnet-6.0'),
dotnet70(value: 'dotnet-7.0'),
dotnet80(value: 'dotnet-8.0'),
dotnet10(value: 'dotnet-10'),
java80(value: 'java-8.0'),
java110(value: 'java-11.0'),
java170(value: 'java-17.0'),
java180(value: 'java-18.0'),
java210(value: 'java-21.0'),
java22(value: 'java-22'),
java25(value: 'java-25'),
swift55(value: 'swift-5.5'),
swift58(value: 'swift-5.8'),
swift59(value: 'swift-5.9'),
swift510(value: 'swift-5.10'),
swift62(value: 'swift-6.2'),
kotlin16(value: 'kotlin-1.6'),
kotlin18(value: 'kotlin-1.8'),
kotlin19(value: 'kotlin-1.9'),
kotlin20(value: 'kotlin-2.0'),
kotlin23(value: 'kotlin-2.3'),
cpp17(value: 'cpp-17'),
cpp20(value: 'cpp-20'),
bun10(value: 'bun-1.0'),
bun11(value: 'bun-1.1'),
bun12(value: 'bun-1.2'),
bun13(value: 'bun-1.3'),
go123(value: 'go-1.23'),
go124(value: 'go-1.24'),
go125(value: 'go-1.25'),
go126(value: 'go-1.26'),
static1(value: 'static-1'),
flutter324(value: 'flutter-3.24'),
flutter327(value: 'flutter-3.27'),
flutter329(value: 'flutter-3.29'),
flutter332(value: 'flutter-3.32'),
flutter335(value: 'flutter-3.35'),
flutter338(value: 'flutter-3.38');
node145(value: 'node-14.5'),
node160(value: 'node-16.0'),
node180(value: 'node-18.0'),
node190(value: 'node-19.0'),
node200(value: 'node-20.0'),
node210(value: 'node-21.0'),
node22(value: 'node-22'),
node23(value: 'node-23'),
node24(value: 'node-24'),
node25(value: 'node-25'),
php80(value: 'php-8.0'),
php81(value: 'php-8.1'),
php82(value: 'php-8.2'),
php83(value: 'php-8.3'),
php84(value: 'php-8.4'),
ruby30(value: 'ruby-3.0'),
ruby31(value: 'ruby-3.1'),
ruby32(value: 'ruby-3.2'),
ruby33(value: 'ruby-3.3'),
ruby34(value: 'ruby-3.4'),
ruby40(value: 'ruby-4.0'),
python38(value: 'python-3.8'),
python39(value: 'python-3.9'),
python310(value: 'python-3.10'),
python311(value: 'python-3.11'),
python312(value: 'python-3.12'),
python313(value: 'python-3.13'),
python314(value: 'python-3.14'),
pythonMl311(value: 'python-ml-3.11'),
pythonMl312(value: 'python-ml-3.12'),
pythonMl313(value: 'python-ml-3.13'),
deno140(value: 'deno-1.40'),
deno146(value: 'deno-1.46'),
deno20(value: 'deno-2.0'),
deno25(value: 'deno-2.5'),
deno26(value: 'deno-2.6'),
dart215(value: 'dart-2.15'),
dart216(value: 'dart-2.16'),
dart217(value: 'dart-2.17'),
dart218(value: 'dart-2.18'),
dart219(value: 'dart-2.19'),
dart30(value: 'dart-3.0'),
dart31(value: 'dart-3.1'),
dart33(value: 'dart-3.3'),
dart35(value: 'dart-3.5'),
dart38(value: 'dart-3.8'),
dart39(value: 'dart-3.9'),
dart310(value: 'dart-3.10'),
dotnet60(value: 'dotnet-6.0'),
dotnet70(value: 'dotnet-7.0'),
dotnet80(value: 'dotnet-8.0'),
dotnet10(value: 'dotnet-10'),
java80(value: 'java-8.0'),
java110(value: 'java-11.0'),
java170(value: 'java-17.0'),
java180(value: 'java-18.0'),
java210(value: 'java-21.0'),
java22(value: 'java-22'),
java25(value: 'java-25'),
swift55(value: 'swift-5.5'),
swift58(value: 'swift-5.8'),
swift59(value: 'swift-5.9'),
swift510(value: 'swift-5.10'),
swift62(value: 'swift-6.2'),
kotlin16(value: 'kotlin-1.6'),
kotlin18(value: 'kotlin-1.8'),
kotlin19(value: 'kotlin-1.9'),
kotlin20(value: 'kotlin-2.0'),
kotlin23(value: 'kotlin-2.3'),
cpp17(value: 'cpp-17'),
cpp20(value: 'cpp-20'),
bun10(value: 'bun-1.0'),
bun11(value: 'bun-1.1'),
bun12(value: 'bun-1.2'),
bun13(value: 'bun-1.3'),
go123(value: 'go-1.23'),
go124(value: 'go-1.24'),
go125(value: 'go-1.25'),
go126(value: 'go-1.26'),
static1(value: 'static-1'),
flutter324(value: 'flutter-3.24'),
flutter327(value: 'flutter-3.27'),
flutter329(value: 'flutter-3.29'),
flutter332(value: 'flutter-3.32'),
flutter335(value: 'flutter-3.35'),
flutter338(value: 'flutter-3.38');
const Runtime({required this.value});
const Runtime({
required this.value
});
final String value;
final String value;
String toJson() => value;
}
String toJson() => value;
}
+76 -74
View File
@@ -1,80 +1,82 @@
part of '../../enums.dart';
enum Scopes {
sessionsWrite(value: 'sessions.write'),
usersRead(value: 'users.read'),
usersWrite(value: 'users.write'),
teamsRead(value: 'teams.read'),
teamsWrite(value: 'teams.write'),
databasesRead(value: 'databases.read'),
databasesWrite(value: 'databases.write'),
collectionsRead(value: 'collections.read'),
collectionsWrite(value: 'collections.write'),
tablesRead(value: 'tables.read'),
tablesWrite(value: 'tables.write'),
attributesRead(value: 'attributes.read'),
attributesWrite(value: 'attributes.write'),
columnsRead(value: 'columns.read'),
columnsWrite(value: 'columns.write'),
indexesRead(value: 'indexes.read'),
indexesWrite(value: 'indexes.write'),
documentsRead(value: 'documents.read'),
documentsWrite(value: 'documents.write'),
rowsRead(value: 'rows.read'),
rowsWrite(value: 'rows.write'),
filesRead(value: 'files.read'),
filesWrite(value: 'files.write'),
bucketsRead(value: 'buckets.read'),
bucketsWrite(value: 'buckets.write'),
functionsRead(value: 'functions.read'),
functionsWrite(value: 'functions.write'),
sitesRead(value: 'sites.read'),
sitesWrite(value: 'sites.write'),
logRead(value: 'log.read'),
logWrite(value: 'log.write'),
executionRead(value: 'execution.read'),
executionWrite(value: 'execution.write'),
localeRead(value: 'locale.read'),
avatarsRead(value: 'avatars.read'),
healthRead(value: 'health.read'),
providersRead(value: 'providers.read'),
providersWrite(value: 'providers.write'),
messagesRead(value: 'messages.read'),
messagesWrite(value: 'messages.write'),
topicsRead(value: 'topics.read'),
topicsWrite(value: 'topics.write'),
subscribersRead(value: 'subscribers.read'),
subscribersWrite(value: 'subscribers.write'),
targetsRead(value: 'targets.read'),
targetsWrite(value: 'targets.write'),
rulesRead(value: 'rules.read'),
rulesWrite(value: 'rules.write'),
schedulesRead(value: 'schedules.read'),
schedulesWrite(value: 'schedules.write'),
migrationsRead(value: 'migrations.read'),
migrationsWrite(value: 'migrations.write'),
vcsRead(value: 'vcs.read'),
vcsWrite(value: 'vcs.write'),
assistantRead(value: 'assistant.read'),
tokensRead(value: 'tokens.read'),
tokensWrite(value: 'tokens.write'),
webhooksRead(value: 'webhooks.read'),
webhooksWrite(value: 'webhooks.write'),
projectRead(value: 'project.read'),
projectWrite(value: 'project.write'),
policiesWrite(value: 'policies.write'),
policiesRead(value: 'policies.read'),
archivesRead(value: 'archives.read'),
archivesWrite(value: 'archives.write'),
restorationsRead(value: 'restorations.read'),
restorationsWrite(value: 'restorations.write'),
domainsRead(value: 'domains.read'),
domainsWrite(value: 'domains.write'),
eventsRead(value: 'events.read');
sessionsWrite(value: 'sessions.write'),
usersRead(value: 'users.read'),
usersWrite(value: 'users.write'),
teamsRead(value: 'teams.read'),
teamsWrite(value: 'teams.write'),
databasesRead(value: 'databases.read'),
databasesWrite(value: 'databases.write'),
collectionsRead(value: 'collections.read'),
collectionsWrite(value: 'collections.write'),
tablesRead(value: 'tables.read'),
tablesWrite(value: 'tables.write'),
attributesRead(value: 'attributes.read'),
attributesWrite(value: 'attributes.write'),
columnsRead(value: 'columns.read'),
columnsWrite(value: 'columns.write'),
indexesRead(value: 'indexes.read'),
indexesWrite(value: 'indexes.write'),
documentsRead(value: 'documents.read'),
documentsWrite(value: 'documents.write'),
rowsRead(value: 'rows.read'),
rowsWrite(value: 'rows.write'),
filesRead(value: 'files.read'),
filesWrite(value: 'files.write'),
bucketsRead(value: 'buckets.read'),
bucketsWrite(value: 'buckets.write'),
functionsRead(value: 'functions.read'),
functionsWrite(value: 'functions.write'),
sitesRead(value: 'sites.read'),
sitesWrite(value: 'sites.write'),
logRead(value: 'log.read'),
logWrite(value: 'log.write'),
executionRead(value: 'execution.read'),
executionWrite(value: 'execution.write'),
localeRead(value: 'locale.read'),
avatarsRead(value: 'avatars.read'),
healthRead(value: 'health.read'),
providersRead(value: 'providers.read'),
providersWrite(value: 'providers.write'),
messagesRead(value: 'messages.read'),
messagesWrite(value: 'messages.write'),
topicsRead(value: 'topics.read'),
topicsWrite(value: 'topics.write'),
subscribersRead(value: 'subscribers.read'),
subscribersWrite(value: 'subscribers.write'),
targetsRead(value: 'targets.read'),
targetsWrite(value: 'targets.write'),
rulesRead(value: 'rules.read'),
rulesWrite(value: 'rules.write'),
schedulesRead(value: 'schedules.read'),
schedulesWrite(value: 'schedules.write'),
migrationsRead(value: 'migrations.read'),
migrationsWrite(value: 'migrations.write'),
vcsRead(value: 'vcs.read'),
vcsWrite(value: 'vcs.write'),
assistantRead(value: 'assistant.read'),
tokensRead(value: 'tokens.read'),
tokensWrite(value: 'tokens.write'),
webhooksRead(value: 'webhooks.read'),
webhooksWrite(value: 'webhooks.write'),
projectRead(value: 'project.read'),
projectWrite(value: 'project.write'),
policiesWrite(value: 'policies.write'),
policiesRead(value: 'policies.read'),
archivesRead(value: 'archives.read'),
archivesWrite(value: 'archives.write'),
restorationsRead(value: 'restorations.read'),
restorationsWrite(value: 'restorations.write'),
domainsRead(value: 'domains.read'),
domainsWrite(value: 'domains.write'),
eventsRead(value: 'events.read');
const Scopes({required this.value});
const Scopes({
required this.value
});
final String value;
final String value;
String toJson() => value;
}
String toJson() => value;
}
+9 -7
View File
@@ -1,13 +1,15 @@
part of '../../enums.dart';
enum SmtpEncryption {
none(value: 'none'),
ssl(value: 'ssl'),
tls(value: 'tls');
none(value: 'none'),
ssl(value: 'ssl'),
tls(value: 'tls');
const SmtpEncryption({required this.value});
const SmtpEncryption({
required this.value
});
final String value;
final String value;
String toJson() => value;
}
String toJson() => value;
}
+10 -8
View File
@@ -1,14 +1,16 @@
part of '../../enums.dart';
enum TablesDBIndexType {
key(value: 'key'),
fulltext(value: 'fulltext'),
unique(value: 'unique'),
spatial(value: 'spatial');
key(value: 'key'),
fulltext(value: 'fulltext'),
unique(value: 'unique'),
spatial(value: 'spatial');
const TablesDBIndexType({required this.value});
const TablesDBIndexType({
required this.value
});
final String value;
final String value;
String toJson() => value;
}
String toJson() => value;
}
+9 -7
View File
@@ -1,13 +1,15 @@
part of '../../enums.dart';
enum TemplateReferenceType {
commit(value: 'commit'),
branch(value: 'branch'),
tag(value: 'tag');
commit(value: 'commit'),
branch(value: 'branch'),
tag(value: 'tag');
const TemplateReferenceType({required this.value});
const TemplateReferenceType({
required this.value
});
final String value;
final String value;
String toJson() => value;
}
String toJson() => value;
}
+8 -6
View File
@@ -1,12 +1,14 @@
part of '../../enums.dart';
enum Theme {
light(value: 'light'),
dark(value: 'dark');
light(value: 'light'),
dark(value: 'dark');
const Theme({required this.value});
const Theme({
required this.value
});
final String value;
final String value;
String toJson() => value;
}
String toJson() => value;
}
+425 -423
View File
@@ -1,429 +1,431 @@
part of '../../enums.dart';
enum Timezone {
africaAbidjan(value: 'africa/abidjan'),
africaAccra(value: 'africa/accra'),
africaAddisAbaba(value: 'africa/addis_ababa'),
africaAlgiers(value: 'africa/algiers'),
africaAsmara(value: 'africa/asmara'),
africaBamako(value: 'africa/bamako'),
africaBangui(value: 'africa/bangui'),
africaBanjul(value: 'africa/banjul'),
africaBissau(value: 'africa/bissau'),
africaBlantyre(value: 'africa/blantyre'),
africaBrazzaville(value: 'africa/brazzaville'),
africaBujumbura(value: 'africa/bujumbura'),
africaCairo(value: 'africa/cairo'),
africaCasablanca(value: 'africa/casablanca'),
africaCeuta(value: 'africa/ceuta'),
africaConakry(value: 'africa/conakry'),
africaDakar(value: 'africa/dakar'),
africaDarEsSalaam(value: 'africa/dar_es_salaam'),
africaDjibouti(value: 'africa/djibouti'),
africaDouala(value: 'africa/douala'),
africaElAaiun(value: 'africa/el_aaiun'),
africaFreetown(value: 'africa/freetown'),
africaGaborone(value: 'africa/gaborone'),
africaHarare(value: 'africa/harare'),
africaJohannesburg(value: 'africa/johannesburg'),
africaJuba(value: 'africa/juba'),
africaKampala(value: 'africa/kampala'),
africaKhartoum(value: 'africa/khartoum'),
africaKigali(value: 'africa/kigali'),
africaKinshasa(value: 'africa/kinshasa'),
africaLagos(value: 'africa/lagos'),
africaLibreville(value: 'africa/libreville'),
africaLome(value: 'africa/lome'),
africaLuanda(value: 'africa/luanda'),
africaLubumbashi(value: 'africa/lubumbashi'),
africaLusaka(value: 'africa/lusaka'),
africaMalabo(value: 'africa/malabo'),
africaMaputo(value: 'africa/maputo'),
africaMaseru(value: 'africa/maseru'),
africaMbabane(value: 'africa/mbabane'),
africaMogadishu(value: 'africa/mogadishu'),
africaMonrovia(value: 'africa/monrovia'),
africaNairobi(value: 'africa/nairobi'),
africaNdjamena(value: 'africa/ndjamena'),
africaNiamey(value: 'africa/niamey'),
africaNouakchott(value: 'africa/nouakchott'),
africaOuagadougou(value: 'africa/ouagadougou'),
africaPortoNovo(value: 'africa/porto-novo'),
africaSaoTome(value: 'africa/sao_tome'),
africaTripoli(value: 'africa/tripoli'),
africaTunis(value: 'africa/tunis'),
africaWindhoek(value: 'africa/windhoek'),
americaAdak(value: 'america/adak'),
americaAnchorage(value: 'america/anchorage'),
americaAnguilla(value: 'america/anguilla'),
americaAntigua(value: 'america/antigua'),
americaAraguaina(value: 'america/araguaina'),
americaArgentinaBuenosAires(value: 'america/argentina/buenos_aires'),
americaArgentinaCatamarca(value: 'america/argentina/catamarca'),
americaArgentinaCordoba(value: 'america/argentina/cordoba'),
americaArgentinaJujuy(value: 'america/argentina/jujuy'),
americaArgentinaLaRioja(value: 'america/argentina/la_rioja'),
americaArgentinaMendoza(value: 'america/argentina/mendoza'),
americaArgentinaRioGallegos(value: 'america/argentina/rio_gallegos'),
americaArgentinaSalta(value: 'america/argentina/salta'),
americaArgentinaSanJuan(value: 'america/argentina/san_juan'),
americaArgentinaSanLuis(value: 'america/argentina/san_luis'),
americaArgentinaTucuman(value: 'america/argentina/tucuman'),
americaArgentinaUshuaia(value: 'america/argentina/ushuaia'),
americaAruba(value: 'america/aruba'),
americaAsuncion(value: 'america/asuncion'),
americaAtikokan(value: 'america/atikokan'),
americaBahia(value: 'america/bahia'),
americaBahiaBanderas(value: 'america/bahia_banderas'),
americaBarbados(value: 'america/barbados'),
americaBelem(value: 'america/belem'),
americaBelize(value: 'america/belize'),
americaBlancSablon(value: 'america/blanc-sablon'),
americaBoaVista(value: 'america/boa_vista'),
americaBogota(value: 'america/bogota'),
americaBoise(value: 'america/boise'),
americaCambridgeBay(value: 'america/cambridge_bay'),
americaCampoGrande(value: 'america/campo_grande'),
americaCancun(value: 'america/cancun'),
americaCaracas(value: 'america/caracas'),
americaCayenne(value: 'america/cayenne'),
americaCayman(value: 'america/cayman'),
americaChicago(value: 'america/chicago'),
americaChihuahua(value: 'america/chihuahua'),
americaCiudadJuarez(value: 'america/ciudad_juarez'),
americaCostaRica(value: 'america/costa_rica'),
americaCoyhaique(value: 'america/coyhaique'),
americaCreston(value: 'america/creston'),
americaCuiaba(value: 'america/cuiaba'),
americaCuracao(value: 'america/curacao'),
americaDanmarkshavn(value: 'america/danmarkshavn'),
americaDawson(value: 'america/dawson'),
americaDawsonCreek(value: 'america/dawson_creek'),
americaDenver(value: 'america/denver'),
americaDetroit(value: 'america/detroit'),
americaDominica(value: 'america/dominica'),
americaEdmonton(value: 'america/edmonton'),
americaEirunepe(value: 'america/eirunepe'),
americaElSalvador(value: 'america/el_salvador'),
americaFortNelson(value: 'america/fort_nelson'),
americaFortaleza(value: 'america/fortaleza'),
americaGlaceBay(value: 'america/glace_bay'),
americaGooseBay(value: 'america/goose_bay'),
americaGrandTurk(value: 'america/grand_turk'),
americaGrenada(value: 'america/grenada'),
americaGuadeloupe(value: 'america/guadeloupe'),
americaGuatemala(value: 'america/guatemala'),
americaGuayaquil(value: 'america/guayaquil'),
americaGuyana(value: 'america/guyana'),
americaHalifax(value: 'america/halifax'),
americaHavana(value: 'america/havana'),
americaHermosillo(value: 'america/hermosillo'),
americaIndianaIndianapolis(value: 'america/indiana/indianapolis'),
americaIndianaKnox(value: 'america/indiana/knox'),
americaIndianaMarengo(value: 'america/indiana/marengo'),
americaIndianaPetersburg(value: 'america/indiana/petersburg'),
americaIndianaTellCity(value: 'america/indiana/tell_city'),
americaIndianaVevay(value: 'america/indiana/vevay'),
americaIndianaVincennes(value: 'america/indiana/vincennes'),
americaIndianaWinamac(value: 'america/indiana/winamac'),
americaInuvik(value: 'america/inuvik'),
americaIqaluit(value: 'america/iqaluit'),
americaJamaica(value: 'america/jamaica'),
americaJuneau(value: 'america/juneau'),
americaKentuckyLouisville(value: 'america/kentucky/louisville'),
americaKentuckyMonticello(value: 'america/kentucky/monticello'),
americaKralendijk(value: 'america/kralendijk'),
americaLaPaz(value: 'america/la_paz'),
americaLima(value: 'america/lima'),
americaLosAngeles(value: 'america/los_angeles'),
americaLowerPrinces(value: 'america/lower_princes'),
americaMaceio(value: 'america/maceio'),
americaManagua(value: 'america/managua'),
americaManaus(value: 'america/manaus'),
americaMarigot(value: 'america/marigot'),
americaMartinique(value: 'america/martinique'),
americaMatamoros(value: 'america/matamoros'),
americaMazatlan(value: 'america/mazatlan'),
americaMenominee(value: 'america/menominee'),
americaMerida(value: 'america/merida'),
americaMetlakatla(value: 'america/metlakatla'),
americaMexicoCity(value: 'america/mexico_city'),
americaMiquelon(value: 'america/miquelon'),
americaMoncton(value: 'america/moncton'),
americaMonterrey(value: 'america/monterrey'),
americaMontevideo(value: 'america/montevideo'),
americaMontserrat(value: 'america/montserrat'),
americaNassau(value: 'america/nassau'),
americaNewYork(value: 'america/new_york'),
americaNome(value: 'america/nome'),
americaNoronha(value: 'america/noronha'),
americaNorthDakotaBeulah(value: 'america/north_dakota/beulah'),
americaNorthDakotaCenter(value: 'america/north_dakota/center'),
americaNorthDakotaNewSalem(value: 'america/north_dakota/new_salem'),
americaNuuk(value: 'america/nuuk'),
americaOjinaga(value: 'america/ojinaga'),
americaPanama(value: 'america/panama'),
americaParamaribo(value: 'america/paramaribo'),
americaPhoenix(value: 'america/phoenix'),
americaPortAuPrince(value: 'america/port-au-prince'),
americaPortOfSpain(value: 'america/port_of_spain'),
americaPortoVelho(value: 'america/porto_velho'),
americaPuertoRico(value: 'america/puerto_rico'),
americaPuntaArenas(value: 'america/punta_arenas'),
americaRankinInlet(value: 'america/rankin_inlet'),
americaRecife(value: 'america/recife'),
americaRegina(value: 'america/regina'),
americaResolute(value: 'america/resolute'),
americaRioBranco(value: 'america/rio_branco'),
americaSantarem(value: 'america/santarem'),
americaSantiago(value: 'america/santiago'),
americaSantoDomingo(value: 'america/santo_domingo'),
americaSaoPaulo(value: 'america/sao_paulo'),
americaScoresbysund(value: 'america/scoresbysund'),
americaSitka(value: 'america/sitka'),
americaStBarthelemy(value: 'america/st_barthelemy'),
americaStJohns(value: 'america/st_johns'),
americaStKitts(value: 'america/st_kitts'),
americaStLucia(value: 'america/st_lucia'),
americaStThomas(value: 'america/st_thomas'),
americaStVincent(value: 'america/st_vincent'),
americaSwiftCurrent(value: 'america/swift_current'),
americaTegucigalpa(value: 'america/tegucigalpa'),
americaThule(value: 'america/thule'),
americaTijuana(value: 'america/tijuana'),
americaToronto(value: 'america/toronto'),
americaTortola(value: 'america/tortola'),
americaVancouver(value: 'america/vancouver'),
americaWhitehorse(value: 'america/whitehorse'),
americaWinnipeg(value: 'america/winnipeg'),
americaYakutat(value: 'america/yakutat'),
antarcticaCasey(value: 'antarctica/casey'),
antarcticaDavis(value: 'antarctica/davis'),
antarcticaDumontdurville(value: 'antarctica/dumontdurville'),
antarcticaMacquarie(value: 'antarctica/macquarie'),
antarcticaMawson(value: 'antarctica/mawson'),
antarcticaMcmurdo(value: 'antarctica/mcmurdo'),
antarcticaPalmer(value: 'antarctica/palmer'),
antarcticaRothera(value: 'antarctica/rothera'),
antarcticaSyowa(value: 'antarctica/syowa'),
antarcticaTroll(value: 'antarctica/troll'),
antarcticaVostok(value: 'antarctica/vostok'),
arcticLongyearbyen(value: 'arctic/longyearbyen'),
asiaAden(value: 'asia/aden'),
asiaAlmaty(value: 'asia/almaty'),
asiaAmman(value: 'asia/amman'),
asiaAnadyr(value: 'asia/anadyr'),
asiaAqtau(value: 'asia/aqtau'),
asiaAqtobe(value: 'asia/aqtobe'),
asiaAshgabat(value: 'asia/ashgabat'),
asiaAtyrau(value: 'asia/atyrau'),
asiaBaghdad(value: 'asia/baghdad'),
asiaBahrain(value: 'asia/bahrain'),
asiaBaku(value: 'asia/baku'),
asiaBangkok(value: 'asia/bangkok'),
asiaBarnaul(value: 'asia/barnaul'),
asiaBeirut(value: 'asia/beirut'),
asiaBishkek(value: 'asia/bishkek'),
asiaBrunei(value: 'asia/brunei'),
asiaChita(value: 'asia/chita'),
asiaColombo(value: 'asia/colombo'),
asiaDamascus(value: 'asia/damascus'),
asiaDhaka(value: 'asia/dhaka'),
asiaDili(value: 'asia/dili'),
asiaDubai(value: 'asia/dubai'),
asiaDushanbe(value: 'asia/dushanbe'),
asiaFamagusta(value: 'asia/famagusta'),
asiaGaza(value: 'asia/gaza'),
asiaHebron(value: 'asia/hebron'),
asiaHoChiMinh(value: 'asia/ho_chi_minh'),
asiaHongKong(value: 'asia/hong_kong'),
asiaHovd(value: 'asia/hovd'),
asiaIrkutsk(value: 'asia/irkutsk'),
asiaJakarta(value: 'asia/jakarta'),
asiaJayapura(value: 'asia/jayapura'),
asiaJerusalem(value: 'asia/jerusalem'),
asiaKabul(value: 'asia/kabul'),
asiaKamchatka(value: 'asia/kamchatka'),
asiaKarachi(value: 'asia/karachi'),
asiaKathmandu(value: 'asia/kathmandu'),
asiaKhandyga(value: 'asia/khandyga'),
asiaKolkata(value: 'asia/kolkata'),
asiaKrasnoyarsk(value: 'asia/krasnoyarsk'),
asiaKualaLumpur(value: 'asia/kuala_lumpur'),
asiaKuching(value: 'asia/kuching'),
asiaKuwait(value: 'asia/kuwait'),
asiaMacau(value: 'asia/macau'),
asiaMagadan(value: 'asia/magadan'),
asiaMakassar(value: 'asia/makassar'),
asiaManila(value: 'asia/manila'),
asiaMuscat(value: 'asia/muscat'),
asiaNicosia(value: 'asia/nicosia'),
asiaNovokuznetsk(value: 'asia/novokuznetsk'),
asiaNovosibirsk(value: 'asia/novosibirsk'),
asiaOmsk(value: 'asia/omsk'),
asiaOral(value: 'asia/oral'),
asiaPhnomPenh(value: 'asia/phnom_penh'),
asiaPontianak(value: 'asia/pontianak'),
asiaPyongyang(value: 'asia/pyongyang'),
asiaQatar(value: 'asia/qatar'),
asiaQostanay(value: 'asia/qostanay'),
asiaQyzylorda(value: 'asia/qyzylorda'),
asiaRiyadh(value: 'asia/riyadh'),
asiaSakhalin(value: 'asia/sakhalin'),
asiaSamarkand(value: 'asia/samarkand'),
asiaSeoul(value: 'asia/seoul'),
asiaShanghai(value: 'asia/shanghai'),
asiaSingapore(value: 'asia/singapore'),
asiaSrednekolymsk(value: 'asia/srednekolymsk'),
asiaTaipei(value: 'asia/taipei'),
asiaTashkent(value: 'asia/tashkent'),
asiaTbilisi(value: 'asia/tbilisi'),
asiaTehran(value: 'asia/tehran'),
asiaThimphu(value: 'asia/thimphu'),
asiaTokyo(value: 'asia/tokyo'),
asiaTomsk(value: 'asia/tomsk'),
asiaUlaanbaatar(value: 'asia/ulaanbaatar'),
asiaUrumqi(value: 'asia/urumqi'),
asiaUstNera(value: 'asia/ust-nera'),
asiaVientiane(value: 'asia/vientiane'),
asiaVladivostok(value: 'asia/vladivostok'),
asiaYakutsk(value: 'asia/yakutsk'),
asiaYangon(value: 'asia/yangon'),
asiaYekaterinburg(value: 'asia/yekaterinburg'),
asiaYerevan(value: 'asia/yerevan'),
atlanticAzores(value: 'atlantic/azores'),
atlanticBermuda(value: 'atlantic/bermuda'),
atlanticCanary(value: 'atlantic/canary'),
atlanticCapeVerde(value: 'atlantic/cape_verde'),
atlanticFaroe(value: 'atlantic/faroe'),
atlanticMadeira(value: 'atlantic/madeira'),
atlanticReykjavik(value: 'atlantic/reykjavik'),
atlanticSouthGeorgia(value: 'atlantic/south_georgia'),
atlanticStHelena(value: 'atlantic/st_helena'),
atlanticStanley(value: 'atlantic/stanley'),
australiaAdelaide(value: 'australia/adelaide'),
australiaBrisbane(value: 'australia/brisbane'),
australiaBrokenHill(value: 'australia/broken_hill'),
australiaDarwin(value: 'australia/darwin'),
australiaEucla(value: 'australia/eucla'),
australiaHobart(value: 'australia/hobart'),
australiaLindeman(value: 'australia/lindeman'),
australiaLordHowe(value: 'australia/lord_howe'),
australiaMelbourne(value: 'australia/melbourne'),
australiaPerth(value: 'australia/perth'),
australiaSydney(value: 'australia/sydney'),
europeAmsterdam(value: 'europe/amsterdam'),
europeAndorra(value: 'europe/andorra'),
europeAstrakhan(value: 'europe/astrakhan'),
europeAthens(value: 'europe/athens'),
europeBelgrade(value: 'europe/belgrade'),
europeBerlin(value: 'europe/berlin'),
europeBratislava(value: 'europe/bratislava'),
europeBrussels(value: 'europe/brussels'),
europeBucharest(value: 'europe/bucharest'),
europeBudapest(value: 'europe/budapest'),
europeBusingen(value: 'europe/busingen'),
europeChisinau(value: 'europe/chisinau'),
europeCopenhagen(value: 'europe/copenhagen'),
europeDublin(value: 'europe/dublin'),
europeGibraltar(value: 'europe/gibraltar'),
europeGuernsey(value: 'europe/guernsey'),
europeHelsinki(value: 'europe/helsinki'),
europeIsleOfMan(value: 'europe/isle_of_man'),
europeIstanbul(value: 'europe/istanbul'),
europeJersey(value: 'europe/jersey'),
europeKaliningrad(value: 'europe/kaliningrad'),
europeKirov(value: 'europe/kirov'),
europeKyiv(value: 'europe/kyiv'),
europeLisbon(value: 'europe/lisbon'),
europeLjubljana(value: 'europe/ljubljana'),
europeLondon(value: 'europe/london'),
europeLuxembourg(value: 'europe/luxembourg'),
europeMadrid(value: 'europe/madrid'),
europeMalta(value: 'europe/malta'),
europeMariehamn(value: 'europe/mariehamn'),
europeMinsk(value: 'europe/minsk'),
europeMonaco(value: 'europe/monaco'),
europeMoscow(value: 'europe/moscow'),
europeOslo(value: 'europe/oslo'),
europeParis(value: 'europe/paris'),
europePodgorica(value: 'europe/podgorica'),
europePrague(value: 'europe/prague'),
europeRiga(value: 'europe/riga'),
europeRome(value: 'europe/rome'),
europeSamara(value: 'europe/samara'),
europeSanMarino(value: 'europe/san_marino'),
europeSarajevo(value: 'europe/sarajevo'),
europeSaratov(value: 'europe/saratov'),
europeSimferopol(value: 'europe/simferopol'),
europeSkopje(value: 'europe/skopje'),
europeSofia(value: 'europe/sofia'),
europeStockholm(value: 'europe/stockholm'),
europeTallinn(value: 'europe/tallinn'),
europeTirane(value: 'europe/tirane'),
europeUlyanovsk(value: 'europe/ulyanovsk'),
europeVaduz(value: 'europe/vaduz'),
europeVatican(value: 'europe/vatican'),
europeVienna(value: 'europe/vienna'),
europeVilnius(value: 'europe/vilnius'),
europeVolgograd(value: 'europe/volgograd'),
europeWarsaw(value: 'europe/warsaw'),
europeZagreb(value: 'europe/zagreb'),
europeZurich(value: 'europe/zurich'),
indianAntananarivo(value: 'indian/antananarivo'),
indianChagos(value: 'indian/chagos'),
indianChristmas(value: 'indian/christmas'),
indianCocos(value: 'indian/cocos'),
indianComoro(value: 'indian/comoro'),
indianKerguelen(value: 'indian/kerguelen'),
indianMahe(value: 'indian/mahe'),
indianMaldives(value: 'indian/maldives'),
indianMauritius(value: 'indian/mauritius'),
indianMayotte(value: 'indian/mayotte'),
indianReunion(value: 'indian/reunion'),
pacificApia(value: 'pacific/apia'),
pacificAuckland(value: 'pacific/auckland'),
pacificBougainville(value: 'pacific/bougainville'),
pacificChatham(value: 'pacific/chatham'),
pacificChuuk(value: 'pacific/chuuk'),
pacificEaster(value: 'pacific/easter'),
pacificEfate(value: 'pacific/efate'),
pacificFakaofo(value: 'pacific/fakaofo'),
pacificFiji(value: 'pacific/fiji'),
pacificFunafuti(value: 'pacific/funafuti'),
pacificGalapagos(value: 'pacific/galapagos'),
pacificGambier(value: 'pacific/gambier'),
pacificGuadalcanal(value: 'pacific/guadalcanal'),
pacificGuam(value: 'pacific/guam'),
pacificHonolulu(value: 'pacific/honolulu'),
pacificKanton(value: 'pacific/kanton'),
pacificKiritimati(value: 'pacific/kiritimati'),
pacificKosrae(value: 'pacific/kosrae'),
pacificKwajalein(value: 'pacific/kwajalein'),
pacificMajuro(value: 'pacific/majuro'),
pacificMarquesas(value: 'pacific/marquesas'),
pacificMidway(value: 'pacific/midway'),
pacificNauru(value: 'pacific/nauru'),
pacificNiue(value: 'pacific/niue'),
pacificNorfolk(value: 'pacific/norfolk'),
pacificNoumea(value: 'pacific/noumea'),
pacificPagoPago(value: 'pacific/pago_pago'),
pacificPalau(value: 'pacific/palau'),
pacificPitcairn(value: 'pacific/pitcairn'),
pacificPohnpei(value: 'pacific/pohnpei'),
pacificPortMoresby(value: 'pacific/port_moresby'),
pacificRarotonga(value: 'pacific/rarotonga'),
pacificSaipan(value: 'pacific/saipan'),
pacificTahiti(value: 'pacific/tahiti'),
pacificTarawa(value: 'pacific/tarawa'),
pacificTongatapu(value: 'pacific/tongatapu'),
pacificWake(value: 'pacific/wake'),
pacificWallis(value: 'pacific/wallis'),
utc(value: 'utc');
africaAbidjan(value: 'africa/abidjan'),
africaAccra(value: 'africa/accra'),
africaAddisAbaba(value: 'africa/addis_ababa'),
africaAlgiers(value: 'africa/algiers'),
africaAsmara(value: 'africa/asmara'),
africaBamako(value: 'africa/bamako'),
africaBangui(value: 'africa/bangui'),
africaBanjul(value: 'africa/banjul'),
africaBissau(value: 'africa/bissau'),
africaBlantyre(value: 'africa/blantyre'),
africaBrazzaville(value: 'africa/brazzaville'),
africaBujumbura(value: 'africa/bujumbura'),
africaCairo(value: 'africa/cairo'),
africaCasablanca(value: 'africa/casablanca'),
africaCeuta(value: 'africa/ceuta'),
africaConakry(value: 'africa/conakry'),
africaDakar(value: 'africa/dakar'),
africaDarEsSalaam(value: 'africa/dar_es_salaam'),
africaDjibouti(value: 'africa/djibouti'),
africaDouala(value: 'africa/douala'),
africaElAaiun(value: 'africa/el_aaiun'),
africaFreetown(value: 'africa/freetown'),
africaGaborone(value: 'africa/gaborone'),
africaHarare(value: 'africa/harare'),
africaJohannesburg(value: 'africa/johannesburg'),
africaJuba(value: 'africa/juba'),
africaKampala(value: 'africa/kampala'),
africaKhartoum(value: 'africa/khartoum'),
africaKigali(value: 'africa/kigali'),
africaKinshasa(value: 'africa/kinshasa'),
africaLagos(value: 'africa/lagos'),
africaLibreville(value: 'africa/libreville'),
africaLome(value: 'africa/lome'),
africaLuanda(value: 'africa/luanda'),
africaLubumbashi(value: 'africa/lubumbashi'),
africaLusaka(value: 'africa/lusaka'),
africaMalabo(value: 'africa/malabo'),
africaMaputo(value: 'africa/maputo'),
africaMaseru(value: 'africa/maseru'),
africaMbabane(value: 'africa/mbabane'),
africaMogadishu(value: 'africa/mogadishu'),
africaMonrovia(value: 'africa/monrovia'),
africaNairobi(value: 'africa/nairobi'),
africaNdjamena(value: 'africa/ndjamena'),
africaNiamey(value: 'africa/niamey'),
africaNouakchott(value: 'africa/nouakchott'),
africaOuagadougou(value: 'africa/ouagadougou'),
africaPortoNovo(value: 'africa/porto-novo'),
africaSaoTome(value: 'africa/sao_tome'),
africaTripoli(value: 'africa/tripoli'),
africaTunis(value: 'africa/tunis'),
africaWindhoek(value: 'africa/windhoek'),
americaAdak(value: 'america/adak'),
americaAnchorage(value: 'america/anchorage'),
americaAnguilla(value: 'america/anguilla'),
americaAntigua(value: 'america/antigua'),
americaAraguaina(value: 'america/araguaina'),
americaArgentinaBuenosAires(value: 'america/argentina/buenos_aires'),
americaArgentinaCatamarca(value: 'america/argentina/catamarca'),
americaArgentinaCordoba(value: 'america/argentina/cordoba'),
americaArgentinaJujuy(value: 'america/argentina/jujuy'),
americaArgentinaLaRioja(value: 'america/argentina/la_rioja'),
americaArgentinaMendoza(value: 'america/argentina/mendoza'),
americaArgentinaRioGallegos(value: 'america/argentina/rio_gallegos'),
americaArgentinaSalta(value: 'america/argentina/salta'),
americaArgentinaSanJuan(value: 'america/argentina/san_juan'),
americaArgentinaSanLuis(value: 'america/argentina/san_luis'),
americaArgentinaTucuman(value: 'america/argentina/tucuman'),
americaArgentinaUshuaia(value: 'america/argentina/ushuaia'),
americaAruba(value: 'america/aruba'),
americaAsuncion(value: 'america/asuncion'),
americaAtikokan(value: 'america/atikokan'),
americaBahia(value: 'america/bahia'),
americaBahiaBanderas(value: 'america/bahia_banderas'),
americaBarbados(value: 'america/barbados'),
americaBelem(value: 'america/belem'),
americaBelize(value: 'america/belize'),
americaBlancSablon(value: 'america/blanc-sablon'),
americaBoaVista(value: 'america/boa_vista'),
americaBogota(value: 'america/bogota'),
americaBoise(value: 'america/boise'),
americaCambridgeBay(value: 'america/cambridge_bay'),
americaCampoGrande(value: 'america/campo_grande'),
americaCancun(value: 'america/cancun'),
americaCaracas(value: 'america/caracas'),
americaCayenne(value: 'america/cayenne'),
americaCayman(value: 'america/cayman'),
americaChicago(value: 'america/chicago'),
americaChihuahua(value: 'america/chihuahua'),
americaCiudadJuarez(value: 'america/ciudad_juarez'),
americaCostaRica(value: 'america/costa_rica'),
americaCoyhaique(value: 'america/coyhaique'),
americaCreston(value: 'america/creston'),
americaCuiaba(value: 'america/cuiaba'),
americaCuracao(value: 'america/curacao'),
americaDanmarkshavn(value: 'america/danmarkshavn'),
americaDawson(value: 'america/dawson'),
americaDawsonCreek(value: 'america/dawson_creek'),
americaDenver(value: 'america/denver'),
americaDetroit(value: 'america/detroit'),
americaDominica(value: 'america/dominica'),
americaEdmonton(value: 'america/edmonton'),
americaEirunepe(value: 'america/eirunepe'),
americaElSalvador(value: 'america/el_salvador'),
americaFortNelson(value: 'america/fort_nelson'),
americaFortaleza(value: 'america/fortaleza'),
americaGlaceBay(value: 'america/glace_bay'),
americaGooseBay(value: 'america/goose_bay'),
americaGrandTurk(value: 'america/grand_turk'),
americaGrenada(value: 'america/grenada'),
americaGuadeloupe(value: 'america/guadeloupe'),
americaGuatemala(value: 'america/guatemala'),
americaGuayaquil(value: 'america/guayaquil'),
americaGuyana(value: 'america/guyana'),
americaHalifax(value: 'america/halifax'),
americaHavana(value: 'america/havana'),
americaHermosillo(value: 'america/hermosillo'),
americaIndianaIndianapolis(value: 'america/indiana/indianapolis'),
americaIndianaKnox(value: 'america/indiana/knox'),
americaIndianaMarengo(value: 'america/indiana/marengo'),
americaIndianaPetersburg(value: 'america/indiana/petersburg'),
americaIndianaTellCity(value: 'america/indiana/tell_city'),
americaIndianaVevay(value: 'america/indiana/vevay'),
americaIndianaVincennes(value: 'america/indiana/vincennes'),
americaIndianaWinamac(value: 'america/indiana/winamac'),
americaInuvik(value: 'america/inuvik'),
americaIqaluit(value: 'america/iqaluit'),
americaJamaica(value: 'america/jamaica'),
americaJuneau(value: 'america/juneau'),
americaKentuckyLouisville(value: 'america/kentucky/louisville'),
americaKentuckyMonticello(value: 'america/kentucky/monticello'),
americaKralendijk(value: 'america/kralendijk'),
americaLaPaz(value: 'america/la_paz'),
americaLima(value: 'america/lima'),
americaLosAngeles(value: 'america/los_angeles'),
americaLowerPrinces(value: 'america/lower_princes'),
americaMaceio(value: 'america/maceio'),
americaManagua(value: 'america/managua'),
americaManaus(value: 'america/manaus'),
americaMarigot(value: 'america/marigot'),
americaMartinique(value: 'america/martinique'),
americaMatamoros(value: 'america/matamoros'),
americaMazatlan(value: 'america/mazatlan'),
americaMenominee(value: 'america/menominee'),
americaMerida(value: 'america/merida'),
americaMetlakatla(value: 'america/metlakatla'),
americaMexicoCity(value: 'america/mexico_city'),
americaMiquelon(value: 'america/miquelon'),
americaMoncton(value: 'america/moncton'),
americaMonterrey(value: 'america/monterrey'),
americaMontevideo(value: 'america/montevideo'),
americaMontserrat(value: 'america/montserrat'),
americaNassau(value: 'america/nassau'),
americaNewYork(value: 'america/new_york'),
americaNome(value: 'america/nome'),
americaNoronha(value: 'america/noronha'),
americaNorthDakotaBeulah(value: 'america/north_dakota/beulah'),
americaNorthDakotaCenter(value: 'america/north_dakota/center'),
americaNorthDakotaNewSalem(value: 'america/north_dakota/new_salem'),
americaNuuk(value: 'america/nuuk'),
americaOjinaga(value: 'america/ojinaga'),
americaPanama(value: 'america/panama'),
americaParamaribo(value: 'america/paramaribo'),
americaPhoenix(value: 'america/phoenix'),
americaPortAuPrince(value: 'america/port-au-prince'),
americaPortOfSpain(value: 'america/port_of_spain'),
americaPortoVelho(value: 'america/porto_velho'),
americaPuertoRico(value: 'america/puerto_rico'),
americaPuntaArenas(value: 'america/punta_arenas'),
americaRankinInlet(value: 'america/rankin_inlet'),
americaRecife(value: 'america/recife'),
americaRegina(value: 'america/regina'),
americaResolute(value: 'america/resolute'),
americaRioBranco(value: 'america/rio_branco'),
americaSantarem(value: 'america/santarem'),
americaSantiago(value: 'america/santiago'),
americaSantoDomingo(value: 'america/santo_domingo'),
americaSaoPaulo(value: 'america/sao_paulo'),
americaScoresbysund(value: 'america/scoresbysund'),
americaSitka(value: 'america/sitka'),
americaStBarthelemy(value: 'america/st_barthelemy'),
americaStJohns(value: 'america/st_johns'),
americaStKitts(value: 'america/st_kitts'),
americaStLucia(value: 'america/st_lucia'),
americaStThomas(value: 'america/st_thomas'),
americaStVincent(value: 'america/st_vincent'),
americaSwiftCurrent(value: 'america/swift_current'),
americaTegucigalpa(value: 'america/tegucigalpa'),
americaThule(value: 'america/thule'),
americaTijuana(value: 'america/tijuana'),
americaToronto(value: 'america/toronto'),
americaTortola(value: 'america/tortola'),
americaVancouver(value: 'america/vancouver'),
americaWhitehorse(value: 'america/whitehorse'),
americaWinnipeg(value: 'america/winnipeg'),
americaYakutat(value: 'america/yakutat'),
antarcticaCasey(value: 'antarctica/casey'),
antarcticaDavis(value: 'antarctica/davis'),
antarcticaDumontdurville(value: 'antarctica/dumontdurville'),
antarcticaMacquarie(value: 'antarctica/macquarie'),
antarcticaMawson(value: 'antarctica/mawson'),
antarcticaMcmurdo(value: 'antarctica/mcmurdo'),
antarcticaPalmer(value: 'antarctica/palmer'),
antarcticaRothera(value: 'antarctica/rothera'),
antarcticaSyowa(value: 'antarctica/syowa'),
antarcticaTroll(value: 'antarctica/troll'),
antarcticaVostok(value: 'antarctica/vostok'),
arcticLongyearbyen(value: 'arctic/longyearbyen'),
asiaAden(value: 'asia/aden'),
asiaAlmaty(value: 'asia/almaty'),
asiaAmman(value: 'asia/amman'),
asiaAnadyr(value: 'asia/anadyr'),
asiaAqtau(value: 'asia/aqtau'),
asiaAqtobe(value: 'asia/aqtobe'),
asiaAshgabat(value: 'asia/ashgabat'),
asiaAtyrau(value: 'asia/atyrau'),
asiaBaghdad(value: 'asia/baghdad'),
asiaBahrain(value: 'asia/bahrain'),
asiaBaku(value: 'asia/baku'),
asiaBangkok(value: 'asia/bangkok'),
asiaBarnaul(value: 'asia/barnaul'),
asiaBeirut(value: 'asia/beirut'),
asiaBishkek(value: 'asia/bishkek'),
asiaBrunei(value: 'asia/brunei'),
asiaChita(value: 'asia/chita'),
asiaColombo(value: 'asia/colombo'),
asiaDamascus(value: 'asia/damascus'),
asiaDhaka(value: 'asia/dhaka'),
asiaDili(value: 'asia/dili'),
asiaDubai(value: 'asia/dubai'),
asiaDushanbe(value: 'asia/dushanbe'),
asiaFamagusta(value: 'asia/famagusta'),
asiaGaza(value: 'asia/gaza'),
asiaHebron(value: 'asia/hebron'),
asiaHoChiMinh(value: 'asia/ho_chi_minh'),
asiaHongKong(value: 'asia/hong_kong'),
asiaHovd(value: 'asia/hovd'),
asiaIrkutsk(value: 'asia/irkutsk'),
asiaJakarta(value: 'asia/jakarta'),
asiaJayapura(value: 'asia/jayapura'),
asiaJerusalem(value: 'asia/jerusalem'),
asiaKabul(value: 'asia/kabul'),
asiaKamchatka(value: 'asia/kamchatka'),
asiaKarachi(value: 'asia/karachi'),
asiaKathmandu(value: 'asia/kathmandu'),
asiaKhandyga(value: 'asia/khandyga'),
asiaKolkata(value: 'asia/kolkata'),
asiaKrasnoyarsk(value: 'asia/krasnoyarsk'),
asiaKualaLumpur(value: 'asia/kuala_lumpur'),
asiaKuching(value: 'asia/kuching'),
asiaKuwait(value: 'asia/kuwait'),
asiaMacau(value: 'asia/macau'),
asiaMagadan(value: 'asia/magadan'),
asiaMakassar(value: 'asia/makassar'),
asiaManila(value: 'asia/manila'),
asiaMuscat(value: 'asia/muscat'),
asiaNicosia(value: 'asia/nicosia'),
asiaNovokuznetsk(value: 'asia/novokuznetsk'),
asiaNovosibirsk(value: 'asia/novosibirsk'),
asiaOmsk(value: 'asia/omsk'),
asiaOral(value: 'asia/oral'),
asiaPhnomPenh(value: 'asia/phnom_penh'),
asiaPontianak(value: 'asia/pontianak'),
asiaPyongyang(value: 'asia/pyongyang'),
asiaQatar(value: 'asia/qatar'),
asiaQostanay(value: 'asia/qostanay'),
asiaQyzylorda(value: 'asia/qyzylorda'),
asiaRiyadh(value: 'asia/riyadh'),
asiaSakhalin(value: 'asia/sakhalin'),
asiaSamarkand(value: 'asia/samarkand'),
asiaSeoul(value: 'asia/seoul'),
asiaShanghai(value: 'asia/shanghai'),
asiaSingapore(value: 'asia/singapore'),
asiaSrednekolymsk(value: 'asia/srednekolymsk'),
asiaTaipei(value: 'asia/taipei'),
asiaTashkent(value: 'asia/tashkent'),
asiaTbilisi(value: 'asia/tbilisi'),
asiaTehran(value: 'asia/tehran'),
asiaThimphu(value: 'asia/thimphu'),
asiaTokyo(value: 'asia/tokyo'),
asiaTomsk(value: 'asia/tomsk'),
asiaUlaanbaatar(value: 'asia/ulaanbaatar'),
asiaUrumqi(value: 'asia/urumqi'),
asiaUstNera(value: 'asia/ust-nera'),
asiaVientiane(value: 'asia/vientiane'),
asiaVladivostok(value: 'asia/vladivostok'),
asiaYakutsk(value: 'asia/yakutsk'),
asiaYangon(value: 'asia/yangon'),
asiaYekaterinburg(value: 'asia/yekaterinburg'),
asiaYerevan(value: 'asia/yerevan'),
atlanticAzores(value: 'atlantic/azores'),
atlanticBermuda(value: 'atlantic/bermuda'),
atlanticCanary(value: 'atlantic/canary'),
atlanticCapeVerde(value: 'atlantic/cape_verde'),
atlanticFaroe(value: 'atlantic/faroe'),
atlanticMadeira(value: 'atlantic/madeira'),
atlanticReykjavik(value: 'atlantic/reykjavik'),
atlanticSouthGeorgia(value: 'atlantic/south_georgia'),
atlanticStHelena(value: 'atlantic/st_helena'),
atlanticStanley(value: 'atlantic/stanley'),
australiaAdelaide(value: 'australia/adelaide'),
australiaBrisbane(value: 'australia/brisbane'),
australiaBrokenHill(value: 'australia/broken_hill'),
australiaDarwin(value: 'australia/darwin'),
australiaEucla(value: 'australia/eucla'),
australiaHobart(value: 'australia/hobart'),
australiaLindeman(value: 'australia/lindeman'),
australiaLordHowe(value: 'australia/lord_howe'),
australiaMelbourne(value: 'australia/melbourne'),
australiaPerth(value: 'australia/perth'),
australiaSydney(value: 'australia/sydney'),
europeAmsterdam(value: 'europe/amsterdam'),
europeAndorra(value: 'europe/andorra'),
europeAstrakhan(value: 'europe/astrakhan'),
europeAthens(value: 'europe/athens'),
europeBelgrade(value: 'europe/belgrade'),
europeBerlin(value: 'europe/berlin'),
europeBratislava(value: 'europe/bratislava'),
europeBrussels(value: 'europe/brussels'),
europeBucharest(value: 'europe/bucharest'),
europeBudapest(value: 'europe/budapest'),
europeBusingen(value: 'europe/busingen'),
europeChisinau(value: 'europe/chisinau'),
europeCopenhagen(value: 'europe/copenhagen'),
europeDublin(value: 'europe/dublin'),
europeGibraltar(value: 'europe/gibraltar'),
europeGuernsey(value: 'europe/guernsey'),
europeHelsinki(value: 'europe/helsinki'),
europeIsleOfMan(value: 'europe/isle_of_man'),
europeIstanbul(value: 'europe/istanbul'),
europeJersey(value: 'europe/jersey'),
europeKaliningrad(value: 'europe/kaliningrad'),
europeKirov(value: 'europe/kirov'),
europeKyiv(value: 'europe/kyiv'),
europeLisbon(value: 'europe/lisbon'),
europeLjubljana(value: 'europe/ljubljana'),
europeLondon(value: 'europe/london'),
europeLuxembourg(value: 'europe/luxembourg'),
europeMadrid(value: 'europe/madrid'),
europeMalta(value: 'europe/malta'),
europeMariehamn(value: 'europe/mariehamn'),
europeMinsk(value: 'europe/minsk'),
europeMonaco(value: 'europe/monaco'),
europeMoscow(value: 'europe/moscow'),
europeOslo(value: 'europe/oslo'),
europeParis(value: 'europe/paris'),
europePodgorica(value: 'europe/podgorica'),
europePrague(value: 'europe/prague'),
europeRiga(value: 'europe/riga'),
europeRome(value: 'europe/rome'),
europeSamara(value: 'europe/samara'),
europeSanMarino(value: 'europe/san_marino'),
europeSarajevo(value: 'europe/sarajevo'),
europeSaratov(value: 'europe/saratov'),
europeSimferopol(value: 'europe/simferopol'),
europeSkopje(value: 'europe/skopje'),
europeSofia(value: 'europe/sofia'),
europeStockholm(value: 'europe/stockholm'),
europeTallinn(value: 'europe/tallinn'),
europeTirane(value: 'europe/tirane'),
europeUlyanovsk(value: 'europe/ulyanovsk'),
europeVaduz(value: 'europe/vaduz'),
europeVatican(value: 'europe/vatican'),
europeVienna(value: 'europe/vienna'),
europeVilnius(value: 'europe/vilnius'),
europeVolgograd(value: 'europe/volgograd'),
europeWarsaw(value: 'europe/warsaw'),
europeZagreb(value: 'europe/zagreb'),
europeZurich(value: 'europe/zurich'),
indianAntananarivo(value: 'indian/antananarivo'),
indianChagos(value: 'indian/chagos'),
indianChristmas(value: 'indian/christmas'),
indianCocos(value: 'indian/cocos'),
indianComoro(value: 'indian/comoro'),
indianKerguelen(value: 'indian/kerguelen'),
indianMahe(value: 'indian/mahe'),
indianMaldives(value: 'indian/maldives'),
indianMauritius(value: 'indian/mauritius'),
indianMayotte(value: 'indian/mayotte'),
indianReunion(value: 'indian/reunion'),
pacificApia(value: 'pacific/apia'),
pacificAuckland(value: 'pacific/auckland'),
pacificBougainville(value: 'pacific/bougainville'),
pacificChatham(value: 'pacific/chatham'),
pacificChuuk(value: 'pacific/chuuk'),
pacificEaster(value: 'pacific/easter'),
pacificEfate(value: 'pacific/efate'),
pacificFakaofo(value: 'pacific/fakaofo'),
pacificFiji(value: 'pacific/fiji'),
pacificFunafuti(value: 'pacific/funafuti'),
pacificGalapagos(value: 'pacific/galapagos'),
pacificGambier(value: 'pacific/gambier'),
pacificGuadalcanal(value: 'pacific/guadalcanal'),
pacificGuam(value: 'pacific/guam'),
pacificHonolulu(value: 'pacific/honolulu'),
pacificKanton(value: 'pacific/kanton'),
pacificKiritimati(value: 'pacific/kiritimati'),
pacificKosrae(value: 'pacific/kosrae'),
pacificKwajalein(value: 'pacific/kwajalein'),
pacificMajuro(value: 'pacific/majuro'),
pacificMarquesas(value: 'pacific/marquesas'),
pacificMidway(value: 'pacific/midway'),
pacificNauru(value: 'pacific/nauru'),
pacificNiue(value: 'pacific/niue'),
pacificNorfolk(value: 'pacific/norfolk'),
pacificNoumea(value: 'pacific/noumea'),
pacificPagoPago(value: 'pacific/pago_pago'),
pacificPalau(value: 'pacific/palau'),
pacificPitcairn(value: 'pacific/pitcairn'),
pacificPohnpei(value: 'pacific/pohnpei'),
pacificPortMoresby(value: 'pacific/port_moresby'),
pacificRarotonga(value: 'pacific/rarotonga'),
pacificSaipan(value: 'pacific/saipan'),
pacificTahiti(value: 'pacific/tahiti'),
pacificTarawa(value: 'pacific/tarawa'),
pacificTongatapu(value: 'pacific/tongatapu'),
pacificWake(value: 'pacific/wake'),
pacificWallis(value: 'pacific/wallis'),
utc(value: 'utc');
const Timezone({required this.value});
const Timezone({
required this.value
});
final String value;
final String value;
String toJson() => value;
}
String toJson() => value;
}
+9 -7
View File
@@ -1,13 +1,15 @@
part of '../../enums.dart';
enum VCSReferenceType {
branch(value: 'branch'),
commit(value: 'commit'),
tag(value: 'tag');
branch(value: 'branch'),
commit(value: 'commit'),
tag(value: 'tag');
const VCSReferenceType({required this.value});
const VCSReferenceType({
required this.value
});
final String value;
final String value;
String toJson() => value;
}
String toJson() => value;
}
+1 -1
View File
@@ -13,7 +13,7 @@ class AppwriteException implements Exception {
/// Initializes an Appwrite Exception.
AppwriteException([this.message = "", this.code, this.type, this.response]);
/// Returns the error type, message, and code.
@override
String toString() {
+171 -171
View File
@@ -2,209 +2,209 @@ part of '../../models.dart';
/// ActivityEvent
class ActivityEvent implements Model {
/// Event ID.
final String $id;
/// Event ID.
final String $id;
/// User type.
final String userType;
/// User type.
final String userType;
/// User ID.
final String userId;
/// User ID.
final String userId;
/// User Email.
final String userEmail;
/// User Email.
final String userEmail;
/// User Name.
final String userName;
/// User Name.
final String userName;
/// Resource parent.
final String resourceParent;
/// Resource parent.
final String resourceParent;
/// Resource type.
final String resourceType;
/// Resource type.
final String resourceType;
/// Resource ID.
final String resourceId;
/// Resource ID.
final String resourceId;
/// Resource.
final String resource;
/// Resource.
final String resource;
/// Event name.
final String event;
/// Event name.
final String event;
/// User agent.
final String userAgent;
/// User agent.
final String userAgent;
/// IP address.
final String ip;
/// IP address.
final String ip;
/// API mode when event triggered.
final String mode;
/// API mode when event triggered.
final String mode;
/// Location.
final String country;
/// Location.
final String country;
/// Log creation date in ISO 8601 format.
final String time;
/// Log creation date in ISO 8601 format.
final String time;
/// Project ID.
final String projectId;
/// Project ID.
final String projectId;
/// Team ID.
final String teamId;
/// Team ID.
final String teamId;
/// Hostname.
final String hostname;
/// Hostname.
final String hostname;
/// Operating system code name. View list of [available options](https://github.com/appwrite/appwrite/blob/master/docs/lists/os.json).
final String osCode;
/// Operating system code name. View list of [available options](https://github.com/appwrite/appwrite/blob/master/docs/lists/os.json).
final String osCode;
/// Operating system name.
final String osName;
/// Operating system name.
final String osName;
/// Operating system version.
final String osVersion;
/// Operating system version.
final String osVersion;
/// Client type.
final String clientType;
/// Client type.
final String clientType;
/// Client code name. View list of [available options](https://github.com/appwrite/appwrite/blob/master/docs/lists/clients.json).
final String clientCode;
/// Client code name. View list of [available options](https://github.com/appwrite/appwrite/blob/master/docs/lists/clients.json).
final String clientCode;
/// Client name.
final String clientName;
/// Client name.
final String clientName;
/// Client version.
final String clientVersion;
/// Client version.
final String clientVersion;
/// Client engine name.
final String clientEngine;
/// Client engine name.
final String clientEngine;
/// Client engine name.
final String clientEngineVersion;
/// Client engine name.
final String clientEngineVersion;
/// Device name.
final String deviceName;
/// Device name.
final String deviceName;
/// Device brand name.
final String deviceBrand;
/// Device brand name.
final String deviceBrand;
/// Device model name.
final String deviceModel;
/// Device model name.
final String deviceModel;
/// Country two-character ISO 3166-1 alpha code.
final String countryCode;
/// Country two-character ISO 3166-1 alpha code.
final String countryCode;
/// Country name.
final String countryName;
/// Country name.
final String countryName;
ActivityEvent({
required this.$id,
required this.userType,
required this.userId,
required this.userEmail,
required this.userName,
required this.resourceParent,
required this.resourceType,
required this.resourceId,
required this.resource,
required this.event,
required this.userAgent,
required this.ip,
required this.mode,
required this.country,
required this.time,
required this.projectId,
required this.teamId,
required this.hostname,
required this.osCode,
required this.osName,
required this.osVersion,
required this.clientType,
required this.clientCode,
required this.clientName,
required this.clientVersion,
required this.clientEngine,
required this.clientEngineVersion,
required this.deviceName,
required this.deviceBrand,
required this.deviceModel,
required this.countryCode,
required this.countryName,
});
ActivityEvent({
required this.$id,
required this.userType,
required this.userId,
required this.userEmail,
required this.userName,
required this.resourceParent,
required this.resourceType,
required this.resourceId,
required this.resource,
required this.event,
required this.userAgent,
required this.ip,
required this.mode,
required this.country,
required this.time,
required this.projectId,
required this.teamId,
required this.hostname,
required this.osCode,
required this.osName,
required this.osVersion,
required this.clientType,
required this.clientCode,
required this.clientName,
required this.clientVersion,
required this.clientEngine,
required this.clientEngineVersion,
required this.deviceName,
required this.deviceBrand,
required this.deviceModel,
required this.countryCode,
required this.countryName,
});
factory ActivityEvent.fromMap(Map<String, dynamic> map) {
return ActivityEvent(
$id: map['\$id'].toString(),
userType: map['userType'].toString(),
userId: map['userId'].toString(),
userEmail: map['userEmail'].toString(),
userName: map['userName'].toString(),
resourceParent: map['resourceParent'].toString(),
resourceType: map['resourceType'].toString(),
resourceId: map['resourceId'].toString(),
resource: map['resource'].toString(),
event: map['event'].toString(),
userAgent: map['userAgent'].toString(),
ip: map['ip'].toString(),
mode: map['mode'].toString(),
country: map['country'].toString(),
time: map['time'].toString(),
projectId: map['projectId'].toString(),
teamId: map['teamId'].toString(),
hostname: map['hostname'].toString(),
osCode: map['osCode'].toString(),
osName: map['osName'].toString(),
osVersion: map['osVersion'].toString(),
clientType: map['clientType'].toString(),
clientCode: map['clientCode'].toString(),
clientName: map['clientName'].toString(),
clientVersion: map['clientVersion'].toString(),
clientEngine: map['clientEngine'].toString(),
clientEngineVersion: map['clientEngineVersion'].toString(),
deviceName: map['deviceName'].toString(),
deviceBrand: map['deviceBrand'].toString(),
deviceModel: map['deviceModel'].toString(),
countryCode: map['countryCode'].toString(),
countryName: map['countryName'].toString(),
);
}
factory ActivityEvent.fromMap(Map<String, dynamic> map) {
return ActivityEvent(
$id: map['\$id'].toString(),
userType: map['userType'].toString(),
userId: map['userId'].toString(),
userEmail: map['userEmail'].toString(),
userName: map['userName'].toString(),
resourceParent: map['resourceParent'].toString(),
resourceType: map['resourceType'].toString(),
resourceId: map['resourceId'].toString(),
resource: map['resource'].toString(),
event: map['event'].toString(),
userAgent: map['userAgent'].toString(),
ip: map['ip'].toString(),
mode: map['mode'].toString(),
country: map['country'].toString(),
time: map['time'].toString(),
projectId: map['projectId'].toString(),
teamId: map['teamId'].toString(),
hostname: map['hostname'].toString(),
osCode: map['osCode'].toString(),
osName: map['osName'].toString(),
osVersion: map['osVersion'].toString(),
clientType: map['clientType'].toString(),
clientCode: map['clientCode'].toString(),
clientName: map['clientName'].toString(),
clientVersion: map['clientVersion'].toString(),
clientEngine: map['clientEngine'].toString(),
clientEngineVersion: map['clientEngineVersion'].toString(),
deviceName: map['deviceName'].toString(),
deviceBrand: map['deviceBrand'].toString(),
deviceModel: map['deviceModel'].toString(),
countryCode: map['countryCode'].toString(),
countryName: map['countryName'].toString(),
);
}
@override
Map<String, dynamic> toMap() {
return {
"\$id": $id,
"userType": userType,
"userId": userId,
"userEmail": userEmail,
"userName": userName,
"resourceParent": resourceParent,
"resourceType": resourceType,
"resourceId": resourceId,
"resource": resource,
"event": event,
"userAgent": userAgent,
"ip": ip,
"mode": mode,
"country": country,
"time": time,
"projectId": projectId,
"teamId": teamId,
"hostname": hostname,
"osCode": osCode,
"osName": osName,
"osVersion": osVersion,
"clientType": clientType,
"clientCode": clientCode,
"clientName": clientName,
"clientVersion": clientVersion,
"clientEngine": clientEngine,
"clientEngineVersion": clientEngineVersion,
"deviceName": deviceName,
"deviceBrand": deviceBrand,
"deviceModel": deviceModel,
"countryCode": countryCode,
"countryName": countryName,
};
}
@override
Map<String, dynamic> toMap() {
return {
"\$id": $id,
"userType": userType,
"userId": userId,
"userEmail": userEmail,
"userName": userName,
"resourceParent": resourceParent,
"resourceType": resourceType,
"resourceId": resourceId,
"resource": resource,
"event": event,
"userAgent": userAgent,
"ip": ip,
"mode": mode,
"country": country,
"time": time,
"projectId": projectId,
"teamId": teamId,
"hostname": hostname,
"osCode": osCode,
"osName": osName,
"osVersion": osVersion,
"clientType": clientType,
"clientCode": clientCode,
"clientName": clientName,
"clientVersion": clientVersion,
"clientEngine": clientEngine,
"clientEngineVersion": clientEngineVersion,
"deviceName": deviceName,
"deviceBrand": deviceBrand,
"deviceModel": deviceModel,
"countryCode": countryCode,
"countryName": countryName,
};
}
}
+21 -22
View File
@@ -2,30 +2,29 @@ part of '../../models.dart';
/// Activity event list
class ActivityEventList implements Model {
/// Total number of events that matched your query.
final int total;
/// Total number of events that matched your query.
final int total;
/// List of events.
final List<ActivityEvent> events;
/// List of events.
final List<ActivityEvent> events;
ActivityEventList({
required this.total,
required this.events,
});
ActivityEventList({
required this.total,
required this.events,
});
factory ActivityEventList.fromMap(Map<String, dynamic> map) {
return ActivityEventList(
total: map['total'],
events: List<ActivityEvent>.from(
map['events'].map((p) => ActivityEvent.fromMap(p))),
);
}
factory ActivityEventList.fromMap(Map<String, dynamic> map) {
return ActivityEventList(
total: map['total'],
events: List<ActivityEvent>.from(map['events'].map((p) => ActivityEvent.fromMap(p))),
);
}
@override
Map<String, dynamic> toMap() {
return {
"total": total,
"events": events.map((p) => p.toMap()).toList(),
};
}
@override
Map<String, dynamic> toMap() {
return {
"total": total,
"events": events.map((p) => p.toMap()).toList(),
};
}
}
+31 -31
View File
@@ -2,41 +2,41 @@ part of '../../models.dart';
/// AlgoArgon2
class AlgoArgon2 implements Model {
/// Algo type.
final String type;
/// Algo type.
final String type;
/// Memory used to compute hash.
final int memoryCost;
/// Memory used to compute hash.
final int memoryCost;
/// Amount of time consumed to compute hash
final int timeCost;
/// Amount of time consumed to compute hash
final int timeCost;
/// Number of threads used to compute hash.
final int threads;
/// Number of threads used to compute hash.
final int threads;
AlgoArgon2({
required this.type,
required this.memoryCost,
required this.timeCost,
required this.threads,
});
AlgoArgon2({
required this.type,
required this.memoryCost,
required this.timeCost,
required this.threads,
});
factory AlgoArgon2.fromMap(Map<String, dynamic> map) {
return AlgoArgon2(
type: map['type'].toString(),
memoryCost: map['memoryCost'],
timeCost: map['timeCost'],
threads: map['threads'],
);
}
factory AlgoArgon2.fromMap(Map<String, dynamic> map) {
return AlgoArgon2(
type: map['type'].toString(),
memoryCost: map['memoryCost'],
timeCost: map['timeCost'],
threads: map['threads'],
);
}
@override
Map<String, dynamic> toMap() {
return {
"type": type,
"memoryCost": memoryCost,
"timeCost": timeCost,
"threads": threads,
};
}
@override
Map<String, dynamic> toMap() {
return {
"type": type,
"memoryCost": memoryCost,
"timeCost": timeCost,
"threads": threads,
};
}
}
+16 -16
View File
@@ -2,23 +2,23 @@ part of '../../models.dart';
/// AlgoBcrypt
class AlgoBcrypt implements Model {
/// Algo type.
final String type;
/// Algo type.
final String type;
AlgoBcrypt({
required this.type,
});
AlgoBcrypt({
required this.type,
});
factory AlgoBcrypt.fromMap(Map<String, dynamic> map) {
return AlgoBcrypt(
type: map['type'].toString(),
);
}
factory AlgoBcrypt.fromMap(Map<String, dynamic> map) {
return AlgoBcrypt(
type: map['type'].toString(),
);
}
@override
Map<String, dynamic> toMap() {
return {
"type": type,
};
}
@override
Map<String, dynamic> toMap() {
return {
"type": type,
};
}
}
+16 -16
View File
@@ -2,23 +2,23 @@ part of '../../models.dart';
/// AlgoMD5
class AlgoMd5 implements Model {
/// Algo type.
final String type;
/// Algo type.
final String type;
AlgoMd5({
required this.type,
});
AlgoMd5({
required this.type,
});
factory AlgoMd5.fromMap(Map<String, dynamic> map) {
return AlgoMd5(
type: map['type'].toString(),
);
}
factory AlgoMd5.fromMap(Map<String, dynamic> map) {
return AlgoMd5(
type: map['type'].toString(),
);
}
@override
Map<String, dynamic> toMap() {
return {
"type": type,
};
}
@override
Map<String, dynamic> toMap() {
return {
"type": type,
};
}
}
+16 -16
View File
@@ -2,23 +2,23 @@ part of '../../models.dart';
/// AlgoPHPass
class AlgoPhpass implements Model {
/// Algo type.
final String type;
/// Algo type.
final String type;
AlgoPhpass({
required this.type,
});
AlgoPhpass({
required this.type,
});
factory AlgoPhpass.fromMap(Map<String, dynamic> map) {
return AlgoPhpass(
type: map['type'].toString(),
);
}
factory AlgoPhpass.fromMap(Map<String, dynamic> map) {
return AlgoPhpass(
type: map['type'].toString(),
);
}
@override
Map<String, dynamic> toMap() {
return {
"type": type,
};
}
@override
Map<String, dynamic> toMap() {
return {
"type": type,
};
}
}
+36 -36
View File
@@ -2,47 +2,47 @@ part of '../../models.dart';
/// AlgoScrypt
class AlgoScrypt implements Model {
/// Algo type.
final String type;
/// Algo type.
final String type;
/// CPU complexity of computed hash.
final int costCpu;
/// CPU complexity of computed hash.
final int costCpu;
/// Memory complexity of computed hash.
final int costMemory;
/// Memory complexity of computed hash.
final int costMemory;
/// Parallelization of computed hash.
final int costParallel;
/// Parallelization of computed hash.
final int costParallel;
/// Length used to compute hash.
final int length;
/// Length used to compute hash.
final int length;
AlgoScrypt({
required this.type,
required this.costCpu,
required this.costMemory,
required this.costParallel,
required this.length,
});
AlgoScrypt({
required this.type,
required this.costCpu,
required this.costMemory,
required this.costParallel,
required this.length,
});
factory AlgoScrypt.fromMap(Map<String, dynamic> map) {
return AlgoScrypt(
type: map['type'].toString(),
costCpu: map['costCpu'],
costMemory: map['costMemory'],
costParallel: map['costParallel'],
length: map['length'],
);
}
factory AlgoScrypt.fromMap(Map<String, dynamic> map) {
return AlgoScrypt(
type: map['type'].toString(),
costCpu: map['costCpu'],
costMemory: map['costMemory'],
costParallel: map['costParallel'],
length: map['length'],
);
}
@override
Map<String, dynamic> toMap() {
return {
"type": type,
"costCpu": costCpu,
"costMemory": costMemory,
"costParallel": costParallel,
"length": length,
};
}
@override
Map<String, dynamic> toMap() {
return {
"type": type,
"costCpu": costCpu,
"costMemory": costMemory,
"costParallel": costParallel,
"length": length,
};
}
}
+31 -31
View File
@@ -2,41 +2,41 @@ part of '../../models.dart';
/// AlgoScryptModified
class AlgoScryptModified implements Model {
/// Algo type.
final String type;
/// Algo type.
final String type;
/// Salt used to compute hash.
final String salt;
/// Salt used to compute hash.
final String salt;
/// Separator used to compute hash.
final String saltSeparator;
/// Separator used to compute hash.
final String saltSeparator;
/// Key used to compute hash.
final String signerKey;
/// Key used to compute hash.
final String signerKey;
AlgoScryptModified({
required this.type,
required this.salt,
required this.saltSeparator,
required this.signerKey,
});
AlgoScryptModified({
required this.type,
required this.salt,
required this.saltSeparator,
required this.signerKey,
});
factory AlgoScryptModified.fromMap(Map<String, dynamic> map) {
return AlgoScryptModified(
type: map['type'].toString(),
salt: map['salt'].toString(),
saltSeparator: map['saltSeparator'].toString(),
signerKey: map['signerKey'].toString(),
);
}
factory AlgoScryptModified.fromMap(Map<String, dynamic> map) {
return AlgoScryptModified(
type: map['type'].toString(),
salt: map['salt'].toString(),
saltSeparator: map['saltSeparator'].toString(),
signerKey: map['signerKey'].toString(),
);
}
@override
Map<String, dynamic> toMap() {
return {
"type": type,
"salt": salt,
"saltSeparator": saltSeparator,
"signerKey": signerKey,
};
}
@override
Map<String, dynamic> toMap() {
return {
"type": type,
"salt": salt,
"saltSeparator": saltSeparator,
"signerKey": signerKey,
};
}
}
+16 -16
View File
@@ -2,23 +2,23 @@ part of '../../models.dart';
/// AlgoSHA
class AlgoSha implements Model {
/// Algo type.
final String type;
/// Algo type.
final String type;
AlgoSha({
required this.type,
});
AlgoSha({
required this.type,
});
factory AlgoSha.fromMap(Map<String, dynamic> map) {
return AlgoSha(
type: map['type'].toString(),
);
}
factory AlgoSha.fromMap(Map<String, dynamic> map) {
return AlgoSha(
type: map['type'].toString(),
);
}
@override
Map<String, dynamic> toMap() {
return {
"type": type,
};
}
@override
Map<String, dynamic> toMap() {
return {
"type": type,
};
}
}
+56 -57
View File
@@ -2,72 +2,71 @@ part of '../../models.dart';
/// AttributeBoolean
class AttributeBoolean implements Model {
/// Attribute Key.
final String key;
/// Attribute Key.
final String key;
/// Attribute type.
final String type;
/// Attribute type.
final String type;
/// Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`
final enums.AttributeStatus status;
/// Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`
final enums.AttributeStatus status;
/// Error message. Displays error generated on failure of creating or deleting an attribute.
final String error;
/// Error message. Displays error generated on failure of creating or deleting an attribute.
final String error;
/// Is attribute required?
final bool xrequired;
/// Is attribute required?
final bool xrequired;
/// Is attribute an array?
final bool? array;
/// Is attribute an array?
final bool? array;
/// Attribute creation date in ISO 8601 format.
final String $createdAt;
/// Attribute creation date in ISO 8601 format.
final String $createdAt;
/// Attribute update date in ISO 8601 format.
final String $updatedAt;
/// Attribute update date in ISO 8601 format.
final String $updatedAt;
/// Default value for attribute when not provided. Cannot be set when attribute is required.
final bool? xdefault;
/// Default value for attribute when not provided. Cannot be set when attribute is required.
final bool? xdefault;
AttributeBoolean({
required this.key,
required this.type,
required this.status,
required this.error,
required this.xrequired,
this.array,
required this.$createdAt,
required this.$updatedAt,
this.xdefault,
});
AttributeBoolean({
required this.key,
required this.type,
required this.status,
required this.error,
required this.xrequired,
this.array,
required this.$createdAt,
required this.$updatedAt,
this.xdefault,
});
factory AttributeBoolean.fromMap(Map<String, dynamic> map) {
return AttributeBoolean(
key: map['key'].toString(),
type: map['type'].toString(),
status: enums.AttributeStatus.values
.firstWhere((e) => e.value == map['status']),
error: map['error'].toString(),
xrequired: map['required'],
array: map['array'],
$createdAt: map['\$createdAt'].toString(),
$updatedAt: map['\$updatedAt'].toString(),
xdefault: map['default'],
);
}
factory AttributeBoolean.fromMap(Map<String, dynamic> map) {
return AttributeBoolean(
key: map['key'].toString(),
type: map['type'].toString(),
status: enums.AttributeStatus.values.firstWhere((e) => e.value == map['status']),
error: map['error'].toString(),
xrequired: map['required'],
array: map['array'],
$createdAt: map['\$createdAt'].toString(),
$updatedAt: map['\$updatedAt'].toString(),
xdefault: map['default'],
);
}
@override
Map<String, dynamic> toMap() {
return {
"key": key,
"type": type,
"status": status.value,
"error": error,
"required": xrequired,
"array": array,
"\$createdAt": $createdAt,
"\$updatedAt": $updatedAt,
"default": xdefault,
};
}
@override
Map<String, dynamic> toMap() {
return {
"key": key,
"type": type,
"status": status.value,
"error": error,
"required": xrequired,
"array": array,
"\$createdAt": $createdAt,
"\$updatedAt": $updatedAt,
"default": xdefault,
};
}
}
+61 -62
View File
@@ -2,78 +2,77 @@ part of '../../models.dart';
/// AttributeDatetime
class AttributeDatetime implements Model {
/// Attribute Key.
final String key;
/// Attribute Key.
final String key;
/// Attribute type.
final String type;
/// Attribute type.
final String type;
/// Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`
final enums.AttributeStatus status;
/// Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`
final enums.AttributeStatus status;
/// Error message. Displays error generated on failure of creating or deleting an attribute.
final String error;
/// Error message. Displays error generated on failure of creating or deleting an attribute.
final String error;
/// Is attribute required?
final bool xrequired;
/// Is attribute required?
final bool xrequired;
/// Is attribute an array?
final bool? array;
/// Is attribute an array?
final bool? array;
/// Attribute creation date in ISO 8601 format.
final String $createdAt;
/// Attribute creation date in ISO 8601 format.
final String $createdAt;
/// Attribute update date in ISO 8601 format.
final String $updatedAt;
/// Attribute update date in ISO 8601 format.
final String $updatedAt;
/// ISO 8601 format.
final String format;
/// ISO 8601 format.
final String format;
/// Default value for attribute when not provided. Only null is optional
final String? xdefault;
/// Default value for attribute when not provided. Only null is optional
final String? xdefault;
AttributeDatetime({
required this.key,
required this.type,
required this.status,
required this.error,
required this.xrequired,
this.array,
required this.$createdAt,
required this.$updatedAt,
required this.format,
this.xdefault,
});
AttributeDatetime({
required this.key,
required this.type,
required this.status,
required this.error,
required this.xrequired,
this.array,
required this.$createdAt,
required this.$updatedAt,
required this.format,
this.xdefault,
});
factory AttributeDatetime.fromMap(Map<String, dynamic> map) {
return AttributeDatetime(
key: map['key'].toString(),
type: map['type'].toString(),
status: enums.AttributeStatus.values
.firstWhere((e) => e.value == map['status']),
error: map['error'].toString(),
xrequired: map['required'],
array: map['array'],
$createdAt: map['\$createdAt'].toString(),
$updatedAt: map['\$updatedAt'].toString(),
format: map['format'].toString(),
xdefault: map['default']?.toString(),
);
}
factory AttributeDatetime.fromMap(Map<String, dynamic> map) {
return AttributeDatetime(
key: map['key'].toString(),
type: map['type'].toString(),
status: enums.AttributeStatus.values.firstWhere((e) => e.value == map['status']),
error: map['error'].toString(),
xrequired: map['required'],
array: map['array'],
$createdAt: map['\$createdAt'].toString(),
$updatedAt: map['\$updatedAt'].toString(),
format: map['format'].toString(),
xdefault: map['default']?.toString(),
);
}
@override
Map<String, dynamic> toMap() {
return {
"key": key,
"type": type,
"status": status.value,
"error": error,
"required": xrequired,
"array": array,
"\$createdAt": $createdAt,
"\$updatedAt": $updatedAt,
"format": format,
"default": xdefault,
};
}
@override
Map<String, dynamic> toMap() {
return {
"key": key,
"type": type,
"status": status.value,
"error": error,
"required": xrequired,
"array": array,
"\$createdAt": $createdAt,
"\$updatedAt": $updatedAt,
"format": format,
"default": xdefault,
};
}
}
+61 -62
View File
@@ -2,78 +2,77 @@ part of '../../models.dart';
/// AttributeEmail
class AttributeEmail implements Model {
/// Attribute Key.
final String key;
/// Attribute Key.
final String key;
/// Attribute type.
final String type;
/// Attribute type.
final String type;
/// Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`
final enums.AttributeStatus status;
/// Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`
final enums.AttributeStatus status;
/// Error message. Displays error generated on failure of creating or deleting an attribute.
final String error;
/// Error message. Displays error generated on failure of creating or deleting an attribute.
final String error;
/// Is attribute required?
final bool xrequired;
/// Is attribute required?
final bool xrequired;
/// Is attribute an array?
final bool? array;
/// Is attribute an array?
final bool? array;
/// Attribute creation date in ISO 8601 format.
final String $createdAt;
/// Attribute creation date in ISO 8601 format.
final String $createdAt;
/// Attribute update date in ISO 8601 format.
final String $updatedAt;
/// Attribute update date in ISO 8601 format.
final String $updatedAt;
/// String format.
final String format;
/// String format.
final String format;
/// Default value for attribute when not provided. Cannot be set when attribute is required.
final String? xdefault;
/// Default value for attribute when not provided. Cannot be set when attribute is required.
final String? xdefault;
AttributeEmail({
required this.key,
required this.type,
required this.status,
required this.error,
required this.xrequired,
this.array,
required this.$createdAt,
required this.$updatedAt,
required this.format,
this.xdefault,
});
AttributeEmail({
required this.key,
required this.type,
required this.status,
required this.error,
required this.xrequired,
this.array,
required this.$createdAt,
required this.$updatedAt,
required this.format,
this.xdefault,
});
factory AttributeEmail.fromMap(Map<String, dynamic> map) {
return AttributeEmail(
key: map['key'].toString(),
type: map['type'].toString(),
status: enums.AttributeStatus.values
.firstWhere((e) => e.value == map['status']),
error: map['error'].toString(),
xrequired: map['required'],
array: map['array'],
$createdAt: map['\$createdAt'].toString(),
$updatedAt: map['\$updatedAt'].toString(),
format: map['format'].toString(),
xdefault: map['default']?.toString(),
);
}
factory AttributeEmail.fromMap(Map<String, dynamic> map) {
return AttributeEmail(
key: map['key'].toString(),
type: map['type'].toString(),
status: enums.AttributeStatus.values.firstWhere((e) => e.value == map['status']),
error: map['error'].toString(),
xrequired: map['required'],
array: map['array'],
$createdAt: map['\$createdAt'].toString(),
$updatedAt: map['\$updatedAt'].toString(),
format: map['format'].toString(),
xdefault: map['default']?.toString(),
);
}
@override
Map<String, dynamic> toMap() {
return {
"key": key,
"type": type,
"status": status.value,
"error": error,
"required": xrequired,
"array": array,
"\$createdAt": $createdAt,
"\$updatedAt": $updatedAt,
"format": format,
"default": xdefault,
};
}
@override
Map<String, dynamic> toMap() {
return {
"key": key,
"type": type,
"status": status.value,
"error": error,
"required": xrequired,
"array": array,
"\$createdAt": $createdAt,
"\$updatedAt": $updatedAt,
"format": format,
"default": xdefault,
};
}
}
+66 -67
View File
@@ -2,84 +2,83 @@ part of '../../models.dart';
/// AttributeEnum
class AttributeEnum implements Model {
/// Attribute Key.
final String key;
/// Attribute Key.
final String key;
/// Attribute type.
final String type;
/// Attribute type.
final String type;
/// Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`
final enums.AttributeStatus status;
/// Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`
final enums.AttributeStatus status;
/// Error message. Displays error generated on failure of creating or deleting an attribute.
final String error;
/// Error message. Displays error generated on failure of creating or deleting an attribute.
final String error;
/// Is attribute required?
final bool xrequired;
/// Is attribute required?
final bool xrequired;
/// Is attribute an array?
final bool? array;
/// Is attribute an array?
final bool? array;
/// Attribute creation date in ISO 8601 format.
final String $createdAt;
/// Attribute creation date in ISO 8601 format.
final String $createdAt;
/// Attribute update date in ISO 8601 format.
final String $updatedAt;
/// Attribute update date in ISO 8601 format.
final String $updatedAt;
/// Array of elements in enumerated type.
final List<String> elements;
/// Array of elements in enumerated type.
final List<String> elements;
/// String format.
final String format;
/// String format.
final String format;
/// Default value for attribute when not provided. Cannot be set when attribute is required.
final String? xdefault;
/// Default value for attribute when not provided. Cannot be set when attribute is required.
final String? xdefault;
AttributeEnum({
required this.key,
required this.type,
required this.status,
required this.error,
required this.xrequired,
this.array,
required this.$createdAt,
required this.$updatedAt,
required this.elements,
required this.format,
this.xdefault,
});
AttributeEnum({
required this.key,
required this.type,
required this.status,
required this.error,
required this.xrequired,
this.array,
required this.$createdAt,
required this.$updatedAt,
required this.elements,
required this.format,
this.xdefault,
});
factory AttributeEnum.fromMap(Map<String, dynamic> map) {
return AttributeEnum(
key: map['key'].toString(),
type: map['type'].toString(),
status: enums.AttributeStatus.values
.firstWhere((e) => e.value == map['status']),
error: map['error'].toString(),
xrequired: map['required'],
array: map['array'],
$createdAt: map['\$createdAt'].toString(),
$updatedAt: map['\$updatedAt'].toString(),
elements: List.from(map['elements'] ?? []),
format: map['format'].toString(),
xdefault: map['default']?.toString(),
);
}
factory AttributeEnum.fromMap(Map<String, dynamic> map) {
return AttributeEnum(
key: map['key'].toString(),
type: map['type'].toString(),
status: enums.AttributeStatus.values.firstWhere((e) => e.value == map['status']),
error: map['error'].toString(),
xrequired: map['required'],
array: map['array'],
$createdAt: map['\$createdAt'].toString(),
$updatedAt: map['\$updatedAt'].toString(),
elements: List.from(map['elements'] ?? []),
format: map['format'].toString(),
xdefault: map['default']?.toString(),
);
}
@override
Map<String, dynamic> toMap() {
return {
"key": key,
"type": type,
"status": status.value,
"error": error,
"required": xrequired,
"array": array,
"\$createdAt": $createdAt,
"\$updatedAt": $updatedAt,
"elements": elements,
"format": format,
"default": xdefault,
};
}
@override
Map<String, dynamic> toMap() {
return {
"key": key,
"type": type,
"status": status.value,
"error": error,
"required": xrequired,
"array": array,
"\$createdAt": $createdAt,
"\$updatedAt": $updatedAt,
"elements": elements,
"format": format,
"default": xdefault,
};
}
}
+66 -67
View File
@@ -2,84 +2,83 @@ part of '../../models.dart';
/// AttributeFloat
class AttributeFloat implements Model {
/// Attribute Key.
final String key;
/// Attribute Key.
final String key;
/// Attribute type.
final String type;
/// Attribute type.
final String type;
/// Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`
final enums.AttributeStatus status;
/// Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`
final enums.AttributeStatus status;
/// Error message. Displays error generated on failure of creating or deleting an attribute.
final String error;
/// Error message. Displays error generated on failure of creating or deleting an attribute.
final String error;
/// Is attribute required?
final bool xrequired;
/// Is attribute required?
final bool xrequired;
/// Is attribute an array?
final bool? array;
/// Is attribute an array?
final bool? array;
/// Attribute creation date in ISO 8601 format.
final String $createdAt;
/// Attribute creation date in ISO 8601 format.
final String $createdAt;
/// Attribute update date in ISO 8601 format.
final String $updatedAt;
/// Attribute update date in ISO 8601 format.
final String $updatedAt;
/// Minimum value to enforce for new documents.
final double? min;
/// Minimum value to enforce for new documents.
final double? min;
/// Maximum value to enforce for new documents.
final double? max;
/// Maximum value to enforce for new documents.
final double? max;
/// Default value for attribute when not provided. Cannot be set when attribute is required.
final double? xdefault;
/// Default value for attribute when not provided. Cannot be set when attribute is required.
final double? xdefault;
AttributeFloat({
required this.key,
required this.type,
required this.status,
required this.error,
required this.xrequired,
this.array,
required this.$createdAt,
required this.$updatedAt,
this.min,
this.max,
this.xdefault,
});
AttributeFloat({
required this.key,
required this.type,
required this.status,
required this.error,
required this.xrequired,
this.array,
required this.$createdAt,
required this.$updatedAt,
this.min,
this.max,
this.xdefault,
});
factory AttributeFloat.fromMap(Map<String, dynamic> map) {
return AttributeFloat(
key: map['key'].toString(),
type: map['type'].toString(),
status: enums.AttributeStatus.values
.firstWhere((e) => e.value == map['status']),
error: map['error'].toString(),
xrequired: map['required'],
array: map['array'],
$createdAt: map['\$createdAt'].toString(),
$updatedAt: map['\$updatedAt'].toString(),
min: map['min']?.toDouble(),
max: map['max']?.toDouble(),
xdefault: map['default']?.toDouble(),
);
}
factory AttributeFloat.fromMap(Map<String, dynamic> map) {
return AttributeFloat(
key: map['key'].toString(),
type: map['type'].toString(),
status: enums.AttributeStatus.values.firstWhere((e) => e.value == map['status']),
error: map['error'].toString(),
xrequired: map['required'],
array: map['array'],
$createdAt: map['\$createdAt'].toString(),
$updatedAt: map['\$updatedAt'].toString(),
min: map['min']?.toDouble(),
max: map['max']?.toDouble(),
xdefault: map['default']?.toDouble(),
);
}
@override
Map<String, dynamic> toMap() {
return {
"key": key,
"type": type,
"status": status.value,
"error": error,
"required": xrequired,
"array": array,
"\$createdAt": $createdAt,
"\$updatedAt": $updatedAt,
"min": min,
"max": max,
"default": xdefault,
};
}
@override
Map<String, dynamic> toMap() {
return {
"key": key,
"type": type,
"status": status.value,
"error": error,
"required": xrequired,
"array": array,
"\$createdAt": $createdAt,
"\$updatedAt": $updatedAt,
"min": min,
"max": max,
"default": xdefault,
};
}
}
+66 -67
View File
@@ -2,84 +2,83 @@ part of '../../models.dart';
/// AttributeInteger
class AttributeInteger implements Model {
/// Attribute Key.
final String key;
/// Attribute Key.
final String key;
/// Attribute type.
final String type;
/// Attribute type.
final String type;
/// Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`
final enums.AttributeStatus status;
/// Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`
final enums.AttributeStatus status;
/// Error message. Displays error generated on failure of creating or deleting an attribute.
final String error;
/// Error message. Displays error generated on failure of creating or deleting an attribute.
final String error;
/// Is attribute required?
final bool xrequired;
/// Is attribute required?
final bool xrequired;
/// Is attribute an array?
final bool? array;
/// Is attribute an array?
final bool? array;
/// Attribute creation date in ISO 8601 format.
final String $createdAt;
/// Attribute creation date in ISO 8601 format.
final String $createdAt;
/// Attribute update date in ISO 8601 format.
final String $updatedAt;
/// Attribute update date in ISO 8601 format.
final String $updatedAt;
/// Minimum value to enforce for new documents.
final int? min;
/// Minimum value to enforce for new documents.
final int? min;
/// Maximum value to enforce for new documents.
final int? max;
/// Maximum value to enforce for new documents.
final int? max;
/// Default value for attribute when not provided. Cannot be set when attribute is required.
final int? xdefault;
/// Default value for attribute when not provided. Cannot be set when attribute is required.
final int? xdefault;
AttributeInteger({
required this.key,
required this.type,
required this.status,
required this.error,
required this.xrequired,
this.array,
required this.$createdAt,
required this.$updatedAt,
this.min,
this.max,
this.xdefault,
});
AttributeInteger({
required this.key,
required this.type,
required this.status,
required this.error,
required this.xrequired,
this.array,
required this.$createdAt,
required this.$updatedAt,
this.min,
this.max,
this.xdefault,
});
factory AttributeInteger.fromMap(Map<String, dynamic> map) {
return AttributeInteger(
key: map['key'].toString(),
type: map['type'].toString(),
status: enums.AttributeStatus.values
.firstWhere((e) => e.value == map['status']),
error: map['error'].toString(),
xrequired: map['required'],
array: map['array'],
$createdAt: map['\$createdAt'].toString(),
$updatedAt: map['\$updatedAt'].toString(),
min: map['min'],
max: map['max'],
xdefault: map['default'],
);
}
factory AttributeInteger.fromMap(Map<String, dynamic> map) {
return AttributeInteger(
key: map['key'].toString(),
type: map['type'].toString(),
status: enums.AttributeStatus.values.firstWhere((e) => e.value == map['status']),
error: map['error'].toString(),
xrequired: map['required'],
array: map['array'],
$createdAt: map['\$createdAt'].toString(),
$updatedAt: map['\$updatedAt'].toString(),
min: map['min'],
max: map['max'],
xdefault: map['default'],
);
}
@override
Map<String, dynamic> toMap() {
return {
"key": key,
"type": type,
"status": status.value,
"error": error,
"required": xrequired,
"array": array,
"\$createdAt": $createdAt,
"\$updatedAt": $updatedAt,
"min": min,
"max": max,
"default": xdefault,
};
}
@override
Map<String, dynamic> toMap() {
return {
"key": key,
"type": type,
"status": status.value,
"error": error,
"required": xrequired,
"array": array,
"\$createdAt": $createdAt,
"\$updatedAt": $updatedAt,
"min": min,
"max": max,
"default": xdefault,
};
}
}
+61 -62
View File
@@ -2,78 +2,77 @@ part of '../../models.dart';
/// AttributeIP
class AttributeIp implements Model {
/// Attribute Key.
final String key;
/// Attribute Key.
final String key;
/// Attribute type.
final String type;
/// Attribute type.
final String type;
/// Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`
final enums.AttributeStatus status;
/// Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`
final enums.AttributeStatus status;
/// Error message. Displays error generated on failure of creating or deleting an attribute.
final String error;
/// Error message. Displays error generated on failure of creating or deleting an attribute.
final String error;
/// Is attribute required?
final bool xrequired;
/// Is attribute required?
final bool xrequired;
/// Is attribute an array?
final bool? array;
/// Is attribute an array?
final bool? array;
/// Attribute creation date in ISO 8601 format.
final String $createdAt;
/// Attribute creation date in ISO 8601 format.
final String $createdAt;
/// Attribute update date in ISO 8601 format.
final String $updatedAt;
/// Attribute update date in ISO 8601 format.
final String $updatedAt;
/// String format.
final String format;
/// String format.
final String format;
/// Default value for attribute when not provided. Cannot be set when attribute is required.
final String? xdefault;
/// Default value for attribute when not provided. Cannot be set when attribute is required.
final String? xdefault;
AttributeIp({
required this.key,
required this.type,
required this.status,
required this.error,
required this.xrequired,
this.array,
required this.$createdAt,
required this.$updatedAt,
required this.format,
this.xdefault,
});
AttributeIp({
required this.key,
required this.type,
required this.status,
required this.error,
required this.xrequired,
this.array,
required this.$createdAt,
required this.$updatedAt,
required this.format,
this.xdefault,
});
factory AttributeIp.fromMap(Map<String, dynamic> map) {
return AttributeIp(
key: map['key'].toString(),
type: map['type'].toString(),
status: enums.AttributeStatus.values
.firstWhere((e) => e.value == map['status']),
error: map['error'].toString(),
xrequired: map['required'],
array: map['array'],
$createdAt: map['\$createdAt'].toString(),
$updatedAt: map['\$updatedAt'].toString(),
format: map['format'].toString(),
xdefault: map['default']?.toString(),
);
}
factory AttributeIp.fromMap(Map<String, dynamic> map) {
return AttributeIp(
key: map['key'].toString(),
type: map['type'].toString(),
status: enums.AttributeStatus.values.firstWhere((e) => e.value == map['status']),
error: map['error'].toString(),
xrequired: map['required'],
array: map['array'],
$createdAt: map['\$createdAt'].toString(),
$updatedAt: map['\$updatedAt'].toString(),
format: map['format'].toString(),
xdefault: map['default']?.toString(),
);
}
@override
Map<String, dynamic> toMap() {
return {
"key": key,
"type": type,
"status": status.value,
"error": error,
"required": xrequired,
"array": array,
"\$createdAt": $createdAt,
"\$updatedAt": $updatedAt,
"format": format,
"default": xdefault,
};
}
@override
Map<String, dynamic> toMap() {
return {
"key": key,
"type": type,
"status": status.value,
"error": error,
"required": xrequired,
"array": array,
"\$createdAt": $createdAt,
"\$updatedAt": $updatedAt,
"format": format,
"default": xdefault,
};
}
}
+56 -57
View File
@@ -2,72 +2,71 @@ part of '../../models.dart';
/// AttributeLine
class AttributeLine implements Model {
/// Attribute Key.
final String key;
/// Attribute Key.
final String key;
/// Attribute type.
final String type;
/// Attribute type.
final String type;
/// Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`
final enums.AttributeStatus status;
/// Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`
final enums.AttributeStatus status;
/// Error message. Displays error generated on failure of creating or deleting an attribute.
final String error;
/// Error message. Displays error generated on failure of creating or deleting an attribute.
final String error;
/// Is attribute required?
final bool xrequired;
/// Is attribute required?
final bool xrequired;
/// Is attribute an array?
final bool? array;
/// Is attribute an array?
final bool? array;
/// Attribute creation date in ISO 8601 format.
final String $createdAt;
/// Attribute creation date in ISO 8601 format.
final String $createdAt;
/// Attribute update date in ISO 8601 format.
final String $updatedAt;
/// Attribute update date in ISO 8601 format.
final String $updatedAt;
/// Default value for attribute when not provided. Cannot be set when attribute is required.
final List? xdefault;
/// Default value for attribute when not provided. Cannot be set when attribute is required.
final List? xdefault;
AttributeLine({
required this.key,
required this.type,
required this.status,
required this.error,
required this.xrequired,
this.array,
required this.$createdAt,
required this.$updatedAt,
this.xdefault,
});
AttributeLine({
required this.key,
required this.type,
required this.status,
required this.error,
required this.xrequired,
this.array,
required this.$createdAt,
required this.$updatedAt,
this.xdefault,
});
factory AttributeLine.fromMap(Map<String, dynamic> map) {
return AttributeLine(
key: map['key'].toString(),
type: map['type'].toString(),
status: enums.AttributeStatus.values
.firstWhere((e) => e.value == map['status']),
error: map['error'].toString(),
xrequired: map['required'],
array: map['array'],
$createdAt: map['\$createdAt'].toString(),
$updatedAt: map['\$updatedAt'].toString(),
xdefault: List.from(map['default'] ?? []),
);
}
factory AttributeLine.fromMap(Map<String, dynamic> map) {
return AttributeLine(
key: map['key'].toString(),
type: map['type'].toString(),
status: enums.AttributeStatus.values.firstWhere((e) => e.value == map['status']),
error: map['error'].toString(),
xrequired: map['required'],
array: map['array'],
$createdAt: map['\$createdAt'].toString(),
$updatedAt: map['\$updatedAt'].toString(),
xdefault: List.from(map['default'] ?? []),
);
}
@override
Map<String, dynamic> toMap() {
return {
"key": key,
"type": type,
"status": status.value,
"error": error,
"required": xrequired,
"array": array,
"\$createdAt": $createdAt,
"\$updatedAt": $updatedAt,
"default": xdefault,
};
}
@override
Map<String, dynamic> toMap() {
return {
"key": key,
"type": type,
"status": status.value,
"error": error,
"required": xrequired,
"array": array,
"\$createdAt": $createdAt,
"\$updatedAt": $updatedAt,
"default": xdefault,
};
}
}
+21 -21
View File
@@ -2,29 +2,29 @@ part of '../../models.dart';
/// Attributes List
class AttributeList implements Model {
/// Total number of attributes in the given collection.
final int total;
/// Total number of attributes in the given collection.
final int total;
/// List of attributes.
final List attributes;
/// List of attributes.
final List attributes;
AttributeList({
required this.total,
required this.attributes,
});
AttributeList({
required this.total,
required this.attributes,
});
factory AttributeList.fromMap(Map<String, dynamic> map) {
return AttributeList(
total: map['total'],
attributes: List.from(map['attributes'] ?? []),
);
}
factory AttributeList.fromMap(Map<String, dynamic> map) {
return AttributeList(
total: map['total'],
attributes: List.from(map['attributes'] ?? []),
);
}
@override
Map<String, dynamic> toMap() {
return {
"total": total,
"attributes": attributes,
};
}
@override
Map<String, dynamic> toMap() {
return {
"total": total,
"attributes": attributes,
};
}
}
+61 -62
View File
@@ -2,78 +2,77 @@ part of '../../models.dart';
/// AttributeLongtext
class AttributeLongtext implements Model {
/// Attribute Key.
final String key;
/// Attribute Key.
final String key;
/// Attribute type.
final String type;
/// Attribute type.
final String type;
/// Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`
final enums.AttributeStatus status;
/// Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`
final enums.AttributeStatus status;
/// Error message. Displays error generated on failure of creating or deleting an attribute.
final String error;
/// Error message. Displays error generated on failure of creating or deleting an attribute.
final String error;
/// Is attribute required?
final bool xrequired;
/// Is attribute required?
final bool xrequired;
/// Is attribute an array?
final bool? array;
/// Is attribute an array?
final bool? array;
/// Attribute creation date in ISO 8601 format.
final String $createdAt;
/// Attribute creation date in ISO 8601 format.
final String $createdAt;
/// Attribute update date in ISO 8601 format.
final String $updatedAt;
/// Attribute update date in ISO 8601 format.
final String $updatedAt;
/// Default value for attribute when not provided. Cannot be set when attribute is required.
final String? xdefault;
/// Default value for attribute when not provided. Cannot be set when attribute is required.
final String? xdefault;
/// Defines whether this attribute is encrypted or not.
final bool? encrypt;
/// Defines whether this attribute is encrypted or not.
final bool? encrypt;
AttributeLongtext({
required this.key,
required this.type,
required this.status,
required this.error,
required this.xrequired,
this.array,
required this.$createdAt,
required this.$updatedAt,
this.xdefault,
this.encrypt,
});
AttributeLongtext({
required this.key,
required this.type,
required this.status,
required this.error,
required this.xrequired,
this.array,
required this.$createdAt,
required this.$updatedAt,
this.xdefault,
this.encrypt,
});
factory AttributeLongtext.fromMap(Map<String, dynamic> map) {
return AttributeLongtext(
key: map['key'].toString(),
type: map['type'].toString(),
status: enums.AttributeStatus.values
.firstWhere((e) => e.value == map['status']),
error: map['error'].toString(),
xrequired: map['required'],
array: map['array'],
$createdAt: map['\$createdAt'].toString(),
$updatedAt: map['\$updatedAt'].toString(),
xdefault: map['default']?.toString(),
encrypt: map['encrypt'],
);
}
factory AttributeLongtext.fromMap(Map<String, dynamic> map) {
return AttributeLongtext(
key: map['key'].toString(),
type: map['type'].toString(),
status: enums.AttributeStatus.values.firstWhere((e) => e.value == map['status']),
error: map['error'].toString(),
xrequired: map['required'],
array: map['array'],
$createdAt: map['\$createdAt'].toString(),
$updatedAt: map['\$updatedAt'].toString(),
xdefault: map['default']?.toString(),
encrypt: map['encrypt'],
);
}
@override
Map<String, dynamic> toMap() {
return {
"key": key,
"type": type,
"status": status.value,
"error": error,
"required": xrequired,
"array": array,
"\$createdAt": $createdAt,
"\$updatedAt": $updatedAt,
"default": xdefault,
"encrypt": encrypt,
};
}
@override
Map<String, dynamic> toMap() {
return {
"key": key,
"type": type,
"status": status.value,
"error": error,
"required": xrequired,
"array": array,
"\$createdAt": $createdAt,
"\$updatedAt": $updatedAt,
"default": xdefault,
"encrypt": encrypt,
};
}
}
+61 -62
View File
@@ -2,78 +2,77 @@ part of '../../models.dart';
/// AttributeMediumtext
class AttributeMediumtext implements Model {
/// Attribute Key.
final String key;
/// Attribute Key.
final String key;
/// Attribute type.
final String type;
/// Attribute type.
final String type;
/// Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`
final enums.AttributeStatus status;
/// Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`
final enums.AttributeStatus status;
/// Error message. Displays error generated on failure of creating or deleting an attribute.
final String error;
/// Error message. Displays error generated on failure of creating or deleting an attribute.
final String error;
/// Is attribute required?
final bool xrequired;
/// Is attribute required?
final bool xrequired;
/// Is attribute an array?
final bool? array;
/// Is attribute an array?
final bool? array;
/// Attribute creation date in ISO 8601 format.
final String $createdAt;
/// Attribute creation date in ISO 8601 format.
final String $createdAt;
/// Attribute update date in ISO 8601 format.
final String $updatedAt;
/// Attribute update date in ISO 8601 format.
final String $updatedAt;
/// Default value for attribute when not provided. Cannot be set when attribute is required.
final String? xdefault;
/// Default value for attribute when not provided. Cannot be set when attribute is required.
final String? xdefault;
/// Defines whether this attribute is encrypted or not.
final bool? encrypt;
/// Defines whether this attribute is encrypted or not.
final bool? encrypt;
AttributeMediumtext({
required this.key,
required this.type,
required this.status,
required this.error,
required this.xrequired,
this.array,
required this.$createdAt,
required this.$updatedAt,
this.xdefault,
this.encrypt,
});
AttributeMediumtext({
required this.key,
required this.type,
required this.status,
required this.error,
required this.xrequired,
this.array,
required this.$createdAt,
required this.$updatedAt,
this.xdefault,
this.encrypt,
});
factory AttributeMediumtext.fromMap(Map<String, dynamic> map) {
return AttributeMediumtext(
key: map['key'].toString(),
type: map['type'].toString(),
status: enums.AttributeStatus.values
.firstWhere((e) => e.value == map['status']),
error: map['error'].toString(),
xrequired: map['required'],
array: map['array'],
$createdAt: map['\$createdAt'].toString(),
$updatedAt: map['\$updatedAt'].toString(),
xdefault: map['default']?.toString(),
encrypt: map['encrypt'],
);
}
factory AttributeMediumtext.fromMap(Map<String, dynamic> map) {
return AttributeMediumtext(
key: map['key'].toString(),
type: map['type'].toString(),
status: enums.AttributeStatus.values.firstWhere((e) => e.value == map['status']),
error: map['error'].toString(),
xrequired: map['required'],
array: map['array'],
$createdAt: map['\$createdAt'].toString(),
$updatedAt: map['\$updatedAt'].toString(),
xdefault: map['default']?.toString(),
encrypt: map['encrypt'],
);
}
@override
Map<String, dynamic> toMap() {
return {
"key": key,
"type": type,
"status": status.value,
"error": error,
"required": xrequired,
"array": array,
"\$createdAt": $createdAt,
"\$updatedAt": $updatedAt,
"default": xdefault,
"encrypt": encrypt,
};
}
@override
Map<String, dynamic> toMap() {
return {
"key": key,
"type": type,
"status": status.value,
"error": error,
"required": xrequired,
"array": array,
"\$createdAt": $createdAt,
"\$updatedAt": $updatedAt,
"default": xdefault,
"encrypt": encrypt,
};
}
}
+56 -57
View File
@@ -2,72 +2,71 @@ part of '../../models.dart';
/// AttributePoint
class AttributePoint implements Model {
/// Attribute Key.
final String key;
/// Attribute Key.
final String key;
/// Attribute type.
final String type;
/// Attribute type.
final String type;
/// Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`
final enums.AttributeStatus status;
/// Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`
final enums.AttributeStatus status;
/// Error message. Displays error generated on failure of creating or deleting an attribute.
final String error;
/// Error message. Displays error generated on failure of creating or deleting an attribute.
final String error;
/// Is attribute required?
final bool xrequired;
/// Is attribute required?
final bool xrequired;
/// Is attribute an array?
final bool? array;
/// Is attribute an array?
final bool? array;
/// Attribute creation date in ISO 8601 format.
final String $createdAt;
/// Attribute creation date in ISO 8601 format.
final String $createdAt;
/// Attribute update date in ISO 8601 format.
final String $updatedAt;
/// Attribute update date in ISO 8601 format.
final String $updatedAt;
/// Default value for attribute when not provided. Cannot be set when attribute is required.
final List? xdefault;
/// Default value for attribute when not provided. Cannot be set when attribute is required.
final List? xdefault;
AttributePoint({
required this.key,
required this.type,
required this.status,
required this.error,
required this.xrequired,
this.array,
required this.$createdAt,
required this.$updatedAt,
this.xdefault,
});
AttributePoint({
required this.key,
required this.type,
required this.status,
required this.error,
required this.xrequired,
this.array,
required this.$createdAt,
required this.$updatedAt,
this.xdefault,
});
factory AttributePoint.fromMap(Map<String, dynamic> map) {
return AttributePoint(
key: map['key'].toString(),
type: map['type'].toString(),
status: enums.AttributeStatus.values
.firstWhere((e) => e.value == map['status']),
error: map['error'].toString(),
xrequired: map['required'],
array: map['array'],
$createdAt: map['\$createdAt'].toString(),
$updatedAt: map['\$updatedAt'].toString(),
xdefault: List.from(map['default'] ?? []),
);
}
factory AttributePoint.fromMap(Map<String, dynamic> map) {
return AttributePoint(
key: map['key'].toString(),
type: map['type'].toString(),
status: enums.AttributeStatus.values.firstWhere((e) => e.value == map['status']),
error: map['error'].toString(),
xrequired: map['required'],
array: map['array'],
$createdAt: map['\$createdAt'].toString(),
$updatedAt: map['\$updatedAt'].toString(),
xdefault: List.from(map['default'] ?? []),
);
}
@override
Map<String, dynamic> toMap() {
return {
"key": key,
"type": type,
"status": status.value,
"error": error,
"required": xrequired,
"array": array,
"\$createdAt": $createdAt,
"\$updatedAt": $updatedAt,
"default": xdefault,
};
}
@override
Map<String, dynamic> toMap() {
return {
"key": key,
"type": type,
"status": status.value,
"error": error,
"required": xrequired,
"array": array,
"\$createdAt": $createdAt,
"\$updatedAt": $updatedAt,
"default": xdefault,
};
}
}
+56 -57
View File
@@ -2,72 +2,71 @@ part of '../../models.dart';
/// AttributePolygon
class AttributePolygon implements Model {
/// Attribute Key.
final String key;
/// Attribute Key.
final String key;
/// Attribute type.
final String type;
/// Attribute type.
final String type;
/// Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`
final enums.AttributeStatus status;
/// Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`
final enums.AttributeStatus status;
/// Error message. Displays error generated on failure of creating or deleting an attribute.
final String error;
/// Error message. Displays error generated on failure of creating or deleting an attribute.
final String error;
/// Is attribute required?
final bool xrequired;
/// Is attribute required?
final bool xrequired;
/// Is attribute an array?
final bool? array;
/// Is attribute an array?
final bool? array;
/// Attribute creation date in ISO 8601 format.
final String $createdAt;
/// Attribute creation date in ISO 8601 format.
final String $createdAt;
/// Attribute update date in ISO 8601 format.
final String $updatedAt;
/// Attribute update date in ISO 8601 format.
final String $updatedAt;
/// Default value for attribute when not provided. Cannot be set when attribute is required.
final List? xdefault;
/// Default value for attribute when not provided. Cannot be set when attribute is required.
final List? xdefault;
AttributePolygon({
required this.key,
required this.type,
required this.status,
required this.error,
required this.xrequired,
this.array,
required this.$createdAt,
required this.$updatedAt,
this.xdefault,
});
AttributePolygon({
required this.key,
required this.type,
required this.status,
required this.error,
required this.xrequired,
this.array,
required this.$createdAt,
required this.$updatedAt,
this.xdefault,
});
factory AttributePolygon.fromMap(Map<String, dynamic> map) {
return AttributePolygon(
key: map['key'].toString(),
type: map['type'].toString(),
status: enums.AttributeStatus.values
.firstWhere((e) => e.value == map['status']),
error: map['error'].toString(),
xrequired: map['required'],
array: map['array'],
$createdAt: map['\$createdAt'].toString(),
$updatedAt: map['\$updatedAt'].toString(),
xdefault: List.from(map['default'] ?? []),
);
}
factory AttributePolygon.fromMap(Map<String, dynamic> map) {
return AttributePolygon(
key: map['key'].toString(),
type: map['type'].toString(),
status: enums.AttributeStatus.values.firstWhere((e) => e.value == map['status']),
error: map['error'].toString(),
xrequired: map['required'],
array: map['array'],
$createdAt: map['\$createdAt'].toString(),
$updatedAt: map['\$updatedAt'].toString(),
xdefault: List.from(map['default'] ?? []),
);
}
@override
Map<String, dynamic> toMap() {
return {
"key": key,
"type": type,
"status": status.value,
"error": error,
"required": xrequired,
"array": array,
"\$createdAt": $createdAt,
"\$updatedAt": $updatedAt,
"default": xdefault,
};
}
@override
Map<String, dynamic> toMap() {
return {
"key": key,
"type": type,
"status": status.value,
"error": error,
"required": xrequired,
"array": array,
"\$createdAt": $createdAt,
"\$updatedAt": $updatedAt,
"default": xdefault,
};
}
}
+81 -82
View File
@@ -2,102 +2,101 @@ part of '../../models.dart';
/// AttributeRelationship
class AttributeRelationship implements Model {
/// Attribute Key.
final String key;
/// Attribute Key.
final String key;
/// Attribute type.
final String type;
/// Attribute type.
final String type;
/// Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`
final enums.AttributeStatus status;
/// Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`
final enums.AttributeStatus status;
/// Error message. Displays error generated on failure of creating or deleting an attribute.
final String error;
/// Error message. Displays error generated on failure of creating or deleting an attribute.
final String error;
/// Is attribute required?
final bool xrequired;
/// Is attribute required?
final bool xrequired;
/// Is attribute an array?
final bool? array;
/// Is attribute an array?
final bool? array;
/// Attribute creation date in ISO 8601 format.
final String $createdAt;
/// Attribute creation date in ISO 8601 format.
final String $createdAt;
/// Attribute update date in ISO 8601 format.
final String $updatedAt;
/// Attribute update date in ISO 8601 format.
final String $updatedAt;
/// The ID of the related collection.
final String relatedCollection;
/// The ID of the related collection.
final String relatedCollection;
/// The type of the relationship.
final String relationType;
/// The type of the relationship.
final String relationType;
/// Is the relationship two-way?
final bool twoWay;
/// Is the relationship two-way?
final bool twoWay;
/// The key of the two-way relationship.
final String twoWayKey;
/// The key of the two-way relationship.
final String twoWayKey;
/// How deleting the parent document will propagate to child documents.
final String onDelete;
/// How deleting the parent document will propagate to child documents.
final String onDelete;
/// Whether this is the parent or child side of the relationship
final String side;
/// Whether this is the parent or child side of the relationship
final String side;
AttributeRelationship({
required this.key,
required this.type,
required this.status,
required this.error,
required this.xrequired,
this.array,
required this.$createdAt,
required this.$updatedAt,
required this.relatedCollection,
required this.relationType,
required this.twoWay,
required this.twoWayKey,
required this.onDelete,
required this.side,
});
AttributeRelationship({
required this.key,
required this.type,
required this.status,
required this.error,
required this.xrequired,
this.array,
required this.$createdAt,
required this.$updatedAt,
required this.relatedCollection,
required this.relationType,
required this.twoWay,
required this.twoWayKey,
required this.onDelete,
required this.side,
});
factory AttributeRelationship.fromMap(Map<String, dynamic> map) {
return AttributeRelationship(
key: map['key'].toString(),
type: map['type'].toString(),
status: enums.AttributeStatus.values
.firstWhere((e) => e.value == map['status']),
error: map['error'].toString(),
xrequired: map['required'],
array: map['array'],
$createdAt: map['\$createdAt'].toString(),
$updatedAt: map['\$updatedAt'].toString(),
relatedCollection: map['relatedCollection'].toString(),
relationType: map['relationType'].toString(),
twoWay: map['twoWay'],
twoWayKey: map['twoWayKey'].toString(),
onDelete: map['onDelete'].toString(),
side: map['side'].toString(),
);
}
factory AttributeRelationship.fromMap(Map<String, dynamic> map) {
return AttributeRelationship(
key: map['key'].toString(),
type: map['type'].toString(),
status: enums.AttributeStatus.values.firstWhere((e) => e.value == map['status']),
error: map['error'].toString(),
xrequired: map['required'],
array: map['array'],
$createdAt: map['\$createdAt'].toString(),
$updatedAt: map['\$updatedAt'].toString(),
relatedCollection: map['relatedCollection'].toString(),
relationType: map['relationType'].toString(),
twoWay: map['twoWay'],
twoWayKey: map['twoWayKey'].toString(),
onDelete: map['onDelete'].toString(),
side: map['side'].toString(),
);
}
@override
Map<String, dynamic> toMap() {
return {
"key": key,
"type": type,
"status": status.value,
"error": error,
"required": xrequired,
"array": array,
"\$createdAt": $createdAt,
"\$updatedAt": $updatedAt,
"relatedCollection": relatedCollection,
"relationType": relationType,
"twoWay": twoWay,
"twoWayKey": twoWayKey,
"onDelete": onDelete,
"side": side,
};
}
@override
Map<String, dynamic> toMap() {
return {
"key": key,
"type": type,
"status": status.value,
"error": error,
"required": xrequired,
"array": array,
"\$createdAt": $createdAt,
"\$updatedAt": $updatedAt,
"relatedCollection": relatedCollection,
"relationType": relationType,
"twoWay": twoWay,
"twoWayKey": twoWayKey,
"onDelete": onDelete,
"side": side,
};
}
}
+66 -67
View File
@@ -2,84 +2,83 @@ part of '../../models.dart';
/// AttributeString
class AttributeString implements Model {
/// Attribute Key.
final String key;
/// Attribute Key.
final String key;
/// Attribute type.
final String type;
/// Attribute type.
final String type;
/// Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`
final enums.AttributeStatus status;
/// Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`
final enums.AttributeStatus status;
/// Error message. Displays error generated on failure of creating or deleting an attribute.
final String error;
/// Error message. Displays error generated on failure of creating or deleting an attribute.
final String error;
/// Is attribute required?
final bool xrequired;
/// Is attribute required?
final bool xrequired;
/// Is attribute an array?
final bool? array;
/// Is attribute an array?
final bool? array;
/// Attribute creation date in ISO 8601 format.
final String $createdAt;
/// Attribute creation date in ISO 8601 format.
final String $createdAt;
/// Attribute update date in ISO 8601 format.
final String $updatedAt;
/// Attribute update date in ISO 8601 format.
final String $updatedAt;
/// Attribute size.
final int size;
/// Attribute size.
final int size;
/// Default value for attribute when not provided. Cannot be set when attribute is required.
final String? xdefault;
/// Default value for attribute when not provided. Cannot be set when attribute is required.
final String? xdefault;
/// Defines whether this attribute is encrypted or not.
final bool? encrypt;
/// Defines whether this attribute is encrypted or not.
final bool? encrypt;
AttributeString({
required this.key,
required this.type,
required this.status,
required this.error,
required this.xrequired,
this.array,
required this.$createdAt,
required this.$updatedAt,
required this.size,
this.xdefault,
this.encrypt,
});
AttributeString({
required this.key,
required this.type,
required this.status,
required this.error,
required this.xrequired,
this.array,
required this.$createdAt,
required this.$updatedAt,
required this.size,
this.xdefault,
this.encrypt,
});
factory AttributeString.fromMap(Map<String, dynamic> map) {
return AttributeString(
key: map['key'].toString(),
type: map['type'].toString(),
status: enums.AttributeStatus.values
.firstWhere((e) => e.value == map['status']),
error: map['error'].toString(),
xrequired: map['required'],
array: map['array'],
$createdAt: map['\$createdAt'].toString(),
$updatedAt: map['\$updatedAt'].toString(),
size: map['size'],
xdefault: map['default']?.toString(),
encrypt: map['encrypt'],
);
}
factory AttributeString.fromMap(Map<String, dynamic> map) {
return AttributeString(
key: map['key'].toString(),
type: map['type'].toString(),
status: enums.AttributeStatus.values.firstWhere((e) => e.value == map['status']),
error: map['error'].toString(),
xrequired: map['required'],
array: map['array'],
$createdAt: map['\$createdAt'].toString(),
$updatedAt: map['\$updatedAt'].toString(),
size: map['size'],
xdefault: map['default']?.toString(),
encrypt: map['encrypt'],
);
}
@override
Map<String, dynamic> toMap() {
return {
"key": key,
"type": type,
"status": status.value,
"error": error,
"required": xrequired,
"array": array,
"\$createdAt": $createdAt,
"\$updatedAt": $updatedAt,
"size": size,
"default": xdefault,
"encrypt": encrypt,
};
}
@override
Map<String, dynamic> toMap() {
return {
"key": key,
"type": type,
"status": status.value,
"error": error,
"required": xrequired,
"array": array,
"\$createdAt": $createdAt,
"\$updatedAt": $updatedAt,
"size": size,
"default": xdefault,
"encrypt": encrypt,
};
}
}
+61 -62
View File
@@ -2,78 +2,77 @@ part of '../../models.dart';
/// AttributeText
class AttributeText implements Model {
/// Attribute Key.
final String key;
/// Attribute Key.
final String key;
/// Attribute type.
final String type;
/// Attribute type.
final String type;
/// Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`
final enums.AttributeStatus status;
/// Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`
final enums.AttributeStatus status;
/// Error message. Displays error generated on failure of creating or deleting an attribute.
final String error;
/// Error message. Displays error generated on failure of creating or deleting an attribute.
final String error;
/// Is attribute required?
final bool xrequired;
/// Is attribute required?
final bool xrequired;
/// Is attribute an array?
final bool? array;
/// Is attribute an array?
final bool? array;
/// Attribute creation date in ISO 8601 format.
final String $createdAt;
/// Attribute creation date in ISO 8601 format.
final String $createdAt;
/// Attribute update date in ISO 8601 format.
final String $updatedAt;
/// Attribute update date in ISO 8601 format.
final String $updatedAt;
/// Default value for attribute when not provided. Cannot be set when attribute is required.
final String? xdefault;
/// Default value for attribute when not provided. Cannot be set when attribute is required.
final String? xdefault;
/// Defines whether this attribute is encrypted or not.
final bool? encrypt;
/// Defines whether this attribute is encrypted or not.
final bool? encrypt;
AttributeText({
required this.key,
required this.type,
required this.status,
required this.error,
required this.xrequired,
this.array,
required this.$createdAt,
required this.$updatedAt,
this.xdefault,
this.encrypt,
});
AttributeText({
required this.key,
required this.type,
required this.status,
required this.error,
required this.xrequired,
this.array,
required this.$createdAt,
required this.$updatedAt,
this.xdefault,
this.encrypt,
});
factory AttributeText.fromMap(Map<String, dynamic> map) {
return AttributeText(
key: map['key'].toString(),
type: map['type'].toString(),
status: enums.AttributeStatus.values
.firstWhere((e) => e.value == map['status']),
error: map['error'].toString(),
xrequired: map['required'],
array: map['array'],
$createdAt: map['\$createdAt'].toString(),
$updatedAt: map['\$updatedAt'].toString(),
xdefault: map['default']?.toString(),
encrypt: map['encrypt'],
);
}
factory AttributeText.fromMap(Map<String, dynamic> map) {
return AttributeText(
key: map['key'].toString(),
type: map['type'].toString(),
status: enums.AttributeStatus.values.firstWhere((e) => e.value == map['status']),
error: map['error'].toString(),
xrequired: map['required'],
array: map['array'],
$createdAt: map['\$createdAt'].toString(),
$updatedAt: map['\$updatedAt'].toString(),
xdefault: map['default']?.toString(),
encrypt: map['encrypt'],
);
}
@override
Map<String, dynamic> toMap() {
return {
"key": key,
"type": type,
"status": status.value,
"error": error,
"required": xrequired,
"array": array,
"\$createdAt": $createdAt,
"\$updatedAt": $updatedAt,
"default": xdefault,
"encrypt": encrypt,
};
}
@override
Map<String, dynamic> toMap() {
return {
"key": key,
"type": type,
"status": status.value,
"error": error,
"required": xrequired,
"array": array,
"\$createdAt": $createdAt,
"\$updatedAt": $updatedAt,
"default": xdefault,
"encrypt": encrypt,
};
}
}
+61 -62
View File
@@ -2,78 +2,77 @@ part of '../../models.dart';
/// AttributeURL
class AttributeUrl implements Model {
/// Attribute Key.
final String key;
/// Attribute Key.
final String key;
/// Attribute type.
final String type;
/// Attribute type.
final String type;
/// Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`
final enums.AttributeStatus status;
/// Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`
final enums.AttributeStatus status;
/// Error message. Displays error generated on failure of creating or deleting an attribute.
final String error;
/// Error message. Displays error generated on failure of creating or deleting an attribute.
final String error;
/// Is attribute required?
final bool xrequired;
/// Is attribute required?
final bool xrequired;
/// Is attribute an array?
final bool? array;
/// Is attribute an array?
final bool? array;
/// Attribute creation date in ISO 8601 format.
final String $createdAt;
/// Attribute creation date in ISO 8601 format.
final String $createdAt;
/// Attribute update date in ISO 8601 format.
final String $updatedAt;
/// Attribute update date in ISO 8601 format.
final String $updatedAt;
/// String format.
final String format;
/// String format.
final String format;
/// Default value for attribute when not provided. Cannot be set when attribute is required.
final String? xdefault;
/// Default value for attribute when not provided. Cannot be set when attribute is required.
final String? xdefault;
AttributeUrl({
required this.key,
required this.type,
required this.status,
required this.error,
required this.xrequired,
this.array,
required this.$createdAt,
required this.$updatedAt,
required this.format,
this.xdefault,
});
AttributeUrl({
required this.key,
required this.type,
required this.status,
required this.error,
required this.xrequired,
this.array,
required this.$createdAt,
required this.$updatedAt,
required this.format,
this.xdefault,
});
factory AttributeUrl.fromMap(Map<String, dynamic> map) {
return AttributeUrl(
key: map['key'].toString(),
type: map['type'].toString(),
status: enums.AttributeStatus.values
.firstWhere((e) => e.value == map['status']),
error: map['error'].toString(),
xrequired: map['required'],
array: map['array'],
$createdAt: map['\$createdAt'].toString(),
$updatedAt: map['\$updatedAt'].toString(),
format: map['format'].toString(),
xdefault: map['default']?.toString(),
);
}
factory AttributeUrl.fromMap(Map<String, dynamic> map) {
return AttributeUrl(
key: map['key'].toString(),
type: map['type'].toString(),
status: enums.AttributeStatus.values.firstWhere((e) => e.value == map['status']),
error: map['error'].toString(),
xrequired: map['required'],
array: map['array'],
$createdAt: map['\$createdAt'].toString(),
$updatedAt: map['\$updatedAt'].toString(),
format: map['format'].toString(),
xdefault: map['default']?.toString(),
);
}
@override
Map<String, dynamic> toMap() {
return {
"key": key,
"type": type,
"status": status.value,
"error": error,
"required": xrequired,
"array": array,
"\$createdAt": $createdAt,
"\$updatedAt": $updatedAt,
"format": format,
"default": xdefault,
};
}
@override
Map<String, dynamic> toMap() {
return {
"key": key,
"type": type,
"status": status.value,
"error": error,
"required": xrequired,
"array": array,
"\$createdAt": $createdAt,
"\$updatedAt": $updatedAt,
"format": format,
"default": xdefault,
};
}
}
+66 -67
View File
@@ -2,84 +2,83 @@ part of '../../models.dart';
/// AttributeVarchar
class AttributeVarchar implements Model {
/// Attribute Key.
final String key;
/// Attribute Key.
final String key;
/// Attribute type.
final String type;
/// Attribute type.
final String type;
/// Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`
final enums.AttributeStatus status;
/// Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`
final enums.AttributeStatus status;
/// Error message. Displays error generated on failure of creating or deleting an attribute.
final String error;
/// Error message. Displays error generated on failure of creating or deleting an attribute.
final String error;
/// Is attribute required?
final bool xrequired;
/// Is attribute required?
final bool xrequired;
/// Is attribute an array?
final bool? array;
/// Is attribute an array?
final bool? array;
/// Attribute creation date in ISO 8601 format.
final String $createdAt;
/// Attribute creation date in ISO 8601 format.
final String $createdAt;
/// Attribute update date in ISO 8601 format.
final String $updatedAt;
/// Attribute update date in ISO 8601 format.
final String $updatedAt;
/// Attribute size.
final int size;
/// Attribute size.
final int size;
/// Default value for attribute when not provided. Cannot be set when attribute is required.
final String? xdefault;
/// Default value for attribute when not provided. Cannot be set when attribute is required.
final String? xdefault;
/// Defines whether this attribute is encrypted or not.
final bool? encrypt;
/// Defines whether this attribute is encrypted or not.
final bool? encrypt;
AttributeVarchar({
required this.key,
required this.type,
required this.status,
required this.error,
required this.xrequired,
this.array,
required this.$createdAt,
required this.$updatedAt,
required this.size,
this.xdefault,
this.encrypt,
});
AttributeVarchar({
required this.key,
required this.type,
required this.status,
required this.error,
required this.xrequired,
this.array,
required this.$createdAt,
required this.$updatedAt,
required this.size,
this.xdefault,
this.encrypt,
});
factory AttributeVarchar.fromMap(Map<String, dynamic> map) {
return AttributeVarchar(
key: map['key'].toString(),
type: map['type'].toString(),
status: enums.AttributeStatus.values
.firstWhere((e) => e.value == map['status']),
error: map['error'].toString(),
xrequired: map['required'],
array: map['array'],
$createdAt: map['\$createdAt'].toString(),
$updatedAt: map['\$updatedAt'].toString(),
size: map['size'],
xdefault: map['default']?.toString(),
encrypt: map['encrypt'],
);
}
factory AttributeVarchar.fromMap(Map<String, dynamic> map) {
return AttributeVarchar(
key: map['key'].toString(),
type: map['type'].toString(),
status: enums.AttributeStatus.values.firstWhere((e) => e.value == map['status']),
error: map['error'].toString(),
xrequired: map['required'],
array: map['array'],
$createdAt: map['\$createdAt'].toString(),
$updatedAt: map['\$updatedAt'].toString(),
size: map['size'],
xdefault: map['default']?.toString(),
encrypt: map['encrypt'],
);
}
@override
Map<String, dynamic> toMap() {
return {
"key": key,
"type": type,
"status": status.value,
"error": error,
"required": xrequired,
"array": array,
"\$createdAt": $createdAt,
"\$updatedAt": $updatedAt,
"size": size,
"default": xdefault,
"encrypt": encrypt,
};
}
@override
Map<String, dynamic> toMap() {
return {
"key": key,
"type": type,
"status": status.value,
"error": error,
"required": xrequired,
"array": array,
"\$createdAt": $createdAt,
"\$updatedAt": $updatedAt,
"size": size,
"default": xdefault,
"encrypt": encrypt,
};
}
}
+71 -71
View File
@@ -2,89 +2,89 @@ part of '../../models.dart';
/// Archive
class BackupArchive implements Model {
/// Archive ID.
final String $id;
/// Archive ID.
final String $id;
/// Archive creation time in ISO 8601 format.
final String $createdAt;
/// Archive creation time in ISO 8601 format.
final String $createdAt;
/// Archive update date in ISO 8601 format.
final String $updatedAt;
/// Archive update date in ISO 8601 format.
final String $updatedAt;
/// Archive policy ID.
final String policyId;
/// Archive policy ID.
final String policyId;
/// Archive size in bytes.
final int size;
/// Archive size in bytes.
final int size;
/// The status of the archive creation. Possible values: pending, processing, uploading, completed, failed.
final String status;
/// The status of the archive creation. Possible values: pending, processing, uploading, completed, failed.
final String status;
/// The backup start time.
final String startedAt;
/// The backup start time.
final String startedAt;
/// Migration ID.
final String migrationId;
/// Migration ID.
final String migrationId;
/// The services that are backed up by this archive.
final List<String> services;
/// The services that are backed up by this archive.
final List<String> services;
/// The resources that are backed up by this archive.
final List<String> resources;
/// The resources that are backed up by this archive.
final List<String> resources;
/// The resource ID to backup. Set only if this archive should backup a single resource.
final String? resourceId;
/// The resource ID to backup. Set only if this archive should backup a single resource.
final String? resourceId;
/// The resource type to backup. Set only if this archive should backup a single resource.
final String? resourceType;
/// The resource type to backup. Set only if this archive should backup a single resource.
final String? resourceType;
BackupArchive({
required this.$id,
required this.$createdAt,
required this.$updatedAt,
required this.policyId,
required this.size,
required this.status,
required this.startedAt,
required this.migrationId,
required this.services,
required this.resources,
this.resourceId,
this.resourceType,
});
BackupArchive({
required this.$id,
required this.$createdAt,
required this.$updatedAt,
required this.policyId,
required this.size,
required this.status,
required this.startedAt,
required this.migrationId,
required this.services,
required this.resources,
this.resourceId,
this.resourceType,
});
factory BackupArchive.fromMap(Map<String, dynamic> map) {
return BackupArchive(
$id: map['\$id'].toString(),
$createdAt: map['\$createdAt'].toString(),
$updatedAt: map['\$updatedAt'].toString(),
policyId: map['policyId'].toString(),
size: map['size'],
status: map['status'].toString(),
startedAt: map['startedAt'].toString(),
migrationId: map['migrationId'].toString(),
services: List.from(map['services'] ?? []),
resources: List.from(map['resources'] ?? []),
resourceId: map['resourceId']?.toString(),
resourceType: map['resourceType']?.toString(),
);
}
factory BackupArchive.fromMap(Map<String, dynamic> map) {
return BackupArchive(
$id: map['\$id'].toString(),
$createdAt: map['\$createdAt'].toString(),
$updatedAt: map['\$updatedAt'].toString(),
policyId: map['policyId'].toString(),
size: map['size'],
status: map['status'].toString(),
startedAt: map['startedAt'].toString(),
migrationId: map['migrationId'].toString(),
services: List.from(map['services'] ?? []),
resources: List.from(map['resources'] ?? []),
resourceId: map['resourceId']?.toString(),
resourceType: map['resourceType']?.toString(),
);
}
@override
Map<String, dynamic> toMap() {
return {
"\$id": $id,
"\$createdAt": $createdAt,
"\$updatedAt": $updatedAt,
"policyId": policyId,
"size": size,
"status": status,
"startedAt": startedAt,
"migrationId": migrationId,
"services": services,
"resources": resources,
"resourceId": resourceId,
"resourceType": resourceType,
};
}
@override
Map<String, dynamic> toMap() {
return {
"\$id": $id,
"\$createdAt": $createdAt,
"\$updatedAt": $updatedAt,
"policyId": policyId,
"size": size,
"status": status,
"startedAt": startedAt,
"migrationId": migrationId,
"services": services,
"resources": resources,
"resourceId": resourceId,
"resourceType": resourceType,
};
}
}

Some files were not shown because too many files have changed in this diff Show More