@restorecommerce/protos 6.11.1 → 6.11.3

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,30 @@
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.3](https://github.com/restorecommerce/libs/compare/@restorecommerce/protos@6.11.2...@restorecommerce/protos@6.11.3) (2025-05-19)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **protos:** add persistent export information ([680ff84](https://github.com/restorecommerce/libs/commit/680ff8499f927812dd906304137b6d7be493e058))
12
+
13
+
14
+
15
+
16
+
17
+ ## [6.11.2](https://github.com/restorecommerce/libs/compare/@restorecommerce/protos@6.11.1...@restorecommerce/protos@6.11.2) (2025-05-14)
18
+
19
+
20
+ ### Bug Fixes
21
+
22
+ * **protos:** add collection (name) to message Deleted for kafka DeletedAll event ([807ca4c](https://github.com/restorecommerce/libs/commit/807ca4cce3624720c6a2436afdee407ec181029c))
23
+ * **protos:** add costums declaration to fulfillment ([0797faa](https://github.com/restorecommerce/libs/commit/0797faa53388cbc81340203d58c92340f7443514))
24
+ * **protos:** fix typos in proto, load meta in acs decorater, refactor logger filePath detector ([8f02eee](https://github.com/restorecommerce/libs/commit/8f02eee6460b9c48f2f8416b08017f6ba11caf4e))
25
+
26
+
27
+
28
+
29
+
6
30
  ## [6.11.1](https://github.com/restorecommerce/libs/compare/@restorecommerce/protos@6.11.0...@restorecommerce/protos@6.11.1) (2025-03-31)
7
31
 
8
32
 
@@ -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
+
@@ -15,6 +15,7 @@ import "io/restorecommerce/options.proto";
15
15
  import "io/restorecommerce/price.proto";
16
16
  import "io/restorecommerce/amount.proto";
17
17
  import "io/restorecommerce/invoice.proto";
18
+ import "io/restorecommerce/file.proto";
18
19
  import "google/protobuf/timestamp.proto";
19
20
 
20
21
  // Used by resolvers
@@ -91,26 +92,46 @@ service FulfillmentService {
91
92
 
92
93
  enum FulfillmentState {
93
94
  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;
95
+ SUBMITTED = 1;
96
+ IN_TRANSIT = 2;
97
+ COMPLETE = 3;
98
+ CANCELLED = 4;
99
+ WITHDRAWN = 5;
100
+ RETOURE = 6;
101
+ RETOURE_COMPLETE = 7;
102
+ FAILED = 8;
103
+ INVALID = 9;
104
+ }
105
+
106
+ enum ExportType {
107
+ OTHER = 0;
108
+ PRESENT = 1;
109
+ COMMERCIAL_SAMPLE = 2;
110
+ DOCUMENT = 3;
111
+ RETURN_OF_GOODS = 4;
112
+ COMMERCIAL_GOODS = 5;
113
+ }
114
+
115
+ enum ShippingCondition {
116
+ DDU = 0;
117
+ DPA = 1;
118
+ DAP = 2;
119
+ DDP = 3;
120
+ DDX = 4;
121
+ DXV = 5;
107
122
  }
108
123
 
109
124
  message Item {
110
125
  optional string product_id = 1;
111
126
  optional string variant_id = 2;
112
127
  optional int32 quantity = 3;
113
- optional io.restorecommerce.product.Package package = 4;
128
+ optional string name = 4;
129
+ optional string description = 5;
130
+ optional string taric_code = 6;
131
+ optional string hs_code = 7;
132
+ optional string origin_country_id = 8;
133
+ optional io.restorecommerce.amount.Amount value = 9;
134
+ optional io.restorecommerce.product.Package package = 10;
114
135
  }
115
136
 
116
137
  message Parcel {
@@ -128,19 +149,35 @@ message Parcel {
128
149
  repeated Item items = 4;
129
150
  optional io.restorecommerce.price.Price price = 5;
130
151
  optional io.restorecommerce.amount.Amount amount = 6;
131
- optional io.restorecommerce.product.Package package = 8;
152
+ optional io.restorecommerce.product.Package package = 7;
132
153
  }
133
154
 
134
155
  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
156
+ optional string id = 1;
157
+ optional string parcel_id = 2;
158
+ optional io.restorecommerce.file.File file = 3;
159
+ optional string shipment_number = 4; //filled on Order
160
+ optional FulfillmentState state = 5; //update by Track
161
+ optional io.restorecommerce.status.Status status = 6; //API status
162
+ }
163
+
164
+ message Charge {
165
+ optional string description = 1;
166
+ optional io.restorecommerce.amount.Amount charge = 2;
167
+ }
168
+
169
+ message CustomsDeclaration {
170
+ optional string export_type = 1; // should be ExportType (but unconstrained)
171
+ optional string export_description = 2;
172
+ optional string invoice_number = 3;
173
+ optional string consignee_ref = 4;
174
+ optional string shipper_ref = 5;
175
+ optional string MRN = 6;
176
+ optional string permit_number = 7; // for e.g. rare goods
177
+ optional string attestation = 8; // for e.g. medical goods
178
+ optional string shipping_condition = 9; // should be ShippingCondition (unconstrained)
179
+ repeated Charge charges = 10;
180
+ optional bool notify = 11;
144
181
  }
145
182
 
146
183
  message Packaging {
@@ -148,9 +185,7 @@ message Packaging {
148
185
  optional io.restorecommerce.address.ShippingAddress sender = 2;
149
186
  optional io.restorecommerce.address.ShippingAddress recipient = 3;
150
187
  optional string notify = 4;
151
- optional string export_type = 5;
152
- optional string export_description = 6;
153
- optional string invoice_number = 7;
188
+ optional CustomsDeclaration customs_declaration = 5;
154
189
  }
155
190
 
156
191
  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 {
@@ -114,7 +140,6 @@ message IndividualProduct {
114
140
  field_name: "origin_country",
115
141
  }
116
142
  ];
117
- optional string taric_code = 5;
118
143
  oneof classification {
119
144
  string prototype_id = 6 [
120
145
  (io.restorecommerce.options.resolver) = {
@@ -195,10 +220,13 @@ message PhysicalVariant {
195
220
  repeated io.restorecommerce.property.Property properties = 10;
196
221
  repeated string tax_ids = 11;
197
222
  optional bool active = 12;
198
- optional google.protobuf.Timestamp valid_from = 13;
223
+ optional google.protobuf.Timestamp valid_from = 13; // valid for sale
199
224
  optional google.protobuf.Timestamp valid_to = 14;
200
225
  repeated io.restorecommerce.attribute.Attribute attibutes = 15;
201
226
  optional Package package = 16; // size for shipping
227
+ optional string taric_code = 17;
228
+ optional string hs_code = 18;
229
+ optional string export_description = 19;
202
230
  }
203
231
 
204
232
  message ServiceVariant {
@@ -214,7 +242,7 @@ message ServiceVariant {
214
242
  repeated io.restorecommerce.property.Property properties = 10;
215
243
  repeated string tax_ids = 11;
216
244
  optional bool active = 12;
217
- optional google.protobuf.Timestamp valid_from = 13;
245
+ optional google.protobuf.Timestamp valid_from = 13; // valid for sale
218
246
  optional google.protobuf.Timestamp valid_to = 14;
219
247
  repeated io.restorecommerce.attribute.Attribute attibutes = 15;
220
248
  }
@@ -262,9 +290,24 @@ message BundleProduct {
262
290
  optional double price_ratio = 4; //Price ratio in relation to the bundle price
263
291
  }
264
292
 
293
+ message Session {
294
+ optional string id = 1; // get a new id if empty
295
+ optional google.protobuf.Timestamp from = 2; // required field to start a session
296
+ optional google.protobuf.Timestamp to = 3; // leave empty for auto max session
297
+ }
298
+
265
299
  message IndividualProductVariantRequest {
300
+ message Localization {
301
+ optional string country_id = 1;
302
+ optional string locale_id = 2;
303
+ optional string currency_id = 3;
304
+ }
305
+
266
306
  optional string product_id = 1;
267
307
  optional string variant_id = 2;
308
+ optional uint32 quantity = 3;
309
+ optional Session session = 4;
310
+ optional Localization localization = 5; // for taxing, currency, etc.?
268
311
  }
269
312
 
270
313
  message IndividualProductVariantListRequest {
@@ -341,8 +384,9 @@ message IndividualProductVariant {
341
384
  optional bool active = 23;
342
385
  optional google.protobuf.Timestamp valid_from = 24;
343
386
  optional google.protobuf.Timestamp valid_to = 25;
344
- repeated io.restorecommerce.attribute.Attribute attibutes = 26;
387
+ repeated io.restorecommerce.attribute.Attribute attributes = 26;
345
388
  optional Package package = 27; // size for shipping
389
+ optional string hs_code = 28;
346
390
  }
347
391
 
348
392
  message IndividualProductVariantResponse {
@@ -351,7 +395,8 @@ message IndividualProductVariantResponse {
351
395
  }
352
396
 
353
397
  message IndividualProductVariantListResponse {
354
- repeated ProductResponse items = 1;
398
+ repeated IndividualProductVariantResponse items = 1;
355
399
  optional uint32 total_count = 2;
356
400
  optional io.restorecommerce.status.OperationStatus operation_status = 3;
401
+ optional Session session = 4;
357
402
  }
@@ -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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@restorecommerce/protos",
3
- "version": "6.11.1",
3
+ "version": "6.11.3",
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": "bbc9ec50fc18105dac297345e4f3377ee29a30cd"
18
+ "gitHead": "c35fee3d7b022c3460597d803e668bc93d2a13fb"
19
19
  }