protobuf-platform 1.2.78 → 1.2.80
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.
|
@@ -12,6 +12,14 @@ service Notification {
|
|
|
12
12
|
rpc deleteSingleNotification(GetNotificationRequest) returns (NotificationStatusResponse);
|
|
13
13
|
rpc readListNotifications(PaginationRequest) returns (NotificationItemsResponse);
|
|
14
14
|
rpc updateNotificationsInBunch(ItemsBunchRequest) returns (NotificationStatusResponse);
|
|
15
|
+
// === MailTemplates (email) ===
|
|
16
|
+
rpc createSingleMailTemplate(stream MailTemplateChunk) returns (MailTemplateResponse);
|
|
17
|
+
rpc readSingleMailTemplate(GetMailTemplateRequest) returns (MailTemplateResponse);
|
|
18
|
+
rpc updateSingleMailTemplate(stream MailTemplateChunk) returns (MailTemplateResponse);
|
|
19
|
+
rpc deleteSingleMailTemplate(GetMailTemplateRequest) returns (MailTemplateStatusResponse);
|
|
20
|
+
rpc readListMailTemplates(PaginationRequest) returns (MailTemplateItemsResponse);
|
|
21
|
+
rpc updateMailTemplatesInBunch(ItemsBunchRequest) returns (MailTemplateStatusResponse);
|
|
22
|
+
rpc getMailTypes(PaginationRequest) returns (MailTypesResponse);
|
|
15
23
|
//Users
|
|
16
24
|
rpc sendNotificationToUsers(SendNotificationRequest) returns (NotificationStatusResponse);
|
|
17
25
|
rpc getNotificationForParticularUser(PaginationRequest) returns (UserNotificationItemsResponse);
|
|
@@ -27,6 +35,7 @@ message PaginationRequest {
|
|
|
27
35
|
optional string order = 3;
|
|
28
36
|
optional NotificationSearchRequest notification_search_params = 4;
|
|
29
37
|
optional UserSearchRequest user_search_params = 5;
|
|
38
|
+
optional MailTemplateSearchRequest mail_template_search_params = 6;
|
|
30
39
|
}
|
|
31
40
|
message NotificationSearchRequest {
|
|
32
41
|
optional int32 notification_id = 1;
|
|
@@ -100,4 +109,65 @@ message NotificationItemsResponse {
|
|
|
100
109
|
}
|
|
101
110
|
message UserNotificationsCountResponse {
|
|
102
111
|
int32 count = 1;
|
|
112
|
+
}
|
|
113
|
+
/* ===== MailTemplates (email) ===== */
|
|
114
|
+
|
|
115
|
+
// Search filters for list endpoint
|
|
116
|
+
message MailTemplateSearchRequest {
|
|
117
|
+
optional int32 template_id = 1;
|
|
118
|
+
optional string key = 2; // exact or like (your server decides)
|
|
119
|
+
optional string title = 3; // substring search
|
|
120
|
+
optional string type = 4; // e.g., "registration", "password_reset"
|
|
121
|
+
optional int32 is_active = 5; // -1 ignore, 0 false, 1 true
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
// Payload with fields of MailTemplate (used inside stream chunk)
|
|
125
|
+
message MailTemplateData {
|
|
126
|
+
optional int32 id = 1;
|
|
127
|
+
optional string key = 2;
|
|
128
|
+
optional string title = 3;
|
|
129
|
+
optional string type = 4;
|
|
130
|
+
optional int32 is_active = 5; // -1 ignore, 0 false, 1 true
|
|
131
|
+
optional string content = 6; // HTML from WYSIWYG
|
|
132
|
+
optional string header_image_ref = 7; // absolute URL (if provided directly)
|
|
133
|
+
optional string footer_image_ref = 8; // absolute URL
|
|
134
|
+
optional string conditions = 9; // JSON as string (server parses)
|
|
135
|
+
optional string order = 10; // reserved if you need ordering in UI
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
// Streaming chunk for create/update: either data or file
|
|
139
|
+
message MailTemplateChunk {
|
|
140
|
+
oneof data_or_file {
|
|
141
|
+
MailTemplateData mail_template_data = 1;
|
|
142
|
+
File file = 2; // header image file (webp recommended)
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
message GetMailTemplateRequest { int32 id = 1; }
|
|
147
|
+
|
|
148
|
+
message MailTemplateStatusResponse { string status = 1; }
|
|
149
|
+
|
|
150
|
+
// Item returned to clients (read/list)
|
|
151
|
+
message MailTemplateItem {
|
|
152
|
+
int32 id = 1;
|
|
153
|
+
string key = 2;
|
|
154
|
+
string title = 3;
|
|
155
|
+
string type = 4;
|
|
156
|
+
bool is_active = 5;
|
|
157
|
+
string header_image_ref = 6;
|
|
158
|
+
string footer_image_ref = 7;
|
|
159
|
+
string content = 8;
|
|
160
|
+
string conditions = 9; // JSON, serialized
|
|
161
|
+
optional string created = 10; // iso8601 or custom
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
message MailTemplateResponse { MailTemplateItem data = 1; }
|
|
165
|
+
|
|
166
|
+
message MailTemplateItemsResponse {
|
|
167
|
+
repeated MailTemplateItem items = 1;
|
|
168
|
+
optional int32 total_pages = 2;
|
|
169
|
+
optional int32 total_items = 3;
|
|
170
|
+
}
|
|
171
|
+
message MailTypesResponse {
|
|
172
|
+
repeated string types = 1;
|
|
103
173
|
}
|
|
@@ -26,6 +26,17 @@ function deserialize_notification_GetFileRequest(buffer_arg) {
|
|
|
26
26
|
return notification_pb.GetFileRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
+
function serialize_notification_GetMailTemplateRequest(arg) {
|
|
30
|
+
if (!(arg instanceof notification_pb.GetMailTemplateRequest)) {
|
|
31
|
+
throw new Error('Expected argument of type notification.GetMailTemplateRequest');
|
|
32
|
+
}
|
|
33
|
+
return Buffer.from(arg.serializeBinary());
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
function deserialize_notification_GetMailTemplateRequest(buffer_arg) {
|
|
37
|
+
return notification_pb.GetMailTemplateRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
|
38
|
+
}
|
|
39
|
+
|
|
29
40
|
function serialize_notification_GetNotificationRequest(arg) {
|
|
30
41
|
if (!(arg instanceof notification_pb.GetNotificationRequest)) {
|
|
31
42
|
throw new Error('Expected argument of type notification.GetNotificationRequest');
|
|
@@ -48,6 +59,61 @@ function deserialize_notification_ItemsBunchRequest(buffer_arg) {
|
|
|
48
59
|
return notification_pb.ItemsBunchRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
|
49
60
|
}
|
|
50
61
|
|
|
62
|
+
function serialize_notification_MailTemplateChunk(arg) {
|
|
63
|
+
if (!(arg instanceof notification_pb.MailTemplateChunk)) {
|
|
64
|
+
throw new Error('Expected argument of type notification.MailTemplateChunk');
|
|
65
|
+
}
|
|
66
|
+
return Buffer.from(arg.serializeBinary());
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
function deserialize_notification_MailTemplateChunk(buffer_arg) {
|
|
70
|
+
return notification_pb.MailTemplateChunk.deserializeBinary(new Uint8Array(buffer_arg));
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
function serialize_notification_MailTemplateItemsResponse(arg) {
|
|
74
|
+
if (!(arg instanceof notification_pb.MailTemplateItemsResponse)) {
|
|
75
|
+
throw new Error('Expected argument of type notification.MailTemplateItemsResponse');
|
|
76
|
+
}
|
|
77
|
+
return Buffer.from(arg.serializeBinary());
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
function deserialize_notification_MailTemplateItemsResponse(buffer_arg) {
|
|
81
|
+
return notification_pb.MailTemplateItemsResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
function serialize_notification_MailTemplateResponse(arg) {
|
|
85
|
+
if (!(arg instanceof notification_pb.MailTemplateResponse)) {
|
|
86
|
+
throw new Error('Expected argument of type notification.MailTemplateResponse');
|
|
87
|
+
}
|
|
88
|
+
return Buffer.from(arg.serializeBinary());
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
function deserialize_notification_MailTemplateResponse(buffer_arg) {
|
|
92
|
+
return notification_pb.MailTemplateResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
function serialize_notification_MailTemplateStatusResponse(arg) {
|
|
96
|
+
if (!(arg instanceof notification_pb.MailTemplateStatusResponse)) {
|
|
97
|
+
throw new Error('Expected argument of type notification.MailTemplateStatusResponse');
|
|
98
|
+
}
|
|
99
|
+
return Buffer.from(arg.serializeBinary());
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
function deserialize_notification_MailTemplateStatusResponse(buffer_arg) {
|
|
103
|
+
return notification_pb.MailTemplateStatusResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
function serialize_notification_MailTypesResponse(arg) {
|
|
107
|
+
if (!(arg instanceof notification_pb.MailTypesResponse)) {
|
|
108
|
+
throw new Error('Expected argument of type notification.MailTypesResponse');
|
|
109
|
+
}
|
|
110
|
+
return Buffer.from(arg.serializeBinary());
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
function deserialize_notification_MailTypesResponse(buffer_arg) {
|
|
114
|
+
return notification_pb.MailTypesResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
|
115
|
+
}
|
|
116
|
+
|
|
51
117
|
function serialize_notification_NotificationItemsResponse(arg) {
|
|
52
118
|
if (!(arg instanceof notification_pb.NotificationItemsResponse)) {
|
|
53
119
|
throw new Error('Expected argument of type notification.NotificationItemsResponse');
|
|
@@ -260,6 +326,84 @@ createSingleNotification: {
|
|
|
260
326
|
responseSerialize: serialize_notification_NotificationStatusResponse,
|
|
261
327
|
responseDeserialize: deserialize_notification_NotificationStatusResponse,
|
|
262
328
|
},
|
|
329
|
+
// === MailTemplates (email) ===
|
|
330
|
+
createSingleMailTemplate: {
|
|
331
|
+
path: '/notification.Notification/createSingleMailTemplate',
|
|
332
|
+
requestStream: true,
|
|
333
|
+
responseStream: false,
|
|
334
|
+
requestType: notification_pb.MailTemplateChunk,
|
|
335
|
+
responseType: notification_pb.MailTemplateResponse,
|
|
336
|
+
requestSerialize: serialize_notification_MailTemplateChunk,
|
|
337
|
+
requestDeserialize: deserialize_notification_MailTemplateChunk,
|
|
338
|
+
responseSerialize: serialize_notification_MailTemplateResponse,
|
|
339
|
+
responseDeserialize: deserialize_notification_MailTemplateResponse,
|
|
340
|
+
},
|
|
341
|
+
readSingleMailTemplate: {
|
|
342
|
+
path: '/notification.Notification/readSingleMailTemplate',
|
|
343
|
+
requestStream: false,
|
|
344
|
+
responseStream: false,
|
|
345
|
+
requestType: notification_pb.GetMailTemplateRequest,
|
|
346
|
+
responseType: notification_pb.MailTemplateResponse,
|
|
347
|
+
requestSerialize: serialize_notification_GetMailTemplateRequest,
|
|
348
|
+
requestDeserialize: deserialize_notification_GetMailTemplateRequest,
|
|
349
|
+
responseSerialize: serialize_notification_MailTemplateResponse,
|
|
350
|
+
responseDeserialize: deserialize_notification_MailTemplateResponse,
|
|
351
|
+
},
|
|
352
|
+
updateSingleMailTemplate: {
|
|
353
|
+
path: '/notification.Notification/updateSingleMailTemplate',
|
|
354
|
+
requestStream: true,
|
|
355
|
+
responseStream: false,
|
|
356
|
+
requestType: notification_pb.MailTemplateChunk,
|
|
357
|
+
responseType: notification_pb.MailTemplateResponse,
|
|
358
|
+
requestSerialize: serialize_notification_MailTemplateChunk,
|
|
359
|
+
requestDeserialize: deserialize_notification_MailTemplateChunk,
|
|
360
|
+
responseSerialize: serialize_notification_MailTemplateResponse,
|
|
361
|
+
responseDeserialize: deserialize_notification_MailTemplateResponse,
|
|
362
|
+
},
|
|
363
|
+
deleteSingleMailTemplate: {
|
|
364
|
+
path: '/notification.Notification/deleteSingleMailTemplate',
|
|
365
|
+
requestStream: false,
|
|
366
|
+
responseStream: false,
|
|
367
|
+
requestType: notification_pb.GetMailTemplateRequest,
|
|
368
|
+
responseType: notification_pb.MailTemplateStatusResponse,
|
|
369
|
+
requestSerialize: serialize_notification_GetMailTemplateRequest,
|
|
370
|
+
requestDeserialize: deserialize_notification_GetMailTemplateRequest,
|
|
371
|
+
responseSerialize: serialize_notification_MailTemplateStatusResponse,
|
|
372
|
+
responseDeserialize: deserialize_notification_MailTemplateStatusResponse,
|
|
373
|
+
},
|
|
374
|
+
readListMailTemplates: {
|
|
375
|
+
path: '/notification.Notification/readListMailTemplates',
|
|
376
|
+
requestStream: false,
|
|
377
|
+
responseStream: false,
|
|
378
|
+
requestType: notification_pb.PaginationRequest,
|
|
379
|
+
responseType: notification_pb.MailTemplateItemsResponse,
|
|
380
|
+
requestSerialize: serialize_notification_PaginationRequest,
|
|
381
|
+
requestDeserialize: deserialize_notification_PaginationRequest,
|
|
382
|
+
responseSerialize: serialize_notification_MailTemplateItemsResponse,
|
|
383
|
+
responseDeserialize: deserialize_notification_MailTemplateItemsResponse,
|
|
384
|
+
},
|
|
385
|
+
updateMailTemplatesInBunch: {
|
|
386
|
+
path: '/notification.Notification/updateMailTemplatesInBunch',
|
|
387
|
+
requestStream: false,
|
|
388
|
+
responseStream: false,
|
|
389
|
+
requestType: notification_pb.ItemsBunchRequest,
|
|
390
|
+
responseType: notification_pb.MailTemplateStatusResponse,
|
|
391
|
+
requestSerialize: serialize_notification_ItemsBunchRequest,
|
|
392
|
+
requestDeserialize: deserialize_notification_ItemsBunchRequest,
|
|
393
|
+
responseSerialize: serialize_notification_MailTemplateStatusResponse,
|
|
394
|
+
responseDeserialize: deserialize_notification_MailTemplateStatusResponse,
|
|
395
|
+
},
|
|
396
|
+
getMailTypes: {
|
|
397
|
+
path: '/notification.Notification/getMailTypes',
|
|
398
|
+
requestStream: false,
|
|
399
|
+
responseStream: false,
|
|
400
|
+
requestType: notification_pb.PaginationRequest,
|
|
401
|
+
responseType: notification_pb.MailTypesResponse,
|
|
402
|
+
requestSerialize: serialize_notification_PaginationRequest,
|
|
403
|
+
requestDeserialize: deserialize_notification_PaginationRequest,
|
|
404
|
+
responseSerialize: serialize_notification_MailTypesResponse,
|
|
405
|
+
responseDeserialize: deserialize_notification_MailTypesResponse,
|
|
406
|
+
},
|
|
263
407
|
// Users
|
|
264
408
|
sendNotificationToUsers: {
|
|
265
409
|
path: '/notification.Notification/sendNotificationToUsers',
|