@sentio/runtime 2.36.0-rc.10 → 2.36.0-rc.11

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentio/runtime",
3
- "version": "2.36.0-rc.10",
3
+ "version": "2.36.0-rc.11",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "exports": {
@@ -30,10 +30,10 @@
30
30
  "protobufjs": "^7.2.6",
31
31
  "utility-types": "^3.11.0",
32
32
  "winston": "^3.11.0",
33
- "@sentio/protos": "2.36.0-rc.10"
33
+ "@sentio/protos": "2.36.0-rc.11"
34
34
  },
35
35
  "peerDependencies": {
36
- "@sentio/sdk": "^2.36.0-rc.10"
36
+ "@sentio/sdk": "^2.36.0-rc.11"
37
37
  },
38
38
  "devDependencies": {
39
39
  "@types/command-line-args": "^5.2.3",
@@ -380,6 +380,7 @@ export interface ContractConfig {
380
380
  moveResourceChangeConfigs: MoveResourceChangeConfig[];
381
381
  fuelCallConfigs: FuelCallHandlerConfig[];
382
382
  assetConfigs: FuelAssetHandlerConfig[];
383
+ fuelLogConfigs: FuelLogHandlerConfig[];
383
384
  instructionConfig: InstructionHandlerConfig | undefined;
384
385
  startBlock: bigint;
385
386
  endBlock: bigint;
@@ -626,6 +627,11 @@ export interface FuelAssetHandlerConfig_AssetFilter {
626
627
  toAddress?: string | undefined;
627
628
  }
628
629
 
630
+ export interface FuelLogHandlerConfig {
631
+ logIds: string[];
632
+ handlerId: number;
633
+ }
634
+
629
635
  export interface LogFilter {
630
636
  topics: Topic[];
631
637
  address?: string | undefined;
@@ -1331,6 +1337,7 @@ function createBaseContractConfig(): ContractConfig {
1331
1337
  moveResourceChangeConfigs: [],
1332
1338
  fuelCallConfigs: [],
1333
1339
  assetConfigs: [],
1340
+ fuelLogConfigs: [],
1334
1341
  instructionConfig: undefined,
1335
1342
  startBlock: BigInt("0"),
1336
1343
  endBlock: BigInt("0"),
@@ -1370,6 +1377,9 @@ export const ContractConfig = {
1370
1377
  for (const v of message.assetConfigs) {
1371
1378
  FuelAssetHandlerConfig.encode(v!, writer.uint32(114).fork()).ldelim();
1372
1379
  }
1380
+ for (const v of message.fuelLogConfigs) {
1381
+ FuelLogHandlerConfig.encode(v!, writer.uint32(122).fork()).ldelim();
1382
+ }
1373
1383
  if (message.instructionConfig !== undefined) {
1374
1384
  InstructionHandlerConfig.encode(message.instructionConfig, writer.uint32(50).fork()).ldelim();
1375
1385
  }
@@ -1468,6 +1478,13 @@ export const ContractConfig = {
1468
1478
 
1469
1479
  message.assetConfigs.push(FuelAssetHandlerConfig.decode(reader, reader.uint32()));
1470
1480
  continue;
1481
+ case 15:
1482
+ if (tag !== 122) {
1483
+ break;
1484
+ }
1485
+
1486
+ message.fuelLogConfigs.push(FuelLogHandlerConfig.decode(reader, reader.uint32()));
1487
+ continue;
1471
1488
  case 6:
1472
1489
  if (tag !== 50) {
1473
1490
  break;
@@ -1535,6 +1552,9 @@ export const ContractConfig = {
1535
1552
  assetConfigs: globalThis.Array.isArray(object?.assetConfigs)
1536
1553
  ? object.assetConfigs.map((e: any) => FuelAssetHandlerConfig.fromJSON(e))
1537
1554
  : [],
1555
+ fuelLogConfigs: globalThis.Array.isArray(object?.fuelLogConfigs)
1556
+ ? object.fuelLogConfigs.map((e: any) => FuelLogHandlerConfig.fromJSON(e))
1557
+ : [],
1538
1558
  instructionConfig: isSet(object.instructionConfig)
1539
1559
  ? InstructionHandlerConfig.fromJSON(object.instructionConfig)
1540
1560
  : undefined,
@@ -1576,6 +1596,9 @@ export const ContractConfig = {
1576
1596
  if (message.assetConfigs?.length) {
1577
1597
  obj.assetConfigs = message.assetConfigs.map((e) => FuelAssetHandlerConfig.toJSON(e));
1578
1598
  }
1599
+ if (message.fuelLogConfigs?.length) {
1600
+ obj.fuelLogConfigs = message.fuelLogConfigs.map((e) => FuelLogHandlerConfig.toJSON(e));
1601
+ }
1579
1602
  if (message.instructionConfig !== undefined) {
1580
1603
  obj.instructionConfig = InstructionHandlerConfig.toJSON(message.instructionConfig);
1581
1604
  }
@@ -1609,6 +1632,7 @@ export const ContractConfig = {
1609
1632
  object.moveResourceChangeConfigs?.map((e) => MoveResourceChangeConfig.fromPartial(e)) || [];
1610
1633
  message.fuelCallConfigs = object.fuelCallConfigs?.map((e) => FuelCallHandlerConfig.fromPartial(e)) || [];
1611
1634
  message.assetConfigs = object.assetConfigs?.map((e) => FuelAssetHandlerConfig.fromPartial(e)) || [];
1635
+ message.fuelLogConfigs = object.fuelLogConfigs?.map((e) => FuelLogHandlerConfig.fromPartial(e)) || [];
1612
1636
  message.instructionConfig = (object.instructionConfig !== undefined && object.instructionConfig !== null)
1613
1637
  ? InstructionHandlerConfig.fromPartial(object.instructionConfig)
1614
1638
  : undefined;
@@ -3963,6 +3987,80 @@ export const FuelAssetHandlerConfig_AssetFilter = {
3963
3987
  },
3964
3988
  };
3965
3989
 
3990
+ function createBaseFuelLogHandlerConfig(): FuelLogHandlerConfig {
3991
+ return { logIds: [], handlerId: 0 };
3992
+ }
3993
+
3994
+ export const FuelLogHandlerConfig = {
3995
+ encode(message: FuelLogHandlerConfig, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
3996
+ for (const v of message.logIds) {
3997
+ writer.uint32(10).string(v!);
3998
+ }
3999
+ if (message.handlerId !== 0) {
4000
+ writer.uint32(16).int32(message.handlerId);
4001
+ }
4002
+ return writer;
4003
+ },
4004
+
4005
+ decode(input: _m0.Reader | Uint8Array, length?: number): FuelLogHandlerConfig {
4006
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
4007
+ let end = length === undefined ? reader.len : reader.pos + length;
4008
+ const message = createBaseFuelLogHandlerConfig();
4009
+ while (reader.pos < end) {
4010
+ const tag = reader.uint32();
4011
+ switch (tag >>> 3) {
4012
+ case 1:
4013
+ if (tag !== 10) {
4014
+ break;
4015
+ }
4016
+
4017
+ message.logIds.push(reader.string());
4018
+ continue;
4019
+ case 2:
4020
+ if (tag !== 16) {
4021
+ break;
4022
+ }
4023
+
4024
+ message.handlerId = reader.int32();
4025
+ continue;
4026
+ }
4027
+ if ((tag & 7) === 4 || tag === 0) {
4028
+ break;
4029
+ }
4030
+ reader.skipType(tag & 7);
4031
+ }
4032
+ return message;
4033
+ },
4034
+
4035
+ fromJSON(object: any): FuelLogHandlerConfig {
4036
+ return {
4037
+ logIds: globalThis.Array.isArray(object?.logIds) ? object.logIds.map((e: any) => globalThis.String(e)) : [],
4038
+ handlerId: isSet(object.handlerId) ? globalThis.Number(object.handlerId) : 0,
4039
+ };
4040
+ },
4041
+
4042
+ toJSON(message: FuelLogHandlerConfig): unknown {
4043
+ const obj: any = {};
4044
+ if (message.logIds?.length) {
4045
+ obj.logIds = message.logIds;
4046
+ }
4047
+ if (message.handlerId !== 0) {
4048
+ obj.handlerId = Math.round(message.handlerId);
4049
+ }
4050
+ return obj;
4051
+ },
4052
+
4053
+ create(base?: DeepPartial<FuelLogHandlerConfig>): FuelLogHandlerConfig {
4054
+ return FuelLogHandlerConfig.fromPartial(base ?? {});
4055
+ },
4056
+ fromPartial(object: DeepPartial<FuelLogHandlerConfig>): FuelLogHandlerConfig {
4057
+ const message = createBaseFuelLogHandlerConfig();
4058
+ message.logIds = object.logIds?.map((e) => e) || [];
4059
+ message.handlerId = object.handlerId ?? 0;
4060
+ return message;
4061
+ },
4062
+ };
4063
+
3966
4064
  function createBaseLogFilter(): LogFilter {
3967
4065
  return { topics: [], address: undefined, addressType: undefined };
3968
4066
  }
@@ -166,6 +166,105 @@ export function permissionToJSON(object: Permission): string {
166
166
  }
167
167
  }
168
168
 
169
+ export enum NotificationType {
170
+ GENERAL = 0,
171
+ PROCESSOR_UPLOAD_FAILED = 101,
172
+ PROCESSOR_UPLOAD_SUCCESS = 102,
173
+ PROCESSOR_OBSOLETED = 103,
174
+ PROCESSOR_STOPPED = 104,
175
+ PROCESSOR_ACTIVATED = 105,
176
+ PROCESSOR_GENERAL = 106,
177
+ PROCESSOR_ERROR = 107,
178
+ EXPORT_TASK_FAILED = 201,
179
+ EXPORT_TASK_SUCCESS = 202,
180
+ BILLING_INVOICE = 301,
181
+ BILLING_PAYMENT = 302,
182
+ BILLING_SUBSCRIPTION = 303,
183
+ UNRECOGNIZED = -1,
184
+ }
185
+
186
+ export function notificationTypeFromJSON(object: any): NotificationType {
187
+ switch (object) {
188
+ case 0:
189
+ case "GENERAL":
190
+ return NotificationType.GENERAL;
191
+ case 101:
192
+ case "PROCESSOR_UPLOAD_FAILED":
193
+ return NotificationType.PROCESSOR_UPLOAD_FAILED;
194
+ case 102:
195
+ case "PROCESSOR_UPLOAD_SUCCESS":
196
+ return NotificationType.PROCESSOR_UPLOAD_SUCCESS;
197
+ case 103:
198
+ case "PROCESSOR_OBSOLETED":
199
+ return NotificationType.PROCESSOR_OBSOLETED;
200
+ case 104:
201
+ case "PROCESSOR_STOPPED":
202
+ return NotificationType.PROCESSOR_STOPPED;
203
+ case 105:
204
+ case "PROCESSOR_ACTIVATED":
205
+ return NotificationType.PROCESSOR_ACTIVATED;
206
+ case 106:
207
+ case "PROCESSOR_GENERAL":
208
+ return NotificationType.PROCESSOR_GENERAL;
209
+ case 107:
210
+ case "PROCESSOR_ERROR":
211
+ return NotificationType.PROCESSOR_ERROR;
212
+ case 201:
213
+ case "EXPORT_TASK_FAILED":
214
+ return NotificationType.EXPORT_TASK_FAILED;
215
+ case 202:
216
+ case "EXPORT_TASK_SUCCESS":
217
+ return NotificationType.EXPORT_TASK_SUCCESS;
218
+ case 301:
219
+ case "BILLING_INVOICE":
220
+ return NotificationType.BILLING_INVOICE;
221
+ case 302:
222
+ case "BILLING_PAYMENT":
223
+ return NotificationType.BILLING_PAYMENT;
224
+ case 303:
225
+ case "BILLING_SUBSCRIPTION":
226
+ return NotificationType.BILLING_SUBSCRIPTION;
227
+ case -1:
228
+ case "UNRECOGNIZED":
229
+ default:
230
+ return NotificationType.UNRECOGNIZED;
231
+ }
232
+ }
233
+
234
+ export function notificationTypeToJSON(object: NotificationType): string {
235
+ switch (object) {
236
+ case NotificationType.GENERAL:
237
+ return "GENERAL";
238
+ case NotificationType.PROCESSOR_UPLOAD_FAILED:
239
+ return "PROCESSOR_UPLOAD_FAILED";
240
+ case NotificationType.PROCESSOR_UPLOAD_SUCCESS:
241
+ return "PROCESSOR_UPLOAD_SUCCESS";
242
+ case NotificationType.PROCESSOR_OBSOLETED:
243
+ return "PROCESSOR_OBSOLETED";
244
+ case NotificationType.PROCESSOR_STOPPED:
245
+ return "PROCESSOR_STOPPED";
246
+ case NotificationType.PROCESSOR_ACTIVATED:
247
+ return "PROCESSOR_ACTIVATED";
248
+ case NotificationType.PROCESSOR_GENERAL:
249
+ return "PROCESSOR_GENERAL";
250
+ case NotificationType.PROCESSOR_ERROR:
251
+ return "PROCESSOR_ERROR";
252
+ case NotificationType.EXPORT_TASK_FAILED:
253
+ return "EXPORT_TASK_FAILED";
254
+ case NotificationType.EXPORT_TASK_SUCCESS:
255
+ return "EXPORT_TASK_SUCCESS";
256
+ case NotificationType.BILLING_INVOICE:
257
+ return "BILLING_INVOICE";
258
+ case NotificationType.BILLING_PAYMENT:
259
+ return "BILLING_PAYMENT";
260
+ case NotificationType.BILLING_SUBSCRIPTION:
261
+ return "BILLING_SUBSCRIPTION";
262
+ case NotificationType.UNRECOGNIZED:
263
+ default:
264
+ return "UNRECOGNIZED";
265
+ }
266
+ }
267
+
169
268
  export interface UsageTracker {
170
269
  apiSku: string;
171
270
  webuiSku: string;
@@ -1709,6 +1808,26 @@ export function systemSQLQuery_Aggregation_AggregateProperties_AggregationTypeTo
1709
1808
  }
1710
1809
  }
1711
1810
 
1811
+ export interface Notification {
1812
+ id: string;
1813
+ projectId: string;
1814
+ source: string;
1815
+ level: string;
1816
+ message: string;
1817
+ createdAt: Date | undefined;
1818
+ type: NotificationType;
1819
+ ownerId: string;
1820
+ owner: Owner | undefined;
1821
+ project: Project | undefined;
1822
+ attributes: { [key: string]: string };
1823
+ read: boolean;
1824
+ }
1825
+
1826
+ export interface Notification_AttributesEntry {
1827
+ key: string;
1828
+ value: string;
1829
+ }
1830
+
1712
1831
  function createBaseUsageTracker(): UsageTracker {
1713
1832
  return {
1714
1833
  apiSku: "",
@@ -11990,6 +12109,341 @@ export const SystemSQLQuery_Aggregation_AggregateProperties = {
11990
12109
  },
11991
12110
  };
11992
12111
 
12112
+ function createBaseNotification(): Notification {
12113
+ return {
12114
+ id: "",
12115
+ projectId: "",
12116
+ source: "",
12117
+ level: "",
12118
+ message: "",
12119
+ createdAt: undefined,
12120
+ type: 0,
12121
+ ownerId: "",
12122
+ owner: undefined,
12123
+ project: undefined,
12124
+ attributes: {},
12125
+ read: false,
12126
+ };
12127
+ }
12128
+
12129
+ export const Notification = {
12130
+ encode(message: Notification, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
12131
+ if (message.id !== "") {
12132
+ writer.uint32(10).string(message.id);
12133
+ }
12134
+ if (message.projectId !== "") {
12135
+ writer.uint32(18).string(message.projectId);
12136
+ }
12137
+ if (message.source !== "") {
12138
+ writer.uint32(26).string(message.source);
12139
+ }
12140
+ if (message.level !== "") {
12141
+ writer.uint32(34).string(message.level);
12142
+ }
12143
+ if (message.message !== "") {
12144
+ writer.uint32(42).string(message.message);
12145
+ }
12146
+ if (message.createdAt !== undefined) {
12147
+ Timestamp.encode(toTimestamp(message.createdAt), writer.uint32(50).fork()).ldelim();
12148
+ }
12149
+ if (message.type !== 0) {
12150
+ writer.uint32(64).int32(message.type);
12151
+ }
12152
+ if (message.ownerId !== "") {
12153
+ writer.uint32(74).string(message.ownerId);
12154
+ }
12155
+ if (message.owner !== undefined) {
12156
+ Owner.encode(message.owner, writer.uint32(82).fork()).ldelim();
12157
+ }
12158
+ if (message.project !== undefined) {
12159
+ Project.encode(message.project, writer.uint32(90).fork()).ldelim();
12160
+ }
12161
+ Object.entries(message.attributes).forEach(([key, value]) => {
12162
+ Notification_AttributesEntry.encode({ key: key as any, value }, writer.uint32(98).fork()).ldelim();
12163
+ });
12164
+ if (message.read !== false) {
12165
+ writer.uint32(104).bool(message.read);
12166
+ }
12167
+ return writer;
12168
+ },
12169
+
12170
+ decode(input: _m0.Reader | Uint8Array, length?: number): Notification {
12171
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
12172
+ let end = length === undefined ? reader.len : reader.pos + length;
12173
+ const message = createBaseNotification();
12174
+ while (reader.pos < end) {
12175
+ const tag = reader.uint32();
12176
+ switch (tag >>> 3) {
12177
+ case 1:
12178
+ if (tag !== 10) {
12179
+ break;
12180
+ }
12181
+
12182
+ message.id = reader.string();
12183
+ continue;
12184
+ case 2:
12185
+ if (tag !== 18) {
12186
+ break;
12187
+ }
12188
+
12189
+ message.projectId = reader.string();
12190
+ continue;
12191
+ case 3:
12192
+ if (tag !== 26) {
12193
+ break;
12194
+ }
12195
+
12196
+ message.source = reader.string();
12197
+ continue;
12198
+ case 4:
12199
+ if (tag !== 34) {
12200
+ break;
12201
+ }
12202
+
12203
+ message.level = reader.string();
12204
+ continue;
12205
+ case 5:
12206
+ if (tag !== 42) {
12207
+ break;
12208
+ }
12209
+
12210
+ message.message = reader.string();
12211
+ continue;
12212
+ case 6:
12213
+ if (tag !== 50) {
12214
+ break;
12215
+ }
12216
+
12217
+ message.createdAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
12218
+ continue;
12219
+ case 8:
12220
+ if (tag !== 64) {
12221
+ break;
12222
+ }
12223
+
12224
+ message.type = reader.int32() as any;
12225
+ continue;
12226
+ case 9:
12227
+ if (tag !== 74) {
12228
+ break;
12229
+ }
12230
+
12231
+ message.ownerId = reader.string();
12232
+ continue;
12233
+ case 10:
12234
+ if (tag !== 82) {
12235
+ break;
12236
+ }
12237
+
12238
+ message.owner = Owner.decode(reader, reader.uint32());
12239
+ continue;
12240
+ case 11:
12241
+ if (tag !== 90) {
12242
+ break;
12243
+ }
12244
+
12245
+ message.project = Project.decode(reader, reader.uint32());
12246
+ continue;
12247
+ case 12:
12248
+ if (tag !== 98) {
12249
+ break;
12250
+ }
12251
+
12252
+ const entry12 = Notification_AttributesEntry.decode(reader, reader.uint32());
12253
+ if (entry12.value !== undefined) {
12254
+ message.attributes[entry12.key] = entry12.value;
12255
+ }
12256
+ continue;
12257
+ case 13:
12258
+ if (tag !== 104) {
12259
+ break;
12260
+ }
12261
+
12262
+ message.read = reader.bool();
12263
+ continue;
12264
+ }
12265
+ if ((tag & 7) === 4 || tag === 0) {
12266
+ break;
12267
+ }
12268
+ reader.skipType(tag & 7);
12269
+ }
12270
+ return message;
12271
+ },
12272
+
12273
+ fromJSON(object: any): Notification {
12274
+ return {
12275
+ id: isSet(object.id) ? globalThis.String(object.id) : "",
12276
+ projectId: isSet(object.projectId) ? globalThis.String(object.projectId) : "",
12277
+ source: isSet(object.source) ? globalThis.String(object.source) : "",
12278
+ level: isSet(object.level) ? globalThis.String(object.level) : "",
12279
+ message: isSet(object.message) ? globalThis.String(object.message) : "",
12280
+ createdAt: isSet(object.createdAt) ? fromJsonTimestamp(object.createdAt) : undefined,
12281
+ type: isSet(object.type) ? notificationTypeFromJSON(object.type) : 0,
12282
+ ownerId: isSet(object.ownerId) ? globalThis.String(object.ownerId) : "",
12283
+ owner: isSet(object.owner) ? Owner.fromJSON(object.owner) : undefined,
12284
+ project: isSet(object.project) ? Project.fromJSON(object.project) : undefined,
12285
+ attributes: isObject(object.attributes)
12286
+ ? Object.entries(object.attributes).reduce<{ [key: string]: string }>((acc, [key, value]) => {
12287
+ acc[key] = String(value);
12288
+ return acc;
12289
+ }, {})
12290
+ : {},
12291
+ read: isSet(object.read) ? globalThis.Boolean(object.read) : false,
12292
+ };
12293
+ },
12294
+
12295
+ toJSON(message: Notification): unknown {
12296
+ const obj: any = {};
12297
+ if (message.id !== "") {
12298
+ obj.id = message.id;
12299
+ }
12300
+ if (message.projectId !== "") {
12301
+ obj.projectId = message.projectId;
12302
+ }
12303
+ if (message.source !== "") {
12304
+ obj.source = message.source;
12305
+ }
12306
+ if (message.level !== "") {
12307
+ obj.level = message.level;
12308
+ }
12309
+ if (message.message !== "") {
12310
+ obj.message = message.message;
12311
+ }
12312
+ if (message.createdAt !== undefined) {
12313
+ obj.createdAt = message.createdAt.toISOString();
12314
+ }
12315
+ if (message.type !== 0) {
12316
+ obj.type = notificationTypeToJSON(message.type);
12317
+ }
12318
+ if (message.ownerId !== "") {
12319
+ obj.ownerId = message.ownerId;
12320
+ }
12321
+ if (message.owner !== undefined) {
12322
+ obj.owner = Owner.toJSON(message.owner);
12323
+ }
12324
+ if (message.project !== undefined) {
12325
+ obj.project = Project.toJSON(message.project);
12326
+ }
12327
+ if (message.attributes) {
12328
+ const entries = Object.entries(message.attributes);
12329
+ if (entries.length > 0) {
12330
+ obj.attributes = {};
12331
+ entries.forEach(([k, v]) => {
12332
+ obj.attributes[k] = v;
12333
+ });
12334
+ }
12335
+ }
12336
+ if (message.read !== false) {
12337
+ obj.read = message.read;
12338
+ }
12339
+ return obj;
12340
+ },
12341
+
12342
+ create(base?: DeepPartial<Notification>): Notification {
12343
+ return Notification.fromPartial(base ?? {});
12344
+ },
12345
+ fromPartial(object: DeepPartial<Notification>): Notification {
12346
+ const message = createBaseNotification();
12347
+ message.id = object.id ?? "";
12348
+ message.projectId = object.projectId ?? "";
12349
+ message.source = object.source ?? "";
12350
+ message.level = object.level ?? "";
12351
+ message.message = object.message ?? "";
12352
+ message.createdAt = object.createdAt ?? undefined;
12353
+ message.type = object.type ?? 0;
12354
+ message.ownerId = object.ownerId ?? "";
12355
+ message.owner = (object.owner !== undefined && object.owner !== null) ? Owner.fromPartial(object.owner) : undefined;
12356
+ message.project = (object.project !== undefined && object.project !== null)
12357
+ ? Project.fromPartial(object.project)
12358
+ : undefined;
12359
+ message.attributes = Object.entries(object.attributes ?? {}).reduce<{ [key: string]: string }>(
12360
+ (acc, [key, value]) => {
12361
+ if (value !== undefined) {
12362
+ acc[key] = globalThis.String(value);
12363
+ }
12364
+ return acc;
12365
+ },
12366
+ {},
12367
+ );
12368
+ message.read = object.read ?? false;
12369
+ return message;
12370
+ },
12371
+ };
12372
+
12373
+ function createBaseNotification_AttributesEntry(): Notification_AttributesEntry {
12374
+ return { key: "", value: "" };
12375
+ }
12376
+
12377
+ export const Notification_AttributesEntry = {
12378
+ encode(message: Notification_AttributesEntry, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
12379
+ if (message.key !== "") {
12380
+ writer.uint32(10).string(message.key);
12381
+ }
12382
+ if (message.value !== "") {
12383
+ writer.uint32(18).string(message.value);
12384
+ }
12385
+ return writer;
12386
+ },
12387
+
12388
+ decode(input: _m0.Reader | Uint8Array, length?: number): Notification_AttributesEntry {
12389
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
12390
+ let end = length === undefined ? reader.len : reader.pos + length;
12391
+ const message = createBaseNotification_AttributesEntry();
12392
+ while (reader.pos < end) {
12393
+ const tag = reader.uint32();
12394
+ switch (tag >>> 3) {
12395
+ case 1:
12396
+ if (tag !== 10) {
12397
+ break;
12398
+ }
12399
+
12400
+ message.key = reader.string();
12401
+ continue;
12402
+ case 2:
12403
+ if (tag !== 18) {
12404
+ break;
12405
+ }
12406
+
12407
+ message.value = reader.string();
12408
+ continue;
12409
+ }
12410
+ if ((tag & 7) === 4 || tag === 0) {
12411
+ break;
12412
+ }
12413
+ reader.skipType(tag & 7);
12414
+ }
12415
+ return message;
12416
+ },
12417
+
12418
+ fromJSON(object: any): Notification_AttributesEntry {
12419
+ return {
12420
+ key: isSet(object.key) ? globalThis.String(object.key) : "",
12421
+ value: isSet(object.value) ? globalThis.String(object.value) : "",
12422
+ };
12423
+ },
12424
+
12425
+ toJSON(message: Notification_AttributesEntry): unknown {
12426
+ const obj: any = {};
12427
+ if (message.key !== "") {
12428
+ obj.key = message.key;
12429
+ }
12430
+ if (message.value !== "") {
12431
+ obj.value = message.value;
12432
+ }
12433
+ return obj;
12434
+ },
12435
+
12436
+ create(base?: DeepPartial<Notification_AttributesEntry>): Notification_AttributesEntry {
12437
+ return Notification_AttributesEntry.fromPartial(base ?? {});
12438
+ },
12439
+ fromPartial(object: DeepPartial<Notification_AttributesEntry>): Notification_AttributesEntry {
12440
+ const message = createBaseNotification_AttributesEntry();
12441
+ message.key = object.key ?? "";
12442
+ message.value = object.value ?? "";
12443
+ return message;
12444
+ },
12445
+ };
12446
+
11993
12447
  type Builtin = Date | Function | Uint8Array | string | number | boolean | bigint | undefined;
11994
12448
 
11995
12449
  type DeepPartial<T> = T extends Builtin ? T