@restorecommerce/protos 5.0.1 → 6.1.0

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 (54) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/io/restorecommerce/access_control.proto +8 -8
  3. package/io/restorecommerce/address.proto +6 -6
  4. package/io/restorecommerce/auth.proto +3 -3
  5. package/io/restorecommerce/authentication_log.proto +6 -6
  6. package/io/restorecommerce/code.proto +5 -5
  7. package/io/restorecommerce/command.proto +5 -5
  8. package/io/restorecommerce/commandinterface.proto +2 -2
  9. package/io/restorecommerce/contact_point.proto +6 -6
  10. package/io/restorecommerce/contact_point_type.proto +6 -6
  11. package/io/restorecommerce/country.proto +6 -6
  12. package/io/restorecommerce/credential.proto +6 -6
  13. package/io/restorecommerce/currency.proto +10 -10
  14. package/io/restorecommerce/customer.proto +5 -5
  15. package/io/restorecommerce/file.proto +1 -1
  16. package/io/restorecommerce/filter.proto +5 -5
  17. package/io/restorecommerce/fulfillment.proto +60 -29
  18. package/io/restorecommerce/fulfillment_courier.proto +20 -8
  19. package/io/restorecommerce/fulfillment_product.proto +36 -18
  20. package/io/restorecommerce/graph.proto +9 -9
  21. package/io/restorecommerce/image.proto +1 -1
  22. package/io/restorecommerce/invoice.proto +10 -10
  23. package/io/restorecommerce/job.proto +7 -7
  24. package/io/restorecommerce/locale.proto +6 -6
  25. package/io/restorecommerce/location.proto +6 -6
  26. package/io/restorecommerce/manufacturer.proto +6 -6
  27. package/io/restorecommerce/notification.proto +6 -6
  28. package/io/restorecommerce/notification_channel.proto +6 -6
  29. package/io/restorecommerce/oauth.proto +9 -9
  30. package/io/restorecommerce/order.proto +24 -22
  31. package/io/restorecommerce/organization.proto +7 -7
  32. package/io/restorecommerce/ostorage.proto +57 -57
  33. package/io/restorecommerce/payment.proto +15 -15
  34. package/io/restorecommerce/payment_method.proto +6 -6
  35. package/io/restorecommerce/policy.proto +5 -5
  36. package/io/restorecommerce/policy_set.proto +5 -5
  37. package/io/restorecommerce/price.proto +0 -10
  38. package/io/restorecommerce/price_group.proto +6 -6
  39. package/io/restorecommerce/product.proto +26 -16
  40. package/io/restorecommerce/product_category.proto +6 -6
  41. package/io/restorecommerce/product_prototype.proto +6 -6
  42. package/io/restorecommerce/rendering.proto +8 -8
  43. package/io/restorecommerce/resource_base.proto +12 -12
  44. package/io/restorecommerce/role.proto +6 -6
  45. package/io/restorecommerce/rule.proto +5 -5
  46. package/io/restorecommerce/search.proto +1 -1
  47. package/io/restorecommerce/shop.proto +5 -6
  48. package/io/restorecommerce/status.proto +7 -7
  49. package/io/restorecommerce/tax.proto +6 -6
  50. package/io/restorecommerce/tax_type.proto +5 -5
  51. package/io/restorecommerce/timezone.proto +6 -6
  52. package/io/restorecommerce/user.proto +81 -81
  53. package/package.json +2 -2
  54. package/google/protobuf/struct.proto +0 -96
