@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,53 @@
|
|
|
1
|
+
/// Protocol Buffers - Google's data interchange format
|
|
2
|
+
/// Copyright 2008 Google Inc. All rights reserved.
|
|
3
|
+
/// https:///developers.google.com/protocol-buffers/
|
|
4
|
+
///
|
|
5
|
+
/// Redistribution and use in source and binary forms, with or without
|
|
6
|
+
/// modification, are permitted provided that the following conditions are
|
|
7
|
+
/// met:
|
|
8
|
+
///
|
|
9
|
+
/// * Redistributions of source code must retain the above copyright
|
|
10
|
+
/// notice, this list of conditions and the following disclaimer.
|
|
11
|
+
/// * Redistributions in binary form must reproduce the above
|
|
12
|
+
/// copyright notice, this list of conditions and the following disclaimer
|
|
13
|
+
/// in the documentation and/or other materials provided with the
|
|
14
|
+
/// distribution.
|
|
15
|
+
/// * Neither the name of Google Inc. nor the names of its
|
|
16
|
+
/// contributors may be used to endorse or promote products derived from
|
|
17
|
+
/// this software without specific prior written permission.
|
|
18
|
+
///
|
|
19
|
+
/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
20
|
+
/// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
21
|
+
/// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
22
|
+
/// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
23
|
+
/// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
24
|
+
/// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
25
|
+
/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
26
|
+
/// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
27
|
+
/// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
28
|
+
/// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
29
|
+
/// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
30
|
+
|
|
31
|
+
syntax = "proto3";
|
|
32
|
+
|
|
33
|
+
package google.protobuf;
|
|
34
|
+
|
|
35
|
+
option csharp_namespace = "Google.Protobuf.WellKnownTypes";
|
|
36
|
+
option go_package = "github.com/golang/protobuf/ptypes/empty";
|
|
37
|
+
option java_package = "com.google.protobuf";
|
|
38
|
+
option java_outer_classname = "EmptyProto";
|
|
39
|
+
option java_multiple_files = true;
|
|
40
|
+
option java_generate_equals_and_hash = true;
|
|
41
|
+
option objc_class_prefix = "GPB";
|
|
42
|
+
option cc_enable_arenas = true;
|
|
43
|
+
|
|
44
|
+
/// A generic empty message that you can re-use to avoid defining duplicated
|
|
45
|
+
/// empty messages in your APIs. A typical example is to use it as the request
|
|
46
|
+
/// or the response type of an API method. For instance:
|
|
47
|
+
///
|
|
48
|
+
/// service Foo {
|
|
49
|
+
/// rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
|
|
50
|
+
/// }
|
|
51
|
+
///
|
|
52
|
+
/// The JSON representation for `Empty` is empty JSON object `{}`.
|
|
53
|
+
message Empty {}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
/// Protocol Buffers - Google's data interchange format
|
|
2
|
+
/// Copyright 2008 Google Inc. All rights reserved.
|
|
3
|
+
/// https:///developers.google.com/protocol-buffers/
|
|
4
|
+
///
|
|
5
|
+
/// Redistribution and use in source and binary forms, with or without
|
|
6
|
+
/// modification, are permitted provided that the following conditions are
|
|
7
|
+
/// met:
|
|
8
|
+
///
|
|
9
|
+
/// * Redistributions of source code must retain the above copyright
|
|
10
|
+
/// notice, this list of conditions and the following disclaimer.
|
|
11
|
+
/// * Redistributions in binary form must reproduce the above
|
|
12
|
+
/// copyright notice, this list of conditions and the following disclaimer
|
|
13
|
+
/// in the documentation and/or other materials provided with the
|
|
14
|
+
/// distribution.
|
|
15
|
+
/// * Neither the name of Google Inc. nor the names of its
|
|
16
|
+
/// contributors may be used to endorse or promote products derived from
|
|
17
|
+
/// this software without specific prior written permission.
|
|
18
|
+
///
|
|
19
|
+
/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
20
|
+
/// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
21
|
+
/// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
22
|
+
/// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
23
|
+
/// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
24
|
+
/// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
25
|
+
/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
26
|
+
/// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
27
|
+
/// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
28
|
+
/// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
29
|
+
/// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
30
|
+
|
|
31
|
+
syntax = "proto3";
|
|
32
|
+
|
|
33
|
+
package google.protobuf;
|
|
34
|
+
|
|
35
|
+
option csharp_namespace = "Google.Protobuf.WellKnownTypes";
|
|
36
|
+
option go_package = "github.com/golang/protobuf/ptypes/struct;structpb";
|
|
37
|
+
option java_package = "com.google.protobuf";
|
|
38
|
+
option java_outer_classname = "StructProto";
|
|
39
|
+
option java_multiple_files = true;
|
|
40
|
+
option java_generate_equals_and_hash = true;
|
|
41
|
+
option objc_class_prefix = "GPB";
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
/// `Struct` represents a structured data value, consisting of fields
|
|
45
|
+
/// which map to dynamically typed values. In some languages, `Struct`
|
|
46
|
+
/// might be supported by a native representation. For example, in
|
|
47
|
+
/// scripting languages like JS a struct is represented as an
|
|
48
|
+
/// object. The details of that representation are described together
|
|
49
|
+
/// with the proto support for the language.
|
|
50
|
+
///
|
|
51
|
+
/// The JSON representation for `Struct` is JSON object.
|
|
52
|
+
message Struct {
|
|
53
|
+
/// Unordered map of dynamically typed values.
|
|
54
|
+
map<string, Value> fields = 1;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/// `Value` represents a dynamically typed value which can be either
|
|
58
|
+
/// null, a number, a string, a boolean, a recursive struct value, or a
|
|
59
|
+
/// list of values. A producer of value is expected to set one of that
|
|
60
|
+
/// variants, absence of any variant indicates an error.
|
|
61
|
+
///
|
|
62
|
+
/// The JSON representation for `Value` is JSON value.
|
|
63
|
+
message Value {
|
|
64
|
+
/// The kind of value.
|
|
65
|
+
oneof kind {
|
|
66
|
+
/// Represents a null value.
|
|
67
|
+
NullValue null_value = 1;
|
|
68
|
+
/// Represents a double value.
|
|
69
|
+
double number_value = 2;
|
|
70
|
+
/// Represents a string value.
|
|
71
|
+
string string_value = 3;
|
|
72
|
+
/// Represents a boolean value.
|
|
73
|
+
bool bool_value = 4;
|
|
74
|
+
/// Represents a structured value.
|
|
75
|
+
Struct struct_value = 5;
|
|
76
|
+
/// Represents a repeated `Value`.
|
|
77
|
+
ListValue list_value = 6;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/// `NullValue` is a singleton enumeration to represent the null value for the
|
|
82
|
+
/// `Value` type union.
|
|
83
|
+
///
|
|
84
|
+
/// The JSON representation for `NullValue` is JSON `null`.
|
|
85
|
+
enum NullValue {
|
|
86
|
+
/// Null value.
|
|
87
|
+
NULL_VALUE = 0;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/// `ListValue` is a wrapper around a repeated field of values.
|
|
91
|
+
///
|
|
92
|
+
/// The JSON representation for `ListValue` is JSON array.
|
|
93
|
+
message ListValue {
|
|
94
|
+
/// Repeated field of dynamically typed values.
|
|
95
|
+
repeated Value values = 1;
|
|
96
|
+
}
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
// Protocol Buffers - Google's data interchange format
|
|
2
|
+
// Copyright 2008 Google Inc. All rights reserved.
|
|
3
|
+
// https://developers.google.com/protocol-buffers/
|
|
4
|
+
//
|
|
5
|
+
// Redistribution and use in source and binary forms, with or without
|
|
6
|
+
// modification, are permitted provided that the following conditions are
|
|
7
|
+
// met:
|
|
8
|
+
//
|
|
9
|
+
// * Redistributions of source code must retain the above copyright
|
|
10
|
+
// notice, this list of conditions and the following disclaimer.
|
|
11
|
+
// * Redistributions in binary form must reproduce the above
|
|
12
|
+
// copyright notice, this list of conditions and the following disclaimer
|
|
13
|
+
// in the documentation and/or other materials provided with the
|
|
14
|
+
// distribution.
|
|
15
|
+
// * Neither the name of Google Inc. nor the names of its
|
|
16
|
+
// contributors may be used to endorse or promote products derived from
|
|
17
|
+
// this software without specific prior written permission.
|
|
18
|
+
//
|
|
19
|
+
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
20
|
+
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
21
|
+
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
22
|
+
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
23
|
+
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
24
|
+
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
25
|
+
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
26
|
+
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
27
|
+
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
28
|
+
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
29
|
+
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
30
|
+
|
|
31
|
+
// Wrappers for primitive (non-message) types. These types are useful
|
|
32
|
+
// for embedding primitives in the `google.protobuf.Any` type and for places
|
|
33
|
+
// where we need to distinguish between the absence of a primitive
|
|
34
|
+
// typed field and its default value.
|
|
35
|
+
//
|
|
36
|
+
// These wrappers have no meaningful use within repeated fields as they lack
|
|
37
|
+
// the ability to detect presence on individual elements.
|
|
38
|
+
// These wrappers have no meaningful use within a map or a oneof since
|
|
39
|
+
// individual entries of a map or fields of a oneof can already detect presence.
|
|
40
|
+
|
|
41
|
+
syntax = "proto3";
|
|
42
|
+
|
|
43
|
+
package google.protobuf;
|
|
44
|
+
|
|
45
|
+
option csharp_namespace = "Google.Protobuf.WellKnownTypes";
|
|
46
|
+
option cc_enable_arenas = true;
|
|
47
|
+
option go_package = "github.com/golang/protobuf/ptypes/wrappers";
|
|
48
|
+
option java_package = "com.google.protobuf";
|
|
49
|
+
option java_outer_classname = "WrappersProto";
|
|
50
|
+
option java_multiple_files = true;
|
|
51
|
+
option objc_class_prefix = "GPB";
|
|
52
|
+
|
|
53
|
+
// Wrapper message for `double`.
|
|
54
|
+
//
|
|
55
|
+
// The JSON representation for `DoubleValue` is JSON number.
|
|
56
|
+
message DoubleValue {
|
|
57
|
+
// The double value.
|
|
58
|
+
double value = 1;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
// Wrapper message for `float`.
|
|
62
|
+
//
|
|
63
|
+
// The JSON representation for `FloatValue` is JSON number.
|
|
64
|
+
message FloatValue {
|
|
65
|
+
// The float value.
|
|
66
|
+
float value = 1;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
// Wrapper message for `int64`.
|
|
70
|
+
//
|
|
71
|
+
// The JSON representation for `Int64Value` is JSON string.
|
|
72
|
+
message Int64Value {
|
|
73
|
+
// The int64 value.
|
|
74
|
+
int64 value = 1;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
// Wrapper message for `uint64`.
|
|
78
|
+
//
|
|
79
|
+
// The JSON representation for `UInt64Value` is JSON string.
|
|
80
|
+
message UInt64Value {
|
|
81
|
+
// The uint64 value.
|
|
82
|
+
uint64 value = 1;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
// Wrapper message for `int32`.
|
|
86
|
+
//
|
|
87
|
+
// The JSON representation for `Int32Value` is JSON number.
|
|
88
|
+
message Int32Value {
|
|
89
|
+
// The int32 value.
|
|
90
|
+
int32 value = 1;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
// Wrapper message for `uint32`.
|
|
94
|
+
//
|
|
95
|
+
// The JSON representation for `UInt32Value` is JSON number.
|
|
96
|
+
message UInt32Value {
|
|
97
|
+
// The uint32 value.
|
|
98
|
+
uint32 value = 1;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
// Wrapper message for `bool`.
|
|
102
|
+
//
|
|
103
|
+
// The JSON representation for `BoolValue` is JSON `true` and `false`.
|
|
104
|
+
message BoolValue {
|
|
105
|
+
// The bool value.
|
|
106
|
+
bool value = 1;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
// Wrapper message for `string`.
|
|
110
|
+
//
|
|
111
|
+
// The JSON representation for `StringValue` is JSON string.
|
|
112
|
+
message StringValue {
|
|
113
|
+
// The string value.
|
|
114
|
+
string value = 1;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
// Wrapper message for `bytes`.
|
|
118
|
+
//
|
|
119
|
+
// The JSON representation for `BytesValue` is JSON string.
|
|
120
|
+
message BytesValue {
|
|
121
|
+
// The bytes value.
|
|
122
|
+
bytes value = 1;
|
|
123
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
// Copyright 2015, Google Inc.
|
|
2
|
+
// All rights reserved.
|
|
3
|
+
//
|
|
4
|
+
// Redistribution and use in source and binary forms, with or without
|
|
5
|
+
// modification, are permitted provided that the following conditions are
|
|
6
|
+
// met:
|
|
7
|
+
//
|
|
8
|
+
// * Redistributions of source code must retain the above copyright
|
|
9
|
+
// notice, this list of conditions and the following disclaimer.
|
|
10
|
+
// * Redistributions in binary form must reproduce the above
|
|
11
|
+
// copyright notice, this list of conditions and the following disclaimer
|
|
12
|
+
// in the documentation and/or other materials provided with the
|
|
13
|
+
// distribution.
|
|
14
|
+
// * Neither the name of Google Inc. nor the names of its
|
|
15
|
+
// contributors may be used to endorse or promote products derived from
|
|
16
|
+
// this software without specific prior written permission.
|
|
17
|
+
//
|
|
18
|
+
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
19
|
+
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
20
|
+
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
21
|
+
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
22
|
+
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
23
|
+
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
24
|
+
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
25
|
+
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
26
|
+
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
27
|
+
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
28
|
+
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
29
|
+
|
|
30
|
+
syntax = "proto3";
|
|
31
|
+
|
|
32
|
+
package grpc.health.v1;
|
|
33
|
+
option csharp_namespace = "Grpc.Health.V1";
|
|
34
|
+
|
|
35
|
+
message HealthCheckRequest {
|
|
36
|
+
string service = 1;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
message HealthCheckResponse {
|
|
40
|
+
enum ServingStatus {
|
|
41
|
+
UNKNOWN = 0;
|
|
42
|
+
SERVING = 1;
|
|
43
|
+
NOT_SERVING = 2;
|
|
44
|
+
}
|
|
45
|
+
ServingStatus status = 1;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
service Health {
|
|
49
|
+
rpc Check(HealthCheckRequest) returns (HealthCheckResponse);
|
|
50
|
+
}
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
/// Copyright 2016, Google Inc.
|
|
2
|
+
/// All rights reserved.
|
|
3
|
+
///
|
|
4
|
+
/// Redistribution and use in source and binary forms, with or without
|
|
5
|
+
/// modification, are permitted provided that the following conditions are
|
|
6
|
+
/// met:
|
|
7
|
+
///
|
|
8
|
+
/// * Redistributions of source code must retain the above copyright
|
|
9
|
+
/// notice, this list of conditions and the following disclaimer.
|
|
10
|
+
/// * Redistributions in binary form must reproduce the above
|
|
11
|
+
/// copyright notice, this list of conditions and the following disclaimer
|
|
12
|
+
/// in the documentation and/or other materials provided with the
|
|
13
|
+
/// distribution.
|
|
14
|
+
/// * Neither the name of Google Inc. nor the names of its
|
|
15
|
+
/// contributors may be used to endorse or promote products derived from
|
|
16
|
+
/// this software without specific prior written permission.
|
|
17
|
+
///
|
|
18
|
+
/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
19
|
+
/// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
20
|
+
/// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
21
|
+
/// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
22
|
+
/// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
23
|
+
/// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
24
|
+
/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
25
|
+
/// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
26
|
+
/// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
27
|
+
/// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
28
|
+
/// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
29
|
+
|
|
30
|
+
/// Service exported by server reflection
|
|
31
|
+
|
|
32
|
+
syntax = "proto3";
|
|
33
|
+
|
|
34
|
+
package grpc.reflection.v1alpha;
|
|
35
|
+
|
|
36
|
+
service ServerReflection {
|
|
37
|
+
/// The reflection service is structured as a bidirectional stream, ensuring
|
|
38
|
+
/// all related requests go to a single server.
|
|
39
|
+
rpc ServerReflectionInfo(stream ServerReflectionRequest)
|
|
40
|
+
returns (stream ServerReflectionResponse);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/// The message sent by the client when calling ServerReflectionInfo method.
|
|
44
|
+
message ServerReflectionRequest {
|
|
45
|
+
string host = 1;
|
|
46
|
+
/// To use reflection service, the client should set one of the following
|
|
47
|
+
/// fields in message_request. The server distinguishes requests by their
|
|
48
|
+
/// defined field and then handles them using corresponding methods.
|
|
49
|
+
oneof message_request {
|
|
50
|
+
/// Find a proto file by the file name.
|
|
51
|
+
string file_by_filename = 3;
|
|
52
|
+
|
|
53
|
+
/// Find the proto file that declares the given fully-qualified symbol name.
|
|
54
|
+
/// This field should be a fully-qualified symbol name
|
|
55
|
+
/// (e.g. <package>.<service>[.<method>] or <package>.<type>).
|
|
56
|
+
string file_containing_symbol = 4;
|
|
57
|
+
|
|
58
|
+
/// Find the proto file which defines an extension extending the given
|
|
59
|
+
/// message type with the given field number.
|
|
60
|
+
ExtensionRequest file_containing_extension = 5;
|
|
61
|
+
|
|
62
|
+
/// Finds the tag numbers used by all known extensions of extendee_type, and
|
|
63
|
+
/// appends them to ExtensionNumberResponse in an undefined order.
|
|
64
|
+
/// Its corresponding method is best-effort: it's not guaranteed that the
|
|
65
|
+
/// reflection service will implement this method, and it's not guaranteed
|
|
66
|
+
/// that this method will provide all extensions. Returns
|
|
67
|
+
/// StatusCode::UNIMPLEMENTED if it's not implemented.
|
|
68
|
+
/// This field should be a fully-qualified type name. The format is
|
|
69
|
+
/// <package>.<type>
|
|
70
|
+
string all_extension_numbers_of_type = 6;
|
|
71
|
+
|
|
72
|
+
/// List the full names of registered services. The content will not be
|
|
73
|
+
/// checked.
|
|
74
|
+
string list_services = 7;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/// The type name and extension number sent by the client when requesting
|
|
79
|
+
/// file_containing_extension.
|
|
80
|
+
message ExtensionRequest {
|
|
81
|
+
/// Fully-qualified type name. The format should be <package>.<type>
|
|
82
|
+
string containing_type = 1;
|
|
83
|
+
int32 extension_number = 2;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/// The message sent by the server to answer ServerReflectionInfo method.
|
|
87
|
+
message ServerReflectionResponse {
|
|
88
|
+
string valid_host = 1;
|
|
89
|
+
ServerReflectionRequest original_request = 2;
|
|
90
|
+
/// The server set one of the following fields accroding to the message_request
|
|
91
|
+
/// in the request.
|
|
92
|
+
oneof message_response {
|
|
93
|
+
/// This message is used to answer file_by_filename, file_containing_symbol,
|
|
94
|
+
/// file_containing_extension requests with transitive dependencies. As
|
|
95
|
+
/// the repeated label is not allowed in oneof fields, we use a
|
|
96
|
+
/// FileDescriptorResponse message to encapsulate the repeated fields.
|
|
97
|
+
/// The reflection service is allowed to avoid sending FileDescriptorProtos
|
|
98
|
+
/// that were previously sent in response to earlier requests in the stream.
|
|
99
|
+
FileDescriptorResponse file_descriptor_response = 4;
|
|
100
|
+
|
|
101
|
+
/// This message is used to answer all_extension_numbers_of_type requst.
|
|
102
|
+
ExtensionNumberResponse all_extension_numbers_response = 5;
|
|
103
|
+
|
|
104
|
+
/// This message is used to answer list_services request.
|
|
105
|
+
ListServiceResponse list_services_response = 6;
|
|
106
|
+
|
|
107
|
+
/// This message is used when an error occurs.
|
|
108
|
+
ErrorResponse error_response = 7;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/// Serialized FileDescriptorProto messages sent by the server answering
|
|
113
|
+
/// a file_by_filename, file_containing_symbol, or file_containing_extension
|
|
114
|
+
/// request.
|
|
115
|
+
message FileDescriptorResponse {
|
|
116
|
+
/// Serialized FileDescriptorProto messages. We avoid taking a dependency on
|
|
117
|
+
/// descriptor.proto, which uses proto2 only features, by making them opaque
|
|
118
|
+
/// bytes instead.
|
|
119
|
+
repeated bytes file_descriptor_proto = 1;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/// A list of extension numbers sent by the server answering
|
|
123
|
+
/// all_extension_numbers_of_type request.
|
|
124
|
+
message ExtensionNumberResponse {
|
|
125
|
+
/// Full name of the base type, including the package name. The format
|
|
126
|
+
/// is <package>.<type>
|
|
127
|
+
string base_type_name = 1;
|
|
128
|
+
repeated int32 extension_number = 2;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/// A list of ServiceResponse sent by the server answering list_services request.
|
|
132
|
+
message ListServiceResponse {
|
|
133
|
+
/// The information of each service may be expanded in the future, so we use
|
|
134
|
+
/// ServiceResponse message to encapsulate it.
|
|
135
|
+
repeated ServiceResponse service = 1;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
/// The information of a single service used by ListServiceResponse to answer
|
|
139
|
+
/// list_services request.
|
|
140
|
+
message ServiceResponse {
|
|
141
|
+
/// Full name of a registered service, including its package name. The format
|
|
142
|
+
/// is <package>.<service>
|
|
143
|
+
string name = 1;
|
|
144
|
+
// Added a label to map for the service name, since the same service name
|
|
145
|
+
// could be used across multiple services.
|
|
146
|
+
string label = 2;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/// The error code and error message sent by the server when an error occurs.
|
|
150
|
+
message ErrorResponse {
|
|
151
|
+
/// This field uses the error codes defined in grpc::StatusCode.
|
|
152
|
+
int32 error_code = 1;
|
|
153
|
+
string error_message = 2;
|
|
154
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package io.restorecommerce.access_control;
|
|
4
|
+
|
|
5
|
+
import "google/protobuf/any.proto";
|
|
6
|
+
import "io/restorecommerce/rule.proto";
|
|
7
|
+
import "io/restorecommerce/policy_set.proto";
|
|
8
|
+
import "io/restorecommerce/status.proto";
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Access control service interface.
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
message Request {
|
|
15
|
+
io.restorecommerce.rule.Target target = 1;
|
|
16
|
+
// generic data structure which can be provided
|
|
17
|
+
// to a contextQuery (see io/restorecommerce/rule.proto)
|
|
18
|
+
Context context = 2;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
message Context {
|
|
22
|
+
google.protobuf.Any subject = 1;
|
|
23
|
+
repeated google.protobuf.Any resources = 2;
|
|
24
|
+
google.protobuf.Any security = 3;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
message Response {
|
|
28
|
+
enum Decision {
|
|
29
|
+
PERMIT = 0;
|
|
30
|
+
DENY = 1;
|
|
31
|
+
NOT_APPLICABLE = 2;
|
|
32
|
+
INDETERMINATE = 3;
|
|
33
|
+
}
|
|
34
|
+
Decision decision = 1;
|
|
35
|
+
string obligation = 2;
|
|
36
|
+
bool evaluation_cacheable = 3;
|
|
37
|
+
io.restorecommerce.status.OperationStatus operation_status = 4;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
message ReverseQuery {
|
|
41
|
+
repeated io.restorecommerce.policy_set.PolicySetRQ policy_sets = 1;
|
|
42
|
+
io.restorecommerce.status.OperationStatus operation_status = 2;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
service Service {
|
|
46
|
+
rpc IsAllowed (Request) returns (Response);
|
|
47
|
+
rpc WhatIsAllowed(Request) returns (ReverseQuery);
|
|
48
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package io.restorecommerce.address;
|
|
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
|
+
/*
|
|
11
|
+
* Microservice definition.
|
|
12
|
+
*/
|
|
13
|
+
service Service {
|
|
14
|
+
rpc Read (io.restorecommerce.resourcebase.ReadRequest) returns (AddressListResponse);
|
|
15
|
+
rpc Create (AddressList) returns (AddressListResponse);
|
|
16
|
+
rpc Delete (io.restorecommerce.resourcebase.DeleteRequest) returns (io.restorecommerce.resourcebase.DeleteResponse);
|
|
17
|
+
rpc Update (AddressList) returns (AddressListResponse);
|
|
18
|
+
rpc Upsert (AddressList) returns (AddressListResponse);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
message Deleted {
|
|
22
|
+
string id = 1;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
message AddressList {
|
|
26
|
+
repeated Address items = 1;
|
|
27
|
+
uint32 total_count = 2;
|
|
28
|
+
io.restorecommerce.auth.Subject subject = 3;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
message AddressListResponse {
|
|
32
|
+
repeated AddressResponse items = 1;
|
|
33
|
+
uint32 total_count = 2;
|
|
34
|
+
io.restorecommerce.status.OperationStatus operation_status = 3;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
message AddressResponse {
|
|
38
|
+
Address payload = 1;
|
|
39
|
+
io.restorecommerce.status.Status status = 2;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
message Address {
|
|
43
|
+
message GeoPoint {
|
|
44
|
+
double latitude = 1;
|
|
45
|
+
double longitude = 2;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
string id = 1;
|
|
49
|
+
io.restorecommerce.meta.Meta meta = 2;
|
|
50
|
+
string postcode = 3;
|
|
51
|
+
string country_id = 4;
|
|
52
|
+
string locality = 5;
|
|
53
|
+
string street = 6;
|
|
54
|
+
string region = 7;
|
|
55
|
+
|
|
56
|
+
GeoPoint geo_coordinates = 8;
|
|
57
|
+
double altitude = 9;
|
|
58
|
+
string building_number = 10;
|
|
59
|
+
AddressAddition address_addition = 11;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
message AddressAddition {
|
|
63
|
+
string field1 = 1;
|
|
64
|
+
string field2 = 2;
|
|
65
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package io.restorecommerce.auth;
|
|
4
|
+
import "io/restorecommerce/attribute.proto";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Subject of creating User
|
|
8
|
+
*/
|
|
9
|
+
message Subject {
|
|
10
|
+
string id = 1; // user id
|
|
11
|
+
string scope = 2; // target scope
|
|
12
|
+
repeated RoleAssociation role_associations = 3; // role_associations of user creating the user
|
|
13
|
+
repeated HierarchicalScope hierarchical_scopes = 4; // HR scope of user creating the User
|
|
14
|
+
bool unauthenticated = 5; // for unauthenticated context
|
|
15
|
+
string token = 6;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
message Tokens {
|
|
19
|
+
string name = 1; // token name
|
|
20
|
+
double expires_in = 2; // expiration date for token
|
|
21
|
+
string token = 3; // token
|
|
22
|
+
repeated string scopes = 4; // identifier for role_association
|
|
23
|
+
string type = 5; // type of token eg: access_token, refresh_token
|
|
24
|
+
bool interactive = 6;
|
|
25
|
+
double last_login = 7;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
message HierarchicalScope {
|
|
29
|
+
string id = 1; // root node
|
|
30
|
+
repeated HierarchicalScope children = 2; // children nodes
|
|
31
|
+
string role = 3; // role identifier associated with root node scope
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
message RoleAssociation {
|
|
35
|
+
string role = 1; // role ID
|
|
36
|
+
repeated io.restorecommerce.attribute.Attribute attributes = 2; // useful attributes for RBAC/ABAC like organizational scope
|
|
37
|
+
string id = 3; // identifier for role_association
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
message HierarchicalScopesRequest {
|
|
41
|
+
string token = 1;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
message HierarchicalScopesResponse {
|
|
45
|
+
string subject_id = 1;
|
|
46
|
+
repeated HierarchicalScope hierarchical_scopes = 2;
|
|
47
|
+
string token = 3;
|
|
48
|
+
}
|