From d3deacb5ec87cca19965126c667ee6c84881aff6 Mon Sep 17 00:00:00 2001 From: Dairon Medina Caro Date: Tue, 12 Oct 2021 12:38:02 -0400 Subject: [PATCH 1/5] Add Movement proto and rpc calls --- protos/bottle/inventory/v1.proto | 3 ++- protos/bottle/inventory/v1/movement.proto | 11 +++++++++++ protos/bottle/inventory/v1/service.proto | 14 +++++++++++--- 3 files changed, 24 insertions(+), 4 deletions(-) create mode 100644 protos/bottle/inventory/v1/movement.proto diff --git a/protos/bottle/inventory/v1.proto b/protos/bottle/inventory/v1.proto index 1307d28..23eadcc 100644 --- a/protos/bottle/inventory/v1.proto +++ b/protos/bottle/inventory/v1.proto @@ -1,4 +1,4 @@ -syntax = "proto3"; + syntax = "proto3"; import "bottle/inventory/v1/service.proto"; @@ -10,6 +10,7 @@ service V1 { rpc ListSkuQuantity(bottle.inventory.v1.ListSkuQuantityRequest) returns (stream bottle.inventory.v1.ListSkuQuantityResponse); rpc ListSkuAvailability(bottle.inventory.v1.ListSkuAvailabilityRequest) returns (stream bottle.inventory.v1.ListSkuAvailabilityResponse); rpc GetSkuDetails(bottle.inventory.v1.GetSkuDetailsRequest) returns (bottle.inventory.v1.GetSkuDetailsResponse); + rpc ListSkuMovements(bottle.inventory.v1.ListSkuMovementsRequest) returns (stream bottle.inventory.v1.ListSkuMovementsResponse); rpc ListLocations(bottle.inventory.v1.ListLocationsRequest) returns (stream bottle.inventory.v1.ListLocationsResponse); } diff --git a/protos/bottle/inventory/v1/movement.proto b/protos/bottle/inventory/v1/movement.proto new file mode 100644 index 0000000..356486e --- /dev/null +++ b/protos/bottle/inventory/v1/movement.proto @@ -0,0 +1,11 @@ +syntax = "proto3"; + +package bottle.inventory.v1; + +message Movement { + string id = 1; + bottle.inventory.v1.Part part = 2; + bottle.inventory.v1.Location from_location = 3; + bottle.inventory.v1.Location to_location = 4; + string created_at = 5; +} diff --git a/protos/bottle/inventory/v1/service.proto b/protos/bottle/inventory/v1/service.proto index 50b104c..6aac15a 100644 --- a/protos/bottle/inventory/v1/service.proto +++ b/protos/bottle/inventory/v1/service.proto @@ -39,9 +39,7 @@ message ListComponentAvailabilityResponse { repeated PickingOption picking_options = 4; } -message ListSkuQuantityRequest { - string request_id = 1; -} +message ListSkuQuantityRequest { string request_id = 1; } message ListSkuQuantityResponse { string request_id = 1; @@ -86,3 +84,13 @@ message ListLocationsResponse { string request_id = 1; bottle.inventory.v1.Location location = 2; } + +message ListSkuMovementsRequest { + string request_id = 1; + bottle.inventory.v1.Sku sku = 2; +} + +message ListSkuMovementsResponse { + string request_id = 1; + repeated bottle.inventory.v1.Movement movements = 2; +} From 46513c63d3a470ef684835612d885367a81e3286 Mon Sep 17 00:00:00 2001 From: Dairon Medina Caro Date: Tue, 12 Oct 2021 12:45:06 -0400 Subject: [PATCH 2/5] Trigger deployment --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c3aec28..f155879 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ end for an order, we would use `order: %Order{id: "1234"}` instead of `order_id: "1234"`. - Date & Time - We use string fields to represent ISO 8601 formatted date and time fields. This is built into most -languages by default, and if you are using elixir, you can simply use `DateTime.to_iso8601/1`. +languages by default, and if you are using Elixir, you can simply use `DateTime.to_iso8601/1`. ### Deploying From 7e17a4e05a72f07a151899ecf78efef398a07d95 Mon Sep 17 00:00:00 2001 From: Dairon Medina Caro Date: Tue, 12 Oct 2021 12:48:00 -0400 Subject: [PATCH 3/5] Import Movement proto --- protos/bottle/inventory/v1/service.proto | 1 + 1 file changed, 1 insertion(+) diff --git a/protos/bottle/inventory/v1/service.proto b/protos/bottle/inventory/v1/service.proto index 6aac15a..6b0c5f1 100644 --- a/protos/bottle/inventory/v1/service.proto +++ b/protos/bottle/inventory/v1/service.proto @@ -2,6 +2,7 @@ syntax = "proto3"; import "bottle/inventory/v1/component.proto"; import "bottle/inventory/v1/location.proto"; +import "bottle/inventory/v1/movement.proto"; import "bottle/inventory/v1/sku.proto"; package bottle.inventory.v1; From 5a2a24ed0768c7e3496b6557291bf3fd16e2ec63 Mon Sep 17 00:00:00 2001 From: Dairon Medina Caro Date: Tue, 12 Oct 2021 12:49:40 -0400 Subject: [PATCH 4/5] Import part and location --- protos/bottle/inventory/v1/movement.proto | 3 +++ 1 file changed, 3 insertions(+) diff --git a/protos/bottle/inventory/v1/movement.proto b/protos/bottle/inventory/v1/movement.proto index 356486e..ee73629 100644 --- a/protos/bottle/inventory/v1/movement.proto +++ b/protos/bottle/inventory/v1/movement.proto @@ -2,6 +2,9 @@ syntax = "proto3"; package bottle.inventory.v1; +import "bottle/inventory/v1/location.proto"; +import "bottle/inventory/v1/part.proto"; + message Movement { string id = 1; bottle.inventory.v1.Part part = 2; From 0abef6aa0d649eeb731585f8cf9236128f0d68b4 Mon Sep 17 00:00:00 2001 From: Dairon Medina Caro Date: Tue, 12 Oct 2021 13:53:10 -0400 Subject: [PATCH 5/5] Rename field from created_at to inserted_at to match Ecto --- protos/bottle/inventory/v1/movement.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/protos/bottle/inventory/v1/movement.proto b/protos/bottle/inventory/v1/movement.proto index ee73629..eb3df57 100644 --- a/protos/bottle/inventory/v1/movement.proto +++ b/protos/bottle/inventory/v1/movement.proto @@ -10,5 +10,5 @@ message Movement { bottle.inventory.v1.Part part = 2; bottle.inventory.v1.Location from_location = 3; bottle.inventory.v1.Location to_location = 4; - string created_at = 5; + string inserted_at = 5; }