diff --git a/schemas/proto/images/v1/delete.proto b/schemas/proto/images/v1/delete.proto new file mode 100644 index 0000000..52b5384 --- /dev/null +++ b/schemas/proto/images/v1/delete.proto @@ -0,0 +1,18 @@ +syntax = "proto3"; + +package images.v1; + +message DeleteImagesRequest { + repeated DeleteImage deletes = 1; + bool blacklist = 2; +} + +message DeleteImage { + string post_name = 1; + repeated string devices = 2; +} + +message DeleteImagesResponse { + // The number of images that will be deleted. + int64 count = 1; +} diff --git a/schemas/proto/images/v1/get.proto b/schemas/proto/images/v1/get.proto new file mode 100644 index 0000000..adf2d86 --- /dev/null +++ b/schemas/proto/images/v1/get.proto @@ -0,0 +1,13 @@ +syntax = "proto3"; + +package images.v1; + +import "images/v1/types.proto"; + +message GetImageRequest { + string id = 1; +} + +message GetImageResponse { + Image image = 1; +} diff --git a/schemas/proto/images/v1/images.proto b/schemas/proto/images/v1/images.proto index 27ae317..a8d18e9 100644 --- a/schemas/proto/images/v1/images.proto +++ b/schemas/proto/images/v1/images.proto @@ -2,8 +2,12 @@ syntax = "proto3"; package images.v1; +import "images/v1/delete.proto"; +import "images/v1/get.proto"; import "images/v1/list.proto"; service ImageService { rpc ListImages(ListImagesRequest) returns (ListImagesResponse) {} + rpc DeleteImages(DeleteImagesRequest) returns (DeleteImagesResponse) {} + rpc GetImage(GetImageRequest) returns (GetImageResponse) {} } diff --git a/schemas/proto/images/v1/list.proto b/schemas/proto/images/v1/list.proto index c1dd735..2ead336 100644 --- a/schemas/proto/images/v1/list.proto +++ b/schemas/proto/images/v1/list.proto @@ -40,8 +40,13 @@ message ListImagesRequest { // cannot be set (value > 0) with after (value > 0). int64 before = 5; + // OrderBy orders the images by the given field. + // + // if not set, the default order is by created_at DESC, + // regardless of the sort field. OrderBy order_by = 6; + // sort orders the images by the given sort. Sort sort = 7; // search searches images by text. ignored if empty. @@ -61,6 +66,9 @@ message ListImagesRequest { // nsfw filters the images to be fetched based on the nsfw flag. NSFW nsfw = 9; + + // blacklist filters the images to be fetched based on the blacklist flag. + Blacklist blacklist = 10; } message ListImagesResponse {