@@ -26,33 +26,33 @@ service ObjectService {
26
26
 
27
27
  message CopyRequestList {
28
28
  repeated CopyRequestItem items = 1;
29
- io.restorecommerce.auth.Subject subject = 2;
29
+ optional io.restorecommerce.auth.Subject subject = 2;
30
30
  }
31
31
 
32
32
  message CopyResponseList {
33
33
  repeated copyResponsePayloadWithStatus responses = 1;
34
- io.restorecommerce.status.OperationStatus operation_status = 2;
34
+ optional io.restorecommerce.status.OperationStatus operation_status = 2;
35
35
  }
36
36
 
37
37
  message copyResponsePayloadWithStatus {
38
- CopyResponseItem payload = 1;
39
- io.restorecommerce.status.Status status = 2;
38
+ optional CopyResponseItem payload = 1;
39
+ optional io.restorecommerce.status.Status status = 2;
40
40
  }
41
41
 
42
42
  message CopyRequestItem {
43
- string bucket = 1;
44
- string copySource = 2;
45
- string key = 3;
43
+ optional string bucket = 1;
44
+ optional string copySource = 2;
45
+ optional string key = 3;
46
46
  optional io.restorecommerce.meta.Meta meta = 4;
47
47
  optional Options options = 5;
48
48
  }
49
49
 
50
50
  message CopyResponseItem {
51
- string bucket = 1;
52
- string copySource = 2;
53
- string key = 3;
54
- io.restorecommerce.meta.Meta meta = 4;
55
- Options options = 5;
51
+ optional string bucket = 1;
52
+ optional string copySource = 2;
53
+ optional string key = 3;
54
+ optional io.restorecommerce.meta.Meta meta = 4;
55
+ optional Options options = 5;
56
56
  }
57
57
 
58
58
  message Options {
@@ -68,86 +68,86 @@ message Options {
68
68
  }
69
69
 
70
70
  message Object {
71
- string key = 1;
72
- string bucket = 2;
71
+ optional string key = 1;
72
+ optional string bucket = 2;
73
73
  optional bytes object = 3;
74
74
  optional io.restorecommerce.meta.Meta meta = 4;
75
75
  optional string url = 5;
76
76
  optional Options options = 6;
77
- io.restorecommerce.auth.Subject subject = 7;
77
+ optional io.restorecommerce.auth.Subject subject = 7;
78
78
  }
79
79
 
80
80
  message ObjectResponse {
81
- ObjectResponsePayloadWithStatus response = 1;
82
- io.restorecommerce.status.OperationStatus operation_status = 2;
81
+ optional ObjectResponsePayloadWithStatus response = 1;
82
+ optional io.restorecommerce.status.OperationStatus operation_status = 2;
83
83
  }
84
84
 
85
85
  message ObjectResponsePayloadWithStatus {
86
- ObjectResponsePayload payload = 1;
87
- io.restorecommerce.status.Status status = 3;
86
+ optional ObjectResponsePayload payload = 1;
87
+ optional io.restorecommerce.status.Status status = 3;
88
88
  }
89
89
 
90
90
  message ObjectResponsePayload {
91
- string key = 1;
92
- string bucket = 2;
93
- bytes object = 3;
94
- io.restorecommerce.meta.Meta meta = 4;
95
- string url = 5;
96
- Options options = 6;
91
+ optional string key = 1;
92
+ optional string bucket = 2;
93
+ optional bytes object = 3;
94
+ optional io.restorecommerce.meta.Meta meta = 4;
95
+ optional string url = 5;
96
+ optional Options options = 6;
97
97
  }
98
98
 
99
99
  message GetRequest {
100
- string key = 1;
101
- string bucket = 2;
100
+ optional string key = 1;
101
+ optional string bucket = 2;
102
102
  optional bool download = 3;
103
- io.restorecommerce.auth.Subject subject = 4;
103
+ optional io.restorecommerce.auth.Subject subject = 4;
104
104
  }
105
105
 
106
106
  message ListResponse {
107
107
  repeated ObjectsDataWithPayloadStatus responses = 1;
108
- io.restorecommerce.status.OperationStatus operation_status = 2;
108
+ optional io.restorecommerce.status.OperationStatus operation_status = 2;
109
109
  }
110
110
 
111
111
  message ObjectsDataWithPayloadStatus {
112
- ObjectData payload = 1;
113
- io.restorecommerce.status.Status status = 2;
112
+ optional ObjectData payload = 1;
113
+ optional io.restorecommerce.status.Status status = 2;
114
114
  }
115
115
 
116
116
  message ObjectData {
117
- string object_name = 1;
118
- string url = 2;
119
- io.restorecommerce.meta.Meta meta = 3;
117
+ optional string object_name = 1;
118
+ optional string url = 2;
119
+ optional io.restorecommerce.meta.Meta meta = 3;
120
120
  }
121
121
 
122
122
  message DeleteRequest {
123
- string key = 1;
124
- string bucket = 2;
125
- io.restorecommerce.auth.Subject subject = 3;
123
+ optional string key = 1;
124
+ optional string bucket = 2;
125
+ optional io.restorecommerce.auth.Subject subject = 3;
126
126
  }
127
127
 
128
128
  message PutResponse {
129
- PutResponseWithPayloadStatus response = 1;
130
- io.restorecommerce.status.OperationStatus operation_status = 2;
129
+ optional PutResponseWithPayloadStatus response = 1;
130
+ optional io.restorecommerce.status.OperationStatus operation_status = 2;
131
131
  }
132
132
 
133
133
  message PutResponseWithPayloadStatus {
134
- Response payload = 1;
135
- io.restorecommerce.status.Status status = 2;
134
+ optional Response payload = 1;
135
+ optional io.restorecommerce.status.Status status = 2;
136
136
  }
137
137
 
138
138
  message Response {
139
- string url = 1;
140
- string bucket = 2 ;
141
- string key = 3;
142
- io.restorecommerce.meta.Meta meta = 4;
139
+ optional string url = 1;
140
+ optional string bucket = 2 ;
141
+ optional string key = 3;
142
+ optional io.restorecommerce.meta.Meta meta = 4;
143
143
  repeated io.restorecommerce.attribute.Attribute tags = 5;
144
- int32 length = 6; // file size of uploaded object
144
+ optional int32 length = 6; // file size of uploaded object
145
145
  }
146
146
 
147
147
  message ListRequest {
148
- string bucket = 1;
148
+ optional string bucket = 1;
149
149
  optional io.restorecommerce.filter.FilterOp filters = 2; /// Filter based on fieldName|operation, value|list
150
- io.restorecommerce.auth.Subject subject = 3;
150
+ optional io.restorecommerce.auth.Subject subject = 3;
151
151
  optional int32 max_keys = 4;
152
152
  optional string prefix = 5;
153
153
  }
@@ -163,7 +163,7 @@ message OstorageMessage {
163
163
 
164
164
  message MoveRequestList {
165
165
  repeated MoveRequestItem items = 1;
166
- io.restorecommerce.auth.Subject subject = 2;
166
+ optional io.restorecommerce.auth.Subject subject = 2;
167
167
  }
168
168
 
169
169
  message MoveRequestItem {
@@ -176,18 +176,18 @@ message MoveRequestItem {
176
176
 
177
177
  message MoveResponseList {
178
178
  repeated MoveResponsePayloadWithStatus responses = 1;
179
- io.restorecommerce.status.OperationStatus operation_status = 2;
179
+ optional io.restorecommerce.status.OperationStatus operation_status = 2;
180
180
  }
181
181
 
182
182
  message MoveResponsePayloadWithStatus {
183
- MoveResponseItem payload = 1;
184
- io.restorecommerce.status.Status status = 2;
183
+ optional MoveResponseItem payload = 1;
184
+ optional io.restorecommerce.status.Status status = 2;
185
185
  }
186
186
 
187
187
  message MoveResponseItem {
188
- string bucket = 1;
189
- string sourceObject = 2;
190
- string key = 3;
191
- io.restorecommerce.meta.Meta meta = 4;
192
- Options options = 5;
188
+ optional string bucket = 1;
189
+ optional string sourceObject = 2;
190
+ optional string key = 3;
191
+ optional io.restorecommerce.meta.Meta meta = 4;
192
+ optional Options options = 5;
193
193
  }
@@ -38,20 +38,20 @@ message SetupRequest {
38
38
  }
39
39
 
40
40
  message SetupPayload {
41
- string token = 1;
42
- string confirm_initiation_url = 2;
43
- string initiated_on = 3;
41
+ optional string token = 1;
42
+ optional string confirm_initiation_url = 2;
43
+ optional string initiated_on = 3;
44
44
  }
45
45
 
46
46
  message SetupPayloadStatus {
47
- SetupPayload payload = 1;
48
- io.restorecommerce.status.Status status = 2;
47
+ optional SetupPayload payload = 1;
48
+ optional io.restorecommerce.status.Status status = 2;
49
49
  }
50
50
 
51
51
  // Response object for setup calls.
52
52
  message SetupResponse {
53
- SetupPayloadStatus item = 1;
54
- io.restorecommerce.status.OperationStatus operation_status = 2;
53
+ optional SetupPayloadStatus item = 1;
54
+ optional io.restorecommerce.status.OperationStatus operation_status = 2;
55
55
  }
56
56
 
57
57
  // Request object for authorization or purchase call for cardless payment.
@@ -62,7 +62,7 @@ message PaymentRequest {
62
62
  optional string payment_id = 4;
63
63
  optional string payer_id = 5;
64
64
  optional string token = 6;
65
- io.restorecommerce.auth.Subject subject = 7;
65
+ optional io.restorecommerce.auth.Subject subject = 7;
66
66
  }
67
67
 
68
68
  // Request object for capture call for both standard and cardless payments.
@@ -71,24 +71,24 @@ message CaptureRequest {
71
71
  optional int32 payment_sum = 2;
72
72
  optional string currency = 3;
73
73
  optional string payment_id = 4;
74
- io.restorecommerce.auth.Subject subject = 5;
74
+ optional io.restorecommerce.auth.Subject subject = 5;
75
75
  }
76
76
 
77
77
  message PaymentPayload {
78
- string payment_id = 1;
79
- string executed_on = 2;
78
+ optional string payment_id = 1;
79
+ optional string executed_on = 2;
80
80
  }
81
81
 
82
82
  message PaymentPayloadStatus {
83
- PaymentPayload payload = 1;
84
- io.restorecommerce.status.Status status = 2;
83
+ optional PaymentPayload payload = 1;
84
+ optional io.restorecommerce.status.Status status = 2;
85
85
  }
86
86
 
87
87
  // Unified response object for authorization, purchase and capture calls
88
88
  // for both standard and cardless payments.
89
89
  message PaymentResponse {
90
- PaymentPayloadStatus item = 1;
91
- io.restorecommerce.status.OperationStatus operation_status = 2;
90
+ optional PaymentPayloadStatus item = 1;
91
+ optional io.restorecommerce.status.OperationStatus operation_status = 2;
92
92
  }
93
93
 
94
94
  // Used for building ActiveMerchant::Billing::CreditCard instance.
@@ -20,24 +20,24 @@ service PaymentMethodService {
20
20
  }
21
21
 
22
22
  message Deleted {
23
- string id = 1;
23
+ optional string id = 1;
24
24
  }
25
25
 
26
26
  message PaymentMethodList {
27
27
  repeated PaymentMethod items = 1;
28
28
  optional uint32 total_count = 2;
29
- io.restorecommerce.auth.Subject subject = 3;
29
+ optional io.restorecommerce.auth.Subject subject = 3;
30
30
  }
31
31
 
32
32
  message PaymentMethodListResponse {
33
33
  repeated PaymentMethodResponse items = 1;
34
- uint32 total_count = 2;
35
- io.restorecommerce.status.OperationStatus operation_status = 3;
34
+ optional uint32 total_count = 2;
35
+ optional io.restorecommerce.status.OperationStatus operation_status = 3;
36
36
  }
37
37
 
38
38
  message PaymentMethodResponse {
39
- PaymentMethod payload = 1;
40
- io.restorecommerce.status.Status status = 2;
39
+ optional PaymentMethod payload = 1;
40
+ optional io.restorecommerce.status.Status status = 2;
41
41
  }
42
42
 
43
43
  enum PaymentMethodEnum {
@@ -37,18 +37,18 @@ message PolicyRQ {
37
37
  message PolicyList {
38
38
  repeated Policy items = 1;
39
39
  optional uint32 total_count = 2;
40
- io.restorecommerce.auth.Subject subject = 3;
40
+ optional io.restorecommerce.auth.Subject subject = 3;
41
41
  }
42
42
 
43
43
  message PolicyListResponse {
44
44
  repeated PolicyResponse items = 1;
45
- uint32 total_count = 2;
46
- io.restorecommerce.status.OperationStatus operation_status = 3;
45
+ optional uint32 total_count = 2;
46
+ optional io.restorecommerce.status.OperationStatus operation_status = 3;
47
47
  }
48
48
 
49
49
  message PolicyResponse {
50
- Policy payload = 1;
51
- io.restorecommerce.status.Status status = 2;
50
+ optional Policy payload = 1;
51
+ optional io.restorecommerce.status.Status status = 2;
52
52
  }
53
53
 
54
54
  service PolicyService {
@@ -23,18 +23,18 @@ message PolicySet {
23
23
  message PolicySetList {
24
24
  repeated PolicySet items = 1;
25
25
  optional uint32 total_count = 2;
26
- io.restorecommerce.auth.Subject subject = 3;
26
+ optional io.restorecommerce.auth.Subject subject = 3;
27
27
  }
28
28
 
29
29
  message PolicySetListResponse {
30
30
  repeated PolicySetResponse items = 1;
31
- uint32 total_count = 2;
32
- io.restorecommerce.status.OperationStatus operation_status = 3;
31
+ optional uint32 total_count = 2;
32
+ optional io.restorecommerce.status.OperationStatus operation_status = 3;
33
33
  }
34
34
 
35
35
  message PolicySetResponse {
36
- PolicySet payload = 1;
37
- io.restorecommerce.status.Status status = 2;
36
+ optional PolicySet payload = 1;
37
+ optional io.restorecommerce.status.Status status = 2;
38
38
  }
39
39
 
40
40
  message PolicySetRQ {
@@ -4,7 +4,6 @@ package io.restorecommerce.price;
4
4
 
5
5
  // Used by resolvers
6
6
  import "io/restorecommerce/options.proto";
7
- import "io/restorecommerce/tax.proto";
8
7
  import "io/restorecommerce/currency.proto";
9
8
 
10
9
  message Price {
@@ -20,13 +19,4 @@ message Price {
20
19
  field_name: "currency",
21
20
  }
22
21
  ];
23
- repeated string tax_ids = 5 [
24
- (io.restorecommerce.options.resolver) = {
25
- target_type: ".io.restorecommerce.tax.Tax",
26
- target_service: "master_data",
27
- target_sub_service: "tax",
28
- target_method: "Read",
29
- field_name: "taxes",
30
- }
31
- ];
32
22
  }
@@ -19,22 +19,22 @@ message PriceGroup {
19
19
  message PriceGroupList {
20
20
  repeated PriceGroup items = 1;
21
21
  optional uint32 total_count = 2;
22
- io.restorecommerce.auth.Subject subject = 3;
22
+ optional io.restorecommerce.auth.Subject subject = 3;
23
23
  }
24
24
 
25
25
  message PriceGroupListResponse {
26
26
  repeated PriceGroupResponse items = 1;
27
- uint32 total_count = 2;
28
- io.restorecommerce.status.OperationStatus operation_status = 3;
27
+ optional uint32 total_count = 2;
28
+ optional io.restorecommerce.status.OperationStatus operation_status = 3;
29
29
  }
30
30
 
31
31
  message PriceGroupResponse {
32
- PriceGroup payload = 1;
33
- io.restorecommerce.status.Status status = 3;
32
+ optional PriceGroup payload = 1;
33
+ optional io.restorecommerce.status.Status status = 3;
34
34
  }
35
35
 
36
36
  message Deleted {
37
- string id = 1;
37
+ optional string id = 1;
38
38
  }
39
39
 
40
40
  service PriceGroupService {
@@ -12,11 +12,13 @@ import "io/restorecommerce/status.proto";
12
12
  import "io/restorecommerce/attribute.proto";
13
13
  import "io/restorecommerce/geometry.proto";
14
14
  import "io/restorecommerce/price.proto";
15
- import "io/restorecommerce/property.proto";
16
15
  import "io/restorecommerce/options.proto";
17
16
 
18
17
  // Used by resolvers
19
18
  import "io/restorecommerce/manufacturer.proto";
19
+ import "io/restorecommerce/property.proto";
20
+ import "io/restorecommerce/shop.proto";
21
+ import "io/restorecommerce/tax.proto";
20
22
 
21
23
  service ProductService {
22
24
  rpc Read (io.restorecommerce.resourcebase.ReadRequest) returns (ProductListResponse) {
@@ -29,9 +31,9 @@ service ProductService {
29
31
  }
30
32
 
31
33
  enum AssociationType {
32
- Miscellaneous = 0;
33
- Accessory = 1;
34
- Recommendation = 2;
34
+ MISCELLANEOUS = 0;
35
+ ACCESSORY = 1;
36
+ RECOMMENDATION = 2;
35
37
  }
36
38
 
37
39
  message Association {
@@ -44,9 +46,9 @@ message Association {
44
46
  field_name: "product",
45
47
  }
46
48
  ];
47
- AssociationType type = 2;
49
+ optional AssociationType type = 2;
48
50
  repeated string tags = 3;
49
- google.protobuf.Any data = 4;
51
+ optional google.protobuf.Any data = 4;
50
52
  }
51
53
 
52
54
  // Product resource entity
@@ -60,7 +62,7 @@ message Product {
60
62
  };
61
63
 
62
64
  optional string id = 1;
63
- io.restorecommerce.meta.Meta meta = 2;
65
+ optional io.restorecommerce.meta.Meta meta = 2;
64
66
  oneof product_type {
65
67
  IndividualProduct product = 3;
66
68
  Bundle bundle = 4;
@@ -77,7 +79,7 @@ message Product {
77
79
  optional bool active = 6;
78
80
  repeated string tags = 7;
79
81
  repeated Association associations = 8;
80
- google.protobuf.Any data = 9;
82
+ optional google.protobuf.Any data = 9;
81
83
  }
82
84
 
83
85
  message IndividualProduct {
@@ -122,7 +124,15 @@ message IndividualProduct {
122
124
  }
123
125
  ];
124
126
  }
125
- repeated string tax_ids = 8;
127
+ repeated string tax_ids = 8 [
128
+ (io.restorecommerce.options.resolver) = {
129
+ target_type: ".io.restorecommerce.tax.Tax",
130
+ target_service: "master_data",
131
+ target_sub_service: "tax",
132
+ target_method: "Read",
133
+ field_name: "tax",
134
+ }
135
+ ];
126
136
  optional string gtin = 10;
127
137
  oneof nature {
128
138
  PhysicalProduct physical = 11;
@@ -151,13 +161,13 @@ message ProductList {
151
161
 
152
162
  message ProductListResponse {
153
163
  repeated ProductResponse items = 1;
154
- uint32 total_count = 2;
155
- io.restorecommerce.status.OperationStatus operation_status = 3;
164
+ optional uint32 total_count = 2;
165
+ optional io.restorecommerce.status.OperationStatus operation_status = 3;
156
166
  }
157
167
 
158
168
  message ProductResponse {
159
- Product payload = 1;
160
- io.restorecommerce.status.Status status = 3;
169
+ optional Product payload = 1;
170
+ optional io.restorecommerce.status.Status status = 3;
161
171
  }
162
172
 
163
173
  message Package {
@@ -175,7 +185,7 @@ message PhysicalVariant {
175
185
  repeated io.restorecommerce.image.Image images = 6;
176
186
  repeated io.restorecommerce.file.File files = 7;
177
187
  optional string stock_keeping_unit = 8;
178
- optional string template_variant = 9;
188
+ optional string parent_variant_id = 9;
179
189
  optional Package package = 10;
180
190
  repeated io.restorecommerce.property.Property properties = 11;
181
191
  }
@@ -189,7 +199,7 @@ message ServiceVariant {
189
199
  repeated io.restorecommerce.image.Image images = 6;
190
200
  repeated io.restorecommerce.file.File files = 7;
191
201
  optional string stock_keeping_unit = 8;
192
- optional string template_variant = 9;
202
+ optional string parent_variant_id = 9;
193
203
  repeated io.restorecommerce.property.Property properties = 10;
194
204
  }
195
205
 
@@ -202,7 +212,7 @@ message VirtualVariant {
202
212
  repeated io.restorecommerce.image.Image images = 6;
203
213
  repeated io.restorecommerce.file.File files = 7;
204
214
  optional string stock_keeping_unit = 8;
205
- optional string template_variant = 9;
215
+ optional string parent_variant_id = 9;
206
216
  repeated io.restorecommerce.property.Property properties = 10;
207
217
  }
208
218
 
@@ -34,22 +34,22 @@ message ProductCategory {
34
34
  message ProductCategoryList {
35
35
  repeated ProductCategory items = 1;
36
36
  optional uint32 total_count = 2;
37
- io.restorecommerce.auth.Subject subject = 3;
37
+ optional io.restorecommerce.auth.Subject subject = 3;
38
38
  }
39
39
 
40
40
  message ProductCategoryListResponse {
41
41
  repeated ProductCategoryResponse items = 1;
42
- uint32 total_count = 2;
43
- io.restorecommerce.status.OperationStatus operation_status = 3;
42
+ optional uint32 total_count = 2;
43
+ optional io.restorecommerce.status.OperationStatus operation_status = 3;
44
44
  }
45
45
 
46
46
  message ProductCategoryResponse {
47
- ProductCategory payload = 1;
48
- io.restorecommerce.status.Status status = 2;
47
+ optional ProductCategory payload = 1;
48
+ optional io.restorecommerce.status.Status status = 2;
49
49
  }
50
50
 
51
51
  message Deleted {
52
- string id = 1;
52
+ optional string id = 1;
53
53
  }
54
54
 
55
55
  message Parent {
@@ -32,22 +32,22 @@ message ProductPrototype {
32
32
  message ProductPrototypeList {
33
33
  repeated ProductPrototype items = 1;
34
34
  optional uint32 total_count = 2;
35
- io.restorecommerce.auth.Subject subject = 3;
35
+ optional io.restorecommerce.auth.Subject subject = 3;
36
36
  }
37
37
 
38
38
  message ProductPrototypeListResponse {
39
39
  repeated ProductPrototypeResponse items = 1;
40
- uint32 total_count = 2;
41
- io.restorecommerce.status.OperationStatus operation_status = 3;
40
+ optional uint32 total_count = 2;
41
+ optional io.restorecommerce.status.OperationStatus operation_status = 3;
42
42
  }
43
43
 
44
44
  message ProductPrototypeResponse {
45
- ProductPrototype payload = 1;
46
- io.restorecommerce.status.Status status = 2;
45
+ optional ProductPrototype payload = 1;
46
+ optional io.restorecommerce.status.Status status = 2;
47
47
  }
48
48
 
49
49
  message Deleted {
50
- string id = 1;
50
+ optional string id = 1;
51
51
  }
52
52
 
53
53
  service ProductPrototypeService {
@@ -7,28 +7,28 @@ import "google/protobuf/any.proto";
7
7
  message Payload {
8
8
  // json with <key, template> pairs
9
9
  // e.g. { 'subject': ..., 'message':....}
10
- google.protobuf.Any templates = 1;
11
- google.protobuf.Any data = 2; // data to fill template with
12
- string style_url = 3; // stylesheet URL
10
+ optional google.protobuf.Any templates = 1;
11
+ optional google.protobuf.Any data = 2; // data to fill template with
12
+ optional string style_url = 3; // stylesheet URL
13
13
 
14
14
  enum Strategy { // style-applying 'strategy'
15
15
  INLINE = 0;
16
16
  COPY = 1;
17
17
  }
18
- Strategy strategy = 4; // inlining, copying CSS into <style>, etc...
18
+ optional Strategy strategy = 4; // inlining, copying CSS into <style>, etc...
19
19
  // rendering options JSON object
20
- google.protobuf.Any options = 5;
20
+ optional google.protobuf.Any options = 5;
21
21
  // content type for rendering such as 'application/html' or 'application/text'
22
- string content_type = 6;
22
+ optional string content_type = 6;
23
23
  }
24
24
 
25
25
  message RenderRequest {
26
- string id = 1; // identifies the render request payload
26
+ optional string id = 1; // identifies the render request payload
27
27
  // List of templates with associated data and rendering options
28
28
  repeated Payload payloads = 2;
29
29
  }
30
30
 
31
31
  message RenderResponse {
32
- string id = 1;
32
+ optional string id = 1;
33
33
  repeated google.protobuf.Any responses = 2; // error or HTML contents
34
34
  }