@meshtrade/api-old 1.40.0 → 1.42.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 (30) hide show
  1. package/dist/meshtrade/compliance/client/v1/service_grpc_web_client_meshts.d.ts +7 -1
  2. package/dist/meshtrade/compliance/client/v1/service_grpc_web_client_meshts.js +8 -0
  3. package/dist/meshtrade/compliance/client/v1/service_grpc_web_pb.d.ts +12 -0
  4. package/dist/meshtrade/compliance/client/v1/service_grpc_web_pb.js +61 -0
  5. package/dist/meshtrade/compliance/client/v1/service_pb.d.ts +18 -0
  6. package/dist/meshtrade/compliance/client/v1/service_pb.js +152 -0
  7. package/dist/meshtrade/iam/role/v1/role.js +2 -0
  8. package/dist/meshtrade/iam/role/v1/role_pb.d.ts +2 -0
  9. package/dist/meshtrade/iam/role/v1/role_pb.js +2 -0
  10. package/dist/meshtrade/iam/user/v1/service_grpc_web_client_meshts.d.ts +1 -7
  11. package/dist/meshtrade/iam/user/v1/service_grpc_web_client_meshts.js +0 -8
  12. package/dist/meshtrade/iam/user/v1/service_grpc_web_pb.d.ts +0 -12
  13. package/dist/meshtrade/iam/user/v1/service_grpc_web_pb.js +0 -61
  14. package/dist/meshtrade/iam/user/v1/service_pb.d.ts +0 -67
  15. package/dist/meshtrade/iam/user/v1/service_pb.js +0 -567
  16. package/dist/meshtrade/iam/user/v1/user_pb.d.ts +32 -0
  17. package/dist/meshtrade/iam/user/v1/user_pb.js +270 -7
  18. package/dist/meshtrade/iam/user_profile/v1/index.d.ts +4 -0
  19. package/dist/meshtrade/iam/user_profile/v1/index.js +45 -0
  20. package/dist/meshtrade/iam/user_profile/v1/service_grpc_web_client_meshts.d.ts +53 -0
  21. package/dist/meshtrade/iam/user_profile/v1/service_grpc_web_client_meshts.js +96 -0
  22. package/dist/meshtrade/iam/user_profile/v1/service_grpc_web_pb.d.ts +68 -0
  23. package/dist/meshtrade/iam/user_profile/v1/service_grpc_web_pb.js +331 -0
  24. package/dist/meshtrade/iam/user_profile/v1/service_pb.d.ts +97 -0
  25. package/dist/meshtrade/iam/user_profile/v1/service_pb.js +812 -0
  26. package/dist/meshtrade/iam/user_profile/v1/user_profile_pb.d.ts +62 -0
  27. package/dist/meshtrade/iam/user_profile/v1/user_profile_pb.js +488 -0
  28. package/dist/meshtrade/option/method_options/v1/method_options_pb.d.ts +8 -0
  29. package/dist/meshtrade/option/method_options/v1/method_options_pb.js +40 -1
  30. package/package.json +1 -1
@@ -23,6 +23,7 @@ var global =
23
23
 
24
24
  var buf_validate_validate_pb = require('../../../../buf/validate/validate_pb.js');
25
25
  goog.object.extend(proto, buf_validate_validate_pb);
26
+ goog.exportSymbol('proto.meshtrade.iam.user.v1.MobileNumber', null, global);
26
27
  goog.exportSymbol('proto.meshtrade.iam.user.v1.User', null, global);
27
28
  /**
28
29
  * Generated by JsPbCodeGenerator.
@@ -45,13 +46,34 @@ if (goog.DEBUG && !COMPILED) {
45
46
  */
46
47
  proto.meshtrade.iam.user.v1.User.displayName = 'proto.meshtrade.iam.user.v1.User';
47
48
  }
