@conduitplatform/grpc-sdk 0.17.0-alpha.3 → 0.17.0-alpha.5

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/index.esm.js CHANGED
@@ -3484,7 +3484,7 @@ var CreateRoomRequest = {
3484
3484
  }
3485
3485
  };
3486
3486
  function createBaseSendMessageRequest() {
3487
- return { message: "", userId: "", roomId: "", messageType: void 0, persist: void 0 };
3487
+ return { message: "", userId: "", roomId: "", messageType: void 0, persist: void 0, files: [] };
3488
3488
  }
3489
3489
  var SendMessageRequest = {
3490
3490
  encode(message, writer = new BinaryWriter4()) {
@@ -3503,6 +3503,9 @@ var SendMessageRequest = {
3503
3503
  if (message.persist !== void 0) {
3504
3504
  writer.uint32(40).bool(message.persist);
3505
3505
  }
3506
+ for (const v of message.files) {
3507
+ writer.uint32(50).string(v);
3508
+ }
3506
3509
  return writer;
3507
3510
  },
3508
3511
  decode(input, length) {
@@ -3547,6 +3550,13 @@ var SendMessageRequest = {
3547
3550
  message.persist = reader.bool();
3548
3551
  continue;
3549
3552
  }
3553
+ case 6: {
3554
+ if (tag !== 50) {
3555
+ break;
3556
+ }
3557
+ message.files.push(reader.string());
3558
+ continue;
3559
+ }
3550
3560
  }
3551
3561
  if ((tag & 7) === 4 || tag === 0) {
3552
3562
  break;
@@ -3561,7 +3571,8 @@ var SendMessageRequest = {
3561
3571
  userId: isSet3(object.userId) ? globalThis.String(object.userId) : "",
3562
3572
  roomId: isSet3(object.roomId) ? globalThis.String(object.roomId) : "",
3563
3573
  messageType: isSet3(object.messageType) ? globalThis.String(object.messageType) : void 0,
3564
- persist: isSet3(object.persist) ? globalThis.Boolean(object.persist) : void 0
3574
+ persist: isSet3(object.persist) ? globalThis.Boolean(object.persist) : void 0,
3575
+ files: globalThis.Array.isArray(object?.files) ? object.files.map((e) => globalThis.String(e)) : []
3565
3576
  };
3566
3577
  },
3567
3578
  toJSON(message) {
@@ -3581,6 +3592,9 @@ var SendMessageRequest = {
3581
3592
  if (message.persist !== void 0) {
3582
3593
  obj.persist = message.persist;
3583
3594
  }
3595
+ if (message.files?.length) {
3596
+ obj.files = message.files;
3597
+ }
3584
3598
  return obj;
3585
3599
  },
3586
3600
  create(base) {
@@ -3593,6 +3607,7 @@ var SendMessageRequest = {
3593
3607
  message.roomId = object.roomId ?? "";
3594
3608
  message.messageType = object.messageType ?? void 0;
3595
3609
  message.persist = object.persist ?? void 0;
3610
+ message.files = object.files?.map((e) => e) || [];
3596
3611
  return message;
3597
3612
  }
3598
3613
  };
@@ -7139,15 +7154,24 @@ var SendWithFallbackResponse_ChannelResult = {
7139
7154
  }
7140
7155
  };
7141
7156
  function createBaseRegisterCommunicationTemplateRequest() {
7142
- return { name: "", template: void 0 };
7157
+ return { name: "", channels: [], description: void 0, template: void 0, variables: [] };
7143
7158
  }
7144
7159
  var RegisterCommunicationTemplateRequest = {
7145
7160
  encode(message, writer = new BinaryWriter5()) {
7146
7161
  if (message.name !== "") {
7147
7162
  writer.uint32(10).string(message.name);
7148
7163
  }
7164
+ for (const v of message.channels) {
7165
+ writer.uint32(18).string(v);
7166
+ }
7167
+ if (message.description !== void 0) {
7168
+ writer.uint32(26).string(message.description);
7169
+ }
7149
7170
  if (message.template !== void 0) {
7150
- RegisterCommunicationTemplateRequest_CommunicationTemplate.encode(message.template, writer.uint32(18).fork()).join();
7171
+ RegisterCommunicationTemplateRequest_CommunicationTemplate.encode(message.template, writer.uint32(34).fork()).join();
7172
+ }
7173
+ for (const v of message.variables) {
7174
+ writer.uint32(42).string(v);
7151
7175
  }
7152
7176
  return writer;
7153
7177
  },
@@ -7169,9 +7193,30 @@ var RegisterCommunicationTemplateRequest = {
7169
7193
  if (tag !== 18) {
7170
7194
  break;
7171
7195
  }
7196
+ message.channels.push(reader.string());
7197
+ continue;
7198
+ }
7199
+ case 3: {
7200
+ if (tag !== 26) {
7201
+ break;
7202
+ }
7203
+ message.description = reader.string();
7204
+ continue;
7205
+ }
7206
+ case 4: {
7207
+ if (tag !== 34) {
7208
+ break;
7209
+ }
7172
7210
  message.template = RegisterCommunicationTemplateRequest_CommunicationTemplate.decode(reader, reader.uint32());
7173
7211
  continue;
7174
7212
  }
7213
+ case 5: {
7214
+ if (tag !== 42) {
7215
+ break;
7216
+ }
7217
+ message.variables.push(reader.string());
7218
+ continue;
7219
+ }
7175
7220
  }
7176
7221
  if ((tag & 7) === 4 || tag === 0) {
7177
7222
  break;
@@ -7183,7 +7228,10 @@ var RegisterCommunicationTemplateRequest = {
7183
7228
  fromJSON(object) {
7184
7229
  return {
7185
7230
  name: isSet4(object.name) ? globalThis.String(object.name) : "",
7186
- template: isSet4(object.template) ? RegisterCommunicationTemplateRequest_CommunicationTemplate.fromJSON(object.template) : void 0
7231
+ channels: globalThis.Array.isArray(object?.channels) ? object.channels.map((e) => globalThis.String(e)) : [],
7232
+ description: isSet4(object.description) ? globalThis.String(object.description) : void 0,
7233
+ template: isSet4(object.template) ? RegisterCommunicationTemplateRequest_CommunicationTemplate.fromJSON(object.template) : void 0,
7234
+ variables: globalThis.Array.isArray(object?.variables) ? object.variables.map((e) => globalThis.String(e)) : []
7187
7235
  };
7188
7236
  },
7189
7237
  toJSON(message) {
@@ -7191,9 +7239,18 @@ var RegisterCommunicationTemplateRequest = {
7191
7239
  if (message.name !== "") {
7192
7240
  obj.name = message.name;
7193
7241
  }
7242
+ if (message.channels?.length) {
7243
+ obj.channels = message.channels;
7244
+ }
7245
+ if (message.description !== void 0) {
7246
+ obj.description = message.description;
7247
+ }
7194
7248
  if (message.template !== void 0) {
7195
7249
  obj.template = RegisterCommunicationTemplateRequest_CommunicationTemplate.toJSON(message.template);
7196
7250
  }
7251
+ if (message.variables?.length) {
7252
+ obj.variables = message.variables;
7253
+ }
7197
7254
  return obj;
7198
7255
  },
7199
7256
  create(base) {
@@ -7202,7 +7259,10 @@ var RegisterCommunicationTemplateRequest = {
7202
7259
  fromPartial(object) {
7203
7260
  const message = createBaseRegisterCommunicationTemplateRequest();
7204
7261
  message.name = object.name ?? "";
7262
+ message.channels = object.channels?.map((e) => e) || [];
7263
+ message.description = object.description ?? void 0;
7205
7264
  message.template = object.template !== void 0 && object.template !== null ? RegisterCommunicationTemplateRequest_CommunicationTemplate.fromPartial(object.template) : void 0;
7265
+ message.variables = object.variables?.map((e) => e) || [];
7206
7266
  return message;
7207
7267
  }
7208
7268
  };
@@ -7607,23 +7667,35 @@ var RegisterCommunicationTemplateResponse = {
7607
7667
  return message;
7608
7668
  }
7609
7669
  };
7610
- function createBaseGetMessageStatusRequest() {
7611
- return { messageId: "", channel: "" };
7670
+ function createBaseUpdateCommunicationTemplateRequest() {
7671
+ return { id: "", name: void 0, channels: [], description: void 0, template: void 0, variables: [] };
7612
7672
  }
7613
- var GetMessageStatusRequest = {
7673
+ var UpdateCommunicationTemplateRequest = {
7614
7674
  encode(message, writer = new BinaryWriter5()) {
7615
- if (message.messageId !== "") {
7616
- writer.uint32(10).string(message.messageId);
7675
+ if (message.id !== "") {
7676
+ writer.uint32(10).string(message.id);
7617
7677
  }
7618
- if (message.channel !== "") {
7619
- writer.uint32(18).string(message.channel);
7678
+ if (message.name !== void 0) {
7679
+ writer.uint32(18).string(message.name);
7680
+ }
7681
+ for (const v of message.channels) {
7682
+ writer.uint32(26).string(v);
7683
+ }
7684
+ if (message.description !== void 0) {
7685
+ writer.uint32(34).string(message.description);
7686
+ }
7687
+ if (message.template !== void 0) {
7688
+ RegisterCommunicationTemplateRequest_CommunicationTemplate.encode(message.template, writer.uint32(42).fork()).join();
7689
+ }
7690
+ for (const v of message.variables) {
7691
+ writer.uint32(50).string(v);
7620
7692
  }
7621
7693
  return writer;
7622
7694
  },
7623
7695
  decode(input, length) {
7624
7696
  const reader = input instanceof BinaryReader5 ? input : new BinaryReader5(input);
7625
7697
  const end = length === void 0 ? reader.len : reader.pos + length;
7626
- const message = createBaseGetMessageStatusRequest();
7698
+ const message = createBaseUpdateCommunicationTemplateRequest();
7627
7699
  while (reader.pos < end) {
7628
7700
  const tag = reader.uint32();
7629
7701
  switch (tag >>> 3) {
@@ -7631,14 +7703,42 @@ var GetMessageStatusRequest = {
7631
7703
  if (tag !== 10) {
7632
7704
  break;
7633
7705
  }
7634
- message.messageId = reader.string();
7706
+ message.id = reader.string();
7635
7707
  continue;
7636
7708
  }
7637
7709
  case 2: {
7638
7710
  if (tag !== 18) {
7639
7711
  break;
7640
7712
  }
7641
- message.channel = reader.string();
7713
+ message.name = reader.string();
7714
+ continue;
7715
+ }
7716
+ case 3: {
7717
+ if (tag !== 26) {
7718
+ break;
7719
+ }
7720
+ message.channels.push(reader.string());
7721
+ continue;
7722
+ }
7723
+ case 4: {
7724
+ if (tag !== 34) {
7725
+ break;
7726
+ }
7727
+ message.description = reader.string();
7728
+ continue;
7729
+ }
7730
+ case 5: {
7731
+ if (tag !== 42) {
7732
+ break;
7733
+ }
7734
+ message.template = RegisterCommunicationTemplateRequest_CommunicationTemplate.decode(reader, reader.uint32());
7735
+ continue;
7736
+ }
7737
+ case 6: {
7738
+ if (tag !== 50) {
7739
+ break;
7740
+ }
7741
+ message.variables.push(reader.string());
7642
7742
  continue;
7643
7743
  }
7644
7744
  }
@@ -7651,44 +7751,64 @@ var GetMessageStatusRequest = {
7651
7751
  },
7652
7752
  fromJSON(object) {
7653
7753
  return {
7654
- messageId: isSet4(object.messageId) ? globalThis.String(object.messageId) : "",
7655
- channel: isSet4(object.channel) ? globalThis.String(object.channel) : ""
7754
+ id: isSet4(object.id) ? globalThis.String(object.id) : "",
7755
+ name: isSet4(object.name) ? globalThis.String(object.name) : void 0,
7756
+ channels: globalThis.Array.isArray(object?.channels) ? object.channels.map((e) => globalThis.String(e)) : [],
7757
+ description: isSet4(object.description) ? globalThis.String(object.description) : void 0,
7758
+ template: isSet4(object.template) ? RegisterCommunicationTemplateRequest_CommunicationTemplate.fromJSON(object.template) : void 0,
7759
+ variables: globalThis.Array.isArray(object?.variables) ? object.variables.map((e) => globalThis.String(e)) : []
7656
7760
  };
7657
7761
  },
7658
7762
  toJSON(message) {
7659
7763
  const obj = {};
7660
- if (message.messageId !== "") {
7661
- obj.messageId = message.messageId;
7764
+ if (message.id !== "") {
7765
+ obj.id = message.id;
7662
7766
  }
7663
- if (message.channel !== "") {
7664
- obj.channel = message.channel;
7767
+ if (message.name !== void 0) {
7768
+ obj.name = message.name;
7769
+ }
7770
+ if (message.channels?.length) {
7771
+ obj.channels = message.channels;
7772
+ }
7773
+ if (message.description !== void 0) {
7774
+ obj.description = message.description;
7775
+ }
7776
+ if (message.template !== void 0) {
7777
+ obj.template = RegisterCommunicationTemplateRequest_CommunicationTemplate.toJSON(message.template);
7778
+ }
7779
+ if (message.variables?.length) {
7780
+ obj.variables = message.variables;
7665
7781
  }
7666
7782
  return obj;
7667
7783
  },
7668
7784
  create(base) {
7669
- return GetMessageStatusRequest.fromPartial(base ?? {});
7785
+ return UpdateCommunicationTemplateRequest.fromPartial(base ?? {});
7670
7786
  },
7671
7787
  fromPartial(object) {
7672
- const message = createBaseGetMessageStatusRequest();
7673
- message.messageId = object.messageId ?? "";
7674
- message.channel = object.channel ?? "";
7788
+ const message = createBaseUpdateCommunicationTemplateRequest();
7789
+ message.id = object.id ?? "";
7790
+ message.name = object.name ?? void 0;
7791
+ message.channels = object.channels?.map((e) => e) || [];
7792
+ message.description = object.description ?? void 0;
7793
+ message.template = object.template !== void 0 && object.template !== null ? RegisterCommunicationTemplateRequest_CommunicationTemplate.fromPartial(object.template) : void 0;
7794
+ message.variables = object.variables?.map((e) => e) || [];
7675
7795
  return message;
7676
7796
  }
7677
7797
  };
7678
- function createBaseGetMessageStatusResponse() {
7679
- return { statusInfo: "" };
7798
+ function createBaseDeleteCommunicationTemplateRequest() {
7799
+ return { id: "" };
7680
7800
  }
7681
- var GetMessageStatusResponse = {
7801
+ var DeleteCommunicationTemplateRequest = {
7682
7802
  encode(message, writer = new BinaryWriter5()) {
7683
- if (message.statusInfo !== "") {
7684
- writer.uint32(10).string(message.statusInfo);
7803
+ if (message.id !== "") {
7804
+ writer.uint32(10).string(message.id);
7685
7805
  }
7686
7806
  return writer;
7687
7807
  },
7688
7808
  decode(input, length) {
7689
7809
  const reader = input instanceof BinaryReader5 ? input : new BinaryReader5(input);
7690
7810
  const end = length === void 0 ? reader.len : reader.pos + length;
7691
- const message = createBaseGetMessageStatusResponse();
7811
+ const message = createBaseDeleteCommunicationTemplateRequest();
7692
7812
  while (reader.pos < end) {
7693
7813
  const tag = reader.uint32();
7694
7814
  switch (tag >>> 3) {
@@ -7696,7 +7816,7 @@ var GetMessageStatusResponse = {
7696
7816
  if (tag !== 10) {
7697
7817
  break;
7698
7818
  }
7699
- message.statusInfo = reader.string();
7819
+ message.id = reader.string();
7700
7820
  continue;
7701
7821
  }
7702
7822
  }
@@ -7708,118 +7828,558 @@ var GetMessageStatusResponse = {
7708
7828
  return message;
7709
7829
  },
7710
7830
  fromJSON(object) {
7711
- return { statusInfo: isSet4(object.statusInfo) ? globalThis.String(object.statusInfo) : "" };
7831
+ return { id: isSet4(object.id) ? globalThis.String(object.id) : "" };
7712
7832
  },
7713
7833
  toJSON(message) {
7714
7834
  const obj = {};
7715
- if (message.statusInfo !== "") {
7716
- obj.statusInfo = message.statusInfo;
7835
+ if (message.id !== "") {
7836
+ obj.id = message.id;
7717
7837
  }
7718
7838
  return obj;
7719
7839
  },
7720
7840
  create(base) {
7721
- return GetMessageStatusResponse.fromPartial(base ?? {});
7841
+ return DeleteCommunicationTemplateRequest.fromPartial(base ?? {});
7722
7842
  },
7723
7843
  fromPartial(object) {
7724
- const message = createBaseGetMessageStatusResponse();
7725
- message.statusInfo = object.statusInfo ?? "";
7844
+ const message = createBaseDeleteCommunicationTemplateRequest();
7845
+ message.id = object.id ?? "";
7726
7846
  return message;
7727
7847
  }
7728
7848
  };
7729
- var CommunicationsDefinition = {
7730
- name: "Communications",
7731
- fullName: "communications.Communications",
7732
- methods: {
7733
- /** Legacy Email endpoints */
7734
- registerTemplate: {
7735
- name: "RegisterTemplate",
7736
- requestType: RegisterTemplateRequest,
7737
- requestStream: false,
7738
- responseType: RegisterTemplateResponse,
7739
- responseStream: false,
7740
- options: {}
7741
- },
7742
- updateTemplate: {
7743
- name: "UpdateTemplate",
7744
- requestType: UpdateTemplateRequest,
7745
- requestStream: false,
7746
- responseType: RegisterTemplateResponse,
7747
- responseStream: false,
7748
- options: {}
7749
- },
7750
- sendEmail: {
7751
- name: "SendEmail",
7752
- requestType: SendEmailRequest,
7753
- requestStream: false,
7754
- responseType: SendEmailResponse,
7755
- responseStream: false,
7756
- options: {}
7757
- },
7758
- resendEmail: {
7759
- name: "ResendEmail",
7760
- requestType: ResendEmailRequest,
7761
- requestStream: false,
7762
- responseType: ResendEmailResponse,
7763
- responseStream: false,
7764
- options: {}
7765
- },
7766
- getEmailStatus: {
7767
- name: "GetEmailStatus",
7768
- requestType: GetEmailStatusRequest,
7769
- requestStream: false,
7770
- responseType: GetEmailStatusResponse,
7771
- responseStream: false,
7772
- options: {}
7773
- },
7774
- /** Legacy Push Notifications endpoints */
7775
- setNotificationToken: {
7776
- name: "SetNotificationToken",
7777
- requestType: SetNotificationTokenRequest,
7778
- requestStream: false,
7779
- responseType: SetNotificationTokenResponse,
7780
- responseStream: false,
7781
- options: {}
7782
- },
7783
- getNotificationTokens: {
7784
- name: "GetNotificationTokens",
7785
- requestType: GetNotificationTokensRequest,
7786
- requestStream: false,
7787
- responseType: GetNotificationTokensResponse,
7788
- responseStream: false,
7789
- options: {}
7790
- },
7791
- sendNotification: {
7792
- name: "SendNotification",
7793
- requestType: SendNotificationRequest,
7794
- requestStream: false,
7795
- responseType: SendNotificationResponse,
7796
- responseStream: false,
7797
- options: {}
7798
- },
7799
- sendNotificationToManyDevices: {
7800
- name: "SendNotificationToManyDevices",
7801
- requestType: SendNotificationToManyDevicesRequest,
7802
- requestStream: false,
7803
- responseType: SendNotificationResponse,
7804
- responseStream: false,
7805
- options: {}
7806
- },
7807
- sendManyNotifications: {
7808
- name: "SendManyNotifications",
7809
- requestType: SendManyNotificationsRequest,
7810
- requestStream: false,
7811
- responseType: SendNotificationResponse,
7812
- responseStream: false,
7813
- options: {}
7814
- },
7815
- /** Legacy SMS endpoints */
7816
- sendSms: {
7817
- name: "SendSms",
7818
- requestType: SendSmsRequest,
7819
- requestStream: false,
7820
- responseType: SendSmsResponse,
7821
- responseStream: false,
7822
- options: {}
7849
+ function createBaseDeleteCommunicationTemplateResponse() {
7850
+ return { deleted: false };
7851
+ }
7852
+ var DeleteCommunicationTemplateResponse = {
7853
+ encode(message, writer = new BinaryWriter5()) {
7854
+ if (message.deleted !== false) {
7855
+ writer.uint32(8).bool(message.deleted);
7856
+ }
7857
+ return writer;
7858
+ },
7859
+ decode(input, length) {
7860
+ const reader = input instanceof BinaryReader5 ? input : new BinaryReader5(input);
7861
+ const end = length === void 0 ? reader.len : reader.pos + length;
7862
+ const message = createBaseDeleteCommunicationTemplateResponse();
7863
+ while (reader.pos < end) {
7864
+ const tag = reader.uint32();
7865
+ switch (tag >>> 3) {
7866
+ case 1: {
7867
+ if (tag !== 8) {
7868
+ break;
7869
+ }
7870
+ message.deleted = reader.bool();
7871
+ continue;
7872
+ }
7873
+ }
7874
+ if ((tag & 7) === 4 || tag === 0) {
7875
+ break;
7876
+ }
7877
+ reader.skip(tag & 7);
7878
+ }
7879
+ return message;
7880
+ },
7881
+ fromJSON(object) {
7882
+ return { deleted: isSet4(object.deleted) ? globalThis.Boolean(object.deleted) : false };
7883
+ },
7884
+ toJSON(message) {
7885
+ const obj = {};
7886
+ if (message.deleted !== false) {
7887
+ obj.deleted = message.deleted;
7888
+ }
7889
+ return obj;
7890
+ },
7891
+ create(base) {
7892
+ return DeleteCommunicationTemplateResponse.fromPartial(base ?? {});
7893
+ },
7894
+ fromPartial(object) {
7895
+ const message = createBaseDeleteCommunicationTemplateResponse();
7896
+ message.deleted = object.deleted ?? false;
7897
+ return message;
7898
+ }
7899
+ };
7900
+ function createBaseGetCommunicationTemplateRequest() {
7901
+ return { id: void 0, name: void 0 };
7902
+ }
7903
+ var GetCommunicationTemplateRequest = {
7904
+ encode(message, writer = new BinaryWriter5()) {
7905
+ if (message.id !== void 0) {
7906
+ writer.uint32(10).string(message.id);
7907
+ }
7908
+ if (message.name !== void 0) {
7909
+ writer.uint32(18).string(message.name);
7910
+ }
7911
+ return writer;
7912
+ },
7913
+ decode(input, length) {
7914
+ const reader = input instanceof BinaryReader5 ? input : new BinaryReader5(input);
7915
+ const end = length === void 0 ? reader.len : reader.pos + length;
7916
+ const message = createBaseGetCommunicationTemplateRequest();
7917
+ while (reader.pos < end) {
7918
+ const tag = reader.uint32();
7919
+ switch (tag >>> 3) {
7920
+ case 1: {
7921
+ if (tag !== 10) {
7922
+ break;
7923
+ }
7924
+ message.id = reader.string();
7925
+ continue;
7926
+ }
7927
+ case 2: {
7928
+ if (tag !== 18) {
7929
+ break;
7930
+ }
7931
+ message.name = reader.string();
7932
+ continue;
7933
+ }
7934
+ }
7935
+ if ((tag & 7) === 4 || tag === 0) {
7936
+ break;
7937
+ }
7938
+ reader.skip(tag & 7);
7939
+ }
7940
+ return message;
7941
+ },
7942
+ fromJSON(object) {
7943
+ return {
7944
+ id: isSet4(object.id) ? globalThis.String(object.id) : void 0,
7945
+ name: isSet4(object.name) ? globalThis.String(object.name) : void 0
7946
+ };
7947
+ },
7948
+ toJSON(message) {
7949
+ const obj = {};
7950
+ if (message.id !== void 0) {
7951
+ obj.id = message.id;
7952
+ }
7953
+ if (message.name !== void 0) {
7954
+ obj.name = message.name;
7955
+ }
7956
+ return obj;
7957
+ },
7958
+ create(base) {
7959
+ return GetCommunicationTemplateRequest.fromPartial(base ?? {});
7960
+ },
7961
+ fromPartial(object) {
7962
+ const message = createBaseGetCommunicationTemplateRequest();
7963
+ message.id = object.id ?? void 0;
7964
+ message.name = object.name ?? void 0;
7965
+ return message;
7966
+ }
7967
+ };
7968
+ function createBaseGetCommunicationTemplateResponse() {
7969
+ return { template: "" };
7970
+ }
7971
+ var GetCommunicationTemplateResponse = {
7972
+ encode(message, writer = new BinaryWriter5()) {
7973
+ if (message.template !== "") {
7974
+ writer.uint32(10).string(message.template);
7975
+ }
7976
+ return writer;
7977
+ },
7978
+ decode(input, length) {
7979
+ const reader = input instanceof BinaryReader5 ? input : new BinaryReader5(input);
7980
+ const end = length === void 0 ? reader.len : reader.pos + length;
7981
+ const message = createBaseGetCommunicationTemplateResponse();
7982
+ while (reader.pos < end) {
7983
+ const tag = reader.uint32();
7984
+ switch (tag >>> 3) {
7985
+ case 1: {
7986
+ if (tag !== 10) {
7987
+ break;
7988
+ }
7989
+ message.template = reader.string();
7990
+ continue;
7991
+ }
7992
+ }
7993
+ if ((tag & 7) === 4 || tag === 0) {
7994
+ break;
7995
+ }
7996
+ reader.skip(tag & 7);
7997
+ }
7998
+ return message;
7999
+ },
8000
+ fromJSON(object) {
8001
+ return { template: isSet4(object.template) ? globalThis.String(object.template) : "" };
8002
+ },
8003
+ toJSON(message) {
8004
+ const obj = {};
8005
+ if (message.template !== "") {
8006
+ obj.template = message.template;
8007
+ }
8008
+ return obj;
8009
+ },
8010
+ create(base) {
8011
+ return GetCommunicationTemplateResponse.fromPartial(base ?? {});
8012
+ },
8013
+ fromPartial(object) {
8014
+ const message = createBaseGetCommunicationTemplateResponse();
8015
+ message.template = object.template ?? "";
8016
+ return message;
8017
+ }
8018
+ };
8019
+ function createBaseListCommunicationTemplatesRequest() {
8020
+ return { skip: 0, limit: 0, search: void 0 };
8021
+ }
8022
+ var ListCommunicationTemplatesRequest = {
8023
+ encode(message, writer = new BinaryWriter5()) {
8024
+ if (message.skip !== 0) {
8025
+ writer.uint32(8).int32(message.skip);
8026
+ }
8027
+ if (message.limit !== 0) {
8028
+ writer.uint32(16).int32(message.limit);
8029
+ }
8030
+ if (message.search !== void 0) {
8031
+ writer.uint32(26).string(message.search);
8032
+ }
8033
+ return writer;
8034
+ },
8035
+ decode(input, length) {
8036
+ const reader = input instanceof BinaryReader5 ? input : new BinaryReader5(input);
8037
+ const end = length === void 0 ? reader.len : reader.pos + length;
8038
+ const message = createBaseListCommunicationTemplatesRequest();
8039
+ while (reader.pos < end) {
8040
+ const tag = reader.uint32();
8041
+ switch (tag >>> 3) {
8042
+ case 1: {
8043
+ if (tag !== 8) {
8044
+ break;
8045
+ }
8046
+ message.skip = reader.int32();
8047
+ continue;
8048
+ }
8049
+ case 2: {
8050
+ if (tag !== 16) {
8051
+ break;
8052
+ }
8053
+ message.limit = reader.int32();
8054
+ continue;
8055
+ }
8056
+ case 3: {
8057
+ if (tag !== 26) {
8058
+ break;
8059
+ }
8060
+ message.search = reader.string();
8061
+ continue;
8062
+ }
8063
+ }
8064
+ if ((tag & 7) === 4 || tag === 0) {
8065
+ break;
8066
+ }
8067
+ reader.skip(tag & 7);
8068
+ }
8069
+ return message;
8070
+ },
8071
+ fromJSON(object) {
8072
+ return {
8073
+ skip: isSet4(object.skip) ? globalThis.Number(object.skip) : 0,
8074
+ limit: isSet4(object.limit) ? globalThis.Number(object.limit) : 0,
8075
+ search: isSet4(object.search) ? globalThis.String(object.search) : void 0
8076
+ };
8077
+ },
8078
+ toJSON(message) {
8079
+ const obj = {};
8080
+ if (message.skip !== 0) {
8081
+ obj.skip = Math.round(message.skip);
8082
+ }
8083
+ if (message.limit !== 0) {
8084
+ obj.limit = Math.round(message.limit);
8085
+ }
8086
+ if (message.search !== void 0) {
8087
+ obj.search = message.search;
8088
+ }
8089
+ return obj;
8090
+ },
8091
+ create(base) {
8092
+ return ListCommunicationTemplatesRequest.fromPartial(base ?? {});
8093
+ },
8094
+ fromPartial(object) {
8095
+ const message = createBaseListCommunicationTemplatesRequest();
8096
+ message.skip = object.skip ?? 0;
8097
+ message.limit = object.limit ?? 0;
8098
+ message.search = object.search ?? void 0;
8099
+ return message;
8100
+ }
8101
+ };
8102
+ function createBaseListCommunicationTemplatesResponse() {
8103
+ return { templates: [], count: 0 };
8104
+ }
8105
+ var ListCommunicationTemplatesResponse = {
8106
+ encode(message, writer = new BinaryWriter5()) {
8107
+ for (const v of message.templates) {
8108
+ writer.uint32(10).string(v);
8109
+ }
8110
+ if (message.count !== 0) {
8111
+ writer.uint32(16).int32(message.count);
8112
+ }
8113
+ return writer;
8114
+ },
8115
+ decode(input, length) {
8116
+ const reader = input instanceof BinaryReader5 ? input : new BinaryReader5(input);
8117
+ const end = length === void 0 ? reader.len : reader.pos + length;
8118
+ const message = createBaseListCommunicationTemplatesResponse();
8119
+ while (reader.pos < end) {
8120
+ const tag = reader.uint32();
8121
+ switch (tag >>> 3) {
8122
+ case 1: {
8123
+ if (tag !== 10) {
8124
+ break;
8125
+ }
8126
+ message.templates.push(reader.string());
8127
+ continue;
8128
+ }
8129
+ case 2: {
8130
+ if (tag !== 16) {
8131
+ break;
8132
+ }
8133
+ message.count = reader.int32();
8134
+ continue;
8135
+ }
8136
+ }
8137
+ if ((tag & 7) === 4 || tag === 0) {
8138
+ break;
8139
+ }
8140
+ reader.skip(tag & 7);
8141
+ }
8142
+ return message;
8143
+ },
8144
+ fromJSON(object) {
8145
+ return {
8146
+ templates: globalThis.Array.isArray(object?.templates) ? object.templates.map((e) => globalThis.String(e)) : [],
8147
+ count: isSet4(object.count) ? globalThis.Number(object.count) : 0
8148
+ };
8149
+ },
8150
+ toJSON(message) {
8151
+ const obj = {};
8152
+ if (message.templates?.length) {
8153
+ obj.templates = message.templates;
8154
+ }
8155
+ if (message.count !== 0) {
8156
+ obj.count = Math.round(message.count);
8157
+ }
8158
+ return obj;
8159
+ },
8160
+ create(base) {
8161
+ return ListCommunicationTemplatesResponse.fromPartial(base ?? {});
8162
+ },
8163
+ fromPartial(object) {
8164
+ const message = createBaseListCommunicationTemplatesResponse();
8165
+ message.templates = object.templates?.map((e) => e) || [];
8166
+ message.count = object.count ?? 0;
8167
+ return message;
8168
+ }
8169
+ };
8170
+ function createBaseGetMessageStatusRequest() {
8171
+ return { messageId: "", channel: "" };
8172
+ }
8173
+ var GetMessageStatusRequest = {
8174
+ encode(message, writer = new BinaryWriter5()) {
8175
+ if (message.messageId !== "") {
8176
+ writer.uint32(10).string(message.messageId);
8177
+ }
8178
+ if (message.channel !== "") {
8179
+ writer.uint32(18).string(message.channel);
8180
+ }
8181
+ return writer;
8182
+ },
8183
+ decode(input, length) {
8184
+ const reader = input instanceof BinaryReader5 ? input : new BinaryReader5(input);
8185
+ const end = length === void 0 ? reader.len : reader.pos + length;
8186
+ const message = createBaseGetMessageStatusRequest();
8187
+ while (reader.pos < end) {
8188
+ const tag = reader.uint32();
8189
+ switch (tag >>> 3) {
8190
+ case 1: {
8191
+ if (tag !== 10) {
8192
+ break;
8193
+ }
8194
+ message.messageId = reader.string();
8195
+ continue;
8196
+ }
8197
+ case 2: {
8198
+ if (tag !== 18) {
8199
+ break;
8200
+ }
8201
+ message.channel = reader.string();
8202
+ continue;
8203
+ }
8204
+ }
8205
+ if ((tag & 7) === 4 || tag === 0) {
8206
+ break;
8207
+ }
8208
+ reader.skip(tag & 7);
8209
+ }
8210
+ return message;
8211
+ },
8212
+ fromJSON(object) {
8213
+ return {
8214
+ messageId: isSet4(object.messageId) ? globalThis.String(object.messageId) : "",
8215
+ channel: isSet4(object.channel) ? globalThis.String(object.channel) : ""
8216
+ };
8217
+ },
8218
+ toJSON(message) {
8219
+ const obj = {};
8220
+ if (message.messageId !== "") {
8221
+ obj.messageId = message.messageId;
8222
+ }
8223
+ if (message.channel !== "") {
8224
+ obj.channel = message.channel;
8225
+ }
8226
+ return obj;
8227
+ },
8228
+ create(base) {
8229
+ return GetMessageStatusRequest.fromPartial(base ?? {});
8230
+ },
8231
+ fromPartial(object) {
8232
+ const message = createBaseGetMessageStatusRequest();
8233
+ message.messageId = object.messageId ?? "";
8234
+ message.channel = object.channel ?? "";
8235
+ return message;
8236
+ }
8237
+ };
8238
+ function createBaseGetMessageStatusResponse() {
8239
+ return { statusInfo: "" };
8240
+ }
8241
+ var GetMessageStatusResponse = {
8242
+ encode(message, writer = new BinaryWriter5()) {
8243
+ if (message.statusInfo !== "") {
8244
+ writer.uint32(10).string(message.statusInfo);
8245
+ }
8246
+ return writer;
8247
+ },
8248
+ decode(input, length) {
8249
+ const reader = input instanceof BinaryReader5 ? input : new BinaryReader5(input);
8250
+ const end = length === void 0 ? reader.len : reader.pos + length;
8251
+ const message = createBaseGetMessageStatusResponse();
8252
+ while (reader.pos < end) {
8253
+ const tag = reader.uint32();
8254
+ switch (tag >>> 3) {
8255
+ case 1: {
8256
+ if (tag !== 10) {
8257
+ break;
8258
+ }
8259
+ message.statusInfo = reader.string();
8260
+ continue;
8261
+ }
8262
+ }
8263
+ if ((tag & 7) === 4 || tag === 0) {
8264
+ break;
8265
+ }
8266
+ reader.skip(tag & 7);
8267
+ }
8268
+ return message;
8269
+ },
8270
+ fromJSON(object) {
8271
+ return { statusInfo: isSet4(object.statusInfo) ? globalThis.String(object.statusInfo) : "" };
8272
+ },
8273
+ toJSON(message) {
8274
+ const obj = {};
8275
+ if (message.statusInfo !== "") {
8276
+ obj.statusInfo = message.statusInfo;
8277
+ }
8278
+ return obj;
8279
+ },
8280
+ create(base) {
8281
+ return GetMessageStatusResponse.fromPartial(base ?? {});
8282
+ },
8283
+ fromPartial(object) {
8284
+ const message = createBaseGetMessageStatusResponse();
8285
+ message.statusInfo = object.statusInfo ?? "";
8286
+ return message;
8287
+ }
8288
+ };
8289
+ var CommunicationsDefinition = {
8290
+ name: "Communications",
8291
+ fullName: "communications.Communications",
8292
+ methods: {
8293
+ /** Legacy Email endpoints */
8294
+ registerTemplate: {
8295
+ name: "RegisterTemplate",
8296
+ requestType: RegisterTemplateRequest,
8297
+ requestStream: false,
8298
+ responseType: RegisterTemplateResponse,
8299
+ responseStream: false,
8300
+ options: {}
8301
+ },
8302
+ updateTemplate: {
8303
+ name: "UpdateTemplate",
8304
+ requestType: UpdateTemplateRequest,
8305
+ requestStream: false,
8306
+ responseType: RegisterTemplateResponse,
8307
+ responseStream: false,
8308
+ options: {}
8309
+ },
8310
+ sendEmail: {
8311
+ name: "SendEmail",
8312
+ requestType: SendEmailRequest,
8313
+ requestStream: false,
8314
+ responseType: SendEmailResponse,
8315
+ responseStream: false,
8316
+ options: {}
8317
+ },
8318
+ resendEmail: {
8319
+ name: "ResendEmail",
8320
+ requestType: ResendEmailRequest,
8321
+ requestStream: false,
8322
+ responseType: ResendEmailResponse,
8323
+ responseStream: false,
8324
+ options: {}
8325
+ },
8326
+ getEmailStatus: {
8327
+ name: "GetEmailStatus",
8328
+ requestType: GetEmailStatusRequest,
8329
+ requestStream: false,
8330
+ responseType: GetEmailStatusResponse,
8331
+ responseStream: false,
8332
+ options: {}
8333
+ },
8334
+ /** Legacy Push Notifications endpoints */
8335
+ setNotificationToken: {
8336
+ name: "SetNotificationToken",
8337
+ requestType: SetNotificationTokenRequest,
8338
+ requestStream: false,
8339
+ responseType: SetNotificationTokenResponse,
8340
+ responseStream: false,
8341
+ options: {}
8342
+ },
8343
+ getNotificationTokens: {
8344
+ name: "GetNotificationTokens",
8345
+ requestType: GetNotificationTokensRequest,
8346
+ requestStream: false,
8347
+ responseType: GetNotificationTokensResponse,
8348
+ responseStream: false,
8349
+ options: {}
8350
+ },
8351
+ sendNotification: {
8352
+ name: "SendNotification",
8353
+ requestType: SendNotificationRequest,
8354
+ requestStream: false,
8355
+ responseType: SendNotificationResponse,
8356
+ responseStream: false,
8357
+ options: {}
8358
+ },
8359
+ sendNotificationToManyDevices: {
8360
+ name: "SendNotificationToManyDevices",
8361
+ requestType: SendNotificationToManyDevicesRequest,
8362
+ requestStream: false,
8363
+ responseType: SendNotificationResponse,
8364
+ responseStream: false,
8365
+ options: {}
8366
+ },
8367
+ sendManyNotifications: {
8368
+ name: "SendManyNotifications",
8369
+ requestType: SendManyNotificationsRequest,
8370
+ requestStream: false,
8371
+ responseType: SendNotificationResponse,
8372
+ responseStream: false,
8373
+ options: {}
8374
+ },
8375
+ /** Legacy SMS endpoints */
8376
+ sendSms: {
8377
+ name: "SendSms",
8378
+ requestType: SendSmsRequest,
8379
+ requestStream: false,
8380
+ responseType: SendSmsResponse,
8381
+ responseStream: false,
8382
+ options: {}
7823
8383
  },
7824
8384
  sendVerificationCode: {
7825
8385
  name: "SendVerificationCode",
@@ -7862,11 +8422,43 @@ var CommunicationsDefinition = {
7862
8422
  responseStream: false,
7863
8423
  options: {}
7864
8424
  },
7865
- registerCommunicationTemplate: {
7866
- name: "RegisterCommunicationTemplate",
7867
- requestType: RegisterCommunicationTemplateRequest,
8425
+ registerCommunicationTemplate: {
8426
+ name: "RegisterCommunicationTemplate",
8427
+ requestType: RegisterCommunicationTemplateRequest,
8428
+ requestStream: false,
8429
+ responseType: RegisterCommunicationTemplateResponse,
8430
+ responseStream: false,
8431
+ options: {}
8432
+ },
8433
+ updateCommunicationTemplate: {
8434
+ name: "UpdateCommunicationTemplate",
8435
+ requestType: UpdateCommunicationTemplateRequest,
8436
+ requestStream: false,
8437
+ responseType: RegisterCommunicationTemplateResponse,
8438
+ responseStream: false,
8439
+ options: {}
8440
+ },
8441
+ deleteCommunicationTemplate: {
8442
+ name: "DeleteCommunicationTemplate",
8443
+ requestType: DeleteCommunicationTemplateRequest,
8444
+ requestStream: false,
8445
+ responseType: DeleteCommunicationTemplateResponse,
8446
+ responseStream: false,
8447
+ options: {}
8448
+ },
8449
+ getCommunicationTemplate: {
8450
+ name: "GetCommunicationTemplate",
8451
+ requestType: GetCommunicationTemplateRequest,
8452
+ requestStream: false,
8453
+ responseType: GetCommunicationTemplateResponse,
8454
+ responseStream: false,
8455
+ options: {}
8456
+ },
8457
+ listCommunicationTemplates: {
8458
+ name: "ListCommunicationTemplates",
8459
+ requestType: ListCommunicationTemplatesRequest,
7868
8460
  requestStream: false,
7869
- responseType: RegisterCommunicationTemplateResponse,
8461
+ responseType: ListCommunicationTemplatesResponse,
7870
8462
  responseStream: false,
7871
8463
  options: {}
7872
8464
  },
@@ -8081,8 +8673,7 @@ function createBaseRegisterAdminRouteRequest_PathDefinition() {
8081
8673
  returns: void 0,
8082
8674
  grpcFunction: void 0,
8083
8675
  isMiddleware: void 0,
8084
- events: void 0,
8085
- proxy: void 0
8676
+ events: void 0
8086
8677
  };
8087
8678
  }
8088
8679
  var RegisterAdminRouteRequest_PathDefinition = {
@@ -8102,9 +8693,6 @@ var RegisterAdminRouteRequest_PathDefinition = {
8102
8693
  if (message.events !== void 0) {
8103
8694
  writer.uint32(42).string(message.events);
8104
8695
  }
8105
- if (message.proxy !== void 0) {
8106
- RegisterAdminRouteRequest_ProxyRouteOptions.encode(message.proxy, writer.uint32(50).fork()).join();
8107
- }
8108
8696
  return writer;
8109
8697
  },
8110
8698
  decode(input, length) {
@@ -8149,13 +8737,6 @@ var RegisterAdminRouteRequest_PathDefinition = {
8149
8737
  message.events = reader.string();
8150
8738
  continue;
8151
8739
  }
8152
- case 6: {
8153
- if (tag !== 50) {
8154
- break;
8155
- }
8156
- message.proxy = RegisterAdminRouteRequest_ProxyRouteOptions.decode(reader, reader.uint32());
8157
- continue;
8158
- }
8159
8740
  }
8160
8741
  if ((tag & 7) === 4 || tag === 0) {
8161
8742
  break;
@@ -8170,8 +8751,7 @@ var RegisterAdminRouteRequest_PathDefinition = {
8170
8751
  returns: isSet5(object.returns) ? RegisterAdminRouteRequest_ConduitRouteReturnDefinition.fromJSON(object.returns) : void 0,
8171
8752
  grpcFunction: isSet5(object.grpcFunction) ? globalThis.String(object.grpcFunction) : void 0,
8172
8753
  isMiddleware: isSet5(object.isMiddleware) ? globalThis.Boolean(object.isMiddleware) : void 0,
8173
- events: isSet5(object.events) ? globalThis.String(object.events) : void 0,
8174
- proxy: isSet5(object.proxy) ? RegisterAdminRouteRequest_ProxyRouteOptions.fromJSON(object.proxy) : void 0
8754
+ events: isSet5(object.events) ? globalThis.String(object.events) : void 0
8175
8755
  };
8176
8756
  },
8177
8757
  toJSON(message) {
@@ -8191,9 +8771,6 @@ var RegisterAdminRouteRequest_PathDefinition = {
8191
8771
  if (message.events !== void 0) {
8192
8772
  obj.events = message.events;
8193
8773
  }
8194
- if (message.proxy !== void 0) {
8195
- obj.proxy = RegisterAdminRouteRequest_ProxyRouteOptions.toJSON(message.proxy);
8196
- }
8197
8774
  return obj;
8198
8775
  },
8199
8776
  create(base) {
@@ -8206,325 +8783,81 @@ var RegisterAdminRouteRequest_PathDefinition = {
8206
8783
  message.grpcFunction = object.grpcFunction ?? void 0;
8207
8784
  message.isMiddleware = object.isMiddleware ?? void 0;
8208
8785
  message.events = object.events ?? void 0;
8209
- message.proxy = object.proxy !== void 0 && object.proxy !== null ? RegisterAdminRouteRequest_ProxyRouteOptions.fromPartial(object.proxy) : void 0;
8210
8786
  return message;
8211
8787
  }
8212
8788
  };
8213
8789
  function createBaseRegisterAdminRouteRequest_ConduitRouteOptions() {
8214
8790
  return {
8215
8791
  queryParams: void 0,
8216
- bodyParams: void 0,
8217
- urlParams: void 0,
8218
- action: void 0,
8219
- path: "",
8220
- name: void 0,
8221
- description: void 0,
8222
- middlewares: [],
8223
- cacheControl: void 0,
8224
- errors: [],
8225
- mcp: void 0,
8226
- strictParams: void 0,
8227
- rateLimit: void 0
8228
- };
8229
- }
8230
- var RegisterAdminRouteRequest_ConduitRouteOptions = {
8231
- encode(message, writer = new BinaryWriter6()) {
8232
- if (message.queryParams !== void 0) {
8233
- writer.uint32(10).string(message.queryParams);
8234
- }
8235
- if (message.bodyParams !== void 0) {
8236
- writer.uint32(18).string(message.bodyParams);
8237
- }
8238
- if (message.urlParams !== void 0) {
8239
- writer.uint32(26).string(message.urlParams);
8240
- }
8241
- if (message.action !== void 0) {
8242
- writer.uint32(34).string(message.action);
8243
- }
8244
- if (message.path !== "") {
8245
- writer.uint32(42).string(message.path);
8246
- }
8247
- if (message.name !== void 0) {
8248
- writer.uint32(50).string(message.name);
8249
- }
8250
- if (message.description !== void 0) {
8251
- writer.uint32(58).string(message.description);
8252
- }
8253
- for (const v of message.middlewares) {
8254
- writer.uint32(66).string(v);
8255
- }
8256
- if (message.cacheControl !== void 0) {
8257
- writer.uint32(74).string(message.cacheControl);
8258
- }
8259
- for (const v of message.errors) {
8260
- RegisterAdminRouteRequest_ErrorDefinition.encode(v, writer.uint32(82).fork()).join();
8261
- }
8262
- if (message.mcp !== void 0) {
8263
- writer.uint32(88).bool(message.mcp);
8264
- }
8265
- if (message.strictParams !== void 0) {
8266
- writer.uint32(96).bool(message.strictParams);
8267
- }
8268
- if (message.rateLimit !== void 0) {
8269
- writer.uint32(106).string(message.rateLimit);
8270
- }
8271
- return writer;
8272
- },
8273
- decode(input, length) {
8274
- const reader = input instanceof BinaryReader6 ? input : new BinaryReader6(input);
8275
- const end = length === void 0 ? reader.len : reader.pos + length;
8276
- const message = createBaseRegisterAdminRouteRequest_ConduitRouteOptions();
8277
- while (reader.pos < end) {
8278
- const tag = reader.uint32();
8279
- switch (tag >>> 3) {
8280
- case 1: {
8281
- if (tag !== 10) {
8282
- break;
8283
- }
8284
- message.queryParams = reader.string();
8285
- continue;
8286
- }
8287
- case 2: {
8288
- if (tag !== 18) {
8289
- break;
8290
- }
8291
- message.bodyParams = reader.string();
8292
- continue;
8293
- }
8294
- case 3: {
8295
- if (tag !== 26) {
8296
- break;
8297
- }
8298
- message.urlParams = reader.string();
8299
- continue;
8300
- }
8301
- case 4: {
8302
- if (tag !== 34) {
8303
- break;
8304
- }
8305
- message.action = reader.string();
8306
- continue;
8307
- }
8308
- case 5: {
8309
- if (tag !== 42) {
8310
- break;
8311
- }
8312
- message.path = reader.string();
8313
- continue;
8314
- }
8315
- case 6: {
8316
- if (tag !== 50) {
8317
- break;
8318
- }
8319
- message.name = reader.string();
8320
- continue;
8321
- }
8322
- case 7: {
8323
- if (tag !== 58) {
8324
- break;
8325
- }
8326
- message.description = reader.string();
8327
- continue;
8328
- }
8329
- case 8: {
8330
- if (tag !== 66) {
8331
- break;
8332
- }
8333
- message.middlewares.push(reader.string());
8334
- continue;
8335
- }
8336
- case 9: {
8337
- if (tag !== 74) {
8338
- break;
8339
- }
8340
- message.cacheControl = reader.string();
8341
- continue;
8342
- }
8343
- case 10: {
8344
- if (tag !== 82) {
8345
- break;
8346
- }
8347
- message.errors.push(RegisterAdminRouteRequest_ErrorDefinition.decode(reader, reader.uint32()));
8348
- continue;
8349
- }
8350
- case 11: {
8351
- if (tag !== 88) {
8352
- break;
8353
- }
8354
- message.mcp = reader.bool();
8355
- continue;
8356
- }
8357
- case 12: {
8358
- if (tag !== 96) {
8359
- break;
8360
- }
8361
- message.strictParams = reader.bool();
8362
- continue;
8363
- }
8364
- case 13: {
8365
- if (tag !== 106) {
8366
- break;
8367
- }
8368
- message.rateLimit = reader.string();
8369
- continue;
8370
- }
8371
- }
8372
- if ((tag & 7) === 4 || tag === 0) {
8373
- break;
8374
- }
8375
- reader.skip(tag & 7);
8376
- }
8377
- return message;
8378
- },
8379
- fromJSON(object) {
8380
- return {
8381
- queryParams: isSet5(object.queryParams) ? globalThis.String(object.queryParams) : void 0,
8382
- bodyParams: isSet5(object.bodyParams) ? globalThis.String(object.bodyParams) : void 0,
8383
- urlParams: isSet5(object.urlParams) ? globalThis.String(object.urlParams) : void 0,
8384
- action: isSet5(object.action) ? globalThis.String(object.action) : void 0,
8385
- path: isSet5(object.path) ? globalThis.String(object.path) : "",
8386
- name: isSet5(object.name) ? globalThis.String(object.name) : void 0,
8387
- description: isSet5(object.description) ? globalThis.String(object.description) : void 0,
8388
- middlewares: globalThis.Array.isArray(object?.middlewares) ? object.middlewares.map((e) => globalThis.String(e)) : [],
8389
- cacheControl: isSet5(object.cacheControl) ? globalThis.String(object.cacheControl) : void 0,
8390
- errors: globalThis.Array.isArray(object?.errors) ? object.errors.map((e) => RegisterAdminRouteRequest_ErrorDefinition.fromJSON(e)) : [],
8391
- mcp: isSet5(object.mcp) ? globalThis.Boolean(object.mcp) : void 0,
8392
- strictParams: isSet5(object.strictParams) ? globalThis.Boolean(object.strictParams) : void 0,
8393
- rateLimit: isSet5(object.rateLimit) ? globalThis.String(object.rateLimit) : void 0
8394
- };
8395
- },
8396
- toJSON(message) {
8397
- const obj = {};
8398
- if (message.queryParams !== void 0) {
8399
- obj.queryParams = message.queryParams;
8400
- }
8401
- if (message.bodyParams !== void 0) {
8402
- obj.bodyParams = message.bodyParams;
8403
- }
8404
- if (message.urlParams !== void 0) {
8405
- obj.urlParams = message.urlParams;
8406
- }
8407
- if (message.action !== void 0) {
8408
- obj.action = message.action;
8409
- }
8410
- if (message.path !== "") {
8411
- obj.path = message.path;
8412
- }
8413
- if (message.name !== void 0) {
8414
- obj.name = message.name;
8415
- }
8416
- if (message.description !== void 0) {
8417
- obj.description = message.description;
8418
- }
8419
- if (message.middlewares?.length) {
8420
- obj.middlewares = message.middlewares;
8421
- }
8422
- if (message.cacheControl !== void 0) {
8423
- obj.cacheControl = message.cacheControl;
8424
- }
8425
- if (message.errors?.length) {
8426
- obj.errors = message.errors.map((e) => RegisterAdminRouteRequest_ErrorDefinition.toJSON(e));
8427
- }
8428
- if (message.mcp !== void 0) {
8429
- obj.mcp = message.mcp;
8430
- }
8431
- if (message.strictParams !== void 0) {
8432
- obj.strictParams = message.strictParams;
8433
- }
8434
- if (message.rateLimit !== void 0) {
8435
- obj.rateLimit = message.rateLimit;
8436
- }
8437
- return obj;
8438
- },
8439
- create(base) {
8440
- return RegisterAdminRouteRequest_ConduitRouteOptions.fromPartial(base ?? {});
8441
- },
8442
- fromPartial(object) {
8443
- const message = createBaseRegisterAdminRouteRequest_ConduitRouteOptions();
8444
- message.queryParams = object.queryParams ?? void 0;
8445
- message.bodyParams = object.bodyParams ?? void 0;
8446
- message.urlParams = object.urlParams ?? void 0;
8447
- message.action = object.action ?? void 0;
8448
- message.path = object.path ?? "";
8449
- message.name = object.name ?? void 0;
8450
- message.description = object.description ?? void 0;
8451
- message.middlewares = object.middlewares?.map((e) => e) || [];
8452
- message.cacheControl = object.cacheControl ?? void 0;
8453
- message.errors = object.errors?.map((e) => RegisterAdminRouteRequest_ErrorDefinition.fromPartial(e)) || [];
8454
- message.mcp = object.mcp ?? void 0;
8455
- message.strictParams = object.strictParams ?? void 0;
8456
- message.rateLimit = object.rateLimit ?? void 0;
8457
- return message;
8458
- }
8459
- };
8460
- function createBaseRegisterAdminRouteRequest_ProxyRouteOptions() {
8461
- return {
8462
- target: void 0,
8463
- changeOrigin: void 0,
8464
- secure: void 0,
8465
- context: void 0,
8466
- pathRewrite: void 0,
8467
- headers: void 0,
8468
- proxyTimeout: void 0,
8469
- cookieDomainRewrite: void 0,
8470
- autoRewrite: void 0,
8471
- followRedirects: void 0,
8472
- xfwd: void 0,
8473
- ws: void 0,
8474
- router: void 0,
8475
- preserveHeaderKeyCase: void 0
8792
+ bodyParams: void 0,
8793
+ urlParams: void 0,
8794
+ action: void 0,
8795
+ path: "",
8796
+ name: void 0,
8797
+ description: void 0,
8798
+ middlewares: [],
8799
+ cacheControl: void 0,
8800
+ errors: [],
8801
+ mcp: void 0,
8802
+ strictParams: void 0,
8803
+ rateLimit: void 0,
8804
+ captureRawBody: void 0,
8805
+ captureRawHeaders: void 0
8476
8806
  };
8477
8807
  }
8478
- var RegisterAdminRouteRequest_ProxyRouteOptions = {
8808
+ var RegisterAdminRouteRequest_ConduitRouteOptions = {
8479
8809
  encode(message, writer = new BinaryWriter6()) {
8480
- if (message.target !== void 0) {
8481
- writer.uint32(10).string(message.target);
8810
+ if (message.queryParams !== void 0) {
8811
+ writer.uint32(10).string(message.queryParams);
8812
+ }
8813
+ if (message.bodyParams !== void 0) {
8814
+ writer.uint32(18).string(message.bodyParams);
8482
8815
  }
8483
- if (message.changeOrigin !== void 0) {
8484
- writer.uint32(16).bool(message.changeOrigin);
8816
+ if (message.urlParams !== void 0) {
8817
+ writer.uint32(26).string(message.urlParams);
8485
8818
  }
8486
- if (message.secure !== void 0) {
8487
- writer.uint32(24).bool(message.secure);
8819
+ if (message.action !== void 0) {
8820
+ writer.uint32(34).string(message.action);
8488
8821
  }
8489
- if (message.context !== void 0) {
8490
- writer.uint32(34).string(message.context);
8822
+ if (message.path !== "") {
8823
+ writer.uint32(42).string(message.path);
8491
8824
  }
8492
- if (message.pathRewrite !== void 0) {
8493
- writer.uint32(42).string(message.pathRewrite);
8825
+ if (message.name !== void 0) {
8826
+ writer.uint32(50).string(message.name);
8494
8827
  }
8495
- if (message.headers !== void 0) {
8496
- writer.uint32(50).string(message.headers);
8828
+ if (message.description !== void 0) {
8829
+ writer.uint32(58).string(message.description);
8497
8830
  }
8498
- if (message.proxyTimeout !== void 0) {
8499
- writer.uint32(56).int32(message.proxyTimeout);
8831
+ for (const v of message.middlewares) {
8832
+ writer.uint32(66).string(v);
8500
8833
  }
8501
- if (message.cookieDomainRewrite !== void 0) {
8502
- writer.uint32(66).string(message.cookieDomainRewrite);
8834
+ if (message.cacheControl !== void 0) {
8835
+ writer.uint32(74).string(message.cacheControl);
8503
8836
  }
8504
- if (message.autoRewrite !== void 0) {
8505
- writer.uint32(72).bool(message.autoRewrite);
8837
+ for (const v of message.errors) {
8838
+ RegisterAdminRouteRequest_ErrorDefinition.encode(v, writer.uint32(82).fork()).join();
8506
8839
  }
8507
- if (message.followRedirects !== void 0) {
8508
- writer.uint32(80).bool(message.followRedirects);
8840
+ if (message.mcp !== void 0) {
8841
+ writer.uint32(88).bool(message.mcp);
8509
8842
  }
8510
- if (message.xfwd !== void 0) {
8511
- writer.uint32(88).bool(message.xfwd);
8843
+ if (message.strictParams !== void 0) {
8844
+ writer.uint32(96).bool(message.strictParams);
8512
8845
  }
8513
- if (message.ws !== void 0) {
8514
- writer.uint32(96).bool(message.ws);
8846
+ if (message.rateLimit !== void 0) {
8847
+ writer.uint32(106).string(message.rateLimit);
8515
8848
  }
8516
- if (message.router !== void 0) {
8517
- writer.uint32(106).string(message.router);
8849
+ if (message.captureRawBody !== void 0) {
8850
+ writer.uint32(112).bool(message.captureRawBody);
8518
8851
  }
8519
- if (message.preserveHeaderKeyCase !== void 0) {
8520
- writer.uint32(112).bool(message.preserveHeaderKeyCase);
8852
+ if (message.captureRawHeaders !== void 0) {
8853
+ writer.uint32(120).bool(message.captureRawHeaders);
8521
8854
  }
8522
8855
  return writer;
8523
8856
  },
8524
8857
  decode(input, length) {
8525
8858
  const reader = input instanceof BinaryReader6 ? input : new BinaryReader6(input);
8526
8859
  const end = length === void 0 ? reader.len : reader.pos + length;
8527
- const message = createBaseRegisterAdminRouteRequest_ProxyRouteOptions();
8860
+ const message = createBaseRegisterAdminRouteRequest_ConduitRouteOptions();
8528
8861
  while (reader.pos < end) {
8529
8862
  const tag = reader.uint32();
8530
8863
  switch (tag >>> 3) {
@@ -8532,98 +8865,105 @@ var RegisterAdminRouteRequest_ProxyRouteOptions = {
8532
8865
  if (tag !== 10) {
8533
8866
  break;
8534
8867
  }
8535
- message.target = reader.string();
8868
+ message.queryParams = reader.string();
8536
8869
  continue;
8537
8870
  }
8538
8871
  case 2: {
8539
- if (tag !== 16) {
8872
+ if (tag !== 18) {
8540
8873
  break;
8541
8874
  }
8542
- message.changeOrigin = reader.bool();
8875
+ message.bodyParams = reader.string();
8543
8876
  continue;
8544
8877
  }
8545
8878
  case 3: {
8546
- if (tag !== 24) {
8879
+ if (tag !== 26) {
8547
8880
  break;
8548
8881
  }
8549
- message.secure = reader.bool();
8882
+ message.urlParams = reader.string();
8550
8883
  continue;
8551
8884
  }
8552
8885
  case 4: {
8553
8886
  if (tag !== 34) {
8554
8887
  break;
8555
8888
  }
8556
- message.context = reader.string();
8889
+ message.action = reader.string();
8557
8890
  continue;
8558
8891
  }
8559
8892
  case 5: {
8560
8893
  if (tag !== 42) {
8561
8894
  break;
8562
8895
  }
8563
- message.pathRewrite = reader.string();
8896
+ message.path = reader.string();
8564
8897
  continue;
8565
8898
  }
8566
8899
  case 6: {
8567
8900
  if (tag !== 50) {
8568
8901
  break;
8569
8902
  }
8570
- message.headers = reader.string();
8903
+ message.name = reader.string();
8571
8904
  continue;
8572
8905
  }
8573
8906
  case 7: {
8574
- if (tag !== 56) {
8907
+ if (tag !== 58) {
8575
8908
  break;
8576
8909
  }
8577
- message.proxyTimeout = reader.int32();
8910
+ message.description = reader.string();
8578
8911
  continue;
8579
8912
  }
8580
8913
  case 8: {
8581
8914
  if (tag !== 66) {
8582
8915
  break;
8583
8916
  }
8584
- message.cookieDomainRewrite = reader.string();
8917
+ message.middlewares.push(reader.string());
8585
8918
  continue;
8586
8919
  }
8587
8920
  case 9: {
8588
- if (tag !== 72) {
8921
+ if (tag !== 74) {
8589
8922
  break;
8590
8923
  }
8591
- message.autoRewrite = reader.bool();
8924
+ message.cacheControl = reader.string();
8592
8925
  continue;
8593
8926
  }
8594
8927
  case 10: {
8595
- if (tag !== 80) {
8928
+ if (tag !== 82) {
8596
8929
  break;
8597
8930
  }
8598
- message.followRedirects = reader.bool();
8931
+ message.errors.push(RegisterAdminRouteRequest_ErrorDefinition.decode(reader, reader.uint32()));
8599
8932
  continue;
8600
8933
  }
8601
8934
  case 11: {
8602
8935
  if (tag !== 88) {
8603
8936
  break;
8604
8937
  }
8605
- message.xfwd = reader.bool();
8938
+ message.mcp = reader.bool();
8606
8939
  continue;
8607
8940
  }
8608
8941
  case 12: {
8609
8942
  if (tag !== 96) {
8610
8943
  break;
8611
8944
  }
8612
- message.ws = reader.bool();
8945
+ message.strictParams = reader.bool();
8613
8946
  continue;
8614
8947
  }
8615
8948
  case 13: {
8616
8949
  if (tag !== 106) {
8617
8950
  break;
8618
8951
  }
8619
- message.router = reader.string();
8952
+ message.rateLimit = reader.string();
8620
8953
  continue;
8621
8954
  }
8622
8955
  case 14: {
8623
8956
  if (tag !== 112) {
8624
8957
  break;
8625
8958
  }
8626
- message.preserveHeaderKeyCase = reader.bool();
8959
+ message.captureRawBody = reader.bool();
8960
+ continue;
8961
+ }
8962
+ case 15: {
8963
+ if (tag !== 120) {
8964
+ break;
8965
+ }
8966
+ message.captureRawHeaders = reader.bool();
8627
8967
  continue;
8628
8968
  }
8629
8969
  }
@@ -8636,87 +8976,92 @@ var RegisterAdminRouteRequest_ProxyRouteOptions = {
8636
8976
  },
8637
8977
  fromJSON(object) {
8638
8978
  return {
8639
- target: isSet5(object.target) ? globalThis.String(object.target) : void 0,
8640
- changeOrigin: isSet5(object.changeOrigin) ? globalThis.Boolean(object.changeOrigin) : void 0,
8641
- secure: isSet5(object.secure) ? globalThis.Boolean(object.secure) : void 0,
8642
- context: isSet5(object.context) ? globalThis.String(object.context) : void 0,
8643
- pathRewrite: isSet5(object.pathRewrite) ? globalThis.String(object.pathRewrite) : void 0,
8644
- headers: isSet5(object.headers) ? globalThis.String(object.headers) : void 0,
8645
- proxyTimeout: isSet5(object.proxyTimeout) ? globalThis.Number(object.proxyTimeout) : void 0,
8646
- cookieDomainRewrite: isSet5(object.cookieDomainRewrite) ? globalThis.String(object.cookieDomainRewrite) : void 0,
8647
- autoRewrite: isSet5(object.autoRewrite) ? globalThis.Boolean(object.autoRewrite) : void 0,
8648
- followRedirects: isSet5(object.followRedirects) ? globalThis.Boolean(object.followRedirects) : void 0,
8649
- xfwd: isSet5(object.xfwd) ? globalThis.Boolean(object.xfwd) : void 0,
8650
- ws: isSet5(object.ws) ? globalThis.Boolean(object.ws) : void 0,
8651
- router: isSet5(object.router) ? globalThis.String(object.router) : void 0,
8652
- preserveHeaderKeyCase: isSet5(object.preserveHeaderKeyCase) ? globalThis.Boolean(object.preserveHeaderKeyCase) : void 0
8979
+ queryParams: isSet5(object.queryParams) ? globalThis.String(object.queryParams) : void 0,
8980
+ bodyParams: isSet5(object.bodyParams) ? globalThis.String(object.bodyParams) : void 0,
8981
+ urlParams: isSet5(object.urlParams) ? globalThis.String(object.urlParams) : void 0,
8982
+ action: isSet5(object.action) ? globalThis.String(object.action) : void 0,
8983
+ path: isSet5(object.path) ? globalThis.String(object.path) : "",
8984
+ name: isSet5(object.name) ? globalThis.String(object.name) : void 0,
8985
+ description: isSet5(object.description) ? globalThis.String(object.description) : void 0,
8986
+ middlewares: globalThis.Array.isArray(object?.middlewares) ? object.middlewares.map((e) => globalThis.String(e)) : [],
8987
+ cacheControl: isSet5(object.cacheControl) ? globalThis.String(object.cacheControl) : void 0,
8988
+ errors: globalThis.Array.isArray(object?.errors) ? object.errors.map((e) => RegisterAdminRouteRequest_ErrorDefinition.fromJSON(e)) : [],
8989
+ mcp: isSet5(object.mcp) ? globalThis.Boolean(object.mcp) : void 0,
8990
+ strictParams: isSet5(object.strictParams) ? globalThis.Boolean(object.strictParams) : void 0,
8991
+ rateLimit: isSet5(object.rateLimit) ? globalThis.String(object.rateLimit) : void 0,
8992
+ captureRawBody: isSet5(object.captureRawBody) ? globalThis.Boolean(object.captureRawBody) : void 0,
8993
+ captureRawHeaders: isSet5(object.captureRawHeaders) ? globalThis.Boolean(object.captureRawHeaders) : void 0
8653
8994
  };
8654
8995
  },
8655
8996
  toJSON(message) {
8656
8997
  const obj = {};
8657
- if (message.target !== void 0) {
8658
- obj.target = message.target;
8998
+ if (message.queryParams !== void 0) {
8999
+ obj.queryParams = message.queryParams;
8659
9000
  }
8660
- if (message.changeOrigin !== void 0) {
8661
- obj.changeOrigin = message.changeOrigin;
9001
+ if (message.bodyParams !== void 0) {
9002
+ obj.bodyParams = message.bodyParams;
8662
9003
  }
8663
- if (message.secure !== void 0) {
8664
- obj.secure = message.secure;
9004
+ if (message.urlParams !== void 0) {
9005
+ obj.urlParams = message.urlParams;
8665
9006
  }
8666
- if (message.context !== void 0) {
8667
- obj.context = message.context;
9007
+ if (message.action !== void 0) {
9008
+ obj.action = message.action;
8668
9009
  }
8669
- if (message.pathRewrite !== void 0) {
8670
- obj.pathRewrite = message.pathRewrite;
9010
+ if (message.path !== "") {
9011
+ obj.path = message.path;
8671
9012
  }
8672
- if (message.headers !== void 0) {
8673
- obj.headers = message.headers;
9013
+ if (message.name !== void 0) {
9014
+ obj.name = message.name;
8674
9015
  }
8675
- if (message.proxyTimeout !== void 0) {
8676
- obj.proxyTimeout = Math.round(message.proxyTimeout);
9016
+ if (message.description !== void 0) {
9017
+ obj.description = message.description;
9018
+ }
9019
+ if (message.middlewares?.length) {
9020
+ obj.middlewares = message.middlewares;
8677
9021
  }
8678
- if (message.cookieDomainRewrite !== void 0) {
8679
- obj.cookieDomainRewrite = message.cookieDomainRewrite;
9022
+ if (message.cacheControl !== void 0) {
9023
+ obj.cacheControl = message.cacheControl;
8680
9024
  }
8681
- if (message.autoRewrite !== void 0) {
8682
- obj.autoRewrite = message.autoRewrite;
9025
+ if (message.errors?.length) {
9026
+ obj.errors = message.errors.map((e) => RegisterAdminRouteRequest_ErrorDefinition.toJSON(e));
8683
9027
  }
8684
- if (message.followRedirects !== void 0) {
8685
- obj.followRedirects = message.followRedirects;
9028
+ if (message.mcp !== void 0) {
9029
+ obj.mcp = message.mcp;
8686
9030
  }
8687
- if (message.xfwd !== void 0) {
8688
- obj.xfwd = message.xfwd;
9031
+ if (message.strictParams !== void 0) {
9032
+ obj.strictParams = message.strictParams;
8689
9033
  }
8690
- if (message.ws !== void 0) {
8691
- obj.ws = message.ws;
9034
+ if (message.rateLimit !== void 0) {
9035
+ obj.rateLimit = message.rateLimit;
8692
9036
  }
8693
- if (message.router !== void 0) {
8694
- obj.router = message.router;
9037
+ if (message.captureRawBody !== void 0) {
9038
+ obj.captureRawBody = message.captureRawBody;
8695
9039
  }
8696
- if (message.preserveHeaderKeyCase !== void 0) {
8697
- obj.preserveHeaderKeyCase = message.preserveHeaderKeyCase;
9040
+ if (message.captureRawHeaders !== void 0) {
9041
+ obj.captureRawHeaders = message.captureRawHeaders;
8698
9042
  }
8699
9043
  return obj;
8700
9044
  },
8701
9045
  create(base) {
8702
- return RegisterAdminRouteRequest_ProxyRouteOptions.fromPartial(base ?? {});
9046
+ return RegisterAdminRouteRequest_ConduitRouteOptions.fromPartial(base ?? {});
8703
9047
  },
8704
9048
  fromPartial(object) {
8705
- const message = createBaseRegisterAdminRouteRequest_ProxyRouteOptions();
8706
- message.target = object.target ?? void 0;
8707
- message.changeOrigin = object.changeOrigin ?? void 0;
8708
- message.secure = object.secure ?? void 0;
8709
- message.context = object.context ?? void 0;
8710
- message.pathRewrite = object.pathRewrite ?? void 0;
8711
- message.headers = object.headers ?? void 0;
8712
- message.proxyTimeout = object.proxyTimeout ?? void 0;
8713
- message.cookieDomainRewrite = object.cookieDomainRewrite ?? void 0;
8714
- message.autoRewrite = object.autoRewrite ?? void 0;
8715
- message.followRedirects = object.followRedirects ?? void 0;
8716
- message.xfwd = object.xfwd ?? void 0;
8717
- message.ws = object.ws ?? void 0;
8718
- message.router = object.router ?? void 0;
8719
- message.preserveHeaderKeyCase = object.preserveHeaderKeyCase ?? void 0;
9049
+ const message = createBaseRegisterAdminRouteRequest_ConduitRouteOptions();
9050
+ message.queryParams = object.queryParams ?? void 0;
9051
+ message.bodyParams = object.bodyParams ?? void 0;
9052
+ message.urlParams = object.urlParams ?? void 0;
9053
+ message.action = object.action ?? void 0;
9054
+ message.path = object.path ?? "";
9055
+ message.name = object.name ?? void 0;
9056
+ message.description = object.description ?? void 0;
9057
+ message.middlewares = object.middlewares?.map((e) => e) || [];
9058
+ message.cacheControl = object.cacheControl ?? void 0;
9059
+ message.errors = object.errors?.map((e) => RegisterAdminRouteRequest_ErrorDefinition.fromPartial(e)) || [];
9060
+ message.mcp = object.mcp ?? void 0;
9061
+ message.strictParams = object.strictParams ?? void 0;
9062
+ message.rateLimit = object.rateLimit ?? void 0;
9063
+ message.captureRawBody = object.captureRawBody ?? void 0;
9064
+ message.captureRawHeaders = object.captureRawHeaders ?? void 0;
8720
9065
  return message;
8721
9066
  }
8722
9067
  };
@@ -9479,6 +9824,57 @@ var GetConfigRequest = {
9479
9824
  return message;
9480
9825
  }
9481
9826
  };
9827
+ function createBaseDeleteConfigRequest() {
9828
+ return { key: "" };
9829
+ }
9830
+ var DeleteConfigRequest = {
9831
+ encode(message, writer = new BinaryWriter6()) {
9832
+ if (message.key !== "") {
9833
+ writer.uint32(10).string(message.key);
9834
+ }
9835
+ return writer;
9836
+ },
9837
+ decode(input, length) {
9838
+ const reader = input instanceof BinaryReader6 ? input : new BinaryReader6(input);
9839
+ const end = length === void 0 ? reader.len : reader.pos + length;
9840
+ const message = createBaseDeleteConfigRequest();
9841
+ while (reader.pos < end) {
9842
+ const tag = reader.uint32();
9843
+ switch (tag >>> 3) {
9844
+ case 1: {
9845
+ if (tag !== 10) {
9846
+ break;
9847
+ }
9848
+ message.key = reader.string();
9849
+ continue;
9850
+ }
9851
+ }
9852
+ if ((tag & 7) === 4 || tag === 0) {
9853
+ break;
9854
+ }
9855
+ reader.skip(tag & 7);
9856
+ }
9857
+ return message;
9858
+ },
9859
+ fromJSON(object) {
9860
+ return { key: isSet5(object.key) ? globalThis.String(object.key) : "" };
9861
+ },
9862
+ toJSON(message) {
9863
+ const obj = {};
9864
+ if (message.key !== "") {
9865
+ obj.key = message.key;
9866
+ }
9867
+ return obj;
9868
+ },
9869
+ create(base) {
9870
+ return DeleteConfigRequest.fromPartial(base ?? {});
9871
+ },
9872
+ fromPartial(object) {
9873
+ const message = createBaseDeleteConfigRequest();
9874
+ message.key = object.key ?? "";
9875
+ return message;
9876
+ }
9877
+ };
9482
9878
  function createBaseGetRedisDetailsResponse() {
9483
9879
  return {
9484
9880
  redisHost: void 0,
@@ -9952,6 +10348,14 @@ var ConfigDefinition = {
9952
10348
  responseType: ModuleByNameResponse,
9953
10349
  responseStream: false,
9954
10350
  options: {}
10351
+ },
10352
+ deleteConfig: {
10353
+ name: "DeleteConfig",
10354
+ requestType: DeleteConfigRequest,
10355
+ requestStream: false,
10356
+ responseType: Empty,
10357
+ responseStream: false,
10358
+ options: {}
9955
10359
  }
9956
10360
  }
9957
10361
  };
@@ -13043,7 +13447,9 @@ function createBaseRequest() {
13043
13447
  bodyParams: "",
13044
13448
  urlParams: "",
13045
13449
  queryParams: "",
13046
- functionName: ""
13450
+ functionName: "",
13451
+ rawHeaders: "",
13452
+ rawBody: new Uint8Array(0)
13047
13453
  };
13048
13454
  }
13049
13455
  var Request = {
@@ -13075,6 +13481,12 @@ var Request = {
13075
13481
  if (message.functionName !== "") {
13076
13482
  writer.uint32(74).string(message.functionName);
13077
13483
  }
13484
+ if (message.rawHeaders !== "") {
13485
+ writer.uint32(82).string(message.rawHeaders);
13486
+ }
13487
+ if (message.rawBody.length !== 0) {
13488
+ writer.uint32(90).bytes(message.rawBody);
13489
+ }
13078
13490
  return writer;
13079
13491
  },
13080
13492
  decode(input, length) {
@@ -13147,6 +13559,20 @@ var Request = {
13147
13559
  message.functionName = reader.string();
13148
13560
  continue;
13149
13561
  }
13562
+ case 10: {
13563
+ if (tag !== 82) {
13564
+ break;
13565
+ }
13566
+ message.rawHeaders = reader.string();
13567
+ continue;
13568
+ }
13569
+ case 11: {
13570
+ if (tag !== 90) {
13571
+ break;
13572
+ }
13573
+ message.rawBody = reader.bytes();
13574
+ continue;
13575
+ }
13150
13576
  }
13151
13577
  if ((tag & 7) === 4 || tag === 0) {
13152
13578
  break;
@@ -13165,7 +13591,9 @@ var Request = {
13165
13591
  bodyParams: isSet8(object.bodyParams) ? globalThis.String(object.bodyParams) : "",
13166
13592
  urlParams: isSet8(object.urlParams) ? globalThis.String(object.urlParams) : "",
13167
13593
  queryParams: isSet8(object.queryParams) ? globalThis.String(object.queryParams) : "",
13168
- functionName: isSet8(object.functionName) ? globalThis.String(object.functionName) : ""
13594
+ functionName: isSet8(object.functionName) ? globalThis.String(object.functionName) : "",
13595
+ rawHeaders: isSet8(object.rawHeaders) ? globalThis.String(object.rawHeaders) : "",
13596
+ rawBody: isSet8(object.rawBody) ? bytesFromBase642(object.rawBody) : new Uint8Array(0)
13169
13597
  };
13170
13598
  },
13171
13599
  toJSON(message) {
@@ -13197,6 +13625,12 @@ var Request = {
13197
13625
  if (message.functionName !== "") {
13198
13626
  obj.functionName = message.functionName;
13199
13627
  }
13628
+ if (message.rawHeaders !== "") {
13629
+ obj.rawHeaders = message.rawHeaders;
13630
+ }
13631
+ if (message.rawBody.length !== 0) {
13632
+ obj.rawBody = base64FromBytes2(message.rawBody);
13633
+ }
13200
13634
  return obj;
13201
13635
  },
13202
13636
  create(base) {
@@ -13213,6 +13647,8 @@ var Request = {
13213
13647
  message.urlParams = object.urlParams ?? "";
13214
13648
  message.queryParams = object.queryParams ?? "";
13215
13649
  message.functionName = object.functionName ?? "";
13650
+ message.rawHeaders = object.rawHeaders ?? "";
13651
+ message.rawBody = object.rawBody ?? new Uint8Array(0);
13216
13652
  return message;
13217
13653
  }
13218
13654
  };
@@ -13833,6 +14269,29 @@ var AdminRouterDefinition = {
13833
14269
  }
13834
14270
  }
13835
14271
  };
14272
+ function bytesFromBase642(b64) {
14273
+ if (globalThis.Buffer) {
14274
+ return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
14275
+ } else {
14276
+ const bin = globalThis.atob(b64);
14277
+ const arr = new Uint8Array(bin.length);
14278
+ for (let i = 0; i < bin.length; ++i) {
14279
+ arr[i] = bin.charCodeAt(i);
14280
+ }
14281
+ return arr;
14282
+ }
14283
+ }
14284
+ function base64FromBytes2(arr) {
14285
+ if (globalThis.Buffer) {
14286
+ return globalThis.Buffer.from(arr).toString("base64");
14287
+ } else {
14288
+ const bin = [];
14289
+ arr.forEach((byte) => {
14290
+ bin.push(globalThis.String.fromCharCode(byte));
14291
+ });
14292
+ return globalThis.btoa(bin.join(""));
14293
+ }
14294
+ }
13836
14295
  function isSet8(value) {
13837
14296
  return value !== null && value !== void 0;
13838
14297
  }
@@ -14319,7 +14778,9 @@ function createBaseRegisterConduitRouteRequest_ConduitRouteOptions() {
14319
14778
  errors: [],
14320
14779
  mcp: void 0,
14321
14780
  strictParams: void 0,
14322
- rateLimit: void 0
14781
+ rateLimit: void 0,
14782
+ captureRawBody: void 0,
14783
+ captureRawHeaders: void 0
14323
14784
  };
14324
14785
  }
14325
14786
  var RegisterConduitRouteRequest_ConduitRouteOptions = {
@@ -14363,6 +14824,12 @@ var RegisterConduitRouteRequest_ConduitRouteOptions = {
14363
14824
  if (message.rateLimit !== void 0) {
14364
14825
  writer.uint32(106).string(message.rateLimit);
14365
14826
  }
14827
+ if (message.captureRawBody !== void 0) {
14828
+ writer.uint32(112).bool(message.captureRawBody);
14829
+ }
14830
+ if (message.captureRawHeaders !== void 0) {
14831
+ writer.uint32(120).bool(message.captureRawHeaders);
14832
+ }
14366
14833
  return writer;
14367
14834
  },
14368
14835
  decode(input, length) {
@@ -14463,6 +14930,20 @@ var RegisterConduitRouteRequest_ConduitRouteOptions = {
14463
14930
  message.rateLimit = reader.string();
14464
14931
  continue;
14465
14932
  }
14933
+ case 14: {
14934
+ if (tag !== 112) {
14935
+ break;
14936
+ }
14937
+ message.captureRawBody = reader.bool();
14938
+ continue;
14939
+ }
14940
+ case 15: {
14941
+ if (tag !== 120) {
14942
+ break;
14943
+ }
14944
+ message.captureRawHeaders = reader.bool();
14945
+ continue;
14946
+ }
14466
14947
  }
14467
14948
  if ((tag & 7) === 4 || tag === 0) {
14468
14949
  break;
@@ -14485,7 +14966,9 @@ var RegisterConduitRouteRequest_ConduitRouteOptions = {
14485
14966
  errors: globalThis.Array.isArray(object?.errors) ? object.errors.map((e) => RegisterConduitRouteRequest_ErrorDefinition.fromJSON(e)) : [],
14486
14967
  mcp: isSet9(object.mcp) ? globalThis.Boolean(object.mcp) : void 0,
14487
14968
  strictParams: isSet9(object.strictParams) ? globalThis.Boolean(object.strictParams) : void 0,
14488
- rateLimit: isSet9(object.rateLimit) ? globalThis.String(object.rateLimit) : void 0
14969
+ rateLimit: isSet9(object.rateLimit) ? globalThis.String(object.rateLimit) : void 0,
14970
+ captureRawBody: isSet9(object.captureRawBody) ? globalThis.Boolean(object.captureRawBody) : void 0,
14971
+ captureRawHeaders: isSet9(object.captureRawHeaders) ? globalThis.Boolean(object.captureRawHeaders) : void 0
14489
14972
  };
14490
14973
  },
14491
14974
  toJSON(message) {
@@ -14529,6 +15012,12 @@ var RegisterConduitRouteRequest_ConduitRouteOptions = {
14529
15012
  if (message.rateLimit !== void 0) {
14530
15013
  obj.rateLimit = message.rateLimit;
14531
15014
  }
15015
+ if (message.captureRawBody !== void 0) {
15016
+ obj.captureRawBody = message.captureRawBody;
15017
+ }
15018
+ if (message.captureRawHeaders !== void 0) {
15019
+ obj.captureRawHeaders = message.captureRawHeaders;
15020
+ }
14532
15021
  return obj;
14533
15022
  },
14534
15023
  create(base) {
@@ -14549,6 +15038,8 @@ var RegisterConduitRouteRequest_ConduitRouteOptions = {
14549
15038
  message.mcp = object.mcp ?? void 0;
14550
15039
  message.strictParams = object.strictParams ?? void 0;
14551
15040
  message.rateLimit = object.rateLimit ?? void 0;
15041
+ message.captureRawBody = object.captureRawBody ?? void 0;
15042
+ message.captureRawHeaders = object.captureRawHeaders ?? void 0;
14552
15043
  return message;
14553
15044
  }
14554
15045
  };
@@ -16715,6 +17206,9 @@ var Config = class extends ConduitModule {
16715
17206
  return JSON.parse(res.data);
16716
17207
  });
16717
17208
  }
17209
+ delete(name) {
17210
+ return this.client.deleteConfig({ key: name });
17211
+ }
16718
17212
  configure(config, schema, override) {
16719
17213
  const request = {
16720
17214
  config: JSON.stringify(config),
@@ -16930,7 +17424,7 @@ var Chat = class extends ConduitModule {
16930
17424
  }
16931
17425
  moduleName;
16932
17426
  sendMessage(messageData) {
16933
- return this.client.sendMessage(messageData);
17427
+ return this.client.sendMessage(SendMessageRequest.fromPartial(messageData));
16934
17428
  }
16935
17429
  createRoom(name, participants) {
16936
17430
  return this.client.createRoom({ name, participants });
@@ -17179,8 +17673,7 @@ var Communications = class extends ConduitModule {
17179
17673
  sendMessage(channel, params) {
17180
17674
  return this.client.sendCommunication({
17181
17675
  channel,
17182
- templateName: "",
17183
- // Not used for direct sending
17676
+ templateName: params.templateName ?? "",
17184
17677
  params: {
17185
17678
  recipient: params.recipient,
17186
17679
  subject: params.subject,
@@ -17206,8 +17699,7 @@ var Communications = class extends ConduitModule {
17206
17699
  return this.client.sendToMultipleChannels({
17207
17700
  channels,
17208
17701
  strategy,
17209
- templateName: "",
17210
- // Not used for direct sending
17702
+ templateName: params.templateName ?? "",
17211
17703
  params: {
17212
17704
  recipient: params.recipient,
17213
17705
  subject: params.subject,
@@ -17229,8 +17721,7 @@ var Communications = class extends ConduitModule {
17229
17721
  sendWithFallback(fallbackChain, params) {
17230
17722
  return this.client.sendWithFallback({
17231
17723
  fallbackChain,
17232
- templateName: "",
17233
- // Not used for direct sending
17724
+ templateName: params.templateName ?? "",
17234
17725
  params: {
17235
17726
  recipient: params.recipient,
17236
17727
  subject: params.subject,
@@ -17261,6 +17752,51 @@ var Communications = class extends ConduitModule {
17261
17752
  return JSON.parse(res.statusInfo);
17262
17753
  });
17263
17754
  }
17755
+ registerCommunicationTemplate(template) {
17756
+ return this.client.registerCommunicationTemplate({
17757
+ name: template.name,
17758
+ channels: template.channels,
17759
+ description: template.description,
17760
+ variables: template.variables ?? [],
17761
+ template: {
17762
+ email: template.email,
17763
+ push: template.push,
17764
+ sms: template.sms
17765
+ }
17766
+ }).then((res) => JSON.parse(res.template));
17767
+ }
17768
+ updateCommunicationTemplate(id, params) {
17769
+ return this.client.updateCommunicationTemplate({
17770
+ id,
17771
+ name: params.name,
17772
+ channels: params.channels ?? [],
17773
+ description: params.description,
17774
+ variables: params.variables ?? [],
17775
+ template: {
17776
+ email: params.email,
17777
+ push: params.push,
17778
+ sms: params.sms
17779
+ }
17780
+ }).then((res) => JSON.parse(res.template));
17781
+ }
17782
+ deleteCommunicationTemplate(id) {
17783
+ return this.client.deleteCommunicationTemplate({ id });
17784
+ }
17785
+ getCommunicationTemplate(params) {
17786
+ return this.client.getCommunicationTemplate(params).then((res) => {
17787
+ return JSON.parse(res.template);
17788
+ });
17789
+ }
17790
+ listCommunicationTemplates(params) {
17791
+ return this.client.listCommunicationTemplates({
17792
+ skip: params.skip ?? 0,
17793
+ limit: params.limit ?? 25,
17794
+ search: params.search
17795
+ }).then((res) => ({
17796
+ templates: res.templates.map((t) => JSON.parse(t)),
17797
+ count: res.count
17798
+ }));
17799
+ }
17264
17800
  };
17265
17801
 
17266
17802
  // src/index.ts
@@ -17393,7 +17929,24 @@ var RedisManager = class {
17393
17929
  };
17394
17930
 
17395
17931
  // src/utilities/StateManager.ts
17396
- import { Redlock } from "@sesamecare-oss/redlock";
17932
+ import {
17933
+ ExecutionError,
17934
+ Redlock,
17935
+ ResourceLockedError
17936
+ } from "@sesamecare-oss/redlock";
17937
+ async function isLockContention(error) {
17938
+ if (error instanceof ResourceLockedError) {
17939
+ return true;
17940
+ }
17941
+ if (!(error instanceof ExecutionError)) {
17942
+ return false;
17943
+ }
17944
+ const attempts = await Promise.all(error.attempts);
17945
+ const voteErrors = attempts.flatMap(
17946
+ (attempt) => Array.from(attempt.votesAgainst.values())
17947
+ );
17948
+ return voteErrors.length > 0 && voteErrors.every((voteError) => voteError instanceof ResourceLockedError);
17949
+ }
17397
17950
  var StateManager = class {
17398
17951
  redisClient;
17399
17952
  redLock;
@@ -17427,9 +17980,31 @@ var StateManager = class {
17427
17980
  async acquireLock(resource, ttl = 5e3) {
17428
17981
  return await this.redLock.acquire([resource], ttl);
17429
17982
  }
17983
+ /**
17984
+ * Attempt to acquire a lock once. Returns null when another holder owns the
17985
+ * resource (contention). Re-throws Redis/infrastructure failures.
17986
+ */
17987
+ async tryAcquireLock(resource, ttl = 5e3) {
17988
+ try {
17989
+ return await this.redLock.acquire([resource], ttl, { retryCount: 0 });
17990
+ } catch (error) {
17991
+ if (await isLockContention(error)) {
17992
+ return null;
17993
+ }
17994
+ throw error;
17995
+ }
17996
+ }
17430
17997
  async releaseLock(lock) {
17431
17998
  await lock.release();
17432
17999
  }
18000
+ async withLock(resource, ttl, fn) {
18001
+ const lock = await this.acquireLock(resource, ttl);
18002
+ try {
18003
+ return await fn();
18004
+ } finally {
18005
+ await this.releaseLock(lock);
18006
+ }
18007
+ }
17433
18008
  async modifyState(modifier) {
17434
18009
  const lock = await this.acquireLock("state_modification" /* STATE_MODIFICATION */);
17435
18010
  try {
@@ -18238,6 +18813,9 @@ export {
18238
18813
  DatabaseProviderDefinition,
18239
18814
  Decision,
18240
18815
  DeleteAllRelationsRequest,
18816
+ DeleteCommunicationTemplateRequest,
18817
+ DeleteCommunicationTemplateResponse,
18818
+ DeleteConfigRequest,
18241
18819
  DeleteFileResponse,
18242
18820
  DeleteResourceRequest,
18243
18821
  DeleteRoomRequest,
@@ -18254,6 +18832,8 @@ export {
18254
18832
  FindRelationResponse,
18255
18833
  FindRequest,
18256
18834
  FindRequest_SortEntry,
18835
+ GetCommunicationTemplateRequest,
18836
+ GetCommunicationTemplateResponse,
18257
18837
  GetConfigRequest,
18258
18838
  GetConfigResponse,
18259
18839
  GetDatabaseTypeResponse,
@@ -18287,6 +18867,8 @@ export {
18287
18867
  InvitationDeleteResponse,
18288
18868
  InviteUserToTeamRequest,
18289
18869
  InviteUserToTeamResponse,
18870
+ ListCommunicationTemplatesRequest,
18871
+ ListCommunicationTemplatesResponse,
18290
18872
  MetricType,
18291
18873
  MigrateRequest,
18292
18874
  ModifyTeamMembersRequest,
@@ -18316,7 +18898,6 @@ export {
18316
18898
  RegisterAdminRouteRequest_ConduitRouteReturnDefinition,
18317
18899
  RegisterAdminRouteRequest_ErrorDefinition,
18318
18900
  RegisterAdminRouteRequest_PathDefinition,
18319
- RegisterAdminRouteRequest_ProxyRouteOptions,
18320
18901
  RegisterCommunicationTemplateRequest,
18321
18902
  RegisterCommunicationTemplateRequest_CommunicationTemplate,
18322
18903
  RegisterCommunicationTemplateRequest_CommunicationTemplate_EmailTemplate,
@@ -18389,6 +18970,7 @@ export {
18389
18970
  Team,
18390
18971
  TeamDeleteRequest,
18391
18972
  TeamDeleteResponse,
18973
+ UpdateCommunicationTemplateRequest,
18392
18974
  UpdateConfigRequest,
18393
18975
  UpdateConfigResponse,
18394
18976
  UpdateFileByUrlRequest,