@nebius/js-sdk 0.2.65 → 0.2.67

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.
@@ -16464,6 +16464,319 @@ export class InvitationService {
16464
16464
  return new SDKRequestClass(this.sdk, spec, this.addr, deserialize, request, metadata, options);
16465
16465
  }
16466
16466
  }
16467
+ const CreateInvitationToGroupsRequest_MESSAGE_DESCRIPTOR = {
16468
+ fields: {
16469
+ "metadata": { pbName: "metadata", message: () => ResourceMetadata.$descriptor },
16470
+ "spec": { pbName: "spec", message: () => InvitationSpec.$descriptor },
16471
+ "noSend": { pbName: "no_send", scalarType: 8 },
16472
+ "groupIds": { pbName: "group_ids", scalarType: 9, repeated: true },
16473
+ "expiresIn": { pbName: "expires_in", message: () => wkt[".google.protobuf.Duration"].$descriptor },
16474
+ },
16475
+ };
16476
+ /** Encodes, decodes, converts, and creates {@link CreateInvitationToGroupsRequest} messages. */
16477
+ export const CreateInvitationToGroupsRequest = {
16478
+ $type: "nebius.iam.v1.CreateInvitationToGroupsRequest",
16479
+ $descriptor: CreateInvitationToGroupsRequest_MESSAGE_DESCRIPTOR,
16480
+ encode(message, writer = new BinaryWriter()) {
16481
+ if (message.metadata !== undefined) {
16482
+ const w = writer.uint32(10).fork();
16483
+ ResourceMetadata.encode(message.metadata, w);
16484
+ w.join();
16485
+ }
16486
+ if (message.spec !== undefined) {
16487
+ const w = writer.uint32(18).fork();
16488
+ InvitationSpec.encode(message.spec, w);
16489
+ w.join();
16490
+ }
16491
+ if (message.noSend === true) {
16492
+ writer.uint32(24).bool(message.noSend);
16493
+ }
16494
+ for (const v of (message.groupIds ?? [])) {
16495
+ writer.uint32(34).string(v);
16496
+ }
16497
+ if (message.expiresIn !== undefined) {
16498
+ const w = writer.uint32(42).fork();
16499
+ wkt[".google.protobuf.Duration"].writeMessage(w, message.expiresIn);
16500
+ w.join();
16501
+ }
16502
+ if (message[unknownFieldsSymbol]) {
16503
+ writer.raw(message[unknownFieldsSymbol]);
16504
+ }
16505
+ return writer;
16506
+ },
16507
+ decode(input, length) {
16508
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
16509
+ const end = length === undefined ? reader.len : reader.pos + length;
16510
+ const message = createBaseCreateInvitationToGroupsRequest();
16511
+ let writer = undefined;
16512
+ while (reader.pos < end) {
16513
+ const tag = reader.uint32();
16514
+ switch (tag >>> 3) {
16515
+ case 1: {
16516
+ if (tag !== 10)
16517
+ break;
16518
+ message.metadata = ResourceMetadata.decode(reader, reader.uint32());
16519
+ continue;
16520
+ }
16521
+ case 2: {
16522
+ if (tag !== 18)
16523
+ break;
16524
+ message.spec = InvitationSpec.decode(reader, reader.uint32());
16525
+ continue;
16526
+ }
16527
+ case 3: {
16528
+ if (tag !== 24)
16529
+ break;
16530
+ message.noSend = reader.bool();
16531
+ continue;
16532
+ }
16533
+ case 4: {
16534
+ if (tag !== 34)
16535
+ break;
16536
+ message.groupIds.push(reader.string());
16537
+ continue;
16538
+ }
16539
+ case 5: {
16540
+ if (tag !== 42)
16541
+ break;
16542
+ const len = reader.uint32();
16543
+ message.expiresIn = wkt[".google.protobuf.Duration"].readMessage(reader, len);
16544
+ continue;
16545
+ }
16546
+ default:
16547
+ break;
16548
+ }
16549
+ if ((tag & 7) === 4 || tag === 0) {
16550
+ break;
16551
+ }
16552
+ {
16553
+ if (!writer)
16554
+ writer = new BinaryWriter();
16555
+ const skipped = reader.skip(tag & 7, tag >>> 3);
16556
+ writer.uint32(tag).raw(skipped);
16557
+ }
16558
+ }
16559
+ if (writer) {
16560
+ message[unknownFieldsSymbol] = writer.finish();
16561
+ }
16562
+ return message;
16563
+ },
16564
+ fromJSON(object) {
16565
+ return applyCreateInvitationToGroupsRequestCustom({
16566
+ $type: "nebius.iam.v1.CreateInvitationToGroupsRequest",
16567
+ metadata: isSet(object.metadata ?? object.metadata)
16568
+ ? ResourceMetadata.fromJSON(object.metadata ?? object.metadata)
16569
+ : undefined,
16570
+ spec: isSet(object.spec ?? object.spec)
16571
+ ? InvitationSpec.fromJSON(object.spec ?? object.spec)
16572
+ : undefined,
16573
+ noSend: isSet(object.noSend ?? object.no_send)
16574
+ ? Boolean(object.noSend ?? object.no_send)
16575
+ : false,
16576
+ groupIds: globalThis.Array.isArray(object?.groupIds ?? object?.group_ids)
16577
+ ? (object.groupIds ?? object.group_ids).map((e) => String(e))
16578
+ : [],
16579
+ expiresIn: isSet(object.expiresIn ?? object.expires_in)
16580
+ ? wkt[".google.protobuf.Duration"].fromJSON(object.expiresIn ?? object.expires_in)
16581
+ : undefined,
16582
+ });
16583
+ },
16584
+ toJSON(message, use = "json") {
16585
+ const obj = {};
16586
+ const pick = (json, pb) => (use === "json" ? json : pb);
16587
+ if (message.metadata !== undefined) {
16588
+ obj[pick("metadata", "metadata")] = message.metadata
16589
+ ? ResourceMetadata.toJSON(message.metadata, use)
16590
+ : undefined;
16591
+ }
16592
+ if (message.spec !== undefined) {
16593
+ obj[pick("spec", "spec")] = message.spec
16594
+ ? InvitationSpec.toJSON(message.spec, use)
16595
+ : undefined;
16596
+ }
16597
+ if (message.noSend === true) {
16598
+ obj[pick("noSend", "no_send")] = message.noSend;
16599
+ }
16600
+ if (message.groupIds?.length) {
16601
+ obj[pick("groupIds", "group_ids")] = message.groupIds.map((e) => e);
16602
+ }
16603
+ if (message.expiresIn !== undefined) {
16604
+ obj[pick("expiresIn", "expires_in")] = wkt[".google.protobuf.Duration"].toJSON(message.expiresIn, use);
16605
+ }
16606
+ return obj;
16607
+ },
16608
+ create(base) {
16609
+ return CreateInvitationToGroupsRequest.fromPartial(base ?? {});
16610
+ },
16611
+ fromPartial(object) {
16612
+ const message = createBaseCreateInvitationToGroupsRequest();
16613
+ message.metadata = (object.metadata !== undefined && object.metadata !== null)
16614
+ ? ResourceMetadata.fromPartial(object.metadata)
16615
+ : undefined;
16616
+ message.spec = (object.spec !== undefined && object.spec !== null)
16617
+ ? InvitationSpec.fromPartial(object.spec)
16618
+ : undefined;
16619
+ message.noSend = (object.noSend !== undefined && object.noSend !== null)
16620
+ ? object.noSend
16621
+ : false;
16622
+ message.groupIds = object.groupIds?.map((e) => e) || [];
16623
+ message.expiresIn = (object.expiresIn !== undefined && object.expiresIn !== null)
16624
+ ? wkt[".google.protobuf.Duration"].fromPartial(object.expiresIn)
16625
+ : undefined;
16626
+ return message;
16627
+ },
16628
+ };
16629
+ protoRegistry.registerMessage(CreateInvitationToGroupsRequest);
16630
+ function CreateInvitationToGroupsRequestCustomInspect() {
16631
+ const parts = [];
16632
+ if (this.metadata !== undefined)
16633
+ parts.push("metadata" + "=" + inspect(this.metadata));
16634
+ if (this.spec !== undefined)
16635
+ parts.push("spec" + "=" + inspect(this.spec));
16636
+ if (this.noSend === true)
16637
+ parts.push("noSend" + "=" + inspect(this.noSend));
16638
+ if ((this.groupIds?.length ?? 0) !== 0)
16639
+ parts.push("groupIds" + "=" + inspect(this.groupIds));
16640
+ if (this.expiresIn !== undefined)
16641
+ parts.push("expiresIn" + "=" + inspect(this.expiresIn));
16642
+ return `${this.$type}(${parts.join(", ")})`;
16643
+ }
16644
+ function CreateInvitationToGroupsRequestCustomJson() {
16645
+ const obj = {
16646
+ type: this.$type,
16647
+ };
16648
+ if (this.metadata !== undefined)
16649
+ obj.metadata = inspectJson(this.metadata);
16650
+ if (this.spec !== undefined)
16651
+ obj.spec = inspectJson(this.spec);
16652
+ if (this.noSend === true)
16653
+ obj.noSend = inspectJson(this.noSend);
16654
+ if ((this.groupIds?.length ?? 0) !== 0)
16655
+ obj.groupIds = inspectJson(this.groupIds);
16656
+ if (this.expiresIn !== undefined)
16657
+ obj.expiresIn = inspectJson(this.expiresIn);
16658
+ return obj;
16659
+ }
16660
+ function applyCreateInvitationToGroupsRequestCustom(message) {
16661
+ message[custom] = CreateInvitationToGroupsRequestCustomInspect;
16662
+ message[customJson] = CreateInvitationToGroupsRequestCustomJson;
16663
+ return attachMessageDescriptor(message, CreateInvitationToGroupsRequest.$descriptor);
16664
+ }
16665
+ function createBaseCreateInvitationToGroupsRequest() {
16666
+ const message = {
16667
+ $type: "nebius.iam.v1.CreateInvitationToGroupsRequest",
16668
+ metadata: undefined,
16669
+ spec: undefined,
16670
+ noSend: false,
16671
+ groupIds: [],
16672
+ expiresIn: undefined,
16673
+ };
16674
+ return applyCreateInvitationToGroupsRequestCustom(message);
16675
+ }
16676
+ const AcceptInvitationRequest_MESSAGE_DESCRIPTOR = {
16677
+ fields: {
16678
+ "code": { pbName: "code", scalarType: 9 },
16679
+ },
16680
+ };
16681
+ /** Encodes, decodes, converts, and creates {@link AcceptInvitationRequest} messages. */
16682
+ export const AcceptInvitationRequest = {
16683
+ $type: "nebius.iam.v1.AcceptInvitationRequest",
16684
+ $descriptor: AcceptInvitationRequest_MESSAGE_DESCRIPTOR,
16685
+ encode(message, writer = new BinaryWriter()) {
16686
+ if (message.code !== "") {
16687
+ writer.uint32(10).string(message.code);
16688
+ }
16689
+ if (message[unknownFieldsSymbol]) {
16690
+ writer.raw(message[unknownFieldsSymbol]);
16691
+ }
16692
+ return writer;
16693
+ },
16694
+ decode(input, length) {
16695
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
16696
+ const end = length === undefined ? reader.len : reader.pos + length;
16697
+ const message = createBaseAcceptInvitationRequest();
16698
+ let writer = undefined;
16699
+ while (reader.pos < end) {
16700
+ const tag = reader.uint32();
16701
+ switch (tag >>> 3) {
16702
+ case 1: {
16703
+ if (tag !== 10)
16704
+ break;
16705
+ message.code = reader.string();
16706
+ continue;
16707
+ }
16708
+ default:
16709
+ break;
16710
+ }
16711
+ if ((tag & 7) === 4 || tag === 0) {
16712
+ break;
16713
+ }
16714
+ {
16715
+ if (!writer)
16716
+ writer = new BinaryWriter();
16717
+ const skipped = reader.skip(tag & 7, tag >>> 3);
16718
+ writer.uint32(tag).raw(skipped);
16719
+ }
16720
+ }
16721
+ if (writer) {
16722
+ message[unknownFieldsSymbol] = writer.finish();
16723
+ }
16724
+ return message;
16725
+ },
16726
+ fromJSON(object) {
16727
+ return applyAcceptInvitationRequestCustom({
16728
+ $type: "nebius.iam.v1.AcceptInvitationRequest",
16729
+ code: isSet(object.code ?? object.code)
16730
+ ? String(object.code ?? object.code)
16731
+ : "",
16732
+ });
16733
+ },
16734
+ toJSON(message, use = "json") {
16735
+ const obj = {};
16736
+ const pick = (json, pb) => (use === "json" ? json : pb);
16737
+ if (message.code !== "") {
16738
+ obj[pick("code", "code")] = message.code;
16739
+ }
16740
+ return obj;
16741
+ },
16742
+ create(base) {
16743
+ return AcceptInvitationRequest.fromPartial(base ?? {});
16744
+ },
16745
+ fromPartial(object) {
16746
+ const message = createBaseAcceptInvitationRequest();
16747
+ message.code = (object.code !== undefined && object.code !== null)
16748
+ ? object.code
16749
+ : "";
16750
+ return message;
16751
+ },
16752
+ };
16753
+ protoRegistry.registerMessage(AcceptInvitationRequest);
16754
+ function AcceptInvitationRequestCustomInspect() {
16755
+ const parts = [];
16756
+ if (this.code !== "")
16757
+ parts.push("code" + "=***");
16758
+ return `${this.$type}(${parts.join(", ")})`;
16759
+ }
16760
+ function AcceptInvitationRequestCustomJson() {
16761
+ const obj = {
16762
+ type: this.$type,
16763
+ };
16764
+ if (this.code !== "")
16765
+ obj.code = "***";
16766
+ return obj;
16767
+ }
16768
+ function applyAcceptInvitationRequestCustom(message) {
16769
+ message[custom] = AcceptInvitationRequestCustomInspect;
16770
+ message[customJson] = AcceptInvitationRequestCustomJson;
16771
+ return attachMessageDescriptor(message, AcceptInvitationRequest.$descriptor);
16772
+ }
16773
+ function createBaseAcceptInvitationRequest() {
16774
+ const message = {
16775
+ $type: "nebius.iam.v1.AcceptInvitationRequest",
16776
+ code: "",
16777
+ };
16778
+ return applyAcceptInvitationRequestCustom(message);
16779
+ }
16467
16780
  const InvitationStatus_State_VALUE_COMMENTS = {
16468
16781
  CREATING: " contacts data is not stored in pds yet. probably will GC it later",
16469
16782
  CREATED: " notification is not sent yet",