@restorecommerce/protos 0.4.5
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 +214 -0
- package/LICENSE +19 -0
- package/README.md +9 -0
- package/google/protobuf/any.proto +133 -0
- package/google/protobuf/descriptor.proto +805 -0
- package/google/protobuf/empty.proto +53 -0
- package/google/protobuf/struct.proto +96 -0
- package/google/protobuf/wrappers.proto +123 -0
- package/grpc/health/v1/health.proto +50 -0
- package/grpc/reflection/v1alpha/reflection.proto +154 -0
- package/io/restorecommerce/access_control.proto +48 -0
- package/io/restorecommerce/address.proto +65 -0
- package/io/restorecommerce/attribute.proto +13 -0
- package/io/restorecommerce/auth.proto +48 -0
- package/io/restorecommerce/authentication_log.proto +56 -0
- package/io/restorecommerce/command.proto +57 -0
- package/io/restorecommerce/commandinterface.proto +30 -0
- package/io/restorecommerce/contact_point.proto +49 -0
- package/io/restorecommerce/contact_point_type.proto +46 -0
- package/io/restorecommerce/country.proto +49 -0
- package/io/restorecommerce/credential.proto +51 -0
- package/io/restorecommerce/customer.proto +63 -0
- package/io/restorecommerce/filter.proto +38 -0
- package/io/restorecommerce/fulfillment.proto +199 -0
- package/io/restorecommerce/fulfillment_courier.proto +54 -0
- package/io/restorecommerce/fulfillment_product.proto +49 -0
- package/io/restorecommerce/graph.proto +76 -0
- package/io/restorecommerce/image.proto +24 -0
- package/io/restorecommerce/invoice.proto +121 -0
- package/io/restorecommerce/job.proto +173 -0
- package/io/restorecommerce/locale.proto +47 -0
- package/io/restorecommerce/location.proto +53 -0
- package/io/restorecommerce/manufacturer.proto +45 -0
- package/io/restorecommerce/meta.proto +15 -0
- package/io/restorecommerce/notification.proto +52 -0
- package/io/restorecommerce/notification_channel.proto +50 -0
- package/io/restorecommerce/notification_req.proto +49 -0
- package/io/restorecommerce/order.proto +121 -0
- package/io/restorecommerce/organization.proto +63 -0
- package/io/restorecommerce/ostorage.proto +154 -0
- package/io/restorecommerce/payment.proto +115 -0
- package/io/restorecommerce/payment_method.proto +60 -0
- package/io/restorecommerce/policy.proto +59 -0
- package/io/restorecommerce/policy_set.proto +53 -0
- package/io/restorecommerce/price_group.proto +45 -0
- package/io/restorecommerce/product.proto +101 -0
- package/io/restorecommerce/product_category.proto +53 -0
- package/io/restorecommerce/product_prototype.proto +47 -0
- package/io/restorecommerce/rendering.proto +34 -0
- package/io/restorecommerce/resource_base.proto +137 -0
- package/io/restorecommerce/role.proto +45 -0
- package/io/restorecommerce/rule.proto +86 -0
- package/io/restorecommerce/search.proto +21 -0
- package/io/restorecommerce/status.proto +26 -0
- package/io/restorecommerce/tax.proto +49 -0
- package/io/restorecommerce/tax_type.proto +47 -0
- package/io/restorecommerce/timezone.proto +46 -0
- package/io/restorecommerce/token.proto +36 -0
- package/io/restorecommerce/user.proto +258 -0
- package/package.json +19 -0
- package/test/test.proto +71 -0
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package io.restorecommerce.notification_channel;
|
|
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
|
+
|
|
10
|
+
// Message structure for Notification Channel
|
|
11
|
+
service Service {
|
|
12
|
+
rpc Read (io.restorecommerce.resourcebase.ReadRequest) returns (NotificationChannelListResponse);
|
|
13
|
+
rpc Create (NotificationChannelList) returns (NotificationChannelListResponse);
|
|
14
|
+
rpc Delete (io.restorecommerce.resourcebase.DeleteRequest) returns (io.restorecommerce.resourcebase.DeleteResponse);
|
|
15
|
+
rpc Update (NotificationChannelList) returns (NotificationChannelListResponse);
|
|
16
|
+
rpc Upsert (NotificationChannelList) returns (NotificationChannelListResponse);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
message Deleted {
|
|
20
|
+
string id = 1;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
message NotificationChannelList {
|
|
24
|
+
repeated NotificationChannel items = 1;
|
|
25
|
+
uint32 total_count = 2;
|
|
26
|
+
io.restorecommerce.auth.Subject subject = 3;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
message NotificationChannelListResponse {
|
|
30
|
+
repeated NotificationChannelResponse items = 1;
|
|
31
|
+
uint32 total_count = 2;
|
|
32
|
+
io.restorecommerce.status.OperationStatus operation_status = 3;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
message NotificationChannelResponse {
|
|
36
|
+
NotificationChannel items = 1;
|
|
37
|
+
io.restorecommerce.status.Status status = 2;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
message NotificationChannel {
|
|
41
|
+
string id = 1;
|
|
42
|
+
io.restorecommerce.meta.Meta meta = 2;
|
|
43
|
+
string name = 3;
|
|
44
|
+
string description = 4;
|
|
45
|
+
oneof configuration_type {
|
|
46
|
+
string email = 5;
|
|
47
|
+
string sms = 6;
|
|
48
|
+
string webhook = 7;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package io.restorecommerce.notification_req;
|
|
4
|
+
|
|
5
|
+
import "io/restorecommerce/status.proto";
|
|
6
|
+
|
|
7
|
+
service Service {
|
|
8
|
+
// direct notifications
|
|
9
|
+
rpc Send (NotificationReq) returns (io.restorecommerce.status.OperationStatusObj); /// generic fallback
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
// mimics nodemailer properties for easy configuration
|
|
13
|
+
message Attachment {
|
|
14
|
+
string filename = 1;
|
|
15
|
+
|
|
16
|
+
// the "content" may be on of the following:
|
|
17
|
+
string text = 2; // for textual data
|
|
18
|
+
bytes buffer = 3; // for binary data, eg.: images
|
|
19
|
+
|
|
20
|
+
string path = 4;
|
|
21
|
+
string content_type = 5;
|
|
22
|
+
string content_disposition = 6;
|
|
23
|
+
string cid = 7;
|
|
24
|
+
string encoding = 8;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
// sendEmail NotificationReq event
|
|
28
|
+
message NotificationReq {
|
|
29
|
+
oneof channel {
|
|
30
|
+
Email email = 1;
|
|
31
|
+
Log log = 2;
|
|
32
|
+
}
|
|
33
|
+
string subject = 3;
|
|
34
|
+
string body = 4; // text/HTML content
|
|
35
|
+
string transport = 5; /// 'email', 'log', ... default == 'log'
|
|
36
|
+
string provider = 6; /// specific transport provider, eg: 'console' for transport == 'log'
|
|
37
|
+
repeated Attachment attachments = 7;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
message Email {
|
|
41
|
+
repeated string to = 1; // array of to email list
|
|
42
|
+
repeated string cc = 2 ;// array of cc email list
|
|
43
|
+
repeated string bcc = 3; // array of bcc email list
|
|
44
|
+
string replyto = 4; // if set, the outgoing mail will have this replyTo header set
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
message Log {
|
|
48
|
+
string level = 1;
|
|
49
|
+
}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package io.restorecommerce.order;
|
|
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
|
+
|
|
10
|
+
service Service {
|
|
11
|
+
rpc Read (io.restorecommerce.resourcebase.ReadRequest) returns (OrderListResponse);
|
|
12
|
+
rpc Create (OrderList) returns (OrderListResponse);
|
|
13
|
+
rpc Delete (io.restorecommerce.resourcebase.DeleteRequest) returns (io.restorecommerce.resourcebase.DeleteResponse);
|
|
14
|
+
rpc Update (OrderList) returns (OrderListResponse);
|
|
15
|
+
rpc Upsert (OrderList) returns (OrderListResponse);
|
|
16
|
+
rpc TriggerFulfillment (OrderDataList) returns (FulfillmentResults);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
message OrderList {
|
|
21
|
+
repeated Order items = 1;
|
|
22
|
+
uint32 total_count = 2;
|
|
23
|
+
io.restorecommerce.auth.Subject subject = 3;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
message OrderListResponse {
|
|
27
|
+
repeated OrderResponse items = 1;
|
|
28
|
+
uint32 total_count = 2;
|
|
29
|
+
io.restorecommerce.status.OperationStatus operation_status = 3;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
message OrderResponse {
|
|
33
|
+
Order payload = 1;
|
|
34
|
+
io.restorecommerce.status.Status status = 2;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
message Order {
|
|
38
|
+
string id = 1;
|
|
39
|
+
io.restorecommerce.meta.Meta meta = 2;
|
|
40
|
+
string name = 3;
|
|
41
|
+
string description = 4;
|
|
42
|
+
string status = 5;
|
|
43
|
+
repeated Items items = 6;
|
|
44
|
+
// sum of all the quantity_price will be total_price
|
|
45
|
+
double total_price = 7;
|
|
46
|
+
// shipping address
|
|
47
|
+
string shipping_contact_point_id = 8;
|
|
48
|
+
string billing_contact_point_id = 9;
|
|
49
|
+
double total_weight_in_kg = 10;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
message Items {
|
|
53
|
+
double quantity_price = 1;
|
|
54
|
+
Item item = 2;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
message Item {
|
|
58
|
+
// below identifier is id of product, variant or bundle
|
|
59
|
+
string product_variant_bundle_id = 1;
|
|
60
|
+
string product_name = 2;
|
|
61
|
+
string product_description = 3;
|
|
62
|
+
string manufacturer_name = 4;
|
|
63
|
+
string manufacturer_description = 5;
|
|
64
|
+
string prototype_name = 6;
|
|
65
|
+
string prototype_description = 7;
|
|
66
|
+
int32 quantity = 8;
|
|
67
|
+
int32 vat = 9;
|
|
68
|
+
double price = 10;
|
|
69
|
+
string item_type = 11;
|
|
70
|
+
double taric_code = 12;
|
|
71
|
+
string stock_keeping_unit = 13;
|
|
72
|
+
double weight_in_kg = 14;
|
|
73
|
+
int32 length_in_cm = 15;
|
|
74
|
+
int32 width_in_cm = 16;
|
|
75
|
+
int32 height_in_cm = 17;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
message Deleted {
|
|
79
|
+
string id = 1;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
message OrderDataList {
|
|
83
|
+
repeated OrderData order_data = 1;
|
|
84
|
+
io.restorecommerce.meta.Meta meta = 2;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
message OrderData {
|
|
88
|
+
string order_id = 1;
|
|
89
|
+
repeated Shipments shipments = 2;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
message Shipments {
|
|
93
|
+
double total_weight_in_kg = 1;
|
|
94
|
+
// below properties are used for international packaging
|
|
95
|
+
double individual_weight_in_kg = 2; // each items weight
|
|
96
|
+
int32 amount = 3; // number of items
|
|
97
|
+
string export_type = 4;
|
|
98
|
+
string export_description = 5;
|
|
99
|
+
string customs_tariff_number = 6;
|
|
100
|
+
string invoice_number = 7;
|
|
101
|
+
double customs_value = 8;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
message FulfillmentResults {
|
|
105
|
+
repeated ResponseDetailsList fulfillmentResults =1;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
message ResponseDetailsList {
|
|
109
|
+
OrderStatus Status = 1;
|
|
110
|
+
ErrorList error = 2;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
message OrderStatus {
|
|
114
|
+
string OrderId = 1;
|
|
115
|
+
string OrderStatus =2;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
message ErrorList {
|
|
119
|
+
repeated string code = 1;
|
|
120
|
+
repeated string message = 2;
|
|
121
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package io.restorecommerce.organization;
|
|
4
|
+
|
|
5
|
+
import "io/restorecommerce/resource_base.proto";
|
|
6
|
+
import "google/protobuf/any.proto";
|
|
7
|
+
import "io/restorecommerce/meta.proto";
|
|
8
|
+
import "io/restorecommerce/auth.proto";
|
|
9
|
+
import "io/restorecommerce/status.proto";
|
|
10
|
+
|
|
11
|
+
service Service {
|
|
12
|
+
rpc Read (io.restorecommerce.resourcebase.ReadRequest) returns (OrganizationListResponse);
|
|
13
|
+
rpc Create (OrganizationList) returns (OrganizationListResponse);
|
|
14
|
+
rpc Delete (io.restorecommerce.resourcebase.DeleteRequest) returns (io.restorecommerce.resourcebase.DeleteResponse);
|
|
15
|
+
rpc Update (OrganizationList) returns (OrganizationListResponse);
|
|
16
|
+
rpc Upsert (OrganizationList) returns (OrganizationListResponse);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
message Deleted {
|
|
20
|
+
string id = 1;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
message DeleteOrgData {
|
|
24
|
+
repeated string org_ids = 1;
|
|
25
|
+
repeated string user_ids = 2;
|
|
26
|
+
io.restorecommerce.auth.Subject subject = 3;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
message OrganizationList {
|
|
30
|
+
repeated Organization items = 1;
|
|
31
|
+
uint32 total_count = 2;
|
|
32
|
+
io.restorecommerce.auth.Subject subject = 3;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
message OrganizationListResponse {
|
|
36
|
+
repeated OrganizationResponse items = 1;
|
|
37
|
+
uint32 total_count = 2;
|
|
38
|
+
io.restorecommerce.status.OperationStatus operation_status = 3;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
message OrganizationResponse {
|
|
42
|
+
Organization payload = 1;
|
|
43
|
+
io.restorecommerce.status.Status status = 2;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
message Organization {
|
|
47
|
+
string id = 1; /// Organization ID, unique, key
|
|
48
|
+
io.restorecommerce.meta.Meta meta = 2;
|
|
49
|
+
string address_id = 3; /// Address for the organization
|
|
50
|
+
string parent_id = 4; // Hierarchically superior organization; may be null
|
|
51
|
+
repeated string children_ids = 5; // Hierarchically inferior organizations; may be null/empty
|
|
52
|
+
repeated string contact_point_ids = 6; // list of possible legal addresses of different types
|
|
53
|
+
string website = 7;
|
|
54
|
+
string email = 8;
|
|
55
|
+
string logo = 9; // base64; arangoDB does not support blob storage
|
|
56
|
+
string vat_id = 10;
|
|
57
|
+
string isic_v4 = 11;
|
|
58
|
+
string registration = 12;
|
|
59
|
+
string registration_court = 13;
|
|
60
|
+
string name = 14;
|
|
61
|
+
repeated string payment_method_ids = 15;
|
|
62
|
+
google.protobuf.Any data = 16; /// additional data
|
|
63
|
+
}
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package io.restorecommerce.ostorage;
|
|
4
|
+
|
|
5
|
+
import "io/restorecommerce/filter.proto";
|
|
6
|
+
import "google/protobuf/any.proto";
|
|
7
|
+
import "io/restorecommerce/meta.proto";
|
|
8
|
+
import "io/restorecommerce/auth.proto";
|
|
9
|
+
import "io/restorecommerce/attribute.proto";
|
|
10
|
+
import "io/restorecommerce/status.proto";
|
|
11
|
+
import "io/restorecommerce/resource_base.proto";
|
|
12
|
+
|
|
13
|
+
service Service {
|
|
14
|
+
rpc Get (GetRequest) returns (stream ObjectResponse);
|
|
15
|
+
rpc Put (stream Object) returns (PutResponse);
|
|
16
|
+
rpc Delete (DeleteRequest) returns (io.restorecommerce.resourcebase.DeleteResponse);
|
|
17
|
+
rpc List (ListRequest) returns (ListResponse);
|
|
18
|
+
rpc Copy (CopyRequest) returns (CopyResponse);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
message CopyRequest {
|
|
22
|
+
repeated CopyRequestItem items = 1;
|
|
23
|
+
io.restorecommerce.auth.Subject subject = 2;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
message CopyResponse {
|
|
27
|
+
repeated copyResponsePayloadWithStatus response = 1;
|
|
28
|
+
io.restorecommerce.status.OperationStatus operation_status = 2;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
message copyResponsePayloadWithStatus {
|
|
32
|
+
CopyResponseItem payload = 1;
|
|
33
|
+
io.restorecommerce.status.Status status = 2;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
message CopyRequestItem {
|
|
37
|
+
string bucket = 1;
|
|
38
|
+
string copySource = 2;
|
|
39
|
+
string key = 3;
|
|
40
|
+
io.restorecommerce.meta.Meta meta = 4;
|
|
41
|
+
Options options = 5;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
message CopyResponseItem {
|
|
45
|
+
string bucket = 1;
|
|
46
|
+
string copySource = 2;
|
|
47
|
+
string key = 3;
|
|
48
|
+
io.restorecommerce.meta.Meta meta = 4;
|
|
49
|
+
Options options = 5;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
message Options {
|
|
53
|
+
string encoding = 1;
|
|
54
|
+
string content_type = 2;
|
|
55
|
+
string content_language = 3;
|
|
56
|
+
string content_disposition = 4;
|
|
57
|
+
int32 length = 5;
|
|
58
|
+
string version = 6;
|
|
59
|
+
string md5 = 7;
|
|
60
|
+
repeated io.restorecommerce.attribute.Attribute tags = 8;
|
|
61
|
+
google.protobuf.Any data = 9; // optional meta data ex: from and to dates
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
message Object {
|
|
65
|
+
string key = 1;
|
|
66
|
+
string bucket = 2;
|
|
67
|
+
bytes object = 3;
|
|
68
|
+
io.restorecommerce.meta.Meta meta = 4;
|
|
69
|
+
string url = 5;
|
|
70
|
+
Options options = 6;
|
|
71
|
+
io.restorecommerce.auth.Subject subject = 7;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
message ObjectResponse {
|
|
75
|
+
ObjectResponsePayloadWithStatus response = 1;
|
|
76
|
+
io.restorecommerce.status.OperationStatus operation_status = 2;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
message ObjectResponsePayloadWithStatus {
|
|
80
|
+
ObjectResponsePayload payload = 1;
|
|
81
|
+
io.restorecommerce.status.Status status = 3;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
message ObjectResponsePayload {
|
|
85
|
+
string key = 1;
|
|
86
|
+
string bucket = 2;
|
|
87
|
+
bytes object = 3;
|
|
88
|
+
io.restorecommerce.meta.Meta meta = 4;
|
|
89
|
+
string url = 5;
|
|
90
|
+
Options options = 6;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
message GetRequest {
|
|
94
|
+
string key = 1;
|
|
95
|
+
string bucket = 2;
|
|
96
|
+
bool download = 3;
|
|
97
|
+
io.restorecommerce.auth.Subject subject = 4;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
message ListResponse {
|
|
101
|
+
repeated ObjectsDataWithPayloadStatus response = 1;
|
|
102
|
+
io.restorecommerce.status.OperationStatus operation_status = 2;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
message ObjectsDataWithPayloadStatus {
|
|
106
|
+
ObjectData payload = 1;
|
|
107
|
+
io.restorecommerce.status.Status status = 2;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
message ObjectData {
|
|
111
|
+
string object_name = 1;
|
|
112
|
+
string url = 2;
|
|
113
|
+
io.restorecommerce.meta.Meta meta = 3;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
message DeleteRequest {
|
|
117
|
+
string key = 1;
|
|
118
|
+
string bucket = 2;
|
|
119
|
+
io.restorecommerce.auth.Subject subject = 3;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
message PutResponse {
|
|
123
|
+
PutResponseWithPayloadStatus response = 1;
|
|
124
|
+
io.restorecommerce.status.OperationStatus operation_status = 2;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
message PutResponseWithPayloadStatus {
|
|
128
|
+
Response payload = 1;
|
|
129
|
+
io.restorecommerce.status.Status status = 2;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
message Response {
|
|
133
|
+
string url = 1;
|
|
134
|
+
string bucket = 2 ;
|
|
135
|
+
string key = 3;
|
|
136
|
+
io.restorecommerce.meta.Meta meta = 4;
|
|
137
|
+
repeated io.restorecommerce.attribute.Attribute tags = 5;
|
|
138
|
+
int32 length = 6; // file size of uploaded object
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
message ListRequest {
|
|
142
|
+
string bucket = 1;
|
|
143
|
+
io.restorecommerce.filter.FilterOp filters = 2; /// Filter based on fieldName|operation, value|list
|
|
144
|
+
io.restorecommerce.auth.Subject subject = 3;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
// OstorageMessage is used for emitting
|
|
148
|
+
// objectUploaded and objectDownloaded events
|
|
149
|
+
message OstorageMessage {
|
|
150
|
+
string key = 1;
|
|
151
|
+
string bucket = 2;
|
|
152
|
+
google.protobuf.Any metadata = 3;
|
|
153
|
+
io.restorecommerce.auth.Subject subject = 4;
|
|
154
|
+
}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
package io.restorecommerce.payment;
|
|
3
|
+
import "google/protobuf/wrappers.proto";
|
|
4
|
+
import "io/restorecommerce/auth.proto";
|
|
5
|
+
|
|
6
|
+
service Service {
|
|
7
|
+
// Wrapper for setup_authorization in ActiveMerchant
|
|
8
|
+
rpc SetupAuthorization (SetupRequest) returns (SetupResponse);
|
|
9
|
+
|
|
10
|
+
// Wrapper for setup_purchase in ActiveMerchant
|
|
11
|
+
rpc SetupPurchase (SetupRequest) returns (SetupResponse);
|
|
12
|
+
|
|
13
|
+
// Gets payment details by token or transaction. Only supported by PayPal Express Checkout.
|
|
14
|
+
rpc Authorize (PaymentRequest) returns (PaymentResponse);
|
|
15
|
+
|
|
16
|
+
// Gets payment details by token or transaction. Only supported by PayPal Express Checkout.
|
|
17
|
+
rpc Purchase (PaymentRequest) returns (PaymentResponse);
|
|
18
|
+
|
|
19
|
+
// Can capture both cardless and standard authorization.
|
|
20
|
+
rpc Capture (CaptureRequest) returns (PaymentResponse);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
// Request object for setup calls
|
|
24
|
+
message SetupRequest {
|
|
25
|
+
string ip = 1;
|
|
26
|
+
repeated Item items = 2;
|
|
27
|
+
int32 subtotal = 3;
|
|
28
|
+
int32 shipping = 4;
|
|
29
|
+
int32 handling = 5;
|
|
30
|
+
int32 tax = 6;
|
|
31
|
+
string currency = 7;
|
|
32
|
+
string return_url = 8;
|
|
33
|
+
string cancel_return_url = 9;
|
|
34
|
+
bool allow_guest_checkout = 10;
|
|
35
|
+
Provider provider = 11;
|
|
36
|
+
io.restorecommerce.auth.Subject subject = 12;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
// Response object for setup calls.
|
|
40
|
+
message SetupResponse {
|
|
41
|
+
repeated PaymentError payment_errors = 1;
|
|
42
|
+
string token = 2;
|
|
43
|
+
string confirm_initiation_url = 3;
|
|
44
|
+
string initiated_on = 4;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
// Request object for authorization or purchase call for cardless payment.
|
|
48
|
+
message PaymentRequest {
|
|
49
|
+
Provider provider = 1;
|
|
50
|
+
int32 payment_sum = 2;
|
|
51
|
+
string currency = 3;
|
|
52
|
+
string payment_id = 4;
|
|
53
|
+
string payer_id = 5;
|
|
54
|
+
string token = 6;
|
|
55
|
+
io.restorecommerce.auth.Subject subject = 7;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
// Request object for capture call for both standard and cardless payments.
|
|
59
|
+
message CaptureRequest {
|
|
60
|
+
Provider provider = 1;
|
|
61
|
+
int32 payment_sum = 2;
|
|
62
|
+
string currency = 3;
|
|
63
|
+
string payment_id = 4;
|
|
64
|
+
io.restorecommerce.auth.Subject subject = 5;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// Unified response object for authorization, purchase and capture calls
|
|
68
|
+
// for both standard and cardless payments.
|
|
69
|
+
message PaymentResponse {
|
|
70
|
+
repeated PaymentError payment_errors = 1;
|
|
71
|
+
string payment_id = 2;
|
|
72
|
+
string executed_on = 3;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
// Used for building ActiveMerchant::Billing::CreditCard instance.
|
|
76
|
+
message PaymentCard {
|
|
77
|
+
string primary_number = 1;
|
|
78
|
+
string first_name = 2;
|
|
79
|
+
string last_name = 3;
|
|
80
|
+
string month = 4;
|
|
81
|
+
int32 year = 5;
|
|
82
|
+
string verification_value = 6;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
// Represents purchased item. Not all providers support this.
|
|
86
|
+
message Item {
|
|
87
|
+
string name = 1;
|
|
88
|
+
string description = 2;
|
|
89
|
+
int32 quantity = 3;
|
|
90
|
+
int32 amount = 4;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
// Error details.
|
|
94
|
+
message PaymentError {
|
|
95
|
+
bool killed = 1;
|
|
96
|
+
int32 code = 2;
|
|
97
|
+
google.protobuf.StringValue signal = 3;
|
|
98
|
+
string cmd = 4;
|
|
99
|
+
string stdout = 5;
|
|
100
|
+
string stderr = 6;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
// Possible service providers. Provider names must be exactly as in config.yml.
|
|
104
|
+
enum Provider {
|
|
105
|
+
NO_PROVIDER = 0;
|
|
106
|
+
PaypalExpressGateway = 1;
|
|
107
|
+
AuthorizeNetGateway = 2;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
// Possible payment identifiers.
|
|
111
|
+
enum PaymentIdType {
|
|
112
|
+
NO_IDENTIFIER_TYPE = 0;
|
|
113
|
+
TOKEN = 1;
|
|
114
|
+
TRANSACTION_ID = 2;
|
|
115
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package io.restorecommerce.payment_method;
|
|
4
|
+
|
|
5
|
+
import "io/restorecommerce/resource_base.proto";
|
|
6
|
+
import "google/protobuf/any.proto";
|
|
7
|
+
import "io/restorecommerce/meta.proto";
|
|
8
|
+
import "io/restorecommerce/auth.proto";
|
|
9
|
+
import "io/restorecommerce/status.proto";
|
|
10
|
+
|
|
11
|
+
/*
|
|
12
|
+
* Microservice definition.
|
|
13
|
+
*/
|
|
14
|
+
service Service {
|
|
15
|
+
rpc Read (io.restorecommerce.resourcebase.ReadRequest) returns (PaymentMethodListResponse);
|
|
16
|
+
rpc Create (PaymentMethodList) returns (PaymentMethodListResponse);
|
|
17
|
+
rpc Delete (io.restorecommerce.resourcebase.DeleteRequest) returns (io.restorecommerce.resourcebase.DeleteResponse);
|
|
18
|
+
rpc Update (PaymentMethodList) returns (PaymentMethodListResponse);
|
|
19
|
+
rpc Upsert (PaymentMethodList) returns (PaymentMethodListResponse);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
message Deleted {
|
|
23
|
+
string id = 1;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
message PaymentMethodList {
|
|
27
|
+
repeated PaymentMethod items = 1;
|
|
28
|
+
uint32 total_count = 2;
|
|
29
|
+
io.restorecommerce.auth.Subject subject = 3;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
message PaymentMethodListResponse {
|
|
33
|
+
repeated PaymentMethodResponse items = 1;
|
|
34
|
+
uint32 total_count = 2;
|
|
35
|
+
io.restorecommerce.status.OperationStatus operation_status = 3;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
message PaymentMethodResponse {
|
|
39
|
+
PaymentMethod payload = 1;
|
|
40
|
+
io.restorecommerce.status.Status status = 2;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
enum PaymentMethodEnum {
|
|
44
|
+
WIRE_TRANSFER = 0;
|
|
45
|
+
DIRECT_DEBIT = 1;
|
|
46
|
+
PAYPAL = 2;
|
|
47
|
+
}
|
|
48
|
+
enum TransferTypeEnum {
|
|
49
|
+
RECEIVE = 0;
|
|
50
|
+
SEND = 1;
|
|
51
|
+
BOTH = 2;
|
|
52
|
+
}
|
|
53
|
+
|
|
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;
|
|
60
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package io.restorecommerce.policy;
|
|
4
|
+
|
|
5
|
+
import "io/restorecommerce/resource_base.proto";
|
|
6
|
+
import "io/restorecommerce/meta.proto";
|
|
7
|
+
import "io/restorecommerce/rule.proto";
|
|
8
|
+
import "io/restorecommerce/auth.proto";
|
|
9
|
+
import "io/restorecommerce/status.proto";
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* A Policy is defined by a set of Rules.
|
|
13
|
+
*/
|
|
14
|
+
message Policy {
|
|
15
|
+
string id = 1;
|
|
16
|
+
io.restorecommerce.meta.Meta meta = 2;
|
|
17
|
+
string name = 3;
|
|
18
|
+
string description = 4;
|
|
19
|
+
repeated string rules = 5; // rule IDs
|
|
20
|
+
io.restorecommerce.rule.Target target = 6; // general policy target
|
|
21
|
+
io.restorecommerce.rule.Effect effect = 7;
|
|
22
|
+
string combining_algorithm = 8;
|
|
23
|
+
bool evaluation_cacheable = 9;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
message PolicyRQ {
|
|
27
|
+
string id = 1;
|
|
28
|
+
io.restorecommerce.rule.Target target = 2;
|
|
29
|
+
string combining_algorithm = 3;
|
|
30
|
+
repeated io.restorecommerce.rule.RuleRQ rules = 4;
|
|
31
|
+
io.restorecommerce.rule.Effect effect = 5;
|
|
32
|
+
bool has_rules = 6;
|
|
33
|
+
bool evaluation_cacheable = 7;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
message PolicyList {
|
|
37
|
+
repeated Policy items = 1;
|
|
38
|
+
uint32 total_count = 2;
|
|
39
|
+
io.restorecommerce.auth.Subject subject = 3;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
message PolicyListResponse {
|
|
43
|
+
repeated PolicyResponse items = 1;
|
|
44
|
+
uint32 total_count = 2;
|
|
45
|
+
io.restorecommerce.status.OperationStatus operation_status = 3;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
message PolicyResponse {
|
|
49
|
+
Policy payload = 1;
|
|
50
|
+
io.restorecommerce.status.Status status = 2;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
service Service {
|
|
54
|
+
rpc Read (io.restorecommerce.resourcebase.ReadRequest) returns (PolicyListResponse);
|
|
55
|
+
rpc Create (PolicyList) returns (PolicyListResponse);
|
|
56
|
+
rpc Delete (io.restorecommerce.resourcebase.DeleteRequest) returns (io.restorecommerce.resourcebase.DeleteResponse);
|
|
57
|
+
rpc Update (PolicyList) returns (PolicyListResponse);
|
|
58
|
+
rpc Upsert (PolicyList) returns (PolicyListResponse);
|
|
59
|
+
}
|