49
+ /**
50
+ * Generated by JsPbCodeGenerator.
51
+ * @param {Array=} opt_data Optional initial data array, typically from a
52
+ * server response, or constructed directly in Javascript. The array is used
53
+ * in place and becomes part of the constructed object. It is not cloned.
54
+ * If no data is provided, the constructed object will be empty, but still
55
+ * valid.
56
+ * @extends {jspb.Message}
57
+ * @constructor
58
+ */
59
+ proto.meshtrade.iam.user.v1.MobileNumber = function(opt_data) {
60
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
61
+ };
62
+ goog.inherits(proto.meshtrade.iam.user.v1.MobileNumber, jspb.Message);
63
+ if (goog.DEBUG && !COMPILED) {
64
+ /**
65
+ * @public
66
+ * @override
67
+ */
68
+ proto.meshtrade.iam.user.v1.MobileNumber.displayName = 'proto.meshtrade.iam.user.v1.MobileNumber';
69
+ }
48
70
 
49
71
  /**
50
72
  * List of repeated fields within this message type.
51
73
  * @private {!Array<number>}
52
74
  * @const
53
75
  */
54
- proto.meshtrade.iam.user.v1.User.repeatedFields_ = [3,5];
76
+ proto.meshtrade.iam.user.v1.User.repeatedFields_ = [3,6];
55
77
 
56
78
 
57
79
 
@@ -88,7 +110,8 @@ name: jspb.Message.getFieldWithDefault(msg, 1, ""),
88
110
  owner: jspb.Message.getFieldWithDefault(msg, 2, ""),
89
111
  ownersList: (f = jspb.Message.getRepeatedField(msg, 3)) == null ? undefined : f,
90
112
  email: jspb.Message.getFieldWithDefault(msg, 4, ""),
91
- rolesList: (f = jspb.Message.getRepeatedField(msg, 5)) == null ? undefined : f
113
+ mobileNumber: (f = msg.getMobileNumber()) && proto.meshtrade.iam.user.v1.MobileNumber.toObject(includeInstance, f),
114
+ rolesList: (f = jspb.Message.getRepeatedField(msg, 6)) == null ? undefined : f
92
115
  };
93
116
 
94
117
  if (includeInstance) {
@@ -142,6 +165,11 @@ proto.meshtrade.iam.user.v1.User.deserializeBinaryFromReader = function(msg, rea
142
165
  msg.setEmail(value);
143
166
  break;
144
167
  case 5:
168
+ var value = new proto.meshtrade.iam.user.v1.MobileNumber;
169
+ reader.readMessage(value,proto.meshtrade.iam.user.v1.MobileNumber.deserializeBinaryFromReader);
170
+ msg.setMobileNumber(value);
171
+ break;
172
+ case 6:
145
173
  var value = /** @type {string} */ (reader.readString());
146
174
  msg.addRoles(value);
147
175
  break;
@@ -202,10 +230,18 @@ proto.meshtrade.iam.user.v1.User.serializeBinaryToWriter = function(message, wri
202
230
  f
203
231
  );
204
232
  }
233
+ f = message.getMobileNumber();
234
+ if (f != null) {
235
+ writer.writeMessage(
236
+ 5,
237
+ f,
238
+ proto.meshtrade.iam.user.v1.MobileNumber.serializeBinaryToWriter
239
+ );
240
+ }
205
241
  f = message.getRolesList();
206
242
  if (f.length > 0) {
207
243
  writer.writeRepeatedString(
208
- 5,
244
+ 6,
209
245
  f
210
246
  );
211
247
  }
@@ -304,11 +340,48 @@ proto.meshtrade.iam.user.v1.User.prototype.setEmail = function(value) {
304
340
 
305
341
 
306
342
  /**
307
- * repeated string roles = 5;
343
+ * optional MobileNumber mobile_number = 5;
344
+ * @return {?proto.meshtrade.iam.user.v1.MobileNumber}
345
+ */
346
+ proto.meshtrade.iam.user.v1.User.prototype.getMobileNumber = function() {
347
+ return /** @type{?proto.meshtrade.iam.user.v1.MobileNumber} */ (
348
+ jspb.Message.getWrapperField(this, proto.meshtrade.iam.user.v1.MobileNumber, 5));
349
+ };
350
+
351
+
352
+ /**
353
+ * @param {?proto.meshtrade.iam.user.v1.MobileNumber|undefined} value
354
+ * @return {!proto.meshtrade.iam.user.v1.User} returns this
355
+ */
356
+ proto.meshtrade.iam.user.v1.User.prototype.setMobileNumber = function(value) {
357
+ return jspb.Message.setWrapperField(this, 5, value);
358
+ };
359
+
360
+
361
+ /**
362
+ * Clears the message field making it undefined.
363
+ * @return {!proto.meshtrade.iam.user.v1.User} returns this
364
+ */
365
+ proto.meshtrade.iam.user.v1.User.prototype.clearMobileNumber = function() {
366
+ return this.setMobileNumber(undefined);
367
+ };
368
+
369
+
370
+ /**
371
+ * Returns whether this field is set.
372
+ * @return {boolean}
373
+ */
374
+ proto.meshtrade.iam.user.v1.User.prototype.hasMobileNumber = function() {
375
+ return jspb.Message.getField(this, 5) != null;
376
+ };
377
+
378
+
379
+ /**
380
+ * repeated string roles = 6;
308
381
  * @return {!Array<string>}
309
382
  */
310
383
  proto.meshtrade.iam.user.v1.User.prototype.getRolesList = function() {
311
- return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 5));
384
+ return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 6));
312
385
  };
