@restorecommerce/protos 3.1.1 → 4.0.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 +40 -0
- package/io/restorecommerce/address.proto +7 -1
- package/io/restorecommerce/amount.proto +36 -0
- package/io/restorecommerce/contact_point.proto +7 -5
- package/io/restorecommerce/currency.proto +89 -0
- package/io/restorecommerce/customer.proto +18 -47
- package/io/restorecommerce/file.proto +3 -0
- package/io/restorecommerce/fulfillment.proto +48 -23
- package/io/restorecommerce/fulfillment_product.proto +17 -12
- package/io/restorecommerce/invoice.proto +128 -81
- package/io/restorecommerce/location.proto +3 -3
- package/io/restorecommerce/notification_req.proto +2 -0
- package/io/restorecommerce/order.proto +101 -39
- package/io/restorecommerce/organization.proto +14 -23
- package/io/restorecommerce/price.proto +32 -0
- package/io/restorecommerce/product.proto +33 -26
- package/io/restorecommerce/product_prototype.proto +12 -1
- package/io/restorecommerce/reference.proto +8 -0
- package/io/restorecommerce/resource_base.proto +2 -2
- package/io/restorecommerce/shop.proto +63 -0
- package/io/restorecommerce/tax.proto +2 -7
- package/io/restorecommerce/tax_type.proto +0 -6
- package/io/restorecommerce/user.proto +4 -4
- package/package.json +2 -2
|
@@ -11,6 +11,7 @@ import "io/restorecommerce/auth.proto";
|
|
|
11
11
|
import "io/restorecommerce/status.proto";
|
|
12
12
|
import "io/restorecommerce/attribute.proto";
|
|
13
13
|
import "io/restorecommerce/geometry.proto";
|
|
14
|
+
import "io/restorecommerce/price.proto";
|
|
14
15
|
import "io/restorecommerce/options.proto";
|
|
15
16
|
|
|
16
17
|
// Used by resolvers
|
|
@@ -63,10 +64,19 @@ message Product {
|
|
|
63
64
|
IndividualProduct product = 3;
|
|
64
65
|
Bundle bundle = 4;
|
|
65
66
|
}
|
|
66
|
-
optional
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
67
|
+
optional string shop_id = 5 [
|
|
68
|
+
(io.restorecommerce.options.resolver) = {
|
|
69
|
+
target_type: ".io.restorecommerce.shop.Shop",
|
|
70
|
+
target_service: "resource",
|
|
71
|
+
target_sub_service: "shop",
|
|
72
|
+
target_method: "Read",
|
|
73
|
+
field_name: "shop",
|
|
74
|
+
}
|
|
75
|
+
];
|
|
76
|
+
optional bool active = 6;
|
|
77
|
+
repeated string tags = 7;
|
|
78
|
+
repeated Association associations = 8;
|
|
79
|
+
google.protobuf.Any data = 9;
|
|
70
80
|
}
|
|
71
81
|
|
|
72
82
|
message IndividualProduct {
|
|
@@ -103,10 +113,11 @@ message IndividualProduct {
|
|
|
103
113
|
];
|
|
104
114
|
}
|
|
105
115
|
repeated string tax_ids = 7;
|
|
106
|
-
optional string
|
|
116
|
+
optional string currency_id = 8;
|
|
117
|
+
optional string gtin = 9;
|
|
107
118
|
oneof nature {
|
|
108
|
-
PhysicalProduct physical =
|
|
109
|
-
VirtualProduct virtual =
|
|
119
|
+
PhysicalProduct physical = 10;
|
|
120
|
+
VirtualProduct virtual = 11;
|
|
110
121
|
};
|
|
111
122
|
}
|
|
112
123
|
|
|
@@ -146,15 +157,13 @@ message PhysicalVariant {
|
|
|
146
157
|
optional string name = 2;
|
|
147
158
|
optional string description = 3;
|
|
148
159
|
optional int32 stock_level = 4;
|
|
149
|
-
optional
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
optional
|
|
155
|
-
|
|
156
|
-
optional Package package = 12;
|
|
157
|
-
repeated io.restorecommerce.attribute.Attribute attributes = 13;
|
|
160
|
+
optional io.restorecommerce.price.Price price = 5;
|
|
161
|
+
repeated io.restorecommerce.image.Image images = 6;
|
|
162
|
+
repeated io.restorecommerce.file.File files = 7;
|
|
163
|
+
optional string stock_keeping_unit = 8;
|
|
164
|
+
optional string template_variant = 9;
|
|
165
|
+
optional Package package = 10;
|
|
166
|
+
repeated io.restorecommerce.attribute.Attribute attributes = 11;
|
|
158
167
|
}
|
|
159
168
|
|
|
160
169
|
message VirtualVariant {
|
|
@@ -162,14 +171,12 @@ message VirtualVariant {
|
|
|
162
171
|
optional string name = 2;
|
|
163
172
|
optional string description = 3;
|
|
164
173
|
optional int32 stock_level = 4;
|
|
165
|
-
optional
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
optional string template_variant = 11;
|
|
172
|
-
repeated io.restorecommerce.attribute.Attribute attributes = 12;
|
|
174
|
+
optional io.restorecommerce.price.Price price = 5;
|
|
175
|
+
repeated io.restorecommerce.image.Image images = 6;
|
|
176
|
+
repeated io.restorecommerce.file.File files = 7;
|
|
177
|
+
optional string stock_keeping_unit = 8;
|
|
178
|
+
optional string template_variant = 9;
|
|
179
|
+
repeated io.restorecommerce.attribute.Attribute attributes = 10;
|
|
173
180
|
}
|
|
174
181
|
|
|
175
182
|
message Bundle {
|
|
@@ -177,7 +184,7 @@ message Bundle {
|
|
|
177
184
|
optional string description = 2;
|
|
178
185
|
repeated io.restorecommerce.image.Image images = 3;
|
|
179
186
|
repeated BundleProduct products = 4;
|
|
180
|
-
optional
|
|
187
|
+
optional io.restorecommerce.price.Price price = 5;
|
|
181
188
|
optional Package pre_packaged = 6;
|
|
182
189
|
}
|
|
183
190
|
|
|
@@ -193,7 +200,7 @@ message BundleProduct {
|
|
|
193
200
|
];
|
|
194
201
|
optional string variant_id = 2;
|
|
195
202
|
optional uint32 quantity = 3;
|
|
196
|
-
optional double
|
|
203
|
+
optional double price_ratio = 4; //Price ratio in relation to the bundle price
|
|
197
204
|
}
|
|
198
205
|
|
|
199
206
|
message Deleted {
|
|
@@ -8,6 +8,9 @@ import "io/restorecommerce/auth.proto";
|
|
|
8
8
|
import "io/restorecommerce/status.proto";
|
|
9
9
|
import "io/restorecommerce/options.proto";
|
|
10
10
|
|
|
11
|
+
// For resolver
|
|
12
|
+
import "io/restorecommerce/product_category.proto";
|
|
13
|
+
|
|
11
14
|
// ProductPrototype resource
|
|
12
15
|
message ProductPrototype {
|
|
13
16
|
optional string id = 1;
|
|
@@ -15,7 +18,15 @@ message ProductPrototype {
|
|
|
15
18
|
optional string name = 3;
|
|
16
19
|
optional string version = 4;
|
|
17
20
|
optional string description = 5;
|
|
18
|
-
optional string category_id = 6
|
|
21
|
+
optional string category_id = 6 [
|
|
22
|
+
(io.restorecommerce.options.resolver) = {
|
|
23
|
+
target_type: ".io.restorecommerce.product_category.ProductCategory",
|
|
24
|
+
target_service: "catalog",
|
|
25
|
+
target_sub_service: "product_category",
|
|
26
|
+
target_method: "Read",
|
|
27
|
+
field_name: "category",
|
|
28
|
+
}
|
|
29
|
+
];
|
|
19
30
|
}
|
|
20
31
|
|
|
21
32
|
message ProductPrototypeList {
|
|
@@ -133,8 +133,8 @@ message ResourceResponse {
|
|
|
133
133
|
io.restorecommerce.status.Status status = 2;
|
|
134
134
|
}
|
|
135
135
|
|
|
136
|
-
|
|
136
|
+
// Example resource
|
|
137
137
|
message Resource {
|
|
138
138
|
optional string id = 1;
|
|
139
139
|
optional io.restorecommerce.meta.Meta meta = 2;
|
|
140
|
-
}
|
|
140
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package io.restorecommerce.shop;
|
|
4
|
+
|
|
5
|
+
import "io/restorecommerce/resource_base.proto";
|
|
6
|
+
import "io/restorecommerce/meta.proto";
|
|
7
|
+
import "io/restorecommerce/auth.proto";
|
|
8
|
+
import "io/restorecommerce/status.proto";
|
|
9
|
+
import "io/restorecommerce/options.proto";
|
|
10
|
+
|
|
11
|
+
// Used by resolvers
|
|
12
|
+
import "io/restorecommerce/user.proto";
|
|
13
|
+
import "io/restorecommerce/address.proto";
|
|
14
|
+
import "io/restorecommerce/contact_point.proto";
|
|
15
|
+
import "io/restorecommerce/organization.proto";
|
|
16
|
+
|
|
17
|
+
/*
|
|
18
|
+
Microservice definition.
|
|
19
|
+
*/
|
|
20
|
+
service ShopService {
|
|
21
|
+
rpc Read (io.restorecommerce.resourcebase.ReadRequest) returns (ShopListResponse) {
|
|
22
|
+
option (io.restorecommerce.options.is_query) = true;
|
|
23
|
+
};
|
|
24
|
+
rpc Create (ShopList) returns (ShopListResponse);
|
|
25
|
+
rpc Delete (io.restorecommerce.resourcebase.DeleteRequest) returns (io.restorecommerce.resourcebase.DeleteResponse);
|
|
26
|
+
rpc Update (ShopList) returns (ShopListResponse);
|
|
27
|
+
rpc Upsert (ShopList) returns (ShopListResponse);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
message ShopList {
|
|
31
|
+
repeated Shop items = 1;
|
|
32
|
+
optional uint32 total_count = 2;
|
|
33
|
+
io.restorecommerce.auth.Subject subject = 3;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
message ShopListResponse {
|
|
37
|
+
repeated ShopResponse items = 1;
|
|
38
|
+
uint32 total_count = 2;
|
|
39
|
+
io.restorecommerce.status.OperationStatus operation_status = 3;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
message ShopResponse {
|
|
43
|
+
Shop payload = 1;
|
|
44
|
+
io.restorecommerce.status.Status status = 2;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
message Shop {
|
|
48
|
+
optional string id = 1;
|
|
49
|
+
optional io.restorecommerce.meta.Meta meta = 2;
|
|
50
|
+
optional string shop_number = 3;
|
|
51
|
+
optional string name = 4;
|
|
52
|
+
optional string description = 5;
|
|
53
|
+
optional string domain = 6;
|
|
54
|
+
optional string organization_id = 7 [
|
|
55
|
+
(io.restorecommerce.options.resolver) = {
|
|
56
|
+
target_type: ".io.restorecommerce.organization.Organization",
|
|
57
|
+
target_service: "resource",
|
|
58
|
+
target_sub_service: "organization",
|
|
59
|
+
target_method: "Read",
|
|
60
|
+
field_name: "organization",
|
|
61
|
+
}
|
|
62
|
+
];
|
|
63
|
+
}
|
|
@@ -52,7 +52,7 @@ message Tax {
|
|
|
52
52
|
optional string country_id = 3 [
|
|
53
53
|
(io.restorecommerce.options.resolver) = {
|
|
54
54
|
target_type: ".io.restorecommerce.country.Country",
|
|
55
|
-
target_service: "
|
|
55
|
+
target_service: "master_data",
|
|
56
56
|
target_sub_service: "country",
|
|
57
57
|
target_method: "Read",
|
|
58
58
|
field_name: "country",
|
|
@@ -63,15 +63,10 @@ message Tax {
|
|
|
63
63
|
optional string type_id = 6 [
|
|
64
64
|
(io.restorecommerce.options.resolver) = {
|
|
65
65
|
target_type: ".io.restorecommerce.tax_type.TaxType",
|
|
66
|
-
target_service: "
|
|
66
|
+
target_service: "master_data",
|
|
67
67
|
target_sub_service: "tax_type",
|
|
68
68
|
target_method: "Read",
|
|
69
69
|
field_name: "type",
|
|
70
70
|
}
|
|
71
71
|
];
|
|
72
72
|
}
|
|
73
|
-
|
|
74
|
-
message VAT {
|
|
75
|
-
optional string tax_id = 1;
|
|
76
|
-
optional double vat = 2;
|
|
77
|
-
}
|
|
@@ -21,11 +21,6 @@ service TaxTypeService {
|
|
|
21
21
|
rpc Upsert (TaxTypeList) returns (TaxTypeListResponse);
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
enum Behavior {
|
|
25
|
-
NONE = 0;
|
|
26
|
-
ADDITIVE_ON_GROSS = 1;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
24
|
message Deleted {
|
|
30
25
|
optional string id = 1;
|
|
31
26
|
}
|
|
@@ -52,5 +47,4 @@ message TaxType {
|
|
|
52
47
|
optional io.restorecommerce.meta.Meta meta = 2;
|
|
53
48
|
optional string type = 3;
|
|
54
49
|
optional string description = 4;
|
|
55
|
-
optional Behavior behavior = 5;
|
|
56
50
|
}
|
|
@@ -278,7 +278,7 @@ message User {
|
|
|
278
278
|
optional string timezone_id = 13 [
|
|
279
279
|
(io.restorecommerce.options.resolver) = {
|
|
280
280
|
target_type: ".io.restorecommerce.timezone.Timezone",
|
|
281
|
-
target_service: "
|
|
281
|
+
target_service: "master_data",
|
|
282
282
|
target_sub_service: "timezone",
|
|
283
283
|
target_method: "Read",
|
|
284
284
|
field_name: "timezone",
|
|
@@ -287,7 +287,7 @@ message User {
|
|
|
287
287
|
optional string locale_id = 14 [
|
|
288
288
|
(io.restorecommerce.options.resolver) = {
|
|
289
289
|
target_type: ".io.restorecommerce.locale.Locale",
|
|
290
|
-
target_service: "
|
|
290
|
+
target_service: "master_data",
|
|
291
291
|
target_sub_service: "locale",
|
|
292
292
|
target_method: "Read",
|
|
293
293
|
field_name: "locale",
|
|
@@ -326,7 +326,7 @@ message UserRole {
|
|
|
326
326
|
string timezone_id = 13 [
|
|
327
327
|
(io.restorecommerce.options.resolver) = {
|
|
328
328
|
target_type: ".io.restorecommerce.timezone.Timezone",
|
|
329
|
-
target_service: "
|
|
329
|
+
target_service: "master_data",
|
|
330
330
|
target_sub_service: "timezone",
|
|
331
331
|
target_method: "Read",
|
|
332
332
|
field_name: "timezone",
|
|
@@ -335,7 +335,7 @@ message UserRole {
|
|
|
335
335
|
string locale_id = 14 [
|
|
336
336
|
(io.restorecommerce.options.resolver) = {
|
|
337
337
|
target_type: ".io.restorecommerce.locale.Locale",
|
|
338
|
-
target_service: "
|
|
338
|
+
target_service: "master_data",
|
|
339
339
|
target_sub_service: "locale",
|
|
340
340
|
target_method: "Read",
|
|
341
341
|
field_name: "locale",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@restorecommerce/protos",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.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": "
|
|
18
|
+
"gitHead": "a6f633f4c1f61773ce6a93b9a9720cd00d3c005f"
|
|
19
19
|
}
|