@meshtrade/api-web 1.40.0 → 1.41.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/dist/meshtrade/iam/role/v1/role.js +2 -0
- package/dist/meshtrade/iam/role/v1/role_pb.d.ts +8 -0
- package/dist/meshtrade/iam/role/v1/role_pb.js +9 -1
- package/dist/meshtrade/iam/user/v1/service_pb.d.ts +0 -77
- package/dist/meshtrade/iam/user/v1/service_pb.js +4 -19
- package/dist/meshtrade/iam/user/v1/service_web_meshts.d.ts +1 -7
- package/dist/meshtrade/iam/user/v1/service_web_meshts.js +0 -17
- package/dist/meshtrade/iam/user/v1/user_pb.d.ts +45 -1
- package/dist/meshtrade/iam/user/v1/user_pb.js +7 -2
- package/dist/meshtrade/iam/user_profile/index.d.ts +1 -0
- package/dist/meshtrade/iam/user_profile/index.js +17 -0
- package/dist/meshtrade/iam/user_profile/v1/index.d.ts +3 -0
- package/dist/meshtrade/iam/user_profile/v1/index.js +44 -0
- package/dist/meshtrade/iam/user_profile/v1/service_pb.d.ts +197 -0
- package/dist/meshtrade/iam/user_profile/v1/service_pb.js +50 -0
- package/dist/meshtrade/iam/user_profile/v1/service_web_meshts.d.ts +109 -0
- package/dist/meshtrade/iam/user_profile/v1/service_web_meshts.js +202 -0
- package/dist/meshtrade/iam/user_profile/v1/user_profile_pb.d.ts +106 -0
- package/dist/meshtrade/iam/user_profile/v1/user_profile_pb.js +18 -0
- package/package.json +17 -1
|
@@ -29,6 +29,8 @@ const roleToStringMapping = {
|
|
|
29
29
|
[role_pb_1.Role.IAM_GROUP_VIEWER]: "IAM Group Viewer",
|
|
30
30
|
[role_pb_1.Role.IAM_USER_ADMIN]: "IAM User Admin",
|
|
31
31
|
[role_pb_1.Role.IAM_USER_VIEWER]: "IAM User Viewer",
|
|
32
|
+
[role_pb_1.Role.IAM_USER_PROFILE_ADMIN]: "User Profile Admin",
|
|
33
|
+
[role_pb_1.Role.IAM_USER_PROFILE_VIEWER]: "User Profile Viewer",
|
|
32
34
|
[role_pb_1.Role.STUDIO_ADMIN]: "Studio Admin",
|
|
33
35
|
[role_pb_1.Role.STUDIO_VIEWER]: "Studio Viewer",
|
|
34
36
|
[role_pb_1.Role.STUDIO_INSTRUMENT_ADMIN]: "Studio Instrument Admin",
|
|
@@ -85,6 +85,14 @@ export declare enum Role {
|
|
|
85
85
|
* @generated from enum value: ROLE_IAM_USER_VIEWER = 3000007;
|
|
86
86
|
*/
|
|
87
87
|
IAM_USER_VIEWER = 3000007,
|
|
88
|
+
/**
|
|
89
|
+
* @generated from enum value: ROLE_IAM_USER_PROFILE_ADMIN = 3000008;
|
|
90
|
+
*/
|
|
91
|
+
IAM_USER_PROFILE_ADMIN = 3000008,
|
|
92
|
+
/**
|
|
93
|
+
* @generated from enum value: ROLE_IAM_USER_PROFILE_VIEWER = 3000009;
|
|
94
|
+
*/
|
|
95
|
+
IAM_USER_PROFILE_VIEWER = 3000009,
|
|
88
96
|
/**
|
|
89
97
|
* @generated from enum value: ROLE_STUDIO_ADMIN = 4000000;
|
|
90
98
|
*/
|
|
@@ -8,7 +8,7 @@ const codegenv2_1 = require("@bufbuild/protobuf/codegenv2");
|
|
|
8
8
|
/**
|
|
9
9
|
* Describes the file meshtrade/iam/role/v1/role.proto.
|
|
10
10
|
*/
|
|
11
|
-
exports.file_meshtrade_iam_role_v1_role = (0, codegenv2_1.fileDesc)("
|
|
11
|
+
exports.file_meshtrade_iam_role_v1_role = (0, codegenv2_1.fileDesc)("CiBtZXNodHJhZGUvaWFtL3JvbGUvdjEvcm9sZS5wcm90bxIVbWVzaHRyYWRlLmlhbS5yb2xlLnYxKukJCgRSb2xlEhQKEFJPTEVfVU5TUEVDSUZJRUQQABIXChFST0xFX1dBTExFVF9BRE1JThDAhD0SGAoSUk9MRV9XQUxMRVRfVklFV0VSEMGEPRIfChlST0xFX1dBTExFVF9BQ0NPVU5UX0FETUlOEMKEPRIgChpST0xFX1dBTExFVF9BQ0NPVU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klFV0VSEMGfqwMSJAodUk9MRV9MRURHRVJfVFJBTlNBQ1RJT05fQURNSU4Qwp+rAxIlCh5ST0xFX0xFREdFUl9UUkFOU0FDVElPTl9WSUVXRVIQw5+rAxIdChZST0xFX01BUktFVF9EQVRBX0FETUlOEICk6AMSHgoXUk9MRV9NQVJLRVRfREFUQV9WSUVXRVIQgaToAxIjChxST0xFX01BUktFVF9EQVRBX1BSSUNFX0FETUlOEIKk6AMSJAodUk9MRV9NQVJLRVRfREFUQV9QUklDRV9WSUVXRVIQg6ToAxIqCiNST0xFX1RFU1RJTkdfTEVER0VSX1RPS0VOX1RBUF9BRE1JThDAqKUEEisKJFJPTEVfVEVTVElOR19MRURHRVJfVE9LRU5fVEFQX1ZJRVdFUhDBqKUEQk8KHGNvLm1lc2h0cmFkZS5hcGkuaWFtLnJvbGUudjFaL2dpdGh1Yi5jb20vbWVzaHRyYWRlL2FwaS9nby9pYW0vcm9sZS92MTtyb2xlX3YxYgZwcm90bzM");
|
|
12
12
|
/**
|
|
13
13
|
*
|
|
14
14
|
* Role defines a named collection of permissions.
|
|
@@ -92,6 +92,14 @@ var Role;
|
|
|
92
92
|
* @generated from enum value: ROLE_IAM_USER_VIEWER = 3000007;
|
|
93
93
|
*/
|
|
94
94
|
Role[Role["IAM_USER_VIEWER"] = 3000007] = "IAM_USER_VIEWER";
|
|
95
|
+
/**
|
|
96
|
+
* @generated from enum value: ROLE_IAM_USER_PROFILE_ADMIN = 3000008;
|
|
97
|
+
*/
|
|
98
|
+
Role[Role["IAM_USER_PROFILE_ADMIN"] = 3000008] = "IAM_USER_PROFILE_ADMIN";
|
|
99
|
+
/**
|
|
100
|
+
* @generated from enum value: ROLE_IAM_USER_PROFILE_VIEWER = 3000009;
|
|
101
|
+
*/
|
|
102
|
+
Role[Role["IAM_USER_PROFILE_VIEWER"] = 3000009] = "IAM_USER_PROFILE_VIEWER";
|
|
95
103
|
/**
|
|
96
104
|
* @generated from enum value: ROLE_STUDIO_ADMIN = 4000000;
|
|
97
105
|
*/
|
|
@@ -147,68 +147,6 @@ export type ListUsersResponse = Message<"meshtrade.iam.user.v1.ListUsersResponse
|
|
|
147
147
|
* Use `create(ListUsersResponseSchema)` to create a new message.
|
|
148
148
|
*/
|
|
149
149
|
export declare const ListUsersResponseSchema: GenMessage<ListUsersResponse>;
|
|
150
|
-
/**
|
|
151
|
-
* @generated from message meshtrade.iam.user.v1.SearchUsersRequest
|
|
152
|
-
*/
|
|
153
|
-
export type SearchUsersRequest = Message<"meshtrade.iam.user.v1.SearchUsersRequest"> & {
|
|
154
|
-
/**
|
|
155
|
-
*
|
|
156
|
-
* Email is a substring search for users.
|
|
157
|
-
*
|
|
158
|
-
* @generated from field: string email = 1;
|
|
159
|
-
*/
|
|
160
|
-
email: string;
|
|
161
|
-
/**
|
|
162
|
-
*
|
|
163
|
-
* Optional sorting configuration.
|
|
164
|
-
*
|
|
165
|
-
* @generated from field: meshtrade.iam.user.v1.SearchUsersRequest.Sorting sorting = 2;
|
|
166
|
-
*/
|
|
167
|
-
sorting?: SearchUsersRequest_Sorting;
|
|
168
|
-
};
|
|
169
|
-
/**
|
|
170
|
-
* Describes the message meshtrade.iam.user.v1.SearchUsersRequest.
|
|
171
|
-
* Use `create(SearchUsersRequestSchema)` to create a new message.
|
|
172
|
-
*/
|
|
173
|
-
export declare const SearchUsersRequestSchema: GenMessage<SearchUsersRequest>;
|
|
174
|
-
/**
|
|
175
|
-
* @generated from message meshtrade.iam.user.v1.SearchUsersRequest.Sorting
|
|
176
|
-
*/
|
|
177
|
-
export type SearchUsersRequest_Sorting = Message<"meshtrade.iam.user.v1.SearchUsersRequest.Sorting"> & {
|
|
178
|
-
/**
|
|
179
|
-
*
|
|
180
|
-
* Field to sort by (e.g., "email").
|
|
181
|
-
*
|
|
182
|
-
* @generated from field: string field = 1;
|
|
183
|
-
*/
|
|
184
|
-
field: string;
|
|
185
|
-
/**
|
|
186
|
-
*
|
|
187
|
-
* Sort order for results.
|
|
188
|
-
*
|
|
189
|
-
* @generated from field: meshtrade.type.v1.SortingOrder order = 2;
|
|
190
|
-
*/
|
|
191
|
-
order: SortingOrder;
|
|
192
|
-
};
|
|
193
|
-
/**
|
|
194
|
-
* Describes the message meshtrade.iam.user.v1.SearchUsersRequest.Sorting.
|
|
195
|
-
* Use `create(SearchUsersRequest_SortingSchema)` to create a new message.
|
|
196
|
-
*/
|
|
197
|
-
export declare const SearchUsersRequest_SortingSchema: GenMessage<SearchUsersRequest_Sorting>;
|
|
198
|
-
/**
|
|
199
|
-
* @generated from message meshtrade.iam.user.v1.SearchUsersResponse
|
|
200
|
-
*/
|
|
201
|
-
export type SearchUsersResponse = Message<"meshtrade.iam.user.v1.SearchUsersResponse"> & {
|
|
202
|
-
/**
|
|
203
|
-
* @generated from field: repeated meshtrade.iam.user.v1.User users = 1;
|
|
204
|
-
*/
|
|
205
|
-
users: User[];
|
|
206
|
-
};
|
|
207
|
-
/**
|
|
208
|
-
* Describes the message meshtrade.iam.user.v1.SearchUsersResponse.
|
|
209
|
-
* Use `create(SearchUsersResponseSchema)` to create a new message.
|
|
210
|
-
*/
|
|
211
|
-
export declare const SearchUsersResponseSchema: GenMessage<SearchUsersResponse>;
|
|
212
150
|
/**
|
|
213
151
|
* @generated from message meshtrade.iam.user.v1.CreateUserRequest
|
|
214
152
|
*/
|
|
@@ -331,21 +269,6 @@ export declare const UserService: GenService<{
|
|
|
331
269
|
input: typeof ListUsersRequestSchema;
|
|
332
270
|
output: typeof ListUsersResponseSchema;
|
|
333
271
|
};
|
|
334
|
-
/**
|
|
335
|
-
*
|
|
336
|
-
* Searches for users by email address using substring matching.
|
|
337
|
-
*
|
|
338
|
-
* Returns users whose email addresses contain the provided search term,
|
|
339
|
-
* filtered by the authenticated group's access permissions and optionally
|
|
340
|
-
* sorted by email address.
|
|
341
|
-
*
|
|
342
|
-
* @generated from rpc meshtrade.iam.user.v1.UserService.SearchUsers
|
|
343
|
-
*/
|
|
344
|
-
searchUsers: {
|
|
345
|
-
methodKind: "unary";
|
|
346
|
-
input: typeof SearchUsersRequestSchema;
|
|
347
|
-
output: typeof SearchUsersResponseSchema;
|
|
348
|
-
};
|
|
349
272
|
/**
|
|
350
273
|
*
|
|
351
274
|
* Creates a new user within the authenticated group context.
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// @generated from file meshtrade/iam/user/v1/service.proto (package meshtrade.iam.user.v1, syntax proto3)
|
|
4
4
|
/* eslint-disable */
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.UserService = exports.UpdateUserRequestSchema = exports.CreateUserRequestSchema = exports.
|
|
6
|
+
exports.UserService = exports.UpdateUserRequestSchema = exports.CreateUserRequestSchema = exports.ListUsersResponseSchema = exports.ListUsersRequest_SortingSchema = exports.ListUsersRequestSchema = exports.GetUserByEmailRequestSchema = exports.GetUserRequestSchema = exports.RevokeRolesFromUserRequestSchema = exports.AssignRolesToUserRequestSchema = exports.file_meshtrade_iam_user_v1_service = void 0;
|
|
7
7
|
const codegenv2_1 = require("@bufbuild/protobuf/codegenv2");
|
|
8
8
|
const validate_pb_1 = require("../../../../buf/validate/validate_pb");
|
|
9
9
|
const user_pb_1 = require("./user_pb");
|
|
@@ -12,7 +12,7 @@ const sorting_pb_1 = require("../../../type/v1/sorting_pb");
|
|
|
12
12
|
/**
|
|
13
13
|
* Describes the file meshtrade/iam/user/v1/service.proto.
|
|
14
14
|
*/
|
|
15
|
-
exports.file_meshtrade_iam_user_v1_service = (0, codegenv2_1.fileDesc)("
|
|
15
|
+
exports.file_meshtrade_iam_user_v1_service = (0, codegenv2_1.fileDesc)("CiNtZXNodHJhZGUvaWFtL3VzZXIvdjEvc2VydmljZS5wcm90bxIVbWVzaHRyYWRlLmlhbS51c2VyLnYxIs4BChhBc3NpZ25Sb2xlc1RvVXNlclJlcXVlc3QSSQoEbmFtZRgBIAEoCUI7ukg4yAEBcjMyLl51c2Vycy9bMDEyMzQ1Njc4OUFCQ0RFRkdISktNTlBRUlNU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0udXNlci52MS5Vc2VyIhKytRgOCAIQAhoIwI23AcaNtwESZwoKVXBkYXRlVXNlchIoLm1lc2h0cmFkZS5pYW0udXNlci52MS5VcGRhdGVVc2VyUmVxdWVzdBobLm1lc2h0cmFkZS5pYW0udXNlci52MS5Vc2VyIhKytRgOCAIQAhoIwI23AcaNtwFCTwocY28ubWVzaHRyYWRlLmFwaS5pYW0udXNlci52MVovZ2l0aHViLmNvbS9tZXNodHJhZGUvYXBpL2dvL2lhbS91c2VyL3YxO3VzZXJfdjFiBnByb3RvMw", [validate_pb_1.file_buf_validate_validate, user_pb_1.file_meshtrade_iam_user_v1_user, method_options_pb_1.file_meshtrade_option_method_options_v1_method_options, sorting_pb_1.file_meshtrade_type_v1_sorting]);
|
|
16
16
|
/**
|
|
17
17
|
* Describes the message meshtrade.iam.user.v1.AssignRolesToUserRequest.
|
|
18
18
|
* Use `create(AssignRolesToUserRequestSchema)` to create a new message.
|
|
@@ -48,31 +48,16 @@ exports.ListUsersRequest_SortingSchema = (0, codegenv2_1.messageDesc)(exports.fi
|
|
|
48
48
|
* Use `create(ListUsersResponseSchema)` to create a new message.
|
|
49
49
|
*/
|
|
50
50
|
exports.ListUsersResponseSchema = (0, codegenv2_1.messageDesc)(exports.file_meshtrade_iam_user_v1_service, 5);
|
|
51
|
-
/**
|
|
52
|
-
* Describes the message meshtrade.iam.user.v1.SearchUsersRequest.
|
|
53
|
-
* Use `create(SearchUsersRequestSchema)` to create a new message.
|
|
54
|
-
*/
|
|
55
|
-
exports.SearchUsersRequestSchema = (0, codegenv2_1.messageDesc)(exports.file_meshtrade_iam_user_v1_service, 6);
|
|
56
|
-
/**
|
|
57
|
-
* Describes the message meshtrade.iam.user.v1.SearchUsersRequest.Sorting.
|
|
58
|
-
* Use `create(SearchUsersRequest_SortingSchema)` to create a new message.
|
|
59
|
-
*/
|
|
60
|
-
exports.SearchUsersRequest_SortingSchema = (0, codegenv2_1.messageDesc)(exports.file_meshtrade_iam_user_v1_service, 6, 0);
|
|
61
|
-
/**
|
|
62
|
-
* Describes the message meshtrade.iam.user.v1.SearchUsersResponse.
|
|
63
|
-
* Use `create(SearchUsersResponseSchema)` to create a new message.
|
|
64
|
-
*/
|
|
65
|
-
exports.SearchUsersResponseSchema = (0, codegenv2_1.messageDesc)(exports.file_meshtrade_iam_user_v1_service, 7);
|
|
66
51
|
/**
|
|
67
52
|
* Describes the message meshtrade.iam.user.v1.CreateUserRequest.
|
|
68
53
|
* Use `create(CreateUserRequestSchema)` to create a new message.
|
|
69
54
|
*/
|
|
70
|
-
exports.CreateUserRequestSchema = (0, codegenv2_1.messageDesc)(exports.file_meshtrade_iam_user_v1_service,
|
|
55
|
+
exports.CreateUserRequestSchema = (0, codegenv2_1.messageDesc)(exports.file_meshtrade_iam_user_v1_service, 6);
|
|
71
56
|
/**
|
|
72
57
|
* Describes the message meshtrade.iam.user.v1.UpdateUserRequest.
|
|
73
58
|
* Use `create(UpdateUserRequestSchema)` to create a new message.
|
|
74
59
|
*/
|
|
75
|
-
exports.UpdateUserRequestSchema = (0, codegenv2_1.messageDesc)(exports.file_meshtrade_iam_user_v1_service,
|
|
60
|
+
exports.UpdateUserRequestSchema = (0, codegenv2_1.messageDesc)(exports.file_meshtrade_iam_user_v1_service, 7);
|
|
76
61
|
/**
|
|
77
62
|
*
|
|
78
63
|
* UserService manages user lifecycle and identity operations within groups.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AssignRolesToUserRequest, CreateUserRequest, GetUserByEmailRequest, GetUserRequest, ListUsersRequest, ListUsersResponse, RevokeRolesFromUserRequest,
|
|
1
|
+
import { AssignRolesToUserRequest, CreateUserRequest, GetUserByEmailRequest, GetUserRequest, ListUsersRequest, ListUsersResponse, RevokeRolesFromUserRequest, UpdateUserRequest } from "./service_pb";
|
|
2
2
|
import { User } from "./user_pb";
|
|
3
3
|
import { ClientOption } from "../../../config";
|
|
4
4
|
/**
|
|
@@ -112,12 +112,6 @@ export declare class UserServiceWeb {
|
|
|
112
112
|
* @returns {Promise<ListUsersResponse>} A promise that resolves with the list of users.
|
|
113
113
|
*/
|
|
114
114
|
listUsers(request: ListUsersRequest): Promise<ListUsersResponse>;
|
|
115
|
-
/**
|
|
116
|
-
* Searches for users.
|
|
117
|
-
* @param {SearchUsersRequest} request - The request object for searchusers.
|
|
118
|
-
* @returns {Promise<SearchUsersResponse>} A promise that resolves with the search results.
|
|
119
|
-
*/
|
|
120
|
-
searchUsers(request: SearchUsersRequest): Promise<SearchUsersResponse>;
|
|
121
115
|
/**
|
|
122
116
|
* Creates a new user.
|
|
123
117
|
* @param {CreateUserRequest} request - The request object for createuser.
|
|
@@ -215,23 +215,6 @@ class UserServiceWeb {
|
|
|
215
215
|
}
|
|
216
216
|
return this._client.listUsers(request);
|
|
217
217
|
}
|
|
218
|
-
/**
|
|
219
|
-
* Searches for users.
|
|
220
|
-
* @param {SearchUsersRequest} request - The request object for searchusers.
|
|
221
|
-
* @returns {Promise<SearchUsersResponse>} A promise that resolves with the search results.
|
|
222
|
-
*/
|
|
223
|
-
searchUsers(request) {
|
|
224
|
-
// Validate request
|
|
225
|
-
const result = this._validator.validate(service_pb_2.SearchUsersRequestSchema, request);
|
|
226
|
-
if (result.kind === "invalid") {
|
|
227
|
-
const violations = result.violations.map(v => `${v.field.toString()}: ${v.message}`).join("; ");
|
|
228
|
-
throw new Error(`Validation failed: ${violations}`);
|
|
229
|
-
}
|
|
230
|
-
else if (result.kind === "error") {
|
|
231
|
-
throw result.error;
|
|
232
|
-
}
|
|
233
|
-
return this._client.searchUsers(request);
|
|
234
|
-
}
|
|
235
218
|
/**
|
|
236
219
|
* Creates a new user.
|
|
237
220
|
* @param {CreateUserRequest} request - The request object for createuser.
|
|
@@ -49,13 +49,22 @@ export type User = Message<"meshtrade.iam.user.v1.User"> & {
|
|
|
49
49
|
* @generated from field: string email = 4;
|
|
50
50
|
*/
|
|
51
51
|
email: string;
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
* The mobile phone number of this user.
|
|
55
|
+
* Used for multi-factor authentication, notifications, and contact purposes.
|
|
56
|
+
* Format and validation defined by meshtrade.type.v1.MobileNumber.
|
|
57
|
+
*
|
|
58
|
+
* @generated from field: meshtrade.iam.user.v1.MobileNumber mobile_number = 5;
|
|
59
|
+
*/
|
|
60
|
+
mobileNumber?: MobileNumber;
|
|
52
61
|
/**
|
|
53
62
|
*
|
|
54
63
|
* Roles is a list of standard roles assigned to this user,
|
|
55
64
|
* prepended by the name of the group in which they have been assigned that role.
|
|
56
65
|
* e.g. groups/{ULIDv2}/roles/{role}, where role is a value of the meshtrade.iam.role.v1.Role enum.
|
|
57
66
|
*
|
|
58
|
-
* @generated from field: repeated string roles =
|
|
67
|
+
* @generated from field: repeated string roles = 6;
|
|
59
68
|
*/
|
|
60
69
|
roles: string[];
|
|
61
70
|
};
|
|
@@ -64,3 +73,38 @@ export type User = Message<"meshtrade.iam.user.v1.User"> & {
|
|
|
64
73
|
* Use `create(UserSchema)` to create a new message.
|
|
65
74
|
*/
|
|
66
75
|
export declare const UserSchema: GenMessage<User>;
|
|
76
|
+
/**
|
|
77
|
+
*
|
|
78
|
+
* The mobile phone number of this user.
|
|
79
|
+
* Used for multi-factor authentication, notifications, and contact purposes.
|
|
80
|
+
*
|
|
81
|
+
* @generated from message meshtrade.iam.user.v1.MobileNumber
|
|
82
|
+
*/
|
|
83
|
+
export type MobileNumber = Message<"meshtrade.iam.user.v1.MobileNumber"> & {
|
|
84
|
+
/**
|
|
85
|
+
*
|
|
86
|
+
* This is the actual Mobile Number that has been verified by the user
|
|
87
|
+
*
|
|
88
|
+
* @generated from field: string value = 1;
|
|
89
|
+
*/
|
|
90
|
+
value: string;
|
|
91
|
+
/**
|
|
92
|
+
*
|
|
93
|
+
* This is set to true when the user has verified their number through the use of an OTP
|
|
94
|
+
*
|
|
95
|
+
* @generated from field: bool verified = 2;
|
|
96
|
+
*/
|
|
97
|
+
verified: boolean;
|
|
98
|
+
/**
|
|
99
|
+
*
|
|
100
|
+
* This is the reason a number for a user was reset
|
|
101
|
+
*
|
|
102
|
+
* @generated from field: string reset_reason = 3;
|
|
103
|
+
*/
|
|
104
|
+
resetReason: string;
|
|
105
|
+
};
|
|
106
|
+
/**
|
|
107
|
+
* Describes the message meshtrade.iam.user.v1.MobileNumber.
|
|
108
|
+
* Use `create(MobileNumberSchema)` to create a new message.
|
|
109
|
+
*/
|
|
110
|
+
export declare const MobileNumberSchema: GenMessage<MobileNumber>;
|
|
@@ -3,15 +3,20 @@
|
|
|
3
3
|
// @generated from file meshtrade/iam/user/v1/user.proto (package meshtrade.iam.user.v1, syntax proto3)
|
|
4
4
|
/* eslint-disable */
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.UserSchema = exports.file_meshtrade_iam_user_v1_user = void 0;
|
|
6
|
+
exports.MobileNumberSchema = exports.UserSchema = exports.file_meshtrade_iam_user_v1_user = void 0;
|
|
7
7
|
const codegenv2_1 = require("@bufbuild/protobuf/codegenv2");
|
|
8
8
|
const validate_pb_1 = require("../../../../buf/validate/validate_pb");
|
|
9
9
|
/**
|
|
10
10
|
* Describes the file meshtrade/iam/user/v1/user.proto.
|
|
11
11
|
*/
|
|
12
|
-
exports.file_meshtrade_iam_user_v1_user = (0, codegenv2_1.fileDesc)("
|
|
12
|
+
exports.file_meshtrade_iam_user_v1_user = (0, codegenv2_1.fileDesc)("CiBtZXNodHJhZGUvaWFtL3VzZXIvdjEvdXNlci5wcm90bxIVbWVzaHRyYWRlLmlhbS51c2VyLnYxIpcECgRVc2VyErQBCgRuYW1lGAEgASgJQqUBukihAboBnQEKFG5hbWUuZm9ybWF0Lm9wdGlvbmFsEjJuYW1lIG11c3QgYmUgZW1wdHkgb3IgaW4gdGhlIGZvcm1hdCB1c2Vycy97VUxJRHYyfRpRc2l6ZSh0aGlzKSA9PSAwIHx8IHRoaXMubWF0Y2hlcygnXnVzZXJzL1swMTIzNDU2Nzg5QUJDREVGR0hKS01OUFFSU1RWV1hZWl17MjZ9JCcpEksKBW93bmVyGAIgASgJQjy6SDnIAQFyNDIvXmdyb3Vwcy9bMDEyMzQ1Njc4OUFCQ0RFRkdISktNTlBRUlNUVldYWVpdezI2fSSYASESTgoGb3duZXJzGAMgAygJQj66SDuSATgiNnI0Mi9eZ3JvdXBzL1swMTIzNDU2Nzg5QUJDREVGR0hKS01OUFFSU1RWV1hZWl17MjZ9JJgBIRIZCgVlbWFpbBgEIAEoCUIKukgHyAEBcgJgARI6Cg1tb2JpbGVfbnVtYmVyGAUgASgLMiMubWVzaHRyYWRlLmlhbS51c2VyLnYxLk1vYmlsZU51bWJlchJkCgVyb2xlcxgGIAMoCUJVukhSkgFPIk1ySxAvGDAyRV5ncm91cHMvWzAxMjM0NTY3ODlBQkNERUZHSEpLTU5QUVJTVFZXWFlaXXsyNn0vcm9sZXMvWzEtOV1bMC05XXs2LDd9JCJFCgxNb2JpbGVOdW1iZXISDQoFdmFsdWUYASABKAkSEAoIdmVyaWZpZWQYAiABKAgSFAoMcmVzZXRfcmVhc29uGAMgASgJQk8KHGNvLm1lc2h0cmFkZS5hcGkuaWFtLnVzZXIudjFaL2dpdGh1Yi5jb20vbWVzaHRyYWRlL2FwaS9nby9pYW0vdXNlci92MTt1c2VyX3YxYgZwcm90bzM", [validate_pb_1.file_buf_validate_validate]);
|
|
13
13
|
/**
|
|
14
14
|
* Describes the message meshtrade.iam.user.v1.User.
|
|
15
15
|
* Use `create(UserSchema)` to create a new message.
|
|
16
16
|
*/
|
|
17
17
|
exports.UserSchema = (0, codegenv2_1.messageDesc)(exports.file_meshtrade_iam_user_v1_user, 0);
|
|
18
|
+
/**
|
|
19
|
+
* Describes the message meshtrade.iam.user.v1.MobileNumber.
|
|
20
|
+
* Use `create(MobileNumberSchema)` to create a new message.
|
|
21
|
+
*/
|
|
22
|
+
exports.MobileNumberSchema = (0, codegenv2_1.messageDesc)(exports.file_meshtrade_iam_user_v1_user, 1);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./v1";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./v1"), exports);
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// ===================================================================
|
|
3
|
+
// AUTO-GENERATED SECTION - ONLY EDIT BELOW THE CLOSING COMMENT BLOCK
|
|
4
|
+
// ===================================================================
|
|
5
|
+
// This section is automatically managed by protoc-gen-meshts.
|
|
6
|
+
//
|
|
7
|
+
// DO NOT EDIT ANYTHING IN THIS SECTION MANUALLY!
|
|
8
|
+
// Your changes will be overwritten during code generation.
|
|
9
|
+
//
|
|
10
|
+
// To add custom exports, scroll down to the
|
|
11
|
+
// "MANUAL EXPORTS" section indicated below.
|
|
12
|
+
// ===================================================================
|
|
13
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
|
+
if (k2 === undefined) k2 = k;
|
|
15
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
16
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
17
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
18
|
+
}
|
|
19
|
+
Object.defineProperty(o, k2, desc);
|
|
20
|
+
}) : (function(o, m, k, k2) {
|
|
21
|
+
if (k2 === undefined) k2 = k;
|
|
22
|
+
o[k2] = m[k];
|
|
23
|
+
}));
|
|
24
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
25
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
26
|
+
};
|
|
27
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
+
// Generated exports
|
|
29
|
+
__exportStar(require("./service_pb"), exports);
|
|
30
|
+
__exportStar(require("./service_web_meshts"), exports);
|
|
31
|
+
__exportStar(require("./user_profile_pb"), exports);
|
|
32
|
+
// ===================================================================
|
|
33
|
+
// END OF AUTO-GENERATED SECTION
|
|
34
|
+
// ===================================================================
|
|
35
|
+
//
|
|
36
|
+
// MANUAL EXPORTS - ADD YOUR CUSTOM EXPORTS BELOW
|
|
37
|
+
//
|
|
38
|
+
// You can safely add your own export statements in this section.
|
|
39
|
+
// They will be preserved across code generation.
|
|
40
|
+
//
|
|
41
|
+
// Example:
|
|
42
|
+
// export * from "./my_custom_module";
|
|
43
|
+
// export { MyCustomClass } from "./another_module";
|
|
44
|
+
// ===================================================================
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2";
|
|
2
|
+
import type { UserProfile, UserProfileSchema } from "./user_profile_pb";
|
|
3
|
+
import type { Message } from "@bufbuild/protobuf";
|
|
4
|
+
/**
|
|
5
|
+
* Describes the file meshtrade/iam/user_profile/v1/service.proto.
|
|
6
|
+
*/
|
|
7
|
+
export declare const file_meshtrade_iam_user_profile_v1_service: GenFile;
|
|
8
|
+
/**
|
|
9
|
+
*
|
|
10
|
+
* Request message for GetUserProfileByUser.
|
|
11
|
+
*
|
|
12
|
+
* Retrieves a user profile by specifying the associated user resource name.
|
|
13
|
+
*
|
|
14
|
+
* @generated from message meshtrade.iam.user_profile.v1.GetUserProfileByUserRequest
|
|
15
|
+
*/
|
|
16
|
+
export type GetUserProfileByUserRequest = Message<"meshtrade.iam.user_profile.v1.GetUserProfileByUserRequest"> & {
|
|
17
|
+
/**
|
|
18
|
+
*
|
|
19
|
+
* The resource name of the user whose profile should be retrieved.
|
|
20
|
+
* Format: users/{ULIDv2}.
|
|
21
|
+
* This field is required.
|
|
22
|
+
*
|
|
23
|
+
* @generated from field: string user = 1;
|
|
24
|
+
*/
|
|
25
|
+
user: string;
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* Describes the message meshtrade.iam.user_profile.v1.GetUserProfileByUserRequest.
|
|
29
|
+
* Use `create(GetUserProfileByUserRequestSchema)` to create a new message.
|
|
30
|
+
*/
|
|
31
|
+
export declare const GetUserProfileByUserRequestSchema: GenMessage<GetUserProfileByUserRequest>;
|
|
32
|
+
/**
|
|
33
|
+
*
|
|
34
|
+
* Request message for UpdateUserProfile.
|
|
35
|
+
*
|
|
36
|
+
* Updates an existing user profile. Only the fields provided
|
|
37
|
+
* in the user_profile will be updated; omitted fields remain unchanged.
|
|
38
|
+
*
|
|
39
|
+
* @generated from message meshtrade.iam.user_profile.v1.UpdateUserProfileRequest
|
|
40
|
+
*/
|
|
41
|
+
export type UpdateUserProfileRequest = Message<"meshtrade.iam.user_profile.v1.UpdateUserProfileRequest"> & {
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
* The user profile with updated values.
|
|
45
|
+
* The name field must be set to identify which profile to update.
|
|
46
|
+
* Only provided fields will be modified.
|
|
47
|
+
*
|
|
48
|
+
* @generated from field: meshtrade.iam.user_profile.v1.UserProfile user_profile = 1;
|
|
49
|
+
*/
|
|
50
|
+
userProfile?: UserProfile;
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* Describes the message meshtrade.iam.user_profile.v1.UpdateUserProfileRequest.
|
|
54
|
+
* Use `create(UpdateUserProfileRequestSchema)` to create a new message.
|
|
55
|
+
*/
|
|
56
|
+
export declare const UpdateUserProfileRequestSchema: GenMessage<UpdateUserProfileRequest>;
|
|
57
|
+
/**
|
|
58
|
+
*
|
|
59
|
+
*
|
|
60
|
+
* Request message for GetUserProfile.
|
|
61
|
+
*
|
|
62
|
+
* Retrieves a specific user profile by its resource name.
|
|
63
|
+
*
|
|
64
|
+
* @generated from message meshtrade.iam.user_profile.v1.GetUserProfileRequest
|
|
65
|
+
*/
|
|
66
|
+
export type GetUserProfileRequest = Message<"meshtrade.iam.user_profile.v1.GetUserProfileRequest"> & {
|
|
67
|
+
/**
|
|
68
|
+
*
|
|
69
|
+
* The resource name of the user profile to retrieve.
|
|
70
|
+
* Format: user_profiles/{ULIDv2}.
|
|
71
|
+
* This field is required.
|
|
72
|
+
*
|
|
73
|
+
* @generated from field: string name = 1;
|
|
74
|
+
*/
|
|
75
|
+
name: string;
|
|
76
|
+
};
|
|
77
|
+
/**
|
|
78
|
+
* Describes the message meshtrade.iam.user_profile.v1.GetUserProfileRequest.
|
|
79
|
+
* Use `create(GetUserProfileRequestSchema)` to create a new message.
|
|
80
|
+
*/
|
|
81
|
+
export declare const GetUserProfileRequestSchema: GenMessage<GetUserProfileRequest>;
|
|
82
|
+
/**
|
|
83
|
+
*
|
|
84
|
+
* Request message for ListUserProfiles.
|
|
85
|
+
*
|
|
86
|
+
* Lists all user profiles accessible to the caller based on
|
|
87
|
+
* their role permissions and group ownership.
|
|
88
|
+
*
|
|
89
|
+
* @generated from message meshtrade.iam.user_profile.v1.ListUserProfilesRequest
|
|
90
|
+
*/
|
|
91
|
+
export type ListUserProfilesRequest = Message<"meshtrade.iam.user_profile.v1.ListUserProfilesRequest"> & {};
|
|
92
|
+
/**
|
|
93
|
+
* Describes the message meshtrade.iam.user_profile.v1.ListUserProfilesRequest.
|
|
94
|
+
* Use `create(ListUserProfilesRequestSchema)` to create a new message.
|
|
95
|
+
*/
|
|
96
|
+
export declare const ListUserProfilesRequestSchema: GenMessage<ListUserProfilesRequest>;
|
|
97
|
+
/**
|
|
98
|
+
*
|
|
99
|
+
* Response message for ListUserProfiles.
|
|
100
|
+
*
|
|
101
|
+
* Contains the collection of user profiles accessible to the caller.
|
|
102
|
+
*
|
|
103
|
+
* @generated from message meshtrade.iam.user_profile.v1.ListUserProfilesResponse
|
|
104
|
+
*/
|
|
105
|
+
export type ListUserProfilesResponse = Message<"meshtrade.iam.user_profile.v1.ListUserProfilesResponse"> & {
|
|
106
|
+
/**
|
|
107
|
+
*
|
|
108
|
+
* The list of user profiles.
|
|
109
|
+
* Ordered by creation time, with most recent first.
|
|
110
|
+
*
|
|
111
|
+
* @generated from field: repeated meshtrade.iam.user_profile.v1.UserProfile user_profiles = 1;
|
|
112
|
+
*/
|
|
113
|
+
userProfiles: UserProfile[];
|
|
114
|
+
};
|
|
115
|
+
/**
|
|
116
|
+
* Describes the message meshtrade.iam.user_profile.v1.ListUserProfilesResponse.
|
|
117
|
+
* Use `create(ListUserProfilesResponseSchema)` to create a new message.
|
|
118
|
+
*/
|
|
119
|
+
export declare const ListUserProfilesResponseSchema: GenMessage<ListUserProfilesResponse>;
|
|
120
|
+
/**
|
|
121
|
+
*
|
|
122
|
+
* UserProfileService manages user profile information and preferences.
|
|
123
|
+
*
|
|
124
|
+
* User profiles contain display preferences, localization settings, and
|
|
125
|
+
* personalization data for authenticated users in the IAM system.
|
|
126
|
+
* Each profile is linked to a specific user and owned by a group.
|
|
127
|
+
*
|
|
128
|
+
* @generated from service meshtrade.iam.user_profile.v1.UserProfileService
|
|
129
|
+
*/
|
|
130
|
+
export declare const UserProfileService: GenService<{
|
|
131
|
+
/**
|
|
132
|
+
*
|
|
133
|
+
* Updates an existing user profile.
|
|
134
|
+
*
|
|
135
|
+
* Allows modification of profile information including display name,
|
|
136
|
+
* profile picture, locale preferences, and currency settings.
|
|
137
|
+
* Only the fields provided in the request will be updated.
|
|
138
|
+
*
|
|
139
|
+
* Returns the updated UserProfile resource.
|
|
140
|
+
*
|
|
141
|
+
* @generated from rpc meshtrade.iam.user_profile.v1.UserProfileService.UpdateUserProfile
|
|
142
|
+
*/
|
|
143
|
+
updateUserProfile: {
|
|
144
|
+
methodKind: "unary";
|
|
145
|
+
input: typeof UpdateUserProfileRequestSchema;
|
|
146
|
+
output: typeof UserProfileSchema;
|
|
147
|
+
};
|
|
148
|
+
/**
|
|
149
|
+
*
|
|
150
|
+
* Retrieves a user profile by its resource name.
|
|
151
|
+
*
|
|
152
|
+
* Fetches the complete user profile information including all
|
|
153
|
+
* preferences and settings for the specified user profile ID.
|
|
154
|
+
*
|
|
155
|
+
* Returns the requested UserProfile resource.
|
|
156
|
+
*
|
|
157
|
+
* @generated from rpc meshtrade.iam.user_profile.v1.UserProfileService.GetUserProfile
|
|
158
|
+
*/
|
|
159
|
+
getUserProfile: {
|
|
160
|
+
methodKind: "unary";
|
|
161
|
+
input: typeof GetUserProfileRequestSchema;
|
|
162
|
+
output: typeof UserProfileSchema;
|
|
163
|
+
};
|
|
164
|
+
/**
|
|
165
|
+
*
|
|
166
|
+
* Retrieves a user profile by the associated user resource name.
|
|
167
|
+
*
|
|
168
|
+
* Looks up and returns the user profile linked to a specific user ID.
|
|
169
|
+
* This is useful when you have a user resource and need to find
|
|
170
|
+
* their associated profile information.
|
|
171
|
+
*
|
|
172
|
+
* Returns the UserProfile resource associated with the specified user.
|
|
173
|
+
*
|
|
174
|
+
* @generated from rpc meshtrade.iam.user_profile.v1.UserProfileService.GetUserProfileByUser
|
|
175
|
+
*/
|
|
176
|
+
getUserProfileByUser: {
|
|
177
|
+
methodKind: "unary";
|
|
178
|
+
input: typeof GetUserProfileByUserRequestSchema;
|
|
179
|
+
output: typeof UserProfileSchema;
|
|
180
|
+
};
|
|
181
|
+
/**
|
|
182
|
+
*
|
|
183
|
+
* Lists all user_profiles accessible to the caller.
|
|
184
|
+
*
|
|
185
|
+
* Returns a collection of all user_profiles within the caller's
|
|
186
|
+
* access scope based on group ownership and role permissions.
|
|
187
|
+
*
|
|
188
|
+
* Returns a ListUserProfilesResponse containing all accessible user_profiles.
|
|
189
|
+
*
|
|
190
|
+
* @generated from rpc meshtrade.iam.user_profile.v1.UserProfileService.ListUserProfiles
|
|
191
|
+
*/
|
|
192
|
+
listUserProfiles: {
|
|
193
|
+
methodKind: "unary";
|
|
194
|
+
input: typeof ListUserProfilesRequestSchema;
|
|
195
|
+
output: typeof ListUserProfilesResponseSchema;
|
|
196
|
+
};
|
|
197
|
+
}>;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// @generated by protoc-gen-es v2.10.1 with parameter "target=ts"
|
|
3
|
+
// @generated from file meshtrade/iam/user_profile/v1/service.proto (package meshtrade.iam.user_profile.v1, syntax proto3)
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.UserProfileService = exports.ListUserProfilesResponseSchema = exports.ListUserProfilesRequestSchema = exports.GetUserProfileRequestSchema = exports.UpdateUserProfileRequestSchema = exports.GetUserProfileByUserRequestSchema = exports.file_meshtrade_iam_user_profile_v1_service = void 0;
|
|
7
|
+
const codegenv2_1 = require("@bufbuild/protobuf/codegenv2");
|
|
8
|
+
const validate_pb_1 = require("../../../../buf/validate/validate_pb");
|
|
9
|
+
const user_profile_pb_1 = require("./user_profile_pb");
|
|
10
|
+
const method_options_pb_1 = require("../../../option/method_options/v1/method_options_pb");
|
|
11
|
+
/**
|
|
12
|
+
* Describes the file meshtrade/iam/user_profile/v1/service.proto.
|
|
13
|
+
*/
|
|
14
|
+
exports.file_meshtrade_iam_user_profile_v1_service = (0, codegenv2_1.fileDesc)("CittZXNodHJhZGUvaWFtL3VzZXJfcHJvZmlsZS92MS9zZXJ2aWNlLnByb3RvEh1tZXNodHJhZGUuaWFtLnVzZXJfcHJvZmlsZS52MSL4AgobR2V0VXNlclByb2ZpbG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oQwI23AcGNtwHIjbcByY23AUJnCiRjby5tZXNodHJhZGUuYXBpLmlhbS51c2VyX3Byb2ZpbGUudjFaP2dpdGh1Yi5jb20vbWVzaHRyYWRlL2FwaS9nby9pYW0vdXNlcl9wcm9maWxlL3YxO3VzZXJfcHJvZmlsZV92MWIGcHJvdG8z", [validate_pb_1.file_buf_validate_validate, user_profile_pb_1.file_meshtrade_iam_user_profile_v1_user_profile, method_options_pb_1.file_meshtrade_option_method_options_v1_method_options]);
|
|
15
|
+
/**
|
|
16
|
+
* Describes the message meshtrade.iam.user_profile.v1.GetUserProfileByUserRequest.
|
|
17
|
+
* Use `create(GetUserProfileByUserRequestSchema)` to create a new message.
|
|
18
|
+
*/
|
|
19
|
+
exports.GetUserProfileByUserRequestSchema = (0, codegenv2_1.messageDesc)(exports.file_meshtrade_iam_user_profile_v1_service, 0);
|
|
20
|
+
/**
|
|
21
|
+
* Describes the message meshtrade.iam.user_profile.v1.UpdateUserProfileRequest.
|
|
22
|
+
* Use `create(UpdateUserProfileRequestSchema)` to create a new message.
|
|
23
|
+
*/
|
|
24
|
+
exports.UpdateUserProfileRequestSchema = (0, codegenv2_1.messageDesc)(exports.file_meshtrade_iam_user_profile_v1_service, 1);
|
|
25
|
+
/**
|
|
26
|
+
* Describes the message meshtrade.iam.user_profile.v1.GetUserProfileRequest.
|
|
27
|
+
* Use `create(GetUserProfileRequestSchema)` to create a new message.
|
|
28
|
+
*/
|
|
29
|
+
exports.GetUserProfileRequestSchema = (0, codegenv2_1.messageDesc)(exports.file_meshtrade_iam_user_profile_v1_service, 2);
|
|
30
|
+
/**
|
|
31
|
+
* Describes the message meshtrade.iam.user_profile.v1.ListUserProfilesRequest.
|
|
32
|
+
* Use `create(ListUserProfilesRequestSchema)` to create a new message.
|
|
33
|
+
*/
|
|
34
|
+
exports.ListUserProfilesRequestSchema = (0, codegenv2_1.messageDesc)(exports.file_meshtrade_iam_user_profile_v1_service, 3);
|
|
35
|
+
/**
|
|
36
|
+
* Describes the message meshtrade.iam.user_profile.v1.ListUserProfilesResponse.
|
|
37
|
+
* Use `create(ListUserProfilesResponseSchema)` to create a new message.
|
|
38
|
+
*/
|
|
39
|
+
exports.ListUserProfilesResponseSchema = (0, codegenv2_1.messageDesc)(exports.file_meshtrade_iam_user_profile_v1_service, 4);
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* UserProfileService manages user profile information and preferences.
|
|
43
|
+
*
|
|
44
|
+
* User profiles contain display preferences, localization settings, and
|
|
45
|
+
* personalization data for authenticated users in the IAM system.
|
|
46
|
+
* Each profile is linked to a specific user and owned by a group.
|
|
47
|
+
*
|
|
48
|
+
* @generated from service meshtrade.iam.user_profile.v1.UserProfileService
|
|
49
|
+
*/
|
|
50
|
+
exports.UserProfileService = (0, codegenv2_1.serviceDesc)(exports.file_meshtrade_iam_user_profile_v1_service, 0);
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { GetUserProfileByUserRequest, GetUserProfileRequest, ListUserProfilesRequest, ListUserProfilesResponse, UpdateUserProfileRequest } from "./service_pb";
|
|
2
|
+
import { UserProfile } from "./user_profile_pb";
|
|
3
|
+
import { ClientOption } from "../../../config";
|
|
4
|
+
/**
|
|
5
|
+
* Web client for interacting with the meshtrade.iam.user_profile.v1 user profile v1 API resource service.
|
|
6
|
+
* Uses Connect-ES with gRPC-Web transport for browser-based communication.
|
|
7
|
+
*
|
|
8
|
+
* Supports flexible authentication modes using functional options pattern:
|
|
9
|
+
*
|
|
10
|
+
* 1. **No Authentication** (public APIs):
|
|
11
|
+
* ```typescript
|
|
12
|
+
* const client = new UserProfileServiceWeb(
|
|
13
|
+
* WithServerUrl("http://localhost:10000")
|
|
14
|
+
* );
|
|
15
|
+
* ```
|
|
16
|
+
*
|
|
17
|
+
* 2. **API Key Authentication** (backend services):
|
|
18
|
+
* ```typescript
|
|
19
|
+
* const client = new UserProfileServiceWeb(
|
|
20
|
+
* WithAPIKey("your-api-key"),
|
|
21
|
+
* WithGroup("groups/01ARZ3NDEKTSV4YWVF8F5BH32"),
|
|
22
|
+
* WithServerUrl("https://api.example.com")
|
|
23
|
+
* );
|
|
24
|
+
* ```
|
|
25
|
+
*
|
|
26
|
+
* 3. **JWT Token Authentication** (Next.js frontend with user session):
|
|
27
|
+
* ```typescript
|
|
28
|
+
* const client = new UserProfileServiceWeb(
|
|
29
|
+
* WithJWTAccessToken("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."),
|
|
30
|
+
* WithServerUrl("https://api.example.com")
|
|
31
|
+
* );
|
|
32
|
+
* ```
|
|
33
|
+
*
|
|
34
|
+
* 4. **JWT with Group Context** (user session with specific group):
|
|
35
|
+
* ```typescript
|
|
36
|
+
* const client = new UserProfileServiceWeb(
|
|
37
|
+
* WithJWTAccessToken("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."),
|
|
38
|
+
* WithGroup("groups/01ARZ3NDEKTSV4YWVF8F5BH32"),
|
|
39
|
+
* WithServerUrl("https://api.example.com")
|
|
40
|
+
* );
|
|
41
|
+
* ```
|
|
42
|
+
*
|
|
43
|
+
* Available options:
|
|
44
|
+
* - `WithAPIKey(key)` - API key authentication (mutually exclusive with JWT)
|
|
45
|
+
* - `WithJWTAccessToken(token)` - JWT authentication (mutually exclusive with API key)
|
|
46
|
+
* - `WithGroup(group)` - Group context (optional, works with both auth modes)
|
|
47
|
+
* - `WithServerUrl(url)` - Custom server URL (optional, defaults to production)
|
|
48
|
+
*/
|
|
49
|
+
export declare class UserProfileServiceWeb {
|
|
50
|
+
private _client;
|
|
51
|
+
private readonly _config;
|
|
52
|
+
private readonly _interceptors;
|
|
53
|
+
private readonly _validator;
|
|
54
|
+
/**
|
|
55
|
+
* Constructs an instance of UserProfileServiceWeb.
|
|
56
|
+
*
|
|
57
|
+
* Uses functional options pattern for flexible configuration:
|
|
58
|
+
* - `WithAPIKey(key)` - API key authentication
|
|
59
|
+
* - `WithJWTAccessToken(token)` - JWT authentication
|
|
60
|
+
* - `WithGroup(group)` - Group context (optional)
|
|
61
|
+
* - `WithServerUrl(url)` - Custom server URL (optional)
|
|
62
|
+
*
|
|
63
|
+
* @param {...ClientOption} opts - Variable number of configuration options
|
|
64
|
+
*/
|
|
65
|
+
constructor(...opts: ClientOption[]);
|
|
66
|
+
/**
|
|
67
|
+
* Returns a new client instance configured to send the specified group
|
|
68
|
+
* resource name in the request headers for subsequent API calls.
|
|
69
|
+
*
|
|
70
|
+
* This method creates a new client with the same authentication configuration
|
|
71
|
+
* but with the group context updated to the specified value.
|
|
72
|
+
*
|
|
73
|
+
* **Compatibility**: Works with all authentication modes:
|
|
74
|
+
* - **API key auth**: Creates new client with API key + new group
|
|
75
|
+
* - **JWT auth**: Creates new client with JWT + new group
|
|
76
|
+
* - **No auth**: Creates new client with standalone group interceptor
|
|
77
|
+
*
|
|
78
|
+
* @param {string} group - The operating group context to inject into the request
|
|
79
|
+
* in the format `groups/{ulid}` where {ulid} is a 26-character ULID.
|
|
80
|
+
* Example: 'groups/01ARZ3NDEKTSV4YWVF8F5BH32'
|
|
81
|
+
* @returns {UserProfileServiceWeb} A new, configured instance of the client.
|
|
82
|
+
* @throws {Error} If the group format is invalid
|
|
83
|
+
*/
|
|
84
|
+
withGroup(group: string): UserProfileServiceWeb;
|
|
85
|
+
/**
|
|
86
|
+
* Updates an existing user profile.
|
|
87
|
+
* @param {UpdateUserProfileRequest} request - The request object for updateuserprofile.
|
|
88
|
+
* @returns {Promise<UserProfile>} A promise that resolves with the user profile.
|
|
89
|
+
*/
|
|
90
|
+
updateUserProfile(request: UpdateUserProfileRequest): Promise<UserProfile>;
|
|
91
|
+
/**
|
|
92
|
+
* Retrieves an user profile.
|
|
93
|
+
* @param {GetUserProfileRequest} request - The request object for getuserprofile.
|
|
94
|
+
* @returns {Promise<UserProfile>} A promise that resolves with the user profile.
|
|
95
|
+
*/
|
|
96
|
+
getUserProfile(request: GetUserProfileRequest): Promise<UserProfile>;
|
|
97
|
+
/**
|
|
98
|
+
* Retrieves an user profile.
|
|
99
|
+
* @param {GetUserProfileByUserRequest} request - The request object for getuserprofilebyuser.
|
|
100
|
+
* @returns {Promise<UserProfile>} A promise that resolves with the user profile.
|
|
101
|
+
*/
|
|
102
|
+
getUserProfileByUser(request: GetUserProfileByUserRequest): Promise<UserProfile>;
|
|
103
|
+
/**
|
|
104
|
+
* Retrieves a list of user profiles.
|
|
105
|
+
* @param {ListUserProfilesRequest} request - The request object for listuserprofiles.
|
|
106
|
+
* @returns {Promise<ListUserProfilesResponse>} A promise that resolves with the list of user profiles.
|
|
107
|
+
*/
|
|
108
|
+
listUserProfiles(request: ListUserProfilesRequest): Promise<ListUserProfilesResponse>;
|
|
109
|
+
}
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Code generated by protoc-gen-meshts. DO NOT EDIT.
|
|
3
|
+
// @generated by protoc-gen-meshts v1
|
|
4
|
+
// @generated from file meshtrade/iam/user_profile/v1/service.proto (package meshtrade.iam.user_profile.v1, syntax proto3)
|
|
5
|
+
/* eslint-disable */
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.UserProfileServiceWeb = void 0;
|
|
8
|
+
const connect_1 = require("@connectrpc/connect");
|
|
9
|
+
const connect_web_1 = require("@connectrpc/connect-web");
|
|
10
|
+
const service_pb_1 = require("./service_pb");
|
|
11
|
+
const service_pb_2 = require("./service_pb");
|
|
12
|
+
const config_1 = require("../../../config");
|
|
13
|
+
const protovalidate_1 = require("@bufbuild/protovalidate");
|
|
14
|
+
const interceptors_1 = require("../../../interceptors");
|
|
15
|
+
/**
|
|
16
|
+
* Web client for interacting with the meshtrade.iam.user_profile.v1 user profile v1 API resource service.
|
|
17
|
+
* Uses Connect-ES with gRPC-Web transport for browser-based communication.
|
|
18
|
+
*
|
|
19
|
+
* Supports flexible authentication modes using functional options pattern:
|
|
20
|
+
*
|
|
21
|
+
* 1. **No Authentication** (public APIs):
|
|
22
|
+
* ```typescript
|
|
23
|
+
* const client = new UserProfileServiceWeb(
|
|
24
|
+
* WithServerUrl("http://localhost:10000")
|
|
25
|
+
* );
|
|
26
|
+
* ```
|
|
27
|
+
*
|
|
28
|
+
* 2. **API Key Authentication** (backend services):
|
|
29
|
+
* ```typescript
|
|
30
|
+
* const client = new UserProfileServiceWeb(
|
|
31
|
+
* WithAPIKey("your-api-key"),
|
|
32
|
+
* WithGroup("groups/01ARZ3NDEKTSV4YWVF8F5BH32"),
|
|
33
|
+
* WithServerUrl("https://api.example.com")
|
|
34
|
+
* );
|
|
35
|
+
* ```
|
|
36
|
+
*
|
|
37
|
+
* 3. **JWT Token Authentication** (Next.js frontend with user session):
|
|
38
|
+
* ```typescript
|
|
39
|
+
* const client = new UserProfileServiceWeb(
|
|
40
|
+
* WithJWTAccessToken("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."),
|
|
41
|
+
* WithServerUrl("https://api.example.com")
|
|
42
|
+
* );
|
|
43
|
+
* ```
|
|
44
|
+
*
|
|
45
|
+
* 4. **JWT with Group Context** (user session with specific group):
|
|
46
|
+
* ```typescript
|
|
47
|
+
* const client = new UserProfileServiceWeb(
|
|
48
|
+
* WithJWTAccessToken("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."),
|
|
49
|
+
* WithGroup("groups/01ARZ3NDEKTSV4YWVF8F5BH32"),
|
|
50
|
+
* WithServerUrl("https://api.example.com")
|
|
51
|
+
* );
|
|
52
|
+
* ```
|
|
53
|
+
*
|
|
54
|
+
* Available options:
|
|
55
|
+
* - `WithAPIKey(key)` - API key authentication (mutually exclusive with JWT)
|
|
56
|
+
* - `WithJWTAccessToken(token)` - JWT authentication (mutually exclusive with API key)
|
|
57
|
+
* - `WithGroup(group)` - Group context (optional, works with both auth modes)
|
|
58
|
+
* - `WithServerUrl(url)` - Custom server URL (optional, defaults to production)
|
|
59
|
+
*/
|
|
60
|
+
class UserProfileServiceWeb {
|
|
61
|
+
/**
|
|
62
|
+
* Constructs an instance of UserProfileServiceWeb.
|
|
63
|
+
*
|
|
64
|
+
* Uses functional options pattern for flexible configuration:
|
|
65
|
+
* - `WithAPIKey(key)` - API key authentication
|
|
66
|
+
* - `WithJWTAccessToken(token)` - JWT authentication
|
|
67
|
+
* - `WithGroup(group)` - Group context (optional)
|
|
68
|
+
* - `WithServerUrl(url)` - Custom server URL (optional)
|
|
69
|
+
*
|
|
70
|
+
* @param {...ClientOption} opts - Variable number of configuration options
|
|
71
|
+
*/
|
|
72
|
+
constructor(...opts) {
|
|
73
|
+
// Build configuration from options
|
|
74
|
+
this._config = (0, config_1.buildConfigFromOptions)(...opts);
|
|
75
|
+
// Initialize validator for request validation
|
|
76
|
+
this._validator = (0, protovalidate_1.createValidator)();
|
|
77
|
+
this._interceptors = [];
|
|
78
|
+
this._interceptors.push((0, interceptors_1.createLoggingInterceptor)());
|
|
79
|
+
if (this._config.apiKey) {
|
|
80
|
+
this._interceptors.push((0, interceptors_1.createApiKeyInterceptor)(this._config.apiKey));
|
|
81
|
+
}
|
|
82
|
+
if (this._config.jwtToken) {
|
|
83
|
+
this._interceptors.push((0, interceptors_1.createJwtInterceptor)(this._config.jwtToken));
|
|
84
|
+
}
|
|
85
|
+
if (this._config.group) {
|
|
86
|
+
this._interceptors.push((0, interceptors_1.createGroupInterceptor)(this._config.group));
|
|
87
|
+
}
|
|
88
|
+
// Create the gRPC-Web transport for browser with interceptors
|
|
89
|
+
// Custom fetch wrapper to include credentials for cookie-based authentication
|
|
90
|
+
const transport = (0, connect_web_1.createGrpcWebTransport)({
|
|
91
|
+
baseUrl: this._config.apiServerURL,
|
|
92
|
+
interceptors: this._interceptors,
|
|
93
|
+
fetch: (input, init) => fetch(input, { ...init, credentials: "include" }),
|
|
94
|
+
});
|
|
95
|
+
// Construct the Connect-ES client
|
|
96
|
+
this._client = (0, connect_1.createClient)(service_pb_1.UserProfileService, transport);
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Returns a new client instance configured to send the specified group
|
|
100
|
+
* resource name in the request headers for subsequent API calls.
|
|
101
|
+
*
|
|
102
|
+
* This method creates a new client with the same authentication configuration
|
|
103
|
+
* but with the group context updated to the specified value.
|
|
104
|
+
*
|
|
105
|
+
* **Compatibility**: Works with all authentication modes:
|
|
106
|
+
* - **API key auth**: Creates new client with API key + new group
|
|
107
|
+
* - **JWT auth**: Creates new client with JWT + new group
|
|
108
|
+
* - **No auth**: Creates new client with standalone group interceptor
|
|
109
|
+
*
|
|
110
|
+
* @param {string} group - The operating group context to inject into the request
|
|
111
|
+
* in the format `groups/{ulid}` where {ulid} is a 26-character ULID.
|
|
112
|
+
* Example: 'groups/01ARZ3NDEKTSV4YWVF8F5BH32'
|
|
113
|
+
* @returns {UserProfileServiceWeb} A new, configured instance of the client.
|
|
114
|
+
* @throws {Error} If the group format is invalid
|
|
115
|
+
*/
|
|
116
|
+
withGroup(group) {
|
|
117
|
+
// Build new options array with existing auth and updated group
|
|
118
|
+
const newOpts = [];
|
|
119
|
+
// Add server URL
|
|
120
|
+
newOpts.push((0, config_1.WithServerUrl)(this._config.apiServerURL));
|
|
121
|
+
// Add authentication (preserve existing mode)
|
|
122
|
+
if (this._config.apiKey) {
|
|
123
|
+
newOpts.push((0, config_1.WithAPIKey)(this._config.apiKey));
|
|
124
|
+
}
|
|
125
|
+
else if (this._config.jwtToken) {
|
|
126
|
+
newOpts.push((0, config_1.WithJWTAccessToken)(this._config.jwtToken));
|
|
127
|
+
}
|
|
128
|
+
// Add the new group
|
|
129
|
+
newOpts.push((0, config_1.WithGroup)(group));
|
|
130
|
+
// Return a new client instance with updated configuration
|
|
131
|
+
return new UserProfileServiceWeb(...newOpts);
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Updates an existing user profile.
|
|
135
|
+
* @param {UpdateUserProfileRequest} request - The request object for updateuserprofile.
|
|
136
|
+
* @returns {Promise<UserProfile>} A promise that resolves with the user profile.
|
|
137
|
+
*/
|
|
138
|
+
updateUserProfile(request) {
|
|
139
|
+
// Validate request
|
|
140
|
+
const result = this._validator.validate(service_pb_2.UpdateUserProfileRequestSchema, request);
|
|
141
|
+
if (result.kind === "invalid") {
|
|
142
|
+
const violations = result.violations.map(v => `${v.field.toString()}: ${v.message}`).join("; ");
|
|
143
|
+
throw new Error(`Validation failed: ${violations}`);
|
|
144
|
+
}
|
|
145
|
+
else if (result.kind === "error") {
|
|
146
|
+
throw result.error;
|
|
147
|
+
}
|
|
148
|
+
return this._client.updateUserProfile(request);
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* Retrieves an user profile.
|
|
152
|
+
* @param {GetUserProfileRequest} request - The request object for getuserprofile.
|
|
153
|
+
* @returns {Promise<UserProfile>} A promise that resolves with the user profile.
|
|
154
|
+
*/
|
|
155
|
+
getUserProfile(request) {
|
|
156
|
+
// Validate request
|
|
157
|
+
const result = this._validator.validate(service_pb_2.GetUserProfileRequestSchema, request);
|
|
158
|
+
if (result.kind === "invalid") {
|
|
159
|
+
const violations = result.violations.map(v => `${v.field.toString()}: ${v.message}`).join("; ");
|
|
160
|
+
throw new Error(`Validation failed: ${violations}`);
|
|
161
|
+
}
|
|
162
|
+
else if (result.kind === "error") {
|
|
163
|
+
throw result.error;
|
|
164
|
+
}
|
|
165
|
+
return this._client.getUserProfile(request);
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* Retrieves an user profile.
|
|
169
|
+
* @param {GetUserProfileByUserRequest} request - The request object for getuserprofilebyuser.
|
|
170
|
+
* @returns {Promise<UserProfile>} A promise that resolves with the user profile.
|
|
171
|
+
*/
|
|
172
|
+
getUserProfileByUser(request) {
|
|
173
|
+
// Validate request
|
|
174
|
+
const result = this._validator.validate(service_pb_2.GetUserProfileByUserRequestSchema, request);
|
|
175
|
+
if (result.kind === "invalid") {
|
|
176
|
+
const violations = result.violations.map(v => `${v.field.toString()}: ${v.message}`).join("; ");
|
|
177
|
+
throw new Error(`Validation failed: ${violations}`);
|
|
178
|
+
}
|
|
179
|
+
else if (result.kind === "error") {
|
|
180
|
+
throw result.error;
|
|
181
|
+
}
|
|
182
|
+
return this._client.getUserProfileByUser(request);
|
|
183
|
+
}
|
|
184
|
+
/**
|
|
185
|
+
* Retrieves a list of user profiles.
|
|
186
|
+
* @param {ListUserProfilesRequest} request - The request object for listuserprofiles.
|
|
187
|
+
* @returns {Promise<ListUserProfilesResponse>} A promise that resolves with the list of user profiles.
|
|
188
|
+
*/
|
|
189
|
+
listUserProfiles(request) {
|
|
190
|
+
// Validate request
|
|
191
|
+
const result = this._validator.validate(service_pb_2.ListUserProfilesRequestSchema, request);
|
|
192
|
+
if (result.kind === "invalid") {
|
|
193
|
+
const violations = result.violations.map(v => `${v.field.toString()}: ${v.message}`).join("; ");
|
|
194
|
+
throw new Error(`Validation failed: ${violations}`);
|
|
195
|
+
}
|
|
196
|
+
else if (result.kind === "error") {
|
|
197
|
+
throw result.error;
|
|
198
|
+
}
|
|
199
|
+
return this._client.listUserProfiles(request);
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
exports.UserProfileServiceWeb = UserProfileServiceWeb;
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import type { GenFile, GenMessage } from "@bufbuild/protobuf/codegenv2";
|
|
2
|
+
import type { Token } from "../../../type/v1/token_pb";
|
|
3
|
+
import type { Message } from "@bufbuild/protobuf";
|
|
4
|
+
/**
|
|
5
|
+
* Describes the file meshtrade/iam/user_profile/v1/user_profile.proto.
|
|
6
|
+
*/
|
|
7
|
+
export declare const file_meshtrade_iam_user_profile_v1_user_profile: GenFile;
|
|
8
|
+
/**
|
|
9
|
+
*
|
|
10
|
+
* A user_profile in the IAM user_profile service.
|
|
11
|
+
*
|
|
12
|
+
* Each User Profile belongs to a specific user
|
|
13
|
+
*
|
|
14
|
+
* @generated from message meshtrade.iam.user_profile.v1.UserProfile
|
|
15
|
+
*/
|
|
16
|
+
export type UserProfile = Message<"meshtrade.iam.user_profile.v1.UserProfile"> & {
|
|
17
|
+
/**
|
|
18
|
+
*
|
|
19
|
+
* The unique resource name for the user_profiles.
|
|
20
|
+
* Format: user_profiles/{ULIDv2}.
|
|
21
|
+
* This field is system-generated and immutable upon creation.
|
|
22
|
+
* Any value provided on creation is ignored.
|
|
23
|
+
*
|
|
24
|
+
* @generated from field: string name = 1;
|
|
25
|
+
*/
|
|
26
|
+
name: string;
|
|
27
|
+
/**
|
|
28
|
+
*
|
|
29
|
+
* The resource name of the parent group that owns this user_profile.
|
|
30
|
+
* This field is required on creation and establishes the direct ownership link.
|
|
31
|
+
* Format: groups/{ULIDv2}.
|
|
32
|
+
*
|
|
33
|
+
* @generated from field: string owner = 2;
|
|
34
|
+
*/
|
|
35
|
+
owner: string;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* Ownership hiearchy of groups that have access to this resource in the format groups/{group_id}.
|
|
39
|
+
* System set on creation.
|
|
40
|
+
*
|
|
41
|
+
* @generated from field: repeated string owners = 3;
|
|
42
|
+
*/
|
|
43
|
+
owners: string[];
|
|
44
|
+
/**
|
|
45
|
+
*
|
|
46
|
+
* The resource name of the user associated with this profile.
|
|
47
|
+
* Format: users/{ULIDv2}.
|
|
48
|
+
* This field links the user profile to a specific user resource.
|
|
49
|
+
* This field is required.
|
|
50
|
+
*
|
|
51
|
+
* @generated from field: string user = 4;
|
|
52
|
+
*/
|
|
53
|
+
user: string;
|
|
54
|
+
/**
|
|
55
|
+
*
|
|
56
|
+
* The locale/language preference for this user profile.
|
|
57
|
+
* Format: IETF BCP 47 language tag (e.g., "en", "en-US", "fr-FR", "zh-Hans-CN").
|
|
58
|
+
* Used for internationalization and localization of the user interface.
|
|
59
|
+
* This field is optional but must be a valid BCP 47 tag when provided.
|
|
60
|
+
*
|
|
61
|
+
* @generated from field: string locale = 5;
|
|
62
|
+
*/
|
|
63
|
+
locale: string;
|
|
64
|
+
/**
|
|
65
|
+
*
|
|
66
|
+
* URL to the user's profile picture or avatar image.
|
|
67
|
+
* Should be a valid HTTPS URL pointing to an accessible image resource.
|
|
68
|
+
* Used for displaying user identity in the application interface.
|
|
69
|
+
* This field is optional but must be a valid URI when provided.
|
|
70
|
+
*
|
|
71
|
+
* @generated from field: string profile_picture_url = 6;
|
|
72
|
+
*/
|
|
73
|
+
profilePictureUrl: string;
|
|
74
|
+
/**
|
|
75
|
+
*
|
|
76
|
+
* The display name shown for this user in the application.
|
|
77
|
+
* This field is required and represents how the user is identified to others.
|
|
78
|
+
* May be the user's full name, nickname, or preferred identifier.
|
|
79
|
+
*
|
|
80
|
+
* @generated from field: string display_name = 7;
|
|
81
|
+
*/
|
|
82
|
+
displayName: string;
|
|
83
|
+
/**
|
|
84
|
+
*
|
|
85
|
+
* The preferred currency token for displaying monetary values to this user.
|
|
86
|
+
* Used as the default currency for presenting prices, balances, and trading values.
|
|
87
|
+
* References a token from the meshtrade.type.v1.Token definition.
|
|
88
|
+
*
|
|
89
|
+
* @generated from field: meshtrade.type.v1.Token display_currency = 8;
|
|
90
|
+
*/
|
|
91
|
+
displayCurrency?: Token;
|
|
92
|
+
/**
|
|
93
|
+
*
|
|
94
|
+
* The currency token used for financial reporting and accounting purposes.
|
|
95
|
+
* This may differ from display_currency and is used for official records and statements.
|
|
96
|
+
* References a token from the meshtrade.type.v1.Token definition.
|
|
97
|
+
*
|
|
98
|
+
* @generated from field: meshtrade.type.v1.Token reporting_currency = 9;
|
|
99
|
+
*/
|
|
100
|
+
reportingCurrency?: Token;
|
|
101
|
+
};
|
|
102
|
+
/**
|
|
103
|
+
* Describes the message meshtrade.iam.user_profile.v1.UserProfile.
|
|
104
|
+
* Use `create(UserProfileSchema)` to create a new message.
|
|
105
|
+
*/
|
|
106
|
+
export declare const UserProfileSchema: GenMessage<UserProfile>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// @generated by protoc-gen-es v2.10.1 with parameter "target=ts"
|
|
3
|
+
// @generated from file meshtrade/iam/user_profile/v1/user_profile.proto (package meshtrade.iam.user_profile.v1, syntax proto3)
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.UserProfileSchema = exports.file_meshtrade_iam_user_profile_v1_user_profile = void 0;
|
|
7
|
+
const codegenv2_1 = require("@bufbuild/protobuf/codegenv2");
|
|
8
|
+
const validate_pb_1 = require("../../../../buf/validate/validate_pb");
|
|
9
|
+
const token_pb_1 = require("../../../type/v1/token_pb");
|
|
10
|
+
/**
|
|
11
|
+
* Describes the file meshtrade/iam/user_profile/v1/user_profile.proto.
|
|
12
|
+
*/
|
|
13
|
+
exports.file_meshtrade_iam_user_profile_v1_user_profile = (0, codegenv2_1.fileDesc)("CjBtZXNodHJhZGUvaWFtL3VzZXJfcHJvZmlsZS92MS91c2VyX3Byb2ZpbGUucHJvdG8SHW1lc2h0cmFkZS5pYW0udXNlcl9wcm9maWxlLnYxIsAJCgtVc2VyUHJvZmlsZRLEAQoEbmFtZRgBIAEoCUK1AbpIsQG6Aa0BChRuYW1lLmZvcm1hdC5vcHRpb25hbBI6bmFtZSBtdXN0IGJlIGVtcHR5IG9yIGluIHRoZSBmb3JtYXQgdXNlcl9wcm9maWxlcy97VUxJRHYyfRpZc2l6ZSh0aGlzKSA9PSAwIHx8IHRoaXMubWF0Y2hlcygnXnVzZXJfcHJvZmlsZXMvWzAxMjM0NTY3ODlBQkNERUZHSEpLTU5QUVJTVFZXWFlaXXsyNn0kJykSSwoFb3duZXIYAiABKAlCPLpIOcgBAXI0Mi9eZ3JvdXBzL1swMTIzNDU2Nzg5QUJDREVGR0hKS01OUFFSU1RWV1hZWl17MjZ9JJgBIRJOCgZvd25lcnMYAyADKAlCPrpIO5IBOCI2cjQyL15ncm91cHMvWzAxMjM0NTY3ODlBQkNERUZHSEpLTU5QUVJTVFZXWFlaXXsyNn0kmAEhEtkCCgR1c2VyGAQgASgJQsoCukjGAroBVgoNdXNlci5yZXF1aXJlZBI1dXNlciBpcyByZXF1aXJlZCBhbmQgbXVzdCBiZ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hbS51c2VyX3Byb2ZpbGUudjFaP2dpdGh1Yi5jb20vbWVzaHRyYWRlL2FwaS9nby9pYW0vdXNlcl9wcm9maWxlL3YxO3VzZXJfcHJvZmlsZV92MWIGcHJvdG8z", [validate_pb_1.file_buf_validate_validate, token_pb_1.file_meshtrade_type_v1_token]);
|
|
14
|
+
/**
|
|
15
|
+
* Describes the message meshtrade.iam.user_profile.v1.UserProfile.
|
|
16
|
+
* Use `create(UserProfileSchema)` to create a new message.
|
|
17
|
+
*/
|
|
18
|
+
exports.UserProfileSchema = (0, codegenv2_1.messageDesc)(exports.file_meshtrade_iam_user_profile_v1_user_profile, 0);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@meshtrade/api-web",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.41.0",
|
|
4
4
|
"description": "Mesh Typescript SDK",
|
|
5
5
|
"author": "Bernard Bussy <bernard@meshtrade.co>",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -36,6 +36,11 @@
|
|
|
36
36
|
"require": "./dist/meshtrade/iam/user/v1/index.js",
|
|
37
37
|
"import": "./dist/meshtrade/iam/user/v1/index.js"
|
|
38
38
|
},
|
|
39
|
+
"./iam/user_profile/v1": {
|
|
40
|
+
"types": "./dist/meshtrade/iam/user_profile/v1/index.d.ts",
|
|
41
|
+
"require": "./dist/meshtrade/iam/user_profile/v1/index.js",
|
|
42
|
+
"import": "./dist/meshtrade/iam/user_profile/v1/index.js"
|
|
43
|
+
},
|
|
39
44
|
"./type/v1": {
|
|
40
45
|
"types": "./dist/meshtrade/type/v1/index.d.ts",
|
|
41
46
|
"require": "./dist/meshtrade/type/v1/index.js",
|
|
@@ -46,6 +51,11 @@
|
|
|
46
51
|
"require": "./dist/meshtrade/ledger/transaction/v1/index.js",
|
|
47
52
|
"import": "./dist/meshtrade/ledger/transaction/v1/index.js"
|
|
48
53
|
},
|
|
54
|
+
"./market_data/price/v1": {
|
|
55
|
+
"types": "./dist/meshtrade/market_data/price/v1/index.d.ts",
|
|
56
|
+
"require": "./dist/meshtrade/market_data/price/v1/index.js",
|
|
57
|
+
"import": "./dist/meshtrade/market_data/price/v1/index.js"
|
|
58
|
+
},
|
|
49
59
|
"./compliance/client/v1": {
|
|
50
60
|
"types": "./dist/meshtrade/compliance/client/v1/index.d.ts",
|
|
51
61
|
"require": "./dist/meshtrade/compliance/client/v1/index.js",
|
|
@@ -116,12 +126,18 @@
|
|
|
116
126
|
"iam/user/v1": [
|
|
117
127
|
"dist/meshtrade/iam/user/v1/index.d.ts"
|
|
118
128
|
],
|
|
129
|
+
"iam/user_profile/v1": [
|
|
130
|
+
"dist/meshtrade/iam/user_profile/v1/index.d.ts"
|
|
131
|
+
],
|
|
119
132
|
"type/v1": [
|
|
120
133
|
"dist/meshtrade/type/v1/index.d.ts"
|
|
121
134
|
],
|
|
122
135
|
"ledger/transaction/v1": [
|
|
123
136
|
"dist/meshtrade/ledger/transaction/v1/index.d.ts"
|
|
124
137
|
],
|
|
138
|
+
"market_data/price/v1": [
|
|
139
|
+
"dist/meshtrade/market_data/price/v1/index.d.ts"
|
|
140
|
+
],
|
|
125
141
|
"compliance/client/v1": [
|
|
126
142
|
"dist/meshtrade/compliance/client/v1/index.d.ts"
|
|
127
143
|
],
|