@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.cjs CHANGED
@@ -76,6 +76,9 @@ __export(index_exports, {
76
76
  DatabaseProviderDefinition: () => DatabaseProviderDefinition,
77
77
  Decision: () => Decision,
78
78
  DeleteAllRelationsRequest: () => DeleteAllRelationsRequest,
79
+ DeleteCommunicationTemplateRequest: () => DeleteCommunicationTemplateRequest,
80
+ DeleteCommunicationTemplateResponse: () => DeleteCommunicationTemplateResponse,
81
+ DeleteConfigRequest: () => DeleteConfigRequest,
79
82
  DeleteFileResponse: () => DeleteFileResponse,
80
83
  DeleteResourceRequest: () => DeleteResourceRequest,
81
84
  DeleteRoomRequest: () => DeleteRoomRequest,
@@ -92,6 +95,8 @@ __export(index_exports, {
92
95
  FindRelationResponse: () => FindRelationResponse,
93
96
  FindRequest: () => FindRequest,
94
97
  FindRequest_SortEntry: () => FindRequest_SortEntry,
98
+ GetCommunicationTemplateRequest: () => GetCommunicationTemplateRequest,
99
+ GetCommunicationTemplateResponse: () => GetCommunicationTemplateResponse,
95
100
  GetConfigRequest: () => GetConfigRequest,
96
101
  GetConfigResponse: () => GetConfigResponse,
97
102
  GetDatabaseTypeResponse: () => GetDatabaseTypeResponse,
@@ -125,6 +130,8 @@ __export(index_exports, {
125
130
  InvitationDeleteResponse: () => InvitationDeleteResponse,
126
131
  InviteUserToTeamRequest: () => InviteUserToTeamRequest,
127
132
  InviteUserToTeamResponse: () => InviteUserToTeamResponse,
133
+ ListCommunicationTemplatesRequest: () => ListCommunicationTemplatesRequest,
134
+ ListCommunicationTemplatesResponse: () => ListCommunicationTemplatesResponse,
128
135
  MetricType: () => MetricType,
129
136
  MigrateRequest: () => MigrateRequest,
130
137
  ModifyTeamMembersRequest: () => ModifyTeamMembersRequest,
@@ -154,7 +161,6 @@ __export(index_exports, {
154
161
  RegisterAdminRouteRequest_ConduitRouteReturnDefinition: () => RegisterAdminRouteRequest_ConduitRouteReturnDefinition,
155
162
  RegisterAdminRouteRequest_ErrorDefinition: () => RegisterAdminRouteRequest_ErrorDefinition,
156
163
  RegisterAdminRouteRequest_PathDefinition: () => RegisterAdminRouteRequest_PathDefinition,
157
- RegisterAdminRouteRequest_ProxyRouteOptions: () => RegisterAdminRouteRequest_ProxyRouteOptions,
158
164
  RegisterCommunicationTemplateRequest: () => RegisterCommunicationTemplateRequest,
159
165
  RegisterCommunicationTemplateRequest_CommunicationTemplate: () => RegisterCommunicationTemplateRequest_CommunicationTemplate,
160
166
  RegisterCommunicationTemplateRequest_CommunicationTemplate_EmailTemplate: () => RegisterCommunicationTemplateRequest_CommunicationTemplate_EmailTemplate,
@@ -227,6 +233,7 @@ __export(index_exports, {
227
233
  Team: () => Team,
228
234
  TeamDeleteRequest: () => TeamDeleteRequest,
229
235
  TeamDeleteResponse: () => TeamDeleteResponse,
236
+ UpdateCommunicationTemplateRequest: () => UpdateCommunicationTemplateRequest,
230
237
  UpdateConfigRequest: () => UpdateConfigRequest,
231
238
  UpdateConfigResponse: () => UpdateConfigResponse,
232
239
  UpdateFileByUrlRequest: () => UpdateFileByUrlRequest,
@@ -3743,7 +3750,7 @@ var CreateRoomRequest = {
3743
3750
  }
3744
3751
  };
3745
3752
  function createBaseSendMessageRequest() {
3746
- return { message: "", userId: "", roomId: "", messageType: void 0, persist: void 0 };
3753
+ return { message: "", userId: "", roomId: "", messageType: void 0, persist: void 0, files: [] };
3747
3754
  }
3748
3755
  var SendMessageRequest = {
3749
3756
  encode(message, writer = new import_wire4.BinaryWriter()) {
@@ -3762,6 +3769,9 @@ var SendMessageRequest = {
3762
3769
  if (message.persist !== void 0) {
3763
3770
  writer.uint32(40).bool(message.persist);
3764
3771
  }
3772
+ for (const v of message.files) {
3773
+ writer.uint32(50).string(v);
3774
+ }
3765
3775
  return writer;
3766
3776
  },
3767
3777
  decode(input, length) {
@@ -3806,6 +3816,13 @@ var SendMessageRequest = {
3806
3816
  message.persist = reader.bool();
3807
3817
  continue;
3808
3818
  }
3819
+ case 6: {
3820
+ if (tag !== 50) {
3821
+ break;
3822
+ }
3823
+ message.files.push(reader.string());
3824
+ continue;
3825
+ }
3809
3826
  }
3810
3827
  if ((tag & 7) === 4 || tag === 0) {
3811
3828
  break;
@@ -3820,7 +3837,8 @@ var SendMessageRequest = {
3820
3837
  userId: isSet3(object.userId) ? globalThis.String(object.userId) : "",
3821
3838
  roomId: isSet3(object.roomId) ? globalThis.String(object.roomId) : "",
3822
3839
  messageType: isSet3(object.messageType) ? globalThis.String(object.messageType) : void 0,
3823
- persist: isSet3(object.persist) ? globalThis.Boolean(object.persist) : void 0
3840
+ persist: isSet3(object.persist) ? globalThis.Boolean(object.persist) : void 0,
3841
+ files: globalThis.Array.isArray(object?.files) ? object.files.map((e) => globalThis.String(e)) : []
3824
3842
  };
3825
3843
  },
3826
3844
  toJSON(message) {
@@ -3840,6 +3858,9 @@ var SendMessageRequest = {
3840
3858
  if (message.persist !== void 0) {
3841
3859
  obj.persist = message.persist;
3842
3860
  }
3861
+ if (message.files?.length) {
3862
+ obj.files = message.files;
3863
+ }
3843
3864
  return obj;
3844
3865
  },
3845
3866
  create(base) {
@@ -3852,6 +3873,7 @@ var SendMessageRequest = {
3852
3873
  message.roomId = object.roomId ?? "";
3853
3874
  message.messageType = object.messageType ?? void 0;
3854
3875
  message.persist = object.persist ?? void 0;
3876
+ message.files = object.files?.map((e) => e) || [];
3855
3877
  return message;
3856
3878
  }
3857
3879
  };
@@ -7398,15 +7420,24 @@ var SendWithFallbackResponse_ChannelResult = {
7398
7420
  }
7399
7421
  };
7400
7422
  function createBaseRegisterCommunicationTemplateRequest() {
7401
- return { name: "", template: void 0 };
7423
+ return { name: "", channels: [], description: void 0, template: void 0, variables: [] };
7402
7424
  }
7403
7425
  var RegisterCommunicationTemplateRequest = {
7404
7426
  encode(message, writer = new import_wire5.BinaryWriter()) {
7405
7427
  if (message.name !== "") {
7406
7428
  writer.uint32(10).string(message.name);
7407
7429
  }
7430
+ for (const v of message.channels) {
7431
+ writer.uint32(18).string(v);
7432
+ }
7433
+ if (message.description !== void 0) {
7434
+ writer.uint32(26).string(message.description);
7435
+ }
7408
7436
  if (message.template !== void 0) {
7409
- RegisterCommunicationTemplateRequest_CommunicationTemplate.encode(message.template, writer.uint32(18).fork()).join();
7437
+ RegisterCommunicationTemplateRequest_CommunicationTemplate.encode(message.template, writer.uint32(34).fork()).join();
7438
+ }
7439
+ for (const v of message.variables) {
7440
+ writer.uint32(42).string(v);
7410
7441
  }
7411
7442
  return writer;
7412
7443
  },
@@ -7428,9 +7459,30 @@ var RegisterCommunicationTemplateRequest = {
7428
7459
  if (tag !== 18) {
7429
7460
  break;
7430
7461
  }
7462
+ message.channels.push(reader.string());
7463
+ continue;
7464
+ }
7465
+ case 3: {
7466
+ if (tag !== 26) {
7467
+ break;
7468
+ }
7469
+ message.description = reader.string();
7470
+ continue;
7471
+ }
7472
+ case 4: {
7473
+ if (tag !== 34) {
7474
+ break;
7475
+ }
7431
7476
  message.template = RegisterCommunicationTemplateRequest_CommunicationTemplate.decode(reader, reader.uint32());
7432
7477
  continue;
7433
7478
  }
7479
+ case 5: {
7480
+ if (tag !== 42) {
7481
+ break;
7482
+ }
7483
+ message.variables.push(reader.string());
7484
+ continue;
7485
+ }
7434
7486
  }
7435
7487
  if ((tag & 7) === 4 || tag === 0) {
7436
7488
  break;
@@ -7442,7 +7494,10 @@ var RegisterCommunicationTemplateRequest = {
7442
7494
  fromJSON(object) {
7443
7495
  return {
7444
7496
  name: isSet4(object.name) ? globalThis.String(object.name) : "",
7445
- template: isSet4(object.template) ? RegisterCommunicationTemplateRequest_CommunicationTemplate.fromJSON(object.template) : void 0
7497
+ channels: globalThis.Array.isArray(object?.channels) ? object.channels.map((e) => globalThis.String(e)) : [],
7498
+ description: isSet4(object.description) ? globalThis.String(object.description) : void 0,
7499
+ template: isSet4(object.template) ? RegisterCommunicationTemplateRequest_CommunicationTemplate.fromJSON(object.template) : void 0,
7500
+ variables: globalThis.Array.isArray(object?.variables) ? object.variables.map((e) => globalThis.String(e)) : []
7446
7501
  };
7447
7502
  },
7448
7503
  toJSON(message) {
@@ -7450,9 +7505,18 @@ var RegisterCommunicationTemplateRequest = {
7450
7505
  if (message.name !== "") {
7451
7506
  obj.name = message.name;
7452
7507
  }
7508
+ if (message.channels?.length) {
7509
+ obj.channels = message.channels;
7510
+ }
7511
+ if (message.description !== void 0) {
7512
+ obj.description = message.description;
7513
+ }
7453
7514
  if (message.template !== void 0) {
7454
7515
  obj.template = RegisterCommunicationTemplateRequest_CommunicationTemplate.toJSON(message.template);
7455
7516
  }
7517
+ if (message.variables?.length) {
7518
+ obj.variables = message.variables;
7519
+ }
7456
7520
  return obj;
7457
7521
  },
7458
7522
  create(base) {
@@ -7461,7 +7525,10 @@ var RegisterCommunicationTemplateRequest = {
7461
7525
  fromPartial(object) {
7462
7526
  const message = createBaseRegisterCommunicationTemplateRequest();
7463
7527
  message.name = object.name ?? "";
7528
+ message.channels = object.channels?.map((e) => e) || [];
7529
+ message.description = object.description ?? void 0;
7464
7530
  message.template = object.template !== void 0 && object.template !== null ? RegisterCommunicationTemplateRequest_CommunicationTemplate.fromPartial(object.template) : void 0;
7531
+ message.variables = object.variables?.map((e) => e) || [];
7465
7532
  return message;
7466
7533
  }
7467
7534
  };
@@ -7866,23 +7933,35 @@ var RegisterCommunicationTemplateResponse = {
7866
7933
  return message;
7867
7934
  }
7868
7935
  };
7869
- function createBaseGetMessageStatusRequest() {
7870
- return { messageId: "", channel: "" };
7936
+ function createBaseUpdateCommunicationTemplateRequest() {
7937
+ return { id: "", name: void 0, channels: [], description: void 0, template: void 0, variables: [] };
7871
7938
  }
7872
- var GetMessageStatusRequest = {
7939
+ var UpdateCommunicationTemplateRequest = {
7873
7940
  encode(message, writer = new import_wire5.BinaryWriter()) {
7874
- if (message.messageId !== "") {
7875
- writer.uint32(10).string(message.messageId);
7941
+ if (message.id !== "") {
7942
+ writer.uint32(10).string(message.id);
7876
7943
  }
7877
- if (message.channel !== "") {
7878
- writer.uint32(18).string(message.channel);
7944
+ if (message.name !== void 0) {
7945
+ writer.uint32(18).string(message.name);
7946
+ }
7947
+ for (const v of message.channels) {
7948
+ writer.uint32(26).string(v);
7949
+ }
7950
+ if (message.description !== void 0) {
7951
+ writer.uint32(34).string(message.description);
7952
+ }
7953
+ if (message.template !== void 0) {
7954
+ RegisterCommunicationTemplateRequest_CommunicationTemplate.encode(message.template, writer.uint32(42).fork()).join();
7955
+ }
7956
+ for (const v of message.variables) {
7957
+ writer.uint32(50).string(v);
7879
7958
  }
7880
7959
  return writer;
7881
7960
  },
7882
7961
  decode(input, length) {
7883
7962
  const reader = input instanceof import_wire5.BinaryReader ? input : new import_wire5.BinaryReader(input);
7884
7963
  const end = length === void 0 ? reader.len : reader.pos + length;
7885
- const message = createBaseGetMessageStatusRequest();
7964
+ const message = createBaseUpdateCommunicationTemplateRequest();
7886
7965
  while (reader.pos < end) {
7887
7966
  const tag = reader.uint32();
7888
7967
  switch (tag >>> 3) {
@@ -7890,14 +7969,42 @@ var GetMessageStatusRequest = {
7890
7969
  if (tag !== 10) {
7891
7970
  break;
7892
7971
  }
7893
- message.messageId = reader.string();
7972
+ message.id = reader.string();
7894
7973
  continue;
7895
7974
  }
7896
7975
  case 2: {
7897
7976
  if (tag !== 18) {
7898
7977
  break;
7899
7978
  }
7900
- message.channel = reader.string();
7979
+ message.name = reader.string();
7980
+ continue;
7981
+ }
7982
+ case 3: {
7983
+ if (tag !== 26) {
7984
+ break;
7985
+ }
7986
+ message.channels.push(reader.string());
7987
+ continue;
7988
+ }
7989
+ case 4: {
7990
+ if (tag !== 34) {
7991
+ break;
7992
+ }
7993
+ message.description = reader.string();
7994
+ continue;
7995
+ }
7996
+ case 5: {
7997
+ if (tag !== 42) {
7998
+ break;
7999
+ }
8000
+ message.template = RegisterCommunicationTemplateRequest_CommunicationTemplate.decode(reader, reader.uint32());
8001
+ continue;
8002
+ }
8003
+ case 6: {
8004
+ if (tag !== 50) {
8005
+ break;
8006
+ }
8007
+ message.variables.push(reader.string());
7901
8008
  continue;
7902
8009
  }
7903
8010
  }
@@ -7910,44 +8017,64 @@ var GetMessageStatusRequest = {
7910
8017
  },
7911
8018
  fromJSON(object) {
7912
8019
  return {
7913
- messageId: isSet4(object.messageId) ? globalThis.String(object.messageId) : "",
7914
- channel: isSet4(object.channel) ? globalThis.String(object.channel) : ""
8020
+ id: isSet4(object.id) ? globalThis.String(object.id) : "",
8021
+ name: isSet4(object.name) ? globalThis.String(object.name) : void 0,
8022
+ channels: globalThis.Array.isArray(object?.channels) ? object.channels.map((e) => globalThis.String(e)) : [],
8023
+ description: isSet4(object.description) ? globalThis.String(object.description) : void 0,
8024
+ template: isSet4(object.template) ? RegisterCommunicationTemplateRequest_CommunicationTemplate.fromJSON(object.template) : void 0,
8025
+ variables: globalThis.Array.isArray(object?.variables) ? object.variables.map((e) => globalThis.String(e)) : []
7915
8026
  };
7916
8027
  },
7917
8028
  toJSON(message) {
7918
8029
  const obj = {};
7919
- if (message.messageId !== "") {
7920
- obj.messageId = message.messageId;
8030
+ if (message.id !== "") {
8031
+ obj.id = message.id;
7921
8032
  }
7922
- if (message.channel !== "") {
7923
- obj.channel = message.channel;
8033
+ if (message.name !== void 0) {
8034
+ obj.name = message.name;
8035
+ }
8036
+ if (message.channels?.length) {
8037
+ obj.channels = message.channels;
8038
+ }
8039
+ if (message.description !== void 0) {
8040
+ obj.description = message.description;
8041
+ }
8042
+ if (message.template !== void 0) {
8043
+ obj.template = RegisterCommunicationTemplateRequest_CommunicationTemplate.toJSON(message.template);
8044
+ }
8045
+ if (message.variables?.length) {
8046
+ obj.variables = message.variables;
7924
8047
  }
7925
8048
  return obj;
7926
8049
  },
7927
8050
  create(base) {
7928
- return GetMessageStatusRequest.fromPartial(base ?? {});
8051
+ return UpdateCommunicationTemplateRequest.fromPartial(base ?? {});
7929
8052
  },
7930
8053
  fromPartial(object) {
7931
- const message = createBaseGetMessageStatusRequest();
7932
- message.messageId = object.messageId ?? "";
7933
- message.channel = object.channel ?? "";
8054
+ const message = createBaseUpdateCommunicationTemplateRequest();
8055
+ message.id = object.id ?? "";
8056
+ message.name = object.name ?? void 0;
8057
+ message.channels = object.channels?.map((e) => e) || [];
8058
+ message.description = object.description ?? void 0;
8059
+ message.template = object.template !== void 0 && object.template !== null ? RegisterCommunicationTemplateRequest_CommunicationTemplate.fromPartial(object.template) : void 0;
8060
+ message.variables = object.variables?.map((e) => e) || [];
7934
8061
  return message;
7935
8062
  }
7936
8063
  };
7937
- function createBaseGetMessageStatusResponse() {
7938
- return { statusInfo: "" };
8064
+ function createBaseDeleteCommunicationTemplateRequest() {
8065
+ return { id: "" };
7939
8066
  }
7940
- var GetMessageStatusResponse = {
8067
+ var DeleteCommunicationTemplateRequest = {
7941
8068
  encode(message, writer = new import_wire5.BinaryWriter()) {
7942
- if (message.statusInfo !== "") {
7943
- writer.uint32(10).string(message.statusInfo);
8069
+ if (message.id !== "") {
8070
+ writer.uint32(10).string(message.id);
7944
8071
  }
7945
8072
  return writer;
7946
8073
  },
7947
8074
  decode(input, length) {
7948
8075
  const reader = input instanceof import_wire5.BinaryReader ? input : new import_wire5.BinaryReader(input);
7949
8076
  const end = length === void 0 ? reader.len : reader.pos + length;
7950
- const message = createBaseGetMessageStatusResponse();
8077
+ const message = createBaseDeleteCommunicationTemplateRequest();
7951
8078
  while (reader.pos < end) {
7952
8079
  const tag = reader.uint32();
7953
8080
  switch (tag >>> 3) {
@@ -7955,7 +8082,7 @@ var GetMessageStatusResponse = {
7955
8082
  if (tag !== 10) {
7956
8083
  break;
7957
8084
  }
7958
- message.statusInfo = reader.string();
8085
+ message.id = reader.string();
7959
8086
  continue;
7960
8087
  }
7961
8088
  }
@@ -7967,118 +8094,558 @@ var GetMessageStatusResponse = {
7967
8094
  return message;
7968
8095
  },
7969
8096
  fromJSON(object) {
7970
- return { statusInfo: isSet4(object.statusInfo) ? globalThis.String(object.statusInfo) : "" };
8097
+ return { id: isSet4(object.id) ? globalThis.String(object.id) : "" };
7971
8098
  },
7972
8099
  toJSON(message) {
7973
8100
  const obj = {};
7974
- if (message.statusInfo !== "") {
7975
- obj.statusInfo = message.statusInfo;
8101
+ if (message.id !== "") {
8102
+ obj.id = message.id;
7976
8103
  }
7977
8104
  return obj;
7978
8105
  },
7979
8106
  create(base) {
7980
- return GetMessageStatusResponse.fromPartial(base ?? {});
8107
+ return DeleteCommunicationTemplateRequest.fromPartial(base ?? {});
7981
8108
  },
7982
8109
  fromPartial(object) {
7983
- const message = createBaseGetMessageStatusResponse();
7984
- message.statusInfo = object.statusInfo ?? "";
8110
+ const message = createBaseDeleteCommunicationTemplateRequest();
8111
+ message.id = object.id ?? "";
7985
8112
  return message;
7986
8113
  }
7987
8114
  };
7988
- var CommunicationsDefinition = {
7989
- name: "Communications",
7990
- fullName: "communications.Communications",
7991
- methods: {
7992
- /** Legacy Email endpoints */
7993
- registerTemplate: {
7994
- name: "RegisterTemplate",
7995
- requestType: RegisterTemplateRequest,
7996
- requestStream: false,
7997
- responseType: RegisterTemplateResponse,
7998
- responseStream: false,
7999
- options: {}
8000
- },
8001
- updateTemplate: {
8002
- name: "UpdateTemplate",
8003
- requestType: UpdateTemplateRequest,
8004
- requestStream: false,
8005
- responseType: RegisterTemplateResponse,
8006
- responseStream: false,
8007
- options: {}
8008
- },
8009
- sendEmail: {
8010
- name: "SendEmail",
8011
- requestType: SendEmailRequest,
8012
- requestStream: false,
8013
- responseType: SendEmailResponse,
8014
- responseStream: false,
8015
- options: {}
8016
- },
8017
- resendEmail: {
8018
- name: "ResendEmail",
8019
- requestType: ResendEmailRequest,
8020
- requestStream: false,
8021
- responseType: ResendEmailResponse,
8022
- responseStream: false,
8023
- options: {}
8024
- },
8025
- getEmailStatus: {
8026
- name: "GetEmailStatus",
8027
- requestType: GetEmailStatusRequest,
8028
- requestStream: false,
8029
- responseType: GetEmailStatusResponse,
8030
- responseStream: false,
8031
- options: {}
8032
- },
8033
- /** Legacy Push Notifications endpoints */
8034
- setNotificationToken: {
8035
- name: "SetNotificationToken",
8036
- requestType: SetNotificationTokenRequest,
8037
- requestStream: false,
8038
- responseType: SetNotificationTokenResponse,
8039
- responseStream: false,
8040
- options: {}
8041
- },
8042
- getNotificationTokens: {
8043
- name: "GetNotificationTokens",
8044
- requestType: GetNotificationTokensRequest,
8045
- requestStream: false,
8046
- responseType: GetNotificationTokensResponse,
8047
- responseStream: false,
8048
- options: {}
8049
- },
8050
- sendNotification: {
8051
- name: "SendNotification",
8052
- requestType: SendNotificationRequest,
8053
- requestStream: false,
8054
- responseType: SendNotificationResponse,
8055
- responseStream: false,
8056
- options: {}
8057
- },
8058
- sendNotificationToManyDevices: {
8059
- name: "SendNotificationToManyDevices",
8060
- requestType: SendNotificationToManyDevicesRequest,
8061
- requestStream: false,
8062
- responseType: SendNotificationResponse,
8063
- responseStream: false,
8064
- options: {}
8065
- },
8066
- sendManyNotifications: {
8067
- name: "SendManyNotifications",
8068
- requestType: SendManyNotificationsRequest,
8069
- requestStream: false,
8070
- responseType: SendNotificationResponse,
8071
- responseStream: false,
8072
- options: {}
8073
- },
8074
- /** Legacy SMS endpoints */
8075
- sendSms: {
8076
- name: "SendSms",
8077
- requestType: SendSmsRequest,
8078
- requestStream: false,
8079
- responseType: SendSmsResponse,
8080
- responseStream: false,
8081
- options: {}
8115
+ function createBaseDeleteCommunicationTemplateResponse() {
8116
+ return { deleted: false };
8117
+ }
8118
+ var DeleteCommunicationTemplateResponse = {
8119
+ encode(message, writer = new import_wire5.BinaryWriter()) {
8120
+ if (message.deleted !== false) {
8121
+ writer.uint32(8).bool(message.deleted);
8122
+ }
8123
+ return writer;
8124
+ },
8125
+ decode(input, length) {
8126
+ const reader = input instanceof import_wire5.BinaryReader ? input : new import_wire5.BinaryReader(input);
8127
+ const end = length === void 0 ? reader.len : reader.pos + length;
8128
+ const message = createBaseDeleteCommunicationTemplateResponse();
8129
+ while (reader.pos < end) {
8130
+ const tag = reader.uint32();
8131
+ switch (tag >>> 3) {
8132
+ case 1: {
8133
+ if (tag !== 8) {
8134
+ break;
8135
+ }
8136
+ message.deleted = reader.bool();
8137
+ continue;
8138
+ }
8139
+ }
8140
+ if ((tag & 7) === 4 || tag === 0) {
8141
+ break;
8142
+ }
8143
+ reader.skip(tag & 7);
8144
+ }
8145
+ return message;
8146
+ },
8147
+ fromJSON(object) {
8148
+ return { deleted: isSet4(object.deleted) ? globalThis.Boolean(object.deleted) : false };
8149
+ },
8150
+ toJSON(message) {
8151
+ const obj = {};
8152
+ if (message.deleted !== false) {
8153
+ obj.deleted = message.deleted;
8154
+ }
8155
+ return obj;
8156
+ },
8157
+ create(base) {
8158
+ return DeleteCommunicationTemplateResponse.fromPartial(base ?? {});
8159
+ },
8160
+ fromPartial(object) {
8161
+ const message = createBaseDeleteCommunicationTemplateResponse();
8162
+ message.deleted = object.deleted ?? false;
8163
+ return message;
8164
+ }
8165
+ };
8166
+ function createBaseGetCommunicationTemplateRequest() {
8167
+ return { id: void 0, name: void 0 };
8168
+ }
8169
+ var GetCommunicationTemplateRequest = {
8170
+ encode(message, writer = new import_wire5.BinaryWriter()) {
8171
+ if (message.id !== void 0) {
8172
+ writer.uint32(10).string(message.id);
8173
+ }
8174
+ if (message.name !== void 0) {
8175
+ writer.uint32(18).string(message.name);
8176
+ }
8177
+ return writer;
8178
+ },
8179
+ decode(input, length) {
8180
+ const reader = input instanceof import_wire5.BinaryReader ? input : new import_wire5.BinaryReader(input);
8181
+ const end = length === void 0 ? reader.len : reader.pos + length;
8182
+ const message = createBaseGetCommunicationTemplateRequest();
8183
+ while (reader.pos < end) {
8184
+ const tag = reader.uint32();
8185
+ switch (tag >>> 3) {
8186
+ case 1: {
8187
+ if (tag !== 10) {
8188
+ break;
8189
+ }
8190
+ message.id = reader.string();
8191
+ continue;
8192
+ }
8193
+ case 2: {
8194
+ if (tag !== 18) {
8195
+ break;
8196
+ }
8197
+ message.name = reader.string();
8198
+ continue;
8199
+ }
8200
+ }
8201
+ if ((tag & 7) === 4 || tag === 0) {
8202
+ break;
8203
+ }
8204
+ reader.skip(tag & 7);
8205
+ }
8206
+ return message;
8207
+ },
8208
+ fromJSON(object) {
8209
+ return {
8210
+ id: isSet4(object.id) ? globalThis.String(object.id) : void 0,
8211
+ name: isSet4(object.name) ? globalThis.String(object.name) : void 0
8212
+ };
8213
+ },
8214
+ toJSON(message) {
8215
+ const obj = {};
8216
+ if (message.id !== void 0) {
8217
+ obj.id = message.id;
8218
+ }
8219
+ if (message.name !== void 0) {
8220
+ obj.name = message.name;
8221
+ }
8222
+ return obj;
8223
+ },
8224
+ create(base) {
8225
+ return GetCommunicationTemplateRequest.fromPartial(base ?? {});
8226
+ },
8227
+ fromPartial(object) {
8228
+ const message = createBaseGetCommunicationTemplateRequest();
8229
+ message.id = object.id ?? void 0;
8230
+ message.name = object.name ?? void 0;
8231
+ return message;
8232
+ }
8233
+ };
8234
+ function createBaseGetCommunicationTemplateResponse() {
8235
+ return { template: "" };
8236
+ }
8237
+ var GetCommunicationTemplateResponse = {
8238
+ encode(message, writer = new import_wire5.BinaryWriter()) {
8239
+ if (message.template !== "") {
8240
+ writer.uint32(10).string(message.template);
8241
+ }
8242
+ return writer;
8243
+ },
8244
+ decode(input, length) {
8245
+ const reader = input instanceof import_wire5.BinaryReader ? input : new import_wire5.BinaryReader(input);
8246
+ const end = length === void 0 ? reader.len : reader.pos + length;
8247
+ const message = createBaseGetCommunicationTemplateResponse();
8248
+ while (reader.pos < end) {
8249
+ const tag = reader.uint32();
8250
+ switch (tag >>> 3) {
8251
+ case 1: {
8252
+ if (tag !== 10) {
8253
+ break;
8254
+ }
8255
+ message.template = reader.string();
8256
+ continue;
8257
+ }
8258
+ }
8259
+ if ((tag & 7) === 4 || tag === 0) {
8260
+ break;
8261
+ }
8262
+ reader.skip(tag & 7);
8263
+ }
8264
+ return message;
8265
+ },
8266
+ fromJSON(object) {
8267
+ return { template: isSet4(object.template) ? globalThis.String(object.template) : "" };
8268
+ },
8269
+ toJSON(message) {
8270
+ const obj = {};
8271
+ if (message.template !== "") {
8272
+ obj.template = message.template;
8273
+ }
8274
+ return obj;
8275
+ },
8276
+ create(base) {
8277
+ return GetCommunicationTemplateResponse.fromPartial(base ?? {});
8278
+ },
8279
+ fromPartial(object) {
8280
+ const message = createBaseGetCommunicationTemplateResponse();
8281
+ message.template = object.template ?? "";
8282
+ return message;
8283
+ }
8284
+ };
8285
+ function createBaseListCommunicationTemplatesRequest() {
8286
+ return { skip: 0, limit: 0, search: void 0 };
8287
+ }
8288
+ var ListCommunicationTemplatesRequest = {
8289
+ encode(message, writer = new import_wire5.BinaryWriter()) {
8290
+ if (message.skip !== 0) {
8291
+ writer.uint32(8).int32(message.skip);
8292
+ }
8293
+ if (message.limit !== 0) {
8294
+ writer.uint32(16).int32(message.limit);
8295
+ }
8296
+ if (message.search !== void 0) {
8297
+ writer.uint32(26).string(message.search);
8298
+ }
8299
+ return writer;
8300
+ },
8301
+ decode(input, length) {
8302
+ const reader = input instanceof import_wire5.BinaryReader ? input : new import_wire5.BinaryReader(input);
8303
+ const end = length === void 0 ? reader.len : reader.pos + length;
8304
+ const message = createBaseListCommunicationTemplatesRequest();
8305
+ while (reader.pos < end) {
8306
+ const tag = reader.uint32();
8307
+ switch (tag >>> 3) {
8308
+ case 1: {
8309
+ if (tag !== 8) {
8310
+ break;
8311
+ }
8312
+ message.skip = reader.int32();
8313
+ continue;
8314
+ }
8315
+ case 2: {
8316
+ if (tag !== 16) {
8317
+ break;
8318
+ }
8319
+ message.limit = reader.int32();
8320
+ continue;
8321
+ }
8322
+ case 3: {
8323
+ if (tag !== 26) {
8324
+ break;
8325
+ }
8326
+ message.search = reader.string();
8327
+ continue;
8328
+ }
8329
+ }
8330
+ if ((tag & 7) === 4 || tag === 0) {
8331
+ break;
8332
+ }
8333
+ reader.skip(tag & 7);
8334
+ }
8335
+ return message;
8336
+ },
8337
+ fromJSON(object) {
8338
+ return {
8339
+ skip: isSet4(object.skip) ? globalThis.Number(object.skip) : 0,
8340
+ limit: isSet4(object.limit) ? globalThis.Number(object.limit) : 0,
8341
+ search: isSet4(object.search) ? globalThis.String(object.search) : void 0
8342
+ };
8343
+ },
8344
+ toJSON(message) {
8345
+ const obj = {};
8346
+ if (message.skip !== 0) {
8347
+ obj.skip = Math.round(message.skip);
8348
+ }
8349
+ if (message.limit !== 0) {
8350
+ obj.limit = Math.round(message.limit);
8351
+ }
8352
+ if (message.search !== void 0) {
8353
+ obj.search = message.search;
8354
+ }
8355
+ return obj;
8356
+ },
8357
+ create(base) {
8358
+ return ListCommunicationTemplatesRequest.fromPartial(base ?? {});
8359
+ },
8360
+ fromPartial(object) {
8361
+ const message = createBaseListCommunicationTemplatesRequest();
8362
+ message.skip = object.skip ?? 0;
8363
+ message.limit = object.limit ?? 0;
8364
+ message.search = object.search ?? void 0;
8365
+ return message;
8366
+ }
8367
+ };
8368
+ function createBaseListCommunicationTemplatesResponse() {
8369
+ return { templates: [], count: 0 };
8370
+ }
8371
+ var ListCommunicationTemplatesResponse = {
8372
+ encode(message, writer = new import_wire5.BinaryWriter()) {
8373
+ for (const v of message.templates) {
8374
+ writer.uint32(10).string(v);
8375
+ }
8376
+ if (message.count !== 0) {
8377
+ writer.uint32(16).int32(message.count);
8378
+ }
8379
+ return writer;
8380
+ },
8381
+ decode(input, length) {
8382
+ const reader = input instanceof import_wire5.BinaryReader ? input : new import_wire5.BinaryReader(input);
8383
+ const end = length === void 0 ? reader.len : reader.pos + length;
8384
+ const message = createBaseListCommunicationTemplatesResponse();
8385
+ while (reader.pos < end) {
8386
+ const tag = reader.uint32();
8387
+ switch (tag >>> 3) {
8388
+ case 1: {
8389
+ if (tag !== 10) {
8390
+ break;
8391
+ }
8392
+ message.templates.push(reader.string());
8393
+ continue;
8394
+ }
8395
+ case 2: {
8396
+ if (tag !== 16) {
8397
+ break;
8398
+ }
8399
+ message.count = reader.int32();
8400
+ continue;
8401
+ }
8402
+ }
8403
+ if ((tag & 7) === 4 || tag === 0) {
8404
+ break;
8405
+ }
8406
+ reader.skip(tag & 7);
8407
+ }
8408
+ return message;
8409
+ },
8410
+ fromJSON(object) {
8411
+ return {
8412
+ templates: globalThis.Array.isArray(object?.templates) ? object.templates.map((e) => globalThis.String(e)) : [],
8413
+ count: isSet4(object.count) ? globalThis.Number(object.count) : 0
8414
+ };
8415
+ },
8416
+ toJSON(message) {
8417
+ const obj = {};
8418
+ if (message.templates?.length) {
8419
+ obj.templates = message.templates;
8420
+ }
8421
+ if (message.count !== 0) {
8422
+ obj.count = Math.round(message.count);
8423
+ }
8424
+ return obj;
8425
+ },
8426
+ create(base) {
8427
+ return ListCommunicationTemplatesResponse.fromPartial(base ?? {});
8428
+ },
8429
+ fromPartial(object) {
8430
+ const message = createBaseListCommunicationTemplatesResponse();
8431
+ message.templates = object.templates?.map((e) => e) || [];
8432
+ message.count = object.count ?? 0;
8433
+ return message;
8434
+ }
8435
+ };
8436
+ function createBaseGetMessageStatusRequest() {
8437
+ return { messageId: "", channel: "" };
8438
+ }
8439
+ var GetMessageStatusRequest = {
8440
+ encode(message, writer = new import_wire5.BinaryWriter()) {
8441
+ if (message.messageId !== "") {
8442
+ writer.uint32(10).string(message.messageId);
8443
+ }
8444
+ if (message.channel !== "") {
8445
+ writer.uint32(18).string(message.channel);
8446
+ }
8447
+ return writer;
8448
+ },
8449
+ decode(input, length) {
8450
+ const reader = input instanceof import_wire5.BinaryReader ? input : new import_wire5.BinaryReader(input);
8451
+ const end = length === void 0 ? reader.len : reader.pos + length;
8452
+ const message = createBaseGetMessageStatusRequest();
8453
+ while (reader.pos < end) {
8454
+ const tag = reader.uint32();
8455
+ switch (tag >>> 3) {
8456
+ case 1: {
8457
+ if (tag !== 10) {
8458
+ break;
8459
+ }
8460
+ message.messageId = reader.string();
8461
+ continue;
8462
+ }
8463
+ case 2: {
8464
+ if (tag !== 18) {
8465
+ break;
8466
+ }
8467
+ message.channel = reader.string();
8468
+ continue;
8469
+ }
8470
+ }
8471
+ if ((tag & 7) === 4 || tag === 0) {
8472
+ break;
8473
+ }
8474
+ reader.skip(tag & 7);
8475
+ }
8476
+ return message;
8477
+ },
8478
+ fromJSON(object) {
8479
+ return {
8480
+ messageId: isSet4(object.messageId) ? globalThis.String(object.messageId) : "",
8481
+ channel: isSet4(object.channel) ? globalThis.String(object.channel) : ""
8482
+ };
8483
+ },
8484
+ toJSON(message) {
8485
+ const obj = {};
8486
+ if (message.messageId !== "") {
8487
+ obj.messageId = message.messageId;
8488
+ }
8489
+ if (message.channel !== "") {
8490
+ obj.channel = message.channel;
8491
+ }
8492
+ return obj;
8493
+ },
8494
+ create(base) {
8495
+ return GetMessageStatusRequest.fromPartial(base ?? {});
8496
+ },
8497
+ fromPartial(object) {
8498
+ const message = createBaseGetMessageStatusRequest();
8499
+ message.messageId = object.messageId ?? "";
8500
+ message.channel = object.channel ?? "";
8501
+ return message;
8502
+ }
8503
+ };
8504
+ function createBaseGetMessageStatusResponse() {
8505
+ return { statusInfo: "" };
8506
+ }
8507
+ var GetMessageStatusResponse = {
8508
+ encode(message, writer = new import_wire5.BinaryWriter()) {
8509
+ if (message.statusInfo !== "") {
8510
+ writer.uint32(10).string(message.statusInfo);
8511
+ }
8512
+ return writer;
8513
+ },
8514
+ decode(input, length) {
8515
+ const reader = input instanceof import_wire5.BinaryReader ? input : new import_wire5.BinaryReader(input);
8516
+ const end = length === void 0 ? reader.len : reader.pos + length;
8517
+ const message = createBaseGetMessageStatusResponse();
8518
+ while (reader.pos < end) {
8519
+ const tag = reader.uint32();
8520
+ switch (tag >>> 3) {
8521
+ case 1: {
8522
+ if (tag !== 10) {
8523
+ break;
8524
+ }
8525
+ message.statusInfo = reader.string();
8526
+ continue;
8527
+ }
8528
+ }
8529
+ if ((tag & 7) === 4 || tag === 0) {
8530
+ break;
8531
+ }
8532
+ reader.skip(tag & 7);
8533
+ }
8534
+ return message;
8535
+ },
8536
+ fromJSON(object) {
8537
+ return { statusInfo: isSet4(object.statusInfo) ? globalThis.String(object.statusInfo) : "" };
8538
+ },
8539
+ toJSON(message) {
8540
+ const obj = {};
8541
+ if (message.statusInfo !== "") {
8542
+ obj.statusInfo = message.statusInfo;
8543
+ }
8544
+ return obj;
8545
+ },
8546
+ create(base) {
8547
+ return GetMessageStatusResponse.fromPartial(base ?? {});
8548
+ },
8549
+ fromPartial(object) {
8550
+ const message = createBaseGetMessageStatusResponse();
8551
+ message.statusInfo = object.statusInfo ?? "";
8552
+ return message;
8553
+ }
8554
+ };
8555
+ var CommunicationsDefinition = {
8556
+ name: "Communications",
8557
+ fullName: "communications.Communications",
8558
+ methods: {
8559
+ /** Legacy Email endpoints */
8560
+ registerTemplate: {
8561
+ name: "RegisterTemplate",
8562
+ requestType: RegisterTemplateRequest,
8563
+ requestStream: false,
8564
+ responseType: RegisterTemplateResponse,
8565
+ responseStream: false,
8566
+ options: {}
8567
+ },
8568
+ updateTemplate: {
8569
+ name: "UpdateTemplate",
8570
+ requestType: UpdateTemplateRequest,
8571
+ requestStream: false,
8572
+ responseType: RegisterTemplateResponse,
8573
+ responseStream: false,
8574
+ options: {}
8575
+ },
8576
+ sendEmail: {
8577
+ name: "SendEmail",
8578
+ requestType: SendEmailRequest,
8579
+ requestStream: false,
8580
+ responseType: SendEmailResponse,
8581
+ responseStream: false,
8582
+ options: {}
8583
+ },
8584
+ resendEmail: {
8585
+ name: "ResendEmail",
8586
+ requestType: ResendEmailRequest,
8587
+ requestStream: false,
8588
+ responseType: ResendEmailResponse,
8589
+ responseStream: false,
8590
+ options: {}
8591
+ },
8592
+ getEmailStatus: {
8593
+ name: "GetEmailStatus",
8594
+ requestType: GetEmailStatusRequest,
8595
+ requestStream: false,
8596
+ responseType: GetEmailStatusResponse,
8597
+ responseStream: false,
8598
+ options: {}
8599
+ },
8600
+ /** Legacy Push Notifications endpoints */
8601
+ setNotificationToken: {
8602
+ name: "SetNotificationToken",
8603
+ requestType: SetNotificationTokenRequest,
8604
+ requestStream: false,
8605
+ responseType: SetNotificationTokenResponse,
8606
+ responseStream: false,
8607
+ options: {}
8608
+ },
8609
+ getNotificationTokens: {
8610
+ name: "GetNotificationTokens",
8611
+ requestType: GetNotificationTokensRequest,
8612
+ requestStream: false,
8613
+ responseType: GetNotificationTokensResponse,
8614
+ responseStream: false,
8615
+ options: {}
8616
+ },
8617
+ sendNotification: {
8618
+ name: "SendNotification",
8619
+ requestType: SendNotificationRequest,
8620
+ requestStream: false,
8621
+ responseType: SendNotificationResponse,
8622
+ responseStream: false,
8623
+ options: {}
8624
+ },
8625
+ sendNotificationToManyDevices: {
8626
+ name: "SendNotificationToManyDevices",
8627
+ requestType: SendNotificationToManyDevicesRequest,
8628
+ requestStream: false,
8629
+ responseType: SendNotificationResponse,
8630
+ responseStream: false,
8631
+ options: {}
8632
+ },
8633
+ sendManyNotifications: {
8634
+ name: "SendManyNotifications",
8635
+ requestType: SendManyNotificationsRequest,
8636
+ requestStream: false,
8637
+ responseType: SendNotificationResponse,
8638
+ responseStream: false,
8639
+ options: {}
8640
+ },
8641
+ /** Legacy SMS endpoints */
8642
+ sendSms: {
8643
+ name: "SendSms",
8644
+ requestType: SendSmsRequest,
8645
+ requestStream: false,
8646
+ responseType: SendSmsResponse,
8647
+ responseStream: false,
8648
+ options: {}
8082
8649
  },
8083
8650
  sendVerificationCode: {
8084
8651
  name: "SendVerificationCode",
@@ -8117,15 +8684,47 @@ var CommunicationsDefinition = {
8117
8684
  name: "SendWithFallback",
8118
8685
  requestType: SendWithFallbackRequest,
8119
8686
  requestStream: false,
8120
- responseType: SendWithFallbackResponse,
8687
+ responseType: SendWithFallbackResponse,
8688
+ responseStream: false,
8689
+ options: {}
8690
+ },
8691
+ registerCommunicationTemplate: {
8692
+ name: "RegisterCommunicationTemplate",
8693
+ requestType: RegisterCommunicationTemplateRequest,
8694
+ requestStream: false,
8695
+ responseType: RegisterCommunicationTemplateResponse,
8696
+ responseStream: false,
8697
+ options: {}
8698
+ },
8699
+ updateCommunicationTemplate: {
8700
+ name: "UpdateCommunicationTemplate",
8701
+ requestType: UpdateCommunicationTemplateRequest,
8702
+ requestStream: false,
8703
+ responseType: RegisterCommunicationTemplateResponse,
8704
+ responseStream: false,
8705
+ options: {}
8706
+ },
8707
+ deleteCommunicationTemplate: {
8708
+ name: "DeleteCommunicationTemplate",
8709
+ requestType: DeleteCommunicationTemplateRequest,
8710
+ requestStream: false,
8711
+ responseType: DeleteCommunicationTemplateResponse,
8712
+ responseStream: false,
8713
+ options: {}
8714
+ },
8715
+ getCommunicationTemplate: {
8716
+ name: "GetCommunicationTemplate",
8717
+ requestType: GetCommunicationTemplateRequest,
8718
+ requestStream: false,
8719
+ responseType: GetCommunicationTemplateResponse,
8121
8720
  responseStream: false,
8122
8721
  options: {}
8123
8722
  },
8124
- registerCommunicationTemplate: {
8125
- name: "RegisterCommunicationTemplate",
8126
- requestType: RegisterCommunicationTemplateRequest,
8723
+ listCommunicationTemplates: {
8724
+ name: "ListCommunicationTemplates",
8725
+ requestType: ListCommunicationTemplatesRequest,
8127
8726
  requestStream: false,
8128
- responseType: RegisterCommunicationTemplateResponse,
8727
+ responseType: ListCommunicationTemplatesResponse,
8129
8728
  responseStream: false,
8130
8729
  options: {}
8131
8730
  },
@@ -8340,8 +8939,7 @@ function createBaseRegisterAdminRouteRequest_PathDefinition() {
8340
8939
  returns: void 0,
8341
8940
  grpcFunction: void 0,
8342
8941
  isMiddleware: void 0,
8343
- events: void 0,
8344
- proxy: void 0
8942
+ events: void 0
8345
8943
  };
8346
8944
  }
8347
8945
  var RegisterAdminRouteRequest_PathDefinition = {
@@ -8361,9 +8959,6 @@ var RegisterAdminRouteRequest_PathDefinition = {
8361
8959
  if (message.events !== void 0) {
8362
8960
  writer.uint32(42).string(message.events);
8363
8961
  }
8364
- if (message.proxy !== void 0) {
8365
- RegisterAdminRouteRequest_ProxyRouteOptions.encode(message.proxy, writer.uint32(50).fork()).join();
8366
- }
8367
8962
  return writer;
8368
8963
  },
8369
8964
  decode(input, length) {
@@ -8408,13 +9003,6 @@ var RegisterAdminRouteRequest_PathDefinition = {
8408
9003
  message.events = reader.string();
8409
9004
  continue;
8410
9005
  }
8411
- case 6: {
8412
- if (tag !== 50) {
8413
- break;
8414
- }
8415
- message.proxy = RegisterAdminRouteRequest_ProxyRouteOptions.decode(reader, reader.uint32());
8416
- continue;
8417
- }
8418
9006
  }
8419
9007
  if ((tag & 7) === 4 || tag === 0) {
8420
9008
  break;
@@ -8429,8 +9017,7 @@ var RegisterAdminRouteRequest_PathDefinition = {
8429
9017
  returns: isSet5(object.returns) ? RegisterAdminRouteRequest_ConduitRouteReturnDefinition.fromJSON(object.returns) : void 0,
8430
9018
  grpcFunction: isSet5(object.grpcFunction) ? globalThis.String(object.grpcFunction) : void 0,
8431
9019
  isMiddleware: isSet5(object.isMiddleware) ? globalThis.Boolean(object.isMiddleware) : void 0,
8432
- events: isSet5(object.events) ? globalThis.String(object.events) : void 0,
8433
- proxy: isSet5(object.proxy) ? RegisterAdminRouteRequest_ProxyRouteOptions.fromJSON(object.proxy) : void 0
9020
+ events: isSet5(object.events) ? globalThis.String(object.events) : void 0
8434
9021
  };
8435
9022
  },
8436
9023
  toJSON(message) {
@@ -8450,9 +9037,6 @@ var RegisterAdminRouteRequest_PathDefinition = {
8450
9037
  if (message.events !== void 0) {
8451
9038
  obj.events = message.events;
8452
9039
  }
8453
- if (message.proxy !== void 0) {
8454
- obj.proxy = RegisterAdminRouteRequest_ProxyRouteOptions.toJSON(message.proxy);
8455
- }
8456
9040
  return obj;
8457
9041
  },
8458
9042
  create(base) {
@@ -8465,7 +9049,6 @@ var RegisterAdminRouteRequest_PathDefinition = {
8465
9049
  message.grpcFunction = object.grpcFunction ?? void 0;
8466
9050
  message.isMiddleware = object.isMiddleware ?? void 0;
8467
9051
  message.events = object.events ?? void 0;
8468
- message.proxy = object.proxy !== void 0 && object.proxy !== null ? RegisterAdminRouteRequest_ProxyRouteOptions.fromPartial(object.proxy) : void 0;
8469
9052
  return message;
8470
9053
  }
8471
9054
  };
@@ -8473,317 +9056,74 @@ function createBaseRegisterAdminRouteRequest_ConduitRouteOptions() {
8473
9056
  return {
8474
9057
  queryParams: void 0,
8475
9058
  bodyParams: void 0,
8476
- urlParams: void 0,
8477
- action: void 0,
8478
- path: "",
8479
- name: void 0,
8480
- description: void 0,
8481
- middlewares: [],
8482
- cacheControl: void 0,
8483
- errors: [],
8484
- mcp: void 0,
8485
- strictParams: void 0,
8486
- rateLimit: void 0
8487
- };
8488
- }
8489
- var RegisterAdminRouteRequest_ConduitRouteOptions = {
8490
- encode(message, writer = new import_wire6.BinaryWriter()) {
8491
- if (message.queryParams !== void 0) {
8492
- writer.uint32(10).string(message.queryParams);
8493
- }
8494
- if (message.bodyParams !== void 0) {
8495
- writer.uint32(18).string(message.bodyParams);
8496
- }
8497
- if (message.urlParams !== void 0) {
8498
- writer.uint32(26).string(message.urlParams);
8499
- }
8500
- if (message.action !== void 0) {
8501
- writer.uint32(34).string(message.action);
8502
- }
8503
- if (message.path !== "") {
8504
- writer.uint32(42).string(message.path);
8505
- }
8506
- if (message.name !== void 0) {
8507
- writer.uint32(50).string(message.name);
8508
- }
8509
- if (message.description !== void 0) {
8510
- writer.uint32(58).string(message.description);
8511
- }
8512
- for (const v of message.middlewares) {
8513
- writer.uint32(66).string(v);
8514
- }
8515
- if (message.cacheControl !== void 0) {
8516
- writer.uint32(74).string(message.cacheControl);
8517
- }
8518
- for (const v of message.errors) {
8519
- RegisterAdminRouteRequest_ErrorDefinition.encode(v, writer.uint32(82).fork()).join();
8520
- }
8521
- if (message.mcp !== void 0) {
8522
- writer.uint32(88).bool(message.mcp);
8523
- }
8524
- if (message.strictParams !== void 0) {
8525
- writer.uint32(96).bool(message.strictParams);
8526
- }
8527
- if (message.rateLimit !== void 0) {
8528
- writer.uint32(106).string(message.rateLimit);
8529
- }
8530
- return writer;
8531
- },
8532
- decode(input, length) {
8533
- const reader = input instanceof import_wire6.BinaryReader ? input : new import_wire6.BinaryReader(input);
8534
- const end = length === void 0 ? reader.len : reader.pos + length;
8535
- const message = createBaseRegisterAdminRouteRequest_ConduitRouteOptions();
8536
- while (reader.pos < end) {
8537
- const tag = reader.uint32();
8538
- switch (tag >>> 3) {
8539
- case 1: {
8540
- if (tag !== 10) {
8541
- break;
8542
- }
8543
- message.queryParams = reader.string();
8544
- continue;
8545
- }
8546
- case 2: {
8547
- if (tag !== 18) {
8548
- break;
8549
- }
8550
- message.bodyParams = reader.string();
8551
- continue;
8552
- }
8553
- case 3: {
8554
- if (tag !== 26) {
8555
- break;
8556
- }
8557
- message.urlParams = reader.string();
8558
- continue;
8559
- }
8560
- case 4: {
8561
- if (tag !== 34) {
8562
- break;
8563
- }
8564
- message.action = reader.string();
8565
- continue;
8566
- }
8567
- case 5: {
8568
- if (tag !== 42) {
8569
- break;
8570
- }
8571
- message.path = reader.string();
8572
- continue;
8573
- }
8574
- case 6: {
8575
- if (tag !== 50) {
8576
- break;
8577
- }
8578
- message.name = reader.string();
8579
- continue;
8580
- }
8581
- case 7: {
8582
- if (tag !== 58) {
8583
- break;
8584
- }
8585
- message.description = reader.string();
8586
- continue;
8587
- }
8588
- case 8: {
8589
- if (tag !== 66) {
8590
- break;
8591
- }
8592
- message.middlewares.push(reader.string());
8593
- continue;
8594
- }
8595
- case 9: {
8596
- if (tag !== 74) {
8597
- break;
8598
- }
8599
- message.cacheControl = reader.string();
8600
- continue;
8601
- }
8602
- case 10: {
8603
- if (tag !== 82) {
8604
- break;
8605
- }
8606
- message.errors.push(RegisterAdminRouteRequest_ErrorDefinition.decode(reader, reader.uint32()));
8607
- continue;
8608
- }
8609
- case 11: {
8610
- if (tag !== 88) {
8611
- break;
8612
- }
8613
- message.mcp = reader.bool();
8614
- continue;
8615
- }
8616
- case 12: {
8617
- if (tag !== 96) {
8618
- break;
8619
- }
8620
- message.strictParams = reader.bool();
8621
- continue;
8622
- }
8623
- case 13: {
8624
- if (tag !== 106) {
8625
- break;
8626
- }
8627
- message.rateLimit = reader.string();
8628
- continue;
8629
- }
8630
- }
8631
- if ((tag & 7) === 4 || tag === 0) {
8632
- break;
8633
- }
8634
- reader.skip(tag & 7);
8635
- }
8636
- return message;
8637
- },
8638
- fromJSON(object) {
8639
- return {
8640
- queryParams: isSet5(object.queryParams) ? globalThis.String(object.queryParams) : void 0,
8641
- bodyParams: isSet5(object.bodyParams) ? globalThis.String(object.bodyParams) : void 0,
8642
- urlParams: isSet5(object.urlParams) ? globalThis.String(object.urlParams) : void 0,
8643
- action: isSet5(object.action) ? globalThis.String(object.action) : void 0,
8644
- path: isSet5(object.path) ? globalThis.String(object.path) : "",
8645
- name: isSet5(object.name) ? globalThis.String(object.name) : void 0,
8646
- description: isSet5(object.description) ? globalThis.String(object.description) : void 0,
8647
- middlewares: globalThis.Array.isArray(object?.middlewares) ? object.middlewares.map((e) => globalThis.String(e)) : [],
8648
- cacheControl: isSet5(object.cacheControl) ? globalThis.String(object.cacheControl) : void 0,
8649
- errors: globalThis.Array.isArray(object?.errors) ? object.errors.map((e) => RegisterAdminRouteRequest_ErrorDefinition.fromJSON(e)) : [],
8650
- mcp: isSet5(object.mcp) ? globalThis.Boolean(object.mcp) : void 0,
8651
- strictParams: isSet5(object.strictParams) ? globalThis.Boolean(object.strictParams) : void 0,
8652
- rateLimit: isSet5(object.rateLimit) ? globalThis.String(object.rateLimit) : void 0
8653
- };
8654
- },
8655
- toJSON(message) {
8656
- const obj = {};
8657
- if (message.queryParams !== void 0) {
8658
- obj.queryParams = message.queryParams;
8659
- }
8660
- if (message.bodyParams !== void 0) {
8661
- obj.bodyParams = message.bodyParams;
8662
- }
8663
- if (message.urlParams !== void 0) {
8664
- obj.urlParams = message.urlParams;
8665
- }
8666
- if (message.action !== void 0) {
8667
- obj.action = message.action;
8668
- }
8669
- if (message.path !== "") {
8670
- obj.path = message.path;
8671
- }
8672
- if (message.name !== void 0) {
8673
- obj.name = message.name;
8674
- }
8675
- if (message.description !== void 0) {
8676
- obj.description = message.description;
8677
- }
8678
- if (message.middlewares?.length) {
8679
- obj.middlewares = message.middlewares;
8680
- }
8681
- if (message.cacheControl !== void 0) {
8682
- obj.cacheControl = message.cacheControl;
8683
- }
8684
- if (message.errors?.length) {
8685
- obj.errors = message.errors.map((e) => RegisterAdminRouteRequest_ErrorDefinition.toJSON(e));
8686
- }
8687
- if (message.mcp !== void 0) {
8688
- obj.mcp = message.mcp;
8689
- }
8690
- if (message.strictParams !== void 0) {
8691
- obj.strictParams = message.strictParams;
8692
- }
8693
- if (message.rateLimit !== void 0) {
8694
- obj.rateLimit = message.rateLimit;
8695
- }
8696
- return obj;
8697
- },
8698
- create(base) {
8699
- return RegisterAdminRouteRequest_ConduitRouteOptions.fromPartial(base ?? {});
8700
- },
8701
- fromPartial(object) {
8702
- const message = createBaseRegisterAdminRouteRequest_ConduitRouteOptions();
8703
- message.queryParams = object.queryParams ?? void 0;
8704
- message.bodyParams = object.bodyParams ?? void 0;
8705
- message.urlParams = object.urlParams ?? void 0;
8706
- message.action = object.action ?? void 0;
8707
- message.path = object.path ?? "";
8708
- message.name = object.name ?? void 0;
8709
- message.description = object.description ?? void 0;
8710
- message.middlewares = object.middlewares?.map((e) => e) || [];
8711
- message.cacheControl = object.cacheControl ?? void 0;
8712
- message.errors = object.errors?.map((e) => RegisterAdminRouteRequest_ErrorDefinition.fromPartial(e)) || [];
8713
- message.mcp = object.mcp ?? void 0;
8714
- message.strictParams = object.strictParams ?? void 0;
8715
- message.rateLimit = object.rateLimit ?? void 0;
8716
- return message;
8717
- }
8718
- };
8719
- function createBaseRegisterAdminRouteRequest_ProxyRouteOptions() {
8720
- return {
8721
- target: void 0,
8722
- changeOrigin: void 0,
8723
- secure: void 0,
8724
- context: void 0,
8725
- pathRewrite: void 0,
8726
- headers: void 0,
8727
- proxyTimeout: void 0,
8728
- cookieDomainRewrite: void 0,
8729
- autoRewrite: void 0,
8730
- followRedirects: void 0,
8731
- xfwd: void 0,
8732
- ws: void 0,
8733
- router: void 0,
8734
- preserveHeaderKeyCase: void 0
9059
+ urlParams: void 0,
9060
+ action: void 0,
9061
+ path: "",
9062
+ name: void 0,
9063
+ description: void 0,
9064
+ middlewares: [],
9065
+ cacheControl: void 0,
9066
+ errors: [],
9067
+ mcp: void 0,
9068
+ strictParams: void 0,
9069
+ rateLimit: void 0,
9070
+ captureRawBody: void 0,
9071
+ captureRawHeaders: void 0
8735
9072
  };
8736
9073
  }
8737
- var RegisterAdminRouteRequest_ProxyRouteOptions = {
9074
+ var RegisterAdminRouteRequest_ConduitRouteOptions = {
8738
9075
  encode(message, writer = new import_wire6.BinaryWriter()) {
8739
- if (message.target !== void 0) {
8740
- writer.uint32(10).string(message.target);
9076
+ if (message.queryParams !== void 0) {
9077
+ writer.uint32(10).string(message.queryParams);
9078
+ }
9079
+ if (message.bodyParams !== void 0) {
9080
+ writer.uint32(18).string(message.bodyParams);
8741
9081
  }
8742
- if (message.changeOrigin !== void 0) {
8743
- writer.uint32(16).bool(message.changeOrigin);
9082
+ if (message.urlParams !== void 0) {
9083
+ writer.uint32(26).string(message.urlParams);
8744
9084
  }
8745
- if (message.secure !== void 0) {
8746
- writer.uint32(24).bool(message.secure);
9085
+ if (message.action !== void 0) {
9086
+ writer.uint32(34).string(message.action);
8747
9087
  }
8748
- if (message.context !== void 0) {
8749
- writer.uint32(34).string(message.context);
9088
+ if (message.path !== "") {
9089
+ writer.uint32(42).string(message.path);
8750
9090
  }
8751
- if (message.pathRewrite !== void 0) {
8752
- writer.uint32(42).string(message.pathRewrite);
9091
+ if (message.name !== void 0) {
9092
+ writer.uint32(50).string(message.name);
8753
9093
  }
8754
- if (message.headers !== void 0) {
8755
- writer.uint32(50).string(message.headers);
9094
+ if (message.description !== void 0) {
9095
+ writer.uint32(58).string(message.description);
8756
9096
  }
8757
- if (message.proxyTimeout !== void 0) {
8758
- writer.uint32(56).int32(message.proxyTimeout);
9097
+ for (const v of message.middlewares) {
9098
+ writer.uint32(66).string(v);
8759
9099
  }
8760
- if (message.cookieDomainRewrite !== void 0) {
8761
- writer.uint32(66).string(message.cookieDomainRewrite);
9100
+ if (message.cacheControl !== void 0) {
9101
+ writer.uint32(74).string(message.cacheControl);
8762
9102
  }
8763
- if (message.autoRewrite !== void 0) {
8764
- writer.uint32(72).bool(message.autoRewrite);
9103
+ for (const v of message.errors) {
9104
+ RegisterAdminRouteRequest_ErrorDefinition.encode(v, writer.uint32(82).fork()).join();
8765
9105
  }
8766
- if (message.followRedirects !== void 0) {
8767
- writer.uint32(80).bool(message.followRedirects);
9106
+ if (message.mcp !== void 0) {
9107
+ writer.uint32(88).bool(message.mcp);
8768
9108
  }
8769
- if (message.xfwd !== void 0) {
8770
- writer.uint32(88).bool(message.xfwd);
9109
+ if (message.strictParams !== void 0) {
9110
+ writer.uint32(96).bool(message.strictParams);
8771
9111
  }
8772
- if (message.ws !== void 0) {
8773
- writer.uint32(96).bool(message.ws);
9112
+ if (message.rateLimit !== void 0) {
9113
+ writer.uint32(106).string(message.rateLimit);
8774
9114
  }
8775
- if (message.router !== void 0) {
8776
- writer.uint32(106).string(message.router);
9115
+ if (message.captureRawBody !== void 0) {
9116
+ writer.uint32(112).bool(message.captureRawBody);
8777
9117
  }
8778
- if (message.preserveHeaderKeyCase !== void 0) {
8779
- writer.uint32(112).bool(message.preserveHeaderKeyCase);
9118
+ if (message.captureRawHeaders !== void 0) {
9119
+ writer.uint32(120).bool(message.captureRawHeaders);
8780
9120
  }
8781
9121
  return writer;
8782
9122
  },
8783
9123
  decode(input, length) {
8784
9124
  const reader = input instanceof import_wire6.BinaryReader ? input : new import_wire6.BinaryReader(input);
8785
9125
  const end = length === void 0 ? reader.len : reader.pos + length;
8786
- const message = createBaseRegisterAdminRouteRequest_ProxyRouteOptions();
9126
+ const message = createBaseRegisterAdminRouteRequest_ConduitRouteOptions();
8787
9127
  while (reader.pos < end) {
8788
9128
  const tag = reader.uint32();
8789
9129
  switch (tag >>> 3) {
@@ -8791,98 +9131,105 @@ var RegisterAdminRouteRequest_ProxyRouteOptions = {
8791
9131
  if (tag !== 10) {
8792
9132
  break;
8793
9133
  }
8794
- message.target = reader.string();
9134
+ message.queryParams = reader.string();
8795
9135
  continue;
8796
9136
  }
8797
9137
  case 2: {
8798
- if (tag !== 16) {
9138
+ if (tag !== 18) {
8799
9139
  break;
8800
9140
  }
8801
- message.changeOrigin = reader.bool();
9141
+ message.bodyParams = reader.string();
8802
9142
  continue;
8803
9143
  }
8804
9144
  case 3: {
8805
- if (tag !== 24) {
9145
+ if (tag !== 26) {
8806
9146
  break;
8807
9147
  }
8808
- message.secure = reader.bool();
9148
+ message.urlParams = reader.string();
8809
9149
  continue;
8810
9150
  }
8811
9151
  case 4: {
8812
9152
  if (tag !== 34) {
8813
9153
  break;
8814
9154
  }
8815
- message.context = reader.string();
9155
+ message.action = reader.string();
8816
9156
  continue;
8817
9157
  }
8818
9158
  case 5: {
8819
9159
  if (tag !== 42) {
8820
9160
  break;
8821
9161
  }
8822
- message.pathRewrite = reader.string();
9162
+ message.path = reader.string();
8823
9163
  continue;
8824
9164
  }
8825
9165
  case 6: {
8826
9166
  if (tag !== 50) {
8827
9167
  break;
8828
9168
  }
8829
- message.headers = reader.string();
9169
+ message.name = reader.string();
8830
9170
  continue;
8831
9171
  }
8832
9172
  case 7: {
8833
- if (tag !== 56) {
9173
+ if (tag !== 58) {
8834
9174
  break;
8835
9175
  }
8836
- message.proxyTimeout = reader.int32();
9176
+ message.description = reader.string();
8837
9177
  continue;
8838
9178
  }
8839
9179
  case 8: {
8840
9180
  if (tag !== 66) {
8841
9181
  break;
8842
9182
  }
8843
- message.cookieDomainRewrite = reader.string();
9183
+ message.middlewares.push(reader.string());
8844
9184
  continue;
8845
9185
  }
8846
9186
  case 9: {
8847
- if (tag !== 72) {
9187
+ if (tag !== 74) {
8848
9188
  break;
8849
9189
  }
8850
- message.autoRewrite = reader.bool();
9190
+ message.cacheControl = reader.string();
8851
9191
  continue;
8852
9192
  }
8853
9193
  case 10: {
8854
- if (tag !== 80) {
9194
+ if (tag !== 82) {
8855
9195
  break;
8856
9196
  }
8857
- message.followRedirects = reader.bool();
9197
+ message.errors.push(RegisterAdminRouteRequest_ErrorDefinition.decode(reader, reader.uint32()));
8858
9198
  continue;
8859
9199
  }
8860
9200
  case 11: {
8861
9201
  if (tag !== 88) {
8862
9202
  break;
8863
9203
  }
8864
- message.xfwd = reader.bool();
9204
+ message.mcp = reader.bool();
8865
9205
  continue;
8866
9206
  }
8867
9207
  case 12: {
8868
9208
  if (tag !== 96) {
8869
9209
  break;
8870
9210
  }
8871
- message.ws = reader.bool();
9211
+ message.strictParams = reader.bool();
8872
9212
  continue;
8873
9213
  }
8874
9214
  case 13: {
8875
9215
  if (tag !== 106) {
8876
9216
  break;
8877
9217
  }
8878
- message.router = reader.string();
9218
+ message.rateLimit = reader.string();
8879
9219
  continue;
8880
9220
  }
8881
9221
  case 14: {
8882
9222
  if (tag !== 112) {
8883
9223
  break;
8884
9224
  }
8885
- message.preserveHeaderKeyCase = reader.bool();
9225
+ message.captureRawBody = reader.bool();
9226
+ continue;
9227
+ }
9228
+ case 15: {
9229
+ if (tag !== 120) {
9230
+ break;
9231
+ }
9232
+ message.captureRawHeaders = reader.bool();
8886
9233
  continue;
8887
9234
  }
8888
9235
  }
@@ -8895,87 +9242,92 @@ var RegisterAdminRouteRequest_ProxyRouteOptions = {
8895
9242
  },
8896
9243
  fromJSON(object) {
8897
9244
  return {
8898
- target: isSet5(object.target) ? globalThis.String(object.target) : void 0,
8899
- changeOrigin: isSet5(object.changeOrigin) ? globalThis.Boolean(object.changeOrigin) : void 0,
8900
- secure: isSet5(object.secure) ? globalThis.Boolean(object.secure) : void 0,
8901
- context: isSet5(object.context) ? globalThis.String(object.context) : void 0,
8902
- pathRewrite: isSet5(object.pathRewrite) ? globalThis.String(object.pathRewrite) : void 0,
8903
- headers: isSet5(object.headers) ? globalThis.String(object.headers) : void 0,
8904
- proxyTimeout: isSet5(object.proxyTimeout) ? globalThis.Number(object.proxyTimeout) : void 0,
8905
- cookieDomainRewrite: isSet5(object.cookieDomainRewrite) ? globalThis.String(object.cookieDomainRewrite) : void 0,
8906
- autoRewrite: isSet5(object.autoRewrite) ? globalThis.Boolean(object.autoRewrite) : void 0,
8907
- followRedirects: isSet5(object.followRedirects) ? globalThis.Boolean(object.followRedirects) : void 0,
8908
- xfwd: isSet5(object.xfwd) ? globalThis.Boolean(object.xfwd) : void 0,
8909
- ws: isSet5(object.ws) ? globalThis.Boolean(object.ws) : void 0,
8910
- router: isSet5(object.router) ? globalThis.String(object.router) : void 0,
8911
- preserveHeaderKeyCase: isSet5(object.preserveHeaderKeyCase) ? globalThis.Boolean(object.preserveHeaderKeyCase) : void 0
9245
+ queryParams: isSet5(object.queryParams) ? globalThis.String(object.queryParams) : void 0,
9246
+ bodyParams: isSet5(object.bodyParams) ? globalThis.String(object.bodyParams) : void 0,
9247
+ urlParams: isSet5(object.urlParams) ? globalThis.String(object.urlParams) : void 0,
9248
+ action: isSet5(object.action) ? globalThis.String(object.action) : void 0,
9249
+ path: isSet5(object.path) ? globalThis.String(object.path) : "",
9250
+ name: isSet5(object.name) ? globalThis.String(object.name) : void 0,
9251
+ description: isSet5(object.description) ? globalThis.String(object.description) : void 0,
9252
+ middlewares: globalThis.Array.isArray(object?.middlewares) ? object.middlewares.map((e) => globalThis.String(e)) : [],
9253
+ cacheControl: isSet5(object.cacheControl) ? globalThis.String(object.cacheControl) : void 0,
9254
+ errors: globalThis.Array.isArray(object?.errors) ? object.errors.map((e) => RegisterAdminRouteRequest_ErrorDefinition.fromJSON(e)) : [],
9255
+ mcp: isSet5(object.mcp) ? globalThis.Boolean(object.mcp) : void 0,
9256
+ strictParams: isSet5(object.strictParams) ? globalThis.Boolean(object.strictParams) : void 0,
9257
+ rateLimit: isSet5(object.rateLimit) ? globalThis.String(object.rateLimit) : void 0,
9258
+ captureRawBody: isSet5(object.captureRawBody) ? globalThis.Boolean(object.captureRawBody) : void 0,
9259
+ captureRawHeaders: isSet5(object.captureRawHeaders) ? globalThis.Boolean(object.captureRawHeaders) : void 0
8912
9260
  };
8913
9261
  },
8914
9262
  toJSON(message) {
8915
9263
  const obj = {};
8916
- if (message.target !== void 0) {
8917
- obj.target = message.target;
9264
+ if (message.queryParams !== void 0) {
9265
+ obj.queryParams = message.queryParams;
8918
9266
  }
8919
- if (message.changeOrigin !== void 0) {
8920
- obj.changeOrigin = message.changeOrigin;
9267
+ if (message.bodyParams !== void 0) {
9268
+ obj.bodyParams = message.bodyParams;
8921
9269
  }
8922
- if (message.secure !== void 0) {
8923
- obj.secure = message.secure;
9270
+ if (message.urlParams !== void 0) {
9271
+ obj.urlParams = message.urlParams;
8924
9272
  }
8925
- if (message.context !== void 0) {
8926
- obj.context = message.context;
9273
+ if (message.action !== void 0) {
9274
+ obj.action = message.action;
9275
+ }
9276
+ if (message.path !== "") {
9277
+ obj.path = message.path;
8927
9278
  }
8928
- if (message.pathRewrite !== void 0) {
8929
- obj.pathRewrite = message.pathRewrite;
9279
+ if (message.name !== void 0) {
9280
+ obj.name = message.name;
8930
9281
  }
8931
- if (message.headers !== void 0) {
8932
- obj.headers = message.headers;
9282
+ if (message.description !== void 0) {
9283
+ obj.description = message.description;
8933
9284
  }
8934
- if (message.proxyTimeout !== void 0) {
8935
- obj.proxyTimeout = Math.round(message.proxyTimeout);
9285
+ if (message.middlewares?.length) {
9286
+ obj.middlewares = message.middlewares;
8936
9287
  }
8937
- if (message.cookieDomainRewrite !== void 0) {
8938
- obj.cookieDomainRewrite = message.cookieDomainRewrite;
9288
+ if (message.cacheControl !== void 0) {
9289
+ obj.cacheControl = message.cacheControl;
8939
9290
  }
8940
- if (message.autoRewrite !== void 0) {
8941
- obj.autoRewrite = message.autoRewrite;
9291
+ if (message.errors?.length) {
9292
+ obj.errors = message.errors.map((e) => RegisterAdminRouteRequest_ErrorDefinition.toJSON(e));
8942
9293
  }
8943
- if (message.followRedirects !== void 0) {
8944
- obj.followRedirects = message.followRedirects;
9294
+ if (message.mcp !== void 0) {
9295
+ obj.mcp = message.mcp;
8945
9296
  }
8946
- if (message.xfwd !== void 0) {
8947
- obj.xfwd = message.xfwd;
9297
+ if (message.strictParams !== void 0) {
9298
+ obj.strictParams = message.strictParams;
8948
9299
  }
8949
- if (message.ws !== void 0) {
8950
- obj.ws = message.ws;
9300
+ if (message.rateLimit !== void 0) {
9301
+ obj.rateLimit = message.rateLimit;
8951
9302
  }
8952
- if (message.router !== void 0) {
8953
- obj.router = message.router;
9303
+ if (message.captureRawBody !== void 0) {
9304
+ obj.captureRawBody = message.captureRawBody;
8954
9305
  }
8955
- if (message.preserveHeaderKeyCase !== void 0) {
8956
- obj.preserveHeaderKeyCase = message.preserveHeaderKeyCase;
9306
+ if (message.captureRawHeaders !== void 0) {
9307
+ obj.captureRawHeaders = message.captureRawHeaders;
8957
9308
  }
8958
9309
  return obj;
8959
9310
  },
8960
9311
  create(base) {
8961
- return RegisterAdminRouteRequest_ProxyRouteOptions.fromPartial(base ?? {});
9312
+ return RegisterAdminRouteRequest_ConduitRouteOptions.fromPartial(base ?? {});
8962
9313
  },
8963
9314
  fromPartial(object) {
8964
- const message = createBaseRegisterAdminRouteRequest_ProxyRouteOptions();
8965
- message.target = object.target ?? void 0;
8966
- message.changeOrigin = object.changeOrigin ?? void 0;
8967
- message.secure = object.secure ?? void 0;
8968
- message.context = object.context ?? void 0;
8969
- message.pathRewrite = object.pathRewrite ?? void 0;
8970
- message.headers = object.headers ?? void 0;
8971
- message.proxyTimeout = object.proxyTimeout ?? void 0;
8972
- message.cookieDomainRewrite = object.cookieDomainRewrite ?? void 0;
8973
- message.autoRewrite = object.autoRewrite ?? void 0;
8974
- message.followRedirects = object.followRedirects ?? void 0;
8975
- message.xfwd = object.xfwd ?? void 0;
8976
- message.ws = object.ws ?? void 0;
8977
- message.router = object.router ?? void 0;
8978
- message.preserveHeaderKeyCase = object.preserveHeaderKeyCase ?? void 0;
9315
+ const message = createBaseRegisterAdminRouteRequest_ConduitRouteOptions();
9316
+ message.queryParams = object.queryParams ?? void 0;
9317
+ message.bodyParams = object.bodyParams ?? void 0;
9318
+ message.urlParams = object.urlParams ?? void 0;
9319
+ message.action = object.action ?? void 0;
9320
+ message.path = object.path ?? "";
9321
+ message.name = object.name ?? void 0;
9322
+ message.description = object.description ?? void 0;
9323
+ message.middlewares = object.middlewares?.map((e) => e) || [];
9324
+ message.cacheControl = object.cacheControl ?? void 0;
9325
+ message.errors = object.errors?.map((e) => RegisterAdminRouteRequest_ErrorDefinition.fromPartial(e)) || [];
9326
+ message.mcp = object.mcp ?? void 0;
9327
+ message.strictParams = object.strictParams ?? void 0;
9328
+ message.rateLimit = object.rateLimit ?? void 0;
9329
+ message.captureRawBody = object.captureRawBody ?? void 0;
9330
+ message.captureRawHeaders = object.captureRawHeaders ?? void 0;
8979
9331
  return message;
8980
9332
  }
8981
9333
  };
@@ -9738,6 +10090,57 @@ var GetConfigRequest = {
9738
10090
  return message;
9739
10091
  }
9740
10092
  };
10093
+ function createBaseDeleteConfigRequest() {
10094
+ return { key: "" };
10095
+ }
10096
+ var DeleteConfigRequest = {
10097
+ encode(message, writer = new import_wire6.BinaryWriter()) {
10098
+ if (message.key !== "") {
10099
+ writer.uint32(10).string(message.key);
10100
+ }
10101
+ return writer;
10102
+ },
10103
+ decode(input, length) {
10104
+ const reader = input instanceof import_wire6.BinaryReader ? input : new import_wire6.BinaryReader(input);
10105
+ const end = length === void 0 ? reader.len : reader.pos + length;
10106
+ const message = createBaseDeleteConfigRequest();
10107
+ while (reader.pos < end) {
10108
+ const tag = reader.uint32();
10109
+ switch (tag >>> 3) {
10110
+ case 1: {
10111
+ if (tag !== 10) {
10112
+ break;
10113
+ }
10114
+ message.key = reader.string();
10115
+ continue;
10116
+ }
10117
+ }
10118
+ if ((tag & 7) === 4 || tag === 0) {
10119
+ break;
10120
+ }
10121
+ reader.skip(tag & 7);
10122
+ }
10123
+ return message;
10124
+ },
10125
+ fromJSON(object) {
10126
+ return { key: isSet5(object.key) ? globalThis.String(object.key) : "" };
10127
+ },
10128
+ toJSON(message) {
10129
+ const obj = {};
10130
+ if (message.key !== "") {
10131
+ obj.key = message.key;
10132
+ }
10133
+ return obj;
10134
+ },
10135
+ create(base) {
10136
+ return DeleteConfigRequest.fromPartial(base ?? {});
10137
+ },
10138
+ fromPartial(object) {
10139
+ const message = createBaseDeleteConfigRequest();
10140
+ message.key = object.key ?? "";
10141
+ return message;
10142
+ }
10143
+ };
9741
10144
  function createBaseGetRedisDetailsResponse() {
9742
10145
  return {
9743
10146
  redisHost: void 0,
@@ -10211,6 +10614,14 @@ var ConfigDefinition = {
10211
10614
  responseType: ModuleByNameResponse,
10212
10615
  responseStream: false,
10213
10616
  options: {}
10617
+ },
10618
+ deleteConfig: {
10619
+ name: "DeleteConfig",
10620
+ requestType: DeleteConfigRequest,
10621
+ requestStream: false,
10622
+ responseType: Empty,
10623
+ responseStream: false,
10624
+ options: {}
10214
10625
  }
10215
10626
  }
10216
10627
  };
@@ -13302,7 +13713,9 @@ function createBaseRequest() {
13302
13713
  bodyParams: "",
13303
13714
  urlParams: "",
13304
13715
  queryParams: "",
13305
- functionName: ""
13716
+ functionName: "",
13717
+ rawHeaders: "",
13718
+ rawBody: new Uint8Array(0)
13306
13719
  };
13307
13720
  }
13308
13721
  var Request = {
@@ -13334,6 +13747,12 @@ var Request = {
13334
13747
  if (message.functionName !== "") {
13335
13748
  writer.uint32(74).string(message.functionName);
13336
13749
  }
13750
+ if (message.rawHeaders !== "") {
13751
+ writer.uint32(82).string(message.rawHeaders);
13752
+ }
13753
+ if (message.rawBody.length !== 0) {
13754
+ writer.uint32(90).bytes(message.rawBody);
13755
+ }
13337
13756
  return writer;
13338
13757
  },
13339
13758
  decode(input, length) {
@@ -13406,6 +13825,20 @@ var Request = {
13406
13825
  message.functionName = reader.string();
13407
13826
  continue;
13408
13827
  }
13828
+ case 10: {
13829
+ if (tag !== 82) {
13830
+ break;
13831
+ }
13832
+ message.rawHeaders = reader.string();
13833
+ continue;
13834
+ }
13835
+ case 11: {
13836
+ if (tag !== 90) {
13837
+ break;
13838
+ }
13839
+ message.rawBody = reader.bytes();
13840
+ continue;
13841
+ }
13409
13842
  }
13410
13843
  if ((tag & 7) === 4 || tag === 0) {
13411
13844
  break;
@@ -13424,7 +13857,9 @@ var Request = {
13424
13857
  bodyParams: isSet8(object.bodyParams) ? globalThis.String(object.bodyParams) : "",
13425
13858
  urlParams: isSet8(object.urlParams) ? globalThis.String(object.urlParams) : "",
13426
13859
  queryParams: isSet8(object.queryParams) ? globalThis.String(object.queryParams) : "",
13427
- functionName: isSet8(object.functionName) ? globalThis.String(object.functionName) : ""
13860
+ functionName: isSet8(object.functionName) ? globalThis.String(object.functionName) : "",
13861
+ rawHeaders: isSet8(object.rawHeaders) ? globalThis.String(object.rawHeaders) : "",
13862
+ rawBody: isSet8(object.rawBody) ? bytesFromBase642(object.rawBody) : new Uint8Array(0)
13428
13863
  };
13429
13864
  },
13430
13865
  toJSON(message) {
@@ -13456,6 +13891,12 @@ var Request = {
13456
13891
  if (message.functionName !== "") {
13457
13892
  obj.functionName = message.functionName;
13458
13893
  }
13894
+ if (message.rawHeaders !== "") {
13895
+ obj.rawHeaders = message.rawHeaders;
13896
+ }
13897
+ if (message.rawBody.length !== 0) {
13898
+ obj.rawBody = base64FromBytes2(message.rawBody);
13899
+ }
13459
13900
  return obj;
13460
13901
  },
13461
13902
  create(base) {
@@ -13472,6 +13913,8 @@ var Request = {
13472
13913
  message.urlParams = object.urlParams ?? "";
13473
13914
  message.queryParams = object.queryParams ?? "";
13474
13915
  message.functionName = object.functionName ?? "";
13916
+ message.rawHeaders = object.rawHeaders ?? "";
13917
+ message.rawBody = object.rawBody ?? new Uint8Array(0);
13475
13918
  return message;
13476
13919
  }
13477
13920
  };
@@ -14092,6 +14535,29 @@ var AdminRouterDefinition = {
14092
14535
  }
14093
14536
  }
14094
14537
  };
14538
+ function bytesFromBase642(b64) {
14539
+ if (globalThis.Buffer) {
14540
+ return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
14541
+ } else {
14542
+ const bin = globalThis.atob(b64);
14543
+ const arr = new Uint8Array(bin.length);
14544
+ for (let i = 0; i < bin.length; ++i) {
14545
+ arr[i] = bin.charCodeAt(i);
14546
+ }
14547
+ return arr;
14548
+ }
14549
+ }
14550
+ function base64FromBytes2(arr) {
14551
+ if (globalThis.Buffer) {
14552
+ return globalThis.Buffer.from(arr).toString("base64");
14553
+ } else {
14554
+ const bin = [];
14555
+ arr.forEach((byte) => {
14556
+ bin.push(globalThis.String.fromCharCode(byte));
14557
+ });
14558
+ return globalThis.btoa(bin.join(""));
14559
+ }
14560
+ }
14095
14561
  function isSet8(value) {
14096
14562
  return value !== null && value !== void 0;
14097
14563
  }
@@ -14578,7 +15044,9 @@ function createBaseRegisterConduitRouteRequest_ConduitRouteOptions() {
14578
15044
  errors: [],
14579
15045
  mcp: void 0,
14580
15046
  strictParams: void 0,
14581
- rateLimit: void 0
15047
+ rateLimit: void 0,
15048
+ captureRawBody: void 0,
15049
+ captureRawHeaders: void 0
14582
15050
  };
14583
15051
  }
14584
15052
  var RegisterConduitRouteRequest_ConduitRouteOptions = {
@@ -14622,6 +15090,12 @@ var RegisterConduitRouteRequest_ConduitRouteOptions = {
14622
15090
  if (message.rateLimit !== void 0) {
14623
15091
  writer.uint32(106).string(message.rateLimit);
14624
15092
  }
15093
+ if (message.captureRawBody !== void 0) {
15094
+ writer.uint32(112).bool(message.captureRawBody);
15095
+ }
15096
+ if (message.captureRawHeaders !== void 0) {
15097
+ writer.uint32(120).bool(message.captureRawHeaders);
15098
+ }
14625
15099
  return writer;
14626
15100
  },
14627
15101
  decode(input, length) {
@@ -14722,6 +15196,20 @@ var RegisterConduitRouteRequest_ConduitRouteOptions = {
14722
15196
  message.rateLimit = reader.string();
14723
15197
  continue;
14724
15198
  }
15199
+ case 14: {
15200
+ if (tag !== 112) {
15201
+ break;
15202
+ }
15203
+ message.captureRawBody = reader.bool();
15204
+ continue;
15205
+ }
15206
+ case 15: {
15207
+ if (tag !== 120) {
15208
+ break;
15209
+ }
15210
+ message.captureRawHeaders = reader.bool();
15211
+ continue;
15212
+ }
14725
15213
  }
14726
15214
  if ((tag & 7) === 4 || tag === 0) {
14727
15215
  break;
@@ -14744,7 +15232,9 @@ var RegisterConduitRouteRequest_ConduitRouteOptions = {
14744
15232
  errors: globalThis.Array.isArray(object?.errors) ? object.errors.map((e) => RegisterConduitRouteRequest_ErrorDefinition.fromJSON(e)) : [],
14745
15233
  mcp: isSet9(object.mcp) ? globalThis.Boolean(object.mcp) : void 0,
14746
15234
  strictParams: isSet9(object.strictParams) ? globalThis.Boolean(object.strictParams) : void 0,
14747
- rateLimit: isSet9(object.rateLimit) ? globalThis.String(object.rateLimit) : void 0
15235
+ rateLimit: isSet9(object.rateLimit) ? globalThis.String(object.rateLimit) : void 0,
15236
+ captureRawBody: isSet9(object.captureRawBody) ? globalThis.Boolean(object.captureRawBody) : void 0,
15237
+ captureRawHeaders: isSet9(object.captureRawHeaders) ? globalThis.Boolean(object.captureRawHeaders) : void 0
14748
15238
  };
14749
15239
  },
14750
15240
  toJSON(message) {
@@ -14788,6 +15278,12 @@ var RegisterConduitRouteRequest_ConduitRouteOptions = {
14788
15278
  if (message.rateLimit !== void 0) {
14789
15279
  obj.rateLimit = message.rateLimit;
14790
15280
  }
15281
+ if (message.captureRawBody !== void 0) {
15282
+ obj.captureRawBody = message.captureRawBody;
15283
+ }
15284
+ if (message.captureRawHeaders !== void 0) {
15285
+ obj.captureRawHeaders = message.captureRawHeaders;
15286
+ }
14791
15287
  return obj;
14792
15288
  },
14793
15289
  create(base) {
@@ -14808,6 +15304,8 @@ var RegisterConduitRouteRequest_ConduitRouteOptions = {
14808
15304
  message.mcp = object.mcp ?? void 0;
14809
15305
  message.strictParams = object.strictParams ?? void 0;
14810
15306
  message.rateLimit = object.rateLimit ?? void 0;
15307
+ message.captureRawBody = object.captureRawBody ?? void 0;
15308
+ message.captureRawHeaders = object.captureRawHeaders ?? void 0;
14811
15309
  return message;
14812
15310
  }
14813
15311
  };
@@ -16974,6 +17472,9 @@ var Config = class extends ConduitModule {
16974
17472
  return JSON.parse(res.data);
16975
17473
  });
16976
17474
  }
17475
+ delete(name) {
17476
+ return this.client.deleteConfig({ key: name });
17477
+ }
16977
17478
  configure(config, schema, override) {
16978
17479
  const request = {
16979
17480
  config: JSON.stringify(config),
@@ -17189,7 +17690,7 @@ var Chat = class extends ConduitModule {
17189
17690
  }
17190
17691
  moduleName;
17191
17692
  sendMessage(messageData) {
17192
- return this.client.sendMessage(messageData);
17693
+ return this.client.sendMessage(SendMessageRequest.fromPartial(messageData));
17193
17694
  }
17194
17695
  createRoom(name, participants) {
17195
17696
  return this.client.createRoom({ name, participants });
@@ -17438,8 +17939,7 @@ var Communications = class extends ConduitModule {
17438
17939
  sendMessage(channel, params) {
17439
17940
  return this.client.sendCommunication({
17440
17941
  channel,
17441
- templateName: "",
17442
- // Not used for direct sending
17942
+ templateName: params.templateName ?? "",
17443
17943
  params: {
17444
17944
  recipient: params.recipient,
17445
17945
  subject: params.subject,
@@ -17465,8 +17965,7 @@ var Communications = class extends ConduitModule {
17465
17965
  return this.client.sendToMultipleChannels({
17466
17966
  channels,
17467
17967
  strategy,
17468
- templateName: "",
17469
- // Not used for direct sending
17968
+ templateName: params.templateName ?? "",
17470
17969
  params: {
17471
17970
  recipient: params.recipient,
17472
17971
  subject: params.subject,
@@ -17488,8 +17987,7 @@ var Communications = class extends ConduitModule {
17488
17987
  sendWithFallback(fallbackChain, params) {
17489
17988
  return this.client.sendWithFallback({
17490
17989
  fallbackChain,
17491
- templateName: "",
17492
- // Not used for direct sending
17990
+ templateName: params.templateName ?? "",
17493
17991
  params: {
17494
17992
  recipient: params.recipient,
17495
17993
  subject: params.subject,
@@ -17520,6 +18018,51 @@ var Communications = class extends ConduitModule {
17520
18018
  return JSON.parse(res.statusInfo);
17521
18019
  });
17522
18020
  }
18021
+ registerCommunicationTemplate(template) {
18022
+ return this.client.registerCommunicationTemplate({
18023
+ name: template.name,
18024
+ channels: template.channels,
18025
+ description: template.description,
18026
+ variables: template.variables ?? [],
18027
+ template: {
18028
+ email: template.email,
18029
+ push: template.push,
18030
+ sms: template.sms
18031
+ }
18032
+ }).then((res) => JSON.parse(res.template));
18033
+ }
18034
+ updateCommunicationTemplate(id, params) {
18035
+ return this.client.updateCommunicationTemplate({
18036
+ id,
18037
+ name: params.name,
18038
+ channels: params.channels ?? [],
18039
+ description: params.description,
18040
+ variables: params.variables ?? [],
18041
+ template: {
18042
+ email: params.email,
18043
+ push: params.push,
18044
+ sms: params.sms
18045
+ }
18046
+ }).then((res) => JSON.parse(res.template));
18047
+ }
18048
+ deleteCommunicationTemplate(id) {
18049
+ return this.client.deleteCommunicationTemplate({ id });
18050
+ }
18051
+ getCommunicationTemplate(params) {
18052
+ return this.client.getCommunicationTemplate(params).then((res) => {
18053
+ return JSON.parse(res.template);
18054
+ });
18055
+ }
18056
+ listCommunicationTemplates(params) {
18057
+ return this.client.listCommunicationTemplates({
18058
+ skip: params.skip ?? 0,
18059
+ limit: params.limit ?? 25,
18060
+ search: params.search
18061
+ }).then((res) => ({
18062
+ templates: res.templates.map((t) => JSON.parse(t)),
18063
+ count: res.count
18064
+ }));
18065
+ }
17523
18066
  };
17524
18067
 
17525
18068
  // src/index.ts
@@ -17653,6 +18196,19 @@ var RedisManager = class {
17653
18196
 
17654
18197
  // src/utilities/StateManager.ts
17655
18198
  var import_redlock = require("@sesamecare-oss/redlock");
18199
+ async function isLockContention(error) {
18200
+ if (error instanceof import_redlock.ResourceLockedError) {
18201
+ return true;
18202
+ }
18203
+ if (!(error instanceof import_redlock.ExecutionError)) {
18204
+ return false;
18205
+ }
18206
+ const attempts = await Promise.all(error.attempts);
18207
+ const voteErrors = attempts.flatMap(
18208
+ (attempt) => Array.from(attempt.votesAgainst.values())
18209
+ );
18210
+ return voteErrors.length > 0 && voteErrors.every((voteError) => voteError instanceof import_redlock.ResourceLockedError);
18211
+ }
17656
18212
  var StateManager = class {
17657
18213
  redisClient;
17658
18214
  redLock;
@@ -17686,9 +18242,31 @@ var StateManager = class {
17686
18242
  async acquireLock(resource, ttl = 5e3) {
17687
18243
  return await this.redLock.acquire([resource], ttl);
17688
18244
  }
18245
+ /**
18246
+ * Attempt to acquire a lock once. Returns null when another holder owns the
18247
+ * resource (contention). Re-throws Redis/infrastructure failures.
18248
+ */
18249
+ async tryAcquireLock(resource, ttl = 5e3) {
18250
+ try {
18251
+ return await this.redLock.acquire([resource], ttl, { retryCount: 0 });
18252
+ } catch (error) {
18253
+ if (await isLockContention(error)) {
18254
+ return null;
18255
+ }
18256
+ throw error;
18257
+ }
18258
+ }
17689
18259
  async releaseLock(lock) {
17690
18260
  await lock.release();
17691
18261
  }
18262
+ async withLock(resource, ttl, fn) {
18263
+ const lock = await this.acquireLock(resource, ttl);
18264
+ try {
18265
+ return await fn();
18266
+ } finally {
18267
+ await this.releaseLock(lock);
18268
+ }
18269
+ }
17692
18270
  async modifyState(modifier) {
17693
18271
  const lock = await this.acquireLock("state_modification" /* STATE_MODIFICATION */);
17694
18272
  try {
@@ -18498,6 +19076,9 @@ var ConduitGrpcSdk = class _ConduitGrpcSdk {
18498
19076
  DatabaseProviderDefinition,
18499
19077
  Decision,
18500
19078
  DeleteAllRelationsRequest,
19079
+ DeleteCommunicationTemplateRequest,
19080
+ DeleteCommunicationTemplateResponse,
19081
+ DeleteConfigRequest,
18501
19082
  DeleteFileResponse,
18502
19083
  DeleteResourceRequest,
18503
19084
  DeleteRoomRequest,
@@ -18514,6 +19095,8 @@ var ConduitGrpcSdk = class _ConduitGrpcSdk {
18514
19095
  FindRelationResponse,
18515
19096
  FindRequest,
18516
19097
  FindRequest_SortEntry,
19098
+ GetCommunicationTemplateRequest,
19099
+ GetCommunicationTemplateResponse,
18517
19100
  GetConfigRequest,
18518
19101
  GetConfigResponse,
18519
19102
  GetDatabaseTypeResponse,
@@ -18547,6 +19130,8 @@ var ConduitGrpcSdk = class _ConduitGrpcSdk {
18547
19130
  InvitationDeleteResponse,
18548
19131
  InviteUserToTeamRequest,
18549
19132
  InviteUserToTeamResponse,
19133
+ ListCommunicationTemplatesRequest,
19134
+ ListCommunicationTemplatesResponse,
18550
19135
  MetricType,
18551
19136
  MigrateRequest,
18552
19137
  ModifyTeamMembersRequest,
@@ -18576,7 +19161,6 @@ var ConduitGrpcSdk = class _ConduitGrpcSdk {
18576
19161
  RegisterAdminRouteRequest_ConduitRouteReturnDefinition,
18577
19162
  RegisterAdminRouteRequest_ErrorDefinition,
18578
19163
  RegisterAdminRouteRequest_PathDefinition,
18579
- RegisterAdminRouteRequest_ProxyRouteOptions,
18580
19164
  RegisterCommunicationTemplateRequest,
18581
19165
  RegisterCommunicationTemplateRequest_CommunicationTemplate,
18582
19166
  RegisterCommunicationTemplateRequest_CommunicationTemplate_EmailTemplate,
@@ -18649,6 +19233,7 @@ var ConduitGrpcSdk = class _ConduitGrpcSdk {
18649
19233
  Team,
18650
19234
  TeamDeleteRequest,
18651
19235
  TeamDeleteResponse,
19236
+ UpdateCommunicationTemplateRequest,
18652
19237
  UpdateConfigRequest,
18653
19238
  UpdateConfigResponse,
18654
19239
  UpdateFileByUrlRequest,