@restorecommerce/protos 3.1.2 → 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 +32 -0
- package/io/restorecommerce/address.proto +6 -0
- package/io/restorecommerce/amount.proto +36 -0
- package/io/restorecommerce/contact_point.proto +3 -1
- package/io/restorecommerce/currency.proto +89 -0
- package/io/restorecommerce/customer.proto +15 -44
- package/io/restorecommerce/file.proto +3 -0
- package/io/restorecommerce/fulfillment.proto +47 -22
- package/io/restorecommerce/fulfillment_product.proto +17 -12
- package/io/restorecommerce/invoice.proto +129 -82
- package/io/restorecommerce/notification_req.proto +2 -0
- package/io/restorecommerce/order.proto +101 -39
- package/io/restorecommerce/organization.proto +12 -21
- 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 +0 -5
- package/io/restorecommerce/tax_type.proto +0 -6
- package/package.json +2 -2
|
@@ -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
|
+
}
|
|
@@ -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
|
}
|
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
|
}
|