@restorecommerce/protos 0.6.7 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +39 -0
- package/io/restorecommerce/access_control.proto +9 -2
- package/io/restorecommerce/address.proto +20 -4
- package/io/restorecommerce/authentication_log.proto +7 -2
- package/io/restorecommerce/command.proto +6 -1
- package/io/restorecommerce/contact_point.proto +48 -5
- package/io/restorecommerce/contact_point_type.proto +6 -1
- package/io/restorecommerce/country.proto +7 -2
- package/io/restorecommerce/customer.proto +75 -8
- package/io/restorecommerce/fulfillment.proto +13 -5
- package/io/restorecommerce/fulfillment_courier.proto +9 -3
- package/io/restorecommerce/invoice.proto +18 -2
- package/io/restorecommerce/job.proto +6 -1
- package/io/restorecommerce/locale.proto +6 -1
- package/io/restorecommerce/location.proto +38 -5
- package/io/restorecommerce/manufacturer.proto +7 -2
- package/io/restorecommerce/notification.proto +6 -1
- package/io/restorecommerce/oauth.proto +12 -0
- package/io/restorecommerce/options.proto +25 -0
- package/io/restorecommerce/order.proto +27 -3
- package/io/restorecommerce/organization.proto +37 -4
- package/io/restorecommerce/ostorage.proto +10 -3
- package/io/restorecommerce/payment.proto +4 -1
- package/io/restorecommerce/policy.proto +6 -1
- package/io/restorecommerce/policy_set.proto +8 -3
- package/io/restorecommerce/price_group.proto +7 -2
- package/io/restorecommerce/product.proto +18 -2
- package/io/restorecommerce/product_category.proto +18 -2
- package/io/restorecommerce/product_prototype.proto +7 -2
- package/io/restorecommerce/role.proto +6 -1
- package/io/restorecommerce/rule.proto +7 -3
- package/io/restorecommerce/tax.proto +28 -3
- package/io/restorecommerce/tax_type.proto +6 -1
- package/io/restorecommerce/timezone.proto +6 -1
- package/io/restorecommerce/token.proto +7 -2
- package/io/restorecommerce/user.proto +98 -6
- package/package.json +2 -2
|
@@ -9,18 +9,30 @@ import "io/restorecommerce/attribute.proto";
|
|
|
9
9
|
import "io/restorecommerce/image.proto";
|
|
10
10
|
import "io/restorecommerce/status.proto";
|
|
11
11
|
import "google/protobuf/any.proto";
|
|
12
|
+
import "io/restorecommerce/role.proto";
|
|
13
|
+
import "io/restorecommerce/options.proto";
|
|
14
|
+
|
|
15
|
+
// Used by resolvers
|
|
16
|
+
import "io/restorecommerce/timezone.proto";
|
|
17
|
+
import "io/restorecommerce/locale.proto";
|
|
12
18
|
|
|
13
19
|
/**
|
|
14
20
|
* The microservice for the user resource.
|
|
15
21
|
*/
|
|
16
22
|
service Service {
|
|
17
|
-
|
|
23
|
+
option (io.restorecommerce.options.service_name) = "user";
|
|
24
|
+
|
|
25
|
+
rpc Read (io.restorecommerce.resourcebase.ReadRequest) returns (UserListWithRoleResponse) {
|
|
26
|
+
option (io.restorecommerce.options.is_query) = true;
|
|
27
|
+
};
|
|
18
28
|
rpc Create (UserList) returns (UserListResponse);
|
|
19
29
|
rpc Delete (io.restorecommerce.resourcebase.DeleteRequest) returns (io.restorecommerce.resourcebase.DeleteResponse);
|
|
20
30
|
rpc Update (UserList) returns (UserListResponse);
|
|
21
31
|
rpc Upsert (UserList) returns (UserListResponse);
|
|
22
32
|
|
|
23
|
-
rpc Find (FindRequest) returns (UserListResponse)
|
|
33
|
+
rpc Find (FindRequest) returns (UserListResponse) {
|
|
34
|
+
option (io.restorecommerce.options.is_query) = true;
|
|
35
|
+
};
|
|
24
36
|
rpc Register (RegisterRequest) returns (UserResponse);
|
|
25
37
|
rpc Activate (ActivateRequest) returns (io.restorecommerce.status.OperationStatusObj);
|
|
26
38
|
rpc ChangePassword (ChangePasswordRequest) returns (io.restorecommerce.status.OperationStatusObj);
|
|
@@ -30,11 +42,15 @@ service Service {
|
|
|
30
42
|
rpc ConfirmEmailChange (ConfirmEmailChangeRequest) returns (io.restorecommerce.status.OperationStatusObj);
|
|
31
43
|
rpc Unregister (UnregisterRequest) returns (io.restorecommerce.status.OperationStatusObj);
|
|
32
44
|
rpc Login (LoginRequest) returns (UserResponse);
|
|
33
|
-
rpc FindByRole (FindByRoleRequest) returns (UserListResponse)
|
|
45
|
+
rpc FindByRole (FindByRoleRequest) returns (UserListResponse) {
|
|
46
|
+
option (io.restorecommerce.options.is_query) = true;
|
|
47
|
+
};
|
|
34
48
|
rpc DeleteUsersByOrg (OrgIDRequest) returns (DeleteUsersByOrgResponse);
|
|
35
49
|
rpc ConfirmUserInvitation (ConfirmUserInvitationRequest) returns (io.restorecommerce.status.OperationStatusObj);
|
|
36
50
|
rpc SendInvitationEmail (SendInvitationEmailRequest) returns (io.restorecommerce.status.OperationStatusObj);
|
|
37
|
-
rpc FindByToken (FindByTokenRequest) returns (UserResponse)
|
|
51
|
+
rpc FindByToken (FindByTokenRequest) returns (UserResponse) {
|
|
52
|
+
option (io.restorecommerce.options.is_query) = true;
|
|
53
|
+
};
|
|
38
54
|
rpc SendActivationEmail (SendActivationEmailRequest) returns (io.restorecommerce.status.OperationStatusObj);
|
|
39
55
|
}
|
|
40
56
|
|
|
@@ -203,6 +219,17 @@ message UserList {
|
|
|
203
219
|
io.restorecommerce.auth.Subject subject = 3;
|
|
204
220
|
}
|
|
205
221
|
|
|
222
|
+
message UserListWithRoleResponse {
|
|
223
|
+
repeated UserRoleResponse items = 1;
|
|
224
|
+
uint32 total_count = 2;
|
|
225
|
+
io.restorecommerce.status.OperationStatus operation_status = 3;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
message UserRoleResponse {
|
|
229
|
+
UserRole payload = 1;
|
|
230
|
+
io.restorecommerce.status.Status status = 2;
|
|
231
|
+
}
|
|
232
|
+
|
|
206
233
|
message UserListResponse {
|
|
207
234
|
repeated UserResponse items = 1;
|
|
208
235
|
uint32 total_count = 2;
|
|
@@ -243,8 +270,72 @@ message User {
|
|
|
243
270
|
string password = 10; /// Raw password, not stored
|
|
244
271
|
string password_hash = 11; /// Encrypted password, stored
|
|
245
272
|
repeated io.restorecommerce.auth.RoleAssociation role_associations = 12; // A user can have multiple roles and different attributes coupled with each role
|
|
246
|
-
string timezone_id = 13
|
|
247
|
-
|
|
273
|
+
string timezone_id = 13 [
|
|
274
|
+
(io.restorecommerce.options.resolver) = {
|
|
275
|
+
target_type: ".io.restorecommerce.timezone.Timezone";
|
|
276
|
+
target_service: "resource";
|
|
277
|
+
target_sub_service: "timezone";
|
|
278
|
+
target_method: "Read";
|
|
279
|
+
field_name: "timezone";
|
|
280
|
+
}
|
|
281
|
+
]; // timezone_id specifications
|
|
282
|
+
string locale_id = 14 [
|
|
283
|
+
(io.restorecommerce.options.resolver) = {
|
|
284
|
+
target_type: ".io.restorecommerce.locale.Locale";
|
|
285
|
+
target_service: "resource";
|
|
286
|
+
target_sub_service: "locale";
|
|
287
|
+
target_method: "Read";
|
|
288
|
+
field_name: "locale";
|
|
289
|
+
}
|
|
290
|
+
]; // locale specifications
|
|
291
|
+
string default_scope = 15; // default hierarchical scope
|
|
292
|
+
bool unauthenticated = 16; // true in case in case of `register`; set to false after activation
|
|
293
|
+
bool guest = 17; /// Is the user a guest. A guest is a automatically generated user which can later be turned in a non-guest user.
|
|
294
|
+
io.restorecommerce.image.Image image = 18;
|
|
295
|
+
UserType user_type = 19;
|
|
296
|
+
bool invite = 20; // For user invitation
|
|
297
|
+
string invited_by_user_name = 21; // user who is inviting
|
|
298
|
+
string invited_by_user_first_name = 22; // First name of user inviting
|
|
299
|
+
string invited_by_user_last_name = 23; // Last name of user inviting
|
|
300
|
+
repeated io.restorecommerce.auth.Tokens tokens = 24;
|
|
301
|
+
double last_access = 25;
|
|
302
|
+
google.protobuf.Any data = 26; /// additional data
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
/**
|
|
306
|
+
* A User resource with role
|
|
307
|
+
*/
|
|
308
|
+
message UserRole {
|
|
309
|
+
string id = 1; /// User ID, unique, key
|
|
310
|
+
io.restorecommerce.meta.Meta meta = 2;
|
|
311
|
+
string name = 3; // The name of the user, can be used for login
|
|
312
|
+
string first_name = 4;
|
|
313
|
+
string last_name = 5;
|
|
314
|
+
string email = 6; /// Email address, can be used for login
|
|
315
|
+
string new_email = 7; /// New email address; set by `requestEmailChange` and overrides actual email upon `confirmEmailChange`
|
|
316
|
+
bool active = 8; /// If the user was activated via the activation process
|
|
317
|
+
string activation_code = 9; /// Activation code used in the activation process
|
|
318
|
+
string password = 10; /// Raw password, not stored
|
|
319
|
+
string password_hash = 11; /// Encrypted password, stored
|
|
320
|
+
repeated io.restorecommerce.auth.RoleAssociation role_associations = 12; // A user can have multiple roles and different attributes coupled with each role
|
|
321
|
+
string timezone_id = 13 [
|
|
322
|
+
(io.restorecommerce.options.resolver) = {
|
|
323
|
+
target_type: ".io.restorecommerce.timezone.Timezone";
|
|
324
|
+
target_service: "resource";
|
|
325
|
+
target_sub_service: "timezone";
|
|
326
|
+
target_method: "Read";
|
|
327
|
+
field_name: "timezone";
|
|
328
|
+
}
|
|
329
|
+
]; // timezone_id specifications
|
|
330
|
+
string locale_id = 14 [
|
|
331
|
+
(io.restorecommerce.options.resolver) = {
|
|
332
|
+
target_type: ".io.restorecommerce.locale.Locale";
|
|
333
|
+
target_service: "resource";
|
|
334
|
+
target_sub_service: "locale";
|
|
335
|
+
target_method: "Read";
|
|
336
|
+
field_name: "locale";
|
|
337
|
+
}
|
|
338
|
+
]; // locale specifications
|
|
248
339
|
string default_scope = 15; // default hierarchical scope
|
|
249
340
|
bool unauthenticated = 16; // true in case in case of `register`; set to false after activation
|
|
250
341
|
bool guest = 17; /// Is the user a guest. A guest is a automatically generated user which can later be turned in a non-guest user.
|
|
@@ -257,4 +348,5 @@ message User {
|
|
|
257
348
|
repeated io.restorecommerce.auth.Tokens tokens = 24;
|
|
258
349
|
double last_access = 25;
|
|
259
350
|
google.protobuf.Any data = 26; /// additional data
|
|
351
|
+
repeated io.restorecommerce.role.Role role = 27;
|
|
260
352
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@restorecommerce/protos",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.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": "
|
|
18
|
+
"gitHead": "2d453885b1c82df3e6aabbfbfe3b5a9c0b240277"
|
|
19
19
|
}
|