@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.
@@ -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 {
@@ -0,0 +1,8 @@
1
+ syntax = "proto3";
2
+
3
+ package io.restorecommerce.reference;
4
+
5
+ message Reference {
6
+ optional string instance_type = 1;
7
+ optional string instance_id = 2;
8
+ }
@@ -133,8 +133,8 @@ message ResourceResponse {
133
133
  io.restorecommerce.status.Status status = 2;
134
134
  }
135
135
 
136
- /// Example resource
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
+ }
@@ -70,8 +70,3 @@ message Tax {
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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@restorecommerce/protos",
3
- "version": "3.1.2",
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": "1caa7cb6acfb09a9ea79c9ff4349390617175854"
18
+ "gitHead": "a6f633f4c1f61773ce6a93b9a9720cd00d3c005f"
19
19
  }