@restorecommerce/protos 6.10.0 → 6.10.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,31 @@
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.10.2](https://github.com/restorecommerce/libs/compare/@restorecommerce/protos@6.10.1...@restorecommerce/protos@6.10.2) (2024-11-19)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **proto:** add auto-resolver options to currency ([bb20527](https://github.com/restorecommerce/libs/commit/bb20527e30726f2be86f2c93ab9e166cb40c341d))
12
+
13
+
14
+
15
+
16
+
17
+ ## [6.10.1](https://github.com/restorecommerce/libs/compare/@restorecommerce/protos@6.10.0...@restorecommerce/protos@6.10.1) (2024-11-13)
18
+
19
+
20
+ ### Bug Fixes
21
+
22
+ * **proto:** add required imports ([b001756](https://github.com/restorecommerce/libs/commit/b001756afd7eeff05edf4579e180fc9f40d5f36b))
23
+ * **proto:** add valid time frame for products ([d9561d8](https://github.com/restorecommerce/libs/commit/d9561d8cd3b50d3117d1f28ccf3f27ef3044b984))
24
+ * **protos:** fix typo ([fc450a0](https://github.com/restorecommerce/libs/commit/fc450a07fe222c5b6d9b56f6b4b1c86ca1a2dbfe))
25
+ * **protos:** taxes add round_mode, some taxes may have special rules for rounding ([3f89136](https://github.com/restorecommerce/libs/commit/3f891361f5725bad95be88381b7eb4e5aa4a565e))
26
+
27
+
28
+
29
+
30
+
6
31
  # [6.10.0](https://github.com/restorecommerce/libs/compare/@restorecommerce/protos@6.9.2...@restorecommerce/protos@6.10.0) (2024-11-12)
7
32
 
8
33
 
@@ -10,7 +10,7 @@ import "io/restorecommerce/options.proto";
10
10
 
11
11
  // command resource
12
12
  message Command {
13
- optional string id = 1;
13
+ optional string id = 1;
14
14
  optional io.restorecommerce.meta.Meta meta = 2;
15
15
  optional string name = 3; // command name
16
16
  repeated CommandParameter parameters = 4; // all possible parameters
@@ -22,10 +22,6 @@ service CurrencyService {
22
22
  rpc Upsert (CurrencyList) returns (CurrencyListResponse);
23
23
  }
24
24
 
25
- message Deleted {
26
- optional string id = 1;
27
- }
28
-
29
25
  message CurrencyList {
30
26
  repeated Currency items = 1;
31
27
  optional uint32 total_count = 2;
@@ -48,13 +44,21 @@ message Currency {
48
44
  optional io.restorecommerce.meta.Meta meta = 2;
49
45
  optional string name = 3;
50
46
  optional string symbol = 4;
51
- repeated string country_ids = 5;
47
+ repeated string country_ids = 5 [
48
+ (io.restorecommerce.options.resolver) = {
49
+ target_type: ".io.restorecommerce.country.Country",
50
+ target_service: "master_data",
51
+ target_sub_service: "country",
52
+ target_method: "Read",
53
+ field_name: "countries",
54
+ }
55
+ ];
52
56
  /*
53
57
  * For custom exchange rates beyond market.
54
58
  * Regular rates should be retrived from any API.
55
59
  */
56
60
  repeated ExchangeRate custom_exchange_rates = 6;
57
- optional int64 precision = 7;
61
+ optional int32 precision = 7;
58
62
  }
59
63
 
60
64
  message ExchangeRate {
@@ -5,7 +5,6 @@ package io.restorecommerce.customer;
5
5
  import "io/restorecommerce/resource_base.proto";
6
6
  import "io/restorecommerce/meta.proto";
7
7
  import "io/restorecommerce/auth.proto";
8
- import "io/restorecommerce/attribute.proto";
9
8
  import "io/restorecommerce/status.proto";
10
9
  import "io/restorecommerce/setting.proto";
11
10
  import "io/restorecommerce/options.proto";
@@ -0,0 +1,70 @@
1
+ syntax = "proto3";
2
+
3
+ package io.restorecommerce.dicount;
4
+
5
+ import "google/protobuf/timestamp.proto";
6
+
7
+ import "io/restorecommerce/resource_base.proto";
8
+ import "io/restorecommerce/meta.proto";
9
+ import "io/restorecommerce/auth.proto";
10
+ import "io/restorecommerce/status.proto";
11
+ import "io/restorecommerce/options.proto";
12
+
13
+ /*
14
+ Microservice definition.
15
+ */
16
+ service DiscountService {
17
+ rpc Read (io.restorecommerce.resourcebase.ReadRequest) returns (DiscountListResponse) {
18
+ option (io.restorecommerce.options.is_query) = true;
19
+ };
20
+ rpc Create (DiscountList) returns (DiscountListResponse);
21
+ rpc Delete (io.restorecommerce.resourcebase.DeleteRequest) returns (io.restorecommerce.resourcebase.DeleteResponse);
22
+ rpc Update (DiscountList) returns (DiscountListResponse);
23
+ rpc Upsert (DiscountList) returns (DiscountListResponse);
24
+ }
25
+
26
+ enum DicountType {
27
+ PERCENTAGE = 0; // amount = price - price * value/100
28
+ ABSOLUTE = 1; // amount = price - value
29
+ OVERRIDE = 2; // amount = value
30
+ }
31
+
32
+ message Discount {
33
+ message Item {
34
+ optional string product_id = 1;
35
+ repeated string variant_ids = 2; // empty to address all variants
36
+ }
37
+
38
+ optional string id = 1;
39
+ optional io.restorecommerce.meta.Meta meta = 2;
40
+ optional string name = 3;
41
+ optional string description = 4;
42
+ optional google.protobuf.Timestamp start = 5;
43
+ optional google.protobuf.Timestamp end = 6;
44
+ optional DicountType discount_type = 7;
45
+ optional double value = 8;
46
+ repeated string price_group_ids = 9;
47
+ repeated string product_category_ids = 10;
48
+ repeated Item individual_items = 11;
49
+
50
+ repeated string granted_Discount_ids = 12;
51
+ repeated string granted_organization_ids = 13; // ????
52
+ repeated string granted_user_role_ids = 14; // ????
53
+ }
54
+
55
+ message DiscountList {
56
+ repeated Discount items = 1;
57
+ optional uint32 total_count = 2;
58
+ optional io.restorecommerce.auth.Subject subject = 3;
59
+ }
60
+
61
+ message DiscountListResponse {
62
+ repeated DiscountResponse items = 1;
63
+ optional uint32 total_count = 2;
64
+ optional io.restorecommerce.status.OperationStatus operation_status = 3;
65
+ }
66
+
67
+ message DiscountResponse {
68
+ optional Discount payload = 1;
69
+ optional io.restorecommerce.status.Status status = 2;
70
+ }
@@ -3,6 +3,8 @@ syntax = "proto3";
3
3
  package io.restorecommerce.product;
4
4
 
5
5
  import "google/protobuf/any.proto";
6
+ import "google/protobuf/timestamp.proto";
7
+
6
8
  import "io/restorecommerce/resource_base.proto";
7
9
  import "io/restorecommerce/meta.proto";
8
10
  import "io/restorecommerce/image.proto";
@@ -70,13 +72,13 @@ message Product {
70
72
  IndividualProduct product = 3;
71
73
  Bundle bundle = 4;
72
74
  }
73
- optional string shop_id = 5 [
75
+ repeated string shop_ids = 5 [
74
76
  (io.restorecommerce.options.resolver) = {
75
77
  target_type: ".io.restorecommerce.shop.Shop",
76
78
  target_service: "master_data",
77
79
  target_sub_service: "shop",
78
80
  target_method: "Read",
79
- field_name: "shop",
81
+ field_name: "shops",
80
82
  }
81
83
  ];
82
84
  optional bool active = 6;
@@ -137,15 +139,18 @@ message IndividualProduct {
137
139
  }
138
140
 
139
141
  message PhysicalProduct {
140
- repeated PhysicalVariant variants = 1;
142
+ repeated PhysicalVariant variants = 1; // complete product definition - for sale
143
+ repeated PhysicalVariant templates = 2; // incomplete templates - not for sale
141
144
  }
142
145
 
143
146
  message ServiceProduct {
144
147
  repeated ServiceVariant variants = 1;
148
+ repeated ServiceVariant templates = 2;
145
149
  }
146
150
 
147
151
  message VirtualProduct {
148
152
  repeated VirtualVariant variants = 1;
153
+ repeated VirtualVariant templates = 2;
149
154
  }
150
155
 
151
156
  message ProductList {
@@ -183,7 +188,10 @@ message PhysicalVariant {
183
188
  optional string parent_variant_id = 9;
184
189
  repeated io.restorecommerce.property.Property properties = 10;
185
190
  repeated string tax_ids = 11;
186
- optional Package package = 12;
191
+ optional bool active = 12;
192
+ optional google.protobuf.Timestamp valid_from = 13;
193
+ optional google.protobuf.Timestamp valid_to = 14;
194
+ optional Package package = 15; // size for shipping
187
195
  }
188
196
 
189
197
  message ServiceVariant {
@@ -198,6 +206,9 @@ message ServiceVariant {
198
206
  optional string parent_variant_id = 9;
199
207
  repeated io.restorecommerce.property.Property properties = 10;
200
208
  repeated string tax_ids = 11;
209
+ optional bool active = 12;
210
+ optional google.protobuf.Timestamp valid_from = 13;
211
+ optional google.protobuf.Timestamp valid_to = 14;
201
212
  }
202
213
 
203
214
  message VirtualVariant {
@@ -212,6 +223,9 @@ message VirtualVariant {
212
223
  optional string parent_variant_id = 9;
213
224
  repeated io.restorecommerce.property.Property properties = 10;
214
225
  repeated string tax_ids = 11;
226
+ optional bool active = 12;
227
+ optional google.protobuf.Timestamp valid_from = 13;
228
+ optional google.protobuf.Timestamp valid_to = 14;
215
229
  }
216
230
 
217
231
  message Bundle {
@@ -25,8 +25,10 @@ service TaxService {
25
25
  rpc Upsert (TaxList) returns (TaxListResponse);
26
26
  }
27
27
 
28
- message Deleted {
29
- optional string id = 1;
28
+ enum RoundMode {
29
+ HALF = 0;
30
+ CEIL = 1;
31
+ FLOOR = 2;
30
32
  }
31
33
 
32
34
  message TaxList {
@@ -71,4 +73,5 @@ message Tax {
71
73
  ];
72
74
  optional string name = 7;
73
75
  optional string abbreviation = 8;
76
+ optional RoundMode round_mode = 9;
74
77
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@restorecommerce/protos",
3
- "version": "6.10.0",
3
+ "version": "6.10.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": "77770a2cc18aab0f59cf841291922f0283b41e2b"
18
+ "gitHead": "7ea840b9a39a84221970535b1f0f4e805a928664"
19
19
  }