Merge pull request #7552 from appwrite/fix-message-status
Fix message status values and enums
This commit is contained in:
commit
ed80cce878
6 changed files with 8 additions and 8 deletions
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -3059,7 +3059,7 @@ App::patch('/v1/messaging/messages/email/:messageId')
|
||||||
->param('targets', null, new ArrayList(new UID()), 'List of Targets IDs.', true)
|
->param('targets', null, new ArrayList(new UID()), 'List of Targets IDs.', true)
|
||||||
->param('subject', null, new Text(998), 'Email Subject.', true)
|
->param('subject', null, new Text(998), 'Email Subject.', true)
|
||||||
->param('content', null, new Text(64230), 'Email Content.', true)
|
->param('content', null, new Text(64230), 'Email Content.', true)
|
||||||
->param('status', MessageStatus::DRAFT, new WhiteList([MessageStatus::DRAFT, MessageStatus::SCHEDULED, MessageStatus::PROCESSING]), 'Message Status. Value must be one of: ' . implode(', ', [MessageStatus::DRAFT, MessageStatus::SCHEDULED, MessageStatus::PROCESSING]) . '.', true)
|
->param('status', null, new WhiteList([MessageStatus::DRAFT, MessageStatus::SCHEDULED, MessageStatus::PROCESSING]), 'Message Status. Value must be one of: ' . implode(', ', [MessageStatus::DRAFT, MessageStatus::SCHEDULED, MessageStatus::PROCESSING]) . '.', true)
|
||||||
->param('html', null, new Boolean(), 'Is content of type HTML', true)
|
->param('html', null, new Boolean(), 'Is content of type HTML', true)
|
||||||
->param('cc', null, new ArrayList(new UID()), 'Array of target IDs to be added as CC.', true)
|
->param('cc', null, new ArrayList(new UID()), 'Array of target IDs to be added as CC.', true)
|
||||||
->param('bcc', null, new ArrayList(new UID()), 'Array of target IDs to be added as BCC.', true)
|
->param('bcc', null, new ArrayList(new UID()), 'Array of target IDs to be added as BCC.', true)
|
||||||
|
@ -3192,7 +3192,7 @@ App::patch('/v1/messaging/messages/sms/:messageId')
|
||||||
->param('users', null, new ArrayList(new UID()), 'List of User IDs.', true)
|
->param('users', null, new ArrayList(new UID()), 'List of User IDs.', true)
|
||||||
->param('targets', null, new ArrayList(new UID()), 'List of Targets IDs.', true)
|
->param('targets', null, new ArrayList(new UID()), 'List of Targets IDs.', true)
|
||||||
->param('content', null, new Text(64230), 'Email Content.', true)
|
->param('content', null, new Text(64230), 'Email Content.', true)
|
||||||
->param('status', null, new WhiteList(['draft', 'cancelled', 'processing']), 'Message Status. Value must be either draft or cancelled or processing.', true)
|
->param('status', null, new WhiteList([MessageStatus::DRAFT, MessageStatus::SCHEDULED, MessageStatus::PROCESSING]), 'Message Status. Value must be one of: ' . implode(', ', [MessageStatus::DRAFT, MessageStatus::SCHEDULED, MessageStatus::PROCESSING]) . '.', true)
|
||||||
->param('scheduledAt', null, new DatetimeValidator(requireDateInFuture: true), 'Scheduled delivery time for message in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future.', true)
|
->param('scheduledAt', null, new DatetimeValidator(requireDateInFuture: true), 'Scheduled delivery time for message in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future.', true)
|
||||||
->inject('queueForEvents')
|
->inject('queueForEvents')
|
||||||
->inject('dbForProject')
|
->inject('dbForProject')
|
||||||
|
@ -3314,7 +3314,7 @@ App::patch('/v1/messaging/messages/push/:messageId')
|
||||||
->param('color', null, new Text(256), 'Color for push notification. Available only for Android platforms.', true)
|
->param('color', null, new Text(256), 'Color for push notification. Available only for Android platforms.', true)
|
||||||
->param('tag', null, new Text(256), 'Tag for push notification. Available only for Android platforms.', true)
|
->param('tag', null, new Text(256), 'Tag for push notification. Available only for Android platforms.', true)
|
||||||
->param('badge', null, new Integer(), 'Badge for push notification. Available only for iOS platforms.', true)
|
->param('badge', null, new Integer(), 'Badge for push notification. Available only for iOS platforms.', true)
|
||||||
->param('status', null, new WhiteList(['draft', 'cancelled', 'processing']), 'Message Status. Value must be either draft, cancelled, or processing.', true)
|
->param('status', null, new WhiteList([MessageStatus::DRAFT, MessageStatus::SCHEDULED, MessageStatus::PROCESSING]), 'Message Status. Value must be one of: ' . implode(', ', [MessageStatus::DRAFT, MessageStatus::SCHEDULED, MessageStatus::PROCESSING]) . '.', true)
|
||||||
->param('scheduledAt', null, new DatetimeValidator(requireDateInFuture: true), 'Scheduled delivery time for message in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future.', true)
|
->param('scheduledAt', null, new DatetimeValidator(requireDateInFuture: true), 'Scheduled delivery time for message in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future.', true)
|
||||||
->inject('queueForEvents')
|
->inject('queueForEvents')
|
||||||
->inject('dbForProject')
|
->inject('dbForProject')
|
||||||
|
|
|
@ -216,7 +216,7 @@ abstract class Format
|
||||||
case 'updateEmail':
|
case 'updateEmail':
|
||||||
switch ($param) {
|
switch ($param) {
|
||||||
case 'status':
|
case 'status':
|
||||||
return 'MessageType';
|
return 'MessageStatus';
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'createSMTPProvider':
|
case 'createSMTPProvider':
|
||||||
|
|
Loading…
Reference in a new issue