313
386
 
314
387
 
@@ -317,7 +390,7 @@ proto.meshtrade.iam.user.v1.User.prototype.getRolesList = function() {
317
390
  * @return {!proto.meshtrade.iam.user.v1.User} returns this
318
391
  */
319
392
  proto.meshtrade.iam.user.v1.User.prototype.setRolesList = function(value) {
320
- return jspb.Message.setField(this, 5, value || []);
393
+ return jspb.Message.setField(this, 6, value || []);
321
394
  };
322
395
 
323
396
 
@@ -327,7 +400,7 @@ proto.meshtrade.iam.user.v1.User.prototype.setRolesList = function(value) {
327
400
  * @return {!proto.meshtrade.iam.user.v1.User} returns this
328
401
  */
329
402
  proto.meshtrade.iam.user.v1.User.prototype.addRoles = function(value, opt_index) {
330
- return jspb.Message.addToRepeatedField(this, 5, value, opt_index);
403
+ return jspb.Message.addToRepeatedField(this, 6, value, opt_index);
331
404
  };
332
405
 
333
406
 
@@ -340,4 +413,194 @@ proto.meshtrade.iam.user.v1.User.prototype.clearRolesList = function() {
340
413
  };
341
414
 
342
415
 
416
+
417
+
418
+
419
+ if (jspb.Message.GENERATE_TO_OBJECT) {
420
+ /**
421
+ * Creates an object representation of this proto.
422
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
423
+ * Optional fields that are not set will be set to undefined.
424
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
425
+ * For the list of reserved names please see:
426
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
427
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
428
+ * JSPB instance for transitional soy proto support:
429
+ * http://goto/soy-param-migration
430
+ * @return {!Object}
431
+ */
432
+ proto.meshtrade.iam.user.v1.MobileNumber.prototype.toObject = function(opt_includeInstance) {
433
+ return proto.meshtrade.iam.user.v1.MobileNumber.toObject(opt_includeInstance, this);
434
+ };
435
+
436
+
437
+ /**
438
+ * Static version of the {@see toObject} method.
439
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
440
+ * the JSPB instance for transitional soy proto support:
441
+ * http://goto/soy-param-migration
442
+ * @param {!proto.meshtrade.iam.user.v1.MobileNumber} msg The msg instance to transform.
443
+ * @return {!Object}
444
+ * @suppress {unusedLocalVariables} f is only used for nested messages
445
+ */
446
+ proto.meshtrade.iam.user.v1.MobileNumber.toObject = function(includeInstance, msg) {
447
+ var f, obj = {
448
+ value: jspb.Message.getFieldWithDefault(msg, 1, ""),
449
+ verified: jspb.Message.getBooleanFieldWithDefault(msg, 2, false),
450
+ resetReason: jspb.Message.getFieldWithDefault(msg, 3, "")
451
+ };
452
+
453
+ if (includeInstance) {
454
+ obj.$jspbMessageInstance = msg;
455
+ }
456
+ return obj;
457
+ };
458
+ }
459
+
460
+
461
+ /**
462
+ * Deserializes binary data (in protobuf wire format).
463
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
464
+ * @return {!proto.meshtrade.iam.user.v1.MobileNumber}
465
+ */
466
+ proto.meshtrade.iam.user.v1.MobileNumber.deserializeBinary = function(bytes) {
467
+ var reader = new jspb.BinaryReader(bytes);
468
+ var msg = new proto.meshtrade.iam.user.v1.MobileNumber;
469
+ return proto.meshtrade.iam.user.v1.MobileNumber.deserializeBinaryFromReader(msg, reader);
470
+ };
471
+
472
+
473
+ /**
474
+ * Deserializes binary data (in protobuf wire format) from the
475
+ * given reader into the given message object.
476
+ * @param {!proto.meshtrade.iam.user.v1.MobileNumber} msg The message object to deserialize into.
477
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
478
+ * @return {!proto.meshtrade.iam.user.v1.MobileNumber}
479
+ */
480
+ proto.meshtrade.iam.user.v1.MobileNumber.deserializeBinaryFromReader = function(msg, reader) {
481
+ while (reader.nextField()) {
482
+ if (reader.isEndGroup()) {
483
+ break;
484
+ }
485
+ var field = reader.getFieldNumber();
486
+ switch (field) {
487
+ case 1:
488
+ var value = /** @type {string} */ (reader.readString());
489
+ msg.setValue(value);
490
+ break;
491
+ case 2:
492
+ var value = /** @type {boolean} */ (reader.readBool());
493
+ msg.setVerified(value);
494
+ break;
495
+ case 3:
496
+ var value = /** @type {string} */ (reader.readString());
497
+ msg.setResetReason(value);
498
+ break;
499
+ default:
500
+ reader.skipField();
501
+ break;
502
+ }
503
+ }
504
+ return msg;
505
+ };
506
+
507
+
508
+ /**
509
+ * Serializes the message to binary data (in protobuf wire format).
510
+ * @return {!Uint8Array}
511
+ */
512
+ proto.meshtrade.iam.user.v1.MobileNumber.prototype.serializeBinary = function() {
513
+ var writer = new jspb.BinaryWriter();
514
+ proto.meshtrade.iam.user.v1.MobileNumber.serializeBinaryToWriter(this, writer);
515
+ return writer.getResultBuffer();
516
+ };
517
+
518
+
519
+ /**
520
+ * Serializes the given message to binary data (in protobuf wire
521
+ * format), writing to the given BinaryWriter.
522
+ * @param {!proto.meshtrade.iam.user.v1.MobileNumber} message
523
+ * @param {!jspb.BinaryWriter} writer
524
+ * @suppress {unusedLocalVariables} f is only used for nested messages
525
+ */
526
+ proto.meshtrade.iam.user.v1.MobileNumber.serializeBinaryToWriter = function(message, writer) {
527
+ var f = undefined;
528
+ f = message.getValue();
529
+ if (f.length > 0) {
530
+ writer.writeString(
531
+ 1,
532
+ f
533
+ );
534
+ }
535
+ f = message.getVerified();
536
+ if (f) {
537
+ writer.writeBool(
538
+ 2,
539
+ f
540
+ );
541
+ }
542
+ f = message.getResetReason();
543
+ if (f.length > 0) {
544
+ writer.writeString(
545
+ 3,
546
+ f
547
+ );
548
+ }
549
+ };
550
+
551
+
552
+ /**
553
+ * optional string value = 1;
554
+ * @return {string}
555
+ */
556
+ proto.meshtrade.iam.user.v1.MobileNumber.prototype.getValue = function() {
557
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
558
+ };
559
+
560
+
561
+ /**
562
+ * @param {string} value
563
+ * @return {!proto.meshtrade.iam.user.v1.MobileNumber} returns this
564
+ */
565
+ proto.meshtrade.iam.user.v1.MobileNumber.prototype.setValue = function(value) {
566
+ return jspb.Message.setProto3StringField(this, 1, value);
567
+ };
568
+
569
+
570
+ /**
571
+ * optional bool verified = 2;
572
+ * @return {boolean}
573
+ */
574
+ proto.meshtrade.iam.user.v1.MobileNumber.prototype.getVerified = function() {
575
+ return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false));
576
+ };
577
+
578
+
579
+ /**
580
+ * @param {boolean} value
581
+ * @return {!proto.meshtrade.iam.user.v1.MobileNumber} returns this
582
+ */
583
+ proto.meshtrade.iam.user.v1.MobileNumber.prototype.setVerified = function(value) {
584
+ return jspb.Message.setProto3BooleanField(this, 2, value);
585
+ };
586
+
587
+
588
+ /**
589
+ * optional string reset_reason = 3;
590
+ * @return {string}
591
+ */
592
+ proto.meshtrade.iam.user.v1.MobileNumber.prototype.getResetReason = function() {
593
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
594
+ };
595
+
596
+
597
+ /**
598
+ * @param {string} value
599
+ * @return {!proto.meshtrade.iam.user.v1.MobileNumber} returns this
600
+ */
601
+ proto.meshtrade.iam.user.v1.MobileNumber.prototype.setResetReason = function(value) {
602
+ return jspb.Message.setProto3StringField(this, 3, value);
603
+ };
604
+
605
+
343
606
  goog.object.extend(exports, proto.meshtrade.iam.user.v1);
