@restorecommerce/protos 6.11.0 → 6.11.2

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,33 @@
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.2](https://github.com/restorecommerce/libs/compare/@restorecommerce/protos@6.11.1...@restorecommerce/protos@6.11.2) (2025-05-14)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **protos:** add collection (name) to message Deleted for kafka DeletedAll event ([807ca4c](https://github.com/restorecommerce/libs/commit/807ca4cce3624720c6a2436afdee407ec181029c))
12
+ * **protos:** add costums declaration to fulfillment ([0797faa](https://github.com/restorecommerce/libs/commit/0797faa53388cbc81340203d58c92340f7443514))
13
+ * **protos:** fix typos in proto, load meta in acs decorater, refactor logger filePath detector ([8f02eee](https://github.com/restorecommerce/libs/commit/8f02eee6460b9c48f2f8416b08017f6ba11caf4e))
14
+
15
+
16
+
17
+
18
+
19
+ ## [6.11.1](https://github.com/restorecommerce/libs/compare/@restorecommerce/protos@6.11.0...@restorecommerce/protos@6.11.1) (2025-03-31)
20
+
21
+
22
+ ### Bug Fixes
23
+
24
+ * **proto:** add layout to rendering template array ([bcf636f](https://github.com/restorecommerce/libs/commit/bcf636f3ea19662a9f30b110137976eda60a0abb))
25
+ * **protos:** rename template use-cases ([0a578ac](https://github.com/restorecommerce/libs/commit/0a578ac076b5f5ba2fcb784d8b9db3ba76168943))
26
+ * **protos:** render response with repeated bodies ([a2f4df9](https://github.com/restorecommerce/libs/commit/a2f4df979155721ba50af264648c41e99e5a2224))
27
+ * **protos:** resolve enum error ([22b33a1](https://github.com/restorecommerce/libs/commit/22b33a18e5504ef5a0f00a653dadcbc69ad81277))
28
+
29
+
30
+
31
+
32
+
6
33
  # [6.11.0](https://github.com/restorecommerce/libs/compare/@restorecommerce/protos@6.10.5...@restorecommerce/protos@6.11.0) (2025-03-28)
7
34
 
8
35
 
@@ -46,7 +46,9 @@ message Country {
46
46
  optional string id = 1;
47
47
  optional io.restorecommerce.meta.Meta meta = 2;
48
48
  optional string name = 3;
49
- optional string country_code = 4;
49
+ optional string country_code = 4; // primaly used in target application (fallback)
50
50
  optional string geographical_name = 5;
51
51
  repeated string economic_areas = 6;
52
+ optional string country_code_alpha_2 = 7; // ISO 3166-1 alpha-2
53
+ optional string country_code_alpha_3 = 8; // ISO 3166-1 alpha-3
52
54
  }
@@ -4,19 +4,28 @@ package io.restorecommerce.file;
4
4
 
5
5
  import "io/restorecommerce/image.proto";
6
6
 
7
+ message Blob {
8
+ bytes data = 1;
9
+ string encoding = 2;
10
+ }
11
+
7
12
  message File {
8
13
  optional string id = 1;
9
14
  optional uint32 ordinal = 2;
10
15
  optional string caption = 3;
11
16
  optional string filename = 4;
12
17
  optional string content_type = 5;
13
- optional string url = 6;
14
- optional int64 bytes = 7;
15
- repeated string tags = 8;
16
- optional io.restorecommerce.image.Image thumbnail = 9;
18
+ oneof type {
19
+ string url = 6;
20
+ Blob blob = 7;
21
+ }
22
+ optional int64 bytes = 8;
23
+ repeated string tags = 9;
24
+ optional io.restorecommerce.image.Image thumbnail = 10;
17
25
  }
18
26
 
19
27
  message FileList {
20
28
  repeated File items = 1;
21
29
  optional uint32 total_count = 2;
22
- }
30
+ }
31
+
@@ -9,12 +9,12 @@ import "io/restorecommerce/auth.proto";
9
9
  import "io/restorecommerce/status.proto";
10
10
  import "io/restorecommerce/meta.proto";
11
11
  import "io/restorecommerce/address.proto";
12
- import "io/restorecommerce/country.proto";
13
12
  import "io/restorecommerce/product.proto";
14
13
  import "io/restorecommerce/options.proto";
15
14
  import "io/restorecommerce/price.proto";
16
15
  import "io/restorecommerce/amount.proto";
17
16
  import "io/restorecommerce/invoice.proto";
17
+ import "io/restorecommerce/file.proto";
18
18
  import "google/protobuf/timestamp.proto";
19
19
 
20
20
  // Used by resolvers
@@ -91,26 +91,41 @@ service FulfillmentService {
91
91
 
92
92
  enum FulfillmentState {
93
93
  PENDING = 0;
94
- SUBMITTED = 2;
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;
94
+ SUBMITTED = 1;
95
+ IN_TRANSIT = 2;
96
+ COMPLETE = 3;
97
+ CANCELLED = 4;
98
+ WITHDRAWN = 5;
99
+ RETOURE = 6;
100
+ RETOURE_COMPLETE = 7;
101
+ FAILED = 8;
102
+ INVALID = 9;
103
+ }
104
+
105
+ enum ExportType {
106
+ OTHER = 0;
107
+ PRESENT = 1;
108
+ COMMERCIAL_SAMPLE = 2;
109
+ DOCUMENT = 3;
110
+ RETURN_OF_GOODS = 4;
111
+ COMMERCIAL_GOODS = 5;
112
+ }
113
+
114
+ enum ShippingCondition {
115
+ DDU = 0;
116
+ DPA = 1;
117
+ DAP = 2;
118
+ DDP = 3;
119
+ DDX = 4;
120
+ DXV = 5;
107
121
  }
108
122
 
109
123
  message Item {
110
124
  optional string product_id = 1;
111
125
  optional string variant_id = 2;
112
126
  optional int32 quantity = 3;
113
- optional io.restorecommerce.product.Package package = 4;
127
+ optional string harmonizedSystemCode = 4;
128
+ optional io.restorecommerce.amount.Amount amount = 5;
114
129
  }
115
130
 
116
131
  message Parcel {
@@ -128,19 +143,35 @@ message Parcel {
128
143
  repeated Item items = 4;
129
144
  optional io.restorecommerce.price.Price price = 5;
130
145
  optional io.restorecommerce.amount.Amount amount = 6;
131
- optional io.restorecommerce.product.Package package = 8;
146
+ optional io.restorecommerce.product.Package package = 7;
132
147
  }
133
148
 
134
149
  message Label {
135
- oneof type {
136
- string url = 1;
137
- string pdf = 2;
138
- string png = 3;
139
- }
140
- optional string parcel_id = 4;
141
- optional string shipment_number = 5; //filled on Order
142
- optional FulfillmentState state = 6; //update by Track
143
- optional io.restorecommerce.status.Status status = 7; //API status
150
+ optional string id = 1;
151
+ optional string parcel_id = 2;
152
+ optional io.restorecommerce.file.File file = 3;
153
+ optional string shipment_number = 4; //filled on Order
154
+ optional FulfillmentState state = 5; //update by Track
155
+ optional io.restorecommerce.status.Status status = 6; //API status
156
+ }
157
+
158
+ message Charge {
159
+ optional string description = 1;
160
+ optional io.restorecommerce.amount.Amount charge = 2;
161
+ }
162
+
163
+ message CustomsDeclaration {
164
+ optional string export_type = 1; // should be ExportType (but unconstrained)
165
+ optional string export_description = 2;
166
+ optional string invoice_number = 3;
167
+ optional string consignee_ref = 4;
168
+ optional string shipper_ref = 5;
169
+ optional string MRN = 6;
170
+ optional string permit_number = 7; // for e.g. rare goods
171
+ optional string attestation = 8; // for e.g. medical goods
172
+ optional string shipping_condition = 9; // should be ShippingCondition (unconstrained)
173
+ repeated Charge charges = 10;
174
+ optional bool notify = 11;
144
175
  }
145
176
 
146
177
  message Packaging {
@@ -148,9 +179,7 @@ message Packaging {
148
179
  optional io.restorecommerce.address.ShippingAddress sender = 2;
149
180
  optional io.restorecommerce.address.ShippingAddress recipient = 3;
150
181
  optional string notify = 4;
151
- optional string export_type = 5;
152
- optional string export_description = 6;
153
- optional string invoice_number = 7;
182
+ optional CustomsDeclaration customs_declaration = 5;
154
183
  }
155
184
 
156
185
  message Event {
@@ -6,6 +6,7 @@ import "google/protobuf/any.proto";
6
6
  import "io/restorecommerce/resource_base.proto";
7
7
  import "io/restorecommerce/meta.proto";
8
8
  import "io/restorecommerce/auth.proto";
9
+ import "io/restorecommerce/attribute.proto";
9
10
  import "io/restorecommerce/status.proto";
10
11
  import "io/restorecommerce/options.proto";
11
12
 
@@ -26,6 +27,10 @@ service FulfillmentCourierService {
26
27
  rpc Delete (io.restorecommerce.resourcebase.DeleteRequest) returns (io.restorecommerce.resourcebase.DeleteResponse);
27
28
  }
28
29
 
30
+ enum SupportedAPI {
31
+ DHLRest = 0;
32
+ }
33
+
29
34
  message FulfillmentCourier {
30
35
  option (restorecommerce.options.kafka_subscriber) = {
31
36
  plural: "fulfillmentCouriers"
@@ -50,10 +55,10 @@ message FulfillmentCourier {
50
55
  optional string description = 5;
51
56
  optional string logo = 6;
52
57
  optional string website = 7;
53
- optional string stub_type = 8; // obsolete, use api
54
- optional string credential_id = 9;
55
- optional google.protobuf.Any configuration = 10;
56
- optional string api = 11;
58
+ optional string credential_id = 8;
59
+ optional google.protobuf.Any configuration = 9;
60
+ optional string api = 10; // should be SupportedAPI (but unconstrained)
61
+ repeated io.restorecommerce.attribute.Attribute attributes = 11;
57
62
  }
58
63
 
59
64
  message FulfillmentCourierList {
@@ -33,9 +33,35 @@ service ProductService {
33
33
  rpc Update (ProductList) returns (ProductListResponse);
34
34
  rpc Upsert (ProductList) returns (ProductListResponse);
35
35
 
36
+ /*
37
+ * Response with resolved product-variants in a flatten message
38
+ */
36
39
  rpc GetVariant (IndividualProductVariantListRequest) returns (IndividualProductVariantListResponse) {
37
40
  option (io.restorecommerce.options.is_query) = true;
38
41
  };
42
+
43
+ /*
44
+ * Response with resolved product-variants
45
+ * Claims a requested quantity from stock level permanently.
46
+ * Response with an error status if requested quantity is not in stock.
47
+ */
48
+ rpc ClaimVariant (IndividualProductVariantListRequest) returns (IndividualProductVariantListResponse);
49
+
50
+ /*
51
+ * Response with resolved product-variants
52
+ * Releases a requested quantity back to stock level.
53
+ */
54
+ rpc ReleaseVariant (IndividualProductVariantListRequest) returns (IndividualProductVariantListResponse);
55
+
56
+ /*
57
+ * Claim all products assigned to a session permanently
58
+ */
59
+ rpc ResolveSession (Session) returns (IndividualProductVariantListResponse);
60
+
61
+ /*
62
+ * Drop session and instantly release all claimed products
63
+ */
64
+ rpc DropSession (Session) returns (IndividualProductVariantListResponse);
39
65
  }
40
66
 
41
67
  enum AssociationType {
@@ -262,9 +288,24 @@ message BundleProduct {
262
288
  optional double price_ratio = 4; //Price ratio in relation to the bundle price
263
289
  }
264
290
 
291
+ message Session {
292
+ optional string id = 1; // get a new id if empty
293
+ optional google.protobuf.Timestamp from = 2; // required field to start a session
294
+ optional google.protobuf.Timestamp to = 3; // leave empty for auto max session
295
+ }
296
+
265
297
  message IndividualProductVariantRequest {
298
+ message Localization {
299
+ optional string country_id = 1;
300
+ optional string locale_id = 2;
301
+ optional string currency_id = 3;
302
+ }
303
+
266
304
  optional string product_id = 1;
267
305
  optional string variant_id = 2;
306
+ optional uint32 quantity = 3;
307
+ optional Session session = 4;
308
+ optional Localization localization = 5; // for taxing, currency, etc.?
268
309
  }
269
310
 
270
311
  message IndividualProductVariantListRequest {
@@ -341,7 +382,7 @@ message IndividualProductVariant {
341
382
  optional bool active = 23;
342
383
  optional google.protobuf.Timestamp valid_from = 24;
343
384
  optional google.protobuf.Timestamp valid_to = 25;
344
- repeated io.restorecommerce.attribute.Attribute attibutes = 26;
385
+ repeated io.restorecommerce.attribute.Attribute attributes = 26;
345
386
  optional Package package = 27; // size for shipping
346
387
  }
347
388
 
@@ -351,7 +392,8 @@ message IndividualProductVariantResponse {
351
392
  }
352
393
 
353
394
  message IndividualProductVariantListResponse {
354
- repeated ProductResponse items = 1;
395
+ repeated IndividualProductVariantResponse items = 1;
355
396
  optional uint32 total_count = 2;
356
397
  optional io.restorecommerce.status.OperationStatus operation_status = 3;
398
+ optional Session session = 4;
357
399
  }
@@ -22,15 +22,17 @@ message RenderRequest {
22
22
  message Template {
23
23
  optional string id = 1; // snippit name
24
24
  optional bytes body = 2;
25
- optional string charset = 3;
25
+ optional bytes layout = 3;
26
+ optional string charset = 4; // defaults to utf-8
26
27
  }
27
28
 
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'
29
+ optional string id = 1;
30
+ repeated Template templates = 2;
31
+ optional google.protobuf.Any data = 3; // data to fill template with
32
+ optional string style_url = 4; // stylesheet URL
33
+ optional Strategy strategy = 5; // inlining, copying CSS into <style>, etc...
34
+ optional google.protobuf.Any options = 6; // rendering options JSON object
35
+ optional string content_type = 7; // content type for rendering such as 'application/html' or 'application/text'
34
36
  }
35
37
 
36
38
  message RenderRequestList {
@@ -40,9 +42,15 @@ message RenderRequestList {
40
42
  }
41
43
 
42
44
  message RenderResult {
45
+ message Bodies {
46
+ optional string id = 1; // snippit name
47
+ optional bytes body = 2;
48
+ optional string charset = 3; // defaults to utf-8
49
+ }
50
+
43
51
  optional string id = 1; // snippit name
44
- optional bytes body = 2;
45
- optional string charset = 3;
52
+ repeated Bodies bodies = 2;
53
+ optional string content_type = 7; // content type for rendering such as 'application/html' or 'application/text'
46
54
  }
47
55
 
48
56
  message RenderResponse {
@@ -141,4 +141,5 @@ message Resource {
141
141
 
142
142
  message Deleted {
143
143
  optional string id = 1;
144
+ optional string collection = 2;
144
145
  }
@@ -35,15 +35,18 @@ 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
+ ORDER_PRENDING_EMAIL = 10;
39
+ ORDER_SUBMITTED_EMAIL = 11;
40
+ ORDER_COMPLETION_EMAIL = 12;
41
+ ORDER_CANCELATION_EMAIL = 13;
42
+ ORDER_WITHDRAWN_EMAIL = 14;
43
+ ORDER_INVALID_EMAIL = 15;
44
+ FULFILLMENT_PENDING_EMAIL = 16;
45
+ FULFILLMENT_SUBMITTED_EMAIL = 17;
46
+ FULFILLMENT_COMPLETION_EMAIL = 18;
47
+ FULFILLMENT_CANCELATION_EMAIL = 19;
48
+ FULFILLMENT_WITHDRAWN_EMAIL = 20;
49
+ FULFILLMENT_FAILED_EMAIL = 21;
47
50
  }
48
51
 
49
52
  message Deleted {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@restorecommerce/protos",
3
- "version": "6.11.0",
3
+ "version": "6.11.2",
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": "f012a26b1a15f57c68ceca3e9d53dd5d172cf824"
18
+ "gitHead": "7e6127b5e0c68b998bfa54364d23fa6461bf1b76"
19
19
  }