@restorecommerce/protos 2.0.2 → 3.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 +325 -0
- package/google/protobuf/timestamp.proto +147 -0
- package/io/restorecommerce/access_control.proto +1 -3
- package/io/restorecommerce/address.proto +38 -37
- package/io/restorecommerce/attribute.proto +3 -3
- package/io/restorecommerce/auth.proto +15 -15
- package/io/restorecommerce/authentication_log.proto +12 -14
- package/io/restorecommerce/command.proto +10 -12
- package/io/restorecommerce/commandinterface.proto +3 -4
- package/io/restorecommerce/contact_point.proto +11 -13
- package/io/restorecommerce/contact_point_type.proto +5 -7
- package/io/restorecommerce/country.proto +7 -9
- package/io/restorecommerce/credential.proto +9 -9
- package/io/restorecommerce/customer.proto +9 -11
- package/io/restorecommerce/file.proto +23 -0
- package/io/restorecommerce/fulfillment.proto +87 -104
- package/io/restorecommerce/fulfillment_courier.proto +15 -17
- package/io/restorecommerce/fulfillment_product.proto +44 -47
- package/io/restorecommerce/geometry.proto +23 -0
- package/io/restorecommerce/graph.proto +10 -10
- package/io/restorecommerce/image.proto +13 -12
- package/io/restorecommerce/invoice.proto +47 -49
- package/io/restorecommerce/job.proto +43 -45
- package/io/restorecommerce/locale.proto +6 -8
- package/io/restorecommerce/location.proto +11 -13
- package/io/restorecommerce/manufacturer.proto +6 -8
- package/io/restorecommerce/meta.proto +3 -3
- package/io/restorecommerce/notification.proto +8 -10
- package/io/restorecommerce/notification_channel.proto +6 -6
- package/io/restorecommerce/notification_req.proto +16 -16
- package/io/restorecommerce/oauth.proto +1 -1
- package/io/restorecommerce/order.proto +65 -72
- package/io/restorecommerce/organization.proto +15 -17
- package/io/restorecommerce/ostorage.proto +28 -30
- package/io/restorecommerce/payment.proto +32 -34
- package/io/restorecommerce/payment_method.proto +7 -7
- package/io/restorecommerce/policy.proto +16 -18
- package/io/restorecommerce/policy_set.proto +12 -14
- package/io/restorecommerce/price_group.proto +6 -8
- package/io/restorecommerce/product.proto +146 -48
- package/io/restorecommerce/product_category.proto +10 -12
- package/io/restorecommerce/product_prototype.proto +8 -10
- package/io/restorecommerce/resource_base.proto +15 -15
- package/io/restorecommerce/role.proto +6 -8
- package/io/restorecommerce/rule.proto +18 -20
- package/io/restorecommerce/search.proto +3 -5
- package/io/restorecommerce/status.proto +13 -8
- package/io/restorecommerce/tax.proto +13 -10
- package/io/restorecommerce/tax_type.proto +13 -9
- package/io/restorecommerce/timezone.proto +5 -7
- package/io/restorecommerce/token.proto +11 -13
- package/io/restorecommerce/user.proto +45 -48
- package/package.json +2 -2
|
@@ -4,9 +4,7 @@ import "io/restorecommerce/auth.proto";
|
|
|
4
4
|
import "io/restorecommerce/status.proto";
|
|
5
5
|
import "io/restorecommerce/options.proto";
|
|
6
6
|
|
|
7
|
-
service
|
|
8
|
-
option (io.restorecommerce.options.service_name) = "payment";
|
|
9
|
-
|
|
7
|
+
service PaymentService {
|
|
10
8
|
// Wrapper for setup_authorization in ActiveMerchant
|
|
11
9
|
rpc SetupAuthorization (SetupRequest) returns (SetupResponse);
|
|
12
10
|
|
|
@@ -25,18 +23,18 @@ service Service {
|
|
|
25
23
|
|
|
26
24
|
// Request object for setup calls
|
|
27
25
|
message SetupRequest {
|
|
28
|
-
string ip = 1;
|
|
26
|
+
optional string ip = 1;
|
|
29
27
|
repeated Item items = 2;
|
|
30
|
-
int32 subtotal = 3;
|
|
31
|
-
int32 shipping = 4;
|
|
32
|
-
int32 handling = 5;
|
|
33
|
-
int32 tax = 6;
|
|
34
|
-
string currency = 7;
|
|
35
|
-
string return_url = 8;
|
|
36
|
-
string cancel_return_url = 9;
|
|
37
|
-
bool allow_guest_checkout = 10;
|
|
38
|
-
Provider provider = 11;
|
|
39
|
-
io.restorecommerce.auth.Subject subject = 12;
|
|
28
|
+
optional int32 subtotal = 3;
|
|
29
|
+
optional int32 shipping = 4;
|
|
30
|
+
optional int32 handling = 5;
|
|
31
|
+
optional int32 tax = 6;
|
|
32
|
+
optional string currency = 7;
|
|
33
|
+
optional string return_url = 8;
|
|
34
|
+
optional string cancel_return_url = 9;
|
|
35
|
+
optional bool allow_guest_checkout = 10;
|
|
36
|
+
optional Provider provider = 11;
|
|
37
|
+
optional io.restorecommerce.auth.Subject subject = 12;
|
|
40
38
|
}
|
|
41
39
|
|
|
42
40
|
message SetupPayload {
|
|
@@ -58,21 +56,21 @@ message SetupResponse {
|
|
|
58
56
|
|
|
59
57
|
// Request object for authorization or purchase call for cardless payment.
|
|
60
58
|
message PaymentRequest {
|
|
61
|
-
Provider provider = 1;
|
|
62
|
-
int32 payment_sum = 2;
|
|
63
|
-
string currency = 3;
|
|
64
|
-
string payment_id = 4;
|
|
65
|
-
string payer_id = 5;
|
|
66
|
-
string token = 6;
|
|
59
|
+
optional Provider provider = 1;
|
|
60
|
+
optional int32 payment_sum = 2;
|
|
61
|
+
optional string currency = 3;
|
|
62
|
+
optional string payment_id = 4;
|
|
63
|
+
optional string payer_id = 5;
|
|
64
|
+
optional string token = 6;
|
|
67
65
|
io.restorecommerce.auth.Subject subject = 7;
|
|
68
66
|
}
|
|
69
67
|
|
|
70
68
|
// Request object for capture call for both standard and cardless payments.
|
|
71
69
|
message CaptureRequest {
|
|
72
|
-
Provider provider = 1;
|
|
73
|
-
int32 payment_sum = 2;
|
|
74
|
-
string currency = 3;
|
|
75
|
-
string payment_id = 4;
|
|
70
|
+
optional Provider provider = 1;
|
|
71
|
+
optional int32 payment_sum = 2;
|
|
72
|
+
optional string currency = 3;
|
|
73
|
+
optional string payment_id = 4;
|
|
76
74
|
io.restorecommerce.auth.Subject subject = 5;
|
|
77
75
|
}
|
|
78
76
|
|
|
@@ -95,20 +93,20 @@ message PaymentResponse {
|
|
|
95
93
|
|
|
96
94
|
// Used for building ActiveMerchant::Billing::CreditCard instance.
|
|
97
95
|
message PaymentCard {
|
|
98
|
-
string primary_number = 1;
|
|
99
|
-
string first_name = 2;
|
|
100
|
-
string last_name = 3;
|
|
101
|
-
string month = 4;
|
|
102
|
-
int32 year = 5;
|
|
103
|
-
string verification_value = 6;
|
|
96
|
+
optional string primary_number = 1;
|
|
97
|
+
optional string first_name = 2;
|
|
98
|
+
optional string last_name = 3;
|
|
99
|
+
optional string month = 4;
|
|
100
|
+
optional int32 year = 5;
|
|
101
|
+
optional string verification_value = 6;
|
|
104
102
|
}
|
|
105
103
|
|
|
106
104
|
// Represents purchased item. Not all providers support this.
|
|
107
105
|
message Item {
|
|
108
|
-
string name = 1;
|
|
109
|
-
string description = 2;
|
|
110
|
-
int32 quantity = 3;
|
|
111
|
-
int32 amount = 4;
|
|
106
|
+
optional string name = 1;
|
|
107
|
+
optional string description = 2;
|
|
108
|
+
optional int32 quantity = 3;
|
|
109
|
+
optional int32 amount = 4;
|
|
112
110
|
}
|
|
113
111
|
|
|
114
112
|
// Possible service providers. Provider names must be exactly as in config.yml.
|
|
@@ -11,7 +11,7 @@ import "io/restorecommerce/status.proto";
|
|
|
11
11
|
/*
|
|
12
12
|
* Microservice definition.
|
|
13
13
|
*/
|
|
14
|
-
service
|
|
14
|
+
service PaymentMethodService {
|
|
15
15
|
rpc Read (io.restorecommerce.resourcebase.ReadRequest) returns (PaymentMethodListResponse);
|
|
16
16
|
rpc Create (PaymentMethodList) returns (PaymentMethodListResponse);
|
|
17
17
|
rpc Delete (io.restorecommerce.resourcebase.DeleteRequest) returns (io.restorecommerce.resourcebase.DeleteResponse);
|
|
@@ -25,7 +25,7 @@ message Deleted {
|
|
|
25
25
|
|
|
26
26
|
message PaymentMethodList {
|
|
27
27
|
repeated PaymentMethod items = 1;
|
|
28
|
-
uint32 total_count = 2;
|
|
28
|
+
optional uint32 total_count = 2;
|
|
29
29
|
io.restorecommerce.auth.Subject subject = 3;
|
|
30
30
|
}
|
|
31
31
|
|
|
@@ -52,9 +52,9 @@ enum TransferTypeEnum {
|
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
message PaymentMethod {
|
|
55
|
-
string id = 1;
|
|
56
|
-
io.restorecommerce.meta.Meta meta = 2;
|
|
57
|
-
PaymentMethodEnum payment_method = 3;
|
|
58
|
-
TransferTypeEnum transfer_type = 4;
|
|
59
|
-
google.protobuf.Any data = 5;
|
|
55
|
+
optional string id = 1;
|
|
56
|
+
optional io.restorecommerce.meta.Meta meta = 2;
|
|
57
|
+
optional PaymentMethodEnum payment_method = 3;
|
|
58
|
+
optional TransferTypeEnum transfer_type = 4;
|
|
59
|
+
optional google.protobuf.Any data = 5;
|
|
60
60
|
}
|
|
@@ -13,30 +13,30 @@ import "io/restorecommerce/options.proto";
|
|
|
13
13
|
* A Policy is defined by a set of Rules.
|
|
14
14
|
*/
|
|
15
15
|
message Policy {
|
|
16
|
-
string id = 1;
|
|
17
|
-
io.restorecommerce.meta.Meta meta = 2;
|
|
18
|
-
string name = 3;
|
|
19
|
-
string description = 4;
|
|
16
|
+
optional string id = 1;
|
|
17
|
+
optional io.restorecommerce.meta.Meta meta = 2;
|
|
18
|
+
optional string name = 3;
|
|
19
|
+
optional string description = 4;
|
|
20
20
|
repeated string rules = 5; // rule IDs
|
|
21
|
-
io.restorecommerce.rule.Target target = 6; // general policy target
|
|
22
|
-
io.restorecommerce.rule.Effect effect = 7;
|
|
23
|
-
string combining_algorithm = 8;
|
|
24
|
-
bool evaluation_cacheable = 9;
|
|
21
|
+
optional io.restorecommerce.rule.Target target = 6; // general policy target
|
|
22
|
+
optional io.restorecommerce.rule.Effect effect = 7;
|
|
23
|
+
optional string combining_algorithm = 8;
|
|
24
|
+
optional bool evaluation_cacheable = 9;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
message PolicyRQ {
|
|
28
|
-
string id = 1;
|
|
29
|
-
io.restorecommerce.rule.Target target = 2;
|
|
30
|
-
string combining_algorithm = 3;
|
|
28
|
+
optional string id = 1;
|
|
29
|
+
optional io.restorecommerce.rule.Target target = 2;
|
|
30
|
+
optional string combining_algorithm = 3;
|
|
31
31
|
repeated io.restorecommerce.rule.RuleRQ rules = 4;
|
|
32
|
-
io.restorecommerce.rule.Effect effect = 5;
|
|
33
|
-
bool has_rules = 6;
|
|
34
|
-
bool evaluation_cacheable = 7;
|
|
32
|
+
optional io.restorecommerce.rule.Effect effect = 5;
|
|
33
|
+
optional bool has_rules = 6;
|
|
34
|
+
optional bool evaluation_cacheable = 7;
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
message PolicyList {
|
|
38
38
|
repeated Policy items = 1;
|
|
39
|
-
uint32 total_count = 2;
|
|
39
|
+
optional uint32 total_count = 2;
|
|
40
40
|
io.restorecommerce.auth.Subject subject = 3;
|
|
41
41
|
}
|
|
42
42
|
|
|
@@ -51,9 +51,7 @@ message PolicyResponse {
|
|
|
51
51
|
io.restorecommerce.status.Status status = 2;
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
-
service
|
|
55
|
-
option (io.restorecommerce.options.service_name) = "policy";
|
|
56
|
-
|
|
54
|
+
service PolicyService {
|
|
57
55
|
rpc Read (io.restorecommerce.resourcebase.ReadRequest) returns (PolicyListResponse) {
|
|
58
56
|
option (io.restorecommerce.options.is_query) = true;
|
|
59
57
|
};
|
|
@@ -11,18 +11,18 @@ import "io/restorecommerce/status.proto";
|
|
|
11
11
|
import "io/restorecommerce/options.proto";
|
|
12
12
|
|
|
13
13
|
message PolicySet {
|
|
14
|
-
string id = 1;
|
|
15
|
-
io.restorecommerce.meta.Meta meta = 2;
|
|
16
|
-
string name = 3;
|
|
17
|
-
string description = 4;
|
|
18
|
-
io.restorecommerce.rule.Target target = 5;
|
|
19
|
-
string combining_algorithm = 6;
|
|
14
|
+
optional string id = 1;
|
|
15
|
+
optional io.restorecommerce.meta.Meta meta = 2;
|
|
16
|
+
optional string name = 3;
|
|
17
|
+
optional string description = 4;
|
|
18
|
+
optional io.restorecommerce.rule.Target target = 5;
|
|
19
|
+
optional string combining_algorithm = 6;
|
|
20
20
|
repeated string policies = 7; // policy IDs
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
message PolicySetList {
|
|
24
24
|
repeated PolicySet items = 1;
|
|
25
|
-
uint32 total_count = 2;
|
|
25
|
+
optional uint32 total_count = 2;
|
|
26
26
|
io.restorecommerce.auth.Subject subject = 3;
|
|
27
27
|
}
|
|
28
28
|
|
|
@@ -38,16 +38,14 @@ message PolicySetResponse {
|
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
message PolicySetRQ {
|
|
41
|
-
string id = 1;
|
|
42
|
-
io.restorecommerce.rule.Target target = 2;
|
|
43
|
-
string combining_algorithm = 3;
|
|
41
|
+
optional string id = 1;
|
|
42
|
+
optional io.restorecommerce.rule.Target target = 2;
|
|
43
|
+
optional string combining_algorithm = 3;
|
|
44
44
|
repeated io.restorecommerce.policy.PolicyRQ policies = 4;
|
|
45
|
-
io.restorecommerce.rule.Effect effect = 5;
|
|
45
|
+
optional io.restorecommerce.rule.Effect effect = 5;
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
service
|
|
49
|
-
option (io.restorecommerce.options.service_name) = "policy_set";
|
|
50
|
-
|
|
48
|
+
service PolicySetService {
|
|
51
49
|
rpc Read (io.restorecommerce.resourcebase.ReadRequest) returns (PolicySetListResponse) {
|
|
52
50
|
option (io.restorecommerce.options.is_query) = true;
|
|
53
51
|
};
|
|
@@ -10,15 +10,15 @@ import "io/restorecommerce/options.proto";
|
|
|
10
10
|
|
|
11
11
|
// PriceGroup resource
|
|
12
12
|
message PriceGroup {
|
|
13
|
-
string id = 1;
|
|
14
|
-
io.restorecommerce.meta.Meta meta = 2;
|
|
15
|
-
string name = 3;
|
|
16
|
-
string description = 4;
|
|
13
|
+
optional string id = 1;
|
|
14
|
+
optional io.restorecommerce.meta.Meta meta = 2;
|
|
15
|
+
optional string name = 3;
|
|
16
|
+
optional string description = 4;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
message PriceGroupList {
|
|
20
20
|
repeated PriceGroup items = 1;
|
|
21
|
-
uint32 total_count = 2;
|
|
21
|
+
optional uint32 total_count = 2;
|
|
22
22
|
io.restorecommerce.auth.Subject subject = 3;
|
|
23
23
|
}
|
|
24
24
|
|
|
@@ -37,9 +37,7 @@ message Deleted {
|
|
|
37
37
|
string id = 1;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
service
|
|
41
|
-
option (io.restorecommerce.options.service_name) = "price_group";
|
|
42
|
-
|
|
40
|
+
service PriceGroupService {
|
|
43
41
|
rpc Read (io.restorecommerce.resourcebase.ReadRequest) returns (PriceGroupListResponse) {
|
|
44
42
|
option (io.restorecommerce.options.is_query) = true;
|
|
45
43
|
};
|
|
@@ -2,20 +2,21 @@ syntax = "proto3";
|
|
|
2
2
|
|
|
3
3
|
package io.restorecommerce.product;
|
|
4
4
|
|
|
5
|
+
import "google/protobuf/any.proto";
|
|
5
6
|
import "io/restorecommerce/resource_base.proto";
|
|
6
7
|
import "io/restorecommerce/meta.proto";
|
|
7
8
|
import "io/restorecommerce/image.proto";
|
|
9
|
+
import "io/restorecommerce/file.proto";
|
|
8
10
|
import "io/restorecommerce/auth.proto";
|
|
9
11
|
import "io/restorecommerce/status.proto";
|
|
10
12
|
import "io/restorecommerce/attribute.proto";
|
|
13
|
+
import "io/restorecommerce/geometry.proto";
|
|
11
14
|
import "io/restorecommerce/options.proto";
|
|
12
15
|
|
|
13
16
|
// Used by resolvers
|
|
14
17
|
import "io/restorecommerce/manufacturer.proto";
|
|
15
18
|
|
|
16
|
-
service
|
|
17
|
-
option (io.restorecommerce.options.service_name) = "product";
|
|
18
|
-
|
|
19
|
+
service ProductService {
|
|
19
20
|
rpc Read (io.restorecommerce.resourcebase.ReadRequest) returns (ProductListResponse) {
|
|
20
21
|
option (io.restorecommerce.options.is_query) = true;
|
|
21
22
|
};
|
|
@@ -25,22 +26,63 @@ service Service {
|
|
|
25
26
|
rpc Upsert (ProductList) returns (ProductListResponse);
|
|
26
27
|
}
|
|
27
28
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
enum AssociationType {
|
|
30
|
+
Miscellaneous = 0;
|
|
31
|
+
Accessory = 1;
|
|
32
|
+
Recommendation = 2;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
message Association {
|
|
36
|
+
optional string product_id = 1 [
|
|
37
|
+
(io.restorecommerce.options.resolver) = {
|
|
38
|
+
target_type: ".io.restorecommerce.product.Product",
|
|
39
|
+
target_service: "catalog",
|
|
40
|
+
target_sub_service: "product",
|
|
41
|
+
target_method: "Read",
|
|
42
|
+
field_name: "product",
|
|
43
|
+
}
|
|
44
|
+
];
|
|
45
|
+
AssociationType type = 2;
|
|
46
|
+
repeated string tags = 3;
|
|
47
|
+
google.protobuf.Any data = 4;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
message Appendix {
|
|
51
|
+
optional int64 index = 1;
|
|
52
|
+
optional string name = 2;
|
|
53
|
+
optional string description = 3;
|
|
54
|
+
repeated string tags = 4;
|
|
55
|
+
optional string url = 5;
|
|
56
|
+
optional string content_type = 6;
|
|
57
|
+
optional io.restorecommerce.image.Image thumbnail = 7;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// Product resource entity
|
|
61
|
+
message Product {
|
|
62
|
+
option (restorecommerce.options.kafka_subscriber) = {
|
|
63
|
+
plural: "products"
|
|
64
|
+
topic: "io.restorecommerce.product.resource"
|
|
65
|
+
created: "productCreated"
|
|
66
|
+
updated: "productUpdated"
|
|
67
|
+
deleted: "productDeleted"
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
optional string id = 1;
|
|
71
|
+
io.restorecommerce.meta.Meta meta = 2;
|
|
31
72
|
oneof product_type {
|
|
32
|
-
|
|
33
|
-
Bundle bundle =
|
|
73
|
+
IndividualProduct product = 3;
|
|
74
|
+
Bundle bundle = 4;
|
|
34
75
|
}
|
|
35
|
-
bool active =
|
|
36
|
-
|
|
76
|
+
optional bool active = 5;
|
|
77
|
+
repeated string tags = 6;
|
|
78
|
+
repeated Association associations = 7;
|
|
79
|
+
google.protobuf.Any data = 8;
|
|
37
80
|
}
|
|
38
81
|
|
|
39
|
-
message
|
|
40
|
-
string
|
|
41
|
-
string
|
|
42
|
-
string
|
|
43
|
-
string manufacturer_id = 4 [
|
|
82
|
+
message IndividualProduct {
|
|
83
|
+
optional string name = 1;
|
|
84
|
+
optional string description = 2;
|
|
85
|
+
optional string manufacturer_id = 3 [
|
|
44
86
|
(io.restorecommerce.options.resolver) = {
|
|
45
87
|
target_type: ".io.restorecommerce.manufacturer.Manufacturer",
|
|
46
88
|
target_service: "catalog",
|
|
@@ -49,24 +91,47 @@ message Product {
|
|
|
49
91
|
field_name: "manufacturer",
|
|
50
92
|
}
|
|
51
93
|
];
|
|
52
|
-
string taric_code =
|
|
94
|
+
optional string taric_code = 4;
|
|
53
95
|
oneof classification {
|
|
54
|
-
|
|
55
|
-
|
|
96
|
+
string prototype_id = 5 [
|
|
97
|
+
(io.restorecommerce.options.resolver) = {
|
|
98
|
+
target_type: ".io.restorecommerce.product_prototype.ProductPrototype",
|
|
99
|
+
target_service: "catalog",
|
|
100
|
+
target_sub_service: "product_prototype",
|
|
101
|
+
target_method: "Read",
|
|
102
|
+
field_name: "prototype",
|
|
103
|
+
}
|
|
104
|
+
];
|
|
105
|
+
string category_id = 6 [
|
|
106
|
+
(io.restorecommerce.options.resolver) = {
|
|
107
|
+
target_type: ".io.restorecommerce.product_category.ProductCategory",
|
|
108
|
+
target_service: "catalog",
|
|
109
|
+
target_sub_service: "product_category",
|
|
110
|
+
target_method: "Read",
|
|
111
|
+
field_name: "category",
|
|
112
|
+
}
|
|
113
|
+
];
|
|
56
114
|
}
|
|
57
|
-
repeated string
|
|
58
|
-
|
|
59
|
-
|
|
115
|
+
repeated string tax_ids = 7;
|
|
116
|
+
optional string gtin = 8;
|
|
117
|
+
oneof nature {
|
|
118
|
+
PhysicalProduct physical = 9;
|
|
119
|
+
VirtualProduct virtual = 10;
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
message PhysicalProduct {
|
|
124
|
+
repeated PhysicalVariant variants = 1;
|
|
60
125
|
}
|
|
61
126
|
|
|
62
|
-
message
|
|
63
|
-
|
|
127
|
+
message VirtualProduct {
|
|
128
|
+
repeated VirtualVariant variants = 1;
|
|
64
129
|
}
|
|
65
130
|
|
|
66
131
|
message ProductList {
|
|
67
|
-
repeated
|
|
68
|
-
uint32 total_count = 2;
|
|
69
|
-
io.restorecommerce.auth.Subject subject = 3;
|
|
132
|
+
repeated Product items = 1;
|
|
133
|
+
optional uint32 total_count = 2;
|
|
134
|
+
optional io.restorecommerce.auth.Subject subject = 3;
|
|
70
135
|
}
|
|
71
136
|
|
|
72
137
|
message ProductListResponse {
|
|
@@ -76,38 +141,71 @@ message ProductListResponse {
|
|
|
76
141
|
}
|
|
77
142
|
|
|
78
143
|
message ProductResponse {
|
|
79
|
-
|
|
144
|
+
Product payload = 1;
|
|
80
145
|
io.restorecommerce.status.Status status = 3;
|
|
81
146
|
}
|
|
82
147
|
|
|
83
|
-
message
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
string
|
|
93
|
-
|
|
94
|
-
|
|
148
|
+
message Package {
|
|
149
|
+
optional io.restorecommerce.geometry.BoundingBox3D size_in_cm = 1;
|
|
150
|
+
optional double weight_in_kg = 2;
|
|
151
|
+
optional bool rotatable = 3;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
message PhysicalVariant {
|
|
155
|
+
optional string id = 1;
|
|
156
|
+
optional string name = 2;
|
|
157
|
+
optional string description = 3;
|
|
158
|
+
optional int32 stock_level = 4;
|
|
159
|
+
optional double price = 5;
|
|
160
|
+
optional bool sale = 6;
|
|
161
|
+
optional double sale_price = 7;
|
|
162
|
+
repeated io.restorecommerce.image.Image images = 8;
|
|
163
|
+
repeated io.restorecommerce.file.File files = 9;
|
|
164
|
+
optional string stock_keeping_unit = 10;
|
|
165
|
+
optional string template_variant = 11;
|
|
166
|
+
optional Package package = 12;
|
|
167
|
+
repeated io.restorecommerce.attribute.Attribute attributes = 13;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
message VirtualVariant {
|
|
171
|
+
optional string id = 1;
|
|
172
|
+
optional string name = 2;
|
|
173
|
+
optional string description = 3;
|
|
174
|
+
optional int32 stock_level = 4;
|
|
175
|
+
optional double price = 5;
|
|
176
|
+
optional bool sale = 6;
|
|
177
|
+
optional double sale_price = 7;
|
|
178
|
+
repeated io.restorecommerce.image.Image images = 8;
|
|
179
|
+
repeated io.restorecommerce.file.File files = 9;
|
|
180
|
+
optional string stock_keeping_unit = 10;
|
|
181
|
+
optional string template_variant = 11;
|
|
182
|
+
repeated io.restorecommerce.attribute.Attribute attributes = 12;
|
|
95
183
|
}
|
|
96
184
|
|
|
97
185
|
message Bundle {
|
|
98
|
-
string
|
|
99
|
-
string
|
|
100
|
-
|
|
101
|
-
repeated
|
|
102
|
-
|
|
103
|
-
|
|
186
|
+
optional string name = 1;
|
|
187
|
+
optional string description = 2;
|
|
188
|
+
repeated io.restorecommerce.image.Image image = 3;
|
|
189
|
+
repeated BundleProduct products = 4;
|
|
190
|
+
optional double price = 5;
|
|
191
|
+
optional Package pre_packaged = 6;
|
|
104
192
|
}
|
|
105
193
|
|
|
106
194
|
message BundleProduct {
|
|
107
|
-
string product_id = 1
|
|
108
|
-
|
|
195
|
+
optional string product_id = 1 [
|
|
196
|
+
(io.restorecommerce.options.resolver) = {
|
|
197
|
+
target_type: ".io.restorecommerce.product.Product",
|
|
198
|
+
target_service: "catalog",
|
|
199
|
+
target_sub_service: "product",
|
|
200
|
+
target_method: "Read",
|
|
201
|
+
field_name: "product",
|
|
202
|
+
}
|
|
203
|
+
];
|
|
204
|
+
optional string variant_id = 2;
|
|
205
|
+
optional uint32 quantity = 3;
|
|
206
|
+
optional double tax_ratio = 4; //Discount in relation to the bundle price
|
|
109
207
|
}
|
|
110
208
|
|
|
111
209
|
message Deleted {
|
|
112
|
-
string id = 1;
|
|
210
|
+
optional string id = 1;
|
|
113
211
|
}
|
|
@@ -14,11 +14,11 @@ import "io/restorecommerce/price_group.proto";
|
|
|
14
14
|
|
|
15
15
|
// ProductCategory resource
|
|
16
16
|
message ProductCategory {
|
|
17
|
-
string id = 1;
|
|
18
|
-
io.restorecommerce.meta.Meta meta = 2;
|
|
19
|
-
string name = 3;
|
|
20
|
-
string description = 4;
|
|
21
|
-
string price_group_id = 5 [
|
|
17
|
+
optional string id = 1;
|
|
18
|
+
optional io.restorecommerce.meta.Meta meta = 2;
|
|
19
|
+
optional string name = 3;
|
|
20
|
+
optional string description = 4;
|
|
21
|
+
optional string price_group_id = 5 [
|
|
22
22
|
(io.restorecommerce.options.resolver) = {
|
|
23
23
|
target_type: ".io.restorecommerce.price_group.PriceGroup",
|
|
24
24
|
target_service: "catalog",
|
|
@@ -27,13 +27,13 @@ message ProductCategory {
|
|
|
27
27
|
field_name: "priceGroup",
|
|
28
28
|
}
|
|
29
29
|
];
|
|
30
|
-
io.restorecommerce.image.Image image = 6;
|
|
31
|
-
Parent parent = 7;
|
|
30
|
+
optional io.restorecommerce.image.Image image = 6;
|
|
31
|
+
optional Parent parent = 7;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
message ProductCategoryList {
|
|
35
35
|
repeated ProductCategory items = 1;
|
|
36
|
-
uint32 total_count = 2;
|
|
36
|
+
optional uint32 total_count = 2;
|
|
37
37
|
io.restorecommerce.auth.Subject subject = 3;
|
|
38
38
|
}
|
|
39
39
|
|
|
@@ -53,12 +53,10 @@ message Deleted {
|
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
message Parent {
|
|
56
|
-
string parent_id = 1;
|
|
56
|
+
optional string parent_id = 1;
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
-
service
|
|
60
|
-
option (io.restorecommerce.options.service_name) = "product_category";
|
|
61
|
-
|
|
59
|
+
service ProductCategoryService {
|
|
62
60
|
rpc Read (io.restorecommerce.resourcebase.ReadRequest) returns (ProductCategoryListResponse) {
|
|
63
61
|
option (io.restorecommerce.options.is_query) = true;
|
|
64
62
|
};
|
|
@@ -10,17 +10,17 @@ import "io/restorecommerce/options.proto";
|
|
|
10
10
|
|
|
11
11
|
// ProductPrototype resource
|
|
12
12
|
message ProductPrototype {
|
|
13
|
-
string id = 1;
|
|
14
|
-
io.restorecommerce.meta.Meta meta = 2;
|
|
15
|
-
string name = 3;
|
|
16
|
-
string version = 4;
|
|
17
|
-
string description = 5;
|
|
18
|
-
string category_id = 6;
|
|
13
|
+
optional string id = 1;
|
|
14
|
+
optional io.restorecommerce.meta.Meta meta = 2;
|
|
15
|
+
optional string name = 3;
|
|
16
|
+
optional string version = 4;
|
|
17
|
+
optional string description = 5;
|
|
18
|
+
optional string category_id = 6;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
message ProductPrototypeList {
|
|
22
22
|
repeated ProductPrototype items = 1;
|
|
23
|
-
uint32 total_count = 2;
|
|
23
|
+
optional uint32 total_count = 2;
|
|
24
24
|
io.restorecommerce.auth.Subject subject = 3;
|
|
25
25
|
}
|
|
26
26
|
|
|
@@ -39,9 +39,7 @@ message Deleted {
|
|
|
39
39
|
string id = 1;
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
service
|
|
43
|
-
option (io.restorecommerce.options.service_name) = "product_prototype";
|
|
44
|
-
|
|
42
|
+
service ProductPrototypeService {
|
|
45
43
|
rpc Read (io.restorecommerce.resourcebase.ReadRequest) returns (ProductPrototypeListResponse) {
|
|
46
44
|
option (io.restorecommerce.options.is_query) = true;
|
|
47
45
|
};
|