@restorecommerce/protos 0.4.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. package/CHANGELOG.md +214 -0
  2. package/LICENSE +19 -0
  3. package/README.md +9 -0
  4. package/google/protobuf/any.proto +133 -0
  5. package/google/protobuf/descriptor.proto +805 -0
  6. package/google/protobuf/empty.proto +53 -0
  7. package/google/protobuf/struct.proto +96 -0
  8. package/google/protobuf/wrappers.proto +123 -0
  9. package/grpc/health/v1/health.proto +50 -0
  10. package/grpc/reflection/v1alpha/reflection.proto +154 -0
  11. package/io/restorecommerce/access_control.proto +48 -0
  12. package/io/restorecommerce/address.proto +65 -0
  13. package/io/restorecommerce/attribute.proto +13 -0
  14. package/io/restorecommerce/auth.proto +48 -0
  15. package/io/restorecommerce/authentication_log.proto +56 -0
  16. package/io/restorecommerce/command.proto +57 -0
  17. package/io/restorecommerce/commandinterface.proto +30 -0
  18. package/io/restorecommerce/contact_point.proto +49 -0
  19. package/io/restorecommerce/contact_point_type.proto +46 -0
  20. package/io/restorecommerce/country.proto +49 -0
  21. package/io/restorecommerce/credential.proto +51 -0
  22. package/io/restorecommerce/customer.proto +63 -0
  23. package/io/restorecommerce/filter.proto +38 -0
  24. package/io/restorecommerce/fulfillment.proto +199 -0
  25. package/io/restorecommerce/fulfillment_courier.proto +54 -0
  26. package/io/restorecommerce/fulfillment_product.proto +49 -0
  27. package/io/restorecommerce/graph.proto +76 -0
  28. package/io/restorecommerce/image.proto +24 -0
  29. package/io/restorecommerce/invoice.proto +121 -0
  30. package/io/restorecommerce/job.proto +173 -0
  31. package/io/restorecommerce/locale.proto +47 -0
  32. package/io/restorecommerce/location.proto +53 -0
  33. package/io/restorecommerce/manufacturer.proto +45 -0
  34. package/io/restorecommerce/meta.proto +15 -0
  35. package/io/restorecommerce/notification.proto +52 -0
  36. package/io/restorecommerce/notification_channel.proto +50 -0
  37. package/io/restorecommerce/notification_req.proto +49 -0
  38. package/io/restorecommerce/order.proto +121 -0
  39. package/io/restorecommerce/organization.proto +63 -0
  40. package/io/restorecommerce/ostorage.proto +154 -0
  41. package/io/restorecommerce/payment.proto +115 -0
  42. package/io/restorecommerce/payment_method.proto +60 -0
  43. package/io/restorecommerce/policy.proto +59 -0
  44. package/io/restorecommerce/policy_set.proto +53 -0
  45. package/io/restorecommerce/price_group.proto +45 -0
  46. package/io/restorecommerce/product.proto +101 -0
  47. package/io/restorecommerce/product_category.proto +53 -0
  48. package/io/restorecommerce/product_prototype.proto +47 -0
  49. package/io/restorecommerce/rendering.proto +34 -0
  50. package/io/restorecommerce/resource_base.proto +137 -0
  51. package/io/restorecommerce/role.proto +45 -0
  52. package/io/restorecommerce/rule.proto +86 -0
  53. package/io/restorecommerce/search.proto +21 -0
  54. package/io/restorecommerce/status.proto +26 -0
  55. package/io/restorecommerce/tax.proto +49 -0
  56. package/io/restorecommerce/tax_type.proto +47 -0
  57. package/io/restorecommerce/timezone.proto +46 -0
  58. package/io/restorecommerce/token.proto +36 -0
  59. package/io/restorecommerce/user.proto +258 -0
  60. package/package.json +19 -0
  61. package/test/test.proto +71 -0