@@ -0,0 +1,4 @@
1
+ export * from "./service_grpc_web_client_meshts";
2
+ export * from "./service_grpc_web_pb";
3
+ export * from "./service_pb";
4
+ export * from "./user_profile_pb";
@@ -0,0 +1,45 @@
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_grpc_web_client_meshts"), exports);
30
+ __exportStar(require("./service_grpc_web_pb"), exports);
31
+ __exportStar(require("./service_pb"), exports);
32
+ __exportStar(require("./user_profile_pb"), exports);
33
+ // ===================================================================
34
+ // END OF AUTO-GENERATED SECTION
35
+ // ===================================================================
36
+ //
37
+ // MANUAL EXPORTS - ADD YOUR CUSTOM EXPORTS BELOW
38
+ //
39
+ // You can safely add your own export statements in this section.
40
+ // They will be preserved across code generation.
41
+ //
42
+ // Example:
43
+ // export * from "./my_custom_module";
44
+ // export { MyCustomClass } from "./another_module";
45
+ // ===================================================================
@@ -0,0 +1,53 @@
1
+ import { GetUserProfileByUserRequest, GetUserProfileRequest, ListUserProfilesRequest, ListUserProfilesResponse, UpdateUserProfileRequest } from "./service_pb";
2
+ import { UserProfile } from "./user_profile_pb";
3
+ import { UnaryInterceptor } from "grpc-web";
4
+ import { ConfigOpts } from "../../../common/config";
5
+ /**
6
+ * Client for interacting with the meshtrade.iam.user_profile.v1 user profile v1 API resource service.
7
+ */
8
+ export declare class UserProfileServiceGrpcWebClientV1 {
9
+ private _service;
10
+ private readonly _config;
11
+ private readonly _interceptors;
12
+ /**
13
+ * Constructs an instance of UserProfileServiceGrpcWebClientV1.
14
+ * @param {ConfigOpts} [config] - Optional configuration for the client.
15
+ * @param {UnaryInterceptor<any, any>[]} [interceptors] - For internal use by `withGroup`.
16
+ */
17
+ constructor(config?: ConfigOpts, interceptors?: UnaryInterceptor<any, any>[]);
18
+ /**
19
+ * Returns a new client instance configured to send the specified group
20
+ * resource name in the request headers for subsequent API calls.
21
+ *
22
+ * @param {string} group - The operating group context to inject into the request
23
+ * in the format `groups/{ulid}` where {ulid} is a 26-character ULID.
24
+ * Example: 'groups/01ARZ3NDEKTSV4YWVF8F5BH32'
25
+ * @returns {UserProfileServiceGrpcWebClientV1} A new, configured instance of the client.
26
+ * @throws {Error} If the group format is invalid (validation occurs in GroupHeaderInterceptor)
27
+ */
28
+ withGroup(group: string): UserProfileServiceGrpcWebClientV1;
29
+ /**
30
+ * Updates an existing user profile.
31
+ * @param {UpdateUserProfileRequest} request - The request object for updateuserprofile.
32
+ * @returns {Promise<UserProfile>} A promise that resolves with the user profile.
33
+ */
34
+ updateUserProfile(request: UpdateUserProfileRequest): Promise<UserProfile>;
35
+ /**
36
+ * Retrieves an user profile.
37
+ * @param {GetUserProfileRequest} request - The request object for getuserprofile.
38
+ * @returns {Promise<UserProfile>} A promise that resolves with the user profile.
39
+ */
40
+ getUserProfile(request: GetUserProfileRequest): Promise<UserProfile>;
41
+ /**
42
+ * Retrieves an user profile.
43
+ * @param {GetUserProfileByUserRequest} request - The request object for getuserprofilebyuser.
44
+ * @returns {Promise<UserProfile>} A promise that resolves with the user profile.
45
+ */
46
+ getUserProfileByUser(request: GetUserProfileByUserRequest): Promise<UserProfile>;
47
+ /**
48
+ * Retrieves a list of user profiles.
49
+ * @param {ListUserProfilesRequest} request - The request object for listuserprofiles.
50
+ * @returns {Promise<ListUserProfilesResponse>} A promise that resolves with the list of user profiles.
51
+ */
52
+ listUserProfiles(request: ListUserProfilesRequest): Promise<ListUserProfilesResponse>;
53
+ }
@@ -0,0 +1,96 @@
1
+ "use strict";
2
+ // @generated by protoc-gen-meshts v1
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.UserProfileServiceGrpcWebClientV1 = void 0;
7
+ const grpc_web_1 = require("../../../common/grpc_web");
8
+ const service_grpc_web_pb_1 = require("./service_grpc_web_pb");
9
+ const config_1 = require("../../../common/config");
10
+ const groupHeaderInterceptor_1 = require("../../../common/groupHeaderInterceptor");
11
+ /**
12
+ * Validates that a request object is not null or undefined.
13
+ * @param {any} request - The request object to validate
14
+ * @throws {Error} If the request is null or undefined
15
+ */
16
+ function validateRequest(request) {
17
+ if (!request) {
18
+ throw new Error('Request cannot be null or undefined');
19
+ }
20
+ }
21
+ /**
22
+ * Client for interacting with the meshtrade.iam.user_profile.v1 user profile v1 API resource service.
23
+ */
24
+ class UserProfileServiceGrpcWebClientV1 {
25
+ /**
26
+ * Constructs an instance of UserProfileServiceGrpcWebClientV1.
27
+ * @param {ConfigOpts} [config] - Optional configuration for the client.
28
+ * @param {UnaryInterceptor<any, any>[]} [interceptors] - For internal use by `withGroup`.
29
+ */
30
+ constructor(config, interceptors) {
31
+ this._config = (0, config_1.getConfigFromOpts)(config);
32
+ this._interceptors = interceptors || [new grpc_web_1.LoggingInterceptor()];
33
+ // Construct the underlying gRPC-web service client
34
+ this._service = new service_grpc_web_pb_1.UserProfileServicePromiseClient(this._config.apiServerURL, null, {
35
+ withCredentials: true,
36
+ unaryInterceptors: this._interceptors,
37
+ });
38
+ }
39
+ /**
40
+ * Returns a new client instance configured to send the specified group
41
+ * resource name in the request headers for subsequent API calls.
42
+ *
43
+ * @param {string} group - The operating group context to inject into the request
44
+ * in the format `groups/{ulid}` where {ulid} is a 26-character ULID.
45
+ * Example: 'groups/01ARZ3NDEKTSV4YWVF8F5BH32'
46
+ * @returns {UserProfileServiceGrpcWebClientV1} A new, configured instance of the client.
47
+ * @throws {Error} If the group format is invalid (validation occurs in GroupHeaderInterceptor)
48
+ */
49
+ withGroup(group) {
50
+ // Check if a GroupHeaderInterceptor already exists.
51
+ const hasGroupInterceptor = this._interceptors.some((interceptor) => interceptor instanceof groupHeaderInterceptor_1.GroupHeaderInterceptor);
52
+ if (hasGroupInterceptor) {
53
+ throw new Error("Attempted to set group context twice. A group has already been set for this client instance.");
54
+ }
55
+ // Create a new interceptor for the group context
56
+ const groupInterceptor = new groupHeaderInterceptor_1.GroupHeaderInterceptor(group);
57
+ // Return a new client instance with the existing interceptors plus the new one
58
+ return new UserProfileServiceGrpcWebClientV1(this._config, [
59
+ ...this._interceptors,
60
+ groupInterceptor,
61
+ ]);
62
+ }
63
+ /**
64
+ * Updates an existing user profile.
65
+ * @param {UpdateUserProfileRequest} request - The request object for updateuserprofile.
66
+ * @returns {Promise<UserProfile>} A promise that resolves with the user profile.
67
+ */
68
+ updateUserProfile(request) {
69
+ return this._service.updateUserProfile(request);
70
+ }
71
+ /**
72
+ * Retrieves an user profile.
73
+ * @param {GetUserProfileRequest} request - The request object for getuserprofile.
74
+ * @returns {Promise<UserProfile>} A promise that resolves with the user profile.
75
+ */
76
+ getUserProfile(request) {
77
+ return this._service.getUserProfile(request);
78
+ }
79
+ /**
80
+ * Retrieves an user profile.
81
+ * @param {GetUserProfileByUserRequest} request - The request object for getuserprofilebyuser.
82
+ * @returns {Promise<UserProfile>} A promise that resolves with the user profile.
83
+ */
84
+ getUserProfileByUser(request) {
85
+ return this._service.getUserProfileByUser(request);
86
+ }
87
+ /**
88
+ * Retrieves a list of user profiles.
89
+ * @param {ListUserProfilesRequest} request - The request object for listuserprofiles.
90
+ * @returns {Promise<ListUserProfilesResponse>} A promise that resolves with the list of user profiles.
91
+ */
92
+ listUserProfiles(request) {
93
+ return this._service.listUserProfiles(request);
94
+ }
95
+ }
96
+ exports.UserProfileServiceGrpcWebClientV1 = UserProfileServiceGrpcWebClientV1;
@@ -0,0 +1,68 @@
1
+ import * as grpcWeb from 'grpc-web';
2
+
3
+ import * as meshtrade_iam_user_profile_v1_service_pb from '../../../../meshtrade/iam/user_profile/v1/service_pb'; // proto import: "meshtrade/iam/user_profile/v1/service.proto"
4
+ import * as meshtrade_iam_user_profile_v1_user_profile_pb from '../../../../meshtrade/iam/user_profile/v1/user_profile_pb'; // proto import: "meshtrade/iam/user_profile/v1/user_profile.proto"
5
+
6
+
7
+ export class UserProfileServiceClient {
8
+ constructor (hostname: string,
9
+ credentials?: null | { [index: string]: string; },
10
+ options?: null | { [index: string]: any; });
11
+
12
+ updateUserProfile(
13
+ request: meshtrade_iam_user_profile_v1_service_pb.UpdateUserProfileRequest,
14
+ metadata: grpcWeb.Metadata | undefined,
15
+ callback: (err: grpcWeb.RpcError,
16
+ response: meshtrade_iam_user_profile_v1_user_profile_pb.UserProfile) => void
17
+ ): grpcWeb.ClientReadableStream<meshtrade_iam_user_profile_v1_user_profile_pb.UserProfile>;
18
+
19
+ getUserProfile(
20
+ request: meshtrade_iam_user_profile_v1_service_pb.GetUserProfileRequest,
21
+ metadata: grpcWeb.Metadata | undefined,
22
+ callback: (err: grpcWeb.RpcError,
23
+ response: meshtrade_iam_user_profile_v1_user_profile_pb.UserProfile) => void
24
+ ): grpcWeb.ClientReadableStream<meshtrade_iam_user_profile_v1_user_profile_pb.UserProfile>;
25
+
26
+ getUserProfileByUser(
27
+ request: meshtrade_iam_user_profile_v1_service_pb.GetUserProfileByUserRequest,
28
+ metadata: grpcWeb.Metadata | undefined,
29
+ callback: (err: grpcWeb.RpcError,
30
+ response: meshtrade_iam_user_profile_v1_user_profile_pb.UserProfile) => void
31
+ ): grpcWeb.ClientReadableStream<meshtrade_iam_user_profile_v1_user_profile_pb.UserProfile>;
32
+
33
+ listUserProfiles(
34
+ request: meshtrade_iam_user_profile_v1_service_pb.ListUserProfilesRequest,
35
+ metadata: grpcWeb.Metadata | undefined,
36
+ callback: (err: grpcWeb.RpcError,
37
+ response: meshtrade_iam_user_profile_v1_service_pb.ListUserProfilesResponse) => void
38
+ ): grpcWeb.ClientReadableStream<meshtrade_iam_user_profile_v1_service_pb.ListUserProfilesResponse>;
39
+
40
+ }
41
+
42
+ export class UserProfileServicePromiseClient {
43
+ constructor (hostname: string,
44
+ credentials?: null | { [index: string]: string; },
45
+ options?: null | { [index: string]: any; });
46
+
47
+ updateUserProfile(
48
+ request: meshtrade_iam_user_profile_v1_service_pb.UpdateUserProfileRequest,
49
+ metadata?: grpcWeb.Metadata
50
+ ): Promise<meshtrade_iam_user_profile_v1_user_profile_pb.UserProfile>;
51
+
52
+ getUserProfile(
53
+ request: meshtrade_iam_user_profile_v1_service_pb.GetUserProfileRequest,
54
+ metadata?: grpcWeb.Metadata
55
+ ): Promise<meshtrade_iam_user_profile_v1_user_profile_pb.UserProfile>;
56
+
57
+ getUserProfileByUser(
58
+ request: meshtrade_iam_user_profile_v1_service_pb.GetUserProfileByUserRequest,
59
+ metadata?: grpcWeb.Metadata
60
+ ): Promise<meshtrade_iam_user_profile_v1_user_profile_pb.UserProfile>;
61
+
62
+ listUserProfiles(
63
+ request: meshtrade_iam_user_profile_v1_service_pb.ListUserProfilesRequest,
64
+ metadata?: grpcWeb.Metadata
65
+ ): Promise<meshtrade_iam_user_profile_v1_service_pb.ListUserProfilesResponse>;
66
+
67
+ }
68
+