@restorecommerce/protos 2.0.1 → 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.
Files changed (53) hide show
  1. package/CHANGELOG.md +336 -0
  2. package/google/protobuf/timestamp.proto +147 -0
  3. package/io/restorecommerce/access_control.proto +1 -3
  4. package/io/restorecommerce/address.proto +38 -37
  5. package/io/restorecommerce/attribute.proto +3 -3
  6. package/io/restorecommerce/auth.proto +15 -15
  7. package/io/restorecommerce/authentication_log.proto +12 -14
  8. package/io/restorecommerce/command.proto +10 -12
  9. package/io/restorecommerce/commandinterface.proto +4 -3
  10. package/io/restorecommerce/contact_point.proto +11 -13
  11. package/io/restorecommerce/contact_point_type.proto +5 -7
  12. package/io/restorecommerce/country.proto +7 -9
  13. package/io/restorecommerce/credential.proto +9 -9
  14. package/io/restorecommerce/customer.proto +9 -11
  15. package/io/restorecommerce/file.proto +23 -0
  16. package/io/restorecommerce/fulfillment.proto +87 -104
  17. package/io/restorecommerce/fulfillment_courier.proto +15 -17
  18. package/io/restorecommerce/fulfillment_product.proto +44 -47
  19. package/io/restorecommerce/geometry.proto +23 -0
  20. package/io/restorecommerce/graph.proto +10 -10
  21. package/io/restorecommerce/image.proto +13 -12
  22. package/io/restorecommerce/invoice.proto +47 -49
  23. package/io/restorecommerce/job.proto +43 -45
  24. package/io/restorecommerce/locale.proto +6 -8
  25. package/io/restorecommerce/location.proto +11 -13
  26. package/io/restorecommerce/manufacturer.proto +6 -8
  27. package/io/restorecommerce/meta.proto +3 -3
  28. package/io/restorecommerce/notification.proto +8 -10
  29. package/io/restorecommerce/notification_channel.proto +6 -6
  30. package/io/restorecommerce/notification_req.proto +16 -16
  31. package/io/restorecommerce/oauth.proto +1 -1
  32. package/io/restorecommerce/order.proto +65 -72
  33. package/io/restorecommerce/organization.proto +15 -17
  34. package/io/restorecommerce/ostorage.proto +28 -30
  35. package/io/restorecommerce/payment.proto +32 -34
  36. package/io/restorecommerce/payment_method.proto +7 -7
  37. package/io/restorecommerce/policy.proto +16 -18
  38. package/io/restorecommerce/policy_set.proto +12 -14
  39. package/io/restorecommerce/price_group.proto +6 -8
  40. package/io/restorecommerce/product.proto +146 -48
  41. package/io/restorecommerce/product_category.proto +10 -12
  42. package/io/restorecommerce/product_prototype.proto +8 -10
  43. package/io/restorecommerce/resource_base.proto +15 -15
  44. package/io/restorecommerce/role.proto +6 -8
  45. package/io/restorecommerce/rule.proto +18 -20
  46. package/io/restorecommerce/search.proto +3 -5
  47. package/io/restorecommerce/status.proto +13 -8
  48. package/io/restorecommerce/tax.proto +13 -10
  49. package/io/restorecommerce/tax_type.proto +13 -9
  50. package/io/restorecommerce/timezone.proto +5 -7
  51. package/io/restorecommerce/token.proto +11 -13
  52. package/io/restorecommerce/user.proto +45 -48
  53. package/package.json +2 -2
