You've already forked npm-core-sdk
Latest generation
This commit is contained in:
228
notification.ts
228
notification.ts
@@ -1,4 +1,4 @@
|
||||
// @generated by protobuf-ts 2.9.6
|
||||
// @generated by protobuf-ts 2.9.6 with parameter use_proto_field_name
|
||||
// @generated from protobuf file "notification.proto" (package "api", syntax proto3)
|
||||
// tslint:disable
|
||||
import { ServiceType } from "@protobuf-ts/runtime-rpc";
|
||||
@@ -18,27 +18,27 @@ export interface Notification {
|
||||
/**
|
||||
* @generated from protobuf field: string Payload = 1 [json_name = "Payload"];
|
||||
*/
|
||||
payload: string;
|
||||
Payload: string;
|
||||
/**
|
||||
* @generated from protobuf field: api.NotificationType Type = 2 [json_name = "Type"];
|
||||
*/
|
||||
type: NotificationType;
|
||||
Type: NotificationType;
|
||||
/**
|
||||
* @generated from protobuf field: string TemplateName = 3 [json_name = "TemplateName"];
|
||||
*/
|
||||
templateName: string;
|
||||
TemplateName: string;
|
||||
/**
|
||||
* @generated from protobuf field: string AckID = 4 [json_name = "AckID"];
|
||||
*/
|
||||
ackID: string;
|
||||
AckID: string;
|
||||
/**
|
||||
* @generated from protobuf field: api.NotificationCategory Category = 5 [json_name = "Category"];
|
||||
*/
|
||||
category: NotificationCategory;
|
||||
Category: NotificationCategory;
|
||||
/**
|
||||
* @generated from protobuf field: string ID = 6 [json_name = "ID"];
|
||||
*/
|
||||
iD: string;
|
||||
ID: string;
|
||||
}
|
||||
/**
|
||||
* @generated from protobuf message api.NotificationRequest
|
||||
@@ -47,19 +47,19 @@ export interface NotificationRequest {
|
||||
/**
|
||||
* @generated from protobuf field: string Payload = 1 [json_name = "Payload"];
|
||||
*/
|
||||
payload: string;
|
||||
Payload: string;
|
||||
/**
|
||||
* @generated from protobuf field: api.NotificationType Type = 2 [json_name = "Type"];
|
||||
*/
|
||||
type: NotificationType;
|
||||
Type: NotificationType;
|
||||
/**
|
||||
* @generated from protobuf field: string TemplateName = 3 [json_name = "TemplateName"];
|
||||
*/
|
||||
templateName: string;
|
||||
TemplateName: string;
|
||||
/**
|
||||
* @generated from protobuf field: api.NotificationCategory Category = 4 [json_name = "Category"];
|
||||
*/
|
||||
category: NotificationCategory;
|
||||
Category: NotificationCategory;
|
||||
}
|
||||
/**
|
||||
* @generated from protobuf message api.PublishToUserRequest
|
||||
@@ -68,15 +68,15 @@ export interface PublishToUserRequest {
|
||||
/**
|
||||
* @generated from protobuf field: string UserID = 1 [json_name = "UserID"];
|
||||
*/
|
||||
userID: string;
|
||||
UserID: string;
|
||||
/**
|
||||
* @generated from protobuf field: int64 ExpirationDate = 2 [json_name = "ExpirationDate"];
|
||||
*/
|
||||
expirationDate: bigint;
|
||||
ExpirationDate: bigint;
|
||||
/**
|
||||
* @generated from protobuf field: api.NotificationRequest Notification = 3 [json_name = "Notification"];
|
||||
*/
|
||||
notification?: NotificationRequest;
|
||||
Notification?: NotificationRequest;
|
||||
}
|
||||
/**
|
||||
* @generated from protobuf message api.PublishToUserResult
|
||||
@@ -90,23 +90,23 @@ export interface NotificationListItem {
|
||||
/**
|
||||
* @generated from protobuf field: string Payload = 1 [json_name = "Payload"];
|
||||
*/
|
||||
payload: string;
|
||||
Payload: string;
|
||||
/**
|
||||
* @generated from protobuf field: api.NotificationType Type = 2 [json_name = "Type"];
|
||||
*/
|
||||
type: NotificationType;
|
||||
Type: NotificationType;
|
||||
/**
|
||||
* @generated from protobuf field: string TemplateName = 3 [json_name = "TemplateName"];
|
||||
*/
|
||||
templateName: string;
|
||||
TemplateName: string;
|
||||
/**
|
||||
* @generated from protobuf field: api.NotificationCategory Category = 4 [json_name = "Category"];
|
||||
*/
|
||||
category: NotificationCategory;
|
||||
Category: NotificationCategory;
|
||||
/**
|
||||
* @generated from protobuf field: string ID = 5 [json_name = "ID"];
|
||||
*/
|
||||
iD: string;
|
||||
ID: string;
|
||||
}
|
||||
/**
|
||||
* @generated from protobuf message api.ListNotificationRequest
|
||||
@@ -120,7 +120,7 @@ export interface ListNotificationResult {
|
||||
/**
|
||||
* @generated from protobuf field: repeated api.NotificationListItem Notifications = 1 [json_name = "Notifications"];
|
||||
*/
|
||||
notifications: NotificationListItem[];
|
||||
Notifications: NotificationListItem[];
|
||||
}
|
||||
/**
|
||||
* @generated from protobuf enum api.NotificationType
|
||||
@@ -160,22 +160,22 @@ export enum NotificationCategory {
|
||||
class Notification$Type extends MessageType<Notification> {
|
||||
constructor() {
|
||||
super("api.Notification", [
|
||||
{ no: 1, name: "Payload", kind: "scalar", jsonName: "Payload", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } }, "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Payload of the notification" } } },
|
||||
{ no: 2, name: "Type", kind: "enum", jsonName: "Type", T: () => ["api.NotificationType", NotificationType, "NOTIFICATION_TYPE_"], options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Payload type of the notification" } } },
|
||||
{ no: 3, name: "TemplateName", kind: "scalar", jsonName: "TemplateName", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Name of the ECard related to the notification payload" } } },
|
||||
{ no: 4, name: "AckID", kind: "scalar", jsonName: "AckID", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "ID to acknowledge notification to notification-server, filled by the server" } } },
|
||||
{ no: 5, name: "Category", kind: "enum", jsonName: "Category", T: () => ["api.NotificationCategory", NotificationCategory, "NOTIFICATION_CATEGORY_"], options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Category of the notification" } } },
|
||||
{ no: 6, name: "ID", kind: "scalar", jsonName: "ID", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "ID of the notification" } } }
|
||||
{ no: 1, name: "Payload", kind: "scalar", localName: "Payload", jsonName: "Payload", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } }, "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Payload of the notification" } } },
|
||||
{ no: 2, name: "Type", kind: "enum", localName: "Type", jsonName: "Type", T: () => ["api.NotificationType", NotificationType, "NOTIFICATION_TYPE_"], options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Payload type of the notification" } } },
|
||||
{ no: 3, name: "TemplateName", kind: "scalar", localName: "TemplateName", jsonName: "TemplateName", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Name of the ECard related to the notification payload" } } },
|
||||
{ no: 4, name: "AckID", kind: "scalar", localName: "AckID", jsonName: "AckID", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "ID to acknowledge notification to notification-server, filled by the server" } } },
|
||||
{ no: 5, name: "Category", kind: "enum", localName: "Category", jsonName: "Category", T: () => ["api.NotificationCategory", NotificationCategory, "NOTIFICATION_CATEGORY_"], options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Category of the notification" } } },
|
||||
{ no: 6, name: "ID", kind: "scalar", localName: "ID", jsonName: "ID", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "ID of the notification" } } }
|
||||
]);
|
||||
}
|
||||
create(value?: PartialMessage<Notification>): Notification {
|
||||
const message = globalThis.Object.create((this.messagePrototype!));
|
||||
message.payload = "";
|
||||
message.type = 0;
|
||||
message.templateName = "";
|
||||
message.ackID = "";
|
||||
message.category = 0;
|
||||
message.iD = "";
|
||||
message.Payload = "";
|
||||
message.Type = 0;
|
||||
message.TemplateName = "";
|
||||
message.AckID = "";
|
||||
message.Category = 0;
|
||||
message.ID = "";
|
||||
if (value !== undefined)
|
||||
reflectionMergePartial<Notification>(this, message, value);
|
||||
return message;
|
||||
@@ -186,22 +186,22 @@ class Notification$Type extends MessageType<Notification> {
|
||||
let [fieldNo, wireType] = reader.tag();
|
||||
switch (fieldNo) {
|
||||
case /* string Payload = 1 [json_name = "Payload"];*/ 1:
|
||||
message.payload = reader.string();
|
||||
message.Payload = reader.string();
|
||||
break;
|
||||
case /* api.NotificationType Type = 2 [json_name = "Type"];*/ 2:
|
||||
message.type = reader.int32();
|
||||
message.Type = reader.int32();
|
||||
break;
|
||||
case /* string TemplateName = 3 [json_name = "TemplateName"];*/ 3:
|
||||
message.templateName = reader.string();
|
||||
message.TemplateName = reader.string();
|
||||
break;
|
||||
case /* string AckID = 4 [json_name = "AckID"];*/ 4:
|
||||
message.ackID = reader.string();
|
||||
message.AckID = reader.string();
|
||||
break;
|
||||
case /* api.NotificationCategory Category = 5 [json_name = "Category"];*/ 5:
|
||||
message.category = reader.int32();
|
||||
message.Category = reader.int32();
|
||||
break;
|
||||
case /* string ID = 6 [json_name = "ID"];*/ 6:
|
||||
message.iD = reader.string();
|
||||
message.ID = reader.string();
|
||||
break;
|
||||
default:
|
||||
let u = options.readUnknownField;
|
||||
@@ -216,23 +216,23 @@ class Notification$Type extends MessageType<Notification> {
|
||||
}
|
||||
internalBinaryWrite(message: Notification, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
||||
/* string Payload = 1 [json_name = "Payload"]; */
|
||||
if (message.payload !== "")
|
||||
writer.tag(1, WireType.LengthDelimited).string(message.payload);
|
||||
if (message.Payload !== "")
|
||||
writer.tag(1, WireType.LengthDelimited).string(message.Payload);
|
||||
/* api.NotificationType Type = 2 [json_name = "Type"]; */
|
||||
if (message.type !== 0)
|
||||
writer.tag(2, WireType.Varint).int32(message.type);
|
||||
if (message.Type !== 0)
|
||||
writer.tag(2, WireType.Varint).int32(message.Type);
|
||||
/* string TemplateName = 3 [json_name = "TemplateName"]; */
|
||||
if (message.templateName !== "")
|
||||
writer.tag(3, WireType.LengthDelimited).string(message.templateName);
|
||||
if (message.TemplateName !== "")
|
||||
writer.tag(3, WireType.LengthDelimited).string(message.TemplateName);
|
||||
/* string AckID = 4 [json_name = "AckID"]; */
|
||||
if (message.ackID !== "")
|
||||
writer.tag(4, WireType.LengthDelimited).string(message.ackID);
|
||||
if (message.AckID !== "")
|
||||
writer.tag(4, WireType.LengthDelimited).string(message.AckID);
|
||||
/* api.NotificationCategory Category = 5 [json_name = "Category"]; */
|
||||
if (message.category !== 0)
|
||||
writer.tag(5, WireType.Varint).int32(message.category);
|
||||
if (message.Category !== 0)
|
||||
writer.tag(5, WireType.Varint).int32(message.Category);
|
||||
/* string ID = 6 [json_name = "ID"]; */
|
||||
if (message.iD !== "")
|
||||
writer.tag(6, WireType.LengthDelimited).string(message.iD);
|
||||
if (message.ID !== "")
|
||||
writer.tag(6, WireType.LengthDelimited).string(message.ID);
|
||||
let u = options.writeUnknownFields;
|
||||
if (u !== false)
|
||||
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
||||
@@ -247,18 +247,18 @@ export const Notification = new Notification$Type();
|
||||
class NotificationRequest$Type extends MessageType<NotificationRequest> {
|
||||
constructor() {
|
||||
super("api.NotificationRequest", [
|
||||
{ no: 1, name: "Payload", kind: "scalar", jsonName: "Payload", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } }, "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Payload of the notification" } } },
|
||||
{ no: 2, name: "Type", kind: "enum", jsonName: "Type", T: () => ["api.NotificationType", NotificationType, "NOTIFICATION_TYPE_"], options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Payload type of the notification" } } },
|
||||
{ no: 3, name: "TemplateName", kind: "scalar", jsonName: "TemplateName", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Name of the ECard related to the notification payload" } } },
|
||||
{ no: 4, name: "Category", kind: "enum", jsonName: "Category", T: () => ["api.NotificationCategory", NotificationCategory, "NOTIFICATION_CATEGORY_"], options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Category of the notification" } } }
|
||||
{ no: 1, name: "Payload", kind: "scalar", localName: "Payload", jsonName: "Payload", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } }, "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Payload of the notification" } } },
|
||||
{ no: 2, name: "Type", kind: "enum", localName: "Type", jsonName: "Type", T: () => ["api.NotificationType", NotificationType, "NOTIFICATION_TYPE_"], options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Payload type of the notification" } } },
|
||||
{ no: 3, name: "TemplateName", kind: "scalar", localName: "TemplateName", jsonName: "TemplateName", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Name of the ECard related to the notification payload" } } },
|
||||
{ no: 4, name: "Category", kind: "enum", localName: "Category", jsonName: "Category", T: () => ["api.NotificationCategory", NotificationCategory, "NOTIFICATION_CATEGORY_"], options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Category of the notification" } } }
|
||||
]);
|
||||
}
|
||||
create(value?: PartialMessage<NotificationRequest>): NotificationRequest {
|
||||
const message = globalThis.Object.create((this.messagePrototype!));
|
||||
message.payload = "";
|
||||
message.type = 0;
|
||||
message.templateName = "";
|
||||
message.category = 0;
|
||||
message.Payload = "";
|
||||
message.Type = 0;
|
||||
message.TemplateName = "";
|
||||
message.Category = 0;
|
||||
if (value !== undefined)
|
||||
reflectionMergePartial<NotificationRequest>(this, message, value);
|
||||
return message;
|
||||
@@ -269,16 +269,16 @@ class NotificationRequest$Type extends MessageType<NotificationRequest> {
|
||||
let [fieldNo, wireType] = reader.tag();
|
||||
switch (fieldNo) {
|
||||
case /* string Payload = 1 [json_name = "Payload"];*/ 1:
|
||||
message.payload = reader.string();
|
||||
message.Payload = reader.string();
|
||||
break;
|
||||
case /* api.NotificationType Type = 2 [json_name = "Type"];*/ 2:
|
||||
message.type = reader.int32();
|
||||
message.Type = reader.int32();
|
||||
break;
|
||||
case /* string TemplateName = 3 [json_name = "TemplateName"];*/ 3:
|
||||
message.templateName = reader.string();
|
||||
message.TemplateName = reader.string();
|
||||
break;
|
||||
case /* api.NotificationCategory Category = 4 [json_name = "Category"];*/ 4:
|
||||
message.category = reader.int32();
|
||||
message.Category = reader.int32();
|
||||
break;
|
||||
default:
|
||||
let u = options.readUnknownField;
|
||||
@@ -293,17 +293,17 @@ class NotificationRequest$Type extends MessageType<NotificationRequest> {
|
||||
}
|
||||
internalBinaryWrite(message: NotificationRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
||||
/* string Payload = 1 [json_name = "Payload"]; */
|
||||
if (message.payload !== "")
|
||||
writer.tag(1, WireType.LengthDelimited).string(message.payload);
|
||||
if (message.Payload !== "")
|
||||
writer.tag(1, WireType.LengthDelimited).string(message.Payload);
|
||||
/* api.NotificationType Type = 2 [json_name = "Type"]; */
|
||||
if (message.type !== 0)
|
||||
writer.tag(2, WireType.Varint).int32(message.type);
|
||||
if (message.Type !== 0)
|
||||
writer.tag(2, WireType.Varint).int32(message.Type);
|
||||
/* string TemplateName = 3 [json_name = "TemplateName"]; */
|
||||
if (message.templateName !== "")
|
||||
writer.tag(3, WireType.LengthDelimited).string(message.templateName);
|
||||
if (message.TemplateName !== "")
|
||||
writer.tag(3, WireType.LengthDelimited).string(message.TemplateName);
|
||||
/* api.NotificationCategory Category = 4 [json_name = "Category"]; */
|
||||
if (message.category !== 0)
|
||||
writer.tag(4, WireType.Varint).int32(message.category);
|
||||
if (message.Category !== 0)
|
||||
writer.tag(4, WireType.Varint).int32(message.Category);
|
||||
let u = options.writeUnknownFields;
|
||||
if (u !== false)
|
||||
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
||||
@@ -318,15 +318,15 @@ export const NotificationRequest = new NotificationRequest$Type();
|
||||
class PublishToUserRequest$Type extends MessageType<PublishToUserRequest> {
|
||||
constructor() {
|
||||
super("api.PublishToUserRequest", [
|
||||
{ no: 1, name: "UserID", kind: "scalar", jsonName: "UserID", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } }, "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Id of user who will receive the notification" } } },
|
||||
{ no: 2, name: "ExpirationDate", kind: "scalar", jsonName: "ExpirationDate", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/, options: { "validate.rules": { int64: { gte: "0" } }, "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Timestamp of notification expiration. If zero, platform default expiration date is used" } } },
|
||||
{ no: 3, name: "Notification", kind: "message", jsonName: "Notification", T: () => NotificationRequest }
|
||||
{ no: 1, name: "UserID", kind: "scalar", localName: "UserID", jsonName: "UserID", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } }, "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Id of user who will receive the notification" } } },
|
||||
{ no: 2, name: "ExpirationDate", kind: "scalar", localName: "ExpirationDate", jsonName: "ExpirationDate", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/, options: { "validate.rules": { int64: { gte: "0" } }, "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Timestamp of notification expiration. If zero, platform default expiration date is used" } } },
|
||||
{ no: 3, name: "Notification", kind: "message", localName: "Notification", jsonName: "Notification", T: () => NotificationRequest }
|
||||
]);
|
||||
}
|
||||
create(value?: PartialMessage<PublishToUserRequest>): PublishToUserRequest {
|
||||
const message = globalThis.Object.create((this.messagePrototype!));
|
||||
message.userID = "";
|
||||
message.expirationDate = 0n;
|
||||
message.UserID = "";
|
||||
message.ExpirationDate = 0n;
|
||||
if (value !== undefined)
|
||||
reflectionMergePartial<PublishToUserRequest>(this, message, value);
|
||||
return message;
|
||||
@@ -337,13 +337,13 @@ class PublishToUserRequest$Type extends MessageType<PublishToUserRequest> {
|
||||
let [fieldNo, wireType] = reader.tag();
|
||||
switch (fieldNo) {
|
||||
case /* string UserID = 1 [json_name = "UserID"];*/ 1:
|
||||
message.userID = reader.string();
|
||||
message.UserID = reader.string();
|
||||
break;
|
||||
case /* int64 ExpirationDate = 2 [json_name = "ExpirationDate"];*/ 2:
|
||||
message.expirationDate = reader.int64().toBigInt();
|
||||
message.ExpirationDate = reader.int64().toBigInt();
|
||||
break;
|
||||
case /* api.NotificationRequest Notification = 3 [json_name = "Notification"];*/ 3:
|
||||
message.notification = NotificationRequest.internalBinaryRead(reader, reader.uint32(), options, message.notification);
|
||||
message.Notification = NotificationRequest.internalBinaryRead(reader, reader.uint32(), options, message.Notification);
|
||||
break;
|
||||
default:
|
||||
let u = options.readUnknownField;
|
||||
@@ -358,14 +358,14 @@ class PublishToUserRequest$Type extends MessageType<PublishToUserRequest> {
|
||||
}
|
||||
internalBinaryWrite(message: PublishToUserRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
||||
/* string UserID = 1 [json_name = "UserID"]; */
|
||||
if (message.userID !== "")
|
||||
writer.tag(1, WireType.LengthDelimited).string(message.userID);
|
||||
if (message.UserID !== "")
|
||||
writer.tag(1, WireType.LengthDelimited).string(message.UserID);
|
||||
/* int64 ExpirationDate = 2 [json_name = "ExpirationDate"]; */
|
||||
if (message.expirationDate !== 0n)
|
||||
writer.tag(2, WireType.Varint).int64(message.expirationDate);
|
||||
if (message.ExpirationDate !== 0n)
|
||||
writer.tag(2, WireType.Varint).int64(message.ExpirationDate);
|
||||
/* api.NotificationRequest Notification = 3 [json_name = "Notification"]; */
|
||||
if (message.notification)
|
||||
NotificationRequest.internalBinaryWrite(message.notification, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
|
||||
if (message.Notification)
|
||||
NotificationRequest.internalBinaryWrite(message.Notification, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
|
||||
let u = options.writeUnknownFields;
|
||||
if (u !== false)
|
||||
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
||||
@@ -418,20 +418,20 @@ export const PublishToUserResult = new PublishToUserResult$Type();
|
||||
class NotificationListItem$Type extends MessageType<NotificationListItem> {
|
||||
constructor() {
|
||||
super("api.NotificationListItem", [
|
||||
{ no: 1, name: "Payload", kind: "scalar", jsonName: "Payload", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } }, "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Payload of the notification" } } },
|
||||
{ no: 2, name: "Type", kind: "enum", jsonName: "Type", T: () => ["api.NotificationType", NotificationType, "NOTIFICATION_TYPE_"], options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Payload type of the notification" } } },
|
||||
{ no: 3, name: "TemplateName", kind: "scalar", jsonName: "TemplateName", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Name of the ECard related to the notification payload" } } },
|
||||
{ no: 4, name: "Category", kind: "enum", jsonName: "Category", T: () => ["api.NotificationCategory", NotificationCategory, "NOTIFICATION_CATEGORY_"], options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Category of the notification" } } },
|
||||
{ no: 5, name: "ID", kind: "scalar", jsonName: "ID", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "ID of the notification" } } }
|
||||
{ no: 1, name: "Payload", kind: "scalar", localName: "Payload", jsonName: "Payload", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } }, "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Payload of the notification" } } },
|
||||
{ no: 2, name: "Type", kind: "enum", localName: "Type", jsonName: "Type", T: () => ["api.NotificationType", NotificationType, "NOTIFICATION_TYPE_"], options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Payload type of the notification" } } },
|
||||
{ no: 3, name: "TemplateName", kind: "scalar", localName: "TemplateName", jsonName: "TemplateName", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Name of the ECard related to the notification payload" } } },
|
||||
{ no: 4, name: "Category", kind: "enum", localName: "Category", jsonName: "Category", T: () => ["api.NotificationCategory", NotificationCategory, "NOTIFICATION_CATEGORY_"], options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Category of the notification" } } },
|
||||
{ no: 5, name: "ID", kind: "scalar", localName: "ID", jsonName: "ID", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "ID of the notification" } } }
|
||||
]);
|
||||
}
|
||||
create(value?: PartialMessage<NotificationListItem>): NotificationListItem {
|
||||
const message = globalThis.Object.create((this.messagePrototype!));
|
||||
message.payload = "";
|
||||
message.type = 0;
|
||||
message.templateName = "";
|
||||
message.category = 0;
|
||||
message.iD = "";
|
||||
message.Payload = "";
|
||||
message.Type = 0;
|
||||
message.TemplateName = "";
|
||||
message.Category = 0;
|
||||
message.ID = "";
|
||||
if (value !== undefined)
|
||||
reflectionMergePartial<NotificationListItem>(this, message, value);
|
||||
return message;
|
||||
@@ -442,19 +442,19 @@ class NotificationListItem$Type extends MessageType<NotificationListItem> {
|
||||
let [fieldNo, wireType] = reader.tag();
|
||||
switch (fieldNo) {
|
||||
case /* string Payload = 1 [json_name = "Payload"];*/ 1:
|
||||
message.payload = reader.string();
|
||||
message.Payload = reader.string();
|
||||
break;
|
||||
case /* api.NotificationType Type = 2 [json_name = "Type"];*/ 2:
|
||||
message.type = reader.int32();
|
||||
message.Type = reader.int32();
|
||||
break;
|
||||
case /* string TemplateName = 3 [json_name = "TemplateName"];*/ 3:
|
||||
message.templateName = reader.string();
|
||||
message.TemplateName = reader.string();
|
||||
break;
|
||||
case /* api.NotificationCategory Category = 4 [json_name = "Category"];*/ 4:
|
||||
message.category = reader.int32();
|
||||
message.Category = reader.int32();
|
||||
break;
|
||||
case /* string ID = 5 [json_name = "ID"];*/ 5:
|
||||
message.iD = reader.string();
|
||||
message.ID = reader.string();
|
||||
break;
|
||||
default:
|
||||
let u = options.readUnknownField;
|
||||
@@ -469,20 +469,20 @@ class NotificationListItem$Type extends MessageType<NotificationListItem> {
|
||||
}
|
||||
internalBinaryWrite(message: NotificationListItem, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
||||
/* string Payload = 1 [json_name = "Payload"]; */
|
||||
if (message.payload !== "")
|
||||
writer.tag(1, WireType.LengthDelimited).string(message.payload);
|
||||
if (message.Payload !== "")
|
||||
writer.tag(1, WireType.LengthDelimited).string(message.Payload);
|
||||
/* api.NotificationType Type = 2 [json_name = "Type"]; */
|
||||
if (message.type !== 0)
|
||||
writer.tag(2, WireType.Varint).int32(message.type);
|
||||
if (message.Type !== 0)
|
||||
writer.tag(2, WireType.Varint).int32(message.Type);
|
||||
/* string TemplateName = 3 [json_name = "TemplateName"]; */
|
||||
if (message.templateName !== "")
|
||||
writer.tag(3, WireType.LengthDelimited).string(message.templateName);
|
||||
if (message.TemplateName !== "")
|
||||
writer.tag(3, WireType.LengthDelimited).string(message.TemplateName);
|
||||
/* api.NotificationCategory Category = 4 [json_name = "Category"]; */
|
||||
if (message.category !== 0)
|
||||
writer.tag(4, WireType.Varint).int32(message.category);
|
||||
if (message.Category !== 0)
|
||||
writer.tag(4, WireType.Varint).int32(message.Category);
|
||||
/* string ID = 5 [json_name = "ID"]; */
|
||||
if (message.iD !== "")
|
||||
writer.tag(5, WireType.LengthDelimited).string(message.iD);
|
||||
if (message.ID !== "")
|
||||
writer.tag(5, WireType.LengthDelimited).string(message.ID);
|
||||
let u = options.writeUnknownFields;
|
||||
if (u !== false)
|
||||
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
||||
@@ -535,12 +535,12 @@ export const ListNotificationRequest = new ListNotificationRequest$Type();
|
||||
class ListNotificationResult$Type extends MessageType<ListNotificationResult> {
|
||||
constructor() {
|
||||
super("api.ListNotificationResult", [
|
||||
{ no: 1, name: "Notifications", kind: "message", jsonName: "Notifications", repeat: 1 /*RepeatType.PACKED*/, T: () => NotificationListItem }
|
||||
{ no: 1, name: "Notifications", kind: "message", localName: "Notifications", jsonName: "Notifications", repeat: 1 /*RepeatType.PACKED*/, T: () => NotificationListItem }
|
||||
]);
|
||||
}
|
||||
create(value?: PartialMessage<ListNotificationResult>): ListNotificationResult {
|
||||
const message = globalThis.Object.create((this.messagePrototype!));
|
||||
message.notifications = [];
|
||||
message.Notifications = [];
|
||||
if (value !== undefined)
|
||||
reflectionMergePartial<ListNotificationResult>(this, message, value);
|
||||
return message;
|
||||
@@ -551,7 +551,7 @@ class ListNotificationResult$Type extends MessageType<ListNotificationResult> {
|
||||
let [fieldNo, wireType] = reader.tag();
|
||||
switch (fieldNo) {
|
||||
case /* repeated api.NotificationListItem Notifications = 1 [json_name = "Notifications"];*/ 1:
|
||||
message.notifications.push(NotificationListItem.internalBinaryRead(reader, reader.uint32(), options));
|
||||
message.Notifications.push(NotificationListItem.internalBinaryRead(reader, reader.uint32(), options));
|
||||
break;
|
||||
default:
|
||||
let u = options.readUnknownField;
|
||||
@@ -566,8 +566,8 @@ class ListNotificationResult$Type extends MessageType<ListNotificationResult> {
|
||||
}
|
||||
internalBinaryWrite(message: ListNotificationResult, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
||||
/* repeated api.NotificationListItem Notifications = 1 [json_name = "Notifications"]; */
|
||||
for (let i = 0; i < message.notifications.length; i++)
|
||||
NotificationListItem.internalBinaryWrite(message.notifications[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
||||
for (let i = 0; i < message.Notifications.length; i++)
|
||||
NotificationListItem.internalBinaryWrite(message.Notifications[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
||||
let u = options.writeUnknownFields;
|
||||
if (u !== false)
|
||||
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
||||
|
||||
Reference in New Issue
Block a user