Skip to content

Commit ac00893

Browse files
committed
fix: model types
1 parent 172fbf5 commit ac00893

File tree

92 files changed

+570
-118
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

92 files changed

+570
-118
lines changed

lib/services/messaging.dart

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,9 @@ class Messaging extends Service {
6565

6666
/// Update email
6767
///
68-
/// Update an email message by its unique ID.
68+
/// Update an email message by its unique ID. This endpoint only works on
69+
/// messages that are in draft status. Messages that are already processing,
70+
/// sent, or failed cannot be updated.
6971
///
7072
Future<models.Message> updateEmail({required String messageId, List<String>? topics, List<String>? users, List<String>? targets, String? subject, String? content, bool? draft, bool? html, List<String>? cc, List<String>? bcc, String? scheduledAt, List<String>? attachments}) async {
7173
final String apiPath = '/messaging/messages/email/{messageId}'.replaceAll('{messageId}', messageId);
@@ -140,7 +142,9 @@ class Messaging extends Service {
140142

141143
/// Update push notification
142144
///
143-
/// Update a push notification by its unique ID.
145+
/// Update a push notification by its unique ID. This endpoint only works on
146+
/// messages that are in draft status. Messages that are already processing,
147+
/// sent, or failed cannot be updated.
144148
///
145149
Future<models.Message> updatePush({required String messageId, List<String>? topics, List<String>? users, List<String>? targets, String? title, String? body, Map? data, String? action, String? image, String? icon, String? sound, String? color, String? tag, int? badge, bool? draft, String? scheduledAt, bool? contentAvailable, bool? critical, enums.MessagePriority? priority}) async {
146150
final String apiPath = '/messaging/messages/push/{messageId}'.replaceAll('{messageId}', messageId);
@@ -210,7 +214,9 @@ class Messaging extends Service {
210214

211215
/// Update SMS
212216
///
213-
/// Update an SMS message by its unique ID.
217+
/// Update an SMS message by its unique ID. This endpoint only works on
218+
/// messages that are in draft status. Messages that are already processing,
219+
/// sent, or failed cannot be updated.
214220
///
215221
Future<models.Message> updateSms({required String messageId, List<String>? topics, List<String>? users, List<String>? targets, String? content, bool? draft, String? scheduledAt}) async {
216222
final String apiPath = '/messaging/messages/sms/{messageId}'.replaceAll('{messageId}', messageId);

lib/src/models/algo_argon2.dart

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,13 @@ part of '../../models.dart';
44
class AlgoArgon2 implements Model {
55
/// Algo type.
66
final String type;
7+
78
/// Memory used to compute hash.
89
final int memoryCost;
10+
911
/// Amount of time consumed to compute hash
1012
final int timeCost;
13+
1114
/// Number of threads used to compute hash.
1215
final int threads;
1316

@@ -35,4 +38,4 @@ class AlgoArgon2 implements Model {
3538
"threads": threads,
3639
};
3740
}
38-
}
41+
}

lib/src/models/algo_bcrypt.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ class AlgoBcrypt implements Model {
2020
"type": type,
2121
};
2222
}
23-
}
23+
}

lib/src/models/algo_md5.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ class AlgoMd5 implements Model {
2020
"type": type,
2121
};
2222
}
23-
}
23+
}

lib/src/models/algo_phpass.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ class AlgoPhpass implements Model {
2020
"type": type,
2121
};
2222
}
23-
}
23+
}

lib/src/models/algo_scrypt.dart

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,16 @@ part of '../../models.dart';
44
class AlgoScrypt implements Model {
55
/// Algo type.
66
final String type;
7+
78
/// CPU complexity of computed hash.
89
final int costCpu;
10+
911
/// Memory complexity of computed hash.
1012
final int costMemory;
13+
1114
/// Parallelization of computed hash.
1215
final int costParallel;
16+
1317
/// Length used to compute hash.
1418
final int length;
1519

@@ -40,4 +44,4 @@ class AlgoScrypt implements Model {
4044
"length": length,
4145
};
4246
}
43-
}
47+
}

lib/src/models/algo_scrypt_modified.dart

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,13 @@ part of '../../models.dart';
44
class AlgoScryptModified implements Model {
55
/// Algo type.
66
final String type;
7+
78
/// Salt used to compute hash.
89
final String salt;
10+
911
/// Separator used to compute hash.
1012
final String saltSeparator;
13+
1114
/// Key used to compute hash.
1215
final String signerKey;
1316

@@ -35,4 +38,4 @@ class AlgoScryptModified implements Model {
3538
"signerKey": signerKey,
3639
};
3740
}
38-
}
41+
}

lib/src/models/algo_sha.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ class AlgoSha implements Model {
2020
"type": type,
2121
};
2222
}
23-
}
23+
}

lib/src/models/attribute_boolean.dart

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,28 @@ part of '../../models.dart';
44
class AttributeBoolean implements Model {
55
/// Attribute Key.
66
final String key;
7+
78
/// Attribute type.
89
final String type;
10+
911
/// Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`
1012
final String status;
13+
1114
/// Error message. Displays error generated on failure of creating or deleting an attribute.
1215
final String error;
16+
1317
/// Is attribute required?
1418
final bool xrequired;
19+
1520
/// Is attribute an array?
1621
final bool? array;
22+
1723
/// Attribute creation date in ISO 8601 format.
1824
final String $createdAt;
25+
1926
/// Attribute update date in ISO 8601 format.
2027
final String $updatedAt;
28+
2129
/// Default value for attribute when not provided. Cannot be set when attribute is required.
2230
final bool? xdefault;
2331

@@ -60,4 +68,4 @@ class AttributeBoolean implements Model {
6068
"default": xdefault,
6169
};
6270
}
63-
}
71+
}

lib/src/models/attribute_datetime.dart

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,31 @@ part of '../../models.dart';
44
class AttributeDatetime implements Model {
55
/// Attribute Key.
66
final String key;
7+
78
/// Attribute type.
89
final String type;
10+
911
/// Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`
1012
final String status;
13+
1114
/// Error message. Displays error generated on failure of creating or deleting an attribute.
1215
final String error;
16+
1317
/// Is attribute required?
1418
final bool xrequired;
19+
1520
/// Is attribute an array?
1621
final bool? array;
22+
1723
/// Attribute creation date in ISO 8601 format.
1824
final String $createdAt;
25+
1926
/// Attribute update date in ISO 8601 format.
2027
final String $updatedAt;
28+
2129
/// ISO 8601 format.
2230
final String format;
31+
2332
/// Default value for attribute when not provided. Only null is optional
2433
final String? xdefault;
2534

@@ -65,4 +74,4 @@ class AttributeDatetime implements Model {
6574
"default": xdefault,
6675
};
6776
}
68-
}
77+
}

0 commit comments

Comments
 (0)