package/CHANGELOG.md CHANGED
@@ -3,6 +3,342 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [3.0.0](https://github.com/restorecommerce/libs/compare/@restorecommerce/protos@2.0.2...@restorecommerce/protos@3.0.0) (2023-05-22)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **address, fulfillment, product:** fix naming and complete fulfillment calls ([5c720e6](https://github.com/restorecommerce/libs/commit/5c720e67ddbbe21875029b9c3d0d5f6589746401))
12
+ * **facade:** renamed service in protos and removed service names options from proto files, fixed typing issues. ([25a24f0](https://github.com/restorecommerce/libs/commit/25a24f063e2499c06c171f1265297500816879f2))
13
+ * **generated src:** re-generate ts.prototypes after merge! ([46d9f26](https://github.com/restorecommerce/libs/commit/46d9f26a2457e2dc1d2b8eb1b59d76da60ca2643))
14
+ * **protos:** Added optional fields for request object ([e1374fd](https://github.com/restorecommerce/libs/commit/e1374fd90dddb16c109f4353efdfec995b526b69))
15
+ * **protos:** Added optional fields for request object ([ba0f6bb](https://github.com/restorecommerce/libs/commit/ba0f6bb4d031b1838d44f480ea242efa352c4923))
16
+ * **protos:** removed self reference Attribute from proto file ([4346cc5](https://github.com/restorecommerce/libs/commit/4346cc5997bafc429a7229ed0471a6e84bd169c4))
17
+ * **protos:** restore nested attribute as its referenced in obligation masked properties in ACS ([d6536f9](https://github.com/restorecommerce/libs/commit/d6536f96dfc30eb1905c899af519d50778e2edee))
18
+ * **rc-grpc-clients, facade:** WIP optional fields ([98f0977](https://github.com/restorecommerce/libs/commit/98f097730503bd0fa021bc886ba55d477dafb89f))
19
+
20
+
21
+ * Feature/product appendix (#48) ([cb00636](https://github.com/restorecommerce/libs/commit/cb00636d6c98286e2fd923b229ab950f6201c760)), closes [#48](https://github.com/restorecommerce/libs/issues/48)
22
+ * Integration (rebased) (#47) ([718fa5f](https://github.com/restorecommerce/libs/commit/718fa5f8edfc56e2968c0cb3704eda2855fdee0c)), closes [#47](https://github.com/restorecommerce/libs/issues/47)
23
+
24
+
25
+ ### BREAKING CHANGES
26
+
27
+ * Fixing service names, remove Identifier, add autoresolvers
28
+
29
+ commit 29d59c01a8114e2525101432649dcf2130e4c285
30
+ Author: Gerald Baulig <gerald.baulig@n-fuse.co>
31
+ Date: Thu May 4 14:11:26 2023 +0200
32
+
33
+ fix package.json typo
34
+
35
+ commit 1b6cf98744114f7597e1e251860c5c6665225693
36
+ Author: Gerald Baulig <gerald.baulig@n-fuse.co>
37
+ Date: Thu May 4 14:04:48 2023 +0200
38
+
39
+ remove experimental index.ts for generated code
40
+
41
+ commit f3ef433341cbf757945f2380620e21463a345f9b
42
+ Author: Gerald Baulig <gerald.baulig@n-fuse.co>
43
+ Date: Thu May 4 14:04:06 2023 +0200
44
+
45
+ remove experimental index.ts for generated code
46
+
47
+ commit 0d9949dab1c6f577100ab0a18f32174ecfa76580
48
+ Author: Gerald Baulig <gerald.baulig@n-fuse.co>
49
+ Date: Thu May 4 13:55:50 2023 +0200
50
+
51
+ order CancelRequestList not required
52
+
53
+ commit 0379566af99f2e4eed1c843b7d622a20adc1777b
54
+ Author: Gerald Baulig <gerald.baulig@n-fuse.co>
55
+ Date: Thu May 4 13:03:08 2023 +0200
56
+
57
+ regenerate prototypes
58
+
59
+ commit efe2c06a323b99471c69f04d2e05cfc4e85bb3ff
60
+ Author: Gerald Baulig <gerald.baulig@n-fuse.co>
61
+ Date: Thu May 4 13:03:08 2023 +0200
62
+
63
+ feat(fulfillment, ordering and products): finalization of protos for fulfillment and ordering
64
+
65
+ Refactoreing of Product, Fulfillment, Ordering and Address Protos for a successful integration of
66
+ all services.
67
+ * - Products now differentiate to physical or virtual nature
68
+
69
+ commit 426e85a5782e7138b8d8c9ab61e9184be3c0f309
70
+ Author: Gerald Baulig <gerald.baulig@n-fuse.co>
71
+ Date: Thu May 4 13:03:08 2023 +0200
72
+
73
+ protos before merge
74
+
75
+ commit 504707f08a6f18bf4d081e4880c6cd2d7556d018
76
+ Author: Gerald Baulig <gerald.baulig@n-fuse.co>
77
+ Date: Thu May 4 13:03:08 2023 +0200
78
+
79
+ remove experimental units
80
+
81
+ commit 4880826237c0c14bf63feee427d0e066c21176b0
82
+ Author: Gerald Baulig <gerald.baulig@n-fuse.co>
83
+ Date: Thu May 4 13:03:08 2023 +0200
84
+
85
+ units!
86
+
87
+ commit fef2fc9542d465d9c92cfa1ffedcd4b374f052b0
88
+ Author: Gerald Baulig <gerald.baulig@n-fuse.co>
89
+ Date: Thu May 4 13:03:08 2023 +0200
90
+
91
+ generate rc-grpc-client form local protos
92
+
93
+ commit 70e72a1631662485d1a32bf9fc8da1b6c9d0039b
94
+ Author: Gerald Baulig <gerald.baulig@n-fuse.co>
95
+ Date: Thu May 4 13:03:08 2023 +0200
96
+
97
+ reverse ServiceImplementation to ServiceServiceImplementation, regenerate client and server source
98
+
99
+ commit ff3def942963747dcf82a24422a98a9833744573
100
+ Author: Gerald Baulig <gerald.baulig@n-fuse.co>
101
+ Date: Thu May 4 13:02:03 2023 +0200
102
+
103
+ merge master into integration
104
+
105
+ commit b520dba15d31b958edc30b7c912edcaa5e644e8c
106
+ Author: Gerald Baulig <gerald.baulig@n-fuse.co>
107
+ Date: Thu May 4 12:59:26 2023 +0200
108
+
109
+ feat(virtual and physical products): virtual and Physical Products
110
+
111
+ Products are now differentiated as virtual or physical products by a oneof in product.nature
112
+ * Variants of the product are now in product.nature.physical.variants, for virual
113
+ likewise
114
+
115
+ commit 736427b382d30434b7e7c5729817c8ecd6905e8c
116
+ Author: Gerald Baulig <gerald.baulig@n-fuse.co>
117
+ Date: Thu May 4 12:57:44 2023 +0200
118
+
119
+ fix rebase mistakes
120
+
121
+ commit 700cba9f3cedcecdf74572c738d636974e705bc4
122
+ Author: Gerald Baulig <gerald.baulig@n-fuse.co>
123
+ Date: Thu May 4 12:57:44 2023 +0200
124
+
125
+ feat(fulfillment-srv, ordering-srv): integration
126
+
127
+ Adjustments of protos for fulfillment, ordering and products according to system integration
128
+ * Significant changes of naming and structure in proto files
129
+
130
+ commit 72c6103cef3eac64bfb7df9dfbe7ea673f7b5ec5
131
+ Author: Gerald Baulig <gerald.baulig@n-fuse.co>
132
+ Date: Thu May 4 12:57:44 2023 +0200
133
+
134
+ integration
135
+
136
+ commit 2a9f2411e299248d83ce59b599a79c4780c78dbf
137
+ Author: Gerald Baulig <gerald.baulig@n-fuse.co>
138
+ Date: Thu May 4 12:52:32 2023 +0200
139
+
140
+ refinement order.proto and fulfillment.proto for integration tests
141
+
142
+ commit 79d7f5d249b41fce93083cea36220efa8a82a43b
143
+ Author: Thomas Hoppe <thomas.hoppe@n-fuse.co>
144
+ Date: Thu May 4 12:52:32 2023 +0200
145
+
146
+ merge
147
+
148
+ commit fdc1cceaf347b6cccf9ce6ad3f53ac94662957a8
149
+ Author: Martin <martin.yankov@n-fuse.co>
150
+ Date: Thu May 4 12:42:45 2023 +0200
151
+
152
+ fix: failed unit tests
153
+
154
+ commit 35baca9dd7860cc7f3695a7b875ae082293644c3
155
+ Author: Martin <martin.yankov@n-fuse.co>
156
+ Date: Thu May 4 12:42:45 2023 +0200
157
+
158
+ add new line
159
+
160
+ commit b6a2e5cacd72c76b40fe04402db39e678d945d8d
161
+ Author: Martin <martin.yankov@n-fuse.co>
162
+ Date: Thu May 4 12:42:45 2023 +0200
163
+
164
+ removed: unnused packages
165
+
166
+ commit f38eab382fc437199ba738e5a4e49d6ccc775a14
167
+ Author: Martin <martin.yankov@n-fuse.co>
168
+ Date: Thu May 4 12:42:45 2023 +0200
169
+
170
+ removed: getTokenForRequest
171
+
172
+ commit c78bc1bdc05373196be540c1d39c287b3614c7b7
173
+ Author: Martin <martin.yankov@n-fuse.co>
174
+ Date: Thu May 4 12:42:45 2023 +0200
175
+
176
+ fixed: unknown type error
177
+
178
+ commit 1a35d3f9512e04c6a046f8fdcc819badf8f20abc
179
+ Author: Martin <martin.yankov@n-fuse.co>
180
+ Date: Thu May 4 12:42:45 2023 +0200
181
+
182
+ koaMiddleware
183
+
184
+ commit 6dfa4c597d2c0ed8e2155952f7f7e423ec03d001
185
+ Author: Martin <martin.yankov@n-fuse.co>
186
+ Date: Thu May 4 12:42:45 2023 +0200
187
+
188
+ changes for ApolloServer 4 migration
189
+
190
+ commit d3a828f5529f77901ba30ca1379a742b5b95aed0
191
+ Author: Martin <martin.yankov@n-fuse.co>
192
+ Date: Thu May 4 12:42:45 2023 +0200
193
+
194
+ chore: upgrade Apollo Server 4
195
+
196
+ commit b78164619c185b695fdf95104799f294d76939a4
197
+ Author: Gerald Baulig <gerald.baulig@n-fuse.co>
198
+ Date: Thu May 4 12:37:51 2023 +0200
199
+
200
+ regenerate rc-qrpc-client
201
+
202
+ commit 98933a41c1844de517baea5099afe95794445652
203
+ Author: Gerald Baulig <gerald.baulig@n-fuse.co>
204
+ Date: Thu May 4 12:34:56 2023 +0200
205
+
206
+ feat(fulfillment-srv, ordering-srv): integration
207
+
208
+ Adjustments of protos for fulfillment, ordering and products according to system integration
209
+ * Significant changes of naming and structure in proto files
210
+
211
+ commit 9d52ddcc030c67f620649d823748dbf2c846d798
212
+ Author: Gerald Baulig <gerald.baulig@n-fuse.co>
213
+ Date: Thu May 4 12:33:51 2023 +0200
214
+
215
+ integration
216
+
217
+ commit 033e6dd6f9e4f3809100bd50843393b8d4bce8f2
218
+ Author: Gerald Baulig <gerald.baulig@n-fuse.co>
219
+ Date: Thu May 4 12:30:13 2023 +0200
220
+
221
+ fulfillment protos final
222
+
223
+ commit 324e81a5bf20176801a679a19a8f120c581bd23e
224
+ Author: Gerald Baulig <gerald.baulig@n-fuse.co>
225
+ Date: Thu May 4 12:30:13 2023 +0200
226
+
227
+ fulfillment protos final?
228
+
229
+ commit 3352058e9a62c3fbd1104b69bfb9fbdd5e2670ec
230
+ Author: Gerald Baulig <gerald.baulig@n-fuse.co>
231
+ Date: Thu May 4 12:25:57 2023 +0200
232
+
233
+ persistent address
234
+
235
+ commit 14dab0e4bfd6a17af2b45f0be6a8e1719f0370b8
236
+ Author: Gerald Baulig <gerald.baulig@n-fuse.co>
237
+ Date: Thu May 4 12:24:21 2023 +0200
238
+
239
+ oneof resolver
240
+
241
+ commit 22eca03374745b73f1a26b94d1d5dd09e87e27cb
242
+ Author: Gerald Baulig <gerald.baulig@n-fuse.co>
243
+ Date: Thu May 4 12:22:53 2023 +0200
244
+
245
+ add submit fulfillment
246
+
247
+ commit 1a626529635f6167f8519e07208ec1ccdae34e33
248
+ Author: Gerald Baulig <gerald.baulig@n-fuse.co>
249
+ Date: Thu May 4 12:17:55 2023 +0200
250
+
251
+ refinement order.proto and fulfillment.proto for integration tests
252
+
253
+ * refactor(rename productappendix to file): rename productApenndix to file
254
+
255
+ ProductAppendix -> File
256
+
257
+ * fix(product.proto): import file.proto
258
+
259
+ import file.proto
260
+ * Significant changes of naming and structure in proto files
261
+
262
+ * regenerate rc-qrpc-client
263
+
264
+ * chore: upgrade Apollo Server 4
265
+
266
+ * changes for ApolloServer 4 migration
267
+
268
+ * koaMiddleware
269
+
270
+ * fixed: unknown type error
271
+
272
+ * removed: getTokenForRequest
273
+
274
+ * removed: unnused packages
275
+
276
+ * add new line
277
+
278
+ * fix: failed unit tests
279
+
280
+ * merge
281
+
282
+ * refinement order.proto and fulfillment.proto for integration tests
283
+
284
+ * integration
285
+
286
+ * feat(fulfillment-srv, ordering-srv): integration
287
+
288
+ Adjustments of protos for fulfillment, ordering and products according to system integration
289
+ * Significant changes of naming and structure in proto files
290
+
291
+ * fix rebase mistakes
292
+
293
+ * feat(virtual and physical products): virtual and Physical Products
294
+
295
+ Products are now differentiated as virtual or physical products by a oneof in product.nature
296
+ * Variants of the product are now in product.nature.physical.variants, for virual
297
+ likewise
298
+
299
+ * merge master into integration
300
+
301
+ * reverse ServiceImplementation to ServiceServiceImplementation, regenerate client and server source
302
+
303
+ * generate rc-grpc-client form local protos
304
+
305
+ * units!
306
+
307
+ * remove experimental units
308
+
309
+ * protos before merge
310
+
311
+ * feat(fulfillment, ordering and products): finalization of protos for fulfillment and ordering
312
+
313
+ Refactoreing of Product, Fulfillment, Ordering and Address Protos for a successful integration of
314
+ all services.
315
+ * - Products now differentiate to physical or virtual nature
316
+
317
+ * regenerate prototypes
318
+
319
+ * order CancelRequestList not required
320
+
321
+ * remove experimental index.ts for generated code
322
+
323
+ * remove experimental index.ts for generated code
324
+
325
+ * fix package.json typo
326
+
327
+
328
+
329
+
330
+
331
+ ## [2.0.2](https://github.com/restorecommerce/libs/compare/@restorecommerce/protos@2.0.1...@restorecommerce/protos@2.0.2) (2022-11-16)
332
+
333
+
334
+ ### Bug Fixes
335
+
336
+ * command import ([fcbb6c1](https://github.com/restorecommerce/libs/commit/fcbb6c15b708fc63bf38d0dfa65946731cef3e79))
337
+
338
+
339
+
340
+
341
+
6
342
  ## [2.0.1](https://github.com/restorecommerce/libs/compare/@restorecommerce/protos@2.0.0...@restorecommerce/protos@2.0.1) (2022-10-14)
7
343
 
8
344
 
@@ -0,0 +1,147 @@
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 cc_enable_arenas = true;
37
+ option go_package = "google.golang.org/protobuf/types/known/timestamppb";
38
+ option java_package = "com.google.protobuf";
39
+ option java_outer_classname = "TimestampProto";
40
+ option java_multiple_files = true;
41
+ option objc_class_prefix = "GPB";
42
+
43
+ // A Timestamp represents a point in time independent of any time zone or local
44
+ // calendar, encoded as a count of seconds and fractions of seconds at
45
+ // nanosecond resolution. The count is relative to an epoch at UTC midnight on
46
+ // January 1, 1970, in the proleptic Gregorian calendar which extends the
47
+ // Gregorian calendar backwards to year one.
48
+ //
49
+ // All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap
50
+ // second table is needed for interpretation, using a [24-hour linear
51
+ // smear](https://developers.google.com/time/smear).
52
+ //
53
+ // The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By
54
+ // restricting to that range, we ensure that we can convert to and from [RFC
55
+ // 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings.
56
+ //
57
+ // # Examples
58
+ //
59
+ // Example 1: Compute Timestamp from POSIX `time()`.
60
+ //
61
+ // Timestamp timestamp;
62
+ // timestamp.set_seconds(time(NULL));
63
+ // timestamp.set_nanos(0);
64
+ //
65
+ // Example 2: Compute Timestamp from POSIX `gettimeofday()`.
66
+ //
67
+ // struct timeval tv;
68
+ // gettimeofday(&tv, NULL);
69
+ //
70
+ // Timestamp timestamp;
71
+ // timestamp.set_seconds(tv.tv_sec);
72
+ // timestamp.set_nanos(tv.tv_usec * 1000);
73
+ //
74
+ // Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`.
75
+ //
76
+ // FILETIME ft;
77
+ // GetSystemTimeAsFileTime(&ft);
78
+ // UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;
79
+ //
80
+ // // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
81
+ // // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
82
+ // Timestamp timestamp;
83
+ // timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
84
+ // timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));
85
+ //
86
+ // Example 4: Compute Timestamp from Java `System.currentTimeMillis()`.
87
+ //
88
+ // long millis = System.currentTimeMillis();
89
+ //
90
+ // Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
91
+ // .setNanos((int) ((millis % 1000) * 1000000)).build();
92
+ //
93
+ //
94
+ // Example 5: Compute Timestamp from Java `Instant.now()`.
95
+ //
96
+ // Instant now = Instant.now();
97
+ //
98
+ // Timestamp timestamp =
99
+ // Timestamp.newBuilder().setSeconds(now.getEpochSecond())
100
+ // .setNanos(now.getNano()).build();
101
+ //
102
+ //
103
+ // Example 6: Compute Timestamp from current time in Python.
104
+ //
105
+ // timestamp = Timestamp()
106
+ // timestamp.GetCurrentTime()
107
+ //
108
+ // # JSON Mapping
109
+ //
110
+ // In JSON format, the Timestamp type is encoded as a string in the
111
+ // [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the
112
+ // format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z"
113
+ // where {year} is always expressed using four digits while {month}, {day},
114
+ // {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional
115
+ // seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution),
116
+ // are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone
117
+ // is required. A proto3 JSON serializer should always use UTC (as indicated by
118
+ // "Z") when printing the Timestamp type and a proto3 JSON parser should be
119
+ // able to accept both UTC and other timezones (as indicated by an offset).
120
+ //
121
+ // For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past
122
+ // 01:30 UTC on January 15, 2017.
123
+ //
124
+ // In JavaScript, one can convert a Date object to this format using the
125
+ // standard
126
+ // [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)
127
+ // method. In Python, a standard `datetime.datetime` object can be converted
128
+ // to this format using
129
+ // [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with
130
+ // the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use
131
+ // the Joda Time's [`ISODateTimeFormat.dateTime()`](
132
+ // http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D
133
+ // ) to obtain a formatter capable of generating timestamps in this format.
134
+ //
135
+ //
136
+ message Timestamp {
137
+ // Represents seconds of UTC time since Unix epoch
138
+ // 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
139
+ // 9999-12-31T23:59:59Z inclusive.
140
+ int64 seconds = 1;
141
+
142
+ // Non-negative fractions of a second at nanosecond resolution. Negative
143
+ // second values with fractions must still have non-negative nanos values
144
+ // that count forward in time. Must be from 0 to 999,999,999
145
+ // inclusive.
146
+ int32 nanos = 2;
147
+ }
@@ -45,9 +45,7 @@ message ReverseQuery {
45
45
  io.restorecommerce.status.OperationStatus operation_status = 3;
46
46
  }
47
47
 
48
- service Service {
49
- option (io.restorecommerce.options.service_name) = "access_control";
50
-
48
+ service AccessControlService {
51
49
  rpc IsAllowed (Request) returns (Response) {
52
50
  option (io.restorecommerce.options.is_query) = true;
53
51
  };
@@ -14,9 +14,7 @@ import "io/restorecommerce/country.proto";
14
14
  /*
15
15
  * Microservice definition.
16
16
  */
17
- service Service {
18
- option (io.restorecommerce.options.service_name) = "address";
19
-
17
+ service AddressService {
20
18
  rpc Read (io.restorecommerce.resourcebase.ReadRequest) returns (AddressListResponse) {
21
19
  option (io.restorecommerce.options.is_query) = true;
22
20
  };
@@ -32,7 +30,7 @@ message Deleted {
32
30
 
33
31
  message AddressList {
34
32
  repeated Address items = 1;
35
- uint32 total_count = 2;
33
+ optional uint32 total_count = 2;
36
34
  io.restorecommerce.auth.Subject subject = 3;
37
35
  }
38
36
 
@@ -48,46 +46,37 @@ message AddressResponse {
48
46
  }
49
47
 
50
48
  message GeoPoint {
51
- double latitude = 1;
52
- double longitude = 2;
49
+ optional double latitude = 1;
50
+ optional double longitude = 2;
53
51
  }
54
52
 
55
53
  message AddressAddition {
56
- string field1 = 1;
57
- string field2 = 2;
54
+ optional string field1 = 1;
55
+ optional string field2 = 2;
58
56
  }
59
57
 
60
58
  message BusinessAddress {
61
- string name = 1;
59
+ optional string name = 1;
62
60
  }
63
61
 
64
62
  message ResidentialAddress {
65
- string title = 1;
66
- string given_name = 2;
67
- string mid_name = 3;
68
- string family_name = 4;
63
+ optional string title = 1;
64
+ optional string given_name = 2;
65
+ optional string mid_name = 3;
66
+ optional string family_name = 4;
69
67
  }
70
68
 
71
69
  message PackStation {
72
- string provider = 1;
73
- string station_number = 2;
74
- string post_number = 3;
75
- }
76
-
77
- /**
78
- Uses by Order-Srv and Fulfillment-Srv
79
- **/
80
- message ContactPerson {
81
- string name = 1;
82
- string email = 2;
83
- string phone = 3;
70
+ optional string provider = 1;
71
+ optional string station_number = 2;
72
+ optional string post_number = 3;
84
73
  }
85
74
 
86
75
  message Address {
87
- string id = 1;
88
- io.restorecommerce.meta.Meta meta = 2;
89
- string postcode = 3;
90
- string country_id = 4 [
76
+ optional string id = 1;
77
+ optional io.restorecommerce.meta.Meta meta = 2;
78
+ optional string postcode = 3;
79
+ optional string country_id = 4 [
91
80
  (io.restorecommerce.options.resolver) = {
92
81
  target_type: ".io.restorecommerce.country.Country",
93
82
  target_service: "resource",
@@ -96,16 +85,28 @@ message Address {
96
85
  field_name: "country",
97
86
  }
98
87
  ];
99
- string locality = 6;
100
- string street = 7;
101
- string region = 8;
102
- GeoPoint geo_coordinates = 9;
103
- double altitude = 10;
104
- string building_number = 11;
105
- AddressAddition address_addition = 12;
88
+ optional string locality = 6;
89
+ optional string street = 7;
90
+ optional string region = 8;
91
+ optional GeoPoint geo_coordinates = 9;
92
+ optional double altitude = 10;
93
+ optional string building_number = 11;
94
+ optional AddressAddition address_addition = 12;
106
95
  oneof type {
107
96
  BusinessAddress business_address = 13;
108
97
  ResidentialAddress residential_address = 14;
109
98
  PackStation pack_station = 15;
110
99
  }
111
- }
100
+ }
101
+
102
+ message Contact {
103
+ optional string name = 1;
104
+ optional string email = 2;
105
+ optional string phone = 3;
106
+ }
107
+
108
+ message ShippingAddress {
109
+ optional Address address = 1;
110
+ optional Contact contact = 2;
111
+ optional string comments = 3;
112
+ }
@@ -3,11 +3,11 @@ syntax = "proto3";
3
3
  package io.restorecommerce.attribute;
4
4
 
5
5
  message Attribute {
6
- string id = 1;
7
- string value = 2;
6
+ optional string id = 1;
7
+ optional string value = 2;
8
8
  repeated Attribute attribute = 3;
9
9
  }
10
10
 
11
11
  message AttributeObj {
12
- Attribute attribute = 1;
12
+ optional Attribute attribute = 1;
13
13
  }
@@ -7,33 +7,33 @@ import "io/restorecommerce/attribute.proto";
7
7
  * Subject of creating User
8
8
  */
9
9
  message Subject {
10
- string id = 1; // user id
11
- string scope = 2; // target scope (ID of the target scoping entity)
12
- bool unauthenticated = 3; // for unauthenticated context
13
- string token = 4;
10
+ optional string id = 1; // user id
11
+ optional string scope = 2; // target scope (ID of the target scoping entity)
12
+ optional bool unauthenticated = 3; // for unauthenticated context
13
+ optional string token = 4;
14
14
  }
15
15
 
16
16
  message Tokens {
17
- string name = 1; // token name
18
- double expires_in = 2; // expiration date for token
19
- string token = 3; // token
17
+ optional string name = 1; // token name
18
+ optional double expires_in = 2; // expiration date for token
19
+ optional string token = 3; // token
20
20
  repeated string scopes = 4; // identifier for role_association
21
- string type = 5; // type of token eg: access_token, refresh_token
22
- bool interactive = 6;
23
- double last_login = 7;
21
+ optional string type = 5; // type of token eg: access_token, refresh_token
22
+ optional bool interactive = 6;
23
+ optional double last_login = 7;
24
24
  }
25
25
 
26
26
  message HierarchicalScope {
27
- string id = 1; // root node
27
+ optional string id = 1; // root node
28
28
  repeated HierarchicalScope children = 2; // children nodes
29
- string role = 3; // role identifier associated with root node scope
29
+ optional string role = 3; // role identifier associated with root node scope
30
30
  }
31
31
 
32
32
  message RoleAssociation {
33
- string role = 1; // role ID
33
+ optional string role = 1; // role ID
34
34
  repeated io.restorecommerce.attribute.Attribute attributes = 2; // useful attributes for RBAC/ABAC like organizational scope
35
- string id = 3; // identifier for role_association
36
- double created = 4; // timestamp when the role was created
35
+ optional string id = 3; // identifier for role_association
36
+ optional double created = 4; // timestamp when the role was created
37
37
  }
38
38
 
39
39
  message HierarchicalScopesRequest {