diff --git a/src/main/resources/META-INF/schemas/sync-data-message.schema.json b/src/main/resources/META-INF/schemas/sync-data-message.schema.json index d3cb4a50..f61c33a5 100644 --- a/src/main/resources/META-INF/schemas/sync-data-message.schema.json +++ b/src/main/resources/META-INF/schemas/sync-data-message.schema.json @@ -4,6 +4,18 @@ "title": "SyncDataMessage", "type": "object", "properties": { + "destination": { + "type": "string" + }, + "destinationNumber": { + "type": "string" + }, + "destinationUuid": { + "type": "string" + }, + "editMessage": { + "$ref": "https://example.com/schemas/edit-message.schema.json" + }, "adminDelete": { "$ref": "https://example.com/schemas/admin-delete.schema.json" }, @@ -19,18 +31,6 @@ "$ref": "https://example.com/schemas/shared-contact.schema.json" } }, - "destination": { - "type": "string" - }, - "destinationNumber": { - "type": "string" - }, - "destinationUuid": { - "type": "string" - }, - "editMessage": { - "$ref": "https://example.com/schemas/edit-message.schema.json" - }, "expiresInSeconds": { "type": "integer" }, @@ -104,8 +104,6 @@ "required": [ "destinationNumber", "destinationUuid", - "message", - "expiresInSeconds", "timestamp" ] } diff --git a/src/main/resources/META-INF/schemas/sync-message.schema.json b/src/main/resources/META-INF/schemas/sync-message.schema.json index 26b2a1c7..5dc499f7 100644 --- a/src/main/resources/META-INF/schemas/sync-message.schema.json +++ b/src/main/resources/META-INF/schemas/sync-message.schema.json @@ -1,40 +1,40 @@ { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/schemas/sync-message.schema.json", - "title": "SyncMessage", - "type": "object", - "properties": { - "blockedGroupIds": { - "type": "array", - "items": { - "type": "string" - } - }, - "blockedNumbers": { - "type": "array", - "items": { - "type": "string" - } - }, - "readMessages": { - "type": "array", - "items": { - "$ref": "https://example.com/schemas/sync-read-message.schema.json" - } - }, - "sentMessage": { - "$ref": "https://example.com/schemas/sync-data-message.schema.json" - }, - "sentStoryMessage": { - "$ref": "https://example.com/schemas/sync-story-message.schema.json" - }, - "type": { - "type": "string", - "enum": [ - "CONTACTS_SYNC", - "GROUPS_SYNC", - "REQUEST_SYNC" - ] + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://example.com/schemas/sync-message.schema.json", + "title": "SyncMessage", + "type": "object", + "properties": { + "blockedGroupIds": { + "type": "array", + "items": { + "type": "string" + } + }, + "blockedNumbers": { + "type": "array", + "items": { + "type": "string" + } + }, + "readMessages": { + "type": "array", + "items": { + "$ref": "https://example.com/schemas/sync-read-message.schema.json" + } + }, + "sentMessage": { + "$ref": "https://example.com/schemas/sync-data-message.schema.json" + }, + "sentStoryMessage": { + "$ref": "https://example.com/schemas/sync-story-message.schema.json" + }, + "type": { + "type": "string", + "enum": [ + "CONTACTS_SYNC", + "GROUPS_SYNC", + "REQUEST_SYNC" + ] + } } - } -} +} \ No newline at end of file diff --git a/src/main/resources/META-INF/schemas/sync-story-message.schema.json b/src/main/resources/META-INF/schemas/sync-story-message.schema.json index d17a775c..6dcfec8f 100644 --- a/src/main/resources/META-INF/schemas/sync-story-message.schema.json +++ b/src/main/resources/META-INF/schemas/sync-story-message.schema.json @@ -4,15 +4,15 @@ "title": "SyncStoryMessage", "type": "object", "properties": { - "allowsReplies": { - "type": "boolean" - }, "destinationNumber": { "type": "string" }, "destinationUuid": { "type": "string" }, + "allowsReplies": { + "type": "boolean" + }, "fileAttachment": { "$ref": "https://example.com/schemas/attachment.schema.json" }, @@ -20,13 +20,38 @@ "type": "string" }, "textAttachment": { + "title": "JsonStoryMessage.TextAttachment", "type": "object", "properties": { "backgroundColor": { "type": "string" }, "backgroundGradient": { - "type": "object" + "title": "JsonStoryMessage.TextAttachment.Gradient", + "type": "object", + "properties": { + "angle": { + "type": "integer" + }, + "colors": { + "type": "array", + "items": { + "type": "string" + } + }, + "endColor": { + "type": "string" + }, + "positions": { + "type": "array", + "items": { + "type": "number" + } + }, + "startColor": { + "type": "string" + } + } }, "preview": { "$ref": "https://example.com/schemas/preview.schema.json" @@ -43,10 +68,7 @@ "textForegroundColor": { "type": "string" } - }, - "required": [ - "text" - ] + } } }, "required": [