@restorecommerce/protos 6.10.4 → 6.11.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.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,36 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [6.11.0](https://github.com/restorecommerce/libs/compare/@restorecommerce/protos@6.10.5...@restorecommerce/protos@6.11.0) (2025-03-28)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **proto:** add order history ([6bce016](https://github.com/restorecommerce/libs/commit/6bce0168697c92fbd8f152cb4d94103bf7525851))
12
+ * **proto:** add timestamps for order state changes ([07abde8](https://github.com/restorecommerce/libs/commit/07abde805f102f229adf0d5d17cc85d89e44b8a9))
13
+ * **proto:** generic string for template.use_case ([7163625](https://github.com/restorecommerce/libs/commit/71636251c1f40a447b2dde72a26b0abcbca56709))
14
+ * **protos:** add history to orders ([e1991c8](https://github.com/restorecommerce/libs/commit/e1991c8024d7248863676bff12b6f4eedbf5f666))
15
+
16
+
17
+ ### Features
18
+
19
+ * **protos:** adjust rendering to comply with RC message pattern ([abf6d2c](https://github.com/restorecommerce/libs/commit/abf6d2c8ad1a5331a5793b5d25c74590b45c1210))
20
+
21
+
22
+
23
+
24
+
25
+ ## [6.10.5](https://github.com/restorecommerce/libs/compare/@restorecommerce/protos@6.10.4...@restorecommerce/protos@6.10.5) (2025-01-21)
26
+
27
+
28
+ ### Bug Fixes
29
+
30
+ * add mfa status endpoint for users ([5583877](https://github.com/restorecommerce/libs/commit/5583877eac9150b0768ca00f8978bf2a13c1b074))
31
+
32
+
33
+
34
+
35
+
6
36
  ## [6.10.4](https://github.com/restorecommerce/libs/compare/@restorecommerce/protos@6.10.3...@restorecommerce/protos@6.10.4) (2025-01-10)
7
37
 
8
38
 
@@ -22,6 +22,11 @@ service CurrencyService {
22
22
  rpc Upsert (CurrencyList) returns (CurrencyListResponse);
23
23
  }
24
24
 
25
+ enum SymbolAlignment {
26
+ surfix = 0;
27
+ prefix = 1;
28
+ }
29
+
25
30
  message CurrencyList {
26
31
  repeated Currency items = 1;
27
32
  optional uint32 total_count = 2;
@@ -91,13 +91,19 @@ service FulfillmentService {
91
91
 
92
92
  enum FulfillmentState {
93
93
  PENDING = 0;
94
- INVALID = 1;
95
94
  SUBMITTED = 2;
96
- IN_TRANSIT = 3;
97
- COMPLETED = 4;
98
- WITHDRAWN = 5;
99
- CANCELLED = 6;
100
- FAILED = 7;
95
+ SUBMIT_NOTIFIED = 3;
96
+ IN_TRANSIT = 4;
97
+ TRANSIT_NOTIFIED = 5;
98
+ COMPLETED = 6;
99
+ COMPLETION_NOTIFIED = 7;
100
+ CANCELLED = 8;
101
+ CANCELATION_NOTIFIED = 9;
102
+ WITHDRAWN = 10;
103
+ WITHDRAW_NOTIFIED = 11;
104
+ FAILED = 12;
105
+ FAIL_NOTIFIED = 13;
106
+ INVALID = 14;
101
107
  }
102
108
 
103
109
  message Item {
@@ -3,6 +3,7 @@ syntax = "proto3";
3
3
  package io.restorecommerce.order;
4
4
 
5
5
  import "google/protobuf/any.proto";
6
+ import "google/protobuf/timestamp.proto";
6
7
 
7
8
  import "io/restorecommerce/resource_base.proto";
8
9
  import "io/restorecommerce/meta.proto";
@@ -11,6 +12,7 @@ import "io/restorecommerce/status.proto";
11
12
  import "io/restorecommerce/options.proto";
12
13
  import "io/restorecommerce/address.proto";
13
14
  import "io/restorecommerce/amount.proto";
15
+ import "io/restorecommerce/attribute.proto";
14
16
  import "io/restorecommerce/price.proto";
15
17
  import "io/restorecommerce/country.proto";
16
18
  import "io/restorecommerce/fulfillment.proto";
@@ -39,32 +41,31 @@ service OrderService {
39
41
  rpc Cancel (OrderIdList) returns (OrderListResponse);
40
42
  rpc Delete (io.restorecommerce.resourcebase.DeleteRequest) returns (io.restorecommerce.resourcebase.DeleteResponse);
41
43
 
44
+ // Requires Notification Service - (re)sends current order state as email notification.
45
+ rpc Notify (OrderIdList) returns (io.restorecommerce.status.StatusListResponse);
46
+
42
47
  // Requires Fulfillment Service
43
- // Evaluates plausibility of the Fulfillment that would result from given order.
44
- rpc EvaluateFulfillment (OrderList) returns (io.restorecommerce.status.StatusListResponse) {
48
+ rpc QueryFulfillmentSolution (FulfillmentRequestList) returns (io.restorecommerce.fulfillment_product.FulfillmentSolutionListResponse) {
45
49
  option (io.restorecommerce.options.is_query) = true;
46
50
  };
47
51
  // Requires Fulfillment Service
48
- rpc QueryFulfillmentSolution (FulfillmentRequestList) returns (io.restorecommerce.fulfillment_product.FulfillmentSolutionListResponse) {
52
+ // Evaluates plausibility of the Fulfillment that would result from given order.
53
+ rpc EvaluateFulfillment (OrderList) returns (io.restorecommerce.status.StatusListResponse) {
49
54
  option (io.restorecommerce.options.is_query) = true;
50
55
  };
51
56
  // Requires Fulfillment Service
52
57
  rpc CreateFulfillment (FulfillmentRequestList) returns (io.restorecommerce.fulfillment.FulfillmentListResponse);
53
- // Requires Fulfillment Service
54
- rpc TriggerFulfillment (FulfillmentRequestList) returns (io.restorecommerce.status.StatusListResponse);
55
-
56
58
  // Requires Invoice Service
57
59
  rpc CreateInvoice (OrderingInvoiceRequestList) returns (io.restorecommerce.invoice.InvoiceListResponse);
58
- // Requires Invoice Service
59
- rpc TriggerInvoice (OrderingInvoiceRequestList) returns (io.restorecommerce.status.StatusListResponse);
60
60
  }
61
61
 
62
62
  enum OrderState {
63
63
  PENDING = 0;
64
64
  SUBMITTED = 1;
65
65
  COMPLETED = 2;
66
- WITHDRAWN = 3;
67
- CANCELLED = 4;
66
+ CANCELLED = 3;
67
+ WITHDRAWN = 4;
68
+ INVALID = 5;
68
69
  }
69
70
 
70
71
  enum FulfillmentInvoiceMode {
@@ -72,6 +73,15 @@ enum FulfillmentInvoiceMode {
72
73
  EXCLUDE = 1;
73
74
  }
74
75
 
76
+ message Event {
77
+ optional string id = 1;
78
+ optional uint32 code = 2;
79
+ optional string message = 3;
80
+ optional google.protobuf.Timestamp timestamp = 4;
81
+ optional OrderState state = 5;
82
+ repeated io.restorecommerce.attribute.Attribute attibutes = 6;
83
+ }
84
+
75
85
  message Item {
76
86
  optional string id = 1;
77
87
  optional string product_id = 2 [
@@ -143,6 +153,7 @@ message Order {
143
153
  optional string customer_vat_id = 15;
144
154
  optional io.restorecommerce.fulfillment_product.Preferences packaging_preferences = 16;
145
155
  optional string payment_method_id = 17;
156
+ repeated Event history = 18;
146
157
  }
147
158
 
148
159
  message OrderIdList {
@@ -180,9 +191,9 @@ message Deleted {
180
191
 
181
192
  message FulfillmentRequest {
182
193
  optional string order_id = 1;
183
- optional string export_type = 2; // @TODO: not used!
184
- optional string export_description = 3; // @TODO: not used!
185
- optional string invoice_number = 4; // @TODO: not used!
194
+ optional string export_type = 2;
195
+ optional string export_description = 3;
196
+ optional string invoice_number = 4;
186
197
  optional io.restorecommerce.address.ShippingAddress sender_address = 5;
187
198
  repeated string selected_items = 6; // select all on empty
188
199
  optional google.protobuf.Any data = 7;
@@ -32,10 +32,14 @@ service ProductService {
32
32
  rpc Delete (io.restorecommerce.resourcebase.DeleteRequest) returns (io.restorecommerce.resourcebase.DeleteResponse);
33
33
  rpc Update (ProductList) returns (ProductListResponse);
34
34
  rpc Upsert (ProductList) returns (ProductListResponse);
35
+
36
+ rpc GetVariant (IndividualProductVariantListRequest) returns (IndividualProductVariantListResponse) {
37
+ option (io.restorecommerce.options.is_query) = true;
38
+ };
35
39
  }
36
40
 
37
41
  enum AssociationType {
38
- MISCELLANEOUS = 0;
42
+ MISCELLANEOUS = 0; // Use attributes then...
39
43
  ACCESSORY = 1;
40
44
  RECOMMENDATION = 2;
41
45
  }
@@ -54,6 +58,7 @@ message Association {
54
58
  optional AssociationType type = 3;
55
59
  repeated string tags = 4;
56
60
  optional google.protobuf.Any data = 5;
61
+ repeated io.restorecommerce.attribute.Attribute attibutes = 6;
57
62
  }
58
63
 
59
64
  // Product resource entity
@@ -85,6 +90,7 @@ message Product {
85
90
  repeated string tags = 7;
86
91
  repeated Association associations = 8;
87
92
  optional google.protobuf.Any data = 9;
93
+ repeated io.restorecommerce.attribute.Attribute attibutes = 10;
88
94
  }
89
95
 
90
96
  message IndividualProduct {
@@ -167,7 +173,7 @@ message ProductListResponse {
167
173
 
168
174
  message ProductResponse {
169
175
  optional Product payload = 1;
170
- optional io.restorecommerce.status.Status status = 3;
176
+ optional io.restorecommerce.status.Status status = 2;
171
177
  }
172
178
 
173
179
  message Package {
@@ -191,7 +197,8 @@ message PhysicalVariant {
191
197
  optional bool active = 12;
192
198
  optional google.protobuf.Timestamp valid_from = 13;
193
199
  optional google.protobuf.Timestamp valid_to = 14;
194
- optional Package package = 15; // size for shipping
200
+ repeated io.restorecommerce.attribute.Attribute attibutes = 15;
201
+ optional Package package = 16; // size for shipping
195
202
  }
196
203
 
197
204
  message ServiceVariant {
@@ -208,7 +215,8 @@ message ServiceVariant {
208
215
  repeated string tax_ids = 11;
209
216
  optional bool active = 12;
210
217
  optional google.protobuf.Timestamp valid_from = 13;
211
- optional google.protobuf.Timestamp valid_to = 14;
218
+ optional google.protobuf.Timestamp valid_to = 14;
219
+ repeated io.restorecommerce.attribute.Attribute attibutes = 15;
212
220
  }
213
221
 
214
222
  message VirtualVariant {
@@ -225,7 +233,8 @@ message VirtualVariant {
225
233
  repeated string tax_ids = 11;
226
234
  optional bool active = 12;
227
235
  optional google.protobuf.Timestamp valid_from = 13;
228
- optional google.protobuf.Timestamp valid_to = 14;
236
+ optional google.protobuf.Timestamp valid_to = 14;
237
+ repeated io.restorecommerce.attribute.Attribute attibutes = 15;
229
238
  }
230
239
 
231
240
  message Bundle {
@@ -235,6 +244,7 @@ message Bundle {
235
244
  repeated BundleProduct products = 4;
236
245
  optional io.restorecommerce.price.Price price = 5;
237
246
  optional Package pre_packaged = 6;
247
+ repeated io.restorecommerce.attribute.Attribute attibutes = 7;
238
248
  }
239
249
 
240
250
  message BundleProduct {
@@ -252,6 +262,96 @@ message BundleProduct {
252
262
  optional double price_ratio = 4; //Price ratio in relation to the bundle price
253
263
  }
254
264
 
255
- message Deleted {
265
+ message IndividualProductVariantRequest {
266
+ optional string product_id = 1;
267
+ optional string variant_id = 2;
268
+ }
269
+
270
+ message IndividualProductVariantListRequest {
271
+ repeated IndividualProductVariantRequest items = 1;
272
+ optional uint32 total_count = 2;
273
+ optional io.restorecommerce.auth.Subject subject = 3;
274
+ }
275
+
276
+ message IndividualProductVariant {
256
277
  optional string id = 1;
278
+ optional io.restorecommerce.meta.Meta meta = 2;
279
+ optional string variant_id = 3;
280
+ optional string name = 4;
281
+ optional string description = 5;
282
+ repeated string tags = 6;
283
+ repeated Association associations = 7;
284
+ optional google.protobuf.Any data = 8;
285
+ optional string taric_code = 9;
286
+ repeated string shop_ids = 10 [
287
+ (io.restorecommerce.options.resolver) = {
288
+ target_type: ".io.restorecommerce.shop.Shop",
289
+ target_service: "master_data",
290
+ target_sub_service: "shop",
291
+ target_method: "Read",
292
+ field_name: "shops",
293
+ }
294
+ ];
295
+ optional string manufacturer_id = 11 [
296
+ (io.restorecommerce.options.resolver) = {
297
+ target_type: ".io.restorecommerce.manufacturer.Manufacturer",
298
+ target_service: "catalog",
299
+ target_sub_service: "manufacturer",
300
+ target_method: "Read",
301
+ field_name: "manufacturer",
302
+ }
303
+ ];
304
+ optional string origin_country_id = 12 [
305
+ (io.restorecommerce.options.resolver) = {
306
+ target_type: ".io.restorecommerce.country.Country",
307
+ target_service: "master_data",
308
+ target_sub_service: "country",
309
+ target_method: "Read",
310
+ field_name: "origin_country",
311
+ }
312
+ ];
313
+ oneof classification {
314
+ string prototype_id = 13 [
315
+ (io.restorecommerce.options.resolver) = {
316
+ target_type: ".io.restorecommerce.product_prototype.ProductPrototype",
317
+ target_service: "catalog",
318
+ target_sub_service: "product_prototype",
319
+ target_method: "Read",
320
+ field_name: "prototype",
321
+ }
322
+ ];
323
+ string category_id = 14 [
324
+ (io.restorecommerce.options.resolver) = {
325
+ target_type: ".io.restorecommerce.product_category.ProductCategory",
326
+ target_service: "catalog",
327
+ target_sub_service: "product_category",
328
+ target_method: "Read",
329
+ field_name: "category",
330
+ }
331
+ ];
332
+ }
333
+ optional string gtin = 15;
334
+ optional int32 stock_level = 16;
335
+ optional io.restorecommerce.price.Price price = 17;
336
+ repeated io.restorecommerce.image.Image images = 18;
337
+ repeated io.restorecommerce.file.File files = 19;
338
+ optional string stock_keeping_unit = 20;
339
+ repeated io.restorecommerce.property.Property properties = 21;
340
+ repeated string tax_ids = 22;
341
+ optional bool active = 23;
342
+ optional google.protobuf.Timestamp valid_from = 24;
343
+ optional google.protobuf.Timestamp valid_to = 25;
344
+ repeated io.restorecommerce.attribute.Attribute attibutes = 26;
345
+ optional Package package = 27; // size for shipping
257
346
  }
347
+
348
+ message IndividualProductVariantResponse {
349
+ optional IndividualProductVariant payload = 1;
350
+ optional io.restorecommerce.status.Status status = 3;
351
+ }
352
+
353
+ message IndividualProductVariantListResponse {
354
+ repeated ProductResponse items = 1;
355
+ optional uint32 total_count = 2;
356
+ optional io.restorecommerce.status.OperationStatus operation_status = 3;
357
+ }
@@ -3,32 +3,55 @@ syntax = "proto3";
3
3
  package io.restorecommerce.rendering;
4
4
 
5
5
  import "google/protobuf/any.proto";
6
+ import "io/restorecommerce/status.proto";
7
+ import "io/restorecommerce/auth.proto";
6
8
 
7
- message Payload {
8
- // json with <key, template> pairs
9
- // e.g. { 'subject': ..., 'message':....}
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
9
+ /*
10
+ Microservice definition.
11
+ */
12
+ service RenderingService {
13
+ rpc Render (RenderRequestList) returns (RenderResponseList);
14
+ }
13
15
 
16
+ message RenderRequest {
14
17
  enum Strategy { // style-applying 'strategy'
15
18
  INLINE = 0;
16
19
  COPY = 1;
17
20
  }
18
- optional Strategy strategy = 4; // inlining, copying CSS into <style>, etc...
19
- // rendering options JSON object
20
- optional google.protobuf.Any options = 5;
21
- // content type for rendering such as 'application/html' or 'application/text'
22
- optional string content_type = 6;
21
+
22
+ message Template {
23
+ optional string id = 1; // snippit name
24
+ optional bytes body = 2;
25
+ optional string charset = 3;
26
+ }
27
+
28
+ repeated Template templates = 1;
29
+ optional google.protobuf.Any data = 2; // data to fill template with
30
+ optional string style_url = 3; // stylesheet URL
31
+ optional Strategy strategy = 4; // inlining, copying CSS into <style>, etc...
32
+ optional google.protobuf.Any options = 5; // rendering options JSON object
33
+ optional string content_type = 6; // content type for rendering such as 'application/html' or 'application/text'
23
34
  }
24
35
 
25
- message RenderRequest {
36
+ message RenderRequestList {
26
37
  optional string id = 1; // identifies the render request payload
27
- // List of templates with associated data and rendering options
28
- repeated Payload payloads = 2;
38
+ repeated RenderRequest items = 2; // List of templates with associated data and rendering options
39
+ optional io.restorecommerce.auth.Subject subject = 3;
40
+ }
41
+
42
+ message RenderResult {
43
+ optional string id = 1; // snippit name
44
+ optional bytes body = 2;
45
+ optional string charset = 3;
29
46
  }
30
47
 
31
48
  message RenderResponse {
32
- optional string id = 1;
33
- repeated google.protobuf.Any responses = 2; // error or HTML contents
49
+ optional RenderResult payload = 1;
50
+ optional io.restorecommerce.status.Status status = 2;
34
51
  }
52
+
53
+ message RenderResponseList {
54
+ optional string id = 1;
55
+ repeated RenderResponse items = 2;
56
+ optional io.restorecommerce.status.OperationStatus operation_status = 3;
57
+ }
@@ -25,7 +25,7 @@ service TemplateService {
25
25
  }
26
26
 
27
27
  enum TemplateUseCase {
28
- MISCELLANEOUS = 0;
28
+ MISCELLANEOUS = 0; // may use attributes for use case identication
29
29
  INVOICE_PDF = 1;
30
30
  INVOICE_EMAIL_BODY = 2;
31
31
  INVOICE_EMAIL_SUBJECT = 3;
@@ -35,6 +35,15 @@ enum TemplateUseCase {
35
35
  REGISTRATION_EMAIL_SUBJECT = 7;
36
36
  CHANGE_PASSWORD_EMAIL_BODY = 8;
37
37
  CHANGE_PASSWORD_EMAIL_SUBJECT = 9;
38
+ ORDER_CONFIRMATION_EMAIL = 10;
39
+ ORDER_COMPLETION_EMAIL = 11;
40
+ ORDER_CANCELATION_PENDING_EMAIL = 12;
41
+ ORDER_CANCELATION_CONFIRMED_EMAIL = 13;
42
+ FULFILLMENT_CONFIRMATION_EMAIL = 14;
43
+ FULFILLMENT_COMPLETION_EMAIL = 15;
44
+ FULFILLMENT_CANCELATION_PENDING_EMAIL = 16;
45
+ FULFILLMENT_CANCELATION_CONFIRMED_EMAIL = 17;
46
+ FULFILLMENT_FAILED_EMAIL = 18;
38
47
  }
39
48
 
40
49
  message Deleted {
@@ -68,7 +77,7 @@ message Template {
68
77
  optional io.restorecommerce.meta.Meta meta = 2;
69
78
  optional string name = 3;
70
79
  optional string description = 4;
71
- optional TemplateUseCase use_case = 5;
80
+ optional string use_case = 5; // URN or ENUM to identify what this template is used for
72
81
  optional uint32 ordinal = 6; // sort number
73
82
  optional string section = 7; // e.g. header, body, footer
74
83
  repeated io.restorecommerce.file.File bodies = 8; // e.g. text/html
@@ -56,6 +56,7 @@ service UserService {
56
56
  rpc ExchangeTOTP (ExchangeTOTPRequest) returns (UserResponse);
57
57
  rpc CreateBackupTOTPCodes (CreateBackupTOTPCodesRequest) returns (CreateBackupTOTPCodesResponse);
58
58
  rpc ResetTOTP (ResetTOTPRequest) returns (io.restorecommerce.status.OperationStatusObj);
59
+ rpc MfaStatus (MfaStatusRequest) returns (MfaStatusResponse);
59
60
  rpc GetUnauthenticatedSubjectTokenForTenant(TenantRequest) returns (TenantResponse);
60
61
  }
61
62
 
@@ -111,6 +112,17 @@ message ResetTOTPRequest {
111
112
  optional io.restorecommerce.auth.Subject subject = 2;
112
113
  }
113
114
 
115
+ message MfaStatusRequest {
116
+ optional string identifier = 1;
117
+ optional io.restorecommerce.auth.Subject subject = 2;
118
+ }
119
+
120
+ message MfaStatusResponse {
121
+ optional bool has_totp = 1;
122
+ optional bool has_backup_codes = 2;
123
+ optional io.restorecommerce.status.OperationStatus operation_status = 3;
124
+ }
125
+
114
126
  message TenantRequest {
115
127
  optional string domain = 1;
116
128
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@restorecommerce/protos",
3
- "version": "6.10.4",
3
+ "version": "6.11.0",
4
4
  "description": "Protobuf descriptors for Restorecommerce services",
5
5
  "author": "n-fuse GmbH",
6
6
  "repository": {
@@ -15,5 +15,5 @@
15
15
  "protobufs"
16
16
  ],
17
17
  "scripts": {},
18
- "gitHead": "66de138b77af7780a59b05743d25c8756038e658"
18
+ "gitHead": "f012a26b1a15f57c68ceca3e9d53dd5d172cf824"
19
19
  }