diff --git a/app/config/platforms.php b/app/config/platforms.php index 167e55651c..60ce52636c 100644 --- a/app/config/platforms.php +++ b/app/config/platforms.php @@ -245,7 +245,7 @@ return [ [ 'key' => 'nodejs', 'name' => 'Node.js', - 'version' => '14.1.0', + 'version' => '14.2.0', 'url' => 'https://github.com/appwrite/sdk-for-node', 'package' => 'https://www.npmjs.com/package/node-appwrite', 'enabled' => true, @@ -263,7 +263,7 @@ return [ [ 'key' => 'deno', 'name' => 'Deno', - 'version' => '12.1.0', + 'version' => '12.2.0', 'url' => 'https://github.com/appwrite/sdk-for-deno', 'package' => 'https://deno.land/x/appwrite', 'enabled' => true, @@ -281,7 +281,7 @@ return [ [ 'key' => 'php', 'name' => 'PHP', - 'version' => '12.1.0', + 'version' => '12.2.0', 'url' => 'https://github.com/appwrite/sdk-for-php', 'package' => 'https://packagist.org/packages/appwrite/appwrite', 'enabled' => true, @@ -299,7 +299,7 @@ return [ [ 'key' => 'python', 'name' => 'Python', - 'version' => '6.1.0', + 'version' => '6.2.0', 'url' => 'https://github.com/appwrite/sdk-for-python', 'package' => 'https://pypi.org/project/appwrite/', 'enabled' => true, @@ -317,7 +317,7 @@ return [ [ 'key' => 'ruby', 'name' => 'Ruby', - 'version' => '12.1.1', + 'version' => '12.2.0', 'url' => 'https://github.com/appwrite/sdk-for-ruby', 'package' => 'https://rubygems.org/gems/appwrite', 'enabled' => true, @@ -335,7 +335,7 @@ return [ [ 'key' => 'go', 'name' => 'Go', - 'version' => '0.2.0', + 'version' => '0.3.0', 'url' => 'https://github.com/appwrite/sdk-for-go', 'package' => 'https://github.com/appwrite/sdk-for-go', 'enabled' => true, @@ -353,7 +353,7 @@ return [ [ 'key' => 'dotnet', 'name' => '.NET', - 'version' => '0.10.1', + 'version' => '0.11.0', 'url' => 'https://github.com/appwrite/sdk-for-dotnet', 'package' => 'https://www.nuget.org/packages/Appwrite', 'enabled' => true, @@ -371,7 +371,7 @@ return [ [ 'key' => 'dart', 'name' => 'Dart', - 'version' => '12.1.0', + 'version' => '12.2.0', 'url' => 'https://github.com/appwrite/sdk-for-dart', 'package' => 'https://pub.dev/packages/dart_appwrite', 'enabled' => true, @@ -389,7 +389,7 @@ return [ [ 'key' => 'kotlin', 'name' => 'Kotlin', - 'version' => '6.1.0', + 'version' => '6.2.0', 'url' => 'https://github.com/appwrite/sdk-for-kotlin', 'package' => 'https://search.maven.org/artifact/io.appwrite/sdk-for-kotlin', 'enabled' => true, @@ -411,7 +411,7 @@ return [ [ 'key' => 'swift', 'name' => 'Swift', - 'version' => '6.1.0', + 'version' => '6.2.0', 'url' => 'https://github.com/appwrite/sdk-for-swift', 'package' => 'https://github.com/appwrite/sdk-for-swift', 'enabled' => true, diff --git a/app/config/specs/open-api3-1.6.x-console.json b/app/config/specs/open-api3-1.6.x-console.json index 5b0e5376f5..28a242f6ad 100644 --- a/app/config/specs/open-api3-1.6.x-console.json +++ b/app/config/specs/open-api3-1.6.x-console.json @@ -14122,7 +14122,7 @@ }, "data": { "type": "object", - "description": "Additional Data for push notification.", + "description": "Additional key-value pair data for push notification.", "x-example": "{}" }, "action": { @@ -14142,7 +14142,7 @@ }, "sound": { "type": "string", - "description": "Sound for push notification. Available only for Android and IOS Platform.", + "description": "Sound for push notification. Available only for Android and iOS Platform.", "x-example": "" }, "color": { @@ -14156,9 +14156,9 @@ "x-example": "" }, "badge": { - "type": "string", - "description": "Badge for push notification. Available only for IOS Platform.", - "x-example": "" + "type": "integer", + "description": "Badge for push notification. Available only for iOS Platform.", + "x-example": null }, "draft": { "type": "boolean", @@ -14169,12 +14169,31 @@ "type": "string", "description": "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.", "x-example": null + }, + "contentAvailable": { + "type": "boolean", + "description": "If set to true, the notification will be delivered in the background. Available only for iOS Platform.", + "x-example": false + }, + "critical": { + "type": "boolean", + "description": "If set to true, the notification will be marked as critical. This requires the app to have the critical notification entitlement. Available only for iOS Platform.", + "x-example": false + }, + "priority": { + "type": "string", + "description": "Set the notification priority. \"normal\" will consider device state and may not deliver notifications immediately. \"high\" will always attempt to immediately deliver the notification.", + "x-example": "normal", + "enum": [ + "normal", + "high" + ], + "x-enum-name": "MessagePriority", + "x-enum-keys": [] } }, "required": [ - "messageId", - "title", - "body" + "messageId" ] } } @@ -14333,6 +14352,27 @@ "type": "string", "description": "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.", "x-example": null + }, + "contentAvailable": { + "type": "boolean", + "description": "If set to true, the notification will be delivered in the background. Available only for iOS Platform.", + "x-example": false + }, + "critical": { + "type": "boolean", + "description": "If set to true, the notification will be marked as critical. This requires the app to have the critical notification entitlement. Available only for iOS Platform.", + "x-example": false + }, + "priority": { + "type": "string", + "description": "Set the notification priority. \"normal\" will consider device battery state and may send notifications later. \"high\" will always attempt to immediately deliver the notification.", + "x-example": "normal", + "enum": [ + "normal", + "high" + ], + "x-enum-name": "MessagePriority", + "x-enum-keys": [] } } } diff --git a/app/config/specs/open-api3-1.6.x-server.json b/app/config/specs/open-api3-1.6.x-server.json index 8900d6ddf2..94d7f2ed33 100644 --- a/app/config/specs/open-api3-1.6.x-server.json +++ b/app/config/specs/open-api3-1.6.x-server.json @@ -12980,7 +12980,7 @@ }, "data": { "type": "object", - "description": "Additional Data for push notification.", + "description": "Additional key-value pair data for push notification.", "x-example": "{}" }, "action": { @@ -13000,7 +13000,7 @@ }, "sound": { "type": "string", - "description": "Sound for push notification. Available only for Android and IOS Platform.", + "description": "Sound for push notification. Available only for Android and iOS Platform.", "x-example": "" }, "color": { @@ -13014,9 +13014,9 @@ "x-example": "" }, "badge": { - "type": "string", - "description": "Badge for push notification. Available only for IOS Platform.", - "x-example": "" + "type": "integer", + "description": "Badge for push notification. Available only for iOS Platform.", + "x-example": null }, "draft": { "type": "boolean", @@ -13027,12 +13027,31 @@ "type": "string", "description": "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.", "x-example": null + }, + "contentAvailable": { + "type": "boolean", + "description": "If set to true, the notification will be delivered in the background. Available only for iOS Platform.", + "x-example": false + }, + "critical": { + "type": "boolean", + "description": "If set to true, the notification will be marked as critical. This requires the app to have the critical notification entitlement. Available only for iOS Platform.", + "x-example": false + }, + "priority": { + "type": "string", + "description": "Set the notification priority. \"normal\" will consider device state and may not deliver notifications immediately. \"high\" will always attempt to immediately deliver the notification.", + "x-example": "normal", + "enum": [ + "normal", + "high" + ], + "x-enum-name": "MessagePriority", + "x-enum-keys": [] } }, "required": [ - "messageId", - "title", - "body" + "messageId" ] } } @@ -13192,6 +13211,27 @@ "type": "string", "description": "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.", "x-example": null + }, + "contentAvailable": { + "type": "boolean", + "description": "If set to true, the notification will be delivered in the background. Available only for iOS Platform.", + "x-example": false + }, + "critical": { + "type": "boolean", + "description": "If set to true, the notification will be marked as critical. This requires the app to have the critical notification entitlement. Available only for iOS Platform.", + "x-example": false + }, + "priority": { + "type": "string", + "description": "Set the notification priority. \"normal\" will consider device battery state and may send notifications later. \"high\" will always attempt to immediately deliver the notification.", + "x-example": "normal", + "enum": [ + "normal", + "high" + ], + "x-enum-name": "MessagePriority", + "x-enum-keys": [] } } } diff --git a/app/config/specs/open-api3-latest-console.json b/app/config/specs/open-api3-latest-console.json index 5b0e5376f5..28a242f6ad 100644 --- a/app/config/specs/open-api3-latest-console.json +++ b/app/config/specs/open-api3-latest-console.json @@ -14122,7 +14122,7 @@ }, "data": { "type": "object", - "description": "Additional Data for push notification.", + "description": "Additional key-value pair data for push notification.", "x-example": "{}" }, "action": { @@ -14142,7 +14142,7 @@ }, "sound": { "type": "string", - "description": "Sound for push notification. Available only for Android and IOS Platform.", + "description": "Sound for push notification. Available only for Android and iOS Platform.", "x-example": "" }, "color": { @@ -14156,9 +14156,9 @@ "x-example": "" }, "badge": { - "type": "string", - "description": "Badge for push notification. Available only for IOS Platform.", - "x-example": "" + "type": "integer", + "description": "Badge for push notification. Available only for iOS Platform.", + "x-example": null }, "draft": { "type": "boolean", @@ -14169,12 +14169,31 @@ "type": "string", "description": "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.", "x-example": null + }, + "contentAvailable": { + "type": "boolean", + "description": "If set to true, the notification will be delivered in the background. Available only for iOS Platform.", + "x-example": false + }, + "critical": { + "type": "boolean", + "description": "If set to true, the notification will be marked as critical. This requires the app to have the critical notification entitlement. Available only for iOS Platform.", + "x-example": false + }, + "priority": { + "type": "string", + "description": "Set the notification priority. \"normal\" will consider device state and may not deliver notifications immediately. \"high\" will always attempt to immediately deliver the notification.", + "x-example": "normal", + "enum": [ + "normal", + "high" + ], + "x-enum-name": "MessagePriority", + "x-enum-keys": [] } }, "required": [ - "messageId", - "title", - "body" + "messageId" ] } } @@ -14333,6 +14352,27 @@ "type": "string", "description": "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.", "x-example": null + }, + "contentAvailable": { + "type": "boolean", + "description": "If set to true, the notification will be delivered in the background. Available only for iOS Platform.", + "x-example": false + }, + "critical": { + "type": "boolean", + "description": "If set to true, the notification will be marked as critical. This requires the app to have the critical notification entitlement. Available only for iOS Platform.", + "x-example": false + }, + "priority": { + "type": "string", + "description": "Set the notification priority. \"normal\" will consider device battery state and may send notifications later. \"high\" will always attempt to immediately deliver the notification.", + "x-example": "normal", + "enum": [ + "normal", + "high" + ], + "x-enum-name": "MessagePriority", + "x-enum-keys": [] } } } diff --git a/app/config/specs/open-api3-latest-server.json b/app/config/specs/open-api3-latest-server.json index 8900d6ddf2..94d7f2ed33 100644 --- a/app/config/specs/open-api3-latest-server.json +++ b/app/config/specs/open-api3-latest-server.json @@ -12980,7 +12980,7 @@ }, "data": { "type": "object", - "description": "Additional Data for push notification.", + "description": "Additional key-value pair data for push notification.", "x-example": "{}" }, "action": { @@ -13000,7 +13000,7 @@ }, "sound": { "type": "string", - "description": "Sound for push notification. Available only for Android and IOS Platform.", + "description": "Sound for push notification. Available only for Android and iOS Platform.", "x-example": "" }, "color": { @@ -13014,9 +13014,9 @@ "x-example": "" }, "badge": { - "type": "string", - "description": "Badge for push notification. Available only for IOS Platform.", - "x-example": "" + "type": "integer", + "description": "Badge for push notification. Available only for iOS Platform.", + "x-example": null }, "draft": { "type": "boolean", @@ -13027,12 +13027,31 @@ "type": "string", "description": "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.", "x-example": null + }, + "contentAvailable": { + "type": "boolean", + "description": "If set to true, the notification will be delivered in the background. Available only for iOS Platform.", + "x-example": false + }, + "critical": { + "type": "boolean", + "description": "If set to true, the notification will be marked as critical. This requires the app to have the critical notification entitlement. Available only for iOS Platform.", + "x-example": false + }, + "priority": { + "type": "string", + "description": "Set the notification priority. \"normal\" will consider device state and may not deliver notifications immediately. \"high\" will always attempt to immediately deliver the notification.", + "x-example": "normal", + "enum": [ + "normal", + "high" + ], + "x-enum-name": "MessagePriority", + "x-enum-keys": [] } }, "required": [ - "messageId", - "title", - "body" + "messageId" ] } } @@ -13192,6 +13211,27 @@ "type": "string", "description": "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.", "x-example": null + }, + "contentAvailable": { + "type": "boolean", + "description": "If set to true, the notification will be delivered in the background. Available only for iOS Platform.", + "x-example": false + }, + "critical": { + "type": "boolean", + "description": "If set to true, the notification will be marked as critical. This requires the app to have the critical notification entitlement. Available only for iOS Platform.", + "x-example": false + }, + "priority": { + "type": "string", + "description": "Set the notification priority. \"normal\" will consider device battery state and may send notifications later. \"high\" will always attempt to immediately deliver the notification.", + "x-example": "normal", + "enum": [ + "normal", + "high" + ], + "x-enum-name": "MessagePriority", + "x-enum-keys": [] } } } diff --git a/app/config/specs/swagger2-1.6.x-console.json b/app/config/specs/swagger2-1.6.x-console.json index d5c82bba49..efdcca1579 100644 --- a/app/config/specs/swagger2-1.6.x-console.json +++ b/app/config/specs/swagger2-1.6.x-console.json @@ -14330,13 +14330,13 @@ "title": { "type": "string", "description": "Title for push notification.", - "default": null, + "default": "", "x-example": "" }, "body": { "type": "string", "description": "Body for push notification.", - "default": null, + "default": "", "x-example": "<BODY>" }, "topics": { @@ -14368,7 +14368,7 @@ }, "data": { "type": "object", - "description": "Additional Data for push notification.", + "description": "Additional key-value pair data for push notification.", "default": {}, "x-example": "{}" }, @@ -14392,7 +14392,7 @@ }, "sound": { "type": "string", - "description": "Sound for push notification. Available only for Android and IOS Platform.", + "description": "Sound for push notification. Available only for Android and iOS Platform.", "default": "", "x-example": "<SOUND>" }, @@ -14409,10 +14409,10 @@ "x-example": "<TAG>" }, "badge": { - "type": "string", - "description": "Badge for push notification. Available only for IOS Platform.", - "default": "", - "x-example": "<BADGE>" + "type": "integer", + "description": "Badge for push notification. Available only for iOS Platform.", + "default": -1, + "x-example": null }, "draft": { "type": "boolean", @@ -14425,12 +14425,34 @@ "description": "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.", "default": null, "x-example": null + }, + "contentAvailable": { + "type": "boolean", + "description": "If set to true, the notification will be delivered in the background. Available only for iOS Platform.", + "default": false, + "x-example": false + }, + "critical": { + "type": "boolean", + "description": "If set to true, the notification will be marked as critical. This requires the app to have the critical notification entitlement. Available only for iOS Platform.", + "default": false, + "x-example": false + }, + "priority": { + "type": "string", + "description": "Set the notification priority. \"normal\" will consider device state and may not deliver notifications immediately. \"high\" will always attempt to immediately deliver the notification.", + "default": "high", + "x-example": "normal", + "enum": [ + "normal", + "high" + ], + "x-enum-name": "MessagePriority", + "x-enum-keys": [] } }, "required": [ - "messageId", - "title", - "body" + "messageId" ] } } @@ -14602,6 +14624,30 @@ "description": "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.", "default": null, "x-example": null + }, + "contentAvailable": { + "type": "boolean", + "description": "If set to true, the notification will be delivered in the background. Available only for iOS Platform.", + "default": null, + "x-example": false + }, + "critical": { + "type": "boolean", + "description": "If set to true, the notification will be marked as critical. This requires the app to have the critical notification entitlement. Available only for iOS Platform.", + "default": null, + "x-example": false + }, + "priority": { + "type": "string", + "description": "Set the notification priority. \"normal\" will consider device battery state and may send notifications later. \"high\" will always attempt to immediately deliver the notification.", + "default": null, + "x-example": "normal", + "enum": [ + "normal", + "high" + ], + "x-enum-name": "MessagePriority", + "x-enum-keys": [] } } } diff --git a/app/config/specs/swagger2-1.6.x-server.json b/app/config/specs/swagger2-1.6.x-server.json index f5b1f24a22..5b4fbe92b7 100644 --- a/app/config/specs/swagger2-1.6.x-server.json +++ b/app/config/specs/swagger2-1.6.x-server.json @@ -13196,13 +13196,13 @@ "title": { "type": "string", "description": "Title for push notification.", - "default": null, + "default": "", "x-example": "<TITLE>" }, "body": { "type": "string", "description": "Body for push notification.", - "default": null, + "default": "", "x-example": "<BODY>" }, "topics": { @@ -13234,7 +13234,7 @@ }, "data": { "type": "object", - "description": "Additional Data for push notification.", + "description": "Additional key-value pair data for push notification.", "default": {}, "x-example": "{}" }, @@ -13258,7 +13258,7 @@ }, "sound": { "type": "string", - "description": "Sound for push notification. Available only for Android and IOS Platform.", + "description": "Sound for push notification. Available only for Android and iOS Platform.", "default": "", "x-example": "<SOUND>" }, @@ -13275,10 +13275,10 @@ "x-example": "<TAG>" }, "badge": { - "type": "string", - "description": "Badge for push notification. Available only for IOS Platform.", - "default": "", - "x-example": "<BADGE>" + "type": "integer", + "description": "Badge for push notification. Available only for iOS Platform.", + "default": -1, + "x-example": null }, "draft": { "type": "boolean", @@ -13291,12 +13291,34 @@ "description": "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.", "default": null, "x-example": null + }, + "contentAvailable": { + "type": "boolean", + "description": "If set to true, the notification will be delivered in the background. Available only for iOS Platform.", + "default": false, + "x-example": false + }, + "critical": { + "type": "boolean", + "description": "If set to true, the notification will be marked as critical. This requires the app to have the critical notification entitlement. Available only for iOS Platform.", + "default": false, + "x-example": false + }, + "priority": { + "type": "string", + "description": "Set the notification priority. \"normal\" will consider device state and may not deliver notifications immediately. \"high\" will always attempt to immediately deliver the notification.", + "default": "high", + "x-example": "normal", + "enum": [ + "normal", + "high" + ], + "x-enum-name": "MessagePriority", + "x-enum-keys": [] } }, "required": [ - "messageId", - "title", - "body" + "messageId" ] } } @@ -13469,6 +13491,30 @@ "description": "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.", "default": null, "x-example": null + }, + "contentAvailable": { + "type": "boolean", + "description": "If set to true, the notification will be delivered in the background. Available only for iOS Platform.", + "default": null, + "x-example": false + }, + "critical": { + "type": "boolean", + "description": "If set to true, the notification will be marked as critical. This requires the app to have the critical notification entitlement. Available only for iOS Platform.", + "default": null, + "x-example": false + }, + "priority": { + "type": "string", + "description": "Set the notification priority. \"normal\" will consider device battery state and may send notifications later. \"high\" will always attempt to immediately deliver the notification.", + "default": null, + "x-example": "normal", + "enum": [ + "normal", + "high" + ], + "x-enum-name": "MessagePriority", + "x-enum-keys": [] } } } diff --git a/app/config/specs/swagger2-latest-console.json b/app/config/specs/swagger2-latest-console.json index d5c82bba49..efdcca1579 100644 --- a/app/config/specs/swagger2-latest-console.json +++ b/app/config/specs/swagger2-latest-console.json @@ -14330,13 +14330,13 @@ "title": { "type": "string", "description": "Title for push notification.", - "default": null, + "default": "", "x-example": "<TITLE>" }, "body": { "type": "string", "description": "Body for push notification.", - "default": null, + "default": "", "x-example": "<BODY>" }, "topics": { @@ -14368,7 +14368,7 @@ }, "data": { "type": "object", - "description": "Additional Data for push notification.", + "description": "Additional key-value pair data for push notification.", "default": {}, "x-example": "{}" }, @@ -14392,7 +14392,7 @@ }, "sound": { "type": "string", - "description": "Sound for push notification. Available only for Android and IOS Platform.", + "description": "Sound for push notification. Available only for Android and iOS Platform.", "default": "", "x-example": "<SOUND>" }, @@ -14409,10 +14409,10 @@ "x-example": "<TAG>" }, "badge": { - "type": "string", - "description": "Badge for push notification. Available only for IOS Platform.", - "default": "", - "x-example": "<BADGE>" + "type": "integer", + "description": "Badge for push notification. Available only for iOS Platform.", + "default": -1, + "x-example": null }, "draft": { "type": "boolean", @@ -14425,12 +14425,34 @@ "description": "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.", "default": null, "x-example": null + }, + "contentAvailable": { + "type": "boolean", + "description": "If set to true, the notification will be delivered in the background. Available only for iOS Platform.", + "default": false, + "x-example": false + }, + "critical": { + "type": "boolean", + "description": "If set to true, the notification will be marked as critical. This requires the app to have the critical notification entitlement. Available only for iOS Platform.", + "default": false, + "x-example": false + }, + "priority": { + "type": "string", + "description": "Set the notification priority. \"normal\" will consider device state and may not deliver notifications immediately. \"high\" will always attempt to immediately deliver the notification.", + "default": "high", + "x-example": "normal", + "enum": [ + "normal", + "high" + ], + "x-enum-name": "MessagePriority", + "x-enum-keys": [] } }, "required": [ - "messageId", - "title", - "body" + "messageId" ] } } @@ -14602,6 +14624,30 @@ "description": "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.", "default": null, "x-example": null + }, + "contentAvailable": { + "type": "boolean", + "description": "If set to true, the notification will be delivered in the background. Available only for iOS Platform.", + "default": null, + "x-example": false + }, + "critical": { + "type": "boolean", + "description": "If set to true, the notification will be marked as critical. This requires the app to have the critical notification entitlement. Available only for iOS Platform.", + "default": null, + "x-example": false + }, + "priority": { + "type": "string", + "description": "Set the notification priority. \"normal\" will consider device battery state and may send notifications later. \"high\" will always attempt to immediately deliver the notification.", + "default": null, + "x-example": "normal", + "enum": [ + "normal", + "high" + ], + "x-enum-name": "MessagePriority", + "x-enum-keys": [] } } } diff --git a/app/config/specs/swagger2-latest-server.json b/app/config/specs/swagger2-latest-server.json index f5b1f24a22..5b4fbe92b7 100644 --- a/app/config/specs/swagger2-latest-server.json +++ b/app/config/specs/swagger2-latest-server.json @@ -13196,13 +13196,13 @@ "title": { "type": "string", "description": "Title for push notification.", - "default": null, + "default": "", "x-example": "<TITLE>" }, "body": { "type": "string", "description": "Body for push notification.", - "default": null, + "default": "", "x-example": "<BODY>" }, "topics": { @@ -13234,7 +13234,7 @@ }, "data": { "type": "object", - "description": "Additional Data for push notification.", + "description": "Additional key-value pair data for push notification.", "default": {}, "x-example": "{}" }, @@ -13258,7 +13258,7 @@ }, "sound": { "type": "string", - "description": "Sound for push notification. Available only for Android and IOS Platform.", + "description": "Sound for push notification. Available only for Android and iOS Platform.", "default": "", "x-example": "<SOUND>" }, @@ -13275,10 +13275,10 @@ "x-example": "<TAG>" }, "badge": { - "type": "string", - "description": "Badge for push notification. Available only for IOS Platform.", - "default": "", - "x-example": "<BADGE>" + "type": "integer", + "description": "Badge for push notification. Available only for iOS Platform.", + "default": -1, + "x-example": null }, "draft": { "type": "boolean", @@ -13291,12 +13291,34 @@ "description": "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.", "default": null, "x-example": null + }, + "contentAvailable": { + "type": "boolean", + "description": "If set to true, the notification will be delivered in the background. Available only for iOS Platform.", + "default": false, + "x-example": false + }, + "critical": { + "type": "boolean", + "description": "If set to true, the notification will be marked as critical. This requires the app to have the critical notification entitlement. Available only for iOS Platform.", + "default": false, + "x-example": false + }, + "priority": { + "type": "string", + "description": "Set the notification priority. \"normal\" will consider device state and may not deliver notifications immediately. \"high\" will always attempt to immediately deliver the notification.", + "default": "high", + "x-example": "normal", + "enum": [ + "normal", + "high" + ], + "x-enum-name": "MessagePriority", + "x-enum-keys": [] } }, "required": [ - "messageId", - "title", - "body" + "messageId" ] } } @@ -13469,6 +13491,30 @@ "description": "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.", "default": null, "x-example": null + }, + "contentAvailable": { + "type": "boolean", + "description": "If set to true, the notification will be delivered in the background. Available only for iOS Platform.", + "default": null, + "x-example": false + }, + "critical": { + "type": "boolean", + "description": "If set to true, the notification will be marked as critical. This requires the app to have the critical notification entitlement. Available only for iOS Platform.", + "default": null, + "x-example": false + }, + "priority": { + "type": "string", + "description": "Set the notification priority. \"normal\" will consider device battery state and may send notifications later. \"high\" will always attempt to immediately deliver the notification.", + "default": null, + "x-example": "normal", + "enum": [ + "normal", + "high" + ], + "x-enum-name": "MessagePriority", + "x-enum-keys": [] } } } diff --git a/app/controllers/api/messaging.php b/app/controllers/api/messaging.php index 00a68454ee..e7748484ba 100644 --- a/app/controllers/api/messaging.php +++ b/app/controllers/api/messaging.php @@ -2906,28 +2906,31 @@ App::post('/v1/messaging/messages/push') ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) ->label('sdk.response.model', Response::MODEL_MESSAGE) ->param('messageId', '', new CustomId(), 'Message ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can\'t start with a special char. Max length is 36 chars.') - ->param('title', '', new Text(256), 'Title for push notification.') - ->param('body', '', new Text(64230), 'Body for push notification.') + ->param('title', '', new Text(256), 'Title for push notification.', true) + ->param('body', '', new Text(64230), 'Body for push notification.', true) ->param('topics', [], new ArrayList(new UID()), 'List of Topic IDs.', true) ->param('users', [], new ArrayList(new UID()), 'List of User IDs.', true) ->param('targets', [], new ArrayList(new UID()), 'List of Targets IDs.', true) - ->param('data', null, new JSON(), 'Additional Data for push notification.', true) + ->param('data', null, new JSON(), 'Additional key-value pair data for push notification.', true) ->param('action', '', new Text(256), 'Action for push notification.', true) ->param('image', '', new CompoundUID(), 'Image for push notification. Must be a compound bucket ID to file ID of a jpeg, png, or bmp image in Appwrite Storage. It should be formatted as <BUCKET_ID>:<FILE_ID>.', true) ->param('icon', '', new Text(256), 'Icon for push notification. Available only for Android and Web Platform.', true) - ->param('sound', '', new Text(256), 'Sound for push notification. Available only for Android and IOS Platform.', true) + ->param('sound', '', new Text(256), 'Sound for push notification. Available only for Android and iOS Platform.', true) ->param('color', '', new Text(256), 'Color for push notification. Available only for Android Platform.', true) ->param('tag', '', new Text(256), 'Tag for push notification. Available only for Android Platform.', true) - ->param('badge', '', new Text(256), 'Badge for push notification. Available only for IOS Platform.', true) + ->param('badge', -1, new Integer(), 'Badge for push notification. Available only for iOS Platform.', true) ->param('draft', false, new Boolean(), 'Is message a draft', 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('contentAvailable', false, new Boolean(), 'If set to true, the notification will be delivered in the background. Available only for iOS Platform.', true) + ->param('critical', false, new Boolean(), 'If set to true, the notification will be marked as critical. This requires the app to have the critical notification entitlement. Available only for iOS Platform.', true) + ->param('priority', 'high', new WhiteList(['normal', 'high']), 'Set the notification priority. "normal" will consider device state and may not deliver notifications immediately. "high" will always attempt to immediately deliver the notification.', true) ->inject('queueForEvents') ->inject('dbForProject') ->inject('dbForPlatform') ->inject('project') ->inject('queueForMessaging') ->inject('response') - ->action(function (string $messageId, string $title, string $body, array $topics, array $users, array $targets, ?array $data, string $action, string $image, string $icon, string $sound, string $color, string $tag, string $badge, bool $draft, ?string $scheduledAt, Event $queueForEvents, Database $dbForProject, Database $dbForPlatform, Document $project, Messaging $queueForMessaging, Response $response) { + ->action(function (string $messageId, string $title, string $body, array $topics, array $users, array $targets, ?array $data, string $action, string $image, string $icon, string $sound, string $color, string $tag, int $badge, bool $draft, ?string $scheduledAt, bool $contentAvailable, bool $critical, string $priority, Event $queueForEvents, Database $dbForProject, Database $dbForPlatform, Document $project, Messaging $queueForMessaging, Response $response) { $messageId = $messageId == 'unique()' ? ID::unique() : $messageId; @@ -3010,12 +3013,44 @@ App::post('/v1/messaging/messages/push') $pushData = []; - $keys = ['title', 'body', 'data', 'action', 'image', 'icon', 'sound', 'color', 'tag', 'badge']; - - foreach ($keys as $key) { - if (!empty($$key)) { - $pushData[$key] = $$key; - } + if (!empty($title)) { + $pushData['title'] = $title; + } + if (!empty($body)) { + $pushData['body'] = $body; + } + if (!empty($data)) { + $pushData['data'] = $data; + } + if (!empty($action)) { + $pushData['action'] = $action; + } + if (!empty($image)) { + $pushData['image'] = $image; + } + if (!empty($icon)) { + $pushData['icon'] = $icon; + } + if (!empty($sound)) { + $pushData['sound'] = $sound; + } + if (!empty($color)) { + $pushData['color'] = $color; + } + if (!empty($tag)) { + $pushData['tag'] = $tag; + } + if ($badge >= 0) { + $pushData['badge'] = $badge; + } + if ($contentAvailable) { + $pushData['contentAvailable'] = true; + } + if ($critical) { + $pushData['critical'] = true; + } + if (!empty($priority)) { + $pushData['priority'] = $priority; } $message = $dbForProject->createDocument('messages', new Document([ @@ -3698,13 +3733,16 @@ App::patch('/v1/messaging/messages/push/:messageId') ->param('badge', null, new Integer(), 'Badge for push notification. Available only for iOS platforms.', true) ->param('draft', null, new Boolean(), 'Is message a draft', 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('contentAvailable', null, new Boolean(), 'If set to true, the notification will be delivered in the background. Available only for iOS Platform.', true) + ->param('critical', null, new Boolean(), 'If set to true, the notification will be marked as critical. This requires the app to have the critical notification entitlement. Available only for iOS Platform.', true) + ->param('priority', null, new WhiteList(['normal', 'high']), 'Set the notification priority. "normal" will consider device battery state and may send notifications later. "high" will always attempt to immediately deliver the notification.', true) ->inject('queueForEvents') ->inject('dbForProject') ->inject('dbForPlatform') ->inject('project') ->inject('queueForMessaging') ->inject('response') - ->action(function (string $messageId, ?array $topics, ?array $users, ?array $targets, ?string $title, ?string $body, ?array $data, ?string $action, ?string $image, ?string $icon, ?string $sound, ?string $color, ?string $tag, ?int $badge, ?bool $draft, ?string $scheduledAt, Event $queueForEvents, Database $dbForProject, Database $dbForPlatform, Document $project, Messaging $queueForMessaging, Response $response) { + ->action(function (string $messageId, ?array $topics, ?array $users, ?array $targets, ?string $title, ?string $body, ?array $data, ?string $action, ?string $image, ?string $icon, ?string $sound, ?string $color, ?string $tag, ?int $badge, ?bool $draft, ?string $scheduledAt, ?bool $contentAvailable, ?bool $critical, ?string $priority, Event $queueForEvents, Database $dbForProject, Database $dbForPlatform, Document $project, Messaging $queueForMessaging, Response $response) { $message = $dbForProject->getDocument('messages', $messageId); if ($message->isEmpty()) { @@ -3843,6 +3881,18 @@ App::patch('/v1/messaging/messages/push/:messageId') $pushData['badge'] = $badge; } + if (!\is_null($contentAvailable)) { + $pushData['contentAvailable'] = $contentAvailable; + } + + if (!\is_null($critical)) { + $pushData['critical'] = $critical; + } + + if (!\is_null($priority)) { + $pushData['priority'] = $priority; + } + if (!\is_null($image)) { [$bucketId, $fileId] = CompoundUID::parse($image); diff --git a/app/init.php b/app/init.php index df2a66aa00..954e29410d 100644 --- a/app/init.php +++ b/app/init.php @@ -733,12 +733,19 @@ Database::addFilter( $data = \json_decode($message->getAttribute('data', []), true); $providerType = $message->getAttribute('providerType', ''); - if ($providerType === MESSAGE_TYPE_EMAIL) { - $searchValues = \array_merge($searchValues, [$data['subject'], MESSAGE_TYPE_EMAIL]); - } elseif ($providerType === MESSAGE_TYPE_SMS) { - $searchValues = \array_merge($searchValues, [$data['content'], MESSAGE_TYPE_SMS]); - } else { - $searchValues = \array_merge($searchValues, [$data['title'], MESSAGE_TYPE_PUSH]); + switch ($providerType) { + case MESSAGE_TYPE_EMAIL: + $searchValues[] = $data['subject']; + $searchValues[] = MESSAGE_TYPE_EMAIL; + break; + case MESSAGE_TYPE_SMS: + $searchValues[] = $data['content']; + $searchValues[] = MESSAGE_TYPE_SMS; + break; + case MESSAGE_TYPE_PUSH: + $searchValues[] = $data['title'] ?? ''; + $searchValues[] = MESSAGE_TYPE_PUSH; + break; } $search = \implode(' ', \array_filter($searchValues)); diff --git a/composer.json b/composer.json index 882be5b94e..4e1b5a98a2 100644 --- a/composer.json +++ b/composer.json @@ -59,10 +59,10 @@ "utopia-php/image": "0.7.*", "utopia-php/locale": "0.4.*", "utopia-php/logger": "0.6.*", - "utopia-php/messaging": "0.12.*", + "utopia-php/messaging": "0.13.*", "utopia-php/migration": "0.6.*", "utopia-php/orchestration": "0.9.*", - "utopia-php/platform": "0.7.*", + "utopia-php/platform": "0.7.1", "utopia-php/pools": "0.5.*", "utopia-php/preloader": "0.2.*", "utopia-php/queue": "0.7.*", diff --git a/composer.lock b/composer.lock index b77915f0a4..68dbc191bf 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "c88950f1d3119d0764a469e1d804ce71", + "content-hash": "3853435a659889e86c16764046950bed", "packages": [ { "name": "adhocore/jwt", @@ -3878,16 +3878,16 @@ }, { "name": "utopia-php/messaging", - "version": "0.12.2", + "version": "0.13.0", "source": { "type": "git", "url": "https://github.com/utopia-php/messaging.git", - "reference": "f6790fba1fcee12163d51c65d2c226a7856295d9" + "reference": "0e3e57351fe4fe875ef3ab9a01a7fff5f022de90" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/utopia-php/messaging/zipball/f6790fba1fcee12163d51c65d2c226a7856295d9", - "reference": "f6790fba1fcee12163d51c65d2c226a7856295d9", + "url": "https://api.github.com/repos/utopia-php/messaging/zipball/0e3e57351fe4fe875ef3ab9a01a7fff5f022de90", + "reference": "0e3e57351fe4fe875ef3ab9a01a7fff5f022de90", "shasum": "" }, "require": { @@ -3898,9 +3898,9 @@ "phpmailer/phpmailer": "6.9.1" }, "require-dev": { - "laravel/pint": "1.13.11", - "phpstan/phpstan": "1.10.58", - "phpunit/phpunit": "10.5.10" + "laravel/pint": "1.*", + "phpstan/phpstan": "1.*", + "phpunit/phpunit": "11.*" }, "type": "library", "autoload": { @@ -3923,9 +3923,9 @@ ], "support": { "issues": "https://github.com/utopia-php/messaging/issues", - "source": "https://github.com/utopia-php/messaging/tree/0.12.2" + "source": "https://github.com/utopia-php/messaging/tree/0.13.0" }, - "time": "2024-10-22T01:02:20+00:00" + "time": "2024-12-05T08:36:07+00:00" }, { "name": "utopia-php/migration", @@ -5126,16 +5126,16 @@ }, { "name": "laravel/pint", - "version": "v1.19.0", + "version": "v1.20.0", "source": { "type": "git", "url": "https://github.com/laravel/pint.git", - "reference": "8169513746e1bac70c85d6ea1524d9225d4886f0" + "reference": "53072e8ea22213a7ed168a8a15b96fbb8b82d44b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/pint/zipball/8169513746e1bac70c85d6ea1524d9225d4886f0", - "reference": "8169513746e1bac70c85d6ea1524d9225d4886f0", + "url": "https://api.github.com/repos/laravel/pint/zipball/53072e8ea22213a7ed168a8a15b96fbb8b82d44b", + "reference": "53072e8ea22213a7ed168a8a15b96fbb8b82d44b", "shasum": "" }, "require": { @@ -5188,7 +5188,7 @@ "issues": "https://github.com/laravel/pint/issues", "source": "https://github.com/laravel/pint" }, - "time": "2024-12-30T16:20:10+00:00" + "time": "2025-01-14T16:20:53+00:00" }, { "name": "matthiasmullie/minify", diff --git a/docs/examples/1.6.x/server-dart/examples/databases/update-string-attribute.md b/docs/examples/1.6.x/server-dart/examples/databases/update-string-attribute.md index c2f3804c66..f9498aa36b 100644 --- a/docs/examples/1.6.x/server-dart/examples/databases/update-string-attribute.md +++ b/docs/examples/1.6.x/server-dart/examples/databases/update-string-attribute.md @@ -13,6 +13,6 @@ AttributeString result = await databases.updateStringAttribute( key: '', xrequired: false, xdefault: '<DEFAULT>', - size: 0, // (optional) + size: 1, // (optional) newKey: '', // (optional) ); diff --git a/docs/examples/1.6.x/server-dart/examples/messaging/create-push.md b/docs/examples/1.6.x/server-dart/examples/messaging/create-push.md index c3c7d2ffc5..e496de9d27 100644 --- a/docs/examples/1.6.x/server-dart/examples/messaging/create-push.md +++ b/docs/examples/1.6.x/server-dart/examples/messaging/create-push.md @@ -9,8 +9,8 @@ Messaging messaging = Messaging(client); Message result = await messaging.createPush( messageId: '<MESSAGE_ID>', - title: '<TITLE>', - body: '<BODY>', + title: '<TITLE>', // (optional) + body: '<BODY>', // (optional) topics: [], // (optional) users: [], // (optional) targets: [], // (optional) @@ -21,7 +21,10 @@ Message result = await messaging.createPush( sound: '<SOUND>', // (optional) color: '<COLOR>', // (optional) tag: '<TAG>', // (optional) - badge: '<BADGE>', // (optional) + badge: 0, // (optional) draft: false, // (optional) scheduledAt: '', // (optional) + contentAvailable: false, // (optional) + critical: false, // (optional) + priority: MessagePriority.normal, // (optional) ); diff --git a/docs/examples/1.6.x/server-dart/examples/messaging/update-push.md b/docs/examples/1.6.x/server-dart/examples/messaging/update-push.md index dcec9b243f..f5d75332e2 100644 --- a/docs/examples/1.6.x/server-dart/examples/messaging/update-push.md +++ b/docs/examples/1.6.x/server-dart/examples/messaging/update-push.md @@ -24,4 +24,7 @@ Message result = await messaging.updatePush( badge: 0, // (optional) draft: false, // (optional) scheduledAt: '', // (optional) + contentAvailable: false, // (optional) + critical: false, // (optional) + priority: MessagePriority.normal, // (optional) ); diff --git a/docs/examples/1.6.x/server-deno/examples/databases/update-string-attribute.md b/docs/examples/1.6.x/server-deno/examples/databases/update-string-attribute.md index 6603c377cb..d57f8fd663 100644 --- a/docs/examples/1.6.x/server-deno/examples/databases/update-string-attribute.md +++ b/docs/examples/1.6.x/server-deno/examples/databases/update-string-attribute.md @@ -13,6 +13,6 @@ const response = await databases.updateStringAttribute( '', // key false, // required '<DEFAULT>', // default - null, // size (optional) + 1, // size (optional) '' // newKey (optional) ); diff --git a/docs/examples/1.6.x/server-deno/examples/messaging/create-push.md b/docs/examples/1.6.x/server-deno/examples/messaging/create-push.md index 005cca1b77..7b41911918 100644 --- a/docs/examples/1.6.x/server-deno/examples/messaging/create-push.md +++ b/docs/examples/1.6.x/server-deno/examples/messaging/create-push.md @@ -1,4 +1,4 @@ -import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; +import { Client, Messaging, MessagePriority } from "https://deno.land/x/appwrite/mod.ts"; const client = new Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint @@ -9,8 +9,8 @@ const messaging = new Messaging(client); const response = await messaging.createPush( '<MESSAGE_ID>', // messageId - '<TITLE>', // title - '<BODY>', // body + '<TITLE>', // title (optional) + '<BODY>', // body (optional) [], // topics (optional) [], // users (optional) [], // targets (optional) @@ -21,7 +21,10 @@ const response = await messaging.createPush( '<SOUND>', // sound (optional) '<COLOR>', // color (optional) '<TAG>', // tag (optional) - '<BADGE>', // badge (optional) + null, // badge (optional) false, // draft (optional) - '' // scheduledAt (optional) + '', // scheduledAt (optional) + false, // contentAvailable (optional) + false, // critical (optional) + MessagePriority.Normal // priority (optional) ); diff --git a/docs/examples/1.6.x/server-deno/examples/messaging/update-push.md b/docs/examples/1.6.x/server-deno/examples/messaging/update-push.md index 9c66ab6ab7..11437fabe1 100644 --- a/docs/examples/1.6.x/server-deno/examples/messaging/update-push.md +++ b/docs/examples/1.6.x/server-deno/examples/messaging/update-push.md @@ -1,4 +1,4 @@ -import { Client, Messaging } from "https://deno.land/x/appwrite/mod.ts"; +import { Client, Messaging, MessagePriority } from "https://deno.land/x/appwrite/mod.ts"; const client = new Client() .setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint @@ -23,5 +23,8 @@ const response = await messaging.updatePush( '<TAG>', // tag (optional) null, // badge (optional) false, // draft (optional) - '' // scheduledAt (optional) + '', // scheduledAt (optional) + false, // contentAvailable (optional) + false, // critical (optional) + MessagePriority.Normal // priority (optional) ); diff --git a/docs/examples/1.6.x/server-dotnet/examples/databases/update-string-attribute.md b/docs/examples/1.6.x/server-dotnet/examples/databases/update-string-attribute.md index e915d23f51..a180815a50 100644 --- a/docs/examples/1.6.x/server-dotnet/examples/databases/update-string-attribute.md +++ b/docs/examples/1.6.x/server-dotnet/examples/databases/update-string-attribute.md @@ -15,6 +15,6 @@ AttributeString result = await databases.UpdateStringAttribute( key: "", required: false, default: "<DEFAULT>", - size: 0, // optional + size: 1, // optional newKey: "" // optional ); \ No newline at end of file diff --git a/docs/examples/1.6.x/server-dotnet/examples/messaging/create-push.md b/docs/examples/1.6.x/server-dotnet/examples/messaging/create-push.md index f83a0ed8df..588781b3a1 100644 --- a/docs/examples/1.6.x/server-dotnet/examples/messaging/create-push.md +++ b/docs/examples/1.6.x/server-dotnet/examples/messaging/create-push.md @@ -1,4 +1,5 @@ using Appwrite; +using Appwrite.Enums; using Appwrite.Models; using Appwrite.Services; @@ -11,8 +12,8 @@ Messaging messaging = new Messaging(client); Message result = await messaging.CreatePush( messageId: "<MESSAGE_ID>", - title: "<TITLE>", - body: "<BODY>", + title: "<TITLE>", // optional + body: "<BODY>", // optional topics: new List<string>(), // optional users: new List<string>(), // optional targets: new List<string>(), // optional @@ -23,7 +24,10 @@ Message result = await messaging.CreatePush( sound: "<SOUND>", // optional color: "<COLOR>", // optional tag: "<TAG>", // optional - badge: "<BADGE>", // optional + badge: 0, // optional draft: false, // optional - scheduledAt: "" // optional + scheduledAt: "", // optional + contentAvailable: false, // optional + critical: false, // optional + priority: MessagePriority.Normal // optional ); \ No newline at end of file diff --git a/docs/examples/1.6.x/server-dotnet/examples/messaging/update-push.md b/docs/examples/1.6.x/server-dotnet/examples/messaging/update-push.md index 0de09d570a..2b48d1827d 100644 --- a/docs/examples/1.6.x/server-dotnet/examples/messaging/update-push.md +++ b/docs/examples/1.6.x/server-dotnet/examples/messaging/update-push.md @@ -1,4 +1,5 @@ using Appwrite; +using Appwrite.Enums; using Appwrite.Models; using Appwrite.Services; @@ -25,5 +26,8 @@ Message result = await messaging.UpdatePush( tag: "<TAG>", // optional badge: 0, // optional draft: false, // optional - scheduledAt: "" // optional + scheduledAt: "", // optional + contentAvailable: false, // optional + critical: false, // optional + priority: MessagePriority.Normal // optional ); \ No newline at end of file diff --git a/docs/examples/1.6.x/server-go/examples/databases/update-string-attribute.md b/docs/examples/1.6.x/server-go/examples/databases/update-string-attribute.md index d662060f09..f3e6addb07 100644 --- a/docs/examples/1.6.x/server-go/examples/databases/update-string-attribute.md +++ b/docs/examples/1.6.x/server-go/examples/databases/update-string-attribute.md @@ -20,7 +20,7 @@ func main() { "", false, "<DEFAULT>", - databases.WithUpdateStringAttributeSize(0), + databases.WithUpdateStringAttributeSize(1), databases.WithUpdateStringAttributeNewKey(""), ) diff --git a/docs/examples/1.6.x/server-go/examples/messaging/create-push.md b/docs/examples/1.6.x/server-go/examples/messaging/create-push.md index 090e0cbca2..b40037472f 100644 --- a/docs/examples/1.6.x/server-go/examples/messaging/create-push.md +++ b/docs/examples/1.6.x/server-go/examples/messaging/create-push.md @@ -16,8 +16,8 @@ func main() { service := messaging.NewMessaging(client) response, error := service.CreatePush( "<MESSAGE_ID>", - "<TITLE>", - "<BODY>", + messaging.WithCreatePushTitle("<TITLE>"), + messaging.WithCreatePushBody("<BODY>"), messaging.WithCreatePushTopics([]interface{}{}), messaging.WithCreatePushUsers([]interface{}{}), messaging.WithCreatePushTargets([]interface{}{}), @@ -28,9 +28,12 @@ func main() { messaging.WithCreatePushSound("<SOUND>"), messaging.WithCreatePushColor("<COLOR>"), messaging.WithCreatePushTag("<TAG>"), - messaging.WithCreatePushBadge("<BADGE>"), + messaging.WithCreatePushBadge(0), messaging.WithCreatePushDraft(false), messaging.WithCreatePushScheduledAt(""), + messaging.WithCreatePushContentAvailable(false), + messaging.WithCreatePushCritical(false), + messaging.WithCreatePushPriority("normal"), ) if error != nil { diff --git a/docs/examples/1.6.x/server-go/examples/messaging/update-push.md b/docs/examples/1.6.x/server-go/examples/messaging/update-push.md index af1b6095cd..d1b47256c0 100644 --- a/docs/examples/1.6.x/server-go/examples/messaging/update-push.md +++ b/docs/examples/1.6.x/server-go/examples/messaging/update-push.md @@ -31,6 +31,9 @@ func main() { messaging.WithUpdatePushBadge(0), messaging.WithUpdatePushDraft(false), messaging.WithUpdatePushScheduledAt(""), + messaging.WithUpdatePushContentAvailable(false), + messaging.WithUpdatePushCritical(false), + messaging.WithUpdatePushPriority("normal"), ) if error != nil { diff --git a/docs/examples/1.6.x/server-graphql/examples/account/create.md b/docs/examples/1.6.x/server-graphql/examples/account/create.md index 3f8e3c3cf7..0d39394a3d 100644 --- a/docs/examples/1.6.x/server-graphql/examples/account/create.md +++ b/docs/examples/1.6.x/server-graphql/examples/account/create.md @@ -33,6 +33,7 @@ mutation { providerId providerType identifier + expired } accessedAt } diff --git a/docs/examples/1.6.x/server-graphql/examples/account/get.md b/docs/examples/1.6.x/server-graphql/examples/account/get.md index e4db8f0e41..f4f07c187f 100644 --- a/docs/examples/1.6.x/server-graphql/examples/account/get.md +++ b/docs/examples/1.6.x/server-graphql/examples/account/get.md @@ -28,6 +28,7 @@ query { providerId providerType identifier + expired } accessedAt } diff --git a/docs/examples/1.6.x/server-graphql/examples/account/update-email.md b/docs/examples/1.6.x/server-graphql/examples/account/update-email.md index b207bad4bb..c879e24a43 100644 --- a/docs/examples/1.6.x/server-graphql/examples/account/update-email.md +++ b/docs/examples/1.6.x/server-graphql/examples/account/update-email.md @@ -31,6 +31,7 @@ mutation { providerId providerType identifier + expired } accessedAt } diff --git a/docs/examples/1.6.x/server-graphql/examples/account/update-m-f-a.md b/docs/examples/1.6.x/server-graphql/examples/account/update-m-f-a.md index d2cd3d6ae5..787c2e0860 100644 --- a/docs/examples/1.6.x/server-graphql/examples/account/update-m-f-a.md +++ b/docs/examples/1.6.x/server-graphql/examples/account/update-m-f-a.md @@ -30,6 +30,7 @@ mutation { providerId providerType identifier + expired } accessedAt } diff --git a/docs/examples/1.6.x/server-graphql/examples/account/update-mfa-authenticator.md b/docs/examples/1.6.x/server-graphql/examples/account/update-mfa-authenticator.md index c74062c7d4..9cfe9150be 100644 --- a/docs/examples/1.6.x/server-graphql/examples/account/update-mfa-authenticator.md +++ b/docs/examples/1.6.x/server-graphql/examples/account/update-mfa-authenticator.md @@ -31,6 +31,7 @@ mutation { providerId providerType identifier + expired } accessedAt } diff --git a/docs/examples/1.6.x/server-graphql/examples/account/update-name.md b/docs/examples/1.6.x/server-graphql/examples/account/update-name.md index 850b5760a0..8ba2c99d9c 100644 --- a/docs/examples/1.6.x/server-graphql/examples/account/update-name.md +++ b/docs/examples/1.6.x/server-graphql/examples/account/update-name.md @@ -30,6 +30,7 @@ mutation { providerId providerType identifier + expired } accessedAt } diff --git a/docs/examples/1.6.x/server-graphql/examples/account/update-password.md b/docs/examples/1.6.x/server-graphql/examples/account/update-password.md index 5904da0842..f3619a10d2 100644 --- a/docs/examples/1.6.x/server-graphql/examples/account/update-password.md +++ b/docs/examples/1.6.x/server-graphql/examples/account/update-password.md @@ -31,6 +31,7 @@ mutation { providerId providerType identifier + expired } accessedAt } diff --git a/docs/examples/1.6.x/server-graphql/examples/account/update-phone.md b/docs/examples/1.6.x/server-graphql/examples/account/update-phone.md index 408a203300..adecb71168 100644 --- a/docs/examples/1.6.x/server-graphql/examples/account/update-phone.md +++ b/docs/examples/1.6.x/server-graphql/examples/account/update-phone.md @@ -31,6 +31,7 @@ mutation { providerId providerType identifier + expired } accessedAt } diff --git a/docs/examples/1.6.x/server-graphql/examples/account/update-prefs.md b/docs/examples/1.6.x/server-graphql/examples/account/update-prefs.md index 40db7b43db..57280247e4 100644 --- a/docs/examples/1.6.x/server-graphql/examples/account/update-prefs.md +++ b/docs/examples/1.6.x/server-graphql/examples/account/update-prefs.md @@ -30,6 +30,7 @@ mutation { providerId providerType identifier + expired } accessedAt } diff --git a/docs/examples/1.6.x/server-graphql/examples/account/update-status.md b/docs/examples/1.6.x/server-graphql/examples/account/update-status.md index aca8c098e7..c17f556842 100644 --- a/docs/examples/1.6.x/server-graphql/examples/account/update-status.md +++ b/docs/examples/1.6.x/server-graphql/examples/account/update-status.md @@ -28,6 +28,7 @@ mutation { providerId providerType identifier + expired } accessedAt } diff --git a/docs/examples/1.6.x/server-graphql/examples/databases/create-boolean-attribute.md b/docs/examples/1.6.x/server-graphql/examples/databases/create-boolean-attribute.md index 6e969a587e..aa0bfa832e 100644 --- a/docs/examples/1.6.x/server-graphql/examples/databases/create-boolean-attribute.md +++ b/docs/examples/1.6.x/server-graphql/examples/databases/create-boolean-attribute.md @@ -13,6 +13,8 @@ mutation { error required array + _createdAt + _updatedAt default } } diff --git a/docs/examples/1.6.x/server-graphql/examples/databases/create-collection.md b/docs/examples/1.6.x/server-graphql/examples/databases/create-collection.md index 05175cc1e7..51eb51f410 100644 --- a/docs/examples/1.6.x/server-graphql/examples/databases/create-collection.md +++ b/docs/examples/1.6.x/server-graphql/examples/databases/create-collection.md @@ -23,6 +23,8 @@ mutation { error attributes orders + _createdAt + _updatedAt } } } diff --git a/docs/examples/1.6.x/server-graphql/examples/databases/create-datetime-attribute.md b/docs/examples/1.6.x/server-graphql/examples/databases/create-datetime-attribute.md index fcd5cb37a2..47601df0d8 100644 --- a/docs/examples/1.6.x/server-graphql/examples/databases/create-datetime-attribute.md +++ b/docs/examples/1.6.x/server-graphql/examples/databases/create-datetime-attribute.md @@ -13,6 +13,8 @@ mutation { error required array + _createdAt + _updatedAt format default } diff --git a/docs/examples/1.6.x/server-graphql/examples/databases/create-email-attribute.md b/docs/examples/1.6.x/server-graphql/examples/databases/create-email-attribute.md index 1f23a23ba7..e5845ccd47 100644 --- a/docs/examples/1.6.x/server-graphql/examples/databases/create-email-attribute.md +++ b/docs/examples/1.6.x/server-graphql/examples/databases/create-email-attribute.md @@ -13,6 +13,8 @@ mutation { error required array + _createdAt + _updatedAt format default } diff --git a/docs/examples/1.6.x/server-graphql/examples/databases/create-enum-attribute.md b/docs/examples/1.6.x/server-graphql/examples/databases/create-enum-attribute.md index 410a7983b4..d13c080e4a 100644 --- a/docs/examples/1.6.x/server-graphql/examples/databases/create-enum-attribute.md +++ b/docs/examples/1.6.x/server-graphql/examples/databases/create-enum-attribute.md @@ -14,6 +14,8 @@ mutation { error required array + _createdAt + _updatedAt elements format default diff --git a/docs/examples/1.6.x/server-graphql/examples/databases/create-float-attribute.md b/docs/examples/1.6.x/server-graphql/examples/databases/create-float-attribute.md index ae6f9f72d6..2a270c3aff 100644 --- a/docs/examples/1.6.x/server-graphql/examples/databases/create-float-attribute.md +++ b/docs/examples/1.6.x/server-graphql/examples/databases/create-float-attribute.md @@ -15,6 +15,8 @@ mutation { error required array + _createdAt + _updatedAt min max default diff --git a/docs/examples/1.6.x/server-graphql/examples/databases/create-index.md b/docs/examples/1.6.x/server-graphql/examples/databases/create-index.md index efc92a798c..2875a9b4b7 100644 --- a/docs/examples/1.6.x/server-graphql/examples/databases/create-index.md +++ b/docs/examples/1.6.x/server-graphql/examples/databases/create-index.md @@ -13,5 +13,7 @@ mutation { error attributes orders + _createdAt + _updatedAt } } diff --git a/docs/examples/1.6.x/server-graphql/examples/databases/create-integer-attribute.md b/docs/examples/1.6.x/server-graphql/examples/databases/create-integer-attribute.md index 1dc43f6b0d..8c79706817 100644 --- a/docs/examples/1.6.x/server-graphql/examples/databases/create-integer-attribute.md +++ b/docs/examples/1.6.x/server-graphql/examples/databases/create-integer-attribute.md @@ -15,6 +15,8 @@ mutation { error required array + _createdAt + _updatedAt min max default diff --git a/docs/examples/1.6.x/server-graphql/examples/databases/create-ip-attribute.md b/docs/examples/1.6.x/server-graphql/examples/databases/create-ip-attribute.md index b2fd7215a0..0f4ad9e139 100644 --- a/docs/examples/1.6.x/server-graphql/examples/databases/create-ip-attribute.md +++ b/docs/examples/1.6.x/server-graphql/examples/databases/create-ip-attribute.md @@ -13,6 +13,8 @@ mutation { error required array + _createdAt + _updatedAt format default } diff --git a/docs/examples/1.6.x/server-graphql/examples/databases/create-relationship-attribute.md b/docs/examples/1.6.x/server-graphql/examples/databases/create-relationship-attribute.md index ddca20b83a..f66b87d6af 100644 --- a/docs/examples/1.6.x/server-graphql/examples/databases/create-relationship-attribute.md +++ b/docs/examples/1.6.x/server-graphql/examples/databases/create-relationship-attribute.md @@ -15,6 +15,8 @@ mutation { error required array + _createdAt + _updatedAt relatedCollection relationType twoWay diff --git a/docs/examples/1.6.x/server-graphql/examples/databases/create-string-attribute.md b/docs/examples/1.6.x/server-graphql/examples/databases/create-string-attribute.md index 3c290712e9..62d97d6962 100644 --- a/docs/examples/1.6.x/server-graphql/examples/databases/create-string-attribute.md +++ b/docs/examples/1.6.x/server-graphql/examples/databases/create-string-attribute.md @@ -15,6 +15,8 @@ mutation { error required array + _createdAt + _updatedAt size default } diff --git a/docs/examples/1.6.x/server-graphql/examples/databases/create-url-attribute.md b/docs/examples/1.6.x/server-graphql/examples/databases/create-url-attribute.md index d2a39756c9..89ad873e52 100644 --- a/docs/examples/1.6.x/server-graphql/examples/databases/create-url-attribute.md +++ b/docs/examples/1.6.x/server-graphql/examples/databases/create-url-attribute.md @@ -13,6 +13,8 @@ mutation { error required array + _createdAt + _updatedAt format default } diff --git a/docs/examples/1.6.x/server-graphql/examples/databases/get-collection.md b/docs/examples/1.6.x/server-graphql/examples/databases/get-collection.md index f76b71b6ba..ed27286b0d 100644 --- a/docs/examples/1.6.x/server-graphql/examples/databases/get-collection.md +++ b/docs/examples/1.6.x/server-graphql/examples/databases/get-collection.md @@ -19,6 +19,8 @@ query { error attributes orders + _createdAt + _updatedAt } } } diff --git a/docs/examples/1.6.x/server-graphql/examples/databases/get-index.md b/docs/examples/1.6.x/server-graphql/examples/databases/get-index.md index de3c44ebe0..29de7a76f8 100644 --- a/docs/examples/1.6.x/server-graphql/examples/databases/get-index.md +++ b/docs/examples/1.6.x/server-graphql/examples/databases/get-index.md @@ -10,5 +10,7 @@ query { error attributes orders + _createdAt + _updatedAt } } diff --git a/docs/examples/1.6.x/server-graphql/examples/databases/list-collections.md b/docs/examples/1.6.x/server-graphql/examples/databases/list-collections.md index b821b6c4cf..8dafbf7042 100644 --- a/docs/examples/1.6.x/server-graphql/examples/databases/list-collections.md +++ b/docs/examples/1.6.x/server-graphql/examples/databases/list-collections.md @@ -22,6 +22,8 @@ query { error attributes orders + _createdAt + _updatedAt } } } diff --git a/docs/examples/1.6.x/server-graphql/examples/databases/list-indexes.md b/docs/examples/1.6.x/server-graphql/examples/databases/list-indexes.md index e1c11b6c03..3cb67c6451 100644 --- a/docs/examples/1.6.x/server-graphql/examples/databases/list-indexes.md +++ b/docs/examples/1.6.x/server-graphql/examples/databases/list-indexes.md @@ -12,6 +12,8 @@ query { error attributes orders + _createdAt + _updatedAt } } } diff --git a/docs/examples/1.6.x/server-graphql/examples/databases/update-boolean-attribute.md b/docs/examples/1.6.x/server-graphql/examples/databases/update-boolean-attribute.md index e92b41a14e..d508e62139 100644 --- a/docs/examples/1.6.x/server-graphql/examples/databases/update-boolean-attribute.md +++ b/docs/examples/1.6.x/server-graphql/examples/databases/update-boolean-attribute.md @@ -13,6 +13,8 @@ mutation { error required array + _createdAt + _updatedAt default } } diff --git a/docs/examples/1.6.x/server-graphql/examples/databases/update-collection.md b/docs/examples/1.6.x/server-graphql/examples/databases/update-collection.md index fc78bb8efc..e918c058b8 100644 --- a/docs/examples/1.6.x/server-graphql/examples/databases/update-collection.md +++ b/docs/examples/1.6.x/server-graphql/examples/databases/update-collection.md @@ -23,6 +23,8 @@ mutation { error attributes orders + _createdAt + _updatedAt } } } diff --git a/docs/examples/1.6.x/server-graphql/examples/databases/update-datetime-attribute.md b/docs/examples/1.6.x/server-graphql/examples/databases/update-datetime-attribute.md index 46d9bbb728..a21b910edc 100644 --- a/docs/examples/1.6.x/server-graphql/examples/databases/update-datetime-attribute.md +++ b/docs/examples/1.6.x/server-graphql/examples/databases/update-datetime-attribute.md @@ -13,6 +13,8 @@ mutation { error required array + _createdAt + _updatedAt format default } diff --git a/docs/examples/1.6.x/server-graphql/examples/databases/update-email-attribute.md b/docs/examples/1.6.x/server-graphql/examples/databases/update-email-attribute.md index e05d365162..6c83d80e16 100644 --- a/docs/examples/1.6.x/server-graphql/examples/databases/update-email-attribute.md +++ b/docs/examples/1.6.x/server-graphql/examples/databases/update-email-attribute.md @@ -13,6 +13,8 @@ mutation { error required array + _createdAt + _updatedAt format default } diff --git a/docs/examples/1.6.x/server-graphql/examples/databases/update-enum-attribute.md b/docs/examples/1.6.x/server-graphql/examples/databases/update-enum-attribute.md index 619cbf817c..378e32f9b8 100644 --- a/docs/examples/1.6.x/server-graphql/examples/databases/update-enum-attribute.md +++ b/docs/examples/1.6.x/server-graphql/examples/databases/update-enum-attribute.md @@ -14,6 +14,8 @@ mutation { error required array + _createdAt + _updatedAt elements format default diff --git a/docs/examples/1.6.x/server-graphql/examples/databases/update-float-attribute.md b/docs/examples/1.6.x/server-graphql/examples/databases/update-float-attribute.md index 7641745a35..c5c7afca44 100644 --- a/docs/examples/1.6.x/server-graphql/examples/databases/update-float-attribute.md +++ b/docs/examples/1.6.x/server-graphql/examples/databases/update-float-attribute.md @@ -15,6 +15,8 @@ mutation { error required array + _createdAt + _updatedAt min max default diff --git a/docs/examples/1.6.x/server-graphql/examples/databases/update-integer-attribute.md b/docs/examples/1.6.x/server-graphql/examples/databases/update-integer-attribute.md index 11b7a66014..e38ccaa88c 100644 --- a/docs/examples/1.6.x/server-graphql/examples/databases/update-integer-attribute.md +++ b/docs/examples/1.6.x/server-graphql/examples/databases/update-integer-attribute.md @@ -15,6 +15,8 @@ mutation { error required array + _createdAt + _updatedAt min max default diff --git a/docs/examples/1.6.x/server-graphql/examples/databases/update-ip-attribute.md b/docs/examples/1.6.x/server-graphql/examples/databases/update-ip-attribute.md index 649fa881b5..7a26224200 100644 --- a/docs/examples/1.6.x/server-graphql/examples/databases/update-ip-attribute.md +++ b/docs/examples/1.6.x/server-graphql/examples/databases/update-ip-attribute.md @@ -13,6 +13,8 @@ mutation { error required array + _createdAt + _updatedAt format default } diff --git a/docs/examples/1.6.x/server-graphql/examples/databases/update-relationship-attribute.md b/docs/examples/1.6.x/server-graphql/examples/databases/update-relationship-attribute.md index 88ba2f9636..6694540d93 100644 --- a/docs/examples/1.6.x/server-graphql/examples/databases/update-relationship-attribute.md +++ b/docs/examples/1.6.x/server-graphql/examples/databases/update-relationship-attribute.md @@ -12,6 +12,8 @@ mutation { error required array + _createdAt + _updatedAt relatedCollection relationType twoWay diff --git a/docs/examples/1.6.x/server-graphql/examples/databases/update-string-attribute.md b/docs/examples/1.6.x/server-graphql/examples/databases/update-string-attribute.md index 4d88462efb..afafb307f5 100644 --- a/docs/examples/1.6.x/server-graphql/examples/databases/update-string-attribute.md +++ b/docs/examples/1.6.x/server-graphql/examples/databases/update-string-attribute.md @@ -5,7 +5,7 @@ mutation { key: "", required: false, default: "<DEFAULT>", - size: 0, + size: 1, newKey: "" ) { key @@ -14,6 +14,8 @@ mutation { error required array + _createdAt + _updatedAt size default } diff --git a/docs/examples/1.6.x/server-graphql/examples/databases/update-url-attribute.md b/docs/examples/1.6.x/server-graphql/examples/databases/update-url-attribute.md index 06838a9ed4..f9f14a04f6 100644 --- a/docs/examples/1.6.x/server-graphql/examples/databases/update-url-attribute.md +++ b/docs/examples/1.6.x/server-graphql/examples/databases/update-url-attribute.md @@ -13,6 +13,8 @@ mutation { error required array + _createdAt + _updatedAt format default } diff --git a/docs/examples/1.6.x/server-graphql/examples/messaging/create-push.md b/docs/examples/1.6.x/server-graphql/examples/messaging/create-push.md index 3084c97635..92264d1b67 100644 --- a/docs/examples/1.6.x/server-graphql/examples/messaging/create-push.md +++ b/docs/examples/1.6.x/server-graphql/examples/messaging/create-push.md @@ -13,9 +13,12 @@ mutation { sound: "<SOUND>", color: "<COLOR>", tag: "<TAG>", - badge: "<BADGE>", + badge: 0, draft: false, - scheduledAt: "" + scheduledAt: "", + contentAvailable: false, + critical: false, + priority: "normal" ) { _id _createdAt diff --git a/docs/examples/1.6.x/server-graphql/examples/messaging/create-subscriber.md b/docs/examples/1.6.x/server-graphql/examples/messaging/create-subscriber.md index b2712ebb48..bab53612b7 100644 --- a/docs/examples/1.6.x/server-graphql/examples/messaging/create-subscriber.md +++ b/docs/examples/1.6.x/server-graphql/examples/messaging/create-subscriber.md @@ -17,6 +17,7 @@ mutation { providerId providerType identifier + expired } userId userName diff --git a/docs/examples/1.6.x/server-graphql/examples/messaging/get-subscriber.md b/docs/examples/1.6.x/server-graphql/examples/messaging/get-subscriber.md index 54096dd70a..2e1672d010 100644 --- a/docs/examples/1.6.x/server-graphql/examples/messaging/get-subscriber.md +++ b/docs/examples/1.6.x/server-graphql/examples/messaging/get-subscriber.md @@ -16,6 +16,7 @@ query { providerId providerType identifier + expired } userId userName diff --git a/docs/examples/1.6.x/server-graphql/examples/messaging/list-subscribers.md b/docs/examples/1.6.x/server-graphql/examples/messaging/list-subscribers.md index 5c48ae34bb..a5a4f91e56 100644 --- a/docs/examples/1.6.x/server-graphql/examples/messaging/list-subscribers.md +++ b/docs/examples/1.6.x/server-graphql/examples/messaging/list-subscribers.md @@ -19,6 +19,7 @@ query { providerId providerType identifier + expired } userId userName diff --git a/docs/examples/1.6.x/server-graphql/examples/messaging/list-targets.md b/docs/examples/1.6.x/server-graphql/examples/messaging/list-targets.md index 8e356dce5f..aa82276de2 100644 --- a/docs/examples/1.6.x/server-graphql/examples/messaging/list-targets.md +++ b/docs/examples/1.6.x/server-graphql/examples/messaging/list-targets.md @@ -13,6 +13,7 @@ query { providerId providerType identifier + expired } } } diff --git a/docs/examples/1.6.x/server-graphql/examples/messaging/update-push.md b/docs/examples/1.6.x/server-graphql/examples/messaging/update-push.md index 9039792573..8ee2f57610 100644 --- a/docs/examples/1.6.x/server-graphql/examples/messaging/update-push.md +++ b/docs/examples/1.6.x/server-graphql/examples/messaging/update-push.md @@ -15,7 +15,10 @@ mutation { tag: "<TAG>", badge: 0, draft: false, - scheduledAt: "" + scheduledAt: "", + contentAvailable: false, + critical: false, + priority: "normal" ) { _id _createdAt diff --git a/docs/examples/1.6.x/server-graphql/examples/users/create-argon2user.md b/docs/examples/1.6.x/server-graphql/examples/users/create-argon2user.md index 464dc754c9..7f99622e52 100644 --- a/docs/examples/1.6.x/server-graphql/examples/users/create-argon2user.md +++ b/docs/examples/1.6.x/server-graphql/examples/users/create-argon2user.md @@ -33,6 +33,7 @@ mutation { providerId providerType identifier + expired } accessedAt } diff --git a/docs/examples/1.6.x/server-graphql/examples/users/create-bcrypt-user.md b/docs/examples/1.6.x/server-graphql/examples/users/create-bcrypt-user.md index 4d4bb09194..26659176eb 100644 --- a/docs/examples/1.6.x/server-graphql/examples/users/create-bcrypt-user.md +++ b/docs/examples/1.6.x/server-graphql/examples/users/create-bcrypt-user.md @@ -33,6 +33,7 @@ mutation { providerId providerType identifier + expired } accessedAt } diff --git a/docs/examples/1.6.x/server-graphql/examples/users/create-m-d5user.md b/docs/examples/1.6.x/server-graphql/examples/users/create-m-d5user.md index e8e833e6de..7e642b8233 100644 --- a/docs/examples/1.6.x/server-graphql/examples/users/create-m-d5user.md +++ b/docs/examples/1.6.x/server-graphql/examples/users/create-m-d5user.md @@ -33,6 +33,7 @@ mutation { providerId providerType identifier + expired } accessedAt } diff --git a/docs/examples/1.6.x/server-graphql/examples/users/create-p-h-pass-user.md b/docs/examples/1.6.x/server-graphql/examples/users/create-p-h-pass-user.md index 53960e7890..4c06b007a2 100644 --- a/docs/examples/1.6.x/server-graphql/examples/users/create-p-h-pass-user.md +++ b/docs/examples/1.6.x/server-graphql/examples/users/create-p-h-pass-user.md @@ -33,6 +33,7 @@ mutation { providerId providerType identifier + expired } accessedAt } diff --git a/docs/examples/1.6.x/server-graphql/examples/users/create-s-h-a-user.md b/docs/examples/1.6.x/server-graphql/examples/users/create-s-h-a-user.md index 17e287f8b3..f99da2752d 100644 --- a/docs/examples/1.6.x/server-graphql/examples/users/create-s-h-a-user.md +++ b/docs/examples/1.6.x/server-graphql/examples/users/create-s-h-a-user.md @@ -34,6 +34,7 @@ mutation { providerId providerType identifier + expired } accessedAt } diff --git a/docs/examples/1.6.x/server-graphql/examples/users/create-scrypt-modified-user.md b/docs/examples/1.6.x/server-graphql/examples/users/create-scrypt-modified-user.md index 6d51fb29ba..624ffcdd38 100644 --- a/docs/examples/1.6.x/server-graphql/examples/users/create-scrypt-modified-user.md +++ b/docs/examples/1.6.x/server-graphql/examples/users/create-scrypt-modified-user.md @@ -36,6 +36,7 @@ mutation { providerId providerType identifier + expired } accessedAt } diff --git a/docs/examples/1.6.x/server-graphql/examples/users/create-scrypt-user.md b/docs/examples/1.6.x/server-graphql/examples/users/create-scrypt-user.md index 0d4bac1db8..68a5f4c75f 100644 --- a/docs/examples/1.6.x/server-graphql/examples/users/create-scrypt-user.md +++ b/docs/examples/1.6.x/server-graphql/examples/users/create-scrypt-user.md @@ -38,6 +38,7 @@ mutation { providerId providerType identifier + expired } accessedAt } diff --git a/docs/examples/1.6.x/server-graphql/examples/users/create-target.md b/docs/examples/1.6.x/server-graphql/examples/users/create-target.md index a3a0696dec..7068c21aba 100644 --- a/docs/examples/1.6.x/server-graphql/examples/users/create-target.md +++ b/docs/examples/1.6.x/server-graphql/examples/users/create-target.md @@ -15,5 +15,6 @@ mutation { providerId providerType identifier + expired } } diff --git a/docs/examples/1.6.x/server-graphql/examples/users/create.md b/docs/examples/1.6.x/server-graphql/examples/users/create.md index 826a5168ef..465da80432 100644 --- a/docs/examples/1.6.x/server-graphql/examples/users/create.md +++ b/docs/examples/1.6.x/server-graphql/examples/users/create.md @@ -34,6 +34,7 @@ mutation { providerId providerType identifier + expired } accessedAt } diff --git a/docs/examples/1.6.x/server-graphql/examples/users/delete-mfa-authenticator.md b/docs/examples/1.6.x/server-graphql/examples/users/delete-mfa-authenticator.md index 227c340c68..26c9594a53 100644 --- a/docs/examples/1.6.x/server-graphql/examples/users/delete-mfa-authenticator.md +++ b/docs/examples/1.6.x/server-graphql/examples/users/delete-mfa-authenticator.md @@ -31,6 +31,7 @@ mutation { providerId providerType identifier + expired } accessedAt } diff --git a/docs/examples/1.6.x/server-graphql/examples/users/get-target.md b/docs/examples/1.6.x/server-graphql/examples/users/get-target.md index e4ba1a04a1..c84f947898 100644 --- a/docs/examples/1.6.x/server-graphql/examples/users/get-target.md +++ b/docs/examples/1.6.x/server-graphql/examples/users/get-target.md @@ -11,5 +11,6 @@ query { providerId providerType identifier + expired } } diff --git a/docs/examples/1.6.x/server-graphql/examples/users/get.md b/docs/examples/1.6.x/server-graphql/examples/users/get.md index f94a5818ed..9d0be685d9 100644 --- a/docs/examples/1.6.x/server-graphql/examples/users/get.md +++ b/docs/examples/1.6.x/server-graphql/examples/users/get.md @@ -30,6 +30,7 @@ query { providerId providerType identifier + expired } accessedAt } diff --git a/docs/examples/1.6.x/server-graphql/examples/users/list-targets.md b/docs/examples/1.6.x/server-graphql/examples/users/list-targets.md index 05e796f167..408fd96f80 100644 --- a/docs/examples/1.6.x/server-graphql/examples/users/list-targets.md +++ b/docs/examples/1.6.x/server-graphql/examples/users/list-targets.md @@ -13,6 +13,7 @@ query { providerId providerType identifier + expired } } } diff --git a/docs/examples/1.6.x/server-graphql/examples/users/list.md b/docs/examples/1.6.x/server-graphql/examples/users/list.md index e2326dd1a2..a90121adf2 100644 --- a/docs/examples/1.6.x/server-graphql/examples/users/list.md +++ b/docs/examples/1.6.x/server-graphql/examples/users/list.md @@ -33,6 +33,7 @@ query { providerId providerType identifier + expired } accessedAt } diff --git a/docs/examples/1.6.x/server-graphql/examples/users/update-email-verification.md b/docs/examples/1.6.x/server-graphql/examples/users/update-email-verification.md index 6bb2781854..cda7278ac0 100644 --- a/docs/examples/1.6.x/server-graphql/examples/users/update-email-verification.md +++ b/docs/examples/1.6.x/server-graphql/examples/users/update-email-verification.md @@ -31,6 +31,7 @@ mutation { providerId providerType identifier + expired } accessedAt } diff --git a/docs/examples/1.6.x/server-graphql/examples/users/update-email.md b/docs/examples/1.6.x/server-graphql/examples/users/update-email.md index 046937ac04..408a74972b 100644 --- a/docs/examples/1.6.x/server-graphql/examples/users/update-email.md +++ b/docs/examples/1.6.x/server-graphql/examples/users/update-email.md @@ -31,6 +31,7 @@ mutation { providerId providerType identifier + expired } accessedAt } diff --git a/docs/examples/1.6.x/server-graphql/examples/users/update-labels.md b/docs/examples/1.6.x/server-graphql/examples/users/update-labels.md index 93da33d805..cb3c5b6483 100644 --- a/docs/examples/1.6.x/server-graphql/examples/users/update-labels.md +++ b/docs/examples/1.6.x/server-graphql/examples/users/update-labels.md @@ -31,6 +31,7 @@ mutation { providerId providerType identifier + expired } accessedAt } diff --git a/docs/examples/1.6.x/server-graphql/examples/users/update-mfa.md b/docs/examples/1.6.x/server-graphql/examples/users/update-mfa.md index 9219aa1aea..ac09ea19a4 100644 --- a/docs/examples/1.6.x/server-graphql/examples/users/update-mfa.md +++ b/docs/examples/1.6.x/server-graphql/examples/users/update-mfa.md @@ -31,6 +31,7 @@ mutation { providerId providerType identifier + expired } accessedAt } diff --git a/docs/examples/1.6.x/server-graphql/examples/users/update-name.md b/docs/examples/1.6.x/server-graphql/examples/users/update-name.md index 01a53ce479..ec7e3dc27c 100644 --- a/docs/examples/1.6.x/server-graphql/examples/users/update-name.md +++ b/docs/examples/1.6.x/server-graphql/examples/users/update-name.md @@ -31,6 +31,7 @@ mutation { providerId providerType identifier + expired } accessedAt } diff --git a/docs/examples/1.6.x/server-graphql/examples/users/update-password.md b/docs/examples/1.6.x/server-graphql/examples/users/update-password.md index c95637c4ce..95ef74c83d 100644 --- a/docs/examples/1.6.x/server-graphql/examples/users/update-password.md +++ b/docs/examples/1.6.x/server-graphql/examples/users/update-password.md @@ -31,6 +31,7 @@ mutation { providerId providerType identifier + expired } accessedAt } diff --git a/docs/examples/1.6.x/server-graphql/examples/users/update-phone-verification.md b/docs/examples/1.6.x/server-graphql/examples/users/update-phone-verification.md index 58343ae365..c6afa54ba4 100644 --- a/docs/examples/1.6.x/server-graphql/examples/users/update-phone-verification.md +++ b/docs/examples/1.6.x/server-graphql/examples/users/update-phone-verification.md @@ -31,6 +31,7 @@ mutation { providerId providerType identifier + expired } accessedAt } diff --git a/docs/examples/1.6.x/server-graphql/examples/users/update-phone.md b/docs/examples/1.6.x/server-graphql/examples/users/update-phone.md index dbcb076c65..d3fc7d5f37 100644 --- a/docs/examples/1.6.x/server-graphql/examples/users/update-phone.md +++ b/docs/examples/1.6.x/server-graphql/examples/users/update-phone.md @@ -31,6 +31,7 @@ mutation { providerId providerType identifier + expired } accessedAt } diff --git a/docs/examples/1.6.x/server-graphql/examples/users/update-status.md b/docs/examples/1.6.x/server-graphql/examples/users/update-status.md index ad05bc75ff..2499c1c258 100644 --- a/docs/examples/1.6.x/server-graphql/examples/users/update-status.md +++ b/docs/examples/1.6.x/server-graphql/examples/users/update-status.md @@ -31,6 +31,7 @@ mutation { providerId providerType identifier + expired } accessedAt } diff --git a/docs/examples/1.6.x/server-graphql/examples/users/update-target.md b/docs/examples/1.6.x/server-graphql/examples/users/update-target.md index fe3444ede7..1f7cc1147a 100644 --- a/docs/examples/1.6.x/server-graphql/examples/users/update-target.md +++ b/docs/examples/1.6.x/server-graphql/examples/users/update-target.md @@ -14,5 +14,6 @@ mutation { providerId providerType identifier + expired } } diff --git a/docs/examples/1.6.x/server-kotlin/java/databases/update-string-attribute.md b/docs/examples/1.6.x/server-kotlin/java/databases/update-string-attribute.md index 75be9e01f8..2d69006181 100644 --- a/docs/examples/1.6.x/server-kotlin/java/databases/update-string-attribute.md +++ b/docs/examples/1.6.x/server-kotlin/java/databases/update-string-attribute.md @@ -15,7 +15,7 @@ databases.updateStringAttribute( "", // key false, // required "<DEFAULT>", // default - 0, // size (optional) + 1, // size (optional) "", // newKey (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { diff --git a/docs/examples/1.6.x/server-kotlin/java/messaging/create-push.md b/docs/examples/1.6.x/server-kotlin/java/messaging/create-push.md index 934f1faaa8..56c7a60795 100644 --- a/docs/examples/1.6.x/server-kotlin/java/messaging/create-push.md +++ b/docs/examples/1.6.x/server-kotlin/java/messaging/create-push.md @@ -11,8 +11,8 @@ Messaging messaging = new Messaging(client); messaging.createPush( "<MESSAGE_ID>", // messageId - "<TITLE>", // title - "<BODY>", // body + "<TITLE>", // title (optional) + "<BODY>", // body (optional) listOf(), // topics (optional) listOf(), // users (optional) listOf(), // targets (optional) @@ -23,9 +23,12 @@ messaging.createPush( "<SOUND>", // sound (optional) "<COLOR>", // color (optional) "<TAG>", // tag (optional) - "<BADGE>", // badge (optional) + 0, // badge (optional) false, // draft (optional) "", // scheduledAt (optional) + false, // contentAvailable (optional) + false, // critical (optional) + MessagePriority.NORMAL, // priority (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/1.6.x/server-kotlin/java/messaging/update-push.md b/docs/examples/1.6.x/server-kotlin/java/messaging/update-push.md index ef04203c37..bb8c3c8c2e 100644 --- a/docs/examples/1.6.x/server-kotlin/java/messaging/update-push.md +++ b/docs/examples/1.6.x/server-kotlin/java/messaging/update-push.md @@ -26,6 +26,9 @@ messaging.updatePush( 0, // badge (optional) false, // draft (optional) "", // scheduledAt (optional) + false, // contentAvailable (optional) + false, // critical (optional) + MessagePriority.NORMAL, // priority (optional) new CoroutineCallback<>((result, error) -> { if (error != null) { error.printStackTrace(); diff --git a/docs/examples/1.6.x/server-kotlin/kotlin/databases/update-string-attribute.md b/docs/examples/1.6.x/server-kotlin/kotlin/databases/update-string-attribute.md index a37d4566ee..32e17beb9c 100644 --- a/docs/examples/1.6.x/server-kotlin/kotlin/databases/update-string-attribute.md +++ b/docs/examples/1.6.x/server-kotlin/kotlin/databases/update-string-attribute.md @@ -15,6 +15,6 @@ val response = databases.updateStringAttribute( key = "", required = false, default = "<DEFAULT>", - size = 0, // optional + size = 1, // optional newKey = "" // optional ) diff --git a/docs/examples/1.6.x/server-kotlin/kotlin/messaging/create-push.md b/docs/examples/1.6.x/server-kotlin/kotlin/messaging/create-push.md index 6a95f63992..f92a49d627 100644 --- a/docs/examples/1.6.x/server-kotlin/kotlin/messaging/create-push.md +++ b/docs/examples/1.6.x/server-kotlin/kotlin/messaging/create-push.md @@ -11,8 +11,8 @@ val messaging = Messaging(client) val response = messaging.createPush( messageId = "<MESSAGE_ID>", - title = "<TITLE>", - body = "<BODY>", + title = "<TITLE>", // optional + body = "<BODY>", // optional topics = listOf(), // optional users = listOf(), // optional targets = listOf(), // optional @@ -23,7 +23,10 @@ val response = messaging.createPush( sound = "<SOUND>", // optional color = "<COLOR>", // optional tag = "<TAG>", // optional - badge = "<BADGE>", // optional + badge = 0, // optional draft = false, // optional - scheduledAt = "" // optional + scheduledAt = "", // optional + contentAvailable = false, // optional + critical = false, // optional + priority = "normal" // optional ) diff --git a/docs/examples/1.6.x/server-kotlin/kotlin/messaging/update-push.md b/docs/examples/1.6.x/server-kotlin/kotlin/messaging/update-push.md index d91694e1bc..0ba72c461c 100644 --- a/docs/examples/1.6.x/server-kotlin/kotlin/messaging/update-push.md +++ b/docs/examples/1.6.x/server-kotlin/kotlin/messaging/update-push.md @@ -25,5 +25,8 @@ val response = messaging.updatePush( tag = "<TAG>", // optional badge = 0, // optional draft = false, // optional - scheduledAt = "" // optional + scheduledAt = "", // optional + contentAvailable = false, // optional + critical = false, // optional + priority = "normal" // optional ) diff --git a/docs/examples/1.6.x/server-nodejs/examples/databases/update-string-attribute.md b/docs/examples/1.6.x/server-nodejs/examples/databases/update-string-attribute.md index f379fdc0cf..6aecbb591e 100644 --- a/docs/examples/1.6.x/server-nodejs/examples/databases/update-string-attribute.md +++ b/docs/examples/1.6.x/server-nodejs/examples/databases/update-string-attribute.md @@ -13,6 +13,6 @@ const result = await databases.updateStringAttribute( '', // key false, // required '<DEFAULT>', // default - null, // size (optional) + 1, // size (optional) '' // newKey (optional) ); diff --git a/docs/examples/1.6.x/server-nodejs/examples/messaging/create-push.md b/docs/examples/1.6.x/server-nodejs/examples/messaging/create-push.md index 54103e11f7..bb98538748 100644 --- a/docs/examples/1.6.x/server-nodejs/examples/messaging/create-push.md +++ b/docs/examples/1.6.x/server-nodejs/examples/messaging/create-push.md @@ -9,8 +9,8 @@ const messaging = new sdk.Messaging(client); const result = await messaging.createPush( '<MESSAGE_ID>', // messageId - '<TITLE>', // title - '<BODY>', // body + '<TITLE>', // title (optional) + '<BODY>', // body (optional) [], // topics (optional) [], // users (optional) [], // targets (optional) @@ -21,7 +21,10 @@ const result = await messaging.createPush( '<SOUND>', // sound (optional) '<COLOR>', // color (optional) '<TAG>', // tag (optional) - '<BADGE>', // badge (optional) + null, // badge (optional) false, // draft (optional) - '' // scheduledAt (optional) + '', // scheduledAt (optional) + false, // contentAvailable (optional) + false, // critical (optional) + sdk.MessagePriority.Normal // priority (optional) ); diff --git a/docs/examples/1.6.x/server-nodejs/examples/messaging/update-push.md b/docs/examples/1.6.x/server-nodejs/examples/messaging/update-push.md index ec87ecf7cf..700c3a99de 100644 --- a/docs/examples/1.6.x/server-nodejs/examples/messaging/update-push.md +++ b/docs/examples/1.6.x/server-nodejs/examples/messaging/update-push.md @@ -23,5 +23,8 @@ const result = await messaging.updatePush( '<TAG>', // tag (optional) null, // badge (optional) false, // draft (optional) - '' // scheduledAt (optional) + '', // scheduledAt (optional) + false, // contentAvailable (optional) + false, // critical (optional) + sdk.MessagePriority.Normal // priority (optional) ); diff --git a/docs/examples/1.6.x/server-php/examples/databases/update-string-attribute.md b/docs/examples/1.6.x/server-php/examples/databases/update-string-attribute.md index 9e821e4436..721ba324de 100644 --- a/docs/examples/1.6.x/server-php/examples/databases/update-string-attribute.md +++ b/docs/examples/1.6.x/server-php/examples/databases/update-string-attribute.md @@ -16,6 +16,6 @@ $result = $databases->updateStringAttribute( key: '', required: false, default: '<DEFAULT>', - size: null, // optional + size: 1, // optional newKey: '' // optional ); \ No newline at end of file diff --git a/docs/examples/1.6.x/server-php/examples/messaging/create-push.md b/docs/examples/1.6.x/server-php/examples/messaging/create-push.md index 7838576df0..9aaf6ad4ad 100644 --- a/docs/examples/1.6.x/server-php/examples/messaging/create-push.md +++ b/docs/examples/1.6.x/server-php/examples/messaging/create-push.md @@ -12,8 +12,8 @@ $messaging = new Messaging($client); $result = $messaging->createPush( messageId: '<MESSAGE_ID>', - title: '<TITLE>', - body: '<BODY>', + title: '<TITLE>', // optional + body: '<BODY>', // optional topics: [], // optional users: [], // optional targets: [], // optional @@ -24,7 +24,10 @@ $result = $messaging->createPush( sound: '<SOUND>', // optional color: '<COLOR>', // optional tag: '<TAG>', // optional - badge: '<BADGE>', // optional + badge: null, // optional draft: false, // optional - scheduledAt: '' // optional + scheduledAt: '', // optional + contentAvailable: false, // optional + critical: false, // optional + priority: MessagePriority::NORMAL() // optional ); \ No newline at end of file diff --git a/docs/examples/1.6.x/server-php/examples/messaging/update-push.md b/docs/examples/1.6.x/server-php/examples/messaging/update-push.md index 09a4d96042..7546fc8668 100644 --- a/docs/examples/1.6.x/server-php/examples/messaging/update-push.md +++ b/docs/examples/1.6.x/server-php/examples/messaging/update-push.md @@ -26,5 +26,8 @@ $result = $messaging->updatePush( tag: '<TAG>', // optional badge: null, // optional draft: false, // optional - scheduledAt: '' // optional + scheduledAt: '', // optional + contentAvailable: false, // optional + critical: false, // optional + priority: MessagePriority::NORMAL() // optional ); \ No newline at end of file diff --git a/docs/examples/1.6.x/server-python/examples/databases/update-string-attribute.md b/docs/examples/1.6.x/server-python/examples/databases/update-string-attribute.md index bbe7ddb19f..ab910d9800 100644 --- a/docs/examples/1.6.x/server-python/examples/databases/update-string-attribute.md +++ b/docs/examples/1.6.x/server-python/examples/databases/update-string-attribute.md @@ -13,6 +13,6 @@ result = databases.update_string_attribute( key = '', required = False, default = '<DEFAULT>', - size = None, # optional + size = 1, # optional new_key = '' # optional ) diff --git a/docs/examples/1.6.x/server-python/examples/messaging/create-push.md b/docs/examples/1.6.x/server-python/examples/messaging/create-push.md index ffed825a3d..616b945d33 100644 --- a/docs/examples/1.6.x/server-python/examples/messaging/create-push.md +++ b/docs/examples/1.6.x/server-python/examples/messaging/create-push.md @@ -9,8 +9,8 @@ messaging = Messaging(client) result = messaging.create_push( message_id = '<MESSAGE_ID>', - title = '<TITLE>', - body = '<BODY>', + title = '<TITLE>', # optional + body = '<BODY>', # optional topics = [], # optional users = [], # optional targets = [], # optional @@ -21,7 +21,10 @@ result = messaging.create_push( sound = '<SOUND>', # optional color = '<COLOR>', # optional tag = '<TAG>', # optional - badge = '<BADGE>', # optional + badge = None, # optional draft = False, # optional - scheduled_at = '' # optional + scheduled_at = '', # optional + content_available = False, # optional + critical = False, # optional + priority = MessagePriority.NORMAL # optional ) diff --git a/docs/examples/1.6.x/server-python/examples/messaging/update-push.md b/docs/examples/1.6.x/server-python/examples/messaging/update-push.md index 3c3965c3bd..f5bdf155e6 100644 --- a/docs/examples/1.6.x/server-python/examples/messaging/update-push.md +++ b/docs/examples/1.6.x/server-python/examples/messaging/update-push.md @@ -23,5 +23,8 @@ result = messaging.update_push( tag = '<TAG>', # optional badge = None, # optional draft = False, # optional - scheduled_at = '' # optional + scheduled_at = '', # optional + content_available = False, # optional + critical = False, # optional + priority = MessagePriority.NORMAL # optional ) diff --git a/docs/examples/1.6.x/server-rest/examples/databases/update-string-attribute.md b/docs/examples/1.6.x/server-rest/examples/databases/update-string-attribute.md index 197ea2767d..71a5302e1a 100644 --- a/docs/examples/1.6.x/server-rest/examples/databases/update-string-attribute.md +++ b/docs/examples/1.6.x/server-rest/examples/databases/update-string-attribute.md @@ -8,6 +8,6 @@ X-Appwrite-Key: <YOUR_API_KEY> { "required": false, "default": "<DEFAULT>", - "size": 0, + "size": 1, "newKey": } diff --git a/docs/examples/1.6.x/server-rest/examples/messaging/create-push.md b/docs/examples/1.6.x/server-rest/examples/messaging/create-push.md index 1c7550950b..cf5256d921 100644 --- a/docs/examples/1.6.x/server-rest/examples/messaging/create-push.md +++ b/docs/examples/1.6.x/server-rest/examples/messaging/create-push.md @@ -19,7 +19,10 @@ X-Appwrite-Key: <YOUR_API_KEY> "sound": "<SOUND>", "color": "<COLOR>", "tag": "<TAG>", - "badge": "<BADGE>", + "badge": 0, "draft": false, - "scheduledAt": + "scheduledAt": , + "contentAvailable": false, + "critical": false, + "priority": "normal" } diff --git a/docs/examples/1.6.x/server-rest/examples/messaging/update-push.md b/docs/examples/1.6.x/server-rest/examples/messaging/update-push.md index 7a0338c74b..2159bc8aa2 100644 --- a/docs/examples/1.6.x/server-rest/examples/messaging/update-push.md +++ b/docs/examples/1.6.x/server-rest/examples/messaging/update-push.md @@ -20,5 +20,8 @@ X-Appwrite-Key: <YOUR_API_KEY> "tag": "<TAG>", "badge": 0, "draft": false, - "scheduledAt": + "scheduledAt": , + "contentAvailable": false, + "critical": false, + "priority": "normal" } diff --git a/docs/examples/1.6.x/server-ruby/examples/databases/update-string-attribute.md b/docs/examples/1.6.x/server-ruby/examples/databases/update-string-attribute.md index 3b3c5eb644..5e4ac573dc 100644 --- a/docs/examples/1.6.x/server-ruby/examples/databases/update-string-attribute.md +++ b/docs/examples/1.6.x/server-ruby/examples/databases/update-string-attribute.md @@ -15,6 +15,6 @@ result = databases.update_string_attribute( key: '', required: false, default: '<DEFAULT>', - size: null, # optional + size: 1, # optional new_key: '' # optional ) diff --git a/docs/examples/1.6.x/server-ruby/examples/messaging/create-push.md b/docs/examples/1.6.x/server-ruby/examples/messaging/create-push.md index 1c6700db43..61663f4dc0 100644 --- a/docs/examples/1.6.x/server-ruby/examples/messaging/create-push.md +++ b/docs/examples/1.6.x/server-ruby/examples/messaging/create-push.md @@ -11,8 +11,8 @@ messaging = Messaging.new(client) result = messaging.create_push( message_id: '<MESSAGE_ID>', - title: '<TITLE>', - body: '<BODY>', + title: '<TITLE>', # optional + body: '<BODY>', # optional topics: [], # optional users: [], # optional targets: [], # optional @@ -23,7 +23,10 @@ result = messaging.create_push( sound: '<SOUND>', # optional color: '<COLOR>', # optional tag: '<TAG>', # optional - badge: '<BADGE>', # optional + badge: null, # optional draft: false, # optional - scheduled_at: '' # optional + scheduled_at: '', # optional + content_available: false, # optional + critical: false, # optional + priority: MessagePriority::NORMAL # optional ) diff --git a/docs/examples/1.6.x/server-ruby/examples/messaging/update-push.md b/docs/examples/1.6.x/server-ruby/examples/messaging/update-push.md index 54f6368eee..6bf9fcaa79 100644 --- a/docs/examples/1.6.x/server-ruby/examples/messaging/update-push.md +++ b/docs/examples/1.6.x/server-ruby/examples/messaging/update-push.md @@ -25,5 +25,8 @@ result = messaging.update_push( tag: '<TAG>', # optional badge: null, # optional draft: false, # optional - scheduled_at: '' # optional + scheduled_at: '', # optional + content_available: false, # optional + critical: false, # optional + priority: MessagePriority::NORMAL # optional ) diff --git a/docs/examples/1.6.x/server-swift/examples/databases/update-string-attribute.md b/docs/examples/1.6.x/server-swift/examples/databases/update-string-attribute.md index 5fafd5e72e..d3129dcce2 100644 --- a/docs/examples/1.6.x/server-swift/examples/databases/update-string-attribute.md +++ b/docs/examples/1.6.x/server-swift/examples/databases/update-string-attribute.md @@ -13,7 +13,7 @@ let attributeString = try await databases.updateStringAttribute( key: "", required: false, default: "<DEFAULT>", - size: 0, // optional + size: 1, // optional newKey: "" // optional ) diff --git a/docs/examples/1.6.x/server-swift/examples/messaging/create-push.md b/docs/examples/1.6.x/server-swift/examples/messaging/create-push.md index dbc7bf0ca6..42f48ddd2e 100644 --- a/docs/examples/1.6.x/server-swift/examples/messaging/create-push.md +++ b/docs/examples/1.6.x/server-swift/examples/messaging/create-push.md @@ -1,4 +1,5 @@ import Appwrite +import AppwriteEnums let client = Client() .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint @@ -9,8 +10,8 @@ let messaging = Messaging(client) let message = try await messaging.createPush( messageId: "<MESSAGE_ID>", - title: "<TITLE>", - body: "<BODY>", + title: "<TITLE>", // optional + body: "<BODY>", // optional topics: [], // optional users: [], // optional targets: [], // optional @@ -21,8 +22,11 @@ let message = try await messaging.createPush( sound: "<SOUND>", // optional color: "<COLOR>", // optional tag: "<TAG>", // optional - badge: "<BADGE>", // optional + badge: 0, // optional draft: false, // optional - scheduledAt: "" // optional + scheduledAt: "", // optional + contentAvailable: false, // optional + critical: false, // optional + priority: .normal // optional ) diff --git a/docs/examples/1.6.x/server-swift/examples/messaging/update-push.md b/docs/examples/1.6.x/server-swift/examples/messaging/update-push.md index 40ce34bf66..02893a180a 100644 --- a/docs/examples/1.6.x/server-swift/examples/messaging/update-push.md +++ b/docs/examples/1.6.x/server-swift/examples/messaging/update-push.md @@ -1,4 +1,5 @@ import Appwrite +import AppwriteEnums let client = Client() .setEndpoint("https://cloud.appwrite.io/v1") // Your API Endpoint @@ -23,6 +24,9 @@ let message = try await messaging.updatePush( tag: "<TAG>", // optional badge: 0, // optional draft: false, // optional - scheduledAt: "" // optional + scheduledAt: "", // optional + contentAvailable: false, // optional + critical: false, // optional + priority: .normal // optional ) diff --git a/src/Appwrite/Platform/Tasks/SDKs.php b/src/Appwrite/Platform/Tasks/SDKs.php index 6e37f270a4..126dcd7fb4 100644 --- a/src/Appwrite/Platform/Tasks/SDKs.php +++ b/src/Appwrite/Platform/Tasks/SDKs.php @@ -41,15 +41,15 @@ class SDKs extends Action $this ->desc('Generate Appwrite SDKs') ->param('platform', null, new Nullable(new Text(256)), 'Selected Platform', optional: true) - ->param('sdk', null, new Nullable(new Text(256)), 'Selected SDK', optional:true) - ->param('version', null, new Nullable(new Text(256)), 'Selected SDK', optional:true) + ->param('sdk', null, new Nullable(new Text(256)), 'Selected SDK', optional: true) + ->param('version', null, new Nullable(new Text(256)), 'Selected SDK', optional: true) ->param('git', null, new Nullable(new WhiteList(['yes', 'no'])), 'Should we use git push?', optional: true) - ->param('production', null, new Nullable(new WhiteList(['yes', 'no'])), 'Should we push to production?', optional:true) - ->param('message', null, new Nullable(new Text(256)), 'Commit Message', optional:true) + ->param('production', null, new Nullable(new WhiteList(['yes', 'no'])), 'Should we push to production?', optional: true) + ->param('message', null, new Nullable(new Text(256)), 'Commit Message', optional: true) ->callback([$this, 'action']); } - public function action(?string $selectedPlatform, ?string $selectedSDK, ?string $version, ?string $git, ?string $production, ?string $message) + public function action(?string $selectedPlatform, ?string $selectedSDK, ?string $version, ?string $git, ?string $production, ?string $message): void { $selectedPlatform ??= Console::confirm('Choose Platform ("' . APP_PLATFORM_CLIENT . '", "' . APP_PLATFORM_SERVER . '", "' . APP_PLATFORM_CONSOLE . '" or "*" for all):'); $selectedSDK ??= \strtolower(Console::confirm('Choose SDK ("*" for all):')); @@ -275,9 +275,13 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND \exec('rm -rf ' . $target . ' && \ mkdir -p ' . $target . ' && \ cd ' . $target . ' && \ - git init --initial-branch=' . $gitBranch . ' && \ + git init && \ git remote add origin ' . $gitUrl . ' && \ - git fetch origin ' . $gitBranch . ' && \ + git fetch origin && \ + git checkout main || git checkout -b main && \ + git pull origin main && \ + git checkout ' . $gitBranch . ' || git checkout -b ' . $gitBranch . ' && \ + git fetch origin ' . $gitBranch . ' || git push -u origin ' . $gitBranch . ' && \ git pull origin ' . $gitBranch . ' && \ rm -rf ' . $target . '/* && \ cp -r ' . $result . '/. ' . $target . '/ && \ diff --git a/src/Appwrite/Platform/Workers/Messaging.php b/src/Appwrite/Platform/Workers/Messaging.php index 1ff032c3e1..6e27f16c2a 100644 --- a/src/Appwrite/Platform/Workers/Messaging.php +++ b/src/Appwrite/Platform/Workers/Messaging.php @@ -32,6 +32,7 @@ use Utopia\Messaging\Messages\Email; use Utopia\Messaging\Messages\Email\Attachment; use Utopia\Messaging\Messages\Push; use Utopia\Messaging\Messages\SMS; +use Utopia\Messaging\Priority; use Utopia\Platform\Action; use Utopia\Queue\Message; use Utopia\Storage\Device; @@ -275,7 +276,7 @@ class Messaging extends Action Query::equal('identifier', [$result['recipient']]) ]); - if ($target instanceof Document && !$target->isEmpty()) { + if (!$target->isEmpty()) { $dbForProject->updateDocument( 'targets', $target->getId(), @@ -287,7 +288,7 @@ class Messaging extends Action } catch (\Throwable $e) { $deliveryErrors[] = 'Failed sending to targets with error: ' . $e->getMessage(); } finally { - $errorTotal = count($deliveryErrors); + $errorTotal = \count($deliveryErrors); $queueForUsage ->setProject($project) ->addMetric(METRIC_MESSAGES, ($deliveredTotal + $errorTotal)) @@ -333,7 +334,6 @@ class Messaging extends Action $message->setAttribute('status', MessageStatus::SENT); } - $message->removeAttribute('to'); foreach ($providers as $provider) { @@ -666,8 +666,8 @@ class Messaging extends Action private function buildPushMessage(Document $message): Push { $to = $message['to']; - $title = $message['data']['title']; - $body = $message['data']['body']; + $title = $message['data']['title'] ?? null; + $body = $message['data']['body'] ?? null; $data = $message['data']['data'] ?? null; $action = $message['data']['action'] ?? null; $image = $message['data']['image']['url'] ?? null; @@ -676,6 +676,21 @@ class Messaging extends Action $color = $message['data']['color'] ?? null; $tag = $message['data']['tag'] ?? null; $badge = $message['data']['badge'] ?? null; + $contentAvailable = $message['data']['contentAvailable'] ?? null; + $critical = $message['data']['critical'] ?? null; + $priority = $message['data']['priority'] ?? null; + + if ($title === '') { + $title = null; + } + if ($body === '') { + $body = null; + } + if ($priority !== null) { + $priority = $priority === 'high' + ? Priority::HIGH + : Priority::NORMAL; + } return new Push( $to, @@ -688,7 +703,10 @@ class Messaging extends Action $icon, $color, $tag, - $badge + $badge, + $contentAvailable, + $critical, + $priority ); } diff --git a/src/Appwrite/Specification/Format.php b/src/Appwrite/Specification/Format.php index 30ce6470e1..8396f5cb7c 100644 --- a/src/Appwrite/Specification/Format.php +++ b/src/Appwrite/Specification/Format.php @@ -215,6 +215,8 @@ abstract class Format switch ($param) { case 'status': return 'MessageStatus'; + case 'priority': + return 'MessagePriority'; } break; case 'createSmtpProvider': diff --git a/src/Appwrite/Specification/Format/Swagger2.php b/src/Appwrite/Specification/Format/Swagger2.php index 66a540a4d4..b10188525e 100644 --- a/src/Appwrite/Specification/Format/Swagger2.php +++ b/src/Appwrite/Specification/Format/Swagger2.php @@ -34,7 +34,6 @@ class Swagger2 extends Format foreach ($this->models as $m) { if ($m->getType() === $ruleType) { $this->getNestedModels($m, $usedModels); - continue; } } } @@ -46,7 +45,6 @@ class Swagger2 extends Format foreach ($this->models as $m) { if ($m->getType() === $rule['type']) { $this->getNestedModels($m, $usedModels); - continue; } } }