@@ -0,0 +1,56 @@
1
+ syntax = "proto3";
2
+
3
+ package io.restorecommerce.authentication_log;
4
+
5
+ import "io/restorecommerce/resource_base.proto";
6
+ import "io/restorecommerce/meta.proto";
7
+ import "io/restorecommerce/auth.proto";
8
+ import "io/restorecommerce/status.proto";
9
+
10
+ /*
11
+ * Microservice definition.
12
+ */
13
+ service Service {
14
+ rpc Read (io.restorecommerce.resourcebase.ReadRequest) returns (AuthenticationLogListResponse);
15
+ rpc Create (AuthenticationLogList) returns (AuthenticationLogListResponse);
16
+ rpc Delete (io.restorecommerce.resourcebase.DeleteRequest) returns (io.restorecommerce.resourcebase.DeleteResponse);
17
+ rpc Update (AuthenticationLogList) returns (AuthenticationLogListResponse);
18
+ rpc Upsert (AuthenticationLogList) returns (AuthenticationLogListResponse);
19
+ }
20
+
21
+ message AuthenticationLogList {
22
+ repeated AuthenticationLog items = 1;
23
+ uint32 total_count = 2;
24
+ io.restorecommerce.auth.Subject subject = 3;
25
+ }
26
+
27
+ message AuthenticationLogListResponse {
28
+ repeated AuthenticationLogResponse items = 1;
29
+ uint32 total_count = 2;
30
+ io.restorecommerce.status.OperationStatus operation_status = 3;
31
+ }
32
+
33
+ message AuthenticationLogResponse {
34
+ AuthenticationLog payload = 1;
35
+ io.restorecommerce.status.Status status = 2;
36
+ }
37
+
38
+ /**
39
+ * Authentication Log
40
+ */
41
+ message AuthenticationLog {
42
+ string id = 1; // log id
43
+ string ipv4_address = 2;
44
+ string ipv6_address = 3;
45
+ string operating_system = 4;
46
+ string user_agent = 5;
47
+ double date = 6; // time stamp of login, logout or token update
48
+ string activity = 7; // login, logout
49
+ io.restorecommerce.meta.Meta meta = 8; // meta info
50
+ string subject_id = 9; // subject id
51
+ string token_name = 10; // token name associated with io.restorecommerce.auth.Token.token_name
52
+ }
53
+
54
+ message Deleted {
55
+ string id = 1;
56
+ }
@@ -0,0 +1,57 @@
1
+ syntax = "proto3";
2
+
3
+ package io.restorecommerce.command;
4
+
5
+ import "io/restorecommerce/resource_base.proto";
6
+ import "io/restorecommerce/meta.proto";
7
+ import "io/restorecommerce/auth.proto";
8
+ import "io/restorecommerce/status.proto";
9
+
10
+ // command resource
11
+ message Command {
12
+ string id = 1;
13
+ io.restorecommerce.meta.Meta meta = 2;
14
+ string name = 3; // command name
15
+ repeated CommandParameter parameters = 4; // all possible parameters
16
+ string description = 5; // command description
17
+ }
18
+
19
+ message CommandParameter {
20
+ enum ParameterType {
21
+ boolean_value = 0;
22
+ object_value = 1;
23
+ array_value = 2;
24
+ number_value = 3;
25
+ string_value = 4;
26
+ }
27
+
28
+ string field = 1; // field name
29
+ string description = 2; // field description
30
+ ParameterType type = 3; // field's type
31
+ string properties = 4; // dump properties in case of `object_value``
32
+ }
33
+
34
+ message CommandList {
35
+ repeated Command items = 1;
36
+ uint32 total_count = 2;
37
+ io.restorecommerce.auth.Subject subject = 3;
38
+ }
39
+
40
+ message CommandListResponse {
41
+ repeated CommandResponse items = 1;
42
+ uint32 total_count = 2;
43
+ io.restorecommerce.status.OperationStatus operation_status = 3;
44
+ }
45
+
46
+ message CommandResponse {
47
+ Command payload = 1;
48
+ io.restorecommerce.status.Status status = 2;
49
+ }
50
+
51
+ service Service {
52
+ rpc Read (io.restorecommerce.resourcebase.ReadRequest) returns (CommandListResponse);
53
+ rpc Create (CommandList) returns (CommandListResponse);
54
+ rpc Delete (io.restorecommerce.resourcebase.DeleteRequest) returns (io.restorecommerce.resourcebase.DeleteResponse);
55
+ rpc Update (CommandList) returns (CommandListResponse);
56
+ rpc Upsert (CommandList) returns (CommandListResponse);
57
+ }
@@ -0,0 +1,30 @@
1
+ syntax = "proto3";
2
+
3
+ package io.restorecommerce.commandinterface;
4
+
5
+ import "google/protobuf/any.proto";
6
+ import "io/restorecommerce/auth.proto";
7
+
8
+ // used to send requests through Kafka or gRPC
9
+ message CommandRequest {
10
+ // command identifier (used to demultiplex operation in the command implementation)
11
+ string name = 1;
12
+ google.protobuf.Any payload = 2; // variable payload
13
+ io.restorecommerce.auth.Subject subject = 3;
14
+ }
15
+
16
+ // used to push responses to Kafka
17
+ message CommandResponse {
18
+ // service identifiers
19
+ // (multiple services may reply to one system command)
20
+ // (multiple service names can be bound to one microservice)
21
+ repeated string services = 1;
22
+ google.protobuf.Any payload = 2; // variable payload
23
+ }
24
+
25
+ /**
26
+ * RPC service for executing commands
27
+ */
28
+ service Service {
29
+ rpc Command(CommandRequest) returns (google.protobuf.Any);
30
+ }
@@ -0,0 +1,49 @@
1
+ syntax = "proto3";
2
+
3
+ package io.restorecommerce.contact_point;
4
+
5
+ import "io/restorecommerce/resource_base.proto";
6
+ import "io/restorecommerce/meta.proto";
7
+ import "io/restorecommerce/auth.proto";
8
+ import "io/restorecommerce/status.proto";
9
+
10
+ service Service {
11
+ rpc Read (io.restorecommerce.resourcebase.ReadRequest) returns (ContactPointListResponse);
12
+ rpc Create (ContactPointList) returns (ContactPointListResponse);
13
+ rpc Delete (io.restorecommerce.resourcebase.DeleteRequest) returns (io.restorecommerce.resourcebase.DeleteResponse);
14
+ rpc Update (ContactPointList) returns (ContactPointListResponse);
15
+ rpc Upsert (ContactPointList) returns (ContactPointListResponse);
16
+ }
17
+
18
+ message Deleted {
19
+ string id = 1;
20
+ }
21
+
22
+ message ContactPointList {
23
+ repeated ContactPoint items = 1;
24
+ uint32 total_count = 2;
25
+ io.restorecommerce.auth.Subject subject = 3;
26
+ }
27
+
28
+ message ContactPointListResponse {
29
+ repeated ContactPointResponse items = 1;
30
+ uint32 total_count = 2;
31
+ io.restorecommerce.status.OperationStatus operation_status = 3;
32
+ }
33
+
34
+ message ContactPointResponse {
35
+ ContactPoint payload = 1;
36
+ io.restorecommerce.status.Status status = 2;
37
+ }
38
+
39
+ message ContactPoint {
40
+ string id = 1;
41
+ io.restorecommerce.meta.Meta meta = 2;
42
+ string physical_address_id = 3;
43
+ string website = 4;
44
+ string email = 5;
45
+ string contact_point_type_id = 6;
46
+ string telephone = 8;
47
+ string timezone_id = 9;
48
+ string locale_id = 10;
49
+ }
@@ -0,0 +1,46 @@
1
+ syntax = "proto3";
2
+
3
+ package io.restorecommerce.contact_point_type;
4
+
5
+ import "io/restorecommerce/resource_base.proto";
6
+ import "io/restorecommerce/auth.proto";
7
+ import "io/restorecommerce/meta.proto";
8
+ import "io/restorecommerce/status.proto";
9
+
10
+ /*
11
+ * Microservice definition.
12
+ */
13
+ service Service {
14
+ rpc Read (io.restorecommerce.resourcebase.ReadRequest) returns (ContactPointTypeListResponse);
15
+ rpc Create (ContactPointTypeList) returns (ContactPointTypeListResponse);
16
+ rpc Delete (io.restorecommerce.resourcebase.DeleteRequest) returns (io.restorecommerce.resourcebase.DeleteResponse);
17
+ rpc Update (ContactPointTypeList) returns (ContactPointTypeListResponse);
18
+ rpc Upsert (ContactPointTypeList) returns (ContactPointTypeListResponse);
19
+ }
20
+
21
+ message Deleted {
22
+ string id = 1;
23
+ }
24
+
25
+ message ContactPointTypeList {
26
+ repeated ContactPointType items = 1;
27
+ uint32 total_count = 2;
28
+ io.restorecommerce.auth.Subject subject = 3;
29
+ }
30
+
31
+ message ContactPointType {
32
+ string id = 1;
33
+ io.restorecommerce.meta.Meta meta = 2;
34
+ string type = 3;
35
+ }
36
+
37
+ message ContactPointTypeListResponse {
38
+ repeated ContactPointTypeResponse items = 1;
39
+ uint32 total_count = 2;
40
+ io.restorecommerce.status.OperationStatus operation_status = 3;
41
+ }
42
+
43
+ message ContactPointTypeResponse {
44
+ ContactPointType payload = 1;
45
+ io.restorecommerce.status.Status status = 2;
46
+ }
@@ -0,0 +1,49 @@
1
+ syntax = "proto3";
2
+
3
+ package io.restorecommerce.country;
4
+
5
+ import "io/restorecommerce/resource_base.proto";
6
+ import "io/restorecommerce/meta.proto";
7
+ import "io/restorecommerce/auth.proto";
8
+ import "io/restorecommerce/status.proto";
9
+
10
+ /*
11
+ * Microservice definition.
12
+ */
13
+ service Service {
14
+ rpc Read (io.restorecommerce.resourcebase.ReadRequest) returns (CountryListResponse);
15
+ rpc Create (CountryList) returns (CountryListResponse);
16
+ rpc Delete (io.restorecommerce.resourcebase.DeleteRequest) returns (io.restorecommerce.resourcebase.DeleteResponse);
17
+ rpc Update (CountryList) returns (CountryListResponse);
18
+ rpc Upsert (CountryList) returns (CountryListResponse);
19
+ }
20
+
21
+ message Deleted {
22
+ string id = 1;
23
+ }
24
+
25
+ message CountryList {
26
+ repeated Country items = 1;
27
+ uint32 total_count = 2;
28
+ io.restorecommerce.auth.Subject subject = 3;
29
+ }
30
+
31
+ message CountryListResponse {
32
+ repeated CountryResponse items = 1;
33
+ uint32 total_count = 2;
34
+ io.restorecommerce.status.OperationStatus operation_status = 3;
35
+ }
36
+
37
+ message CountryResponse {
38
+ Country payload = 1;
39
+ io.restorecommerce.status.Status status = 2;
40
+ }
41
+
42
+ message Country {
43
+ string id = 1;
44
+ io.restorecommerce.meta.Meta meta = 2;
45
+ string name = 3;
46
+ string country_code = 4;
47
+ string geographical_name = 5;
48
+ repeated string economic_areas = 6;
49
+ }
@@ -0,0 +1,51 @@
1
+ syntax = "proto3";
2
+
3
+ package io.restorecommerce.credential;
4
+
5
+ import "io/restorecommerce/resource_base.proto";
6
+ import "io/restorecommerce/meta.proto";
7
+ import "google/protobuf/any.proto";
8
+ import "io/restorecommerce/auth.proto";
9
+ import "io/restorecommerce/status.proto";
10
+
11
+ /*
12
+ * Microservice definition.
13
+ */
14
+ service Service {
15
+ rpc Read (io.restorecommerce.resourcebase.ReadRequest) returns (CredentialListResponse);
16
+ rpc Create (CredentialList) returns (CredentialListResponse);
17
+ rpc Delete (io.restorecommerce.resourcebase.DeleteRequest) returns (io.restorecommerce.resourcebase.DeleteResponse);
18
+ rpc Update (CredentialList) returns (CredentialListResponse);
19
+ rpc Upsert (CredentialList) returns (CredentialListResponse);
20
+ }
21
+
22
+ message Deleted {
23
+ string id = 1;
24
+ }
25
+
26
+ message CredentialList {
27
+ repeated Credential items = 1;
28
+ uint32 total_count = 2;
29
+ io.restorecommerce.auth.Subject subject = 3;
30
+ }
31
+
32
+ message CredentialListResponse {
33
+ repeated CredentialResponse items = 1;
34
+ uint32 total_count = 2;
35
+ io.restorecommerce.status.OperationStatus operation_status = 3;
36
+ }
37
+
38
+ message CredentialResponse {
39
+ Credential payload = 1;
40
+ io.restorecommerce.status.Status status = 2;
41
+ }
42
+
43
+ message Credential {
44
+ string id = 1;
45
+ io.restorecommerce.meta.Meta meta = 2;
46
+ string name = 3;
47
+ string description = 4;
48
+ string user = 5;
49
+ string pass = 6;
50
+ google.protobuf.Any credentials = 7; /// additional credentials as auth key or certificates etc
51
+ }
@@ -0,0 +1,63 @@
1
+ syntax = "proto3";
2
+
3
+ package io.restorecommerce.customer;
4
+
5
+ import "io/restorecommerce/resource_base.proto";
6
+ import "io/restorecommerce/meta.proto";
7
+ import "io/restorecommerce/auth.proto";
8
+ import "io/restorecommerce/status.proto";
9
+
10
+ /*
11
+ Microservice definition.
12
+ */
13
+ service Service {
14
+ rpc Read (io.restorecommerce.resourcebase.ReadRequest) returns (CustomerListResponse);
15
+ rpc Create (CustomerList) returns (CustomerListResponse);
16
+ rpc Delete (io.restorecommerce.resourcebase.DeleteRequest) returns (io.restorecommerce.resourcebase.DeleteResponse);
17
+ rpc Update (CustomerList) returns (CustomerListResponse);
18
+ rpc Upsert (CustomerList) returns (CustomerListResponse);
19
+ }
20
+
21
+ message CustomerList {
22
+ repeated Customer items = 1;
23
+ uint32 total_count = 2;
24
+ io.restorecommerce.auth.Subject subject = 3;
25
+ }
26
+
27
+ message CustomerListResponse {
28
+ repeated CustomerResponse items = 1;
29
+ uint32 total_count = 2;
30
+ io.restorecommerce.status.OperationStatus operation_status = 3;
31
+ }
32
+
33
+ message CustomerResponse {
34
+ Customer payload = 1;
35
+ io.restorecommerce.status.Status status = 2;
36
+ }
37
+
38
+ message Customer {
39
+ string id = 1;
40
+ io.restorecommerce.meta.Meta meta = 2;
41
+ oneof customer {
42
+ IndividualUser individual_user = 3;
43
+ OrgUser org_user = 4;
44
+ Guest guest = 5;
45
+ }
46
+ }
47
+
48
+ message IndividualUser {
49
+ string user_id = 1;
50
+ string address_id = 2;
51
+ repeated string contact_point_ids = 3;
52
+ }
53
+
54
+ message OrgUser {
55
+ string user_id = 1;
56
+ string organization_id = 2;
57
+ }
58
+
59
+ message Guest {
60
+ bool guest = 1;
61
+ string address_id = 2;
62
+ repeated string contact_point_ids = 3;
63
+ }
@@ -0,0 +1,38 @@
1
+ syntax = "proto3";
2
+
3
+ package io.restorecommerce.filter;
4
+
5
+ message Filter {
6
+ string field = 1;
7
+ enum Operation {
8
+ eq = 0;
9
+ lt = 1;
10
+ lte = 2;
11
+ gt = 3;
12
+ gte = 4;
13
+ isEmpty = 5;
14
+ iLike = 6;
15
+ in = 7;
16
+ neq = 8;
17
+ }
18
+ Operation operation = 2;
19
+ string value = 3;
20
+ enum ValueType {
21
+ STRING = 0; // default value type if not specified
22
+ NUMBER = 1;
23
+ BOOLEAN = 2;
24
+ DATE = 3;
25
+ ARRAY = 4;
26
+ }
27
+ ValueType type = 4;
28
+ repeated FilterOp filters = 6;
29
+ }
30
+
31
+ message FilterOp {
32
+ repeated Filter filter = 1;
33
+ enum Operator {
34
+ and = 0;
35
+ or = 1;
36
+ }
37
+ Operator operator = 2;
38
+ }
@@ -0,0 +1,199 @@
1
+ syntax = "proto3";
2
+
3
+ package io.restorecommerce.fulfillment;
4
+
5
+ import "google/protobuf/any.proto";
6
+ import "io/restorecommerce/resource_base.proto";
7
+ import "io/restorecommerce/auth.proto";
8
+ import "io/restorecommerce/status.proto";
9
+ import "io/restorecommerce/fulfillment_courier";
10
+ import "io/restorecommerce/fulfillment_product";
11
+ import "io/restorecommerce/attribute";
12
+
13
+ /**
14
+ Microservice definition.
15
+ */
16
+ service Service {
17
+ /**
18
+ Returns a list of shipment IDs.
19
+ */
20
+ rpc Read (io.restorecommerce.resourcebase.ReadRequest) returns (FulfillmentResponseList);
21
+
22
+ /**
23
+ Creates but does not execute fulfillment orders
24
+ */
25
+ rpc Create (FulfillmentRequest) returns (FulfillmentResponseList);
26
+
27
+ /**
28
+ Updates but does not execute fulfillment orders
29
+ */
30
+ rpc Update (FulfillmentRequest) returns (FulfillmentResponseList);
31
+
32
+ /**
33
+ Upserts but does not execute fulfillment orders
34
+ */
35
+ rpc Upsert (FulfillmentRequest) returns (FulfillmentResponseList);
36
+
37
+ /**
38
+ Executes and Upserts fulfillment orders
39
+ */
40
+ rpc Order (FulfillmentRequest) returns (FulfillmentResponseList);
41
+
42
+ /**
43
+ Track a batch of fulfillment orders
44
+ */
45
+ rpc Track (TrackingRequest) returns (TrackingResults);
46
+
47
+ /**
48
+ Cancel a batch of fulfillment orders
49
+ */
50
+ rpc Cancel (CancelRequest) returns (CancelResults);
51
+
52
+ /**
53
+ Delete a batch of fulfillments from the database
54
+ */
55
+ rpc Delete (io.restorecommerce.resourcebase.DeleteRequest) returns (io.restorecommerce.resourcebase.DeleteResponse);
56
+ }
57
+
58
+ enum AddressType {
59
+ Standard = 0;
60
+ DHL_Packstation = 1;
61
+ DHL_Postfiliale = 2;
62
+ //UPS_Whatever
63
+ }
64
+
65
+ enum LabelTypes {
66
+ Default = 0;
67
+ URL = 1;
68
+ PDF = 2;
69
+ Image = 3;
70
+ }
71
+
72
+ enum State {
73
+ Incomplete = 0;
74
+ Ordered = 1;
75
+ Processing = 2;
76
+ Done=3;
77
+ Cancelled = 4;
78
+ Failed = 5;
79
+ }
80
+
81
+ message Origin {
82
+ string country = 1;
83
+ string iso_code = 2;
84
+ }
85
+
86
+ message Contact {
87
+ string name = 1;
88
+ string email = 2;
89
+ string phone = 3;
90
+ }
91
+
92
+ message Address {
93
+ AddressType address_type = 1;
94
+ repeated string name = 2;
95
+ string street = 3;
96
+ string number = 4;
97
+ string addition = 5;
98
+ string zip = 6;
99
+ string city = 7;
100
+ Origin origin = 8;
101
+ Contact contact = 9;
102
+ google.protobuf.Any optionals = 10;
103
+ }
104
+
105
+ message Parcel {
106
+ float weight = 1;
107
+ float width = 2;
108
+ float length = 3;
109
+ float height = 4;
110
+ }
111
+
112
+ message Order {
113
+ string uks_id = 1; //id from external services for reference
114
+ repeated Parcel parcels = 4;
115
+ Address sender = 6;
116
+ Address receiver = 7;
117
+ string notify = 8;
118
+ google.protobuf.Any options = 9;
119
+ }
120
+
121
+ message Label {
122
+ LabelType type = 1;
123
+ string data = 2; //Could be an URL, base64 or bytes of i.e. a PDF or PNG...
124
+ }
125
+
126
+ message Event {
127
+ io.restorecommerce.status.Status status = 1;
128
+ string timestamp = 2;
129
+ string location = 3;
130
+ google.protobuf.Any details = 4;
131
+ }
132
+
133
+ message FulfillmentOrder {
134
+ string id = 1;
135
+ string product_id = 3;
136
+ Order order = 2;
137
+ io.restorecommerce.meta.Meta meta = 3;
138
+ }
139
+
140
+ message FulfillmentOrderList {
141
+ repeated FulfillmentOrder items = 1;
142
+ io.restorecommerce.auth.Subject subject = 3;
143
+ }
144
+
145
+ /**
146
+ This is the message how it get stored to the database
147
+ */
148
+ message Fulfillment {
149
+ string id = 1;
150
+ string product_id = 2;
151
+ Order order = 3;
152
+ io.restorecommerce.meta.Meta meta = 4;
153
+ string shipment_id = 5; //filled on Order
154
+ Label label = 6; //filled on Order
155
+ State state = 7; //update by Track
156
+ }
157
+
158
+ message FulfillmentResponse {
159
+ Fulfillment payload = 1;
160
+ io.restorecommerce.status.Status status = 2;
161
+ }
162
+
163
+ message FulfillmentResponseList {
164
+ repeated Fulfillment items = 1;
165
+ uint32 total_count = 2;
166
+ io.restorecommerce.status.OperationStatus operation_status = 3;
167
+ }
168
+
169
+ message TrackingQuery {
170
+ string order_id = 1;
171
+ google.protobuf.Any options = 4;
172
+ }
173
+
174
+ message TrackingQueryList {
175
+ repeated TrackingQuery items = 1;
176
+ io.restorecommerce.auth.Subject subject = 2;
177
+ }
178
+
179
+ message Tracking {
180
+ string fulfillment_id = 1;
181
+ repeated Event events = 2;
182
+ google.protobuf.Any details = 3;
183
+ io.restorecommerce.status.Status status = 4;
184
+ }
185
+
186
+ message TrackingResults {
187
+ repeated Tracking items = 1;
188
+ io.restorecommerce.status.OperationStatus operation_status = 2;
189
+ }
190
+
191
+ message CancelRequest {
192
+ repeated string ids = 1;
193
+ io.restorecommerce.auth.Subject subject = 2;
194
+ }
195
+
196
+ message CancelResults {
197
+ repeated io.restorecommerce.status.Status items = 1;
198
+ io.restorecommerce.status.OperationStatus operation_status = 2;
199
+ }
@@ -0,0 +1,54 @@
1
+ syntax = "proto3";
2
+
3
+ package io.restorecommerce.fulfillment_courier;
4
+
5
+ import "google/protobuf/any.proto";
6
+ import "io/restorecommerce/resource_base.proto";
7
+ import "io/restorecommerce/meta.proto";
8
+ import "io/restorecommerce/auth.proto";
9
+ import "io/restorecommerce/status.proto";
10
+
11
+ /**
12
+ Microservice defination
13
+ */
14
+
15
+ service Service {
16
+ rpc Read (io.restorecommerce.resourcebase.ReadRequest) returns (CourierResponseList);
17
+ rpc Create (CourierList) returns (CourierResponseList);
18
+ rpc Update (CourierList) returns (CourierResponseList);
19
+ rpc Upsert (CourierList) returns (CourierResponseList);
20
+ rpc Delete (io.restorecommerce.resourcebase.DeleteRequest) returns (io.restorecommerce.resourcebase.DeleteResponse);
21
+ }
22
+
23
+ enum CourierType {
24
+ DHL = 0;
25
+ }
26
+
27
+ message Courier {
28
+ string id = 1;
29
+ string uks_id = 2;
30
+ CourierType type = 3;
31
+ string name = 4;
32
+ string description = 5;
33
+ string logo = 6;
34
+ string website = 7;
35
+ google.protobuf.Any optionals = 8;
36
+ io.restorecommerce.meta.Meta meta = 9;
37
+ }
38
+
39
+ message CourierList {
40
+ repeated Courier items = 1;
41
+ uint32 total_count = 2;
42
+ io.restorecommerce.auth.Subject subject = 3;
43
+ }
44
+
45
+ message CourierResponse {
46
+ Courier payload = 1;
47
+ io.restorecommerce.status.Status status = 2;
48
+ }
49
+
50
+ message CourierResponseList {
51
+ repeated CourierResponse items = 1;
52
+ uint32 total_count = 2;
53
+ io.restorecommerce.status.OperationStatus operation_status = 3;
54
+ }